diff --git a/app.py b/app.py index 2a235cc5..bf121a0d 100644 --- a/app.py +++ b/app.py @@ -90,7 +90,7 @@ packages: List[Tuple[str, str]] = [ ("freedom_search", "0.1.9"), ("scrapemaster", "0.2.1"), ("lollms_client", "0.7.7"), - ("lollmsvectordb", "1.3.5"), + ("lollmsvectordb", "1.3.6"), ] if not pm.is_installed("einops"): diff --git a/books.sqlite b/books.sqlite new file mode 100644 index 00000000..0e35df39 Binary files /dev/null and b/books.sqlite differ diff --git a/docs/books/books.sqlite b/docs/books/books.sqlite new file mode 100644 index 00000000..186a34b7 Binary files /dev/null and b/docs/books/books.sqlite differ diff --git a/lollms_core b/lollms_core index 1ca026f1..41a1a695 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 1ca026f151521747a904bd84b1cb5e733b75faa1 +Subproject commit 41a1a695adef58d152d8cb46c99ad3438722e6f7 diff --git a/web/dist/assets/index-C2FoYcNI.css b/web/dist/assets/index-D7riBOGp.css similarity index 99% rename from web/dist/assets/index-C2FoYcNI.css rename to web/dist/assets/index-D7riBOGp.css index bf27ec34..c4b71ab6 100644 --- a/web/dist/assets/index-C2FoYcNI.css +++ b/web/dist/assets/index-D7riBOGp.css @@ -5,4 +5,4 @@ Author: (c) Henri Vandersleyen License: see project LICENSE Touched: 2022 -*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.spinner{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.execute-button{display:flex;align-items:center;gap:.5rem}.math{display:inline-block}.mathjax_block{display:block}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.custom-scrollbar[data-v-8a34bb65]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}.toastItem-enter-active[data-v-46f379e5],.toastItem-leave-active[data-v-46f379e5]{transition:all .5s ease}.toastItem-enter-from[data-v-46f379e5],.toastItem-leave-to[data-v-46f379e5]{opacity:0;transform:translate(-30px)}.topbar-container[data-v-8d9a9d0d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-8d9a9d0d]{background-color:#ffffff1a;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transition:transform .3s ease-in-out;display:flex;justify-content:center}.topbar-hidden[data-v-8d9a9d0d]{transform:translateY(-100%)}.topbar-content[data-v-8d9a9d0d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-8d9a9d0d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-8d9a9d0d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-8d9a9d0d]{transform:scale(1.2)}.placeholder[data-v-8d9a9d0d]{height:10px}.topbar-container[data-v-8d9a9d0d]{position:relative;width:100%}.hover-zone[data-v-8d9a9d0d]{opacity:0}.error[data-v-8d9a9d0d]{color:red;margin-left:1rem}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000}.hovered{transform:scale(1.05);transition:transform .2s ease-in-out}.active{transform:scale(1.1);transition:transform .2s ease-in-out}.dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}:root.dark .dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #ffffff1a,0 2px 4px -1px #ffffff0f}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:500px;background-color:#fff;z-index:1000;overflow-y:auto;height:100%}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.help-view[data-v-8c1798f3]{min-height:100vh}.big-card[data-v-8c1798f3]{margin-left:auto;margin-right:auto;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:2rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.big-card[data-v-8c1798f3]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.help-sections-container[data-v-8c1798f3]{max-height:70vh;overflow-y:auto;padding-right:1rem}.help-section[data-v-8c1798f3]{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.help-content[data-v-8c1798f3]{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.help-content[data-v-8c1798f3]:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar{width:12px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb:hover{background:#555}.help-sections-container[data-v-8c1798f3]{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.fade-enter-active[data-v-f43216be],.fade-leave-active[data-v-f43216be]{transition:opacity .3s}.fade-enter[data-v-f43216be],.fade-leave-to[data-v-f43216be]{opacity:0}.heartbeat-text[data-v-19e3bad8]{font-size:24px;animation:pulsate-19e3bad8 1.5s infinite}@keyframes pulsate-19e3bad8{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-19e3bad8],.list-enter-active[data-v-19e3bad8],.list-leave-active[data-v-19e3bad8]{transition:all .5s ease}.list-enter-from[data-v-19e3bad8]{transform:translatey(-30px)}.list-leave-to[data-v-19e3bad8]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-19e3bad8]{position:absolute}.bounce-enter-active[data-v-19e3bad8]{animation:bounce-in-19e3bad8 .5s}.bounce-leave-active[data-v-19e3bad8]{animation:bounce-in-19e3bad8 .5s reverse}@keyframes bounce-in-19e3bad8{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-19e3bad8]{background-color:#0ff}.hover[data-v-19e3bad8]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-19e3bad8]{font-weight:700}.control-buttons[data-v-2b3580ce]{position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;transform:translate(100%);transition:transform .3s}.group:hover .control-buttons[data-v-2b3580ce]{transform:translate(0)}.control-buttons-inner[data-v-2b3580ce]{display:flex;gap:10px;align-items:center;background-color:#fff;padding:8px;border-radius:0 0 0 8px;box-shadow:0 2px 8px #0000001a}.json-tree-view[data-v-40406ec6]{margin-left:16px}.json-item[data-v-40406ec6]{margin-bottom:4px}.json-key[data-v-40406ec6]{cursor:pointer;display:flex;align-items:center}.toggle-icon[data-v-40406ec6]{margin-right:4px;width:12px}.key[data-v-40406ec6]{font-weight:700;margin-right:4px}.value[data-v-40406ec6]{margin-left:4px}.string[data-v-40406ec6]{color:#0b7285}.number[data-v-40406ec6]{color:#d9480f}.boolean[data-v-40406ec6]{color:#5c940d}.null[data-v-40406ec6]{color:#868e96}.json-nested[data-v-40406ec6]{margin-left:16px;border-left:1px dashed #ccc;padding-left:8px}.json-viewer[data-v-83fc9727]{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:14px;line-height:1.5;color:#333}.collapsible-section[data-v-83fc9727]{cursor:pointer;padding:8px;background-color:#f0f0f0;border-radius:4px;display:flex;align-items:center;transition:background-color .2s}.collapsible-section[data-v-83fc9727]:hover{background-color:#e0e0e0}.toggle-icon[data-v-83fc9727]{margin-right:8px;transition:transform .2s}.json-content[data-v-83fc9727]{margin-top:8px;padding-left:16px}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fadeIn{animation:fadeIn .5s ease-out forwards}details[open] summary~*{animation:slideDown .3s ease-in-out}details summary::marker{display:none}details summary::-webkit-details-marker{display:none}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.bounce-enter-active[data-v-f44002af]{animation:bounce-in-f44002af .5s}.bounce-leave-active[data-v-f44002af]{animation:bounce-in-f44002af .5s reverse}@keyframes bounce-in-f44002af{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.personalities-hover-area[data-v-61f37096]{position:relative;padding-top:10px}.custom-scrollbar[data-v-61f37096]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-61f37096]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-61f37096]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-61f37096]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-61f37096],.list-enter-active[data-v-61f37096],.list-leave-active[data-v-61f37096]{transition:all .5s ease}.list-enter-from[data-v-61f37096]{transform:translatey(-30px)}.list-leave-to[data-v-61f37096]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-61f37096]{position:absolute}@keyframes rolling-ball-d9375d3e{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-d9375d3e{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-d9375d3e{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-d9375d3e]{animation:rolling-ball-d9375d3e 4s infinite ease-in-out,bounce-d9375d3e 1s infinite ease-in-out}.animate-fade-in-up[data-v-d9375d3e]{animation:fade-in-up-d9375d3e 1.5s ease-out}.floating-button-container[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;z-index:9999}.floating-button[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;width:100px;height:100px;border-radius:50%;background-color:#ff4500e6;display:flex;justify-content:center;align-items:center;box-shadow:0 0 30px #ff4500cc;animation:pulse-d9375d3e 1.5s infinite,glow-d9375d3e 2s infinite,wobble-d9375d3e 3s infinite;overflow:hidden;z-index:9999;transition:all .3s ease}.floating-button[data-v-d9375d3e]:hover{transform:scale(1.2) rotate(5deg);background-color:#ff4500}.tooltip[data-v-d9375d3e]{position:absolute;background-color:#000c;color:#fff;padding:8px 12px;border-radius:8px;font-size:16px;font-weight:700;white-space:nowrap;opacity:0;transition:opacity .3s ease,transform .3s ease;pointer-events:none;top:-50px;left:50%;transform:translate(-50%) scale(.9)}.floating-button:hover .tooltip[data-v-d9375d3e]{opacity:1;transform:translate(-50%) scale(1)}@keyframes pulse-d9375d3e{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes glow-d9375d3e{0%{box-shadow:0 0 30px #ff4500cc}50%{box-shadow:0 0 60px #ff4500,0 0 90px #ff450099}to{box-shadow:0 0 30px #ff4500cc}}@keyframes wobble-d9375d3e{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}.hidden[data-v-d9375d3e]{display:none}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.glow-effect[data-v-85f3dede]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-85f3dede 1.5s ease-in-out infinite alternate}@keyframes glow-85f3dede{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-44ddc55b]{position:relative}.skills-lib-icon[data-v-44ddc55b]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-44ddc55b]{width:2px;height:2px}@keyframes giggle-44ddc55b{0%,to{transform:translate(0) rotate(0) scale(1)}25%{transform:translate(-5px) rotate(-10deg) scale(1.05)}50%{transform:translate(5px) rotate(10deg) scale(.95)}75%{transform:translate(-5px) rotate(-10deg) scale(1.05)}}.animate-giggle[data-v-44ddc55b]{animation:giggle-44ddc55b 1.5s infinite ease-in-out}.custom-scrollbar[data-v-44ddc55b]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-44ddc55b{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-44ddc55b]{animation:custom-pulse-44ddc55b 2s infinite}.slide-right-enter-active[data-v-44ddc55b],.slide-right-leave-active[data-v-44ddc55b]{transition:transform .3s ease}.slide-right-enter[data-v-44ddc55b],.slide-right-leave-to[data-v-44ddc55b]{transform:translate(-100%)}.slide-left-enter-active[data-v-44ddc55b],.slide-left-leave-active[data-v-44ddc55b]{transition:transform .3s ease}.slide-left-enter[data-v-44ddc55b],.slide-left-leave-to[data-v-44ddc55b]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-44ddc55b]{animation:fade-and-fly-enter-44ddc55b .5s ease}.fade-and-fly-leave-active[data-v-44ddc55b]{animation:fade-and-fly-leave-44ddc55b .5s ease}@keyframes fade-and-fly-enter-44ddc55b{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-44ddc55b{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-44ddc55b],.list-enter-active[data-v-44ddc55b],.list-leave-active[data-v-44ddc55b]{transition:all .5s ease}.list-enter-from[data-v-44ddc55b]{transform:translatey(-30px)}.list-leave-to[data-v-44ddc55b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-44ddc55b]{position:absolute}@keyframes float-44ddc55b{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-44ddc55b]{animation:float-44ddc55b linear infinite}@keyframes star-move-44ddc55b{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-44ddc55b]{animation:star-move-44ddc55b linear infinite}@keyframes fall-44ddc55b{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-44ddc55b]{animation:fall-44ddc55b linear infinite}@keyframes glow-44ddc55b{0%,to{text-shadow:0 0 5px rgba(66,153,225,.5),0 0 10px rgba(66,153,225,.5)}50%{text-shadow:0 0 20px rgba(66,153,225,.8),0 0 30px rgba(66,153,225,.8)}}.animate-glow[data-v-44ddc55b]{animation:glow-44ddc55b 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-44ddc55b{0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}}}@keyframes roll-44ddc55b{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-44ddc55b]{animation:roll-44ddc55b 4s linear infinite}.toolbar[data-v-44ddc55b]{position:relative;width:100%}.toolbar-container[data-v-44ddc55b]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-44ddc55b]{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button[data-v-44ddc55b]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-44ddc55b]{position:relative}.expandable-menu[data-v-44ddc55b]{position:absolute;top:100%;left:.625rem;flex-direction:column;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.menu-container:hover .expandable-menu[data-v-44ddc55b],.menu-visible[data-v-44ddc55b]{display:flex}.menu-item[data-v-44ddc55b]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-44ddc55b]:hover{background-color:#f0f0f0}.dot[data-v-44ddc55b]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-44ddc55b]{background-color:green}.dot-red[data-v-44ddc55b]{background-color:red}.animate-pulse[data-v-44ddc55b]{animation:pulse-44ddc55b 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-44ddc55b{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-44ddc55b]{position:relative;width:48px;height:48px}.logo-image[data-v-44ddc55b]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-44ddc55b{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce[data-v-44ddc55b]{animation:bounce-44ddc55b 1s infinite}@keyframes roll-and-bounce-44ddc55b{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin-44ddc55b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-selectionbox-color-border: var(--baklava-node-color-background);--baklava-selectionbox-color-background: var(--baklava-node-color-hover);--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor .selection-box{position:absolute;border:1px solid var(--baklava-selectionbox-color-border);background-color:var(--baklava-selectionbox-color-background);pointer-events:none;opacity:.5}.baklava-editor.--start-selection-box{cursor:crosshair}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:#fff;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content.--reverse-y{display:flex;flex-direction:column-reverse}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.loading-indicator[data-v-f8c39e0b]{display:flex;justify-content:center;align-items:center;height:100px;font-size:1.2em;color:#666}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:#fff;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}body{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #e0eaff var(--tw-gradient-from-position);--tw-gradient-to: rgb(224 234 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #f0e6ff var(--tw-gradient-to-position)}body:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #0f2647 var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 38 71 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1e1b4b var(--tw-gradient-to-position)}html{scroll-behavior:smooth}body{font-family:Roboto,sans-serif}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1\.5{left:-.375rem}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[60px\]{bottom:60px}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-full{top:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[200px\]{min-height:200px}.min-h-\[220px\]{min-height:220px}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[15rem\]{width:15rem}.w-\[16rem\]{width:16rem}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-\[this-is\\\\\]{width:this-is\\}.w-\[this-is\]{width:this-is}.w-\[weird-and-invalid\]{width:weird-and-invalid}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-96,.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(195 221 253 / var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-\[rgb\(255\,0\,0\)\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/10{--tw-gradient-from: rgb(63 131 248 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(144 97 249 / .1) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.fill-blue-600{fill:#1c64f2}.fill-current{fill:currentColor}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-80{padding-bottom:20rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-12{padding-top:3rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.font-mono{font-family:JetBrains Mono,Consolas,monospace}.font-sans{font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#336699\]\/\[\.35\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(208 56 1 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity: 1;color:rgb(6 148 162 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\[\'this-is-also-valid\]-weirdly-enough\'\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-track-blue-100{--scrollbar-track: #E1EFFE !important}.scrollbar-track-gray-200{--scrollbar-track: #E5E7EB !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.scrollbar-thumb-blue-500{--scrollbar-thumb: #3F83F8 !important}.scrollbar-thumb-gray-400{--scrollbar-thumb: #9CA3AF !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{margin-bottom:1.5rem;font-size:2.25rem;line-height:2.5rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}h1:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}@media (min-width: 768px){h1{font-size:3rem;line-height:1}}h2{margin-bottom:1rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}h2:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}h3{margin-bottom:.75rem;font-size:1.5rem;line-height:2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}h3:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}h4{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:500;--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}h4:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}h1,h2{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding-bottom:.5rem}h1:is(.dark *),h2:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}p{overflow-wrap:break-word;font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-size:1rem;line-height:1.5rem;line-height:1.625;letter-spacing:-.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}@media (min-width: 768px){p{font-size:1.125rem;line-height:1.75rem;line-height:2}}table{border-collapse:collapse;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}table:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}th,td{border-width:1px;--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));padding:.5rem}th:is(.dark *),td:is(.dark *){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}tr:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}tr:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}ul,ol{margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.75rem}ul{margin-left:.5rem;list-style-type:disc}ul>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}li{position:relative;padding-left:.5rem}ol{margin-left:.5rem;list-style-type:decimal}ol>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}ul ul,ol ol,ul ol,ol ul{margin-top:.5rem;margin-bottom:0;margin-left:1.5rem}li::marker{color:#4b5563}:root{--color-primary: #4a90e2;--color-primary-light: #6ab7f1;--color-secondary: #8ab8e0;--color-accent: #3a7ca1;--color-light-text-panel: #ffffff;--color-dark-text-panel: #e0e0e0;--color-bg-light-panel: #f0faff;--color-bg-light: #ffffff;--color-bg-light-tone: #e0f0ff;--color-bg-light-code-block: #f5faff;--color-bg-light-tone-panel: #d0e0f0;--color-bg-light-discussion: #f8faff;--color-bg-light-discussion-odd: #f0faff;--color-bg-dark: #0a0a1a;--color-bg-dark-tone: #151521;--color-bg-dark-tone-panel: #1c1c2a;--color-bg-dark-code-block: #151521;--color-bg-dark-discussion: #0e0e1a;--color-bg-dark-discussion-odd: #0d0d1a}textarea,input,select{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}textarea:is(.dark *),input:is(.dark *),select:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.background-color{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.background-color:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.toolbar-color{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.toolbar-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.panels-color{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.unicolor-panels-color{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.unicolor-panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.message{position:relative;margin:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:column;flex-wrap:wrap;overflow:visible;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding:1.25rem 1.25rem .75rem;font-size:1.125rem;line-height:1.75rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.message:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.message{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.message:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1E429F var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.message:hover{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.message:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.message:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.message:nth-child(2n):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.message:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.message:nth-child(odd):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.message-header{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.message-content{font-size:1.125rem;line-height:1.75rem;line-height:1.625}body{min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));font-size:1rem;line-height:1.5rem}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.discussion{margin-right:.5rem;font-size:.75rem;line-height:1rem}.discussion:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.discussion-hilighted{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));font-size:.75rem;line-height:1rem}.discussion-hilighted:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gradient-welcome{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.bg-gradient-welcome:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.bg-gradient-progress{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #A4CAFE var(--tw-gradient-to-position)}.bg-gradient-progress:is(.dark *){--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.text-gradient-title{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position);-webkit-background-clip:text;background-clip:text;color:transparent}.text-gradient-title:is(.dark *){--tw-gradient-from: #A4CAFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(164 202 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.text-subtitle{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-subtitle:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-author{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-author:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-loading{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-loading:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.text-progress{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-progress:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.btn-primary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.card{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));padding:.5rem 1rem}.input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.input:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.label{margin-bottom:.25rem;display:block;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.label:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.link{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.link:hover{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.link:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.link:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.navbar-container{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.navbar-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.game-menu{position:relative;display:flex;align-items:center;justify-content:center}.text-shadow-custom{text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.animated-progressbar-bg{position:relative;height:2.5rem;width:100%;overflow:hidden;border-radius:.125rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #233876 var(--tw-gradient-to-position);--tw-shadow: 0 0 15px rgba(245,158,11,.2);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.animated-progressbar-bg:is(.dark *){--tw-gradient-from: #000000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #172554 var(--tw-gradient-to-position)}.animated-progressbar-fg{position:absolute;top:0;left:0;height:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #76A9FA var(--tw-gradient-to-position);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.animated-progressbar-fg:is(.dark *){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.menu-item{margin-bottom:.5rem;padding:.5rem 1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.menu-item:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.menu-item:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:.375rem;border-top-right-radius:.375rem;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.menu-item.active-link:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item.active-link:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.menu-item.active-link:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{text-shadow:0 0 10px rgba(128,128,128,.5)}.menu-item.active-link:before{content:"";position:absolute;bottom:-5px;left:0;width:100%;height:5px;background:linear-gradient(to right,#4a90e2,#8ab8e0,#4a90e2);border-radius:10px;animation:shimmer 2s infinite}.dark .menu-item.active-link:before{background:linear-gradient(to right,#6ab7f1,#aaa,#6ab7f1)}@keyframes shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}.feather-emoji{display:inline-block;margin-left:5px;animation:bounce 2s infinite}.app-card{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.app-card:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.app-card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.app-card:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}button{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar-thin{scrollbar-color:#1C64F2 #1E429F}.scrollbar-thin::-webkit-scrollbar{width:.5rem}.scrollbar-thin::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.btn{display:flex;align-items:center;border-radius:.5rem;padding:.5rem 1rem;font-weight:600;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.btn-primary{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-primary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.btn-primary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.btn-secondary{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.btn-secondary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.btn-secondary:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.btn-secondary:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.btn-secondary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.search-input{width:100%;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));background-color:transparent;padding:.5rem 1rem .5rem 2.5rem;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.search-input:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));outline:2px solid transparent;outline-offset:2px}.search-input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.search-input:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar{--scrollbar-track: #C3DDFD;--scrollbar-thumb: #76A9FA;scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar{scrollbar-color:#1C64F2 #1E429F}.scrollbar::-webkit-scrollbar{width:.5rem}.scrollbar::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar{--scrollbar-thumb-hover: #3F83F8}.scrollbar:is(.dark *){--scrollbar-track: #1A56DB;--scrollbar-thumb: #1C64F2;--scrollbar-thumb-hover: #3F83F8}.card-title{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.card-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.card-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.card-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.card-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.card-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.card-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.subcard{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity));padding:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.subcard:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.subcard-title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.subcard-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.subcard-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.subcard-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.subcard-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.subcard-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.subcard-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.discussion-toolbox{display:flex;--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;gap:.5rem;border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.group:hover .discussion-toolbox{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.discussion-toolbox:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.lollms-title-style{text-shadow:2px 2px 4px rgba(0,0,0,.2),2px 2px 0px white,-2px -2px 0px white,2px -2px 0px white,-2px 2px 0px white;background:linear-gradient(45deg,#f59e0b,#fbbf24);-webkit-background-clip:text;background-clip:text}.chat-bar{position:relative;display:flex;flex-grow:1;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:.5rem;--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity));padding:.25rem;--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:is(.dark *){--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.chat-bar{height:50px;transition:all .3s ease}.chat-bar:hover{box-shadow:0 4px 6px -1px #00ff001a,0 2px 4px -1px #00ff000f}.svg-button{border-radius:9999px;padding:.5rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.svg-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity));--tw-ring-offset-width: 2px}.svg-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.svg-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.svg-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.svg-button:active{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.svg-button:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.nav-button{border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-button:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.nav-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.nav-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.nav-button-active{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.nav-button-active:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-on{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.btn-on:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.btn-off{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.btn-off:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.interesting-facts{margin-top:1.5rem;margin-bottom:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.5rem;background-color:#fffc;padding:1rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.interesting-facts:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.interesting-facts:is(.dark *){background-color:#1f2937cc}.toolbar-button{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.context-menu{position:absolute;background-color:#fff;border:1px solid #e0e0e0;box-shadow:0 2px 10px #0000001a;border-radius:4px;padding:8px 0;min-width:150px;z-index:1000}.context-menu-item{padding:8px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s ease}.context-menu-item:hover{background-color:#f5f5f5}.context-menu-separator{height:1px;background-color:#e0e0e0;margin:4px 0}.context-menu-item-disabled{color:#999;cursor:not-allowed}.context-menu-item-icon{margin-right:8px}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:1rem}.steps-header:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding-left:1rem}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.steps-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding:1rem}.steps-header:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.steps-icon{margin-right:1rem}.steps-summary{flex-grow:1}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.steps-title:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.steps-status{margin:0;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.steps-status:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.toggle-icon{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.toggle-icon:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.steps-content{padding:1rem}.steps-list{margin:0;list-style-type:none;padding:0}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding-left:1rem}.step-item:last-child{margin-bottom:0}.step-item:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.step-container{margin-bottom:1rem;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.step-wrapper{display:flex;align-items:flex-start;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.75rem}.step-wrapper:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.step-icon{margin-right:.75rem;height:1.5rem;width:1.5rem;flex-shrink:0}.icon-success{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-fail{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-spinner{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.icon-spinner{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));border-top-color:transparent}.icon-spinner:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.step-content{flex-grow:1}.step-text{font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.step-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.step-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.step-description:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.fade-enter-active,.fade-leave-active{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.fade-enter,.fade-leave-to{opacity:0}.status-icon{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.icon{height:1.5rem;width:1.5rem}.icon-success{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-success:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.icon-fail{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-fail:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.icon-text{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.icon-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}.sm\:container{max-width:640px}@media (min-width: 768px){.sm\:container{max-width:768px}}@media (min-width: 1024px){.sm\:container{max-width:1024px}}@media (min-width: 1280px){.sm\:container{max-width:1280px}}@media (min-width: 1536px){.sm\:container{max-width:1536px}}}.last\:mb-0:last-child{margin-bottom:0}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group\/item:hover .group-hover\/item\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/item:hover .group-hover\/item\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-x-100:hover{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from: #EBF5FF var(--tw-gradient-from-position);--tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-blue-500\/20:hover{--tw-gradient-from: rgb(63 131 248 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:to-purple-50:hover{--tw-gradient-to: #F6F5FF var(--tw-gradient-to-position)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(144 97 249 / .2) var(--tw-gradient-to-position)}.hover\:font-bold:hover{font-weight:700}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-teal-600:hover{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.before\:hover\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\:before\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:border-transparent:focus{border-color:transparent}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-500\/50:focus{--tw-ring-color: rgb(63 131 248 / .5)}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.focus\:hover\:text-center:hover:focus{text-align:center}.hover\:focus\:text-center:focus:hover{text-align:center}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-bg-light:is(.dark *){border-color:var(--color-bg-light)}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-transparent:is(.dark *){border-color:transparent}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:bg-bg-dark:is(.dark *){background-color:var(--color-bg-dark)}.dark\:bg-bg-dark-tone:is(.dark *){background-color:var(--color-bg-dark-tone)}.dark\:bg-bg-dark-tone-panel:is(.dark *){background-color:var(--color-bg-dark-tone-panel)}.dark\:bg-black:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-indigo-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-orange-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.dark\:bg-pink-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}.dark\:bg-purple-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-white:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.dark\:bg-opacity-70:is(.dark *){--tw-bg-opacity: .7}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:from-bg-dark:is(.dark *){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-blue-400\/20:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-indigo-400:is(.dark *){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:via-bg-dark:is(.dark *){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:to-purple-400:is(.dark *){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}.dark\:to-purple-400\/20:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .2) var(--tw-gradient-to-position)}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-blue-800:is(.dark *){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.dark\:text-dark-text-panel:is(.dark *){color:var(--color-dark-text-panel)}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-green-800:is(.dark *){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.dark\:text-green-900:is(.dark *){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.dark\:text-indigo-900:is(.dark *){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-pink-500:is(.dark *){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.dark\:text-pink-900:is(.dark *){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.dark\:text-primary:is(.dark *){color:var(--color-primary)}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-purple-500:is(.dark *){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.dark\:text-purple-900:is(.dark *){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-red-800:is(.dark *){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.dark\:text-red-900:is(.dark *){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.dark\:text-yellow-800:is(.dark *){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.dark\:text-yellow-900:is(.dark *){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:shadow-lg:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-white:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.dark\:ring-opacity-20:is(.dark *){--tw-ring-opacity: .2}.dark\:ring-offset-gray-700:is(.dark *){--tw-ring-offset-color: #374151}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:scrollbar-track-bg-dark:is(.dark *){--scrollbar-track: var(--color-bg-dark) !important}.dark\:scrollbar-track-bg-dark-tone:is(.dark *){--scrollbar-track: var(--color-bg-dark-tone) !important}.dark\:scrollbar-track-gray-700:is(.dark *){--scrollbar-track: #374151 !important}.dark\:scrollbar-track-gray-800:is(.dark *){--scrollbar-track: #1F2937 !important}.dark\:scrollbar-thumb-bg-dark-tone:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone) !important}.dark\:scrollbar-thumb-bg-dark-tone-panel:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}.dark\:scrollbar-thumb-gray-500:is(.dark *){--scrollbar-thumb: #6B7280 !important}.dark\:scrollbar-thumb-gray-600:is(.dark *){--scrollbar-thumb: #4B5563 !important}.dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n):is(.dark *){background-color:var(--color-bg-dark-discussion-odd)}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:border-primary:hover:is(.dark *){border-color:var(--color-primary)}.dark\:hover\:bg-blue-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary:hover:is(.dark *){background-color:var(--color-primary)}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:dark\:bg-bg-dark-tone:is(.dark *):hover{background-color:var(--color-bg-dark-tone)}.hover\:dark\:bg-bg-dark-tone-panel:is(.dark *):hover{background-color:var(--color-bg-dark-tone-panel)}.dark\:hover\:from-blue-400\/30:hover:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:from-blue-900\/30:hover:is(.dark *){--tw-gradient-from: rgb(35 56 118 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:to-purple-400\/30:hover:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .3) var(--tw-gradient-to-position)}.dark\:hover\:to-purple-900\/30:hover:is(.dark *){--tw-gradient-to: rgb(74 29 150 / .3) var(--tw-gradient-to-position)}.dark\:hover\:text-blue-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-gray-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:hover\:text-green-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:scrollbar-thumb-primary:is(.dark *){--scrollbar-thumb-hover: var(--color-primary) !important}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-secondary:focus:is(.dark *){border-color:var(--color-secondary)}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus\:ring-secondary:focus:is(.dark *){--tw-ring-color: var(--color-secondary)}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-offset-gray-700:focus:is(.dark *){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mb-0{margin-bottom:0}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.dark\:lg\:hover\:\[paint-order\:markers\]:hover:is(.dark *){paint-order:markers}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} +*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.spinner{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.execute-button{display:flex;align-items:center;gap:.5rem}.math{display:inline-block}.mathjax_block{display:block}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.custom-scrollbar[data-v-8a34bb65]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}.toastItem-enter-active[data-v-46f379e5],.toastItem-leave-active[data-v-46f379e5]{transition:all .5s ease}.toastItem-enter-from[data-v-46f379e5],.toastItem-leave-to[data-v-46f379e5]{opacity:0;transform:translate(-30px)}.topbar-container[data-v-8d9a9d0d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-8d9a9d0d]{background-color:#ffffff1a;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transition:transform .3s ease-in-out;display:flex;justify-content:center}.topbar-hidden[data-v-8d9a9d0d]{transform:translateY(-100%)}.topbar-content[data-v-8d9a9d0d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-8d9a9d0d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-8d9a9d0d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-8d9a9d0d]{transform:scale(1.2)}.placeholder[data-v-8d9a9d0d]{height:10px}.topbar-container[data-v-8d9a9d0d]{position:relative;width:100%}.hover-zone[data-v-8d9a9d0d]{opacity:0}.error[data-v-8d9a9d0d]{color:red;margin-left:1rem}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000}.hovered{transform:scale(1.05);transition:transform .2s ease-in-out}.active{transform:scale(1.1);transition:transform .2s ease-in-out}.dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}:root.dark .dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #ffffff1a,0 2px 4px -1px #ffffff0f}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:500px;background-color:#fff;z-index:1000;overflow-y:auto;height:100%}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.help-view[data-v-8c1798f3]{min-height:100vh}.big-card[data-v-8c1798f3]{margin-left:auto;margin-right:auto;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:2rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.big-card[data-v-8c1798f3]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.help-sections-container[data-v-8c1798f3]{max-height:70vh;overflow-y:auto;padding-right:1rem}.help-section[data-v-8c1798f3]{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.help-content[data-v-8c1798f3]{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.help-content[data-v-8c1798f3]:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar{width:12px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb:hover{background:#555}.help-sections-container[data-v-8c1798f3]{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.fade-enter-active[data-v-f43216be],.fade-leave-active[data-v-f43216be]{transition:opacity .3s}.fade-enter[data-v-f43216be],.fade-leave-to[data-v-f43216be]{opacity:0}.heartbeat-text[data-v-894fd226]{font-size:24px;animation:pulsate-894fd226 1.5s infinite}@keyframes pulsate-894fd226{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-894fd226],.list-enter-active[data-v-894fd226],.list-leave-active[data-v-894fd226]{transition:all .5s ease}.list-enter-from[data-v-894fd226]{transform:translatey(-30px)}.list-leave-to[data-v-894fd226]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-894fd226]{position:absolute}.bounce-enter-active[data-v-894fd226]{animation:bounce-in-894fd226 .5s}.bounce-leave-active[data-v-894fd226]{animation:bounce-in-894fd226 .5s reverse}@keyframes bounce-in-894fd226{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-894fd226]{background-color:#0ff}.hover[data-v-894fd226]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-894fd226]{font-weight:700}.control-buttons[data-v-2b3580ce]{position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;transform:translate(100%);transition:transform .3s}.group:hover .control-buttons[data-v-2b3580ce]{transform:translate(0)}.control-buttons-inner[data-v-2b3580ce]{display:flex;gap:10px;align-items:center;background-color:#fff;padding:8px;border-radius:0 0 0 8px;box-shadow:0 2px 8px #0000001a}.json-tree-view[data-v-40406ec6]{margin-left:16px}.json-item[data-v-40406ec6]{margin-bottom:4px}.json-key[data-v-40406ec6]{cursor:pointer;display:flex;align-items:center}.toggle-icon[data-v-40406ec6]{margin-right:4px;width:12px}.key[data-v-40406ec6]{font-weight:700;margin-right:4px}.value[data-v-40406ec6]{margin-left:4px}.string[data-v-40406ec6]{color:#0b7285}.number[data-v-40406ec6]{color:#d9480f}.boolean[data-v-40406ec6]{color:#5c940d}.null[data-v-40406ec6]{color:#868e96}.json-nested[data-v-40406ec6]{margin-left:16px;border-left:1px dashed #ccc;padding-left:8px}.json-viewer[data-v-83fc9727]{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:14px;line-height:1.5;color:#333}.collapsible-section[data-v-83fc9727]{cursor:pointer;padding:8px;background-color:#f0f0f0;border-radius:4px;display:flex;align-items:center;transition:background-color .2s}.collapsible-section[data-v-83fc9727]:hover{background-color:#e0e0e0}.toggle-icon[data-v-83fc9727]{margin-right:8px;transition:transform .2s}.json-content[data-v-83fc9727]{margin-top:8px;padding-left:16px}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fadeIn{animation:fadeIn .5s ease-out forwards}details[open] summary~*{animation:slideDown .3s ease-in-out}details summary::marker{display:none}details summary::-webkit-details-marker{display:none}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.bounce-enter-active[data-v-f44002af]{animation:bounce-in-f44002af .5s}.bounce-leave-active[data-v-f44002af]{animation:bounce-in-f44002af .5s reverse}@keyframes bounce-in-f44002af{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.personalities-hover-area[data-v-de7eb11d]{position:relative;padding-top:10px}.custom-scrollbar[data-v-de7eb11d]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-de7eb11d]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-de7eb11d]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-de7eb11d]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-de7eb11d],.list-enter-active[data-v-de7eb11d],.list-leave-active[data-v-de7eb11d]{transition:all .5s ease}.list-enter-from[data-v-de7eb11d]{transform:translatey(-30px)}.list-leave-to[data-v-de7eb11d]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-de7eb11d]{position:absolute}@keyframes rolling-ball-d9375d3e{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-d9375d3e{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-d9375d3e{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-d9375d3e]{animation:rolling-ball-d9375d3e 4s infinite ease-in-out,bounce-d9375d3e 1s infinite ease-in-out}.animate-fade-in-up[data-v-d9375d3e]{animation:fade-in-up-d9375d3e 1.5s ease-out}.floating-button-container[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;z-index:9999}.floating-button[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;width:100px;height:100px;border-radius:50%;background-color:#ff4500e6;display:flex;justify-content:center;align-items:center;box-shadow:0 0 30px #ff4500cc;animation:pulse-d9375d3e 1.5s infinite,glow-d9375d3e 2s infinite,wobble-d9375d3e 3s infinite;overflow:hidden;z-index:9999;transition:all .3s ease}.floating-button[data-v-d9375d3e]:hover{transform:scale(1.2) rotate(5deg);background-color:#ff4500}.tooltip[data-v-d9375d3e]{position:absolute;background-color:#000c;color:#fff;padding:8px 12px;border-radius:8px;font-size:16px;font-weight:700;white-space:nowrap;opacity:0;transition:opacity .3s ease,transform .3s ease;pointer-events:none;top:-50px;left:50%;transform:translate(-50%) scale(.9)}.floating-button:hover .tooltip[data-v-d9375d3e]{opacity:1;transform:translate(-50%) scale(1)}@keyframes pulse-d9375d3e{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes glow-d9375d3e{0%{box-shadow:0 0 30px #ff4500cc}50%{box-shadow:0 0 60px #ff4500,0 0 90px #ff450099}to{box-shadow:0 0 30px #ff4500cc}}@keyframes wobble-d9375d3e{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}.hidden[data-v-d9375d3e]{display:none}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.glow-effect[data-v-85f3dede]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-85f3dede 1.5s ease-in-out infinite alternate}@keyframes glow-85f3dede{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-44ddc55b]{position:relative}.skills-lib-icon[data-v-44ddc55b]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-44ddc55b]{width:2px;height:2px}@keyframes giggle-44ddc55b{0%,to{transform:translate(0) rotate(0) scale(1)}25%{transform:translate(-5px) rotate(-10deg) scale(1.05)}50%{transform:translate(5px) rotate(10deg) scale(.95)}75%{transform:translate(-5px) rotate(-10deg) scale(1.05)}}.animate-giggle[data-v-44ddc55b]{animation:giggle-44ddc55b 1.5s infinite ease-in-out}.custom-scrollbar[data-v-44ddc55b]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-44ddc55b]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-44ddc55b{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-44ddc55b]{animation:custom-pulse-44ddc55b 2s infinite}.slide-right-enter-active[data-v-44ddc55b],.slide-right-leave-active[data-v-44ddc55b]{transition:transform .3s ease}.slide-right-enter[data-v-44ddc55b],.slide-right-leave-to[data-v-44ddc55b]{transform:translate(-100%)}.slide-left-enter-active[data-v-44ddc55b],.slide-left-leave-active[data-v-44ddc55b]{transition:transform .3s ease}.slide-left-enter[data-v-44ddc55b],.slide-left-leave-to[data-v-44ddc55b]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-44ddc55b]{animation:fade-and-fly-enter-44ddc55b .5s ease}.fade-and-fly-leave-active[data-v-44ddc55b]{animation:fade-and-fly-leave-44ddc55b .5s ease}@keyframes fade-and-fly-enter-44ddc55b{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-44ddc55b{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-44ddc55b],.list-enter-active[data-v-44ddc55b],.list-leave-active[data-v-44ddc55b]{transition:all .5s ease}.list-enter-from[data-v-44ddc55b]{transform:translatey(-30px)}.list-leave-to[data-v-44ddc55b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-44ddc55b]{position:absolute}@keyframes float-44ddc55b{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-44ddc55b]{animation:float-44ddc55b linear infinite}@keyframes star-move-44ddc55b{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-44ddc55b]{animation:star-move-44ddc55b linear infinite}@keyframes fall-44ddc55b{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-44ddc55b]{animation:fall-44ddc55b linear infinite}@keyframes glow-44ddc55b{0%,to{text-shadow:0 0 5px rgba(66,153,225,.5),0 0 10px rgba(66,153,225,.5)}50%{text-shadow:0 0 20px rgba(66,153,225,.8),0 0 30px rgba(66,153,225,.8)}}.animate-glow[data-v-44ddc55b]{animation:glow-44ddc55b 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-44ddc55b{0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}}}@keyframes roll-44ddc55b{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-44ddc55b]{animation:roll-44ddc55b 4s linear infinite}.toolbar[data-v-44ddc55b]{position:relative;width:100%}.toolbar-container[data-v-44ddc55b]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-44ddc55b]{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button[data-v-44ddc55b]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-44ddc55b]{position:relative}.expandable-menu[data-v-44ddc55b]{position:absolute;top:100%;left:.625rem;flex-direction:column;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.menu-container:hover .expandable-menu[data-v-44ddc55b],.menu-visible[data-v-44ddc55b]{display:flex}.menu-item[data-v-44ddc55b]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-44ddc55b]:hover{background-color:#f0f0f0}.dot[data-v-44ddc55b]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-44ddc55b]{background-color:green}.dot-red[data-v-44ddc55b]{background-color:red}.animate-pulse[data-v-44ddc55b]{animation:pulse-44ddc55b 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-44ddc55b{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-44ddc55b]{position:relative;width:48px;height:48px}.logo-image[data-v-44ddc55b]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-44ddc55b{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce[data-v-44ddc55b]{animation:bounce-44ddc55b 1s infinite}@keyframes roll-and-bounce-44ddc55b{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin-44ddc55b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-selectionbox-color-border: var(--baklava-node-color-background);--baklava-selectionbox-color-background: var(--baklava-node-color-hover);--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor .selection-box{position:absolute;border:1px solid var(--baklava-selectionbox-color-border);background-color:var(--baklava-selectionbox-color-background);pointer-events:none;opacity:.5}.baklava-editor.--start-selection-box{cursor:crosshair}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:#fff;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content.--reverse-y{display:flex;flex-direction:column-reverse}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.loading-indicator[data-v-f8c39e0b]{display:flex;justify-content:center;align-items:center;height:100px;font-size:1.2em;color:#666}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:#fff;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}body{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #e0eaff var(--tw-gradient-from-position);--tw-gradient-to: rgb(224 234 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #f0e6ff var(--tw-gradient-to-position)}body:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #0f2647 var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 38 71 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1e1b4b var(--tw-gradient-to-position)}html{scroll-behavior:smooth}body{font-family:Roboto,sans-serif}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1\.5{left:-.375rem}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[60px\]{bottom:60px}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-full{top:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[200px\]{min-height:200px}.min-h-\[220px\]{min-height:220px}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[15rem\]{width:15rem}.w-\[16rem\]{width:16rem}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-\[this-is\\\\\]{width:this-is\\}.w-\[this-is\]{width:this-is}.w-\[weird-and-invalid\]{width:weird-and-invalid}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-96,.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(195 221 253 / var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-\[rgb\(255\,0\,0\)\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/10{--tw-gradient-from: rgb(63 131 248 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(144 97 249 / .1) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.fill-blue-600{fill:#1c64f2}.fill-current{fill:currentColor}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-80{padding-bottom:20rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-12{padding-top:3rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.font-mono{font-family:JetBrains Mono,Consolas,monospace}.font-sans{font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#336699\]\/\[\.35\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(208 56 1 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity: 1;color:rgb(6 148 162 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\[\'this-is-also-valid\]-weirdly-enough\'\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-track-blue-100{--scrollbar-track: #E1EFFE !important}.scrollbar-track-gray-200{--scrollbar-track: #E5E7EB !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.scrollbar-thumb-blue-500{--scrollbar-thumb: #3F83F8 !important}.scrollbar-thumb-gray-400{--scrollbar-thumb: #9CA3AF !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{margin-bottom:1.5rem;font-size:2.25rem;line-height:2.5rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}h1:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}@media (min-width: 768px){h1{font-size:3rem;line-height:1}}h2{margin-bottom:1rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}h2:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}h3{margin-bottom:.75rem;font-size:1.5rem;line-height:2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}h3:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}h4{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:500;--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}h4:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}h1,h2{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding-bottom:.5rem}h1:is(.dark *),h2:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}p{overflow-wrap:break-word;font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-size:1rem;line-height:1.5rem;line-height:1.625;letter-spacing:-.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}@media (min-width: 768px){p{font-size:1.125rem;line-height:1.75rem;line-height:2}}table{border-collapse:collapse;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}table:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}th,td{border-width:1px;--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));padding:.5rem}th:is(.dark *),td:is(.dark *){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}tr:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}tr:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}ul,ol{margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.75rem}ul{margin-left:.5rem;list-style-type:disc}ul>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}li{position:relative;padding-left:.5rem}ol{margin-left:.5rem;list-style-type:decimal}ol>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}ul ul,ol ol,ul ol,ol ul{margin-top:.5rem;margin-bottom:0;margin-left:1.5rem}li::marker{color:#4b5563}:root{--color-primary: #4a90e2;--color-primary-light: #6ab7f1;--color-secondary: #8ab8e0;--color-accent: #3a7ca1;--color-light-text-panel: #ffffff;--color-dark-text-panel: #e0e0e0;--color-bg-light-panel: #f0faff;--color-bg-light: #ffffff;--color-bg-light-tone: #e0f0ff;--color-bg-light-code-block: #f5faff;--color-bg-light-tone-panel: #d0e0f0;--color-bg-light-discussion: #f8faff;--color-bg-light-discussion-odd: #f0faff;--color-bg-dark: #0a0a1a;--color-bg-dark-tone: #151521;--color-bg-dark-tone-panel: #1c1c2a;--color-bg-dark-code-block: #151521;--color-bg-dark-discussion: #0e0e1a;--color-bg-dark-discussion-odd: #0d0d1a}textarea,input,select{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}textarea:is(.dark *),input:is(.dark *),select:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.background-color{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.background-color:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.toolbar-color{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.toolbar-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.panels-color{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.unicolor-panels-color{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.unicolor-panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.message{position:relative;margin:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:column;flex-wrap:wrap;overflow:visible;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding:1.25rem 1.25rem .75rem;font-size:1.125rem;line-height:1.75rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.message:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.message{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.message:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1E429F var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.message:hover{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.message:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.message:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.message:nth-child(2n):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.message:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.message:nth-child(odd):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.message-header{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.message-content{font-size:1.125rem;line-height:1.75rem;line-height:1.625}body{min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));font-size:1rem;line-height:1.5rem}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.discussion{margin-right:.5rem;font-size:.75rem;line-height:1rem}.discussion:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.discussion-hilighted{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));font-size:.75rem;line-height:1rem}.discussion-hilighted:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gradient-welcome{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.bg-gradient-welcome:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.bg-gradient-progress{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #A4CAFE var(--tw-gradient-to-position)}.bg-gradient-progress:is(.dark *){--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.text-gradient-title{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position);-webkit-background-clip:text;background-clip:text;color:transparent}.text-gradient-title:is(.dark *){--tw-gradient-from: #A4CAFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(164 202 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.text-subtitle{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-subtitle:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-author{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-author:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-loading{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-loading:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.text-progress{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-progress:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.btn-primary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.card{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));padding:.5rem 1rem}.input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.input:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.label{margin-bottom:.25rem;display:block;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.label:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.link{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.link:hover{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.link:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.link:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.navbar-container{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.navbar-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.game-menu{position:relative;display:flex;align-items:center;justify-content:center}.text-shadow-custom{text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.animated-progressbar-bg{position:relative;height:2.5rem;width:100%;overflow:hidden;border-radius:.125rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #233876 var(--tw-gradient-to-position);--tw-shadow: 0 0 15px rgba(245,158,11,.2);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.animated-progressbar-bg:is(.dark *){--tw-gradient-from: #000000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #172554 var(--tw-gradient-to-position)}.animated-progressbar-fg{position:absolute;top:0;left:0;height:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #76A9FA var(--tw-gradient-to-position);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.animated-progressbar-fg:is(.dark *){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.menu-item{margin-bottom:.5rem;padding:.5rem 1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.menu-item:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.menu-item:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:.375rem;border-top-right-radius:.375rem;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.menu-item.active-link:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item.active-link:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.menu-item.active-link:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{text-shadow:0 0 10px rgba(128,128,128,.5)}.menu-item.active-link:before{content:"";position:absolute;bottom:-5px;left:0;width:100%;height:5px;background:linear-gradient(to right,#4a90e2,#8ab8e0,#4a90e2);border-radius:10px;animation:shimmer 2s infinite}.dark .menu-item.active-link:before{background:linear-gradient(to right,#6ab7f1,#aaa,#6ab7f1)}@keyframes shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}.feather-emoji{display:inline-block;margin-left:5px;animation:bounce 2s infinite}.app-card{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.app-card:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.app-card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.app-card:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}button{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar-thin{scrollbar-color:#1C64F2 #1E429F}.scrollbar-thin::-webkit-scrollbar{width:.5rem}.scrollbar-thin::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.btn{display:flex;align-items:center;border-radius:.5rem;padding:.5rem 1rem;font-weight:600;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.btn-primary{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-primary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.btn-primary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.btn-secondary{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.btn-secondary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.btn-secondary:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.btn-secondary:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.btn-secondary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.search-input{width:100%;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));background-color:transparent;padding:.5rem 1rem .5rem 2.5rem;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.search-input:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));outline:2px solid transparent;outline-offset:2px}.search-input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.search-input:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar{--scrollbar-track: #C3DDFD;--scrollbar-thumb: #76A9FA;scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar{scrollbar-color:#1C64F2 #1E429F}.scrollbar::-webkit-scrollbar{width:.5rem}.scrollbar::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar{--scrollbar-thumb-hover: #3F83F8}.scrollbar:is(.dark *){--scrollbar-track: #1A56DB;--scrollbar-thumb: #1C64F2;--scrollbar-thumb-hover: #3F83F8}.card-title{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.card-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.card-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.card-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.card-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.card-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.card-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.subcard{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity));padding:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.subcard:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.subcard-title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.subcard-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.subcard-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.subcard-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.subcard-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.subcard-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.subcard-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.discussion-toolbox{display:flex;--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;gap:.5rem;border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.group:hover .discussion-toolbox{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.discussion-toolbox:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.lollms-title-style{text-shadow:2px 2px 4px rgba(0,0,0,.2),2px 2px 0px white,-2px -2px 0px white,2px -2px 0px white,-2px 2px 0px white;background:linear-gradient(45deg,#f59e0b,#fbbf24);-webkit-background-clip:text;background-clip:text}.chat-bar{position:relative;display:flex;flex-grow:1;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:.5rem;--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity));padding:.25rem;--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:is(.dark *){--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.chat-bar{height:50px;transition:all .3s ease}.chat-bar:hover{box-shadow:0 4px 6px -1px #00ff001a,0 2px 4px -1px #00ff000f}.svg-button{border-radius:9999px;padding:.5rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.svg-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity));--tw-ring-offset-width: 2px}.svg-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.svg-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.svg-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.svg-button:active{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.svg-button:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.nav-button{border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-button:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.nav-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.nav-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.nav-button-active{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.nav-button-active:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-on{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.btn-on:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.btn-off{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.btn-off:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.interesting-facts{margin-top:1.5rem;margin-bottom:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.5rem;background-color:#fffc;padding:1rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.interesting-facts:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.interesting-facts:is(.dark *){background-color:#1f2937cc}.toolbar-button{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.context-menu{position:absolute;background-color:#fff;border:1px solid #e0e0e0;box-shadow:0 2px 10px #0000001a;border-radius:4px;padding:8px 0;min-width:150px;z-index:1000}.context-menu-item{padding:8px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s ease}.context-menu-item:hover{background-color:#f5f5f5}.context-menu-separator{height:1px;background-color:#e0e0e0;margin:4px 0}.context-menu-item-disabled{color:#999;cursor:not-allowed}.context-menu-item-icon{margin-right:8px}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:1rem}.steps-header:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding-left:1rem}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.steps-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding:1rem}.steps-header:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.steps-icon{margin-right:1rem}.steps-summary{flex-grow:1}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.steps-title:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.steps-status{margin:0;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.steps-status:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.toggle-icon{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.toggle-icon:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.steps-content{padding:1rem}.steps-list{margin:0;list-style-type:none;padding:0}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding-left:1rem}.step-item:last-child{margin-bottom:0}.step-item:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.step-container{margin-bottom:1rem;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.step-wrapper{display:flex;align-items:flex-start;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.75rem}.step-wrapper:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.step-icon{margin-right:.75rem;height:1.5rem;width:1.5rem;flex-shrink:0}.icon-success{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-fail{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-spinner{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.icon-spinner{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));border-top-color:transparent}.icon-spinner:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.step-content{flex-grow:1}.step-text{font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.step-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.step-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.step-description:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.fade-enter-active,.fade-leave-active{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.fade-enter,.fade-leave-to{opacity:0}.status-icon{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.icon{height:1.5rem;width:1.5rem}.icon-success{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-success:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.icon-fail{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-fail:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.icon-text{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.icon-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}.sm\:container{max-width:640px}@media (min-width: 768px){.sm\:container{max-width:768px}}@media (min-width: 1024px){.sm\:container{max-width:1024px}}@media (min-width: 1280px){.sm\:container{max-width:1280px}}@media (min-width: 1536px){.sm\:container{max-width:1536px}}}.last\:mb-0:last-child{margin-bottom:0}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group\/item:hover .group-hover\/item\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/item:hover .group-hover\/item\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-x-100:hover{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from: #EBF5FF var(--tw-gradient-from-position);--tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-blue-500\/20:hover{--tw-gradient-from: rgb(63 131 248 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:to-purple-50:hover{--tw-gradient-to: #F6F5FF var(--tw-gradient-to-position)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(144 97 249 / .2) var(--tw-gradient-to-position)}.hover\:font-bold:hover{font-weight:700}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-teal-600:hover{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.before\:hover\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\:before\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:border-transparent:focus{border-color:transparent}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-500\/50:focus{--tw-ring-color: rgb(63 131 248 / .5)}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.focus\:hover\:text-center:hover:focus{text-align:center}.hover\:focus\:text-center:focus:hover{text-align:center}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-bg-light:is(.dark *){border-color:var(--color-bg-light)}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-transparent:is(.dark *){border-color:transparent}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:bg-bg-dark:is(.dark *){background-color:var(--color-bg-dark)}.dark\:bg-bg-dark-tone:is(.dark *){background-color:var(--color-bg-dark-tone)}.dark\:bg-bg-dark-tone-panel:is(.dark *){background-color:var(--color-bg-dark-tone-panel)}.dark\:bg-black:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-indigo-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-orange-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.dark\:bg-pink-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}.dark\:bg-purple-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-white:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.dark\:bg-opacity-70:is(.dark *){--tw-bg-opacity: .7}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:from-bg-dark:is(.dark *){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-blue-400\/20:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-indigo-400:is(.dark *){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:via-bg-dark:is(.dark *){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:to-purple-400:is(.dark *){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}.dark\:to-purple-400\/20:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .2) var(--tw-gradient-to-position)}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-blue-800:is(.dark *){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.dark\:text-dark-text-panel:is(.dark *){color:var(--color-dark-text-panel)}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-green-800:is(.dark *){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.dark\:text-green-900:is(.dark *){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.dark\:text-indigo-900:is(.dark *){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-pink-500:is(.dark *){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.dark\:text-pink-900:is(.dark *){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.dark\:text-primary:is(.dark *){color:var(--color-primary)}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-purple-500:is(.dark *){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.dark\:text-purple-900:is(.dark *){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-red-800:is(.dark *){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.dark\:text-red-900:is(.dark *){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.dark\:text-yellow-800:is(.dark *){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.dark\:text-yellow-900:is(.dark *){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:shadow-lg:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-white:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.dark\:ring-opacity-20:is(.dark *){--tw-ring-opacity: .2}.dark\:ring-offset-gray-700:is(.dark *){--tw-ring-offset-color: #374151}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:scrollbar-track-bg-dark:is(.dark *){--scrollbar-track: var(--color-bg-dark) !important}.dark\:scrollbar-track-bg-dark-tone:is(.dark *){--scrollbar-track: var(--color-bg-dark-tone) !important}.dark\:scrollbar-track-gray-700:is(.dark *){--scrollbar-track: #374151 !important}.dark\:scrollbar-track-gray-800:is(.dark *){--scrollbar-track: #1F2937 !important}.dark\:scrollbar-thumb-bg-dark-tone:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone) !important}.dark\:scrollbar-thumb-bg-dark-tone-panel:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}.dark\:scrollbar-thumb-gray-500:is(.dark *){--scrollbar-thumb: #6B7280 !important}.dark\:scrollbar-thumb-gray-600:is(.dark *){--scrollbar-thumb: #4B5563 !important}.dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n):is(.dark *){background-color:var(--color-bg-dark-discussion-odd)}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:border-primary:hover:is(.dark *){border-color:var(--color-primary)}.dark\:hover\:bg-blue-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary:hover:is(.dark *){background-color:var(--color-primary)}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:dark\:bg-bg-dark-tone:is(.dark *):hover{background-color:var(--color-bg-dark-tone)}.hover\:dark\:bg-bg-dark-tone-panel:is(.dark *):hover{background-color:var(--color-bg-dark-tone-panel)}.dark\:hover\:from-blue-400\/30:hover:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:from-blue-900\/30:hover:is(.dark *){--tw-gradient-from: rgb(35 56 118 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:to-purple-400\/30:hover:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .3) var(--tw-gradient-to-position)}.dark\:hover\:to-purple-900\/30:hover:is(.dark *){--tw-gradient-to: rgb(74 29 150 / .3) var(--tw-gradient-to-position)}.dark\:hover\:text-blue-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-gray-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:hover\:text-green-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:scrollbar-thumb-primary:is(.dark *){--scrollbar-thumb-hover: var(--color-primary) !important}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-secondary:focus:is(.dark *){border-color:var(--color-secondary)}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus\:ring-secondary:focus:is(.dark *){--tw-ring-color: var(--color-secondary)}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-offset-gray-700:focus:is(.dark *){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mb-0{margin-bottom:0}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.dark\:lg\:hover\:\[paint-order\:markers\]:hover:is(.dark *){paint-order:markers}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} diff --git a/web/dist/assets/index-By7bItK0.js b/web/dist/assets/index-fkrdX5dp.js similarity index 94% rename from web/dist/assets/index-By7bItK0.js rename to web/dist/assets/index-fkrdX5dp.js index 87a12936..ac791b95 100644 --- a/web/dist/assets/index-By7bItK0.js +++ b/web/dist/assets/index-fkrdX5dp.js @@ -244,7 +244,7 @@ ${e} `}tablecell(e){const n=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+n+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:n,tokens:r}){const i=this.parser.parseInline(r),o=lD(e);if(o===null)return i;e=o;let s='",s}image({href:e,title:n,text:r}){const i=lD(e);if(i===null)return r;e=i;let o=`${r}{const c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const s=n.renderers[o.name];s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[o.level];s?s.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){const o=this.defaults.renderer||new td(this.defaults);for(const s in r.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,l=r.renderer[a],c=o[a];o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d||""}}i.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Ju(this.defaults);for(const s in r.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,l=r.tokenizer[a],c=o[a];o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d}}i.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new w4;for(const s in r.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,l=r.hooks[a],c=o[a];w4.passThroughHooks.has(s)?o[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(o,u)).then(h=>c.call(o,h));const d=l.call(o,u);return c.call(o,d)}:o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d}}i.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),o&&(l=l.concat(o.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Bi.lex(e,n??this.defaults)}parser(e,n){return $i.parse(e,n??this.defaults)}parseMarkdown(e){return(r,i)=>{const o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const l=s.hooks?s.hooks.provideLexer():e?Bi.lex:Bi.lexInline,c=s.hooks?s.hooks.provideParser():e?$i.parse:$i.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(u=>l(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>c(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let u=l(r,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let d=c(u,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(e,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+vi(r.message+"",!0)+"
";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const m2=new GUn;function fn(t,e){return m2.parse(t,e)}fn.options=fn.setOptions=function(t){return m2.setOptions(t),fn.defaults=m2.defaults,q$(fn.defaults),fn};fn.getDefaults=Lb;fn.defaults=w2;fn.use=function(...t){return m2.use(...t),fn.defaults=m2.defaults,q$(fn.defaults),fn};fn.walkTokens=function(t,e){return m2.walkTokens(t,e)};fn.parseInline=m2.parseInline;fn.Parser=$i;fn.parser=$i.parse;fn.Renderer=td;fn.TextRenderer=Rb;fn.Lexer=Bi;fn.lexer=Bi.lex;fn.Tokenizer=Ju;fn.Hooks=w4;fn.parse=fn;fn.options;fn.setOptions;fn.use;fn.walkTokens;fn.parseInline;$i.parse;Bi.lex;const qUn={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(t){this.helpSections[t].isOpen=!this.helpSections[t].isOpen},async loadMarkdownFile(t){try{const n=await(await fetch(`/help/${t}`)).text();return fn(n)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const t=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of t){const n=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:n,isOpen:!1})}}},mounted(){this.loadHelpSections()}},zUn={class:"help-view background-color p-6 w-full"},jUn={class:"big-card w-full"},WUn={class:"help-sections-container"},YUn={class:"help-sections space-y-4"},KUn=["onClick"],ZUn={class:"toggle-icon"},XUn={key:0,class:"help-content mt-4"},JUn=["innerHTML"];function eGn(t,e,n,r,i,o){return k(),P("div",zUn,[g("div",jUn,[e[0]||(e[0]=g("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),g("div",WUn,[g("div",YUn,[(k(!0),P(ze,null,at(i.helpSections,(s,a)=>(k(),P("div",{key:a,class:"help-section message"},[g("h2",{onClick:l=>o.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[ft(le(s.title)+" ",1),g("span",ZUn,le(s.isOpen?"▼":"▶"),1)],8,KUn),s.isOpen?(k(),P("div",XUn,[g("div",{innerHTML:s.content,class:"prose dark:prose-invert"},null,8,JUn)])):ne("",!0)]))),128))])])])])}const tGn=yt(qUn,[["render",eGn],["__scopeId","data-v-8c1798f3"]]);function $o(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&o{Ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),qe(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},rGn={class:"menu-container"},iGn=["title"],oGn=["src"],sGn=["data-feather"],aGn={key:2,class:"w-5 h-5"},lGn={key:3,"data-feather":"menu"},cGn={class:"flex-grow menu-ul"},uGn=["onClick"],dGn={key:0,"data-feather":"check"},fGn=["src","alt"],pGn=["data-feather"],hGn={key:3,class:"menu-icon"};function TGn(t,e,n,r,i,o){return k(),P("div",rGn,[g("button",{onClick:e[0]||(e[0]=he((...s)=>o.toggleMenu&&o.toggleMenu(...s),["prevent"])),title:n.title,class:We([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(k(),P("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,oGn)):n.icon&&n.icon.includes("feather")?(k(),P("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,sGn)):n.icon&&n.icon.includes("#")?(k(),P("p",aGn,le(n.icon.split("#")[1]),1)):(k(),P("i",lGn))],10,iGn),oe(lo,{name:"slide"},{default:Ve(()=>[i.isMenuOpen?(k(),P("div",{key:0,class:"menu-list flex-grow",style:xn(i.menuPosition),ref:"menu"},[g("ul",cGn,[(k(!0),P(ze,null,at(n.commands,(s,a)=>(k(),P("li",{key:a,onClick:he(l=>o.executeCommand(s),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==s.name?(k(),P("i",dGn)):s.icon&&!s.icon.includes("feather")&&!s.is_file?(k(),P("img",{key:1,src:s.icon,alt:s.name,class:"menu-icon"},null,8,fGn)):ne("",!0),s.icon&&s.icon.includes("feather")&&!s.is_file?(k(),P("i",{key:2,"data-feather":s.icon.split(":")[1],class:"mr-2"},null,8,pGn)):(k(),P("span",hGn)),g("span",null,le(s.name),1)],8,uGn))),128))])],4)):ne("",!0)]),_:1})])}const Nb=yt(nGn,[["render",TGn]]),mGn={components:{InteractiveMenu:Nb},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){qe(()=>{Ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return $o(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?ri:this.model.icon},defaultImg(t){t.target.src=ri},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,qe(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return $o(this.speed)},total_size_computed(){return $o(this.total_size)},downloaded_size_computed(){return $o(this.downloaded_size)}},watch:{linkNotValid(){qe(()=>{Ze.replace()})}}},gGn=["title"],_Gn={key:0,class:"flex flex-row"},QGn={class:"max-w-[300px] overflow-x-auto"},vGn={class:"flex gap-3 items-center grow"},yGn=["href"],bGn=["src"],EGn={class:"flex-1 overflow-hidden"},xGn={class:"font-bold font-large text-lg truncate"},SGn={key:1,class:"flex items-center flex-row gap-2 my-1"},LGn={class:"flex grow items-center"},CGn={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},AGn={class:"relative flex flex-col items-center justify-center flex-grow h-full"},wGn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},MGn={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},OGn={class:"flex justify-between mb-1"},RGn={class:"text-sm font-medium text-blue-700 dark:text-white"},NGn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},DGn={class:"flex justify-between mb-1"},IGn={class:"text-base font-medium text-blue-700 dark:text-white"},kGn={class:"text-sm font-medium text-blue-700 dark:text-white"},PGn={class:"flex flex-grow"},HGn={class:"flex flex-row flex-grow gap-3"},VGn={class:"p-2 text-center grow"},FGn={key:3},BGn={class:"flex flex-row items-center gap-3"},$Gn=["src"],UGn={class:"font-bold font-large text-lg truncate"},GGn={class:"flex items-center flex-row-reverse gap-2 my-1"},qGn={class:"flex flex-row items-center"},zGn={key:0,class:"text-base text-red-600 flex items-center mt-1"},jGn=["title"],WGn={class:""},YGn={class:"flex flex-row items-center"},KGn=["href","title"],ZGn={class:"flex items-center"},XGn={class:"flex items-center"},JGn={key:0,class:"flex items-center"},eqn=["href"],tqn={class:"flex items-center"},nqn=["href"],rqn={class:"flex items-center"},iqn={class:"flex items-center"},oqn=["href"];function sqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),P("div",{class:We(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",o.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=he(a=>o.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(k(),P("div",_Gn,[g("div",QGn,[g("div",vGn,[g("a",{href:n.model.model_creator_link,target:"_blank"},[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,bGn)],8,yGn),g("div",EGn,[g("h3",xGn,le(n.model.name),1)])])])])):ne("",!0),n.model.isCustomModel?(k(),P("div",SGn,[g("div",LGn,[g("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=he(()=>{},["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"box",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=ft(" Custom model "))]),g("div",null,[n.model.isInstalled?(k(),P("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=he((...a)=>o.uninstall&&o.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[ft(" Uninstall "),g("span",{class:"sr-only"},"Remove",-1)]))):ne("",!0)])])):ne("",!0),i.installing?(k(),P("div",CGn,[g("div",AGn,[e[15]||(e[15]=g("div",{role:"status",class:"justify-center"},[g("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)),g("div",wGn,[g("div",MGn,[g("div",OGn,[e[14]||(e[14]=g("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),g("span",RGn,le(Math.floor(i.progress))+"%",1)]),g("div",NGn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.progress+"%"})},null,4)]),g("div",DGn,[g("span",IGn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",kGn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",PGn,[g("div",HGn,[g("div",VGn,[g("button",{onClick:e[3]||(e[3]=he((...a)=>o.toggleCancelInstall&&o.toggleCancelInstall(...a),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])])):ne("",!0),n.model.isCustomModel?ne("",!0):(k(),P("div",FGn,[g("div",BGn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:We(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,$Gn),g("h3",UGn,le(n.model.name),1),e[16]||(e[16]=g("div",{class:"grow"},null,-1)),oe(s,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),g("div",GGn,[g("div",qGn,[i.linkNotValid?(k(),P("div",zGn,e[17]||(e[17]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),ft(" Link is not valid ")]))):ne("",!0)])]),g("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[g("div",WGn,[g("div",YGn,[e[19]||(e[19]=g("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=g("b",null,"Card: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=he(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,KGn),e[21]||(e[21]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=he(a=>o.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",ZGn,[g("div",{class:We(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=g("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=g("b",null,"File size: ",-1)),ft(" "+le(o.fileSize),1)],2)]),g("div",XGn,[e[24]||(e[24]=g("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=g("b",null,"License: ",-1)),ft(" "+le(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(k(),P("div",JGn,[e[26]||(e[26]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=g("b",null,"quantizer: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.quantizer),9,eqn)])):ne("",!0),g("div",tqn,[e[28]||(e[28]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=g("b",null,"Model creator: ",-1)),g("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.model_creator),9,nqn)]),g("div",rqn,[e[30]||(e[30]=g("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=g("b",null,"Release date: ",-1)),ft(" "+le(n.model.last_commit_time),1)]),g("div",iqn,[e[32]||(e[32]=g("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=g("b",null,"Category: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.category),9,oqn)])])],8,jGn)]))],10,gGn)}const aqn=yt(mGn,[["render",sqn]]),lqn={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},cqn={class:"p-4"},uqn={class:"flex items-center mb-4"},dqn=["src"],fqn={class:"text-lg font-semibold"},pqn={key:0};function hqn(t,e,n,r,i,o){return k(),P("div",cqn,[g("div",uqn,[g("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,dqn),g("h2",fqn,le(i.personalityName),1)]),g("p",null,[e[2]||(e[2]=g("strong",null,"Author:",-1)),ft(" "+le(i.personalityAuthor),1)]),g("p",null,[e[3]||(e[3]=g("strong",null,"Description:",-1)),ft(" "+le(i.personalityDescription),1)]),g("p",null,[e[4]||(e[4]=g("strong",null,"Category:",-1)),ft(" "+le(i.personalityCategory),1)]),i.disclaimer?(k(),P("p",pqn,[e[5]||(e[5]=g("strong",null,"Disclaimer:",-1)),ft(" "+le(i.disclaimer),1)])):ne("",!0),g("p",null,[e[6]||(e[6]=g("strong",null,"Conditioning Text:",-1)),ft(" "+le(i.conditioningText),1)]),g("p",null,[e[7]||(e[7]=g("strong",null,"AI Prefix:",-1)),ft(" "+le(i.aiPrefix),1)]),g("p",null,[e[8]||(e[8]=g("strong",null,"User Prefix:",-1)),ft(" "+le(i.userPrefix),1)]),g("div",null,[e[9]||(e[9]=g("strong",null,"Antiprompts:",-1)),g("ul",null,[(k(!0),P(ze,null,at(i.antipromptsList,s=>(k(),P("li",{key:s.id},le(s.text),1))),128))])]),g("button",{onClick:e[0]||(e[0]=s=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(k(),P("button",{key:1,onClick:e[1]||(e[1]=(...s)=>o.commitChanges&&o.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):ne("",!0)])}const Tqn=yt(lqn,[["render",hqn]]),Db="/assets/logo-CQZwS0X1.svg",mqn="/",gqn={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:Nb},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,console.log(this.personality),qe(()=>{Ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return mqn+this.personality.avatar},defaultImg(t){t.target.src=Db},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)},showHelp(){this.renderedHelp=fn(this.personality.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{selected(){qe(()=>{Ze.replace()})}}},_qn=["title"],Qqn={class:"flex-grow"},vqn={class:"flex items-center mb-4"},yqn=["src"],bqn={class:"text-sm text-gray-600"},Eqn={class:"text-sm text-gray-600"},xqn={class:"text-sm text-gray-600"},Sqn={key:0,class:"text-sm text-gray-600"},Lqn={key:1,class:"text-sm text-gray-600"},Cqn={class:"mb-4"},Aqn=["innerHTML"],wqn={class:"mt-auto pt-4 border-t"},Mqn={class:"flex justify-between items-center flex-wrap"},Oqn=["title"],Rqn=["fill"],Nqn=["src"],Dqn={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Iqn={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},kqn={class:"flex justify-between items-center mb-2"},Pqn={class:"flex-grow overflow-auto"},Hqn=["innerHTML"];function Vqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),P("div",{class:We(["app-card flex flex-col h-full",o.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[g("div",Qqn,[g("div",vqn,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>o.showThumbnail&&o.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>o.updateThumbnailPosition&&o.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>o.hideThumbnail&&o.hideThumbnail(...a))},null,40,yqn),g("div",null,[g("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a))},le(n.personality.name),1),g("p",bqn,"Author: "+le(n.personality.author),1),g("p",Eqn,"Version: "+le(n.personality.version),1),g("p",xqn,"Category: "+le(n.personality.category),1),n.personality.creation_date?(k(),P("p",Sqn,"Creation Date: "+le(o.formatDate(n.personality.creation_date)),1)):ne("",!0),n.personality.last_update_date?(k(),P("p",Lqn,"Last update Date: "+le(o.formatDate(n.personality.last_update_date)),1)):ne("",!0)]),n.personality.help?(k(),P("button",{key:0,onClick:e[6]||(e[6]=(...a)=>o.showHelp&&o.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[12]||(e[12]=[g("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):ne("",!0)]),g("div",Cqn,[e[13]||(e[13]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,Aqn)])]),g("div",wqn,[g("div",Mqn,[g("button",{onClick:e[7]||(e[7]=(...a)=>o.toggleFavorite&&o.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),P("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[14]||(e[14]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Rqn))],8,Oqn),i.isMounted?(k(),P("button",{key:0,onClick:e[8]||(e[8]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[15]||(e[15]=[g("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):ne("",!0),i.isMounted?(k(),P("button",{key:1,onClick:e[9]||(e[9]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[16]||(e[16]=[g("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):ne("",!0),g("button",{onClick:e[10]||(e[10]=(...a)=>o.showFolder&&o.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[17]||(e[17]=[g("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),oe(s,{commands:o.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),P("div",{key:0,style:xn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[g("img",{src:o.getImgUrl(),class:"w-full h-full object-fill"},null,8,Nqn)],4)):ne("",!0),i.showHelpPopup?(k(),P("div",Dqn,[g("div",Iqn,[g("div",kqn,[e[18]||(e[18]=g("h2",{class:"text-lg font-bold"},"Help",-1)),g("button",{onClick:e[11]||(e[11]=(...a)=>o.closeHelp&&o.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),g("div",Pqn,[g("div",{innerHTML:i.renderedHelp},null,8,Hqn)])])])):ne("",!0)],10,_qn)}const tU=yt(gqn,[["render",Vqn]]),Fqn={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),r=n.getElementsByTagName("style");Array.from(r).forEach(o=>{const s=document.createElement("style");s.textContent=this.scopeCSS(o.textContent),document.head.appendChild(s)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(o=>{const s=document.createElement("script");s.textContent=o.textContent,t.appendChild(s)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},Bqn=["id"];function $qn(t,e,n,r,i,o){return k(),P("div",{id:i.containerId,ref:"container"},null,8,Bqn)}const nU=yt(Fqn,[["render",$qn]]),Uqn="/",Gqn={components:{DynamicUIRenderer:nU},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){qe(()=>{Ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return Uqn+this.binding.icon},defaultImg(t){t.target.src=Db},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){qe(()=>{Ze.replace()})}}},qqn=["title"],zqn={class:"flex flex-row items-center gap-3"},jqn=["src"],Wqn={class:"font-bold font-large text-lg truncate"},Yqn={class:"flex-none gap-1"},Kqn={class:"flex items-center flex-row-reverse gap-2 my-1"},Zqn={class:""},Xqn={class:""},Jqn={class:"flex items-center"},ezn={class:"flex items-center"},tzn={class:"flex items-center"},nzn={class:"flex items-center"},rzn=["href"],izn=["title","innerHTML"];function ozn(t,e,n,r,i,o){const s=pt("DynamicUIRenderer");return k(),P("div",{class:We(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=he((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[g("div",null,[g("div",zqn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,jqn),g("h3",Wqn,le(n.binding.name),1),e[10]||(e[10]=g("div",{class:"grow"},null,-1)),g("div",Yqn,[n.selected?(k(),P("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=he(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[g("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Help",-1)]))):ne("",!0)])]),g("div",Kqn,[n.binding.installed?ne("",!0):(k(),P("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=he((...a)=>o.toggleInstall&&o.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[ft(" Install "),g("span",{class:"sr-only"},"Click to install",-1)]))),n.binding.installed?(k(),P("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=he((...a)=>o.toggleReinstall&&o.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[ft(" Reinstall "),g("span",{class:"sr-only"},"Reinstall",-1)]))):ne("",!0),n.binding.installed?(k(),P("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=he((...a)=>o.toggleUnInstall&&o.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[ft(" Uninstall "),g("span",{class:"sr-only"},"UnInstall",-1)]))):ne("",!0),n.selected?(k(),P("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=he((...a)=>o.toggleSettings&&o.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[ft(" Settings "),g("span",{class:"sr-only"},"Settings",-1)]))):ne("",!0)]),n.binding.ui?(k(),wt(s,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):ne("",!0),g("div",Zqn,[g("div",Xqn,[g("div",Jqn,[e[15]||(e[15]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=g("b",null,"Author: ",-1)),ft(" "+le(n.binding.author),1)]),g("div",ezn,[e[18]||(e[18]=g("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=g("b",null,"Folder: ",-1)),ft(" "+le(n.binding.folder)+" ",1),e[20]||(e[20]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=he(a=>o.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",tzn,[e[21]||(e[21]=g("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=g("b",null,"Version: ",-1)),ft(" "+le(n.binding.version),1)]),g("div",nzn,[e[23]||(e[23]=g("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=g("b",null,"Link: ",-1)),g("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},le(n.binding.link),9,rzn)])]),e[25]||(e[25]=g("div",{class:"flex items-center"},[g("i",{"data-feather":"info",class:"w-5 m-1"}),g("b",null,"Description: "),g("br")],-1)),g("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,izn)])])],10,qqn)}const szn=yt(Gqn,[["render",ozn]]),co="/assets/logo-PFou_X4V.png",azn={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},lzn={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},czn={class:"relative w-full max-w-md max-h-full"},uzn={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},dzn={class:"p-4 text-center"},fzn={class:"p-4 text-center mx-auto mb-4"};function pzn(t,e,n,r,i,o){return i.show?(k(),P("div",lzn,[g("div",czn,[g("div",uzn,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[4]||(e[4]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",dzn,[e[6]||(e[6]=g("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),g("div",fzn,[e[5]||(e[5]=g("label",{class:"mr-2"},"Model path",-1)),J(g("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>i.model_path=s),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[we,i.model_path]])]),g("button",{onClick:e[2]||(e[2]=s=>o.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),g("button",{onClick:e[3]||(e[3]=s=>o.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):ne("",!0)}const hzn=yt(azn,[["render",pzn]]),Tzn={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n[n.show?(k(),P("div",mzn,[g("div",gzn,[g("h2",_zn,[e[5]||(e[5]=g("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),ft(" "+le(n.title),1)]),g("div",Qzn,[g("ul",null,[(k(!0),P(ze,null,at(n.choices,(s,a)=>(k(),P("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[g("div",vzn,[g("div",yzn,[s.isEditing?J((k(),P("input",{key:1,"onUpdate:modelValue":l=>s.editName=l,onBlur:l=>o.finishEditing(s),onKeyup:Xr(l=>o.finishEditing(s),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,Ezn)),[[we,s.editName]]):(k(),P("span",{key:0,onClick:l=>o.selectChoice(s),class:We([{"font-semibold":s===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},le(o.displayName(s)),11,bzn)),s.size?(k(),P("span",xzn,le(o.formatSize(s.size)),1)):ne("",!0)]),g("div",Szn,[g("button",{onClick:l=>o.editChoice(s),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,Lzn),n.can_remove?(k(),P("button",{key:0,onClick:l=>o.removeChoice(s,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,Czn)):ne("",!0)])])]))),128))])]),i.showInput?(k(),P("div",Azn,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.newFilename=s),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[we,i.newFilename]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.addNewFilename&&o.addNewFilename(...s)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):ne("",!0),g("div",wzn,[g("button",{onClick:e[2]||(e[2]=(...s)=>o.closeDialog&&o.closeDialog(...s)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),g("button",{onClick:e[3]||(e[3]=(...s)=>o.validateChoice&&o.validateChoice(...s)),disabled:!i.selectedChoice,class:We([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Mzn),g("button",{onClick:e[4]||(e[4]=(...s)=>o.toggleInput&&o.toggleInput(...s)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):ne("",!0)]),_:1})}const Ib=yt(Tzn,[["render",Ozn],["__scopeId","data-v-f43216be"]]),Rzn={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Nzn={class:"flex space-x-4"},Dzn=["value","aria-checked"],Izn={class:"text-gray-700"};function kzn(t,e,n,r,i,o){return k(),P("div",Nzn,[(k(!0),P(ze,null,at(n.radioOptions,(s,a)=>(k(),P("label",{key:s.value,class:"flex items-center space-x-2"},[J(g("input",{type:"radio",value:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>o.handleRadioChange&&o.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===s.value.toString(),role:"radio"},null,40,Dzn),[[Nj,i.selectedValue]]),g("span",Izn,le(s.label),1)]))),128))])}const Pzn=yt(Rzn,[["render",kzn]]),Hzn="/assets/gpu-BWVOYg-D.svg",Vzn={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,r)=>r!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=s),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,Bzn),[[we,i.newItem]]),g("button",{onClick:e[2]||(e[2]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(k(),P("ul",$zn,[(k(!0),P(ze,null,at(n.modelValue,(s,a)=>(k(),P("li",{key:a,class:We(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[g("span",Uzn,le(s),1),g("div",Gzn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,qzn),a>0?(k(),P("button",{key:0,onClick:l=>o.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,zzn)):ne("",!0),ao.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,jzn)):ne("",!0)]),i.draggingIndex===a?(k(),P("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>o.startDragging(a),onMousemove:l=>o.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>o.stopDragging&&o.stopDragging(...l))},null,40,Wzn)):ne("",!0)],2))),128))])):ne("",!0),n.modelValue.length>0?(k(),P("div",Yzn,[g("button",{onClick:e[4]||(e[4]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):ne("",!0)])}const Zzn=yt(Vzn,[["render",Kzn]]),Xzn={name:"DictionaryManager",props:{modelValue:{type:Object,default:()=>({})},keyName:{type:String,default:"Key"},valueName:{type:String,default:"Value"}},emits:["update:modelValue","change"],data(){return{newKey:"",newValue:"",draggingKey:null}},methods:{addItem(){if(this.newKey.trim()){const t={...this.modelValue};t[this.newKey.trim()]=this.newValue,this.$emit("update:modelValue",t),this.$emit("change"),this.newKey="",this.newValue=""}},removeItem(t){const e={...this.modelValue};delete e[t],this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",{}),this.$emit("change")},updateKey(t,e){if(e.trim()&&e!==t){const n={...this.modelValue};n[e.trim()]=n[t],delete n[t],this.$emit("update:modelValue",n),this.$emit("change")}},updateValue(t,e){const n={...this.modelValue};n[t]=e,this.$emit("update:modelValue",n),this.$emit("change")},moveUp(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n>0){const r={};e.forEach((i,o)=>{o===n-1&&(r[t]=this.modelValue[t]),i!==t&&(r[i]=this.modelValue[i])}),this.$emit("update:modelValue",r),this.$emit("change")}},moveDown(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n{i!==t&&(r[i]=this.modelValue[i]),o===n+1&&(r[t]=this.modelValue[t])}),this.$emit("update:modelValue",r),this.$emit("change")}}}},Jzn={class:"max-w-4xl mx-auto p-4"},ejn={class:"flex flex-col sm:flex-row mb-4 gap-2"},tjn=["placeholder"],njn=["placeholder"],rjn={key:0,class:"space-y-4"},ijn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ojn=["for"],sjn=["id","value","onInput"],ajn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ljn=["for"],cjn=["id","value","onInput"],ujn={class:"flex items-center space-x-2"},djn=["onClick"],fjn=["onClick"],pjn=["onClick"],hjn={key:1,class:"mt-6"};function Tjn(t,e,n,r,i,o){return k(),P("div",Jzn,[g("div",ejn,[J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.newKey=s),placeholder:n.keyName,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,tjn),[[we,i.newKey]]),J(g("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=s=>i.newValue=s),placeholder:n.valueName,onKeyup:e[3]||(e[3]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,njn),[[we,i.newValue]]),g("button",{onClick:e[4]||(e[4]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg transition duration-300 ease-in-out"},"Add")]),Object.keys(n.modelValue).length>0?(k(),P("ul",rjn,[(k(!0),P(ze,null,at(n.modelValue,(s,a)=>(k(),P("li",{key:a,class:We(["flex flex-col sm:flex-row items-center p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md hover:shadow-lg transition duration-300 ease-in-out",{"bg-gray-100 dark:bg-gray-700":i.draggingKey===a}])},[g("div",ijn,[g("label",{for:"key-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.keyName),9,ojn),g("input",{id:"key-"+a,value:a,onInput:l=>o.updateKey(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,sjn)]),g("div",ajn,[g("label",{for:"value-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.valueName),9,ljn),g("input",{id:"value-"+a,value:s,onInput:l=>o.updateValue(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,cjn)]),g("div",ujn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2 rounded-full hover:bg-red-100 dark:hover:bg-red-900 transition duration-300 ease-in-out"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,djn),g("button",{onClick:l=>o.moveUp(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,fjn),g("button",{onClick:l=>o.moveDown(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[8]||(e[8]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,pjn)])],2))),128))])):ne("",!0),Object.keys(n.modelValue).length>0?(k(),P("div",hjn,[g("button",{onClick:e[5]||(e[5]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg transition duration-300 ease-in-out"},"Remove All")])):ne("",!0)])}const mjn=yt(Xzn,[["render",Tjn]]),gjn="/";ve.defaults.baseURL="/";const _jn={components:{AddModelDialog:hzn,ModelEntry:aqn,PersonalityViewer:Tqn,PersonalityEntry:tU,BindingEntry:szn,ChoiceDialog:Ib,Card:Q9,StringListManager:Zzn,DictManager:mjn,RadioOptions:Pzn},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:ri,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:co,binding_changed:!1,SVGGPU:Hzn,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:gjn,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}tt.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{updateRagDatabase(t,e,n){let r=this.configFile.rag_databases[t].split("::");switch(n){case"name":r[0]=e;break;case"path":r[1]=e;break;case"mounted":r[2]=e?"mounted":"";break}this.configFile.rag_databases[t]=r.join("::"),this.settingsChanged=!0},getAlias(t){return this.configFile.remote_databases[t].split("::")[0]},getDatabaseType(t){return this.configFile.remote_databases[t].split("::")[1]},getDatabaseUrl(t){return this.configFile.remote_databases[t].split("::")[2]},getMounted(t){const e=this.configFile.remote_databases[t].split("::");return e.length>3?e[3]==="mounted":!1},updateAlias(t,e){const n=this.configFile.remote_databases[t].split("::");n[0]=e,this.configFile.remote_databases[t]=n.join("::"),this.settingsChanged=!0},updateDatabaseType(t,e){const n=this.configFile.remote_databases[t].split("::");n[1]=e,this.configFile.remote_databases[t]=n.join("::"),this.settingsChanged=!0},updateDatabaseUrl(t,e){const n=this.configFile.remote_databases[t].split("::");n[2]=e,this.configFile.remote_databases[t]=n.join("::"),this.settingsChanged=!0},updateMounted(t,e){const n=this.configFile.remote_databases[t].split("::");e?n[3]="mounted":n.length=3,this.configFile.remote_databases[t]=n.join("::"),this.settingsChanged=!0},addDatabaseService(){this.configFile.remote_databases||(this.configFile.remote_databases=[]),this.configFile.remote_databases.push("new_database::lightrag::http://localhost:9621/"),this.settingsChanged=!0},removeDataBase(t){console.log("Removing remote database"),this.configFile.remote_databases.splice(t,1),console.log(this.configFile.remote_databases),this.settingsChanged=!0},fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await ve.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{tt.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await ve.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` +Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+vi(r.message+"",!0)+"
";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const m2=new GUn;function fn(t,e){return m2.parse(t,e)}fn.options=fn.setOptions=function(t){return m2.setOptions(t),fn.defaults=m2.defaults,q$(fn.defaults),fn};fn.getDefaults=Lb;fn.defaults=w2;fn.use=function(...t){return m2.use(...t),fn.defaults=m2.defaults,q$(fn.defaults),fn};fn.walkTokens=function(t,e){return m2.walkTokens(t,e)};fn.parseInline=m2.parseInline;fn.Parser=$i;fn.parser=$i.parse;fn.Renderer=td;fn.TextRenderer=Rb;fn.Lexer=Bi;fn.lexer=Bi.lex;fn.Tokenizer=Ju;fn.Hooks=w4;fn.parse=fn;fn.options;fn.setOptions;fn.use;fn.walkTokens;fn.parseInline;$i.parse;Bi.lex;const qUn={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(t){this.helpSections[t].isOpen=!this.helpSections[t].isOpen},async loadMarkdownFile(t){try{const n=await(await fetch(`/help/${t}`)).text();return fn(n)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const t=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of t){const n=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:n,isOpen:!1})}}},mounted(){this.loadHelpSections()}},zUn={class:"help-view background-color p-6 w-full"},jUn={class:"big-card w-full"},WUn={class:"help-sections-container"},YUn={class:"help-sections space-y-4"},KUn=["onClick"],ZUn={class:"toggle-icon"},XUn={key:0,class:"help-content mt-4"},JUn=["innerHTML"];function eGn(t,e,n,r,i,o){return k(),P("div",zUn,[g("div",jUn,[e[0]||(e[0]=g("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),g("div",WUn,[g("div",YUn,[(k(!0),P(ze,null,at(i.helpSections,(s,a)=>(k(),P("div",{key:a,class:"help-section message"},[g("h2",{onClick:l=>o.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[ft(le(s.title)+" ",1),g("span",ZUn,le(s.isOpen?"▼":"▶"),1)],8,KUn),s.isOpen?(k(),P("div",XUn,[g("div",{innerHTML:s.content,class:"prose dark:prose-invert"},null,8,JUn)])):ne("",!0)]))),128))])])])])}const tGn=yt(qUn,[["render",eGn],["__scopeId","data-v-8c1798f3"]]);function $o(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&o{Ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),qe(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},rGn={class:"menu-container"},iGn=["title"],oGn=["src"],sGn=["data-feather"],aGn={key:2,class:"w-5 h-5"},lGn={key:3,"data-feather":"menu"},cGn={class:"flex-grow menu-ul"},uGn=["onClick"],dGn={key:0,"data-feather":"check"},fGn=["src","alt"],pGn=["data-feather"],hGn={key:3,class:"menu-icon"};function TGn(t,e,n,r,i,o){return k(),P("div",rGn,[g("button",{onClick:e[0]||(e[0]=he((...s)=>o.toggleMenu&&o.toggleMenu(...s),["prevent"])),title:n.title,class:We([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(k(),P("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,oGn)):n.icon&&n.icon.includes("feather")?(k(),P("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,sGn)):n.icon&&n.icon.includes("#")?(k(),P("p",aGn,le(n.icon.split("#")[1]),1)):(k(),P("i",lGn))],10,iGn),oe(lo,{name:"slide"},{default:Ve(()=>[i.isMenuOpen?(k(),P("div",{key:0,class:"menu-list flex-grow",style:xn(i.menuPosition),ref:"menu"},[g("ul",cGn,[(k(!0),P(ze,null,at(n.commands,(s,a)=>(k(),P("li",{key:a,onClick:he(l=>o.executeCommand(s),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==s.name?(k(),P("i",dGn)):s.icon&&!s.icon.includes("feather")&&!s.is_file?(k(),P("img",{key:1,src:s.icon,alt:s.name,class:"menu-icon"},null,8,fGn)):ne("",!0),s.icon&&s.icon.includes("feather")&&!s.is_file?(k(),P("i",{key:2,"data-feather":s.icon.split(":")[1],class:"mr-2"},null,8,pGn)):(k(),P("span",hGn)),g("span",null,le(s.name),1)],8,uGn))),128))])],4)):ne("",!0)]),_:1})])}const Nb=yt(nGn,[["render",TGn]]),mGn={components:{InteractiveMenu:Nb},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){qe(()=>{Ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return $o(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?ri:this.model.icon},defaultImg(t){t.target.src=ri},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,qe(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return $o(this.speed)},total_size_computed(){return $o(this.total_size)},downloaded_size_computed(){return $o(this.downloaded_size)}},watch:{linkNotValid(){qe(()=>{Ze.replace()})}}},gGn=["title"],_Gn={key:0,class:"flex flex-row"},QGn={class:"max-w-[300px] overflow-x-auto"},vGn={class:"flex gap-3 items-center grow"},yGn=["href"],bGn=["src"],EGn={class:"flex-1 overflow-hidden"},xGn={class:"font-bold font-large text-lg truncate"},SGn={key:1,class:"flex items-center flex-row gap-2 my-1"},LGn={class:"flex grow items-center"},CGn={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},AGn={class:"relative flex flex-col items-center justify-center flex-grow h-full"},wGn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},MGn={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},OGn={class:"flex justify-between mb-1"},RGn={class:"text-sm font-medium text-blue-700 dark:text-white"},NGn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},DGn={class:"flex justify-between mb-1"},IGn={class:"text-base font-medium text-blue-700 dark:text-white"},kGn={class:"text-sm font-medium text-blue-700 dark:text-white"},PGn={class:"flex flex-grow"},HGn={class:"flex flex-row flex-grow gap-3"},VGn={class:"p-2 text-center grow"},FGn={key:3},BGn={class:"flex flex-row items-center gap-3"},$Gn=["src"],UGn={class:"font-bold font-large text-lg truncate"},GGn={class:"flex items-center flex-row-reverse gap-2 my-1"},qGn={class:"flex flex-row items-center"},zGn={key:0,class:"text-base text-red-600 flex items-center mt-1"},jGn=["title"],WGn={class:""},YGn={class:"flex flex-row items-center"},KGn=["href","title"],ZGn={class:"flex items-center"},XGn={class:"flex items-center"},JGn={key:0,class:"flex items-center"},eqn=["href"],tqn={class:"flex items-center"},nqn=["href"],rqn={class:"flex items-center"},iqn={class:"flex items-center"},oqn=["href"];function sqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),P("div",{class:We(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",o.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=he(a=>o.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(k(),P("div",_Gn,[g("div",QGn,[g("div",vGn,[g("a",{href:n.model.model_creator_link,target:"_blank"},[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,bGn)],8,yGn),g("div",EGn,[g("h3",xGn,le(n.model.name),1)])])])])):ne("",!0),n.model.isCustomModel?(k(),P("div",SGn,[g("div",LGn,[g("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=he(()=>{},["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"box",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=ft(" Custom model "))]),g("div",null,[n.model.isInstalled?(k(),P("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=he((...a)=>o.uninstall&&o.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[ft(" Uninstall "),g("span",{class:"sr-only"},"Remove",-1)]))):ne("",!0)])])):ne("",!0),i.installing?(k(),P("div",CGn,[g("div",AGn,[e[15]||(e[15]=g("div",{role:"status",class:"justify-center"},[g("svg",{"aria-hidden":"true",class:"w-24 h-24 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)),g("div",wGn,[g("div",MGn,[g("div",OGn,[e[14]||(e[14]=g("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),g("span",RGn,le(Math.floor(i.progress))+"%",1)]),g("div",NGn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.progress+"%"})},null,4)]),g("div",DGn,[g("span",IGn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",kGn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",PGn,[g("div",HGn,[g("div",VGn,[g("button",{onClick:e[3]||(e[3]=he((...a)=>o.toggleCancelInstall&&o.toggleCancelInstall(...a),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])])):ne("",!0),n.model.isCustomModel?ne("",!0):(k(),P("div",FGn,[g("div",BGn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:We(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,$Gn),g("h3",UGn,le(n.model.name),1),e[16]||(e[16]=g("div",{class:"grow"},null,-1)),oe(s,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),g("div",GGn,[g("div",qGn,[i.linkNotValid?(k(),P("div",zGn,e[17]||(e[17]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),ft(" Link is not valid ")]))):ne("",!0)])]),g("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[g("div",WGn,[g("div",YGn,[e[19]||(e[19]=g("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=g("b",null,"Card: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=he(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,KGn),e[21]||(e[21]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=he(a=>o.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",ZGn,[g("div",{class:We(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=g("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=g("b",null,"File size: ",-1)),ft(" "+le(o.fileSize),1)],2)]),g("div",XGn,[e[24]||(e[24]=g("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=g("b",null,"License: ",-1)),ft(" "+le(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(k(),P("div",JGn,[e[26]||(e[26]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=g("b",null,"quantizer: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.quantizer),9,eqn)])):ne("",!0),g("div",tqn,[e[28]||(e[28]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=g("b",null,"Model creator: ",-1)),g("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.model_creator),9,nqn)]),g("div",rqn,[e[30]||(e[30]=g("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=g("b",null,"Release date: ",-1)),ft(" "+le(n.model.last_commit_time),1)]),g("div",iqn,[e[32]||(e[32]=g("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=g("b",null,"Category: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.category),9,oqn)])])],8,jGn)]))],10,gGn)}const aqn=yt(mGn,[["render",sqn]]),lqn={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},cqn={class:"p-4"},uqn={class:"flex items-center mb-4"},dqn=["src"],fqn={class:"text-lg font-semibold"},pqn={key:0};function hqn(t,e,n,r,i,o){return k(),P("div",cqn,[g("div",uqn,[g("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,dqn),g("h2",fqn,le(i.personalityName),1)]),g("p",null,[e[2]||(e[2]=g("strong",null,"Author:",-1)),ft(" "+le(i.personalityAuthor),1)]),g("p",null,[e[3]||(e[3]=g("strong",null,"Description:",-1)),ft(" "+le(i.personalityDescription),1)]),g("p",null,[e[4]||(e[4]=g("strong",null,"Category:",-1)),ft(" "+le(i.personalityCategory),1)]),i.disclaimer?(k(),P("p",pqn,[e[5]||(e[5]=g("strong",null,"Disclaimer:",-1)),ft(" "+le(i.disclaimer),1)])):ne("",!0),g("p",null,[e[6]||(e[6]=g("strong",null,"Conditioning Text:",-1)),ft(" "+le(i.conditioningText),1)]),g("p",null,[e[7]||(e[7]=g("strong",null,"AI Prefix:",-1)),ft(" "+le(i.aiPrefix),1)]),g("p",null,[e[8]||(e[8]=g("strong",null,"User Prefix:",-1)),ft(" "+le(i.userPrefix),1)]),g("div",null,[e[9]||(e[9]=g("strong",null,"Antiprompts:",-1)),g("ul",null,[(k(!0),P(ze,null,at(i.antipromptsList,s=>(k(),P("li",{key:s.id},le(s.text),1))),128))])]),g("button",{onClick:e[0]||(e[0]=s=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(k(),P("button",{key:1,onClick:e[1]||(e[1]=(...s)=>o.commitChanges&&o.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):ne("",!0)])}const Tqn=yt(lqn,[["render",hqn]]),Db="/assets/logo-CQZwS0X1.svg",mqn="/",gqn={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:Nb},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,console.log(this.personality),qe(()=>{Ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return mqn+this.personality.avatar},defaultImg(t){t.target.src=Db},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)},showHelp(){this.renderedHelp=fn(this.personality.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{selected(){qe(()=>{Ze.replace()})}}},_qn=["title"],Qqn={class:"flex-grow"},vqn={class:"flex items-center mb-4"},yqn=["src"],bqn={class:"text-sm text-gray-600"},Eqn={class:"text-sm text-gray-600"},xqn={class:"text-sm text-gray-600"},Sqn={key:0,class:"text-sm text-gray-600"},Lqn={key:1,class:"text-sm text-gray-600"},Cqn={class:"mb-4"},Aqn=["innerHTML"],wqn={class:"mt-auto pt-4 border-t"},Mqn={class:"flex justify-between items-center flex-wrap"},Oqn=["title"],Rqn=["fill"],Nqn=["src"],Dqn={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Iqn={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},kqn={class:"flex justify-between items-center mb-2"},Pqn={class:"flex-grow overflow-auto"},Hqn=["innerHTML"];function Vqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),P("div",{class:We(["app-card flex flex-col h-full",o.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[g("div",Qqn,[g("div",vqn,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>o.showThumbnail&&o.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>o.updateThumbnailPosition&&o.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>o.hideThumbnail&&o.hideThumbnail(...a))},null,40,yqn),g("div",null,[g("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a))},le(n.personality.name),1),g("p",bqn,"Author: "+le(n.personality.author),1),g("p",Eqn,"Version: "+le(n.personality.version),1),g("p",xqn,"Category: "+le(n.personality.category),1),n.personality.creation_date?(k(),P("p",Sqn,"Creation Date: "+le(o.formatDate(n.personality.creation_date)),1)):ne("",!0),n.personality.last_update_date?(k(),P("p",Lqn,"Last update Date: "+le(o.formatDate(n.personality.last_update_date)),1)):ne("",!0)]),n.personality.help?(k(),P("button",{key:0,onClick:e[6]||(e[6]=(...a)=>o.showHelp&&o.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[12]||(e[12]=[g("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):ne("",!0)]),g("div",Cqn,[e[13]||(e[13]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,Aqn)])]),g("div",wqn,[g("div",Mqn,[g("button",{onClick:e[7]||(e[7]=(...a)=>o.toggleFavorite&&o.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),P("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[14]||(e[14]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Rqn))],8,Oqn),i.isMounted?(k(),P("button",{key:0,onClick:e[8]||(e[8]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[15]||(e[15]=[g("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):ne("",!0),i.isMounted?(k(),P("button",{key:1,onClick:e[9]||(e[9]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[16]||(e[16]=[g("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):ne("",!0),g("button",{onClick:e[10]||(e[10]=(...a)=>o.showFolder&&o.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[17]||(e[17]=[g("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),oe(s,{commands:o.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),P("div",{key:0,style:xn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[g("img",{src:o.getImgUrl(),class:"w-full h-full object-fill"},null,8,Nqn)],4)):ne("",!0),i.showHelpPopup?(k(),P("div",Dqn,[g("div",Iqn,[g("div",kqn,[e[18]||(e[18]=g("h2",{class:"text-lg font-bold"},"Help",-1)),g("button",{onClick:e[11]||(e[11]=(...a)=>o.closeHelp&&o.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),g("div",Pqn,[g("div",{innerHTML:i.renderedHelp},null,8,Hqn)])])])):ne("",!0)],10,_qn)}const tU=yt(gqn,[["render",Vqn]]),Fqn={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),r=n.getElementsByTagName("style");Array.from(r).forEach(o=>{const s=document.createElement("style");s.textContent=this.scopeCSS(o.textContent),document.head.appendChild(s)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(o=>{const s=document.createElement("script");s.textContent=o.textContent,t.appendChild(s)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},Bqn=["id"];function $qn(t,e,n,r,i,o){return k(),P("div",{id:i.containerId,ref:"container"},null,8,Bqn)}const nU=yt(Fqn,[["render",$qn]]),Uqn="/",Gqn={components:{DynamicUIRenderer:nU},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){qe(()=>{Ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return Uqn+this.binding.icon},defaultImg(t){t.target.src=Db},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){qe(()=>{Ze.replace()})}}},qqn=["title"],zqn={class:"flex flex-row items-center gap-3"},jqn=["src"],Wqn={class:"font-bold font-large text-lg truncate"},Yqn={class:"flex-none gap-1"},Kqn={class:"flex items-center flex-row-reverse gap-2 my-1"},Zqn={class:""},Xqn={class:""},Jqn={class:"flex items-center"},ezn={class:"flex items-center"},tzn={class:"flex items-center"},nzn={class:"flex items-center"},rzn=["href"],izn=["title","innerHTML"];function ozn(t,e,n,r,i,o){const s=pt("DynamicUIRenderer");return k(),P("div",{class:We(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=he((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[g("div",null,[g("div",zqn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,jqn),g("h3",Wqn,le(n.binding.name),1),e[10]||(e[10]=g("div",{class:"grow"},null,-1)),g("div",Yqn,[n.selected?(k(),P("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=he(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[g("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Help",-1)]))):ne("",!0)])]),g("div",Kqn,[n.binding.installed?ne("",!0):(k(),P("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=he((...a)=>o.toggleInstall&&o.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[ft(" Install "),g("span",{class:"sr-only"},"Click to install",-1)]))),n.binding.installed?(k(),P("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=he((...a)=>o.toggleReinstall&&o.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[ft(" Reinstall "),g("span",{class:"sr-only"},"Reinstall",-1)]))):ne("",!0),n.binding.installed?(k(),P("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=he((...a)=>o.toggleUnInstall&&o.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[ft(" Uninstall "),g("span",{class:"sr-only"},"UnInstall",-1)]))):ne("",!0),n.selected?(k(),P("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=he((...a)=>o.toggleSettings&&o.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[ft(" Settings "),g("span",{class:"sr-only"},"Settings",-1)]))):ne("",!0)]),n.binding.ui?(k(),wt(s,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):ne("",!0),g("div",Zqn,[g("div",Xqn,[g("div",Jqn,[e[15]||(e[15]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=g("b",null,"Author: ",-1)),ft(" "+le(n.binding.author),1)]),g("div",ezn,[e[18]||(e[18]=g("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=g("b",null,"Folder: ",-1)),ft(" "+le(n.binding.folder)+" ",1),e[20]||(e[20]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=he(a=>o.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",tzn,[e[21]||(e[21]=g("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=g("b",null,"Version: ",-1)),ft(" "+le(n.binding.version),1)]),g("div",nzn,[e[23]||(e[23]=g("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=g("b",null,"Link: ",-1)),g("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},le(n.binding.link),9,rzn)])]),e[25]||(e[25]=g("div",{class:"flex items-center"},[g("i",{"data-feather":"info",class:"w-5 m-1"}),g("b",null,"Description: "),g("br")],-1)),g("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,izn)])])],10,qqn)}const szn=yt(Gqn,[["render",ozn]]),co="/assets/logo-PFou_X4V.png",azn={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},lzn={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},czn={class:"relative w-full max-w-md max-h-full"},uzn={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},dzn={class:"p-4 text-center"},fzn={class:"p-4 text-center mx-auto mb-4"};function pzn(t,e,n,r,i,o){return i.show?(k(),P("div",lzn,[g("div",czn,[g("div",uzn,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[4]||(e[4]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",dzn,[e[6]||(e[6]=g("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),g("div",fzn,[e[5]||(e[5]=g("label",{class:"mr-2"},"Model path",-1)),J(g("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>i.model_path=s),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[we,i.model_path]])]),g("button",{onClick:e[2]||(e[2]=s=>o.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),g("button",{onClick:e[3]||(e[3]=s=>o.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):ne("",!0)}const hzn=yt(azn,[["render",pzn]]),Tzn={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n[n.show?(k(),P("div",mzn,[g("div",gzn,[g("h2",_zn,[e[5]||(e[5]=g("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),ft(" "+le(n.title),1)]),g("div",Qzn,[g("ul",null,[(k(!0),P(ze,null,at(n.choices,(s,a)=>(k(),P("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[g("div",vzn,[g("div",yzn,[s.isEditing?J((k(),P("input",{key:1,"onUpdate:modelValue":l=>s.editName=l,onBlur:l=>o.finishEditing(s),onKeyup:Xr(l=>o.finishEditing(s),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,Ezn)),[[we,s.editName]]):(k(),P("span",{key:0,onClick:l=>o.selectChoice(s),class:We([{"font-semibold":s===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},le(o.displayName(s)),11,bzn)),s.size?(k(),P("span",xzn,le(o.formatSize(s.size)),1)):ne("",!0)]),g("div",Szn,[g("button",{onClick:l=>o.editChoice(s),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,Lzn),n.can_remove?(k(),P("button",{key:0,onClick:l=>o.removeChoice(s,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,Czn)):ne("",!0)])])]))),128))])]),i.showInput?(k(),P("div",Azn,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.newFilename=s),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[we,i.newFilename]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.addNewFilename&&o.addNewFilename(...s)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):ne("",!0),g("div",wzn,[g("button",{onClick:e[2]||(e[2]=(...s)=>o.closeDialog&&o.closeDialog(...s)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),g("button",{onClick:e[3]||(e[3]=(...s)=>o.validateChoice&&o.validateChoice(...s)),disabled:!i.selectedChoice,class:We([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Mzn),g("button",{onClick:e[4]||(e[4]=(...s)=>o.toggleInput&&o.toggleInput(...s)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):ne("",!0)]),_:1})}const Ib=yt(Tzn,[["render",Ozn],["__scopeId","data-v-f43216be"]]),Rzn={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Nzn={class:"flex space-x-4"},Dzn=["value","aria-checked"],Izn={class:"text-gray-700"};function kzn(t,e,n,r,i,o){return k(),P("div",Nzn,[(k(!0),P(ze,null,at(n.radioOptions,(s,a)=>(k(),P("label",{key:s.value,class:"flex items-center space-x-2"},[J(g("input",{type:"radio",value:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>o.handleRadioChange&&o.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===s.value.toString(),role:"radio"},null,40,Dzn),[[Nj,i.selectedValue]]),g("span",Izn,le(s.label),1)]))),128))])}const Pzn=yt(Rzn,[["render",kzn]]),Hzn="/assets/gpu-BWVOYg-D.svg",Vzn={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,r)=>r!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=s),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,Bzn),[[we,i.newItem]]),g("button",{onClick:e[2]||(e[2]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(k(),P("ul",$zn,[(k(!0),P(ze,null,at(n.modelValue,(s,a)=>(k(),P("li",{key:a,class:We(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[g("span",Uzn,le(s),1),g("div",Gzn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,qzn),a>0?(k(),P("button",{key:0,onClick:l=>o.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,zzn)):ne("",!0),ao.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,jzn)):ne("",!0)]),i.draggingIndex===a?(k(),P("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>o.startDragging(a),onMousemove:l=>o.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>o.stopDragging&&o.stopDragging(...l))},null,40,Wzn)):ne("",!0)],2))),128))])):ne("",!0),n.modelValue.length>0?(k(),P("div",Yzn,[g("button",{onClick:e[4]||(e[4]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):ne("",!0)])}const Zzn=yt(Vzn,[["render",Kzn]]),Xzn={name:"DictionaryManager",props:{modelValue:{type:Object,default:()=>({})},keyName:{type:String,default:"Key"},valueName:{type:String,default:"Value"}},emits:["update:modelValue","change"],data(){return{newKey:"",newValue:"",draggingKey:null}},methods:{addItem(){if(this.newKey.trim()){const t={...this.modelValue};t[this.newKey.trim()]=this.newValue,this.$emit("update:modelValue",t),this.$emit("change"),this.newKey="",this.newValue=""}},removeItem(t){const e={...this.modelValue};delete e[t],this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",{}),this.$emit("change")},updateKey(t,e){if(e.trim()&&e!==t){const n={...this.modelValue};n[e.trim()]=n[t],delete n[t],this.$emit("update:modelValue",n),this.$emit("change")}},updateValue(t,e){const n={...this.modelValue};n[t]=e,this.$emit("update:modelValue",n),this.$emit("change")},moveUp(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n>0){const r={};e.forEach((i,o)=>{o===n-1&&(r[t]=this.modelValue[t]),i!==t&&(r[i]=this.modelValue[i])}),this.$emit("update:modelValue",r),this.$emit("change")}},moveDown(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n{i!==t&&(r[i]=this.modelValue[i]),o===n+1&&(r[t]=this.modelValue[t])}),this.$emit("update:modelValue",r),this.$emit("change")}}}},Jzn={class:"max-w-4xl mx-auto p-4"},ejn={class:"flex flex-col sm:flex-row mb-4 gap-2"},tjn=["placeholder"],njn=["placeholder"],rjn={key:0,class:"space-y-4"},ijn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ojn=["for"],sjn=["id","value","onInput"],ajn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ljn=["for"],cjn=["id","value","onInput"],ujn={class:"flex items-center space-x-2"},djn=["onClick"],fjn=["onClick"],pjn=["onClick"],hjn={key:1,class:"mt-6"};function Tjn(t,e,n,r,i,o){return k(),P("div",Jzn,[g("div",ejn,[J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.newKey=s),placeholder:n.keyName,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,tjn),[[we,i.newKey]]),J(g("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=s=>i.newValue=s),placeholder:n.valueName,onKeyup:e[3]||(e[3]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,njn),[[we,i.newValue]]),g("button",{onClick:e[4]||(e[4]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg transition duration-300 ease-in-out"},"Add")]),Object.keys(n.modelValue).length>0?(k(),P("ul",rjn,[(k(!0),P(ze,null,at(n.modelValue,(s,a)=>(k(),P("li",{key:a,class:We(["flex flex-col sm:flex-row items-center p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md hover:shadow-lg transition duration-300 ease-in-out",{"bg-gray-100 dark:bg-gray-700":i.draggingKey===a}])},[g("div",ijn,[g("label",{for:"key-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.keyName),9,ojn),g("input",{id:"key-"+a,value:a,onInput:l=>o.updateKey(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,sjn)]),g("div",ajn,[g("label",{for:"value-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.valueName),9,ljn),g("input",{id:"value-"+a,value:s,onInput:l=>o.updateValue(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,cjn)]),g("div",ujn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2 rounded-full hover:bg-red-100 dark:hover:bg-red-900 transition duration-300 ease-in-out"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,djn),g("button",{onClick:l=>o.moveUp(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,fjn),g("button",{onClick:l=>o.moveDown(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[8]||(e[8]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,pjn)])],2))),128))])):ne("",!0),Object.keys(n.modelValue).length>0?(k(),P("div",hjn,[g("button",{onClick:e[5]||(e[5]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg transition duration-300 ease-in-out"},"Remove All")])):ne("",!0)])}const mjn=yt(Xzn,[["render",Tjn]]),gjn="/";ve.defaults.baseURL="/";const _jn={components:{AddModelDialog:hzn,ModelEntry:aqn,PersonalityViewer:Tqn,PersonalityEntry:tU,BindingEntry:szn,ChoiceDialog:Ib,Card:Q9,StringListManager:Zzn,DictManager:mjn,RadioOptions:Pzn},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:ri,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:co,binding_changed:!1,SVGGPU:Hzn,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:gjn,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}tt.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{updateRagDatabase(t,e,n){n&&(n==="mounted"?this.configFile.rag_databases[t][n]=!!e:this.configFile.rag_databases[t][n]=e,this.settingsChanged=!0)},getAlias(t){return this.configFile.remote_databases[t].alias},getDatabaseType(t){return this.configFile.remote_databases[t].type},getDatabaseUrl(t){return this.configFile.remote_databases[t].url},getDatabaseKey(t){return this.configFile.remote_databases[t].key||""},getMounted(t){return this.configFile.remote_databases[t].mounted||!1},updateAlias(t,e){this.configFile.remote_databases[t].alias=e,this.settingsChanged=!0},updateDatabaseType(t,e){this.configFile.remote_databases[t].type=e,this.settingsChanged=!0},updateDatabaseUrl(t,e){this.configFile.remote_databases[t].url=e,this.settingsChanged=!0},updateDatabaseKey(t,e){this.configFile.remote_databases[t].key=e,this.settingsChanged=!0},updateMounted(t,e){this.configFile.remote_databases[t].mounted=e,this.settingsChanged=!0},addDatabaseService(){this.configFile.remote_databases||(this.configFile.remote_databases=[]),this.configFile.remote_databases.push({alias:"new_database",is_local:!1,type:"lightrag",url:"http://localhost:9621/",key:"",mounted:!1}),this.settingsChanged=!0},removeDataBase(t){console.log("Removing remote database"),this.configFile.remote_databases.splice(t,1),console.log(this.configFile.remote_databases),this.settingsChanged=!0},fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push({alias:"",is_local:!0,path:"",mounted:!1,key:""}),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await ve.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{tt.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]={alias:e.database_name,is_local:!0,path:e.database_path,mounted:!1,key:""},this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await ve.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="!@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="!@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="lollms_simplified"?(console.log("Using lollms template"),this.configFile.start_header_id_template="@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="bare"?(console.log("Using lollms template"),this.configFile.start_header_id_template="",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="llama3"?(console.log("Using llama3 template"),this.configFile.start_header_id_template="<|start_header_id|>",this.configFile.system_message_template="system",this.configFile.end_header_id_template="<|end_header_id|>",this.configFile.separator_template="<|eot_id|>",this.configFile.start_user_header_id_template="<|start_header_id|>",this.configFile.end_user_header_id_template="<|end_header_id|>",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="<|start_header_id|>",this.configFile.end_ai_header_id_template="<|end_header_id|>",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="mistral"?(console.log("Using mistral template"),this.configFile.start_header_id_template="[INST]",this.configFile.system_message_template=" Using this information",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` @@ -312,25 +312,25 @@ The possibilities are endless, they are now yours to mold and customize as you s Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: `,4,!1),console.error(e)})},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),ve.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=co},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices();try{console.log("Loading input devices list");const t=await ve.get("/get_snd_input_devices");this.snd_input_devices=t.data.device_names,this.snd_input_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const t=await ve.get("/get_snd_output_devices");this.snd_output_devices=t.data.device_names,this.snd_output_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list output devices")}try{if(console.log("Getting comfyui models"),this.configFile.activate_lollms_tti_server&&this.configFile.active_tti_service=="comfyui"){const t=await ve.get("/list_comfyui_models");t.data.status&&(this.comfyui_models=t.data.models)}}catch{console.log("Couldin't list output devices")}this.fetchElevenLabsVoices()},activated(){},computed:{full_template:{get(){return(this.configFile.start_header_id_template+this.configFile.system_message_template+this.configFile.end_header_id_template+" system message"+this.configFile.separator_template+this.configFile.start_user_header_id_template+"user name"+this.configFile.end_user_header_id_template+" User prompt"+this.configFile.separator_template+this.configFile.end_user_message_id_template+this.configFile.separator_template+this.configFile.start_ai_header_id_template+"ai personality"+this.configFile.end_ai_header_id_template+"ai response"+this.configFile.end_ai_message_id_template).replace(` -`,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(t=>t.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):ri}catch{console.log("error")}if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:co},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return null;const t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.$store.state.personalities[t].name:null},speed_computed(){return $o(this.addModel.speed)},total_size_computed(){return $o(this.addModel.total_size)},downloaded_size_computed(){return $o(this.addModel.downloaded_size)}},watch:{bec_collapsed(){qe(()=>{Ze.replace()})},pc_collapsed(){qe(()=>{Ze.replace()})},mc_collapsed(){qe(()=>{Ze.replace()})},sc_collapsed(){qe(()=>{Ze.replace()})},showConfirmation(){qe(()=>{Ze.replace()})},mzl_collapsed(){qe(()=>{Ze.replace()})},pzl_collapsed(){qe(()=>{Ze.replace()})},ezl_collapsed(){qe(()=>{Ze.replace()})},bzl_collapsed(){qe(()=>{Ze.replace()})},all_collapsed(t){this.collapseAll(t),qe(()=>{Ze.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,qe(()=>{Ze.replace()})},isLoading(){qe(()=>{Ze.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){qe(()=>{Ze.replace()})}},async beforeRouteLeave(t){await this.$router.isReady()}},Qjn={class:"container pt-12 flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},vjn={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},yjn={key:0,class:"flex gap-3 flex-1 items-center duration-75"},bjn={key:1,class:"flex gap-3 flex-1 items-center"},Ejn={class:"flex gap-3 flex-1 items-center justify-end"},xjn={class:"flex gap-3 items-center"},Sjn={key:0,class:"flex gap-3 items-center"},Ljn={key:1,role:"status"},Cjn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Ajn={class:"flex flex-row p-3"},wjn={class:"text-base font-semibold cursor-pointer select-none items-center"},Mjn={class:"flex gap-2 items-center"},Ojn={key:0},Rjn=["src"],Njn={class:"font-bold font-large text-lg"},Djn={key:1},Ijn={class:"flex gap-2 items-center"},kjn=["src"],Pjn={class:"font-bold font-large text-lg"},Hjn={class:"font-bold font-large text-lg"},Vjn={class:"font-bold font-large text-lg"},Fjn={class:"mb-2"},Bjn={class:"flex flex-col mx-2"},$jn={class:"p-2"},Ujn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Gjn={class:"mb-2"},qjn={class:"flex flex-col mx-2"},zjn={class:"p-2"},jjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Wjn={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Yjn=["src"],Kjn={class:"flex flex-col mx-2"},Zjn={class:"p-2"},Xjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jjn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},eWn={class:"flex flex-row p-3"},tWn={class:"flex flex-col mb-2 px-3 pb-2"},nWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rWn={class:"flex flex-col space-y-4"},iWn={class:"flex items-center"},oWn={class:"flex items-center"},sWn={class:"flex items-center"},aWn={class:"flex items-start"},lWn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},cWn={class:"flex flex-row p-3"},uWn={class:"flex flex-col mb-2 px-3 pb-2"},dWn={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},fWn={for:"logo-upload"},pWn=["src"],hWn={style:{width:"10%"}},TWn={class:"text-center items-center"},mWn={class:"flex flex-row"},gWn={style:{width:"100%"}},_Wn={class:"flex flex-row"},QWn={class:"flex flex-row"},vWn={class:"flex flex-row"},yWn={class:"flex flex-row"},bWn={class:"flex flex-row"},EWn={class:"flex flex-row"},xWn={class:"flex flex-row"},SWn={class:"flex flex-row"},LWn={class:"flex flex-row"},CWn={class:"flex flex-row"},AWn={class:"flex flex-row"},wWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},MWn=["innerHTML"],OWn={style:{width:"100%"}},RWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},NWn={style:{width:"100%"}},DWn={style:{width:"100%"}},IWn={style:{width:"100%"}},kWn={style:{width:"100%"}},PWn={for:"avatar-upload"},HWn=["src"],VWn={style:{width:"10%"}},FWn={class:"flex flex-row"},BWn={style:{width:"100%"}},$Wn={style:{width:"100%"}},UWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},GWn={style:{width:"100%"}},qWn={style:{width:"100%"}},zWn={style:{width:"100%"}},jWn={style:{width:"100%"}},WWn={style:{width:"100%"}},YWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},KWn={class:"flex flex-row"},ZWn={style:{width:"100%"}},XWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},JWn={class:"flex flex-row"},eYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tYn={class:"flex flex-row"},nYn={class:"flex flex-row"},rYn={class:"flex flex-row"},iYn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},oYn={class:"flex flex-row p-3"},sYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},aYn={style:{width:"100%"}},lYn=["value","onInput"],cYn=["value","onInput"],uYn=["value","onInput"],dYn=["checked","onChange"],fYn=["onClick"],pYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hYn={style:{width:"100%"}},TYn=["value","onInput"],mYn=["value","onInput"],gYn={class:"flex items-center mr-2"},_Yn=["checked","onChange"],QYn=["onClick"],vYn=["onClick"],yYn=["onClick"],bYn=["disabled"],EYn={key:0,value:"BAAI/bge-m3"},xYn={key:1,value:"nvidia/NV-Embed-v2"},SYn={key:2,value:"sentence-transformers/all-MiniLM-L6-v2"},LYn={key:3,value:"sentence-transformers/all-MiniLM-L12-v2"},CYn={key:4,value:"sentence-transformers/all-distilroberta-v1"},AYn={key:5,value:"sentence-transformers/all-mpnet-base-v2"},wYn={key:6,value:"text-embedding-ada-002"},MYn={key:7,value:"text-embedding-babbage-001"},OYn={key:8,value:"text-embedding-curie-001"},RYn={key:9,value:"text-embedding-davinci-001"},NYn={key:10,value:"bge-m3"},DYn={key:11,value:"NV-Embed-v2"},IYn={key:12,value:"nomic-embed-text"},kYn={key:13,value:"mxbai-embed-large"},PYn={key:14,value:"mxbai-embed-large"},HYn={key:15,value:"snowflake-arctic-embed"},VYn={key:16,value:"snowflake-arctic-embed"},FYn={key:17,value:"all-minilm"},BYn={key:18,value:"bge-large"},$Yn={key:19,disabled:""},UYn={class:"flex flex-row"},GYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qYn={class:"flex flex-row"},zYn={class:"flex flex-row"},jYn={class:"flex flex-row"},WYn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},YYn={class:"flex flex-row p-3"},KYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ZYn={class:"flex flex-row"},XYn={class:"flex flex-row"},JYn={class:"flex flex-row"},eKn={class:"flex flex-row"},tKn={class:"flex flex-col"},nKn={class:"flex flex-col"},rKn={class:"flex flex-col"},iKn={class:"flex flex-col"},oKn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},sKn={class:"flex flex-row p-3"},aKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},lKn={style:{width:"100%"}},cKn={style:{width:"100%"}},uKn={style:{width:"100%"}},dKn={style:{width:"100%"}},fKn={style:{width:"100%"}},pKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hKn={class:"flex flex-row"},TKn={class:"flex flex-row"},mKn={class:"flex flex-row"},gKn={class:"flex flex-row"},_Kn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},QKn={style:{width:"100%"}},vKn={style:{width:"100%"}},yKn={style:{width:"100%"}},bKn={style:{width:"100%"}},EKn={style:{width:"100%"}},xKn={style:{width:"100%"}},SKn={style:{width:"100%"}},LKn={class:"flex flex-row"},CKn={class:"flex flex-row"},AKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wKn={style:{width:"100%"}},MKn=["value"],OKn={style:{width:"100%"}},RKn=["value"],NKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},DKn={style:{width:"100%"}},IKn={style:{width:"100%"}},kKn={style:{width:"100%"}},PKn={style:{width:"100%"}},HKn={style:{width:"100%"}},VKn={style:{width:"100%"}},FKn={style:{width:"100%"}},BKn={style:{width:"100%"}},$Kn={style:{width:"100%"}},UKn={style:{width:"100%"}},GKn={style:{width:"100%"}},qKn={style:{width:"100%"}},zKn={style:{width:"100%"}},jKn={style:{width:"100%"}},WKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},YKn={class:"flex flex-row"},KKn={class:"flex flex-row"},ZKn=["value"],XKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},JKn={class:"flex flex-row"},eZn={class:"flex flex-row"},tZn=["value"],nZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rZn={class:"flex flex-row"},iZn={class:"flex flex-row"},oZn=["value"],sZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},aZn={class:"flex flex-row"},lZn=["value"],cZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},uZn={class:"flex flex-row"},dZn=["value"],fZn={class:"flex flex-row"},pZn=["value"],hZn={class:"flex flex-row"},TZn={class:"flex flex-row"},mZn={class:"flex flex-row"},gZn={class:"flex flex-row"},_Zn={class:"flex flex-row"},QZn={class:"flex flex-row"},vZn={class:"flex flex-row"},yZn={class:"flex flex-row"},bZn={class:"flex flex-row"},EZn={class:"flex flex-row"},xZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},SZn={class:"flex flex-row"},LZn={class:"flex flex-row"},CZn={class:"flex flex-row"},AZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wZn={class:"flex flex-row"},MZn={class:"flex flex-row"},OZn={class:"flex flex-row"},RZn={class:"flex flex-row"},NZn={class:"flex flex-row"},DZn=["value"],IZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},kZn={class:"flex flex-row"},PZn={class:"flex flex-row"},HZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},VZn={class:"flex flex-row"},FZn={class:"flex flex-row"},BZn={class:"flex flex-row"},$Zn={class:"flex flex-row"},UZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},GZn={class:"flex flex-row"},qZn={class:"flex flex-row"},zZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jZn={class:"flex flex-row"},WZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},YZn={class:"flex flex-row"},KZn={class:"flex flex-row"},ZZn={class:"flex flex-row"},XZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},JZn={class:"flex flex-row"},eXn={class:"flex flex-row"},tXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},nXn={class:"flex flex-row"},rXn={class:"flex flex-row"},iXn=["value"],oXn={class:"flex flex-row"},sXn={class:"flex flex-row"},aXn={class:"flex flex-row"},lXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},cXn={class:"flex flex-row"},uXn={class:"flex flex-row"},dXn={class:"flex flex-row"},fXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},pXn={class:"flex flex-row"},hXn={class:"flex flex-row"},TXn={class:"flex flex-row"},mXn={class:"flex flex-col align-bottom"},gXn={class:"relative"},_Xn={class:"absolute right-0"},QXn={class:"flex flex-row"},vXn={class:"flex flex-row"},yXn={class:"flex flex-row"},bXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},EXn={class:"flex flex-row"},xXn={class:"flex flex-row"},SXn={class:"flex flex-row"},LXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},CXn={class:"flex flex-row"},AXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wXn={class:"flex flex-row"},MXn={class:"flex flex-row"},OXn={class:"flex flex-row"},RXn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},NXn={class:"flex flex-row p-3"},DXn={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},IXn={key:1,class:"mr-2"},kXn={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},PXn={class:"flex gap-1 items-center"},HXn=["src"],VXn={class:"font-bold font-large text-lg line-clamp-1"},FXn={key:0,class:"mb-2"},BXn={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},$Xn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},UXn={class:"flex flex-row p-3"},GXn={class:"flex flex-row items-center"},qXn={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},zXn={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},jXn={key:2,class:"mr-2"},WXn={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},YXn={class:"flex gap-1 items-center"},KXn=["src"],ZXn={class:"font-bold font-large text-lg line-clamp-1"},XXn={class:"mx-2 mb-4"},JXn={class:"relative"},eJn={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},tJn={key:0},nJn={key:1},rJn={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},iJn={key:1,class:"mb-2"},oJn={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},sJn={class:"mb-2"},aJn={class:"p-2"},lJn={class:"mb-3"},cJn={key:0},uJn={class:"mb-3"},dJn={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},fJn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},pJn={class:"w-full p-2"},hJn={class:"flex justify-between mb-1"},TJn={class:"text-sm font-medium text-blue-700 dark:text-white"},mJn=["title"],gJn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},_Jn={class:"flex justify-between mb-1"},QJn={class:"text-base font-medium text-blue-700 dark:text-white"},vJn={class:"text-sm font-medium text-blue-700 dark:text-white"},yJn={class:"flex flex-grow"},bJn={class:"flex flex-row flex-grow gap-3"},EJn={class:"p-2 text-center grow"},xJn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},SJn={class:"flex flex-row p-3 items-center"},LJn={key:0,class:"mr-2"},CJn={class:"mr-2 font-bold font-large text-lg line-clamp-1"},AJn={key:1,class:"mr-2"},wJn={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},MJn={key:0,class:"flex -space-x-4 items-center"},OJn={class:"group items-center flex flex-row"},RJn=["onClick"],NJn=["src","title"],DJn=["onClick"],IJn={class:"mx-2 mb-4"},kJn={class:"relative"},PJn={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},HJn={key:0},VJn={key:1},FJn={key:0,class:"mx-2 mb-4"},BJn={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},$Jn=["selected"],UJn={key:0,class:"mb-2"},GJn={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},qJn={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},zJn={class:"flex flex-row"},jJn={class:"m-2"},WJn={class:"flex flex-row gap-2 items-center"},YJn={class:"m-2"},KJn={class:"m-2"},ZJn={class:"flex flex-col align-bottom"},XJn={class:"relative"},JJn={class:"absolute right-0"},eer={class:"m-2"},ter={class:"flex flex-col align-bottom"},ner={class:"relative"},rer={class:"absolute right-0"},ier={class:"m-2"},oer={class:"flex flex-col align-bottom"},ser={class:"relative"},aer={class:"absolute right-0"},ler={class:"m-2"},cer={class:"flex flex-col align-bottom"},uer={class:"relative"},der={class:"absolute right-0"},fer={class:"m-2"},per={class:"flex flex-col align-bottom"},her={class:"relative"},Ter={class:"absolute right-0"},mer={class:"m-2"},ger={class:"flex flex-col align-bottom"},_er={class:"relative"},Qer={class:"absolute right-0"};function ver(t,e,n,r,i,o){const s=pt("DictManager"),a=pt("Card"),l=pt("StringListManager"),c=pt("BindingEntry"),u=pt("RadioOptions"),d=pt("model-entry"),h=pt("personality-entry"),f=pt("AddModelDialog"),m=pt("ChoiceDialog");return k(),P(ze,null,[g("div",Qjn,[g("div",vjn,[i.showConfirmation?(k(),P("div",yjn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=he(T=>i.showConfirmation=!1,["stop"]))},e[451]||(e[451]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=he(T=>o.save_configuration(),["stop"]))},e[452]||(e[452]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),i.showConfirmation?ne("",!0):(k(),P("div",bjn,[g("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=T=>o.reset_configuration())},e[453]||(e[453]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=he(T=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[454]||(e[454]=[g("i",{"data-feather":"list"},null,-1)]))])),g("div",Ejn,[g("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=T=>o.api_get_req("clear_uploads").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[455]||(e[455]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=T=>o.api_post_req("restart_program").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[456]||(e[456]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(k(),P("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=T=>o.api_post_req("update_software").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[457]||(e[457]=[g("i",{"data-feather":"arrow-up-circle"},null,-1),g("i",{"data-feather":"alert-circle"},null,-1)]))):ne("",!0),g("div",xjn,[i.settingsChanged?(k(),P("div",Sjn,[i.isLoading?ne("",!0):(k(),P("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=he(T=>o.applyConfiguration(),["stop"]))},e[458]||(e[458]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),g("i",{"data-feather":"check"})],-1)]))),i.isLoading?ne("",!0):(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=he(T=>o.cancelConfiguration(),["stop"]))},e[459]||(e[459]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),g("i",{"data-feather":"x"})],-1)])))])):ne("",!0),i.isLoading?(k(),P("div",Ljn,[g("p",null,le(i.loading_text),1),e[460]||(e[460]=g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),e[461]||(e[461]=g("span",{class:"sr-only"},"Loading...",-1))])):ne("",!0)])])]),g("div",{class:We(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[g("div",Cjn,[g("div",Ajn,[g("button",{onClick:e[9]||(e[9]=he(T=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[462]||(e[462]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.sc_collapsed]]),J(g("div",null,e[463]||(e[463]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.sc_collapsed]]),e[466]||(e[466]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[467]||(e[467]=g("div",{class:"mr-2"},"|",-1)),g("div",wjn,[g("div",Mjn,[g("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(k(),P("div",Ojn,[(k(!0),P(ze,null,at(o.vramUsage.gpus,T=>(k(),P("div",{class:"flex gap-2 items-center",key:T},[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Rjn),g("p",Njn,[g("div",null,le(o.computedFileSize(T.used_vram))+" / "+le(o.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%) ",1)])]))),128))])):ne("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(k(),P("div",Djn,[g("div",Ijn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,kjn),g("p",Pjn,[g("div",null,le(o.vramUsage.gpus.length)+"x ",1)])])])):ne("",!0)]),e[464]||(e[464]=g("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Hjn,[g("div",null,le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+"%)",1)]),e[465]||(e[465]=g("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Vjn,[g("div",null,le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])])])])]),g("div",{class:We([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",Fjn,[e[470]||(e[470]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[g("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),ft(" CPU Ram usage: ")],-1)),g("div",Bjn,[g("div",null,[e[468]||(e[468]=g("b",null,"Avaliable ram: ",-1)),ft(le(o.ram_available_space),1)]),g("div",null,[e[469]||(e[469]=g("b",null,"Ram usage: ",-1)),ft(" "+le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+")% ",1)])]),g("div",$jn,[g("div",Ujn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.ram_percent_usage+"%;")},null,4)])])]),g("div",Gjn,[e[473]||(e[473]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),ft(" Disk usage: ")],-1)),g("div",qjn,[g("div",null,[e[471]||(e[471]=g("b",null,"Avaliable disk space: ",-1)),ft(le(o.disk_available_space),1)]),g("div",null,[e[472]||(e[472]=g("b",null,"Disk usage: ",-1)),ft(" "+le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])]),g("div",zjn,[g("div",jjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(k(!0),P(ze,null,at(o.vramUsage.gpus,T=>(k(),P("div",{class:"mb-2",key:T},[g("label",Wjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Yjn),e[474]||(e[474]=ft(" GPU usage: "))]),g("div",Kjn,[g("div",null,[e[475]||(e[475]=g("b",null,"Model: ",-1)),ft(le(T.gpu_model),1)]),g("div",null,[e[476]||(e[476]=g("b",null,"Avaliable vram: ",-1)),ft(le(this.computedFileSize(T.available_space)),1)]),g("div",null,[e[477]||(e[477]=g("b",null,"GPU usage: ",-1)),ft(" "+le(this.computedFileSize(T.used_vram))+" / "+le(this.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%)",1)])]),g("div",Zjn,[g("div",Xjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+T.percentage+"%;")},null,4)])])]))),128))],2)]),g("div",Jjn,[g("div",eWn,[g("button",{onClick:e[10]||(e[10]=he(T=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[478]||(e[478]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.smartrouterconf_collapsed]]),J(g("div",null,e[479]||(e[479]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.smartrouterconf_collapsed]]),e[480]||(e[480]=g("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),g("div",{class:We([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",tWn,[oe(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("div",nWn,[g("div",rWn,[g("div",iWn,[e[481]||(e[481]=g("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),J(g("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=T=>o.configFile.use_smart_routing=T),onChange:e[12]||(e[12]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_smart_routing]])]),g("div",oWn,[e[482]||(e[482]=g("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),J(g("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=T=>o.configFile.restore_model_after_smart_routing=T),onChange:e[14]||(e[14]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.restore_model_after_smart_routing]])]),g("div",sWn,[e[483]||(e[483]=g("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),J(g("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=T=>o.configFile.smart_routing_router_model=T),onChange:e[16]||(e[16]=T=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.smart_routing_router_model]])]),g("div",aWn,[e[484]||(e[484]=g("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),oe(s,{modelValue:o.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=T=>o.configFile.smart_routing_models_description=T),onChange:e[18]||(e[18]=T=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),g("div",lWn,[g("div",cWn,[g("button",{onClick:e[19]||(e[19]=he(T=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[485]||(e[485]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mainconf_collapsed]]),J(g("div",null,e[486]||(e[486]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mainconf_collapsed]]),e[487]||(e[487]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),g("div",{class:We([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",uWn,[oe(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",dWn,[g("tr",null,[e[489]||(e[489]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),g("td",null,[g("label",fWn,[g("img",{src:o.configFile.app_custom_logo!=null&&o.configFile.app_custom_logo!=""?"/user_infos/"+o.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,pWn)]),g("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(...T)=>o.uploadLogo&&o.uploadLogo(...T))},null,32)]),g("td",hWn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=he(T=>o.resetLogo(),["stop"]))},e[488]||(e[488]=[g("i",{"data-feather":"x"},null,-1)]))])]),g("tr",null,[e[491]||(e[491]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),g("td",TWn,[g("div",mWn,[J(g("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=T=>o.configFile.hardware_mode=T),onChange:e[23]||(e[23]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[490]||(e[490]=[g("option",{value:"cpu"},"CPU",-1),g("option",{value:"cpu-noavx"},"CPU (No AVX)",-1),g("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1),g("option",{value:"nvidia"},"NVIDIA",-1),g("option",{value:"amd-noavx"},"AMD (No AVX)",-1),g("option",{value:"amd"},"AMD",-1),g("option",{value:"apple-intel"},"Apple Intel",-1),g("option",{value:"apple-silicon"},"Apple Silicon",-1)]),544),[[dn,o.configFile.hardware_mode]])])])]),g("tr",null,[e[492]||(e[492]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),g("td",gWn,[J(g("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=T=>o.configFile.discussion_db_name=T),onChange:e[25]||(e[25]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.discussion_db_name]])])]),g("tr",null,[e[493]||(e[493]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),g("td",null,[g("div",_Wn,[J(g("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=T=>o.configFile.copy_to_clipboard_add_all_details=T),onChange:e[27]||(e[27]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.copy_to_clipboard_add_all_details]])])])]),g("tr",null,[e[494]||(e[494]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),g("td",null,[g("div",QWn,[J(g("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=T=>o.configFile.auto_show_browser=T),onChange:e[29]||(e[29]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_show_browser]])])])]),g("tr",null,[e[495]||(e[495]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),g("td",null,[g("div",vWn,[J(g("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=T=>o.configFile.debug=T),onChange:e[31]||(e[31]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug]])])])]),g("tr",null,[e[496]||(e[496]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),g("td",null,[g("div",yWn,[J(g("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[33]||(e[33]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_final_full_prompt]])])])]),g("tr",null,[e[497]||(e[497]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),g("td",null,[g("div",bWn,[J(g("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[35]||(e[35]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_final_full_prompt]])])])]),g("tr",null,[e[498]||(e[498]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),g("td",null,[g("div",EWn,[J(g("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=T=>o.configFile.debug_show_chunks=T),onChange:e[37]||(e[37]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_chunks]])])])]),g("tr",null,[e[499]||(e[499]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),g("td",null,[g("div",xWn,[J(g("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=T=>o.configFile.debug_log_file_path=T),onChange:e[39]||(e[39]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.debug_log_file_path]])])])]),g("tr",null,[e[500]||(e[500]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),g("td",null,[g("div",SWn,[J(g("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=T=>o.configFile.show_news_panel=T),onChange:e[41]||(e[41]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.show_news_panel]])])])]),g("tr",null,[e[501]||(e[501]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),g("td",null,[g("div",LWn,[J(g("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=T=>o.configFile.auto_save=T),onChange:e[43]||(e[43]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_save]])])])]),g("tr",null,[e[502]||(e[502]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),g("td",null,[g("div",CWn,[J(g("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=T=>o.configFile.auto_update=T),onChange:e[45]||(e[45]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_update]])])])]),g("tr",null,[e[503]||(e[503]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),g("td",null,[g("div",AWn,[J(g("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=T=>o.configFile.auto_title=T),onChange:e[47]||(e[47]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_title]])])])])])]),_:1}),oe(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",wWn,[g("tr",null,[e[505]||(e[505]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),g("td",null,[g("select",{onChange:e[48]||(e[48]=(...T)=>o.handleTemplateSelection&&o.handleTemplateSelection(...T))},e[504]||(e[504]=[g("option",{value:"lollms"},"Lollms communication template",-1),g("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),g("option",{value:"bare"},"Bare, useful when in chat mode",-1),g("option",{value:"llama3"},"LLama3 communication template",-1),g("option",{value:"mistral"},"Mistral communication template",-1),g("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)])]),g("tr",null,[e[506]||(e[506]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=T=>o.configFile.start_header_id_template=T),onChange:e[50]||(e[50]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_header_id_template]])])]),g("tr",null,[e[507]||(e[507]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=T=>o.configFile.end_header_id_template=T),onChange:e[52]||(e[52]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_header_id_template]])])]),g("tr",null,[e[508]||(e[508]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=T=>o.configFile.start_user_header_id_template=T),onChange:e[54]||(e[54]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_user_header_id_template]])])]),g("tr",null,[e[509]||(e[509]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=T=>o.configFile.end_user_header_id_template=T),onChange:e[56]||(e[56]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_user_header_id_template]])])]),g("tr",null,[e[510]||(e[510]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=T=>o.configFile.end_user_message_id_template=T),onChange:e[58]||(e[58]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_user_message_id_template]])])]),g("tr",null,[e[511]||(e[511]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=T=>o.configFile.start_ai_header_id_template=T),onChange:e[60]||(e[60]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_ai_header_id_template]])])]),g("tr",null,[e[512]||(e[512]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=T=>o.configFile.end_ai_header_id_template=T),onChange:e[62]||(e[62]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_ai_header_id_template]])])]),g("tr",null,[e[513]||(e[513]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=T=>o.configFile.end_ai_message_id_template=T),onChange:e[64]||(e[64]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_ai_message_id_template]])])]),g("tr",null,[e[514]||(e[514]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),g("td",null,[J(g("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=T=>o.configFile.separator_template=T),onChange:e[66]||(e[66]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.separator_template]])])]),g("tr",null,[e[515]||(e[515]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=T=>o.configFile.system_message_template=T),onChange:e[68]||(e[68]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.system_message_template]])])]),g("tr",null,[e[516]||(e[516]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),g("td",null,[g("div",{innerHTML:o.full_template},null,8,MWn)])]),g("tr",null,[e[517]||(e[517]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),g("td",OWn,[J(g("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=T=>o.configFile.use_continue_message=T),onChange:e[70]||(e[70]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_continue_message]])])])])]),_:1}),oe(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",RWn,[g("tr",null,[e[518]||(e[518]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),g("td",NWn,[J(g("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=T=>o.configFile.user_name=T),onChange:e[72]||(e[72]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.user_name]])])]),g("tr",null,[e[519]||(e[519]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),g("td",DWn,[J(g("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=T=>o.configFile.user_description=T),onChange:e[74]||(e[74]=T=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.user_description]])])]),g("tr",null,[e[520]||(e[520]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),g("td",IWn,[J(g("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[76]||(e[76]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_user_informations_in_discussion]])])]),g("tr",null,[e[521]||(e[521]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),g("td",kWn,[J(g("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[78]||(e[78]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_model_name_in_discussions]])])]),g("tr",null,[e[523]||(e[523]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),g("td",null,[g("label",PWn,[g("img",{src:o.configFile.user_avatar!=null&&o.configFile.user_avatar!=""?"/user_infos/"+o.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,HWn)]),g("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32)]),g("td",VWn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=he(T=>o.resetAvatar(),["stop"]))},e[522]||(e[522]=[g("i",{"data-feather":"x"},null,-1)]))])]),g("tr",null,[e[524]||(e[524]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),g("td",null,[g("div",FWn,[J(g("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[82]||(e[82]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_user_name_in_discussions]])])])]),g("tr",null,[e[525]||(e[525]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),g("td",BWn,[J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=T=>o.configFile.max_n_predict=T),onChange:e[84]||(e[84]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.max_n_predict]])])]),g("tr",null,[e[526]||(e[526]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),g("td",$Wn,[J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=T=>o.configFile.max_n_predict=T),onChange:e[86]||(e[86]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.max_n_predict]])])])])]),_:1}),oe(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",UWn,[g("tr",null,[e[527]||(e[527]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),g("td",GWn,[J(g("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=T=>o.configFile.turn_on_code_execution=T),onChange:e[88]||(e[88]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_code_execution]])])]),g("tr",null,[e[528]||(e[528]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),g("td",qWn,[J(g("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=T=>o.configFile.turn_on_code_validation=T),onChange:e[90]||(e[90]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_code_validation]])])]),g("tr",null,[e[529]||(e[529]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),g("td",zWn,[J(g("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=T=>o.configFile.turn_on_setting_update_validation=T),onChange:e[92]||(e[92]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_setting_update_validation]])])]),g("tr",null,[e[530]||(e[530]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),g("td",jWn,[J(g("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=T=>o.configFile.turn_on_open_file_validation=T),onChange:e[94]||(e[94]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_open_file_validation]])])]),g("tr",null,[e[531]||(e[531]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),g("td",WWn,[J(g("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=T=>o.configFile.turn_on_send_file_validation=T),onChange:e[96]||(e[96]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_send_file_validation]])])])])]),_:1}),oe(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",YWn,[g("tr",null,[e[532]||(e[532]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),g("td",null,[g("div",KWn,[J(g("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=T=>o.configFile.activate_skills_lib=T),onChange:e[98]||(e[98]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_skills_lib]])])])]),g("tr",null,[e[533]||(e[533]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),g("td",ZWn,[J(g("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=T=>o.configFile.skills_lib_database_name=T),onChange:e[100]||(e[100]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.skills_lib_database_name]])])])])]),_:1}),oe(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",XWn,[g("tr",null,[e[534]||(e[534]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),g("td",null,[g("div",JWn,[J(g("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=T=>o.configFile.pdf_latex_path=T),onChange:e[102]||(e[102]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.pdf_latex_path]])])])])])]),_:1}),oe(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",eYn,[g("tr",null,[e[535]||(e[535]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),g("td",null,[g("div",tYn,[J(g("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=T=>o.configFile.positive_boost=T),onChange:e[104]||(e[104]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.positive_boost]])])])]),g("tr",null,[e[536]||(e[536]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),g("td",null,[g("div",nYn,[J(g("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=T=>o.configFile.negative_boost=T),onChange:e[106]||(e[106]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.negative_boost]])])])]),g("tr",null,[e[537]||(e[537]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),g("td",null,[g("div",rYn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=T=>o.configFile.fun_mode=T),onChange:e[108]||(e[108]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.fun_mode]])])])])])]),_:1})])],2)]),g("div",iYn,[g("div",oYn,[g("button",{onClick:e[109]||(e[109]=he(T=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[538]||(e[538]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.data_conf_collapsed]]),J(g("div",null,e[539]||(e[539]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.data_conf_collapsed]]),e[540]||(e[540]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),g("div",{class:We([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Remote Dabase Servers",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",sYn,[g("tr",null,[e[544]||(e[544]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"remote_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Remote Database Servers:")],-1)),g("td",aYn,[(k(!0),P(ze,null,at(o.configFile.remote_databases,(T,Q)=>(k(),P("div",{key:Q,class:"flex items-center mb-2"},[g("input",{type:"text",value:o.getAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"w-40 mx-2 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",placeholder:"Database Alias"},null,40,lYn),g("select",{required:"",value:o.getDatabaseType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"w-40 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[541]||(e[541]=[g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,cYn),g("input",{type:"text",value:o.getDatabaseUrl(Q),onInput:_=>o.updateDatabaseUrl(Q,_.target.value),class:"w-full mx-2 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",placeholder:"Database URL"},null,40,uYn),g("input",{type:"checkbox",checked:o.getMounted(Q),onChange:_=>o.updateMounted(Q,_.target.checked),class:"mx-2"},null,40,dYn),e[543]||(e[543]=g("label",{class:"mr-2"},"Mounted",-1)),g("button",{onClick:_=>o.removeDataBase(Q),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-red-300 rounded flex items-center",title:"Remove this data source"},e[542]||(e[542]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,fYn)]))),128)),g("button",{onClick:e[110]||(e[110]=(...T)=>o.addDatabaseService&&o.addDatabaseService(...T)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Database Service")])])])]),_:1}),oe(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",pYn,[g("tr",null,[e[549]||(e[549]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),g("td",hYn,[(k(!0),P(ze,null,at(o.configFile.rag_databases,(T,Q)=>(k(),P("div",{key:Q,class:"flex items-center mb-2"},[g("input",{type:"text",value:T.split("::")[0],onInput:_=>o.updateRagDatabase(Q,_.target.value,"name"),class:"w-1/3 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 mr-2",placeholder:"Database Name"},null,40,TYn),g("input",{type:"text",value:T.split("::")[1],onInput:_=>o.updateRagDatabase(Q,_.target.value,"path"),class:"w-1/3 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 mr-2",placeholder:"Database Path"},null,40,mYn),g("div",gYn,[g("input",{type:"checkbox",checked:T.split("::")[2]==="mounted",onChange:_=>o.updateRagDatabase(Q,_.target.checked,"mounted"),class:"mr-1"},null,40,_Yn),e[545]||(e[545]=g("span",{class:"text-sm"},"Mounted",-1))]),g("button",{onClick:_=>o.vectorize_folder(Q),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded flex items-center",title:"Vectorize or re-vectorize the selected folder"},e[546]||(e[546]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,QYn),g("button",{onClick:_=>o.select_folder(Q),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-blue-300 rounded flex items-center",title:"Select a folder as data source"},e[547]||(e[547]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1)]),8,vYn),g("button",{onClick:_=>o.removeDataSource(Q),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-red-300 rounded flex items-center",title:"Remove this data source"},e[548]||(e[548]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,yYn)]))),128)),g("button",{onClick:e[111]||(e[111]=(...T)=>o.addDataSource&&o.addDataSource(...T)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),g("tr",null,[e[551]||(e[551]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),g("td",null,[J(g("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=T=>o.configFile.rag_vectorizer=T),onChange:e[113]||(e[113]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[550]||(e[550]=[g("option",{value:"semantic"},"Semantic Vectorizer",-1),g("option",{value:"tfidf"},"TFIDF Vectorizer",-1),g("option",{value:"openai"},"OpenAI Vectorizer",-1),g("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[dn,o.configFile.rag_vectorizer]])])]),g("tr",null,[e[552]||(e[552]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_execute_remote_code",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Allow executing remote code:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[114]||(e[114]=T=>o.configFile.rag_vectorizer_execute_remote_code=T),type:"checkbox",onChange:e[115]||(e[115]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_vectorizer_execute_remote_code]])])]),g("tr",null,[e[553]||(e[553]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),g("td",null,[J(g("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[116]||(e[116]=T=>o.configFile.rag_vectorizer_model=T),onChange:e[117]||(e[117]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:o.configFile.rag_vectorizer==="tfidf"},[o.configFile.rag_vectorizer==="semantic"?(k(),P("option",EYn,"BAAI/bge-m3")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",xYn,"nvidia/NV-Embed-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",SYn,"sentence-transformers/all-MiniLM-L6-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",LYn,"sentence-transformers/all-MiniLM-L12-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",CYn,"sentence-transformers/all-distilroberta-v1")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",AYn,"sentence-transformers/all-mpnet-base-v2")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",wYn,"text-embedding-ada-002")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",MYn,"text-embedding-babbage-001")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",OYn,"text-embedding-curie-001")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",RYn,"text-embedding-davinci-001")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",NYn,"bge-m3")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",DYn,"nvidia/NV-Embed-v2")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",IYn,"nomic-embed-text")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",kYn,"mxbai-embed-large")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",PYn,"mxbai-embed-large")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",HYn,"snowflake-arctic-embed")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",VYn,"snowflake-arctic-embed")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",FYn,"all-minilm")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",BYn,"bge-large")):ne("",!0),o.configFile.rag_vectorizer==="tfidf"?(k(),P("option",$Yn,"No models available for TFIDF")):ne("",!0)],40,bYn),[[dn,o.configFile.rag_vectorizer_model]]),J(g("input",{"onUpdate:modelValue":e[118]||(e[118]=T=>o.configFile.rag_vectorizer_model=T),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[we,o.configFile.rag_vectorizer_model]])])]),g("tr",null,[e[554]||(e[554]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_service_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Rag service url:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[119]||(e[119]=T=>o.configFile.rag_service_url=T),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[we,o.configFile.rag_service_url]])])]),g("tr",null,[e[555]||(e[555]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),g("td",null,[g("div",UYn,[J(g("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[120]||(e[120]=T=>o.configFile.rag_vectorizer_openai_key=T),onChange:e[121]||(e[121]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_vectorizer_openai_key]])])])]),g("tr",null,[e[556]||(e[556]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),g("td",null,[J(g("input",{id:"rag_chunk_size","onUpdate:modelValue":e[122]||(e[122]=T=>o.configFile.rag_chunk_size=T),onChange:e[123]||(e[123]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[124]||(e[124]=T=>o.configFile.rag_chunk_size=T),type:"number",onChange:e[125]||(e[125]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_chunk_size]])])]),g("tr",null,[e[557]||(e[557]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),g("td",null,[J(g("input",{id:"rag_overlap","onUpdate:modelValue":e[126]||(e[126]=T=>o.configFile.rag_overlap=T),onChange:e[127]||(e[127]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_overlap]]),J(g("input",{"onUpdate:modelValue":e[128]||(e[128]=T=>o.configFile.rag_overlap=T),type:"number",onChange:e[129]||(e[129]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_overlap]])])]),g("tr",null,[e[558]||(e[558]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),g("td",null,[J(g("input",{id:"rag_n_chunks","onUpdate:modelValue":e[130]||(e[130]=T=>o.configFile.rag_n_chunks=T),onChange:e[131]||(e[131]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_n_chunks]]),J(g("input",{"onUpdate:modelValue":e[132]||(e[132]=T=>o.configFile.rag_n_chunks=T),type:"number",onChange:e[133]||(e[133]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_n_chunks]])])]),g("tr",null,[e[559]||(e[559]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[134]||(e[134]=T=>o.configFile.rag_clean_chunks=T),type:"checkbox",onChange:e[135]||(e[135]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_clean_chunks]])])]),g("tr",null,[e[560]||(e[560]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[136]||(e[136]=T=>o.configFile.rag_follow_subfolders=T),type:"checkbox",onChange:e[137]||(e[137]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_follow_subfolders]])])]),g("tr",null,[e[561]||(e[561]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[138]||(e[138]=T=>o.configFile.rag_check_new_files_at_startup=T),type:"checkbox",onChange:e[139]||(e[139]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_check_new_files_at_startup]])])]),g("tr",null,[e[562]||(e[562]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[140]||(e[140]=T=>o.configFile.rag_preprocess_chunks=T),type:"checkbox",onChange:e[141]||(e[141]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_preprocess_chunks]])])]),g("tr",null,[e[563]||(e[563]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[142]||(e[142]=T=>o.configFile.rag_activate_multi_hops=T),type:"checkbox",onChange:e[143]||(e[143]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_activate_multi_hops]])])]),g("tr",null,[e[564]||(e[564]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[144]||(e[144]=T=>o.configFile.contextual_summary=T),type:"checkbox",onChange:e[145]||(e[145]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.contextual_summary]])])]),g("tr",null,[e[565]||(e[565]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[146]||(e[146]=T=>o.configFile.rag_deactivate=T),type:"checkbox",onChange:e[147]||(e[147]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_deactivate]])])])])]),_:1}),oe(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",GYn,[g("tr",null,[e[566]||(e[566]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),g("td",null,[g("div",qYn,[J(g("input",{type:"checkbox",id:"rag_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=T=>o.configFile.rag_build_keys_words=T),onChange:e[149]||(e[149]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_build_keys_words]])])])]),g("tr",null,[e[567]||(e[567]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),g("td",null,[g("div",zYn,[J(g("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[150]||(e[150]=T=>o.configFile.rag_put_chunk_informations_into_context=T),onChange:e[151]||(e[151]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_put_chunk_informations_into_context]])])])]),g("tr",null,[e[568]||(e[568]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),g("td",null,[g("div",jYn,[J(g("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[152]||(e[152]=T=>o.configFile.data_vectorization_save_db=T),onChange:e[153]||(e[153]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.data_vectorization_save_db]])])])])])]),_:1})],2)]),g("div",WYn,[g("div",YYn,[g("button",{onClick:e[154]||(e[154]=he(T=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[569]||(e[569]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.internet_conf_collapsed]]),J(g("div",null,e[570]||(e[570]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.internet_conf_collapsed]]),e[571]||(e[571]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),g("div",{class:We([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",KYn,[g("tr",null,[e[572]||(e[572]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate automatic internet search (for every prompt):")],-1)),g("td",null,[g("div",ZYn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[155]||(e[155]=T=>o.configFile.activate_internet_search=T),onChange:e[156]||(e[156]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_internet_search]])])])]),g("tr",null,[e[573]||(e[573]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),g("td",null,[g("div",XYn,[J(g("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[157]||(e[157]=T=>o.configFile.activate_internet_pages_judgement=T),onChange:e[158]||(e[158]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_internet_pages_judgement]])])])]),g("tr",null,[e[574]||(e[574]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),g("td",null,[g("div",JYn,[J(g("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[159]||(e[159]=T=>o.configFile.internet_quick_search=T),onChange:e[160]||(e[160]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.internet_quick_search]])])])]),g("tr",null,[e[575]||(e[575]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),g("td",null,[g("div",eKn,[J(g("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[161]||(e[161]=T=>o.configFile.internet_activate_search_decision=T),onChange:e[162]||(e[162]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.internet_activate_search_decision]])])])]),g("tr",null,[e[576]||(e[576]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),g("td",null,[g("div",tKn,[J(g("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[163]||(e[163]=T=>o.configFile.internet_vectorization_chunk_size=T),onChange:e[164]||(e[164]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[165]||(e[165]=T=>o.configFile.internet_vectorization_chunk_size=T),type:"number",onChange:e[166]||(e[166]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]])])])]),g("tr",null,[e[577]||(e[577]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),g("td",null,[g("div",nKn,[J(g("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[167]||(e[167]=T=>o.configFile.internet_vectorization_overlap_size=T),onChange:e[168]||(e[168]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]]),J(g("input",{"onUpdate:modelValue":e[169]||(e[169]=T=>o.configFile.internet_vectorization_overlap_size=T),type:"number",onChange:e[170]||(e[170]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]])])])]),g("tr",null,[e[578]||(e[578]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),g("td",null,[g("div",rKn,[J(g("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[171]||(e[171]=T=>o.configFile.internet_vectorization_nb_chunks=T),onChange:e[172]||(e[172]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]]),J(g("input",{"onUpdate:modelValue":e[173]||(e[173]=T=>o.configFile.internet_vectorization_nb_chunks=T),type:"number",onChange:e[174]||(e[174]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]])])])]),g("tr",null,[e[579]||(e[579]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),g("td",null,[g("div",iKn,[J(g("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[175]||(e[175]=T=>o.configFile.internet_nb_search_pages=T),onChange:e[176]||(e[176]=T=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_nb_search_pages]]),J(g("input",{"onUpdate:modelValue":e[177]||(e[177]=T=>o.configFile.internet_nb_search_pages=T),type:"number",onChange:e[178]||(e[178]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),g("div",oKn,[g("div",sKn,[g("button",{onClick:e[179]||(e[179]=he(T=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[580]||(e[580]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.servers_conf_collapsed]]),J(g("div",null,e[581]||(e[581]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.servers_conf_collapsed]]),e[582]||(e[582]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),g("div",{class:We([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",aKn,[g("tr",null,[e[584]||(e[584]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),g("td",lKn,[J(g("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[180]||(e[180]=T=>o.configFile.active_tts_service=T),onChange:e[181]||(e[181]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[583]||(e[583]=[g("option",{value:"None"},"None",-1),g("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),g("option",{value:"xtts"},"XTTS",-1),g("option",{value:"parler-tts"},"Parler-TTS",-1),g("option",{value:"openai_tts"},"Open AI TTS",-1),g("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),g("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[dn,o.configFile.active_tts_service]])])]),g("tr",null,[e[586]||(e[586]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),g("td",cKn,[J(g("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[182]||(e[182]=T=>o.configFile.active_stt_service=T),onChange:e[183]||(e[183]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[585]||(e[585]=[g("option",{value:"None"},"None",-1),g("option",{value:"whisper"},"Whisper",-1),g("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[dn,o.configFile.active_stt_service]])])]),e[593]||(e[593]=g("tr",null,null,-1)),g("tr",null,[e[588]||(e[588]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),g("td",uKn,[J(g("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[184]||(e[184]=T=>o.configFile.active_tti_service=T),onChange:e[185]||(e[185]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[587]||(e[587]=[g("option",{value:"None"},"None",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"diffusers_client"},"Diffusers Client",-1),g("option",{value:"autosd"},"AUTO1111's SD",-1),g("option",{value:"dall-e"},"Open AI DALL-E",-1),g("option",{value:"midjourney"},"Midjourney",-1),g("option",{value:"comfyui"},"Comfyui",-1),g("option",{value:"fooocus"},"Fooocus",-1)]),544),[[dn,o.configFile.active_tti_service]])])]),g("tr",null,[e[590]||(e[590]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),g("td",dKn,[J(g("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[186]||(e[186]=T=>o.configFile.active_ttm_service=T),onChange:e[187]||(e[187]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[589]||(e[589]=[g("option",{value:"None"},"None",-1),g("option",{value:"musicgen"},"Music Gen",-1)]),544),[[dn,o.configFile.active_ttm_service]])])]),g("tr",null,[e[592]||(e[592]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),g("td",fKn,[J(g("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[188]||(e[188]=T=>o.configFile.active_ttv_service=T),onChange:e[189]||(e[189]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[591]||(e[591]=[g("option",{value:"None"},"None",-1),g("option",{value:"cog_video_x"},"Cog Video X",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"lumalab"},"Lumalab",-1)]),544),[[dn,o.configFile.active_ttv_service]])])])])]),_:1}),oe(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",pKn,[g("tr",null,[e[594]||(e[594]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),g("td",null,[g("div",hKn,[J(g("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[190]||(e[190]=T=>o.configFile.use_negative_prompt=T),onChange:e[191]||(e[191]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_negative_prompt]])])])]),g("tr",null,[e[595]||(e[595]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),g("td",null,[g("div",TKn,[J(g("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[192]||(e[192]=T=>o.configFile.use_ai_generated_negative_prompt=T),onChange:e[193]||(e[193]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_ai_generated_negative_prompt]])])])]),g("tr",null,[e[596]||(e[596]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),g("td",null,[g("div",mKn,[J(g("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[194]||(e[194]=T=>o.configFile.negative_prompt_generation_prompt=T),onChange:e[195]||(e[195]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.negative_prompt_generation_prompt]])])])]),g("tr",null,[e[597]||(e[597]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),g("td",null,[g("div",gKn,[J(g("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[196]||(e[196]=T=>o.configFile.default_negative_prompt=T),onChange:e[197]||(e[197]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.default_negative_prompt]])])])])])]),_:1}),oe(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",_Kn,[g("tr",null,[e[598]||(e[598]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),g("td",QKn,[J(g("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[198]||(e[198]=T=>o.configFile.stt_listening_threshold=T),onChange:e[199]||(e[199]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_listening_threshold]])])]),g("tr",null,[e[599]||(e[599]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),g("td",vKn,[J(g("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[200]||(e[200]=T=>o.configFile.stt_silence_duration=T),onChange:e[201]||(e[201]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_silence_duration]])])]),g("tr",null,[e[600]||(e[600]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),g("td",yKn,[J(g("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[202]||(e[202]=T=>o.configFile.stt_sound_threshold_percentage=T),onChange:e[203]||(e[203]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_sound_threshold_percentage]])])]),g("tr",null,[e[601]||(e[601]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),g("td",bKn,[J(g("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[204]||(e[204]=T=>o.configFile.stt_gain=T),onChange:e[205]||(e[205]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_gain]])])]),g("tr",null,[e[602]||(e[602]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),g("td",EKn,[J(g("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[206]||(e[206]=T=>o.configFile.stt_rate=T),onChange:e[207]||(e[207]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_rate]])])]),g("tr",null,[e[603]||(e[603]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),g("td",xKn,[J(g("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[208]||(e[208]=T=>o.configFile.stt_channels=T),onChange:e[209]||(e[209]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_channels]])])]),g("tr",null,[e[604]||(e[604]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),g("td",SKn,[J(g("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[210]||(e[210]=T=>o.configFile.stt_buffer_size=T),onChange:e[211]||(e[211]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_buffer_size]])])]),g("tr",null,[e[605]||(e[605]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),g("td",null,[g("div",LKn,[J(g("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[212]||(e[212]=T=>o.configFile.stt_activate_word_detection=T),onChange:e[213]||(e[213]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.stt_activate_word_detection]])])])]),g("tr",null,[e[606]||(e[606]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),g("td",null,[g("div",CKn,[J(g("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[214]||(e[214]=T=>o.configFile.stt_word_detection_file=T),onChange:e[215]||(e[215]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.stt_word_detection_file]])])])])])]),_:1}),oe(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",AKn,[g("tr",null,[e[607]||(e[607]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),g("td",wKn,[J(g("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[216]||(e[216]=T=>o.configFile.stt_input_device=T),onChange:e[217]||(e[217]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.snd_input_devices,(T,Q)=>(k(),P("option",{key:T,value:i.snd_input_devices_indexes[Q]},le(T),9,MKn))),128))],544),[[dn,o.configFile.stt_input_device]])])]),g("tr",null,[e[608]||(e[608]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),g("td",OKn,[J(g("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[218]||(e[218]=T=>o.configFile.tts_output_device=T),onChange:e[219]||(e[219]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.snd_output_devices,(T,Q)=>(k(),P("option",{key:T,value:i.snd_output_devices_indexes[Q]},le(T),9,RKn))),128))],544),[[dn,o.configFile.tts_output_device]])])])])]),_:1}),oe(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",NKn,[g("tr",null,[e[609]||(e[609]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),g("td",DKn,[J(g("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[220]||(e[220]=T=>o.configFile.host=T),onChange:e[221]||(e[221]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.host]])])]),g("tr",null,[e[610]||(e[610]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),g("td",IKn,[oe(l,{modelValue:o.configFile.lollms_access_keys,"onUpdate:modelValue":e[222]||(e[222]=T=>o.configFile.lollms_access_keys=T),onChange:e[223]||(e[223]=T=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),g("tr",null,[e[611]||(e[611]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),g("td",kKn,[J(g("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[224]||(e[224]=T=>o.configFile.port=T),onChange:e[225]||(e[225]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.port]])])]),g("tr",null,[e[612]||(e[612]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),g("td",PKn,[J(g("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[226]||(e[226]=T=>o.configFile.headless_server_mode=T),onChange:e[227]||(e[227]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.headless_server_mode]])])]),g("tr",null,[e[613]||(e[613]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),g("td",HKn,[J(g("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[228]||(e[228]=T=>o.configFile.activate_lollms_server=T),onChange:e[229]||(e[229]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_server]])])]),g("tr",null,[e[614]||(e[614]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),g("td",VKn,[J(g("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[230]||(e[230]=T=>o.configFile.activate_lollms_rag_server=T),onChange:e[231]||(e[231]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_rag_server]])])]),g("tr",null,[e[615]||(e[615]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),g("td",FKn,[J(g("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[232]||(e[232]=T=>o.configFile.activate_lollms_tts_server=T),onChange:e[233]||(e[233]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_tts_server]])])]),g("tr",null,[e[616]||(e[616]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),g("td",BKn,[J(g("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[234]||(e[234]=T=>o.configFile.activate_lollms_stt_server=T),onChange:e[235]||(e[235]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_stt_server]])])]),g("tr",null,[e[617]||(e[617]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),g("td",$Kn,[J(g("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[236]||(e[236]=T=>o.configFile.activate_lollms_tti_server=T),onChange:e[237]||(e[237]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_tti_server]])])]),g("tr",null,[e[618]||(e[618]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),g("td",UKn,[J(g("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[238]||(e[238]=T=>o.configFile.activate_lollms_itt_server=T),onChange:e[239]||(e[239]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_itt_server]])])]),g("tr",null,[e[619]||(e[619]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),g("td",GKn,[J(g("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[240]||(e[240]=T=>o.configFile.activate_lollms_ttm_server=T),onChange:e[241]||(e[241]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_ttm_server]])])]),g("tr",null,[e[620]||(e[620]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),g("td",qKn,[J(g("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[242]||(e[242]=T=>o.configFile.activate_ollama_emulator=T),onChange:e[243]||(e[243]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_ollama_emulator]])])]),g("tr",null,[e[621]||(e[621]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),g("td",zKn,[J(g("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[244]||(e[244]=T=>o.configFile.activate_openai_emulator=T),onChange:e[245]||(e[245]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_openai_emulator]])])]),g("tr",null,[e[622]||(e[622]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),g("td",jKn,[J(g("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[246]||(e[246]=T=>o.configFile.activate_mistralai_emulator=T),onChange:e[247]||(e[247]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_mistralai_emulator]])])])])]),_:1}),oe(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",WKn,[g("tr",null,[e[623]||(e[623]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),g("td",null,[g("div",YKn,[J(g("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[248]||(e[248]=T=>o.configFile.activate_audio_infos=T),onChange:e[249]||(e[249]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_audio_infos]])])])]),g("tr",null,[e[624]||(e[624]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),g("td",null,[g("div",KKn,[J(g("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[250]||(e[250]=T=>o.configFile.audio_auto_send_input=T),onChange:e[251]||(e[251]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.audio_auto_send_input]])])])]),g("tr",null,[e[625]||(e[625]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),g("td",null,[J(g("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[252]||(e[252]=T=>o.configFile.audio_silenceTimer=T),onChange:e[253]||(e[253]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.audio_silenceTimer]]),J(g("input",{"onUpdate:modelValue":e[254]||(e[254]=T=>o.configFile.audio_silenceTimer=T),onChange:e[255]||(e[255]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_silenceTimer]])])]),g("tr",null,[e[626]||(e[626]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),g("td",null,[J(g("select",{id:"audio_in_language","onUpdate:modelValue":e[256]||(e[256]=T=>o.configFile.audio_in_language=T),onChange:e[257]||(e[257]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.audioLanguages,T=>(k(),P("option",{key:T.code,value:T.code},le(T.name),9,ZKn))),128))],544),[[dn,o.configFile.audio_in_language]])])])])]),_:1}),oe(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",XKn,[g("tr",null,[e[627]||(e[627]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),g("td",null,[g("div",JKn,[J(g("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[258]||(e[258]=T=>o.configFile.whisper_activate=T),onChange:e[259]||(e[259]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.whisper_activate]])])])]),g("tr",null,[e[628]||(e[628]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}})],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[260]||(e[260]=(...T)=>o.reinstallWhisperService&&o.reinstallWhisperService(...T))},"install whisper")])]),g("tr",null,[e[629]||(e[629]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),g("td",null,[g("div",eZn,[J(g("select",{id:"whisper_model","onUpdate:modelValue":e[261]||(e[261]=T=>o.configFile.whisper_model=T),onChange:e[262]||(e[262]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.whisperModels,T=>(k(),P("option",{key:T,value:T},le(T),9,tZn))),128))],544),[[dn,o.configFile.whisper_model]])])])])])]),_:1}),oe(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",nZn,[g("tr",null,[e[630]||(e[630]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),g("td",null,[g("div",rZn,[J(g("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[263]||(e[263]=T=>o.configFile.openai_whisper_key=T),onChange:e[264]||(e[264]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_whisper_key]])])])]),g("tr",null,[e[631]||(e[631]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),g("td",null,[g("div",iZn,[J(g("select",{id:"openai_whisper_model","onUpdate:modelValue":e[265]||(e[265]=T=>o.configFile.openai_whisper_model=T),onChange:e[266]||(e[266]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.openaiWhisperModels,T=>(k(),P("option",{key:T,value:T},le(T),9,oZn))),128))],544),[[dn,o.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",sZn,[g("tr",null,[e[632]||(e[632]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),g("td",null,[g("div",aZn,[J(g("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[267]||(e[267]=T=>o.configFile.auto_speak=T),onChange:e[268]||(e[268]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_speak]])])])]),g("tr",null,[e[633]||(e[633]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),g("td",null,[J(g("input",{id:"audio_pitch","onUpdate:modelValue":e[269]||(e[269]=T=>o.configFile.audio_pitch=T),onChange:e[270]||(e[270]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.audio_pitch]]),J(g("input",{"onUpdate:modelValue":e[271]||(e[271]=T=>o.configFile.audio_pitch=T),onChange:e[272]||(e[272]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_pitch]])])]),g("tr",null,[e[634]||(e[634]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),g("td",null,[J(g("select",{id:"audio_out_voice","onUpdate:modelValue":e[273]||(e[273]=T=>o.configFile.audio_out_voice=T),onChange:e[274]||(e[274]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.audioVoices,T=>(k(),P("option",{key:T.name,value:T.name},le(T.name),9,lZn))),128))],544),[[dn,o.configFile.audio_out_voice]])])])])]),_:1}),oe(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",cZn,[g("tr",null,[e[635]||(e[635]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[275]||(e[275]=(...T)=>o.reinstallXTTSService&&o.reinstallXTTSService(...T))},"install xtts service")])]),g("tr",null,[e[636]||(e[636]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("div",uZn,[J(g("select",{"onUpdate:modelValue":e[276]||(e[276]=T=>o.xtts_current_language=T),onChange:e[277]||(e[277]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voice_languages,(T,Q)=>(k(),P("option",{key:Q,value:T},le(Q),9,dZn))),128))],544),[[dn,o.xtts_current_language]])])])]),g("tr",null,[e[637]||(e[637]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),g("td",null,[g("div",fZn,[J(g("select",{"onUpdate:modelValue":e[278]||(e[278]=T=>o.xtts_current_voice=T),onChange:e[279]||(e[279]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voices,T=>(k(),P("option",{key:T,value:T},le(T),9,pZn))),128))],544),[[dn,o.xtts_current_voice]])])])]),g("tr",null,[e[638]||(e[638]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),g("td",null,[g("div",hZn,[J(g("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[280]||(e[280]=T=>o.configFile.xtts_freq=T),onChange:e[281]||(e[281]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_freq,void 0,{number:!0}]])])])]),g("tr",null,[e[639]||(e[639]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),g("td",null,[g("div",TZn,[J(g("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[282]||(e[282]=T=>o.configFile.auto_read=T),onChange:e[283]||(e[283]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_read]])])])]),g("tr",null,[e[640]||(e[640]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),g("td",null,[g("div",mZn,[J(g("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[284]||(e[284]=T=>o.configFile.xtts_stream_chunk_size=T),onChange:e[285]||(e[285]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_stream_chunk_size]])])])]),g("tr",null,[e[641]||(e[641]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),g("td",null,[g("div",gZn,[J(g("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[286]||(e[286]=T=>o.configFile.xtts_temperature=T),onChange:e[287]||(e[287]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_temperature,void 0,{number:!0}]])])])]),g("tr",null,[e[642]||(e[642]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),g("td",null,[g("div",_Zn,[J(g("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[288]||(e[288]=T=>o.configFile.xtts_length_penalty=T),onChange:e[289]||(e[289]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[643]||(e[643]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),g("td",null,[g("div",QZn,[J(g("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[290]||(e[290]=T=>o.configFile.xtts_repetition_penalty=T),onChange:e[291]||(e[291]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[644]||(e[644]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),g("td",null,[g("div",vZn,[J(g("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[292]||(e[292]=T=>o.configFile.xtts_top_k=T),onChange:e[293]||(e[293]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_k,void 0,{number:!0}]])])])]),g("tr",null,[e[645]||(e[645]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),g("td",null,[g("div",yZn,[J(g("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[294]||(e[294]=T=>o.configFile.xtts_top_p=T),onChange:e[295]||(e[295]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_p,void 0,{number:!0}]])])])]),g("tr",null,[e[646]||(e[646]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),g("td",null,[g("div",bZn,[J(g("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[296]||(e[296]=T=>o.configFile.xtts_speed=T),onChange:e[297]||(e[297]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_speed,void 0,{number:!0}]])])])]),g("tr",null,[e[647]||(e[647]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),g("td",null,[g("div",EZn,[J(g("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[298]||(e[298]=T=>o.configFile.enable_text_splitting=T),onChange:e[299]||(e[299]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_text_splitting]])])])])])]),_:1}),oe(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",xZn,[g("tr",null,[e[648]||(e[648]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),g("td",null,[g("div",SZn,[J(g("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[300]||(e[300]=T=>o.configFile.openai_tts_key=T),onChange:e[301]||(e[301]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_tts_key]])])])]),g("tr",null,[e[650]||(e[650]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),g("td",null,[g("div",LZn,[J(g("select",{"onUpdate:modelValue":e[302]||(e[302]=T=>o.configFile.openai_tts_model=T),onChange:e[303]||(e[303]=T=>i.settingsChanged=!0)},e[649]||(e[649]=[g("option",null," tts-1 ",-1),g("option",null," tts-2 ",-1)]),544),[[dn,o.configFile.openai_tts_model]])])])]),g("tr",null,[e[652]||(e[652]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),g("td",null,[g("div",CZn,[J(g("select",{"onUpdate:modelValue":e[304]||(e[304]=T=>o.configFile.openai_tts_voice=T),onChange:e[305]||(e[305]=T=>i.settingsChanged=!0)},e[651]||(e[651]=[g("option",null," alloy ",-1),g("option",null," echo ",-1),g("option",null," fable ",-1),g("option",null," nova ",-1),g("option",null," shimmer ",-1)]),544),[[dn,o.configFile.openai_tts_voice]])])])])])]),_:1}),oe(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",AZn,[g("tr",null,[e[653]||(e[653]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),g("td",null,[g("div",wZn,[J(g("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[306]||(e[306]=T=>o.configFile.elevenlabs_tts_key=T),onChange:e[307]||(e[307]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_key]])])])]),g("tr",null,[e[654]||(e[654]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),g("td",null,[g("div",MZn,[J(g("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[308]||(e[308]=T=>o.configFile.elevenlabs_tts_model_id=T),onChange:e[309]||(e[309]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_model_id]])])])]),g("tr",null,[e[655]||(e[655]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),g("td",null,[g("div",OZn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[310]||(e[310]=T=>o.configFile.elevenlabs_tts_voice_stability=T),onChange:e[311]||(e[311]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[we,o.configFile.elevenlabs_tts_voice_stability]])])])]),g("tr",null,[e[656]||(e[656]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),g("td",null,[g("div",RZn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[312]||(e[312]=T=>o.configFile.elevenlabs_tts_voice_boost=T),onChange:e[313]||(e[313]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[we,o.configFile.elevenlabs_tts_voice_boost]])])])]),g("tr",null,[e[657]||(e[657]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),g("td",null,[g("div",NZn,[J(g("select",{"onUpdate:modelValue":e[314]||(e[314]=T=>o.configFile.elevenlabs_tts_voice_id=T),onChange:e[315]||(e[315]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voices,T=>(k(),P("option",{key:T.voice_id,value:T.voice_id},le(T.name),9,DZn))),128))],544),[[dn,o.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),oe(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",IZn,[g("tr",null,[e[658]||(e[658]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),g("td",null,[g("div",kZn,[J(g("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[316]||(e[316]=T=>o.configFile.fish_tts_key=T),onChange:e[317]||(e[317]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_key]])])])]),g("tr",null,[e[659]||(e[659]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),g("td",null,[g("div",PZn,[J(g("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[318]||(e[318]=T=>o.configFile.fish_tts_voice=T),onChange:e[319]||(e[319]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",HZn,[g("tr",null,[e[661]||(e[661]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),g("td",null,[g("div",VZn,[J(g("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[320]||(e[320]=T=>o.configFile.enable_sd_service=T),onChange:e[321]||(e[321]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_sd_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[322]||(e[322]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[660]||(e[660]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[663]||(e[663]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),g("td",null,[g("div",FZn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[323]||(e[323]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(...T)=>o.upgradeSDService&&o.upgradeSDService(...T))},"upgrade sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(...T)=>o.startSDService&&o.startSDService(...T))},"start sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[326]||(e[326]=(...T)=>o.showSD&&o.showSD(...T))},"show sd ui"),e[662]||(e[662]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1))])]),g("td",null,[g("div",BZn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[327]||(e[327]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service")])])]),g("tr",null,[e[664]||(e[664]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),g("td",null,[g("div",$Zn,[J(g("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[328]||(e[328]=T=>o.configFile.sd_base_url=T),onChange:e[329]||(e[329]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.sd_base_url]])])])])])]),_:1}),oe(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",UZn,[g("tr",null,[e[666]||(e[666]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),g("td",null,[g("div",GZn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[330]||(e[330]=(...T)=>o.reinstallDiffusersService&&o.reinstallDiffusersService(...T))},"install diffusers service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(...T)=>o.upgradeDiffusersService&&o.upgradeDiffusersService(...T))},"upgrade diffusers service"),e[665]||(e[665]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1))])])]),g("tr",null,[e[667]||(e[667]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),g("td",null,[g("div",qZn,[J(g("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[332]||(e[332]=T=>o.configFile.diffusers_model=T),onChange:e[333]||(e[333]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_model]])])]),e[668]||(e[668]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",zZn,[g("tr",null,[e[669]||(e[669]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),g("td",null,[g("div",jZn,[J(g("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[334]||(e[334]=T=>o.configFile.diffusers_client_base_url=T),onChange:e[335]||(e[335]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_client_base_url]])])]),e[670]||(e[670]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",WZn,[g("tr",null,[e[671]||(e[671]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),g("td",null,[g("div",YZn,[J(g("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[336]||(e[336]=T=>o.configFile.midjourney_key=T),onChange:e[337]||(e[337]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_key]])])])]),g("tr",null,[e[672]||(e[672]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),g("td",null,[g("div",KZn,[J(g("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[338]||(e[338]=T=>o.configFile.midjourney_timeout=T),onChange:e[339]||(e[339]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_timeout]])])])]),g("tr",null,[e[673]||(e[673]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),g("td",null,[g("div",ZZn,[J(g("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[340]||(e[340]=T=>o.configFile.midjourney_retries=T),onChange:e[341]||(e[341]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_retries]])])])])])]),_:1}),oe(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",XZn,[g("tr",null,[e[674]||(e[674]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),g("td",null,[g("div",JZn,[J(g("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[342]||(e[342]=T=>o.configFile.dall_e_key=T),onChange:e[343]||(e[343]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.dall_e_key]])])])]),g("tr",null,[e[676]||(e[676]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),g("td",null,[g("div",eXn,[J(g("select",{"onUpdate:modelValue":e[344]||(e[344]=T=>o.configFile.dall_e_generation_engine=T),onChange:e[345]||(e[345]=T=>i.settingsChanged=!0)},e[675]||(e[675]=[g("option",null," dall-e-2 ",-1),g("option",null," dall-e-3 ",-1)]),544),[[dn,o.configFile.dall_e_generation_engine]])])])])])]),_:1}),oe(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",tXn,[g("tr",null,[e[678]||(e[678]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),g("td",null,[g("div",nXn,[J(g("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[346]||(e[346]=T=>o.configFile.enable_comfyui_service=T),onChange:e[347]||(e[347]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_comfyui_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[348]||(e[348]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[677]||(e[677]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[679]||(e[679]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),g("td",null,[g("div",rXn,[J(g("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[349]||(e[349]=T=>o.configFile.comfyui_model=T),onChange:e[350]||(e[350]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.comfyui_models,(T,Q)=>(k(),P("option",{key:T,value:T},le(T),9,iXn))),128))],544),[[dn,o.configFile.comfyui_model]])])])]),g("tr",null,[e[681]||(e[681]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),g("td",null,[g("div",oXn,[J(g("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[351]||(e[351]=T=>o.configFile.comfyui_model=T),onChange:e[352]||(e[352]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_model]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[680]||(e[680]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[683]||(e[683]=g("td",{style:{"min-width":"200px"}},null,-1)),g("td",null,[g("div",sXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(...T)=>o.reinstallComfyUIService&&o.reinstallComfyUIService(...T))},"install comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[355]||(e[355]=(...T)=>o.upgradeComfyUIService&&o.upgradeComfyUIService(...T))},"upgrade comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[356]||(e[356]=(...T)=>o.startComfyUIService&&o.startComfyUIService(...T))},"start comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[357]||(e[357]=(...T)=>o.showComfyui&&o.showComfyui(...T))},"show comfyui"),e[682]||(e[682]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1))])])]),g("tr",null,[e[684]||(e[684]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),g("td",null,[g("div",aXn,[J(g("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[358]||(e[358]=T=>o.configFile.comfyui_base_url=T),onChange:e[359]||(e[359]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",lXn,[g("tr",null,[e[686]||(e[686]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),g("td",null,[g("div",cXn,[J(g("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[360]||(e[360]=T=>o.configFile.enable_ollama_service=T),onChange:e[361]||(e[361]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_ollama_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=T=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +`,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(t=>t.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):ri}catch{console.log("error")}if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:co},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return null;const t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.$store.state.personalities[t].name:null},speed_computed(){return $o(this.addModel.speed)},total_size_computed(){return $o(this.addModel.total_size)},downloaded_size_computed(){return $o(this.addModel.downloaded_size)}},watch:{bec_collapsed(){qe(()=>{Ze.replace()})},pc_collapsed(){qe(()=>{Ze.replace()})},mc_collapsed(){qe(()=>{Ze.replace()})},sc_collapsed(){qe(()=>{Ze.replace()})},showConfirmation(){qe(()=>{Ze.replace()})},mzl_collapsed(){qe(()=>{Ze.replace()})},pzl_collapsed(){qe(()=>{Ze.replace()})},ezl_collapsed(){qe(()=>{Ze.replace()})},bzl_collapsed(){qe(()=>{Ze.replace()})},all_collapsed(t){this.collapseAll(t),qe(()=>{Ze.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,qe(()=>{Ze.replace()})},isLoading(){qe(()=>{Ze.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){qe(()=>{Ze.replace()})}},async beforeRouteLeave(t){await this.$router.isReady()}},Qjn={class:"container pt-12 flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},vjn={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},yjn={key:0,class:"flex gap-3 flex-1 items-center duration-75"},bjn={key:1,class:"flex gap-3 flex-1 items-center"},Ejn={class:"flex gap-3 flex-1 items-center justify-end"},xjn={class:"flex gap-3 items-center"},Sjn={key:0,class:"flex gap-3 items-center"},Ljn={key:1,role:"status"},Cjn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Ajn={class:"flex flex-row p-3"},wjn={class:"text-base font-semibold cursor-pointer select-none items-center"},Mjn={class:"flex gap-2 items-center"},Ojn={key:0},Rjn=["src"],Njn={class:"font-bold font-large text-lg"},Djn={key:1},Ijn={class:"flex gap-2 items-center"},kjn=["src"],Pjn={class:"font-bold font-large text-lg"},Hjn={class:"font-bold font-large text-lg"},Vjn={class:"font-bold font-large text-lg"},Fjn={class:"mb-2"},Bjn={class:"flex flex-col mx-2"},$jn={class:"p-2"},Ujn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Gjn={class:"mb-2"},qjn={class:"flex flex-col mx-2"},zjn={class:"p-2"},jjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Wjn={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Yjn=["src"],Kjn={class:"flex flex-col mx-2"},Zjn={class:"p-2"},Xjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jjn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},eWn={class:"flex flex-row p-3"},tWn={class:"flex flex-col mb-2 px-3 pb-2"},nWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rWn={class:"flex flex-col space-y-4"},iWn={class:"flex items-center"},oWn={class:"flex items-center"},sWn={class:"flex items-center"},aWn={class:"flex items-start"},lWn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},cWn={class:"flex flex-row p-3"},uWn={class:"flex flex-col mb-2 px-3 pb-2"},dWn={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},fWn={for:"logo-upload"},pWn=["src"],hWn={style:{width:"10%"}},TWn={class:"text-center items-center"},mWn={class:"flex flex-row"},gWn={style:{width:"100%"}},_Wn={class:"flex flex-row"},QWn={class:"flex flex-row"},vWn={class:"flex flex-row"},yWn={class:"flex flex-row"},bWn={class:"flex flex-row"},EWn={class:"flex flex-row"},xWn={class:"flex flex-row"},SWn={class:"flex flex-row"},LWn={class:"flex flex-row"},CWn={class:"flex flex-row"},AWn={class:"flex flex-row"},wWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},MWn=["innerHTML"],OWn={style:{width:"100%"}},RWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},NWn={style:{width:"100%"}},DWn={style:{width:"100%"}},IWn={style:{width:"100%"}},kWn={style:{width:"100%"}},PWn={for:"avatar-upload"},HWn=["src"],VWn={style:{width:"10%"}},FWn={class:"flex flex-row"},BWn={style:{width:"100%"}},$Wn={style:{width:"100%"}},UWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},GWn={style:{width:"100%"}},qWn={style:{width:"100%"}},zWn={style:{width:"100%"}},jWn={style:{width:"100%"}},WWn={style:{width:"100%"}},YWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},KWn={class:"flex flex-row"},ZWn={style:{width:"100%"}},XWn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},JWn={class:"flex flex-row"},eYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tYn={class:"flex flex-row"},nYn={class:"flex flex-row"},rYn={class:"flex flex-row"},iYn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},oYn={class:"flex flex-row p-3"},sYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},aYn={style:{width:"100%"}},lYn=["value","onInput"],cYn=["value","onInput"],uYn=["value","onInput"],dYn=["value","onInput"],fYn=["checked","onChange"],pYn=["onClick"],hYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},TYn={style:{width:"100%"}},mYn=["value","onInput"],gYn=["value","onInput"],_Yn={class:"flex items-center mr-2"},QYn=["checked","onChange"],vYn=["onClick"],yYn=["onClick"],bYn=["onClick"],EYn=["disabled"],xYn={key:0,value:"BAAI/bge-m3"},SYn={key:1,value:"nvidia/NV-Embed-v2"},LYn={key:2,value:"sentence-transformers/all-MiniLM-L6-v2"},CYn={key:3,value:"sentence-transformers/all-MiniLM-L12-v2"},AYn={key:4,value:"sentence-transformers/all-distilroberta-v1"},wYn={key:5,value:"sentence-transformers/all-mpnet-base-v2"},MYn={key:6,value:"text-embedding-ada-002"},OYn={key:7,value:"text-embedding-babbage-001"},RYn={key:8,value:"text-embedding-curie-001"},NYn={key:9,value:"text-embedding-davinci-001"},DYn={key:10,value:"bge-m3"},IYn={key:11,value:"NV-Embed-v2"},kYn={key:12,value:"nomic-embed-text"},PYn={key:13,value:"mxbai-embed-large"},HYn={key:14,value:"mxbai-embed-large"},VYn={key:15,value:"snowflake-arctic-embed"},FYn={key:16,value:"snowflake-arctic-embed"},BYn={key:17,value:"all-minilm"},$Yn={key:18,value:"bge-large"},UYn={key:19,disabled:""},GYn={class:"flex flex-row"},qYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},zYn={class:"flex flex-row"},jYn={class:"flex flex-row"},WYn={class:"flex flex-row"},YYn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},KYn={class:"flex flex-row p-3"},ZYn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},XYn={class:"flex flex-row"},JYn={class:"flex flex-row"},eKn={class:"flex flex-row"},tKn={class:"flex flex-row"},nKn={class:"flex flex-col"},rKn={class:"flex flex-col"},iKn={class:"flex flex-col"},oKn={class:"flex flex-col"},sKn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},aKn={class:"flex flex-row p-3"},lKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},cKn={style:{width:"100%"}},uKn={style:{width:"100%"}},dKn={style:{width:"100%"}},fKn={style:{width:"100%"}},pKn={style:{width:"100%"}},hKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},TKn={class:"flex flex-row"},mKn={class:"flex flex-row"},gKn={class:"flex flex-row"},_Kn={class:"flex flex-row"},QKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},vKn={style:{width:"100%"}},yKn={style:{width:"100%"}},bKn={style:{width:"100%"}},EKn={style:{width:"100%"}},xKn={style:{width:"100%"}},SKn={style:{width:"100%"}},LKn={style:{width:"100%"}},CKn={class:"flex flex-row"},AKn={class:"flex flex-row"},wKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},MKn={style:{width:"100%"}},OKn=["value"],RKn={style:{width:"100%"}},NKn=["value"],DKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},IKn={style:{width:"100%"}},kKn={style:{width:"100%"}},PKn={style:{width:"100%"}},HKn={style:{width:"100%"}},VKn={style:{width:"100%"}},FKn={style:{width:"100%"}},BKn={style:{width:"100%"}},$Kn={style:{width:"100%"}},UKn={style:{width:"100%"}},GKn={style:{width:"100%"}},qKn={style:{width:"100%"}},zKn={style:{width:"100%"}},jKn={style:{width:"100%"}},WKn={style:{width:"100%"}},YKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},KKn={class:"flex flex-row"},ZKn={class:"flex flex-row"},XKn=["value"],JKn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},eZn={class:"flex flex-row"},tZn={class:"flex flex-row"},nZn=["value"],rZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},iZn={class:"flex flex-row"},oZn={class:"flex flex-row"},sZn=["value"],aZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},lZn={class:"flex flex-row"},cZn=["value"],uZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},dZn={class:"flex flex-row"},fZn=["value"],pZn={class:"flex flex-row"},hZn=["value"],TZn={class:"flex flex-row"},mZn={class:"flex flex-row"},gZn={class:"flex flex-row"},_Zn={class:"flex flex-row"},QZn={class:"flex flex-row"},vZn={class:"flex flex-row"},yZn={class:"flex flex-row"},bZn={class:"flex flex-row"},EZn={class:"flex flex-row"},xZn={class:"flex flex-row"},SZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},LZn={class:"flex flex-row"},CZn={class:"flex flex-row"},AZn={class:"flex flex-row"},wZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},MZn={class:"flex flex-row"},OZn={class:"flex flex-row"},RZn={class:"flex flex-row"},NZn={class:"flex flex-row"},DZn={class:"flex flex-row"},IZn=["value"],kZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},PZn={class:"flex flex-row"},HZn={class:"flex flex-row"},VZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},FZn={class:"flex flex-row"},BZn={class:"flex flex-row"},$Zn={class:"flex flex-row"},UZn={class:"flex flex-row"},GZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qZn={class:"flex flex-row"},zZn={class:"flex flex-row"},jZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},WZn={class:"flex flex-row"},YZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},KZn={class:"flex flex-row"},ZZn={class:"flex flex-row"},XZn={class:"flex flex-row"},JZn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},eXn={class:"flex flex-row"},tXn={class:"flex flex-row"},nXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rXn={class:"flex flex-row"},iXn={class:"flex flex-row"},oXn=["value"],sXn={class:"flex flex-row"},aXn={class:"flex flex-row"},lXn={class:"flex flex-row"},cXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},uXn={class:"flex flex-row"},dXn={class:"flex flex-row"},fXn={class:"flex flex-row"},pXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hXn={class:"flex flex-row"},TXn={class:"flex flex-row"},mXn={class:"flex flex-row"},gXn={class:"flex flex-col align-bottom"},_Xn={class:"relative"},QXn={class:"absolute right-0"},vXn={class:"flex flex-row"},yXn={class:"flex flex-row"},bXn={class:"flex flex-row"},EXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},xXn={class:"flex flex-row"},SXn={class:"flex flex-row"},LXn={class:"flex flex-row"},CXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},AXn={class:"flex flex-row"},wXn={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},MXn={class:"flex flex-row"},OXn={class:"flex flex-row"},RXn={class:"flex flex-row"},NXn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},DXn={class:"flex flex-row p-3"},IXn={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},kXn={key:1,class:"mr-2"},PXn={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},HXn={class:"flex gap-1 items-center"},VXn=["src"],FXn={class:"font-bold font-large text-lg line-clamp-1"},BXn={key:0,class:"mb-2"},$Xn={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},UXn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},GXn={class:"flex flex-row p-3"},qXn={class:"flex flex-row items-center"},zXn={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},jXn={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},WXn={key:2,class:"mr-2"},YXn={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},KXn={class:"flex gap-1 items-center"},ZXn=["src"],XXn={class:"font-bold font-large text-lg line-clamp-1"},JXn={class:"mx-2 mb-4"},eJn={class:"relative"},tJn={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},nJn={key:0},rJn={key:1},iJn={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},oJn={key:1,class:"mb-2"},sJn={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},aJn={class:"mb-2"},lJn={class:"p-2"},cJn={class:"mb-3"},uJn={key:0},dJn={class:"mb-3"},fJn={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},pJn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},hJn={class:"w-full p-2"},TJn={class:"flex justify-between mb-1"},mJn={class:"text-sm font-medium text-blue-700 dark:text-white"},gJn=["title"],_Jn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},QJn={class:"flex justify-between mb-1"},vJn={class:"text-base font-medium text-blue-700 dark:text-white"},yJn={class:"text-sm font-medium text-blue-700 dark:text-white"},bJn={class:"flex flex-grow"},EJn={class:"flex flex-row flex-grow gap-3"},xJn={class:"p-2 text-center grow"},SJn={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},LJn={class:"flex flex-row p-3 items-center"},CJn={key:0,class:"mr-2"},AJn={class:"mr-2 font-bold font-large text-lg line-clamp-1"},wJn={key:1,class:"mr-2"},MJn={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},OJn={key:0,class:"flex -space-x-4 items-center"},RJn={class:"group items-center flex flex-row"},NJn=["onClick"],DJn=["src","title"],IJn=["onClick"],kJn={class:"mx-2 mb-4"},PJn={class:"relative"},HJn={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},VJn={key:0},FJn={key:1},BJn={key:0,class:"mx-2 mb-4"},$Jn={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},UJn=["selected"],GJn={key:0,class:"mb-2"},qJn={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},zJn={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},jJn={class:"flex flex-row"},WJn={class:"m-2"},YJn={class:"flex flex-row gap-2 items-center"},KJn={class:"m-2"},ZJn={class:"m-2"},XJn={class:"flex flex-col align-bottom"},JJn={class:"relative"},eer={class:"absolute right-0"},ter={class:"m-2"},ner={class:"flex flex-col align-bottom"},rer={class:"relative"},ier={class:"absolute right-0"},oer={class:"m-2"},ser={class:"flex flex-col align-bottom"},aer={class:"relative"},ler={class:"absolute right-0"},cer={class:"m-2"},uer={class:"flex flex-col align-bottom"},der={class:"relative"},fer={class:"absolute right-0"},per={class:"m-2"},her={class:"flex flex-col align-bottom"},Ter={class:"relative"},mer={class:"absolute right-0"},ger={class:"m-2"},_er={class:"flex flex-col align-bottom"},Qer={class:"relative"},ver={class:"absolute right-0"};function yer(t,e,n,r,i,o){const s=pt("DictManager"),a=pt("Card"),l=pt("StringListManager"),c=pt("BindingEntry"),u=pt("RadioOptions"),d=pt("model-entry"),h=pt("personality-entry"),f=pt("AddModelDialog"),m=pt("ChoiceDialog");return k(),P(ze,null,[g("div",Qjn,[g("div",vjn,[i.showConfirmation?(k(),P("div",yjn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=he(T=>i.showConfirmation=!1,["stop"]))},e[451]||(e[451]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=he(T=>o.save_configuration(),["stop"]))},e[452]||(e[452]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),i.showConfirmation?ne("",!0):(k(),P("div",bjn,[g("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=T=>o.reset_configuration())},e[453]||(e[453]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=he(T=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[454]||(e[454]=[g("i",{"data-feather":"list"},null,-1)]))])),g("div",Ejn,[g("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=T=>o.api_get_req("clear_uploads").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[455]||(e[455]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=T=>o.api_post_req("restart_program").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[456]||(e[456]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(k(),P("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=T=>o.api_post_req("update_software").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[457]||(e[457]=[g("i",{"data-feather":"arrow-up-circle"},null,-1),g("i",{"data-feather":"alert-circle"},null,-1)]))):ne("",!0),g("div",xjn,[i.settingsChanged?(k(),P("div",Sjn,[i.isLoading?ne("",!0):(k(),P("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=he(T=>o.applyConfiguration(),["stop"]))},e[458]||(e[458]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),g("i",{"data-feather":"check"})],-1)]))),i.isLoading?ne("",!0):(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=he(T=>o.cancelConfiguration(),["stop"]))},e[459]||(e[459]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),g("i",{"data-feather":"x"})],-1)])))])):ne("",!0),i.isLoading?(k(),P("div",Ljn,[g("p",null,le(i.loading_text),1),e[460]||(e[460]=g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),e[461]||(e[461]=g("span",{class:"sr-only"},"Loading...",-1))])):ne("",!0)])])]),g("div",{class:We(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[g("div",Cjn,[g("div",Ajn,[g("button",{onClick:e[9]||(e[9]=he(T=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[462]||(e[462]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.sc_collapsed]]),J(g("div",null,e[463]||(e[463]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.sc_collapsed]]),e[466]||(e[466]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[467]||(e[467]=g("div",{class:"mr-2"},"|",-1)),g("div",wjn,[g("div",Mjn,[g("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(k(),P("div",Ojn,[(k(!0),P(ze,null,at(o.vramUsage.gpus,T=>(k(),P("div",{class:"flex gap-2 items-center",key:T},[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Rjn),g("p",Njn,[g("div",null,le(o.computedFileSize(T.used_vram))+" / "+le(o.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%) ",1)])]))),128))])):ne("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(k(),P("div",Djn,[g("div",Ijn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,kjn),g("p",Pjn,[g("div",null,le(o.vramUsage.gpus.length)+"x ",1)])])])):ne("",!0)]),e[464]||(e[464]=g("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Hjn,[g("div",null,le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+"%)",1)]),e[465]||(e[465]=g("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Vjn,[g("div",null,le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])])])])]),g("div",{class:We([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",Fjn,[e[470]||(e[470]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[g("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),ft(" CPU Ram usage: ")],-1)),g("div",Bjn,[g("div",null,[e[468]||(e[468]=g("b",null,"Avaliable ram: ",-1)),ft(le(o.ram_available_space),1)]),g("div",null,[e[469]||(e[469]=g("b",null,"Ram usage: ",-1)),ft(" "+le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+")% ",1)])]),g("div",$jn,[g("div",Ujn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.ram_percent_usage+"%;")},null,4)])])]),g("div",Gjn,[e[473]||(e[473]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),ft(" Disk usage: ")],-1)),g("div",qjn,[g("div",null,[e[471]||(e[471]=g("b",null,"Avaliable disk space: ",-1)),ft(le(o.disk_available_space),1)]),g("div",null,[e[472]||(e[472]=g("b",null,"Disk usage: ",-1)),ft(" "+le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])]),g("div",zjn,[g("div",jjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(k(!0),P(ze,null,at(o.vramUsage.gpus,T=>(k(),P("div",{class:"mb-2",key:T},[g("label",Wjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Yjn),e[474]||(e[474]=ft(" GPU usage: "))]),g("div",Kjn,[g("div",null,[e[475]||(e[475]=g("b",null,"Model: ",-1)),ft(le(T.gpu_model),1)]),g("div",null,[e[476]||(e[476]=g("b",null,"Avaliable vram: ",-1)),ft(le(this.computedFileSize(T.available_space)),1)]),g("div",null,[e[477]||(e[477]=g("b",null,"GPU usage: ",-1)),ft(" "+le(this.computedFileSize(T.used_vram))+" / "+le(this.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%)",1)])]),g("div",Zjn,[g("div",Xjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+T.percentage+"%;")},null,4)])])]))),128))],2)]),g("div",Jjn,[g("div",eWn,[g("button",{onClick:e[10]||(e[10]=he(T=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[478]||(e[478]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.smartrouterconf_collapsed]]),J(g("div",null,e[479]||(e[479]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.smartrouterconf_collapsed]]),e[480]||(e[480]=g("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),g("div",{class:We([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",tWn,[oe(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("div",nWn,[g("div",rWn,[g("div",iWn,[e[481]||(e[481]=g("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),J(g("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=T=>o.configFile.use_smart_routing=T),onChange:e[12]||(e[12]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_smart_routing]])]),g("div",oWn,[e[482]||(e[482]=g("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),J(g("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=T=>o.configFile.restore_model_after_smart_routing=T),onChange:e[14]||(e[14]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.restore_model_after_smart_routing]])]),g("div",sWn,[e[483]||(e[483]=g("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),J(g("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=T=>o.configFile.smart_routing_router_model=T),onChange:e[16]||(e[16]=T=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.smart_routing_router_model]])]),g("div",aWn,[e[484]||(e[484]=g("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),oe(s,{modelValue:o.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=T=>o.configFile.smart_routing_models_description=T),onChange:e[18]||(e[18]=T=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),g("div",lWn,[g("div",cWn,[g("button",{onClick:e[19]||(e[19]=he(T=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[485]||(e[485]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mainconf_collapsed]]),J(g("div",null,e[486]||(e[486]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mainconf_collapsed]]),e[487]||(e[487]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),g("div",{class:We([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",uWn,[oe(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",dWn,[g("tr",null,[e[489]||(e[489]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),g("td",null,[g("label",fWn,[g("img",{src:o.configFile.app_custom_logo!=null&&o.configFile.app_custom_logo!=""?"/user_infos/"+o.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,pWn)]),g("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(...T)=>o.uploadLogo&&o.uploadLogo(...T))},null,32)]),g("td",hWn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=he(T=>o.resetLogo(),["stop"]))},e[488]||(e[488]=[g("i",{"data-feather":"x"},null,-1)]))])]),g("tr",null,[e[491]||(e[491]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),g("td",TWn,[g("div",mWn,[J(g("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=T=>o.configFile.hardware_mode=T),onChange:e[23]||(e[23]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[490]||(e[490]=[g("option",{value:"cpu"},"CPU",-1),g("option",{value:"cpu-noavx"},"CPU (No AVX)",-1),g("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1),g("option",{value:"nvidia"},"NVIDIA",-1),g("option",{value:"amd-noavx"},"AMD (No AVX)",-1),g("option",{value:"amd"},"AMD",-1),g("option",{value:"apple-intel"},"Apple Intel",-1),g("option",{value:"apple-silicon"},"Apple Silicon",-1)]),544),[[dn,o.configFile.hardware_mode]])])])]),g("tr",null,[e[492]||(e[492]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),g("td",gWn,[J(g("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=T=>o.configFile.discussion_db_name=T),onChange:e[25]||(e[25]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.discussion_db_name]])])]),g("tr",null,[e[493]||(e[493]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),g("td",null,[g("div",_Wn,[J(g("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=T=>o.configFile.copy_to_clipboard_add_all_details=T),onChange:e[27]||(e[27]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.copy_to_clipboard_add_all_details]])])])]),g("tr",null,[e[494]||(e[494]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),g("td",null,[g("div",QWn,[J(g("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=T=>o.configFile.auto_show_browser=T),onChange:e[29]||(e[29]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_show_browser]])])])]),g("tr",null,[e[495]||(e[495]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),g("td",null,[g("div",vWn,[J(g("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=T=>o.configFile.debug=T),onChange:e[31]||(e[31]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug]])])])]),g("tr",null,[e[496]||(e[496]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),g("td",null,[g("div",yWn,[J(g("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[33]||(e[33]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_final_full_prompt]])])])]),g("tr",null,[e[497]||(e[497]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),g("td",null,[g("div",bWn,[J(g("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[35]||(e[35]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_final_full_prompt]])])])]),g("tr",null,[e[498]||(e[498]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),g("td",null,[g("div",EWn,[J(g("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=T=>o.configFile.debug_show_chunks=T),onChange:e[37]||(e[37]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.debug_show_chunks]])])])]),g("tr",null,[e[499]||(e[499]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),g("td",null,[g("div",xWn,[J(g("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=T=>o.configFile.debug_log_file_path=T),onChange:e[39]||(e[39]=T=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.debug_log_file_path]])])])]),g("tr",null,[e[500]||(e[500]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),g("td",null,[g("div",SWn,[J(g("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=T=>o.configFile.show_news_panel=T),onChange:e[41]||(e[41]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.show_news_panel]])])])]),g("tr",null,[e[501]||(e[501]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),g("td",null,[g("div",LWn,[J(g("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=T=>o.configFile.auto_save=T),onChange:e[43]||(e[43]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_save]])])])]),g("tr",null,[e[502]||(e[502]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),g("td",null,[g("div",CWn,[J(g("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=T=>o.configFile.auto_update=T),onChange:e[45]||(e[45]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_update]])])])]),g("tr",null,[e[503]||(e[503]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),g("td",null,[g("div",AWn,[J(g("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=T=>o.configFile.auto_title=T),onChange:e[47]||(e[47]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_title]])])])])])]),_:1}),oe(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",wWn,[g("tr",null,[e[505]||(e[505]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),g("td",null,[g("select",{onChange:e[48]||(e[48]=(...T)=>o.handleTemplateSelection&&o.handleTemplateSelection(...T))},e[504]||(e[504]=[g("option",{value:"lollms"},"Lollms communication template",-1),g("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),g("option",{value:"bare"},"Bare, useful when in chat mode",-1),g("option",{value:"llama3"},"LLama3 communication template",-1),g("option",{value:"mistral"},"Mistral communication template",-1),g("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)])]),g("tr",null,[e[506]||(e[506]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=T=>o.configFile.start_header_id_template=T),onChange:e[50]||(e[50]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_header_id_template]])])]),g("tr",null,[e[507]||(e[507]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=T=>o.configFile.end_header_id_template=T),onChange:e[52]||(e[52]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_header_id_template]])])]),g("tr",null,[e[508]||(e[508]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=T=>o.configFile.start_user_header_id_template=T),onChange:e[54]||(e[54]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_user_header_id_template]])])]),g("tr",null,[e[509]||(e[509]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=T=>o.configFile.end_user_header_id_template=T),onChange:e[56]||(e[56]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_user_header_id_template]])])]),g("tr",null,[e[510]||(e[510]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=T=>o.configFile.end_user_message_id_template=T),onChange:e[58]||(e[58]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_user_message_id_template]])])]),g("tr",null,[e[511]||(e[511]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=T=>o.configFile.start_ai_header_id_template=T),onChange:e[60]||(e[60]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.start_ai_header_id_template]])])]),g("tr",null,[e[512]||(e[512]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=T=>o.configFile.end_ai_header_id_template=T),onChange:e[62]||(e[62]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_ai_header_id_template]])])]),g("tr",null,[e[513]||(e[513]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=T=>o.configFile.end_ai_message_id_template=T),onChange:e[64]||(e[64]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.end_ai_message_id_template]])])]),g("tr",null,[e[514]||(e[514]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),g("td",null,[J(g("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=T=>o.configFile.separator_template=T),onChange:e[66]||(e[66]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.separator_template]])])]),g("tr",null,[e[515]||(e[515]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),g("td",null,[J(g("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=T=>o.configFile.system_message_template=T),onChange:e[68]||(e[68]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.system_message_template]])])]),g("tr",null,[e[516]||(e[516]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),g("td",null,[g("div",{innerHTML:o.full_template},null,8,MWn)])]),g("tr",null,[e[517]||(e[517]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),g("td",OWn,[J(g("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=T=>o.configFile.use_continue_message=T),onChange:e[70]||(e[70]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_continue_message]])])])])]),_:1}),oe(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",RWn,[g("tr",null,[e[518]||(e[518]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),g("td",NWn,[J(g("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=T=>o.configFile.user_name=T),onChange:e[72]||(e[72]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.user_name]])])]),g("tr",null,[e[519]||(e[519]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),g("td",DWn,[J(g("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=T=>o.configFile.user_description=T),onChange:e[74]||(e[74]=T=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.user_description]])])]),g("tr",null,[e[520]||(e[520]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),g("td",IWn,[J(g("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[76]||(e[76]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_user_informations_in_discussion]])])]),g("tr",null,[e[521]||(e[521]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),g("td",kWn,[J(g("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[78]||(e[78]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_model_name_in_discussions]])])]),g("tr",null,[e[523]||(e[523]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),g("td",null,[g("label",PWn,[g("img",{src:o.configFile.user_avatar!=null&&o.configFile.user_avatar!=""?"/user_infos/"+o.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,HWn)]),g("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32)]),g("td",VWn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=he(T=>o.resetAvatar(),["stop"]))},e[522]||(e[522]=[g("i",{"data-feather":"x"},null,-1)]))])]),g("tr",null,[e[524]||(e[524]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),g("td",null,[g("div",FWn,[J(g("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[82]||(e[82]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_user_name_in_discussions]])])])]),g("tr",null,[e[525]||(e[525]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),g("td",BWn,[J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=T=>o.configFile.max_n_predict=T),onChange:e[84]||(e[84]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.max_n_predict]])])]),g("tr",null,[e[526]||(e[526]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),g("td",$Wn,[J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=T=>o.configFile.max_n_predict=T),onChange:e[86]||(e[86]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.max_n_predict]])])])])]),_:1}),oe(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",UWn,[g("tr",null,[e[527]||(e[527]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),g("td",GWn,[J(g("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=T=>o.configFile.turn_on_code_execution=T),onChange:e[88]||(e[88]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_code_execution]])])]),g("tr",null,[e[528]||(e[528]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),g("td",qWn,[J(g("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=T=>o.configFile.turn_on_code_validation=T),onChange:e[90]||(e[90]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_code_validation]])])]),g("tr",null,[e[529]||(e[529]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),g("td",zWn,[J(g("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=T=>o.configFile.turn_on_setting_update_validation=T),onChange:e[92]||(e[92]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_setting_update_validation]])])]),g("tr",null,[e[530]||(e[530]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),g("td",jWn,[J(g("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=T=>o.configFile.turn_on_open_file_validation=T),onChange:e[94]||(e[94]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_open_file_validation]])])]),g("tr",null,[e[531]||(e[531]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),g("td",WWn,[J(g("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=T=>o.configFile.turn_on_send_file_validation=T),onChange:e[96]||(e[96]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.turn_on_send_file_validation]])])])])]),_:1}),oe(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",YWn,[g("tr",null,[e[532]||(e[532]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),g("td",null,[g("div",KWn,[J(g("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=T=>o.configFile.activate_skills_lib=T),onChange:e[98]||(e[98]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_skills_lib]])])])]),g("tr",null,[e[533]||(e[533]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),g("td",ZWn,[J(g("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=T=>o.configFile.skills_lib_database_name=T),onChange:e[100]||(e[100]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.skills_lib_database_name]])])])])]),_:1}),oe(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",XWn,[g("tr",null,[e[534]||(e[534]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),g("td",null,[g("div",JWn,[J(g("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=T=>o.configFile.pdf_latex_path=T),onChange:e[102]||(e[102]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.pdf_latex_path]])])])])])]),_:1}),oe(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",eYn,[g("tr",null,[e[535]||(e[535]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),g("td",null,[g("div",tYn,[J(g("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=T=>o.configFile.positive_boost=T),onChange:e[104]||(e[104]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.positive_boost]])])])]),g("tr",null,[e[536]||(e[536]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),g("td",null,[g("div",nYn,[J(g("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=T=>o.configFile.negative_boost=T),onChange:e[106]||(e[106]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.negative_boost]])])])]),g("tr",null,[e[537]||(e[537]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),g("td",null,[g("div",rYn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=T=>o.configFile.fun_mode=T),onChange:e[108]||(e[108]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.fun_mode]])])])])])]),_:1})])],2)]),g("div",iYn,[g("div",oYn,[g("button",{onClick:e[109]||(e[109]=he(T=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[538]||(e[538]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.data_conf_collapsed]]),J(g("div",null,e[539]||(e[539]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.data_conf_collapsed]]),e[540]||(e[540]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),g("div",{class:We([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Remote Dabase Servers",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",sYn,[g("tr",null,[e[544]||(e[544]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"remote_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Remote Database Servers:")],-1)),g("td",aYn,[(k(!0),P(ze,null,at(o.configFile.remote_databases,(T,Q)=>(k(),P("div",{key:Q,class:"flex items-center mb-2"},[g("input",{type:"text",value:o.getAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"w-40 mx-2 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",placeholder:"Database Alias"},null,40,lYn),g("select",{required:"",value:o.getDatabaseType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"w-40 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[541]||(e[541]=[g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,cYn),g("input",{type:"text",value:o.getDatabaseUrl(Q),onInput:_=>o.updateDatabaseUrl(Q,_.target.value),class:"w-full mx-2 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",placeholder:"Database URL"},null,40,uYn),g("input",{type:"text",value:o.getDatabaseKey(Q),onInput:_=>o.updateDatabaseKey(Q,_.target.value),class:"w-full mx-2 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",placeholder:"Database api key"},null,40,dYn),g("input",{type:"checkbox",checked:o.getMounted(Q),onChange:_=>o.updateMounted(Q,_.target.checked),class:"mx-2"},null,40,fYn),e[543]||(e[543]=g("label",{class:"mr-2"},"Mounted",-1)),g("button",{onClick:_=>o.removeDataBase(Q),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-red-300 rounded flex items-center",title:"Remove this data source"},e[542]||(e[542]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,pYn)]))),128)),g("button",{onClick:e[110]||(e[110]=(...T)=>o.addDatabaseService&&o.addDatabaseService(...T)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Database Service")])])])]),_:1}),oe(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",hYn,[g("tr",null,[e[549]||(e[549]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),g("td",TYn,[(k(!0),P(ze,null,at(o.configFile.rag_databases,(T,Q)=>(k(),P("div",{key:Q,class:"flex items-center mb-2"},[g("input",{type:"text",value:T.alias,onInput:_=>o.updateRagDatabase(Q,_.target.value,"name"),class:"w-1/3 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 mr-2",placeholder:"Database Name"},null,40,mYn),g("input",{type:"text",value:T.path,onInput:_=>o.updateRagDatabase(Q,_.target.value,"path"),class:"w-1/3 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 mr-2",placeholder:"Database Path"},null,40,gYn),g("div",_Yn,[g("input",{type:"checkbox",checked:T.mounted,onChange:_=>o.updateRagDatabase(Q,_.target.checked,"mounted"),class:"mr-1"},null,40,QYn),e[545]||(e[545]=g("span",{class:"text-sm"},"Mounted",-1))]),g("button",{onClick:_=>o.vectorize_folder(Q),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded flex items-center",title:"Vectorize or re-vectorize the selected folder"},e[546]||(e[546]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,vYn),g("button",{onClick:_=>o.select_folder(Q),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-blue-300 rounded flex items-center",title:"Select a folder as data source"},e[547]||(e[547]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1)]),8,yYn),g("button",{onClick:_=>o.removeDataSource(Q),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-red-300 rounded flex items-center",title:"Remove this data source"},e[548]||(e[548]=[g("svg",{class:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,bYn)]))),128)),g("button",{onClick:e[111]||(e[111]=(...T)=>o.addDataSource&&o.addDataSource(...T)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),g("tr",null,[e[551]||(e[551]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),g("td",null,[J(g("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=T=>o.configFile.rag_vectorizer=T),onChange:e[113]||(e[113]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[550]||(e[550]=[g("option",{value:"semantic"},"Semantic Vectorizer",-1),g("option",{value:"tfidf"},"TFIDF Vectorizer",-1),g("option",{value:"openai"},"OpenAI Vectorizer",-1),g("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[dn,o.configFile.rag_vectorizer]])])]),g("tr",null,[e[552]||(e[552]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_execute_remote_code",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Allow executing remote code:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[114]||(e[114]=T=>o.configFile.rag_vectorizer_execute_remote_code=T),type:"checkbox",onChange:e[115]||(e[115]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_vectorizer_execute_remote_code]])])]),g("tr",null,[e[553]||(e[553]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),g("td",null,[J(g("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[116]||(e[116]=T=>o.configFile.rag_vectorizer_model=T),onChange:e[117]||(e[117]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:o.configFile.rag_vectorizer==="tfidf"},[o.configFile.rag_vectorizer==="semantic"?(k(),P("option",xYn,"BAAI/bge-m3")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",SYn,"nvidia/NV-Embed-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",LYn,"sentence-transformers/all-MiniLM-L6-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",CYn,"sentence-transformers/all-MiniLM-L12-v2")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",AYn,"sentence-transformers/all-distilroberta-v1")):ne("",!0),o.configFile.rag_vectorizer==="semantic"?(k(),P("option",wYn,"sentence-transformers/all-mpnet-base-v2")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",MYn,"text-embedding-ada-002")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",OYn,"text-embedding-babbage-001")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",RYn,"text-embedding-curie-001")):ne("",!0),o.configFile.rag_vectorizer==="openai"?(k(),P("option",NYn,"text-embedding-davinci-001")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",DYn,"bge-m3")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",IYn,"nvidia/NV-Embed-v2")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",kYn,"nomic-embed-text")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",PYn,"mxbai-embed-large")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",HYn,"mxbai-embed-large")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",VYn,"snowflake-arctic-embed")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",FYn,"snowflake-arctic-embed")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",BYn,"all-minilm")):ne("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),P("option",$Yn,"bge-large")):ne("",!0),o.configFile.rag_vectorizer==="tfidf"?(k(),P("option",UYn,"No models available for TFIDF")):ne("",!0)],40,EYn),[[dn,o.configFile.rag_vectorizer_model]]),J(g("input",{"onUpdate:modelValue":e[118]||(e[118]=T=>o.configFile.rag_vectorizer_model=T),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[we,o.configFile.rag_vectorizer_model]])])]),g("tr",null,[e[554]||(e[554]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_service_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Rag service url:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[119]||(e[119]=T=>o.configFile.rag_service_url=T),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[we,o.configFile.rag_service_url]])])]),g("tr",null,[e[555]||(e[555]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),g("td",null,[g("div",GYn,[J(g("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[120]||(e[120]=T=>o.configFile.rag_vectorizer_openai_key=T),onChange:e[121]||(e[121]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_vectorizer_openai_key]])])])]),g("tr",null,[e[556]||(e[556]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),g("td",null,[J(g("input",{id:"rag_chunk_size","onUpdate:modelValue":e[122]||(e[122]=T=>o.configFile.rag_chunk_size=T),onChange:e[123]||(e[123]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[124]||(e[124]=T=>o.configFile.rag_chunk_size=T),type:"number",onChange:e[125]||(e[125]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_chunk_size]])])]),g("tr",null,[e[557]||(e[557]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),g("td",null,[J(g("input",{id:"rag_overlap","onUpdate:modelValue":e[126]||(e[126]=T=>o.configFile.rag_overlap=T),onChange:e[127]||(e[127]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_overlap]]),J(g("input",{"onUpdate:modelValue":e[128]||(e[128]=T=>o.configFile.rag_overlap=T),type:"number",onChange:e[129]||(e[129]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_overlap]])])]),g("tr",null,[e[558]||(e[558]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),g("td",null,[J(g("input",{id:"rag_n_chunks","onUpdate:modelValue":e[130]||(e[130]=T=>o.configFile.rag_n_chunks=T),onChange:e[131]||(e[131]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.rag_n_chunks]]),J(g("input",{"onUpdate:modelValue":e[132]||(e[132]=T=>o.configFile.rag_n_chunks=T),type:"number",onChange:e[133]||(e[133]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.rag_n_chunks]])])]),g("tr",null,[e[559]||(e[559]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[134]||(e[134]=T=>o.configFile.rag_clean_chunks=T),type:"checkbox",onChange:e[135]||(e[135]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_clean_chunks]])])]),g("tr",null,[e[560]||(e[560]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[136]||(e[136]=T=>o.configFile.rag_follow_subfolders=T),type:"checkbox",onChange:e[137]||(e[137]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_follow_subfolders]])])]),g("tr",null,[e[561]||(e[561]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[138]||(e[138]=T=>o.configFile.rag_check_new_files_at_startup=T),type:"checkbox",onChange:e[139]||(e[139]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_check_new_files_at_startup]])])]),g("tr",null,[e[562]||(e[562]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[140]||(e[140]=T=>o.configFile.rag_preprocess_chunks=T),type:"checkbox",onChange:e[141]||(e[141]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_preprocess_chunks]])])]),g("tr",null,[e[563]||(e[563]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[142]||(e[142]=T=>o.configFile.rag_activate_multi_hops=T),type:"checkbox",onChange:e[143]||(e[143]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_activate_multi_hops]])])]),g("tr",null,[e[564]||(e[564]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[144]||(e[144]=T=>o.configFile.contextual_summary=T),type:"checkbox",onChange:e[145]||(e[145]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.contextual_summary]])])]),g("tr",null,[e[565]||(e[565]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),g("td",null,[J(g("input",{"onUpdate:modelValue":e[146]||(e[146]=T=>o.configFile.rag_deactivate=T),type:"checkbox",onChange:e[147]||(e[147]=T=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_deactivate]])])])])]),_:1}),oe(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",qYn,[g("tr",null,[e[566]||(e[566]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),g("td",null,[g("div",zYn,[J(g("input",{type:"checkbox",id:"rag_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=T=>o.configFile.rag_build_keys_words=T),onChange:e[149]||(e[149]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_build_keys_words]])])])]),g("tr",null,[e[567]||(e[567]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"rag_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),g("td",null,[g("div",jYn,[J(g("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[150]||(e[150]=T=>o.configFile.rag_put_chunk_informations_into_context=T),onChange:e[151]||(e[151]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.rag_put_chunk_informations_into_context]])])])]),g("tr",null,[e[568]||(e[568]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),g("td",null,[g("div",WYn,[J(g("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[152]||(e[152]=T=>o.configFile.data_vectorization_save_db=T),onChange:e[153]||(e[153]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.data_vectorization_save_db]])])])])])]),_:1})],2)]),g("div",YYn,[g("div",KYn,[g("button",{onClick:e[154]||(e[154]=he(T=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[569]||(e[569]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.internet_conf_collapsed]]),J(g("div",null,e[570]||(e[570]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.internet_conf_collapsed]]),e[571]||(e[571]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),g("div",{class:We([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",ZYn,[g("tr",null,[e[572]||(e[572]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate automatic internet search (for every prompt):")],-1)),g("td",null,[g("div",XYn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[155]||(e[155]=T=>o.configFile.activate_internet_search=T),onChange:e[156]||(e[156]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_internet_search]])])])]),g("tr",null,[e[573]||(e[573]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),g("td",null,[g("div",JYn,[J(g("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[157]||(e[157]=T=>o.configFile.activate_internet_pages_judgement=T),onChange:e[158]||(e[158]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_internet_pages_judgement]])])])]),g("tr",null,[e[574]||(e[574]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),g("td",null,[g("div",eKn,[J(g("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[159]||(e[159]=T=>o.configFile.internet_quick_search=T),onChange:e[160]||(e[160]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.internet_quick_search]])])])]),g("tr",null,[e[575]||(e[575]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),g("td",null,[g("div",tKn,[J(g("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[161]||(e[161]=T=>o.configFile.internet_activate_search_decision=T),onChange:e[162]||(e[162]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.internet_activate_search_decision]])])])]),g("tr",null,[e[576]||(e[576]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),g("td",null,[g("div",nKn,[J(g("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[163]||(e[163]=T=>o.configFile.internet_vectorization_chunk_size=T),onChange:e[164]||(e[164]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[165]||(e[165]=T=>o.configFile.internet_vectorization_chunk_size=T),type:"number",onChange:e[166]||(e[166]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]])])])]),g("tr",null,[e[577]||(e[577]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),g("td",null,[g("div",rKn,[J(g("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[167]||(e[167]=T=>o.configFile.internet_vectorization_overlap_size=T),onChange:e[168]||(e[168]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]]),J(g("input",{"onUpdate:modelValue":e[169]||(e[169]=T=>o.configFile.internet_vectorization_overlap_size=T),type:"number",onChange:e[170]||(e[170]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]])])])]),g("tr",null,[e[578]||(e[578]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),g("td",null,[g("div",iKn,[J(g("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[171]||(e[171]=T=>o.configFile.internet_vectorization_nb_chunks=T),onChange:e[172]||(e[172]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]]),J(g("input",{"onUpdate:modelValue":e[173]||(e[173]=T=>o.configFile.internet_vectorization_nb_chunks=T),type:"number",onChange:e[174]||(e[174]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]])])])]),g("tr",null,[e[579]||(e[579]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),g("td",null,[g("div",oKn,[J(g("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[175]||(e[175]=T=>o.configFile.internet_nb_search_pages=T),onChange:e[176]||(e[176]=T=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.internet_nb_search_pages]]),J(g("input",{"onUpdate:modelValue":e[177]||(e[177]=T=>o.configFile.internet_nb_search_pages=T),type:"number",onChange:e[178]||(e[178]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),g("div",sKn,[g("div",aKn,[g("button",{onClick:e[179]||(e[179]=he(T=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[580]||(e[580]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.servers_conf_collapsed]]),J(g("div",null,e[581]||(e[581]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.servers_conf_collapsed]]),e[582]||(e[582]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),g("div",{class:We([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",lKn,[g("tr",null,[e[584]||(e[584]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),g("td",cKn,[J(g("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[180]||(e[180]=T=>o.configFile.active_tts_service=T),onChange:e[181]||(e[181]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[583]||(e[583]=[g("option",{value:"None"},"None",-1),g("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),g("option",{value:"xtts"},"XTTS",-1),g("option",{value:"parler-tts"},"Parler-TTS",-1),g("option",{value:"openai_tts"},"Open AI TTS",-1),g("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),g("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[dn,o.configFile.active_tts_service]])])]),g("tr",null,[e[586]||(e[586]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),g("td",uKn,[J(g("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[182]||(e[182]=T=>o.configFile.active_stt_service=T),onChange:e[183]||(e[183]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[585]||(e[585]=[g("option",{value:"None"},"None",-1),g("option",{value:"whisper"},"Whisper",-1),g("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[dn,o.configFile.active_stt_service]])])]),e[593]||(e[593]=g("tr",null,null,-1)),g("tr",null,[e[588]||(e[588]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),g("td",dKn,[J(g("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[184]||(e[184]=T=>o.configFile.active_tti_service=T),onChange:e[185]||(e[185]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[587]||(e[587]=[g("option",{value:"None"},"None",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"diffusers_client"},"Diffusers Client",-1),g("option",{value:"autosd"},"AUTO1111's SD",-1),g("option",{value:"dall-e"},"Open AI DALL-E",-1),g("option",{value:"midjourney"},"Midjourney",-1),g("option",{value:"comfyui"},"Comfyui",-1),g("option",{value:"fooocus"},"Fooocus",-1)]),544),[[dn,o.configFile.active_tti_service]])])]),g("tr",null,[e[590]||(e[590]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),g("td",fKn,[J(g("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[186]||(e[186]=T=>o.configFile.active_ttm_service=T),onChange:e[187]||(e[187]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[589]||(e[589]=[g("option",{value:"None"},"None",-1),g("option",{value:"musicgen"},"Music Gen",-1)]),544),[[dn,o.configFile.active_ttm_service]])])]),g("tr",null,[e[592]||(e[592]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),g("td",pKn,[J(g("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[188]||(e[188]=T=>o.configFile.active_ttv_service=T),onChange:e[189]||(e[189]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[591]||(e[591]=[g("option",{value:"None"},"None",-1),g("option",{value:"cog_video_x"},"Cog Video X",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"lumalab"},"Lumalab",-1)]),544),[[dn,o.configFile.active_ttv_service]])])])])]),_:1}),oe(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",hKn,[g("tr",null,[e[594]||(e[594]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),g("td",null,[g("div",TKn,[J(g("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[190]||(e[190]=T=>o.configFile.use_negative_prompt=T),onChange:e[191]||(e[191]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_negative_prompt]])])])]),g("tr",null,[e[595]||(e[595]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),g("td",null,[g("div",mKn,[J(g("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[192]||(e[192]=T=>o.configFile.use_ai_generated_negative_prompt=T),onChange:e[193]||(e[193]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.use_ai_generated_negative_prompt]])])])]),g("tr",null,[e[596]||(e[596]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),g("td",null,[g("div",gKn,[J(g("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[194]||(e[194]=T=>o.configFile.negative_prompt_generation_prompt=T),onChange:e[195]||(e[195]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.negative_prompt_generation_prompt]])])])]),g("tr",null,[e[597]||(e[597]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),g("td",null,[g("div",_Kn,[J(g("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[196]||(e[196]=T=>o.configFile.default_negative_prompt=T),onChange:e[197]||(e[197]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.default_negative_prompt]])])])])])]),_:1}),oe(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",QKn,[g("tr",null,[e[598]||(e[598]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),g("td",vKn,[J(g("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[198]||(e[198]=T=>o.configFile.stt_listening_threshold=T),onChange:e[199]||(e[199]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_listening_threshold]])])]),g("tr",null,[e[599]||(e[599]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),g("td",yKn,[J(g("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[200]||(e[200]=T=>o.configFile.stt_silence_duration=T),onChange:e[201]||(e[201]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_silence_duration]])])]),g("tr",null,[e[600]||(e[600]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),g("td",bKn,[J(g("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[202]||(e[202]=T=>o.configFile.stt_sound_threshold_percentage=T),onChange:e[203]||(e[203]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_sound_threshold_percentage]])])]),g("tr",null,[e[601]||(e[601]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),g("td",EKn,[J(g("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[204]||(e[204]=T=>o.configFile.stt_gain=T),onChange:e[205]||(e[205]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_gain]])])]),g("tr",null,[e[602]||(e[602]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),g("td",xKn,[J(g("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[206]||(e[206]=T=>o.configFile.stt_rate=T),onChange:e[207]||(e[207]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_rate]])])]),g("tr",null,[e[603]||(e[603]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),g("td",SKn,[J(g("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[208]||(e[208]=T=>o.configFile.stt_channels=T),onChange:e[209]||(e[209]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_channels]])])]),g("tr",null,[e[604]||(e[604]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),g("td",LKn,[J(g("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[210]||(e[210]=T=>o.configFile.stt_buffer_size=T),onChange:e[211]||(e[211]=T=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[we,o.configFile.stt_buffer_size]])])]),g("tr",null,[e[605]||(e[605]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),g("td",null,[g("div",CKn,[J(g("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[212]||(e[212]=T=>o.configFile.stt_activate_word_detection=T),onChange:e[213]||(e[213]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.stt_activate_word_detection]])])])]),g("tr",null,[e[606]||(e[606]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),g("td",null,[g("div",AKn,[J(g("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[214]||(e[214]=T=>o.configFile.stt_word_detection_file=T),onChange:e[215]||(e[215]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.stt_word_detection_file]])])])])])]),_:1}),oe(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",wKn,[g("tr",null,[e[607]||(e[607]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),g("td",MKn,[J(g("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[216]||(e[216]=T=>o.configFile.stt_input_device=T),onChange:e[217]||(e[217]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.snd_input_devices,(T,Q)=>(k(),P("option",{key:T,value:i.snd_input_devices_indexes[Q]},le(T),9,OKn))),128))],544),[[dn,o.configFile.stt_input_device]])])]),g("tr",null,[e[608]||(e[608]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),g("td",RKn,[J(g("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[218]||(e[218]=T=>o.configFile.tts_output_device=T),onChange:e[219]||(e[219]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.snd_output_devices,(T,Q)=>(k(),P("option",{key:T,value:i.snd_output_devices_indexes[Q]},le(T),9,NKn))),128))],544),[[dn,o.configFile.tts_output_device]])])])])]),_:1}),oe(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",DKn,[g("tr",null,[e[609]||(e[609]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),g("td",IKn,[J(g("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[220]||(e[220]=T=>o.configFile.host=T),onChange:e[221]||(e[221]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.host]])])]),g("tr",null,[e[610]||(e[610]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),g("td",kKn,[oe(l,{modelValue:o.configFile.lollms_access_keys,"onUpdate:modelValue":e[222]||(e[222]=T=>o.configFile.lollms_access_keys=T),onChange:e[223]||(e[223]=T=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),g("tr",null,[e[611]||(e[611]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),g("td",PKn,[J(g("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[224]||(e[224]=T=>o.configFile.port=T),onChange:e[225]||(e[225]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.port]])])]),g("tr",null,[e[612]||(e[612]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),g("td",HKn,[J(g("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[226]||(e[226]=T=>o.configFile.headless_server_mode=T),onChange:e[227]||(e[227]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.headless_server_mode]])])]),g("tr",null,[e[613]||(e[613]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),g("td",VKn,[J(g("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[228]||(e[228]=T=>o.configFile.activate_lollms_server=T),onChange:e[229]||(e[229]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_server]])])]),g("tr",null,[e[614]||(e[614]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),g("td",FKn,[J(g("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[230]||(e[230]=T=>o.configFile.activate_lollms_rag_server=T),onChange:e[231]||(e[231]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_rag_server]])])]),g("tr",null,[e[615]||(e[615]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),g("td",BKn,[J(g("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[232]||(e[232]=T=>o.configFile.activate_lollms_tts_server=T),onChange:e[233]||(e[233]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_tts_server]])])]),g("tr",null,[e[616]||(e[616]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),g("td",$Kn,[J(g("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[234]||(e[234]=T=>o.configFile.activate_lollms_stt_server=T),onChange:e[235]||(e[235]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_stt_server]])])]),g("tr",null,[e[617]||(e[617]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),g("td",UKn,[J(g("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[236]||(e[236]=T=>o.configFile.activate_lollms_tti_server=T),onChange:e[237]||(e[237]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_tti_server]])])]),g("tr",null,[e[618]||(e[618]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),g("td",GKn,[J(g("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[238]||(e[238]=T=>o.configFile.activate_lollms_itt_server=T),onChange:e[239]||(e[239]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_itt_server]])])]),g("tr",null,[e[619]||(e[619]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),g("td",qKn,[J(g("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[240]||(e[240]=T=>o.configFile.activate_lollms_ttm_server=T),onChange:e[241]||(e[241]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_lollms_ttm_server]])])]),g("tr",null,[e[620]||(e[620]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),g("td",zKn,[J(g("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[242]||(e[242]=T=>o.configFile.activate_ollama_emulator=T),onChange:e[243]||(e[243]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_ollama_emulator]])])]),g("tr",null,[e[621]||(e[621]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),g("td",jKn,[J(g("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[244]||(e[244]=T=>o.configFile.activate_openai_emulator=T),onChange:e[245]||(e[245]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_openai_emulator]])])]),g("tr",null,[e[622]||(e[622]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),g("td",WKn,[J(g("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[246]||(e[246]=T=>o.configFile.activate_mistralai_emulator=T),onChange:e[247]||(e[247]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_mistralai_emulator]])])])])]),_:1}),oe(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",YKn,[g("tr",null,[e[623]||(e[623]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),g("td",null,[g("div",KKn,[J(g("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[248]||(e[248]=T=>o.configFile.activate_audio_infos=T),onChange:e[249]||(e[249]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.activate_audio_infos]])])])]),g("tr",null,[e[624]||(e[624]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),g("td",null,[g("div",ZKn,[J(g("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[250]||(e[250]=T=>o.configFile.audio_auto_send_input=T),onChange:e[251]||(e[251]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.audio_auto_send_input]])])])]),g("tr",null,[e[625]||(e[625]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),g("td",null,[J(g("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[252]||(e[252]=T=>o.configFile.audio_silenceTimer=T),onChange:e[253]||(e[253]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.audio_silenceTimer]]),J(g("input",{"onUpdate:modelValue":e[254]||(e[254]=T=>o.configFile.audio_silenceTimer=T),onChange:e[255]||(e[255]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_silenceTimer]])])]),g("tr",null,[e[626]||(e[626]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),g("td",null,[J(g("select",{id:"audio_in_language","onUpdate:modelValue":e[256]||(e[256]=T=>o.configFile.audio_in_language=T),onChange:e[257]||(e[257]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.audioLanguages,T=>(k(),P("option",{key:T.code,value:T.code},le(T.name),9,XKn))),128))],544),[[dn,o.configFile.audio_in_language]])])])])]),_:1}),oe(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",JKn,[g("tr",null,[e[627]||(e[627]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),g("td",null,[g("div",eZn,[J(g("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[258]||(e[258]=T=>o.configFile.whisper_activate=T),onChange:e[259]||(e[259]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.whisper_activate]])])])]),g("tr",null,[e[628]||(e[628]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}})],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[260]||(e[260]=(...T)=>o.reinstallWhisperService&&o.reinstallWhisperService(...T))},"install whisper")])]),g("tr",null,[e[629]||(e[629]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),g("td",null,[g("div",tZn,[J(g("select",{id:"whisper_model","onUpdate:modelValue":e[261]||(e[261]=T=>o.configFile.whisper_model=T),onChange:e[262]||(e[262]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.whisperModels,T=>(k(),P("option",{key:T,value:T},le(T),9,nZn))),128))],544),[[dn,o.configFile.whisper_model]])])])])])]),_:1}),oe(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",rZn,[g("tr",null,[e[630]||(e[630]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),g("td",null,[g("div",iZn,[J(g("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[263]||(e[263]=T=>o.configFile.openai_whisper_key=T),onChange:e[264]||(e[264]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_whisper_key]])])])]),g("tr",null,[e[631]||(e[631]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),g("td",null,[g("div",oZn,[J(g("select",{id:"openai_whisper_model","onUpdate:modelValue":e[265]||(e[265]=T=>o.configFile.openai_whisper_model=T),onChange:e[266]||(e[266]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(o.openaiWhisperModels,T=>(k(),P("option",{key:T,value:T},le(T),9,sZn))),128))],544),[[dn,o.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",aZn,[g("tr",null,[e[632]||(e[632]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),g("td",null,[g("div",lZn,[J(g("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[267]||(e[267]=T=>o.configFile.auto_speak=T),onChange:e[268]||(e[268]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_speak]])])])]),g("tr",null,[e[633]||(e[633]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),g("td",null,[J(g("input",{id:"audio_pitch","onUpdate:modelValue":e[269]||(e[269]=T=>o.configFile.audio_pitch=T),onChange:e[270]||(e[270]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.audio_pitch]]),J(g("input",{"onUpdate:modelValue":e[271]||(e[271]=T=>o.configFile.audio_pitch=T),onChange:e[272]||(e[272]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_pitch]])])]),g("tr",null,[e[634]||(e[634]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),g("td",null,[J(g("select",{id:"audio_out_voice","onUpdate:modelValue":e[273]||(e[273]=T=>o.configFile.audio_out_voice=T),onChange:e[274]||(e[274]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.audioVoices,T=>(k(),P("option",{key:T.name,value:T.name},le(T.name),9,cZn))),128))],544),[[dn,o.configFile.audio_out_voice]])])])])]),_:1}),oe(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",uZn,[g("tr",null,[e[635]||(e[635]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[275]||(e[275]=(...T)=>o.reinstallXTTSService&&o.reinstallXTTSService(...T))},"install xtts service")])]),g("tr",null,[e[636]||(e[636]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("div",dZn,[J(g("select",{"onUpdate:modelValue":e[276]||(e[276]=T=>o.xtts_current_language=T),onChange:e[277]||(e[277]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voice_languages,(T,Q)=>(k(),P("option",{key:Q,value:T},le(Q),9,fZn))),128))],544),[[dn,o.xtts_current_language]])])])]),g("tr",null,[e[637]||(e[637]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),g("td",null,[g("div",pZn,[J(g("select",{"onUpdate:modelValue":e[278]||(e[278]=T=>o.xtts_current_voice=T),onChange:e[279]||(e[279]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voices,T=>(k(),P("option",{key:T,value:T},le(T),9,hZn))),128))],544),[[dn,o.xtts_current_voice]])])])]),g("tr",null,[e[638]||(e[638]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),g("td",null,[g("div",TZn,[J(g("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[280]||(e[280]=T=>o.configFile.xtts_freq=T),onChange:e[281]||(e[281]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_freq,void 0,{number:!0}]])])])]),g("tr",null,[e[639]||(e[639]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),g("td",null,[g("div",mZn,[J(g("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[282]||(e[282]=T=>o.configFile.auto_read=T),onChange:e[283]||(e[283]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.auto_read]])])])]),g("tr",null,[e[640]||(e[640]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),g("td",null,[g("div",gZn,[J(g("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[284]||(e[284]=T=>o.configFile.xtts_stream_chunk_size=T),onChange:e[285]||(e[285]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_stream_chunk_size]])])])]),g("tr",null,[e[641]||(e[641]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),g("td",null,[g("div",_Zn,[J(g("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[286]||(e[286]=T=>o.configFile.xtts_temperature=T),onChange:e[287]||(e[287]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_temperature,void 0,{number:!0}]])])])]),g("tr",null,[e[642]||(e[642]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),g("td",null,[g("div",QZn,[J(g("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[288]||(e[288]=T=>o.configFile.xtts_length_penalty=T),onChange:e[289]||(e[289]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[643]||(e[643]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),g("td",null,[g("div",vZn,[J(g("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[290]||(e[290]=T=>o.configFile.xtts_repetition_penalty=T),onChange:e[291]||(e[291]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[644]||(e[644]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),g("td",null,[g("div",yZn,[J(g("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[292]||(e[292]=T=>o.configFile.xtts_top_k=T),onChange:e[293]||(e[293]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_k,void 0,{number:!0}]])])])]),g("tr",null,[e[645]||(e[645]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),g("td",null,[g("div",bZn,[J(g("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[294]||(e[294]=T=>o.configFile.xtts_top_p=T),onChange:e[295]||(e[295]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_p,void 0,{number:!0}]])])])]),g("tr",null,[e[646]||(e[646]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),g("td",null,[g("div",EZn,[J(g("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[296]||(e[296]=T=>o.configFile.xtts_speed=T),onChange:e[297]||(e[297]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_speed,void 0,{number:!0}]])])])]),g("tr",null,[e[647]||(e[647]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),g("td",null,[g("div",xZn,[J(g("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[298]||(e[298]=T=>o.configFile.enable_text_splitting=T),onChange:e[299]||(e[299]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_text_splitting]])])])])])]),_:1}),oe(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",SZn,[g("tr",null,[e[648]||(e[648]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),g("td",null,[g("div",LZn,[J(g("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[300]||(e[300]=T=>o.configFile.openai_tts_key=T),onChange:e[301]||(e[301]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_tts_key]])])])]),g("tr",null,[e[650]||(e[650]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),g("td",null,[g("div",CZn,[J(g("select",{"onUpdate:modelValue":e[302]||(e[302]=T=>o.configFile.openai_tts_model=T),onChange:e[303]||(e[303]=T=>i.settingsChanged=!0)},e[649]||(e[649]=[g("option",null," tts-1 ",-1),g("option",null," tts-2 ",-1)]),544),[[dn,o.configFile.openai_tts_model]])])])]),g("tr",null,[e[652]||(e[652]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),g("td",null,[g("div",AZn,[J(g("select",{"onUpdate:modelValue":e[304]||(e[304]=T=>o.configFile.openai_tts_voice=T),onChange:e[305]||(e[305]=T=>i.settingsChanged=!0)},e[651]||(e[651]=[g("option",null," alloy ",-1),g("option",null," echo ",-1),g("option",null," fable ",-1),g("option",null," nova ",-1),g("option",null," shimmer ",-1)]),544),[[dn,o.configFile.openai_tts_voice]])])])])])]),_:1}),oe(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",wZn,[g("tr",null,[e[653]||(e[653]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),g("td",null,[g("div",MZn,[J(g("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[306]||(e[306]=T=>o.configFile.elevenlabs_tts_key=T),onChange:e[307]||(e[307]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_key]])])])]),g("tr",null,[e[654]||(e[654]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),g("td",null,[g("div",OZn,[J(g("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[308]||(e[308]=T=>o.configFile.elevenlabs_tts_model_id=T),onChange:e[309]||(e[309]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_model_id]])])])]),g("tr",null,[e[655]||(e[655]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),g("td",null,[g("div",RZn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[310]||(e[310]=T=>o.configFile.elevenlabs_tts_voice_stability=T),onChange:e[311]||(e[311]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[we,o.configFile.elevenlabs_tts_voice_stability]])])])]),g("tr",null,[e[656]||(e[656]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),g("td",null,[g("div",NZn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[312]||(e[312]=T=>o.configFile.elevenlabs_tts_voice_boost=T),onChange:e[313]||(e[313]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[we,o.configFile.elevenlabs_tts_voice_boost]])])])]),g("tr",null,[e[657]||(e[657]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),g("td",null,[g("div",DZn,[J(g("select",{"onUpdate:modelValue":e[314]||(e[314]=T=>o.configFile.elevenlabs_tts_voice_id=T),onChange:e[315]||(e[315]=T=>i.settingsChanged=!0)},[(k(!0),P(ze,null,at(i.voices,T=>(k(),P("option",{key:T.voice_id,value:T.voice_id},le(T.name),9,IZn))),128))],544),[[dn,o.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),oe(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",kZn,[g("tr",null,[e[658]||(e[658]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),g("td",null,[g("div",PZn,[J(g("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[316]||(e[316]=T=>o.configFile.fish_tts_key=T),onChange:e[317]||(e[317]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_key]])])])]),g("tr",null,[e[659]||(e[659]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),g("td",null,[g("div",HZn,[J(g("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[318]||(e[318]=T=>o.configFile.fish_tts_voice=T),onChange:e[319]||(e[319]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",VZn,[g("tr",null,[e[661]||(e[661]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),g("td",null,[g("div",FZn,[J(g("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[320]||(e[320]=T=>o.configFile.enable_sd_service=T),onChange:e[321]||(e[321]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_sd_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[322]||(e[322]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[660]||(e[660]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[663]||(e[663]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),g("td",null,[g("div",BZn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[323]||(e[323]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(...T)=>o.upgradeSDService&&o.upgradeSDService(...T))},"upgrade sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(...T)=>o.startSDService&&o.startSDService(...T))},"start sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[326]||(e[326]=(...T)=>o.showSD&&o.showSD(...T))},"show sd ui"),e[662]||(e[662]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1))])]),g("td",null,[g("div",$Zn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[327]||(e[327]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service")])])]),g("tr",null,[e[664]||(e[664]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),g("td",null,[g("div",UZn,[J(g("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[328]||(e[328]=T=>o.configFile.sd_base_url=T),onChange:e[329]||(e[329]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.sd_base_url]])])])])])]),_:1}),oe(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",GZn,[g("tr",null,[e[666]||(e[666]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),g("td",null,[g("div",qZn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[330]||(e[330]=(...T)=>o.reinstallDiffusersService&&o.reinstallDiffusersService(...T))},"install diffusers service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(...T)=>o.upgradeDiffusersService&&o.upgradeDiffusersService(...T))},"upgrade diffusers service"),e[665]||(e[665]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1))])])]),g("tr",null,[e[667]||(e[667]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),g("td",null,[g("div",zZn,[J(g("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[332]||(e[332]=T=>o.configFile.diffusers_model=T),onChange:e[333]||(e[333]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_model]])])]),e[668]||(e[668]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",jZn,[g("tr",null,[e[669]||(e[669]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),g("td",null,[g("div",WZn,[J(g("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[334]||(e[334]=T=>o.configFile.diffusers_client_base_url=T),onChange:e[335]||(e[335]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_client_base_url]])])]),e[670]||(e[670]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",YZn,[g("tr",null,[e[671]||(e[671]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),g("td",null,[g("div",KZn,[J(g("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[336]||(e[336]=T=>o.configFile.midjourney_key=T),onChange:e[337]||(e[337]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_key]])])])]),g("tr",null,[e[672]||(e[672]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),g("td",null,[g("div",ZZn,[J(g("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[338]||(e[338]=T=>o.configFile.midjourney_timeout=T),onChange:e[339]||(e[339]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_timeout]])])])]),g("tr",null,[e[673]||(e[673]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),g("td",null,[g("div",XZn,[J(g("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[340]||(e[340]=T=>o.configFile.midjourney_retries=T),onChange:e[341]||(e[341]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_retries]])])])])])]),_:1}),oe(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",JZn,[g("tr",null,[e[674]||(e[674]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),g("td",null,[g("div",eXn,[J(g("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[342]||(e[342]=T=>o.configFile.dall_e_key=T),onChange:e[343]||(e[343]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.dall_e_key]])])])]),g("tr",null,[e[676]||(e[676]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),g("td",null,[g("div",tXn,[J(g("select",{"onUpdate:modelValue":e[344]||(e[344]=T=>o.configFile.dall_e_generation_engine=T),onChange:e[345]||(e[345]=T=>i.settingsChanged=!0)},e[675]||(e[675]=[g("option",null," dall-e-2 ",-1),g("option",null," dall-e-3 ",-1)]),544),[[dn,o.configFile.dall_e_generation_engine]])])])])])]),_:1}),oe(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",nXn,[g("tr",null,[e[678]||(e[678]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),g("td",null,[g("div",rXn,[J(g("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[346]||(e[346]=T=>o.configFile.enable_comfyui_service=T),onChange:e[347]||(e[347]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_comfyui_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[348]||(e[348]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[677]||(e[677]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[679]||(e[679]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),g("td",null,[g("div",iXn,[J(g("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[349]||(e[349]=T=>o.configFile.comfyui_model=T),onChange:e[350]||(e[350]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),P(ze,null,at(i.comfyui_models,(T,Q)=>(k(),P("option",{key:T,value:T},le(T),9,oXn))),128))],544),[[dn,o.configFile.comfyui_model]])])])]),g("tr",null,[e[681]||(e[681]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),g("td",null,[g("div",sXn,[J(g("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[351]||(e[351]=T=>o.configFile.comfyui_model=T),onChange:e[352]||(e[352]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_model]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=T=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[680]||(e[680]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[683]||(e[683]=g("td",{style:{"min-width":"200px"}},null,-1)),g("td",null,[g("div",aXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(...T)=>o.reinstallComfyUIService&&o.reinstallComfyUIService(...T))},"install comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[355]||(e[355]=(...T)=>o.upgradeComfyUIService&&o.upgradeComfyUIService(...T))},"upgrade comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[356]||(e[356]=(...T)=>o.startComfyUIService&&o.startComfyUIService(...T))},"start comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[357]||(e[357]=(...T)=>o.showComfyui&&o.showComfyui(...T))},"show comfyui"),e[682]||(e[682]=g("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1))])])]),g("tr",null,[e[684]||(e[684]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),g("td",null,[g("div",lXn,[J(g("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[358]||(e[358]=T=>o.configFile.comfyui_base_url=T),onChange:e[359]||(e[359]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",cXn,[g("tr",null,[e[686]||(e[686]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),g("td",null,[g("div",uXn,[J(g("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[360]||(e[360]=T=>o.configFile.enable_ollama_service=T),onChange:e[361]||(e[361]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_ollama_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=T=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -
Here is how you can do that`))},e[685]||(e[685]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[687]||(e[687]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),g("td",null,[g("div",uXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[363]||(e[363]=(...T)=>o.reinstallOLLAMAService&&o.reinstallOLLAMAService(...T))},"install ollama service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[364]||(e[364]=(...T)=>o.startollamaService&&o.startollamaService(...T))},"start ollama service")])])]),g("tr",null,[e[688]||(e[688]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),g("td",null,[g("div",dXn,[J(g("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[365]||(e[365]=T=>o.configFile.ollama_base_url=T),onChange:e[366]||(e[366]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.ollama_base_url]])])])])])]),_:1}),oe(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",fXn,[g("tr",null,[e[690]||(e[690]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),g("td",null,[g("div",pXn,[J(g("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[367]||(e[367]=T=>o.configFile.enable_vllm_service=T),onChange:e[368]||(e[368]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_vllm_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[369]||(e[369]=T=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. +Here is how you can do that`))},e[685]||(e[685]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[687]||(e[687]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),g("td",null,[g("div",dXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[363]||(e[363]=(...T)=>o.reinstallOLLAMAService&&o.reinstallOLLAMAService(...T))},"install ollama service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[364]||(e[364]=(...T)=>o.startollamaService&&o.startollamaService(...T))},"start ollama service")])])]),g("tr",null,[e[688]||(e[688]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),g("td",null,[g("div",fXn,[J(g("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[365]||(e[365]=T=>o.configFile.ollama_base_url=T),onChange:e[366]||(e[366]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.ollama_base_url]])])])])])]),_:1}),oe(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",pXn,[g("tr",null,[e[690]||(e[690]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),g("td",null,[g("div",hXn,[J(g("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[367]||(e[367]=T=>o.configFile.enable_vllm_service=T),onChange:e[368]||(e[368]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_vllm_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[369]||(e[369]=T=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},e[689]||(e[689]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[691]||(e[691]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),g("td",null,[g("div",hXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(...T)=>o.reinstallvLLMService&&o.reinstallvLLMService(...T))},"install vLLM service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(...T)=>o.startvLLMService&&o.startvLLMService(...T))},"start vllm service")])])]),g("tr",null,[e[692]||(e[692]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),g("td",null,[g("div",TXn,[J(g("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[372]||(e[372]=T=>o.configFile.vllm_url=T),onChange:e[373]||(e[373]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_url]])])])]),g("tr",null,[e[694]||(e[694]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),g("td",null,[g("div",mXn,[g("div",gXn,[e[693]||(e[693]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),g("p",_Xn,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[374]||(e[374]=T=>o.configFile.vllm_gpu_memory_utilization=T),onChange:e[375]||(e[375]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.vllm_gpu_memory_utilization]])])]),J(g("input",{id:"vllm_gpu_memory_utilization",onChange:e[376]||(e[376]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[377]||(e[377]=T=>o.configFile.vllm_gpu_memory_utilization=T),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.vllm_gpu_memory_utilization]])])])]),g("tr",null,[e[695]||(e[695]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),g("td",null,[g("div",QXn,[J(g("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[378]||(e[378]=T=>o.configFile.vllm_max_num_seqs=T),onChange:e[379]||(e[379]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_num_seqs]])])])]),g("tr",null,[e[696]||(e[696]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),g("td",null,[g("div",vXn,[J(g("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[380]||(e[380]=T=>o.configFile.vllm_max_model_len=T),onChange:e[381]||(e[381]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_model_len]])])])]),g("tr",null,[e[697]||(e[697]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),g("td",null,[g("div",yXn,[J(g("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[382]||(e[382]=T=>o.configFile.vllm_model_path=T),onChange:e[383]||(e[383]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_model_path]])])])])])]),_:1}),oe(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",bXn,[g("tr",null,[e[699]||(e[699]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),g("td",null,[g("div",EXn,[J(g("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[384]||(e[384]=T=>o.configFile.enable_petals_service=T),onChange:e[385]||(e[385]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_petals_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[386]||(e[386]=T=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. +Here is how you can do that`))},e[689]||(e[689]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[691]||(e[691]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),g("td",null,[g("div",TXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(...T)=>o.reinstallvLLMService&&o.reinstallvLLMService(...T))},"install vLLM service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(...T)=>o.startvLLMService&&o.startvLLMService(...T))},"start vllm service")])])]),g("tr",null,[e[692]||(e[692]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),g("td",null,[g("div",mXn,[J(g("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[372]||(e[372]=T=>o.configFile.vllm_url=T),onChange:e[373]||(e[373]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_url]])])])]),g("tr",null,[e[694]||(e[694]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),g("td",null,[g("div",gXn,[g("div",_Xn,[e[693]||(e[693]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),g("p",QXn,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[374]||(e[374]=T=>o.configFile.vllm_gpu_memory_utilization=T),onChange:e[375]||(e[375]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.vllm_gpu_memory_utilization]])])]),J(g("input",{id:"vllm_gpu_memory_utilization",onChange:e[376]||(e[376]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[377]||(e[377]=T=>o.configFile.vllm_gpu_memory_utilization=T),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.vllm_gpu_memory_utilization]])])])]),g("tr",null,[e[695]||(e[695]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),g("td",null,[g("div",vXn,[J(g("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[378]||(e[378]=T=>o.configFile.vllm_max_num_seqs=T),onChange:e[379]||(e[379]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_num_seqs]])])])]),g("tr",null,[e[696]||(e[696]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),g("td",null,[g("div",yXn,[J(g("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[380]||(e[380]=T=>o.configFile.vllm_max_model_len=T),onChange:e[381]||(e[381]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_model_len]])])])]),g("tr",null,[e[697]||(e[697]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),g("td",null,[g("div",bXn,[J(g("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[382]||(e[382]=T=>o.configFile.vllm_model_path=T),onChange:e[383]||(e[383]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_model_path]])])])])])]),_:1}),oe(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",EXn,[g("tr",null,[e[699]||(e[699]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),g("td",null,[g("div",xXn,[J(g("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[384]||(e[384]=T=>o.configFile.enable_petals_service=T),onChange:e[385]||(e[385]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.enable_petals_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[386]||(e[386]=T=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},e[698]||(e[698]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[700]||(e[700]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),g("td",null,[g("div",xXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[387]||(e[387]=(...T)=>o.reinstallPetalsService&&o.reinstallPetalsService(...T))},"install petals service")])])]),g("tr",null,[e[701]||(e[701]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),g("td",null,[g("div",SXn,[J(g("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[388]||(e[388]=T=>o.configFile.petals_base_url=T),onChange:e[389]||(e[389]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",LXn,[g("tr",null,[e[702]||(e[702]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"lumalabs_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Lumalabs key:")],-1)),g("td",null,[g("div",CXn,[J(g("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[390]||(e[390]=T=>o.configFile.lumalabs_key=T),onChange:e[391]||(e[391]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.lumalabs_key]])])])])])]),_:1}),oe(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",AXn,[g("tr",null,[e[703]||(e[703]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),g("td",null,[g("div",wXn,[J(g("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[392]||(e[392]=T=>o.configFile.elastic_search_service=T),onChange:e[393]||(e[393]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.elastic_search_service]])])])]),g("tr",null,[e[704]||(e[704]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),g("td",null,[g("div",MXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[394]||(e[394]=(...T)=>o.reinstallElasticSearchService&&o.reinstallElasticSearchService(...T))},"install ElasticSearch service")])])]),g("tr",null,[e[705]||(e[705]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),g("td",null,[g("div",OXn,[J(g("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[395]||(e[395]=T=>o.configFile.elastic_search_url=T),onChange:e[396]||(e[396]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),g("div",RXn,[g("div",NXn,[g("button",{onClick:e[397]||(e[397]=he(T=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[706]||(e[706]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.bzc_collapsed]]),J(g("div",null,e[707]||(e[707]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.bzc_collapsed]]),e[709]||(e[709]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),o.configFile.binding_name?ne("",!0):(k(),P("div",DXn,e[708]||(e[708]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" No binding selected! ")]))),o.configFile.binding_name?(k(),P("div",IXn,"|")):ne("",!0),o.configFile.binding_name?(k(),P("div",kXn,[g("div",PXn,[g("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,HXn),g("p",VXn,le(o.binding_name),1)])])):ne("",!0)])]),g("div",{class:We([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsZoo&&o.bindingsZoo.length>0?(k(),P("div",FXn,[g("label",BXn," Bindings: ("+le(o.bindingsZoo.length)+") ",1),g("div",{class:We(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.bindingsZoo,(T,Q)=>(k(),wt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+Q+"-"+T.folder,binding:T,"on-selected":o.onBindingSelected,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:T.folder===o.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):ne("",!0),i.bzl_collapsed?(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[398]||(e[398]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[710]||(e[710]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[399]||(e[399]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[711]||(e[711]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",$Xn,[g("div",UXn,[g("button",{onClick:e[400]||(e[400]=he(T=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[712]||(e[712]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mzc_collapsed]]),J(g("div",null,e[713]||(e[713]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mzc_collapsed]]),e[716]||(e[716]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),g("div",GXn,[o.configFile.binding_name?ne("",!0):(k(),P("div",qXn,e[714]||(e[714]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" Select binding first! ")]))),!o.configFile.model_name&&o.configFile.binding_name?(k(),P("div",zXn,e[715]||(e[715]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" No model selected! ")]))):ne("",!0),o.configFile.model_name?(k(),P("div",jXn,"|")):ne("",!0),o.configFile.model_name?(k(),P("div",WXn,[g("div",YXn,[g("img",{src:o.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,KXn),g("p",ZXn,le(o.configFile.model_name),1)])])):ne("",!0)])])]),g("div",{class:We([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",XXn,[g("div",JXn,[g("div",eJn,[i.searchModelInProgress?(k(),P("div",tJn,e[717]||(e[717]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),i.searchModelInProgress?ne("",!0):(k(),P("div",nJn,e[718]||(e[718]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),J(g("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[401]||(e[401]=T=>i.searchModel=T),onKeyup:e[402]||(e[402]=Xr((...T)=>o.searchModel_func&&o.searchModel_func(...T),["enter"]))},null,544),[[we,i.searchModel]]),i.searchModel?(k(),P("button",{key:0,onClick:e[403]||(e[403]=he(T=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):ne("",!0)])]),g("div",null,[J(g("input",{"onUpdate:modelValue":e[404]||(e[404]=T=>i.show_only_installed_models=T),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[nt,i.show_only_installed_models]]),e[719]||(e[719]=g("label",{for:"only_installed"},"Show only installed models",-1))]),g("div",null,[oe(u,{radioOptions:i.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[727]||(e[727]=g("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),i.is_loading_zoo?(k(),P("div",rJn,e[720]||(e[720]=[g("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),g("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):ne("",!0),i.models_zoo&&i.models_zoo.length>0?(k(),P("div",iJn,[g("label",oJn," Models: ("+le(i.models_zoo.length)+") ",1),g("div",{class:We(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",i.mzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.rendered_models_zoo,(T,Q)=>(k(),wt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+Q+"-"+T.name,model:T,"is-installed":T.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onModelSelected,selected:T.name===o.configFile.model_name,model_type:T.model_type,"on-copy":o.onCopy,"on-copy-link":o.onCopyLink,"on-cancel-install":o.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),g("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[405]||(e[405]=(...T)=>o.load_more_models&&o.load_more_models(...T))},"Load more models",512)]),_:1})],2)])):ne("",!0),i.mzl_collapsed?(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[406]||(e[406]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[721]||(e[721]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[407]||(e[407]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[722]||(e[722]=[g("i",{"data-feather":"chevron-down"},null,-1)]))),g("div",sJn,[g("div",aJn,[g("div",null,[g("div",lJn,[e[723]||(e[723]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[408]||(e[408]=T=>i.reference_path=T),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[we,i.reference_path]])]),g("button",{type:"button",onClick:e[409]||(e[409]=he(T=>o.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?ne("",!0):(k(),P("div",cJn,[g("div",uJn,[e[724]||(e[724]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[410]||(e[410]=T=>i.addModel.url=T),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[we,i.addModel.url]])]),g("button",{type:"button",onClick:e[411]||(e[411]=he(T=>o.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(k(),P("div",dJn,[e[726]||(e[726]=g("div",{role:"status",class:"justify-center"},null,-1)),g("div",fJn,[g("div",pJn,[g("div",hJn,[e[725]||(e[725]=j1(' Downloading Loading...',1)),g("span",TJn,le(Math.floor(i.addModel.progress))+"%",1)]),g("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},le(i.addModel.url),9,mJn),g("div",gJn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.addModel.progress+"%"})},null,4)]),g("div",_Jn,[g("span",QJn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",vJn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",yJn,[g("div",bJn,[g("div",EJn,[g("button",{onClick:e[412]||(e[412]=he((...T)=>o.onCancelInstall&&o.onCancelInstall(...T),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):ne("",!0)])])],2)]),g("div",xJn,[g("div",SJn,[g("button",{onClick:e[415]||(e[415]=he(T=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[J(g("div",null,e[728]||(e[728]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.pzc_collapsed]]),J(g("div",null,e[729]||(e[729]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.pzc_collapsed]]),e[732]||(e[732]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),o.configFile.personalities?(k(),P("div",LJn,"|")):ne("",!0),g("div",CJn,le(o.active_pesonality),1),o.configFile.personalities?(k(),P("div",AJn,"|")):ne("",!0),o.configFile.personalities?(k(),P("div",wJn,[o.mountedPersArr.length>0?(k(),P("div",MJn,[(k(!0),P(ze,null,at(o.mountedPersArr,(T,Q)=>(k(),P("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:Q+"-"+T.name,ref_for:!0,ref:"mountedPersonalities"},[g("div",OJn,[g("button",{onClick:he(_=>o.onPersonalitySelected(T),["stop"])},[g("img",{src:i.bUrl+T.avatar,onError:e[413]||(e[413]=(..._)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(..._)),class:We(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",o.configFile.active_personality_id==o.configFile.personalities.indexOf(T.full_path)?"border-secondary":"border-transparent z-0"]),title:T.name},null,42,NJn)],8,RJn),g("button",{onClick:he(_=>o.unmountPersonality(T),["stop"])},e[730]||(e[730]=[g("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[g("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)]),8,DJn)])]))),128))])):ne("",!0)])):ne("",!0),g("button",{onClick:e[414]||(e[414]=he(T=>o.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},e[731]||(e[731]=[g("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])]),g("div",{class:We([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",IJn,[e[735]||(e[735]=g("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),g("div",kJn,[g("div",PJn,[i.searchPersonalityInProgress?(k(),P("div",HJn,e[733]||(e[733]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),i.searchPersonalityInProgress?ne("",!0):(k(),P("div",VJn,e[734]||(e[734]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),J(g("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[416]||(e[416]=T=>i.searchPersonality=T),onKeyup:e[417]||(e[417]=he((...T)=>o.searchPersonality_func&&o.searchPersonality_func(...T),["stop"]))},null,544),[[we,i.searchPersonality]]),i.searchPersonality?(k(),P("button",{key:0,onClick:e[418]||(e[418]=he(T=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):ne("",!0)])]),i.searchPersonality?ne("",!0):(k(),P("div",FJn,[g("label",BJn," Personalities Category: ("+le(i.persCatgArr.length)+") ",1),g("select",{id:"persCat",onChange:e[419]||(e[419]=T=>o.update_personality_category(T.target.value,o.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(k(!0),P(ze,null,at(i.persCatgArr,(T,Q)=>(k(),P("option",{key:Q,selected:T==this.configFile.personality_category},le(T),9,$Jn))),128))],32)])),g("div",null,[i.personalitiesFiltered.length>0?(k(),P("div",UJn,[g("label",GJn,le(i.searchPersonality?"Search results":"Personalities")+": ("+le(i.personalitiesFiltered.length)+") ",1),g("div",{class:We(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"bounce"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.personalitiesFiltered,(T,Q)=>(k(),wt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+Q+"-"+T.name,personality:T,select_language:!0,full_path:T.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(_=>_===T.full_path||_===T.full_path+":"+T.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName,"on-copy-to_custom":o.onCopyToCustom,"on-open-folder":o.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):ne("",!0)]),i.pzl_collapsed?(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[420]||(e[420]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[736]||(e[736]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[421]||(e[421]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[737]||(e[737]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",qJn,[g("div",zJn,[g("button",{onClick:e[422]||(e[422]=he(T=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[738]||(e[738]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mc_collapsed]]),J(g("div",null,e[739]||(e[739]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mc_collapsed]]),e[740]||(e[740]=g("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),g("div",{class:We([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[g("div",jJn,[g("div",WJn,[J(g("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[423]||(e[423]=he(()=>{},["stop"])),"onUpdate:modelValue":e[424]||(e[424]=T=>o.configFile.override_personality_model_parameters=T),onChange:e[425]||(e[425]=T=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[nt,o.configFile.override_personality_model_parameters]]),e[741]||(e[741]=g("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),g("div",{class:We(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[g("div",YJn,[e[742]||(e[742]=g("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),J(g("input",{type:"text",id:"seed","onUpdate:modelValue":e[426]||(e[426]=T=>o.configFile.seed=T),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[we,o.configFile.seed]])]),g("div",KJn,[g("div",ZJn,[g("div",XJn,[e[743]||(e[743]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),g("p",JJn,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[427]||(e[427]=T=>o.configFile.temperature=T),onChange:e[428]||(e[428]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.temperature]])])]),J(g("input",{id:"temperature",onChange:e[429]||(e[429]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[430]||(e[430]=T=>o.configFile.temperature=T),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.temperature]])])]),g("div",eer,[g("div",ter,[g("div",ner,[e[744]||(e[744]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),g("p",rer,[J(g("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[431]||(e[431]=T=>o.configFile.n_predict=T),onChange:e[432]||(e[432]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.n_predict]])])]),J(g("input",{id:"predict",type:"range",onChange:e[433]||(e[433]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[434]||(e[434]=T=>o.configFile.n_predict=T),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.n_predict]])])]),g("div",ier,[g("div",oer,[g("div",ser,[e[745]||(e[745]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),g("p",aer,[J(g("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[435]||(e[435]=T=>o.configFile.top_k=T),onChange:e[436]||(e[436]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_k]])])]),J(g("input",{id:"top_k",type:"range",onChange:e[437]||(e[437]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[438]||(e[438]=T=>o.configFile.top_k=T),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_k]])])]),g("div",ler,[g("div",cer,[g("div",uer,[e[746]||(e[746]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),g("p",der,[J(g("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[439]||(e[439]=T=>o.configFile.top_p=T),onChange:e[440]||(e[440]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_p]])])]),J(g("input",{id:"top_p",type:"range","onUpdate:modelValue":e[441]||(e[441]=T=>o.configFile.top_p=T),min:"0",max:"1",step:"0.01",onChange:e[442]||(e[442]=T=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_p]])])]),g("div",fer,[g("div",per,[g("div",her,[e[747]||(e[747]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),g("p",Ter,[J(g("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[443]||(e[443]=T=>o.configFile.repeat_penalty=T),onChange:e[444]||(e[444]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_penalty]])])]),J(g("input",{id:"repeat_penalty",onChange:e[445]||(e[445]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[446]||(e[446]=T=>o.configFile.repeat_penalty=T),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_penalty]])])]),g("div",mer,[g("div",ger,[g("div",_er,[e[748]||(e[748]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),g("p",Qer,[J(g("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[447]||(e[447]=T=>o.configFile.repeat_last_n=T),onChange:e[448]||(e[448]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_last_n]])])]),J(g("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[449]||(e[449]=T=>o.configFile.repeat_last_n=T),min:"0",max:"100",step:"1",onChange:e[450]||(e[450]=T=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),oe(f,{ref:"addmodeldialog"},null,512),oe(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const yer=yt(_jn,[["render",ver],["__scopeId","data-v-19e3bad8"]]),ber={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};ve.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Eer={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},xer={class:"mb-4"},Ser=["value"],Ler={class:"mb-4"},Cer={class:"mb-4"},Aer={class:"mb-4"},wer={class:"mb-4"},Mer={class:"mb-4"},Oer={class:"mb-4"},Rer={key:1};function Ner(t,e,n,r,i,o){const s=pt("Card"),a=pt("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(k(),P("div",Eer,[g("form",{onSubmit:e[2]||(e[2]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[oe(s,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>[oe(s,{title:"Model",class:"",isHorizontal:!1},{default:Ve(()=>[g("div",xer,[e[3]||(e[3]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),J(g("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),P(ze,null,at(o.models,l=>(k(),P("option",{key:l,value:l},le(l),9,Ser))),128))],544),[[dn,o.selectedModel]])])]),_:1}),oe(s,{title:"Data",isHorizontal:!1},{default:Ve(()=>[g("div",Ler,[e[4]||(e[4]=g("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),oe(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),oe(s,{title:"Training",isHorizontal:!1},{default:Ve(()=>[g("div",Cer,[e[5]||(e[5]=g("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),g("div",Aer,[e[6]||(e[6]=g("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),g("div",wer,[e[7]||(e[7]=g("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),g("div",Mer,[e[8]||(e[8]=g("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),oe(s,{title:"Output",isHorizontal:!1},{default:Ve(()=>[g("div",Oer,[e[9]||(e[9]=g("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),oe(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),oe(s,{disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>e[10]||(e[10]=[g("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),P("div",Rer,[oe(s,{title:"Info",class:"",isHorizontal:!1},{default:Ve(()=>e[11]||(e[11]=[ft(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const Der=yt(ber,[["render",Ner]]),Ier={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},ker={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Per={class:"mb-4"},Her={class:"mb-4"};function Ver(t,e,n,r,i,o){const s=pt("ClipBoardTextInput"),a=pt("Card");return k(),P("div",ker,[g("form",{onSubmit:e[0]||(e[0]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>[oe(a,{title:"Model",class:"",isHorizontal:!1},{default:Ve(()=>[g("div",Per,[e[1]||(e[1]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),g("div",Her,[e[2]||(e[2]=g("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>e[3]||(e[3]=[g("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const Fer=yt(Ier,[["render",Ver]]),Ber={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,qe(()=>{Ze.replace()})},watch:{showConfirmation(){qe(()=>{Ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&qe(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&qe(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},$er=["id"],Uer={class:"flex flex-row items-center gap-2"},Ger={key:0},qer={class:"flex flex-row items-center w-full"},zer=["title"],jer=["value"],Wer={class:"absolute top-0 right-0 h-full flex items-center group"},Yer={class:"discussion-toolbox"},Ker={key:0,class:"flex gap-2 items-center"},Zer={key:1,class:"flex gap-2 items-center"};function Xer(t,e,n,r,i,o){return k(),P("div",{class:We([n.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative w-[15rem]"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=he(s=>o.selectEvent(),["stop"]))},[g("div",Uer,[n.isCheckbox?(k(),P("div",Ger,[J(g("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=he(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=s=>i.checkBoxValue_local=s),onInput:e[2]||(e[2]=s=>o.checkedChangeEvent(s,n.id))},null,544),[[nt,i.checkBoxValue_local]])])):ne("",!0),n.selected?(k(),P("div",{key:1,class:We(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):ne("",!0),n.selected?ne("",!0):(k(),P("div",{key:2,class:We(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),g("div",qer,[i.editTitle?ne("",!0):(k(),P("p",{key:0,title:n.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},le(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,zer)),i.editTitle?(k(),P("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=Xr(he(s=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Xr(he(s=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=s=>o.chnageTitle(s.target.value)),onClick:e[6]||(e[6]=he(()=>{},["stop"]))},null,40,jer)):ne("",!0)]),g("div",Wer,[g("div",Yer,[i.showConfirmation?(k(),P("div",Ker,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=he(s=>o.cancel(),["stop"]))},e[14]||(e[14]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=he(s=>i.editTitleMode?o.editTitleEvent():i.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),i.showConfirmation?ne("",!0):(k(),P("div",Zer,[n.openfolder_enabled?(k(),P("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=he(s=>o.openFolderEvent(),["stop"]))},e[16]||(e[16]=[g("i",{"data-feather":"folder"},null,-1)]))):ne("",!0),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=he(s=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"type"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=he(s=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"edit-2"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=he(s=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[g("i",{"data-feather":"trash"},null,-1)]))]))])])],10,$er)}const kb=yt(Ber,[["render",Xer],["__scopeId","data-v-2b3580ce"]]),Jer={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},etr={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},ttr={class:"bg-white p-8 rounded"},ntr={class:"text-xl font-bold mb-4"};function rtr(t,e,n,r,i,o){return k(),P("div",null,[i.show?(k(),P("div",etr,[g("div",ttr,[g("h2",ntr,le(n.promptText),1),J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.inputText=s),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[we,i.inputText]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.ok&&o.ok(...s)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),g("button",{onClick:e[2]||(e[2]=(...s)=>o.cancel&&o.cancel(...s)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):ne("",!0)])}const itr=yt(Jer,[["render",rtr]]),otr={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:kb,MarkdownRenderer:T9},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){ve.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),ve.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){console.log("loading skill",t),ve.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),ve.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){ve.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},str={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},atr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},ltr={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},ctr={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"};function utr(t,e,n,r,i,o){const s=pt("Discussion"),a=pt("MarkdownRenderer");return k(),P("div",{class:We([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[g("div",str,[g("div",atr,[J(g("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=Xr((...l)=>o.searchSkills&&o.searchSkills(...l),["enter"]))},null,544),[[we,i.searchQuery]]),g("div",ltr,[e[3]||(e[3]=g("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.titles,l=>(k(),wt(s,{key:l.id,id:l.id,title:l.title,selected:o.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>o.fetchContent(l.id),onDelete:c=>o.deleteSkill(l.id),onEditTitle:o.editTitle,onMakeTitle:o.makeTitle,onChecked:o.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0)])]),g("div",ctr,[e[4]||(e[4]=g("h2",{class:"text-xl font-bold m-4"},"Content",-1)),oe(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),g("button",{onClick:e[2]||(e[2]=(...l)=>o.closeComponent&&o.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const rU=yt(otr,[["render",utr]]),dtr={props:{htmlContent:{type:String,required:!0}}},ftr=["innerHTML"];function ptr(t,e,n,r,i,o){return k(),P("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:n.htmlContent},null,8,ftr)}const htr=yt(dtr,[["render",ptr]]),Ttr={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},mtr={class:"json-tree-view"},gtr=["onClick"],_tr={key:0,class:"toggle-icon"},Qtr={class:"key"},vtr={key:0,class:"json-nested"};function ytr(t,e,n,r,i,o){const s=pt("json-tree-view",!0);return k(),P("div",mtr,[(k(!0),P(ze,null,at(n.data,(a,l)=>(k(),P("div",{key:l,class:"json-item"},[g("div",{class:"json-key",onClick:c=>o.toggleCollapse(l)},[o.isObject(a)||o.isArray(a)?(k(),P("span",_tr,[g("i",{class:We(o.isCollapsed(l)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):ne("",!0),g("span",Qtr,le(l)+":",1),!o.isObject(a)&&!o.isArray(a)?(k(),P("span",{key:1,class:We(["value",o.getValueType(a)])},le(o.formatValue(a)),3)):ne("",!0)],8,gtr),(o.isObject(a)||o.isArray(a))&&!o.isCollapsed(l)?(k(),P("div",vtr,[oe(s,{data:a,depth:n.depth+1},null,8,["data","depth"])])):ne("",!0)]))),128))])}const btr=yt(Ttr,[["render",ytr],["__scopeId","data-v-40406ec6"]]),Etr={components:{JsonTreeView:btr},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},xtr={key:0,class:"json-viewer"},Str={class:"toggle-icon"},Ltr={class:"json-content panels-color"};function Ctr(t,e,n,r,i,o){const s=pt("json-tree-view");return o.isContentPresent?(k(),P("div",xtr,[g("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>o.toggleCollapsible&&o.toggleCollapsible(...a))},[g("span",Str,[g("i",{class:We(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),ft(" "+le(n.jsonFormText),1)]),J(g("div",Ltr,[oe(s,{data:o.parsedJsonData,depth:0},null,8,["data"])],512),[[Pt,!i.collapsed]])])):ne("",!0)}const Atr=yt(Etr,[["render",Ctr],["__scopeId","data-v-83fc9727"]]),wtr={props:{done:Boolean,text:String,status:Boolean,description:String}},Mtr={class:"step-wrapper"},Otr={class:"step-icon"},Rtr={key:0,class:"icon-success",viewBox:"0 0 24 24"},Ntr={key:1,class:"icon-fail",viewBox:"0 0 24 24"},Dtr={key:1,class:"icon-spinner"},Itr={class:"step-content"},ktr={class:"step-text"},Ptr={key:0,class:"step-description"};function Htr(t,e,n,r,i,o){return k(),P("div",{class:We(["step-container",{"step-done":n.done}])},[g("div",Mtr,[g("div",Otr,[n.done?(k(),P(ze,{key:0},[n.status?(k(),P("svg",Rtr,e[0]||(e[0]=[g("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(k(),P("svg",Ntr,e[1]||(e[1]=[g("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)])))],64)):(k(),P("div",Dtr))]),g("div",Itr,[g("h3",ktr,le(n.text||"No text provided"),1),n.description?(k(),P("p",Ptr,le(n.description),1)):ne("",!0)])])],2)}const Vtr=yt(wtr,[["render",Htr]]),Ftr="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20480%20480'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M240,0C107.664,0,0,107.664,0,240s107.664,240,240,240s240-107.664,240-240S372.336,0,240,0z%20M240,460%20c-121.309,0-220-98.691-220-220S118.691,20,240,20s220,98.691,220,220S361.309,460,240,460z'/%3e%3cpath%20d='M410,194.999h-27.058c-2.643-8.44-6-16.56-10.03-24.271l19.158-19.158c3.776-3.775,5.854-8.79,5.854-14.121%20c0-5.332-2.08-10.347-5.854-14.121l-35.399-35.399c-3.775-3.775-8.79-5.854-14.122-5.854c-5.331,0-10.346,2.079-14.121,5.854%20l-19.158,19.158c-7.711-4.03-15.832-7.386-24.271-10.03V70c0-11.028-8.972-20-20-20h-50c-11.028,0-20,8.972-20,20v27.058%20c-8.44,2.643-16.56,6-24.271,10.03L151.57,87.93c-3.775-3.776-8.79-5.854-14.121-5.854c-5.332,0-10.347,2.08-14.121,5.854%20l-35.399,35.399c-3.775,3.775-5.854,8.79-5.854,14.122c0,5.331,2.079,10.346,5.854,14.121l19.158,19.158%20c-4.03,7.711-7.386,15.832-10.03,24.271H70c-11.028,0-20,8.972-20,20v50c0,11.028,8.972,20,20,20h27.057%20c2.643,8.44,6,16.56,10.03,24.271L87.929,328.43c-3.776,3.775-5.854,8.79-5.854,14.121c0,5.332,2.08,10.347,5.854,14.121%20l35.399,35.399c3.775,3.775,8.79,5.854,14.122,5.854c5.331,0,10.346-2.079,14.121-5.854l19.158-19.158%20c7.711,4.03,15.832,7.386,24.271,10.03V410c0,11.028,8.972,20,20,20h50c11.028,0,20-8.972,20.001-20v-27.058%20c8.44-2.643,16.56-6,24.271-10.03l19.158,19.158c3.775,3.776,8.79,5.854,14.121,5.854c5.332,0,10.347-2.08,14.121-5.854%20l35.399-35.399c3.775-3.775,5.854-8.79,5.854-14.122c0-5.331-2.079-10.346-5.854-14.121l-19.158-19.158%20c4.03-7.711,7.386-15.832,10.03-24.271H410c11.028,0,20-8.972,20-20v-50C430,203.971,421.028,194.999,410,194.999z%20M410,264.998%20h-34.598c-4.562,0-8.544,3.086-9.684,7.503c-3.069,11.901-7.716,23.133-13.813,33.387c-2.337,3.931-1.71,8.948,1.524,12.182%20l24.5,24.457l-35.357,35.4l-24.5-24.5c-3.236-3.235-8.253-3.86-12.182-1.524c-10.254,6.097-21.487,10.745-33.387,13.813%20c-4.417,1.14-7.503,5.122-7.503,9.684V410h-50v-34.599c0-4.562-3.086-8.544-7.503-9.684%20c-11.901-3.069-23.133-7.716-33.387-13.813c-1.587-0.944-3.353-1.404-5.107-1.404c-2.586,0-5.147,1.002-7.073,2.931l-24.457,24.5%20l-35.4-35.357l24.5-24.5c3.234-3.235,3.861-8.251,1.524-12.182c-6.097-10.254-10.745-21.487-13.813-33.387%20c-1.14-4.417-5.122-7.503-9.684-7.503H70v-50h34.596c4.562,0,8.544-3.086,9.684-7.503c3.069-11.901,7.716-23.133,13.813-33.387%20c2.337-3.931,1.71-8.948-1.524-12.182l-24.5-24.457l35.357-35.4l24.5,24.5c3.236,3.235,8.253,3.861,12.182,1.524%20c10.254-6.097,21.487-10.745,33.387-13.813c4.417-1.14,7.503-5.122,7.503-9.684V70h50v34.596c0,4.562,3.086,8.544,7.503,9.684%20c11.901,3.069,23.133,7.716,33.387,13.813c3.929,2.337,8.947,1.709,12.182-1.524l24.457-24.5l35.4,35.357l-24.5,24.5%20c-3.234,3.235-3.861,8.251-1.524,12.182c6.097,10.254,10.745,21.487,13.813,33.387c1.14,4.417,5.122,7.503,9.684,7.503H410%20V264.998z'/%3e%3cpath%20d='M331.585,292.475l-40-35l-13.17,15.051L298.386,290H240c-27.57,0-50-22.43-50-50h-20c0,38.598,31.402,70,70,70h58.386%20l-19.971,17.475l13.17,15.051l40-35c2.17-1.898,3.415-4.642,3.415-7.525S333.755,294.373,331.585,292.475z'/%3e%3cpath%20d='M201.585,207.473L181.614,190H240c27.57,0,50,22.43,50,50h20c0-38.598-31.402-70-70-70h-58.386l19.971-17.475%20l-13.17-15.051l-40,35c-2.17,1.898-3.415,4.642-3.415,7.525s1.245,5.627,3.415,7.525l40,35L201.585,207.473z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20240%20240'%20to='360%20240%20240'%20dur='10s'%20repeatCount='indefinite'%20/%3e%3c/svg%3e",Btr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%3e%3cpath%20d='M25%200C11.6%200%200%2011.6%200%2025s11.6%2025%2025%2025%2025-11.6%2025-25S40.4%200%2025%200zm0%2048C12.8%2048%202%2039.2%202%2025S12.8%202%2025%202s24%2010.8%2024%2024-10.8%2024-24%2024zm-4-33l-8%208%2018%2018%2030-30-8-8-22%2022L22%2016'%20fill='green'/%3e%3c/svg%3e",$tr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012%2019%206.41z'%20fill='red'/%3e%3c/svg%3e",iU="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20white;%20stroke-width:%202px;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2089.999%203.075%20C%2090%203.02%2090%202.967%2089.999%202.912%20c%20-0.004%20-0.134%20-0.017%20-0.266%20-0.038%20-0.398%20c%20-0.007%20-0.041%20-0.009%20-0.081%20-0.018%20-0.122%20c%20-0.034%20-0.165%20-0.082%20-0.327%20-0.144%20-0.484%20c%20-0.018%20-0.046%20-0.041%20-0.089%20-0.061%20-0.134%20c%20-0.053%20-0.119%20-0.113%20-0.234%20-0.182%20-0.346%20C%2089.528%201.382%2089.5%201.336%2089.469%201.29%20c%20-0.102%20-0.147%20-0.212%20-0.288%20-0.341%20-0.417%20c%20-0.13%20-0.13%20-0.273%20-0.241%20-0.421%20-0.344%20c%20-0.042%20-0.029%20-0.085%20-0.056%20-0.129%20-0.082%20c%20-0.118%20-0.073%20-0.239%20-0.136%20-0.364%20-0.191%20c%20-0.039%20-0.017%20-0.076%20-0.037%20-0.116%20-0.053%20c%20-0.161%20-0.063%20-0.327%20-0.113%20-0.497%20-0.147%20c%20-0.031%20-0.006%20-0.063%20-0.008%20-0.094%20-0.014%20c%20-0.142%20-0.024%20-0.285%20-0.038%20-0.429%20-0.041%20C%2087.03%200%2086.983%200%2086.936%200.001%20c%20-0.141%200.003%20-0.282%200.017%20-0.423%200.041%20c%20-0.035%200.006%20-0.069%200.008%20-0.104%200.015%20c%20-0.154%200.031%20-0.306%200.073%20-0.456%200.129%20L%201.946%2031.709%20c%20-1.124%200.422%20-1.888%201.473%20-1.943%202.673%20c%20-0.054%201.199%200.612%202.316%201.693%202.838%20l%2034.455%2016.628%20l%2016.627%2034.455%20C%2053.281%2089.344%2054.334%2090%2055.481%2090%20c%200.046%200%200.091%20-0.001%200.137%20-0.003%20c%201.199%20-0.055%202.251%20-0.819%202.673%20-1.943%20L%2089.815%204.048%20c%200.056%20-0.149%200.097%20-0.3%200.128%20-0.453%20c%200.008%20-0.041%200.011%20-0.081%200.017%20-0.122%20C%2089.982%203.341%2089.995%203.208%2089.999%203.075%20z%20M%2075.086%2010.672%20L%2037.785%2047.973%20L%2010.619%2034.864%20L%2075.086%2010.672%20z%20M%2055.136%2079.381%20L%2042.027%2052.216%20l%2037.302%20-37.302%20L%2055.136%2079.381%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='75'%20cy='75'%20r='15'%20fill='%23008000'/%3e%3cpath%20d='M75,60%20A15,15%200%200,1%2090,75%20A15,15%200%200,1%2075,90%20A15,15%200%200,1%2060,75%20A15,15%200%200,1%2075,60%20Z'%20stroke='%23FFFFFF'%20stroke-width='2'%20fill='none'/%3e%3cpath%20d='M81,75%20A6,6%200%200,1%2075,81%20A6,6%200%200,1%2069,75%20A6,6%200%200,1%2075,69%20A6,6%200%200,1%2081,75%20Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e",Utr="/",Gtr={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:T9,Step:Vtr,RenderHTMLJS:htr,JsonViewer:Atr,DynamicUIRenderer:nU,ToolbarButton:_b,DropdownMenu:G$},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,json_block:w$,javascript_block:A$,process_svg:Ftr,ok_svg:Btr,failed_svg:$tr,loading_svg:D$,sendGlobe:iU,code_block:L$,python_block:C$,bash_block:N$,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),qe(()=>{Ze.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60));n-=r*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const o=Math.floor(n/1e3);return n-=o*1e3,[r,i,o]},insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,i=t.shiftKey;if(n===r)if(i){if(e.value.substring(n-4,n)==" "){const o=e.value.substring(0,n-4),s=e.value.substring(r),a=o+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const o=e.value.substring(0,n),s=e.value.substring(r),a=o+" "+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const s=e.value.substring(n,r).split(` +Here is how you can do that`))},e[698]||(e[698]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[700]||(e[700]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),g("td",null,[g("div",SXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[387]||(e[387]=(...T)=>o.reinstallPetalsService&&o.reinstallPetalsService(...T))},"install petals service")])])]),g("tr",null,[e[701]||(e[701]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),g("td",null,[g("div",LXn,[J(g("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[388]||(e[388]=T=>o.configFile.petals_base_url=T),onChange:e[389]||(e[389]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",CXn,[g("tr",null,[e[702]||(e[702]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"lumalabs_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Lumalabs key:")],-1)),g("td",null,[g("div",AXn,[J(g("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[390]||(e[390]=T=>o.configFile.lumalabs_key=T),onChange:e[391]||(e[391]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.lumalabs_key]])])])])])]),_:1}),oe(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[oe(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ve(()=>[g("table",wXn,[g("tr",null,[e[703]||(e[703]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),g("td",null,[g("div",MXn,[J(g("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[392]||(e[392]=T=>o.configFile.elastic_search_service=T),onChange:e[393]||(e[393]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[nt,o.configFile.elastic_search_service]])])])]),g("tr",null,[e[704]||(e[704]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),g("td",null,[g("div",OXn,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[394]||(e[394]=(...T)=>o.reinstallElasticSearchService&&o.reinstallElasticSearchService(...T))},"install ElasticSearch service")])])]),g("tr",null,[e[705]||(e[705]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),g("td",null,[g("div",RXn,[J(g("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[395]||(e[395]=T=>o.configFile.elastic_search_url=T),onChange:e[396]||(e[396]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),g("div",NXn,[g("div",DXn,[g("button",{onClick:e[397]||(e[397]=he(T=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[J(g("div",null,e[706]||(e[706]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.bzc_collapsed]]),J(g("div",null,e[707]||(e[707]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.bzc_collapsed]]),e[709]||(e[709]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),o.configFile.binding_name?ne("",!0):(k(),P("div",IXn,e[708]||(e[708]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" No binding selected! ")]))),o.configFile.binding_name?(k(),P("div",kXn,"|")):ne("",!0),o.configFile.binding_name?(k(),P("div",PXn,[g("div",HXn,[g("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,VXn),g("p",FXn,le(o.binding_name),1)])])):ne("",!0)])]),g("div",{class:We([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsZoo&&o.bindingsZoo.length>0?(k(),P("div",BXn,[g("label",$Xn," Bindings: ("+le(o.bindingsZoo.length)+") ",1),g("div",{class:We(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.bindingsZoo,(T,Q)=>(k(),wt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+Q+"-"+T.folder,binding:T,"on-selected":o.onBindingSelected,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:T.folder===o.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):ne("",!0),i.bzl_collapsed?(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[398]||(e[398]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[710]||(e[710]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[399]||(e[399]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[711]||(e[711]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",UXn,[g("div",GXn,[g("button",{onClick:e[400]||(e[400]=he(T=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[712]||(e[712]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mzc_collapsed]]),J(g("div",null,e[713]||(e[713]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mzc_collapsed]]),e[716]||(e[716]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),g("div",qXn,[o.configFile.binding_name?ne("",!0):(k(),P("div",zXn,e[714]||(e[714]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" Select binding first! ")]))),!o.configFile.model_name&&o.configFile.binding_name?(k(),P("div",jXn,e[715]||(e[715]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),ft(" No model selected! ")]))):ne("",!0),o.configFile.model_name?(k(),P("div",WXn,"|")):ne("",!0),o.configFile.model_name?(k(),P("div",YXn,[g("div",KXn,[g("img",{src:o.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,ZXn),g("p",XXn,le(o.configFile.model_name),1)])])):ne("",!0)])])]),g("div",{class:We([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",JXn,[g("div",eJn,[g("div",tJn,[i.searchModelInProgress?(k(),P("div",nJn,e[717]||(e[717]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),i.searchModelInProgress?ne("",!0):(k(),P("div",rJn,e[718]||(e[718]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),J(g("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[401]||(e[401]=T=>i.searchModel=T),onKeyup:e[402]||(e[402]=Xr((...T)=>o.searchModel_func&&o.searchModel_func(...T),["enter"]))},null,544),[[we,i.searchModel]]),i.searchModel?(k(),P("button",{key:0,onClick:e[403]||(e[403]=he(T=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):ne("",!0)])]),g("div",null,[J(g("input",{"onUpdate:modelValue":e[404]||(e[404]=T=>i.show_only_installed_models=T),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[nt,i.show_only_installed_models]]),e[719]||(e[719]=g("label",{for:"only_installed"},"Show only installed models",-1))]),g("div",null,[oe(u,{radioOptions:i.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[727]||(e[727]=g("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),i.is_loading_zoo?(k(),P("div",iJn,e[720]||(e[720]=[g("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),g("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):ne("",!0),i.models_zoo&&i.models_zoo.length>0?(k(),P("div",oJn,[g("label",sJn," Models: ("+le(i.models_zoo.length)+") ",1),g("div",{class:We(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",i.mzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.rendered_models_zoo,(T,Q)=>(k(),wt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+Q+"-"+T.name,model:T,"is-installed":T.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onModelSelected,selected:T.name===o.configFile.model_name,model_type:T.model_type,"on-copy":o.onCopy,"on-copy-link":o.onCopyLink,"on-cancel-install":o.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),g("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[405]||(e[405]=(...T)=>o.load_more_models&&o.load_more_models(...T))},"Load more models",512)]),_:1})],2)])):ne("",!0),i.mzl_collapsed?(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[406]||(e[406]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[721]||(e[721]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[407]||(e[407]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[722]||(e[722]=[g("i",{"data-feather":"chevron-down"},null,-1)]))),g("div",aJn,[g("div",lJn,[g("div",null,[g("div",cJn,[e[723]||(e[723]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[408]||(e[408]=T=>i.reference_path=T),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[we,i.reference_path]])]),g("button",{type:"button",onClick:e[409]||(e[409]=he(T=>o.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?ne("",!0):(k(),P("div",uJn,[g("div",dJn,[e[724]||(e[724]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[410]||(e[410]=T=>i.addModel.url=T),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[we,i.addModel.url]])]),g("button",{type:"button",onClick:e[411]||(e[411]=he(T=>o.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(k(),P("div",fJn,[e[726]||(e[726]=g("div",{role:"status",class:"justify-center"},null,-1)),g("div",pJn,[g("div",hJn,[g("div",TJn,[e[725]||(e[725]=j1(' Downloading Loading...',1)),g("span",mJn,le(Math.floor(i.addModel.progress))+"%",1)]),g("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},le(i.addModel.url),9,gJn),g("div",_Jn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.addModel.progress+"%"})},null,4)]),g("div",QJn,[g("span",vJn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",yJn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",bJn,[g("div",EJn,[g("div",xJn,[g("button",{onClick:e[412]||(e[412]=he((...T)=>o.onCancelInstall&&o.onCancelInstall(...T),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):ne("",!0)])])],2)]),g("div",SJn,[g("div",LJn,[g("button",{onClick:e[415]||(e[415]=he(T=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[J(g("div",null,e[728]||(e[728]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.pzc_collapsed]]),J(g("div",null,e[729]||(e[729]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.pzc_collapsed]]),e[732]||(e[732]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),o.configFile.personalities?(k(),P("div",CJn,"|")):ne("",!0),g("div",AJn,le(o.active_pesonality),1),o.configFile.personalities?(k(),P("div",wJn,"|")):ne("",!0),o.configFile.personalities?(k(),P("div",MJn,[o.mountedPersArr.length>0?(k(),P("div",OJn,[(k(!0),P(ze,null,at(o.mountedPersArr,(T,Q)=>(k(),P("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:Q+"-"+T.name,ref_for:!0,ref:"mountedPersonalities"},[g("div",RJn,[g("button",{onClick:he(_=>o.onPersonalitySelected(T),["stop"])},[g("img",{src:i.bUrl+T.avatar,onError:e[413]||(e[413]=(..._)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(..._)),class:We(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",o.configFile.active_personality_id==o.configFile.personalities.indexOf(T.full_path)?"border-secondary":"border-transparent z-0"]),title:T.name},null,42,DJn)],8,NJn),g("button",{onClick:he(_=>o.unmountPersonality(T),["stop"])},e[730]||(e[730]=[g("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[g("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)]),8,IJn)])]))),128))])):ne("",!0)])):ne("",!0),g("button",{onClick:e[414]||(e[414]=he(T=>o.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},e[731]||(e[731]=[g("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])]),g("div",{class:We([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",kJn,[e[735]||(e[735]=g("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),g("div",PJn,[g("div",HJn,[i.searchPersonalityInProgress?(k(),P("div",VJn,e[733]||(e[733]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),i.searchPersonalityInProgress?ne("",!0):(k(),P("div",FJn,e[734]||(e[734]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),J(g("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[416]||(e[416]=T=>i.searchPersonality=T),onKeyup:e[417]||(e[417]=he((...T)=>o.searchPersonality_func&&o.searchPersonality_func(...T),["stop"]))},null,544),[[we,i.searchPersonality]]),i.searchPersonality?(k(),P("button",{key:0,onClick:e[418]||(e[418]=he(T=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):ne("",!0)])]),i.searchPersonality?ne("",!0):(k(),P("div",BJn,[g("label",$Jn," Personalities Category: ("+le(i.persCatgArr.length)+") ",1),g("select",{id:"persCat",onChange:e[419]||(e[419]=T=>o.update_personality_category(T.target.value,o.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(k(!0),P(ze,null,at(i.persCatgArr,(T,Q)=>(k(),P("option",{key:Q,selected:T==this.configFile.personality_category},le(T),9,UJn))),128))],32)])),g("div",null,[i.personalitiesFiltered.length>0?(k(),P("div",GJn,[g("label",qJn,le(i.searchPersonality?"Search results":"Personalities")+": ("+le(i.personalitiesFiltered.length)+") ",1),g("div",{class:We(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[oe(Ns,{name:"bounce"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.personalitiesFiltered,(T,Q)=>(k(),wt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+Q+"-"+T.name,personality:T,select_language:!0,full_path:T.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(_=>_===T.full_path||_===T.full_path+":"+T.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName,"on-copy-to_custom":o.onCopyToCustom,"on-open-folder":o.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):ne("",!0)]),i.pzl_collapsed?(k(),P("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[420]||(e[420]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[736]||(e[736]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),P("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[421]||(e[421]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[737]||(e[737]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",zJn,[g("div",jJn,[g("button",{onClick:e[422]||(e[422]=he(T=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[738]||(e[738]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mc_collapsed]]),J(g("div",null,e[739]||(e[739]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mc_collapsed]]),e[740]||(e[740]=g("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),g("div",{class:We([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[g("div",WJn,[g("div",YJn,[J(g("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[423]||(e[423]=he(()=>{},["stop"])),"onUpdate:modelValue":e[424]||(e[424]=T=>o.configFile.override_personality_model_parameters=T),onChange:e[425]||(e[425]=T=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[nt,o.configFile.override_personality_model_parameters]]),e[741]||(e[741]=g("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),g("div",{class:We(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[g("div",KJn,[e[742]||(e[742]=g("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),J(g("input",{type:"text",id:"seed","onUpdate:modelValue":e[426]||(e[426]=T=>o.configFile.seed=T),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[we,o.configFile.seed]])]),g("div",ZJn,[g("div",XJn,[g("div",JJn,[e[743]||(e[743]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),g("p",eer,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[427]||(e[427]=T=>o.configFile.temperature=T),onChange:e[428]||(e[428]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.temperature]])])]),J(g("input",{id:"temperature",onChange:e[429]||(e[429]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[430]||(e[430]=T=>o.configFile.temperature=T),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.temperature]])])]),g("div",ter,[g("div",ner,[g("div",rer,[e[744]||(e[744]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),g("p",ier,[J(g("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[431]||(e[431]=T=>o.configFile.n_predict=T),onChange:e[432]||(e[432]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.n_predict]])])]),J(g("input",{id:"predict",type:"range",onChange:e[433]||(e[433]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[434]||(e[434]=T=>o.configFile.n_predict=T),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.n_predict]])])]),g("div",oer,[g("div",ser,[g("div",aer,[e[745]||(e[745]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),g("p",ler,[J(g("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[435]||(e[435]=T=>o.configFile.top_k=T),onChange:e[436]||(e[436]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_k]])])]),J(g("input",{id:"top_k",type:"range",onChange:e[437]||(e[437]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[438]||(e[438]=T=>o.configFile.top_k=T),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_k]])])]),g("div",cer,[g("div",uer,[g("div",der,[e[746]||(e[746]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),g("p",fer,[J(g("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[439]||(e[439]=T=>o.configFile.top_p=T),onChange:e[440]||(e[440]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_p]])])]),J(g("input",{id:"top_p",type:"range","onUpdate:modelValue":e[441]||(e[441]=T=>o.configFile.top_p=T),min:"0",max:"1",step:"0.01",onChange:e[442]||(e[442]=T=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.top_p]])])]),g("div",per,[g("div",her,[g("div",Ter,[e[747]||(e[747]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),g("p",mer,[J(g("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[443]||(e[443]=T=>o.configFile.repeat_penalty=T),onChange:e[444]||(e[444]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_penalty]])])]),J(g("input",{id:"repeat_penalty",onChange:e[445]||(e[445]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[446]||(e[446]=T=>o.configFile.repeat_penalty=T),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_penalty]])])]),g("div",ger,[g("div",_er,[g("div",Qer,[e[748]||(e[748]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),g("p",ver,[J(g("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[447]||(e[447]=T=>o.configFile.repeat_last_n=T),onChange:e[448]||(e[448]=T=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_last_n]])])]),J(g("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[449]||(e[449]=T=>o.configFile.repeat_last_n=T),min:"0",max:"100",step:"1",onChange:e[450]||(e[450]=T=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[we,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),oe(f,{ref:"addmodeldialog"},null,512),oe(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const ber=yt(_jn,[["render",yer],["__scopeId","data-v-894fd226"]]),Eer={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};ve.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},xer={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Ser={class:"mb-4"},Ler=["value"],Cer={class:"mb-4"},Aer={class:"mb-4"},wer={class:"mb-4"},Mer={class:"mb-4"},Oer={class:"mb-4"},Rer={class:"mb-4"},Ner={key:1};function Der(t,e,n,r,i,o){const s=pt("Card"),a=pt("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(k(),P("div",xer,[g("form",{onSubmit:e[2]||(e[2]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[oe(s,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>[oe(s,{title:"Model",class:"",isHorizontal:!1},{default:Ve(()=>[g("div",Ser,[e[3]||(e[3]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),J(g("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),P(ze,null,at(o.models,l=>(k(),P("option",{key:l,value:l},le(l),9,Ler))),128))],544),[[dn,o.selectedModel]])])]),_:1}),oe(s,{title:"Data",isHorizontal:!1},{default:Ve(()=>[g("div",Cer,[e[4]||(e[4]=g("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),oe(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),oe(s,{title:"Training",isHorizontal:!1},{default:Ve(()=>[g("div",Aer,[e[5]||(e[5]=g("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),g("div",wer,[e[6]||(e[6]=g("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),g("div",Mer,[e[7]||(e[7]=g("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),g("div",Oer,[e[8]||(e[8]=g("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),oe(s,{title:"Output",isHorizontal:!1},{default:Ve(()=>[g("div",Rer,[e[9]||(e[9]=g("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),oe(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),oe(s,{disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>e[10]||(e[10]=[g("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),P("div",Ner,[oe(s,{title:"Info",class:"",isHorizontal:!1},{default:Ve(()=>e[11]||(e[11]=[ft(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const Ier=yt(Eer,[["render",Der]]),ker={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},Per={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Her={class:"mb-4"},Ver={class:"mb-4"};function Fer(t,e,n,r,i,o){const s=pt("ClipBoardTextInput"),a=pt("Card");return k(),P("div",Per,[g("form",{onSubmit:e[0]||(e[0]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>[oe(a,{title:"Model",class:"",isHorizontal:!1},{default:Ve(()=>[g("div",Her,[e[1]||(e[1]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),g("div",Ver,[e[2]||(e[2]=g("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ve(()=>e[3]||(e[3]=[g("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const Ber=yt(ker,[["render",Fer]]),$er={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,qe(()=>{Ze.replace()})},watch:{showConfirmation(){qe(()=>{Ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&qe(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&qe(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},Uer=["id"],Ger={class:"flex flex-row items-center gap-2"},qer={key:0},zer={class:"flex flex-row items-center w-full"},jer=["title"],Wer=["value"],Yer={class:"absolute top-0 right-0 h-full flex items-center group"},Ker={class:"discussion-toolbox"},Zer={key:0,class:"flex gap-2 items-center"},Xer={key:1,class:"flex gap-2 items-center"};function Jer(t,e,n,r,i,o){return k(),P("div",{class:We([n.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative w-[15rem]"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=he(s=>o.selectEvent(),["stop"]))},[g("div",Ger,[n.isCheckbox?(k(),P("div",qer,[J(g("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=he(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=s=>i.checkBoxValue_local=s),onInput:e[2]||(e[2]=s=>o.checkedChangeEvent(s,n.id))},null,544),[[nt,i.checkBoxValue_local]])])):ne("",!0),n.selected?(k(),P("div",{key:1,class:We(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):ne("",!0),n.selected?ne("",!0):(k(),P("div",{key:2,class:We(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),g("div",zer,[i.editTitle?ne("",!0):(k(),P("p",{key:0,title:n.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},le(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,jer)),i.editTitle?(k(),P("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=Xr(he(s=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Xr(he(s=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=s=>o.chnageTitle(s.target.value)),onClick:e[6]||(e[6]=he(()=>{},["stop"]))},null,40,Wer)):ne("",!0)]),g("div",Yer,[g("div",Ker,[i.showConfirmation?(k(),P("div",Zer,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=he(s=>o.cancel(),["stop"]))},e[14]||(e[14]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=he(s=>i.editTitleMode?o.editTitleEvent():i.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),i.showConfirmation?ne("",!0):(k(),P("div",Xer,[n.openfolder_enabled?(k(),P("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=he(s=>o.openFolderEvent(),["stop"]))},e[16]||(e[16]=[g("i",{"data-feather":"folder"},null,-1)]))):ne("",!0),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=he(s=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"type"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=he(s=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"edit-2"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=he(s=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[g("i",{"data-feather":"trash"},null,-1)]))]))])])],10,Uer)}const kb=yt($er,[["render",Jer],["__scopeId","data-v-2b3580ce"]]),etr={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(t){this.prompt=t}}},ttr={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},ntr={class:"bg-white p-8 rounded"},rtr={class:"text-xl font-bold mb-4"};function itr(t,e,n,r,i,o){return k(),P("div",null,[i.show?(k(),P("div",ttr,[g("div",ntr,[g("h2",rtr,le(n.promptText),1),J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.inputText=s),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[we,i.inputText]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.ok&&o.ok(...s)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),g("button",{onClick:e[2]||(e[2]=(...s)=>o.cancel&&o.cancel(...s)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):ne("",!0)])}const otr=yt(etr,[["render",itr]]),str={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:kb,MarkdownRenderer:T9},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){ve.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),ve.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){console.log("loading skill",t),ve.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),ve.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){ve.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},atr={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},ltr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},ctr={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},utr={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"};function dtr(t,e,n,r,i,o){const s=pt("Discussion"),a=pt("MarkdownRenderer");return k(),P("div",{class:We([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[g("div",atr,[g("div",ltr,[J(g("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=Xr((...l)=>o.searchSkills&&o.searchSkills(...l),["enter"]))},null,544),[[we,i.searchQuery]]),g("div",ctr,[e[3]||(e[3]=g("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.titles,l=>(k(),wt(s,{key:l.id,id:l.id,title:l.title,selected:o.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>o.fetchContent(l.id),onDelete:c=>o.deleteSkill(l.id),onEditTitle:o.editTitle,onMakeTitle:o.makeTitle,onChecked:o.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0)])]),g("div",utr,[e[4]||(e[4]=g("h2",{class:"text-xl font-bold m-4"},"Content",-1)),oe(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),g("button",{onClick:e[2]||(e[2]=(...l)=>o.closeComponent&&o.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const rU=yt(str,[["render",dtr]]),ftr={props:{htmlContent:{type:String,required:!0}}},ptr=["innerHTML"];function htr(t,e,n,r,i,o){return k(),P("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:n.htmlContent},null,8,ptr)}const Ttr=yt(ftr,[["render",htr]]),mtr={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},gtr={class:"json-tree-view"},_tr=["onClick"],Qtr={key:0,class:"toggle-icon"},vtr={class:"key"},ytr={key:0,class:"json-nested"};function btr(t,e,n,r,i,o){const s=pt("json-tree-view",!0);return k(),P("div",gtr,[(k(!0),P(ze,null,at(n.data,(a,l)=>(k(),P("div",{key:l,class:"json-item"},[g("div",{class:"json-key",onClick:c=>o.toggleCollapse(l)},[o.isObject(a)||o.isArray(a)?(k(),P("span",Qtr,[g("i",{class:We(o.isCollapsed(l)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):ne("",!0),g("span",vtr,le(l)+":",1),!o.isObject(a)&&!o.isArray(a)?(k(),P("span",{key:1,class:We(["value",o.getValueType(a)])},le(o.formatValue(a)),3)):ne("",!0)],8,_tr),(o.isObject(a)||o.isArray(a))&&!o.isCollapsed(l)?(k(),P("div",ytr,[oe(s,{data:a,depth:n.depth+1},null,8,["data","depth"])])):ne("",!0)]))),128))])}const Etr=yt(mtr,[["render",btr],["__scopeId","data-v-40406ec6"]]),xtr={components:{JsonTreeView:Etr},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},Str={key:0,class:"json-viewer"},Ltr={class:"toggle-icon"},Ctr={class:"json-content panels-color"};function Atr(t,e,n,r,i,o){const s=pt("json-tree-view");return o.isContentPresent?(k(),P("div",Str,[g("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>o.toggleCollapsible&&o.toggleCollapsible(...a))},[g("span",Ltr,[g("i",{class:We(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),ft(" "+le(n.jsonFormText),1)]),J(g("div",Ctr,[oe(s,{data:o.parsedJsonData,depth:0},null,8,["data"])],512),[[Pt,!i.collapsed]])])):ne("",!0)}const wtr=yt(xtr,[["render",Atr],["__scopeId","data-v-83fc9727"]]),Mtr={props:{done:Boolean,text:String,status:Boolean,description:String}},Otr={class:"step-wrapper"},Rtr={class:"step-icon"},Ntr={key:0,class:"icon-success",viewBox:"0 0 24 24"},Dtr={key:1,class:"icon-fail",viewBox:"0 0 24 24"},Itr={key:1,class:"icon-spinner"},ktr={class:"step-content"},Ptr={class:"step-text"},Htr={key:0,class:"step-description"};function Vtr(t,e,n,r,i,o){return k(),P("div",{class:We(["step-container",{"step-done":n.done}])},[g("div",Otr,[g("div",Rtr,[n.done?(k(),P(ze,{key:0},[n.status?(k(),P("svg",Ntr,e[0]||(e[0]=[g("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(k(),P("svg",Dtr,e[1]||(e[1]=[g("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)])))],64)):(k(),P("div",Itr))]),g("div",ktr,[g("h3",Ptr,le(n.text||"No text provided"),1),n.description?(k(),P("p",Htr,le(n.description),1)):ne("",!0)])])],2)}const Ftr=yt(Mtr,[["render",Vtr]]),Btr="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20480%20480'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M240,0C107.664,0,0,107.664,0,240s107.664,240,240,240s240-107.664,240-240S372.336,0,240,0z%20M240,460%20c-121.309,0-220-98.691-220-220S118.691,20,240,20s220,98.691,220,220S361.309,460,240,460z'/%3e%3cpath%20d='M410,194.999h-27.058c-2.643-8.44-6-16.56-10.03-24.271l19.158-19.158c3.776-3.775,5.854-8.79,5.854-14.121%20c0-5.332-2.08-10.347-5.854-14.121l-35.399-35.399c-3.775-3.775-8.79-5.854-14.122-5.854c-5.331,0-10.346,2.079-14.121,5.854%20l-19.158,19.158c-7.711-4.03-15.832-7.386-24.271-10.03V70c0-11.028-8.972-20-20-20h-50c-11.028,0-20,8.972-20,20v27.058%20c-8.44,2.643-16.56,6-24.271,10.03L151.57,87.93c-3.775-3.776-8.79-5.854-14.121-5.854c-5.332,0-10.347,2.08-14.121,5.854%20l-35.399,35.399c-3.775,3.775-5.854,8.79-5.854,14.122c0,5.331,2.079,10.346,5.854,14.121l19.158,19.158%20c-4.03,7.711-7.386,15.832-10.03,24.271H70c-11.028,0-20,8.972-20,20v50c0,11.028,8.972,20,20,20h27.057%20c2.643,8.44,6,16.56,10.03,24.271L87.929,328.43c-3.776,3.775-5.854,8.79-5.854,14.121c0,5.332,2.08,10.347,5.854,14.121%20l35.399,35.399c3.775,3.775,8.79,5.854,14.122,5.854c5.331,0,10.346-2.079,14.121-5.854l19.158-19.158%20c7.711,4.03,15.832,7.386,24.271,10.03V410c0,11.028,8.972,20,20,20h50c11.028,0,20-8.972,20.001-20v-27.058%20c8.44-2.643,16.56-6,24.271-10.03l19.158,19.158c3.775,3.776,8.79,5.854,14.121,5.854c5.332,0,10.347-2.08,14.121-5.854%20l35.399-35.399c3.775-3.775,5.854-8.79,5.854-14.122c0-5.331-2.079-10.346-5.854-14.121l-19.158-19.158%20c4.03-7.711,7.386-15.832,10.03-24.271H410c11.028,0,20-8.972,20-20v-50C430,203.971,421.028,194.999,410,194.999z%20M410,264.998%20h-34.598c-4.562,0-8.544,3.086-9.684,7.503c-3.069,11.901-7.716,23.133-13.813,33.387c-2.337,3.931-1.71,8.948,1.524,12.182%20l24.5,24.457l-35.357,35.4l-24.5-24.5c-3.236-3.235-8.253-3.86-12.182-1.524c-10.254,6.097-21.487,10.745-33.387,13.813%20c-4.417,1.14-7.503,5.122-7.503,9.684V410h-50v-34.599c0-4.562-3.086-8.544-7.503-9.684%20c-11.901-3.069-23.133-7.716-33.387-13.813c-1.587-0.944-3.353-1.404-5.107-1.404c-2.586,0-5.147,1.002-7.073,2.931l-24.457,24.5%20l-35.4-35.357l24.5-24.5c3.234-3.235,3.861-8.251,1.524-12.182c-6.097-10.254-10.745-21.487-13.813-33.387%20c-1.14-4.417-5.122-7.503-9.684-7.503H70v-50h34.596c4.562,0,8.544-3.086,9.684-7.503c3.069-11.901,7.716-23.133,13.813-33.387%20c2.337-3.931,1.71-8.948-1.524-12.182l-24.5-24.457l35.357-35.4l24.5,24.5c3.236,3.235,8.253,3.861,12.182,1.524%20c10.254-6.097,21.487-10.745,33.387-13.813c4.417-1.14,7.503-5.122,7.503-9.684V70h50v34.596c0,4.562,3.086,8.544,7.503,9.684%20c11.901,3.069,23.133,7.716,33.387,13.813c3.929,2.337,8.947,1.709,12.182-1.524l24.457-24.5l35.4,35.357l-24.5,24.5%20c-3.234,3.235-3.861,8.251-1.524,12.182c6.097,10.254,10.745,21.487,13.813,33.387c1.14,4.417,5.122,7.503,9.684,7.503H410%20V264.998z'/%3e%3cpath%20d='M331.585,292.475l-40-35l-13.17,15.051L298.386,290H240c-27.57,0-50-22.43-50-50h-20c0,38.598,31.402,70,70,70h58.386%20l-19.971,17.475l13.17,15.051l40-35c2.17-1.898,3.415-4.642,3.415-7.525S333.755,294.373,331.585,292.475z'/%3e%3cpath%20d='M201.585,207.473L181.614,190H240c27.57,0,50,22.43,50,50h20c0-38.598-31.402-70-70-70h-58.386l19.971-17.475%20l-13.17-15.051l-40,35c-2.17,1.898-3.415,4.642-3.415,7.525s1.245,5.627,3.415,7.525l40,35L201.585,207.473z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20240%20240'%20to='360%20240%20240'%20dur='10s'%20repeatCount='indefinite'%20/%3e%3c/svg%3e",$tr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%3e%3cpath%20d='M25%200C11.6%200%200%2011.6%200%2025s11.6%2025%2025%2025%2025-11.6%2025-25S40.4%200%2025%200zm0%2048C12.8%2048%202%2039.2%202%2025S12.8%202%2025%202s24%2010.8%2024%2024-10.8%2024-24%2024zm-4-33l-8%208%2018%2018%2030-30-8-8-22%2022L22%2016'%20fill='green'/%3e%3c/svg%3e",Utr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012%2019%206.41z'%20fill='red'/%3e%3c/svg%3e",iU="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20white;%20stroke-width:%202px;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2089.999%203.075%20C%2090%203.02%2090%202.967%2089.999%202.912%20c%20-0.004%20-0.134%20-0.017%20-0.266%20-0.038%20-0.398%20c%20-0.007%20-0.041%20-0.009%20-0.081%20-0.018%20-0.122%20c%20-0.034%20-0.165%20-0.082%20-0.327%20-0.144%20-0.484%20c%20-0.018%20-0.046%20-0.041%20-0.089%20-0.061%20-0.134%20c%20-0.053%20-0.119%20-0.113%20-0.234%20-0.182%20-0.346%20C%2089.528%201.382%2089.5%201.336%2089.469%201.29%20c%20-0.102%20-0.147%20-0.212%20-0.288%20-0.341%20-0.417%20c%20-0.13%20-0.13%20-0.273%20-0.241%20-0.421%20-0.344%20c%20-0.042%20-0.029%20-0.085%20-0.056%20-0.129%20-0.082%20c%20-0.118%20-0.073%20-0.239%20-0.136%20-0.364%20-0.191%20c%20-0.039%20-0.017%20-0.076%20-0.037%20-0.116%20-0.053%20c%20-0.161%20-0.063%20-0.327%20-0.113%20-0.497%20-0.147%20c%20-0.031%20-0.006%20-0.063%20-0.008%20-0.094%20-0.014%20c%20-0.142%20-0.024%20-0.285%20-0.038%20-0.429%20-0.041%20C%2087.03%200%2086.983%200%2086.936%200.001%20c%20-0.141%200.003%20-0.282%200.017%20-0.423%200.041%20c%20-0.035%200.006%20-0.069%200.008%20-0.104%200.015%20c%20-0.154%200.031%20-0.306%200.073%20-0.456%200.129%20L%201.946%2031.709%20c%20-1.124%200.422%20-1.888%201.473%20-1.943%202.673%20c%20-0.054%201.199%200.612%202.316%201.693%202.838%20l%2034.455%2016.628%20l%2016.627%2034.455%20C%2053.281%2089.344%2054.334%2090%2055.481%2090%20c%200.046%200%200.091%20-0.001%200.137%20-0.003%20c%201.199%20-0.055%202.251%20-0.819%202.673%20-1.943%20L%2089.815%204.048%20c%200.056%20-0.149%200.097%20-0.3%200.128%20-0.453%20c%200.008%20-0.041%200.011%20-0.081%200.017%20-0.122%20C%2089.982%203.341%2089.995%203.208%2089.999%203.075%20z%20M%2075.086%2010.672%20L%2037.785%2047.973%20L%2010.619%2034.864%20L%2075.086%2010.672%20z%20M%2055.136%2079.381%20L%2042.027%2052.216%20l%2037.302%20-37.302%20L%2055.136%2079.381%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='75'%20cy='75'%20r='15'%20fill='%23008000'/%3e%3cpath%20d='M75,60%20A15,15%200%200,1%2090,75%20A15,15%200%200,1%2075,90%20A15,15%200%200,1%2060,75%20A15,15%200%200,1%2075,60%20Z'%20stroke='%23FFFFFF'%20stroke-width='2'%20fill='none'/%3e%3cpath%20d='M81,75%20A6,6%200%200,1%2075,81%20A6,6%200%200,1%2069,75%20A6,6%200%200,1%2075,69%20A6,6%200%200,1%2081,75%20Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e",Gtr="/",qtr={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:T9,Step:Ftr,RenderHTMLJS:Ttr,JsonViewer:wtr,DynamicUIRenderer:nU,ToolbarButton:_b,DropdownMenu:G$},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,json_block:w$,javascript_block:A$,process_svg:Btr,ok_svg:$tr,failed_svg:Utr,loading_svg:D$,sendGlobe:iU,code_block:L$,python_block:C$,bash_block:N$,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),qe(()=>{Ze.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60));n-=r*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const o=Math.floor(n/1e3);return n-=o*1e3,[r,i,o]},insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,i=t.shiftKey;if(n===r)if(i){if(e.value.substring(n-4,n)==" "){const o=e.value.substring(0,n-4),s=e.value.substring(r),a=o+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const o=e.value.substring(0,n),s=e.value.substring(r),a=o+" "+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const s=e.value.substring(n,r).split(` `).map(u=>u.trim()===""?u:i?u.startsWith(" ")?u.substring(4):u:" "+u),a=e.value.substring(0,n),l=e.value.substring(r),c=a+s.join(` `)+l;this.message.content=c,this.$nextTick(()=>{e.selectionStart=n,e.selectionEnd=r+s.length*4})}t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,ve.post("./text2wav",{text:this.message.content}).then(t=>{this.isSynthesizingVoice=!1;let e=t.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let n=!1;for(let r of this.message.metadata)Object.prototype.hasOwnProperty.call(r,"audio_url")&&(r.audio_url=this.audio_url,n=!0);n||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSynthesizingVoice=!1}))},async speak(){if(this.$store.state.config.active_tts_service!="browser"&&this.$store.state.config.active_tts_service!="None")this.isSpeaking?(this.isSpeaking=!0,ve.post("./stop",{text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1})):(this.isSpeaking=!0,ve.post("./text2Audio",{client_id:this.$store.state.client_id,text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1}));else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const n=i=>{let o=this.message.content.substring(i,i+e);const s=[".","!","?",` `];let a=-1;return s.forEach(l=>{const c=o.lastIndexOf(l);c>a&&(a=c)}),a==-1&&(a=o.length),console.log(a),a+i+1},r=()=>{if(this.message.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const i=n(t),o=this.message.content.substring(t,i);this.msg.text=o,t=i+1,this.msg.onend=s=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",i))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{r()},1)};console.log("Speaking chunk"),r()}},toggleModel(){this.expanded=!this.expanded},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+3+t.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+` `+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+` -`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Utr+this.avatar:(console.log("No avatar found"),co)},defaultImg(t){t.target.src=co},parseDate(t){let e=new Date(Date.parse(t)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(n/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){qe(()=>{Ze.replace()})},deleteMsgMode(){qe(()=>{Ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,qe(()=>{Ze.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let r,i,o;[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const o=Math.floor(i/1e3),s=n/o;return Math.round(s)+" t/s"}}},qtr={class:"relative message w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},ztr={class:"flex flex-row gap-2"},jtr={class:"flex-shrink-0"},Wtr={class:"group/avatar"},Ytr=["src","data-popover-target"],Ktr={class:"flex flex-col w-full flex-grow-0"},Ztr={class:"flex flex-row flex-grow items-start"},Xtr={class:"flex flex-col mb-2"},Jtr={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},enr=["title"],tnr={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary space-y-2"},nnr={key:1},rnr=["src"],inr={class:"message-details"},onr={key:0,class:"steps-container"},snr={class:"steps-icon"},anr={class:"steps-summary"},lnr={class:"steps-status"},cnr={class:"toggle-icon"},unr={key:0,class:"steps-content"},dnr={class:"steps-list"},fnr={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},pnr={class:"flex-row justify-end mx-2"},hnr={class:"invisible group-hover:visible flex flex-row"},Tnr={key:0},mnr={key:1},gnr={key:2},_nr={key:3},Qnr={key:4,class:"flex items-center duration-75"},vnr={class:"flex flex-row items-center"},ynr={class:"flex flex-row items-center"},bnr={key:6,class:"flex flex-row items-center"},Enr=["src"],xnr={class:"text-sm text-gray-400 mt-2"},Snr={class:"flex flex-row items-center gap-2"},Lnr={key:0},Cnr={class:"font-thin"},Anr={key:1},wnr={class:"font-thin"},Mnr={key:2},Onr={class:"font-thin"},Rnr={key:3},Nnr=["title"],Dnr={key:4},Inr=["title"],knr={key:5},Pnr=["title"],Hnr={key:6},Vnr=["title"];function Fnr(t,e,n,r,i,o){var T;const s=pt("MarkdownRenderer"),a=pt("JsonViewer"),l=pt("DynamicUIRenderer"),c=pt("StatusIcon"),u=pt("Step"),d=pt("RenderHTMLJS"),h=pt("ToolbarButton"),f=pt("DropdownSubmenu"),m=pt("DropdownMenu");return k(),P("div",qtr,[g("div",ztr,[g("div",jtr,[g("div",Wtr,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=Q=>o.defaultImg(Q)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Ytr)])]),g("div",Ktr,[g("div",Ztr,[g("div",Xtr,[g("div",Jtr,le(n.message.sender),1),n.message.created_at?(k(),P("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},le(o.created_at),9,enr)):ne("",!0)]),e[46]||(e[46]=g("div",{class:"flex-grow"},null,-1))]),g("div",tnr,[o.editMsgMode?ne("",!0):(k(),wt(s,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),g("div",null,[n.message.open?J((k(),P("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=Xr(he((...Q)=>o.insertTab&&o.insertTab(...Q),["prevent"]),["tab"])),class:"block min-h-[500px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=Q=>n.message.content=Q)}," ",544)),[[we,n.message.content]]):ne("",!0)]),n.message.metadata!==null?(k(),P("div",nnr,[(k(!0),P(ze,null,at(((T=n.message.metadata)==null?void 0:T.filter(Q=>Q!=null&&Q.hasOwnProperty("title")&&Q.hasOwnProperty("content")))||[],(Q,_)=>(k(),P("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[(k(),wt(a,{jsonFormText:Q.title,jsonData:Q.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):ne("",!0),n.message.ui?(k(),wt(l,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):ne("",!0),i.audio_url!=null?(k(),P("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,rnr),e[47]||(e[47]=ft(" Your browser does not support the audio element. "))])):ne("",!0),g("div",inr,[n.message.steps.length>0?(k(),P("div",onr,[g("div",{class:"steps-header",onClick:e[3]||(e[3]=(...Q)=>o.toggleExpanded&&o.toggleExpanded(...Q))},[g("div",snr,[oe(c,{status:n.message.status_message,icon:!0},null,8,["status"])]),g("div",anr,[e[48]||(e[48]=g("h3",{class:"steps-title"},"Processing Info",-1)),g("p",lnr,le(n.message.status_message),1)]),g("span",cnr,le(i.expanded?"▲":"▼"),1)]),oe(lo,{name:"fade"},{default:Ve(()=>[i.expanded?(k(),P("div",unr,[g("ul",dnr,[(k(!0),P(ze,null,at(n.message.steps,(Q,_)=>(k(),P("li",{key:`step-${n.message.id}-${_}`,class:"step-item"},[oe(u,{done:Q.done,text:Q.text,status:Q.status,description:Q.description},null,8,["done","text","status","description"])]))),128))])])):ne("",!0)]),_:1})])):ne("",!0),g("div",fnr,[(k(!0),P(ze,null,at(n.message.html_js_s,(Q,_)=>(k(),P("div",{key:`htmljs-${n.message.id}-${_}`,class:"font-bold animate-fadeIn",style:xn({animationDelay:`${_*200}ms`})},[oe(d,{htmlContent:Q},null,8,["htmlContent"])],4))),128))])])]),g("div",pnr,[g("div",hnr,[o.editMsgMode?(k(),P("div",Tnr,[oe(h,{onClick:e[4]||(e[4]=he(Q=>o.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),oe(h,{onClick:he(o.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),oe(m,{title:"Add Block"},{default:Ve(()=>[oe(f,{title:"Programming Languages",icon:"code"},{default:Ve(()=>[oe(h,{onClick:e[5]||(e[5]=he(Q=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(h,{onClick:e[6]||(e[6]=he(Q=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(h,{onClick:e[7]||(e[7]=he(Q=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(h,{onClick:e[8]||(e[8]=he(Q=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(h,{onClick:e[9]||(e[9]=he(Q=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(h,{onClick:e[10]||(e[10]=he(Q=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(h,{onClick:e[11]||(e[11]=he(Q=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(h,{onClick:e[12]||(e[12]=he(Q=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(h,{onClick:e[13]||(e[13]=he(Q=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(h,{onClick:e[14]||(e[14]=he(Q=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(h,{onClick:e[15]||(e[15]=he(Q=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(f,{title:"Web Technologies",icon:"web"},{default:Ve(()=>[oe(h,{onClick:e[16]||(e[16]=he(Q=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(h,{onClick:e[17]||(e[17]=he(Q=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(h,{onClick:e[18]||(e[18]=he(Q=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(h,{onClick:e[19]||(e[19]=he(Q=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(h,{onClick:e[20]||(e[20]=he(Q=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(f,{title:"Markup and Data",icon:"file-code"},{default:Ve(()=>[oe(h,{onClick:e[21]||(e[21]=he(Q=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(h,{onClick:e[22]||(e[22]=he(Q=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(h,{onClick:e[23]||(e[23]=he(Q=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(h,{onClick:e[24]||(e[24]=he(Q=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(h,{onClick:e[25]||(e[25]=he(Q=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(f,{title:"Scripting and Shell",icon:"terminal"},{default:Ve(()=>[oe(h,{onClick:e[26]||(e[26]=he(Q=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(h,{onClick:e[27]||(e[27]=he(Q=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(h,{onClick:e[28]||(e[28]=he(Q=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(f,{title:"Diagramming",icon:"sitemap"},{default:Ve(()=>[oe(h,{onClick:e[29]||(e[29]=he(Q=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(h,{onClick:e[30]||(e[30]=he(Q=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(h,{onClick:e[31]||(e[31]=he(Q=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(f,{title:"Database",icon:"database"},{default:Ve(()=>[oe(h,{onClick:e[32]||(e[32]=he(Q=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(h,{onClick:e[33]||(e[33]=he(Q=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(h,{onClick:e[34]||(e[34]=he(Q=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(k(),P("div",mnr,[oe(h,{onClick:e[35]||(e[35]=he(Q=>o.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),oe(h,{onClick:o.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!o.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(k(),P("div",gnr,[oe(h,{onClick:e[36]||(e[36]=he(Q=>o.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),oe(h,{onClick:e[37]||(e[37]=he(Q=>o.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),oe(h,{onClick:e[38]||(e[38]=he(Q=>o.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):ne("",!0),!o.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(k(),P("div",_nr,[oe(h,{onClick:o.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):ne("",!0),i.deleteMsgMode?(k(),P("div",Qnr,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[39]||(e[39]=he(Q=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[40]||(e[40]=he(Q=>o.deleteMsg(),["stop"]))},e[50]||(e[50]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),!o.editMsgMode&&!i.deleteMsgMode?(k(),P("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[41]||(e[41]=Q=>i.deleteMsgMode=!0)},e[51]||(e[51]=[g("i",{"data-feather":"trash"},null,-1)]))):ne("",!0),g("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=he(Q=>o.rankUp(),["stop"]))},e[52]||(e[52]=[g("i",{"data-feather":"thumbs-up"},null,-1)])),g("div",vnr,[g("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=he(Q=>o.rankDown(),["stop"]))},e[53]||(e[53]=[g("i",{"data-feather":"thumbs-down"},null,-1)])),n.message.rank!=0?(k(),P("div",{key:0,class:We(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},le(n.message.rank),3)):ne("",!0)]),g("div",ynr,[this.$store.state.config.active_tts_service!="None"?(k(),P("div",{key:0,class:We(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[44]||(e[44]=he(Q=>o.speak(),["stop"]))},e[54]||(e[54]=[g("i",{"data-feather":"volume-2"},null,-1)]),2)):ne("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(k(),P("div",bnr,[i.isSynthesizingVoice?(k(),P("img",{key:1,src:i.loading_svg},null,8,Enr)):(k(),P("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[45]||(e[45]=he(Q=>o.read(),["stop"]))},e[55]||(e[55]=[g("i",{"data-feather":"voicemail"},null,-1)])))])):ne("",!0)])]),g("div",xnr,[g("div",Snr,[n.message.binding?(k(),P("p",Lnr,[e[56]||(e[56]=ft("Binding: ")),g("span",Cnr,le(n.message.binding),1)])):ne("",!0),n.message.model?(k(),P("p",Anr,[e[57]||(e[57]=ft("Model: ")),g("span",wnr,le(n.message.model),1)])):ne("",!0),n.message.seed?(k(),P("p",Mnr,[e[58]||(e[58]=ft("Seed: ")),g("span",Onr,le(n.message.seed),1)])):ne("",!0),n.message.nb_tokens?(k(),P("p",Rnr,[e[59]||(e[59]=ft("Number of tokens: ")),g("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},le(n.message.nb_tokens),9,Nnr)])):ne("",!0),o.warmup_duration?(k(),P("p",Dnr,[e[60]||(e[60]=ft("Warmup duration: ")),g("span",{class:"font-thin",title:"Warmup duration: "+o.warmup_duration},le(o.warmup_duration),9,Inr)])):ne("",!0),o.time_spent?(k(),P("p",knr,[e[61]||(e[61]=ft("Generation duration: ")),g("span",{class:"font-thin",title:"Finished generating: "+o.time_spent},le(o.time_spent),9,Pnr)])):ne("",!0),o.generation_rate?(k(),P("p",Hnr,[e[62]||(e[62]=ft("Rate: ")),g("span",{class:"font-thin",title:"Generation rate: "+o.generation_rate},le(o.generation_rate),9,Vnr)])):ne("",!0)])])])])])}const oU=yt(Gtr,[["render",Fnr]]);ve.defaults.baseURL="/";const Bnr={components:{InteractiveMenu:Nb},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),qe(()=>{Ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(r=>r.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=r=>{this.selectedFile=r.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};tt.on("file_received",r=>{r.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+r.error,4,!1),this.loading=!1,tt.off("file_received")}),tt.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){qe(()=>{Ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},$nr={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function Unr(t,e,n,r,i,o){const s=pt("InteractiveMenu");return i.loading?(k(),P("div",$nr,e[0]||(e[0]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):(k(),wt(s,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const Gnr=yt(Bnr,[["render",Unr],["__scopeId","data-v-1a32c141"]]),qnr="data:image/svg+xml,%3csvg%20aria-hidden='true'%20class='w-6%20h-6%20animate-spin%20fill-secondary'%20viewBox='0%200%20100%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100%2050.5908C100%2078.2051%2077.6142%20100.591%2050%20100.591C22.3858%20100.591%200%2078.2051%200%2050.5908C0%2022.9766%2022.3858%200.59082%2050%200.59082C77.6142%200.59082%20100%2022.9766%20100%2050.5908ZM9.08144%2050.5908C9.08144%2073.1895%2027.4013%2091.5094%2050%2091.5094C72.5987%2091.5094%2090.9186%2073.1895%2090.9186%2050.5908C90.9186%2027.9921%2072.5987%209.67226%2050%209.67226C27.4013%209.67226%209.08144%2027.9921%209.08144%2050.5908Z'%20fill='currentColor'%20/%3e%3cpath%20d='M93.9676%2039.0409C96.393%2038.4038%2097.8624%2035.9116%2097.0079%2033.5539C95.2932%2028.8227%2092.871%2024.3692%2089.8167%2020.348C85.8452%2015.1192%2080.8826%2010.7238%2075.2124%207.41289C69.5422%204.10194%2063.2754%201.94025%2056.7698%201.05124C51.7666%200.367541%2046.6976%200.446843%2041.7345%201.27873C39.2613%201.69328%2037.813%204.19778%2038.4501%206.62326C39.0873%209.04874%2041.5694%2010.4717%2044.0505%2010.1071C47.8511%209.54855%2051.7191%209.52689%2055.5402%2010.0491C60.8642%2010.7766%2065.9928%2012.5457%2070.6331%2015.2552C75.2735%2017.9648%2079.3347%2021.5619%2082.5849%2025.841C84.9175%2028.9121%2086.7997%2032.2913%2088.1811%2035.8758C89.083%2038.2158%2091.5421%2039.6781%2093.9676%2039.0409Z'%20fill='currentFill'%20/%3e%3c/svg%3e",znr="/",jnr={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:Gnr,ChatBarButton:_9},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:qnr,sendGlobe:iU,bUrl:znr,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{leftPanelCollapsed(){return this.$store.state.leftPanelCollapsed},rightPanelCollapsed(){return this.$store.state.rightPanelCollapsed},isCompactMode(){return this.$store.state.view_mode==="compact"},isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("rag_databases",this.$store.state.config.rag_databases),console.log("remote_databases",this.$store.state.config.remote_databases);const e=[...this.$store.state.config.rag_databases,...this.$store.state.config.remote_databases].map(n=>{console.log("entry",n);const r=n.split("::");console.log("extracted",r[0]);const o=n.endsWith("mounted")?"feather:check":"";return console.log("icon decision",o),{name:r[0],value:r[0]||"default_value",icon:o,help:"mounts the database"}});return console.log("formatted data sources",e),e}},methods:{showSendMenu(){clearTimeout(this.hideSendMenuTimeout),this.isSendMenuVisible=!0},hideSendMenu(){this.hideSendMenuTimeout=setTimeout(()=>{this.isSendMenuVisible=!1},300)},toggleLeftPanel(){console.log(this.leftPanelCollapsed),this.$store.commit("setLeftPanelCollapsed",!this.leftPanelCollapsed)},async toggleRightPanel(){console.log(this.rightPanelCollapsed),this.$store.commit("setRightPanelCollapsed",!this.rightPanelCollapsed),this.rightPanelCollapsed&&(this.$store.commit("setleftPanelCollapsed",!0),this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},handlePaste(t){const e=(t.clipboardData||t.originalEvent.clipboardData).items;let n=[];for(let r of e)if(r.type.indexOf("image")!==-1){const i=r.getAsFile(),s=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",s);const a=new File([i],s,{type:i.type});this.addFiles([a])}else if(r.kind==="file"){const i=r.getAsFile();n.push(i)}n.length>0&&this.addFiles(n)},emitloaded(){this.$emit("loaded")},download_files(){ve.get("/download_files")},remove_file(t){ve.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){ve.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,r=24*1024;let i=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=i+a.byteLength>=t.size;tt.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:l,chunkIndex:o}),i+=a.byteLength,o++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):s()};function s(){const a=t.slice(i,i+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),s()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},updateRT(){console.log("Updating rt status"),this.is_rt?this.stopRTCom():this.startRTCom()},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),tt.emit("start_bidirectional_audio_stream"),qe(()=>{Ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),tt.emit("stop_bidirectional_audio_stream"),qe(()=>{Ze.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},computedFileSize(t){return qe(()=>{Ze.replace()}),$o(t)},removeItem(t){console.log("Removing ",t.name),ve.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await ve.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){tt.emit("take_picture"),tt.on("picture_taken",()=>{ve.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,r()})};r()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){qe(()=>{Ze.replace()})},loading(t,e){qe(()=>{Ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Ze.replace()}),console.log("Chatbar mounted"),tt.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){qe(()=>{Ze.replace()})}},Wnr={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Ynr={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Knr={class:"flex"},Znr=["title"],Xnr={key:0},Jnr={class:"flex flex-col max-h-64"},err=["title"],trr={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},nrr={key:0,filesList:"",role:"status"},rrr={class:"flex flex-row items-center"},irr={class:"whitespace-nowrap"},orr=["onClick"],srr={key:1,class:"flex mx-1 w-500"},arr={class:"whitespace-nowrap flex flex-row gap-2"},lrr={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},crr={role:"status"},urr=["src"],drr={class:"flex w-fit relative grow w-full"},frr={class:"chat-bar",tabindex:"0"},prr={key:0,title:"Waiting for reply"},hrr=["src"],Trr={class:"w-fit"},mrr={class:"w-fit"},grr={class:"relative grow m-0 p-0"},_rr={class:"m-0 p-0"},Qrr={class:"flex items-center space-x-3"},vrr={class:"relative inline-block"},yrr={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},brr={class:"flex flex-col gap-2"};function Err(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("PersonalitiesCommands");return k(),P("div",Wnr,[i.filesList.length>0?(k(),P("div",Ynr,[g("div",Knr,[g("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=he(l=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"list"},null,-1)]),8,Znr)]),i.filesList.length>0&&i.showfilesList==!0?(k(),P("div",Xnr,[g("div",Jnr,[oe(Ns,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.filesList,(l,c)=>(k(),P("div",{key:c+"-"+l.name},[g("div",{class:"m-1",title:l.name},[g("div",trr,[i.isFileSentList[c]?ne("",!0):(k(),P("div",nrr,e[12]||(e[12]=[g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),g("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=g("div",null,[g("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),g("div",{class:We(["line-clamp-1 w-3/5",i.isFileSentList[c]?"text-green-500":"text-red-200"])},le(l.name),3),e[15]||(e[15]=g("div",{class:"grow"},null,-1)),g("div",rrr,[g("p",irr,le(o.computedFileSize(l.size)),1),g("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:u=>o.removeItem(l)},e[13]||(e[13]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,orr)])])],8,err)]))),128))]),_:1})])])):ne("",!0),i.filesList.length>0?(k(),P("div",srr,[g("div",arr,[e[16]||(e[16]=g("p",{class:"font-bold"}," Total size: ",-1)),ft(" "+le(i.totalSize)+" ("+le(i.filesList.length)+") ",1)]),e[19]||(e[19]=g("div",{class:"grow"},null,-1)),g("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...l)=>o.clear_files&&o.clear_files(...l))},e[17]||(e[17]=[g("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),g("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...l)=>o.download_files&&o.download_files(...l))},e[18]||(e[18]=[g("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):ne("",!0)])):ne("",!0),i.selecting_model||i.selecting_binding?(k(),P("div",lrr,[g("div",crr,[g("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,urr),e[20]||(e[20]=g("span",{class:"sr-only"},"Selecting model...",-1))])])):ne("",!0),g("div",drr,[g("div",frr,[n.loading?(k(),P("div",prr,[g("img",{src:i.loader_v0},null,8,hrr),e[21]||(e[21]=g("div",{role:"status"},[g("span",{class:"sr-only"},"Loading...")],-1))])):ne("",!0),oe(s,{onClick:o.toggleLeftPanel,class:We({"text-red-500":o.leftPanelCollapsed}),title:"Toggle View Mode"},{default:Ve(()=>[J(g("div",null,e[22]||(e[22]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,o.leftPanelCollapsed]]),J(g("div",null,e[23]||(e[23]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,!o.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),g("div",Trr,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(k(),wt(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:o.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):ne("",!0)]),g("div",mrr,[o.isDataSourceNamesValid?(k(),wt(a,{key:0,icon:"feather:book",commandsList:o.dataSourceNames,sendCommand:o.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):ne("",!0)]),g("div",grr,[g("form",_rr,[J(g("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=l=>i.message=l),onPaste:e[4]||(e[4]=(...l)=>o.handlePaste&&o.handlePaste(...l)),onKeydown:e[5]||(e[5]=Xr(he(l=>o.submitOnEnter(l),["exact"]),["enter"])),class:"w-full p-2 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Send message..."},null,544),[[we,i.message]])])]),g("div",Qrr,[n.loading?(k(),wt(s,{key:0,onClick:o.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ve(()=>e[24]||(e[24]=[g("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])),default:Ve(()=>[e[25]||(e[25]=g("span",null,"Stop",-1))]),_:1},8,["onClick"])):(k(),wt(s,{key:1,onClick:o.submit,title:"Send"},{icon:Ve(()=>e[26]||(e[26]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)])),_:1},8,["onClick"])),oe(s,{onClick:o.submitWithInternetSearch,title:"Send with internet search"},{icon:Ve(()=>e[27]||(e[27]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.startSpeechRecognition,class:We({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ve(()=>e[28]||(e[28]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1)])),_:1},8,["onClick","class"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(k(),wt(s,{key:2,onClick:o.updateRT,class:We(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ve(()=>e[29]||(e[29]=[ft(" 🌟 ")])),_:1},8,["onClick","class"])):ne("",!0),n.loading?ne("",!0):(k(),P("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...l)=>o.hideSendMenu&&o.hideSendMenu(...l))},[g("div",vrr,[J(g("div",{onMouseenter:e[6]||(e[6]=(...l)=>o.showSendMenu&&o.showSendMenu(...l)),class:"absolute m-0 p-0 z-10 bottom-full left-1/2 transform -translate-x-1/2 w-25 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",yrr,[g("div",brr,[oe(s,{onClick:o.add_file,title:"Send file"},{icon:Ve(()=>e[30]||(e[30]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.takePicture,title:"Take picture"},{icon:Ve(()=>e[31]||(e[31]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.addWebLink,title:"Add web link"},{icon:Ve(()=>e[32]||(e[32]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)])),_:1},8,["onClick"])])])],544),[[Pt,i.isSendMenuVisible]]),g("div",{onMouseenter:e[8]||(e[8]=(...l)=>o.showSendMenu&&o.showSendMenu(...l))},[g("button",{onClick:e[7]||(e[7]=he((...l)=>t.toggleSendMenu&&t.toggleSendMenu(...l),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))],32)])],32)),oe(s,{onClick:o.makeAnEmptyUserMessage,title:"New user message"},{icon:Ve(()=>e[34]||(e[34]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ve(()=>e[35]||(e[35]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.toggleRightPanel,class:We({"text-red-500":!o.rightPanelCollapsed}),title:"Toggle right Panel"},{default:Ve(()=>[J(g("div",null,e[36]||(e[36]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,o.rightPanelCollapsed]]),J(g("div",null,e[37]||(e[37]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,!o.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),g("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...l)=>o.addFiles&&o.addFiles(...l)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=g("div",{class:"ml-auto gap-2"},null,-1))])])}const sU=yt(jnr,[["render",Err],["__scopeId","data-v-61f37096"]]),xrr={name:"WelcomeComponent",data(){return{videoUrl:"",videoType:"",latestNews:"",error:"",showVideoButton:!1,lastVideoUrl:""}},computed:{getImageForVideoType(){switch(this.videoType.toLowerCase()){case"podcast":return"/podcast.png";case"music":return"/music.png";case"movie":return"/movie.png";case"tutorial":return"/tutorial.png";default:return"/play_video.png"}},logoSrc(){return this.$store.state.config&&this.$store.state.config.app_custom_logo?`/user_infos/${this.$store.state.config.app_custom_logo}`:co}},methods:{async fetchLatestNews(){try{const t=await ve.get("/get_news");this.latestNews=t.data}catch(t){console.error("Failed to fetch latest news:",t),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const t=await ve.get("/get_last_video_url");this.videoUrl=t.data.url,this.videoType=t.data.type,this.checkVideoUpdate()}catch(t){console.error("Failed to fetch video information:",t),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await ve.post("/set_last_viewed_video_url",{client_id:this.$store.state.client_id,last_viewed_video_url:this.videoUrl}),this.showVideoButton=!1},async checkVideoUpdate(){const e=(await ve.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},Srr={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},Lrr={class:"text-center max-w-4xl"},Crr={class:"flex items-center justify-center gap-8 mb-12"},Arr={class:"relative w-24 h-24"},wrr=["src"],Mrr={class:"flex flex-col items-start"},Orr={class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"},Rrr={class:"space-y-8 animate-fade-in-up"},Nrr={class:"text-4xl font-semibold"},Drr={class:"text-xl max-w-3xl mx-auto"},Irr={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},krr=["innerHTML"],Prr={key:1,class:"mt-6 text-red-500"},Hrr={key:0,class:"floating-button-container"},Vrr=["href"],Frr=["src","alt"];function Brr(t,e,n,r,i,o){return k(),P("div",Srr,[g("div",Lrr,[g("div",Crr,[g("div",Arr,[g("img",{src:o.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,wrr)]),g("div",Mrr,[g("h1",Orr,le(t.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=g("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),g("div",Rrr,[g("h2",Nrr,le(t.$store.state.theme_vars.lollms_welcome_short_message),1),g("p",Drr,le(t.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(k(),P("div",Irr,[e[2]||(e[2]=g("h3",null,"Latest LoLLMS News",-1)),g("p",{innerHTML:i.latestNews},null,8,krr)])):ne("",!0),i.error?(k(),P("div",Prr,le(i.error),1)):ne("",!0)]),i.showVideoButton?(k(),P("div",Hrr,[g("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s))},[e[3]||(e[3]=g("span",{class:"tooltip"},"New ParisNeo Video!",-1)),g("img",{src:o.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,Frr)],8,Vrr)])):ne("",!0)])}const aU=yt(xrr,[["render",Brr],["__scopeId","data-v-d9375d3e"]]);var $rr=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),nd=function(){return nd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},qrr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},zrr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},jrr={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},Wrr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},Yrr={class:"w-full flex flex-row mt-4 text-center justify-center"},Krr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},Zrr={class:"mb-4 w-full"},Xrr={class:"w-full bg-bg-light dark:bg-bg-dark"};function Jrr(t,e,n,r,i,o){return i.show?(k(),P("div",qrr,[g("div",zrr,[g("div",jrr,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide()),class:"absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[17]||(e[17]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",Wrr,[g("div",Yrr,[g("button",{type:"submit",onClick:e[1]||(e[1]=he((...s)=>o.submitForm&&o.submitForm(...s),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),g("button",{onClick:e[2]||(e[2]=he(s=>o.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),g("div",Krr,[g("form",Zrr,[g("table",Xrr,[g("tr",null,[e[18]||(e[18]=g("td",null,[g("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=s=>n.config.personality_conditioning=s)},null,512),[[we,n.config.personality_conditioning]])])]),g("tr",null,[e[19]||(e[19]=g("td",null,[g("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=s=>n.config.user_message_prefix=s)},null,512),[[we,n.config.user_message_prefix]])])]),g("tr",null,[e[20]||(e[20]=g("td",null,[g("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=s=>n.config.ai_message_prefix=s)},null,512),[[we,n.config.ai_message_prefix]])])]),g("tr",null,[e[21]||(e[21]=g("td",null,[g("label",{for:"linkText"},"Link Text:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=s=>n.config.link_text=s)},null,512),[[we,n.config.link_text]])])]),g("tr",null,[e[22]||(e[22]=g("td",null,[g("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=s=>n.config.welcome_message=s)},null,512),[[we,n.config.welcome_message]])])]),g("tr",null,[e[23]||(e[23]=g("td",null,[g("label",{for:"modelTemperature"},"Model Temperature:")],-1)),g("td",null,[J(g("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=s=>n.config.model_temperature=s)},null,512),[[we,n.config.model_temperature]])])]),g("tr",null,[e[24]||(e[24]=g("td",null,[g("label",{for:"modelTopK"},"Model Top K:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=s=>n.config.model_top_k=s)},null,512),[[we,n.config.model_top_k]])])]),g("tr",null,[e[25]||(e[25]=g("td",null,[g("label",{for:"modelTopP"},"Model Top P:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=s=>n.config.model_top_p=s)},null,512),[[we,n.config.model_top_p]])])]),g("tr",null,[e[26]||(e[26]=g("td",null,[g("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=s=>n.config.model_repeat_penalty=s)},null,512),[[we,n.config.model_repeat_penalty]])])]),g("tr",null,[e[27]||(e[27]=g("td",null,[g("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=s=>n.config.model_repeat_last_n=s)},null,512),[[we,n.config.model_repeat_last_n]])])]),g("tr",null,[e[28]||(e[28]=g("td",null,[g("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=s=>n.config.recommended_binding=s)},null,512),[[we,n.config.recommended_binding]])])]),g("tr",null,[e[29]||(e[29]=g("td",null,[g("label",{for:"recommendedModel"},"Recommended Model:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=s=>n.config.recommended_model=s)},null,512),[[we,n.config.recommended_model]])])]),g("tr",null,[e[30]||(e[30]=g("td",null,[g("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=s=>n.config.dependencies=s)},null,512),[[we,n.config.dependencies]])])]),g("tr",null,[e[31]||(e[31]=g("td",null,[g("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=s=>n.config.anti_prompts=s)},null,512),[[we,n.config.anti_prompts]])])])])])])])])])])):ne("",!0)}const QU=yt(Grr,[["render",Jrr]]),eir={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){ve.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},tir={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},nir={class:"popup-container"},rir=["src"],iir={class:"checkbox-container"};function oir(t,e,n,r,i,o){return k(),wt(lo,{name:"fade"},{default:Ve(()=>[i.showPopup?(k(),P("div",tir,[g("div",nir,[g("button",{onClick:e[0]||(e[0]=(...s)=>o.hide&&o.hide(...s)),class:"close-button"}," X "),g("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,rir),g("div",iir,[J(g("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=s=>this.$store.state.config.show_news_panel=s),onChange:e[2]||(e[2]=(...s)=>o.save_configuration&&o.save_configuration(...s))},null,544),[[nt,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=g("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):ne("",!0)]),_:1})}const vU=yt(eir,[["render",oir],["__scopeId","data-v-d504dfc9"]]),sir="/assets/fastapi-BQj-rjUJ.png",air="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.14%2096.36'%3e%3cg%20id='图层_2'%20data-name='图层%202'%3e%3cg%20id='Discord_Logos'%20data-name='Discord%20Logos'%3e%3cg%20id='Discord_Logo_-_Large_-_White'%20data-name='Discord%20Logo%20-%20Large%20-%20White'%3e%3cpath%20d='M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",lir="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3c/circle%3e%3c/svg%3e",cir="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3canimate%20attributeName='y1'%20values='30;25;30'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3canimate%20attributeName='y2'%20values='15;20;15'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3canimate%20attributeName='cy'%20values='35;30;35'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/circle%3e%3c/svg%3e",uir="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20data-name='Layer%205'%20id='Layer_5'%3e%3cpath%20d='M47,33H17a1,1,0,0,0-1,1c0,9.93,7.18,18,16,18s16-8.07,16-18A1,1,0,0,0,47,33ZM18,35H46a18,18,0,0,1-.67,4H18.71A18,18,0,0,1,18,35ZM26.7,48.8a6.42,6.42,0,0,1,10.6,0,12.3,12.3,0,0,1-10.6,0Zm12.34-1A8.81,8.81,0,0,0,32,44a8.81,8.81,0,0,0-7,3.81A15.56,15.56,0,0,1,19.43,41H44.57A15.56,15.56,0,0,1,39,47.81ZM36,22a1.1,1.1,0,0,1,0-.18,1.17,1.17,0,0,1,.06-.2s0-.05,0-.07a.28.28,0,0,1,.07-.09.71.71,0,0,1,.28-.28s.06-.06.09-.07l10-5a1,1,0,1,1,.9,1.78L39.24,22l8.21,4.11a1,1,0,0,1,.44,1.34A1,1,0,0,1,47,28a.93.93,0,0,1-.45-.11l-10-5h0a1.18,1.18,0,0,1-.28-.22l0-.06a.65.65,0,0,1-.1-.15s0-.05,0-.07a1.17,1.17,0,0,1-.06-.2A1.1,1.1,0,0,1,36,22ZM16.55,26.11,24.76,22l-8.21-4.11a1,1,0,1,1,.9-1.78l10,5s.06.05.09.07a.71.71,0,0,1,.28.28.28.28,0,0,1,.07.09s0,.05,0,.07a1.17,1.17,0,0,1,.06.2.82.82,0,0,1,0,.36,1.17,1.17,0,0,1-.06.2s0,.05,0,.07a.65.65,0,0,1-.1.15.21.21,0,0,0,0,.06,1.18,1.18,0,0,1-.28.22h0l-10,5A.93.93,0,0,1,17,28a1,1,0,0,1-.89-.55A1,1,0,0,1,16.55,26.11ZM60.66,36.45A29.69,29.69,0,0,0,61,32,29,29,0,0,0,3,32a29.69,29.69,0,0,0,.34,4.45,4.65,4.65,0,0,0,2.39,7.82,29,29,0,0,0,52.54,0,4.65,4.65,0,0,0,2.39-7.82ZM4.78,41.58a2.91,2.91,0,0,1-.24-.27A2.62,2.62,0,0,1,4,39.71a.61.61,0,0,1,0-.14,2.58,2.58,0,0,1,.77-1.73,4.38,4.38,0,0,1,.74-.55C7,36.38,10,34.9,12.69,33.67c-1.52,3.3-3.42,7.17-4.17,7.91a2.59,2.59,0,0,1-1.47.72A2.66,2.66,0,0,1,4.78,41.58ZM32,59A27,27,0,0,1,7.92,44.18a4.56,4.56,0,0,0,2-1.18c1.48-1.49,5-9.36,5.66-10.92a1,1,0,0,0-1.32-1.32c-.78.34-3.14,1.39-5.49,2.53-1.29.63-2.58,1.29-3.6,1.88A25.58,25.58,0,0,1,5,32a27,27,0,0,1,54,0,25.58,25.58,0,0,1-.19,3.17c-2.88-1.66-7.88-3.88-9.09-4.41a1,1,0,0,0-1.32,1.32c.69,1.56,4.18,9.43,5.66,10.92a4.56,4.56,0,0,0,2,1.18A27,27,0,0,1,32,59ZM59.46,41.31a2.91,2.91,0,0,1-.24.27A2.66,2.66,0,0,1,57,42.3a2.59,2.59,0,0,1-1.47-.72c-.75-.74-2.65-4.61-4.17-7.91,1.65.76,3.44,1.61,4.91,2.37.91.47,1.7.9,2.26,1.25a4.38,4.38,0,0,1,.74.55A2.58,2.58,0,0,1,60,39.57a.61.61,0,0,1,0,.14A2.62,2.62,0,0,1,59.46,41.31Z'/%3e%3c/g%3e%3c/svg%3e",dir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512.001%20512.001'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20d='M256.001,0C114.841,0,0,114.841,0,256.001s114.841,256.001,256.001,256.001S512.001,397.16,512.001,256.001%20S397.16,0,256.001,0z%20M256.001,493.701c-131.069,0-237.702-106.631-237.702-237.7S124.932,18.299,256.001,18.299%20s237.702,106.632,237.702,237.702S387.068,493.701,256.001,493.701z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M371.284,296.658H138.275c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h233.008c5.054,0,9.15-4.097,9.15-9.15%20C380.433,300.754,376.337,296.658,371.284,296.658z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M297.481,330.816h-85.403c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h85.403c5.054,0,9.15-4.097,9.15-9.15%20S302.534,330.816,297.481,330.816z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M146.725,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20c18.666,0,33.852-15.186,33.852-33.852C180.577,208.168,165.391,192.982,146.725,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M365.275,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20s33.852-15.186,33.852-33.852C399.128,208.168,383.942,192.982,365.275,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cg%3e%3ccircle%20cx='155.969'%20cy='219.735'%20r='9.15'/%3e%3ccircle%20cx='374.338'%20cy='219.735'%20r='9.15'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",fir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20299.92%20299.92'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M293.4,65.2H6.52C2.914,65.2,0,68.114,0,71.72v117.36c0,3.606,2.914,6.52,6.52,6.52h6.52v32.6%20c0,3.606,2.914,6.52,6.52,6.52h260.8c3.606,0,6.52-2.914,6.52-6.52v-32.6h6.52c3.606,0,6.52-2.914,6.52-6.52V71.72%20C299.92,68.114,297.006,65.2,293.4,65.2z%20M273.84,221.68h-19.56H228.2h-26.08h-26.08h-26.08h-26.08H97.8H71.72H45.64H26.08V195.6%20h19.56h26.08H97.8h26.08h26.08h26.08h26.08h26.08h26.08h19.56V221.68z%20M286.88,182.56h-6.52H19.56h-6.52V78.24h273.84V182.56z'/%3e%3cpath%20d='M32.6,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H32.6c-3.606,0-6.52,2.914-6.52,6.52%20V163C26.08,166.606,28.994,169.52,32.6,169.52z%20M39.12,104.32H65.2v52.16H39.12V104.32z'/%3e%3cpath%20d='M97.8,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H97.8c-3.606,0-6.52,2.914-6.52,6.52%20V163C91.28,166.606,94.194,169.52,97.8,169.52z%20M104.32,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M163,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H163c-3.606,0-6.52,2.914-6.52,6.52%20V163C156.48,166.606,159.394,169.52,163,169.52z%20M169.52,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M228.2,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H228.2%20c-3.606,0-6.52,2.914-6.52,6.52V163C221.68,166.606,224.594,169.52,228.2,169.52z%20M234.72,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M52.16,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C49.246,221.68,52.16,218.766,52.16,215.16z'/%3e%3cpath%20d='M78.24,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C75.326,221.68,78.24,218.766,78.24,215.16z'/%3e%3cpath%20d='M104.32,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C101.406,221.68,104.32,218.766,104.32,215.16z'/%3e%3cpath%20d='M130.4,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C127.486,221.68,130.4,218.766,130.4,215.16z'/%3e%3cpath%20d='M156.48,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52s-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20S156.48,218.766,156.48,215.16z'/%3e%3cpath%20d='M182.56,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C179.646,221.68,182.56,218.766,182.56,215.16z'/%3e%3cpath%20d='M208.64,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C205.726,221.68,208.64,218.766,208.64,215.16z'/%3e%3cpath%20d='M234.72,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C231.806,221.68,234.72,218.766,234.72,215.16z'/%3e%3cpath%20d='M260.8,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C257.886,221.68,260.8,218.766,260.8,215.16z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",pir="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='green'%20stroke-width='4'%20fill='green'%20/%3e%3cpath%20stroke='white'%20stroke-width='4'%20d='M40%2050%20l10%2010%2020%20-20'%20fill='none'%20/%3e%3c/svg%3e",hir="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='red'%20stroke-width='4'%20fill='red'%20/%3e%3cline%20x1='35'%20y1='35'%20x2='65'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3cline%20x1='65'%20y1='35'%20x2='35'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3c/svg%3e",Tir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='800px'%20height='800px'%20viewBox='0%200%20461.759%20461.759'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M0,301.058h147.916v147.919H0V301.058z%20M194.432,448.977H342.35V301.058H194.432V448.977z%20M2.802,257.347h147.916V109.434%20H2.802V257.347z%20M325.476,92.219l-51.603-79.437l-79.441,51.601l51.604,79.437L325.476,92.219z%20M219.337,213.733l71.045,62.663%20l62.66-71.039l-71.044-62.669L219.337,213.733z%20M412.107,57.967l-80.668,49.656l49.652,80.666l80.668-49.65L412.107,57.967z'/%3e%3c/g%3e%3c/svg%3e",mir="/assets/robot-CQPaMbxU.svg",gir="/";ve.defaults.baseURL="/";const _ir={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:db,UniversalForm:d$},data(){return{bUrl:gir,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0;let e=await ve.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await ve.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await ve.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{ve.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+t.name,"Save changes","Cancel").then(n=>{try{ve.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0)):this.$store.state.toast.showToast(`Did not get Personality settings responses. +`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Gtr+this.avatar:(console.log("No avatar found"),co)},defaultImg(t){t.target.src=co},parseDate(t){let e=new Date(Date.parse(t)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(n/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){qe(()=>{Ze.replace()})},deleteMsgMode(){qe(()=>{Ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,qe(()=>{Ze.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let r,i,o;[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const o=Math.floor(i/1e3),s=n/o;return Math.round(s)+" t/s"}}},ztr={class:"relative message w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},jtr={class:"flex flex-row gap-2"},Wtr={class:"flex-shrink-0"},Ytr={class:"group/avatar"},Ktr=["src","data-popover-target"],Ztr={class:"flex flex-col w-full flex-grow-0"},Xtr={class:"flex flex-row flex-grow items-start"},Jtr={class:"flex flex-col mb-2"},enr={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},tnr=["title"],nnr={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary space-y-2"},rnr={key:1},inr=["src"],onr={class:"message-details"},snr={key:0,class:"steps-container"},anr={class:"steps-icon"},lnr={class:"steps-summary"},cnr={class:"steps-status"},unr={class:"toggle-icon"},dnr={key:0,class:"steps-content"},fnr={class:"steps-list"},pnr={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},hnr={class:"flex-row justify-end mx-2"},Tnr={class:"invisible group-hover:visible flex flex-row"},mnr={key:0},gnr={key:1},_nr={key:2},Qnr={key:3},vnr={key:4,class:"flex items-center duration-75"},ynr={class:"flex flex-row items-center"},bnr={class:"flex flex-row items-center"},Enr={key:6,class:"flex flex-row items-center"},xnr=["src"],Snr={class:"text-sm text-gray-400 mt-2"},Lnr={class:"flex flex-row items-center gap-2"},Cnr={key:0},Anr={class:"font-thin"},wnr={key:1},Mnr={class:"font-thin"},Onr={key:2},Rnr={class:"font-thin"},Nnr={key:3},Dnr=["title"],Inr={key:4},knr=["title"],Pnr={key:5},Hnr=["title"],Vnr={key:6},Fnr=["title"];function Bnr(t,e,n,r,i,o){var T;const s=pt("MarkdownRenderer"),a=pt("JsonViewer"),l=pt("DynamicUIRenderer"),c=pt("StatusIcon"),u=pt("Step"),d=pt("RenderHTMLJS"),h=pt("ToolbarButton"),f=pt("DropdownSubmenu"),m=pt("DropdownMenu");return k(),P("div",ztr,[g("div",jtr,[g("div",Wtr,[g("div",Ytr,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=Q=>o.defaultImg(Q)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Ktr)])]),g("div",Ztr,[g("div",Xtr,[g("div",Jtr,[g("div",enr,le(n.message.sender),1),n.message.created_at?(k(),P("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},le(o.created_at),9,tnr)):ne("",!0)]),e[46]||(e[46]=g("div",{class:"flex-grow"},null,-1))]),g("div",nnr,[o.editMsgMode?ne("",!0):(k(),wt(s,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),g("div",null,[n.message.open?J((k(),P("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=Xr(he((...Q)=>o.insertTab&&o.insertTab(...Q),["prevent"]),["tab"])),class:"block min-h-[500px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=Q=>n.message.content=Q)}," ",544)),[[we,n.message.content]]):ne("",!0)]),n.message.metadata!==null?(k(),P("div",rnr,[(k(!0),P(ze,null,at(((T=n.message.metadata)==null?void 0:T.filter(Q=>Q!=null&&Q.hasOwnProperty("title")&&Q.hasOwnProperty("content")))||[],(Q,_)=>(k(),P("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[(k(),wt(a,{jsonFormText:Q.title,jsonData:Q.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):ne("",!0),n.message.ui?(k(),wt(l,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):ne("",!0),i.audio_url!=null?(k(),P("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,inr),e[47]||(e[47]=ft(" Your browser does not support the audio element. "))])):ne("",!0),g("div",onr,[n.message.steps.length>0?(k(),P("div",snr,[g("div",{class:"steps-header",onClick:e[3]||(e[3]=(...Q)=>o.toggleExpanded&&o.toggleExpanded(...Q))},[g("div",anr,[oe(c,{status:n.message.status_message,icon:!0},null,8,["status"])]),g("div",lnr,[e[48]||(e[48]=g("h3",{class:"steps-title"},"Processing Info",-1)),g("p",cnr,le(n.message.status_message),1)]),g("span",unr,le(i.expanded?"▲":"▼"),1)]),oe(lo,{name:"fade"},{default:Ve(()=>[i.expanded?(k(),P("div",dnr,[g("ul",fnr,[(k(!0),P(ze,null,at(n.message.steps,(Q,_)=>(k(),P("li",{key:`step-${n.message.id}-${_}`,class:"step-item"},[oe(u,{done:Q.done,text:Q.text,status:Q.status,description:Q.description},null,8,["done","text","status","description"])]))),128))])])):ne("",!0)]),_:1})])):ne("",!0),g("div",pnr,[(k(!0),P(ze,null,at(n.message.html_js_s,(Q,_)=>(k(),P("div",{key:`htmljs-${n.message.id}-${_}`,class:"font-bold animate-fadeIn",style:xn({animationDelay:`${_*200}ms`})},[oe(d,{htmlContent:Q},null,8,["htmlContent"])],4))),128))])])]),g("div",hnr,[g("div",Tnr,[o.editMsgMode?(k(),P("div",mnr,[oe(h,{onClick:e[4]||(e[4]=he(Q=>o.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),oe(h,{onClick:he(o.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),oe(m,{title:"Add Block"},{default:Ve(()=>[oe(f,{title:"Programming Languages",icon:"code"},{default:Ve(()=>[oe(h,{onClick:e[5]||(e[5]=he(Q=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(h,{onClick:e[6]||(e[6]=he(Q=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(h,{onClick:e[7]||(e[7]=he(Q=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(h,{onClick:e[8]||(e[8]=he(Q=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(h,{onClick:e[9]||(e[9]=he(Q=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(h,{onClick:e[10]||(e[10]=he(Q=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(h,{onClick:e[11]||(e[11]=he(Q=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(h,{onClick:e[12]||(e[12]=he(Q=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(h,{onClick:e[13]||(e[13]=he(Q=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(h,{onClick:e[14]||(e[14]=he(Q=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(h,{onClick:e[15]||(e[15]=he(Q=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(f,{title:"Web Technologies",icon:"web"},{default:Ve(()=>[oe(h,{onClick:e[16]||(e[16]=he(Q=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(h,{onClick:e[17]||(e[17]=he(Q=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(h,{onClick:e[18]||(e[18]=he(Q=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(h,{onClick:e[19]||(e[19]=he(Q=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(h,{onClick:e[20]||(e[20]=he(Q=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(f,{title:"Markup and Data",icon:"file-code"},{default:Ve(()=>[oe(h,{onClick:e[21]||(e[21]=he(Q=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(h,{onClick:e[22]||(e[22]=he(Q=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(h,{onClick:e[23]||(e[23]=he(Q=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(h,{onClick:e[24]||(e[24]=he(Q=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(h,{onClick:e[25]||(e[25]=he(Q=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(f,{title:"Scripting and Shell",icon:"terminal"},{default:Ve(()=>[oe(h,{onClick:e[26]||(e[26]=he(Q=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(h,{onClick:e[27]||(e[27]=he(Q=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(h,{onClick:e[28]||(e[28]=he(Q=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(f,{title:"Diagramming",icon:"sitemap"},{default:Ve(()=>[oe(h,{onClick:e[29]||(e[29]=he(Q=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(h,{onClick:e[30]||(e[30]=he(Q=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(h,{onClick:e[31]||(e[31]=he(Q=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(f,{title:"Database",icon:"database"},{default:Ve(()=>[oe(h,{onClick:e[32]||(e[32]=he(Q=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(h,{onClick:e[33]||(e[33]=he(Q=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(h,{onClick:e[34]||(e[34]=he(Q=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(k(),P("div",gnr,[oe(h,{onClick:e[35]||(e[35]=he(Q=>o.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),oe(h,{onClick:o.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!o.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(k(),P("div",_nr,[oe(h,{onClick:e[36]||(e[36]=he(Q=>o.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),oe(h,{onClick:e[37]||(e[37]=he(Q=>o.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),oe(h,{onClick:e[38]||(e[38]=he(Q=>o.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):ne("",!0),!o.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(k(),P("div",Qnr,[oe(h,{onClick:o.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):ne("",!0),i.deleteMsgMode?(k(),P("div",vnr,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[39]||(e[39]=he(Q=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[40]||(e[40]=he(Q=>o.deleteMsg(),["stop"]))},e[50]||(e[50]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),!o.editMsgMode&&!i.deleteMsgMode?(k(),P("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[41]||(e[41]=Q=>i.deleteMsgMode=!0)},e[51]||(e[51]=[g("i",{"data-feather":"trash"},null,-1)]))):ne("",!0),g("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=he(Q=>o.rankUp(),["stop"]))},e[52]||(e[52]=[g("i",{"data-feather":"thumbs-up"},null,-1)])),g("div",ynr,[g("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=he(Q=>o.rankDown(),["stop"]))},e[53]||(e[53]=[g("i",{"data-feather":"thumbs-down"},null,-1)])),n.message.rank!=0?(k(),P("div",{key:0,class:We(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},le(n.message.rank),3)):ne("",!0)]),g("div",bnr,[this.$store.state.config.active_tts_service!="None"?(k(),P("div",{key:0,class:We(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[44]||(e[44]=he(Q=>o.speak(),["stop"]))},e[54]||(e[54]=[g("i",{"data-feather":"volume-2"},null,-1)]),2)):ne("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(k(),P("div",Enr,[i.isSynthesizingVoice?(k(),P("img",{key:1,src:i.loading_svg},null,8,xnr)):(k(),P("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[45]||(e[45]=he(Q=>o.read(),["stop"]))},e[55]||(e[55]=[g("i",{"data-feather":"voicemail"},null,-1)])))])):ne("",!0)])]),g("div",Snr,[g("div",Lnr,[n.message.binding?(k(),P("p",Cnr,[e[56]||(e[56]=ft("Binding: ")),g("span",Anr,le(n.message.binding),1)])):ne("",!0),n.message.model?(k(),P("p",wnr,[e[57]||(e[57]=ft("Model: ")),g("span",Mnr,le(n.message.model),1)])):ne("",!0),n.message.seed?(k(),P("p",Onr,[e[58]||(e[58]=ft("Seed: ")),g("span",Rnr,le(n.message.seed),1)])):ne("",!0),n.message.nb_tokens?(k(),P("p",Nnr,[e[59]||(e[59]=ft("Number of tokens: ")),g("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},le(n.message.nb_tokens),9,Dnr)])):ne("",!0),o.warmup_duration?(k(),P("p",Inr,[e[60]||(e[60]=ft("Warmup duration: ")),g("span",{class:"font-thin",title:"Warmup duration: "+o.warmup_duration},le(o.warmup_duration),9,knr)])):ne("",!0),o.time_spent?(k(),P("p",Pnr,[e[61]||(e[61]=ft("Generation duration: ")),g("span",{class:"font-thin",title:"Finished generating: "+o.time_spent},le(o.time_spent),9,Hnr)])):ne("",!0),o.generation_rate?(k(),P("p",Vnr,[e[62]||(e[62]=ft("Rate: ")),g("span",{class:"font-thin",title:"Generation rate: "+o.generation_rate},le(o.generation_rate),9,Fnr)])):ne("",!0)])])])])])}const oU=yt(qtr,[["render",Bnr]]);ve.defaults.baseURL="/";const $nr={components:{InteractiveMenu:Nb},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),qe(()=>{Ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(r=>r.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=r=>{this.selectedFile=r.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};tt.on("file_received",r=>{r.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+r.error,4,!1),this.loading=!1,tt.off("file_received")}),tt.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){qe(()=>{Ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Unr={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function Gnr(t,e,n,r,i,o){const s=pt("InteractiveMenu");return i.loading?(k(),P("div",Unr,e[0]||(e[0]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):(k(),wt(s,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const qnr=yt($nr,[["render",Gnr],["__scopeId","data-v-1a32c141"]]),znr="data:image/svg+xml,%3csvg%20aria-hidden='true'%20class='w-6%20h-6%20animate-spin%20fill-secondary'%20viewBox='0%200%20100%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100%2050.5908C100%2078.2051%2077.6142%20100.591%2050%20100.591C22.3858%20100.591%200%2078.2051%200%2050.5908C0%2022.9766%2022.3858%200.59082%2050%200.59082C77.6142%200.59082%20100%2022.9766%20100%2050.5908ZM9.08144%2050.5908C9.08144%2073.1895%2027.4013%2091.5094%2050%2091.5094C72.5987%2091.5094%2090.9186%2073.1895%2090.9186%2050.5908C90.9186%2027.9921%2072.5987%209.67226%2050%209.67226C27.4013%209.67226%209.08144%2027.9921%209.08144%2050.5908Z'%20fill='currentColor'%20/%3e%3cpath%20d='M93.9676%2039.0409C96.393%2038.4038%2097.8624%2035.9116%2097.0079%2033.5539C95.2932%2028.8227%2092.871%2024.3692%2089.8167%2020.348C85.8452%2015.1192%2080.8826%2010.7238%2075.2124%207.41289C69.5422%204.10194%2063.2754%201.94025%2056.7698%201.05124C51.7666%200.367541%2046.6976%200.446843%2041.7345%201.27873C39.2613%201.69328%2037.813%204.19778%2038.4501%206.62326C39.0873%209.04874%2041.5694%2010.4717%2044.0505%2010.1071C47.8511%209.54855%2051.7191%209.52689%2055.5402%2010.0491C60.8642%2010.7766%2065.9928%2012.5457%2070.6331%2015.2552C75.2735%2017.9648%2079.3347%2021.5619%2082.5849%2025.841C84.9175%2028.9121%2086.7997%2032.2913%2088.1811%2035.8758C89.083%2038.2158%2091.5421%2039.6781%2093.9676%2039.0409Z'%20fill='currentFill'%20/%3e%3c/svg%3e",jnr="/",Wnr={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:qnr,ChatBarButton:_9},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:znr,sendGlobe:iU,bUrl:jnr,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{leftPanelCollapsed(){return this.$store.state.leftPanelCollapsed},rightPanelCollapsed(){return this.$store.state.rightPanelCollapsed},isCompactMode(){return this.$store.state.view_mode==="compact"},isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("rag_databases",this.$store.state.config.rag_databases),console.log("remote_databases",this.$store.state.config.remote_databases);const e=[...this.$store.state.config.rag_databases,...this.$store.state.config.remote_databases].map(n=>{console.log("entry",n);const r=n.mounted?"feather:check":"";return console.log("icon decision",r),{name:n.alias,value:n.alias||"default_value",icon:r,help:"mounts the database"}});return console.log("formatted data sources",e),e}},methods:{showSendMenu(){clearTimeout(this.hideSendMenuTimeout),this.isSendMenuVisible=!0},hideSendMenu(){this.hideSendMenuTimeout=setTimeout(()=>{this.isSendMenuVisible=!1},300)},toggleLeftPanel(){console.log(this.leftPanelCollapsed),this.$store.commit("setLeftPanelCollapsed",!this.leftPanelCollapsed)},async toggleRightPanel(){console.log(this.rightPanelCollapsed),this.$store.commit("setRightPanelCollapsed",!this.rightPanelCollapsed),this.rightPanelCollapsed&&(this.$store.commit("setleftPanelCollapsed",!0),this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},handlePaste(t){const e=(t.clipboardData||t.originalEvent.clipboardData).items;let n=[];for(let r of e)if(r.type.indexOf("image")!==-1){const i=r.getAsFile(),s=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",s);const a=new File([i],s,{type:i.type});this.addFiles([a])}else if(r.kind==="file"){const i=r.getAsFile();n.push(i)}n.length>0&&this.addFiles(n)},emitloaded(){this.$emit("loaded")},download_files(){ve.get("/download_files")},remove_file(t){ve.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){ve.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,r=24*1024;let i=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=i+a.byteLength>=t.size;tt.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:l,chunkIndex:o}),i+=a.byteLength,o++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):s()};function s(){const a=t.slice(i,i+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),s()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},updateRT(){console.log("Updating rt status"),this.is_rt?this.stopRTCom():this.startRTCom()},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),tt.emit("start_bidirectional_audio_stream"),qe(()=>{Ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),tt.emit("stop_bidirectional_audio_stream"),qe(()=>{Ze.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},computedFileSize(t){return qe(()=>{Ze.replace()}),$o(t)},removeItem(t){console.log("Removing ",t.name),ve.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await ve.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){tt.emit("take_picture"),tt.on("picture_taken",()=>{ve.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,r()})};r()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){qe(()=>{Ze.replace()})},loading(t,e){qe(()=>{Ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Ze.replace()}),console.log("Chatbar mounted"),tt.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){qe(()=>{Ze.replace()})}},Ynr={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Knr={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Znr={class:"flex"},Xnr=["title"],Jnr={key:0},err={class:"flex flex-col max-h-64"},trr=["title"],nrr={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},rrr={key:0,filesList:"",role:"status"},irr={class:"flex flex-row items-center"},orr={class:"whitespace-nowrap"},srr=["onClick"],arr={key:1,class:"flex mx-1 w-500"},lrr={class:"whitespace-nowrap flex flex-row gap-2"},crr={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},urr={role:"status"},drr=["src"],frr={class:"flex w-fit relative grow w-full"},prr={class:"chat-bar",tabindex:"0"},hrr={key:0,title:"Waiting for reply"},Trr=["src"],mrr={class:"w-fit"},grr={class:"w-fit"},_rr={class:"relative grow m-0 p-0"},Qrr={class:"m-0 p-0"},vrr={class:"flex items-center space-x-3"},yrr={class:"relative inline-block"},brr={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},Err={class:"flex flex-col gap-2"};function xrr(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("PersonalitiesCommands");return k(),P("div",Ynr,[i.filesList.length>0?(k(),P("div",Knr,[g("div",Znr,[g("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=he(l=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"list"},null,-1)]),8,Xnr)]),i.filesList.length>0&&i.showfilesList==!0?(k(),P("div",Jnr,[g("div",err,[oe(Ns,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Ve(()=>[(k(!0),P(ze,null,at(i.filesList,(l,c)=>(k(),P("div",{key:c+"-"+l.name},[g("div",{class:"m-1",title:l.name},[g("div",nrr,[i.isFileSentList[c]?ne("",!0):(k(),P("div",rrr,e[12]||(e[12]=[g("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),g("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=g("div",null,[g("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),g("div",{class:We(["line-clamp-1 w-3/5",i.isFileSentList[c]?"text-green-500":"text-red-200"])},le(l.name),3),e[15]||(e[15]=g("div",{class:"grow"},null,-1)),g("div",irr,[g("p",orr,le(o.computedFileSize(l.size)),1),g("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:u=>o.removeItem(l)},e[13]||(e[13]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,srr)])])],8,trr)]))),128))]),_:1})])])):ne("",!0),i.filesList.length>0?(k(),P("div",arr,[g("div",lrr,[e[16]||(e[16]=g("p",{class:"font-bold"}," Total size: ",-1)),ft(" "+le(i.totalSize)+" ("+le(i.filesList.length)+") ",1)]),e[19]||(e[19]=g("div",{class:"grow"},null,-1)),g("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...l)=>o.clear_files&&o.clear_files(...l))},e[17]||(e[17]=[g("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),g("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...l)=>o.download_files&&o.download_files(...l))},e[18]||(e[18]=[g("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):ne("",!0)])):ne("",!0),i.selecting_model||i.selecting_binding?(k(),P("div",crr,[g("div",urr,[g("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,drr),e[20]||(e[20]=g("span",{class:"sr-only"},"Selecting model...",-1))])])):ne("",!0),g("div",frr,[g("div",prr,[n.loading?(k(),P("div",hrr,[g("img",{src:i.loader_v0},null,8,Trr),e[21]||(e[21]=g("div",{role:"status"},[g("span",{class:"sr-only"},"Loading...")],-1))])):ne("",!0),oe(s,{onClick:o.toggleLeftPanel,class:We({"text-red-500":o.leftPanelCollapsed}),title:"Toggle View Mode"},{default:Ve(()=>[J(g("div",null,e[22]||(e[22]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,o.leftPanelCollapsed]]),J(g("div",null,e[23]||(e[23]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,!o.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),g("div",mrr,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(k(),wt(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:o.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):ne("",!0)]),g("div",grr,[o.isDataSourceNamesValid?(k(),wt(a,{key:0,icon:"feather:book",commandsList:o.dataSourceNames,sendCommand:o.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):ne("",!0)]),g("div",_rr,[g("form",Qrr,[J(g("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=l=>i.message=l),onPaste:e[4]||(e[4]=(...l)=>o.handlePaste&&o.handlePaste(...l)),onKeydown:e[5]||(e[5]=Xr(he(l=>o.submitOnEnter(l),["exact"]),["enter"])),class:"w-full p-2 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Send message..."},null,544),[[we,i.message]])])]),g("div",vrr,[n.loading?(k(),wt(s,{key:0,onClick:o.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ve(()=>e[24]||(e[24]=[g("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])),default:Ve(()=>[e[25]||(e[25]=g("span",null,"Stop",-1))]),_:1},8,["onClick"])):(k(),wt(s,{key:1,onClick:o.submit,title:"Send"},{icon:Ve(()=>e[26]||(e[26]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)])),_:1},8,["onClick"])),oe(s,{onClick:o.submitWithInternetSearch,title:"Send with internet search"},{icon:Ve(()=>e[27]||(e[27]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.startSpeechRecognition,class:We({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ve(()=>e[28]||(e[28]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1)])),_:1},8,["onClick","class"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(k(),wt(s,{key:2,onClick:o.updateRT,class:We(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ve(()=>e[29]||(e[29]=[ft(" 🌟 ")])),_:1},8,["onClick","class"])):ne("",!0),n.loading?ne("",!0):(k(),P("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...l)=>o.hideSendMenu&&o.hideSendMenu(...l))},[g("div",yrr,[J(g("div",{onMouseenter:e[6]||(e[6]=(...l)=>o.showSendMenu&&o.showSendMenu(...l)),class:"absolute m-0 p-0 z-10 bottom-full left-1/2 transform -translate-x-1/2 w-25 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",brr,[g("div",Err,[oe(s,{onClick:o.add_file,title:"Send file"},{icon:Ve(()=>e[30]||(e[30]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.takePicture,title:"Take picture"},{icon:Ve(()=>e[31]||(e[31]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.addWebLink,title:"Add web link"},{icon:Ve(()=>e[32]||(e[32]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)])),_:1},8,["onClick"])])])],544),[[Pt,i.isSendMenuVisible]]),g("div",{onMouseenter:e[8]||(e[8]=(...l)=>o.showSendMenu&&o.showSendMenu(...l))},[g("button",{onClick:e[7]||(e[7]=he((...l)=>t.toggleSendMenu&&t.toggleSendMenu(...l),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))],32)])],32)),oe(s,{onClick:o.makeAnEmptyUserMessage,title:"New user message"},{icon:Ve(()=>e[34]||(e[34]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ve(()=>e[35]||(e[35]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)])),_:1},8,["onClick"]),oe(s,{onClick:o.toggleRightPanel,class:We({"text-red-500":!o.rightPanelCollapsed}),title:"Toggle right Panel"},{default:Ve(()=>[J(g("div",null,e[36]||(e[36]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,o.rightPanelCollapsed]]),J(g("div",null,e[37]||(e[37]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,!o.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),g("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...l)=>o.addFiles&&o.addFiles(...l)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=g("div",{class:"ml-auto gap-2"},null,-1))])])}const sU=yt(Wnr,[["render",xrr],["__scopeId","data-v-de7eb11d"]]),Srr={name:"WelcomeComponent",data(){return{videoUrl:"",videoType:"",latestNews:"",error:"",showVideoButton:!1,lastVideoUrl:""}},computed:{getImageForVideoType(){switch(this.videoType.toLowerCase()){case"podcast":return"/podcast.png";case"music":return"/music.png";case"movie":return"/movie.png";case"tutorial":return"/tutorial.png";default:return"/play_video.png"}},logoSrc(){return this.$store.state.config&&this.$store.state.config.app_custom_logo?`/user_infos/${this.$store.state.config.app_custom_logo}`:co}},methods:{async fetchLatestNews(){try{const t=await ve.get("/get_news");this.latestNews=t.data}catch(t){console.error("Failed to fetch latest news:",t),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const t=await ve.get("/get_last_video_url");this.videoUrl=t.data.url,this.videoType=t.data.type,this.checkVideoUpdate()}catch(t){console.error("Failed to fetch video information:",t),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await ve.post("/set_last_viewed_video_url",{client_id:this.$store.state.client_id,last_viewed_video_url:this.videoUrl}),this.showVideoButton=!1},async checkVideoUpdate(){const e=(await ve.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},Lrr={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},Crr={class:"text-center max-w-4xl"},Arr={class:"flex items-center justify-center gap-8 mb-12"},wrr={class:"relative w-24 h-24"},Mrr=["src"],Orr={class:"flex flex-col items-start"},Rrr={class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"},Nrr={class:"space-y-8 animate-fade-in-up"},Drr={class:"text-4xl font-semibold"},Irr={class:"text-xl max-w-3xl mx-auto"},krr={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},Prr=["innerHTML"],Hrr={key:1,class:"mt-6 text-red-500"},Vrr={key:0,class:"floating-button-container"},Frr=["href"],Brr=["src","alt"];function $rr(t,e,n,r,i,o){return k(),P("div",Lrr,[g("div",Crr,[g("div",Arr,[g("div",wrr,[g("img",{src:o.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,Mrr)]),g("div",Orr,[g("h1",Rrr,le(t.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=g("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),g("div",Nrr,[g("h2",Drr,le(t.$store.state.theme_vars.lollms_welcome_short_message),1),g("p",Irr,le(t.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(k(),P("div",krr,[e[2]||(e[2]=g("h3",null,"Latest LoLLMS News",-1)),g("p",{innerHTML:i.latestNews},null,8,Prr)])):ne("",!0),i.error?(k(),P("div",Hrr,le(i.error),1)):ne("",!0)]),i.showVideoButton?(k(),P("div",Vrr,[g("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s))},[e[3]||(e[3]=g("span",{class:"tooltip"},"New ParisNeo Video!",-1)),g("img",{src:o.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,Brr)],8,Frr)])):ne("",!0)])}const aU=yt(Srr,[["render",$rr],["__scopeId","data-v-d9375d3e"]]);var Urr=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),nd=function(){return nd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},zrr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},jrr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},Wrr={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},Yrr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},Krr={class:"w-full flex flex-row mt-4 text-center justify-center"},Zrr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},Xrr={class:"mb-4 w-full"},Jrr={class:"w-full bg-bg-light dark:bg-bg-dark"};function eir(t,e,n,r,i,o){return i.show?(k(),P("div",zrr,[g("div",jrr,[g("div",Wrr,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide()),class:"absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[17]||(e[17]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",Yrr,[g("div",Krr,[g("button",{type:"submit",onClick:e[1]||(e[1]=he((...s)=>o.submitForm&&o.submitForm(...s),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),g("button",{onClick:e[2]||(e[2]=he(s=>o.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),g("div",Zrr,[g("form",Xrr,[g("table",Jrr,[g("tr",null,[e[18]||(e[18]=g("td",null,[g("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=s=>n.config.personality_conditioning=s)},null,512),[[we,n.config.personality_conditioning]])])]),g("tr",null,[e[19]||(e[19]=g("td",null,[g("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=s=>n.config.user_message_prefix=s)},null,512),[[we,n.config.user_message_prefix]])])]),g("tr",null,[e[20]||(e[20]=g("td",null,[g("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=s=>n.config.ai_message_prefix=s)},null,512),[[we,n.config.ai_message_prefix]])])]),g("tr",null,[e[21]||(e[21]=g("td",null,[g("label",{for:"linkText"},"Link Text:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=s=>n.config.link_text=s)},null,512),[[we,n.config.link_text]])])]),g("tr",null,[e[22]||(e[22]=g("td",null,[g("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=s=>n.config.welcome_message=s)},null,512),[[we,n.config.welcome_message]])])]),g("tr",null,[e[23]||(e[23]=g("td",null,[g("label",{for:"modelTemperature"},"Model Temperature:")],-1)),g("td",null,[J(g("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=s=>n.config.model_temperature=s)},null,512),[[we,n.config.model_temperature]])])]),g("tr",null,[e[24]||(e[24]=g("td",null,[g("label",{for:"modelTopK"},"Model Top K:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=s=>n.config.model_top_k=s)},null,512),[[we,n.config.model_top_k]])])]),g("tr",null,[e[25]||(e[25]=g("td",null,[g("label",{for:"modelTopP"},"Model Top P:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=s=>n.config.model_top_p=s)},null,512),[[we,n.config.model_top_p]])])]),g("tr",null,[e[26]||(e[26]=g("td",null,[g("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=s=>n.config.model_repeat_penalty=s)},null,512),[[we,n.config.model_repeat_penalty]])])]),g("tr",null,[e[27]||(e[27]=g("td",null,[g("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=s=>n.config.model_repeat_last_n=s)},null,512),[[we,n.config.model_repeat_last_n]])])]),g("tr",null,[e[28]||(e[28]=g("td",null,[g("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=s=>n.config.recommended_binding=s)},null,512),[[we,n.config.recommended_binding]])])]),g("tr",null,[e[29]||(e[29]=g("td",null,[g("label",{for:"recommendedModel"},"Recommended Model:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=s=>n.config.recommended_model=s)},null,512),[[we,n.config.recommended_model]])])]),g("tr",null,[e[30]||(e[30]=g("td",null,[g("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=s=>n.config.dependencies=s)},null,512),[[we,n.config.dependencies]])])]),g("tr",null,[e[31]||(e[31]=g("td",null,[g("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=s=>n.config.anti_prompts=s)},null,512),[[we,n.config.anti_prompts]])])])])])])])])])])):ne("",!0)}const QU=yt(qrr,[["render",eir]]),tir={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){ve.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},nir={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},rir={class:"popup-container"},iir=["src"],oir={class:"checkbox-container"};function sir(t,e,n,r,i,o){return k(),wt(lo,{name:"fade"},{default:Ve(()=>[i.showPopup?(k(),P("div",nir,[g("div",rir,[g("button",{onClick:e[0]||(e[0]=(...s)=>o.hide&&o.hide(...s)),class:"close-button"}," X "),g("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,iir),g("div",oir,[J(g("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=s=>this.$store.state.config.show_news_panel=s),onChange:e[2]||(e[2]=(...s)=>o.save_configuration&&o.save_configuration(...s))},null,544),[[nt,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=g("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):ne("",!0)]),_:1})}const vU=yt(tir,[["render",sir],["__scopeId","data-v-d504dfc9"]]),air="/assets/fastapi-BQj-rjUJ.png",lir="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.14%2096.36'%3e%3cg%20id='图层_2'%20data-name='图层%202'%3e%3cg%20id='Discord_Logos'%20data-name='Discord%20Logos'%3e%3cg%20id='Discord_Logo_-_Large_-_White'%20data-name='Discord%20Logo%20-%20Large%20-%20White'%3e%3cpath%20d='M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",cir="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3c/circle%3e%3c/svg%3e",uir="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3canimate%20attributeName='y1'%20values='30;25;30'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3canimate%20attributeName='y2'%20values='15;20;15'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3canimate%20attributeName='cy'%20values='35;30;35'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/circle%3e%3c/svg%3e",dir="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20data-name='Layer%205'%20id='Layer_5'%3e%3cpath%20d='M47,33H17a1,1,0,0,0-1,1c0,9.93,7.18,18,16,18s16-8.07,16-18A1,1,0,0,0,47,33ZM18,35H46a18,18,0,0,1-.67,4H18.71A18,18,0,0,1,18,35ZM26.7,48.8a6.42,6.42,0,0,1,10.6,0,12.3,12.3,0,0,1-10.6,0Zm12.34-1A8.81,8.81,0,0,0,32,44a8.81,8.81,0,0,0-7,3.81A15.56,15.56,0,0,1,19.43,41H44.57A15.56,15.56,0,0,1,39,47.81ZM36,22a1.1,1.1,0,0,1,0-.18,1.17,1.17,0,0,1,.06-.2s0-.05,0-.07a.28.28,0,0,1,.07-.09.71.71,0,0,1,.28-.28s.06-.06.09-.07l10-5a1,1,0,1,1,.9,1.78L39.24,22l8.21,4.11a1,1,0,0,1,.44,1.34A1,1,0,0,1,47,28a.93.93,0,0,1-.45-.11l-10-5h0a1.18,1.18,0,0,1-.28-.22l0-.06a.65.65,0,0,1-.1-.15s0-.05,0-.07a1.17,1.17,0,0,1-.06-.2A1.1,1.1,0,0,1,36,22ZM16.55,26.11,24.76,22l-8.21-4.11a1,1,0,1,1,.9-1.78l10,5s.06.05.09.07a.71.71,0,0,1,.28.28.28.28,0,0,1,.07.09s0,.05,0,.07a1.17,1.17,0,0,1,.06.2.82.82,0,0,1,0,.36,1.17,1.17,0,0,1-.06.2s0,.05,0,.07a.65.65,0,0,1-.1.15.21.21,0,0,0,0,.06,1.18,1.18,0,0,1-.28.22h0l-10,5A.93.93,0,0,1,17,28a1,1,0,0,1-.89-.55A1,1,0,0,1,16.55,26.11ZM60.66,36.45A29.69,29.69,0,0,0,61,32,29,29,0,0,0,3,32a29.69,29.69,0,0,0,.34,4.45,4.65,4.65,0,0,0,2.39,7.82,29,29,0,0,0,52.54,0,4.65,4.65,0,0,0,2.39-7.82ZM4.78,41.58a2.91,2.91,0,0,1-.24-.27A2.62,2.62,0,0,1,4,39.71a.61.61,0,0,1,0-.14,2.58,2.58,0,0,1,.77-1.73,4.38,4.38,0,0,1,.74-.55C7,36.38,10,34.9,12.69,33.67c-1.52,3.3-3.42,7.17-4.17,7.91a2.59,2.59,0,0,1-1.47.72A2.66,2.66,0,0,1,4.78,41.58ZM32,59A27,27,0,0,1,7.92,44.18a4.56,4.56,0,0,0,2-1.18c1.48-1.49,5-9.36,5.66-10.92a1,1,0,0,0-1.32-1.32c-.78.34-3.14,1.39-5.49,2.53-1.29.63-2.58,1.29-3.6,1.88A25.58,25.58,0,0,1,5,32a27,27,0,0,1,54,0,25.58,25.58,0,0,1-.19,3.17c-2.88-1.66-7.88-3.88-9.09-4.41a1,1,0,0,0-1.32,1.32c.69,1.56,4.18,9.43,5.66,10.92a4.56,4.56,0,0,0,2,1.18A27,27,0,0,1,32,59ZM59.46,41.31a2.91,2.91,0,0,1-.24.27A2.66,2.66,0,0,1,57,42.3a2.59,2.59,0,0,1-1.47-.72c-.75-.74-2.65-4.61-4.17-7.91,1.65.76,3.44,1.61,4.91,2.37.91.47,1.7.9,2.26,1.25a4.38,4.38,0,0,1,.74.55A2.58,2.58,0,0,1,60,39.57a.61.61,0,0,1,0,.14A2.62,2.62,0,0,1,59.46,41.31Z'/%3e%3c/g%3e%3c/svg%3e",fir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512.001%20512.001'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20d='M256.001,0C114.841,0,0,114.841,0,256.001s114.841,256.001,256.001,256.001S512.001,397.16,512.001,256.001%20S397.16,0,256.001,0z%20M256.001,493.701c-131.069,0-237.702-106.631-237.702-237.7S124.932,18.299,256.001,18.299%20s237.702,106.632,237.702,237.702S387.068,493.701,256.001,493.701z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M371.284,296.658H138.275c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h233.008c5.054,0,9.15-4.097,9.15-9.15%20C380.433,300.754,376.337,296.658,371.284,296.658z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M297.481,330.816h-85.403c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h85.403c5.054,0,9.15-4.097,9.15-9.15%20S302.534,330.816,297.481,330.816z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M146.725,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20c18.666,0,33.852-15.186,33.852-33.852C180.577,208.168,165.391,192.982,146.725,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M365.275,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20s33.852-15.186,33.852-33.852C399.128,208.168,383.942,192.982,365.275,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cg%3e%3ccircle%20cx='155.969'%20cy='219.735'%20r='9.15'/%3e%3ccircle%20cx='374.338'%20cy='219.735'%20r='9.15'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",pir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20299.92%20299.92'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M293.4,65.2H6.52C2.914,65.2,0,68.114,0,71.72v117.36c0,3.606,2.914,6.52,6.52,6.52h6.52v32.6%20c0,3.606,2.914,6.52,6.52,6.52h260.8c3.606,0,6.52-2.914,6.52-6.52v-32.6h6.52c3.606,0,6.52-2.914,6.52-6.52V71.72%20C299.92,68.114,297.006,65.2,293.4,65.2z%20M273.84,221.68h-19.56H228.2h-26.08h-26.08h-26.08h-26.08H97.8H71.72H45.64H26.08V195.6%20h19.56h26.08H97.8h26.08h26.08h26.08h26.08h26.08h26.08h19.56V221.68z%20M286.88,182.56h-6.52H19.56h-6.52V78.24h273.84V182.56z'/%3e%3cpath%20d='M32.6,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H32.6c-3.606,0-6.52,2.914-6.52,6.52%20V163C26.08,166.606,28.994,169.52,32.6,169.52z%20M39.12,104.32H65.2v52.16H39.12V104.32z'/%3e%3cpath%20d='M97.8,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H97.8c-3.606,0-6.52,2.914-6.52,6.52%20V163C91.28,166.606,94.194,169.52,97.8,169.52z%20M104.32,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M163,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H163c-3.606,0-6.52,2.914-6.52,6.52%20V163C156.48,166.606,159.394,169.52,163,169.52z%20M169.52,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M228.2,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H228.2%20c-3.606,0-6.52,2.914-6.52,6.52V163C221.68,166.606,224.594,169.52,228.2,169.52z%20M234.72,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M52.16,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C49.246,221.68,52.16,218.766,52.16,215.16z'/%3e%3cpath%20d='M78.24,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C75.326,221.68,78.24,218.766,78.24,215.16z'/%3e%3cpath%20d='M104.32,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C101.406,221.68,104.32,218.766,104.32,215.16z'/%3e%3cpath%20d='M130.4,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C127.486,221.68,130.4,218.766,130.4,215.16z'/%3e%3cpath%20d='M156.48,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52s-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20S156.48,218.766,156.48,215.16z'/%3e%3cpath%20d='M182.56,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C179.646,221.68,182.56,218.766,182.56,215.16z'/%3e%3cpath%20d='M208.64,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C205.726,221.68,208.64,218.766,208.64,215.16z'/%3e%3cpath%20d='M234.72,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C231.806,221.68,234.72,218.766,234.72,215.16z'/%3e%3cpath%20d='M260.8,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C257.886,221.68,260.8,218.766,260.8,215.16z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",hir="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='green'%20stroke-width='4'%20fill='green'%20/%3e%3cpath%20stroke='white'%20stroke-width='4'%20d='M40%2050%20l10%2010%2020%20-20'%20fill='none'%20/%3e%3c/svg%3e",Tir="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='red'%20stroke-width='4'%20fill='red'%20/%3e%3cline%20x1='35'%20y1='35'%20x2='65'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3cline%20x1='65'%20y1='35'%20x2='35'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3c/svg%3e",mir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='800px'%20height='800px'%20viewBox='0%200%20461.759%20461.759'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M0,301.058h147.916v147.919H0V301.058z%20M194.432,448.977H342.35V301.058H194.432V448.977z%20M2.802,257.347h147.916V109.434%20H2.802V257.347z%20M325.476,92.219l-51.603-79.437l-79.441,51.601l51.604,79.437L325.476,92.219z%20M219.337,213.733l71.045,62.663%20l62.66-71.039l-71.044-62.669L219.337,213.733z%20M412.107,57.967l-80.668,49.656l49.652,80.666l80.668-49.65L412.107,57.967z'/%3e%3c/g%3e%3c/svg%3e",gir="/assets/robot-CQPaMbxU.svg",_ir="/";ve.defaults.baseURL="/";const Qir={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:db,UniversalForm:d$},data(){return{bUrl:_ir,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0;let e=await ve.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await ve.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await ve.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{ve.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+t.name,"Save changes","Cancel").then(n=>{try{ve.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0)):this.$store.state.toast.showToast(`Did not get Personality settings responses. `+r,4,!1)})}catch(r){this.$store.state.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+r.message,4,!1)}}):this.$store.state.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$store.state.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(qe(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await ve.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Db}}},Qir={class:"relative group/item"},vir=["src","alt"],yir={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},bir={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},Eir={class:"text-xs font-bold"};function xir(t,e,n,r,i,o){const s=pt("UniversalForm");return k(),P(ze,null,[g("div",Qir,[g("button",{onClick:e[1]||(e[1]=he((...a)=>o.onSettingsPersonality&&o.onSettingsPersonality(...a),["prevent"])),class:We(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib}])},[g("img",{src:o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),alt:o.mountedPers.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":t.isActive}])},null,42,vir)],2),g("div",yir,[g("button",{onClick:e[2]||(e[2]=he(a=>o.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),g("button",{onClick:e[3]||(e[3]=he(a=>o.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),g("button",bir,[g("span",Eir,"+"+le(o.mountedPersArr.length-1),1)])])]),oe(s,{ref:"universalForm",class:"z-50"},null,512)],64)}const yU=yt(_ir,[["render",xir],["__scopeId","data-v-85f3dede"]]),Sir={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},Lir={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},Cir={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},Air={class:"mb-8 w-full"},wir={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},Mir={class:"bottom-0 text-2xl italic"},Oir={class:"text-lg"},Rir=["innerHTML"],Nir={class:"animated-progressbar-bg"},Dir={class:"w-full max-w-2xl"},Iir={role:"status",class:"w-full"},kir={class:"text-xl"},Pir={class:"text-2xl font-bold mt-2"},Hir={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},Vir={class:"logo-container"},Fir=["src"],Bir={class:"toolbar discussion"},$ir={class:"toolbar-container"},Uir={class:"p-4 flex flex-wrap gap-2 items-center"},Gir={class:"p-4 flex flex-wrap gap-2 items-center"},qir={class:"relative"},zir={class:"relative"},jir={key:0,title:"Loading..",class:"flex justify-center"},Wir={key:1,class:"flex justify-center space-x-4"},Yir={key:2,class:"flex flex-col space-y-2"},Kir={class:"relative inline-block"},Zir={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Xir={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Jir={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},eor=["onClick","title"],tor=["src","alt"],nor=["title"],ror={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},ior=["onClick"],oor={class:"flex space-x-1"},sor=["onClick"],aor=["src","title"],lor={class:"relative inline-block"},cor={class:"p-2 border-b border-gray-200 dark:border-gray-700"},uor={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},dor={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},por=["onClick","title"],hor=["src","alt"],Tor=["title"],mor={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},gor=["onClick"],_or={class:"flex space-x-1"},Qor=["onClick"],vor=["src","title"],yor={class:"relative inline-block"},bor={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Eor={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},xor={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Sor=["onClick","title"],Lor=["src","alt"],Cor=["title"],Aor={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},wor=["onClick"],Mor={class:"flex space-x-1"},Oor=["onClick"],Ror=["onClick"],Nor=["onClick"],Dor={class:"personalities-container"},Ior={class:"w-auto max-w-md mx-auto p-2"},kor={class:"flex items-center"},Por={class:"relative flex-grow"},Hor={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},Vor={class:"flex flex-col space-y-2"},For={key:0},Bor={key:1,class:"flex space-x-2"},$or={key:1,class:"flex space-x-2"},Uor={class:"flex space-x-2"},Gor={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},qor={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},zor={class:"flex flex-row items-center justify-center panels-color"},jor={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Wor={key:0,class:"relative flex flex-col flex-grow"},Yor={class:"container pt-4 pb-50 mb-50 w-full"},Kor={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},Zor={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},Xor={class:"flex flex-nowrap gap-6 p-4 min-w-full"},Jor=["title","onClick"],esr={class:"space-y-3"},tsr=["title"],nsr=["title"],rsr={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},isr={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},osr={class:"flex-1 flex flex-col min-h-0"},ssr={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},asr={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},lsr={class:"text-base whitespace-pre-wrap"},csr={class:"flex-1 overflow-y-auto"},usr={class:"space-y-4"},dsr=["for"],fsr=["id","onUpdate:modelValue","placeholder"],psr=["id","onUpdate:modelValue"],hsr=["id","onUpdate:modelValue"],Tsr=["id","onUpdate:modelValue"],msr={key:4,class:"border rounded-md overflow-hidden"},gsr={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},_sr=["id","onUpdate:modelValue"],Qsr=["id","onUpdate:modelValue"],vsr=["value"],ysr={class:"mt-6 flex justify-end space-x-4"},bsr={key:0,class:"flex flex-row items-center justify-center h-10"},Esr={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},xsr={ref:"isolatedContent",class:"h-full"},Ssr={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Lsr={class:"text-2xl animate-pulse mt-2 text-white"},Csr={id:"app"},Asr=t=>{const e=t.replace("[","").replace("]","").split("::"),n=e[0];if(e.length===1)return{label:n,type:"text",fullText:t};const r=e[1],i={label:n,type:r,fullText:t};switch(r){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(o=>o.trim()):[];break;default:i.type="text"}return i},wsr="/",Msr={setup(){},data(){return{interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","At 12, ParisNeo coded 'Saif14' in BASIC on a Tandy 1000, an 'all-in-one' suite named with a friend. LoLLMs v14 'Saïph' - a star in Orion - echoes this BASIC creation's spirit and hints at OpenAI's future.",`The new AI Village app in LoLLMs, simulating AI agents believing they're human, mirrors "The Hitchhiker's Guide to the Galaxy" (ParisNeo's favorite) where Earth was a simulation to compute the Ultimate Question. Both explore the idea of unsuspecting inhabitants participating in a grand cosmic calculation!`,'Once upon a time, young ParisNeo dove so deep into "The Matrix" that he watched it 60 times in two months, practically becoming a human DVD player! Fast forward to today, and this same Matrix-obsessed kid grew up to create LoLLMs, where AI personas are like digital kung-fu masters, and users are the chosen ones. Talk about life imitating art - ParisNeo went from "I know kung fu" to "I code AI"! Who knew binge-watching could lead to bending the rules of AI reality?',"Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 2000 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The world's first computer programmer was a woman named Ada Lovelace.","There are more possible iterations of a game of chess than there are atoms in the known universe.","The first AI program was written in 1951 to play checkers.","The Internet was originally called ARPANET and was developed by the US Department of Defense.","The concept of zero as a number was developed in ancient India, with the earliest known text using it dating to 458 CE.","Light from the Sun takes about 8 minutes and 20 seconds to reach Earth.","The first mobile phone call was made in 1973 by Martin Cooper.","The human brain processes images 60,000 times faster than text.","The most powerful supercomputer today can perform about 442 quadrillion calculations per second.","The ancient Egyptians invented the 365-day calendar we still use today.","Mathematicians have calculated pi to over 62 trillion digits.","Quantum computers can theoretically solve certain problems in seconds that would take classical computers billions of years.","The first email was sent in 1971 by Ray Tomlinson.","The Hubble Space Telescope can see galaxies so far away, it's like looking back in time billions of years.","The largest known prime number has over 24 million digits.","AI can now generate realistic images, music, and even write stories.","The Great Wall of China is not visible from space with the naked eye, contrary to popular belief.","There are more possible ways to shuffle a deck of 52 cards than there are atoms on Earth.","The first computer virus was created in 1983 as an experiment.","The speed of light in a vacuum is exactly 299,792,458 meters per second.","ParisNeo started coding at age 11 after an older programmer refused to teach him BASIC programming","ParisNeo learned BASIC by reverse engineering other people's games, even before he learned English","At age 12, ParisNeo co-created SAIF14, a suite of programs on a Tandy 1000 computer built by two kids","LoLLMs runs on a custom-built gaming PC that ParisNeo assembled and configured himself","The project started as a simple Chrome plugin called 'chatgpt personality selector'","ParisNeo's summer bet involved watching The Matrix 60 times in one month (twice daily) while his uncle gave up","The name LoLLMs was inspired by 'Lord of the Rings', positioning itself as 'one tool to rule them all'","LoLLMs has a 'Personalities Zoo' with over 500 different AI personas","The project evolved from handling just language models to becoming a multimodal system, hence the 'M' in LoLLMs","ParisNeo's difficulty with academic writing led him to develop AI solutions for writing assistance","LoLLMs' development was influenced by science fiction concepts from Wall-E, Terminator, and The Hitchhiker's Guide to the Galaxy","The project went from being 'GPT4All WebUI' to 'Lord of Large Language Models' before becoming 'Lord of Large Language & Multimodal Systems'","ParisNeo received early access to GPT-3 and used it to push the boundaries of what was possible with AI","The project maintains a philosophy of 'Don't panic, bring a towel, and trust in AI' - a reference to The Hitchhiker's Guide to the Galaxy","Despite having multiple patents in various fields, ParisNeo's interest in AI was sparked when he read about AlexNet in 2012","LoLLMs receives daily updates, similar to course corrections on a starship","ParisNeo's journey into programming shows his determination - he taught himself BASIC by reverse engineering games before he even knew English"],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isSkillsLibraryMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:lir,animated_info:cir,normal_mode:dir,fun_mode:uir,is_first_connection:!0,discord:air,FastAPI:sir,modelImgPlaceholder:ri,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` + Endpoint error: `+r.message,4,!1)}}):this.$store.state.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$store.state.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(qe(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await ve.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Db}}},vir={class:"relative group/item"},yir=["src","alt"],bir={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},Eir={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},xir={class:"text-xs font-bold"};function Sir(t,e,n,r,i,o){const s=pt("UniversalForm");return k(),P(ze,null,[g("div",vir,[g("button",{onClick:e[1]||(e[1]=he((...a)=>o.onSettingsPersonality&&o.onSettingsPersonality(...a),["prevent"])),class:We(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib}])},[g("img",{src:o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),alt:o.mountedPers.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":t.isActive}])},null,42,yir)],2),g("div",bir,[g("button",{onClick:e[2]||(e[2]=he(a=>o.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),g("button",{onClick:e[3]||(e[3]=he(a=>o.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),g("button",Eir,[g("span",xir,"+"+le(o.mountedPersArr.length-1),1)])])]),oe(s,{ref:"universalForm",class:"z-50"},null,512)],64)}const yU=yt(Qir,[["render",Sir],["__scopeId","data-v-85f3dede"]]),Lir={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},Cir={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},Air={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},wir={class:"mb-8 w-full"},Mir={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},Oir={class:"bottom-0 text-2xl italic"},Rir={class:"text-lg"},Nir=["innerHTML"],Dir={class:"animated-progressbar-bg"},Iir={class:"w-full max-w-2xl"},kir={role:"status",class:"w-full"},Pir={class:"text-xl"},Hir={class:"text-2xl font-bold mt-2"},Vir={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},Fir={class:"logo-container"},Bir=["src"],$ir={class:"toolbar discussion"},Uir={class:"toolbar-container"},Gir={class:"p-4 flex flex-wrap gap-2 items-center"},qir={class:"p-4 flex flex-wrap gap-2 items-center"},zir={class:"relative"},jir={class:"relative"},Wir={key:0,title:"Loading..",class:"flex justify-center"},Yir={key:1,class:"flex justify-center space-x-4"},Kir={key:2,class:"flex flex-col space-y-2"},Zir={class:"relative inline-block"},Xir={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Jir={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},eor={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},tor=["onClick","title"],nor=["src","alt"],ror=["title"],ior={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},oor=["onClick"],sor={class:"flex space-x-1"},aor=["onClick"],lor=["src","title"],cor={class:"relative inline-block"},uor={class:"p-2 border-b border-gray-200 dark:border-gray-700"},dor={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},por={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},hor=["onClick","title"],Tor=["src","alt"],mor=["title"],gor={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},_or=["onClick"],Qor={class:"flex space-x-1"},vor=["onClick"],yor=["src","title"],bor={class:"relative inline-block"},Eor={class:"p-2 border-b border-gray-200 dark:border-gray-700"},xor={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Sor={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Lor=["onClick","title"],Cor=["src","alt"],Aor=["title"],wor={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Mor=["onClick"],Oor={class:"flex space-x-1"},Ror=["onClick"],Nor=["onClick"],Dor=["onClick"],Ior={class:"personalities-container"},kor={class:"w-auto max-w-md mx-auto p-2"},Por={class:"flex items-center"},Hor={class:"relative flex-grow"},Vor={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},For={class:"flex flex-col space-y-2"},Bor={key:0},$or={key:1,class:"flex space-x-2"},Uor={key:1,class:"flex space-x-2"},Gor={class:"flex space-x-2"},qor={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},zor={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},jor={class:"flex flex-row items-center justify-center panels-color"},Wor={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Yor={key:0,class:"relative flex flex-col flex-grow"},Kor={class:"container pt-4 pb-50 mb-50 w-full"},Zor={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},Xor={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},Jor={class:"flex flex-nowrap gap-6 p-4 min-w-full"},esr=["title","onClick"],tsr={class:"space-y-3"},nsr=["title"],rsr=["title"],isr={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},osr={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},ssr={class:"flex-1 flex flex-col min-h-0"},asr={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},lsr={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},csr={class:"text-base whitespace-pre-wrap"},usr={class:"flex-1 overflow-y-auto"},dsr={class:"space-y-4"},fsr=["for"],psr=["id","onUpdate:modelValue","placeholder"],hsr=["id","onUpdate:modelValue"],Tsr=["id","onUpdate:modelValue"],msr=["id","onUpdate:modelValue"],gsr={key:4,class:"border rounded-md overflow-hidden"},_sr={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},Qsr=["id","onUpdate:modelValue"],vsr=["id","onUpdate:modelValue"],ysr=["value"],bsr={class:"mt-6 flex justify-end space-x-4"},Esr={key:0,class:"flex flex-row items-center justify-center h-10"},xsr={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},Ssr={ref:"isolatedContent",class:"h-full"},Lsr={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Csr={class:"text-2xl animate-pulse mt-2 text-white"},Asr={id:"app"},wsr=t=>{const e=t.replace("[","").replace("]","").split("::"),n=e[0];if(e.length===1)return{label:n,type:"text",fullText:t};const r=e[1],i={label:n,type:r,fullText:t};switch(r){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(o=>o.trim()):[];break;default:i.type="text"}return i},Msr="/",Osr={setup(){},data(){return{interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","At 12, ParisNeo coded 'Saif14' in BASIC on a Tandy 1000, an 'all-in-one' suite named with a friend. LoLLMs v14 'Saïph' - a star in Orion - echoes this BASIC creation's spirit and hints at OpenAI's future.",`The new AI Village app in LoLLMs, simulating AI agents believing they're human, mirrors "The Hitchhiker's Guide to the Galaxy" (ParisNeo's favorite) where Earth was a simulation to compute the Ultimate Question. Both explore the idea of unsuspecting inhabitants participating in a grand cosmic calculation!`,'Once upon a time, young ParisNeo dove so deep into "The Matrix" that he watched it 60 times in two months, practically becoming a human DVD player! Fast forward to today, and this same Matrix-obsessed kid grew up to create LoLLMs, where AI personas are like digital kung-fu masters, and users are the chosen ones. Talk about life imitating art - ParisNeo went from "I know kung fu" to "I code AI"! Who knew binge-watching could lead to bending the rules of AI reality?',"Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 2000 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The world's first computer programmer was a woman named Ada Lovelace.","There are more possible iterations of a game of chess than there are atoms in the known universe.","The first AI program was written in 1951 to play checkers.","The Internet was originally called ARPANET and was developed by the US Department of Defense.","The concept of zero as a number was developed in ancient India, with the earliest known text using it dating to 458 CE.","Light from the Sun takes about 8 minutes and 20 seconds to reach Earth.","The first mobile phone call was made in 1973 by Martin Cooper.","The human brain processes images 60,000 times faster than text.","The most powerful supercomputer today can perform about 442 quadrillion calculations per second.","The ancient Egyptians invented the 365-day calendar we still use today.","Mathematicians have calculated pi to over 62 trillion digits.","Quantum computers can theoretically solve certain problems in seconds that would take classical computers billions of years.","The first email was sent in 1971 by Ray Tomlinson.","The Hubble Space Telescope can see galaxies so far away, it's like looking back in time billions of years.","The largest known prime number has over 24 million digits.","AI can now generate realistic images, music, and even write stories.","The Great Wall of China is not visible from space with the naked eye, contrary to popular belief.","There are more possible ways to shuffle a deck of 52 cards than there are atoms on Earth.","The first computer virus was created in 1983 as an experiment.","The speed of light in a vacuum is exactly 299,792,458 meters per second.","ParisNeo started coding at age 11 after an older programmer refused to teach him BASIC programming","ParisNeo learned BASIC by reverse engineering other people's games, even before he learned English","At age 12, ParisNeo co-created SAIF14, a suite of programs on a Tandy 1000 computer built by two kids","LoLLMs runs on a custom-built gaming PC that ParisNeo assembled and configured himself","The project started as a simple Chrome plugin called 'chatgpt personality selector'","ParisNeo's summer bet involved watching The Matrix 60 times in one month (twice daily) while his uncle gave up","The name LoLLMs was inspired by 'Lord of the Rings', positioning itself as 'one tool to rule them all'","LoLLMs has a 'Personalities Zoo' with over 500 different AI personas","The project evolved from handling just language models to becoming a multimodal system, hence the 'M' in LoLLMs","ParisNeo's difficulty with academic writing led him to develop AI solutions for writing assistance","LoLLMs' development was influenced by science fiction concepts from Wall-E, Terminator, and The Hitchhiker's Guide to the Galaxy","The project went from being 'GPT4All WebUI' to 'Lord of Large Language Models' before becoming 'Lord of Large Language & Multimodal Systems'","ParisNeo received early access to GPT-3 and used it to push the boundaries of what was possible with AI","The project maintains a philosophy of 'Don't panic, bring a towel, and trust in AI' - a reference to The Hitchhiker's Guide to the Galaxy","Despite having multiple patents in various fields, ParisNeo's interest in AI was sparked when he read about AlexNet in 2012","LoLLMs receives daily updates, similar to course corrections on a starship","ParisNeo's journey into programming shows his determination - he taught himself BASIC by reverse engineering games before he even knew English"],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isSkillsLibraryMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:cir,animated_info:uir,normal_mode:fir,fun_mode:dir,is_first_connection:!0,discord:lir,FastAPI:air,modelImgPlaceholder:ri,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` @@ -391,7 +391,7 @@ If You are using windows, this will install wsl so you need to activate it. - `,memory_icon:fir,active_skills:pir,inactive_skills:hir,skillsRegistry:Tir,robot:mir,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},discussionsList:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,isOpen:!1,discussion_id:0}},methods:{updateRandomFact(){let t;do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact&&this.interestingFacts.length>1);this.randomFact=t},async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await ve.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await ve.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(this.hidePersonalitiesMenu(),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.full_path;if(this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: + `,memory_icon:pir,active_skills:hir,inactive_skills:Tir,skillsRegistry:mir,robot:gir,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},discussionsList:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,isOpen:!1,discussion_id:0}},methods:{updateRandomFact(){let t;do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact&&this.interestingFacts.length>1);this.randomFact=t},async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await ve.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await ve.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(this.hidePersonalitiesMenu(),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.full_path;if(this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+t.name,4,!1)}this.$emit("personalitySelected"),qe(()=>{Ze.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.full_path,n=this.$store.state.config.personalities.findIndex(i=>i===e),r={client_id:this.$store.state.client_id,id:n};try{const i=await ve.post("/select_personality",r);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},showPersonalitiesMenu(){clearTimeout(this.hideMenuTimeout),this.isPersonalitiesMenuVisible=!0},showSkillsLibraryMenu(){clearTimeout(this.hideSkillsLibraryMenuTimeout),this.isSkillsLibraryMenuVisible=!0},hideSkillsLibraryMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isSkillsLibraryMenuVisible=!1},300)},hidePersonalitiesMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isPersonalitiesMenuVisible=!1},300)},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},copyModelNameFrom(t){navigator.clipboard.writeText(this.binding_name+"::"+t),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showBindingsMenu(){clearTimeout(this.hideBindingsMenuTimeout),this.isBindingsMenuVisible=!0},hideBindingsMenu(){this.hideBindingsMenuTimeout=setTimeout(()=>{this.isBindingsMenuVisible=!1},300)},setBinding(t){this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),ve.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},showModelsMenu(){clearTimeout(this.hideModelsMenuTimeout),this.isModelsMenuVisible=!0},hideModelsMenu(){this.hideModelsMenuTimeout=setTimeout(()=>{this.isModelsMenuVisible=!1},300)},setModel(t){this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),ve.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},showModelConfig(){try{this.isLoading=!0,ve.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(t.data&&Object.keys(t.data).length>0?this.$store.state.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{ve.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses. @@ -410,15 +410,15 @@ ${e} ${l}`;navigator.clipboard.writeText(c)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),qe(()=>{Ze.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveMarkdowntoFile(t,e){e=e||"data.md";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([t],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>e(this.parseJsonObj(i.target.result)),r.onerror=i=>n(i),r.readAsText(t)})},async exportDiscussionsAsMarkdown(){const t=this.discussionsList.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+r+"."+i+"."+o+s+a)+".md";this.loading=!0;const u=await this.export_multiple_discussions(t,"markdown");u?(this.saveMarkdowntoFile(u,c),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussions(){},async exportDiscussionsAsJson(){const t=this.discussionsList.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+r+"."+i+"."+o+s+a)+".json";this.loading=!0;const u=await this.export_multiple_discussions(t,"json");u?(this.saveJSONtoFile(u,c),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussionsBundle(t){},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let t=this.$store.state.personalities;this.personalityAvatars=t.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(t){if(t.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(r=>r.name===t),n=this.personalityAvatars[e];if(n)return n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){this.randomFact=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];const e=(await ve.get("/get_versionID")).data.versionId;tt.onopen=()=>{this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ze.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";tt.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=tt.id,await this.$store.dispatch("refreshConfig")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=tt.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,tt.on("connected",this.socketIOConnected),tt.on("disconnected",this.socketIODisconnected),tt.on("show_progress",this.show_progress),tt.on("hide_progress",this.hide_progress),tt.on("update_progress",this.update_progress),tt.on("notification",this.notify),tt.on("new_message",this.new_message),tt.on("update_message",this.update_message),tt.on("close_message",this.finalMsgEvent),tt.on("disucssion_renamed",n=>{const r=this.discussionsList.findIndex(o=>o.id==n.discussion_id),i=this.discussionsList[r];i.title=n.title}),tt.onclose=n=>{this.socketIODisconnected()},tt.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),tt.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),tt.disconnect()}},beforeUnmount(){window.removeEventListener("resize",this.adjustMenuPosition)},async mounted(){window.addEventListener("keydown",this.handleShortcut),this.$store.state.news=this.$refs.news,this.$store.state.personality_editor=this.$refs.personality_editor,window.addEventListener("resize",this.adjustMenuPosition),tt.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&qe(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:kb,Message:oU,ChatBox:sU,WelcomeComponent:aU,ChoiceDialog:Ib,ProgressBar:ub,InputBox:itr,SkillsLibraryViewer:rU,PersonalityEditor:QU,PopupViewer:vU,ActionButton:BH,SocialIcon:$H,MountedPersonalities:yU,ChatBarButton:_9},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},"$store.state.config.fun_mode":function(t,e){},"$store.state.isConnected":function(t,e){this.isConnected?this.is_first_connection||(this.$store.state.messageBox.hideMessage(),this.$store.state.messageBox.showMessage("Server connected."),this.$store.state.config.activate_audio_infos&&this.connection_recovered_audio.play()):(this.$store.state.messageBox.showBlockingMessage("Server suddenly disconnected. Please reboot the server to recover the connection"),this.is_first_connection=!1,this.$store.state.config.activate_audio_infos&&this.connection_lost_audio.play()),qe(()=>{Ze.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.discussionsList=this.tempList,this.filterInProgress=!1)},isCheckbox(t){qe(()=>{Ze.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){qe(()=>{Ze.replace()})}},computed:{parsedPlaceholders(){const t=new Map;return this.placeholders.forEach(e=>{const n=Asr(e);t.set(n.fullText,n)}),Array.from(t.values())},filteredBindings(){return this.installedBindings.filter(t=>t.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(t=>t.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(t=>t.name.toLowerCase().includes(this.personalitySearchQuery.toLowerCase()))},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},binding_name(){return this.$store.state.config.binding_name},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},mountedPersonalities(){return this.$store.state.mountedPersArr},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},installedBindings(){return this.$store.state.installedBindings},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},isFullMode(){return this.$store.state.view_mode==="full"},storeLogo(){return this.$store.state.config?co:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:co},currentPersonConfig(){try{return this.$store.state.currentPersonConfig}catch{console.log("Error finding current personality configuration");return}},selectedPersonality(){try{return this.$store.state.selectedPersonality}catch{console.log("Error finding current personality configuration");return}},loading_infos(){return this.$store.state.loading_infos},is_fun_mode(){try{return this.$store.state.config?this.$store.state.config.fun_mode:!1}catch(t){return console.error("Oopsie! Looks like we hit a snag: ",t),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...pW({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?this.$store.state.version:"..."}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(n=>n.full_path===t)},prompts_list(){return this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return tt.id},showLeftPanel(){return console.log("showLeftPanel"),console.log(this.$store.state.leftPanelCollapsed),this.$store.state.ready&&!this.$store.state.leftPanelCollapsed},showRightPanel(){return console.log("showRightPanel"),console.log(this.$store.state.rightPanelCollapsed),this.$store.state.ready&&!this.$store.state.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return qe(()=>{Ze.replace()}),this.discussionsList.filter(t=>t.checkBoxValue==!0)}}},Osr=Object.assign(Msr,{__name:"DiscussionsView",setup(t){return Zo(()=>{_U()}),ve.defaults.baseURL="/",(e,n)=>(k(),P(ze,null,[oe(lo,{name:"fade-and-fly"},{default:Ve(()=>[e.isReady?ne("",!0):(k(),P("div",Sir,[e.$store.state.theme_vars.activate_dropping_animation?(k(),P("div",Lir,[(k(),P(ze,null,at(50,r=>g("div",{key:r,class:"absolute animate-fall animate-giggle",style:xn({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},le(e.$store.state.theme_vars.falling_object),5)),64))])):ne("",!0),g("div",Cir,[g("div",Air,[g("div",wir,le(e.$store.state.theme_vars.lollms_title),1),n[61]||(n[61]=g("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),n[62]||(n[62]=g("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),g("p",Mir,le(e.version_info),1),g("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:n[0]||(n[0]=(...r)=>e.updateRandomFact&&e.updateRandomFact(...r))},[g("p",Oir,[n[60]||(n[60]=g("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),g("span",{innerHTML:e.randomFact},null,8,Rir)])]),g("div",Nir,[g("div",{class:"animated-progressbar-fg",style:xn({width:`${e.loading_progress}%`})},null,4),g("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:xn({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),g("div",Dir,[g("div",Iir,[g("p",kir,le(e.loading_infos)+"... ",1),g("p",Pir,le(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),oe(lo,{name:"slide-right"},{default:Ve(()=>[e.showLeftPanel?(k(),P("div",Hir,[oe(Ft(Qu),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:Ve(()=>[g("div",Vir,[g("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?Ft(co):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:Ft(co),alt:"Logo",title:"LoLLMS WebUI"},null,8,Fir)]),n[63]||(n[63]=g("div",{class:"flex flex-col justify-center"},[g("div",{class:"text-center p-2"},[g("div",{class:"text-md relative inline-block"},[g("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),g("div",{class:"absolute -bottom-0.5 left-0 w-full h-0.5 bg-black dark:bg-white transform origin-left transition-transform duration-300 hover:scale-x-100 scale-x-0"})])]),g("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),g("div",Bir,[g("div",$ir,[g("button",{class:"toolbar-button",title:"Create new discussion",onClick:n[1]||(n[1]=(...r)=>e.createNewDiscussion&&e.createNewDiscussion(...r))},n[64]||(n[64]=[g("i",{"data-feather":"plus"},null,-1)])),e.loading?ne("",!0):(k(),P("div",{key:0,class:"toolbar-button",onMouseleave:n[8]||(n[8]=(...r)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...r))},[J(g("div",{onMouseenter:n[6]||(n[6]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Uir,[e.loading?ne("",!0):(k(),P("button",{key:0,type:"button",onClick:n[2]||(n[2]=he((...r)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...r),["stop"])),title:"Add this discussion content to skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[65]||(n[65]=[g("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(k(),P("button",{key:1,type:"button",onClick:n[3]||(n[3]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[66]||(n[66]=[g("i",{"data-feather":"check-circle"},null,-1)]))):ne("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(k(),P("button",{key:2,type:"button",onClick:n[4]||(n[4]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[67]||(n[67]=[g("i",{"data-feather":"x-octagon"},null,-1)]))):ne("",!0),e.loading?ne("",!0):(k(),P("button",{key:3,type:"button",onClick:n[5]||(n[5]=he((...r)=>e.showSkillsLib&&e.showSkillsLib(...r),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[68]||(n[68]=[g("i",{"data-feather":"book"},null,-1)])))])],544),[[Pt,e.isSkillsLibraryMenuVisible]]),g("div",{onMouseenter:n[7]||(n[7]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"menu-hover-area"},n[69]||(n[69]=[g("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[g("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?ne("",!0):(k(),P("div",{key:1,class:"toolbar-button",onMouseleave:n[22]||(n[22]=(...r)=>e.hideMenu&&e.hideMenu(...r))},[J(g("div",{onMouseenter:n[20]||(n[20]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Gir,[g("button",{class:We(["text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",e.isCheckbox?"text-secondary dark:text-secondary-light":"text-gray-700 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:n[9]||(n[9]=r=>e.isCheckbox=!e.isCheckbox)},n[70]||(n[70]=[g("i",{"data-feather":"check-square"},null,-1)]),2),g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Reset database, remove all discussions",onClick:n[10]||(n[10]=he(()=>{},["stop"]))},n[71]||(n[71]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:n[11]||(n[11]=he(r=>e.database_selectorDialogVisible=!0,["stop"]))},n[72]||(n[72]=[g("i",{"data-feather":"database"},null,-1)])),g("div",qir,[g("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:n[12]||(n[12]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95 rotate-90",title:"Import discussions",type:"button",onClick:n[13]||(n[13]=he(r=>e.$refs.fileDialog.click(),["stop"]))},n[73]||(n[73]=[g("i",{"data-feather":"log-in"},null,-1)]))]),g("div",zir,[g("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:n[14]||(n[14]=(...r)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...r))},null,544),e.showSaveConfirmation?ne("",!0):(k(),P("button",{key:0,title:"Import discussion bundle",onClick:n[15]||(n[15]=he(r=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[74]||(n[74]=[g("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(k(),P("div",jir,n[75]||(n[75]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"w-8 h-8 animate-spin fill-secondary dark:fill-secondary-light",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),e.showSaveConfirmation?(k(),P("div",Wir,[g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:n[16]||(n[16]=he(r=>e.showSaveConfirmation=!1,["stop"]))},n[76]||(n[76]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-3xl hover:text-green-500 dark:hover:text-green-400 duration-150 active:scale-95",title:"Confirm save changes",type:"button",onClick:n[17]||(n[17]=he(r=>e.save_configuration(),["stop"]))},n[77]||(n[77]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),e.isOpen?(k(),P("div",Yir,[g("button",{onClick:n[18]||(n[18]=(...r)=>e.importDiscussions&&e.importDiscussions(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),g("button",{onClick:n[19]||(n[19]=(...r)=>e.importChatGPT&&e.importChatGPT(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):ne("",!0)])],544),[[Pt,e.isMenuVisible]]),g("div",{onMouseenter:n[21]||(n[21]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"menu-hover-area"},n[78]||(n[78]=[g("button",{class:"w-8 h-8",title:"Toggle menu"},[g("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?ne("",!0):(k(),P("div",{key:2,class:"toolbar-button",onMouseleave:n[28]||(n[28]=(...r)=>e.hideBindingsMenu&&e.hideBindingsMenu(...r))},[g("div",Kir,[J(g("div",{onMouseenter:n[25]||(n[25]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Zir,[J(g("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=r=>e.bindingSearchQuery=r),placeholder:"Search bindings...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.bindingSearchQuery]])]),g("div",Xir,[(k(!0),P(ze,null,at(e.filteredBindings,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Jir,[g("button",{onClick:he(o=>e.setBinding(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Ft(ri),onError:n[24]||(n[24]=(...o)=>Ft(ri)&&Ft(ri)(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.binding_name}])},null,42,tor)],8,eor),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,nor)]),g("div",ror,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setBinding(r),["prevent"])},le(r.name),9,ior),g("div",oor,[g("button",{onClick:he(o=>e.showModelConfig(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},n[79]||(n[79]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)]),8,sor)])])]))),128))])],544),[[Pt,e.isBindingsMenuVisible]]),g("div",{onMouseenter:n[27]||(n[27]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"bindings-hover-area"},[g("button",{onClick:n[26]||(n[26]=he(r=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[g("img",{src:e.currentBindingIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:e.currentBinding?e.currentBinding.name:"unknown"},null,8,aor)])],32)])],32)),e.loading?ne("",!0):(k(),P("div",{key:3,class:"toolbar-button",onMouseleave:n[34]||(n[34]=(...r)=>e.hideModelsMenu&&e.hideModelsMenu(...r))},[g("div",lor,[J(g("div",{onMouseenter:n[31]||(n[31]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",cor,[J(g("input",{type:"text","onUpdate:modelValue":n[29]||(n[29]=r=>e.modelSearchQuery=r),placeholder:"Search models...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.modelSearchQuery]])]),g("div",uor,[(k(!0),P(ze,null,at(e.filteredModels,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",dor,[g("button",{onClick:he(o=>e.setModel(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Ft(ri),onError:n[30]||(n[30]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.model_name}])},null,42,hor)],8,por),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Tor)]),g("div",mor,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setModel(r),["prevent"])},le(r.name),9,gor),g("div",_or,[g("button",{onClick:he(o=>e.copyModelNameFrom(r.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},n[80]||(n[80]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,Qor)])])]))),128))])],544),[[Pt,e.isModelsMenuVisible]]),g("div",{onMouseenter:n[33]||(n[33]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"models-hover-area"},[g("button",{onClick:n[32]||(n[32]=he(r=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[g("img",{src:e.currentModelIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:e.currentModel?e.currentModel.name:"unknown"},null,8,vor)])],32)])],32)),e.loading?ne("",!0):(k(),P("div",{key:4,class:"toolbar-button",onMouseleave:n[39]||(n[39]=(...r)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...r))},[g("div",yor,[J(g("div",{onMouseenter:n[37]||(n[37]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",bor,[J(g("input",{type:"text","onUpdate:modelValue":n[35]||(n[35]=r=>e.personalitySearchQuery=r),placeholder:"Search personalities...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.personalitySearchQuery]])]),g("div",Eor,[(k(!0),P(ze,null,at(e.filteredPersonalities,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",xor,[g("button",{onClick:he(o=>e.onPersonalitySelected(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:Ft(wsr)+r.avatar,onError:n[36]||(n[36]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(r.full_path)}])},null,42,Lor)],8,Sor),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Cor)]),g("div",Aor,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.onPersonalitySelected(r),["prevent"])},le(r.name),9,wor),g("div",Mor,[g("button",{onClick:he(o=>e.unmountPersonality(r),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},n[81]||(n[81]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,Oor),g("button",{onClick:he(o=>e.remount_personality(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},n[82]||(n[82]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,Ror),g("button",{onClick:he(o=>e.handleOnTalk(r),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},n[83]||(n[83]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]),8,Nor)])])]))),128))])],544),[[Pt,e.isPersonalitiesMenuVisible]]),g("div",Dor,[g("div",{onMouseenter:n[38]||(n[38]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"personalities-hover-area"},[oe(yU,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),g("div",Ior,[g("form",{onSubmit:n[42]||(n[42]=he((...r)=>e.handleSearch&&e.handleSearch(...r),["prevent"])),class:"relative"},[g("div",kor,[g("div",Por,[J(g("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":n[40]||(n[40]=r=>e.filterTitle=r),onKeyup:n[41]||(n[41]=Xr((...r)=>e.handleSearch&&e.handleSearch(...r),["enter"]))},null,544),[[we,e.filterTitle]]),n[84]||(n[84]=g("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[g("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),n[85]||(n[85]=g("button",{type:"submit",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-secondary rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-1 focus:ring-secondary transition-all duration-150 active:scale-98",title:"Search"},[g("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(k(),P("div",Hor,[g("div",Vor,[e.selectedDiscussions.length>0?(k(),P("p",For,"Selected: "+le(e.selectedDiscussions.length),1)):ne("",!0),e.selectedDiscussions.length>0?(k(),P("div",Bor,[e.showConfirmation?ne("",!0):(k(),P("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[43]||(n[43]=he(r=>e.showConfirmation=!0,["stop"]))},n[86]||(n[86]=[g("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(k(),P("div",$or,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[44]||(n[44]=he((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},n[87]||(n[87]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[45]||(n[45]=he(r=>e.showConfirmation=!1,["stop"]))},n[88]||(n[88]=[g("i",{"data-feather":"x"},null,-1)]))])):ne("",!0)])):ne("",!0),g("div",Uor,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[46]||(n[46]=he((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},n[89]||(n[89]=[g("i",{"data-feather":"codepen"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[47]||(n[47]=he((...r)=>e.exportDiscussions&&e.exportDiscussions(...r),["stop"]))},n[90]||(n[90]=[g("i",{"data-feather":"folder"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[48]||(n[48]=he((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},n[91]||(n[91]=[g("i",{"data-feather":"bookmark"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[49]||(n[49]=he((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},n[92]||(n[92]=[g("i",{"data-feather":"list"},null,-1)]))])])])):ne("",!0),g("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:n[50]||(n[50]=he(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[g("div",Gor,[g("div",{class:We(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[g("div",{id:"dis-list",class:We([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.discussionsList.length>0?(k(),wt(Ns,{key:0,name:"discussionsList"},{default:Ve(()=>[(k(!0),P(ze,null,at(e.discussionsList,(r,i)=>(k(),wt(kb,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,openfolder_enabled:!0,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0),e.discussionsList.length<1?(k(),P("div",qor,n[93]||(n[93]=[g("p",{class:"px-3"},"No discussions are found",-1)]))):ne("",!0)],2)],2)])],32),g("div",zor,[g("div",{class:"chat-bar text-center flex items-center",onClick:n[51]||(n[51]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[oe(_9,null,{default:Ve(()=>n[94]||(n[94]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"mr-2"},[g("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),g("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),g("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),g("p",jor,le(e.formatted_database_name.replace("_"," ")),1)])])])):ne("",!0)]),_:1}),e.isReady?(k(),P("div",Wor,[g("div",{id:"messages-list",class:We(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[g("div",Yor,[e.discussionArr.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(e.discussionArr,(r,i)=>(k(),wt(oU,{key:r.id,message:r,id:"msg-"+r.id,ref_for:!0,ref:"msg-"+r.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(r.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(k(),P("div",Kor,[n[99]||(n[99]=g("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),g("div",Zor,[g("div",Xor,[(k(!0),P(ze,null,at(e.personality.prompts_list,(r,i)=>(k(),P("div",{title:e.extractTitle(r),key:i,onClick:o=>e.handlePromptSelection(r),class:"flex-shrink-0 w-[300px] bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-6 cursor-pointer hover:shadow-xl transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between min-h-[220px] group"},[g("div",esr,[g("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(r)},le(e.extractTitle(r)),9,tsr),g("div",{title:r,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},le(e.getPromptContent(r)),9,nsr)]),n[95]||(n[95]=g("div",{class:"mt-4 text-sm font-medium text-blue-600 dark:text-blue-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1))],8,Jor))),128))])]),e.showPlaceholderModal?(k(),P("div",rsr,[g("div",isr,[n[98]||(n[98]=g("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),g("div",osr,[g("div",ssr,[n[96]||(n[96]=g("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),g("div",asr,[g("span",lsr,le(e.getPromptContent(e.previewPrompt)),1)])]),g("div",csr,[g("div",usr,[(k(!0),P(ze,null,at(e.parsedPlaceholders,(r,i)=>(k(),P("div",{key:r.fullText,class:"flex flex-col"},[g("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},le(r.label),9,dsr),r.type==="text"?J((k(),P("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:r.label,onInput:n[52]||(n[52]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,fsr)),[[we,e.placeholderValues[i]]]):ne("",!0),r.type==="int"?J((k(),P("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[53]||(n[53]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,psr)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):ne("",!0),r.type==="float"?J((k(),P("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[54]||(n[54]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,hsr)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):ne("",!0),r.type==="multiline"?J((k(),P("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[55]||(n[55]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,Tsr)),[[we,e.placeholderValues[i]]]):ne("",!0),r.type==="code"?(k(),P("div",msr,[g("div",gsr,le(r.language||"Plain text"),1),J(g("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:n[56]||(n[56]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,_sr),[[we,e.placeholderValues[i]]])])):ne("",!0),r.type==="options"?J((k(),P("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:n[57]||(n[57]=(...o)=>e.updatePreview&&e.updatePreview(...o))},[n[97]||(n[97]=g("option",{value:"",disabled:""},"Select an option",-1)),(k(!0),P(ze,null,at(r.options,o=>(k(),P("option",{key:o,value:o},le(o),9,vsr))),128))],40,Qsr)),[[dn,e.placeholderValues[i]]]):ne("",!0)]))),128))])])]),g("div",ysr,[g("button",{onClick:n[58]||(n[58]=(...r)=>e.cancelPlaceholders&&e.cancelPlaceholders(...r)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),g("button",{onClick:n[59]||(n[59]=(...r)=>e.applyPlaceholders&&e.applyPlaceholders(...r)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):ne("",!0)])):ne("",!0)]),_:1})):ne("",!0),e.currentDiscussion.id?ne("",!0):(k(),wt(aU,{key:1})),n[100]||(n[100]=g("div",null,[g("br"),g("br"),g("br"),g("br"),g("br"),g("br"),g("br")],-1))]),n[101]||(n[101]=g("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1))],2),e.currentDiscussion.id?(k(),P("div",bsr,[oe(sU,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):ne("",!0)])):ne("",!0),oe(lo,{name:"slide-left"},{default:Ve(()=>[e.showRightPanel?(k(),P("div",Esr,[g("div",xsr,null,512)])):ne("",!0)]),_:1}),oe(Ib,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,"can-remove":!0,onChoiceRemoved:e.ondatabase_selectorDialogRemoved,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceRemoved","onChoiceSelected","onCloseDialog","onChoiceValidated"]),J(g("div",Ssr,[oe(ub,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",Lsr,le(e.loading_infos)+" ...",1)],512),[[Pt,e.progress_visibility]]),oe(QU,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),g("div",Csr,[oe(vU,{ref:"news"},null,512)]),oe(rU,{ref:"skills_lib"},null,512)],64))}}),Rsr=yt(Osr,[["__scopeId","data-v-44ddc55b"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){this.randomFact=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];const e=(await ve.get("/get_versionID")).data.versionId;tt.onopen=()=>{this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ze.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";tt.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=tt.id,await this.$store.dispatch("refreshConfig")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=tt.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,tt.on("connected",this.socketIOConnected),tt.on("disconnected",this.socketIODisconnected),tt.on("show_progress",this.show_progress),tt.on("hide_progress",this.hide_progress),tt.on("update_progress",this.update_progress),tt.on("notification",this.notify),tt.on("new_message",this.new_message),tt.on("update_message",this.update_message),tt.on("close_message",this.finalMsgEvent),tt.on("disucssion_renamed",n=>{const r=this.discussionsList.findIndex(o=>o.id==n.discussion_id),i=this.discussionsList[r];i.title=n.title}),tt.onclose=n=>{this.socketIODisconnected()},tt.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),tt.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),tt.disconnect()}},beforeUnmount(){window.removeEventListener("resize",this.adjustMenuPosition)},async mounted(){window.addEventListener("keydown",this.handleShortcut),this.$store.state.news=this.$refs.news,this.$store.state.personality_editor=this.$refs.personality_editor,window.addEventListener("resize",this.adjustMenuPosition),tt.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&qe(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:kb,Message:oU,ChatBox:sU,WelcomeComponent:aU,ChoiceDialog:Ib,ProgressBar:ub,InputBox:otr,SkillsLibraryViewer:rU,PersonalityEditor:QU,PopupViewer:vU,ActionButton:BH,SocialIcon:$H,MountedPersonalities:yU,ChatBarButton:_9},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},"$store.state.config.fun_mode":function(t,e){},"$store.state.isConnected":function(t,e){this.isConnected?this.is_first_connection||(this.$store.state.messageBox.hideMessage(),this.$store.state.messageBox.showMessage("Server connected."),this.$store.state.config.activate_audio_infos&&this.connection_recovered_audio.play()):(this.$store.state.messageBox.showBlockingMessage("Server suddenly disconnected. Please reboot the server to recover the connection"),this.is_first_connection=!1,this.$store.state.config.activate_audio_infos&&this.connection_lost_audio.play()),qe(()=>{Ze.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.discussionsList=this.tempList,this.filterInProgress=!1)},isCheckbox(t){qe(()=>{Ze.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){qe(()=>{Ze.replace()})}},computed:{parsedPlaceholders(){const t=new Map;return this.placeholders.forEach(e=>{const n=wsr(e);t.set(n.fullText,n)}),Array.from(t.values())},filteredBindings(){return this.installedBindings.filter(t=>t.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(t=>t.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(t=>t.name.toLowerCase().includes(this.personalitySearchQuery.toLowerCase()))},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},binding_name(){return this.$store.state.config.binding_name},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},mountedPersonalities(){return this.$store.state.mountedPersArr},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},installedBindings(){return this.$store.state.installedBindings},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},isFullMode(){return this.$store.state.view_mode==="full"},storeLogo(){return this.$store.state.config?co:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:co},currentPersonConfig(){try{return this.$store.state.currentPersonConfig}catch{console.log("Error finding current personality configuration");return}},selectedPersonality(){try{return this.$store.state.selectedPersonality}catch{console.log("Error finding current personality configuration");return}},loading_infos(){return this.$store.state.loading_infos},is_fun_mode(){try{return this.$store.state.config?this.$store.state.config.fun_mode:!1}catch(t){return console.error("Oopsie! Looks like we hit a snag: ",t),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...pW({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?this.$store.state.version:"..."}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(n=>n.full_path===t)},prompts_list(){return this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return tt.id},showLeftPanel(){return console.log("showLeftPanel"),console.log(this.$store.state.leftPanelCollapsed),this.$store.state.ready&&!this.$store.state.leftPanelCollapsed},showRightPanel(){return console.log("showRightPanel"),console.log(this.$store.state.rightPanelCollapsed),this.$store.state.ready&&!this.$store.state.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return qe(()=>{Ze.replace()}),this.discussionsList.filter(t=>t.checkBoxValue==!0)}}},Rsr=Object.assign(Osr,{__name:"DiscussionsView",setup(t){return Zo(()=>{_U()}),ve.defaults.baseURL="/",(e,n)=>(k(),P(ze,null,[oe(lo,{name:"fade-and-fly"},{default:Ve(()=>[e.isReady?ne("",!0):(k(),P("div",Lir,[e.$store.state.theme_vars.activate_dropping_animation?(k(),P("div",Cir,[(k(),P(ze,null,at(50,r=>g("div",{key:r,class:"absolute animate-fall animate-giggle",style:xn({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},le(e.$store.state.theme_vars.falling_object),5)),64))])):ne("",!0),g("div",Air,[g("div",wir,[g("div",Mir,le(e.$store.state.theme_vars.lollms_title),1),n[61]||(n[61]=g("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),n[62]||(n[62]=g("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),g("p",Oir,le(e.version_info),1),g("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:n[0]||(n[0]=(...r)=>e.updateRandomFact&&e.updateRandomFact(...r))},[g("p",Rir,[n[60]||(n[60]=g("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),g("span",{innerHTML:e.randomFact},null,8,Nir)])]),g("div",Dir,[g("div",{class:"animated-progressbar-fg",style:xn({width:`${e.loading_progress}%`})},null,4),g("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:xn({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),g("div",Iir,[g("div",kir,[g("p",Pir,le(e.loading_infos)+"... ",1),g("p",Hir,le(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),oe(lo,{name:"slide-right"},{default:Ve(()=>[e.showLeftPanel?(k(),P("div",Vir,[oe(Ft(Qu),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:Ve(()=>[g("div",Fir,[g("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?Ft(co):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:Ft(co),alt:"Logo",title:"LoLLMS WebUI"},null,8,Bir)]),n[63]||(n[63]=g("div",{class:"flex flex-col justify-center"},[g("div",{class:"text-center p-2"},[g("div",{class:"text-md relative inline-block"},[g("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),g("div",{class:"absolute -bottom-0.5 left-0 w-full h-0.5 bg-black dark:bg-white transform origin-left transition-transform duration-300 hover:scale-x-100 scale-x-0"})])]),g("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),g("div",$ir,[g("div",Uir,[g("button",{class:"toolbar-button",title:"Create new discussion",onClick:n[1]||(n[1]=(...r)=>e.createNewDiscussion&&e.createNewDiscussion(...r))},n[64]||(n[64]=[g("i",{"data-feather":"plus"},null,-1)])),e.loading?ne("",!0):(k(),P("div",{key:0,class:"toolbar-button",onMouseleave:n[8]||(n[8]=(...r)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...r))},[J(g("div",{onMouseenter:n[6]||(n[6]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Gir,[e.loading?ne("",!0):(k(),P("button",{key:0,type:"button",onClick:n[2]||(n[2]=he((...r)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...r),["stop"])),title:"Add this discussion content to skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[65]||(n[65]=[g("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(k(),P("button",{key:1,type:"button",onClick:n[3]||(n[3]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[66]||(n[66]=[g("i",{"data-feather":"check-circle"},null,-1)]))):ne("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(k(),P("button",{key:2,type:"button",onClick:n[4]||(n[4]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[67]||(n[67]=[g("i",{"data-feather":"x-octagon"},null,-1)]))):ne("",!0),e.loading?ne("",!0):(k(),P("button",{key:3,type:"button",onClick:n[5]||(n[5]=he((...r)=>e.showSkillsLib&&e.showSkillsLib(...r),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[68]||(n[68]=[g("i",{"data-feather":"book"},null,-1)])))])],544),[[Pt,e.isSkillsLibraryMenuVisible]]),g("div",{onMouseenter:n[7]||(n[7]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"menu-hover-area"},n[69]||(n[69]=[g("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[g("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?ne("",!0):(k(),P("div",{key:1,class:"toolbar-button",onMouseleave:n[22]||(n[22]=(...r)=>e.hideMenu&&e.hideMenu(...r))},[J(g("div",{onMouseenter:n[20]||(n[20]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",qir,[g("button",{class:We(["text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",e.isCheckbox?"text-secondary dark:text-secondary-light":"text-gray-700 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:n[9]||(n[9]=r=>e.isCheckbox=!e.isCheckbox)},n[70]||(n[70]=[g("i",{"data-feather":"check-square"},null,-1)]),2),g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Reset database, remove all discussions",onClick:n[10]||(n[10]=he(()=>{},["stop"]))},n[71]||(n[71]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:n[11]||(n[11]=he(r=>e.database_selectorDialogVisible=!0,["stop"]))},n[72]||(n[72]=[g("i",{"data-feather":"database"},null,-1)])),g("div",zir,[g("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:n[12]||(n[12]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95 rotate-90",title:"Import discussions",type:"button",onClick:n[13]||(n[13]=he(r=>e.$refs.fileDialog.click(),["stop"]))},n[73]||(n[73]=[g("i",{"data-feather":"log-in"},null,-1)]))]),g("div",jir,[g("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:n[14]||(n[14]=(...r)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...r))},null,544),e.showSaveConfirmation?ne("",!0):(k(),P("button",{key:0,title:"Import discussion bundle",onClick:n[15]||(n[15]=he(r=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[74]||(n[74]=[g("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(k(),P("div",Wir,n[75]||(n[75]=[g("div",{role:"status"},[g("svg",{"aria-hidden":"true",class:"w-8 h-8 animate-spin fill-secondary dark:fill-secondary-light",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):ne("",!0),e.showSaveConfirmation?(k(),P("div",Yir,[g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:n[16]||(n[16]=he(r=>e.showSaveConfirmation=!1,["stop"]))},n[76]||(n[76]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-3xl hover:text-green-500 dark:hover:text-green-400 duration-150 active:scale-95",title:"Confirm save changes",type:"button",onClick:n[17]||(n[17]=he(r=>e.save_configuration(),["stop"]))},n[77]||(n[77]=[g("i",{"data-feather":"check"},null,-1)]))])):ne("",!0),e.isOpen?(k(),P("div",Kir,[g("button",{onClick:n[18]||(n[18]=(...r)=>e.importDiscussions&&e.importDiscussions(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),g("button",{onClick:n[19]||(n[19]=(...r)=>e.importChatGPT&&e.importChatGPT(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):ne("",!0)])],544),[[Pt,e.isMenuVisible]]),g("div",{onMouseenter:n[21]||(n[21]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"menu-hover-area"},n[78]||(n[78]=[g("button",{class:"w-8 h-8",title:"Toggle menu"},[g("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?ne("",!0):(k(),P("div",{key:2,class:"toolbar-button",onMouseleave:n[28]||(n[28]=(...r)=>e.hideBindingsMenu&&e.hideBindingsMenu(...r))},[g("div",Zir,[J(g("div",{onMouseenter:n[25]||(n[25]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Xir,[J(g("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=r=>e.bindingSearchQuery=r),placeholder:"Search bindings...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.bindingSearchQuery]])]),g("div",Jir,[(k(!0),P(ze,null,at(e.filteredBindings,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",eor,[g("button",{onClick:he(o=>e.setBinding(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Ft(ri),onError:n[24]||(n[24]=(...o)=>Ft(ri)&&Ft(ri)(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.binding_name}])},null,42,nor)],8,tor),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,ror)]),g("div",ior,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setBinding(r),["prevent"])},le(r.name),9,oor),g("div",sor,[g("button",{onClick:he(o=>e.showModelConfig(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},n[79]||(n[79]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)]),8,aor)])])]))),128))])],544),[[Pt,e.isBindingsMenuVisible]]),g("div",{onMouseenter:n[27]||(n[27]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"bindings-hover-area"},[g("button",{onClick:n[26]||(n[26]=he(r=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[g("img",{src:e.currentBindingIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:e.currentBinding?e.currentBinding.name:"unknown"},null,8,lor)])],32)])],32)),e.loading?ne("",!0):(k(),P("div",{key:3,class:"toolbar-button",onMouseleave:n[34]||(n[34]=(...r)=>e.hideModelsMenu&&e.hideModelsMenu(...r))},[g("div",cor,[J(g("div",{onMouseenter:n[31]||(n[31]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",uor,[J(g("input",{type:"text","onUpdate:modelValue":n[29]||(n[29]=r=>e.modelSearchQuery=r),placeholder:"Search models...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.modelSearchQuery]])]),g("div",dor,[(k(!0),P(ze,null,at(e.filteredModels,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",por,[g("button",{onClick:he(o=>e.setModel(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Ft(ri),onError:n[30]||(n[30]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.model_name}])},null,42,Tor)],8,hor),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,mor)]),g("div",gor,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setModel(r),["prevent"])},le(r.name),9,_or),g("div",Qor,[g("button",{onClick:he(o=>e.copyModelNameFrom(r.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},n[80]||(n[80]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,vor)])])]))),128))])],544),[[Pt,e.isModelsMenuVisible]]),g("div",{onMouseenter:n[33]||(n[33]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"models-hover-area"},[g("button",{onClick:n[32]||(n[32]=he(r=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[g("img",{src:e.currentModelIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:e.currentModel?e.currentModel.name:"unknown"},null,8,yor)])],32)])],32)),e.loading?ne("",!0):(k(),P("div",{key:4,class:"toolbar-button",onMouseleave:n[39]||(n[39]=(...r)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...r))},[g("div",bor,[J(g("div",{onMouseenter:n[37]||(n[37]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",Eor,[J(g("input",{type:"text","onUpdate:modelValue":n[35]||(n[35]=r=>e.personalitySearchQuery=r),placeholder:"Search personalities...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[we,e.personalitySearchQuery]])]),g("div",xor,[(k(!0),P(ze,null,at(e.filteredPersonalities,(r,i)=>(k(),P("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Sor,[g("button",{onClick:he(o=>e.onPersonalitySelected(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:Ft(Msr)+r.avatar,onError:n[36]||(n[36]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:We(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(r.full_path)}])},null,42,Cor)],8,Lor),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Aor)]),g("div",wor,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.onPersonalitySelected(r),["prevent"])},le(r.name),9,Mor),g("div",Oor,[g("button",{onClick:he(o=>e.unmountPersonality(r),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},n[81]||(n[81]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,Ror),g("button",{onClick:he(o=>e.remount_personality(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},n[82]||(n[82]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,Nor),g("button",{onClick:he(o=>e.handleOnTalk(r),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},n[83]||(n[83]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]),8,Dor)])])]))),128))])],544),[[Pt,e.isPersonalitiesMenuVisible]]),g("div",Ior,[g("div",{onMouseenter:n[38]||(n[38]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"personalities-hover-area"},[oe(yU,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),g("div",kor,[g("form",{onSubmit:n[42]||(n[42]=he((...r)=>e.handleSearch&&e.handleSearch(...r),["prevent"])),class:"relative"},[g("div",Por,[g("div",Hor,[J(g("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":n[40]||(n[40]=r=>e.filterTitle=r),onKeyup:n[41]||(n[41]=Xr((...r)=>e.handleSearch&&e.handleSearch(...r),["enter"]))},null,544),[[we,e.filterTitle]]),n[84]||(n[84]=g("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[g("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),n[85]||(n[85]=g("button",{type:"submit",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-secondary rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-1 focus:ring-secondary transition-all duration-150 active:scale-98",title:"Search"},[g("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(k(),P("div",Vor,[g("div",For,[e.selectedDiscussions.length>0?(k(),P("p",Bor,"Selected: "+le(e.selectedDiscussions.length),1)):ne("",!0),e.selectedDiscussions.length>0?(k(),P("div",$or,[e.showConfirmation?ne("",!0):(k(),P("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[43]||(n[43]=he(r=>e.showConfirmation=!0,["stop"]))},n[86]||(n[86]=[g("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(k(),P("div",Uor,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[44]||(n[44]=he((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},n[87]||(n[87]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[45]||(n[45]=he(r=>e.showConfirmation=!1,["stop"]))},n[88]||(n[88]=[g("i",{"data-feather":"x"},null,-1)]))])):ne("",!0)])):ne("",!0),g("div",Gor,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[46]||(n[46]=he((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},n[89]||(n[89]=[g("i",{"data-feather":"codepen"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[47]||(n[47]=he((...r)=>e.exportDiscussions&&e.exportDiscussions(...r),["stop"]))},n[90]||(n[90]=[g("i",{"data-feather":"folder"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[48]||(n[48]=he((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},n[91]||(n[91]=[g("i",{"data-feather":"bookmark"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[49]||(n[49]=he((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},n[92]||(n[92]=[g("i",{"data-feather":"list"},null,-1)]))])])])):ne("",!0),g("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:n[50]||(n[50]=he(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[g("div",qor,[g("div",{class:We(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[g("div",{id:"dis-list",class:We([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.discussionsList.length>0?(k(),wt(Ns,{key:0,name:"discussionsList"},{default:Ve(()=>[(k(!0),P(ze,null,at(e.discussionsList,(r,i)=>(k(),wt(kb,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,openfolder_enabled:!0,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0),e.discussionsList.length<1?(k(),P("div",zor,n[93]||(n[93]=[g("p",{class:"px-3"},"No discussions are found",-1)]))):ne("",!0)],2)],2)])],32),g("div",jor,[g("div",{class:"chat-bar text-center flex items-center",onClick:n[51]||(n[51]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[oe(_9,null,{default:Ve(()=>n[94]||(n[94]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"mr-2"},[g("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),g("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),g("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),g("p",Wor,le(e.formatted_database_name.replace("_"," ")),1)])])])):ne("",!0)]),_:1}),e.isReady?(k(),P("div",Yor,[g("div",{id:"messages-list",class:We(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[g("div",Kor,[e.discussionArr.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:Ve(()=>[(k(!0),P(ze,null,at(e.discussionArr,(r,i)=>(k(),wt(oU,{key:r.id,message:r,id:"msg-"+r.id,ref_for:!0,ref:"msg-"+r.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(r.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(k(),P("div",Zor,[n[99]||(n[99]=g("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),g("div",Xor,[g("div",Jor,[(k(!0),P(ze,null,at(e.personality.prompts_list,(r,i)=>(k(),P("div",{title:e.extractTitle(r),key:i,onClick:o=>e.handlePromptSelection(r),class:"flex-shrink-0 w-[300px] bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-6 cursor-pointer hover:shadow-xl transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between min-h-[220px] group"},[g("div",tsr,[g("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(r)},le(e.extractTitle(r)),9,nsr),g("div",{title:r,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},le(e.getPromptContent(r)),9,rsr)]),n[95]||(n[95]=g("div",{class:"mt-4 text-sm font-medium text-blue-600 dark:text-blue-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1))],8,esr))),128))])]),e.showPlaceholderModal?(k(),P("div",isr,[g("div",osr,[n[98]||(n[98]=g("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),g("div",ssr,[g("div",asr,[n[96]||(n[96]=g("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),g("div",lsr,[g("span",csr,le(e.getPromptContent(e.previewPrompt)),1)])]),g("div",usr,[g("div",dsr,[(k(!0),P(ze,null,at(e.parsedPlaceholders,(r,i)=>(k(),P("div",{key:r.fullText,class:"flex flex-col"},[g("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},le(r.label),9,fsr),r.type==="text"?J((k(),P("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:r.label,onInput:n[52]||(n[52]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,psr)),[[we,e.placeholderValues[i]]]):ne("",!0),r.type==="int"?J((k(),P("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[53]||(n[53]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,hsr)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):ne("",!0),r.type==="float"?J((k(),P("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[54]||(n[54]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,Tsr)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):ne("",!0),r.type==="multiline"?J((k(),P("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[55]||(n[55]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,msr)),[[we,e.placeholderValues[i]]]):ne("",!0),r.type==="code"?(k(),P("div",gsr,[g("div",_sr,le(r.language||"Plain text"),1),J(g("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:n[56]||(n[56]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,Qsr),[[we,e.placeholderValues[i]]])])):ne("",!0),r.type==="options"?J((k(),P("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:n[57]||(n[57]=(...o)=>e.updatePreview&&e.updatePreview(...o))},[n[97]||(n[97]=g("option",{value:"",disabled:""},"Select an option",-1)),(k(!0),P(ze,null,at(r.options,o=>(k(),P("option",{key:o,value:o},le(o),9,ysr))),128))],40,vsr)),[[dn,e.placeholderValues[i]]]):ne("",!0)]))),128))])])]),g("div",bsr,[g("button",{onClick:n[58]||(n[58]=(...r)=>e.cancelPlaceholders&&e.cancelPlaceholders(...r)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),g("button",{onClick:n[59]||(n[59]=(...r)=>e.applyPlaceholders&&e.applyPlaceholders(...r)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):ne("",!0)])):ne("",!0)]),_:1})):ne("",!0),e.currentDiscussion.id?ne("",!0):(k(),wt(aU,{key:1})),n[100]||(n[100]=g("div",null,[g("br"),g("br"),g("br"),g("br"),g("br"),g("br"),g("br")],-1))]),n[101]||(n[101]=g("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1))],2),e.currentDiscussion.id?(k(),P("div",Esr,[oe(sU,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):ne("",!0)])):ne("",!0),oe(lo,{name:"slide-left"},{default:Ve(()=>[e.showRightPanel?(k(),P("div",xsr,[g("div",Ssr,null,512)])):ne("",!0)]),_:1}),oe(Ib,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,"can-remove":!0,onChoiceRemoved:e.ondatabase_selectorDialogRemoved,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceRemoved","onChoiceSelected","onCloseDialog","onChoiceValidated"]),J(g("div",Lsr,[oe(ub,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",Csr,le(e.loading_infos)+" ...",1)],512),[[Pt,e.progress_visibility]]),oe(QU,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),g("div",Asr,[oe(vU,{ref:"news"},null,512)]),oe(rU,{ref:"skills_lib"},null,512)],64))}}),Nsr=yt(Rsr,[["__scopeId","data-v-44ddc55b"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const Wb="159",Nsr=0,TD=1,Dsr=2,bU=1,Isr=2,Es=3,Us=0,ui=1,ko=2,ka=0,Hl=1,mD=2,gD=3,_D=4,ksr=5,F1=100,Psr=101,Hsr=102,QD=103,vD=104,Vsr=200,Fsr=201,Bsr=202,$sr=203,VQ=204,FQ=205,Usr=206,Gsr=207,qsr=208,zsr=209,jsr=210,Wsr=211,Ysr=212,Ksr=213,Zsr=214,Xsr=0,Jsr=1,ear=2,dd=3,tar=4,nar=5,rar=6,iar=7,Yb=0,oar=1,sar=2,Pa=0,aar=1,lar=2,car=3,uar=4,dar=5,yD="attached",far="detached",EU=300,cc=301,uc=302,BQ=303,$Q=304,E9=306,dc=1e3,Pi=1001,fd=1002,hr=1003,UQ=1004,tu=1005,ii=1006,xU=1007,g2=1008,Ha=1009,par=1010,har=1011,Kb=1012,SU=1013,Oa=1014,Ms=1015,o0=1016,LU=1017,CU=1018,X1=1020,Tar=1021,Hi=1023,mar=1024,gar=1025,J1=1026,fc=1027,_ar=1028,AU=1029,Qar=1030,wU=1031,MU=1033,Ig=33776,kg=33777,Pg=33778,Hg=33779,bD=35840,ED=35841,xD=35842,SD=35843,OU=36196,LD=37492,CD=37496,AD=37808,wD=37809,MD=37810,OD=37811,RD=37812,ND=37813,DD=37814,ID=37815,kD=37816,PD=37817,HD=37818,VD=37819,FD=37820,BD=37821,Vg=36492,$D=36494,UD=36495,yar=36283,GD=36284,qD=36285,zD=36286,s0=2300,pc=2301,Fg=2302,jD=2400,WD=2401,YD=2402,bar=2500,Ear=0,RU=1,GQ=2,NU=3e3,e2=3001,xar=3200,Sar=3201,Zb=0,Lar=1,Vi="",jn="srgb",Sr="srgb-linear",Xb="display-p3",x9="display-p3-linear",pd="linear",kn="srgb",hd="rec709",Td="p3",nl=7680,KD=519,Car=512,Aar=513,war=514,DU=515,Mar=516,Oar=517,Rar=518,Nar=519,qQ=35044,ZD="300 es",zQ=1035,Os=2e3,md=2001;class zc{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o>8&255]+Mr[t>>16&255]+Mr[t>>24&255]+"-"+Mr[e&255]+Mr[e>>8&255]+"-"+Mr[e>>16&15|64]+Mr[e>>24&255]+"-"+Mr[n&63|128]+Mr[n>>8&255]+"-"+Mr[n>>16&255]+Mr[n>>24&255]+Mr[r&255]+Mr[r>>8&255]+Mr[r>>16&255]+Mr[r>>24&255]).toLowerCase()}function Dr(t,e,n){return Math.max(e,Math.min(n,t))}function Jb(t,e){return(t%e+e)%e}function Dar(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function Iar(t,e,n){return t!==e?(n-t)/(e-t):0}function R4(t,e,n){return(1-n)*t+n*e}function kar(t,e,n,r){return R4(t,e,1-Math.exp(-n*r))}function Par(t,e=1){return e-Math.abs(Jb(t,e*2)-e)}function Har(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Var(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Far(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Bar(t,e){return t+Math.random()*(e-t)}function $ar(t){return t*(.5-Math.random())}function Uar(t){t!==void 0&&(XD=t);let e=XD+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Gar(t){return t*O4}function qar(t){return t*hc}function jQ(t){return(t&t-1)===0&&t!==0}function zar(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function gd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function jar(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),h=s((e-r)/2),f=o((r-e)/2),m=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*m,l*f,a*c);break;case"YXY":t.set(l*f,a*u,l*m,a*c);break;case"ZYZ":t.set(l*m,l*f,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Po(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function bn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const War={DEG2RAD:O4,RAD2DEG:hc,generateUUID:uo,clamp:Dr,euclideanModulo:Jb,mapLinear:Dar,inverseLerp:Iar,lerp:R4,damp:kar,pingpong:Par,smoothstep:Har,smootherstep:Var,randInt:Far,randFloat:Bar,randFloatSpread:$ar,seededRandom:Uar,degToRad:Gar,radToDeg:qar,isPowerOfTwo:jQ,ceilPowerOfTwo:zar,floorPowerOfTwo:gd,setQuaternionFromProperEuler:jar,normalize:bn,denormalize:Po};class Yt{constructor(e=0,n=0){Yt.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(e,n,r,i,o,s,a,l,c){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],h=r[2],f=r[5],m=r[8],T=i[0],Q=i[3],_=i[6],v=i[1],y=i[4],b=i[7],E=i[2],x=i[5],L=i[8];return o[0]=s*T+a*v+l*E,o[3]=s*Q+a*y+l*x,o[6]=s*_+a*b+l*L,o[1]=c*T+u*v+d*E,o[4]=c*Q+u*y+d*x,o[7]=c*_+u*b+d*L,o[2]=h*T+f*v+m*E,o[5]=h*Q+f*y+m*x,o[8]=h*_+f*b+m*L,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,m=n*d+r*h+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const T=1/m;return e[0]=d*T,e[1]=(i*c-u*r)*T,e[2]=(a*r-i*s)*T,e[3]=h*T,e[4]=(u*n-i*l)*T,e[5]=(i*o-a*n)*T,e[6]=f*T,e[7]=(r*l-c*n)*T,e[8]=(s*n-r*o)*T,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Bg.makeScale(e,n)),this}rotate(e){return this.premultiply(Bg.makeRotation(-e)),this}translate(e,n){return this.premultiply(Bg.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Bg=new qt;function IU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function a0(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Yar(){const t=a0("canvas");return t.style.display="block",t}const JD={};function N4(t){t in JD||(JD[t]=!0,console.warn(t))}const eI=new qt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),tI=new qt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),d5={[Sr]:{transfer:pd,primaries:hd,toReference:t=>t,fromReference:t=>t},[jn]:{transfer:kn,primaries:hd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[x9]:{transfer:pd,primaries:Td,toReference:t=>t.applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI)},[Xb]:{transfer:kn,primaries:Td,toReference:t=>t.convertSRGBToLinear().applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI).convertLinearToSRGB()}},Kar=new Set([Sr,x9]),Tn={enabled:!0,_workingColorSpace:Sr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Kar.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=d5[e].toReference,i=d5[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return d5[t].primaries},getTransfer:function(t){return t===Vi?pd:d5[t].transfer}};function Vl(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function $g(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let rl;class kU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{rl===void 0&&(rl=a0("canvas")),rl.width=e.width,rl.height=e.height;const r=rl.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=rl}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=a0("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==EU)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case dc:e.x=e.x-Math.floor(e.x);break;case Pi:e.x=e.x<0?0:1;break;case fd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case dc:e.y=e.y-Math.floor(e.y);break;case Pi:e.y=e.y<0?0:1;break;case fd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jn?e2:NU}set encoding(e){N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===e2?jn:Vi}}xr.DEFAULT_IMAGE=null;xr.DEFAULT_MAPPING=EU;xr.DEFAULT_ANISOTROPY=1;class Mn{constructor(e=0,n=0,r=0,i=1){Mn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],m=l[9],T=l[2],Q=l[6],_=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-T)<.01&&Math.abs(m-Q)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+T)<.1&&Math.abs(m+Q)<.1&&Math.abs(c+f+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,b=(f+1)/2,E=(_+1)/2,x=(u+h)/4,L=(d+T)/4,M=(m+Q)/4;return y>b&&y>E?y<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(y),i=x/r,o=L/r):b>E?b<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(b),r=x/i,o=M/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=L/o,i=M/o),this.set(r,i,o,n),this}let v=Math.sqrt((Q-m)*(Q-m)+(d-T)*(d-T)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(Q-m)/v,this.y=(d-T)/v,this.z=(h-u)/v,this.w=Math.acos((c+f+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Jar extends zc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Mn(0,0,e,n),this.scissorTest=!1,this.viewport=new Mn(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(N4("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===e2?jn:Vi),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ii,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new xr(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new PU(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class _2 extends Jar{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class HU extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class e1r extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class n1{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],T=o[s+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=h,e[n+1]=f,e[n+2]=m,e[n+3]=T;return}if(d!==T||l!==h||c!==f||u!==m){let Q=1-a;const _=l*h+c*f+u*m+d*T,v=_>=0?1:-1,y=1-_*_;if(y>Number.EPSILON){const E=Math.sqrt(y),x=Math.atan2(E,_*v);Q=Math.sin(Q*x)/E,a=Math.sin(a*x)/E}const b=a*v;if(l=l*Q+h*b,c=c*Q+f*b,u=u*Q+m*b,d=d*Q+T*b,Q===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return e[n]=a*m+u*d+l*f-c*h,e[n+1]=l*m+u*h+c*d-a*f,e[n+2]=c*m+u*f+a*h-l*d,e[n+3]=u*m-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Dr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ee{constructor(e=0,n=0,r=0){Ee.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(nI.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(nI.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Gg.copy(this).projectOnVector(e),this.sub(Gg)}reflect(e){return this.sub(Gg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Gg=new Ee,nI=new n1;class Ks{constructor(e=new Ee(1/0,1/0,1/0),n=new Ee(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,to),to.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(i4),p5.subVectors(this.max,i4),il.subVectors(e.a,i4),ol.subVectors(e.b,i4),sl.subVectors(e.c,i4),da.subVectors(ol,il),fa.subVectors(sl,ol),A1.subVectors(il,sl);let n=[0,-da.z,da.y,0,-fa.z,fa.y,0,-A1.z,A1.y,da.z,0,-da.x,fa.z,0,-fa.x,A1.z,0,-A1.x,-da.y,da.x,0,-fa.y,fa.x,0,-A1.y,A1.x,0];return!qg(n,il,ol,sl,p5)||(n=[1,0,0,0,1,0,0,0,1],!qg(n,il,ol,sl,p5))?!1:(h5.crossVectors(da,fa),n=[h5.x,h5.y,h5.z],qg(n,il,ol,sl,p5))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,to).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(to).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ms=[new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee],to=new Ee,f5=new Ks,il=new Ee,ol=new Ee,sl=new Ee,da=new Ee,fa=new Ee,A1=new Ee,i4=new Ee,p5=new Ee,h5=new Ee,w1=new Ee;function qg(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){w1.fromArray(t,o);const a=i.x*Math.abs(w1.x)+i.y*Math.abs(w1.y)+i.z*Math.abs(w1.z),l=e.dot(w1),c=n.dot(w1),u=r.dot(w1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const t1r=new Ks,o4=new Ee,zg=new Ee;class ns{constructor(e=new Ee,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):t1r.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;o4.subVectors(e,this.center);const n=o4.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(o4,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(zg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(o4.copy(e.center).add(zg)),this.expandByPoint(o4.copy(e.center).sub(zg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const gs=new Ee,jg=new Ee,T5=new Ee,pa=new Ee,Wg=new Ee,m5=new Ee,Yg=new Ee;class S9{constructor(e=new Ee,n=new Ee(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,gs)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=gs.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(gs.copy(this.origin).addScaledVector(this.direction,n),gs.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){jg.copy(e).add(n).multiplyScalar(.5),T5.copy(n).sub(e).normalize(),pa.copy(this.origin).sub(jg);const o=e.distanceTo(n)*.5,s=-this.direction.dot(T5),a=pa.dot(this.direction),l=-pa.dot(T5),c=pa.lengthSq(),u=Math.abs(1-s*s);let d,h,f,m;if(u>0)if(d=s*l-a,h=s*a-l,m=o*u,d>=0)if(h>=-m)if(h<=m){const T=1/u;d*=T,h*=T,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-m?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=m?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(jg).addScaledVector(T5,h),f}intersectSphere(e,n){gs.subVectors(e.center,this.origin);const r=gs.dot(this.direction),i=gs.dot(gs)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,gs)!==null}intersectTriangle(e,n,r,i,o){Wg.subVectors(n,e),m5.subVectors(r,e),Yg.crossVectors(Wg,m5);let s=this.direction.dot(Yg),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;pa.subVectors(this.origin,e);const l=a*this.direction.dot(m5.crossVectors(pa,m5));if(l<0)return null;const c=a*this.direction.dot(Wg.cross(pa));if(c<0||l+c>s)return null;const u=-a*pa.dot(Yg);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class zt{constructor(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q)}set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){const _=this.elements;return _[0]=e,_[4]=n,_[8]=r,_[12]=i,_[1]=o,_[5]=s,_[9]=a,_[13]=l,_[2]=c,_[6]=u,_[10]=d,_[14]=h,_[3]=f,_[7]=m,_[11]=T,_[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new zt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/al.setFromMatrixColumn(e,0).length(),o=1/al.setFromMatrixColumn(e,1).length(),s=1/al.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=f+m*c,n[5]=h-T*c,n[9]=-a*l,n[2]=T-h*c,n[6]=m+f*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h+T*a,n[4]=m*a-f,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=f*a-m,n[6]=T+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h-T*a,n[4]=-s*d,n[8]=m+f*a,n[1]=f+m*a,n[5]=s*u,n[9]=T-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=m*c-f,n[8]=h*c+T,n[1]=l*d,n[5]=T*c+h,n[9]=f*c-m,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=T-h*d,n[8]=m*d+f,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=f*d+m,n[10]=h-T*d}else if(e.order==="XZY"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=h*d+T,n[5]=s*u,n[9]=f*d-m,n[2]=m*d-f,n[6]=a*u,n[10]=T*d+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(n1r,e,r1r)}lookAt(e,n,r){const i=this.elements;return _i.subVectors(e,n),_i.lengthSq()===0&&(_i.z=1),_i.normalize(),ha.crossVectors(r,_i),ha.lengthSq()===0&&(Math.abs(r.z)===1?_i.x+=1e-4:_i.z+=1e-4,_i.normalize(),ha.crossVectors(r,_i)),ha.normalize(),g5.crossVectors(_i,ha),i[0]=ha.x,i[4]=g5.x,i[8]=_i.x,i[1]=ha.y,i[5]=g5.y,i[9]=_i.y,i[2]=ha.z,i[6]=g5.z,i[10]=_i.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],h=r[9],f=r[13],m=r[2],T=r[6],Q=r[10],_=r[14],v=r[3],y=r[7],b=r[11],E=r[15],x=i[0],L=i[4],M=i[8],C=i[12],A=i[1],I=i[5],N=i[9],H=i[13],O=i[2],B=i[6],V=i[10],U=i[14],G=i[3],K=i[7],W=i[11],te=i[15];return o[0]=s*x+a*A+l*O+c*G,o[4]=s*L+a*I+l*B+c*K,o[8]=s*M+a*N+l*V+c*W,o[12]=s*C+a*H+l*U+c*te,o[1]=u*x+d*A+h*O+f*G,o[5]=u*L+d*I+h*B+f*K,o[9]=u*M+d*N+h*V+f*W,o[13]=u*C+d*H+h*U+f*te,o[2]=m*x+T*A+Q*O+_*G,o[6]=m*L+T*I+Q*B+_*K,o[10]=m*M+T*N+Q*V+_*W,o[14]=m*C+T*H+Q*U+_*te,o[3]=v*x+y*A+b*O+E*G,o[7]=v*L+y*I+b*B+E*K,o[11]=v*M+y*N+b*V+E*W,o[15]=v*C+y*H+b*U+E*te,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],m=e[3],T=e[7],Q=e[11],_=e[15];return m*(+o*l*d-i*c*d-o*a*h+r*c*h+i*a*f-r*l*f)+T*(+n*l*f-n*c*h+o*s*h-i*s*f+i*c*u-o*l*u)+Q*(+n*c*d-n*a*f-o*s*d+r*s*f+o*a*u-r*c*u)+_*(-i*a*u-n*l*d+n*a*h+i*s*d-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],m=e[12],T=e[13],Q=e[14],_=e[15],v=d*Q*c-T*h*c+T*l*f-a*Q*f-d*l*_+a*h*_,y=m*h*c-u*Q*c-m*l*f+s*Q*f+u*l*_-s*h*_,b=u*T*c-m*d*c+m*a*f-s*T*f-u*a*_+s*d*_,E=m*d*l-u*T*l-m*a*h+s*T*h+u*a*Q-s*d*Q,x=n*v+r*y+i*b+o*E;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/x;return e[0]=v*L,e[1]=(T*h*o-d*Q*o-T*i*f+r*Q*f+d*i*_-r*h*_)*L,e[2]=(a*Q*o-T*l*o+T*i*c-r*Q*c-a*i*_+r*l*_)*L,e[3]=(d*l*o-a*h*o-d*i*c+r*h*c+a*i*f-r*l*f)*L,e[4]=y*L,e[5]=(u*Q*o-m*h*o+m*i*f-n*Q*f-u*i*_+n*h*_)*L,e[6]=(m*l*o-s*Q*o-m*i*c+n*Q*c+s*i*_-n*l*_)*L,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*f+n*l*f)*L,e[8]=b*L,e[9]=(m*d*o-u*T*o-m*r*f+n*T*f+u*r*_-n*d*_)*L,e[10]=(s*T*o-m*a*o+m*r*c-n*T*c-s*r*_+n*a*_)*L,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*f-n*a*f)*L,e[12]=E*L,e[13]=(u*T*i-m*d*i+m*r*h-n*T*h-u*r*Q+n*d*Q)*L,e[14]=(m*a*i-s*T*i-m*r*l+n*T*l+s*r*Q-n*a*Q)*L,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*h+n*a*h)*L,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,m=o*d,T=s*u,Q=s*d,_=a*d,v=l*c,y=l*u,b=l*d,E=r.x,x=r.y,L=r.z;return i[0]=(1-(T+_))*E,i[1]=(f+b)*E,i[2]=(m-y)*E,i[3]=0,i[4]=(f-b)*x,i[5]=(1-(h+_))*x,i[6]=(Q+v)*x,i[7]=0,i[8]=(m+y)*L,i[9]=(Q-v)*L,i[10]=(1-(h+T))*L,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=al.set(i[0],i[1],i[2]).length();const s=al.set(i[4],i[5],i[6]).length(),a=al.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],no.copy(this);const c=1/o,u=1/s,d=1/a;return no.elements[0]*=c,no.elements[1]*=c,no.elements[2]*=c,no.elements[4]*=u,no.elements[5]*=u,no.elements[6]*=u,no.elements[8]*=d,no.elements[9]*=d,no.elements[10]*=d,n.setFromRotationMatrix(no),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=Os){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),d=(n+e)/(n-e),h=(r+i)/(r-i);let f,m;if(a===Os)f=-(s+o)/(s-o),m=-2*s*o/(s-o);else if(a===md)f=-s/(s-o),m=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=Os){const l=this.elements,c=1/(n-e),u=1/(r-i),d=1/(s-o),h=(n+e)*c,f=(r+i)*u;let m,T;if(a===Os)m=(s+o)*d,T=-2*d;else if(a===md)m=o*d,T=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=T,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const al=new Ee,no=new zt,n1r=new Ee(0,0,0),r1r=new Ee(1,1,1),ha=new Ee,g5=new Ee,_i=new Ee,rI=new zt,iI=new n1;class L9{constructor(e=0,n=0,r=0,i=L9.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],h=i[6],f=i[10];switch(n){case"XYZ":this._y=Math.asin(Dr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Dr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Dr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Dr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Dr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Dr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return rI.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rI,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return iI.setFromEuler(this),this.setFromQuaternion(iI,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}L9.DEFAULT_ORDER="XYZ";class VU{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),f.length>0&&(r.animations=f),m.length>0&&(r.nodes=m)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){ro.subVectors(i,n),Qs.subVectors(r,n),Kg.subVectors(e,n);const s=ro.dot(ro),a=ro.dot(Qs),l=ro.dot(Kg),c=Qs.dot(Qs),u=Qs.dot(Kg),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const h=1/d,f=(c*l-a*u)*h,m=(s*u-a*l)*h;return o.set(1-f-m,m,f)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,vs),vs.x>=0&&vs.y>=0&&vs.x+vs.y<=1}static getUV(e,n,r,i,o,s,a,l){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,vs),l.setScalar(0),l.addScaledVector(o,vs.x),l.addScaledVector(s,vs.y),l.addScaledVector(a,vs.z),l}static isFrontFacing(e,n,r,i){return ro.subVectors(r,n),Qs.subVectors(e,n),ro.cross(Qs).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ro.subVectors(this.c,this.b),Qs.subVectors(this.a,this.b),ro.cross(Qs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return so.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return so.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),so.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return so.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return so.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return so.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;cl.subVectors(i,r),ul.subVectors(o,r),Zg.subVectors(e,r);const l=cl.dot(Zg),c=ul.dot(Zg);if(l<=0&&c<=0)return n.copy(r);Xg.subVectors(e,i);const u=cl.dot(Xg),d=ul.dot(Xg);if(u>=0&&d<=u)return n.copy(i);const h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(cl,s);Jg.subVectors(e,o);const f=cl.dot(Jg),m=ul.dot(Jg);if(m>=0&&f<=m)return n.copy(o);const T=f*c-l*m;if(T<=0&&c>=0&&m<=0)return a=c/(c-m),n.copy(r).addScaledVector(ul,a);const Q=u*m-f*d;if(Q<=0&&d-u>=0&&f-m>=0)return cI.subVectors(o,i),a=(d-u)/(d-u+(f-m)),n.copy(i).addScaledVector(cI,a);const _=1/(Q+T+h);return s=T*_,a=h*_,n.copy(r).addScaledVector(cl,s).addScaledVector(ul,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const FU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ta={h:0,s:0,l:0},v5={h:0,s:0,l:0};function e_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Nt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,Tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Tn.workingColorSpace){if(e=Jb(e,1),n=Dr(n,0,1),r=Dr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=e_(s,o,e+1/3),this.g=e_(s,o,e),this.b=e_(s,o,e-1/3)}return Tn.toWorkingColorSpace(this,i),this}setStyle(e,n=jn){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jn){const r=FU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Vl(e.r),this.g=Vl(e.g),this.b=Vl(e.b),this}copyLinearToSRGB(e){return this.r=$g(e.r),this.g=$g(e.g),this.b=$g(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return Tn.fromWorkingColorSpace(Or.copy(this),e),Math.round(Dr(Or.r*255,0,255))*65536+Math.round(Dr(Or.g*255,0,255))*256+Math.round(Dr(Or.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Tn.workingColorSpace){Tn.fromWorkingColorSpace(Or.copy(this),n);const r=Or.r,i=Or.g,o=Or.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Hl&&(r.blending=this.blending),this.side!==Us&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==VQ&&(r.blendSrc=this.blendSrc),this.blendDst!==FQ&&(r.blendDst=this.blendDst),this.blendEquation!==F1&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==dd&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==KD&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==nl&&(r.stencilFail=this.stencilFail),this.stencilZFail!==nl&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==nl&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Ra extends fo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Nt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Jn=new Ee,y5=new Yt;class Kr{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ms,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let h=0,f=d.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(uI.copy(o).invert(),M1.copy(e.ray).applyMatrix4(uI),!(r.boundingBox!==null&&M1.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,M1)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let m=0,T=h.length;mn.far?null:{distance:c,point:A5.clone(),object:t}}function w5(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,fl),t.getVertexPosition(l,pl),t.getVertexPosition(c,hl);const u=d1r(t,e,n,r,fl,pl,hl,C5);if(u){i&&(x5.fromBufferAttribute(i,a),S5.fromBufferAttribute(i,l),L5.fromBufferAttribute(i,c),u.uv=so.getInterpolation(C5,fl,pl,hl,x5,S5,L5,new Yt)),o&&(x5.fromBufferAttribute(o,a),S5.fromBufferAttribute(o,l),L5.fromBufferAttribute(o,c),u.uv1=so.getInterpolation(C5,fl,pl,hl,x5,S5,L5,new Yt),u.uv2=u.uv1),s&&(fI.fromBufferAttribute(s,a),pI.fromBufferAttribute(s,l),hI.fromBufferAttribute(s,c),u.normal=so.getInterpolation(C5,fl,pl,hl,fI,pI,hI,new Ee),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Ee,materialIndex:0};so.getNormal(fl,pl,hl,d.normal),u.face=d}return u}class Va extends rs{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let h=0,f=0;m("z","y","x",-1,-1,r,n,e,s,o,0),m("z","y","x",1,-1,r,n,-e,s,o,1),m("x","z","y",1,1,e,r,n,i,s,2),m("x","z","y",1,-1,e,r,-n,i,s,3),m("x","y","z",1,-1,e,n,r,i,o,4),m("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Vs(c,3)),this.setAttribute("normal",new Vs(u,3)),this.setAttribute("uv",new Vs(d,2));function m(T,Q,_,v,y,b,E,x,L,M,C){const A=b/L,I=E/M,N=b/2,H=E/2,O=x/2,B=L+1,V=M+1;let U=0,G=0;const K=new Ee;for(let W=0;W0?1:-1,u.push(K.x,K.y,K.z),d.push(de/L),d.push(1-W/M),U+=1}}for(let W=0;W>8&255]+Mr[t>>16&255]+Mr[t>>24&255]+"-"+Mr[e&255]+Mr[e>>8&255]+"-"+Mr[e>>16&15|64]+Mr[e>>24&255]+"-"+Mr[n&63|128]+Mr[n>>8&255]+"-"+Mr[n>>16&255]+Mr[n>>24&255]+Mr[r&255]+Mr[r>>8&255]+Mr[r>>16&255]+Mr[r>>24&255]).toLowerCase()}function Dr(t,e,n){return Math.max(e,Math.min(n,t))}function Jb(t,e){return(t%e+e)%e}function Iar(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function kar(t,e,n){return t!==e?(n-t)/(e-t):0}function R4(t,e,n){return(1-n)*t+n*e}function Par(t,e,n,r){return R4(t,e,1-Math.exp(-n*r))}function Har(t,e=1){return e-Math.abs(Jb(t,e*2)-e)}function Var(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Far(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Bar(t,e){return t+Math.floor(Math.random()*(e-t+1))}function $ar(t,e){return t+Math.random()*(e-t)}function Uar(t){return t*(.5-Math.random())}function Gar(t){t!==void 0&&(XD=t);let e=XD+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function qar(t){return t*O4}function zar(t){return t*hc}function jQ(t){return(t&t-1)===0&&t!==0}function jar(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function gd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function War(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),h=s((e-r)/2),f=o((r-e)/2),m=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*m,l*f,a*c);break;case"YXY":t.set(l*f,a*u,l*m,a*c);break;case"ZYZ":t.set(l*m,l*f,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Po(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function bn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const Yar={DEG2RAD:O4,RAD2DEG:hc,generateUUID:uo,clamp:Dr,euclideanModulo:Jb,mapLinear:Iar,inverseLerp:kar,lerp:R4,damp:Par,pingpong:Har,smoothstep:Var,smootherstep:Far,randInt:Bar,randFloat:$ar,randFloatSpread:Uar,seededRandom:Gar,degToRad:qar,radToDeg:zar,isPowerOfTwo:jQ,ceilPowerOfTwo:jar,floorPowerOfTwo:gd,setQuaternionFromProperEuler:War,normalize:bn,denormalize:Po};class Yt{constructor(e=0,n=0){Yt.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(e,n,r,i,o,s,a,l,c){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],h=r[2],f=r[5],m=r[8],T=i[0],Q=i[3],_=i[6],v=i[1],y=i[4],b=i[7],E=i[2],x=i[5],L=i[8];return o[0]=s*T+a*v+l*E,o[3]=s*Q+a*y+l*x,o[6]=s*_+a*b+l*L,o[1]=c*T+u*v+d*E,o[4]=c*Q+u*y+d*x,o[7]=c*_+u*b+d*L,o[2]=h*T+f*v+m*E,o[5]=h*Q+f*y+m*x,o[8]=h*_+f*b+m*L,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,m=n*d+r*h+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const T=1/m;return e[0]=d*T,e[1]=(i*c-u*r)*T,e[2]=(a*r-i*s)*T,e[3]=h*T,e[4]=(u*n-i*l)*T,e[5]=(i*o-a*n)*T,e[6]=f*T,e[7]=(r*l-c*n)*T,e[8]=(s*n-r*o)*T,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Bg.makeScale(e,n)),this}rotate(e){return this.premultiply(Bg.makeRotation(-e)),this}translate(e,n){return this.premultiply(Bg.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Bg=new qt;function IU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function a0(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Kar(){const t=a0("canvas");return t.style.display="block",t}const JD={};function N4(t){t in JD||(JD[t]=!0,console.warn(t))}const eI=new qt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),tI=new qt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),d5={[Sr]:{transfer:pd,primaries:hd,toReference:t=>t,fromReference:t=>t},[jn]:{transfer:kn,primaries:hd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[x9]:{transfer:pd,primaries:Td,toReference:t=>t.applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI)},[Xb]:{transfer:kn,primaries:Td,toReference:t=>t.convertSRGBToLinear().applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI).convertLinearToSRGB()}},Zar=new Set([Sr,x9]),Tn={enabled:!0,_workingColorSpace:Sr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Zar.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=d5[e].toReference,i=d5[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return d5[t].primaries},getTransfer:function(t){return t===Vi?pd:d5[t].transfer}};function Vl(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function $g(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let rl;class kU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{rl===void 0&&(rl=a0("canvas")),rl.width=e.width,rl.height=e.height;const r=rl.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=rl}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=a0("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==EU)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case dc:e.x=e.x-Math.floor(e.x);break;case Pi:e.x=e.x<0?0:1;break;case fd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case dc:e.y=e.y-Math.floor(e.y);break;case Pi:e.y=e.y<0?0:1;break;case fd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jn?e2:NU}set encoding(e){N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===e2?jn:Vi}}xr.DEFAULT_IMAGE=null;xr.DEFAULT_MAPPING=EU;xr.DEFAULT_ANISOTROPY=1;class Mn{constructor(e=0,n=0,r=0,i=1){Mn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],m=l[9],T=l[2],Q=l[6],_=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-T)<.01&&Math.abs(m-Q)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+T)<.1&&Math.abs(m+Q)<.1&&Math.abs(c+f+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,b=(f+1)/2,E=(_+1)/2,x=(u+h)/4,L=(d+T)/4,M=(m+Q)/4;return y>b&&y>E?y<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(y),i=x/r,o=L/r):b>E?b<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(b),r=x/i,o=M/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=L/o,i=M/o),this.set(r,i,o,n),this}let v=Math.sqrt((Q-m)*(Q-m)+(d-T)*(d-T)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(Q-m)/v,this.y=(d-T)/v,this.z=(h-u)/v,this.w=Math.acos((c+f+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class e1r extends zc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Mn(0,0,e,n),this.scissorTest=!1,this.viewport=new Mn(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(N4("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===e2?jn:Vi),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ii,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new xr(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new PU(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class _2 extends e1r{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class HU extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class t1r extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class n1{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],T=o[s+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=h,e[n+1]=f,e[n+2]=m,e[n+3]=T;return}if(d!==T||l!==h||c!==f||u!==m){let Q=1-a;const _=l*h+c*f+u*m+d*T,v=_>=0?1:-1,y=1-_*_;if(y>Number.EPSILON){const E=Math.sqrt(y),x=Math.atan2(E,_*v);Q=Math.sin(Q*x)/E,a=Math.sin(a*x)/E}const b=a*v;if(l=l*Q+h*b,c=c*Q+f*b,u=u*Q+m*b,d=d*Q+T*b,Q===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return e[n]=a*m+u*d+l*f-c*h,e[n+1]=l*m+u*h+c*d-a*f,e[n+2]=c*m+u*f+a*h-l*d,e[n+3]=u*m-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Dr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ee{constructor(e=0,n=0,r=0){Ee.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(nI.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(nI.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Gg.copy(this).projectOnVector(e),this.sub(Gg)}reflect(e){return this.sub(Gg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Gg=new Ee,nI=new n1;class Ks{constructor(e=new Ee(1/0,1/0,1/0),n=new Ee(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,to),to.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(i4),p5.subVectors(this.max,i4),il.subVectors(e.a,i4),ol.subVectors(e.b,i4),sl.subVectors(e.c,i4),da.subVectors(ol,il),fa.subVectors(sl,ol),A1.subVectors(il,sl);let n=[0,-da.z,da.y,0,-fa.z,fa.y,0,-A1.z,A1.y,da.z,0,-da.x,fa.z,0,-fa.x,A1.z,0,-A1.x,-da.y,da.x,0,-fa.y,fa.x,0,-A1.y,A1.x,0];return!qg(n,il,ol,sl,p5)||(n=[1,0,0,0,1,0,0,0,1],!qg(n,il,ol,sl,p5))?!1:(h5.crossVectors(da,fa),n=[h5.x,h5.y,h5.z],qg(n,il,ol,sl,p5))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,to).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(to).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ms=[new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee],to=new Ee,f5=new Ks,il=new Ee,ol=new Ee,sl=new Ee,da=new Ee,fa=new Ee,A1=new Ee,i4=new Ee,p5=new Ee,h5=new Ee,w1=new Ee;function qg(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){w1.fromArray(t,o);const a=i.x*Math.abs(w1.x)+i.y*Math.abs(w1.y)+i.z*Math.abs(w1.z),l=e.dot(w1),c=n.dot(w1),u=r.dot(w1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const n1r=new Ks,o4=new Ee,zg=new Ee;class ns{constructor(e=new Ee,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):n1r.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;o4.subVectors(e,this.center);const n=o4.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(o4,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(zg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(o4.copy(e.center).add(zg)),this.expandByPoint(o4.copy(e.center).sub(zg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const gs=new Ee,jg=new Ee,T5=new Ee,pa=new Ee,Wg=new Ee,m5=new Ee,Yg=new Ee;class S9{constructor(e=new Ee,n=new Ee(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,gs)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=gs.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(gs.copy(this.origin).addScaledVector(this.direction,n),gs.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){jg.copy(e).add(n).multiplyScalar(.5),T5.copy(n).sub(e).normalize(),pa.copy(this.origin).sub(jg);const o=e.distanceTo(n)*.5,s=-this.direction.dot(T5),a=pa.dot(this.direction),l=-pa.dot(T5),c=pa.lengthSq(),u=Math.abs(1-s*s);let d,h,f,m;if(u>0)if(d=s*l-a,h=s*a-l,m=o*u,d>=0)if(h>=-m)if(h<=m){const T=1/u;d*=T,h*=T,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-m?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=m?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(jg).addScaledVector(T5,h),f}intersectSphere(e,n){gs.subVectors(e.center,this.origin);const r=gs.dot(this.direction),i=gs.dot(gs)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,gs)!==null}intersectTriangle(e,n,r,i,o){Wg.subVectors(n,e),m5.subVectors(r,e),Yg.crossVectors(Wg,m5);let s=this.direction.dot(Yg),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;pa.subVectors(this.origin,e);const l=a*this.direction.dot(m5.crossVectors(pa,m5));if(l<0)return null;const c=a*this.direction.dot(Wg.cross(pa));if(c<0||l+c>s)return null;const u=-a*pa.dot(Yg);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class zt{constructor(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q)}set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){const _=this.elements;return _[0]=e,_[4]=n,_[8]=r,_[12]=i,_[1]=o,_[5]=s,_[9]=a,_[13]=l,_[2]=c,_[6]=u,_[10]=d,_[14]=h,_[3]=f,_[7]=m,_[11]=T,_[15]=Q,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new zt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/al.setFromMatrixColumn(e,0).length(),o=1/al.setFromMatrixColumn(e,1).length(),s=1/al.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=f+m*c,n[5]=h-T*c,n[9]=-a*l,n[2]=T-h*c,n[6]=m+f*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h+T*a,n[4]=m*a-f,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=f*a-m,n[6]=T+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h-T*a,n[4]=-s*d,n[8]=m+f*a,n[1]=f+m*a,n[5]=s*u,n[9]=T-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=m*c-f,n[8]=h*c+T,n[1]=l*d,n[5]=T*c+h,n[9]=f*c-m,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=T-h*d,n[8]=m*d+f,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=f*d+m,n[10]=h-T*d}else if(e.order==="XZY"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=h*d+T,n[5]=s*u,n[9]=f*d-m,n[2]=m*d-f,n[6]=a*u,n[10]=T*d+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(r1r,e,i1r)}lookAt(e,n,r){const i=this.elements;return _i.subVectors(e,n),_i.lengthSq()===0&&(_i.z=1),_i.normalize(),ha.crossVectors(r,_i),ha.lengthSq()===0&&(Math.abs(r.z)===1?_i.x+=1e-4:_i.z+=1e-4,_i.normalize(),ha.crossVectors(r,_i)),ha.normalize(),g5.crossVectors(_i,ha),i[0]=ha.x,i[4]=g5.x,i[8]=_i.x,i[1]=ha.y,i[5]=g5.y,i[9]=_i.y,i[2]=ha.z,i[6]=g5.z,i[10]=_i.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],h=r[9],f=r[13],m=r[2],T=r[6],Q=r[10],_=r[14],v=r[3],y=r[7],b=r[11],E=r[15],x=i[0],L=i[4],M=i[8],C=i[12],A=i[1],I=i[5],N=i[9],H=i[13],O=i[2],B=i[6],V=i[10],U=i[14],G=i[3],K=i[7],W=i[11],te=i[15];return o[0]=s*x+a*A+l*O+c*G,o[4]=s*L+a*I+l*B+c*K,o[8]=s*M+a*N+l*V+c*W,o[12]=s*C+a*H+l*U+c*te,o[1]=u*x+d*A+h*O+f*G,o[5]=u*L+d*I+h*B+f*K,o[9]=u*M+d*N+h*V+f*W,o[13]=u*C+d*H+h*U+f*te,o[2]=m*x+T*A+Q*O+_*G,o[6]=m*L+T*I+Q*B+_*K,o[10]=m*M+T*N+Q*V+_*W,o[14]=m*C+T*H+Q*U+_*te,o[3]=v*x+y*A+b*O+E*G,o[7]=v*L+y*I+b*B+E*K,o[11]=v*M+y*N+b*V+E*W,o[15]=v*C+y*H+b*U+E*te,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],m=e[3],T=e[7],Q=e[11],_=e[15];return m*(+o*l*d-i*c*d-o*a*h+r*c*h+i*a*f-r*l*f)+T*(+n*l*f-n*c*h+o*s*h-i*s*f+i*c*u-o*l*u)+Q*(+n*c*d-n*a*f-o*s*d+r*s*f+o*a*u-r*c*u)+_*(-i*a*u-n*l*d+n*a*h+i*s*d-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],m=e[12],T=e[13],Q=e[14],_=e[15],v=d*Q*c-T*h*c+T*l*f-a*Q*f-d*l*_+a*h*_,y=m*h*c-u*Q*c-m*l*f+s*Q*f+u*l*_-s*h*_,b=u*T*c-m*d*c+m*a*f-s*T*f-u*a*_+s*d*_,E=m*d*l-u*T*l-m*a*h+s*T*h+u*a*Q-s*d*Q,x=n*v+r*y+i*b+o*E;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/x;return e[0]=v*L,e[1]=(T*h*o-d*Q*o-T*i*f+r*Q*f+d*i*_-r*h*_)*L,e[2]=(a*Q*o-T*l*o+T*i*c-r*Q*c-a*i*_+r*l*_)*L,e[3]=(d*l*o-a*h*o-d*i*c+r*h*c+a*i*f-r*l*f)*L,e[4]=y*L,e[5]=(u*Q*o-m*h*o+m*i*f-n*Q*f-u*i*_+n*h*_)*L,e[6]=(m*l*o-s*Q*o-m*i*c+n*Q*c+s*i*_-n*l*_)*L,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*f+n*l*f)*L,e[8]=b*L,e[9]=(m*d*o-u*T*o-m*r*f+n*T*f+u*r*_-n*d*_)*L,e[10]=(s*T*o-m*a*o+m*r*c-n*T*c-s*r*_+n*a*_)*L,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*f-n*a*f)*L,e[12]=E*L,e[13]=(u*T*i-m*d*i+m*r*h-n*T*h-u*r*Q+n*d*Q)*L,e[14]=(m*a*i-s*T*i-m*r*l+n*T*l+s*r*Q-n*a*Q)*L,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*h+n*a*h)*L,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,m=o*d,T=s*u,Q=s*d,_=a*d,v=l*c,y=l*u,b=l*d,E=r.x,x=r.y,L=r.z;return i[0]=(1-(T+_))*E,i[1]=(f+b)*E,i[2]=(m-y)*E,i[3]=0,i[4]=(f-b)*x,i[5]=(1-(h+_))*x,i[6]=(Q+v)*x,i[7]=0,i[8]=(m+y)*L,i[9]=(Q-v)*L,i[10]=(1-(h+T))*L,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=al.set(i[0],i[1],i[2]).length();const s=al.set(i[4],i[5],i[6]).length(),a=al.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],no.copy(this);const c=1/o,u=1/s,d=1/a;return no.elements[0]*=c,no.elements[1]*=c,no.elements[2]*=c,no.elements[4]*=u,no.elements[5]*=u,no.elements[6]*=u,no.elements[8]*=d,no.elements[9]*=d,no.elements[10]*=d,n.setFromRotationMatrix(no),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=Os){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),d=(n+e)/(n-e),h=(r+i)/(r-i);let f,m;if(a===Os)f=-(s+o)/(s-o),m=-2*s*o/(s-o);else if(a===md)f=-s/(s-o),m=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=Os){const l=this.elements,c=1/(n-e),u=1/(r-i),d=1/(s-o),h=(n+e)*c,f=(r+i)*u;let m,T;if(a===Os)m=(s+o)*d,T=-2*d;else if(a===md)m=o*d,T=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=T,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const al=new Ee,no=new zt,r1r=new Ee(0,0,0),i1r=new Ee(1,1,1),ha=new Ee,g5=new Ee,_i=new Ee,rI=new zt,iI=new n1;class L9{constructor(e=0,n=0,r=0,i=L9.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],h=i[6],f=i[10];switch(n){case"XYZ":this._y=Math.asin(Dr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Dr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Dr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Dr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Dr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Dr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return rI.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rI,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return iI.setFromEuler(this),this.setFromQuaternion(iI,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}L9.DEFAULT_ORDER="XYZ";class VU{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),f.length>0&&(r.animations=f),m.length>0&&(r.nodes=m)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){ro.subVectors(i,n),Qs.subVectors(r,n),Kg.subVectors(e,n);const s=ro.dot(ro),a=ro.dot(Qs),l=ro.dot(Kg),c=Qs.dot(Qs),u=Qs.dot(Kg),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const h=1/d,f=(c*l-a*u)*h,m=(s*u-a*l)*h;return o.set(1-f-m,m,f)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,vs),vs.x>=0&&vs.y>=0&&vs.x+vs.y<=1}static getUV(e,n,r,i,o,s,a,l){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,vs),l.setScalar(0),l.addScaledVector(o,vs.x),l.addScaledVector(s,vs.y),l.addScaledVector(a,vs.z),l}static isFrontFacing(e,n,r,i){return ro.subVectors(r,n),Qs.subVectors(e,n),ro.cross(Qs).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ro.subVectors(this.c,this.b),Qs.subVectors(this.a,this.b),ro.cross(Qs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return so.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return so.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),so.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return so.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return so.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return so.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;cl.subVectors(i,r),ul.subVectors(o,r),Zg.subVectors(e,r);const l=cl.dot(Zg),c=ul.dot(Zg);if(l<=0&&c<=0)return n.copy(r);Xg.subVectors(e,i);const u=cl.dot(Xg),d=ul.dot(Xg);if(u>=0&&d<=u)return n.copy(i);const h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(cl,s);Jg.subVectors(e,o);const f=cl.dot(Jg),m=ul.dot(Jg);if(m>=0&&f<=m)return n.copy(o);const T=f*c-l*m;if(T<=0&&c>=0&&m<=0)return a=c/(c-m),n.copy(r).addScaledVector(ul,a);const Q=u*m-f*d;if(Q<=0&&d-u>=0&&f-m>=0)return cI.subVectors(o,i),a=(d-u)/(d-u+(f-m)),n.copy(i).addScaledVector(cI,a);const _=1/(Q+T+h);return s=T*_,a=h*_,n.copy(r).addScaledVector(cl,s).addScaledVector(ul,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const FU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ta={h:0,s:0,l:0},v5={h:0,s:0,l:0};function e_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Nt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,Tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Tn.workingColorSpace){if(e=Jb(e,1),n=Dr(n,0,1),r=Dr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=e_(s,o,e+1/3),this.g=e_(s,o,e),this.b=e_(s,o,e-1/3)}return Tn.toWorkingColorSpace(this,i),this}setStyle(e,n=jn){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jn){const r=FU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Vl(e.r),this.g=Vl(e.g),this.b=Vl(e.b),this}copyLinearToSRGB(e){return this.r=$g(e.r),this.g=$g(e.g),this.b=$g(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return Tn.fromWorkingColorSpace(Or.copy(this),e),Math.round(Dr(Or.r*255,0,255))*65536+Math.round(Dr(Or.g*255,0,255))*256+Math.round(Dr(Or.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Tn.workingColorSpace){Tn.fromWorkingColorSpace(Or.copy(this),n);const r=Or.r,i=Or.g,o=Or.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Hl&&(r.blending=this.blending),this.side!==Us&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==VQ&&(r.blendSrc=this.blendSrc),this.blendDst!==FQ&&(r.blendDst=this.blendDst),this.blendEquation!==F1&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==dd&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==KD&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==nl&&(r.stencilFail=this.stencilFail),this.stencilZFail!==nl&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==nl&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Ra extends fo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Nt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Jn=new Ee,y5=new Yt;class Kr{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ms,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let h=0,f=d.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(uI.copy(o).invert(),M1.copy(e.ray).applyMatrix4(uI),!(r.boundingBox!==null&&M1.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,M1)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let m=0,T=h.length;mn.far?null:{distance:c,point:A5.clone(),object:t}}function w5(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,fl),t.getVertexPosition(l,pl),t.getVertexPosition(c,hl);const u=f1r(t,e,n,r,fl,pl,hl,C5);if(u){i&&(x5.fromBufferAttribute(i,a),S5.fromBufferAttribute(i,l),L5.fromBufferAttribute(i,c),u.uv=so.getInterpolation(C5,fl,pl,hl,x5,S5,L5,new Yt)),o&&(x5.fromBufferAttribute(o,a),S5.fromBufferAttribute(o,l),L5.fromBufferAttribute(o,c),u.uv1=so.getInterpolation(C5,fl,pl,hl,x5,S5,L5,new Yt),u.uv2=u.uv1),s&&(fI.fromBufferAttribute(s,a),pI.fromBufferAttribute(s,l),hI.fromBufferAttribute(s,c),u.normal=so.getInterpolation(C5,fl,pl,hl,fI,pI,hI,new Ee),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Ee,materialIndex:0};so.getNormal(fl,pl,hl,d.normal),u.face=d}return u}class Va extends rs{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let h=0,f=0;m("z","y","x",-1,-1,r,n,e,s,o,0),m("z","y","x",1,-1,r,n,-e,s,o,1),m("x","z","y",1,1,e,r,n,i,s,2),m("x","z","y",1,-1,e,r,-n,i,s,3),m("x","y","z",1,-1,e,n,r,i,o,4),m("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Vs(c,3)),this.setAttribute("normal",new Vs(u,3)),this.setAttribute("uv",new Vs(d,2));function m(T,Q,_,v,y,b,E,x,L,M,C){const A=b/L,I=E/M,N=b/2,H=E/2,O=x/2,B=L+1,V=M+1;let U=0,G=0;const K=new Ee;for(let W=0;W0?1:-1,u.push(K.x,K.y,K.z),d.push(de/L),d.push(1-W/M),U+=1}}for(let W=0;W0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class GU extends $n{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt,this.coordinateSystem=Os}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wr extends GU{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=hc*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(O4*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return hc*2*Math.atan(Math.tan(O4*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,s){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(O4*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Tl=-90,ml=1;class m1r extends $n{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Wr(Tl,ml,e,n);i.layers=this.layers,this.add(i);const o=new Wr(Tl,ml,e,n);o.layers=this.layers,this.add(o);const s=new Wr(Tl,ml,e,n);s.layers=this.layers,this.add(s);const a=new Wr(Tl,ml,e,n);a.layers=this.layers,this.add(a);const l=new Wr(Tl,ml,e,n);l.layers=this.layers,this.add(l);const c=new Wr(Tl,ml,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===Os)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===md)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const T=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=T,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(d,h,f),e.xr.enabled=m,r.texture.needsPMREMUpdate=!0}}class qU extends xr{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:cc,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class g1r extends _2{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(N4("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===e2?jn:Vi),this.texture=new qU(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class Q2 extends fo{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=T1r,this.fragmentShader=m1r,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Tc(e.uniforms),this.uniformsGroups=p1r(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class GU extends $n{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt,this.coordinateSystem=Os}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wr extends GU{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=hc*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(O4*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return hc*2*Math.atan(Math.tan(O4*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,s){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(O4*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Tl=-90,ml=1;class g1r extends $n{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Wr(Tl,ml,e,n);i.layers=this.layers,this.add(i);const o=new Wr(Tl,ml,e,n);o.layers=this.layers,this.add(o);const s=new Wr(Tl,ml,e,n);s.layers=this.layers,this.add(s);const a=new Wr(Tl,ml,e,n);a.layers=this.layers,this.add(a);const l=new Wr(Tl,ml,e,n);l.layers=this.layers,this.add(l);const c=new Wr(Tl,ml,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===Os)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===md)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const T=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=T,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(d,h,f),e.xr.enabled=m,r.texture.needsPMREMUpdate=!0}}class qU extends xr{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:cc,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class _1r extends _2{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(N4("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===e2?jn:Vi),this.texture=new qU(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -453,9 +453,9 @@ ${l}`;navigator.clipboard.writeText(c)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new Va(5,5,5),o=new Q2({name:"CubemapFromEquirect",uniforms:Tc(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:ui,blending:ka});o.uniforms.tEquirect.value=n;const s=new Yr(i,o),a=n.minFilter;return n.minFilter===g2&&(n.minFilter=ii),new m1r(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(o)}}const r_=new Ee,_1r=new Ee,Q1r=new qt;class k1{constructor(e=new Ee(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=r_.subVectors(r,n).cross(_1r.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(r_),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||Q1r.getNormalMatrix(e),i=this.coplanarPoint(r_).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const O1=new ns,M5=new Ee;class eE{constructor(e=new k1,n=new k1,r=new k1,i=new k1,o=new k1,s=new k1){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Os){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],f=i[8],m=i[9],T=i[10],Q=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(l-o,h-c,Q-f,b-_).normalize(),r[1].setComponents(l+o,h+c,Q+f,b+_).normalize(),r[2].setComponents(l+s,h+u,Q+m,b+v).normalize(),r[3].setComponents(l-s,h-u,Q-m,b-v).normalize(),r[4].setComponents(l-a,h-d,Q-T,b-y).normalize(),n===Os)r[5].setComponents(l+a,h+d,Q+T,b+y).normalize();else if(n===md)r[5].setComponents(a,d,T,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),O1.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),O1.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(O1)}intersectsSprite(e){return O1.center.set(0,0,0),O1.radius=.7071067811865476,O1.applyMatrix4(e.matrixWorld),this.intersectsSphere(O1)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,M5.y=i.normal.y>0?e.max.y:e.min.y,M5.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(M5)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zU(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function v1r(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,h=c.usage,f=d.byteLength,m=t.createBuffer();t.bindBuffer(u,m),t.bufferData(u,d,h),c.onUploadCallback();let T;if(d instanceof Float32Array)T=t.FLOAT;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)T=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else T=t.UNSIGNED_SHORT;else if(d instanceof Int16Array)T=t.SHORT;else if(d instanceof Uint32Array)T=t.UNSIGNED_INT;else if(d instanceof Int32Array)T=t.INT;else if(d instanceof Int8Array)T=t.BYTE;else if(d instanceof Uint8Array)T=t.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)T=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:m,type:T,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version,size:f}}function o(c,u,d){const h=u.array,f=u._updateRange,m=u.updateRanges;if(t.bindBuffer(d,c),f.count===-1&&m.length===0&&t.bufferSubData(d,0,h),m.length!==0){for(let T=0,Q=m.length;T1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||v1r.getNormalMatrix(e),i=this.coplanarPoint(r_).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const O1=new ns,M5=new Ee;class eE{constructor(e=new k1,n=new k1,r=new k1,i=new k1,o=new k1,s=new k1){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Os){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],f=i[8],m=i[9],T=i[10],Q=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(l-o,h-c,Q-f,b-_).normalize(),r[1].setComponents(l+o,h+c,Q+f,b+_).normalize(),r[2].setComponents(l+s,h+u,Q+m,b+v).normalize(),r[3].setComponents(l-s,h-u,Q-m,b-v).normalize(),r[4].setComponents(l-a,h-d,Q-T,b-y).normalize(),n===Os)r[5].setComponents(l+a,h+d,Q+T,b+y).normalize();else if(n===md)r[5].setComponents(a,d,T,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),O1.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),O1.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(O1)}intersectsSprite(e){return O1.center.set(0,0,0),O1.radius=.7071067811865476,O1.applyMatrix4(e.matrixWorld),this.intersectsSphere(O1)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,M5.y=i.normal.y>0?e.max.y:e.min.y,M5.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(M5)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zU(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function y1r(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,h=c.usage,f=d.byteLength,m=t.createBuffer();t.bindBuffer(u,m),t.bufferData(u,d,h),c.onUploadCallback();let T;if(d instanceof Float32Array)T=t.FLOAT;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)T=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else T=t.UNSIGNED_SHORT;else if(d instanceof Int16Array)T=t.SHORT;else if(d instanceof Uint32Array)T=t.UNSIGNED_INT;else if(d instanceof Int32Array)T=t.INT;else if(d instanceof Int8Array)T=t.BYTE;else if(d instanceof Uint8Array)T=t.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)T=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:m,type:T,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version,size:f}}function o(c,u,d){const h=u.array,f=u._updateRange,m=u.updateRanges;if(t.bindBuffer(d,c),f.count===-1&&m.length===0&&t.bufferSubData(d,0,h),m.length!==0){for(let T=0,Q=m.length;T 0 +#endif`,P1r=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -652,26 +652,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,P1r=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,H1r=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,V1r=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,F1r=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,F1r=`#if defined( USE_COLOR_ALPHA ) +#endif`,B1r=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,B1r=`#if defined( USE_COLOR_ALPHA ) +#endif`,$1r=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,$1r=`#if defined( USE_COLOR_ALPHA ) +#endif`,U1r=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,U1r=`#if defined( USE_COLOR_ALPHA ) +#endif`,G1r=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -681,7 +681,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,G1r=`#define PI 3.141592653589793 +#endif`,q1r=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -759,7 +759,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,q1r=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,z1r=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -857,7 +857,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,z1r=`vec3 transformedNormal = objectNormal; +#endif`,j1r=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -886,18 +886,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,j1r=`#ifdef USE_DISPLACEMENTMAP +#endif`,W1r=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,W1r=`#ifdef USE_DISPLACEMENTMAP +#endif`,Y1r=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Y1r=`#ifdef USE_EMISSIVEMAP +#endif`,K1r=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,K1r=`#ifdef USE_EMISSIVEMAP +#endif`,Z1r=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Z1r="gl_FragColor = linearToOutputTexel( gl_FragColor );",X1r=` +#endif`,X1r="gl_FragColor = linearToOutputTexel( gl_FragColor );",J1r=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -925,7 +925,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,J1r=`#ifdef USE_ENVMAP +}`,e2r=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -954,7 +954,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,e2r=`#ifdef USE_ENVMAP +#endif`,t2r=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -963,7 +963,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,t2r=`#ifdef USE_ENVMAP +#endif`,n2r=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -974,7 +974,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,n2r=`#ifdef USE_ENVMAP +#endif`,r2r=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -985,7 +985,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,r2r=`#ifdef USE_ENVMAP +#endif`,i2r=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -1002,18 +1002,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,i2r=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; #endif`,o2r=`#ifdef USE_FOG - varying float vFogDepth; + vFogDepth = - mvPosition.z; #endif`,s2r=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,a2r=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,a2r=`#ifdef USE_FOG +#endif`,l2r=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -1022,7 +1022,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,l2r=`#ifdef USE_GRADIENTMAP +#endif`,c2r=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -1034,16 +1034,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,c2r=`#ifdef USE_LIGHTMAP +}`,u2r=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,u2r=`#ifdef USE_LIGHTMAP +#endif`,d2r=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,d2r=`LambertMaterial material; +#endif`,f2r=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,f2r=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,p2r=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -1057,7 +1057,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,p2r=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,h2r=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -1180,7 +1180,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,h2r=`#ifdef USE_ENVMAP +#endif`,T2r=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1213,8 +1213,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,T2r=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,m2r=`varying vec3 vViewPosition; +#endif`,m2r=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,g2r=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1226,11 +1226,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,g2r=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,_2r=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,_2r=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Q2r=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1247,7 +1247,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Q2r=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,v2r=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1330,7 +1330,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,v2r=`struct PhysicalMaterial { +#endif`,y2r=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1630,7 +1630,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,y2r=` +}`,b2r=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1745,7 +1745,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,b2r=`#if defined( RE_IndirectDiffuse ) +#endif`,E2r=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1764,25 +1764,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,E2r=`#if defined( RE_IndirectDiffuse ) +#endif`,x2r=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,x2r=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,S2r=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,L2r=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,L2r=`#ifdef USE_LOGDEPTHBUF +#endif`,C2r=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,C2r=`#ifdef USE_LOGDEPTHBUF +#endif`,A2r=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1792,16 +1792,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,A2r=`#ifdef USE_MAP +#endif`,w2r=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,w2r=`#ifdef USE_MAP +#endif`,M2r=`#ifdef USE_MAP uniform sampler2D map; -#endif`,M2r=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,O2r=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1813,7 +1813,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,O2r=`#if defined( USE_POINTS_UV ) +#endif`,R2r=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1825,13 +1825,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,R2r=`float metalnessFactor = metalness; +#endif`,N2r=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,N2r=`#ifdef USE_METALNESSMAP +#endif`,D2r=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,D2r=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,I2r=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1840,7 +1840,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,I2r=`#ifdef USE_MORPHNORMALS +#endif`,k2r=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1852,7 +1852,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,k2r=`#ifdef USE_MORPHTARGETS +#endif`,P2r=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1872,7 +1872,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,P2r=`#ifdef USE_MORPHTARGETS +#endif`,H2r=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1890,7 +1890,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,H2r=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,V2r=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1931,7 +1931,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,V2r=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,F2r=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1946,12 +1946,6 @@ vec3 nonPerturbedNormal = normal;`,V2r=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,F2r=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif #endif`,B2r=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT @@ -1959,12 +1953,18 @@ vec3 nonPerturbedNormal = normal;`,V2r=`#ifdef USE_NORMALMAP_OBJECTSPACE varying vec3 vBitangent; #endif #endif`,$2r=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,U2r=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,U2r=`#ifdef USE_NORMALMAP +#endif`,G2r=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1986,13 +1986,13 @@ vec3 nonPerturbedNormal = normal;`,V2r=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,G2r=`#ifdef USE_CLEARCOAT +#endif`,q2r=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,q2r=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,z2r=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,z2r=`#ifdef USE_CLEARCOATMAP +#endif`,j2r=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -2001,18 +2001,18 @@ vec3 nonPerturbedNormal = normal;`,V2r=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,j2r=`#ifdef USE_IRIDESCENCEMAP +#endif`,W2r=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,W2r=`#ifdef OPAQUE +#endif`,Y2r=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Y2r=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,K2r=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -2053,9 +2053,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,K2r=`#ifdef PREMULTIPLIED_ALPHA +}`,Z2r=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Z2r=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,X2r=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -2063,22 +2063,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,J2r=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,J2r=`#ifdef DITHERING +#endif`,elr=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,elr=`float roughnessFactor = roughness; +#endif`,tlr=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,tlr=`#ifdef USE_ROUGHNESSMAP +#endif`,nlr=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,nlr=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,rlr=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2255,7 +2255,7 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,rlr=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,ilr=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2293,7 +2293,7 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,ilr=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,olr=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2325,7 +2325,7 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,olr=`float getShadowMask() { +#endif`,slr=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2357,12 +2357,12 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING #endif #endif return shadow; -}`,slr=`#ifdef USE_SKINNING +}`,alr=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,alr=`#ifdef USE_SKINNING +#endif`,llr=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2377,7 +2377,7 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,llr=`#ifdef USE_SKINNING +#endif`,clr=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2385,7 +2385,7 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,clr=`#ifdef USE_SKINNING +#endif`,ulr=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2396,17 +2396,17 @@ gl_Position = projectionMatrix * mvPosition;`,X2r=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,ulr=`float specularStrength; +#endif`,dlr=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,dlr=`#ifdef USE_SPECULARMAP +#endif`,flr=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,flr=`#if defined( TONE_MAPPING ) +#endif`,plr=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,plr=`#ifndef saturate +#endif`,hlr=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2442,7 +2442,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,Tlr=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2463,7 +2463,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,Tlr=`#ifdef USE_TRANSMISSION +#endif`,mlr=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2569,7 +2569,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,mlr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,glr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2639,7 +2639,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,glr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,_lr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2733,7 +2733,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,_lr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,Qlr=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2804,7 +2804,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,Qlr=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,vlr=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2813,12 +2813,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,hlr=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const vlr=`varying vec2 vUv; +#endif`;const ylr=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,ylr=`uniform sampler2D t2D; +}`,blr=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2830,14 +2830,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,blr=`varying vec3 vWorldDirection; +}`,Elr=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,Elr=`#ifdef ENVMAP_TYPE_CUBE +}`,xlr=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2859,14 +2859,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,xlr=`varying vec3 vWorldDirection; +}`,Slr=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,Slr=`uniform samplerCube tCube; +}`,Llr=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2876,7 +2876,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,Llr=`#include +}`,Clr=`#include #include #include #include @@ -2902,7 +2902,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,Clr=`#if DEPTH_PACKING == 3200 +}`,Alr=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2932,7 +2932,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,Alr=`#define DISTANCE +}`,wlr=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2958,7 +2958,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,wlr=`#define DISTANCE +}`,Mlr=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2982,13 +2982,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,Mlr=`varying vec3 vWorldDirection; +}`,Olr=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,Olr=`uniform sampler2D tEquirect; +}`,Rlr=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2997,7 +2997,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,Rlr=`uniform float scale; +}`,Nlr=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -3018,7 +3018,7 @@ void main() { #include #include #include -}`,Nlr=`uniform vec3 diffuse; +}`,Dlr=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -3046,7 +3046,7 @@ void main() { #include #include #include -}`,Dlr=`#include +}`,Ilr=`#include #include #include #include @@ -3077,7 +3077,7 @@ void main() { #include #include #include -}`,Ilr=`uniform vec3 diffuse; +}`,klr=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3125,7 +3125,7 @@ void main() { #include #include #include -}`,klr=`#define LAMBERT +}`,Plr=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3163,7 +3163,7 @@ void main() { #include #include #include -}`,Plr=`#define LAMBERT +}`,Hlr=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3220,7 +3220,7 @@ void main() { #include #include #include -}`,Hlr=`#define MATCAP +}`,Vlr=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3253,7 +3253,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,Vlr=`#define MATCAP +}`,Flr=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3299,7 +3299,7 @@ void main() { #include #include #include -}`,Flr=`#define NORMAL +}`,Blr=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3331,7 +3331,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,Blr=`#define NORMAL +}`,$lr=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3352,7 +3352,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,$lr=`#define PHONG +}`,Ulr=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3390,7 +3390,7 @@ void main() { #include #include #include -}`,Ulr=`#define PHONG +}`,Glr=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3449,7 +3449,7 @@ void main() { #include #include #include -}`,Glr=`#define STANDARD +}`,qlr=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3491,7 +3491,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,qlr=`#define STANDARD +}`,zlr=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3613,7 +3613,7 @@ void main() { #include #include #include -}`,zlr=`#define TOON +}`,jlr=`#define TOON varying vec3 vViewPosition; #include #include @@ -3649,7 +3649,7 @@ void main() { #include #include #include -}`,jlr=`#define TOON +}`,Wlr=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3702,7 +3702,7 @@ void main() { #include #include #include -}`,Wlr=`uniform float size; +}`,Ylr=`uniform float size; uniform float scale; #include #include @@ -3732,7 +3732,7 @@ void main() { #include #include #include -}`,Ylr=`uniform vec3 diffuse; +}`,Klr=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3757,7 +3757,7 @@ void main() { #include #include #include -}`,Klr=`#include +}`,Zlr=`#include #include #include #include @@ -3779,7 +3779,7 @@ void main() { #include #include #include -}`,Zlr=`uniform vec3 color; +}`,Xlr=`uniform vec3 color; uniform float opacity; #include #include @@ -3795,7 +3795,7 @@ void main() { #include #include #include -}`,Xlr=`uniform float rotation; +}`,Jlr=`uniform float rotation; uniform vec2 center; #include #include @@ -3821,7 +3821,7 @@ void main() { #include #include #include -}`,Jlr=`uniform vec3 diffuse; +}`,ecr=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3846,7 +3846,7 @@ void main() { #include #include #include -}`,Ut={alphahash_fragment:y1r,alphahash_pars_fragment:b1r,alphamap_fragment:E1r,alphamap_pars_fragment:x1r,alphatest_fragment:S1r,alphatest_pars_fragment:L1r,aomap_fragment:C1r,aomap_pars_fragment:A1r,batching_pars_vertex:w1r,batching_vertex:M1r,begin_vertex:O1r,beginnormal_vertex:R1r,bsdfs:N1r,iridescence_fragment:D1r,bumpmap_pars_fragment:I1r,clipping_planes_fragment:k1r,clipping_planes_pars_fragment:P1r,clipping_planes_pars_vertex:H1r,clipping_planes_vertex:V1r,color_fragment:F1r,color_pars_fragment:B1r,color_pars_vertex:$1r,color_vertex:U1r,common:G1r,cube_uv_reflection_fragment:q1r,defaultnormal_vertex:z1r,displacementmap_pars_vertex:j1r,displacementmap_vertex:W1r,emissivemap_fragment:Y1r,emissivemap_pars_fragment:K1r,colorspace_fragment:Z1r,colorspace_pars_fragment:X1r,envmap_fragment:J1r,envmap_common_pars_fragment:e2r,envmap_pars_fragment:t2r,envmap_pars_vertex:n2r,envmap_physical_pars_fragment:h2r,envmap_vertex:r2r,fog_vertex:i2r,fog_pars_vertex:o2r,fog_fragment:s2r,fog_pars_fragment:a2r,gradientmap_pars_fragment:l2r,lightmap_fragment:c2r,lightmap_pars_fragment:u2r,lights_lambert_fragment:d2r,lights_lambert_pars_fragment:f2r,lights_pars_begin:p2r,lights_toon_fragment:T2r,lights_toon_pars_fragment:m2r,lights_phong_fragment:g2r,lights_phong_pars_fragment:_2r,lights_physical_fragment:Q2r,lights_physical_pars_fragment:v2r,lights_fragment_begin:y2r,lights_fragment_maps:b2r,lights_fragment_end:E2r,logdepthbuf_fragment:x2r,logdepthbuf_pars_fragment:S2r,logdepthbuf_pars_vertex:L2r,logdepthbuf_vertex:C2r,map_fragment:A2r,map_pars_fragment:w2r,map_particle_fragment:M2r,map_particle_pars_fragment:O2r,metalnessmap_fragment:R2r,metalnessmap_pars_fragment:N2r,morphcolor_vertex:D2r,morphnormal_vertex:I2r,morphtarget_pars_vertex:k2r,morphtarget_vertex:P2r,normal_fragment_begin:H2r,normal_fragment_maps:V2r,normal_pars_fragment:F2r,normal_pars_vertex:B2r,normal_vertex:$2r,normalmap_pars_fragment:U2r,clearcoat_normal_fragment_begin:G2r,clearcoat_normal_fragment_maps:q2r,clearcoat_pars_fragment:z2r,iridescence_pars_fragment:j2r,opaque_fragment:W2r,packing:Y2r,premultiplied_alpha_fragment:K2r,project_vertex:Z2r,dithering_fragment:X2r,dithering_pars_fragment:J2r,roughnessmap_fragment:elr,roughnessmap_pars_fragment:tlr,shadowmap_pars_fragment:nlr,shadowmap_pars_vertex:rlr,shadowmap_vertex:ilr,shadowmask_pars_fragment:olr,skinbase_vertex:slr,skinning_pars_vertex:alr,skinning_vertex:llr,skinnormal_vertex:clr,specularmap_fragment:ulr,specularmap_pars_fragment:dlr,tonemapping_fragment:flr,tonemapping_pars_fragment:plr,transmission_fragment:hlr,transmission_pars_fragment:Tlr,uv_pars_fragment:mlr,uv_pars_vertex:glr,uv_vertex:_lr,worldpos_vertex:Qlr,background_vert:vlr,background_frag:ylr,backgroundCube_vert:blr,backgroundCube_frag:Elr,cube_vert:xlr,cube_frag:Slr,depth_vert:Llr,depth_frag:Clr,distanceRGBA_vert:Alr,distanceRGBA_frag:wlr,equirect_vert:Mlr,equirect_frag:Olr,linedashed_vert:Rlr,linedashed_frag:Nlr,meshbasic_vert:Dlr,meshbasic_frag:Ilr,meshlambert_vert:klr,meshlambert_frag:Plr,meshmatcap_vert:Hlr,meshmatcap_frag:Vlr,meshnormal_vert:Flr,meshnormal_frag:Blr,meshphong_vert:$lr,meshphong_frag:Ulr,meshphysical_vert:Glr,meshphysical_frag:qlr,meshtoon_vert:zlr,meshtoon_frag:jlr,points_vert:Wlr,points_frag:Ylr,shadow_vert:Klr,shadow_frag:Zlr,sprite_vert:Xlr,sprite_frag:Jlr},rt={common:{diffuse:{value:new Nt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Yt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Nt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Nt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Nt(16777215)},opacity:{value:1},center:{value:new Yt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Io={basic:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},specular:{value:new Nt(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:qr([rt.common,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.roughnessmap,rt.metalnessmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:qr([rt.common,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.gradientmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:qr([rt.points,rt.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:qr([rt.common,rt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:qr([rt.common,rt.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:qr([rt.sprite,rt.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:qr([rt.common,rt.displacementmap,{referencePosition:{value:new Ee},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:qr([rt.lights,rt.fog,{color:{value:new Nt(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Io.physical={uniforms:qr([Io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Yt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Nt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Yt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Nt(0)},specularColor:{value:new Nt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Yt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const O5={r:0,b:0,g:0};function ecr(t,e,n,r,i,o,s){const a=new Nt(0);let l=o===!0?0:1,c,u,d=null,h=0,f=null;function m(Q,_){let v=!1,y=_.isScene===!0?_.background:null;y&&y.isTexture&&(y=(_.backgroundBlurriness>0?n:e).get(y)),y===null?T(a,l):y&&y.isColor&&(T(y,1),v=!0);const b=t.xr.getEnvironmentBlendMode();b==="additive"?r.buffers.color.setClear(0,0,0,1,s):b==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===E9)?(u===void 0&&(u=new Yr(new Va(1,1,1),new Q2({name:"BackgroundCubeMaterial",uniforms:Tc(Io.backgroundCube.uniforms),vertexShader:Io.backgroundCube.vertexShader,fragmentShader:Io.backgroundCube.fragmentShader,side:ui,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(E,x,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,(d!==y||h!==y.version||f!==t.toneMapping)&&(u.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),u.layers.enableAll(),Q.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new Yr(new tE(2,2),new Q2({name:"BackgroundMaterial",uniforms:Tc(Io.background.uniforms),vertexShader:Io.background.vertexShader,fragmentShader:Io.background.fragmentShader,side:Us,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(d!==y||h!==y.version||f!==t.toneMapping)&&(c.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),c.layers.enableAll(),Q.unshift(c,c.geometry,c.material,0,0,null))}function T(Q,_){Q.getRGB(O5,UU(t)),r.buffers.color.setClear(O5.r,O5.g,O5.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(Q,_=1){a.set(Q),l=_,T(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(Q){l=Q,T(a,l)},render:m}}function tcr(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=Q(null);let c=l,u=!1;function d(O,B,V,U,G){let K=!1;if(s){const W=T(U,V,B);c!==W&&(c=W,f(c.object)),K=_(O,U,V,G),K&&v(O,U,V,G)}else{const W=B.wireframe===!0;(c.geometry!==U.id||c.program!==V.id||c.wireframe!==W)&&(c.geometry=U.id,c.program=V.id,c.wireframe=W,K=!0)}G!==null&&n.update(G,t.ELEMENT_ARRAY_BUFFER),(K||u)&&(u=!1,M(O,B,V,U),G!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(G).buffer))}function h(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function f(O){return r.isWebGL2?t.bindVertexArray(O):o.bindVertexArrayOES(O)}function m(O){return r.isWebGL2?t.deleteVertexArray(O):o.deleteVertexArrayOES(O)}function T(O,B,V){const U=V.wireframe===!0;let G=a[O.id];G===void 0&&(G={},a[O.id]=G);let K=G[B.id];K===void 0&&(K={},G[B.id]=K);let W=K[U];return W===void 0&&(W=Q(h()),K[U]=W),W}function Q(O){const B=[],V=[],U=[];for(let G=0;G=0){const $=G[de];let ce=K[de];if(ce===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&(ce=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&(ce=O.instanceColor)),$===void 0||$.attribute!==ce||ce&&$.data!==ce.data)return!0;W++}return c.attributesNum!==W||c.index!==U}function v(O,B,V,U){const G={},K=B.attributes;let W=0;const te=V.getAttributes();for(const de in te)if(te[de].location>=0){let $=K[de];$===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&($=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&($=O.instanceColor));const ce={};ce.attribute=$,$&&$.data&&(ce.data=$.data),G[de]=ce,W++}c.attributes=G,c.attributesNum=W,c.index=U}function y(){const O=c.newAttributes;for(let B=0,V=O.length;B=0){let X=G[te];if(X===void 0&&(te==="instanceMatrix"&&O.instanceMatrix&&(X=O.instanceMatrix),te==="instanceColor"&&O.instanceColor&&(X=O.instanceColor)),X!==void 0){const $=X.normalized,ce=X.itemSize,ye=n.get(X);if(ye===void 0)continue;const z=ye.buffer,re=ye.type,fe=ye.bytesPerElement,be=r.isWebGL2===!0&&(re===t.INT||re===t.UNSIGNED_INT||X.gpuType===SU);if(X.isInterleavedBufferAttribute){const Le=X.data,se=Le.stride,Y=X.offset;if(Le.isInstancedInterleavedBuffer){for(let j=0;j0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),T=t.getParameter(t.MAX_VERTEX_ATTRIBS),Q=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,b=s||e.has("OES_texture_float"),E=y&&b,x=s?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:m,maxAttributes:T,maxVertexUniforms:Q,maxVaryings:_,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:E,maxSamples:x}}function icr(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new k1,a=new qt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||r!==0||i;return i=h,r=d.length,f},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,h){n=u(d,h,0)},this.setState=function(d,h,f){const m=d.clippingPlanes,T=d.clipIntersection,Q=d.clipShadows,_=t.get(d);if(!i||m===null||m.length===0||o&&!Q)o?u(null):c();else{const v=o?0:r,y=v*4;let b=_.clippingState||null;l.value=b,b=u(m,h,y,f);for(let E=0;E!==y;++E)b[E]=n[E];_.clippingState=b,this.numIntersection=T?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,h,f,m){const T=d!==null?d.length:0;let Q=null;if(T!==0){if(Q=l.value,m!==!0||Q===null){const _=f+T*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(Q===null||Q.length<_)&&(Q=new Float32Array(_));for(let y=0,b=f;y!==T;++y,b+=4)s.copy(d[y]).applyMatrix4(v,a),s.normal.toArray(Q,b),Q[b+3]=s.constant}l.value=Q,l.needsUpdate=!0}return e.numPlanes=T,e.numIntersection=0,Q}}function ocr(t){let e=new WeakMap;function n(s,a){return a===BQ?s.mapping=cc:a===$Q&&(s.mapping=uc),s}function r(s){if(s&&s.isTexture){const a=s.mapping;if(a===BQ||a===$Q)if(e.has(s)){const l=e.get(s).texture;return n(l,s.mapping)}else{const l=s.image;if(l&&l.height>0){const c=new g1r(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class nE extends GU{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Cl=4,TI=[.125,.215,.35,.446,.526,.582],B1=20,i_=new nE,mI=new Nt;let o_=null,s_=0,a_=0;const P1=(1+Math.sqrt(5))/2,gl=1/P1,gI=[new Ee(1,1,1),new Ee(-1,1,1),new Ee(1,1,-1),new Ee(-1,1,-1),new Ee(0,P1,gl),new Ee(0,P1,-gl),new Ee(gl,0,P1),new Ee(-gl,0,P1),new Ee(P1,gl,0),new Ee(-P1,gl,0)];class _I{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){o_=this._renderer.getRenderTarget(),s_=this._renderer.getActiveCubeFace(),a_=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yI(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vI(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),u.setRenderTarget(i),T&&u.render(m,a),u.render(e,a)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=h,u.autoClear=d,e.background=Q}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===cc||e.mapping===uc;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=yI()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vI());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Yr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;R5(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,i_)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;iB1&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${B1}`);const _=[];let v=0;for(let L=0;Ly-Cl?i-y+Cl:0),x=4*(this._cubeSize-b);R5(n,E,x,3*b,2*b),l.setRenderTarget(n),l.render(d,i_)}}function scr(t){const e=[],n=[],r=[];let i=t;const o=t-Cl+1+TI.length;for(let s=0;st-Cl?l=TI[s-t+Cl-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,h=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,m=6,T=3,Q=2,_=1,v=new Float32Array(T*m*f),y=new Float32Array(Q*m*f),b=new Float32Array(_*m*f);for(let x=0;x2?0:-1,C=[L,M,0,L+2/3,M,0,L+2/3,M+1,0,L,M,0,L+2/3,M+1,0,L,M+1,0];v.set(C,T*m*x),y.set(h,Q*m*x);const A=[x,x,x,x,x,x];b.set(A,_*m*x)}const E=new rs;E.setAttribute("position",new Kr(v,T)),E.setAttribute("uv",new Kr(y,Q)),E.setAttribute("faceIndex",new Kr(b,_)),e.push(E),i>Cl&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function QI(t,e,n){const r=new _2(t,e,n);return r.texture.mapping=E9,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function R5(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function acr(t,e,n){const r=new Float32Array(B1),i=new Ee(0,1,0);return new Q2({name:"SphericalGaussianBlur",defines:{n:B1,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:rE(),fragmentShader:` +}`,Ut={alphahash_fragment:b1r,alphahash_pars_fragment:E1r,alphamap_fragment:x1r,alphamap_pars_fragment:S1r,alphatest_fragment:L1r,alphatest_pars_fragment:C1r,aomap_fragment:A1r,aomap_pars_fragment:w1r,batching_pars_vertex:M1r,batching_vertex:O1r,begin_vertex:R1r,beginnormal_vertex:N1r,bsdfs:D1r,iridescence_fragment:I1r,bumpmap_pars_fragment:k1r,clipping_planes_fragment:P1r,clipping_planes_pars_fragment:H1r,clipping_planes_pars_vertex:V1r,clipping_planes_vertex:F1r,color_fragment:B1r,color_pars_fragment:$1r,color_pars_vertex:U1r,color_vertex:G1r,common:q1r,cube_uv_reflection_fragment:z1r,defaultnormal_vertex:j1r,displacementmap_pars_vertex:W1r,displacementmap_vertex:Y1r,emissivemap_fragment:K1r,emissivemap_pars_fragment:Z1r,colorspace_fragment:X1r,colorspace_pars_fragment:J1r,envmap_fragment:e2r,envmap_common_pars_fragment:t2r,envmap_pars_fragment:n2r,envmap_pars_vertex:r2r,envmap_physical_pars_fragment:T2r,envmap_vertex:i2r,fog_vertex:o2r,fog_pars_vertex:s2r,fog_fragment:a2r,fog_pars_fragment:l2r,gradientmap_pars_fragment:c2r,lightmap_fragment:u2r,lightmap_pars_fragment:d2r,lights_lambert_fragment:f2r,lights_lambert_pars_fragment:p2r,lights_pars_begin:h2r,lights_toon_fragment:m2r,lights_toon_pars_fragment:g2r,lights_phong_fragment:_2r,lights_phong_pars_fragment:Q2r,lights_physical_fragment:v2r,lights_physical_pars_fragment:y2r,lights_fragment_begin:b2r,lights_fragment_maps:E2r,lights_fragment_end:x2r,logdepthbuf_fragment:S2r,logdepthbuf_pars_fragment:L2r,logdepthbuf_pars_vertex:C2r,logdepthbuf_vertex:A2r,map_fragment:w2r,map_pars_fragment:M2r,map_particle_fragment:O2r,map_particle_pars_fragment:R2r,metalnessmap_fragment:N2r,metalnessmap_pars_fragment:D2r,morphcolor_vertex:I2r,morphnormal_vertex:k2r,morphtarget_pars_vertex:P2r,morphtarget_vertex:H2r,normal_fragment_begin:V2r,normal_fragment_maps:F2r,normal_pars_fragment:B2r,normal_pars_vertex:$2r,normal_vertex:U2r,normalmap_pars_fragment:G2r,clearcoat_normal_fragment_begin:q2r,clearcoat_normal_fragment_maps:z2r,clearcoat_pars_fragment:j2r,iridescence_pars_fragment:W2r,opaque_fragment:Y2r,packing:K2r,premultiplied_alpha_fragment:Z2r,project_vertex:X2r,dithering_fragment:J2r,dithering_pars_fragment:elr,roughnessmap_fragment:tlr,roughnessmap_pars_fragment:nlr,shadowmap_pars_fragment:rlr,shadowmap_pars_vertex:ilr,shadowmap_vertex:olr,shadowmask_pars_fragment:slr,skinbase_vertex:alr,skinning_pars_vertex:llr,skinning_vertex:clr,skinnormal_vertex:ulr,specularmap_fragment:dlr,specularmap_pars_fragment:flr,tonemapping_fragment:plr,tonemapping_pars_fragment:hlr,transmission_fragment:Tlr,transmission_pars_fragment:mlr,uv_pars_fragment:glr,uv_pars_vertex:_lr,uv_vertex:Qlr,worldpos_vertex:vlr,background_vert:ylr,background_frag:blr,backgroundCube_vert:Elr,backgroundCube_frag:xlr,cube_vert:Slr,cube_frag:Llr,depth_vert:Clr,depth_frag:Alr,distanceRGBA_vert:wlr,distanceRGBA_frag:Mlr,equirect_vert:Olr,equirect_frag:Rlr,linedashed_vert:Nlr,linedashed_frag:Dlr,meshbasic_vert:Ilr,meshbasic_frag:klr,meshlambert_vert:Plr,meshlambert_frag:Hlr,meshmatcap_vert:Vlr,meshmatcap_frag:Flr,meshnormal_vert:Blr,meshnormal_frag:$lr,meshphong_vert:Ulr,meshphong_frag:Glr,meshphysical_vert:qlr,meshphysical_frag:zlr,meshtoon_vert:jlr,meshtoon_frag:Wlr,points_vert:Ylr,points_frag:Klr,shadow_vert:Zlr,shadow_frag:Xlr,sprite_vert:Jlr,sprite_frag:ecr},rt={common:{diffuse:{value:new Nt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Yt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Nt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Nt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Nt(16777215)},opacity:{value:1},center:{value:new Yt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Io={basic:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},specular:{value:new Nt(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:qr([rt.common,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.roughnessmap,rt.metalnessmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:qr([rt.common,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.gradientmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:qr([rt.points,rt.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:qr([rt.common,rt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:qr([rt.common,rt.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:qr([rt.sprite,rt.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:qr([rt.common,rt.displacementmap,{referencePosition:{value:new Ee},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:qr([rt.lights,rt.fog,{color:{value:new Nt(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Io.physical={uniforms:qr([Io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Yt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Nt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Yt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Nt(0)},specularColor:{value:new Nt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Yt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const O5={r:0,b:0,g:0};function tcr(t,e,n,r,i,o,s){const a=new Nt(0);let l=o===!0?0:1,c,u,d=null,h=0,f=null;function m(Q,_){let v=!1,y=_.isScene===!0?_.background:null;y&&y.isTexture&&(y=(_.backgroundBlurriness>0?n:e).get(y)),y===null?T(a,l):y&&y.isColor&&(T(y,1),v=!0);const b=t.xr.getEnvironmentBlendMode();b==="additive"?r.buffers.color.setClear(0,0,0,1,s):b==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===E9)?(u===void 0&&(u=new Yr(new Va(1,1,1),new Q2({name:"BackgroundCubeMaterial",uniforms:Tc(Io.backgroundCube.uniforms),vertexShader:Io.backgroundCube.vertexShader,fragmentShader:Io.backgroundCube.fragmentShader,side:ui,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(E,x,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,(d!==y||h!==y.version||f!==t.toneMapping)&&(u.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),u.layers.enableAll(),Q.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new Yr(new tE(2,2),new Q2({name:"BackgroundMaterial",uniforms:Tc(Io.background.uniforms),vertexShader:Io.background.vertexShader,fragmentShader:Io.background.fragmentShader,side:Us,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(d!==y||h!==y.version||f!==t.toneMapping)&&(c.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),c.layers.enableAll(),Q.unshift(c,c.geometry,c.material,0,0,null))}function T(Q,_){Q.getRGB(O5,UU(t)),r.buffers.color.setClear(O5.r,O5.g,O5.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(Q,_=1){a.set(Q),l=_,T(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(Q){l=Q,T(a,l)},render:m}}function ncr(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=Q(null);let c=l,u=!1;function d(O,B,V,U,G){let K=!1;if(s){const W=T(U,V,B);c!==W&&(c=W,f(c.object)),K=_(O,U,V,G),K&&v(O,U,V,G)}else{const W=B.wireframe===!0;(c.geometry!==U.id||c.program!==V.id||c.wireframe!==W)&&(c.geometry=U.id,c.program=V.id,c.wireframe=W,K=!0)}G!==null&&n.update(G,t.ELEMENT_ARRAY_BUFFER),(K||u)&&(u=!1,M(O,B,V,U),G!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(G).buffer))}function h(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function f(O){return r.isWebGL2?t.bindVertexArray(O):o.bindVertexArrayOES(O)}function m(O){return r.isWebGL2?t.deleteVertexArray(O):o.deleteVertexArrayOES(O)}function T(O,B,V){const U=V.wireframe===!0;let G=a[O.id];G===void 0&&(G={},a[O.id]=G);let K=G[B.id];K===void 0&&(K={},G[B.id]=K);let W=K[U];return W===void 0&&(W=Q(h()),K[U]=W),W}function Q(O){const B=[],V=[],U=[];for(let G=0;G=0){const $=G[de];let ce=K[de];if(ce===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&(ce=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&(ce=O.instanceColor)),$===void 0||$.attribute!==ce||ce&&$.data!==ce.data)return!0;W++}return c.attributesNum!==W||c.index!==U}function v(O,B,V,U){const G={},K=B.attributes;let W=0;const te=V.getAttributes();for(const de in te)if(te[de].location>=0){let $=K[de];$===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&($=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&($=O.instanceColor));const ce={};ce.attribute=$,$&&$.data&&(ce.data=$.data),G[de]=ce,W++}c.attributes=G,c.attributesNum=W,c.index=U}function y(){const O=c.newAttributes;for(let B=0,V=O.length;B=0){let X=G[te];if(X===void 0&&(te==="instanceMatrix"&&O.instanceMatrix&&(X=O.instanceMatrix),te==="instanceColor"&&O.instanceColor&&(X=O.instanceColor)),X!==void 0){const $=X.normalized,ce=X.itemSize,ye=n.get(X);if(ye===void 0)continue;const z=ye.buffer,re=ye.type,fe=ye.bytesPerElement,be=r.isWebGL2===!0&&(re===t.INT||re===t.UNSIGNED_INT||X.gpuType===SU);if(X.isInterleavedBufferAttribute){const Le=X.data,se=Le.stride,Y=X.offset;if(Le.isInstancedInterleavedBuffer){for(let j=0;j0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),T=t.getParameter(t.MAX_VERTEX_ATTRIBS),Q=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,b=s||e.has("OES_texture_float"),E=y&&b,x=s?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:m,maxAttributes:T,maxVertexUniforms:Q,maxVaryings:_,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:E,maxSamples:x}}function ocr(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new k1,a=new qt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||r!==0||i;return i=h,r=d.length,f},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,h){n=u(d,h,0)},this.setState=function(d,h,f){const m=d.clippingPlanes,T=d.clipIntersection,Q=d.clipShadows,_=t.get(d);if(!i||m===null||m.length===0||o&&!Q)o?u(null):c();else{const v=o?0:r,y=v*4;let b=_.clippingState||null;l.value=b,b=u(m,h,y,f);for(let E=0;E!==y;++E)b[E]=n[E];_.clippingState=b,this.numIntersection=T?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,h,f,m){const T=d!==null?d.length:0;let Q=null;if(T!==0){if(Q=l.value,m!==!0||Q===null){const _=f+T*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(Q===null||Q.length<_)&&(Q=new Float32Array(_));for(let y=0,b=f;y!==T;++y,b+=4)s.copy(d[y]).applyMatrix4(v,a),s.normal.toArray(Q,b),Q[b+3]=s.constant}l.value=Q,l.needsUpdate=!0}return e.numPlanes=T,e.numIntersection=0,Q}}function scr(t){let e=new WeakMap;function n(s,a){return a===BQ?s.mapping=cc:a===$Q&&(s.mapping=uc),s}function r(s){if(s&&s.isTexture){const a=s.mapping;if(a===BQ||a===$Q)if(e.has(s)){const l=e.get(s).texture;return n(l,s.mapping)}else{const l=s.image;if(l&&l.height>0){const c=new _1r(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class nE extends GU{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Cl=4,TI=[.125,.215,.35,.446,.526,.582],B1=20,i_=new nE,mI=new Nt;let o_=null,s_=0,a_=0;const P1=(1+Math.sqrt(5))/2,gl=1/P1,gI=[new Ee(1,1,1),new Ee(-1,1,1),new Ee(1,1,-1),new Ee(-1,1,-1),new Ee(0,P1,gl),new Ee(0,P1,-gl),new Ee(gl,0,P1),new Ee(-gl,0,P1),new Ee(P1,gl,0),new Ee(-P1,gl,0)];class _I{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){o_=this._renderer.getRenderTarget(),s_=this._renderer.getActiveCubeFace(),a_=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yI(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vI(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),u.setRenderTarget(i),T&&u.render(m,a),u.render(e,a)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=h,u.autoClear=d,e.background=Q}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===cc||e.mapping===uc;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=yI()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vI());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Yr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;R5(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,i_)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;iB1&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${B1}`);const _=[];let v=0;for(let L=0;Ly-Cl?i-y+Cl:0),x=4*(this._cubeSize-b);R5(n,E,x,3*b,2*b),l.setRenderTarget(n),l.render(d,i_)}}function acr(t){const e=[],n=[],r=[];let i=t;const o=t-Cl+1+TI.length;for(let s=0;st-Cl?l=TI[s-t+Cl-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,h=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,m=6,T=3,Q=2,_=1,v=new Float32Array(T*m*f),y=new Float32Array(Q*m*f),b=new Float32Array(_*m*f);for(let x=0;x2?0:-1,C=[L,M,0,L+2/3,M,0,L+2/3,M+1,0,L,M,0,L+2/3,M+1,0,L,M+1,0];v.set(C,T*m*x),y.set(h,Q*m*x);const A=[x,x,x,x,x,x];b.set(A,_*m*x)}const E=new rs;E.setAttribute("position",new Kr(v,T)),E.setAttribute("uv",new Kr(y,Q)),E.setAttribute("faceIndex",new Kr(b,_)),e.push(E),i>Cl&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function QI(t,e,n){const r=new _2(t,e,n);return r.texture.mapping=E9,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function R5(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function lcr(t,e,n){const r=new Float32Array(B1),i=new Ee(0,1,0);return new Q2({name:"SphericalGaussianBlur",defines:{n:B1,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:rE(),fragmentShader:` precision mediump float; precision mediump int; @@ -3996,26 +3996,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function lcr(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===BQ||l===$Q,u=l===cc||l===uc;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return n===null&&(n=new _I(t)),d=c?n.fromEquirectangular(a,d):n.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(c&&d&&d.height>0||u&&d&&i(d)){n===null&&(n=new _I(t));const h=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,h),a.addEventListener("dispose",o),h.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(I=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*I*4*T),H=new HU(N,A,I,T);H.type=Ms,H.needsUpdate=!0;const O=C*4;for(let V=0;V0)return t;const i=e*n;let o=bI[i];if(o===void 0&&(o=new Float32Array(i),bI[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||u&&d&&i(d)){n===null&&(n=new _I(t));const h=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,h),a.addEventListener("dispose",o),h.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(I=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*I*4*T),H=new HU(N,A,I,T);H.type=Ms,H.needsUpdate=!0;const O=C*4;for(let V=0;V0)return t;const i=e*n;let o=bI[i];if(o===void 0&&(o=new Float32Array(i),bI[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[s]}`)}return r.join(` -`)}function u3r(t){const e=Tn.getPrimaries(Tn.workingColorSpace),n=Tn.getPrimaries(t);let r;switch(e===n?r="":e===Td&&n===hd?r="LinearDisplayP3ToLinearSRGB":e===hd&&n===Td&&(r="LinearSRGBToLinearDisplayP3"),t){case Sr:case x9:return[r,"LinearTransferOETF"];case jn:case Xb:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function wI(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` +`)}function d3r(t){const e=Tn.getPrimaries(Tn.workingColorSpace),n=Tn.getPrimaries(t);let r;switch(e===n?r="":e===Td&&n===hd?r="LinearDisplayP3ToLinearSRGB":e===hd&&n===Td&&(r="LinearSRGBToLinearDisplayP3"),t){case Sr:case x9:return[r,"LinearTransferOETF"];case jn:case Xb:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function wI(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` `+i+` -`+c3r(t.getShaderSource(e),s)}else return i}function d3r(t,e){const n=u3r(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function f3r(t,e){let n;switch(e){case aar:n="Linear";break;case lar:n="Reinhard";break;case car:n="OptimizedCineon";break;case uar:n="ACESFilmic";break;case dar:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function p3r(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(m4).join(` -`)}function h3r(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function T3r(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function WQ(t){return t.replace(m3r,_3r)}const g3r=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function _3r(t,e){let n=Ut[e];if(n===void 0){const r=g3r.get(e);if(r!==void 0)n=Ut[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return WQ(n)}const Q3r=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function RI(t){return t.replace(Q3r,v3r)}function v3r(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function WQ(t){return t.replace(g3r,Q3r)}const _3r=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Q3r(t,e){let n=Ut[e];if(n===void 0){const r=_3r.get(e);if(r!==void 0)n=Ut[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return WQ(n)}const v3r=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function RI(t){return t.replace(v3r,y3r)}function y3r(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(Q+=` `),_=[f,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m].filter(m4).join(` `),_.length>0&&(_+=` `)):(Q=[NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(m4).join(` -`),_=[f,NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Pa?"#define TONE_MAPPING":"",n.toneMapping!==Pa?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Pa?f3r("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,d3r("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),_=[f,NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Pa?"#define TONE_MAPPING":"",n.toneMapping!==Pa?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Pa?p3r("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,f3r("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(m4).join(` `)),s=WQ(s),s=MI(s,n),s=OI(s,n),a=WQ(a),a=MI(a,n),a=OI(a,n),s=RI(s),a=RI(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(v=`#version 300 es `,Q=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -4026,9 +4026,9 @@ precision `+t.precision+" int;";return t.precision==="highp"?e+=` Program Info Log: `+N+` `+U+` -`+G)}else N!==""?console.warn("THREE.WebGLProgram: Program Info Log:",N):(H===""||O==="")&&(V=!1);V&&(I.diagnostics={runnable:B,programLog:N,vertexShader:{log:H,prefix:Q},fragmentShader:{log:O,prefix:_}})}i.deleteShader(E),i.deleteShader(x),M=new nu(i,T),C=T3r(i,T)}let M;this.getUniforms=function(){return M===void 0&&L(this),M};let C;this.getAttributes=function(){return C===void 0&&L(this),C};let A=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=i.getProgramParameter(T,a3r)),A},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(T),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=l3r++,this.cacheKey=e,this.usedTimes=1,this.program=T,this.vertexShader=E,this.fragmentShader=x,this}let C3r=0;class A3r{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new w3r(e),n.set(e,r)),r}}class w3r{constructor(e){this.id=C3r++,this.code=e,this.usedTimes=0}}function M3r(t,e,n,r,i,o,s){const a=new VU,l=new A3r,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function T(C){return C===0?"uv":`uv${C}`}function Q(C,A,I,N,H){const O=N.fog,B=H.geometry,V=C.isMeshStandardMaterial?N.environment:null,U=(C.isMeshStandardMaterial?n:e).get(C.envMap||V),G=U&&U.mapping===E9?U.image.height:null,K=m[C.type];C.precision!==null&&(f=i.getMaxPrecision(C.precision),f!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",f,"instead."));const W=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,te=W!==void 0?W.length:0;let de=0;B.morphAttributes.position!==void 0&&(de=1),B.morphAttributes.normal!==void 0&&(de=2),B.morphAttributes.color!==void 0&&(de=3);let X,$,ce,ye;if(K){const zn=Io[K];X=zn.vertexShader,$=zn.fragmentShader}else X=C.vertexShader,$=C.fragmentShader,l.update(C),ce=l.getVertexShaderID(C),ye=l.getFragmentShaderID(C);const z=t.getRenderTarget(),re=H.isInstancedMesh===!0,fe=H.isBatchedMesh===!0,be=!!C.map,Le=!!C.matcap,se=!!U,Y=!!C.aoMap,j=!!C.lightMap,ie=!!C.bumpMap,Te=!!C.normalMap,Qe=!!C.displacementMap,ae=!!C.emissiveMap,Oe=!!C.metalnessMap,Se=!!C.roughnessMap,Me=C.anisotropy>0,ke=C.clearcoat>0,Z=C.iridescence>0,q=C.sheen>0,pe=C.transmission>0,ue=Me&&!!C.anisotropyMap,_e=ke&&!!C.clearcoatMap,Ae=ke&&!!C.clearcoatNormalMap,Ie=ke&&!!C.clearcoatRoughnessMap,He=Z&&!!C.iridescenceMap,$e=Z&&!!C.iridescenceThicknessMap,lt=q&&!!C.sheenColorMap,st=q&&!!C.sheenRoughnessMap,Fe=!!C.specularMap,It=!!C.specularColorMap,Tt=!!C.specularIntensityMap,mt=pe&&!!C.transmissionMap,ut=pe&&!!C.thicknessMap,ot=!!C.gradientMap,ct=!!C.alphaMap,me=C.alphaTest>0,Ye=!!C.alphaHash,Ue=!!C.extensions,Pe=!!B.attributes.uv1,Xe=!!B.attributes.uv2,vt=!!B.attributes.uv3;let Ot=Pa;return C.toneMapped&&(z===null||z.isXRRenderTarget===!0)&&(Ot=t.toneMapping),{isWebGL2:u,shaderID:K,shaderType:C.type,shaderName:C.name,vertexShader:X,fragmentShader:$,defines:C.defines,customVertexShaderID:ce,customFragmentShaderID:ye,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:f,batching:fe,instancing:re,instancingColor:re&&H.instanceColor!==null,supportsVertexTextures:h,outputColorSpace:z===null?t.outputColorSpace:z.isXRRenderTarget===!0?z.texture.colorSpace:Sr,map:be,matcap:Le,envMap:se,envMapMode:se&&U.mapping,envMapCubeUVHeight:G,aoMap:Y,lightMap:j,bumpMap:ie,normalMap:Te,displacementMap:h&&Qe,emissiveMap:ae,normalMapObjectSpace:Te&&C.normalMapType===Lar,normalMapTangentSpace:Te&&C.normalMapType===Zb,metalnessMap:Oe,roughnessMap:Se,anisotropy:Me,anisotropyMap:ue,clearcoat:ke,clearcoatMap:_e,clearcoatNormalMap:Ae,clearcoatRoughnessMap:Ie,iridescence:Z,iridescenceMap:He,iridescenceThicknessMap:$e,sheen:q,sheenColorMap:lt,sheenRoughnessMap:st,specularMap:Fe,specularColorMap:It,specularIntensityMap:Tt,transmission:pe,transmissionMap:mt,thicknessMap:ut,gradientMap:ot,opaque:C.transparent===!1&&C.blending===Hl,alphaMap:ct,alphaTest:me,alphaHash:Ye,combine:C.combine,mapUv:be&&T(C.map.channel),aoMapUv:Y&&T(C.aoMap.channel),lightMapUv:j&&T(C.lightMap.channel),bumpMapUv:ie&&T(C.bumpMap.channel),normalMapUv:Te&&T(C.normalMap.channel),displacementMapUv:Qe&&T(C.displacementMap.channel),emissiveMapUv:ae&&T(C.emissiveMap.channel),metalnessMapUv:Oe&&T(C.metalnessMap.channel),roughnessMapUv:Se&&T(C.roughnessMap.channel),anisotropyMapUv:ue&&T(C.anisotropyMap.channel),clearcoatMapUv:_e&&T(C.clearcoatMap.channel),clearcoatNormalMapUv:Ae&&T(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&T(C.clearcoatRoughnessMap.channel),iridescenceMapUv:He&&T(C.iridescenceMap.channel),iridescenceThicknessMapUv:$e&&T(C.iridescenceThicknessMap.channel),sheenColorMapUv:lt&&T(C.sheenColorMap.channel),sheenRoughnessMapUv:st&&T(C.sheenRoughnessMap.channel),specularMapUv:Fe&&T(C.specularMap.channel),specularColorMapUv:It&&T(C.specularColorMap.channel),specularIntensityMapUv:Tt&&T(C.specularIntensityMap.channel),transmissionMapUv:mt&&T(C.transmissionMap.channel),thicknessMapUv:ut&&T(C.thicknessMap.channel),alphaMapUv:ct&&T(C.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Te||Me),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,vertexUv1s:Pe,vertexUv2s:Xe,vertexUv3s:vt,pointsUvs:H.isPoints===!0&&!!B.attributes.uv&&(be||ct),fog:!!O,useFog:C.fog===!0,fogExp2:O&&O.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:H.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:de,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:C.dithering,shadowMapEnabled:t.shadowMap.enabled&&I.length>0,shadowMapType:t.shadowMap.type,toneMapping:Ot,useLegacyLights:t._useLegacyLights,decodeVideoTexture:be&&C.map.isVideoTexture===!0&&Tn.getTransfer(C.map.colorSpace)===kn,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ko,flipSided:C.side===ui,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ue&&C.extensions.derivatives===!0,extensionFragDepth:Ue&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function _(C){const A=[];if(C.shaderID?A.push(C.shaderID):(A.push(C.customVertexShaderID),A.push(C.customFragmentShaderID)),C.defines!==void 0)for(const I in C.defines)A.push(I),A.push(C.defines[I]);return C.isRawShaderMaterial===!1&&(v(A,C),y(A,C),A.push(t.outputColorSpace)),A.push(C.customProgramCacheKey),A.join()}function v(C,A){C.push(A.precision),C.push(A.outputColorSpace),C.push(A.envMapMode),C.push(A.envMapCubeUVHeight),C.push(A.mapUv),C.push(A.alphaMapUv),C.push(A.lightMapUv),C.push(A.aoMapUv),C.push(A.bumpMapUv),C.push(A.normalMapUv),C.push(A.displacementMapUv),C.push(A.emissiveMapUv),C.push(A.metalnessMapUv),C.push(A.roughnessMapUv),C.push(A.anisotropyMapUv),C.push(A.clearcoatMapUv),C.push(A.clearcoatNormalMapUv),C.push(A.clearcoatRoughnessMapUv),C.push(A.iridescenceMapUv),C.push(A.iridescenceThicknessMapUv),C.push(A.sheenColorMapUv),C.push(A.sheenRoughnessMapUv),C.push(A.specularMapUv),C.push(A.specularColorMapUv),C.push(A.specularIntensityMapUv),C.push(A.transmissionMapUv),C.push(A.thicknessMapUv),C.push(A.combine),C.push(A.fogExp2),C.push(A.sizeAttenuation),C.push(A.morphTargetsCount),C.push(A.morphAttributeCount),C.push(A.numDirLights),C.push(A.numPointLights),C.push(A.numSpotLights),C.push(A.numSpotLightMaps),C.push(A.numHemiLights),C.push(A.numRectAreaLights),C.push(A.numDirLightShadows),C.push(A.numPointLightShadows),C.push(A.numSpotLightShadows),C.push(A.numSpotLightShadowsWithMaps),C.push(A.numLightProbes),C.push(A.shadowMapType),C.push(A.toneMapping),C.push(A.numClippingPlanes),C.push(A.numClipIntersection),C.push(A.depthPacking)}function y(C,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),C.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function b(C){const A=m[C.type];let I;if(A){const N=Io[A];I=p1r.clone(N.uniforms)}else I=C.uniforms;return I}function E(C,A){let I;for(let N=0,H=c.length;N0?r.push(_):f.transparent===!0?i.push(_):n.push(_)}function l(d,h,f,m,T,Q){const _=s(d,h,f,m,T,Q);f.transmission>0?r.unshift(_):f.transparent===!0?i.unshift(_):n.unshift(_)}function c(d,h){n.length>1&&n.sort(d||R3r),r.length>1&&r.sort(h||DI),i.length>1&&i.sort(h||DI)}function u(){for(let d=e,h=t.length;d=o.length?(s=new II,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function D3r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Ee,color:new Nt};break;case"SpotLight":n={position:new Ee,direction:new Ee,color:new Nt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Ee,color:new Nt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Ee,skyColor:new Nt,groundColor:new Nt};break;case"RectAreaLight":n={color:new Nt,position:new Ee,halfWidth:new Ee,halfHeight:new Ee};break}return t[e.id]=n,n}}}function I3r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let k3r=0;function P3r(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function H3r(t,e){const n=new D3r,r=I3r(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new Ee);const o=new Ee,s=new zt,a=new zt;function l(u,d){let h=0,f=0,m=0;for(let N=0;N<9;N++)i.probe[N].set(0,0,0);let T=0,Q=0,_=0,v=0,y=0,b=0,E=0,x=0,L=0,M=0,C=0;u.sort(P3r);const A=d===!0?Math.PI:1;for(let N=0,H=u.length;N0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_FLOAT_1,i.rectAreaLTC2=rt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_HALF_1,i.rectAreaLTC2=rt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=h,i.ambient[1]=f,i.ambient[2]=m;const I=i.hash;(I.directionalLength!==T||I.pointLength!==Q||I.spotLength!==_||I.rectAreaLength!==v||I.hemiLength!==y||I.numDirectionalShadows!==b||I.numPointShadows!==E||I.numSpotShadows!==x||I.numSpotMaps!==L||I.numLightProbes!==C)&&(i.directional.length=T,i.spot.length=_,i.rectArea.length=v,i.point.length=Q,i.hemi.length=y,i.directionalShadow.length=b,i.directionalShadowMap.length=b,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=b,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=x+L-M,i.spotLightMap.length=L,i.numSpotLightShadowsWithMaps=M,i.numLightProbes=C,I.directionalLength=T,I.pointLength=Q,I.spotLength=_,I.rectAreaLength=v,I.hemiLength=y,I.numDirectionalShadows=b,I.numPointShadows=E,I.numSpotShadows=x,I.numSpotMaps=L,I.numLightProbes=C,i.version=k3r++)}function c(u,d){let h=0,f=0,m=0,T=0,Q=0;const _=d.matrixWorldInverse;for(let v=0,y=u.length;v=a.length?(l=new kI(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class F3r extends fo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=xar,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class B3r extends fo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const $3r=`void main() { +`+G)}else N!==""?console.warn("THREE.WebGLProgram: Program Info Log:",N):(H===""||O==="")&&(V=!1);V&&(I.diagnostics={runnable:B,programLog:N,vertexShader:{log:H,prefix:Q},fragmentShader:{log:O,prefix:_}})}i.deleteShader(E),i.deleteShader(x),M=new nu(i,T),C=m3r(i,T)}let M;this.getUniforms=function(){return M===void 0&&L(this),M};let C;this.getAttributes=function(){return C===void 0&&L(this),C};let A=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=i.getProgramParameter(T,l3r)),A},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(T),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=c3r++,this.cacheKey=e,this.usedTimes=1,this.program=T,this.vertexShader=E,this.fragmentShader=x,this}let A3r=0;class w3r{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new M3r(e),n.set(e,r)),r}}class M3r{constructor(e){this.id=A3r++,this.code=e,this.usedTimes=0}}function O3r(t,e,n,r,i,o,s){const a=new VU,l=new w3r,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function T(C){return C===0?"uv":`uv${C}`}function Q(C,A,I,N,H){const O=N.fog,B=H.geometry,V=C.isMeshStandardMaterial?N.environment:null,U=(C.isMeshStandardMaterial?n:e).get(C.envMap||V),G=U&&U.mapping===E9?U.image.height:null,K=m[C.type];C.precision!==null&&(f=i.getMaxPrecision(C.precision),f!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",f,"instead."));const W=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,te=W!==void 0?W.length:0;let de=0;B.morphAttributes.position!==void 0&&(de=1),B.morphAttributes.normal!==void 0&&(de=2),B.morphAttributes.color!==void 0&&(de=3);let X,$,ce,ye;if(K){const zn=Io[K];X=zn.vertexShader,$=zn.fragmentShader}else X=C.vertexShader,$=C.fragmentShader,l.update(C),ce=l.getVertexShaderID(C),ye=l.getFragmentShaderID(C);const z=t.getRenderTarget(),re=H.isInstancedMesh===!0,fe=H.isBatchedMesh===!0,be=!!C.map,Le=!!C.matcap,se=!!U,Y=!!C.aoMap,j=!!C.lightMap,ie=!!C.bumpMap,Te=!!C.normalMap,Qe=!!C.displacementMap,ae=!!C.emissiveMap,Oe=!!C.metalnessMap,Se=!!C.roughnessMap,Me=C.anisotropy>0,ke=C.clearcoat>0,Z=C.iridescence>0,q=C.sheen>0,pe=C.transmission>0,ue=Me&&!!C.anisotropyMap,_e=ke&&!!C.clearcoatMap,Ae=ke&&!!C.clearcoatNormalMap,Ie=ke&&!!C.clearcoatRoughnessMap,He=Z&&!!C.iridescenceMap,$e=Z&&!!C.iridescenceThicknessMap,lt=q&&!!C.sheenColorMap,st=q&&!!C.sheenRoughnessMap,Fe=!!C.specularMap,It=!!C.specularColorMap,Tt=!!C.specularIntensityMap,mt=pe&&!!C.transmissionMap,ut=pe&&!!C.thicknessMap,ot=!!C.gradientMap,ct=!!C.alphaMap,me=C.alphaTest>0,Ye=!!C.alphaHash,Ue=!!C.extensions,Pe=!!B.attributes.uv1,Xe=!!B.attributes.uv2,vt=!!B.attributes.uv3;let Ot=Pa;return C.toneMapped&&(z===null||z.isXRRenderTarget===!0)&&(Ot=t.toneMapping),{isWebGL2:u,shaderID:K,shaderType:C.type,shaderName:C.name,vertexShader:X,fragmentShader:$,defines:C.defines,customVertexShaderID:ce,customFragmentShaderID:ye,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:f,batching:fe,instancing:re,instancingColor:re&&H.instanceColor!==null,supportsVertexTextures:h,outputColorSpace:z===null?t.outputColorSpace:z.isXRRenderTarget===!0?z.texture.colorSpace:Sr,map:be,matcap:Le,envMap:se,envMapMode:se&&U.mapping,envMapCubeUVHeight:G,aoMap:Y,lightMap:j,bumpMap:ie,normalMap:Te,displacementMap:h&&Qe,emissiveMap:ae,normalMapObjectSpace:Te&&C.normalMapType===Car,normalMapTangentSpace:Te&&C.normalMapType===Zb,metalnessMap:Oe,roughnessMap:Se,anisotropy:Me,anisotropyMap:ue,clearcoat:ke,clearcoatMap:_e,clearcoatNormalMap:Ae,clearcoatRoughnessMap:Ie,iridescence:Z,iridescenceMap:He,iridescenceThicknessMap:$e,sheen:q,sheenColorMap:lt,sheenRoughnessMap:st,specularMap:Fe,specularColorMap:It,specularIntensityMap:Tt,transmission:pe,transmissionMap:mt,thicknessMap:ut,gradientMap:ot,opaque:C.transparent===!1&&C.blending===Hl,alphaMap:ct,alphaTest:me,alphaHash:Ye,combine:C.combine,mapUv:be&&T(C.map.channel),aoMapUv:Y&&T(C.aoMap.channel),lightMapUv:j&&T(C.lightMap.channel),bumpMapUv:ie&&T(C.bumpMap.channel),normalMapUv:Te&&T(C.normalMap.channel),displacementMapUv:Qe&&T(C.displacementMap.channel),emissiveMapUv:ae&&T(C.emissiveMap.channel),metalnessMapUv:Oe&&T(C.metalnessMap.channel),roughnessMapUv:Se&&T(C.roughnessMap.channel),anisotropyMapUv:ue&&T(C.anisotropyMap.channel),clearcoatMapUv:_e&&T(C.clearcoatMap.channel),clearcoatNormalMapUv:Ae&&T(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&T(C.clearcoatRoughnessMap.channel),iridescenceMapUv:He&&T(C.iridescenceMap.channel),iridescenceThicknessMapUv:$e&&T(C.iridescenceThicknessMap.channel),sheenColorMapUv:lt&&T(C.sheenColorMap.channel),sheenRoughnessMapUv:st&&T(C.sheenRoughnessMap.channel),specularMapUv:Fe&&T(C.specularMap.channel),specularColorMapUv:It&&T(C.specularColorMap.channel),specularIntensityMapUv:Tt&&T(C.specularIntensityMap.channel),transmissionMapUv:mt&&T(C.transmissionMap.channel),thicknessMapUv:ut&&T(C.thicknessMap.channel),alphaMapUv:ct&&T(C.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(Te||Me),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,vertexUv1s:Pe,vertexUv2s:Xe,vertexUv3s:vt,pointsUvs:H.isPoints===!0&&!!B.attributes.uv&&(be||ct),fog:!!O,useFog:C.fog===!0,fogExp2:O&&O.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:H.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:de,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:C.dithering,shadowMapEnabled:t.shadowMap.enabled&&I.length>0,shadowMapType:t.shadowMap.type,toneMapping:Ot,useLegacyLights:t._useLegacyLights,decodeVideoTexture:be&&C.map.isVideoTexture===!0&&Tn.getTransfer(C.map.colorSpace)===kn,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ko,flipSided:C.side===ui,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ue&&C.extensions.derivatives===!0,extensionFragDepth:Ue&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ue&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ue&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function _(C){const A=[];if(C.shaderID?A.push(C.shaderID):(A.push(C.customVertexShaderID),A.push(C.customFragmentShaderID)),C.defines!==void 0)for(const I in C.defines)A.push(I),A.push(C.defines[I]);return C.isRawShaderMaterial===!1&&(v(A,C),y(A,C),A.push(t.outputColorSpace)),A.push(C.customProgramCacheKey),A.join()}function v(C,A){C.push(A.precision),C.push(A.outputColorSpace),C.push(A.envMapMode),C.push(A.envMapCubeUVHeight),C.push(A.mapUv),C.push(A.alphaMapUv),C.push(A.lightMapUv),C.push(A.aoMapUv),C.push(A.bumpMapUv),C.push(A.normalMapUv),C.push(A.displacementMapUv),C.push(A.emissiveMapUv),C.push(A.metalnessMapUv),C.push(A.roughnessMapUv),C.push(A.anisotropyMapUv),C.push(A.clearcoatMapUv),C.push(A.clearcoatNormalMapUv),C.push(A.clearcoatRoughnessMapUv),C.push(A.iridescenceMapUv),C.push(A.iridescenceThicknessMapUv),C.push(A.sheenColorMapUv),C.push(A.sheenRoughnessMapUv),C.push(A.specularMapUv),C.push(A.specularColorMapUv),C.push(A.specularIntensityMapUv),C.push(A.transmissionMapUv),C.push(A.thicknessMapUv),C.push(A.combine),C.push(A.fogExp2),C.push(A.sizeAttenuation),C.push(A.morphTargetsCount),C.push(A.morphAttributeCount),C.push(A.numDirLights),C.push(A.numPointLights),C.push(A.numSpotLights),C.push(A.numSpotLightMaps),C.push(A.numHemiLights),C.push(A.numRectAreaLights),C.push(A.numDirLightShadows),C.push(A.numPointLightShadows),C.push(A.numSpotLightShadows),C.push(A.numSpotLightShadowsWithMaps),C.push(A.numLightProbes),C.push(A.shadowMapType),C.push(A.toneMapping),C.push(A.numClippingPlanes),C.push(A.numClipIntersection),C.push(A.depthPacking)}function y(C,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),C.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function b(C){const A=m[C.type];let I;if(A){const N=Io[A];I=h1r.clone(N.uniforms)}else I=C.uniforms;return I}function E(C,A){let I;for(let N=0,H=c.length;N0?r.push(_):f.transparent===!0?i.push(_):n.push(_)}function l(d,h,f,m,T,Q){const _=s(d,h,f,m,T,Q);f.transmission>0?r.unshift(_):f.transparent===!0?i.unshift(_):n.unshift(_)}function c(d,h){n.length>1&&n.sort(d||N3r),r.length>1&&r.sort(h||DI),i.length>1&&i.sort(h||DI)}function u(){for(let d=e,h=t.length;d=o.length?(s=new II,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function I3r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Ee,color:new Nt};break;case"SpotLight":n={position:new Ee,direction:new Ee,color:new Nt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Ee,color:new Nt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Ee,skyColor:new Nt,groundColor:new Nt};break;case"RectAreaLight":n={color:new Nt,position:new Ee,halfWidth:new Ee,halfHeight:new Ee};break}return t[e.id]=n,n}}}function k3r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let P3r=0;function H3r(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function V3r(t,e){const n=new I3r,r=k3r(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new Ee);const o=new Ee,s=new zt,a=new zt;function l(u,d){let h=0,f=0,m=0;for(let N=0;N<9;N++)i.probe[N].set(0,0,0);let T=0,Q=0,_=0,v=0,y=0,b=0,E=0,x=0,L=0,M=0,C=0;u.sort(H3r);const A=d===!0?Math.PI:1;for(let N=0,H=u.length;N0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_FLOAT_1,i.rectAreaLTC2=rt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_HALF_1,i.rectAreaLTC2=rt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=h,i.ambient[1]=f,i.ambient[2]=m;const I=i.hash;(I.directionalLength!==T||I.pointLength!==Q||I.spotLength!==_||I.rectAreaLength!==v||I.hemiLength!==y||I.numDirectionalShadows!==b||I.numPointShadows!==E||I.numSpotShadows!==x||I.numSpotMaps!==L||I.numLightProbes!==C)&&(i.directional.length=T,i.spot.length=_,i.rectArea.length=v,i.point.length=Q,i.hemi.length=y,i.directionalShadow.length=b,i.directionalShadowMap.length=b,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=b,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=x+L-M,i.spotLightMap.length=L,i.numSpotLightShadowsWithMaps=M,i.numLightProbes=C,I.directionalLength=T,I.pointLength=Q,I.spotLength=_,I.rectAreaLength=v,I.hemiLength=y,I.numDirectionalShadows=b,I.numPointShadows=E,I.numSpotShadows=x,I.numSpotMaps=L,I.numLightProbes=C,i.version=P3r++)}function c(u,d){let h=0,f=0,m=0,T=0,Q=0;const _=d.matrixWorldInverse;for(let v=0,y=u.length;v=a.length?(l=new kI(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class B3r extends fo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Sar,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class $3r extends fo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const U3r=`void main() { gl_Position = vec4( position, 1.0 ); -}`,U3r=`uniform sampler2D shadow_pass; +}`,G3r=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -4054,12 +4054,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function G3r(t,e,n){let r=new eE;const i=new Yt,o=new Yt,s=new Mn,a=new F3r({depthPacking:Sar}),l=new B3r,c={},u=n.maxTextureSize,d={[Us]:ui,[ui]:Us,[ko]:ko},h=new Q2({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yt},radius:{value:4}},vertexShader:$3r,fragmentShader:U3r}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const m=new rs;m.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const T=new Yr(m,h),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bU;let _=this.type;this.render=function(E,x,L){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||E.length===0)return;const M=t.getRenderTarget(),C=t.getActiveCubeFace(),A=t.getActiveMipmapLevel(),I=t.state;I.setBlending(ka),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const N=_!==Es&&this.type===Es,H=_===Es&&this.type!==Es;for(let O=0,B=E.length;Ou||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/G.x),i.x=o.x*G.x,U.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/G.y),i.y=o.y*G.y,U.mapSize.y=o.y)),U.map===null||N===!0||H===!0){const W=this.type!==Es?{minFilter:hr,magFilter:hr}:{};U.map!==null&&U.map.dispose(),U.map=new _2(i.x,i.y,W),U.map.texture.name=V.name+".shadowMap",U.camera.updateProjectionMatrix()}t.setRenderTarget(U.map),t.clear();const K=U.getViewportCount();for(let W=0;W0||x.map&&x.alphaTest>0){const I=C.uuid,N=x.uuid;let H=c[I];H===void 0&&(H={},c[I]=H);let O=H[N];O===void 0&&(O=C.clone(),H[N]=O),C=O}if(C.visible=x.visible,C.wireframe=x.wireframe,M===Es?C.side=x.shadowSide!==null?x.shadowSide:x.side:C.side=x.shadowSide!==null?x.shadowSide:d[x.side],C.alphaMap=x.alphaMap,C.alphaTest=x.alphaTest,C.map=x.map,C.clipShadows=x.clipShadows,C.clippingPlanes=x.clippingPlanes,C.clipIntersection=x.clipIntersection,C.displacementMap=x.displacementMap,C.displacementScale=x.displacementScale,C.displacementBias=x.displacementBias,C.wireframeLinewidth=x.wireframeLinewidth,C.linewidth=x.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const I=t.properties.get(C);I.light=L}return C}function b(E,x,L,M,C){if(E.visible===!1)return;if(E.layers.test(x.layers)&&(E.isMesh||E.isLine||E.isPoints)&&(E.castShadow||E.receiveShadow&&C===Es)&&(!E.frustumCulled||r.intersectsObject(E))){E.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,E.matrixWorld);const N=e.update(E),H=E.material;if(Array.isArray(H)){const O=N.groups;for(let B=0,V=O.length;B=1):W.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(W)[1]),G=K>=2);let te=null,de={};const X=t.getParameter(t.SCISSOR_BOX),$=t.getParameter(t.VIEWPORT),ce=new Mn().fromArray(X),ye=new Mn().fromArray($);function z(me,Ye,Ue,Pe){const Xe=new Uint8Array(4),vt=t.createTexture();t.bindTexture(me,vt),t.texParameteri(me,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(me,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let T;const Q=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(Z,q){return _?new OffscreenCanvas(Z,q):a0("canvas")}function y(Z,q,pe,ue){let _e=1;if((Z.width>ue||Z.height>ue)&&(_e=ue/Math.max(Z.width,Z.height)),_e<1||q===!0)if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap){const Ae=q?gd:Math.floor,Ie=Ae(_e*Z.width),He=Ae(_e*Z.height);T===void 0&&(T=v(Ie,He));const $e=pe?v(Ie,He):T;return $e.width=Ie,$e.height=He,$e.getContext("2d").drawImage(Z,0,0,Ie,He),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+Ie+"x"+He+")."),$e}else return"data"in Z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),Z;return Z}function b(Z){return jQ(Z.width)&&jQ(Z.height)}function E(Z){return a?!1:Z.wrapS!==Pi||Z.wrapT!==Pi||Z.minFilter!==hr&&Z.minFilter!==ii}function x(Z,q){return Z.generateMipmaps&&q&&Z.minFilter!==hr&&Z.minFilter!==ii}function L(Z){t.generateMipmap(Z)}function M(Z,q,pe,ue,_e=!1){if(a===!1)return q;if(Z!==null){if(t[Z]!==void 0)return t[Z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let Ae=q;if(q===t.RED&&(pe===t.FLOAT&&(Ae=t.R32F),pe===t.HALF_FLOAT&&(Ae=t.R16F),pe===t.UNSIGNED_BYTE&&(Ae=t.R8)),q===t.RED_INTEGER&&(pe===t.UNSIGNED_BYTE&&(Ae=t.R8UI),pe===t.UNSIGNED_SHORT&&(Ae=t.R16UI),pe===t.UNSIGNED_INT&&(Ae=t.R32UI),pe===t.BYTE&&(Ae=t.R8I),pe===t.SHORT&&(Ae=t.R16I),pe===t.INT&&(Ae=t.R32I)),q===t.RG&&(pe===t.FLOAT&&(Ae=t.RG32F),pe===t.HALF_FLOAT&&(Ae=t.RG16F),pe===t.UNSIGNED_BYTE&&(Ae=t.RG8)),q===t.RGBA){const Ie=_e?pd:Tn.getTransfer(ue);pe===t.FLOAT&&(Ae=t.RGBA32F),pe===t.HALF_FLOAT&&(Ae=t.RGBA16F),pe===t.UNSIGNED_BYTE&&(Ae=Ie===kn?t.SRGB8_ALPHA8:t.RGBA8),pe===t.UNSIGNED_SHORT_4_4_4_4&&(Ae=t.RGBA4),pe===t.UNSIGNED_SHORT_5_5_5_1&&(Ae=t.RGB5_A1)}return(Ae===t.R16F||Ae===t.R32F||Ae===t.RG16F||Ae===t.RG32F||Ae===t.RGBA16F||Ae===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function C(Z,q,pe){return x(Z,pe)===!0||Z.isFramebufferTexture&&Z.minFilter!==hr&&Z.minFilter!==ii?Math.log2(Math.max(q.width,q.height))+1:Z.mipmaps!==void 0&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?q.mipmaps.length:1}function A(Z){return Z===hr||Z===UQ||Z===tu?t.NEAREST:t.LINEAR}function I(Z){const q=Z.target;q.removeEventListener("dispose",I),H(q),q.isVideoTexture&&m.delete(q)}function N(Z){const q=Z.target;q.removeEventListener("dispose",N),B(q)}function H(Z){const q=r.get(Z);if(q.__webglInit===void 0)return;const pe=Z.source,ue=Q.get(pe);if(ue){const _e=ue[q.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&O(Z),Object.keys(ue).length===0&&Q.delete(pe)}r.remove(Z)}function O(Z){const q=r.get(Z);t.deleteTexture(q.__webglTexture);const pe=Z.source,ue=Q.get(pe);delete ue[q.__cacheKey],s.memory.textures--}function B(Z){const q=Z.texture,pe=r.get(Z),ue=r.get(q);if(ue.__webglTexture!==void 0&&(t.deleteTexture(ue.__webglTexture),s.memory.textures--),Z.depthTexture&&Z.depthTexture.dispose(),Z.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(pe.__webglFramebuffer[_e]))for(let Ae=0;Ae=l&&console.warn("THREE.WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+l),V+=1,Z}function K(Z){const q=[];return q.push(Z.wrapS),q.push(Z.wrapT),q.push(Z.wrapR||0),q.push(Z.magFilter),q.push(Z.minFilter),q.push(Z.anisotropy),q.push(Z.internalFormat),q.push(Z.format),q.push(Z.type),q.push(Z.generateMipmaps),q.push(Z.premultiplyAlpha),q.push(Z.flipY),q.push(Z.unpackAlignment),q.push(Z.colorSpace),q.join()}function W(Z,q){const pe=r.get(Z);if(Z.isVideoTexture&&Me(Z),Z.isRenderTargetTexture===!1&&Z.version>0&&pe.__version!==Z.version){const ue=Z.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{fe(pe,Z,q);return}}n.bindTexture(t.TEXTURE_2D,pe.__webglTexture,t.TEXTURE0+q)}function te(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_2D_ARRAY,pe.__webglTexture,t.TEXTURE0+q)}function de(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_3D,pe.__webglTexture,t.TEXTURE0+q)}function X(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){be(pe,Z,q);return}n.bindTexture(t.TEXTURE_CUBE_MAP,pe.__webglTexture,t.TEXTURE0+q)}const $={[dc]:t.REPEAT,[Pi]:t.CLAMP_TO_EDGE,[fd]:t.MIRRORED_REPEAT},ce={[hr]:t.NEAREST,[UQ]:t.NEAREST_MIPMAP_NEAREST,[tu]:t.NEAREST_MIPMAP_LINEAR,[ii]:t.LINEAR,[xU]:t.LINEAR_MIPMAP_NEAREST,[g2]:t.LINEAR_MIPMAP_LINEAR},ye={[Car]:t.NEVER,[Nar]:t.ALWAYS,[Aar]:t.LESS,[DU]:t.LEQUAL,[war]:t.EQUAL,[Rar]:t.GEQUAL,[Mar]:t.GREATER,[Oar]:t.NOTEQUAL};function z(Z,q,pe){if(pe?(t.texParameteri(Z,t.TEXTURE_WRAP_S,$[q.wrapS]),t.texParameteri(Z,t.TEXTURE_WRAP_T,$[q.wrapT]),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,$[q.wrapR]),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,ce[q.magFilter]),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,ce[q.minFilter])):(t.texParameteri(Z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(Z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(q.wrapS!==Pi||q.wrapT!==Pi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,A(q.magFilter)),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,A(q.minFilter)),q.minFilter!==hr&&q.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),q.compareFunction&&(t.texParameteri(Z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Z,t.TEXTURE_COMPARE_FUNC,ye[q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ue=e.get("EXT_texture_filter_anisotropic");if(q.magFilter===hr||q.minFilter!==tu&&q.minFilter!==g2||q.type===Ms&&e.has("OES_texture_float_linear")===!1||a===!1&&q.type===o0&&e.has("OES_texture_half_float_linear")===!1)return;(q.anisotropy>1||r.get(q).__currentAnisotropy)&&(t.texParameterf(Z,ue.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(q.anisotropy,i.getMaxAnisotropy())),r.get(q).__currentAnisotropy=q.anisotropy)}}function re(Z,q){let pe=!1;Z.__webglInit===void 0&&(Z.__webglInit=!0,q.addEventListener("dispose",I));const ue=q.source;let _e=Q.get(ue);_e===void 0&&(_e={},Q.set(ue,_e));const Ae=K(q);if(Ae!==Z.__cacheKey){_e[Ae]===void 0&&(_e[Ae]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,pe=!0),_e[Ae].usedTimes++;const Ie=_e[Z.__cacheKey];Ie!==void 0&&(_e[Z.__cacheKey].usedTimes--,Ie.usedTimes===0&&O(q)),Z.__cacheKey=Ae,Z.__webglTexture=_e[Ae].texture}return pe}function fe(Z,q,pe){let ue=t.TEXTURE_2D;(q.isDataArrayTexture||q.isCompressedArrayTexture)&&(ue=t.TEXTURE_2D_ARRAY),q.isData3DTexture&&(ue=t.TEXTURE_3D);const _e=re(Z,q),Ae=q.source;n.bindTexture(ue,Z.__webglTexture,t.TEXTURE0+pe);const Ie=r.get(Ae);if(Ae.version!==Ie.__version||_e===!0){n.activeTexture(t.TEXTURE0+pe);const He=Tn.getPrimaries(Tn.workingColorSpace),$e=q.colorSpace===Vi?null:Tn.getPrimaries(q.colorSpace),lt=q.colorSpace===Vi||He===$e?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,q.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,q.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);const st=E(q)&&b(q.image)===!1;let Fe=y(q.image,st,!1,u);Fe=ke(q,Fe);const It=b(Fe)||a,Tt=o.convert(q.format,q.colorSpace);let mt=o.convert(q.type),ut=M(q.internalFormat,Tt,mt,q.colorSpace,q.isVideoTexture);z(ue,q,It);let ot;const ct=q.mipmaps,me=a&&q.isVideoTexture!==!0&&ut!==OU,Ye=Ie.__version===void 0||_e===!0,Ue=C(q,Fe,It);if(q.isDepthTexture)ut=t.DEPTH_COMPONENT,a?q.type===Ms?ut=t.DEPTH_COMPONENT32F:q.type===Oa?ut=t.DEPTH_COMPONENT24:q.type===X1?ut=t.DEPTH24_STENCIL8:ut=t.DEPTH_COMPONENT16:q.type===Ms&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),q.format===J1&&ut===t.DEPTH_COMPONENT&&q.type!==Kb&&q.type!==Oa&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),q.type=Oa,mt=o.convert(q.type)),q.format===fc&&ut===t.DEPTH_COMPONENT&&(ut=t.DEPTH_STENCIL,q.type!==X1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),q.type=X1,mt=o.convert(q.type))),Ye&&(me?n.texStorage2D(t.TEXTURE_2D,1,ut,Fe.width,Fe.height):n.texImage2D(t.TEXTURE_2D,0,ut,Fe.width,Fe.height,0,Tt,mt,null));else if(q.isDataTexture)if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ue,ut,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe>=1,Xe>>=1}}else if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ue,ut,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe0&&Ye++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Ye,ot,Fe[0].width,Fe[0].height));for(let Pe=0;Pe<6;Pe++)if(st){ct?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,Fe[Pe].width,Fe[Pe].height,mt,ut,Fe[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,ot,Fe[Pe].width,Fe[Pe].height,0,mt,ut,Fe[Pe].data);for(let Xe=0;Xe>Ae),Fe=Math.max(1,q.height>>Ae);_e===t.TEXTURE_3D||_e===t.TEXTURE_2D_ARRAY?n.texImage3D(_e,Ae,$e,st,Fe,q.depth,0,Ie,He,null):n.texImage2D(_e,Ae,$e,st,Fe,0,Ie,He,null)}n.bindFramebuffer(t.FRAMEBUFFER,Z),Se(q)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,0,Oe(q)):(_e===t.TEXTURE_2D||_e>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,Ae),n.bindFramebuffer(t.FRAMEBUFFER,null)}function se(Z,q,pe){if(t.bindRenderbuffer(t.RENDERBUFFER,Z),q.depthBuffer&&!q.stencilBuffer){let ue=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(pe||Se(q)){const _e=q.depthTexture;_e&&_e.isDepthTexture&&(_e.type===Ms?ue=t.DEPTH_COMPONENT32F:_e.type===Oa&&(ue=t.DEPTH_COMPONENT24));const Ae=Oe(q);Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ue,q.width,q.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ue,q.width,q.height)}else t.renderbufferStorage(t.RENDERBUFFER,ue,q.width,q.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,Z)}else if(q.depthBuffer&&q.stencilBuffer){const ue=Oe(q);pe&&Se(q)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,q.width,q.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,Z)}else{const ue=q.isWebGLMultipleRenderTargets===!0?q.texture:[q.texture];for(let _e=0;_e0){pe.__webglFramebuffer[He]=[];for(let $e=0;$e0){pe.__webglFramebuffer=[];for(let He=0;He0&&Se(Z)===!1){const He=Ae?q:[q];pe.__webglMultisampledFramebuffer=t.createFramebuffer(),pe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,pe.__webglMultisampledFramebuffer);for(let $e=0;$e0)for(let $e=0;$e0)for(let $e=0;$e0&&Se(Z)===!1){const q=Z.isWebGLMultipleRenderTargets?Z.texture:[Z.texture],pe=Z.width,ue=Z.height;let _e=t.COLOR_BUFFER_BIT;const Ae=[],Ie=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,He=r.get(Z),$e=Z.isWebGLMultipleRenderTargets===!0;if($e)for(let lt=0;lt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&q.__useRenderToTexture!==!1}function Me(Z){const q=s.render.frame;m.get(Z)!==q&&(m.set(Z,q),Z.update())}function ke(Z,q){const pe=Z.colorSpace,ue=Z.format,_e=Z.type;return Z.isCompressedTexture===!0||Z.isVideoTexture===!0||Z.format===zQ||pe!==Sr&&pe!==Vi&&(Tn.getTransfer(pe)===kn?a===!1?e.has("EXT_sRGB")===!0&&ue===Hi?(Z.format=zQ,Z.minFilter=ii,Z.generateMipmaps=!1):q=kU.sRGBToLinear(q):(ue!==Hi||_e!==Ha)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",pe)),q}this.allocateTextureUnit=G,this.resetTextureUnits=U,this.setTexture2D=W,this.setTexture2DArray=te,this.setTexture3D=de,this.setTextureCube=X,this.rebindTextures=ie,this.setupRenderTarget=Te,this.updateRenderTargetMipmap=Qe,this.updateMultisampleRenderTarget=ae,this.setupDepthRenderbuffer=j,this.setupFrameBufferTexture=Le,this.useMultisampledRTT=Se}function j3r(t,e,n){const r=n.isWebGL2;function i(o,s=Vi){let a;const l=Tn.getTransfer(s);if(o===Ha)return t.UNSIGNED_BYTE;if(o===LU)return t.UNSIGNED_SHORT_4_4_4_4;if(o===CU)return t.UNSIGNED_SHORT_5_5_5_1;if(o===par)return t.BYTE;if(o===har)return t.SHORT;if(o===Kb)return t.UNSIGNED_SHORT;if(o===SU)return t.INT;if(o===Oa)return t.UNSIGNED_INT;if(o===Ms)return t.FLOAT;if(o===o0)return r?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===Tar)return t.ALPHA;if(o===Hi)return t.RGBA;if(o===mar)return t.LUMINANCE;if(o===gar)return t.LUMINANCE_ALPHA;if(o===J1)return t.DEPTH_COMPONENT;if(o===fc)return t.DEPTH_STENCIL;if(o===zQ)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===_ar)return t.RED;if(o===AU)return t.RED_INTEGER;if(o===Qar)return t.RG;if(o===wU)return t.RG_INTEGER;if(o===MU)return t.RGBA_INTEGER;if(o===Ig||o===kg||o===Pg||o===Hg)if(l===kn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===Ig)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===Ig)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===bD||o===ED||o===xD||o===SD)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===bD)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===ED)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===xD)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===SD)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===OU)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===LD||o===CD)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===LD)return l===kn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===CD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===AD||o===wD||o===MD||o===OD||o===RD||o===ND||o===DD||o===ID||o===kD||o===PD||o===HD||o===VD||o===FD||o===BD)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===AD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===wD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===MD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===OD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===RD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===ND)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===DD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===ID)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===kD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===PD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===HD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===VD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===FD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===BD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===Vg||o===$D||o===UD)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===Vg)return l===kn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===$D)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===UD)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===yar||o===GD||o===qD||o===zD)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===Vg)return a.COMPRESSED_RED_RGTC1_EXT;if(o===GD)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===qD)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===zD)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===X1?r?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class W3r extends Wr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class G1 extends $n{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Y3r={type:"move"};class c_{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new G1,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new G1,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ee,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ee),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new G1,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ee,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ee),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const T of e.hand.values()){const Q=n.getJointPose(T,r),_=this._getHandJoint(c,T);Q!==null&&(_.matrix.fromArray(Q.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=Q.radius),_.visible=Q!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],h=u.position.distanceTo(d.position),f=.02,m=.005;c.inputState.pinching&&h>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Y3r)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new G1;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class K3r extends zc{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,h=null,f=null,m=null;const T=n.getContextAttributes();let Q=null,_=null;const v=[],y=[],b=new Yt;let E=null;const x=new Wr;x.layers.enable(1),x.viewport=new Mn;const L=new Wr;L.layers.enable(2),L.viewport=new Mn;const M=[x,L],C=new W3r;C.layers.enable(1),C.layers.enable(2);let A=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getTargetRaySpace()},this.getControllerGrip=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getGripSpace()},this.getHand=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getHandSpace()};function N(X){const $=y.indexOf(X.inputSource);if($===-1)return;const ce=v[$];ce!==void 0&&(ce.update(X.inputSource,X.frame,c||s),ce.dispatchEvent({type:X.type,data:X.inputSource}))}function H(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",H),i.removeEventListener("inputsourceschange",O);for(let X=0;X=0&&(y[ye]=null,v[ye].disconnect(ce))}for(let $=0;$=y.length){y.push(ce),ye=re;break}else if(y[re]===null){y[re]=ce,ye=re;break}if(ye===-1)break}const z=v[ye];z&&z.connect(ce)}}const B=new Ee,V=new Ee;function U(X,$,ce){B.setFromMatrixPosition($.matrixWorld),V.setFromMatrixPosition(ce.matrixWorld);const ye=B.distanceTo(V),z=$.projectionMatrix.elements,re=ce.projectionMatrix.elements,fe=z[14]/(z[10]-1),be=z[14]/(z[10]+1),Le=(z[9]+1)/z[5],se=(z[9]-1)/z[5],Y=(z[8]-1)/z[0],j=(re[8]+1)/re[0],ie=fe*Y,Te=fe*j,Qe=ye/(-Y+j),ae=Qe*-Y;$.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(ae),X.translateZ(Qe),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();const Oe=fe+Qe,Se=be+Qe,Me=ie-ae,ke=Te+(ye-ae),Z=Le*be/Se*Oe,q=se*be/Se*Oe;X.projectionMatrix.makePerspective(Me,ke,Z,q,Oe,Se),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function G(X,$){$===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices($.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;C.near=L.near=x.near=X.near,C.far=L.far=x.far=X.far,(A!==C.near||I!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),A=C.near,I=C.far);const $=X.parent,ce=C.cameras;G(C,$);for(let ye=0;ye0&&(Q.alphaTest.value=_.alphaTest);const v=e.get(_).envMap;if(v&&(Q.envMap.value=v,Q.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=_.reflectivity,Q.ior.value=_.ior,Q.refractionRatio.value=_.refractionRatio),_.lightMap){Q.lightMap.value=_.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=_.lightMapIntensity*y,n(_.lightMap,Q.lightMapTransform)}_.aoMap&&(Q.aoMap.value=_.aoMap,Q.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,Q.aoMapTransform))}function s(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform))}function a(Q,_){Q.dashSize.value=_.dashSize,Q.totalSize.value=_.dashSize+_.gapSize,Q.scale.value=_.scale}function l(Q,_,v,y){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.size.value=_.size*v,Q.scale.value=y*.5,_.map&&(Q.map.value=_.map,n(_.map,Q.uvTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function c(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.rotation.value=_.rotation,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function u(Q,_){Q.specular.value.copy(_.specular),Q.shininess.value=Math.max(_.shininess,1e-4)}function d(Q,_){_.gradientMap&&(Q.gradientMap.value=_.gradientMap)}function h(Q,_){Q.metalness.value=_.metalness,_.metalnessMap&&(Q.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=_.roughness,_.roughnessMap&&(Q.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,Q.roughnessMapTransform)),e.get(_).envMap&&(Q.envMapIntensity.value=_.envMapIntensity)}function f(Q,_,v){Q.ior.value=_.ior,_.sheen>0&&(Q.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),Q.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(Q.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,Q.sheenColorMapTransform)),_.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),_.clearcoat>0&&(Q.clearcoat.value=_.clearcoat,Q.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(Q.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,Q.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===ui&&Q.clearcoatNormalScale.value.negate())),_.iridescence>0&&(Q.iridescence.value=_.iridescence,Q.iridescenceIOR.value=_.iridescenceIOR,Q.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(Q.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,Q.iridescenceMapTransform)),_.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),_.transmission>0&&(Q.transmission.value=_.transmission,Q.transmissionSamplerMap.value=v.texture,Q.transmissionSamplerSize.value.set(v.width,v.height),_.transmissionMap&&(Q.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=_.thickness,_.thicknessMap&&(Q.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=_.attenuationDistance,Q.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(Q.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(Q.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=_.specularIntensity,Q.specularColor.value.copy(_.specularColor),_.specularColorMap&&(Q.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,Q.specularColorMapTransform)),_.specularIntensityMap&&(Q.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,Q.specularIntensityMapTransform))}function m(Q,_){_.matcap&&(Q.matcap.value=_.matcap)}function T(Q,_){const v=e.get(_).light;Q.referencePosition.value.setFromMatrixPosition(v.matrixWorld),Q.nearDistance.value=v.shadow.camera.near,Q.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function X3r(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const b=y.program;r.uniformBlockBinding(v,b)}function c(v,y){let b=i[v.id];b===void 0&&(m(v),b=u(v),i[v.id]=b,v.addEventListener("dispose",Q));const E=y.program;r.updateUBOMapping(v,E);const x=e.render.frame;o[v.id]!==x&&(h(v),o[v.id]=x)}function u(v){const y=d();v.__bindingPointIndex=y;const b=t.createBuffer(),E=v.__size,x=v.usage;return t.bindBuffer(t.UNIFORM_BUFFER,b),t.bufferData(t.UNIFORM_BUFFER,E,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,b),b}function d(){for(let v=0;v0){x=b%E;const N=E-x;x!==0&&N-A.boundary<0&&(b+=E-x,C.__offset=b)}b+=A.storage}return x=b%E,x>0&&(b+=E-x),v.__size=b,v.__cache={},this}function T(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function Q(v){const y=v.target;y.removeEventListener("dispose",Q);const b=s.indexOf(y.__bindingPointIndex);s.splice(b,1),t.deleteBuffer(i[y.id]),delete i[y.id],delete o[y.id]}function _(){for(const v in i)t.deleteBuffer(i[v]);s=[],i={},o={}}return{bind:l,update:c,dispose:_}}class JU{constructor(e={}){const{canvas:n=Yar(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;r!==null?h=r.getContextAttributes().alpha:h=s;const f=new Uint32Array(4),m=new Int32Array(4);let T=null,Q=null;const _=[],v=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=jn,this._useLegacyLights=!1,this.toneMapping=Pa,this.toneMappingExposure=1;const y=this;let b=!1,E=0,x=0,L=null,M=-1,C=null;const A=new Mn,I=new Mn;let N=null;const H=new Nt(0);let O=0,B=n.width,V=n.height,U=1,G=null,K=null;const W=new Mn(0,0,B,V),te=new Mn(0,0,B,V);let de=!1;const X=new eE;let $=!1,ce=!1,ye=null;const z=new zt,re=new Yt,fe=new Ee,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Le(){return L===null?U:1}let se=r;function Y(ee,xe){for(let Ce=0;Ce{function je(){if(Ne.forEach(function(Be){ae.get(Be).currentProgram.isReady()&&Ne.delete(Be)}),Ne.size===0){Re(ee);return}setTimeout(je,10)}j.get("KHR_parallel_shader_compile")!==null?je():setTimeout(je,10)})};let Ot=null;function Hn(ee){Ot&&Ot(ee)}function zn(){Yn.stop()}function an(){Yn.start()}const Yn=new zU;Yn.setAnimationLoop(Hn),typeof self<"u"&&Yn.setContext(self),this.setAnimationLoop=function(ee){Ot=ee,ot.setAnimationLoop(ee),ee===null?Yn.stop():Yn.start()},ot.addEventListener("sessionstart",zn),ot.addEventListener("sessionend",an),this.render=function(ee,xe){if(xe!==void 0&&xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(b===!0)return;ee.matrixWorldAutoUpdate===!0&&ee.updateMatrixWorld(),xe.parent===null&&xe.matrixWorldAutoUpdate===!0&&xe.updateMatrixWorld(),ot.enabled===!0&&ot.isPresenting===!0&&(ot.cameraAutoUpdate===!0&&ot.updateCamera(xe),xe=ot.getCamera()),ee.isScene===!0&&ee.onBeforeRender(y,ee,xe,L),Q=Ae.get(ee,v.length),Q.init(),v.push(Q),z.multiplyMatrices(xe.projectionMatrix,xe.matrixWorldInverse),X.setFromProjectionMatrix(z),ce=this.localClippingEnabled,$=Ie.init(this.clippingPlanes,ce),T=_e.get(ee,_.length),T.init(),_.push(T),Cr(ee,xe,0,y.sortObjects),T.finish(),y.sortObjects===!0&&T.sort(G,K),this.info.render.frame++,$===!0&&Ie.beginShadows();const Ce=Q.state.shadowsArray;if(He.render(Ce,ee,xe),$===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset(),$e.render(T,ee),Q.setupLights(y._useLegacyLights),xe.isArrayCamera){const Ne=xe.cameras;for(let Re=0,je=Ne.length;Re0?Q=v[v.length-1]:Q=null,_.pop(),_.length>0?T=_[_.length-1]:T=null};function Cr(ee,xe,Ce,Ne){if(ee.visible===!1)return;if(ee.layers.test(xe.layers)){if(ee.isGroup)Ce=ee.renderOrder;else if(ee.isLOD)ee.autoUpdate===!0&&ee.update(xe);else if(ee.isLight)Q.pushLight(ee),ee.castShadow&&Q.pushShadow(ee);else if(ee.isSprite){if(!ee.frustumCulled||X.intersectsSprite(ee)){Ne&&fe.setFromMatrixPosition(ee.matrixWorld).applyMatrix4(z);const Be=q.update(ee),F=ee.material;F.visible&&T.push(ee,Be,F,Ce,fe.z,null)}}else if((ee.isMesh||ee.isLine||ee.isPoints)&&(!ee.frustumCulled||X.intersectsObject(ee))){const Be=q.update(ee),F=ee.material;if(Ne&&(ee.boundingSphere!==void 0?(ee.boundingSphere===null&&ee.computeBoundingSphere(),fe.copy(ee.boundingSphere.center)):(Be.boundingSphere===null&&Be.computeBoundingSphere(),fe.copy(Be.boundingSphere.center)),fe.applyMatrix4(ee.matrixWorld).applyMatrix4(z)),Array.isArray(F)){const et=Be.groups;for(let bt=0,gt=et.length;bt0&&So(Re,je,xe,Ce),Ne&&Te.viewport(A.copy(Ne)),Re.length>0&&Gt(Re,xe,Ce),je.length>0&&Gt(je,xe,Ce),Be.length>0&&Gt(Be,xe,Ce),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1)}function So(ee,xe,Ce,Ne){if((Ce.isScene===!0?Ce.overrideMaterial:null)!==null)return;const je=ie.isWebGL2;ye===null&&(ye=new _2(1,1,{generateMipmaps:!0,type:j.has("EXT_color_buffer_half_float")?o0:Ha,minFilter:g2,samples:je?4:0})),y.getDrawingBufferSize(re),je?ye.setSize(re.x,re.y):ye.setSize(gd(re.x),gd(re.y));const Be=y.getRenderTarget();y.setRenderTarget(ye),y.getClearColor(H),O=y.getClearAlpha(),O<1&&y.setClearColor(16777215,.5),y.clear();const F=y.toneMapping;y.toneMapping=Pa,Gt(ee,Ce,Ne),Oe.updateMultisampleRenderTarget(ye),Oe.updateRenderTargetMipmap(ye);let et=!1;for(let bt=0,gt=xe.length;bt0),Qt=!!Ce.morphAttributes.position,Ht=!!Ce.morphAttributes.normal,Kt=!!Ce.morphAttributes.color;let un=Pa;Ne.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(un=y.toneMapping);const Ar=Ce.morphAttributes.position||Ce.morphAttributes.normal||Ce.morphAttributes.color,on=Ar!==void 0?Ar.length:0,$t=ae.get(Ne),M2=Q.state.lights;if($===!0&&(ce===!0||ee!==C)){const Vr=ee===C&&Ne.id===M;Ie.setState(Ne,ee,Vr)}let Dn=!1;Ne.version===$t.__version?($t.needsLights&&$t.lightsStateVersion!==M2.state.version||$t.outputColorSpace!==F||Re.isBatchedMesh&&$t.batching===!1||!Re.isBatchedMesh&&$t.batching===!0||Re.isInstancedMesh&&$t.instancing===!1||!Re.isInstancedMesh&&$t.instancing===!0||Re.isSkinnedMesh&&$t.skinning===!1||!Re.isSkinnedMesh&&$t.skinning===!0||Re.isInstancedMesh&&$t.instancingColor===!0&&Re.instanceColor===null||Re.isInstancedMesh&&$t.instancingColor===!1&&Re.instanceColor!==null||$t.envMap!==et||Ne.fog===!0&&$t.fog!==je||$t.numClippingPlanes!==void 0&&($t.numClippingPlanes!==Ie.numPlanes||$t.numIntersection!==Ie.numIntersection)||$t.vertexAlphas!==bt||$t.vertexTangents!==gt||$t.morphTargets!==Qt||$t.morphNormals!==Ht||$t.morphColors!==Kt||$t.toneMapping!==un||ie.isWebGL2===!0&&$t.morphTargetsCount!==on)&&(Dn=!0):(Dn=!0,$t.__version=Ne.version);let Lo=$t.currentProgram;Dn===!0&&(Lo=Xn(Ne,xe,Re));let Xc=!1,os=!1,O2=!1;const mn=Lo.getUniforms(),Ai=$t.uniforms;if(Te.useProgram(Lo.program)&&(Xc=!0,os=!0,O2=!0),Ne.id!==M&&(M=Ne.id,os=!0),Xc||C!==ee){mn.setValue(se,"projectionMatrix",ee.projectionMatrix),mn.setValue(se,"viewMatrix",ee.matrixWorldInverse);const Vr=mn.map.cameraPosition;Vr!==void 0&&Vr.setValue(se,fe.setFromMatrixPosition(ee.matrixWorld)),ie.logarithmicDepthBuffer&&mn.setValue(se,"logDepthBufFC",2/(Math.log(ee.far+1)/Math.LN2)),(Ne.isMeshPhongMaterial||Ne.isMeshToonMaterial||Ne.isMeshLambertMaterial||Ne.isMeshBasicMaterial||Ne.isMeshStandardMaterial||Ne.isShaderMaterial)&&mn.setValue(se,"isOrthographic",ee.isOrthographicCamera===!0),C!==ee&&(C=ee,os=!0,O2=!0)}if(Re.isSkinnedMesh){mn.setOptional(se,Re,"bindMatrix"),mn.setOptional(se,Re,"bindMatrixInverse");const Vr=Re.skeleton;Vr&&(ie.floatVertexTextures?(Vr.boneTexture===null&&Vr.computeBoneTexture(),mn.setValue(se,"boneTexture",Vr.boneTexture,Oe)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Re.isBatchedMesh&&(mn.setOptional(se,Re,"batchingTexture"),mn.setValue(se,"batchingTexture",Re._matricesTexture,Oe));const Jr=Ce.morphAttributes;if((Jr.position!==void 0||Jr.normal!==void 0||Jr.color!==void 0&&ie.isWebGL2===!0)&<.update(Re,Ce,Lo),(os||$t.receiveShadow!==Re.receiveShadow)&&($t.receiveShadow=Re.receiveShadow,mn.setValue(se,"receiveShadow",Re.receiveShadow)),Ne.isMeshGouraudMaterial&&Ne.envMap!==null&&(Ai.envMap.value=et,Ai.flipEnvMap.value=et.isCubeTexture&&et.isRenderTargetTexture===!1?-1:1),os&&(mn.setValue(se,"toneMappingExposure",y.toneMappingExposure),$t.needsLights&&ea(Ai,O2),je&&Ne.fog===!0&&ue.refreshFogUniforms(Ai,je),ue.refreshMaterialUniforms(Ai,Ne,U,V,ye),nu.upload(se,hi($t),Ai,Oe)),Ne.isShaderMaterial&&Ne.uniformsNeedUpdate===!0&&(nu.upload(se,hi($t),Ai,Oe),Ne.uniformsNeedUpdate=!1),Ne.isSpriteMaterial&&mn.setValue(se,"center",Re.center),mn.setValue(se,"modelViewMatrix",Re.modelViewMatrix),mn.setValue(se,"normalMatrix",Re.normalMatrix),mn.setValue(se,"modelMatrix",Re.matrixWorld),Ne.isShaderMaterial||Ne.isRawShaderMaterial){const Vr=Ne.uniformsGroups;for(let R2=0,wi=Vr.length;R20&&Oe.useMultisampledRTT(ee)===!1?Re=ae.get(ee).__webglMultisampledFramebuffer:Array.isArray(gt)?Re=gt[Ce]:Re=gt,A.copy(ee.viewport),I.copy(ee.scissor),N=ee.scissorTest}else A.copy(W).multiplyScalar(U).floor(),I.copy(te).multiplyScalar(U).floor(),N=de;if(Te.bindFramebuffer(se.FRAMEBUFFER,Re)&&ie.drawBuffers&&Ne&&Te.drawBuffers(ee,Re),Te.viewport(A),Te.scissor(I),Te.setScissorTest(N),je){const et=ae.get(ee.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+xe,et.__webglTexture,Ce)}else if(Be){const et=ae.get(ee.texture),bt=xe||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,et.__webglTexture,Ce||0,bt)}M=-1},this.readRenderTargetPixels=function(ee,xe,Ce,Ne,Re,je,Be){if(!(ee&&ee.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let F=ae.get(ee).__webglFramebuffer;if(ee.isWebGLCubeRenderTarget&&Be!==void 0&&(F=F[Be]),F){Te.bindFramebuffer(se.FRAMEBUFFER,F);try{const et=ee.texture,bt=et.format,gt=et.type;if(bt!==Hi&&It.convert(bt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Qt=gt===o0&&(j.has("EXT_color_buffer_half_float")||ie.isWebGL2&&j.has("EXT_color_buffer_float"));if(gt!==Ha&&It.convert(gt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&!(gt===Ms&&(ie.isWebGL2||j.has("OES_texture_float")||j.has("WEBGL_color_buffer_float")))&&!Qt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}xe>=0&&xe<=ee.width-Ne&&Ce>=0&&Ce<=ee.height-Re&&se.readPixels(xe,Ce,Ne,Re,It.convert(bt),It.convert(gt),je)}finally{const et=L!==null?ae.get(L).__webglFramebuffer:null;Te.bindFramebuffer(se.FRAMEBUFFER,et)}}},this.copyFramebufferToTexture=function(ee,xe,Ce=0){const Ne=Math.pow(2,-Ce),Re=Math.floor(xe.image.width*Ne),je=Math.floor(xe.image.height*Ne);Oe.setTexture2D(xe,0),se.copyTexSubImage2D(se.TEXTURE_2D,Ce,0,0,ee.x,ee.y,Re,je),Te.unbindTexture()},this.copyTextureToTexture=function(ee,xe,Ce,Ne=0){const Re=xe.image.width,je=xe.image.height,Be=It.convert(Ce.format),F=It.convert(Ce.type);Oe.setTexture2D(Ce,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ce.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ce.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ce.unpackAlignment),xe.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Re,je,Be,F,xe.image.data):xe.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,xe.mipmaps[0].width,xe.mipmaps[0].height,Be,xe.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Be,F,xe.image),Ne===0&&Ce.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Te.unbindTexture()},this.copyTextureToTexture3D=function(ee,xe,Ce,Ne,Re=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const je=ee.max.x-ee.min.x+1,Be=ee.max.y-ee.min.y+1,F=ee.max.z-ee.min.z+1,et=It.convert(Ne.format),bt=It.convert(Ne.type);let gt;if(Ne.isData3DTexture)Oe.setTexture3D(Ne,0),gt=se.TEXTURE_3D;else if(Ne.isDataArrayTexture)Oe.setTexture2DArray(Ne,0),gt=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ne.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ne.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ne.unpackAlignment);const Qt=se.getParameter(se.UNPACK_ROW_LENGTH),Ht=se.getParameter(se.UNPACK_IMAGE_HEIGHT),Kt=se.getParameter(se.UNPACK_SKIP_PIXELS),un=se.getParameter(se.UNPACK_SKIP_ROWS),Ar=se.getParameter(se.UNPACK_SKIP_IMAGES),on=Ce.isCompressedTexture?Ce.mipmaps[0]:Ce.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,on.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,on.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,ee.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,ee.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,ee.min.z),Ce.isDataTexture||Ce.isData3DTexture?se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,bt,on.data):Ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),se.compressedTexSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,on.data)):se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,bt,on),se.pixelStorei(se.UNPACK_ROW_LENGTH,Qt),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Ht),se.pixelStorei(se.UNPACK_SKIP_PIXELS,Kt),se.pixelStorei(se.UNPACK_SKIP_ROWS,un),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ar),Re===0&&Ne.generateMipmaps&&se.generateMipmap(gt),Te.unbindTexture()},this.initTexture=function(ee){ee.isCubeTexture?Oe.setTextureCube(ee,0):ee.isData3DTexture?Oe.setTexture3D(ee,0):ee.isDataArrayTexture||ee.isCompressedArrayTexture?Oe.setTexture2DArray(ee,0):Oe.setTexture2D(ee,0),Te.unbindTexture()},this.resetState=function(){E=0,x=0,L=null,Te.reset(),Tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Os}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===Xb?"display-p3":"srgb",n.unpackColorSpace=Tn.workingColorSpace===x9?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===jn?e2:NU}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===e2?jn:Sr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class J3r extends JU{}J3r.prototype.isWebGL1Renderer=!0;class e4r extends $n{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class t4r{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=uo()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;il)continue;h.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(h);Me.far||n.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const _=Math.max(0,s.start),v=Math.min(Q.count,s.start+s.count);for(let y=_,b=v-1;yl)continue;h.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(h);xe.far||n.push({distance:x,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class aE extends fo{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Nt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Zs extends aE{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Yt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Dr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Nt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Nt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Nt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class XI extends fo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Nt(16777215),this.specular=new Nt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function H5(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function d4r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function f4r(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function JI(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function rG(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}class n6{constructor(e,n,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let r=this._cachedIndex,i=n[r],o=n[r-1];e:{t:{let s;n:{r:if(!(e=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&d4r(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Fg,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}is.prototype.TimeBufferType=Float32Array;is.prototype.ValueBufferType=Float32Array;is.prototype.DefaultInterpolation=pc;class Wc extends is{}Wc.prototype.ValueTypeName="bool";Wc.prototype.ValueBufferType=Array;Wc.prototype.DefaultInterpolation=s0;Wc.prototype.InterpolantFactoryMethodLinear=void 0;Wc.prototype.InterpolantFactoryMethodSmooth=void 0;class iG extends is{}iG.prototype.ValueTypeName="color";class mc extends is{}mc.prototype.ValueTypeName="number";class m4r extends n6{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)n1.slerpFlat(o,0,s,c-a,s,c,l);return o}}class v2 extends is{InterpolantFactoryMethodLinear(e){return new m4r(this.times,this.values,this.getValueSize(),e)}}v2.prototype.ValueTypeName="quaternion";v2.prototype.DefaultInterpolation=pc;v2.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends is{}Yc.prototype.ValueTypeName="string";Yc.prototype.ValueBufferType=Array;Yc.prototype.DefaultInterpolation=s0;Yc.prototype.InterpolantFactoryMethodLinear=void 0;Yc.prototype.InterpolantFactoryMethodSmooth=void 0;class gc extends is{}gc.prototype.ValueTypeName="vector";class g4r{constructor(e,n=-1,r,i=bar){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=uo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(Q4r(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(is.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let h=i[d];h||(i[d]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,h,f,m,T){if(f.length!==0){const Q=[],_=[];rG(f,Q,_,m),Q.length!==0&&T.push(new d(h,Q,_))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(ys[e]!==void 0){ys[e].push({onLoad:n,onProgress:r,onError:i});return}ys[e]=[],ys[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=ys[e],d=c.body.getReader(),h=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),f=h?parseInt(h):0,m=f!==0;let T=0;const Q=new ReadableStream({start(_){v();function v(){d.read().then(({done:y,value:b})=>{if(y)_.close();else{T+=b.byteLength;const E=new ProgressEvent("progress",{lengthComputable:m,loaded:T,total:f});for(let x=0,L=u.length;x{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{_c.add(e,c);const u=ys[e];delete ys[e];for(let d=0,h=u.length;d{const u=ys[e];if(u===void 0)throw this.manager.itemError(e),c;delete ys[e];for(let d=0,h=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class E4r extends Kc{constructor(e){super(e)}load(e,n,r,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a=a0("img");function l(){u(),_c.add(e,this),n&&n(this),o.manager.itemEnd(e)}function c(d){u(),i&&i(d),o.manager.itemError(e),o.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class sG extends Kc{constructor(e){super(e)}load(e,n,r,i){const o=new xr,s=new E4r(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a,o.needsUpdate=!0,n!==void 0&&n(o)},r,i),o}}class A9 extends $n{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Nt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const p_=new zt,ek=new Ee,tk=new Ee;class lE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Yt(512,512),this.map=null,this.mapPass=null,this.matrix=new zt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new eE,this._frameExtents=new Yt(1,1),this._viewportCount=1,this._viewports=[new Mn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,r=this.matrix;ek.setFromMatrixPosition(e.matrixWorld),n.position.copy(ek),tk.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(tk),n.updateMatrixWorld(),p_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(p_),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(p_)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class x4r extends lE{constructor(){super(new Wr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,r=hc*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||n.far;(r!==n.fov||i!==n.aspect||o!==n.far)&&(n.fov=r,n.aspect=i,n.far=o,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class S4r extends A9{constructor(e,n,r=0,i=Math.PI/3,o=0,s=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.distance=r,this.angle=i,this.penumbra=o,this.decay=s,this.map=null,this.shadow=new x4r}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const nk=new zt,u4=new Ee,h_=new Ee;class L4r extends lE{constructor(){super(new Wr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Yt(4,2),this._viewportCount=6,this._viewports=[new Mn(2,1,1,1),new Mn(0,1,1,1),new Mn(3,1,1,1),new Mn(1,1,1,1),new Mn(3,0,1,1),new Mn(1,0,1,1)],this._cubeDirections=[new Ee(1,0,0),new Ee(-1,0,0),new Ee(0,0,1),new Ee(0,0,-1),new Ee(0,1,0),new Ee(0,-1,0)],this._cubeUps=[new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,0,1),new Ee(0,0,-1)]}updateMatrices(e,n=0){const r=this.camera,i=this.matrix,o=e.distance||r.far;o!==r.far&&(r.far=o,r.updateProjectionMatrix()),u4.setFromMatrixPosition(e.matrixWorld),r.position.copy(u4),h_.copy(r.position),h_.add(this._cubeDirections[n]),r.up.copy(this._cubeUps[n]),r.lookAt(h_),r.updateMatrixWorld(),i.makeTranslation(-u4.x,-u4.y,-u4.z),nk.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nk)}}class C4r extends A9{constructor(e,n,r=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new L4r}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class A4r extends lE{constructor(){super(new nE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aG extends A9{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.shadow=new A4r}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class w4r extends A9{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class D4{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){_c.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}const cE="\\[\\]\\.:\\/",O4r=new RegExp("["+cE+"]","g"),uE="[^"+cE+"]",R4r="[^"+cE.replace("\\.","")+"]",N4r=/((?:WC+[\/:])*)/.source.replace("WC",uE),D4r=/(WCOD+)?/.source.replace("WCOD",R4r),I4r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uE),k4r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uE),P4r=new RegExp("^"+N4r+D4r+I4r+k4r+"$"),H4r=["material","materials","bones","map"];class V4r{constructor(e,n,r){const i=r||Qn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Qn{constructor(e,n,r){this.path=n,this.parsedPath=r||Qn.parseTrackName(n),this.node=Qn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Qn.Composite(e,n,r):new Qn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(O4r,"")}static parseTrackName(e){const n=P4r.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);H4r.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=2.0 are supported."));return}const c=new _0r(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(s),c.setPlugins(a),c.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function B4r(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class $4r{constructor(e){this.parser=e,this.name=Wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,s)}}class t0r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class n0r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class r0r{constructor(e){this.name=Wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,c=i.byteLength||0,u=i.count,d=i.byteStride,h=new Uint8Array(a,l,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(u,d,h,i.mode,i.filter).then(function(f){return f.buffer}):s.ready.then(function(){const f=new ArrayBuffer(u*d);return s.decodeGltfBuffer(new Uint8Array(f),u,d,h,i.mode,i.filter),f})})}else return null}}class i0r{constructor(e){this.name=Wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const c of i.primitives)if(c.mode!==Ii.TRIANGLES&&c.mode!==Ii.TRIANGLE_STRIP&&c.mode!==Ii.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],h=c[0].count,f=[];for(const m of d){const T=new zt,Q=new Ee,_=new n1,v=new Ee(1,1,1),y=new a4r(m.geometry,m.material,h);for(let b=0;b0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const g0r=new zt;class _0r{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new B4r,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=!1,o=-1;typeof navigator<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,o=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||i&&o<98?this.textureLoader=new sG(this.options.manager):this.textureLoader=new M4r(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new oG(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return R1(o,a,i),Ca(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[c,u]of s.children.entries())o(u,a.children[c])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&Q.setY(C,x[L*l+1]),l>=3&&Q.setZ(C,x[L*l+2]),l>=4&&Q.setW(C,x[L*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Q})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(e,o,a)}loadTextureImage(e,n,r){const i=this,o=this.json,s=o.textures[e],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(u){u.flipY=!1,u.name=s.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(o.samplers||{})[s.sampler]||{};return u.magFilter=ok[h.magFilter]||ii,u.minFilter=ok[h.minFilter]||g2,u.wrapS=sk[h.wrapS]||dc,u.wrapT=sk[h.wrapT]||dc,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const s=i.images[e],a=self.URL||self.webkitURL;let l=s.uri||"",c=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(d){c=!0;const h=new Blob([d],{type:s.mimeType});return l=a.createObjectURL(h),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(h,f){let m=h;n.isImageBitmapLoader===!0&&(m=function(T){const Q=new xr(T);Q.needsUpdate=!0,h(Q)}),n.load(D4.resolveURL(d,o.path),m,void 0,f)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),d.userData.mimeType=s.mimeType||m0r(s.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[Wt.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[Wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[Wt.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new nG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new tG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return aE}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let s;const a={},l=o.extensions||{},c=[];if(l[Wt.KHR_MATERIALS_UNLIT]){const d=i[Wt.KHR_MATERIALS_UNLIT];s=d.getMaterialType(),c.push(d.extendParams(a,o,n))}else{const d=o.pbrMetallicRoughness||{};if(a.color=new Nt(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],Sr),a.opacity=h[3]}d.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",d.baseColorTexture,jn)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),s=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}o.doubleSided===!0&&(a.side=ko);const u=o.alphaMode||m_.OPAQUE;if(u===m_.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===m_.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Yt(1,1),o.normalTexture.scale!==void 0)){const d=o.normalTexture.scale;a.normalScale.set(d,d)}if(o.occlusionTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ra){const d=o.emissiveFactor;a.emissive=new Nt().setRGB(d[0],d[1],d[2],Sr)}return o.emissiveTexture!==void 0&&s!==Ra&&c.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,jn)),Promise.all(c).then(function(){const d=new s(a);return o.name&&(d.name=o.name),Ca(d,o),n.associations.set(d,{materials:e}),o.extensions&&R1(i,d,o),d})}createUniqueName(e){const n=Qn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[Wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return ak(l,a,n)})}const s=[];for(let a=0,l=e.length;a0&&h0r(_,o),_.name=n.createUniqueName(o.name||"mesh_"+e),Ca(_,o),Q.extensions&&R1(i,_,Q),n.assignFinalMaterial(_),d.push(_)}for(let f=0,m=d.length;f1?u=new G1:c.length===1?u=c[0]:u=new $n,u!==c[0])for(let d=0,h=c.length;d{const d=new Map;for(const[h,f]of i.associations)(h instanceof fo||h instanceof xr)&&d.set(h,f);return u.traverse(h=>{const f=i.associations.get(h);f!=null&&d.set(h,f)}),d};return i.associations=c(o),o})}_createAnimationTracks(e,n,r,i,o){const s=[],a=e.name?e.name:e.uuid,l=[];ma[o.path]===ma.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(ma[o.path]){case ma.weights:c=mc;break;case ma.rotation:c=v2;break;case ma.position:case ma.scale:c=gc;break;default:switch(r.itemSize){case 1:c=mc;break;case 2:case 3:default:c=gc;break}break}const u=i.interpolation!==void 0?d0r[i.interpolation]:pc,d=this._getArrayFromAccessor(r);for(let h=0,f=l.length;h{Ze.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,tt.emit("stop_webcam_video_stream"),qe(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},y0r=["src"],b0r=["src"],E0r={class:"controls"},x0r={key:2};function S0r(t,e,n,r,i,o){return k(),P("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(k(),P("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,y0r)):ne("",!0),i.isVideoActive&&i.imageDataUrl==null?(k(),P("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,b0r)):ne("",!0),g("div",E0r,[i.isVideoActive?ne("",!0):(k(),P("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...s)=>o.startVideoStream&&o.startVideoStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(k(),P("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...s)=>o.stopVideoStream&&o.stopVideoStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"video"},null,-1)]))):ne("",!0),i.isVideoActive?(k(),P("span",x0r,"FPS: "+le(i.frameRate),1)):ne("",!0)])],36)}const L0r=yt(v0r,[["render",S0r]]),C0r={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){tt.emit("start_audio_stream",()=>{this.isAudioActive=!0}),qe(()=>{Ze.replace()})},stopAudioStream(){tt.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),qe(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},A0r=["src"],w0r={class:"controls"};function M0r(t,e,n,r,i,o){return k(),P("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(k(),P("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,A0r)):ne("",!0),g("div",w0r,[i.isAudioActive?ne("",!0):(k(),P("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...s)=>o.startAudioStream&&o.startAudioStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(k(),P("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...s)=>o.stopAudioStream&&o.stopAudioStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"mic"},null,-1)]))):ne("",!0)])],36)}const O0r=yt(C0r,[["render",M0r]]),R0r={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:L0r,AudioFrame:O0r},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),qe(()=>{Ze.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new e4r,this.camera=new Wr(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new JU,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube);const n=new w4r(4210752),r=new aG(16777215,.5);r.position.set(0,1,0),this.scene.add(n),this.scene.add(r),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new F4r().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Va,n=new sG().load(t),r=new Ra({map:n});this.cube=new Yr(e,r),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},N0r={ref:"webglContainer"},D0r={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},I0r={key:0,class:"text-center"},k0r={key:1,class:"text-center"},P0r={class:"floating-frame2"},H0r=["innerHTML"];function V0r(t,e,n,r,i,o){const s=pt("VideoFrame"),a=pt("AudioFrame");return k(),P(ze,null,[g("div",N0r,null,512),g("div",D0r,[!i.activePersonality||!i.activePersonality.scene_path?(k(),P("div",I0r," Personality does not have a 3d avatar. ")):ne("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(k(),P("div",k0r," Personality does not have an avatar. ")):ne("",!0),g("div",P0r,[g("div",{innerHTML:t.htmlContent},null,8,H0r)])]),oe(s,{ref:"video_frame"},null,512),oe(a,{ref:"audio_frame"},null,512)],64)}const F0r=yt(R0r,[["render",V0r]]);let V5;const B0r=new Uint8Array(16);function $0r(){if(!V5&&(V5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!V5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V5(B0r)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function U0r(t,e=0){return vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]}const G0r=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lk={randomUUID:G0r};function Fs(t,e,n){if(lk.randomUUID&&!e&&!t)return lk.randomUUID();t=t||{};const r=t.random||(t.rng||$0r)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,U0r(r)}class t2{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function q3r(t,e,n){let r=new eE;const i=new Yt,o=new Yt,s=new Mn,a=new B3r({depthPacking:Lar}),l=new $3r,c={},u=n.maxTextureSize,d={[Us]:ui,[ui]:Us,[ko]:ko},h=new Q2({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yt},radius:{value:4}},vertexShader:U3r,fragmentShader:G3r}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const m=new rs;m.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const T=new Yr(m,h),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bU;let _=this.type;this.render=function(E,x,L){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||E.length===0)return;const M=t.getRenderTarget(),C=t.getActiveCubeFace(),A=t.getActiveMipmapLevel(),I=t.state;I.setBlending(ka),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const N=_!==Es&&this.type===Es,H=_===Es&&this.type!==Es;for(let O=0,B=E.length;Ou||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/G.x),i.x=o.x*G.x,U.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/G.y),i.y=o.y*G.y,U.mapSize.y=o.y)),U.map===null||N===!0||H===!0){const W=this.type!==Es?{minFilter:hr,magFilter:hr}:{};U.map!==null&&U.map.dispose(),U.map=new _2(i.x,i.y,W),U.map.texture.name=V.name+".shadowMap",U.camera.updateProjectionMatrix()}t.setRenderTarget(U.map),t.clear();const K=U.getViewportCount();for(let W=0;W0||x.map&&x.alphaTest>0){const I=C.uuid,N=x.uuid;let H=c[I];H===void 0&&(H={},c[I]=H);let O=H[N];O===void 0&&(O=C.clone(),H[N]=O),C=O}if(C.visible=x.visible,C.wireframe=x.wireframe,M===Es?C.side=x.shadowSide!==null?x.shadowSide:x.side:C.side=x.shadowSide!==null?x.shadowSide:d[x.side],C.alphaMap=x.alphaMap,C.alphaTest=x.alphaTest,C.map=x.map,C.clipShadows=x.clipShadows,C.clippingPlanes=x.clippingPlanes,C.clipIntersection=x.clipIntersection,C.displacementMap=x.displacementMap,C.displacementScale=x.displacementScale,C.displacementBias=x.displacementBias,C.wireframeLinewidth=x.wireframeLinewidth,C.linewidth=x.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const I=t.properties.get(C);I.light=L}return C}function b(E,x,L,M,C){if(E.visible===!1)return;if(E.layers.test(x.layers)&&(E.isMesh||E.isLine||E.isPoints)&&(E.castShadow||E.receiveShadow&&C===Es)&&(!E.frustumCulled||r.intersectsObject(E))){E.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,E.matrixWorld);const N=e.update(E),H=E.material;if(Array.isArray(H)){const O=N.groups;for(let B=0,V=O.length;B=1):W.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(W)[1]),G=K>=2);let te=null,de={};const X=t.getParameter(t.SCISSOR_BOX),$=t.getParameter(t.VIEWPORT),ce=new Mn().fromArray(X),ye=new Mn().fromArray($);function z(me,Ye,Ue,Pe){const Xe=new Uint8Array(4),vt=t.createTexture();t.bindTexture(me,vt),t.texParameteri(me,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(me,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let T;const Q=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(Z,q){return _?new OffscreenCanvas(Z,q):a0("canvas")}function y(Z,q,pe,ue){let _e=1;if((Z.width>ue||Z.height>ue)&&(_e=ue/Math.max(Z.width,Z.height)),_e<1||q===!0)if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap){const Ae=q?gd:Math.floor,Ie=Ae(_e*Z.width),He=Ae(_e*Z.height);T===void 0&&(T=v(Ie,He));const $e=pe?v(Ie,He):T;return $e.width=Ie,$e.height=He,$e.getContext("2d").drawImage(Z,0,0,Ie,He),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+Ie+"x"+He+")."),$e}else return"data"in Z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),Z;return Z}function b(Z){return jQ(Z.width)&&jQ(Z.height)}function E(Z){return a?!1:Z.wrapS!==Pi||Z.wrapT!==Pi||Z.minFilter!==hr&&Z.minFilter!==ii}function x(Z,q){return Z.generateMipmaps&&q&&Z.minFilter!==hr&&Z.minFilter!==ii}function L(Z){t.generateMipmap(Z)}function M(Z,q,pe,ue,_e=!1){if(a===!1)return q;if(Z!==null){if(t[Z]!==void 0)return t[Z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let Ae=q;if(q===t.RED&&(pe===t.FLOAT&&(Ae=t.R32F),pe===t.HALF_FLOAT&&(Ae=t.R16F),pe===t.UNSIGNED_BYTE&&(Ae=t.R8)),q===t.RED_INTEGER&&(pe===t.UNSIGNED_BYTE&&(Ae=t.R8UI),pe===t.UNSIGNED_SHORT&&(Ae=t.R16UI),pe===t.UNSIGNED_INT&&(Ae=t.R32UI),pe===t.BYTE&&(Ae=t.R8I),pe===t.SHORT&&(Ae=t.R16I),pe===t.INT&&(Ae=t.R32I)),q===t.RG&&(pe===t.FLOAT&&(Ae=t.RG32F),pe===t.HALF_FLOAT&&(Ae=t.RG16F),pe===t.UNSIGNED_BYTE&&(Ae=t.RG8)),q===t.RGBA){const Ie=_e?pd:Tn.getTransfer(ue);pe===t.FLOAT&&(Ae=t.RGBA32F),pe===t.HALF_FLOAT&&(Ae=t.RGBA16F),pe===t.UNSIGNED_BYTE&&(Ae=Ie===kn?t.SRGB8_ALPHA8:t.RGBA8),pe===t.UNSIGNED_SHORT_4_4_4_4&&(Ae=t.RGBA4),pe===t.UNSIGNED_SHORT_5_5_5_1&&(Ae=t.RGB5_A1)}return(Ae===t.R16F||Ae===t.R32F||Ae===t.RG16F||Ae===t.RG32F||Ae===t.RGBA16F||Ae===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function C(Z,q,pe){return x(Z,pe)===!0||Z.isFramebufferTexture&&Z.minFilter!==hr&&Z.minFilter!==ii?Math.log2(Math.max(q.width,q.height))+1:Z.mipmaps!==void 0&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?q.mipmaps.length:1}function A(Z){return Z===hr||Z===UQ||Z===tu?t.NEAREST:t.LINEAR}function I(Z){const q=Z.target;q.removeEventListener("dispose",I),H(q),q.isVideoTexture&&m.delete(q)}function N(Z){const q=Z.target;q.removeEventListener("dispose",N),B(q)}function H(Z){const q=r.get(Z);if(q.__webglInit===void 0)return;const pe=Z.source,ue=Q.get(pe);if(ue){const _e=ue[q.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&O(Z),Object.keys(ue).length===0&&Q.delete(pe)}r.remove(Z)}function O(Z){const q=r.get(Z);t.deleteTexture(q.__webglTexture);const pe=Z.source,ue=Q.get(pe);delete ue[q.__cacheKey],s.memory.textures--}function B(Z){const q=Z.texture,pe=r.get(Z),ue=r.get(q);if(ue.__webglTexture!==void 0&&(t.deleteTexture(ue.__webglTexture),s.memory.textures--),Z.depthTexture&&Z.depthTexture.dispose(),Z.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(pe.__webglFramebuffer[_e]))for(let Ae=0;Ae=l&&console.warn("THREE.WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+l),V+=1,Z}function K(Z){const q=[];return q.push(Z.wrapS),q.push(Z.wrapT),q.push(Z.wrapR||0),q.push(Z.magFilter),q.push(Z.minFilter),q.push(Z.anisotropy),q.push(Z.internalFormat),q.push(Z.format),q.push(Z.type),q.push(Z.generateMipmaps),q.push(Z.premultiplyAlpha),q.push(Z.flipY),q.push(Z.unpackAlignment),q.push(Z.colorSpace),q.join()}function W(Z,q){const pe=r.get(Z);if(Z.isVideoTexture&&Me(Z),Z.isRenderTargetTexture===!1&&Z.version>0&&pe.__version!==Z.version){const ue=Z.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{fe(pe,Z,q);return}}n.bindTexture(t.TEXTURE_2D,pe.__webglTexture,t.TEXTURE0+q)}function te(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_2D_ARRAY,pe.__webglTexture,t.TEXTURE0+q)}function de(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_3D,pe.__webglTexture,t.TEXTURE0+q)}function X(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){be(pe,Z,q);return}n.bindTexture(t.TEXTURE_CUBE_MAP,pe.__webglTexture,t.TEXTURE0+q)}const $={[dc]:t.REPEAT,[Pi]:t.CLAMP_TO_EDGE,[fd]:t.MIRRORED_REPEAT},ce={[hr]:t.NEAREST,[UQ]:t.NEAREST_MIPMAP_NEAREST,[tu]:t.NEAREST_MIPMAP_LINEAR,[ii]:t.LINEAR,[xU]:t.LINEAR_MIPMAP_NEAREST,[g2]:t.LINEAR_MIPMAP_LINEAR},ye={[Aar]:t.NEVER,[Dar]:t.ALWAYS,[war]:t.LESS,[DU]:t.LEQUAL,[Mar]:t.EQUAL,[Nar]:t.GEQUAL,[Oar]:t.GREATER,[Rar]:t.NOTEQUAL};function z(Z,q,pe){if(pe?(t.texParameteri(Z,t.TEXTURE_WRAP_S,$[q.wrapS]),t.texParameteri(Z,t.TEXTURE_WRAP_T,$[q.wrapT]),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,$[q.wrapR]),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,ce[q.magFilter]),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,ce[q.minFilter])):(t.texParameteri(Z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(Z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(q.wrapS!==Pi||q.wrapT!==Pi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,A(q.magFilter)),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,A(q.minFilter)),q.minFilter!==hr&&q.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),q.compareFunction&&(t.texParameteri(Z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Z,t.TEXTURE_COMPARE_FUNC,ye[q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ue=e.get("EXT_texture_filter_anisotropic");if(q.magFilter===hr||q.minFilter!==tu&&q.minFilter!==g2||q.type===Ms&&e.has("OES_texture_float_linear")===!1||a===!1&&q.type===o0&&e.has("OES_texture_half_float_linear")===!1)return;(q.anisotropy>1||r.get(q).__currentAnisotropy)&&(t.texParameterf(Z,ue.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(q.anisotropy,i.getMaxAnisotropy())),r.get(q).__currentAnisotropy=q.anisotropy)}}function re(Z,q){let pe=!1;Z.__webglInit===void 0&&(Z.__webglInit=!0,q.addEventListener("dispose",I));const ue=q.source;let _e=Q.get(ue);_e===void 0&&(_e={},Q.set(ue,_e));const Ae=K(q);if(Ae!==Z.__cacheKey){_e[Ae]===void 0&&(_e[Ae]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,pe=!0),_e[Ae].usedTimes++;const Ie=_e[Z.__cacheKey];Ie!==void 0&&(_e[Z.__cacheKey].usedTimes--,Ie.usedTimes===0&&O(q)),Z.__cacheKey=Ae,Z.__webglTexture=_e[Ae].texture}return pe}function fe(Z,q,pe){let ue=t.TEXTURE_2D;(q.isDataArrayTexture||q.isCompressedArrayTexture)&&(ue=t.TEXTURE_2D_ARRAY),q.isData3DTexture&&(ue=t.TEXTURE_3D);const _e=re(Z,q),Ae=q.source;n.bindTexture(ue,Z.__webglTexture,t.TEXTURE0+pe);const Ie=r.get(Ae);if(Ae.version!==Ie.__version||_e===!0){n.activeTexture(t.TEXTURE0+pe);const He=Tn.getPrimaries(Tn.workingColorSpace),$e=q.colorSpace===Vi?null:Tn.getPrimaries(q.colorSpace),lt=q.colorSpace===Vi||He===$e?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,q.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,q.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);const st=E(q)&&b(q.image)===!1;let Fe=y(q.image,st,!1,u);Fe=ke(q,Fe);const It=b(Fe)||a,Tt=o.convert(q.format,q.colorSpace);let mt=o.convert(q.type),ut=M(q.internalFormat,Tt,mt,q.colorSpace,q.isVideoTexture);z(ue,q,It);let ot;const ct=q.mipmaps,me=a&&q.isVideoTexture!==!0&&ut!==OU,Ye=Ie.__version===void 0||_e===!0,Ue=C(q,Fe,It);if(q.isDepthTexture)ut=t.DEPTH_COMPONENT,a?q.type===Ms?ut=t.DEPTH_COMPONENT32F:q.type===Oa?ut=t.DEPTH_COMPONENT24:q.type===X1?ut=t.DEPTH24_STENCIL8:ut=t.DEPTH_COMPONENT16:q.type===Ms&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),q.format===J1&&ut===t.DEPTH_COMPONENT&&q.type!==Kb&&q.type!==Oa&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),q.type=Oa,mt=o.convert(q.type)),q.format===fc&&ut===t.DEPTH_COMPONENT&&(ut=t.DEPTH_STENCIL,q.type!==X1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),q.type=X1,mt=o.convert(q.type))),Ye&&(me?n.texStorage2D(t.TEXTURE_2D,1,ut,Fe.width,Fe.height):n.texImage2D(t.TEXTURE_2D,0,ut,Fe.width,Fe.height,0,Tt,mt,null));else if(q.isDataTexture)if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ue,ut,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe>=1,Xe>>=1}}else if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ue,ut,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe0&&Ye++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Ye,ot,Fe[0].width,Fe[0].height));for(let Pe=0;Pe<6;Pe++)if(st){ct?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,Fe[Pe].width,Fe[Pe].height,mt,ut,Fe[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,ot,Fe[Pe].width,Fe[Pe].height,0,mt,ut,Fe[Pe].data);for(let Xe=0;Xe>Ae),Fe=Math.max(1,q.height>>Ae);_e===t.TEXTURE_3D||_e===t.TEXTURE_2D_ARRAY?n.texImage3D(_e,Ae,$e,st,Fe,q.depth,0,Ie,He,null):n.texImage2D(_e,Ae,$e,st,Fe,0,Ie,He,null)}n.bindFramebuffer(t.FRAMEBUFFER,Z),Se(q)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,0,Oe(q)):(_e===t.TEXTURE_2D||_e>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,Ae),n.bindFramebuffer(t.FRAMEBUFFER,null)}function se(Z,q,pe){if(t.bindRenderbuffer(t.RENDERBUFFER,Z),q.depthBuffer&&!q.stencilBuffer){let ue=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(pe||Se(q)){const _e=q.depthTexture;_e&&_e.isDepthTexture&&(_e.type===Ms?ue=t.DEPTH_COMPONENT32F:_e.type===Oa&&(ue=t.DEPTH_COMPONENT24));const Ae=Oe(q);Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ue,q.width,q.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ue,q.width,q.height)}else t.renderbufferStorage(t.RENDERBUFFER,ue,q.width,q.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,Z)}else if(q.depthBuffer&&q.stencilBuffer){const ue=Oe(q);pe&&Se(q)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,q.width,q.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,Z)}else{const ue=q.isWebGLMultipleRenderTargets===!0?q.texture:[q.texture];for(let _e=0;_e0){pe.__webglFramebuffer[He]=[];for(let $e=0;$e0){pe.__webglFramebuffer=[];for(let He=0;He0&&Se(Z)===!1){const He=Ae?q:[q];pe.__webglMultisampledFramebuffer=t.createFramebuffer(),pe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,pe.__webglMultisampledFramebuffer);for(let $e=0;$e0)for(let $e=0;$e0)for(let $e=0;$e0&&Se(Z)===!1){const q=Z.isWebGLMultipleRenderTargets?Z.texture:[Z.texture],pe=Z.width,ue=Z.height;let _e=t.COLOR_BUFFER_BIT;const Ae=[],Ie=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,He=r.get(Z),$e=Z.isWebGLMultipleRenderTargets===!0;if($e)for(let lt=0;lt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&q.__useRenderToTexture!==!1}function Me(Z){const q=s.render.frame;m.get(Z)!==q&&(m.set(Z,q),Z.update())}function ke(Z,q){const pe=Z.colorSpace,ue=Z.format,_e=Z.type;return Z.isCompressedTexture===!0||Z.isVideoTexture===!0||Z.format===zQ||pe!==Sr&&pe!==Vi&&(Tn.getTransfer(pe)===kn?a===!1?e.has("EXT_sRGB")===!0&&ue===Hi?(Z.format=zQ,Z.minFilter=ii,Z.generateMipmaps=!1):q=kU.sRGBToLinear(q):(ue!==Hi||_e!==Ha)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",pe)),q}this.allocateTextureUnit=G,this.resetTextureUnits=U,this.setTexture2D=W,this.setTexture2DArray=te,this.setTexture3D=de,this.setTextureCube=X,this.rebindTextures=ie,this.setupRenderTarget=Te,this.updateRenderTargetMipmap=Qe,this.updateMultisampleRenderTarget=ae,this.setupDepthRenderbuffer=j,this.setupFrameBufferTexture=Le,this.useMultisampledRTT=Se}function W3r(t,e,n){const r=n.isWebGL2;function i(o,s=Vi){let a;const l=Tn.getTransfer(s);if(o===Ha)return t.UNSIGNED_BYTE;if(o===LU)return t.UNSIGNED_SHORT_4_4_4_4;if(o===CU)return t.UNSIGNED_SHORT_5_5_5_1;if(o===har)return t.BYTE;if(o===Tar)return t.SHORT;if(o===Kb)return t.UNSIGNED_SHORT;if(o===SU)return t.INT;if(o===Oa)return t.UNSIGNED_INT;if(o===Ms)return t.FLOAT;if(o===o0)return r?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===mar)return t.ALPHA;if(o===Hi)return t.RGBA;if(o===gar)return t.LUMINANCE;if(o===_ar)return t.LUMINANCE_ALPHA;if(o===J1)return t.DEPTH_COMPONENT;if(o===fc)return t.DEPTH_STENCIL;if(o===zQ)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===Qar)return t.RED;if(o===AU)return t.RED_INTEGER;if(o===yar)return t.RG;if(o===wU)return t.RG_INTEGER;if(o===MU)return t.RGBA_INTEGER;if(o===Ig||o===kg||o===Pg||o===Hg)if(l===kn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===Ig)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===Ig)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===bD||o===ED||o===xD||o===SD)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===bD)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===ED)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===xD)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===SD)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===OU)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===LD||o===CD)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===LD)return l===kn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===CD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===AD||o===wD||o===MD||o===OD||o===RD||o===ND||o===DD||o===ID||o===kD||o===PD||o===HD||o===VD||o===FD||o===BD)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===AD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===wD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===MD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===OD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===RD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===ND)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===DD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===ID)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===kD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===PD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===HD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===VD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===FD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===BD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===Vg||o===$D||o===UD)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===Vg)return l===kn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===$D)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===UD)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===bar||o===GD||o===qD||o===zD)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===Vg)return a.COMPRESSED_RED_RGTC1_EXT;if(o===GD)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===qD)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===zD)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===X1?r?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class Y3r extends Wr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class G1 extends $n{constructor(){super(),this.isGroup=!0,this.type="Group"}}const K3r={type:"move"};class c_{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new G1,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new G1,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ee,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ee),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new G1,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ee,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ee),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const T of e.hand.values()){const Q=n.getJointPose(T,r),_=this._getHandJoint(c,T);Q!==null&&(_.matrix.fromArray(Q.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=Q.radius),_.visible=Q!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],h=u.position.distanceTo(d.position),f=.02,m=.005;c.inputState.pinching&&h>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(K3r)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new G1;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class Z3r extends zc{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,h=null,f=null,m=null;const T=n.getContextAttributes();let Q=null,_=null;const v=[],y=[],b=new Yt;let E=null;const x=new Wr;x.layers.enable(1),x.viewport=new Mn;const L=new Wr;L.layers.enable(2),L.viewport=new Mn;const M=[x,L],C=new Y3r;C.layers.enable(1),C.layers.enable(2);let A=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getTargetRaySpace()},this.getControllerGrip=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getGripSpace()},this.getHand=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getHandSpace()};function N(X){const $=y.indexOf(X.inputSource);if($===-1)return;const ce=v[$];ce!==void 0&&(ce.update(X.inputSource,X.frame,c||s),ce.dispatchEvent({type:X.type,data:X.inputSource}))}function H(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",H),i.removeEventListener("inputsourceschange",O);for(let X=0;X=0&&(y[ye]=null,v[ye].disconnect(ce))}for(let $=0;$=y.length){y.push(ce),ye=re;break}else if(y[re]===null){y[re]=ce,ye=re;break}if(ye===-1)break}const z=v[ye];z&&z.connect(ce)}}const B=new Ee,V=new Ee;function U(X,$,ce){B.setFromMatrixPosition($.matrixWorld),V.setFromMatrixPosition(ce.matrixWorld);const ye=B.distanceTo(V),z=$.projectionMatrix.elements,re=ce.projectionMatrix.elements,fe=z[14]/(z[10]-1),be=z[14]/(z[10]+1),Le=(z[9]+1)/z[5],se=(z[9]-1)/z[5],Y=(z[8]-1)/z[0],j=(re[8]+1)/re[0],ie=fe*Y,Te=fe*j,Qe=ye/(-Y+j),ae=Qe*-Y;$.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(ae),X.translateZ(Qe),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();const Oe=fe+Qe,Se=be+Qe,Me=ie-ae,ke=Te+(ye-ae),Z=Le*be/Se*Oe,q=se*be/Se*Oe;X.projectionMatrix.makePerspective(Me,ke,Z,q,Oe,Se),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function G(X,$){$===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices($.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;C.near=L.near=x.near=X.near,C.far=L.far=x.far=X.far,(A!==C.near||I!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),A=C.near,I=C.far);const $=X.parent,ce=C.cameras;G(C,$);for(let ye=0;ye0&&(Q.alphaTest.value=_.alphaTest);const v=e.get(_).envMap;if(v&&(Q.envMap.value=v,Q.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=_.reflectivity,Q.ior.value=_.ior,Q.refractionRatio.value=_.refractionRatio),_.lightMap){Q.lightMap.value=_.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=_.lightMapIntensity*y,n(_.lightMap,Q.lightMapTransform)}_.aoMap&&(Q.aoMap.value=_.aoMap,Q.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,Q.aoMapTransform))}function s(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform))}function a(Q,_){Q.dashSize.value=_.dashSize,Q.totalSize.value=_.dashSize+_.gapSize,Q.scale.value=_.scale}function l(Q,_,v,y){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.size.value=_.size*v,Q.scale.value=y*.5,_.map&&(Q.map.value=_.map,n(_.map,Q.uvTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function c(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.rotation.value=_.rotation,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function u(Q,_){Q.specular.value.copy(_.specular),Q.shininess.value=Math.max(_.shininess,1e-4)}function d(Q,_){_.gradientMap&&(Q.gradientMap.value=_.gradientMap)}function h(Q,_){Q.metalness.value=_.metalness,_.metalnessMap&&(Q.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=_.roughness,_.roughnessMap&&(Q.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,Q.roughnessMapTransform)),e.get(_).envMap&&(Q.envMapIntensity.value=_.envMapIntensity)}function f(Q,_,v){Q.ior.value=_.ior,_.sheen>0&&(Q.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),Q.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(Q.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,Q.sheenColorMapTransform)),_.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),_.clearcoat>0&&(Q.clearcoat.value=_.clearcoat,Q.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(Q.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,Q.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===ui&&Q.clearcoatNormalScale.value.negate())),_.iridescence>0&&(Q.iridescence.value=_.iridescence,Q.iridescenceIOR.value=_.iridescenceIOR,Q.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(Q.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,Q.iridescenceMapTransform)),_.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),_.transmission>0&&(Q.transmission.value=_.transmission,Q.transmissionSamplerMap.value=v.texture,Q.transmissionSamplerSize.value.set(v.width,v.height),_.transmissionMap&&(Q.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=_.thickness,_.thicknessMap&&(Q.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=_.attenuationDistance,Q.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(Q.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(Q.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=_.specularIntensity,Q.specularColor.value.copy(_.specularColor),_.specularColorMap&&(Q.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,Q.specularColorMapTransform)),_.specularIntensityMap&&(Q.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,Q.specularIntensityMapTransform))}function m(Q,_){_.matcap&&(Q.matcap.value=_.matcap)}function T(Q,_){const v=e.get(_).light;Q.referencePosition.value.setFromMatrixPosition(v.matrixWorld),Q.nearDistance.value=v.shadow.camera.near,Q.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function J3r(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const b=y.program;r.uniformBlockBinding(v,b)}function c(v,y){let b=i[v.id];b===void 0&&(m(v),b=u(v),i[v.id]=b,v.addEventListener("dispose",Q));const E=y.program;r.updateUBOMapping(v,E);const x=e.render.frame;o[v.id]!==x&&(h(v),o[v.id]=x)}function u(v){const y=d();v.__bindingPointIndex=y;const b=t.createBuffer(),E=v.__size,x=v.usage;return t.bindBuffer(t.UNIFORM_BUFFER,b),t.bufferData(t.UNIFORM_BUFFER,E,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,b),b}function d(){for(let v=0;v0){x=b%E;const N=E-x;x!==0&&N-A.boundary<0&&(b+=E-x,C.__offset=b)}b+=A.storage}return x=b%E,x>0&&(b+=E-x),v.__size=b,v.__cache={},this}function T(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function Q(v){const y=v.target;y.removeEventListener("dispose",Q);const b=s.indexOf(y.__bindingPointIndex);s.splice(b,1),t.deleteBuffer(i[y.id]),delete i[y.id],delete o[y.id]}function _(){for(const v in i)t.deleteBuffer(i[v]);s=[],i={},o={}}return{bind:l,update:c,dispose:_}}class JU{constructor(e={}){const{canvas:n=Kar(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;r!==null?h=r.getContextAttributes().alpha:h=s;const f=new Uint32Array(4),m=new Int32Array(4);let T=null,Q=null;const _=[],v=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=jn,this._useLegacyLights=!1,this.toneMapping=Pa,this.toneMappingExposure=1;const y=this;let b=!1,E=0,x=0,L=null,M=-1,C=null;const A=new Mn,I=new Mn;let N=null;const H=new Nt(0);let O=0,B=n.width,V=n.height,U=1,G=null,K=null;const W=new Mn(0,0,B,V),te=new Mn(0,0,B,V);let de=!1;const X=new eE;let $=!1,ce=!1,ye=null;const z=new zt,re=new Yt,fe=new Ee,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Le(){return L===null?U:1}let se=r;function Y(ee,xe){for(let Ce=0;Ce{function je(){if(Ne.forEach(function(Be){ae.get(Be).currentProgram.isReady()&&Ne.delete(Be)}),Ne.size===0){Re(ee);return}setTimeout(je,10)}j.get("KHR_parallel_shader_compile")!==null?je():setTimeout(je,10)})};let Ot=null;function Hn(ee){Ot&&Ot(ee)}function zn(){Yn.stop()}function an(){Yn.start()}const Yn=new zU;Yn.setAnimationLoop(Hn),typeof self<"u"&&Yn.setContext(self),this.setAnimationLoop=function(ee){Ot=ee,ot.setAnimationLoop(ee),ee===null?Yn.stop():Yn.start()},ot.addEventListener("sessionstart",zn),ot.addEventListener("sessionend",an),this.render=function(ee,xe){if(xe!==void 0&&xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(b===!0)return;ee.matrixWorldAutoUpdate===!0&&ee.updateMatrixWorld(),xe.parent===null&&xe.matrixWorldAutoUpdate===!0&&xe.updateMatrixWorld(),ot.enabled===!0&&ot.isPresenting===!0&&(ot.cameraAutoUpdate===!0&&ot.updateCamera(xe),xe=ot.getCamera()),ee.isScene===!0&&ee.onBeforeRender(y,ee,xe,L),Q=Ae.get(ee,v.length),Q.init(),v.push(Q),z.multiplyMatrices(xe.projectionMatrix,xe.matrixWorldInverse),X.setFromProjectionMatrix(z),ce=this.localClippingEnabled,$=Ie.init(this.clippingPlanes,ce),T=_e.get(ee,_.length),T.init(),_.push(T),Cr(ee,xe,0,y.sortObjects),T.finish(),y.sortObjects===!0&&T.sort(G,K),this.info.render.frame++,$===!0&&Ie.beginShadows();const Ce=Q.state.shadowsArray;if(He.render(Ce,ee,xe),$===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset(),$e.render(T,ee),Q.setupLights(y._useLegacyLights),xe.isArrayCamera){const Ne=xe.cameras;for(let Re=0,je=Ne.length;Re0?Q=v[v.length-1]:Q=null,_.pop(),_.length>0?T=_[_.length-1]:T=null};function Cr(ee,xe,Ce,Ne){if(ee.visible===!1)return;if(ee.layers.test(xe.layers)){if(ee.isGroup)Ce=ee.renderOrder;else if(ee.isLOD)ee.autoUpdate===!0&&ee.update(xe);else if(ee.isLight)Q.pushLight(ee),ee.castShadow&&Q.pushShadow(ee);else if(ee.isSprite){if(!ee.frustumCulled||X.intersectsSprite(ee)){Ne&&fe.setFromMatrixPosition(ee.matrixWorld).applyMatrix4(z);const Be=q.update(ee),F=ee.material;F.visible&&T.push(ee,Be,F,Ce,fe.z,null)}}else if((ee.isMesh||ee.isLine||ee.isPoints)&&(!ee.frustumCulled||X.intersectsObject(ee))){const Be=q.update(ee),F=ee.material;if(Ne&&(ee.boundingSphere!==void 0?(ee.boundingSphere===null&&ee.computeBoundingSphere(),fe.copy(ee.boundingSphere.center)):(Be.boundingSphere===null&&Be.computeBoundingSphere(),fe.copy(Be.boundingSphere.center)),fe.applyMatrix4(ee.matrixWorld).applyMatrix4(z)),Array.isArray(F)){const et=Be.groups;for(let bt=0,gt=et.length;bt0&&So(Re,je,xe,Ce),Ne&&Te.viewport(A.copy(Ne)),Re.length>0&&Gt(Re,xe,Ce),je.length>0&&Gt(je,xe,Ce),Be.length>0&&Gt(Be,xe,Ce),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1)}function So(ee,xe,Ce,Ne){if((Ce.isScene===!0?Ce.overrideMaterial:null)!==null)return;const je=ie.isWebGL2;ye===null&&(ye=new _2(1,1,{generateMipmaps:!0,type:j.has("EXT_color_buffer_half_float")?o0:Ha,minFilter:g2,samples:je?4:0})),y.getDrawingBufferSize(re),je?ye.setSize(re.x,re.y):ye.setSize(gd(re.x),gd(re.y));const Be=y.getRenderTarget();y.setRenderTarget(ye),y.getClearColor(H),O=y.getClearAlpha(),O<1&&y.setClearColor(16777215,.5),y.clear();const F=y.toneMapping;y.toneMapping=Pa,Gt(ee,Ce,Ne),Oe.updateMultisampleRenderTarget(ye),Oe.updateRenderTargetMipmap(ye);let et=!1;for(let bt=0,gt=xe.length;bt0),Qt=!!Ce.morphAttributes.position,Ht=!!Ce.morphAttributes.normal,Kt=!!Ce.morphAttributes.color;let un=Pa;Ne.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(un=y.toneMapping);const Ar=Ce.morphAttributes.position||Ce.morphAttributes.normal||Ce.morphAttributes.color,on=Ar!==void 0?Ar.length:0,$t=ae.get(Ne),M2=Q.state.lights;if($===!0&&(ce===!0||ee!==C)){const Vr=ee===C&&Ne.id===M;Ie.setState(Ne,ee,Vr)}let Dn=!1;Ne.version===$t.__version?($t.needsLights&&$t.lightsStateVersion!==M2.state.version||$t.outputColorSpace!==F||Re.isBatchedMesh&&$t.batching===!1||!Re.isBatchedMesh&&$t.batching===!0||Re.isInstancedMesh&&$t.instancing===!1||!Re.isInstancedMesh&&$t.instancing===!0||Re.isSkinnedMesh&&$t.skinning===!1||!Re.isSkinnedMesh&&$t.skinning===!0||Re.isInstancedMesh&&$t.instancingColor===!0&&Re.instanceColor===null||Re.isInstancedMesh&&$t.instancingColor===!1&&Re.instanceColor!==null||$t.envMap!==et||Ne.fog===!0&&$t.fog!==je||$t.numClippingPlanes!==void 0&&($t.numClippingPlanes!==Ie.numPlanes||$t.numIntersection!==Ie.numIntersection)||$t.vertexAlphas!==bt||$t.vertexTangents!==gt||$t.morphTargets!==Qt||$t.morphNormals!==Ht||$t.morphColors!==Kt||$t.toneMapping!==un||ie.isWebGL2===!0&&$t.morphTargetsCount!==on)&&(Dn=!0):(Dn=!0,$t.__version=Ne.version);let Lo=$t.currentProgram;Dn===!0&&(Lo=Xn(Ne,xe,Re));let Xc=!1,os=!1,O2=!1;const mn=Lo.getUniforms(),Ai=$t.uniforms;if(Te.useProgram(Lo.program)&&(Xc=!0,os=!0,O2=!0),Ne.id!==M&&(M=Ne.id,os=!0),Xc||C!==ee){mn.setValue(se,"projectionMatrix",ee.projectionMatrix),mn.setValue(se,"viewMatrix",ee.matrixWorldInverse);const Vr=mn.map.cameraPosition;Vr!==void 0&&Vr.setValue(se,fe.setFromMatrixPosition(ee.matrixWorld)),ie.logarithmicDepthBuffer&&mn.setValue(se,"logDepthBufFC",2/(Math.log(ee.far+1)/Math.LN2)),(Ne.isMeshPhongMaterial||Ne.isMeshToonMaterial||Ne.isMeshLambertMaterial||Ne.isMeshBasicMaterial||Ne.isMeshStandardMaterial||Ne.isShaderMaterial)&&mn.setValue(se,"isOrthographic",ee.isOrthographicCamera===!0),C!==ee&&(C=ee,os=!0,O2=!0)}if(Re.isSkinnedMesh){mn.setOptional(se,Re,"bindMatrix"),mn.setOptional(se,Re,"bindMatrixInverse");const Vr=Re.skeleton;Vr&&(ie.floatVertexTextures?(Vr.boneTexture===null&&Vr.computeBoneTexture(),mn.setValue(se,"boneTexture",Vr.boneTexture,Oe)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Re.isBatchedMesh&&(mn.setOptional(se,Re,"batchingTexture"),mn.setValue(se,"batchingTexture",Re._matricesTexture,Oe));const Jr=Ce.morphAttributes;if((Jr.position!==void 0||Jr.normal!==void 0||Jr.color!==void 0&&ie.isWebGL2===!0)&<.update(Re,Ce,Lo),(os||$t.receiveShadow!==Re.receiveShadow)&&($t.receiveShadow=Re.receiveShadow,mn.setValue(se,"receiveShadow",Re.receiveShadow)),Ne.isMeshGouraudMaterial&&Ne.envMap!==null&&(Ai.envMap.value=et,Ai.flipEnvMap.value=et.isCubeTexture&&et.isRenderTargetTexture===!1?-1:1),os&&(mn.setValue(se,"toneMappingExposure",y.toneMappingExposure),$t.needsLights&&ea(Ai,O2),je&&Ne.fog===!0&&ue.refreshFogUniforms(Ai,je),ue.refreshMaterialUniforms(Ai,Ne,U,V,ye),nu.upload(se,hi($t),Ai,Oe)),Ne.isShaderMaterial&&Ne.uniformsNeedUpdate===!0&&(nu.upload(se,hi($t),Ai,Oe),Ne.uniformsNeedUpdate=!1),Ne.isSpriteMaterial&&mn.setValue(se,"center",Re.center),mn.setValue(se,"modelViewMatrix",Re.modelViewMatrix),mn.setValue(se,"normalMatrix",Re.normalMatrix),mn.setValue(se,"modelMatrix",Re.matrixWorld),Ne.isShaderMaterial||Ne.isRawShaderMaterial){const Vr=Ne.uniformsGroups;for(let R2=0,wi=Vr.length;R20&&Oe.useMultisampledRTT(ee)===!1?Re=ae.get(ee).__webglMultisampledFramebuffer:Array.isArray(gt)?Re=gt[Ce]:Re=gt,A.copy(ee.viewport),I.copy(ee.scissor),N=ee.scissorTest}else A.copy(W).multiplyScalar(U).floor(),I.copy(te).multiplyScalar(U).floor(),N=de;if(Te.bindFramebuffer(se.FRAMEBUFFER,Re)&&ie.drawBuffers&&Ne&&Te.drawBuffers(ee,Re),Te.viewport(A),Te.scissor(I),Te.setScissorTest(N),je){const et=ae.get(ee.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+xe,et.__webglTexture,Ce)}else if(Be){const et=ae.get(ee.texture),bt=xe||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,et.__webglTexture,Ce||0,bt)}M=-1},this.readRenderTargetPixels=function(ee,xe,Ce,Ne,Re,je,Be){if(!(ee&&ee.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let F=ae.get(ee).__webglFramebuffer;if(ee.isWebGLCubeRenderTarget&&Be!==void 0&&(F=F[Be]),F){Te.bindFramebuffer(se.FRAMEBUFFER,F);try{const et=ee.texture,bt=et.format,gt=et.type;if(bt!==Hi&&It.convert(bt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Qt=gt===o0&&(j.has("EXT_color_buffer_half_float")||ie.isWebGL2&&j.has("EXT_color_buffer_float"));if(gt!==Ha&&It.convert(gt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&!(gt===Ms&&(ie.isWebGL2||j.has("OES_texture_float")||j.has("WEBGL_color_buffer_float")))&&!Qt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}xe>=0&&xe<=ee.width-Ne&&Ce>=0&&Ce<=ee.height-Re&&se.readPixels(xe,Ce,Ne,Re,It.convert(bt),It.convert(gt),je)}finally{const et=L!==null?ae.get(L).__webglFramebuffer:null;Te.bindFramebuffer(se.FRAMEBUFFER,et)}}},this.copyFramebufferToTexture=function(ee,xe,Ce=0){const Ne=Math.pow(2,-Ce),Re=Math.floor(xe.image.width*Ne),je=Math.floor(xe.image.height*Ne);Oe.setTexture2D(xe,0),se.copyTexSubImage2D(se.TEXTURE_2D,Ce,0,0,ee.x,ee.y,Re,je),Te.unbindTexture()},this.copyTextureToTexture=function(ee,xe,Ce,Ne=0){const Re=xe.image.width,je=xe.image.height,Be=It.convert(Ce.format),F=It.convert(Ce.type);Oe.setTexture2D(Ce,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ce.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ce.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ce.unpackAlignment),xe.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Re,je,Be,F,xe.image.data):xe.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,xe.mipmaps[0].width,xe.mipmaps[0].height,Be,xe.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Be,F,xe.image),Ne===0&&Ce.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Te.unbindTexture()},this.copyTextureToTexture3D=function(ee,xe,Ce,Ne,Re=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const je=ee.max.x-ee.min.x+1,Be=ee.max.y-ee.min.y+1,F=ee.max.z-ee.min.z+1,et=It.convert(Ne.format),bt=It.convert(Ne.type);let gt;if(Ne.isData3DTexture)Oe.setTexture3D(Ne,0),gt=se.TEXTURE_3D;else if(Ne.isDataArrayTexture)Oe.setTexture2DArray(Ne,0),gt=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ne.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ne.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ne.unpackAlignment);const Qt=se.getParameter(se.UNPACK_ROW_LENGTH),Ht=se.getParameter(se.UNPACK_IMAGE_HEIGHT),Kt=se.getParameter(se.UNPACK_SKIP_PIXELS),un=se.getParameter(se.UNPACK_SKIP_ROWS),Ar=se.getParameter(se.UNPACK_SKIP_IMAGES),on=Ce.isCompressedTexture?Ce.mipmaps[0]:Ce.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,on.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,on.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,ee.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,ee.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,ee.min.z),Ce.isDataTexture||Ce.isData3DTexture?se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,bt,on.data):Ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),se.compressedTexSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,on.data)):se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,je,Be,F,et,bt,on),se.pixelStorei(se.UNPACK_ROW_LENGTH,Qt),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Ht),se.pixelStorei(se.UNPACK_SKIP_PIXELS,Kt),se.pixelStorei(se.UNPACK_SKIP_ROWS,un),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ar),Re===0&&Ne.generateMipmaps&&se.generateMipmap(gt),Te.unbindTexture()},this.initTexture=function(ee){ee.isCubeTexture?Oe.setTextureCube(ee,0):ee.isData3DTexture?Oe.setTexture3D(ee,0):ee.isDataArrayTexture||ee.isCompressedArrayTexture?Oe.setTexture2DArray(ee,0):Oe.setTexture2D(ee,0),Te.unbindTexture()},this.resetState=function(){E=0,x=0,L=null,Te.reset(),Tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Os}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===Xb?"display-p3":"srgb",n.unpackColorSpace=Tn.workingColorSpace===x9?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===jn?e2:NU}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===e2?jn:Sr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class e4r extends JU{}e4r.prototype.isWebGL1Renderer=!0;class t4r extends $n{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class n4r{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=uo()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;il)continue;h.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(h);Me.far||n.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const _=Math.max(0,s.start),v=Math.min(Q.count,s.start+s.count);for(let y=_,b=v-1;yl)continue;h.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(h);xe.far||n.push({distance:x,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class aE extends fo{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Nt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Zs extends aE{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Yt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Dr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Nt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Nt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Nt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class XI extends fo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Nt(16777215),this.specular=new Nt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function H5(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function f4r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p4r(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function JI(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function rG(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}class n6{constructor(e,n,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let r=this._cachedIndex,i=n[r],o=n[r-1];e:{t:{let s;n:{r:if(!(e=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&f4r(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Fg,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}is.prototype.TimeBufferType=Float32Array;is.prototype.ValueBufferType=Float32Array;is.prototype.DefaultInterpolation=pc;class Wc extends is{}Wc.prototype.ValueTypeName="bool";Wc.prototype.ValueBufferType=Array;Wc.prototype.DefaultInterpolation=s0;Wc.prototype.InterpolantFactoryMethodLinear=void 0;Wc.prototype.InterpolantFactoryMethodSmooth=void 0;class iG extends is{}iG.prototype.ValueTypeName="color";class mc extends is{}mc.prototype.ValueTypeName="number";class g4r extends n6{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)n1.slerpFlat(o,0,s,c-a,s,c,l);return o}}class v2 extends is{InterpolantFactoryMethodLinear(e){return new g4r(this.times,this.values,this.getValueSize(),e)}}v2.prototype.ValueTypeName="quaternion";v2.prototype.DefaultInterpolation=pc;v2.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends is{}Yc.prototype.ValueTypeName="string";Yc.prototype.ValueBufferType=Array;Yc.prototype.DefaultInterpolation=s0;Yc.prototype.InterpolantFactoryMethodLinear=void 0;Yc.prototype.InterpolantFactoryMethodSmooth=void 0;class gc extends is{}gc.prototype.ValueTypeName="vector";class _4r{constructor(e,n=-1,r,i=Ear){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=uo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(v4r(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(is.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let h=i[d];h||(i[d]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,h,f,m,T){if(f.length!==0){const Q=[],_=[];rG(f,Q,_,m),Q.length!==0&&T.push(new d(h,Q,_))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(ys[e]!==void 0){ys[e].push({onLoad:n,onProgress:r,onError:i});return}ys[e]=[],ys[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=ys[e],d=c.body.getReader(),h=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),f=h?parseInt(h):0,m=f!==0;let T=0;const Q=new ReadableStream({start(_){v();function v(){d.read().then(({done:y,value:b})=>{if(y)_.close();else{T+=b.byteLength;const E=new ProgressEvent("progress",{lengthComputable:m,loaded:T,total:f});for(let x=0,L=u.length;x{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{_c.add(e,c);const u=ys[e];delete ys[e];for(let d=0,h=u.length;d{const u=ys[e];if(u===void 0)throw this.manager.itemError(e),c;delete ys[e];for(let d=0,h=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class x4r extends Kc{constructor(e){super(e)}load(e,n,r,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a=a0("img");function l(){u(),_c.add(e,this),n&&n(this),o.manager.itemEnd(e)}function c(d){u(),i&&i(d),o.manager.itemError(e),o.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class sG extends Kc{constructor(e){super(e)}load(e,n,r,i){const o=new xr,s=new x4r(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a,o.needsUpdate=!0,n!==void 0&&n(o)},r,i),o}}class A9 extends $n{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Nt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const p_=new zt,ek=new Ee,tk=new Ee;class lE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Yt(512,512),this.map=null,this.mapPass=null,this.matrix=new zt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new eE,this._frameExtents=new Yt(1,1),this._viewportCount=1,this._viewports=[new Mn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,r=this.matrix;ek.setFromMatrixPosition(e.matrixWorld),n.position.copy(ek),tk.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(tk),n.updateMatrixWorld(),p_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(p_),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(p_)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class S4r extends lE{constructor(){super(new Wr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,r=hc*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||n.far;(r!==n.fov||i!==n.aspect||o!==n.far)&&(n.fov=r,n.aspect=i,n.far=o,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class L4r extends A9{constructor(e,n,r=0,i=Math.PI/3,o=0,s=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.distance=r,this.angle=i,this.penumbra=o,this.decay=s,this.map=null,this.shadow=new S4r}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const nk=new zt,u4=new Ee,h_=new Ee;class C4r extends lE{constructor(){super(new Wr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Yt(4,2),this._viewportCount=6,this._viewports=[new Mn(2,1,1,1),new Mn(0,1,1,1),new Mn(3,1,1,1),new Mn(1,1,1,1),new Mn(3,0,1,1),new Mn(1,0,1,1)],this._cubeDirections=[new Ee(1,0,0),new Ee(-1,0,0),new Ee(0,0,1),new Ee(0,0,-1),new Ee(0,1,0),new Ee(0,-1,0)],this._cubeUps=[new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,0,1),new Ee(0,0,-1)]}updateMatrices(e,n=0){const r=this.camera,i=this.matrix,o=e.distance||r.far;o!==r.far&&(r.far=o,r.updateProjectionMatrix()),u4.setFromMatrixPosition(e.matrixWorld),r.position.copy(u4),h_.copy(r.position),h_.add(this._cubeDirections[n]),r.up.copy(this._cubeUps[n]),r.lookAt(h_),r.updateMatrixWorld(),i.makeTranslation(-u4.x,-u4.y,-u4.z),nk.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nk)}}class A4r extends A9{constructor(e,n,r=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new C4r}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class w4r extends lE{constructor(){super(new nE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aG extends A9{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.shadow=new w4r}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class M4r extends A9{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class D4{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){_c.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}const cE="\\[\\]\\.:\\/",R4r=new RegExp("["+cE+"]","g"),uE="[^"+cE+"]",N4r="[^"+cE.replace("\\.","")+"]",D4r=/((?:WC+[\/:])*)/.source.replace("WC",uE),I4r=/(WCOD+)?/.source.replace("WCOD",N4r),k4r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uE),P4r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uE),H4r=new RegExp("^"+D4r+I4r+k4r+P4r+"$"),V4r=["material","materials","bones","map"];class F4r{constructor(e,n,r){const i=r||Qn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Qn{constructor(e,n,r){this.path=n,this.parsedPath=r||Qn.parseTrackName(n),this.node=Qn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Qn.Composite(e,n,r):new Qn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(R4r,"")}static parseTrackName(e){const n=H4r.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);V4r.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=2.0 are supported."));return}const c=new Q0r(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(s),c.setPlugins(a),c.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function $4r(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class U4r{constructor(e){this.parser=e,this.name=Wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,s)}}class n0r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class r0r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class i0r{constructor(e){this.name=Wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,c=i.byteLength||0,u=i.count,d=i.byteStride,h=new Uint8Array(a,l,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(u,d,h,i.mode,i.filter).then(function(f){return f.buffer}):s.ready.then(function(){const f=new ArrayBuffer(u*d);return s.decodeGltfBuffer(new Uint8Array(f),u,d,h,i.mode,i.filter),f})})}else return null}}class o0r{constructor(e){this.name=Wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const c of i.primitives)if(c.mode!==Ii.TRIANGLES&&c.mode!==Ii.TRIANGLE_STRIP&&c.mode!==Ii.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],h=c[0].count,f=[];for(const m of d){const T=new zt,Q=new Ee,_=new n1,v=new Ee(1,1,1),y=new l4r(m.geometry,m.material,h);for(let b=0;b0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const _0r=new zt;class Q0r{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new $4r,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=!1,o=-1;typeof navigator<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,o=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||i&&o<98?this.textureLoader=new sG(this.options.manager):this.textureLoader=new O4r(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new oG(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return R1(o,a,i),Ca(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[c,u]of s.children.entries())o(u,a.children[c])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&Q.setY(C,x[L*l+1]),l>=3&&Q.setZ(C,x[L*l+2]),l>=4&&Q.setW(C,x[L*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Q})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(e,o,a)}loadTextureImage(e,n,r){const i=this,o=this.json,s=o.textures[e],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(u){u.flipY=!1,u.name=s.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(o.samplers||{})[s.sampler]||{};return u.magFilter=ok[h.magFilter]||ii,u.minFilter=ok[h.minFilter]||g2,u.wrapS=sk[h.wrapS]||dc,u.wrapT=sk[h.wrapT]||dc,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const s=i.images[e],a=self.URL||self.webkitURL;let l=s.uri||"",c=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(d){c=!0;const h=new Blob([d],{type:s.mimeType});return l=a.createObjectURL(h),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(h,f){let m=h;n.isImageBitmapLoader===!0&&(m=function(T){const Q=new xr(T);Q.needsUpdate=!0,h(Q)}),n.load(D4.resolveURL(d,o.path),m,void 0,f)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),d.userData.mimeType=s.mimeType||g0r(s.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[Wt.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[Wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[Wt.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new nG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new tG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return aE}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let s;const a={},l=o.extensions||{},c=[];if(l[Wt.KHR_MATERIALS_UNLIT]){const d=i[Wt.KHR_MATERIALS_UNLIT];s=d.getMaterialType(),c.push(d.extendParams(a,o,n))}else{const d=o.pbrMetallicRoughness||{};if(a.color=new Nt(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],Sr),a.opacity=h[3]}d.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",d.baseColorTexture,jn)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),s=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}o.doubleSided===!0&&(a.side=ko);const u=o.alphaMode||m_.OPAQUE;if(u===m_.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===m_.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Yt(1,1),o.normalTexture.scale!==void 0)){const d=o.normalTexture.scale;a.normalScale.set(d,d)}if(o.occlusionTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ra){const d=o.emissiveFactor;a.emissive=new Nt().setRGB(d[0],d[1],d[2],Sr)}return o.emissiveTexture!==void 0&&s!==Ra&&c.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,jn)),Promise.all(c).then(function(){const d=new s(a);return o.name&&(d.name=o.name),Ca(d,o),n.associations.set(d,{materials:e}),o.extensions&&R1(i,d,o),d})}createUniqueName(e){const n=Qn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[Wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return ak(l,a,n)})}const s=[];for(let a=0,l=e.length;a0&&T0r(_,o),_.name=n.createUniqueName(o.name||"mesh_"+e),Ca(_,o),Q.extensions&&R1(i,_,Q),n.assignFinalMaterial(_),d.push(_)}for(let f=0,m=d.length;f1?u=new G1:c.length===1?u=c[0]:u=new $n,u!==c[0])for(let d=0,h=c.length;d{const d=new Map;for(const[h,f]of i.associations)(h instanceof fo||h instanceof xr)&&d.set(h,f);return u.traverse(h=>{const f=i.associations.get(h);f!=null&&d.set(h,f)}),d};return i.associations=c(o),o})}_createAnimationTracks(e,n,r,i,o){const s=[],a=e.name?e.name:e.uuid,l=[];ma[o.path]===ma.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(ma[o.path]){case ma.weights:c=mc;break;case ma.rotation:c=v2;break;case ma.position:case ma.scale:c=gc;break;default:switch(r.itemSize){case 1:c=mc;break;case 2:case 3:default:c=gc;break}break}const u=i.interpolation!==void 0?f0r[i.interpolation]:pc,d=this._getArrayFromAccessor(r);for(let h=0,f=l.length;h{Ze.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,tt.emit("stop_webcam_video_stream"),qe(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},b0r=["src"],E0r=["src"],x0r={class:"controls"},S0r={key:2};function L0r(t,e,n,r,i,o){return k(),P("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(k(),P("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,b0r)):ne("",!0),i.isVideoActive&&i.imageDataUrl==null?(k(),P("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,E0r)):ne("",!0),g("div",x0r,[i.isVideoActive?ne("",!0):(k(),P("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...s)=>o.startVideoStream&&o.startVideoStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(k(),P("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...s)=>o.stopVideoStream&&o.stopVideoStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"video"},null,-1)]))):ne("",!0),i.isVideoActive?(k(),P("span",S0r,"FPS: "+le(i.frameRate),1)):ne("",!0)])],36)}const C0r=yt(y0r,[["render",L0r]]),A0r={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){tt.emit("start_audio_stream",()=>{this.isAudioActive=!0}),qe(()=>{Ze.replace()})},stopAudioStream(){tt.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),qe(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},w0r=["src"],M0r={class:"controls"};function O0r(t,e,n,r,i,o){return k(),P("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(k(),P("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,w0r)):ne("",!0),g("div",M0r,[i.isAudioActive?ne("",!0):(k(),P("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...s)=>o.startAudioStream&&o.startAudioStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(k(),P("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...s)=>o.stopAudioStream&&o.stopAudioStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"mic"},null,-1)]))):ne("",!0)])],36)}const R0r=yt(A0r,[["render",O0r]]),N0r={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:C0r,AudioFrame:R0r},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),qe(()=>{Ze.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new t4r,this.camera=new Wr(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new JU,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube);const n=new M4r(4210752),r=new aG(16777215,.5);r.position.set(0,1,0),this.scene.add(n),this.scene.add(r),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new B4r().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Va,n=new sG().load(t),r=new Ra({map:n});this.cube=new Yr(e,r),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},D0r={ref:"webglContainer"},I0r={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},k0r={key:0,class:"text-center"},P0r={key:1,class:"text-center"},H0r={class:"floating-frame2"},V0r=["innerHTML"];function F0r(t,e,n,r,i,o){const s=pt("VideoFrame"),a=pt("AudioFrame");return k(),P(ze,null,[g("div",D0r,null,512),g("div",I0r,[!i.activePersonality||!i.activePersonality.scene_path?(k(),P("div",k0r," Personality does not have a 3d avatar. ")):ne("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(k(),P("div",P0r," Personality does not have an avatar. ")):ne("",!0),g("div",H0r,[g("div",{innerHTML:t.htmlContent},null,8,V0r)])]),oe(s,{ref:"video_frame"},null,512),oe(a,{ref:"audio_frame"},null,512)],64)}const B0r=yt(N0r,[["render",F0r]]);let V5;const $0r=new Uint8Array(16);function U0r(){if(!V5&&(V5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!V5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V5($0r)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function G0r(t,e=0){return vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]}const q0r=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lk={randomUUID:q0r};function Fs(t,e,n){if(lk.randomUUID&&!e&&!t)return lk.randomUUID();t=t||{};const r=t.random||(t.rng||U0r)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,G0r(r)}class t2{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. Please check that you don't accidentally use the same token twice to register two different handlers for the same event/hook.`),this.unsubscribe(e)),this.listenerMap.set(e,n),this._listeners.push(n)}unsubscribe(e){if(this.listenerMap.has(e)){const n=this.listenerMap.get(e);this.listenerMap.delete(e);const r=this._listeners.indexOf(n);r>=0&&this._listeners.splice(r,1)}}registerProxy(e,n){this.proxyMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. -Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const r=this.proxies.indexOf(n);r>=0&&this.proxies.splice(r,1)}}class En extends t2{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class kr extends t2{constructor(e){super(),this.entity=e}emit(e){let n=!1;const r=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,r,this.entity),n)return{prevented:!0};return{prevented:!1}}}class uG extends t2{execute(e,n){let r=e;for(const i of this.listeners)r=i(r,n);return r}}class Li extends uG{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class q0r extends t2{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const r of this.listeners)n.push(r(e,this.entity));return n}}function No(){const t=Symbol(),e=new Map,n=new Set,r=(l,c)=>{c instanceof t2&&c.registerProxy(t,()=>{var u,d;return(d=(u=e.get(l))===null||u===void 0?void 0:u.listeners)!==null&&d!==void 0?d:[]})},i=l=>{const c=new t2;e.set(l,c),n.forEach(u=>r(l,u[l]))},o=l=>{n.add(l);for(const c of e.keys())r(c,l[c])},s=l=>{for(const c of e.keys())l[c]instanceof t2&&l[c].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>s(l)),e.clear()};return new Proxy({},{get(l,c){return c==="addTarget"?o:c==="removeTarget"?s:c==="destroy"?a:typeof c!="string"||c.startsWith("_")?l[c]:(e.has(c)||i(c),e.get(c))}})}class ck{constructor(e,n){if(this.destructed=!1,this.events={destruct:new En(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class dG{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=n}}function JQ(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,e(r)]))}class fG{constructor(){this._title="",this.id=Fs(),this.events={loaded:new En(this),beforeAddInput:new kr(this),addInput:new En(this),beforeRemoveInput:new kr(this),removeInput:new En(this),beforeAddOutput:new kr(this),addOutput:new En(this),beforeRemoveOutput:new kr(this),removeOutput:new En(this),beforeTitleChanged:new kr(this),titleChanged:new En(this),update:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,r])=>{this.inputs[n]&&(this.inputs[n].load(r),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,r])=>{this.outputs[n]&&(this.outputs[n].load(r),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=JQ(this.inputs,i=>i.save()),n=JQ(this.outputs,i=>i.save()),r={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(r)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,r){r.isInput=e==="input",r.nodeId=this.id,r.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:r}))}addInterface(e,n,r){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,o=e==="input"?this.events.addInput:this.events.addOutput,s=e==="input"?this.inputs:this.outputs;return i.emit(r).prevented?!1:(s[n]=r,this.initializeIntf(e,n,r),o.emit(r),!0)}removeInterface(e,n){const r=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,o=e==="input"?this.inputs[n]:this.outputs[n];if(!o||r.emit(o).prevented)return!1;if(o.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===o||a.to===o).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return o.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(o),!0}}let pG=class extends fG{load(e){super.load(e)}save(){return super.save()}};function Zc(t){return class extends pG{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(r,i)=>t.calculate.call(this,r,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(r=>{const i=n[r]();e==="input"?this.addInput(r,i):this.addOutput(r,i)})}}}class Un{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Fs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new En(this),beforeSetValue:new kr(this),setValue:new En(this),updated:new En(this)},this.hooks={load:new Li(this),save:new Li(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const Qc="__baklava_SubgraphInputNode",vc="__baklava_SubgraphOutputNode";class hG extends pG{constructor(){super(),this.graphInterfaceId=Fs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class dE extends hG{constructor(){super(...arguments),this.type=Qc,this.inputs={name:new Un("Name","Input")},this.outputs={placeholder:new Un("Value",void 0)}}static isGraphInputNode(e){return e.type===Qc}}class fE extends hG{constructor(){super(...arguments),this.type=vc,this.inputs={name:new Un("Name","Output"),placeholder:new Un("Value",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===vc}}class r6{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Fs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kr(this),addNode:new En(this),beforeRemoveNode:new kr(this),removeNode:new En(this),beforeAddConnection:new kr(this),addConnection:new En(this),checkConnection:new kr(this),beforeRemoveConnection:new kr(this),removeConnection:new En(this)},this.hooks={save:new Li(this),load:new Li(this),checkConnection:new q0r(this)},this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(r=>n.includes(r.from)||n.includes(r.to)).forEach(r=>this.removeConnection(r)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const r=this.checkConnection(e,n);if(!r.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const o of r.connectionsInDanger){const s=this.connections.find(a=>a.id===o.id);s&&this.removeConnection(s)}const i=new ck(r.dummyConnection.from,r.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const r=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(r&&i&&r===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const o=this.hooks.checkConnection.execute({from:e,to:n});if(o.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const s=Array.from(new Set(o.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new dG(e,n),connectionsInDanger:s}}findNodeInterface(e){for(const n of this.nodes){for(const r in n.inputs){const i=n.inputs[r];if(i.id===e)return i}for(const r in n.outputs){const i=n.outputs[r];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let r=this.connections.length-1;r>=0;r--)this.removeConnection(this.connections[r]);for(let r=this.nodes.length-1;r>=0;r--)this.removeNode(this.nodes[r]);this.id=e.id;for(const r of e.nodes){const i=this.editor.nodeTypes.get(r.type);if(!i){n.push(`Node type ${r.type} is not registered`);continue}const o=new i.type;this.addNode(o),o.load(r)}for(const r of e.connections){const i=this.findNodeInterface(r.from),o=this.findNodeInterface(r.to);if(i)if(o){const s=new ck(i,o);s.id=r.id,this.internalAddConnection(s)}else{n.push(`Could not find interface with id ${r.to}`);continue}else{n.push(`Could not find interface with id ${r.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const l0="__baklava_GraphNode-";function yc(t){return l0+t.id}const z0r=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function j0r(t){return class extends fG{constructor(){super(...arguments),this.type=yc(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,r)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!r.engine||typeof r.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const o=r.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)o.set(l.nodeInterfaceId,n[l.id]);const s=await r.engine.runGraph(this.subgraph,o,r.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(i=s.get(l.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=s,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,this.createProxyInterface(n,!0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(r=>r.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,this.createProxyInterface(n,!1));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(r=>r.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Un("_calculationResults",void 0).setHidden(!0))}createProxyInterface(n,r){const i=new Un(n.name,void 0);return new Proxy(i,{get:(o,s)=>{var a,l,c;if(z0r.includes(s)||s in o||typeof s=="string"&&s.startsWith("__v_"))return Reflect.get(o,s);let u;if(r){const f=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(m=>dE.isGraphInputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.outputs.placeholder.id}else{const f=(l=this.subgraph)===null||l===void 0?void 0:l.nodes.find(m=>fE.isGraphOutputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.inputs.placeholder.id}const d=(c=this.subgraph)===null||c===void 0?void 0:c.connections.find(f=>{var m;return u===((m=r?f.from:f.to)===null||m===void 0?void 0:m.id)}),h=r?d==null?void 0:d.to:d==null?void 0:d.from;if(h)return Reflect.get(h,s)}})}}}class w9{static fromGraph(e,n){return new w9(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(yc(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Fs(),this._name="Subgraph",this.events={nameChanged:new En(this),updated:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,r=h=>{const f=Fs();return n.set(h,f),f},i=h=>{const f=n.get(h);if(!f)throw new Error(`Unable to create graph from template: Could not map old id ${h} to new id`);return f},o=h=>JQ(h,f=>({id:r(f.id),templateId:f.id,value:f.value})),s=this.nodes.map(h=>({...h,id:r(h.id),inputs:o(h.inputs),outputs:o(h.outputs)})),a=this.connections.map(h=>({id:r(h.id),from:i(h.from),to:i(h.to)})),l=this.inputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),c=this.outputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),u={id:Fs(),nodes:s,connections:a,inputs:l,outputs:c};return e||(e=new r6(this.editor)),e.load(u).forEach(h=>console.warn(h)),e.template=this,e}}class W0r{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new En(this),beforeRegisterNodeType:new kr(this),registerNodeType:new En(this),beforeUnregisterNodeType:new kr(this),unregisterNodeType:new En(this),beforeAddGraphTemplate:new kr(this),addGraphTemplate:new En(this),beforeRemoveGraphTemplate:new kr(this),removeGraphTemplate:new En(this),registerGraph:new En(this),unregisterGraph:new En(this)},this.hooks={save:new Li(this),load:new Li(this)},this.graphTemplateEvents=No(),this.graphTemplateHooks=No(),this.graphEvents=No(),this.graphHooks=No(),this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new r6(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(dE),this.registerNodeType(fE)}registerNodeType(e,n){var r,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const o=new e;this._nodeTypes.set(o.type,{type:e,category:(r=n==null?void 0:n.category)!==null&&r!==void 0?r:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:o.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=j0r(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=yc(e);for(const r of[this.graph,...this.graphs.values()]){const i=r.nodes.filter(o=>o.type===n);for(const o of i)r.removeNode(o)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{for(this._loading=!0,e=this.hooks.load.execute(e);this.graphTemplates.length>0;)this.removeGraphTemplate(this.graphTemplates[0]);e.graphTemplates.forEach(r=>{const i=new w9(r,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(r=>console.warn(r)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function Y0r(t,e){const n=new Map;e.graphs.forEach(r=>{r.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((r,i)=>{const o=n.get(i);o&&r.forEach((s,a)=>{const l=o.outputs[a];l&&(l.value=s)})})}class TG extends Error{constructor(){super("Cycle detected")}}function K0r(t){return typeof t=="string"}function mG(t,e){const n=new Map,r=new Map,i=new Map;let o,s;if(t instanceof r6)o=t.nodes,s=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");o=t,s=e}o.forEach(c=>{Object.values(c.inputs).forEach(u=>n.set(u.id,c.id)),Object.values(c.outputs).forEach(u=>n.set(u.id,c.id))}),o.forEach(c=>{const u=s.filter(h=>h.from&&n.get(h.from.id)===c.id),d=new Set(u.map(h=>n.get(h.to.id)).filter(K0r));r.set(c.id,d),i.set(c,u)});const a=o.slice();s.forEach(c=>{const u=a.findIndex(d=>n.get(c.to.id)===d.id);u>=0&&a.splice(u,1)});const l=[];for(;a.length>0;){const c=a.pop();l.push(c);const u=r.get(c.id);for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),Array.from(r.values()).every(h=>!h.has(d))){const h=o.find(f=>f.id===d);a.push(h)}}}if(Array.from(r.values()).some(c=>c.size>0))throw new TG;return{calculationOrder:l,connectionsFromNode:i,interfaceIdToNodeId:n}}function Z0r(t,e){try{return mG(t,e),!1}catch(n){if(n instanceof TG)return!0;throw n}}var ni;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(ni||(ni={}));class X0r{get status(){return this.isRunning?ni.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kr(this),afterRun:new En(this),statusChange:new En(this),beforeNodeCalculation:new En(this),afterNodeCalculation:new En(this)},this.hooks={gatherCalculationData:new Li(this),transferData:new uG},this.recalculateOrder=!0,this.internalStatus=ni.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,r)=>{r.graph&&!r.graph.loading&&r.graph.activeTransactions===0&&this.internalOnChange(r,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===ni.Stopped&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===ni.Idle&&(this.internalStatus=ni.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===ni.Paused&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===ni.Idle||this.internalStatus===ni.Paused)&&(this.internalStatus=ni.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const r=await this.execute(e,...n);return this.events.afterRun.emit(r),r}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};e=o}if(n.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};n=o}const r=new dG(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(o=>o.to!==n)),i.push(r),Z0r(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(o=>o.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(r=>{if(!(r in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${r}"`)})}internalOnChange(e,n){this.internalStatus===ni.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const r of e)for(const i of[...Object.values(r.inputs),...Object.values(r.outputs)])if(i.templateId===n)return i;return null}}class J0r extends X0r{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,r){this.order.has(e.id)||this.order.set(e.id,mG(e));const{calculationOrder:i,connectionsFromNode:o}=this.order.get(e.id),s=new Map;for(const a of i){const l={};Object.entries(a.inputs).forEach(([u,d])=>{l[u]=this.getInterfaceValue(n,d.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let c;if(a.calculate)c=await a.calculate(l,{globalValues:r,engine:this});else{c={};for(const[u,d]of Object.entries(a.outputs))c[u]=this.getInterfaceValue(n,d.id)}this.validateNodeCalculationOutput(a,c),this.events.afterNodeCalculation.emit({outputValues:c,node:a}),s.set(a.id,new Map(Object.entries(c))),o.has(a)&&o.get(a).forEach(u=>{var d;const h=(d=Object.entries(a.outputs).find(([,m])=>m.id===u.from.id))===null||d===void 0?void 0:d[0];if(!h)throw new Error(`Could not find key for interface ${u.from.id} +Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const r=this.proxies.indexOf(n);r>=0&&this.proxies.splice(r,1)}}class En extends t2{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class kr extends t2{constructor(e){super(),this.entity=e}emit(e){let n=!1;const r=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,r,this.entity),n)return{prevented:!0};return{prevented:!1}}}class uG extends t2{execute(e,n){let r=e;for(const i of this.listeners)r=i(r,n);return r}}class Li extends uG{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class z0r extends t2{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const r of this.listeners)n.push(r(e,this.entity));return n}}function No(){const t=Symbol(),e=new Map,n=new Set,r=(l,c)=>{c instanceof t2&&c.registerProxy(t,()=>{var u,d;return(d=(u=e.get(l))===null||u===void 0?void 0:u.listeners)!==null&&d!==void 0?d:[]})},i=l=>{const c=new t2;e.set(l,c),n.forEach(u=>r(l,u[l]))},o=l=>{n.add(l);for(const c of e.keys())r(c,l[c])},s=l=>{for(const c of e.keys())l[c]instanceof t2&&l[c].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>s(l)),e.clear()};return new Proxy({},{get(l,c){return c==="addTarget"?o:c==="removeTarget"?s:c==="destroy"?a:typeof c!="string"||c.startsWith("_")?l[c]:(e.has(c)||i(c),e.get(c))}})}class ck{constructor(e,n){if(this.destructed=!1,this.events={destruct:new En(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class dG{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Fs(),this.from=e,this.to=n}}function JQ(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,e(r)]))}class fG{constructor(){this._title="",this.id=Fs(),this.events={loaded:new En(this),beforeAddInput:new kr(this),addInput:new En(this),beforeRemoveInput:new kr(this),removeInput:new En(this),beforeAddOutput:new kr(this),addOutput:new En(this),beforeRemoveOutput:new kr(this),removeOutput:new En(this),beforeTitleChanged:new kr(this),titleChanged:new En(this),update:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,r])=>{this.inputs[n]&&(this.inputs[n].load(r),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,r])=>{this.outputs[n]&&(this.outputs[n].load(r),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=JQ(this.inputs,i=>i.save()),n=JQ(this.outputs,i=>i.save()),r={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(r)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,r){r.isInput=e==="input",r.nodeId=this.id,r.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:r}))}addInterface(e,n,r){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,o=e==="input"?this.events.addInput:this.events.addOutput,s=e==="input"?this.inputs:this.outputs;return i.emit(r).prevented?!1:(s[n]=r,this.initializeIntf(e,n,r),o.emit(r),!0)}removeInterface(e,n){const r=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,o=e==="input"?this.inputs[n]:this.outputs[n];if(!o||r.emit(o).prevented)return!1;if(o.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===o||a.to===o).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return o.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(o),!0}}let pG=class extends fG{load(e){super.load(e)}save(){return super.save()}};function Zc(t){return class extends pG{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(r,i)=>t.calculate.call(this,r,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(r=>{const i=n[r]();e==="input"?this.addInput(r,i):this.addOutput(r,i)})}}}class Un{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Fs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new En(this),beforeSetValue:new kr(this),setValue:new En(this),updated:new En(this)},this.hooks={load:new Li(this),save:new Li(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const Qc="__baklava_SubgraphInputNode",vc="__baklava_SubgraphOutputNode";class hG extends pG{constructor(){super(),this.graphInterfaceId=Fs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class dE extends hG{constructor(){super(...arguments),this.type=Qc,this.inputs={name:new Un("Name","Input")},this.outputs={placeholder:new Un("Value",void 0)}}static isGraphInputNode(e){return e.type===Qc}}class fE extends hG{constructor(){super(...arguments),this.type=vc,this.inputs={name:new Un("Name","Output"),placeholder:new Un("Value",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===vc}}class r6{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Fs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kr(this),addNode:new En(this),beforeRemoveNode:new kr(this),removeNode:new En(this),beforeAddConnection:new kr(this),addConnection:new En(this),checkConnection:new kr(this),beforeRemoveConnection:new kr(this),removeConnection:new En(this)},this.hooks={save:new Li(this),load:new Li(this),checkConnection:new z0r(this)},this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(r=>n.includes(r.from)||n.includes(r.to)).forEach(r=>this.removeConnection(r)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const r=this.checkConnection(e,n);if(!r.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const o of r.connectionsInDanger){const s=this.connections.find(a=>a.id===o.id);s&&this.removeConnection(s)}const i=new ck(r.dummyConnection.from,r.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const r=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(r&&i&&r===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const o=this.hooks.checkConnection.execute({from:e,to:n});if(o.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const s=Array.from(new Set(o.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new dG(e,n),connectionsInDanger:s}}findNodeInterface(e){for(const n of this.nodes){for(const r in n.inputs){const i=n.inputs[r];if(i.id===e)return i}for(const r in n.outputs){const i=n.outputs[r];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let r=this.connections.length-1;r>=0;r--)this.removeConnection(this.connections[r]);for(let r=this.nodes.length-1;r>=0;r--)this.removeNode(this.nodes[r]);this.id=e.id;for(const r of e.nodes){const i=this.editor.nodeTypes.get(r.type);if(!i){n.push(`Node type ${r.type} is not registered`);continue}const o=new i.type;this.addNode(o),o.load(r)}for(const r of e.connections){const i=this.findNodeInterface(r.from),o=this.findNodeInterface(r.to);if(i)if(o){const s=new ck(i,o);s.id=r.id,this.internalAddConnection(s)}else{n.push(`Could not find interface with id ${r.to}`);continue}else{n.push(`Could not find interface with id ${r.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const l0="__baklava_GraphNode-";function yc(t){return l0+t.id}const j0r=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function W0r(t){return class extends fG{constructor(){super(...arguments),this.type=yc(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,r)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!r.engine||typeof r.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const o=r.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)o.set(l.nodeInterfaceId,n[l.id]);const s=await r.engine.runGraph(this.subgraph,o,r.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(i=s.get(l.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=s,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,this.createProxyInterface(n,!0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(r=>r.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,this.createProxyInterface(n,!1));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(r=>r.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Un("_calculationResults",void 0).setHidden(!0))}createProxyInterface(n,r){const i=new Un(n.name,void 0);return new Proxy(i,{get:(o,s)=>{var a,l,c;if(j0r.includes(s)||s in o||typeof s=="string"&&s.startsWith("__v_"))return Reflect.get(o,s);let u;if(r){const f=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(m=>dE.isGraphInputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.outputs.placeholder.id}else{const f=(l=this.subgraph)===null||l===void 0?void 0:l.nodes.find(m=>fE.isGraphOutputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.inputs.placeholder.id}const d=(c=this.subgraph)===null||c===void 0?void 0:c.connections.find(f=>{var m;return u===((m=r?f.from:f.to)===null||m===void 0?void 0:m.id)}),h=r?d==null?void 0:d.to:d==null?void 0:d.from;if(h)return Reflect.get(h,s)}})}}}class w9{static fromGraph(e,n){return new w9(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(yc(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Fs(),this._name="Subgraph",this.events={nameChanged:new En(this),updated:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,r=h=>{const f=Fs();return n.set(h,f),f},i=h=>{const f=n.get(h);if(!f)throw new Error(`Unable to create graph from template: Could not map old id ${h} to new id`);return f},o=h=>JQ(h,f=>({id:r(f.id),templateId:f.id,value:f.value})),s=this.nodes.map(h=>({...h,id:r(h.id),inputs:o(h.inputs),outputs:o(h.outputs)})),a=this.connections.map(h=>({id:r(h.id),from:i(h.from),to:i(h.to)})),l=this.inputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),c=this.outputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),u={id:Fs(),nodes:s,connections:a,inputs:l,outputs:c};return e||(e=new r6(this.editor)),e.load(u).forEach(h=>console.warn(h)),e.template=this,e}}class Y0r{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new En(this),beforeRegisterNodeType:new kr(this),registerNodeType:new En(this),beforeUnregisterNodeType:new kr(this),unregisterNodeType:new En(this),beforeAddGraphTemplate:new kr(this),addGraphTemplate:new En(this),beforeRemoveGraphTemplate:new kr(this),removeGraphTemplate:new En(this),registerGraph:new En(this),unregisterGraph:new En(this)},this.hooks={save:new Li(this),load:new Li(this)},this.graphTemplateEvents=No(),this.graphTemplateHooks=No(),this.graphEvents=No(),this.graphHooks=No(),this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new r6(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(dE),this.registerNodeType(fE)}registerNodeType(e,n){var r,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const o=new e;this._nodeTypes.set(o.type,{type:e,category:(r=n==null?void 0:n.category)!==null&&r!==void 0?r:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:o.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=W0r(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=yc(e);for(const r of[this.graph,...this.graphs.values()]){const i=r.nodes.filter(o=>o.type===n);for(const o of i)r.removeNode(o)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{for(this._loading=!0,e=this.hooks.load.execute(e);this.graphTemplates.length>0;)this.removeGraphTemplate(this.graphTemplates[0]);e.graphTemplates.forEach(r=>{const i=new w9(r,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(r=>console.warn(r)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function K0r(t,e){const n=new Map;e.graphs.forEach(r=>{r.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((r,i)=>{const o=n.get(i);o&&r.forEach((s,a)=>{const l=o.outputs[a];l&&(l.value=s)})})}class TG extends Error{constructor(){super("Cycle detected")}}function Z0r(t){return typeof t=="string"}function mG(t,e){const n=new Map,r=new Map,i=new Map;let o,s;if(t instanceof r6)o=t.nodes,s=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");o=t,s=e}o.forEach(c=>{Object.values(c.inputs).forEach(u=>n.set(u.id,c.id)),Object.values(c.outputs).forEach(u=>n.set(u.id,c.id))}),o.forEach(c=>{const u=s.filter(h=>h.from&&n.get(h.from.id)===c.id),d=new Set(u.map(h=>n.get(h.to.id)).filter(Z0r));r.set(c.id,d),i.set(c,u)});const a=o.slice();s.forEach(c=>{const u=a.findIndex(d=>n.get(c.to.id)===d.id);u>=0&&a.splice(u,1)});const l=[];for(;a.length>0;){const c=a.pop();l.push(c);const u=r.get(c.id);for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),Array.from(r.values()).every(h=>!h.has(d))){const h=o.find(f=>f.id===d);a.push(h)}}}if(Array.from(r.values()).some(c=>c.size>0))throw new TG;return{calculationOrder:l,connectionsFromNode:i,interfaceIdToNodeId:n}}function X0r(t,e){try{return mG(t,e),!1}catch(n){if(n instanceof TG)return!0;throw n}}var ni;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(ni||(ni={}));class J0r{get status(){return this.isRunning?ni.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kr(this),afterRun:new En(this),statusChange:new En(this),beforeNodeCalculation:new En(this),afterNodeCalculation:new En(this)},this.hooks={gatherCalculationData:new Li(this),transferData:new uG},this.recalculateOrder=!0,this.internalStatus=ni.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,r)=>{r.graph&&!r.graph.loading&&r.graph.activeTransactions===0&&this.internalOnChange(r,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===ni.Stopped&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===ni.Idle&&(this.internalStatus=ni.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===ni.Paused&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===ni.Idle||this.internalStatus===ni.Paused)&&(this.internalStatus=ni.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const r=await this.execute(e,...n);return this.events.afterRun.emit(r),r}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};e=o}if(n.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};n=o}const r=new dG(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(o=>o.to!==n)),i.push(r),X0r(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(o=>o.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(r=>{if(!(r in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${r}"`)})}internalOnChange(e,n){this.internalStatus===ni.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const r of e)for(const i of[...Object.values(r.inputs),...Object.values(r.outputs)])if(i.templateId===n)return i;return null}}class e6r extends J0r{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,r){this.order.has(e.id)||this.order.set(e.id,mG(e));const{calculationOrder:i,connectionsFromNode:o}=this.order.get(e.id),s=new Map;for(const a of i){const l={};Object.entries(a.inputs).forEach(([u,d])=>{l[u]=this.getInterfaceValue(n,d.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let c;if(a.calculate)c=await a.calculate(l,{globalValues:r,engine:this});else{c={};for(const[u,d]of Object.entries(a.outputs))c[u]=this.getInterfaceValue(n,d.id)}this.validateNodeCalculationOutput(a,c),this.events.afterNodeCalculation.emit({outputValues:c,node:a}),s.set(a.id,new Map(Object.entries(c))),o.has(a)&&o.get(a).forEach(u=>{var d;const h=(d=Object.entries(a.outputs).find(([,m])=>m.id===u.from.id))===null||d===void 0?void 0:d[0];if(!h)throw new Error(`Could not find key for interface ${u.from.id} This is likely a Baklava internal issue. Please report it on GitHub.`);const f=this.hooks.transferData.execute(c[h],u);u.to.allowMultipleConnections?n.has(u.to.id)?n.get(u.to.id).push(f):n.set(u.to.id,[f]):n.set(u.to.id,f)})}return s}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const n=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,n,e)}getInputValues(e){const n=new Map;for(const r of e.nodes)Object.values(r.inputs).forEach(i=>{i.connectionCount===0&&n.set(i.id,i.value)}),r.calculate||Object.values(r.outputs).forEach(i=>{n.set(i.id,i.value)});return n}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,n){if(!e.has(n))throw new Error(`Could not find value for interface ${n} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(n)}}const e6r=["INPUT","TEXTAREA","SELECT"];function gG(t){return e6r.includes(t.tagName)}let ev=null;function t6r(t){ev=t}function Ci(){if(!ev)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:ev}}function Xi(){const{viewModel:t}=Ci();return{graph:au(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function _G(t){const{graph:e}=Xi(),n=Ct(null),r=Ct(null);return{dragging:_t(()=>!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},r.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const c=l.pageX-n.value.x,u=l.pageY-n.value.y;t.value.x=r.value.x+c/e.value.scaling,t.value.y=r.value.y+u/e.value.scaling}},onPointerUp:()=>{n.value=null,r.value=null}}}function QG(t,e,n){if(!e.template)return!1;if(yc(e.template)===n)return!0;const r=t.graphTemplates.find(o=>yc(o)===n);return r?r.nodes.filter(o=>o.type.startsWith(l0)).some(o=>QG(t,e,o.type)):!1}function vG(t){return _t(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),r=[];for(const i of n.values()){let o=e.filter(([,s])=>s.category===i);t.value.displayedGraph.template?o=o.filter(([s])=>!QG(t.value.editor,t.value.displayedGraph,s)):o=o.filter(([s])=>![Qc,vc].includes(s)),o.length>0&&r.push({name:i,nodeTypes:Object.fromEntries(o)})}return r.sort((i,o)=>i.name==="default"?-1:o.name==="default"||i.name>o.name?1:-1),r})}function yG(){const{graph:t}=Xi();return{transform:(n,r)=>{const i=n/t.value.scaling-t.value.panning.x,o=r/t.value.scaling-t.value.panning.y;return[i,o]}}}function n6r(){const{graph:t}=Xi();let e=[],n=-1,r={x:0,y:0};const i=_t(()=>t.value.panning),o=_G(i),s=_t(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(f,m,T)=>{const Q=[f/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],_=[f/T-t.value.panning.x,m/T-t.value.panning.y],v=[_[0]-Q[0],_[1]-Q[1]];t.value.panning.x+=v[0],t.value.panning.y+=v[1],t.value.scaling=T},l=f=>{f.preventDefault();let m=f.deltaY;f.deltaMode===1&&(m*=32);const T=t.value.scaling*(1-m/3e3);a(f.offsetX,f.offsetY,T)},c=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:s,...o,onPointerDown:f=>{if(e.push(f),o.onPointerDown(f),e.length===2){const{ax:m,ay:T,bx:Q,by:_}=c();r={x:m+(Q-m)/2,y:T+(_-T)/2}}},onPointerMove:f=>{for(let m=0;m0){const E=t.value.scaling*(1+(b-n)/500);a(r.x,r.y,E)}n=b}else o.onPointerMove(f)},onPointerUp:f=>{e=e.filter(m=>m.pointerId!==f.pointerId),n=-1,o.onPointerUp()},onMouseWheel:l}}var Fi=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Fi||{});const bG=Symbol();function r6r(){const{graph:t}=Xi(),e=Ct(null),n=Ct(null),r=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Fi.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Fi.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},o=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},s=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Fi.ALLOWED:Fi.FORBIDDEN,l.connectionAllowed){const c=l.connectionsInDanger.map(u=>u.id);t.value.connections.forEach(u=>{c.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Fi.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return Dl(bG,{temporaryConnection:e,hoveredOver:s}),{temporaryConnection:e,onMouseMove:r,onMouseDown:i,onMouseUp:o,hoveredOver:s}}function i6r(t){const e=Ct(!1),n=Ct(0),r=Ct(0),i=vG(t),{transform:o}=yG(),s=_t(()=>{let u=[];const d={};for(const f of i.value){const m=Object.entries(f.nodeTypes).map(([T,Q])=>({label:Q.title,value:"addNode:"+T}));f.name==="default"?u=m:d[f.name]=m}const h=[...Object.entries(d).map(([f,m])=>({label:f,submenu:m}))];return h.length>0&&u.length>0&&h.push({isDivider:!0}),h.push(...u),h}),a=_t(()=>t.value.settings.contextMenu.additionalItems.length===0?s.value:[{label:"Add node",submenu:s.value},...t.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!t.value.commandHandler.canExecuteCommand(u.command)})]);function l(u){const d=u.target;if(!(d instanceof Element)||gG(d))return;u.preventDefault(),e.value=!0;const h=d.getBoundingClientRect(),m=d.closest(".baklava-editor").getBoundingClientRect();n.value=h.x+u.offsetX-m.x,r.value=h.y+u.offsetY-m.y}function c(u){if(u.startsWith("addNode:")){const d=u.substring(8),h=t.value.editor.nodeTypes.get(d);if(!h)return;const f=Zr(new h.type);t.value.displayedGraph.addNode(f);const[m,T]=o(n.value,r.value);f.position.x=m,f.position.y=T}else if(u.startsWith("command:")){const d=u.substring(8);t.value.commandHandler.canExecuteCommand(d)&&t.value.commandHandler.executeCommand(d)}}return{show:e,x:n,y:r,items:a,open:l,onClick:c}}const ru="START_SELECTION_BOX";function o6r(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=_t(()=>n.value.nodes),i=Ct(!1),o=Ct(!1),s=Ct([0,0]),a=Ct([0,0]);Er(e,()=>{e.value.commandHandler.hasCommand(ru)||(e.value.commandHandler.registerCommand(ru,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],ru))},{immediate:!0});function l(_){return[_.clientX-t.value.getBoundingClientRect().left,_.clientY-t.value.getBoundingClientRect().top]}function c(_){return i.value?(o.value=!0,i.value=!1,s.value=l(_),a.value=l(_),document.addEventListener("pointermove",u),document.addEventListener("pointerup",d),!0):!1}function u(_){s.value=l(_)}function d(_){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",d),s.value=l(_),o.value=!1;const v=h();for(const y of v)e.value.displayedGraph.selectedNodes.push(y)}function h(){const _=f(),y=document.querySelector(".baklava-editor").getBoundingClientRect();return r.value.filter(b=>{const E=m(b,y);return T(_,E)})}function f(){return{left:Math.min(s.value[0],a.value[0]),top:Math.min(s.value[1],a.value[1]),right:Math.max(s.value[0],a.value[0]),bottom:Math.max(s.value[1],a.value[1])}}function m(_,v){const y=document.getElementById(_.id),b=y?y.getBoundingClientRect():{x:0,y:0,width:0,height:0},E=b.x-v.left,x=b.y-v.top;return{left:E,top:x,right:E+b.width,bottom:x+b.height}}function T(_,v){return _.leftv.left&&_.topv.top}function Q(){return{width:Math.abs(a.value[0]-s.value[0])+"px",height:Math.abs(a.value[1]-s.value[1])+"px",left:(a.value[0]>s.value[0]?s.value[0]:a.value[0])+"px",top:(a.value[1]>s.value[1]?s.value[1]:a.value[1])+"px"}}return Zr({startSelection:i,isSelecting:o,start:s,end:a,onPointerDown:c,getStyles:Q})}const s6r=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Xi();return{styles:_t(()=>{const r=t.value.settings.background,i=e.value.panning.x*e.value.scaling,o=e.value.panning.y*e.value.scaling,s=e.value.scaling*r.gridSize,a=s/r.gridDivision,l=`${s}px ${s}px, ${s}px ${s}px`,c=e.value.scaling>r.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${o}px`,backgroundSize:`${l} ${c}`}})}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function a6r(t,e,n,r,i,o){return k(),P("div",{class:"background",style:xn(t.styles)},null,4)}const l6r=Wn(s6r,[["render",a6r]]);function c6r(t){return wk()?(gq(t),!0):!1}function pE(t){return typeof t=="function"?t():Ft(t)}const EG=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const u6r=Object.prototype.toString,d6r=t=>u6r.call(t)==="[object Object]",iu=()=>{},f6r=p6r();function p6r(){var t,e;return EG&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function h6r(t,e,n=!1){return e.reduce((r,i)=>(i in t&&(!n||t[i]!==void 0)&&(r[i]=t[i]),r),{})}function T6r(t,e={}){if(!lr(t))return zq(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=qq(()=>({get(){return t.value[r]},set(i){var o;if((o=pE(e.replaceRef))!=null?o:!0)if(Array.isArray(t.value)){const a=[...t.value];a[r]=i,t.value=a}else{const a={...t.value,[r]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[r]=i}}));return n}function g4(t){var e;const n=pE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const hE=EG?window:void 0;function I4(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hE):[e,n,r,i]=t,!e)return iu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Er(()=>[g4(e),pE(i)],([u,d])=>{if(s(),!u)return;const h=d6r(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(m=>a(u,f,m,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return c6r(c),c}let uk=!1;function xG(t,e,n={}){const{window:r=hE,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return iu;f6r&&!uk&&(uk=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",iu)),r.document.documentElement.addEventListener("click",iu));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(m=>m===h.target||h.composedPath().includes(m));{const m=g4(f);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[I4(r,"click",h=>{const f=g4(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),I4(r,"pointerdown",h=>{const f=g4(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),s&&I4(r,"blur",h=>{setTimeout(()=>{var f;const m=g4(t);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const SG={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},m6r=Object.keys(SG);function g6r(t={}){const{target:e=hE}=t,n=Ct(!1),r=Ct(t.initialValue||{});Object.assign(r.value,SG,r.value);const i=o=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(o.pointerType))&&(r.value=h6r(o,m6r,!1))};if(e){const o={passive:!0};I4(e,["pointerdown","pointermove","pointerup"],i,o),I4(e,"pointerleave",()=>n.value=!1,o)}return{...T6r(r),isInside:n}}const _6r=["onMouseenter","onMouseleave","onClick"],Q6r={class:"flex-fill"},v6r={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},y6r=g("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[g("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),b6r=[y6r],TE=ir({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,r=e;let i=null;const o=Ct(null),s=Ct(-1),a=Ct(0),l=Ct({x:!1,y:!1}),c=_t(()=>n.flippable&&(l.value.x||n.isFlipped.x)),u=_t(()=>n.flippable&&(l.value.y||n.isFlipped.y)),d=_t(()=>{const v={};return n.isNested||(v.top=(u.value?n.y-a.value:n.y)+"px",v.left=n.x+"px"),v}),h=_t(()=>({"--flipped-x":c.value,"--flipped-y":u.value,"--nested":n.isNested})),f=_t(()=>n.items.map(v=>({...v,hover:!1})));Er([()=>n.y,()=>n.items],()=>{var v,y,b,E;a.value=n.items.length*30;const x=((y=(v=o.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,L=((E=(b=o.value)==null?void 0:b.parentElement)==null?void 0:E.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>L-20}),xG(o,()=>{n.modelValue&&r("update:modelValue",!1)});const m=v=>{!v.submenu&&v.value&&(r("click",v.value),r("update:modelValue",!1))},T=v=>{r("click",v),s.value=-1,n.isNested||r("update:modelValue",!1)},Q=(v,y)=>{n.items[y].submenu&&(s.value=y,i!==null&&(clearTimeout(i),i=null))},_=(v,y)=>{n.items[y].submenu&&(i=window.setTimeout(()=>{s.value=-1,i=null},200))};return(v,y)=>{const b=pt("ContextMenu",!0);return k(),wt(lo,{name:"slide-fade"},{default:Ve(()=>[J(g("div",{ref_key:"el",ref:o,class:We(["baklava-context-menu",h.value]),style:xn(d.value)},[(k(!0),P(ze,null,at(f.value,(E,x)=>(k(),P(ze,null,[E.isDivider?(k(),P("div",{key:`d-${x}`,class:"divider"})):(k(),P("div",{key:`i-${x}`,class:We(["item",{submenu:!!E.submenu,"--disabled":!!E.disabled}]),onMouseenter:L=>Q(L,x),onMouseleave:L=>_(L,x),onClick:he(L=>m(E),["stop","prevent"])},[g("div",Q6r,le(E.label),1),E.submenu?(k(),P("div",v6r,b6r)):ne("",!0),E.submenu?(k(),wt(b,{key:1,"model-value":s.value===x,items:E.submenu,"is-nested":!0,"is-flipped":{x:c.value,y:u.value},flippable:v.flippable,onClick:T},null,8,["model-value","items","is-flipped","flippable"])):ne("",!0)],42,_6r))],64))),256))],6),[[Pt,v.modelValue]])]),_:1})}}}),E6r={},x6r={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},S6r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),L6r=g("circle",{cx:"12",cy:"12",r:"1"},null,-1),C6r=g("circle",{cx:"12",cy:"19",r:"1"},null,-1),A6r=g("circle",{cx:"12",cy:"5",r:"1"},null,-1),w6r=[S6r,L6r,C6r,A6r];function M6r(t,e){return k(),P("svg",x6r,w6r)}const LG=Wn(E6r,[["render",M6r]]),O6r=["id"],R6r={key:0,class:"__tooltip"},N6r={key:2,class:"align-middle"},dk=ir({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(Q,_=100)=>{const v=typeof(Q==null?void 0:Q.toString)=="function"?String(Q):"";return v.length>_?v.slice(0,_)+"...":v},n=t,{viewModel:r}=Ci(),{hoveredOver:i,temporaryConnection:o}=Gi(bG),s=Ct(null),a=_t(()=>n.intf.connectionCount>0),l=Ct(!1),c=_t(()=>r.value.settings.displayValueOnHover&&l.value),u=_t(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),d=_t(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),h=()=>{l.value=!0,i(n.intf)},f=()=>{l.value=!1,i(void 0)},m=()=>{s.value&&r.value.hooks.renderInterface.execute({intf:n.intf,el:s.value})},T=()=>{const Q=r.value.displayedGraph.sidebar;Q.nodeId=n.node.id,Q.optionName=n.intf.name,Q.visible=!0};return Zo(m),d0(m),(Q,_)=>{var v;return k(),P("div",{id:Q.intf.id,ref_key:"el",ref:s,class:We(["baklava-node-interface",u.value])},[Q.intf.port?(k(),P("div",{key:0,class:We(["__port",{"--selected":((v=Ft(o))==null?void 0:v.from)===Q.intf}]),onPointerover:h,onPointerout:f},[er(Q.$slots,"portTooltip",{showTooltip:c.value},()=>[c.value===!0?(k(),P("span",R6r,le(e(Q.intf.value)),1)):ne("",!0)])],34)):ne("",!0),d.value?(k(),wt(Rd(Q.intf.component),{key:1,modelValue:Q.intf.value,"onUpdate:modelValue":_[0]||(_[0]=y=>Q.intf.value=y),node:Q.node,intf:Q.intf,onOpenSidebar:T},null,40,["modelValue","node","intf"])):(k(),P("span",N6r,le(Q.intf.name),1))],10,O6r)}}}),D6r=["id","data-node-type"],I6r={class:"__title-label"},k6r={class:"__menu"},P6r={class:"__outputs"},H6r={class:"__inputs"},V6r=ir({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,r=e,{viewModel:i}=Ci(),{graph:o,switchGraph:s}=Xi(),a=Ct(null),l=Ct(!1),c=Ct(""),u=Ct(null),d=Ct(!1),h=Ct(!1),f=_t(()=>{const N=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(l0)&&N.push({value:"editSubgraph",label:"Edit Subgraph"}),N}),m=_t(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),T=_t(()=>({"--reverse-y":n.node.reverseY??i.value.settings.nodes.reverseY})),Q=_t(()=>{var N,H;return{top:`${((N=n.node.position)==null?void 0:N.y)??0}px`,left:`${((H=n.node.position)==null?void 0:H.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),_=_t(()=>Object.values(n.node.inputs).filter(N=>!N.hidden)),v=_t(()=>Object.values(n.node.outputs).filter(N=>!N.hidden)),y=()=>{r("select")},b=N=>{n.selected||y(),r("start-drag",N)},E=()=>{h.value=!0},x=async N=>{var H;switch(N){case"delete":o.value.removeNode(n.node);break;case"rename":c.value=n.node.title,l.value=!0,await qe(),(H=u.value)==null||H.focus();break;case"editSubgraph":s(n.node.template);break}},L=()=>{n.node.title=c.value,l.value=!1},M=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},C=N=>{d.value=!0,N.preventDefault()},A=N=>{if(!d.value)return;const H=n.node.width+N.movementX/o.value.scaling,O=i.value.settings.nodes.minWidth,B=i.value.settings.nodes.maxWidth;n.node.width=Math.max(O,Math.min(B,H))},I=()=>{d.value=!1};return Zo(()=>{M(),window.addEventListener("mousemove",A),window.addEventListener("mouseup",I)}),d0(M),Sc(()=>{window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I)}),(N,H)=>(k(),P("div",{id:N.node.id,ref_key:"el",ref:a,class:We(["baklava-node",m.value]),style:xn(Q.value),"data-node-type":N.node.type,onPointerdown:y},[Ft(i).settings.nodes.resizable?(k(),P("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):ne("",!0),er(N.$slots,"title",{},()=>[g("div",{class:"__title",onPointerdown:he(b,["self","stop"])},[l.value?J((k(),P("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":H[1]||(H[1]=O=>c.value=O),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:L,onKeydown:Xr(L,["enter"])},null,544)),[[we,c.value]]):(k(),P(ze,{key:0},[g("div",I6r,le(N.node.title),1),g("div",k6r,[oe(LG,{class:"--clickable",onClick:E}),oe(Ft(TE),{modelValue:h.value,"onUpdate:modelValue":H[0]||(H[0]=O=>h.value=O),x:0,y:0,items:f.value,onClick:x},null,8,["modelValue","items"])])],64))],32)]),er(N.$slots,"content",{},()=>[g("div",{class:We(["__content",T.value]),onKeydown:H[2]||(H[2]=Xr(he(()=>{},["stop"]),["delete"]))},[g("div",P6r,[(k(!0),P(ze,null,at(v.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"output",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))]),g("div",H6r,[(k(!0),P(ze,null,at(_.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"input",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))])],34)])],46,D6r))}}),F6r=ir({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:Fi.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=(s,a)=>{const l=(s+n.value.panning.x)*n.value.scaling,c=(a+n.value.panning.y)*n.value.scaling;return[l,c]},i=_t(()=>{const[s,a]=r(t.x1,t.y1),[l,c]=r(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${s} ${a} L ${l} ${c}`;{const u=.3*Math.abs(s-l);return`M ${s} ${a} C ${s+u} ${a}, ${l-u} ${c}, ${l} ${c}`}}),o=_t(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Fi.ALLOWED,"--forbidden":t.state===Fi.FORBIDDEN}));return{d:i,classes:o}}}),B6r=["d"];function $6r(t,e,n,r,i,o){return k(),P("path",{class:We(["baklava-connection",t.classes]),d:t.d},null,10,B6r)}const CG=Wn(F6r,[["render",$6r]]);function U6r(t){return document.getElementById(t.id)}function bc(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const G6r=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Xi();let n;const r=Ct({x1:0,y1:0,x2:0,y2:0}),i=_t(()=>t.connection.isInDanger?Fi.FORBIDDEN:Fi.NONE),o=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:c.position}),s=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:c.position}),a=c=>c.node&&c.interface&&c.port?[c.node.offsetLeft+c.interface.offsetLeft+c.port.offsetLeft+c.port.clientWidth/2,c.node.offsetTop+c.interface.offsetTop+c.port.offsetTop+c.port.clientHeight/2]:[0,0],l=()=>{const c=bc(t.connection.from),u=bc(t.connection.to);c.node&&u.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(c.node),n.observe(u.node)));const[d,h]=a(c),[f,m]=a(u);r.value={x1:d,y1:h,x2:f,y2:m}};return Zo(async()=>{await qe(),l()}),Sc(()=>{n&&n.disconnect()}),Er([o,s],()=>l(),{deep:!0}),{d:r,state:i}}});function q6r(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const z6r=Wn(G6r,[["render",q6r]]);function _d(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const j6r=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const e=_t(()=>t.connection?t.connection.status:Fi.NONE);return{d:_t(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const r=_d(bc(t.connection.from)),i=t.connection.to?_d(bc(t.connection.to)):[t.connection.mx||r[0],t.connection.my||r[1]];return t.connection.from.isInput?{input:i,output:r}:{input:r,output:i}}),status:e}}});function W6r(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const Y6r=Wn(j6r,[["render",W6r]]),K6r=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Xi(),n=Ct(null),r=au(t.value.settings.sidebar,"width"),i=_t(()=>t.value.settings.sidebar.resizable),o=_t(()=>{const d=e.value.sidebar.nodeId;return e.value.nodes.find(h=>h.id===d)}),s=_t(()=>({width:`${r.value}px`})),a=_t(()=>o.value?[...Object.values(o.value.inputs),...Object.values(o.value.outputs)].filter(h=>h.displayInSidebar&&h.component):[]),l=()=>{e.value.sidebar.visible=!1},c=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=d=>{var h,f;const m=((f=(h=n.value)==null?void 0:h.parentElement)==null?void 0:f.getBoundingClientRect().width)??500;let T=r.value-d.movementX;T<300?T=300:T>.9*m&&(T=.9*m),r.value=T};return{el:n,graph:e,resizable:i,node:o,styles:s,displayedInterfaces:a,startResize:c,close:l}}}),Z6r={class:"__header"},X6r={class:"__node-name"};function J6r(t,e,n,r,i,o){return k(),P("div",{ref:"el",class:We(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:xn(t.styles)},[t.resizable?(k(),P("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...s)=>t.startResize&&t.startResize(...s))},null,32)):ne("",!0),g("div",Z6r,[g("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...s)=>t.close&&t.close(...s))},"×"),g("div",X6r,[g("b",null,le(t.node?t.node.title:""),1)])]),(k(!0),P(ze,null,at(t.displayedInterfaces,s=>(k(),P("div",{key:s.id,class:"__interface"},[(k(),wt(Rd(s.component),{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,node:t.node,intf:s},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const e5r=Wn(K6r,[["render",J6r]]),t5r=ir({__name:"Minimap",setup(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=Ct(null),i=Ct(!1);let o,s=!1,a={x1:0,y1:0,x2:0,y2:0},l;const c=()=>{var x,L;if(!o)return;o.canvas.width=r.value.offsetWidth,o.canvas.height=r.value.offsetHeight;const M=new Map,C=new Map;for(const O of n.value.nodes){const B=U6r(O),V=(B==null?void 0:B.offsetWidth)??0,U=(B==null?void 0:B.offsetHeight)??0,G=((x=O.position)==null?void 0:x.x)??0,K=((L=O.position)==null?void 0:L.y)??0;M.set(O,{x1:G,y1:K,x2:G+V,y2:K+U}),C.set(O,B)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const O of M.values())O.x1A.x2&&(A.x2=O.x2),O.y2>A.y2&&(A.y2=O.y2);const I=50;A.x1-=I,A.y1-=I,A.x2+=I,A.y2+=I,a=A;const N=o.canvas.width/o.canvas.height,H=(a.x2-a.x1)/(a.y2-a.y1);if(N>H){const O=(N-H)*(a.y2-a.y1)*.5;a.x1-=O,a.x2+=O}else{const O=a.x2-a.x1,B=a.y2-a.y1,V=(O-N*B)/N*.5;a.y1-=V,a.y2+=V}o.clearRect(0,0,o.canvas.width,o.canvas.height),o.strokeStyle="white";for(const O of n.value.connections){const[B,V]=_d(bc(O.from)),[U,G]=_d(bc(O.to)),[K,W]=u(B,V),[te,de]=u(U,G);if(o.beginPath(),o.moveTo(K,W),e.value.settings.useStraightConnections)o.lineTo(te,de);else{const X=.3*Math.abs(K-te);o.bezierCurveTo(K+X,W,te-X,de,te,de)}o.stroke()}o.strokeStyle="lightgray";for(const[O,B]of M.entries()){const[V,U]=u(B.x1,B.y1),[G,K]=u(B.x2,B.y2);o.fillStyle=h(C.get(O)),o.beginPath(),o.rect(V,U,G-V,K-U),o.fill(),o.stroke()}if(i.value){const O=m(),[B,V]=u(O.x1,O.y1),[U,G]=u(O.x2,O.y2);o.fillStyle="rgba(255, 255, 255, 0.2)",o.fillRect(B,V,U-B,G-V)}},u=(x,L)=>[(x-a.x1)/(a.x2-a.x1)*o.canvas.width,(L-a.y1)/(a.y2-a.y1)*o.canvas.height],d=(x,L)=>[x*(a.x2-a.x1)/o.canvas.width+a.x1,L*(a.y2-a.y1)/o.canvas.height+a.y1],h=x=>{if(x){const L=x.querySelector(".__content");if(L){const C=f(L);if(C)return C}const M=f(x);if(M)return M}return"gray"},f=x=>{const L=getComputedStyle(x).backgroundColor;if(L&&L!=="rgba(0, 0, 0, 0)")return L},m=()=>{const x=r.value.parentElement.offsetWidth,L=r.value.parentElement.offsetHeight,M=x/n.value.scaling-n.value.panning.x,C=L/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:M,y2:C}},T=x=>{x.button===0&&(s=!0,Q(x))},Q=x=>{if(s){const[L,M]=d(x.offsetX,x.offsetY),C=m(),A=(C.x2-C.x1)/2,I=(C.y2-C.y1)/2;n.value.panning.x=-(L-A),n.value.panning.y=-(M-I)}},_=()=>{s=!1},v=()=>{i.value=!0},y=()=>{i.value=!1,_()};Er([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{c()});const b=_t(()=>n.value.nodes.map(x=>x.position)),E=_t(()=>n.value.nodes.map(x=>x.width));return Er([b,E],()=>{c()},{deep:!0}),Zo(()=>{o=r.value.getContext("2d"),o.imageSmoothingQuality="high",c(),l=setInterval(c,500)}),Sc(()=>{clearInterval(l)}),(x,L)=>(k(),P("canvas",{ref_key:"canvas",ref:r,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:he(T,["self"]),onMousemove:he(Q,["self"]),onMouseup:_,onContextmenu:L[0]||(L[0]=he(()=>{},["stop","prevent"]))},null,544))}}),n5r=ir({components:{ContextMenu:TE,VerticalDots:LG},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ci(),{switchGraph:n}=Xi(),r=Ct(!1),i=_t(()=>t.type.startsWith(l0));return{showContextMenu:r,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{r.value=!0},onContextMenuClick:l=>{const c=t.type.substring(l0.length),u=e.value.editor.graphTemplates.find(d=>d.id===c);if(u)switch(l){case"editSubgraph":n(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),r5r=["data-node-type"],i5r={class:"__title"},o5r={class:"__title-label"},s5r={key:0,class:"__menu"};function a5r(t,e,n,r,i,o){const s=pt("vertical-dots"),a=pt("context-menu");return k(),P("div",{class:"baklava-node --palette","data-node-type":t.type},[g("div",i5r,[g("div",o5r,le(t.title),1),t.hasContextMenu?(k(),P("div",s5r,[oe(s,{class:"--clickable",onPointerdown:e[0]||(e[0]=he(()=>{},["stop","prevent"])),onClick:he(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),oe(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=he(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):ne("",!0)])],8,r5r)}const fk=Wn(n5r,[["render",a5r]]),l5r={key:0},c5r=ir({__name:"NodePalette",setup(t){const{viewModel:e}=Ci(),{x:n,y:r}=g6r(),{transform:i}=yG(),o=vG(e),s=Gi("editorEl"),a=Ct(null),l=_t(()=>{if(!a.value||!(s!=null&&s.value))return{};const{left:u,top:d}=s.value.getBoundingClientRect();return{top:`${r.value-d}px`,left:`${n.value-u}px`}}),c=(u,d)=>{a.value={type:u,nodeInformation:d};const h=()=>{const f=Zr(new d.type);e.value.displayedGraph.addNode(f);const m=s.value.getBoundingClientRect(),[T,Q]=i(n.value-m.left,r.value-m.top);f.position.x=T,f.position.y=Q,a.value=null,document.removeEventListener("pointerup",h)};document.addEventListener("pointerup",h)};return(u,d)=>(k(),P(ze,null,[g("div",{class:"baklava-node-palette",onContextmenu:d[0]||(d[0]=he(()=>{},["stop","prevent"]))},[(k(!0),P(ze,null,at(Ft(o),h=>(k(),P("section",{key:h.name},[h.name!=="default"?(k(),P("h1",l5r,le(h.name),1)):ne("",!0),(k(!0),P(ze,null,at(h.nodeTypes,(f,m)=>(k(),wt(fk,{key:m,type:m,title:f.title,onPointerdown:T=>c(m,f)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),oe(lo,{name:"fade"},{default:Ve(()=>[a.value?(k(),P("div",{key:0,class:"baklava-dragged-node",style:xn(l.value)},[oe(fk,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):ne("",!0)]),_:1})],64))}});let F5;const u5r=new Uint8Array(16);function d5r(){if(!F5&&(F5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!F5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F5(u5r)}const yr=[];for(let t=0;t<256;++t)yr.push((t+256).toString(16).slice(1));function f5r(t,e=0){return yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]}const p5r=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pk={randomUUID:p5r};function Qd(t,e,n){if(pk.randomUUID&&!e&&!t)return pk.randomUUID();t=t||{};const r=t.random||(t.rng||d5r)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,f5r(r)}const c0="SAVE_SUBGRAPH";function h5r(t,e){const n=()=>{const r=t.value;if(!r.template)throw new Error("Graph template property not set");r.template.update(r.save()),r.template.panning=r.panning,r.template.scaling=r.scaling};e.registerCommand(c0,{canExecute:()=>{var r;return t.value!==((r=t.value.editor)==null?void 0:r.graph)},execute:n})}const T5r={},m5r={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},g5r=g("polyline",{points:"6 9 12 15 18 9"},null,-1),_5r=[g5r];function Q5r(t,e){return k(),P("svg",m5r,_5r)}const v5r=Wn(T5r,[["render",Q5r]]),y5r=ir({components:{"i-arrow":v5r},props:{intf:{type:Object,required:!0}},setup(t){const e=Ct(null),n=Ct(!1),r=_t(()=>t.intf.items.find(s=>typeof s=="string"?s===t.intf.value:s.value===t.intf.value)),i=_t(()=>r.value?typeof r.value=="string"?r.value:r.value.text:""),o=s=>{t.intf.value=typeof s=="string"?s:s.value};return xG(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:r,selectedText:i,setSelected:o}}}),b5r=["title"],E5r={class:"__selected"},x5r={class:"__text"},S5r={class:"__icon"},L5r={class:"__dropdown"},C5r={class:"item --header"},A5r=["onClick"];function w5r(t,e,n,r,i,o){const s=pt("i-arrow");return k(),P("div",{ref:"el",class:We(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[g("div",E5r,[g("div",x5r,le(t.selectedText),1),g("div",S5r,[oe(s)])]),oe(lo,{name:"slide-fade"},{default:Ve(()=>[J(g("div",L5r,[g("div",C5r,le(t.intf.name),1),(k(!0),P(ze,null,at(t.intf.items,(a,l)=>(k(),P("div",{key:l,class:We(["item",{"--active":a===t.selectedItem}]),onClick:c=>t.setSelected(a)},le(typeof a=="string"?a:a.text),11,A5r))),128))],512),[[Pt,t.open]])]),_:1})],10,b5r)}const M5r=Wn(y5r,[["render",w5r]]);class O5r extends Un{constructor(e,n,r){super(e,n),this.component=Ad(M5r),this.items=r}}const R5r=ir({props:{intf:{type:Object,required:!0}}});function N5r(t,e,n,r,i,o){return k(),P("div",null,le(t.intf.value),1)}const D5r=Wn(R5r,[["render",N5r]]);class I5r extends Un{constructor(e,n){super(e,n),this.component=Ad(D5r),this.setPort(!1)}}const k5r=ir({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:_t({get:()=>t.modelValue,set:r=>{e("update:modelValue",r)}})}}}),P5r=["placeholder","title"];function H5r(t,e,n,r,i,o){return k(),P("div",null,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>t.v=s),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,P5r),[[we,t.v]])])}const V5r=Wn(k5r,[["render",H5r]]);class i6 extends Un{constructor(){super(...arguments),this.component=Ad(V5r)}}class AG extends dE{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new i6("Name","Input").setPort(!1)},this.outputs={placeholder:new Un("Connection",void 0)}}}class wG extends fE{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new i6("Name","Output").setPort(!1),placeholder:new Un("Connection",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)}}}const MG="CREATE_SUBGRAPH",hk=[Qc,vc];function F5r(t,e,n){const r=()=>t.value.selectedNodes.filter(o=>!hk.includes(o.type)).length>0,i=()=>{const{viewModel:o}=Ci(),s=t.value,a=t.value.editor;if(s.selectedNodes.length===0)return;const l=s.selectedNodes.filter(C=>!hk.includes(C.type)),c=l.flatMap(C=>Object.values(C.inputs)),u=l.flatMap(C=>Object.values(C.outputs)),d=s.connections.filter(C=>!u.includes(C.from)&&c.includes(C.to)),h=s.connections.filter(C=>u.includes(C.from)&&!c.includes(C.to)),f=s.connections.filter(C=>u.includes(C.from)&&c.includes(C.to)),m=l.map(C=>C.save()),T=f.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),Q=new Map,{xLeft:_,xRight:v,yTop:y}=B5r(l);for(const[C,A]of d.entries()){const I=new AG;I.inputs.name.value=A.to.name,m.push({...I.save(),position:{x:v-o.value.settings.nodes.defaultWidth-100,y:y+C*200}}),T.push({id:Qd(),from:I.outputs.placeholder.id,to:A.to.id}),Q.set(A.to.id,I.graphInterfaceId)}for(const[C,A]of h.entries()){const I=new wG;I.inputs.name.value=A.from.name,m.push({...I.save(),position:{x:_+100,y:y+C*200}}),T.push({id:Qd(),from:A.from.id,to:I.inputs.placeholder.id}),Q.set(A.from.id,I.graphInterfaceId)}const b=Zr(new w9({connections:T,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(b);const E=a.nodeTypes.get(yc(b));if(!E)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");s.activeTransactions++;const x=Zr(new E.type);s.addNode(x);const L=Math.round(l.map(C=>C.position.x).reduce((C,A)=>C+A,0)/l.length),M=Math.round(l.map(C=>C.position.y).reduce((C,A)=>C+A,0)/l.length);x.position.x=L,x.position.y=M,d.forEach(C=>{s.removeConnection(C),s.addConnection(C.from,x.inputs[Q.get(C.to.id)])}),h.forEach(C=>{s.removeConnection(C),s.addConnection(x.outputs[Q.get(C.from.id)],C.to)}),l.forEach(C=>s.removeNode(C)),s.activeTransactions--,e.canExecuteCommand(c0)&&e.executeCommand(c0),n(b),t.value.panning={...s.panning},t.value.scaling=s.scaling};e.registerCommand(MG,{canExecute:r,execute:i})}function B5r(t){const e=t.reduce((i,o)=>{const s=o.position.x;return s{const s=o.position.y;return s{const s=o.position.x+o.width;return s>i?s:i},-1/0),xRight:e,yTop:n}}class Tk{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const r=new n.type;e.addNode(r),r.load(this.nodeState),this.nodeId=r.id}removeNode(e){const n=e.nodes.find(r=>r.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class mk{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const r=n;this.connectionState={id:r.id,from:r.from.id,to:r.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),r=e.findNodeInterface(this.connectionState.to);if(!n||!r)return;const i=e.addConnection(n,r);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const n=e.connections.find(r=>r.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class $5r{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!o.value)if(a.value)l.value.push(Q);else for(s.value!==i.value.length-1&&(i.value=i.value.slice(0,s.value+1)),i.value.push(Q),s.value++;i.value.length>r.value;)i.value.shift()},u=()=>{a.value=!0},d=()=>{a.value=!1,l.value.length>0&&(c(new $5r(l.value)),l.value=[])},h=()=>i.value.length!==0&&s.value!==-1,f=()=>{h()&&(o.value=!0,i.value[s.value--].undo(t.value),o.value=!1)},m=()=>i.value.length!==0&&s.value{m()&&(o.value=!0,i.value[++s.value].redo(t.value),o.value=!1)};return Er(t,(Q,_)=>{_&&(_.events.addNode.unsubscribe(n),_.events.removeNode.unsubscribe(n),_.events.addConnection.unsubscribe(n),_.events.removeConnection.unsubscribe(n)),Q&&(Q.events.addNode.subscribe(n,v=>{c(new Tk("addNode",v.id))}),Q.events.removeNode.subscribe(n,v=>{c(new Tk("removeNode",v.save()))}),Q.events.addConnection.subscribe(n,v=>{c(new mk("addConnection",v.id))}),Q.events.removeConnection.subscribe(n,v=>{c(new mk("removeConnection",v))}))},{immediate:!0}),e.registerCommand(tv,{canExecute:h,execute:f}),e.registerCommand(nv,{canExecute:m,execute:T}),e.registerCommand(mE,{canExecute:()=>!a.value,execute:u}),e.registerCommand(gE,{canExecute:()=>a.value,execute:d}),e.registerHotkey(["Control","z"],tv),e.registerHotkey(["Control","y"],nv),Zr({maxSteps:r})}const rv="DELETE_NODES";function G5r(t,e){e.registerCommand(rv,{canExecute:()=>t.value.selectedNodes.length>0,execute(){e.executeCommand(mE);for(let n=t.value.selectedNodes.length-1;n>=0;n--){const r=t.value.selectedNodes[n];t.value.removeNode(r)}e.executeCommand(gE)}}),e.registerHotkey(["Delete"],rv)}const OG="SWITCH_TO_MAIN_GRAPH";function q5r(t,e,n){e.registerCommand(OG,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(c0),n(t.value.editor.graph)}})}function z5r(t,e,n){G5r(t,e),F5r(t,e,n),h5r(t,e),q5r(t,e,n)}const iv="COPY",ov="PASTE",j5r="CLEAR_CLIPBOARD";function W5r(t,e,n){const r=Symbol("ClipboardToken"),i=Ct(""),o=Ct(""),s=_t(()=>!i.value),a=()=>{i.value="",o.value=""},l=()=>{const d=t.value.selectedNodes.flatMap(f=>[...Object.values(f.inputs),...Object.values(f.outputs)]),h=t.value.connections.filter(f=>d.includes(f.from)||d.includes(f.to)).map(f=>({from:f.from.id,to:f.to.id}));o.value=JSON.stringify(h),i.value=JSON.stringify(t.value.selectedNodes.map(f=>f.save()))},c=(d,h,f)=>{for(const m of d){let T;if((!f||f==="input")&&(T=Object.values(m.inputs).find(Q=>Q.id===h)),!T&&(!f||f==="output")&&(T=Object.values(m.outputs).find(Q=>Q.id===h)),T)return T}},u=()=>{if(s.value)return;const d=new Map,h=JSON.parse(i.value),f=JSON.parse(o.value),m=[],T=[],Q=t.value;n.executeCommand(mE);for(const _ of h){const v=e.value.nodeTypes.get(_.type);if(!v){console.warn(`Node type ${_.type} not registered`);return}const y=new v.type,b=y.id;m.push(y),y.hooks.beforeLoad.subscribe(r,E=>{const x=E;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(r),x}),Q.addNode(y),y.load({..._,id:b}),y.id=b,d.set(_.id,b);for(const E of Object.values(y.inputs)){const x=Qd();d.set(E.id,x),E.id=x}for(const E of Object.values(y.outputs)){const x=Qd();d.set(E.id,x),E.id=x}}for(const _ of f){const v=c(m,d.get(_.from),"output"),y=c(m,d.get(_.to),"input");if(!v||!y)continue;const b=Q.addConnection(v,y);b&&T.push(b)}return t.value.selectedNodes=m,n.executeCommand(gE),{newNodes:m,newConnections:T}};return n.registerCommand(iv,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],iv),n.registerCommand(ov,{canExecute:()=>!s.value,execute:u}),n.registerHotkey(["Control","v"],ov),n.registerCommand(j5r,{canExecute:()=>!0,execute:a}),Zr({isEmpty:s})}const Y5r="OPEN_SIDEBAR";function K5r(t,e){e.registerCommand(Y5r,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function Z5r(t,e){K5r(t,e)}const X5r={},J5r={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},eur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),tur=g("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),nur=[eur,tur];function rur(t,e){return k(),P("svg",J5r,nur)}const iur=Wn(X5r,[["render",rur]]),our={},sur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},aur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),lur=g("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),cur=[aur,lur];function uur(t,e){return k(),P("svg",sur,cur)}const dur=Wn(our,[["render",uur]]),fur={},pur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},hur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Tur=g("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),mur=g("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),gur=g("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),_ur=[hur,Tur,mur,gur];function Qur(t,e){return k(),P("svg",pur,_ur)}const vur=Wn(fur,[["render",Qur]]),yur={},bur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Eur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),xur=g("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),Sur=g("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),Lur=[Eur,xur,Sur];function Cur(t,e){return k(),P("svg",bur,Lur)}const Aur=Wn(yur,[["render",Cur]]),wur={},Mur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Our=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Rur=g("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),Nur=g("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),Dur=[Our,Rur,Nur];function Iur(t,e){return k(),P("svg",Mur,Dur)}const kur=Wn(wur,[["render",Iur]]),Pur={},Hur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Vur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Fur=g("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),Bur=g("circle",{cx:"12",cy:"14",r:"2"},null,-1),$ur=g("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),Uur=[Vur,Fur,Bur,$ur];function Gur(t,e){return k(),P("svg",Hur,Uur)}const qur=Wn(Pur,[["render",Gur]]),zur={},jur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Wur=j1('',6),Yur=[Wur];function Kur(t,e){return k(),P("svg",jur,Yur)}const Zur=Wn(zur,[["render",Kur]]),Xur={},Jur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},edr=j1('',18),tdr=[edr];function ndr(t,e){return k(),P("svg",Jur,tdr)}const rdr=Wn(Xur,[["render",ndr]]),idr={},odr={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},sdr=j1('',6),adr=[sdr];function ldr(t,e){return k(),P("svg",odr,adr)}const cdr=Wn(idr,[["render",ldr]]),udr=ir({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ci();return{viewModel:t}}}),ddr=["disabled","title"];function fdr(t,e,n,r,i,o){return k(),P("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=s=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(k(),wt(Rd(t.icon),{key:0})):(k(),P(ze,{key:1},[ft(le(t.title),1)],64))],8,ddr)}const pdr=Wn(udr,[["render",fdr]]),hdr=ir({components:{ToolbarButton:pdr},setup(){const{viewModel:t}=Ci();return{isSubgraph:_t(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:iv,title:"Copy",icon:kur},{command:ov,title:"Paste",icon:Aur},{command:rv,title:"Delete selected nodes",icon:cdr},{command:tv,title:"Undo",icon:iur},{command:nv,title:"Redo",icon:dur},{command:ru,title:"Box Select",icon:rdr},{command:MG,title:"Create Subgraph",icon:Zur}],subgraphCommands:[{command:c0,title:"Save Subgraph",icon:qur},{command:OG,title:"Back to Main Graph",icon:vur}]}}});function Tdr(t,e,n,r,i,o){const s=pt("toolbar-button");return k(),P("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=he(()=>{},["stop","prevent"]))},[(k(!0),P(ze,null,at(t.commands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(k(!0),P(ze,{key:0},at(t.subgraphCommands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):ne("",!0)],32)}const mdr=Wn(hdr,[["render",Tdr]]),gdr={class:"connections-container"},_dr=ir({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),r=au(e,"viewModel");t6r(r);const i=Ct(null);Dl("editorEl",i);const o=_t(()=>e.viewModel.displayedGraph.nodes),s=_t(()=>e.viewModel.displayedGraph.nodes.map(M=>_G(au(M,"position")))),a=_t(()=>e.viewModel.displayedGraph.connections),l=_t(()=>e.viewModel.displayedGraph.selectedNodes),c=n6r(),u=r6r(),d=i6r(r),h=o6r(i),f=_t(()=>({...c.styles.value})),m=Ct(0);e.viewModel.editor.hooks.load.subscribe(n,M=>(m.value++,M));const T=M=>{c.onPointerMove(M),u.onMouseMove(M)},Q=M=>{if(M.button===0){if(h.onPointerDown(M))return;M.target===i.value&&(E(),c.onPointerDown(M)),u.onMouseDown()}},_=M=>{c.onPointerUp(M),u.onMouseUp()},v=M=>{M.key==="Tab"&&M.preventDefault(),e.viewModel.commandHandler.handleKeyDown(M)},y=M=>{e.viewModel.commandHandler.handleKeyUp(M)},b=M=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||E(),e.viewModel.displayedGraph.selectedNodes.push(M)},E=()=>{e.viewModel.displayedGraph.selectedNodes=[]},x=M=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const A=o.value.indexOf(C),I=s.value[A];I.onPointerDown(M),document.addEventListener("pointermove",I.onPointerMove)}document.addEventListener("pointerup",L)},L=()=>{for(const M of e.viewModel.displayedGraph.selectedNodes){const C=o.value.indexOf(M),A=s.value[C];A.onPointerUp(),document.removeEventListener("pointermove",A.onPointerMove)}document.removeEventListener("pointerup",L)};return(M,C)=>(k(),P("div",{ref_key:"el",ref:i,tabindex:"-1",class:We(["baklava-editor",{"baklava-ignore-mouse":!!Ft(u).temporaryConnection.value||Ft(c).dragging.value,"--temporary-connection":!!Ft(u).temporaryConnection.value,"--start-selection-box":Ft(h).startSelection}]),onPointermove:he(T,["self"]),onPointerdown:Q,onPointerup:_,onWheel:C[1]||(C[1]=he((...A)=>Ft(c).onMouseWheel&&Ft(c).onMouseWheel(...A),["self"])),onKeydown:v,onKeyup:y,onContextmenu:C[2]||(C[2]=(...A)=>Ft(d).open&&Ft(d).open(...A))},[er(M.$slots,"background",{},()=>[oe(l6r)]),er(M.$slots,"toolbar",{},()=>[M.viewModel.settings.toolbar.enabled?(k(),wt(mdr,{key:0})):ne("",!0)]),er(M.$slots,"palette",{},()=>[M.viewModel.settings.palette.enabled?(k(),wt(c5r,{key:0})):ne("",!0)]),(k(),P("svg",gdr,[(k(!0),P(ze,null,at(a.value,A=>(k(),P("g",{key:A.id+m.value.toString()},[er(M.$slots,"connection",{connection:A},()=>[oe(z6r,{connection:A},null,8,["connection"])])]))),128)),er(M.$slots,"temporaryConnection",{temporaryConnection:Ft(u).temporaryConnection.value},()=>[Ft(u).temporaryConnection.value?(k(),wt(Y6r,{key:0,connection:Ft(u).temporaryConnection.value},null,8,["connection"])):ne("",!0)])])),g("div",{class:"node-container",style:xn(f.value)},[oe(Ns,{name:"fade"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.value,(A,I)=>er(M.$slots,"node",{key:A.id+m.value.toString(),node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},()=>[oe(V6r,{node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),er(M.$slots,"sidebar",{},()=>[M.viewModel.settings.sidebar.enabled?(k(),wt(e5r,{key:0})):ne("",!0)]),er(M.$slots,"minimap",{},()=>[M.viewModel.settings.enableMinimap?(k(),wt(t5r,{key:0})):ne("",!0)]),er(M.$slots,"contextMenu",{contextMenu:Ft(d)},()=>[M.viewModel.settings.contextMenu.enabled?(k(),wt(TE,{key:0,modelValue:Ft(d).show.value,"onUpdate:modelValue":C[0]||(C[0]=A=>Ft(d).show.value=A),items:Ft(d).items.value,x:Ft(d).x.value,y:Ft(d).y.value,onClick:Ft(d).onClick},null,8,["modelValue","items","x","y","onClick"])):ne("",!0)]),Ft(h).isSelecting?(k(),P("div",{key:0,class:"selection-box",style:xn(Ft(h).getStyles())},null,4)):ne("",!0)],34))}});function Qdr(t){const e=Ct([]),n=Ct([]);return{pressedKeys:e,handleKeyDown:s=>{e.value.includes(s.key)||e.value.push(s.key),!(document.activeElement&&gG(document.activeElement))&&n.value.forEach(a=>{var l,c;a.keys.every(u=>e.value.includes(u))&&((l=a.options)!=null&&l.preventDefault&&s.preventDefault(),(c=a.options)!=null&&c.stopPropagation&&s.stopPropagation(),t(a.commandName))})},handleKeyUp:s=>{const a=e.value.indexOf(s.key);a>=0&&e.value.splice(a,1)},registerHotkey:(s,a,l)=>{n.value.push({keys:s,commandName:a,options:l})}}}const vdr=()=>{const t=Ct(new Map),e=s=>t.value.has(s),n=(s,a)=>{if(t.value.has(s))throw new Error(`Command "${s}" already exists`);t.value.set(s,a)},r=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return}return t.value.get(s).execute(...l)},i=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return!1}return t.value.get(s).canExecute(l)},o=Qdr(r);return Zr({hasCommand:e,registerCommand:n,executeCommand:r,canExecuteCommand:i,...o})},ydr=t=>!(t instanceof r6);function bdr(t,e){return{switchGraph:r=>{let i;if(ydr(r))i=new r6(t.value),r.createGraph(i);else{if(r!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=r}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??r.panning??{x:0,y:0},i.scaling=i.scaling??r.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function Edr(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const xdr=()=>({useStraightConnections:!1,enableMinimap:!1,toolbar:{enabled:!0},palette:{enabled:!0},background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{enabled:!0,width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1,reverseY:!1},contextMenu:{enabled:!0,additionalItems:[]}});function Sdr(t){const e=Ct(new W0r),n=Symbol("ViewModelToken"),r=Ct(null),i=Fq(r),{switchGraph:o}=bdr(e,r),s=_t(()=>i.value&&i.value!==e.value.graph),a=Zr(xdr()),l=vdr(),c=U5r(i,l),u=W5r(i,e,l),d={renderNode:new Li(null),renderInterface:new Li(null)};return z5r(i,l,o),Z5r(i,l),Er(e,(h,f)=>{f&&(f.events.registerGraph.unsubscribe(n),f.graphEvents.beforeAddNode.unsubscribe(n),h.nodeHooks.beforeLoad.unsubscribe(n),h.nodeHooks.afterSave.unsubscribe(n),h.graphTemplateHooks.beforeLoad.unsubscribe(n),h.graphTemplateHooks.afterSave.unsubscribe(n),h.graph.hooks.load.unsubscribe(n),h.graph.hooks.save.unsubscribe(n)),h&&(h.nodeHooks.beforeLoad.subscribe(n,(m,T)=>(T.position=m.position??{x:0,y:0},T.width=m.width??a.nodes.defaultWidth,T.twoColumn=m.twoColumn??!1,m)),h.nodeHooks.afterSave.subscribe(n,(m,T)=>(m.position=T.position,m.width=T.width,m.twoColumn=T.twoColumn,m)),h.graphTemplateHooks.beforeLoad.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graphTemplateHooks.afterSave.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graph.hooks.load.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graph.hooks.save.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graphEvents.beforeAddNode.subscribe(n,m=>Edr(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(AG,{category:"Subgraphs"}),e.value.registerNodeType(wG,{category:"Subgraphs"}),o(h.graph))},{immediate:!0}),Zr({editor:e,displayedGraph:i,isSubgraph:s,settings:a,commandHandler:l,history:c,clipboard:u,hooks:d,switchGraph:o})}const Ldr=Zc({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Un("Request",""),agent_name:()=>new O5r("Personality","",oo.state.config.personalities).setPort(!1)},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(oo.state.config.personalities);let e="";try{e=(await ve.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),Cdr=Zc({type:"RAGNode",title:"RAG",inputs:{request:()=>new Un("Prompt",""),document_path:()=>new i6("Document path","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await ve.get("/rag",{params:{text:t,doc_path:e}})).data}catch(r){console.error(r)}return{response:n}}}),gk=Zc({type:"Task",title:"Task",inputs:{description:()=>new i6("Task description","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt")},calculate({description:t}){return{prompt:t}}}),_k=Zc({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Un("Input","")},outputs:{response:()=>new I5r("Text","")},async calculate({request:t}){}}),Qk=Zc({type:"LLMNode",title:"LLM",inputs:{request:()=>new Un("Request","")},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(oo.state.config.personalities);let e="";try{e=(await ve.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),Adr=Zc({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Un("Question",""),outputs:()=>new i6("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Un("Response","")}}),wdr=ir({components:{"baklava-editor":_dr},setup(){const t=Sdr(),e=new J0r(t.editor);t.editor.registerNodeType(Ldr),t.editor.registerNodeType(gk),t.editor.registerNodeType(Cdr),t.editor.registerNodeType(_k),t.editor.registerNodeType(Qk),t.editor.registerNodeType(Adr);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),Y0r(a,t.editor),e.resume()}),e.start();function r(a,l,c){const u=new a;return t.displayedGraph.addNode(u),u.position.x=l,u.position.y=c,u}const i=r(gk,300,140),o=r(Qk,550,140),s=r(_k,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,o.inputs.request),t.displayedGraph.addConnection(o.outputs.response,s.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),Mdr={style:{width:"100vw",height:"100vh"}};function Odr(t,e,n,r,i,o){const s=pt("baklava-editor");return k(),P("div",Mdr,[oe(s,{"view-model":t.baklava},null,8,["view-model"]),g("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),g("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const Rdr=yt(wdr,[["render",Odr]]),Ndr={},Ddr={style:{width:"100vw",height:"100vh"}},Idr=["src"];function kdr(t,e,n,r,i,o){return k(),P("div",Ddr,[g("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,Idr)])}const Pdr=yt(Ndr,[["render",kdr]]),Hdr={},Vdr={style:{width:"100vw",height:"100vh"}},Fdr=["src"];function Bdr(t,e,n,r,i,o){return k(),P("div",Vdr,[g("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,Fdr)])}const $dr=yt(Hdr,[["render",Bdr]]),Udr={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)}}},Gdr={class:"app-card flex flex-col h-full"},qdr={class:"flex-grow"},zdr={class:"flex items-center mb-4"},jdr=["src"],Wdr={class:"font-bold text-xl text-gray-800"},Ydr={class:"text-sm text-gray-600"},Kdr={class:"text-sm text-gray-600"},Zdr={class:"text-sm text-gray-600"},Xdr={class:"text-sm text-gray-600"},Jdr={class:"text-sm text-gray-600"},e7r={class:"mb-4"},t7r={class:"text-sm text-gray-600 h-20 overflow-y-auto"},n7r={class:"text-sm text-gray-600 mb-2"},r7r={key:0,class:"mb-4"},i7r={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},o7r={class:"mt-auto pt-4 border-t"},s7r={class:"flex justify-between items-center flex-wrap"},a7r=["title"],l7r=["fill"];function c7r(t,e,n,r,i,o){return k(),P("div",Gdr,[g("div",qdr,[g("div",zdr,[g("img",{src:n.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,jdr),g("div",null,[g("h3",Wdr,le(n.app.name),1),g("p",Ydr,"Author: "+le(n.app.author),1),g("p",Kdr,"Version: "+le(n.app.version),1),g("p",Zdr,"Category: "+le(n.app.category),1),g("p",Xdr,"Creation date: "+le(o.formatDate(n.app.creation_date)),1),g("p",Jdr,"Last update: "+le(o.formatDate(n.app.last_update_date)),1),g("p",{class:We(["text-sm",n.app.is_public?"text-green-600":"text-orange-600"])},le(n.app.is_public?"Public App":"Local App"),3)])]),g("div",e7r,[e[10]||(e[10]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",t7r,le(n.app.description),1)]),g("p",n7r,"AI Model: "+le(n.app.model_name),1),n.app.disclaimer&&n.app.disclaimer.trim()!==""?(k(),P("div",r7r,[e[11]||(e[11]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),g("p",i7r,le(n.app.disclaimer),1)])):ne("",!0)]),g("div",o7r,[g("div",s7r,[g("button",{onClick:e[0]||(e[0]=he(s=>t.$emit("toggle-favorite",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),P("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,l7r))],8,a7r),n.app.installed?(k(),P("button",{key:0,onClick:e[1]||(e[1]=he(s=>t.$emit("uninstall",n.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):n.app.existsInFolder?(k(),P("button",{key:1,onClick:e[2]||(e[2]=he(s=>t.$emit("delete",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):(k(),P("button",{key:2,onClick:e[3]||(e[3]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)]))),n.app.installed?(k(),P("button",{key:3,onClick:e[4]||(e[4]=he(s=>t.$emit("edit",n.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)]))):ne("",!0),g("button",{onClick:e[5]||(e[5]=he(s=>t.$emit("download",n.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])),n.app.has_readme?(k(),P("button",{key:4,onClick:e[6]||(e[6]=he(s=>t.$emit("help",n.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M12 21a9 9 0 100-18 9 9 0 000 18z"})],-1)]))):ne("",!0),n.app.installed?(k(),P("button",{key:5,onClick:e[7]||(e[7]=he(s=>t.$emit("open",n.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)]))):ne("",!0),n.app.has_server&&n.app.installed?(k(),P("button",{key:6,onClick:e[8]||(e[8]=he(s=>t.$emit("start-server",n.app.folder_name),["stop"])),class:"text-teal-500 hover:text-teal-600 transition duration-300 ease-in-out",title:"Start Server"},e[20]||(e[20]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):ne("",!0),n.app.has_update?(k(),P("button",{key:7,onClick:e[9]||(e[9]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"relative text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out animate-pulse",title:"Update Available"},e[21]||(e[21]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),g("span",{class:"absolute top-0 right-0 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-100 transform translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full"},"!",-1)]))):ne("",!0)])])])}const u7r=yt(Udr,[["render",c7r],["__scopeId","data-v-ae134649"]]),d7r={components:{AppCard:u7r},data(){return{apps:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"update",sortOrder:"desc",showOnlyInstalled:!1,showOnlyUnInstalled:!1}},computed:{currentCategoryName(){return this.selectedCategory==="all"?"All Apps":this.selectedCategory},combinedApps(){this.apps.map(e=>e.name);const t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory,r=this.showOnlyInstalled&&t.installed||this.showOnlyUnInstalled&&!t.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&n&&r})},sortedAndFilteredApps(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.appName))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(t){console.log("Toggling favorite"),console.log(t);const e=this.favorites.indexOf(t);e===-1?this.favorites.push(t):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const t=localStorage.getItem("appZooFavorites");console.log("savedFavorites",t),t&&(this.favorites=JSON.parse(t))},startServer(t){const e={client_id:this.$store.state.client_id,app_name:t};this.$store.state.messageBox.showBlockingMessage(`Loading server. -This may take some time the first time as some libraries need to be installed.`),ve.post("/apps/start_server",e).then(n=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",n.data.message),this.$notify({type:"success",title:"Server Starting",text:n.data.message})}).catch(n=>{var r,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",n),this.$notify({type:"error",title:"Server Start Failed",text:((i=(r=n.response)==null?void 0:r.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(t){this.selectedFile=t.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,n;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const t=new FormData;t.append("file",this.selectedFile),t.append("client_id",this.$store.state.client_id);try{const r=await ve.post("/upload_app",t,{headers:{"Content-Type":"multipart/form-data"}});this.message=r.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(r){console.error("Error uploading app:",r),this.error=((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const t=await ve.get("/apps");this.apps=t.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const t=await ve.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const t=await ve.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await ve.get(`/apps/${t.folder_name}/README.md`);this.appCode=fn(e.data)}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${t}`);try{await ve.post(`/install/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps(),this.$store.state.messageBox.hideMessage()}},async uninstallApp(t){this.loading=!0;try{await ve.post(`/uninstall/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(t){this.loading=!0;try{await ve.post(`/delete/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(t){this.loading=!0;try{const e=await ve.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){this.isLoading=!0,this.error=null;try{const e=await ve.post("/download_app",{client_id:this.$store.state.client_id,app_name:t},{responseType:"arraybuffer"}),n=e.headers["content-disposition"],r=n&&n.match(/filename="?(.+)"?/i),i=r?r[1]:"app.zip",o=new Blob([e.data],{type:"application/zip"}),s=window.URL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=s,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(s),document.body.removeChild(a)}catch(e){console.error("Error downloading app:",e),this.error="Failed to download the app. Please try again."}finally{this.isLoading=!1}},openApp(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},f7r={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},p7r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},h7r={class:"flex flex-wrap items-center justify-between gap-4"},T7r={class:"flex items-center space-x-4"},m7r=["disabled"],g7r={key:0},_7r={key:1,class:"error"},Q7r={class:"relative flex-grow max-w-md"},v7r={class:"flex items-center space-x-4"},y7r=["value"],b7r={class:"flex items-center space-x-4"},E7r={for:"installed-only",class:"font-semibold"},x7r={for:"installed-only",class:"font-semibold"},S7r={class:"flex items-center space-x-4"},L7r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},C7r={key:1,class:"pb-20"},A7r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},w7r={class:"text-2xl font-bold mb-4"},M7r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},O7r={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},R7r={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},N7r={class:"flex justify-between items-center mb-4"},D7r={class:"text-2xl font-bold"},I7r=["srcdoc"],k7r={key:1,class:"text-center text-red-500"};function P7r(t,e,n,r,i,o){const s=pt("app-card");return k(),P("div",f7r,[g("nav",p7r,[g("div",h7r,[g("div",T7r,[g("button",{onClick:e[0]||(e[0]=(...a)=>o.fetchGithubApps&&o.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),ft(" Refresh ")])),g("button",{onClick:e[1]||(e[1]=(...a)=>o.openAppsFolder&&o.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1),ft(" Open Folder ")])),g("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>o.onFileSelected&&o.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),g("button",{onClick:e[3]||(e[3]=(...a)=>o.triggerFileInput&&o.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},le(i.isUploading?"Uploading...":"Upload App"),9,m7r)]),i.message?(k(),P("p",g7r,le(i.message),1)):ne("",!0),i.error?(k(),P("p",_7r,le(i.error),1)):ne("",!0),g("div",Q7r,[J(g("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.searchQuery=a),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[we,i.searchQuery]]),e[13]||(e[13]=g("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),g("div",v7r,[e[15]||(e[15]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("select",{id:"category-select","onUpdate:modelValue":e[5]||(e[5]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[14]||(e[14]=g("option",{value:"all"},"All Categories",-1)),(k(!0),P(ze,null,at(o.categories,a=>(k(),P("option",{key:a,value:a},le(a),9,y7r))),128))],512),[[dn,i.selectedCategory]])]),g("div",b7r,[g("label",E7r,[J(g("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[nt,i.showOnlyInstalled]]),e[16]||(e[16]=ft(" Show only installed apps "))]),g("label",x7r,[J(g("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[nt,i.showOnlyUnInstalled]]),e[17]||(e[17]=ft(" Show only non installed apps "))])]),g("div",S7r,[e[19]||(e[19]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("select",{id:"sort-select","onUpdate:modelValue":e[8]||(e[8]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[18]||(e[18]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[dn,i.sortBy]]),g("button",{onClick:e[9]||(e[9]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),P("div",L7r,e[20]||(e[20]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),P("div",C7r,[e[21]||(e[21]=g("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),g("div",A7r,[(k(!0),P(ze,null,at(o.favoriteApps,a=>(k(),wt(s,{key:a.appName,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),g("h2",w7r,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredApps.length)+")",1),g("div",M7r,[(k(!0),P(ze,null,at(o.sortedAndFilteredApps,a=>(k(),wt(s,{key:a.name,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(k(),P("div",O7r,[g("div",R7r,[g("div",N7r,[g("h2",D7r,le(i.selectedApp.name),1),g("button",{onClick:e[10]||(e[10]=(...a)=>o.backToZoo&&o.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(k(),P("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,I7r)):(k(),P("p",k7r,"Please install this app to view its code."))])])):ne("",!0),i.message?(k(),P("div",{key:3,class:We(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},le(i.message),3)):ne("",!0)])}const H7r=yt(d7r,[["render",P7r]]),V7r={components:{PersonalityEntry:tU},data(){return{personalities:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"name",sortOrder:"asc"}},computed:{currentCategoryName(){return this.selectedCategory=="all"?"All Personalities":this.selectedCategory},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},combinedApps(){this.personalities.map(e=>e.name);const t=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))].sort((t,e)=>t.localeCompare(e))},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory;return e&&n})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.uid))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=t.language==null?t.full_path:t.full_path+":"+t.language;if(console.log("pth",e),t.isMounted&&this.configFile.personalities.includes(e)){const n=await this.select_personality(t);console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: +This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(n)}}const t6r=["INPUT","TEXTAREA","SELECT"];function gG(t){return t6r.includes(t.tagName)}let ev=null;function n6r(t){ev=t}function Ci(){if(!ev)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:ev}}function Xi(){const{viewModel:t}=Ci();return{graph:au(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function _G(t){const{graph:e}=Xi(),n=Ct(null),r=Ct(null);return{dragging:_t(()=>!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},r.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const c=l.pageX-n.value.x,u=l.pageY-n.value.y;t.value.x=r.value.x+c/e.value.scaling,t.value.y=r.value.y+u/e.value.scaling}},onPointerUp:()=>{n.value=null,r.value=null}}}function QG(t,e,n){if(!e.template)return!1;if(yc(e.template)===n)return!0;const r=t.graphTemplates.find(o=>yc(o)===n);return r?r.nodes.filter(o=>o.type.startsWith(l0)).some(o=>QG(t,e,o.type)):!1}function vG(t){return _t(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),r=[];for(const i of n.values()){let o=e.filter(([,s])=>s.category===i);t.value.displayedGraph.template?o=o.filter(([s])=>!QG(t.value.editor,t.value.displayedGraph,s)):o=o.filter(([s])=>![Qc,vc].includes(s)),o.length>0&&r.push({name:i,nodeTypes:Object.fromEntries(o)})}return r.sort((i,o)=>i.name==="default"?-1:o.name==="default"||i.name>o.name?1:-1),r})}function yG(){const{graph:t}=Xi();return{transform:(n,r)=>{const i=n/t.value.scaling-t.value.panning.x,o=r/t.value.scaling-t.value.panning.y;return[i,o]}}}function r6r(){const{graph:t}=Xi();let e=[],n=-1,r={x:0,y:0};const i=_t(()=>t.value.panning),o=_G(i),s=_t(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(f,m,T)=>{const Q=[f/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],_=[f/T-t.value.panning.x,m/T-t.value.panning.y],v=[_[0]-Q[0],_[1]-Q[1]];t.value.panning.x+=v[0],t.value.panning.y+=v[1],t.value.scaling=T},l=f=>{f.preventDefault();let m=f.deltaY;f.deltaMode===1&&(m*=32);const T=t.value.scaling*(1-m/3e3);a(f.offsetX,f.offsetY,T)},c=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:s,...o,onPointerDown:f=>{if(e.push(f),o.onPointerDown(f),e.length===2){const{ax:m,ay:T,bx:Q,by:_}=c();r={x:m+(Q-m)/2,y:T+(_-T)/2}}},onPointerMove:f=>{for(let m=0;m0){const E=t.value.scaling*(1+(b-n)/500);a(r.x,r.y,E)}n=b}else o.onPointerMove(f)},onPointerUp:f=>{e=e.filter(m=>m.pointerId!==f.pointerId),n=-1,o.onPointerUp()},onMouseWheel:l}}var Fi=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Fi||{});const bG=Symbol();function i6r(){const{graph:t}=Xi(),e=Ct(null),n=Ct(null),r=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Fi.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Fi.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},o=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},s=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Fi.ALLOWED:Fi.FORBIDDEN,l.connectionAllowed){const c=l.connectionsInDanger.map(u=>u.id);t.value.connections.forEach(u=>{c.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Fi.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return Dl(bG,{temporaryConnection:e,hoveredOver:s}),{temporaryConnection:e,onMouseMove:r,onMouseDown:i,onMouseUp:o,hoveredOver:s}}function o6r(t){const e=Ct(!1),n=Ct(0),r=Ct(0),i=vG(t),{transform:o}=yG(),s=_t(()=>{let u=[];const d={};for(const f of i.value){const m=Object.entries(f.nodeTypes).map(([T,Q])=>({label:Q.title,value:"addNode:"+T}));f.name==="default"?u=m:d[f.name]=m}const h=[...Object.entries(d).map(([f,m])=>({label:f,submenu:m}))];return h.length>0&&u.length>0&&h.push({isDivider:!0}),h.push(...u),h}),a=_t(()=>t.value.settings.contextMenu.additionalItems.length===0?s.value:[{label:"Add node",submenu:s.value},...t.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!t.value.commandHandler.canExecuteCommand(u.command)})]);function l(u){const d=u.target;if(!(d instanceof Element)||gG(d))return;u.preventDefault(),e.value=!0;const h=d.getBoundingClientRect(),m=d.closest(".baklava-editor").getBoundingClientRect();n.value=h.x+u.offsetX-m.x,r.value=h.y+u.offsetY-m.y}function c(u){if(u.startsWith("addNode:")){const d=u.substring(8),h=t.value.editor.nodeTypes.get(d);if(!h)return;const f=Zr(new h.type);t.value.displayedGraph.addNode(f);const[m,T]=o(n.value,r.value);f.position.x=m,f.position.y=T}else if(u.startsWith("command:")){const d=u.substring(8);t.value.commandHandler.canExecuteCommand(d)&&t.value.commandHandler.executeCommand(d)}}return{show:e,x:n,y:r,items:a,open:l,onClick:c}}const ru="START_SELECTION_BOX";function s6r(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=_t(()=>n.value.nodes),i=Ct(!1),o=Ct(!1),s=Ct([0,0]),a=Ct([0,0]);Er(e,()=>{e.value.commandHandler.hasCommand(ru)||(e.value.commandHandler.registerCommand(ru,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],ru))},{immediate:!0});function l(_){return[_.clientX-t.value.getBoundingClientRect().left,_.clientY-t.value.getBoundingClientRect().top]}function c(_){return i.value?(o.value=!0,i.value=!1,s.value=l(_),a.value=l(_),document.addEventListener("pointermove",u),document.addEventListener("pointerup",d),!0):!1}function u(_){s.value=l(_)}function d(_){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",d),s.value=l(_),o.value=!1;const v=h();for(const y of v)e.value.displayedGraph.selectedNodes.push(y)}function h(){const _=f(),y=document.querySelector(".baklava-editor").getBoundingClientRect();return r.value.filter(b=>{const E=m(b,y);return T(_,E)})}function f(){return{left:Math.min(s.value[0],a.value[0]),top:Math.min(s.value[1],a.value[1]),right:Math.max(s.value[0],a.value[0]),bottom:Math.max(s.value[1],a.value[1])}}function m(_,v){const y=document.getElementById(_.id),b=y?y.getBoundingClientRect():{x:0,y:0,width:0,height:0},E=b.x-v.left,x=b.y-v.top;return{left:E,top:x,right:E+b.width,bottom:x+b.height}}function T(_,v){return _.leftv.left&&_.topv.top}function Q(){return{width:Math.abs(a.value[0]-s.value[0])+"px",height:Math.abs(a.value[1]-s.value[1])+"px",left:(a.value[0]>s.value[0]?s.value[0]:a.value[0])+"px",top:(a.value[1]>s.value[1]?s.value[1]:a.value[1])+"px"}}return Zr({startSelection:i,isSelecting:o,start:s,end:a,onPointerDown:c,getStyles:Q})}const a6r=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Xi();return{styles:_t(()=>{const r=t.value.settings.background,i=e.value.panning.x*e.value.scaling,o=e.value.panning.y*e.value.scaling,s=e.value.scaling*r.gridSize,a=s/r.gridDivision,l=`${s}px ${s}px, ${s}px ${s}px`,c=e.value.scaling>r.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${o}px`,backgroundSize:`${l} ${c}`}})}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function l6r(t,e,n,r,i,o){return k(),P("div",{class:"background",style:xn(t.styles)},null,4)}const c6r=Wn(a6r,[["render",l6r]]);function u6r(t){return wk()?(gq(t),!0):!1}function pE(t){return typeof t=="function"?t():Ft(t)}const EG=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const d6r=Object.prototype.toString,f6r=t=>d6r.call(t)==="[object Object]",iu=()=>{},p6r=h6r();function h6r(){var t,e;return EG&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function T6r(t,e,n=!1){return e.reduce((r,i)=>(i in t&&(!n||t[i]!==void 0)&&(r[i]=t[i]),r),{})}function m6r(t,e={}){if(!lr(t))return zq(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=qq(()=>({get(){return t.value[r]},set(i){var o;if((o=pE(e.replaceRef))!=null?o:!0)if(Array.isArray(t.value)){const a=[...t.value];a[r]=i,t.value=a}else{const a={...t.value,[r]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[r]=i}}));return n}function g4(t){var e;const n=pE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const hE=EG?window:void 0;function I4(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hE):[e,n,r,i]=t,!e)return iu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Er(()=>[g4(e),pE(i)],([u,d])=>{if(s(),!u)return;const h=f6r(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(m=>a(u,f,m,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return u6r(c),c}let uk=!1;function xG(t,e,n={}){const{window:r=hE,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return iu;p6r&&!uk&&(uk=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",iu)),r.document.documentElement.addEventListener("click",iu));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(m=>m===h.target||h.composedPath().includes(m));{const m=g4(f);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[I4(r,"click",h=>{const f=g4(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),I4(r,"pointerdown",h=>{const f=g4(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),s&&I4(r,"blur",h=>{setTimeout(()=>{var f;const m=g4(t);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const SG={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},g6r=Object.keys(SG);function _6r(t={}){const{target:e=hE}=t,n=Ct(!1),r=Ct(t.initialValue||{});Object.assign(r.value,SG,r.value);const i=o=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(o.pointerType))&&(r.value=T6r(o,g6r,!1))};if(e){const o={passive:!0};I4(e,["pointerdown","pointermove","pointerup"],i,o),I4(e,"pointerleave",()=>n.value=!1,o)}return{...m6r(r),isInside:n}}const Q6r=["onMouseenter","onMouseleave","onClick"],v6r={class:"flex-fill"},y6r={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},b6r=g("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[g("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),E6r=[b6r],TE=ir({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,r=e;let i=null;const o=Ct(null),s=Ct(-1),a=Ct(0),l=Ct({x:!1,y:!1}),c=_t(()=>n.flippable&&(l.value.x||n.isFlipped.x)),u=_t(()=>n.flippable&&(l.value.y||n.isFlipped.y)),d=_t(()=>{const v={};return n.isNested||(v.top=(u.value?n.y-a.value:n.y)+"px",v.left=n.x+"px"),v}),h=_t(()=>({"--flipped-x":c.value,"--flipped-y":u.value,"--nested":n.isNested})),f=_t(()=>n.items.map(v=>({...v,hover:!1})));Er([()=>n.y,()=>n.items],()=>{var v,y,b,E;a.value=n.items.length*30;const x=((y=(v=o.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,L=((E=(b=o.value)==null?void 0:b.parentElement)==null?void 0:E.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>L-20}),xG(o,()=>{n.modelValue&&r("update:modelValue",!1)});const m=v=>{!v.submenu&&v.value&&(r("click",v.value),r("update:modelValue",!1))},T=v=>{r("click",v),s.value=-1,n.isNested||r("update:modelValue",!1)},Q=(v,y)=>{n.items[y].submenu&&(s.value=y,i!==null&&(clearTimeout(i),i=null))},_=(v,y)=>{n.items[y].submenu&&(i=window.setTimeout(()=>{s.value=-1,i=null},200))};return(v,y)=>{const b=pt("ContextMenu",!0);return k(),wt(lo,{name:"slide-fade"},{default:Ve(()=>[J(g("div",{ref_key:"el",ref:o,class:We(["baklava-context-menu",h.value]),style:xn(d.value)},[(k(!0),P(ze,null,at(f.value,(E,x)=>(k(),P(ze,null,[E.isDivider?(k(),P("div",{key:`d-${x}`,class:"divider"})):(k(),P("div",{key:`i-${x}`,class:We(["item",{submenu:!!E.submenu,"--disabled":!!E.disabled}]),onMouseenter:L=>Q(L,x),onMouseleave:L=>_(L,x),onClick:he(L=>m(E),["stop","prevent"])},[g("div",v6r,le(E.label),1),E.submenu?(k(),P("div",y6r,E6r)):ne("",!0),E.submenu?(k(),wt(b,{key:1,"model-value":s.value===x,items:E.submenu,"is-nested":!0,"is-flipped":{x:c.value,y:u.value},flippable:v.flippable,onClick:T},null,8,["model-value","items","is-flipped","flippable"])):ne("",!0)],42,Q6r))],64))),256))],6),[[Pt,v.modelValue]])]),_:1})}}}),x6r={},S6r={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},L6r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),C6r=g("circle",{cx:"12",cy:"12",r:"1"},null,-1),A6r=g("circle",{cx:"12",cy:"19",r:"1"},null,-1),w6r=g("circle",{cx:"12",cy:"5",r:"1"},null,-1),M6r=[L6r,C6r,A6r,w6r];function O6r(t,e){return k(),P("svg",S6r,M6r)}const LG=Wn(x6r,[["render",O6r]]),R6r=["id"],N6r={key:0,class:"__tooltip"},D6r={key:2,class:"align-middle"},dk=ir({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(Q,_=100)=>{const v=typeof(Q==null?void 0:Q.toString)=="function"?String(Q):"";return v.length>_?v.slice(0,_)+"...":v},n=t,{viewModel:r}=Ci(),{hoveredOver:i,temporaryConnection:o}=Gi(bG),s=Ct(null),a=_t(()=>n.intf.connectionCount>0),l=Ct(!1),c=_t(()=>r.value.settings.displayValueOnHover&&l.value),u=_t(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),d=_t(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),h=()=>{l.value=!0,i(n.intf)},f=()=>{l.value=!1,i(void 0)},m=()=>{s.value&&r.value.hooks.renderInterface.execute({intf:n.intf,el:s.value})},T=()=>{const Q=r.value.displayedGraph.sidebar;Q.nodeId=n.node.id,Q.optionName=n.intf.name,Q.visible=!0};return Zo(m),d0(m),(Q,_)=>{var v;return k(),P("div",{id:Q.intf.id,ref_key:"el",ref:s,class:We(["baklava-node-interface",u.value])},[Q.intf.port?(k(),P("div",{key:0,class:We(["__port",{"--selected":((v=Ft(o))==null?void 0:v.from)===Q.intf}]),onPointerover:h,onPointerout:f},[er(Q.$slots,"portTooltip",{showTooltip:c.value},()=>[c.value===!0?(k(),P("span",N6r,le(e(Q.intf.value)),1)):ne("",!0)])],34)):ne("",!0),d.value?(k(),wt(Rd(Q.intf.component),{key:1,modelValue:Q.intf.value,"onUpdate:modelValue":_[0]||(_[0]=y=>Q.intf.value=y),node:Q.node,intf:Q.intf,onOpenSidebar:T},null,40,["modelValue","node","intf"])):(k(),P("span",D6r,le(Q.intf.name),1))],10,R6r)}}}),I6r=["id","data-node-type"],k6r={class:"__title-label"},P6r={class:"__menu"},H6r={class:"__outputs"},V6r={class:"__inputs"},F6r=ir({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,r=e,{viewModel:i}=Ci(),{graph:o,switchGraph:s}=Xi(),a=Ct(null),l=Ct(!1),c=Ct(""),u=Ct(null),d=Ct(!1),h=Ct(!1),f=_t(()=>{const N=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(l0)&&N.push({value:"editSubgraph",label:"Edit Subgraph"}),N}),m=_t(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),T=_t(()=>({"--reverse-y":n.node.reverseY??i.value.settings.nodes.reverseY})),Q=_t(()=>{var N,H;return{top:`${((N=n.node.position)==null?void 0:N.y)??0}px`,left:`${((H=n.node.position)==null?void 0:H.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),_=_t(()=>Object.values(n.node.inputs).filter(N=>!N.hidden)),v=_t(()=>Object.values(n.node.outputs).filter(N=>!N.hidden)),y=()=>{r("select")},b=N=>{n.selected||y(),r("start-drag",N)},E=()=>{h.value=!0},x=async N=>{var H;switch(N){case"delete":o.value.removeNode(n.node);break;case"rename":c.value=n.node.title,l.value=!0,await qe(),(H=u.value)==null||H.focus();break;case"editSubgraph":s(n.node.template);break}},L=()=>{n.node.title=c.value,l.value=!1},M=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},C=N=>{d.value=!0,N.preventDefault()},A=N=>{if(!d.value)return;const H=n.node.width+N.movementX/o.value.scaling,O=i.value.settings.nodes.minWidth,B=i.value.settings.nodes.maxWidth;n.node.width=Math.max(O,Math.min(B,H))},I=()=>{d.value=!1};return Zo(()=>{M(),window.addEventListener("mousemove",A),window.addEventListener("mouseup",I)}),d0(M),Sc(()=>{window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I)}),(N,H)=>(k(),P("div",{id:N.node.id,ref_key:"el",ref:a,class:We(["baklava-node",m.value]),style:xn(Q.value),"data-node-type":N.node.type,onPointerdown:y},[Ft(i).settings.nodes.resizable?(k(),P("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):ne("",!0),er(N.$slots,"title",{},()=>[g("div",{class:"__title",onPointerdown:he(b,["self","stop"])},[l.value?J((k(),P("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":H[1]||(H[1]=O=>c.value=O),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:L,onKeydown:Xr(L,["enter"])},null,544)),[[we,c.value]]):(k(),P(ze,{key:0},[g("div",k6r,le(N.node.title),1),g("div",P6r,[oe(LG,{class:"--clickable",onClick:E}),oe(Ft(TE),{modelValue:h.value,"onUpdate:modelValue":H[0]||(H[0]=O=>h.value=O),x:0,y:0,items:f.value,onClick:x},null,8,["modelValue","items"])])],64))],32)]),er(N.$slots,"content",{},()=>[g("div",{class:We(["__content",T.value]),onKeydown:H[2]||(H[2]=Xr(he(()=>{},["stop"]),["delete"]))},[g("div",H6r,[(k(!0),P(ze,null,at(v.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"output",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))]),g("div",V6r,[(k(!0),P(ze,null,at(_.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"input",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))])],34)])],46,I6r))}}),B6r=ir({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:Fi.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=(s,a)=>{const l=(s+n.value.panning.x)*n.value.scaling,c=(a+n.value.panning.y)*n.value.scaling;return[l,c]},i=_t(()=>{const[s,a]=r(t.x1,t.y1),[l,c]=r(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${s} ${a} L ${l} ${c}`;{const u=.3*Math.abs(s-l);return`M ${s} ${a} C ${s+u} ${a}, ${l-u} ${c}, ${l} ${c}`}}),o=_t(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Fi.ALLOWED,"--forbidden":t.state===Fi.FORBIDDEN}));return{d:i,classes:o}}}),$6r=["d"];function U6r(t,e,n,r,i,o){return k(),P("path",{class:We(["baklava-connection",t.classes]),d:t.d},null,10,$6r)}const CG=Wn(B6r,[["render",U6r]]);function G6r(t){return document.getElementById(t.id)}function bc(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const q6r=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Xi();let n;const r=Ct({x1:0,y1:0,x2:0,y2:0}),i=_t(()=>t.connection.isInDanger?Fi.FORBIDDEN:Fi.NONE),o=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:c.position}),s=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:c.position}),a=c=>c.node&&c.interface&&c.port?[c.node.offsetLeft+c.interface.offsetLeft+c.port.offsetLeft+c.port.clientWidth/2,c.node.offsetTop+c.interface.offsetTop+c.port.offsetTop+c.port.clientHeight/2]:[0,0],l=()=>{const c=bc(t.connection.from),u=bc(t.connection.to);c.node&&u.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(c.node),n.observe(u.node)));const[d,h]=a(c),[f,m]=a(u);r.value={x1:d,y1:h,x2:f,y2:m}};return Zo(async()=>{await qe(),l()}),Sc(()=>{n&&n.disconnect()}),Er([o,s],()=>l(),{deep:!0}),{d:r,state:i}}});function z6r(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const j6r=Wn(q6r,[["render",z6r]]);function _d(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const W6r=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const e=_t(()=>t.connection?t.connection.status:Fi.NONE);return{d:_t(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const r=_d(bc(t.connection.from)),i=t.connection.to?_d(bc(t.connection.to)):[t.connection.mx||r[0],t.connection.my||r[1]];return t.connection.from.isInput?{input:i,output:r}:{input:r,output:i}}),status:e}}});function Y6r(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const K6r=Wn(W6r,[["render",Y6r]]),Z6r=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Xi(),n=Ct(null),r=au(t.value.settings.sidebar,"width"),i=_t(()=>t.value.settings.sidebar.resizable),o=_t(()=>{const d=e.value.sidebar.nodeId;return e.value.nodes.find(h=>h.id===d)}),s=_t(()=>({width:`${r.value}px`})),a=_t(()=>o.value?[...Object.values(o.value.inputs),...Object.values(o.value.outputs)].filter(h=>h.displayInSidebar&&h.component):[]),l=()=>{e.value.sidebar.visible=!1},c=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=d=>{var h,f;const m=((f=(h=n.value)==null?void 0:h.parentElement)==null?void 0:f.getBoundingClientRect().width)??500;let T=r.value-d.movementX;T<300?T=300:T>.9*m&&(T=.9*m),r.value=T};return{el:n,graph:e,resizable:i,node:o,styles:s,displayedInterfaces:a,startResize:c,close:l}}}),X6r={class:"__header"},J6r={class:"__node-name"};function e5r(t,e,n,r,i,o){return k(),P("div",{ref:"el",class:We(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:xn(t.styles)},[t.resizable?(k(),P("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...s)=>t.startResize&&t.startResize(...s))},null,32)):ne("",!0),g("div",X6r,[g("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...s)=>t.close&&t.close(...s))},"×"),g("div",J6r,[g("b",null,le(t.node?t.node.title:""),1)])]),(k(!0),P(ze,null,at(t.displayedInterfaces,s=>(k(),P("div",{key:s.id,class:"__interface"},[(k(),wt(Rd(s.component),{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,node:t.node,intf:s},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const t5r=Wn(Z6r,[["render",e5r]]),n5r=ir({__name:"Minimap",setup(t){const{viewModel:e}=Ci(),{graph:n}=Xi(),r=Ct(null),i=Ct(!1);let o,s=!1,a={x1:0,y1:0,x2:0,y2:0},l;const c=()=>{var x,L;if(!o)return;o.canvas.width=r.value.offsetWidth,o.canvas.height=r.value.offsetHeight;const M=new Map,C=new Map;for(const O of n.value.nodes){const B=G6r(O),V=(B==null?void 0:B.offsetWidth)??0,U=(B==null?void 0:B.offsetHeight)??0,G=((x=O.position)==null?void 0:x.x)??0,K=((L=O.position)==null?void 0:L.y)??0;M.set(O,{x1:G,y1:K,x2:G+V,y2:K+U}),C.set(O,B)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const O of M.values())O.x1A.x2&&(A.x2=O.x2),O.y2>A.y2&&(A.y2=O.y2);const I=50;A.x1-=I,A.y1-=I,A.x2+=I,A.y2+=I,a=A;const N=o.canvas.width/o.canvas.height,H=(a.x2-a.x1)/(a.y2-a.y1);if(N>H){const O=(N-H)*(a.y2-a.y1)*.5;a.x1-=O,a.x2+=O}else{const O=a.x2-a.x1,B=a.y2-a.y1,V=(O-N*B)/N*.5;a.y1-=V,a.y2+=V}o.clearRect(0,0,o.canvas.width,o.canvas.height),o.strokeStyle="white";for(const O of n.value.connections){const[B,V]=_d(bc(O.from)),[U,G]=_d(bc(O.to)),[K,W]=u(B,V),[te,de]=u(U,G);if(o.beginPath(),o.moveTo(K,W),e.value.settings.useStraightConnections)o.lineTo(te,de);else{const X=.3*Math.abs(K-te);o.bezierCurveTo(K+X,W,te-X,de,te,de)}o.stroke()}o.strokeStyle="lightgray";for(const[O,B]of M.entries()){const[V,U]=u(B.x1,B.y1),[G,K]=u(B.x2,B.y2);o.fillStyle=h(C.get(O)),o.beginPath(),o.rect(V,U,G-V,K-U),o.fill(),o.stroke()}if(i.value){const O=m(),[B,V]=u(O.x1,O.y1),[U,G]=u(O.x2,O.y2);o.fillStyle="rgba(255, 255, 255, 0.2)",o.fillRect(B,V,U-B,G-V)}},u=(x,L)=>[(x-a.x1)/(a.x2-a.x1)*o.canvas.width,(L-a.y1)/(a.y2-a.y1)*o.canvas.height],d=(x,L)=>[x*(a.x2-a.x1)/o.canvas.width+a.x1,L*(a.y2-a.y1)/o.canvas.height+a.y1],h=x=>{if(x){const L=x.querySelector(".__content");if(L){const C=f(L);if(C)return C}const M=f(x);if(M)return M}return"gray"},f=x=>{const L=getComputedStyle(x).backgroundColor;if(L&&L!=="rgba(0, 0, 0, 0)")return L},m=()=>{const x=r.value.parentElement.offsetWidth,L=r.value.parentElement.offsetHeight,M=x/n.value.scaling-n.value.panning.x,C=L/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:M,y2:C}},T=x=>{x.button===0&&(s=!0,Q(x))},Q=x=>{if(s){const[L,M]=d(x.offsetX,x.offsetY),C=m(),A=(C.x2-C.x1)/2,I=(C.y2-C.y1)/2;n.value.panning.x=-(L-A),n.value.panning.y=-(M-I)}},_=()=>{s=!1},v=()=>{i.value=!0},y=()=>{i.value=!1,_()};Er([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{c()});const b=_t(()=>n.value.nodes.map(x=>x.position)),E=_t(()=>n.value.nodes.map(x=>x.width));return Er([b,E],()=>{c()},{deep:!0}),Zo(()=>{o=r.value.getContext("2d"),o.imageSmoothingQuality="high",c(),l=setInterval(c,500)}),Sc(()=>{clearInterval(l)}),(x,L)=>(k(),P("canvas",{ref_key:"canvas",ref:r,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:he(T,["self"]),onMousemove:he(Q,["self"]),onMouseup:_,onContextmenu:L[0]||(L[0]=he(()=>{},["stop","prevent"]))},null,544))}}),r5r=ir({components:{ContextMenu:TE,VerticalDots:LG},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ci(),{switchGraph:n}=Xi(),r=Ct(!1),i=_t(()=>t.type.startsWith(l0));return{showContextMenu:r,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{r.value=!0},onContextMenuClick:l=>{const c=t.type.substring(l0.length),u=e.value.editor.graphTemplates.find(d=>d.id===c);if(u)switch(l){case"editSubgraph":n(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),i5r=["data-node-type"],o5r={class:"__title"},s5r={class:"__title-label"},a5r={key:0,class:"__menu"};function l5r(t,e,n,r,i,o){const s=pt("vertical-dots"),a=pt("context-menu");return k(),P("div",{class:"baklava-node --palette","data-node-type":t.type},[g("div",o5r,[g("div",s5r,le(t.title),1),t.hasContextMenu?(k(),P("div",a5r,[oe(s,{class:"--clickable",onPointerdown:e[0]||(e[0]=he(()=>{},["stop","prevent"])),onClick:he(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),oe(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=he(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):ne("",!0)])],8,i5r)}const fk=Wn(r5r,[["render",l5r]]),c5r={key:0},u5r=ir({__name:"NodePalette",setup(t){const{viewModel:e}=Ci(),{x:n,y:r}=_6r(),{transform:i}=yG(),o=vG(e),s=Gi("editorEl"),a=Ct(null),l=_t(()=>{if(!a.value||!(s!=null&&s.value))return{};const{left:u,top:d}=s.value.getBoundingClientRect();return{top:`${r.value-d}px`,left:`${n.value-u}px`}}),c=(u,d)=>{a.value={type:u,nodeInformation:d};const h=()=>{const f=Zr(new d.type);e.value.displayedGraph.addNode(f);const m=s.value.getBoundingClientRect(),[T,Q]=i(n.value-m.left,r.value-m.top);f.position.x=T,f.position.y=Q,a.value=null,document.removeEventListener("pointerup",h)};document.addEventListener("pointerup",h)};return(u,d)=>(k(),P(ze,null,[g("div",{class:"baklava-node-palette",onContextmenu:d[0]||(d[0]=he(()=>{},["stop","prevent"]))},[(k(!0),P(ze,null,at(Ft(o),h=>(k(),P("section",{key:h.name},[h.name!=="default"?(k(),P("h1",c5r,le(h.name),1)):ne("",!0),(k(!0),P(ze,null,at(h.nodeTypes,(f,m)=>(k(),wt(fk,{key:m,type:m,title:f.title,onPointerdown:T=>c(m,f)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),oe(lo,{name:"fade"},{default:Ve(()=>[a.value?(k(),P("div",{key:0,class:"baklava-dragged-node",style:xn(l.value)},[oe(fk,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):ne("",!0)]),_:1})],64))}});let F5;const d5r=new Uint8Array(16);function f5r(){if(!F5&&(F5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!F5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F5(d5r)}const yr=[];for(let t=0;t<256;++t)yr.push((t+256).toString(16).slice(1));function p5r(t,e=0){return yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]}const h5r=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pk={randomUUID:h5r};function Qd(t,e,n){if(pk.randomUUID&&!e&&!t)return pk.randomUUID();t=t||{};const r=t.random||(t.rng||f5r)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,p5r(r)}const c0="SAVE_SUBGRAPH";function T5r(t,e){const n=()=>{const r=t.value;if(!r.template)throw new Error("Graph template property not set");r.template.update(r.save()),r.template.panning=r.panning,r.template.scaling=r.scaling};e.registerCommand(c0,{canExecute:()=>{var r;return t.value!==((r=t.value.editor)==null?void 0:r.graph)},execute:n})}const m5r={},g5r={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},_5r=g("polyline",{points:"6 9 12 15 18 9"},null,-1),Q5r=[_5r];function v5r(t,e){return k(),P("svg",g5r,Q5r)}const y5r=Wn(m5r,[["render",v5r]]),b5r=ir({components:{"i-arrow":y5r},props:{intf:{type:Object,required:!0}},setup(t){const e=Ct(null),n=Ct(!1),r=_t(()=>t.intf.items.find(s=>typeof s=="string"?s===t.intf.value:s.value===t.intf.value)),i=_t(()=>r.value?typeof r.value=="string"?r.value:r.value.text:""),o=s=>{t.intf.value=typeof s=="string"?s:s.value};return xG(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:r,selectedText:i,setSelected:o}}}),E5r=["title"],x5r={class:"__selected"},S5r={class:"__text"},L5r={class:"__icon"},C5r={class:"__dropdown"},A5r={class:"item --header"},w5r=["onClick"];function M5r(t,e,n,r,i,o){const s=pt("i-arrow");return k(),P("div",{ref:"el",class:We(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[g("div",x5r,[g("div",S5r,le(t.selectedText),1),g("div",L5r,[oe(s)])]),oe(lo,{name:"slide-fade"},{default:Ve(()=>[J(g("div",C5r,[g("div",A5r,le(t.intf.name),1),(k(!0),P(ze,null,at(t.intf.items,(a,l)=>(k(),P("div",{key:l,class:We(["item",{"--active":a===t.selectedItem}]),onClick:c=>t.setSelected(a)},le(typeof a=="string"?a:a.text),11,w5r))),128))],512),[[Pt,t.open]])]),_:1})],10,E5r)}const O5r=Wn(b5r,[["render",M5r]]);class R5r extends Un{constructor(e,n,r){super(e,n),this.component=Ad(O5r),this.items=r}}const N5r=ir({props:{intf:{type:Object,required:!0}}});function D5r(t,e,n,r,i,o){return k(),P("div",null,le(t.intf.value),1)}const I5r=Wn(N5r,[["render",D5r]]);class k5r extends Un{constructor(e,n){super(e,n),this.component=Ad(I5r),this.setPort(!1)}}const P5r=ir({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:_t({get:()=>t.modelValue,set:r=>{e("update:modelValue",r)}})}}}),H5r=["placeholder","title"];function V5r(t,e,n,r,i,o){return k(),P("div",null,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>t.v=s),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,H5r),[[we,t.v]])])}const F5r=Wn(P5r,[["render",V5r]]);class i6 extends Un{constructor(){super(...arguments),this.component=Ad(F5r)}}class AG extends dE{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new i6("Name","Input").setPort(!1)},this.outputs={placeholder:new Un("Connection",void 0)}}}class wG extends fE{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new i6("Name","Output").setPort(!1),placeholder:new Un("Connection",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)}}}const MG="CREATE_SUBGRAPH",hk=[Qc,vc];function B5r(t,e,n){const r=()=>t.value.selectedNodes.filter(o=>!hk.includes(o.type)).length>0,i=()=>{const{viewModel:o}=Ci(),s=t.value,a=t.value.editor;if(s.selectedNodes.length===0)return;const l=s.selectedNodes.filter(C=>!hk.includes(C.type)),c=l.flatMap(C=>Object.values(C.inputs)),u=l.flatMap(C=>Object.values(C.outputs)),d=s.connections.filter(C=>!u.includes(C.from)&&c.includes(C.to)),h=s.connections.filter(C=>u.includes(C.from)&&!c.includes(C.to)),f=s.connections.filter(C=>u.includes(C.from)&&c.includes(C.to)),m=l.map(C=>C.save()),T=f.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),Q=new Map,{xLeft:_,xRight:v,yTop:y}=$5r(l);for(const[C,A]of d.entries()){const I=new AG;I.inputs.name.value=A.to.name,m.push({...I.save(),position:{x:v-o.value.settings.nodes.defaultWidth-100,y:y+C*200}}),T.push({id:Qd(),from:I.outputs.placeholder.id,to:A.to.id}),Q.set(A.to.id,I.graphInterfaceId)}for(const[C,A]of h.entries()){const I=new wG;I.inputs.name.value=A.from.name,m.push({...I.save(),position:{x:_+100,y:y+C*200}}),T.push({id:Qd(),from:A.from.id,to:I.inputs.placeholder.id}),Q.set(A.from.id,I.graphInterfaceId)}const b=Zr(new w9({connections:T,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(b);const E=a.nodeTypes.get(yc(b));if(!E)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");s.activeTransactions++;const x=Zr(new E.type);s.addNode(x);const L=Math.round(l.map(C=>C.position.x).reduce((C,A)=>C+A,0)/l.length),M=Math.round(l.map(C=>C.position.y).reduce((C,A)=>C+A,0)/l.length);x.position.x=L,x.position.y=M,d.forEach(C=>{s.removeConnection(C),s.addConnection(C.from,x.inputs[Q.get(C.to.id)])}),h.forEach(C=>{s.removeConnection(C),s.addConnection(x.outputs[Q.get(C.from.id)],C.to)}),l.forEach(C=>s.removeNode(C)),s.activeTransactions--,e.canExecuteCommand(c0)&&e.executeCommand(c0),n(b),t.value.panning={...s.panning},t.value.scaling=s.scaling};e.registerCommand(MG,{canExecute:r,execute:i})}function $5r(t){const e=t.reduce((i,o)=>{const s=o.position.x;return s{const s=o.position.y;return s{const s=o.position.x+o.width;return s>i?s:i},-1/0),xRight:e,yTop:n}}class Tk{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const r=new n.type;e.addNode(r),r.load(this.nodeState),this.nodeId=r.id}removeNode(e){const n=e.nodes.find(r=>r.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class mk{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const r=n;this.connectionState={id:r.id,from:r.from.id,to:r.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),r=e.findNodeInterface(this.connectionState.to);if(!n||!r)return;const i=e.addConnection(n,r);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const n=e.connections.find(r=>r.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class U5r{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!o.value)if(a.value)l.value.push(Q);else for(s.value!==i.value.length-1&&(i.value=i.value.slice(0,s.value+1)),i.value.push(Q),s.value++;i.value.length>r.value;)i.value.shift()},u=()=>{a.value=!0},d=()=>{a.value=!1,l.value.length>0&&(c(new U5r(l.value)),l.value=[])},h=()=>i.value.length!==0&&s.value!==-1,f=()=>{h()&&(o.value=!0,i.value[s.value--].undo(t.value),o.value=!1)},m=()=>i.value.length!==0&&s.value{m()&&(o.value=!0,i.value[++s.value].redo(t.value),o.value=!1)};return Er(t,(Q,_)=>{_&&(_.events.addNode.unsubscribe(n),_.events.removeNode.unsubscribe(n),_.events.addConnection.unsubscribe(n),_.events.removeConnection.unsubscribe(n)),Q&&(Q.events.addNode.subscribe(n,v=>{c(new Tk("addNode",v.id))}),Q.events.removeNode.subscribe(n,v=>{c(new Tk("removeNode",v.save()))}),Q.events.addConnection.subscribe(n,v=>{c(new mk("addConnection",v.id))}),Q.events.removeConnection.subscribe(n,v=>{c(new mk("removeConnection",v))}))},{immediate:!0}),e.registerCommand(tv,{canExecute:h,execute:f}),e.registerCommand(nv,{canExecute:m,execute:T}),e.registerCommand(mE,{canExecute:()=>!a.value,execute:u}),e.registerCommand(gE,{canExecute:()=>a.value,execute:d}),e.registerHotkey(["Control","z"],tv),e.registerHotkey(["Control","y"],nv),Zr({maxSteps:r})}const rv="DELETE_NODES";function q5r(t,e){e.registerCommand(rv,{canExecute:()=>t.value.selectedNodes.length>0,execute(){e.executeCommand(mE);for(let n=t.value.selectedNodes.length-1;n>=0;n--){const r=t.value.selectedNodes[n];t.value.removeNode(r)}e.executeCommand(gE)}}),e.registerHotkey(["Delete"],rv)}const OG="SWITCH_TO_MAIN_GRAPH";function z5r(t,e,n){e.registerCommand(OG,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(c0),n(t.value.editor.graph)}})}function j5r(t,e,n){q5r(t,e),B5r(t,e,n),T5r(t,e),z5r(t,e,n)}const iv="COPY",ov="PASTE",W5r="CLEAR_CLIPBOARD";function Y5r(t,e,n){const r=Symbol("ClipboardToken"),i=Ct(""),o=Ct(""),s=_t(()=>!i.value),a=()=>{i.value="",o.value=""},l=()=>{const d=t.value.selectedNodes.flatMap(f=>[...Object.values(f.inputs),...Object.values(f.outputs)]),h=t.value.connections.filter(f=>d.includes(f.from)||d.includes(f.to)).map(f=>({from:f.from.id,to:f.to.id}));o.value=JSON.stringify(h),i.value=JSON.stringify(t.value.selectedNodes.map(f=>f.save()))},c=(d,h,f)=>{for(const m of d){let T;if((!f||f==="input")&&(T=Object.values(m.inputs).find(Q=>Q.id===h)),!T&&(!f||f==="output")&&(T=Object.values(m.outputs).find(Q=>Q.id===h)),T)return T}},u=()=>{if(s.value)return;const d=new Map,h=JSON.parse(i.value),f=JSON.parse(o.value),m=[],T=[],Q=t.value;n.executeCommand(mE);for(const _ of h){const v=e.value.nodeTypes.get(_.type);if(!v){console.warn(`Node type ${_.type} not registered`);return}const y=new v.type,b=y.id;m.push(y),y.hooks.beforeLoad.subscribe(r,E=>{const x=E;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(r),x}),Q.addNode(y),y.load({..._,id:b}),y.id=b,d.set(_.id,b);for(const E of Object.values(y.inputs)){const x=Qd();d.set(E.id,x),E.id=x}for(const E of Object.values(y.outputs)){const x=Qd();d.set(E.id,x),E.id=x}}for(const _ of f){const v=c(m,d.get(_.from),"output"),y=c(m,d.get(_.to),"input");if(!v||!y)continue;const b=Q.addConnection(v,y);b&&T.push(b)}return t.value.selectedNodes=m,n.executeCommand(gE),{newNodes:m,newConnections:T}};return n.registerCommand(iv,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],iv),n.registerCommand(ov,{canExecute:()=>!s.value,execute:u}),n.registerHotkey(["Control","v"],ov),n.registerCommand(W5r,{canExecute:()=>!0,execute:a}),Zr({isEmpty:s})}const K5r="OPEN_SIDEBAR";function Z5r(t,e){e.registerCommand(K5r,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function X5r(t,e){Z5r(t,e)}const J5r={},eur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},tur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),nur=g("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),rur=[tur,nur];function iur(t,e){return k(),P("svg",eur,rur)}const our=Wn(J5r,[["render",iur]]),sur={},aur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},lur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),cur=g("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),uur=[lur,cur];function dur(t,e){return k(),P("svg",aur,uur)}const fur=Wn(sur,[["render",dur]]),pur={},hur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Tur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),mur=g("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),gur=g("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),_ur=g("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),Qur=[Tur,mur,gur,_ur];function vur(t,e){return k(),P("svg",hur,Qur)}const yur=Wn(pur,[["render",vur]]),bur={},Eur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},xur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Sur=g("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),Lur=g("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),Cur=[xur,Sur,Lur];function Aur(t,e){return k(),P("svg",Eur,Cur)}const wur=Wn(bur,[["render",Aur]]),Mur={},Our={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Rur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Nur=g("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),Dur=g("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),Iur=[Rur,Nur,Dur];function kur(t,e){return k(),P("svg",Our,Iur)}const Pur=Wn(Mur,[["render",kur]]),Hur={},Vur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Fur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Bur=g("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),$ur=g("circle",{cx:"12",cy:"14",r:"2"},null,-1),Uur=g("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),Gur=[Fur,Bur,$ur,Uur];function qur(t,e){return k(),P("svg",Vur,Gur)}const zur=Wn(Hur,[["render",qur]]),jur={},Wur={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Yur=j1('',6),Kur=[Yur];function Zur(t,e){return k(),P("svg",Wur,Kur)}const Xur=Wn(jur,[["render",Zur]]),Jur={},edr={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},tdr=j1('',18),ndr=[tdr];function rdr(t,e){return k(),P("svg",edr,ndr)}const idr=Wn(Jur,[["render",rdr]]),odr={},sdr={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},adr=j1('',6),ldr=[adr];function cdr(t,e){return k(),P("svg",sdr,ldr)}const udr=Wn(odr,[["render",cdr]]),ddr=ir({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ci();return{viewModel:t}}}),fdr=["disabled","title"];function pdr(t,e,n,r,i,o){return k(),P("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=s=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(k(),wt(Rd(t.icon),{key:0})):(k(),P(ze,{key:1},[ft(le(t.title),1)],64))],8,fdr)}const hdr=Wn(ddr,[["render",pdr]]),Tdr=ir({components:{ToolbarButton:hdr},setup(){const{viewModel:t}=Ci();return{isSubgraph:_t(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:iv,title:"Copy",icon:Pur},{command:ov,title:"Paste",icon:wur},{command:rv,title:"Delete selected nodes",icon:udr},{command:tv,title:"Undo",icon:our},{command:nv,title:"Redo",icon:fur},{command:ru,title:"Box Select",icon:idr},{command:MG,title:"Create Subgraph",icon:Xur}],subgraphCommands:[{command:c0,title:"Save Subgraph",icon:zur},{command:OG,title:"Back to Main Graph",icon:yur}]}}});function mdr(t,e,n,r,i,o){const s=pt("toolbar-button");return k(),P("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=he(()=>{},["stop","prevent"]))},[(k(!0),P(ze,null,at(t.commands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(k(!0),P(ze,{key:0},at(t.subgraphCommands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):ne("",!0)],32)}const gdr=Wn(Tdr,[["render",mdr]]),_dr={class:"connections-container"},Qdr=ir({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),r=au(e,"viewModel");n6r(r);const i=Ct(null);Dl("editorEl",i);const o=_t(()=>e.viewModel.displayedGraph.nodes),s=_t(()=>e.viewModel.displayedGraph.nodes.map(M=>_G(au(M,"position")))),a=_t(()=>e.viewModel.displayedGraph.connections),l=_t(()=>e.viewModel.displayedGraph.selectedNodes),c=r6r(),u=i6r(),d=o6r(r),h=s6r(i),f=_t(()=>({...c.styles.value})),m=Ct(0);e.viewModel.editor.hooks.load.subscribe(n,M=>(m.value++,M));const T=M=>{c.onPointerMove(M),u.onMouseMove(M)},Q=M=>{if(M.button===0){if(h.onPointerDown(M))return;M.target===i.value&&(E(),c.onPointerDown(M)),u.onMouseDown()}},_=M=>{c.onPointerUp(M),u.onMouseUp()},v=M=>{M.key==="Tab"&&M.preventDefault(),e.viewModel.commandHandler.handleKeyDown(M)},y=M=>{e.viewModel.commandHandler.handleKeyUp(M)},b=M=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||E(),e.viewModel.displayedGraph.selectedNodes.push(M)},E=()=>{e.viewModel.displayedGraph.selectedNodes=[]},x=M=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const A=o.value.indexOf(C),I=s.value[A];I.onPointerDown(M),document.addEventListener("pointermove",I.onPointerMove)}document.addEventListener("pointerup",L)},L=()=>{for(const M of e.viewModel.displayedGraph.selectedNodes){const C=o.value.indexOf(M),A=s.value[C];A.onPointerUp(),document.removeEventListener("pointermove",A.onPointerMove)}document.removeEventListener("pointerup",L)};return(M,C)=>(k(),P("div",{ref_key:"el",ref:i,tabindex:"-1",class:We(["baklava-editor",{"baklava-ignore-mouse":!!Ft(u).temporaryConnection.value||Ft(c).dragging.value,"--temporary-connection":!!Ft(u).temporaryConnection.value,"--start-selection-box":Ft(h).startSelection}]),onPointermove:he(T,["self"]),onPointerdown:Q,onPointerup:_,onWheel:C[1]||(C[1]=he((...A)=>Ft(c).onMouseWheel&&Ft(c).onMouseWheel(...A),["self"])),onKeydown:v,onKeyup:y,onContextmenu:C[2]||(C[2]=(...A)=>Ft(d).open&&Ft(d).open(...A))},[er(M.$slots,"background",{},()=>[oe(c6r)]),er(M.$slots,"toolbar",{},()=>[M.viewModel.settings.toolbar.enabled?(k(),wt(gdr,{key:0})):ne("",!0)]),er(M.$slots,"palette",{},()=>[M.viewModel.settings.palette.enabled?(k(),wt(u5r,{key:0})):ne("",!0)]),(k(),P("svg",_dr,[(k(!0),P(ze,null,at(a.value,A=>(k(),P("g",{key:A.id+m.value.toString()},[er(M.$slots,"connection",{connection:A},()=>[oe(j6r,{connection:A},null,8,["connection"])])]))),128)),er(M.$slots,"temporaryConnection",{temporaryConnection:Ft(u).temporaryConnection.value},()=>[Ft(u).temporaryConnection.value?(k(),wt(K6r,{key:0,connection:Ft(u).temporaryConnection.value},null,8,["connection"])):ne("",!0)])])),g("div",{class:"node-container",style:xn(f.value)},[oe(Ns,{name:"fade"},{default:Ve(()=>[(k(!0),P(ze,null,at(o.value,(A,I)=>er(M.$slots,"node",{key:A.id+m.value.toString(),node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},()=>[oe(F6r,{node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),er(M.$slots,"sidebar",{},()=>[M.viewModel.settings.sidebar.enabled?(k(),wt(t5r,{key:0})):ne("",!0)]),er(M.$slots,"minimap",{},()=>[M.viewModel.settings.enableMinimap?(k(),wt(n5r,{key:0})):ne("",!0)]),er(M.$slots,"contextMenu",{contextMenu:Ft(d)},()=>[M.viewModel.settings.contextMenu.enabled?(k(),wt(TE,{key:0,modelValue:Ft(d).show.value,"onUpdate:modelValue":C[0]||(C[0]=A=>Ft(d).show.value=A),items:Ft(d).items.value,x:Ft(d).x.value,y:Ft(d).y.value,onClick:Ft(d).onClick},null,8,["modelValue","items","x","y","onClick"])):ne("",!0)]),Ft(h).isSelecting?(k(),P("div",{key:0,class:"selection-box",style:xn(Ft(h).getStyles())},null,4)):ne("",!0)],34))}});function vdr(t){const e=Ct([]),n=Ct([]);return{pressedKeys:e,handleKeyDown:s=>{e.value.includes(s.key)||e.value.push(s.key),!(document.activeElement&&gG(document.activeElement))&&n.value.forEach(a=>{var l,c;a.keys.every(u=>e.value.includes(u))&&((l=a.options)!=null&&l.preventDefault&&s.preventDefault(),(c=a.options)!=null&&c.stopPropagation&&s.stopPropagation(),t(a.commandName))})},handleKeyUp:s=>{const a=e.value.indexOf(s.key);a>=0&&e.value.splice(a,1)},registerHotkey:(s,a,l)=>{n.value.push({keys:s,commandName:a,options:l})}}}const ydr=()=>{const t=Ct(new Map),e=s=>t.value.has(s),n=(s,a)=>{if(t.value.has(s))throw new Error(`Command "${s}" already exists`);t.value.set(s,a)},r=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return}return t.value.get(s).execute(...l)},i=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return!1}return t.value.get(s).canExecute(l)},o=vdr(r);return Zr({hasCommand:e,registerCommand:n,executeCommand:r,canExecuteCommand:i,...o})},bdr=t=>!(t instanceof r6);function Edr(t,e){return{switchGraph:r=>{let i;if(bdr(r))i=new r6(t.value),r.createGraph(i);else{if(r!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=r}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??r.panning??{x:0,y:0},i.scaling=i.scaling??r.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function xdr(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const Sdr=()=>({useStraightConnections:!1,enableMinimap:!1,toolbar:{enabled:!0},palette:{enabled:!0},background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{enabled:!0,width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1,reverseY:!1},contextMenu:{enabled:!0,additionalItems:[]}});function Ldr(t){const e=Ct(new Y0r),n=Symbol("ViewModelToken"),r=Ct(null),i=Fq(r),{switchGraph:o}=Edr(e,r),s=_t(()=>i.value&&i.value!==e.value.graph),a=Zr(Sdr()),l=ydr(),c=G5r(i,l),u=Y5r(i,e,l),d={renderNode:new Li(null),renderInterface:new Li(null)};return j5r(i,l,o),X5r(i,l),Er(e,(h,f)=>{f&&(f.events.registerGraph.unsubscribe(n),f.graphEvents.beforeAddNode.unsubscribe(n),h.nodeHooks.beforeLoad.unsubscribe(n),h.nodeHooks.afterSave.unsubscribe(n),h.graphTemplateHooks.beforeLoad.unsubscribe(n),h.graphTemplateHooks.afterSave.unsubscribe(n),h.graph.hooks.load.unsubscribe(n),h.graph.hooks.save.unsubscribe(n)),h&&(h.nodeHooks.beforeLoad.subscribe(n,(m,T)=>(T.position=m.position??{x:0,y:0},T.width=m.width??a.nodes.defaultWidth,T.twoColumn=m.twoColumn??!1,m)),h.nodeHooks.afterSave.subscribe(n,(m,T)=>(m.position=T.position,m.width=T.width,m.twoColumn=T.twoColumn,m)),h.graphTemplateHooks.beforeLoad.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graphTemplateHooks.afterSave.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graph.hooks.load.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graph.hooks.save.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graphEvents.beforeAddNode.subscribe(n,m=>xdr(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(AG,{category:"Subgraphs"}),e.value.registerNodeType(wG,{category:"Subgraphs"}),o(h.graph))},{immediate:!0}),Zr({editor:e,displayedGraph:i,isSubgraph:s,settings:a,commandHandler:l,history:c,clipboard:u,hooks:d,switchGraph:o})}const Cdr=Zc({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Un("Request",""),agent_name:()=>new R5r("Personality","",oo.state.config.personalities).setPort(!1)},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(oo.state.config.personalities);let e="";try{e=(await ve.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),Adr=Zc({type:"RAGNode",title:"RAG",inputs:{request:()=>new Un("Prompt",""),document_path:()=>new i6("Document path","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await ve.get("/rag",{params:{text:t,doc_path:e}})).data}catch(r){console.error(r)}return{response:n}}}),gk=Zc({type:"Task",title:"Task",inputs:{description:()=>new i6("Task description","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt")},calculate({description:t}){return{prompt:t}}}),_k=Zc({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Un("Input","")},outputs:{response:()=>new k5r("Text","")},async calculate({request:t}){}}),Qk=Zc({type:"LLMNode",title:"LLM",inputs:{request:()=>new Un("Request","")},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(oo.state.config.personalities);let e="";try{e=(await ve.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),wdr=Zc({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Un("Question",""),outputs:()=>new i6("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Un("Response","")}}),Mdr=ir({components:{"baklava-editor":Qdr},setup(){const t=Ldr(),e=new e6r(t.editor);t.editor.registerNodeType(Cdr),t.editor.registerNodeType(gk),t.editor.registerNodeType(Adr),t.editor.registerNodeType(_k),t.editor.registerNodeType(Qk),t.editor.registerNodeType(wdr);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),K0r(a,t.editor),e.resume()}),e.start();function r(a,l,c){const u=new a;return t.displayedGraph.addNode(u),u.position.x=l,u.position.y=c,u}const i=r(gk,300,140),o=r(Qk,550,140),s=r(_k,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,o.inputs.request),t.displayedGraph.addConnection(o.outputs.response,s.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),Odr={style:{width:"100vw",height:"100vh"}};function Rdr(t,e,n,r,i,o){const s=pt("baklava-editor");return k(),P("div",Odr,[oe(s,{"view-model":t.baklava},null,8,["view-model"]),g("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),g("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const Ndr=yt(Mdr,[["render",Rdr]]),Ddr={},Idr={style:{width:"100vw",height:"100vh"}},kdr=["src"];function Pdr(t,e,n,r,i,o){return k(),P("div",Idr,[g("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,kdr)])}const Hdr=yt(Ddr,[["render",Pdr]]),Vdr={},Fdr={style:{width:"100vw",height:"100vh"}},Bdr=["src"];function $dr(t,e,n,r,i,o){return k(),P("div",Fdr,[g("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,Bdr)])}const Udr=yt(Vdr,[["render",$dr]]),Gdr={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)}}},qdr={class:"app-card flex flex-col h-full"},zdr={class:"flex-grow"},jdr={class:"flex items-center mb-4"},Wdr=["src"],Ydr={class:"font-bold text-xl text-gray-800"},Kdr={class:"text-sm text-gray-600"},Zdr={class:"text-sm text-gray-600"},Xdr={class:"text-sm text-gray-600"},Jdr={class:"text-sm text-gray-600"},e7r={class:"text-sm text-gray-600"},t7r={class:"mb-4"},n7r={class:"text-sm text-gray-600 h-20 overflow-y-auto"},r7r={class:"text-sm text-gray-600 mb-2"},i7r={key:0,class:"mb-4"},o7r={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},s7r={class:"mt-auto pt-4 border-t"},a7r={class:"flex justify-between items-center flex-wrap"},l7r=["title"],c7r=["fill"];function u7r(t,e,n,r,i,o){return k(),P("div",qdr,[g("div",zdr,[g("div",jdr,[g("img",{src:n.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,Wdr),g("div",null,[g("h3",Ydr,le(n.app.name),1),g("p",Kdr,"Author: "+le(n.app.author),1),g("p",Zdr,"Version: "+le(n.app.version),1),g("p",Xdr,"Category: "+le(n.app.category),1),g("p",Jdr,"Creation date: "+le(o.formatDate(n.app.creation_date)),1),g("p",e7r,"Last update: "+le(o.formatDate(n.app.last_update_date)),1),g("p",{class:We(["text-sm",n.app.is_public?"text-green-600":"text-orange-600"])},le(n.app.is_public?"Public App":"Local App"),3)])]),g("div",t7r,[e[10]||(e[10]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",n7r,le(n.app.description),1)]),g("p",r7r,"AI Model: "+le(n.app.model_name),1),n.app.disclaimer&&n.app.disclaimer.trim()!==""?(k(),P("div",i7r,[e[11]||(e[11]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),g("p",o7r,le(n.app.disclaimer),1)])):ne("",!0)]),g("div",s7r,[g("div",a7r,[g("button",{onClick:e[0]||(e[0]=he(s=>t.$emit("toggle-favorite",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),P("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,c7r))],8,l7r),n.app.installed?(k(),P("button",{key:0,onClick:e[1]||(e[1]=he(s=>t.$emit("uninstall",n.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):n.app.existsInFolder?(k(),P("button",{key:1,onClick:e[2]||(e[2]=he(s=>t.$emit("delete",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):(k(),P("button",{key:2,onClick:e[3]||(e[3]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)]))),n.app.installed?(k(),P("button",{key:3,onClick:e[4]||(e[4]=he(s=>t.$emit("edit",n.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)]))):ne("",!0),g("button",{onClick:e[5]||(e[5]=he(s=>t.$emit("download",n.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])),n.app.has_readme?(k(),P("button",{key:4,onClick:e[6]||(e[6]=he(s=>t.$emit("help",n.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M12 21a9 9 0 100-18 9 9 0 000 18z"})],-1)]))):ne("",!0),n.app.installed?(k(),P("button",{key:5,onClick:e[7]||(e[7]=he(s=>t.$emit("open",n.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)]))):ne("",!0),n.app.has_server&&n.app.installed?(k(),P("button",{key:6,onClick:e[8]||(e[8]=he(s=>t.$emit("start-server",n.app.folder_name),["stop"])),class:"text-teal-500 hover:text-teal-600 transition duration-300 ease-in-out",title:"Start Server"},e[20]||(e[20]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):ne("",!0),n.app.has_update?(k(),P("button",{key:7,onClick:e[9]||(e[9]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"relative text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out animate-pulse",title:"Update Available"},e[21]||(e[21]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),g("span",{class:"absolute top-0 right-0 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-100 transform translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full"},"!",-1)]))):ne("",!0)])])])}const d7r=yt(Gdr,[["render",u7r],["__scopeId","data-v-ae134649"]]),f7r={components:{AppCard:d7r},data(){return{apps:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"update",sortOrder:"desc",showOnlyInstalled:!1,showOnlyUnInstalled:!1}},computed:{currentCategoryName(){return this.selectedCategory==="all"?"All Apps":this.selectedCategory},combinedApps(){this.apps.map(e=>e.name);const t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory,r=this.showOnlyInstalled&&t.installed||this.showOnlyUnInstalled&&!t.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&n&&r})},sortedAndFilteredApps(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.appName))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(t){console.log("Toggling favorite"),console.log(t);const e=this.favorites.indexOf(t);e===-1?this.favorites.push(t):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const t=localStorage.getItem("appZooFavorites");console.log("savedFavorites",t),t&&(this.favorites=JSON.parse(t))},startServer(t){const e={client_id:this.$store.state.client_id,app_name:t};this.$store.state.messageBox.showBlockingMessage(`Loading server. +This may take some time the first time as some libraries need to be installed.`),ve.post("/apps/start_server",e).then(n=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",n.data.message),this.$notify({type:"success",title:"Server Starting",text:n.data.message})}).catch(n=>{var r,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",n),this.$notify({type:"error",title:"Server Start Failed",text:((i=(r=n.response)==null?void 0:r.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(t){this.selectedFile=t.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,n;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const t=new FormData;t.append("file",this.selectedFile),t.append("client_id",this.$store.state.client_id);try{const r=await ve.post("/upload_app",t,{headers:{"Content-Type":"multipart/form-data"}});this.message=r.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(r){console.error("Error uploading app:",r),this.error=((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const t=await ve.get("/apps");this.apps=t.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const t=await ve.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const t=await ve.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await ve.get(`/apps/${t.folder_name}/README.md`);this.appCode=fn(e.data)}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${t}`);try{await ve.post(`/install/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps(),this.$store.state.messageBox.hideMessage()}},async uninstallApp(t){this.loading=!0;try{await ve.post(`/uninstall/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(t){this.loading=!0;try{await ve.post(`/delete/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(t){this.loading=!0;try{const e=await ve.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){this.isLoading=!0,this.error=null;try{const e=await ve.post("/download_app",{client_id:this.$store.state.client_id,app_name:t},{responseType:"arraybuffer"}),n=e.headers["content-disposition"],r=n&&n.match(/filename="?(.+)"?/i),i=r?r[1]:"app.zip",o=new Blob([e.data],{type:"application/zip"}),s=window.URL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=s,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(s),document.body.removeChild(a)}catch(e){console.error("Error downloading app:",e),this.error="Failed to download the app. Please try again."}finally{this.isLoading=!1}},openApp(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},p7r={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},h7r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},T7r={class:"flex flex-wrap items-center justify-between gap-4"},m7r={class:"flex items-center space-x-4"},g7r=["disabled"],_7r={key:0},Q7r={key:1,class:"error"},v7r={class:"relative flex-grow max-w-md"},y7r={class:"flex items-center space-x-4"},b7r=["value"],E7r={class:"flex items-center space-x-4"},x7r={for:"installed-only",class:"font-semibold"},S7r={for:"installed-only",class:"font-semibold"},L7r={class:"flex items-center space-x-4"},C7r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},A7r={key:1,class:"pb-20"},w7r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},M7r={class:"text-2xl font-bold mb-4"},O7r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},R7r={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},N7r={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},D7r={class:"flex justify-between items-center mb-4"},I7r={class:"text-2xl font-bold"},k7r=["srcdoc"],P7r={key:1,class:"text-center text-red-500"};function H7r(t,e,n,r,i,o){const s=pt("app-card");return k(),P("div",p7r,[g("nav",h7r,[g("div",T7r,[g("div",m7r,[g("button",{onClick:e[0]||(e[0]=(...a)=>o.fetchGithubApps&&o.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),ft(" Refresh ")])),g("button",{onClick:e[1]||(e[1]=(...a)=>o.openAppsFolder&&o.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1),ft(" Open Folder ")])),g("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>o.onFileSelected&&o.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),g("button",{onClick:e[3]||(e[3]=(...a)=>o.triggerFileInput&&o.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},le(i.isUploading?"Uploading...":"Upload App"),9,g7r)]),i.message?(k(),P("p",_7r,le(i.message),1)):ne("",!0),i.error?(k(),P("p",Q7r,le(i.error),1)):ne("",!0),g("div",v7r,[J(g("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.searchQuery=a),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[we,i.searchQuery]]),e[13]||(e[13]=g("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),g("div",y7r,[e[15]||(e[15]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("select",{id:"category-select","onUpdate:modelValue":e[5]||(e[5]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[14]||(e[14]=g("option",{value:"all"},"All Categories",-1)),(k(!0),P(ze,null,at(o.categories,a=>(k(),P("option",{key:a,value:a},le(a),9,b7r))),128))],512),[[dn,i.selectedCategory]])]),g("div",E7r,[g("label",x7r,[J(g("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[nt,i.showOnlyInstalled]]),e[16]||(e[16]=ft(" Show only installed apps "))]),g("label",S7r,[J(g("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[nt,i.showOnlyUnInstalled]]),e[17]||(e[17]=ft(" Show only non installed apps "))])]),g("div",L7r,[e[19]||(e[19]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("select",{id:"sort-select","onUpdate:modelValue":e[8]||(e[8]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[18]||(e[18]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[dn,i.sortBy]]),g("button",{onClick:e[9]||(e[9]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),P("div",C7r,e[20]||(e[20]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),P("div",A7r,[e[21]||(e[21]=g("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),g("div",w7r,[(k(!0),P(ze,null,at(o.favoriteApps,a=>(k(),wt(s,{key:a.appName,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),g("h2",M7r,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredApps.length)+")",1),g("div",O7r,[(k(!0),P(ze,null,at(o.sortedAndFilteredApps,a=>(k(),wt(s,{key:a.name,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(k(),P("div",R7r,[g("div",N7r,[g("div",D7r,[g("h2",I7r,le(i.selectedApp.name),1),g("button",{onClick:e[10]||(e[10]=(...a)=>o.backToZoo&&o.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(k(),P("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,k7r)):(k(),P("p",P7r,"Please install this app to view its code."))])])):ne("",!0),i.message?(k(),P("div",{key:3,class:We(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},le(i.message),3)):ne("",!0)])}const V7r=yt(f7r,[["render",H7r]]),F7r={components:{PersonalityEntry:tU},data(){return{personalities:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"name",sortOrder:"asc"}},computed:{currentCategoryName(){return this.selectedCategory=="all"?"All Personalities":this.selectedCategory},configFile:{get(){return this.$store.state.config},set(t){this.$store.commit("setConfig",t)}},combinedApps(){this.personalities.map(e=>e.name);const t=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))].sort((t,e)=>t.localeCompare(e))},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory;return e&&n})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.uid))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=t.language==null?t.full_path:t.full_path+":"+t.language;if(console.log("pth",e),t.isMounted&&this.configFile.personalities.includes(e)){const n=await this.select_personality(t);console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+t.name,4,!1),this.isLoading=!1}else console.log("mounting pers"),this.mountPersonality(t);qe(()=>{feather.replace()})}},onModelSelected(t){if(this.isLoading){this.$store.state.toast.showToast("Loading... please wait",4,!1);return}t&&(t.isInstalled?this.update_model(t.model.name).then(e=>{console.log("update_model",e),this.configFile.model_name=t.model.name,e.status?(this.$store.state.toast.showToast(`Selected model: `+t.name,4,!0),qe(()=>{feather.replace(),this.is_loading_zoo=!1}),this.updateModelsZoo(),this.api_get_req("get_model_status").then(n=>{this.$store.commit("setIsModelOk",n)})):(this.$store.state.toast.showToast(`Couldn't select model: @@ -4079,4 +4079,4 @@ You have the freedom to give, sell, or keep the personas you create for yourself The possibilities are endless, they are now yours to mold and customize as you see fit.`),this.$store.dispatch("refreshPersonalitiesZoo")):this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: `,4,!1),console.error(e)})},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),ve.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality -`+e.message,4,!1),{status:!1}))},async handleOpenFolder(t){await ve.post("/open_personality_folder",{client_id:this.$store.state.client_id,personality_folder:t.personality.folder})},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)},loadPersonalities(){this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},mounted(){this.loadFavoritesFromLocalStorage(),this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},F7r={class:"app-zoo mb-100 pb-100 pt-12 background-color w-full p-6 overflow-y-auto h-screen scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},B7r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},$7r={class:"flex flex-wrap items-center justify-between gap-4"},U7r={key:0},G7r={key:1,class:"error"},q7r={class:"relative flex-grow max-w-md"},z7r={class:"flex items-center space-x-4"},j7r=["value"],W7r={class:"flex items-center space-x-4"},Y7r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},K7r={key:1},Z7r={class:"container mx-auto px-4 flex flex-column pb-20"},X7r={key:0},J7r={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},e8r={class:"container mx-auto px-4 flex flex-column pb-20"},t8r={class:"text-2xl font-bold my-8"},n8r={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},r8r={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},i8r={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},o8r={class:"flex justify-between items-center mb-4"},s8r={class:"text-2xl font-bold"},a8r=["srcdoc"],l8r={key:1,class:"text-center text-red-500"};function c8r(t,e,n,r,i,o){const s=pt("personality-entry");return k(),P("div",F7r,[g("nav",B7r,[g("div",$7r,[i.message?(k(),P("p",U7r,le(i.message),1)):ne("",!0),i.error?(k(),P("p",G7r,le(i.error),1)):ne("",!0),g("div",q7r,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.searchQuery=a),placeholder:"Search personalities...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search personalities"},null,512),[[we,i.searchQuery]]),e[5]||(e[5]=g("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),g("div",z7r,[e[7]||(e[7]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("select",{id:"category-select","onUpdate:modelValue":e[1]||(e[1]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[6]||(e[6]=g("option",{value:"all"},"All Categories",-1)),(k(!0),P(ze,null,at(o.categories,a=>(k(),P("option",{key:a,value:a},le(a),9,j7r))),128))],512),[[dn,i.selectedCategory]])]),g("div",W7r,[e[9]||(e[9]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("select",{id:"sort-select","onUpdate:modelValue":e[2]||(e[2]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[8]||(e[8]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[dn,i.sortBy]]),g("button",{onClick:e[3]||(e[3]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),P("div",Y7r,e[10]||(e[10]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),P("div",K7r,[g("div",Z7r,[o.favoriteApps.length>0&&!i.searchQuery?(k(),P("div",X7r,[e[11]||(e[11]=g("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),g("div",J7r,[(k(!0),P(ze,null,at(o.favoriteApps,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"on-toggle-favorite":o.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","on-toggle-favorite"]))),128))])])):ne("",!0)]),g("div",e8r,[g("h2",t8r,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredPersonalities.length)+")",1),g("div",n8r,[(k(!0),P(ze,null,at(o.sortedAndFilteredPersonalities,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"toggle-favorite":o.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","toggle-favorite"]))),128))])])])),i.selectedApp?(k(),P("div",r8r,[g("div",i8r,[g("div",o8r,[g("h2",s8r,le(i.selectedApp.name),1),g("button",{onClick:e[4]||(e[4]=(...a)=>t.backToZoo&&t.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(k(),P("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,a8r)):(k(),P("p",l8r,"Please install this app to view its code."))])])):ne("",!0),i.message?(k(),P("div",{key:3,class:We(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},le(i.message),3)):ne("",!0),e[12]||(e[12]=g("div",{class:"h-20"},null,-1))])}const u8r=yt(V7r,[["render",c8r],["__scopeId","data-v-f8c39e0b"]]),d8r=qK({history:EK("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:H7r},{path:"/personalities_view/",name:"PersonalitiesZoo",component:u8r},{path:"/auto_sd_view/",name:"AutoSD",component:$dr},{path:"/comfyui_view/",name:"ComfyUI",component:Pdr},{path:"/playground/",name:"playground",component:nUn},{path:"/extensions/",name:"extensions",component:dUn},{path:"/help_view/",name:"help_view",component:tGn},{path:"/settings/",name:"settings",component:yer},{path:"/training/",name:"training",component:Der},{path:"/quantizing/",name:"quantizing",component:Fer},{path:"/",name:"discussions",component:Rsr},{path:"/interactive/",name:"interactive",component:F0r},{path:"/nodes/",name:"nodes",component:Rdr}]}),M9=Vj(VVn);function f8r(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const oo=fW({state(){return{theme_vars:{lollms_title:"LoLLMS",falling_object:"L",activate_dropping_animation:!1,lollms_welcome_short_message:"Welcome to LoLLMS WebUI",lollms_welcome_message:"Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence."},personalities_ready:!1,is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",leftPanelCollapsed:!1,rightPanelCollapsed:!0,view_mode:localStorage.getItem("lollms_webui_view_mode")||"compact",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{updatePersonality(t,e){const n=t.personalities.findIndex(r=>r.full_path===e.full_path);n!==-1?t.personalities[n]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(t,e){t.theme_vars=e},setLeftPanelCollapsed(t,e){t.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(t,e){t.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(t,e){t.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(t,e){t.personalities_ready=e},setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getThemeVars(t){return t.theme_vars},getLeftPanelCollapsed(t){return t.leftPanelCollapsed},getRightPanelCollapsed(t){return t.rightPanelCollapsed},getViewMode(t){return t.view_mode},getpersonalitiesReady(t){return t.personalities_ready},getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await ve.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await RG("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Oo("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await ve.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await ve.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await ve.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const r=n.data;console.log("languages",r),t("setLanguages",r),n=await ve.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await ve.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id});const r=n.data;t("setLanguages",r),n=await ve.post("/get_personality_language",{client_id:this.state.client_id});const i=n.data;t("setLanguage",i)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Oo("get_all_personalities"),r=Object.keys(n);for(let i=0;i{let c=!1;for(const d of this.state.config.personalities)d.includes(o+"/"+l.folder)&&(c=!0);let u={};return u=l,u.category=o,u.full_path=o+"/"+l.folder,u.isMounted=c,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,o)=>i.name.localeCompare(o.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==o);if(s>=0){let a=f8r(this.state.personalities[s]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",o)}for(let i=n.length-1;i>=0;i--)this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e);const r=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id])];console.log("Setting current mounted personality: ",r),this.state.mountedPers=r},async refreshBindings({commit:t}){let e=await Oo("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(r=>r.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(r=>r.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){const n=(await ve.get("/get_available_models")).data;t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Oo("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){let e=await Oo("list_models"),n=await Oo("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const r=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Oo("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Oo("ram_usage")},async refreshVramUsage({commit:t}){const e=await Oo("vram_usage"),n=[];if(e.nb_gpus>0){for(let i=0;i{this.message=""},3e3)},loadPersonalities(){this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},mounted(){this.loadFavoritesFromLocalStorage(),this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},B7r={class:"app-zoo mb-100 pb-100 pt-12 background-color w-full p-6 overflow-y-auto h-screen scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},$7r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},U7r={class:"flex flex-wrap items-center justify-between gap-4"},G7r={key:0},q7r={key:1,class:"error"},z7r={class:"relative flex-grow max-w-md"},j7r={class:"flex items-center space-x-4"},W7r=["value"],Y7r={class:"flex items-center space-x-4"},K7r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},Z7r={key:1},X7r={class:"container mx-auto px-4 flex flex-column pb-20"},J7r={key:0},e8r={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},t8r={class:"container mx-auto px-4 flex flex-column pb-20"},n8r={class:"text-2xl font-bold my-8"},r8r={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},i8r={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},o8r={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},s8r={class:"flex justify-between items-center mb-4"},a8r={class:"text-2xl font-bold"},l8r=["srcdoc"],c8r={key:1,class:"text-center text-red-500"};function u8r(t,e,n,r,i,o){const s=pt("personality-entry");return k(),P("div",B7r,[g("nav",$7r,[g("div",U7r,[i.message?(k(),P("p",G7r,le(i.message),1)):ne("",!0),i.error?(k(),P("p",q7r,le(i.error),1)):ne("",!0),g("div",z7r,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.searchQuery=a),placeholder:"Search personalities...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search personalities"},null,512),[[we,i.searchQuery]]),e[5]||(e[5]=g("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),g("div",j7r,[e[7]||(e[7]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("select",{id:"category-select","onUpdate:modelValue":e[1]||(e[1]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[6]||(e[6]=g("option",{value:"all"},"All Categories",-1)),(k(!0),P(ze,null,at(o.categories,a=>(k(),P("option",{key:a,value:a},le(a),9,W7r))),128))],512),[[dn,i.selectedCategory]])]),g("div",Y7r,[e[9]||(e[9]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("select",{id:"sort-select","onUpdate:modelValue":e[2]||(e[2]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[8]||(e[8]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[dn,i.sortBy]]),g("button",{onClick:e[3]||(e[3]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),P("div",K7r,e[10]||(e[10]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),P("div",Z7r,[g("div",X7r,[o.favoriteApps.length>0&&!i.searchQuery?(k(),P("div",J7r,[e[11]||(e[11]=g("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),g("div",e8r,[(k(!0),P(ze,null,at(o.favoriteApps,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"on-toggle-favorite":o.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","on-toggle-favorite"]))),128))])])):ne("",!0)]),g("div",t8r,[g("h2",n8r,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredPersonalities.length)+")",1),g("div",r8r,[(k(!0),P(ze,null,at(o.sortedAndFilteredPersonalities,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"toggle-favorite":o.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","toggle-favorite"]))),128))])])])),i.selectedApp?(k(),P("div",i8r,[g("div",o8r,[g("div",s8r,[g("h2",a8r,le(i.selectedApp.name),1),g("button",{onClick:e[4]||(e[4]=(...a)=>t.backToZoo&&t.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(k(),P("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,l8r)):(k(),P("p",c8r,"Please install this app to view its code."))])])):ne("",!0),i.message?(k(),P("div",{key:3,class:We(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},le(i.message),3)):ne("",!0),e[12]||(e[12]=g("div",{class:"h-20"},null,-1))])}const d8r=yt(F7r,[["render",u8r],["__scopeId","data-v-f8c39e0b"]]),f8r=qK({history:EK("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:V7r},{path:"/personalities_view/",name:"PersonalitiesZoo",component:d8r},{path:"/auto_sd_view/",name:"AutoSD",component:Udr},{path:"/comfyui_view/",name:"ComfyUI",component:Hdr},{path:"/playground/",name:"playground",component:nUn},{path:"/extensions/",name:"extensions",component:dUn},{path:"/help_view/",name:"help_view",component:tGn},{path:"/settings/",name:"settings",component:ber},{path:"/training/",name:"training",component:Ier},{path:"/quantizing/",name:"quantizing",component:Ber},{path:"/",name:"discussions",component:Nsr},{path:"/interactive/",name:"interactive",component:B0r},{path:"/nodes/",name:"nodes",component:Ndr}]}),M9=Vj(VVn);function p8r(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const oo=fW({state(){return{theme_vars:{lollms_title:"LoLLMS",falling_object:"L",activate_dropping_animation:!1,lollms_welcome_short_message:"Welcome to LoLLMS WebUI",lollms_welcome_message:"Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence."},personalities_ready:!1,is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",leftPanelCollapsed:!1,rightPanelCollapsed:!0,view_mode:localStorage.getItem("lollms_webui_view_mode")||"compact",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{updatePersonality(t,e){const n=t.personalities.findIndex(r=>r.full_path===e.full_path);n!==-1?t.personalities[n]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(t,e){t.theme_vars=e},setLeftPanelCollapsed(t,e){t.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(t,e){t.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(t,e){t.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(t,e){t.personalities_ready=e},setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getThemeVars(t){return t.theme_vars},getLeftPanelCollapsed(t){return t.leftPanelCollapsed},getRightPanelCollapsed(t){return t.rightPanelCollapsed},getViewMode(t){return t.view_mode},getpersonalitiesReady(t){return t.personalities_ready},getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await ve.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await RG("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Oo("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await ve.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await ve.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await ve.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const r=n.data;console.log("languages",r),t("setLanguages",r),n=await ve.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await ve.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await ve.post("/get_personality_languages_list",{client_id:this.state.client_id});const r=n.data;t("setLanguages",r),n=await ve.post("/get_personality_language",{client_id:this.state.client_id});const i=n.data;t("setLanguage",i)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Oo("get_all_personalities"),r=Object.keys(n);for(let i=0;i{let c=!1;for(const d of this.state.config.personalities)d.includes(o+"/"+l.folder)&&(c=!0);let u={};return u=l,u.category=o,u.full_path=o+"/"+l.folder,u.isMounted=c,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,o)=>i.name.localeCompare(o.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==o);if(s>=0){let a=p8r(this.state.personalities[s]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",o)}for(let i=n.length-1;i>=0;i--)this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e);const r=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id])];console.log("Setting current mounted personality: ",r),this.state.mountedPers=r},async refreshBindings({commit:t}){let e=await Oo("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(r=>r.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(r=>r.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){const n=(await ve.get("/get_available_models")).data;t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Oo("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){let e=await Oo("list_models"),n=await Oo("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const r=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Oo("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Oo("ram_usage")},async refreshVramUsage({commit:t}){const e=await Oo("vram_usage"),n=[];if(e.nb_gpus>0){for(let i=0;i LoLLMS WebUI - - + +
diff --git a/web/src/components/ChatBox.vue b/web/src/components/ChatBox.vue index bf83e714..845f9be7 100644 --- a/web/src/components/ChatBox.vue +++ b/web/src/components/ChatBox.vue @@ -496,18 +496,15 @@ export default { // Extract the names from the combined array and transform them into the desired format const formattedDataSources = combinedDatabases.map(dataSource => { console.log("entry", dataSource); - const parts = dataSource.split('::'); - console.log("extracted", parts[0]); - - const isMounted = dataSource.endsWith('mounted'); - const icon = isMounted ? 'feather:check' : ''; - + + const icon = dataSource.mounted ? 'feather:check' : ''; + console.log("icon decision", icon); return { - name: parts[0], - value: parts[0] || 'default_value', - icon: icon, + name: dataSource.alias, + value: dataSource.alias || 'default_value', + icon: icon, help: 'mounts the database' }; }); @@ -515,6 +512,7 @@ export default { console.log("formatted data sources", formattedDataSources); return formattedDataSources; } + }, methods: { showSendMenu() { diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index a28587a2..07d04418 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -1126,6 +1126,14 @@ placeholder="Database URL" > + + Mounted + + + + @@ -4530,73 +4542,72 @@ export default { }, methods: { updateRagDatabase(index, value, field) { - let parts = this.configFile.rag_databases[index].split('::'); - - switch(field) { - case 'name': - parts[0] = value; - break; - case 'path': - parts[1] = value; - break; - case 'mounted': - parts[2] = value ? 'mounted' : ''; - break; + if (field) { + // For mounted, keep it as boolean, for others just set the value + if (field === 'mounted') { + this.configFile.rag_databases[index][field] = Boolean(value); + } else { + this.configFile.rag_databases[index][field] = value; + } + + this.settingsChanged = true; } - - this.configFile.rag_databases[index] = parts.join('::'); - this.settingsChanged = true; - }, + }, + getAlias(index) { - return this.configFile.remote_databases[index].split('::')[0]; + return this.configFile.remote_databases[index].alias; }, getDatabaseType(index) { - return this.configFile.remote_databases[index].split('::')[1]; + return this.configFile.remote_databases[index].type; }, getDatabaseUrl(index) { - return this.configFile.remote_databases[index].split('::')[2]; + return this.configFile.remote_databases[index].url; + }, + getDatabaseKey(index) { + return this.configFile.remote_databases[index].key || ""; }, getMounted(index) { - const parts = this.configFile.remote_databases[index].split('::'); - return parts.length > 3 ? parts[3] === 'mounted' : false; + return this.configFile.remote_databases[index].mounted || false; }, updateAlias(index, value) { - const parts = this.configFile.remote_databases[index].split('::'); - parts[0] = value; - this.configFile.remote_databases[index] = parts.join('::'); - this.settingsChanged = true; - }, - updateDatabaseType(index, value) { - const parts = this.configFile.remote_databases[index].split('::'); - parts[1] = value; - this.configFile.remote_databases[index] = parts.join('::'); - this.settingsChanged = true; - }, - updateDatabaseUrl(index, value) { - const parts = this.configFile.remote_databases[index].split('::'); - parts[2] = value; - this.configFile.remote_databases[index] = parts.join('::'); - this.settingsChanged = true; - }, - updateMounted(index, value) { - const parts = this.configFile.remote_databases[index].split('::'); - if (value) { - parts[3] = 'mounted'; - } else { - parts.length = 3; // Remove mounted part if exists - } - this.configFile.remote_databases[index] = parts.join('::'); + this.configFile.remote_databases[index].alias = value; this.settingsChanged = true; }, + updateDatabaseType(index, value) { + this.configFile.remote_databases[index].type = value; + this.settingsChanged = true; + }, + + updateDatabaseUrl(index, value) { + this.configFile.remote_databases[index].url = value; + this.settingsChanged = true; + }, + + updateDatabaseKey(index, value) { + this.configFile.remote_databases[index].key = value; + this.settingsChanged = true; + }, + + updateMounted(index, value) { + this.configFile.remote_databases[index].mounted = value; + this.settingsChanged = true; + }, addDatabaseService() { if (!this.configFile.remote_databases) { this.configFile.remote_databases = []; } - // Add new entry with default values including alias - this.configFile.remote_databases.push("new_database::lightrag::http://localhost:9621/"); + // Add new entry as an object with default values + this.configFile.remote_databases.push({ + alias: "new_database", + is_local: false, // this is a remote database + type: "lightrag", + url: "http://localhost:9621/", + key: "", + mounted: false + }); this.settingsChanged = true; }, @@ -4621,35 +4632,53 @@ export default { await store.dispatch('refreshVramUsage'); }, addDataSource() { - this.$store.state.config.rag_databases.push(''); - this.settingsChanged = true; + // Add new database entry with default values + this.$store.state.config.rag_databases.push({ + alias: '', // Empty name initially + is_local: true, // this is a local database + path: '', // Empty path initially + mounted: false, // Not mounted by default + key: '' // No key for local databases + }); + + this.settingsChanged = true; }, + removeDataSource(index) { this.$store.state.config.rag_databases.splice(index, 1); this.settingsChanged = true; }, async vectorize_folder(index){ await axios.post('/vectorize_folder', {client_id:this.$store.state.client_id, db_path:this.$store.state.config.rag_databases[index]}, this.posts_headers) - }, - async select_folder(index){ - try{ - socket.on("rag_db_added", (infos)=>{ + }, + async select_folder(index) { + try { + socket.on("rag_db_added", (infos) => { console.log(infos) - if (infos){ - this.$store.state.config.rag_databases[index]=`${infos["database_name"]}::${infos["database_path"]}` - this.settingsChanged=true; - } - else{ + if (infos) { + // Update with new dictionary structure + this.$store.state.config.rag_databases[index] = { + alias: infos["database_name"], + is_local: true, + path: infos["database_path"], + mounted: false, + key: '' + }; + this.settingsChanged = true; + } else { this.$store.state.toast.showToast("Failed to select a folder", 4, false) } - }); - await axios.post('/add_rag_database', {client_id:this.$store.state.client_id}, this.posts_headers) - } - catch{ + + await axios.post('/add_rag_database', + { client_id: this.$store.state.client_id }, + this.posts_headers + ) + } catch { this.$store.state.toast.showToast("Failed to select a folder", 4, false) } }, + handleTemplateSelection(event) { console.log("handleTemplateSelection") const selectedOption = event.target.value; diff --git a/zoos/bindings_zoo b/zoos/bindings_zoo index 24118271..dee02f9d 160000 --- a/zoos/bindings_zoo +++ b/zoos/bindings_zoo @@ -1 +1 @@ -Subproject commit 2411827109f040abf842285ff021e5cd5bd175df +Subproject commit dee02f9dffd1842e2ef87a7c3b0cd07f1e284896 diff --git a/zoos/personalities_zoo b/zoos/personalities_zoo index 5f392e55..5ebf88ce 160000 --- a/zoos/personalities_zoo +++ b/zoos/personalities_zoo @@ -1 +1 @@ -Subproject commit 5f392e553789637036ec9918bd06fa1f386b31b8 +Subproject commit 5ebf88ced591c0f4b86f88b2361cbbfe4fed8d15