From ff21374229556839e0bddb82ffbf5676370089e3 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sun, 26 Nov 2023 02:56:07 +0100 Subject: [PATCH] Upgraded code --- .../{index-b227e912.js => index-b6126ecf.js} | 38 +++++++++---------- web/dist/index.html | 2 +- web/src/components/CodeBlock.vue | 4 +- 3 files changed, 22 insertions(+), 22 deletions(-) rename web/dist/assets/{index-b227e912.js => index-b6126ecf.js} (95%) diff --git a/web/dist/assets/index-b227e912.js b/web/dist/assets/index-b6126ecf.js similarity index 95% rename from web/dist/assets/index-b227e912.js rename to web/dist/assets/index-b6126ecf.js index fa673ecb..70c4fcb3 100644 --- a/web/dist/assets/index-b227e912.js +++ b/web/dist/assets/index-b6126ecf.js @@ -48,15 +48,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`),pe=I,X=Q),re===void 0& "]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}return cu=t,cu}var du,Ab;function m6e(){if(Ab)return du;Ab=1;function t(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return du=t,du}var uu,Nb;function g6e(){if(Nb)return uu;Nb=1;const t=a=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:a.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],o=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function i(a){const l=t(a),u="and or not only",d={className:"variable",begin:"\\$"+a.IDENT_RE},_=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],p="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,l.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+p,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+p,className:"selector-id"},{begin:"\\b("+e.join("|")+")"+p,className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+r.join("|")+")"+p},{className:"selector-pseudo",begin:"&?:(:)?("+s.join("|")+")"+p},l.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:u,attribute:n.join(" ")},contains:[l.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+_.join("|")+"))\\b"},d,l.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[l.HEXCOLOR,d,a.APOS_STRING_MODE,l.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE]}]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+o.join("|")+")\\b",starts:{end:/;|$/,contains:[l.HEXCOLOR,d,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,l.CSS_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},l.FUNCTION_DISPATCH]}}return uu=i,uu}var _u,wb;function f6e(){if(wb)return _u;wb=1;function t(e){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[ (multipart)?`,end:`\\] `},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return _u=t,_u}var pu,Ib;function h6e(){if(Ib)return pu;Ib=1;function t(y){return y?typeof y=="string"?y:y.source:null}function e(y){return n("(?=",y,")")}function n(...y){return y.map(w=>t(w)).join("")}function r(y){const R=y[y.length-1];return typeof R=="object"&&R.constructor===Object?(y.splice(y.length-1,1),R):{}}function s(...y){return"("+(r(y).capture?"":"?:")+y.map(L=>t(L)).join("|")+")"}const o=y=>n(/\b/,y,/\w$/.test(y)?/\b/:/\B/),i=["Protocol","Type"].map(o),a=["init","self"].map(o),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],_=["assignment","associativity","higherThan","left","lowerThan","none","right"],p=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],f=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),h=s(f,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),E=n(f,h,"*"),b=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),m=s(b,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),S=n(b,m,"*"),C=n(/[A-Z]/,m,"*"),A=["attached","autoclosure",n(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,S,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],x=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function k(y){const R={match:/\s+/,relevance:0},w=y.COMMENT("/\\*","\\*/",{contains:["self"]}),L=[y.C_LINE_COMMENT_MODE,w],M={match:[/\./,s(...i,...a)],className:{2:"keyword"}},Z={match:n(/\./,s(...u)),relevance:0},B=u.filter(Fe=>typeof Fe=="string").concat(["_|0"]),se=u.filter(Fe=>typeof Fe!="string").concat(l).map(o),H={variants:[{className:"keyword",match:s(...se,...a)}]},I={$pattern:s(/\b\w+/,/#\w+/),keyword:B.concat(p),literal:d},Q=[M,Z,H],re={match:n(/\./,s(...g)),relevance:0},X={className:"built_in",match:n(/\b/,s(...g),/(?=\()/)},pe=[re,X],ee={match:/->/,relevance:0},be={className:"operator",relevance:0,variants:[{match:E},{match:`\\.(\\.|${h})+`}]},Ce=[ee,be],fe="([0-9]_*)+",Ee="([0-9a-fA-F]_*)+",z={className:"number",relevance:0,variants:[{match:`\\b(${fe})(\\.(${fe}))?([eE][+-]?(${fe}))?\\b`},{match:`\\b0x(${Ee})(\\.(${Ee}))?([pP][+-]?(${fe}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},te=(Fe="")=>({className:"subst",variants:[{match:n(/\\/,Fe,/[0\\tnr"']/)},{match:n(/\\/,Fe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),Y=(Fe="")=>({className:"subst",match:n(/\\/,Fe,/[\t ]*(?:[\r\n]|\r\n)/)}),ue=(Fe="")=>({className:"subst",label:"interpol",begin:n(/\\/,Fe,/\(/),end:/\)/}),ye=(Fe="")=>({begin:n(Fe,/"""/),end:n(/"""/,Fe),contains:[te(Fe),Y(Fe),ue(Fe)]}),O=(Fe="")=>({begin:n(Fe,/"/),end:n(/"/,Fe),contains:[te(Fe),ue(Fe)]}),N={className:"string",variants:[ye(),ye("#"),ye("##"),ye("###"),O(),O("#"),O("##"),O("###")]},F=[y.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[y.BACKSLASH_ESCAPE]}],$={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:F},W=Fe=>{const Tn=n(Fe,/\//),ln=n(/\//,Fe);return{begin:Tn,end:ln,contains:[...F,{scope:"comment",begin:`#(?!.*${ln})`,end:/$/}]}},ae={scope:"regexp",variants:[W("###"),W("##"),W("#"),$]},me={match:n(/`/,S,/`/)},D={className:"variable",match:/\$\d+/},K={className:"variable",match:`\\$${m}+`},G=[me,D,K],q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:x,contains:[...Ce,z,N]}]}},V={scope:"keyword",match:n(/@/,s(...A))},ne={scope:"meta",match:n(/@/,S)},oe=[q,V,ne],ge={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,m,"+")},{className:"type",match:C,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,e(C)),relevance:0}]},J={begin://,keywords:I,contains:[...L,...Q,...oe,ee,ge]};ge.contains.push(J);const le={match:n(S,/\s*:/),keywords:"_|0",relevance:0},Se={begin:/\(/,end:/\)/,relevance:0,keywords:I,contains:["self",le,...L,ae,...Q,...pe,...Ce,z,N,...G,...oe,ge]},Oe={begin://,keywords:"repeat each",contains:[...L,ge]},Le={begin:s(e(n(S,/\s*:/)),e(n(S,/\s+/,S,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:S}]},Ge={begin:/\(/,end:/\)/,keywords:I,contains:[Le,...L,...Q,...Ce,z,N,...oe,ge,Se],endsParent:!0,illegal:/["']/},nt={match:[/(func|macro)/,/\s+/,s(me.match,S,E)],className:{1:"keyword",3:"title.function"},contains:[Oe,Ge,R],illegal:[/\[/,/%/]},Ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Oe,Ge,R],illegal:/\[|%/},tt={match:[/operator/,/\s+/,E],className:{1:"keyword",3:"title"}},Xe={begin:[/precedencegroup/,/\s+/,C],className:{1:"keyword",3:"title"},contains:[ge],keywords:[..._,...d],end:/}/};for(const Fe of N.variants){const Tn=Fe.contains.find(vr=>vr.label==="interpol");Tn.keywords=I;const ln=[...Q,...pe,...Ce,z,N,...G];Tn.contains=[...ln,{begin:/\(/,end:/\)/,contains:["self",...ln]}]}return{name:"Swift",keywords:I,contains:[...L,nt,Ze,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:I,contains:[y.inherit(y.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...Q]},tt,Xe,{beginKeywords:"import",end:/$/,contains:[...L],relevance:0},ae,...Q,...pe,...Ce,z,N,...G,...oe,ge,Se]}}return pu=k,pu}var mu,Db;function E6e(){if(Db)return mu;Db=1;function t(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return mu=t,mu}var gu,kb;function b6e(){if(kb)return gu;kb=1;function t(e){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},a=e.inherit(i,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",_="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",p={className:"number",begin:"\\b"+l+u+d+_+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},f={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},E=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},f,h,i],b=[...E];return b.pop(),b.push(a),g.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}return gu=t,gu}var fu,Mb;function S6e(){if(Mb)return fu;Mb=1;function t(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return fu=t,fu}var hu,Lb;function y6e(){if(Lb)return hu;Lb=1;function t(e){const n=e.regex,r=/[a-zA-Z_][a-zA-Z0-9_]*/,s={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:n.concat(/\$/,n.optional(/::/),r,"(::",r,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[s]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},s]}}return hu=t,hu}var Eu,Pb;function v6e(){if(Pb)return Eu;Pb=1;function t(e){const n=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:n,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...n,"set","list","map"]},end:">",contains:["self"]}]}}return Eu=t,Eu}var bu,Fb;function T6e(){if(Fb)return bu;Fb=1;function t(e){const n={className:"number",begin:"[1-9][0-9]*",relevance:0},r={className:"symbol",begin:":[^\\]]+"},s={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",n,r]},o={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",n,e.QUOTE_STRING_MODE,r]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[s,o,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}return bu=t,bu}var Su,Ub;function C6e(){if(Ub)return Su;Ub=1;function t(e){const n=e.regex,r=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],s=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let o=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];o=o.concat(o.map(h=>`end${h}`));const i={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},a={scope:"number",match:/\d+/},l={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[i,a]},u={beginKeywords:r.join(" "),keywords:{name:r},relevance:0,contains:[l]},d={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:s}]},_=(h,{relevance:E})=>({beginScope:{1:"template-tag",3:"name"},relevance:E||2,endScope:"template-tag",begin:[/\{%/,/\s*/,n.either(...h)],end:/%\}/,keywords:"in",contains:[d,u,i,a]}),p=/[a-z_]+/,g=_(o,{relevance:2}),f=_([p],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#\}/),g,f,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",d,u,i,a]}]}}return Su=t,Su}var yu,Bb;function R6e(){if(Bb)return yu;Bb=1;const t="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],i=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(o,r,s);function l(d){const _=d.regex,p=(te,{after:Y})=>{const ue="",end:""},h=/<[A-Za-z0-9\\._:-]+\s*\/>/,E={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(te,Y)=>{const ue=te[0].length+te.index,ye=te.input[ue];if(ye==="<"||ye===","){Y.ignoreMatch();return}ye===">"&&(p(te,{after:ue})||Y.ignoreMatch());let O;const N=te.input.substring(ue);if(O=N.match(/^\s*=/)){Y.ignoreMatch();return}if((O=N.match(/^\s+extends\s+/))&&O.index===0){Y.ignoreMatch();return}}},b={$pattern:t,keyword:e,literal:n,built_in:a,"variable.language":i},m="[0-9](_?[0-9])*",S=`\\.(${m})`,C="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",A={className:"number",variants:[{begin:`(\\b(${C})((${S})|\\.)?|(${S}))[eE][+-]?(${m})\\b`},{begin:`\\b(${C})\\b((${S})\\b|\\.)?|(${S})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:b,contains:[]},k={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},y={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,x],subLanguage:"css"}},R={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,x]},M={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},Z=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,k,y,R,w,{match:/\$\d+/},A];x.contains=Z.concat({begin:/\{/,end:/\}/,keywords:b,contains:["self"].concat(Z)});const B=[].concat(M,x.contains),se=B.concat([{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(B)}]),H={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:se},I={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,_.concat(g,"(",_.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},Q={relevance:0,match:_.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...s]}},re={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},X={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[H],illegal:/%/},pe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(te){return _.concat("(?!",te.join("|"),")")}const be={match:_.concat(/\b/,ee([...o,"super","import"]),g,_.lookahead(/\(/)),className:"title.function",relevance:0},Ce={begin:_.concat(/\./,_.lookahead(_.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},H]},Ee="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",z={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,_.lookahead(Ee)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[H]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:b,exports:{PARAMS_CONTAINS:se,CLASS_REFERENCE:Q},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),re,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,k,y,R,w,M,{match:/\$\d+/},A,Q,{className:"attr",begin:g+_.lookahead(":"),relevance:0},z,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,d.REGEXP_MODE,{className:"function",begin:Ee,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:se}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:f.begin,end:f.end},{match:h},{begin:E.begin,"on:begin":E.isTrulyOpeningTag,end:E.end}],subLanguage:"xml",contains:[{begin:E.begin,end:E.end,skip:!0,contains:["self"]}]}]},X,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[H,d.inherit(d.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ce,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[H]},be,pe,I,fe,{match:/\$[(.]/}]}}function u(d){const _=l(d),p=t,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],f={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[_.exports.CLASS_REFERENCE]},h={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[_.exports.CLASS_REFERENCE]},E={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},b=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],m={$pattern:t,keyword:e.concat(b),literal:n,built_in:a.concat(g),"variable.language":i},S={className:"meta",begin:"@"+p},C=(x,k,y)=>{const R=x.contains.findIndex(w=>w.label===k);if(R===-1)throw new Error("can not find mode to replace");x.contains.splice(R,1,y)};Object.assign(_.keywords,m),_.exports.PARAMS_CONTAINS.push(S),_.contains=_.contains.concat([S,f,h]),C(_,"shebang",d.SHEBANG()),C(_,"use_strict",E);const A=_.contains.find(x=>x.label==="func.def");return A.relevance=0,Object.assign(_,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),_}return yu=u,yu}var vu,Gb;function x6e(){if(Gb)return vu;Gb=1;function t(e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return vu=t,vu}var Tu,qb;function O6e(){if(qb)return Tu;qb=1;function t(e){const n=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:n.concat(/# */,n.either(i,o),/ *#/)},{begin:n.concat(/# */,l,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(i,o),/ +/,n.either(a,l),/ *#/)}]},d={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},_={className:"label",begin:/^\w+:/},p=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,s,u,d,_,p,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}return Tu=t,Tu}var Cu,Yb;function A6e(){if(Yb)return Cu;Yb=1;function t(e){const n=e.regex,r=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],s=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],o={begin:n.concat(n.either(...r),"\\s*\\("),relevance:0,keywords:{built_in:r}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:s,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[o,e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}return Cu=t,Cu}var Ru,Vb;function N6e(){if(Vb)return Ru;Vb=1;function t(e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return Ru=t,Ru}var xu,zb;function w6e(){if(zb)return xu;zb=1;function t(e){const n=e.regex,r={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$ferror"]},s=["__FILE__","__LINE__"],o=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:r,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{scope:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:n.concat(/`/,n.either(...s))},{scope:"meta",begin:n.concat(/`/,n.either(...o)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:o}]}}return xu=t,xu}var Ou,Hb;function I6e(){if(Hb)return Ou;Hb=1;function t(e){const n="\\d(_|\\d)*",r="[eE][-+]?"+n,s=n+"(\\."+n+")?("+r+")?",o="\\w+",a="\\b("+(n+"#"+o+"(\\."+o+")?#("+r+")?")+"|"+s+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:a,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}return Ou=t,Ou}var Au,$b;function D6e(){if($b)return Au;$b=1;function t(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,e.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}return Au=t,Au}var Nu,Wb;function k6e(){if(Wb)return Nu;Wb=1;function t(e){e.regex;const n=e.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=e.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},i={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},i,a,o,e.QUOTE_STRING_MODE,u,d,l]}}return Nu=t,Nu}var wu,Kb;function M6e(){if(Kb)return wu;Kb=1;function t(e){const n=e.regex,r=/[a-zA-Z]\w*/,s=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],o=["true","false","null"],i=["this","super"],a=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],l=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],u={relevance:0,match:n.concat(/\b(?!(if|while|for|else|super)\b)/,r,/(?=\s*[({])/),className:"title.function"},d={match:n.concat(n.either(n.concat(/\b(?!(if|while|for|else|super)\b)/,r),n.either(...l)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:r}]}]}},_={variants:[{match:[/class\s+/,r,/\s+is\s+/,r]},{match:[/class\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},p={relevance:0,match:n.either(...l),className:"operator"},g={className:"string",begin:/"""/,end:/"""/},f={className:"property",begin:n.concat(/\./,n.lookahead(r)),end:r,excludeBegin:!0,relevance:0},h={relevance:0,match:n.concat(/\b_/,r),scope:"variable"},E={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:a}},b=e.C_NUMBER_MODE,m={match:[r,/\s*/,/=/,/\s*/,/\(/,r,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},S=e.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),C={scope:"subst",begin:/%\(/,end:/\)/,contains:[b,E,u,h,p]},A={scope:"string",begin:/"/,end:/"/,contains:[C,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};C.contains.push(A);const x=[...s,...i,...o],k={relevance:0,match:n.concat("\\b(?!",x.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:s,"variable.language":i,literal:o},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:o},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},b,A,g,S,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,E,_,m,d,u,p,h,f,k]}}return wu=t,wu}var Iu,Qb;function L6e(){if(Qb)return Iu;Qb=1;function t(e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return Iu=t,Iu}var Du,jb;function P6e(){if(jb)return Du;jb=1;function t(e){const n=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],r=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],s=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],i={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:n,literal:["true","false","nil"],built_in:r.concat(s)},a={className:"string",begin:'"',end:'"',illegal:"\\n"},l={className:"string",begin:"'",end:"'",illegal:"\\n"},u={className:"string",begin:"<<",end:">>"},d={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},_={beginKeywords:"import",end:"$",keywords:i,contains:[a]},p={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:i}})]};return{name:"XL",aliases:["tao"],keywords:i,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,l,u,p,_,d,e.NUMBER_MODE]}}return Du=t,Du}var ku,Zb;function F6e(){if(Zb)return ku;Zb=1;function t(e){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return ku=t,ku}var Mu,Xb;function U6e(){if(Xb)return Mu;Xb=1;function t(e){const n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r=e.UNDERSCORE_TITLE_MODE,s={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},o="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:o,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[r,{className:"params",begin:/\(/,end:/\)/,keywords:o,contains:["self",e.C_BLOCK_COMMENT_MODE,n,s]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},r]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[r]},{beginKeywords:"use",end:/;/,contains:[r]},{begin:/=>/},n,s]}}return Mu=t,Mu}var P=l4e;P.registerLanguage("1c",c4e());P.registerLanguage("abnf",d4e());P.registerLanguage("accesslog",u4e());P.registerLanguage("actionscript",_4e());P.registerLanguage("ada",p4e());P.registerLanguage("angelscript",m4e());P.registerLanguage("apache",g4e());P.registerLanguage("applescript",f4e());P.registerLanguage("arcade",h4e());P.registerLanguage("arduino",E4e());P.registerLanguage("armasm",b4e());P.registerLanguage("xml",S4e());P.registerLanguage("asciidoc",y4e());P.registerLanguage("aspectj",v4e());P.registerLanguage("autohotkey",T4e());P.registerLanguage("autoit",C4e());P.registerLanguage("avrasm",R4e());P.registerLanguage("awk",x4e());P.registerLanguage("axapta",O4e());P.registerLanguage("bash",A4e());P.registerLanguage("basic",N4e());P.registerLanguage("bnf",w4e());P.registerLanguage("brainfuck",I4e());P.registerLanguage("c",D4e());P.registerLanguage("cal",k4e());P.registerLanguage("capnproto",M4e());P.registerLanguage("ceylon",L4e());P.registerLanguage("clean",P4e());P.registerLanguage("clojure",F4e());P.registerLanguage("clojure-repl",U4e());P.registerLanguage("cmake",B4e());P.registerLanguage("coffeescript",G4e());P.registerLanguage("coq",q4e());P.registerLanguage("cos",Y4e());P.registerLanguage("cpp",V4e());P.registerLanguage("crmsh",z4e());P.registerLanguage("crystal",H4e());P.registerLanguage("csharp",$4e());P.registerLanguage("csp",W4e());P.registerLanguage("css",K4e());P.registerLanguage("d",Q4e());P.registerLanguage("markdown",j4e());P.registerLanguage("dart",Z4e());P.registerLanguage("delphi",X4e());P.registerLanguage("diff",J4e());P.registerLanguage("django",e9e());P.registerLanguage("dns",t9e());P.registerLanguage("dockerfile",n9e());P.registerLanguage("dos",r9e());P.registerLanguage("dsconfig",s9e());P.registerLanguage("dts",o9e());P.registerLanguage("dust",i9e());P.registerLanguage("ebnf",a9e());P.registerLanguage("elixir",l9e());P.registerLanguage("elm",c9e());P.registerLanguage("ruby",d9e());P.registerLanguage("erb",u9e());P.registerLanguage("erlang-repl",_9e());P.registerLanguage("erlang",p9e());P.registerLanguage("excel",m9e());P.registerLanguage("fix",g9e());P.registerLanguage("flix",f9e());P.registerLanguage("fortran",h9e());P.registerLanguage("fsharp",E9e());P.registerLanguage("gams",b9e());P.registerLanguage("gauss",S9e());P.registerLanguage("gcode",y9e());P.registerLanguage("gherkin",v9e());P.registerLanguage("glsl",T9e());P.registerLanguage("gml",C9e());P.registerLanguage("go",R9e());P.registerLanguage("golo",x9e());P.registerLanguage("gradle",O9e());P.registerLanguage("graphql",A9e());P.registerLanguage("groovy",N9e());P.registerLanguage("haml",w9e());P.registerLanguage("handlebars",I9e());P.registerLanguage("haskell",D9e());P.registerLanguage("haxe",k9e());P.registerLanguage("hsp",M9e());P.registerLanguage("http",L9e());P.registerLanguage("hy",P9e());P.registerLanguage("inform7",F9e());P.registerLanguage("ini",U9e());P.registerLanguage("irpf90",B9e());P.registerLanguage("isbl",G9e());P.registerLanguage("java",q9e());P.registerLanguage("javascript",Y9e());P.registerLanguage("jboss-cli",V9e());P.registerLanguage("json",z9e());P.registerLanguage("julia",H9e());P.registerLanguage("julia-repl",$9e());P.registerLanguage("kotlin",W9e());P.registerLanguage("lasso",K9e());P.registerLanguage("latex",Q9e());P.registerLanguage("ldif",j9e());P.registerLanguage("leaf",Z9e());P.registerLanguage("less",X9e());P.registerLanguage("lisp",J9e());P.registerLanguage("livecodeserver",eGe());P.registerLanguage("livescript",tGe());P.registerLanguage("llvm",nGe());P.registerLanguage("lsl",rGe());P.registerLanguage("lua",sGe());P.registerLanguage("makefile",oGe());P.registerLanguage("mathematica",iGe());P.registerLanguage("matlab",aGe());P.registerLanguage("maxima",lGe());P.registerLanguage("mel",cGe());P.registerLanguage("mercury",dGe());P.registerLanguage("mipsasm",uGe());P.registerLanguage("mizar",_Ge());P.registerLanguage("perl",pGe());P.registerLanguage("mojolicious",mGe());P.registerLanguage("monkey",gGe());P.registerLanguage("moonscript",fGe());P.registerLanguage("n1ql",hGe());P.registerLanguage("nestedtext",EGe());P.registerLanguage("nginx",bGe());P.registerLanguage("nim",SGe());P.registerLanguage("nix",yGe());P.registerLanguage("node-repl",vGe());P.registerLanguage("nsis",TGe());P.registerLanguage("objectivec",CGe());P.registerLanguage("ocaml",RGe());P.registerLanguage("openscad",xGe());P.registerLanguage("oxygene",OGe());P.registerLanguage("parser3",AGe());P.registerLanguage("pf",NGe());P.registerLanguage("pgsql",wGe());P.registerLanguage("php",IGe());P.registerLanguage("php-template",DGe());P.registerLanguage("plaintext",kGe());P.registerLanguage("pony",MGe());P.registerLanguage("powershell",LGe());P.registerLanguage("processing",PGe());P.registerLanguage("profile",FGe());P.registerLanguage("prolog",UGe());P.registerLanguage("properties",BGe());P.registerLanguage("protobuf",GGe());P.registerLanguage("puppet",qGe());P.registerLanguage("purebasic",YGe());P.registerLanguage("python",VGe());P.registerLanguage("python-repl",zGe());P.registerLanguage("q",HGe());P.registerLanguage("qml",$Ge());P.registerLanguage("r",WGe());P.registerLanguage("reasonml",KGe());P.registerLanguage("rib",QGe());P.registerLanguage("roboconf",jGe());P.registerLanguage("routeros",ZGe());P.registerLanguage("rsl",XGe());P.registerLanguage("ruleslanguage",JGe());P.registerLanguage("rust",e6e());P.registerLanguage("sas",t6e());P.registerLanguage("scala",n6e());P.registerLanguage("scheme",r6e());P.registerLanguage("scilab",s6e());P.registerLanguage("scss",o6e());P.registerLanguage("shell",i6e());P.registerLanguage("smali",a6e());P.registerLanguage("smalltalk",l6e());P.registerLanguage("sml",c6e());P.registerLanguage("sqf",d6e());P.registerLanguage("sql",u6e());P.registerLanguage("stan",_6e());P.registerLanguage("stata",p6e());P.registerLanguage("step21",m6e());P.registerLanguage("stylus",g6e());P.registerLanguage("subunit",f6e());P.registerLanguage("swift",h6e());P.registerLanguage("taggerscript",E6e());P.registerLanguage("yaml",b6e());P.registerLanguage("tap",S6e());P.registerLanguage("tcl",y6e());P.registerLanguage("thrift",v6e());P.registerLanguage("tp",T6e());P.registerLanguage("twig",C6e());P.registerLanguage("typescript",R6e());P.registerLanguage("vala",x6e());P.registerLanguage("vbnet",O6e());P.registerLanguage("vbscript",A6e());P.registerLanguage("vbscript-html",N6e());P.registerLanguage("verilog",w6e());P.registerLanguage("vhdl",I6e());P.registerLanguage("vim",D6e());P.registerLanguage("wasm",k6e());P.registerLanguage("wren",M6e());P.registerLanguage("x86asm",L6e());P.registerLanguage("xl",P6e());P.registerLanguage("xquery",F6e());P.registerLanguage("zephir",U6e());P.HighlightJS=P;P.default=P;var B6e=P;const mr=Sn(B6e);mr.configure({languages:[]});mr.configure({languages:["bash"]});mr.highlightAll();const G6e={props:{host:{type:String,required:!1,default:"http://localhost:9600"},language:{type:String,required:!0},code:{type:String,required:!0},discussion_id:{type:[String,Number],required:!0},message_id:{type:[String,Number],required:!0}},data(){return{isCopied:!1,executionOutput:""}},mounted(){ve(()=>{Re.replace()})},computed:{highlightedCode(){let t;this.language==="vue"||this.language==="vue.js"?t="javascript":t=mr.getLanguage(this.language)?this.language:"plaintext";const e=this.code.trim(),n=e.split(` -`),r=n.length.toString().length,s=n.map((u,d)=>(d+1).toString().padStart(r," ")),o=document.createElement("div");o.classList.add("line-numbers"),o.innerHTML=s.join("
");const i=document.createElement("div");i.classList.add("code-container");const a=document.createElement("pre"),l=document.createElement("code");return l.classList.add("code-content"),l.innerHTML=mr.highlight(t,e).value,a.appendChild(l),i.appendChild(o),i.appendChild(a),i.outerHTML}},methods:{copyCode(){this.isCopied=!0,console.log("Copying code");const t=document.createElement("textarea");t.value=this.code,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),ve(()=>{Re.replace()})},executeCode(){const t=JSON.stringify({code:this.code,discussion_id:this.discussion_id,message_id:this.message_id,language:this.language});console.log(t),fetch(`${this.host}/execute_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e),this.executionOutput=e.output}).catch(e=>{console.error("Fetch error:",e)})},openFolder(){const t=JSON.stringify({discussion_id:this.discussion_id});console.log(t),fetch(`${this.host}/open_code_folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error("Fetch error:",e)})}}},q6e={class:"bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},Y6e={class:"flex flex-row bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},V6e=c("i",{"data-feather":"copy"},null,-1),z6e=[V6e],H6e=c("i",{"data-feather":"play-circle"},null,-1),$6e=[H6e],W6e=c("i",{"data-feather":"folder"},null,-1),K6e=[W6e],Q6e={class:"hljs p-1 rounded-md break-all grid grid-cols-1"},j6e={class:"code-container"},Z6e=["innerHTML"],X6e={key:0,class:"text-2xl text-red-500"},J6e={key:1,class:"hljs mt-0 p-1 rounded-md break-all grid grid-cols-1"},e8e={class:"overflow-x-auto break-all 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"},t8e=["innerHTML"];function n8e(t,e,n,r,s,o){return v(),T("div",q6e,[c("div",Y6e,[c("span",null,j(n.language),1),c("button",{onClick:e[0]||(e[0]=(...i)=>o.copyCode&&o.copyCode(...i)),title:"copy",class:Ae([s.isCopied?"bg-green-500":"bg-bg-dark-tone-panel dark:bg-bg-dark-tone","px-2 py-1 ml-2 text-left p-2 text-sm font-medium rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"])},z6e,2),["python","shell","bash","cmd","powershell"].includes(n.language)?(v(),T("button",{key:0,ref:"btn_code_exec",onClick:e[1]||(e[1]=(...i)=>o.executeCode&&o.executeCode(...i)),title:"execute",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},$6e,512)):U("",!0),["python"].includes(n.language)?(v(),T("button",{key:1,onClick:e[2]||(e[2]=(...i)=>o.openFolder&&o.openFolder(...i)),title:"open code project folder",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},K6e)):U("",!0)]),c("pre",Q6e,[xe(" "),c("div",j6e,[xe(` - `),c("code",{class:"code-content overflow-x-auto break-all 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:o.highlightedCode},null,8,Z6e),xe(` +`),r=n.length.toString().length,s=n.map((u,d)=>(d+1).toString().padStart(r," ")),o=document.createElement("div");o.classList.add("line-numbers"),o.innerHTML=s.join("
");const i=document.createElement("div");i.classList.add("code-container");const a=document.createElement("pre"),l=document.createElement("code");return l.classList.add("code-content"),l.innerHTML=mr.highlight(t,e).value,a.appendChild(l),i.appendChild(o),i.appendChild(a),i.outerHTML}},methods:{copyCode(){this.isCopied=!0,console.log("Copying code");const t=document.createElement("textarea");t.value=this.code,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),ve(()=>{Re.replace()})},executeCode(){const t=JSON.stringify({code:this.code,discussion_id:this.discussion_id,message_id:this.message_id,language:this.language});console.log(t),fetch(`${this.host}/execute_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e),this.executionOutput=e.output}).catch(e=>{console.error("Fetch error:",e)})},openFolder(){const t=JSON.stringify({discussion_id:this.discussion_id});console.log(t),fetch(`${this.host}/open_code_folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error("Fetch error:",e)})}}},q6e={class:"bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},Y6e={class:"flex flex-row bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},V6e={class:"text-2xl"},z6e=c("i",{"data-feather":"copy"},null,-1),H6e=[z6e],$6e=c("i",{"data-feather":"play-circle"},null,-1),W6e=[$6e],K6e=c("i",{"data-feather":"folder"},null,-1),Q6e=[K6e],j6e={class:"hljs p-1 rounded-md break-all grid grid-cols-1"},Z6e={class:"code-container"},X6e=["innerHTML"],J6e={key:0,class:"text-2xl"},e8e={key:1,class:"hljs mt-0 p-1 rounded-md break-all grid grid-cols-1"},t8e={class:"overflow-x-auto break-all 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"},n8e=["innerHTML"];function r8e(t,e,n,r,s,o){return v(),T("div",q6e,[c("div",Y6e,[c("span",V6e,j(n.language),1),c("button",{onClick:e[0]||(e[0]=(...i)=>o.copyCode&&o.copyCode(...i)),title:"copy",class:Ae([s.isCopied?"bg-green-500":"bg-bg-dark-tone-panel dark:bg-bg-dark-tone","px-2 py-1 ml-2 text-left p-2 text-sm font-medium rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"])},H6e,2),["python","shell","bash","cmd","powershell"].includes(n.language)?(v(),T("button",{key:0,ref:"btn_code_exec",onClick:e[1]||(e[1]=(...i)=>o.executeCode&&o.executeCode(...i)),title:"execute",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},W6e,512)):U("",!0),["python"].includes(n.language)?(v(),T("button",{key:1,onClick:e[2]||(e[2]=(...i)=>o.openFolder&&o.openFolder(...i)),title:"open code project folder",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},Q6e)):U("",!0)]),c("pre",j6e,[xe(" "),c("div",Z6e,[xe(` + `),c("code",{class:"code-content overflow-x-auto break-all 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:o.highlightedCode},null,8,X6e),xe(` `)]),xe(` - `)]),s.executionOutput?(v(),T("span",X6e,"Execution output")):U("",!0),s.executionOutput?(v(),T("pre",J6e,[xe(" "),c("div",e8e,[xe(` - `),c("div",{ref:"execution_output",innerHTML:s.executionOutput},null,8,t8e),xe(` + `)]),s.executionOutput?(v(),T("span",J6e,"Execution output")):U("",!0),s.executionOutput?(v(),T("pre",e8e,[xe(" "),c("div",t8e,[xe(` + `),c("div",{ref:"execution_output",innerHTML:s.executionOutput},null,8,n8e),xe(` `)]),xe(` - `)])):U("",!0)])}const r8e=Ye(G6e,[["render",n8e]]);function s8e(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const o8e={name:"MarkdownRenderer",props:{host:{type:String,required:!1,default:"http://localhost:9600"},markdownText:{type:String,required:!0},discussion_id:{type:[String,Number],default:"0",required:!1},message_id:{value:"0",type:[String,Number],required:!1}},components:{CodeBlock:r8e},setup(t){const e=new Uce({html:!0,highlight:(s,o)=>{const i=o&&mr.getLanguage(o)?o:"plaintext";return mr.highlight(i,s).value},renderInline:!0,breaks:!0}).use(Y5e).use(Mr).use(n3e,{figcaption:!0}).use(g3e).use(j5e,{inlineOpen:"$",inlineClose:"$",blockOpen:"$$",blockClose:"$$"}).use(e3e,{enableRowspan:!0,enableColspan:!0,enableGridTables:!0,enableGridTablesExtra:!0,enableTableIndentation:!0,tableCellPadding:" ",tableCellJoiner:"|",multilineCellStartMarker:"|>",multilineCellEndMarker:"<|",multilineCellPadding:" ",multilineCellJoiner:` -`}),n=FS([]),r=()=>{if(t.markdownText){let s=e.parse(t.markdownText,{}),o=[];n.value=[];for(let i=0;i0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[]),n.value.push({type:"code",language:s8e(s[i].info),code:s[i].content}));o.length>0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[])}else n.value=[];ve(()=>{Re.replace()})};return Yn(()=>t.markdownText,r),to(r),{markdownItems:n}}},i8e={class:"break-all"},a8e={ref:"mdRender",class:"markdown-content"},l8e=["innerHTML"];function c8e(t,e,n,r,s,o){const i=Pe("code-block");return v(),T("div",i8e,[c("div",a8e,[(v(!0),T(we,null,Be(r.markdownItems,(a,l)=>(v(),T("div",{key:l},[a.type==="code"?(v(),rt(i,{key:0,host:n.host,language:a.language,code:a.code,discussion_id:n.discussion_id,message_id:n.message_id},null,8,["host","language","code","discussion_id","message_id"])):(v(),T("div",{key:1,innerHTML:a.html},null,8,l8e))]))),128))],512)])}const uT=Ye(o8e,[["render",c8e]]);const d8e={props:{value:String,inputType:{type:String,default:"text",validator:t=>["text","email","password","file","path","integer","float"].includes(t)},fileAccept:String},data(){return{inputValue:this.value,placeholderText:this.getPlaceholderText()}},watch:{value(t){console.log("Changing value to ",t),this.inputValue=t}},mounted(){ve(()=>{Re.replace()}),console.log("Changing value to ",this.value),this.inputValue=this.value},methods:{handleSliderInput(t){this.inputValue=t.target.value,this.$emit("input",t.target.value)},getPlaceholderText(){switch(this.inputType){case"text":return"Enter text here";case"email":return"Enter your email";case"password":return"Enter your password";case"file":case"path":return"Choose a file";case"integer":return"Enter an integer";case"float":return"Enter a float";default:return"Enter value here"}},handleInput(t){if(this.inputType==="integer"){const e=t.target.value.replace(/[^0-9]/g,"");this.inputValue=e}console.log("handling input : ",t.target.value),this.$emit("input",t.target.value)},async pasteFromClipboard(){try{const t=await navigator.clipboard.readText();this.handleClipboardData(t)}catch(t){console.error("Failed to read from clipboard:",t)}},handlePaste(t){const e=t.clipboardData.getData("text");this.handleClipboardData(e)},handleClipboardData(t){switch(this.inputType){case"email":this.inputValue=this.isValidEmail(t)?t:"";break;case"password":this.inputValue=t;break;case"file":case"path":this.inputValue="";break;case"integer":this.inputValue=this.parseInteger(t);break;case"float":this.inputValue=this.parseFloat(t);break;default:this.inputValue=t;break}},isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)},parseInteger(t){const e=parseInt(t);return isNaN(e)?"":e},parseFloat(t){const e=parseFloat(t);return isNaN(e)?"":e},openFileInput(){this.$refs.fileInput.click()},handleFileInputChange(t){const e=t.target.files[0];e&&(this.inputValue=e.name)}}},u8e={class:"flex items-center space-x-2"},_8e=["value","type","placeholder"],p8e=["value","min","max"],m8e=c("i",{"data-feather":"clipboard"},null,-1),g8e=[m8e],f8e=c("i",{"data-feather":"upload"},null,-1),h8e=[f8e],E8e=["accept"];function b8e(t,e,n,r,s,o){return v(),T("div",u8e,[t.useSlider?(v(),T("input",{key:1,type:"range",value:parseInt(s.inputValue),min:t.minSliderValue,max:t.maxSliderValue,onInput:e[2]||(e[2]=(...i)=>o.handleSliderInput&&o.handleSliderInput(...i)),class:"flex-1 px-4 py-2 text-lg border dark:bg-gray-600 border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,p8e)):(v(),T("input",{key:0,value:s.inputValue,type:n.inputType,placeholder:s.placeholderText,onInput:e[0]||(e[0]=(...i)=>o.handleInput&&o.handleInput(...i)),onPaste:e[1]||(e[1]=(...i)=>o.handlePaste&&o.handlePaste(...i)),class:"flex-1 px-4 py-2 text-lg dark:bg-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,_8e)),c("button",{onClick:e[3]||(e[3]=(...i)=>o.pasteFromClipboard&&o.pasteFromClipboard(...i)),class:"p-2 bg-blue-500 dark:bg-gray-600 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},g8e),n.inputType==="file"?(v(),T("button",{key:2,onClick:e[4]||(e[4]=(...i)=>o.openFileInput&&o.openFileInput(...i)),class:"p-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},h8e)):U("",!0),n.inputType==="file"?(v(),T("input",{key:3,ref:"fileInput",type:"file",style:{display:"none"},accept:n.fileAccept,onChange:e[5]||(e[5]=(...i)=>o.handleFileInputChange&&o.handleFileInputChange(...i))},null,40,E8e)):U("",!0)])}const vp=Ye(d8e,[["render",b8e]]);const S8e={props:{is_subcard:{type:Boolean,default:!1},is_shrunk:{type:Boolean,default:!1},title:{type:String,default:""},isHorizontal:{type:Boolean,default:!1},cardWidth:{type:String,default:"w-3/4"},disableHoverAnimation:{type:Boolean,default:!0},disableFocus:{type:Boolean,default:!1}},data(){return{shrink:this.is_shrunk,isHovered:!1,isActive:!1}},computed:{cardClass(){return["bg-gray-50","border","border-gray-300","text-gray-900","text-sm","rounded-lg","focus:ring-blue-500","focus:border-blue-500","w-full","p-2.5","dark:bg-gray-500","dark:border-gray-600","dark:placeholder-gray-400","dark:text-white","dark:focus:ring-blue-500","dark:focus:border-blue-500",{"cursor-pointer":!this.isActive&&!this.disableFocus,"w-auto":!this.isActive}]},cardWidthClass(){return this.isActive?this.cardWidth:""}},methods:{toggleCard(){this.disableFocus||(this.isActive=!this.isActive)}}},y8e={key:1,class:"flex flex-wrap"},v8e={key:2,class:"mb-2"};function T8e(t,e,n,r,s,o){return v(),T(we,null,[s.isActive?(v(),T("div",{key:0,class:"overlay",onClick:e[0]||(e[0]=(...i)=>o.toggleCard&&o.toggleCard(...i))})):U("",!0),ce(c("div",{class:Ae(["border-blue-300 rounded-lg shadow-lg p-2",o.cardWidthClass,"m-2",{"bg-white dark:bg-gray-800":n.is_subcard},{"bg-white dark:bg-gray-900":!n.is_subcard},{hovered:!n.disableHoverAnimation&&s.isHovered,active:s.isActive}]),onMouseenter:e[2]||(e[2]=i=>s.isHovered=!0),onMouseleave:e[3]||(e[3]=i=>s.isHovered=!1),onClick:e[4]||(e[4]=_e((...i)=>o.toggleCard&&o.toggleCard(...i),["self"])),style:ht({cursor:this.disableFocus?"":"pointer"})},[n.title?(v(),T("div",{key:0,onClick:e[1]||(e[1]=i=>s.shrink=!0),class:Ae([{"text-center p-2 m-2 bg-gray-200":!n.is_subcard},"bg-gray-100 dark:bg-gray-500 rounded-lg pl-2 pr-2 mb-2 font-bold cursor-pointer"])},j(n.title),3)):U("",!0),n.isHorizontal?(v(),T("div",y8e,[qu(t.$slots,"default")])):(v(),T("div",v8e,[qu(t.$slots,"default")]))],38),[[We,s.shrink===!1]]),n.is_subcard?ce((v(),T("div",{key:1,onClick:e[5]||(e[5]=i=>s.shrink=!1),class:"bg-white text-center text-xl bold dark:bg-gray-500 border-blue-300 rounded-lg shadow-lg p-2 h-10 cursor-pointer m-2"},j(n.title),513)),[[We,s.shrink===!0]]):ce((v(),T("div",{key:2,onClick:e[6]||(e[6]=i=>s.shrink=!1),class:"bg-white text-center text-2xl dark:bg-gray-500 border-2 border-blue-300 rounded-lg shadow-lg p-0 h-7 cursor-pointer hover:h-8 hover:bg-blue-300"}," + ",512)),[[We,s.shrink===!0]])],64)}const ao=Ye(S8e,[["render",T8e]]);async function Jb(t,e="",n=[]){return new Promise((r,s)=>{const o=document.createElement("div");o.className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50",n.length===0?o.innerHTML=` + `)])):U("",!0)])}const s8e=Ye(G6e,[["render",r8e]]);function o8e(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const i8e={name:"MarkdownRenderer",props:{host:{type:String,required:!1,default:"http://localhost:9600"},markdownText:{type:String,required:!0},discussion_id:{type:[String,Number],default:"0",required:!1},message_id:{value:"0",type:[String,Number],required:!1}},components:{CodeBlock:s8e},setup(t){const e=new Uce({html:!0,highlight:(s,o)=>{const i=o&&mr.getLanguage(o)?o:"plaintext";return mr.highlight(i,s).value},renderInline:!0,breaks:!0}).use(Y5e).use(Mr).use(n3e,{figcaption:!0}).use(g3e).use(j5e,{inlineOpen:"$",inlineClose:"$",blockOpen:"$$",blockClose:"$$"}).use(e3e,{enableRowspan:!0,enableColspan:!0,enableGridTables:!0,enableGridTablesExtra:!0,enableTableIndentation:!0,tableCellPadding:" ",tableCellJoiner:"|",multilineCellStartMarker:"|>",multilineCellEndMarker:"<|",multilineCellPadding:" ",multilineCellJoiner:` +`}),n=FS([]),r=()=>{if(t.markdownText){let s=e.parse(t.markdownText,{}),o=[];n.value=[];for(let i=0;i0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[]),n.value.push({type:"code",language:o8e(s[i].info),code:s[i].content}));o.length>0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[])}else n.value=[];ve(()=>{Re.replace()})};return Yn(()=>t.markdownText,r),to(r),{markdownItems:n}}},a8e={class:"break-all"},l8e={ref:"mdRender",class:"markdown-content"},c8e=["innerHTML"];function d8e(t,e,n,r,s,o){const i=Pe("code-block");return v(),T("div",a8e,[c("div",l8e,[(v(!0),T(we,null,Be(r.markdownItems,(a,l)=>(v(),T("div",{key:l},[a.type==="code"?(v(),rt(i,{key:0,host:n.host,language:a.language,code:a.code,discussion_id:n.discussion_id,message_id:n.message_id},null,8,["host","language","code","discussion_id","message_id"])):(v(),T("div",{key:1,innerHTML:a.html},null,8,c8e))]))),128))],512)])}const uT=Ye(i8e,[["render",d8e]]);const u8e={props:{value:String,inputType:{type:String,default:"text",validator:t=>["text","email","password","file","path","integer","float"].includes(t)},fileAccept:String},data(){return{inputValue:this.value,placeholderText:this.getPlaceholderText()}},watch:{value(t){console.log("Changing value to ",t),this.inputValue=t}},mounted(){ve(()=>{Re.replace()}),console.log("Changing value to ",this.value),this.inputValue=this.value},methods:{handleSliderInput(t){this.inputValue=t.target.value,this.$emit("input",t.target.value)},getPlaceholderText(){switch(this.inputType){case"text":return"Enter text here";case"email":return"Enter your email";case"password":return"Enter your password";case"file":case"path":return"Choose a file";case"integer":return"Enter an integer";case"float":return"Enter a float";default:return"Enter value here"}},handleInput(t){if(this.inputType==="integer"){const e=t.target.value.replace(/[^0-9]/g,"");this.inputValue=e}console.log("handling input : ",t.target.value),this.$emit("input",t.target.value)},async pasteFromClipboard(){try{const t=await navigator.clipboard.readText();this.handleClipboardData(t)}catch(t){console.error("Failed to read from clipboard:",t)}},handlePaste(t){const e=t.clipboardData.getData("text");this.handleClipboardData(e)},handleClipboardData(t){switch(this.inputType){case"email":this.inputValue=this.isValidEmail(t)?t:"";break;case"password":this.inputValue=t;break;case"file":case"path":this.inputValue="";break;case"integer":this.inputValue=this.parseInteger(t);break;case"float":this.inputValue=this.parseFloat(t);break;default:this.inputValue=t;break}},isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)},parseInteger(t){const e=parseInt(t);return isNaN(e)?"":e},parseFloat(t){const e=parseFloat(t);return isNaN(e)?"":e},openFileInput(){this.$refs.fileInput.click()},handleFileInputChange(t){const e=t.target.files[0];e&&(this.inputValue=e.name)}}},_8e={class:"flex items-center space-x-2"},p8e=["value","type","placeholder"],m8e=["value","min","max"],g8e=c("i",{"data-feather":"clipboard"},null,-1),f8e=[g8e],h8e=c("i",{"data-feather":"upload"},null,-1),E8e=[h8e],b8e=["accept"];function S8e(t,e,n,r,s,o){return v(),T("div",_8e,[t.useSlider?(v(),T("input",{key:1,type:"range",value:parseInt(s.inputValue),min:t.minSliderValue,max:t.maxSliderValue,onInput:e[2]||(e[2]=(...i)=>o.handleSliderInput&&o.handleSliderInput(...i)),class:"flex-1 px-4 py-2 text-lg border dark:bg-gray-600 border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,m8e)):(v(),T("input",{key:0,value:s.inputValue,type:n.inputType,placeholder:s.placeholderText,onInput:e[0]||(e[0]=(...i)=>o.handleInput&&o.handleInput(...i)),onPaste:e[1]||(e[1]=(...i)=>o.handlePaste&&o.handlePaste(...i)),class:"flex-1 px-4 py-2 text-lg dark:bg-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,p8e)),c("button",{onClick:e[3]||(e[3]=(...i)=>o.pasteFromClipboard&&o.pasteFromClipboard(...i)),class:"p-2 bg-blue-500 dark:bg-gray-600 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},f8e),n.inputType==="file"?(v(),T("button",{key:2,onClick:e[4]||(e[4]=(...i)=>o.openFileInput&&o.openFileInput(...i)),class:"p-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},E8e)):U("",!0),n.inputType==="file"?(v(),T("input",{key:3,ref:"fileInput",type:"file",style:{display:"none"},accept:n.fileAccept,onChange:e[5]||(e[5]=(...i)=>o.handleFileInputChange&&o.handleFileInputChange(...i))},null,40,b8e)):U("",!0)])}const vp=Ye(u8e,[["render",S8e]]);const y8e={props:{is_subcard:{type:Boolean,default:!1},is_shrunk:{type:Boolean,default:!1},title:{type:String,default:""},isHorizontal:{type:Boolean,default:!1},cardWidth:{type:String,default:"w-3/4"},disableHoverAnimation:{type:Boolean,default:!0},disableFocus:{type:Boolean,default:!1}},data(){return{shrink:this.is_shrunk,isHovered:!1,isActive:!1}},computed:{cardClass(){return["bg-gray-50","border","border-gray-300","text-gray-900","text-sm","rounded-lg","focus:ring-blue-500","focus:border-blue-500","w-full","p-2.5","dark:bg-gray-500","dark:border-gray-600","dark:placeholder-gray-400","dark:text-white","dark:focus:ring-blue-500","dark:focus:border-blue-500",{"cursor-pointer":!this.isActive&&!this.disableFocus,"w-auto":!this.isActive}]},cardWidthClass(){return this.isActive?this.cardWidth:""}},methods:{toggleCard(){this.disableFocus||(this.isActive=!this.isActive)}}},v8e={key:1,class:"flex flex-wrap"},T8e={key:2,class:"mb-2"};function C8e(t,e,n,r,s,o){return v(),T(we,null,[s.isActive?(v(),T("div",{key:0,class:"overlay",onClick:e[0]||(e[0]=(...i)=>o.toggleCard&&o.toggleCard(...i))})):U("",!0),ce(c("div",{class:Ae(["border-blue-300 rounded-lg shadow-lg p-2",o.cardWidthClass,"m-2",{"bg-white dark:bg-gray-800":n.is_subcard},{"bg-white dark:bg-gray-900":!n.is_subcard},{hovered:!n.disableHoverAnimation&&s.isHovered,active:s.isActive}]),onMouseenter:e[2]||(e[2]=i=>s.isHovered=!0),onMouseleave:e[3]||(e[3]=i=>s.isHovered=!1),onClick:e[4]||(e[4]=_e((...i)=>o.toggleCard&&o.toggleCard(...i),["self"])),style:ht({cursor:this.disableFocus?"":"pointer"})},[n.title?(v(),T("div",{key:0,onClick:e[1]||(e[1]=i=>s.shrink=!0),class:Ae([{"text-center p-2 m-2 bg-gray-200":!n.is_subcard},"bg-gray-100 dark:bg-gray-500 rounded-lg pl-2 pr-2 mb-2 font-bold cursor-pointer"])},j(n.title),3)):U("",!0),n.isHorizontal?(v(),T("div",v8e,[qu(t.$slots,"default")])):(v(),T("div",T8e,[qu(t.$slots,"default")]))],38),[[We,s.shrink===!1]]),n.is_subcard?ce((v(),T("div",{key:1,onClick:e[5]||(e[5]=i=>s.shrink=!1),class:"bg-white text-center text-xl bold dark:bg-gray-500 border-blue-300 rounded-lg shadow-lg p-2 h-10 cursor-pointer m-2"},j(n.title),513)),[[We,s.shrink===!0]]):ce((v(),T("div",{key:2,onClick:e[6]||(e[6]=i=>s.shrink=!1),class:"bg-white text-center text-2xl dark:bg-gray-500 border-2 border-blue-300 rounded-lg shadow-lg p-0 h-7 cursor-pointer hover:h-8 hover:bg-blue-300"}," + ",512)),[[We,s.shrink===!0]])],64)}const ao=Ye(y8e,[["render",C8e]]);async function Jb(t,e="",n=[]){return new Promise((r,s)=>{const o=document.createElement("div");o.className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50",n.length===0?o.innerHTML=`

${t}

@@ -76,9 +76,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`),pe=I,X=Q),re===void 0&
- `,document.body.appendChild(o);const i=o.querySelector("#cancelButton"),a=o.querySelector("#okButton");i.addEventListener("click",()=>{document.body.removeChild(o),r(null)}),a.addEventListener("click",()=>{if(n.length===0){const u=o.querySelector("#replacementInput").value.trim();document.body.removeChild(o),r(u)}else{const u=o.querySelector("#options_selector").value.trim();document.body.removeChild(o),r(u)}})})}function C8e(t,e){console.log(t);let n={},r=/@<([^>]+)>@/g,s=[],o;for(;(o=r.exec(t))!==null;)s.push("@<"+o[1]+">@");console.log("matches"),console.log(s),s=[...new Set(s)];async function i(l){console.log(l);let u=l.toLowerCase().substring(2,l.length-2);if(u!=="generation_placeholder")if(u.includes(":")){Object.entries({all_language_options:"english:french:german:chinese:japanese:spanish:italian:russian:portuguese:swedish:danish:dutch:norwegian:slovak:czech:hungarian:polish:ukrainian:bulgarian:latvian:lithuanian:estonian:maltese:irish:galician:basque:welsh:breton:georgian:turkmen:kazakh:uzbek:tajik:afghan:sri-lankan:filipino:vietnamese:lao:cambodian:thai:burmese:kenyan:botswanan:zimbabwean:malawian:mozambican:angolan:namibian:south-african:madagascan:seychellois:mauritian:haitian:peruvian:ecuadorian:bolivian:paraguayan:chilean:argentinean:uruguayan:brazilian:colombian:venezuelan:puerto-rican:cuban:dominican:honduran:nicaraguan:salvadorean:guatemalan:el-salvadoran:belizean:panamanian:costa-rican:antiguan:barbudan:dominica's:grenada's:st-lucia's:st-vincent's:gibraltarian:faroe-islander:greenlandic:icelandic:jamaican:trinidadian:tobagonian:barbadian:anguillan:british-virgin-islander:us-virgin-islander:turkish:israeli:palestinian:lebanese:egyptian:libyan:tunisian:algerian:moroccan:bahraini:kuwaiti:saudi-arabian:yemeni:omani:irani:iraqi:afghanistan's:pakistani:indian:nepalese:sri-lankan:maldivan:burmese:thai:lao:vietnamese:kampuchean:malaysian:bruneian:indonesian:australian:new-zealanders:fijians:tongans:samoans:vanuatuans:wallisians:kiribatians:tuvaluans:solomon-islanders:marshallese:micronesians:hawaiians",all_programming_language_options:"python:c:c++:java:javascript:php:ruby:go:swift:kotlin:rust:haskell:erlang:lisp:scheme:prolog:cobol:fortran:pascal:delphi:d:eiffel:h:basic:visual_basic:smalltalk:objective-c:html5:node.js:vue.js:svelte:react:angular:ember:clipper:stex:arduino:brainfuck:r:assembly:mason:lepton:seacat:bbc_microbit:raspberry_pi_gpio:raspberry_pi_spi:raspberry_pi_i2c:raspberry_pi_uart:raspberry_pi_adc:raspberry_pi_ddio"}).forEach(([E,b])=>{console.log(`Key: ${E}, Value: ${b}`);function m(A){return A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const S=m(E),C=new RegExp(S,"g");u=u.replace(C,b)});let _=u.split(":"),p=_[0],g=_[1]||"",f=[];_.length>2&&(f=_.slice(1));let h=await Jb(p,g,f);h!==null&&(n[l]=h)}else{let d=await Jb(u);d!==null&&(n[l]=d)}}let a=Promise.resolve();s.forEach(l=>{a=a.then(()=>i(l)).then(u=>{console.log(u)})}),a.then(()=>{Object.entries(n).forEach(([l,u])=>{console.log(`Key: ${l}, Value: ${u}`);function d(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const _=d(l),p=new RegExp(_,"g");t=t.replace(p,u)}),e(t)})}const R8e={name:"PlayGroundView",data(){return{selecting_model:!1,tab_id:"source",generating:!1,isSpeaking:!1,voices:[],isLesteningToVoice:!1,presets:[],selectedPreset:"",cursorPosition:0,text:"",pre_text:"",post_text:"",temperature:.1,top_k:50,top_p:.9,repeat_penalty:1.3,repeat_last_n:50,n_crop:-1,n_predicts:2e3,seed:-1,silenceTimeout:5e3}},components:{Toast:Sr,MarkdownRenderer:uT,ClipBoardTextInput:vp,Card:ao},mounted(){Te.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}),Ne.on("text_chunk",t=>{this.appendToOutput(t.chunk)}),Ne.on("text_generated",t=>{this.generating=!1}),Ne.on("generation_error",t=>{console.log("generation_error:",t),this.$refs.toast.showToast(`Error: ${t}`,4,!1),this.generating=!1}),Ne.on("connect",()=>{console.log("Connected to LoLLMs server"),this.$store.state.isConnected=!0,this.generating=!1}),Ne.on("buzzy",t=>{console.error("Server is busy. Wait for your turn",t),this.$refs.toast.showToast(`Error: ${t.message}`,4,!1),this.generating=!1}),Ne.on("generation_canceled",t=>{this.generating=!1,console.log("Generation canceled OK")}),this.$nextTick(()=>{Re.replace()}),"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser.")},created(){},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}},isTalking:{get(){return this.isSpeaking}}},methods:{insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,s=e.value.substring(0,n),o=e.value.substring(r),i=s+" "+o;this.text=i,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},text_element_changed(){console.log("text_element_changed"),this.cursorPosition=this.$refs.text_element.selectionStart},text_element_clicked(){console.log("text_element_clicked"),this.cursorPosition=this.$refs.text_element.selectionStart},setModel(){this.selecting_model=!0,Te.post("/update_setting",{setting_name:"model_name",setting_value:this.selectedModel}).then(t=>{console.log(t),t.status&&this.$refs.toast.showToast(`Model changed to ${this.selectedModel}`,4,!0),this.selecting_model=!1}).catch(t=>{this.$refs.toast.showToast(`Error ${t}`,4,!0),this.selecting_model=!1})},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},speak(){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.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const n=s=>{let o=this.text.substring(s,s+e);const i=[".","!","?",` -`];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{const s=n(t),o=this.text.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",s))},this.speechSynthesis.speak(this.msg)};r()},getCursorPosition(){return this.cursorPosition},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),Ne.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(t),Ne.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){Ne.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=C8e(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={name:t,content:this.text},Te.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){Te.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},x8e={class:"container bg-bg-light dark:bg-bg-dark shadow-lg 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"},O8e={class:"container flex flex-row m-2"},A8e={class:"flex-grow m-2"},N8e={class:"flex gap-3 flex-1 items-center flex-grow flex-row m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4"},w8e=c("i",{"data-feather":"pen-tool"},null,-1),I8e=[w8e],D8e=c("i",{"data-feather":"archive"},null,-1),k8e=[D8e],M8e=c("span",{class:"w-80"},null,-1),L8e=c("i",{"data-feather":"x"},null,-1),P8e=[L8e],F8e=c("i",{"data-feather":"mic"},null,-1),U8e=[F8e],B8e=c("i",{"data-feather":"volume-2"},null,-1),G8e=[B8e],q8e=c("i",{"data-feather":"upload"},null,-1),Y8e=[q8e],V8e=c("i",{"data-feather":"download"},null,-1),z8e=[V8e],H8e={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},$8e=c("input",{type:"file",id:"import-input",class:"hidden"},null,-1),W8e={key:0},K8e={key:1},Q8e=["value"],j8e={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},Z8e=c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Selecting model...")],-1),X8e=[Z8e],J8e=["value"],eqe=c("br",null,null,-1),tqe=c("i",{"data-feather":"check"},null,-1),nqe=[tqe],rqe=c("i",{"data-feather":"plus"},null,-1),sqe=[rqe],oqe=c("i",{"data-feather":"x"},null,-1),iqe=[oqe],aqe=c("i",{"data-feather":"refresh-ccw"},null,-1),lqe=[aqe],cqe={class:"slider-container ml-2 mr-2"},dqe=c("h3",{class:"text-gray-600"},"Temperature",-1),uqe={class:"slider-value text-gray-500"},_qe={class:"slider-container ml-2 mr-2"},pqe=c("h3",{class:"text-gray-600"},"Top K",-1),mqe={class:"slider-value text-gray-500"},gqe={class:"slider-container ml-2 mr-2"},fqe=c("h3",{class:"text-gray-600"},"Top P",-1),hqe={class:"slider-value text-gray-500"},Eqe={class:"slider-container ml-2 mr-2"},bqe=c("h3",{class:"text-gray-600"},"Repeat Penalty",-1),Sqe={class:"slider-value text-gray-500"},yqe={class:"slider-container ml-2 mr-2"},vqe=c("h3",{class:"text-gray-600"},"Repeat Last N",-1),Tqe={class:"slider-value text-gray-500"},Cqe={class:"slider-container ml-2 mr-2"},Rqe=c("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1),xqe={class:"slider-value text-gray-500"},Oqe={class:"slider-container ml-2 mr-2"},Aqe=c("h3",{class:"text-gray-600"},"Number of tokens to generate",-1),Nqe={class:"slider-value text-gray-500"},wqe={class:"slider-container ml-2 mr-2"},Iqe=c("h3",{class:"text-gray-600"},"Seed",-1),Dqe={class:"slider-value text-gray-500"};function kqe(t,e,n,r,s,o){const i=Pe("MarkdownRenderer"),a=Pe("Card"),l=Pe("Toast");return v(),T(we,null,[c("div",x8e,[c("div",O8e,[c("div",A8e,[c("div",N8e,[ce(c("button",{id:"generate-button",onClick:e[0]||(e[0]=(...u)=>o.generate&&o.generate(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},I8e,512),[[We,!s.generating]]),ce(c("button",{id:"generate-next-button",onClick:e[1]||(e[1]=(...u)=>o.generate_in_placeholder&&o.generate_in_placeholder(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},k8e,512),[[We,!s.generating]]),M8e,ce(c("button",{id:"stop-button",onClick:e[2]||(e[2]=(...u)=>o.stopGeneration&&o.stopGeneration(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},P8e,512),[[We,s.generating]]),c("button",{type:"button",onClick:e[3]||(e[3]=(...u)=>o.startSpeechRecognition&&o.startSpeechRecognition(...u)),class:Ae([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},U8e,2),c("button",{title:"speak",onClick:e[4]||(e[4]=_e(u=>o.speak(),["stop"])),class:Ae([{"text-red-500":o.isTalking},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},G8e,2),ce(c("button",{id:"export-button",onClick:e[5]||(e[5]=(...u)=>o.exportText&&o.exportText(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},Y8e,512),[[We,!s.generating]]),ce(c("button",{id:"import-button",onClick:e[6]||(e[6]=(...u)=>o.importText&&o.importText(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},z8e,512),[[We,!s.generating]]),c("div",H8e,[c("button",{class:Ae(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":s.tab_id=="source"}]),onClick:e[7]||(e[7]=u=>s.tab_id="source")}," Source ",2),c("button",{class:Ae(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":s.tab_id=="render"}]),onClick:e[8]||(e[8]=u=>s.tab_id="render")}," Render ",2)]),$8e]),c("div",{class:Ae(["flex-grow m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4",{"border-red-500":s.generating}])},[s.tab_id==="source"?(v(),T("div",W8e,[ce(c("textarea",{ref:"mdTextarea",onKeydown:e[9]||(e[9]=Kr(_e((...u)=>o.insertTab&&o.insertTab(...u),["prevent"]),["tab"])),class:"block min-h-500 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,style:ht({minHeight:t.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[10]||(e[10]=u=>s.text=u)},`\r - `,36),[[De,s.text]]),c("span",null,"Cursor position "+j(s.cursorPosition),1)])):U("",!0),s.tab_id==="render"?(v(),T("div",K8e,[he(i,{ref:"mdRender","markdown-text":s.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["markdown-text"])])):U("",!0)],2)]),he(a,{title:"settings",class:"slider-container ml-0 mr-0 max-width",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(a,{title:"Model",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(c("select",{"onUpdate:modelValue":e[11]||(e[11]=u=>o.selectedModel=u),onChange:e[12]||(e[12]=(...u)=>o.setModel&&o.setModel(...u)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(we,null,Be(o.models,u=>(v(),T("option",{key:u,value:u},j(u),9,Q8e))),128))],544),[[Kt,o.selectedModel]]),s.selecting_model?(v(),T("div",j8e,X8e)):U("",!0)]),_:1}),he(a,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(c("select",{"onUpdate:modelValue":e[13]||(e[13]=u=>s.selectedPreset=u),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(we,null,Be(s.presets,u=>(v(),T("option",{key:u,value:u},j(u.name),9,J8e))),128))],512),[[Kt,s.selectedPreset]]),eqe,c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[14]||(e[14]=(...u)=>o.setPreset&&o.setPreset(...u)),title:"Use preset"},nqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[15]||(e[15]=(...u)=>o.addPreset&&o.addPreset(...u)),title:"Add this text as a preset"},sqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[16]||(e[16]=(...u)=>o.removePreset&&o.removePreset(...u)),title:"Remove preset"},iqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[17]||(e[17]=(...u)=>o.reloadPresets&&o.reloadPresets(...u)),title:"Reload presets list"},lqe)]),_:1}),he(a,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[c("div",cqe,[dqe,ce(c("input",{type:"range","onUpdate:modelValue":e[18]||(e[18]=u=>s.temperature=u),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[De,s.temperature]]),c("span",uqe,"Current value: "+j(s.temperature),1)]),c("div",_qe,[pqe,ce(c("input",{type:"range","onUpdate:modelValue":e[19]||(e[19]=u=>s.top_k=u),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[De,s.top_k]]),c("span",mqe,"Current value: "+j(s.top_k),1)]),c("div",gqe,[fqe,ce(c("input",{type:"range","onUpdate:modelValue":e[20]||(e[20]=u=>s.top_p=u),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[De,s.top_p]]),c("span",hqe,"Current value: "+j(s.top_p),1)]),c("div",Eqe,[bqe,ce(c("input",{type:"range","onUpdate:modelValue":e[21]||(e[21]=u=>s.repeat_penalty=u),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_penalty]]),c("span",Sqe,"Current value: "+j(s.repeat_penalty),1)]),c("div",yqe,[vqe,ce(c("input",{type:"range","onUpdate:modelValue":e[22]||(e[22]=u=>s.repeat_last_n=u),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_last_n]]),c("span",Tqe,"Current value: "+j(s.repeat_last_n),1)]),c("div",Cqe,[Rqe,ce(c("input",{type:"number","onUpdate:modelValue":e[23]||(e[23]=u=>s.n_crop=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_crop]]),c("span",xqe,"Current value: "+j(s.n_crop),1)]),c("div",Oqe,[Aqe,ce(c("input",{type:"number","onUpdate:modelValue":e[24]||(e[24]=u=>s.n_predicts=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_predicts]]),c("span",Nqe,"Current value: "+j(s.n_predicts),1)]),c("div",wqe,[Iqe,ce(c("input",{type:"number","onUpdate:modelValue":e[25]||(e[25]=u=>s.seed=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.seed]]),c("span",Dqe,"Current value: "+j(s.seed),1)])]),_:1})]),_:1})])]),he(l,{ref:"toast"},null,512)],64)}const Mqe=Ye(R8e,[["render",kqe]]);const Lqe={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(qT(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},Pqe={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},Fqe={key:0},Uqe=["onClick"],Bqe={key:0},Gqe=["src"],qqe={key:1},Yqe=c("p",null,"No extension is active. Please install and activate an extension.",-1),Vqe=[Yqe];function zqe(t,e,n,r,s,o){return v(),T("div",Pqe,[o.activeExtensions.length>0?(v(),T("div",Fqe,[(v(!0),T(we,null,Be(o.activeExtensions,i=>(v(),T("div",{key:i.name,onClick:a=>o.showExtensionPage(i)},[c("div",{class:Ae({"active-tab":i===s.activeExtension})},j(i.name),3)],8,Uqe))),128)),s.activeExtension?(v(),T("div",Bqe,[c("iframe",{src:s.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,Gqe)])):U("",!0)])):(v(),T("div",qqe,Vqe))])}const Hqe=Ye(Lqe,[["render",zqe]]);var _T={exports:{}};/* @license + `,document.body.appendChild(o);const i=o.querySelector("#cancelButton"),a=o.querySelector("#okButton");i.addEventListener("click",()=>{document.body.removeChild(o),r(null)}),a.addEventListener("click",()=>{if(n.length===0){const u=o.querySelector("#replacementInput").value.trim();document.body.removeChild(o),r(u)}else{const u=o.querySelector("#options_selector").value.trim();document.body.removeChild(o),r(u)}})})}function R8e(t,e){console.log(t);let n={},r=/@<([^>]+)>@/g,s=[],o;for(;(o=r.exec(t))!==null;)s.push("@<"+o[1]+">@");console.log("matches"),console.log(s),s=[...new Set(s)];async function i(l){console.log(l);let u=l.toLowerCase().substring(2,l.length-2);if(u!=="generation_placeholder")if(u.includes(":")){Object.entries({all_language_options:"english:french:german:chinese:japanese:spanish:italian:russian:portuguese:swedish:danish:dutch:norwegian:slovak:czech:hungarian:polish:ukrainian:bulgarian:latvian:lithuanian:estonian:maltese:irish:galician:basque:welsh:breton:georgian:turkmen:kazakh:uzbek:tajik:afghan:sri-lankan:filipino:vietnamese:lao:cambodian:thai:burmese:kenyan:botswanan:zimbabwean:malawian:mozambican:angolan:namibian:south-african:madagascan:seychellois:mauritian:haitian:peruvian:ecuadorian:bolivian:paraguayan:chilean:argentinean:uruguayan:brazilian:colombian:venezuelan:puerto-rican:cuban:dominican:honduran:nicaraguan:salvadorean:guatemalan:el-salvadoran:belizean:panamanian:costa-rican:antiguan:barbudan:dominica's:grenada's:st-lucia's:st-vincent's:gibraltarian:faroe-islander:greenlandic:icelandic:jamaican:trinidadian:tobagonian:barbadian:anguillan:british-virgin-islander:us-virgin-islander:turkish:israeli:palestinian:lebanese:egyptian:libyan:tunisian:algerian:moroccan:bahraini:kuwaiti:saudi-arabian:yemeni:omani:irani:iraqi:afghanistan's:pakistani:indian:nepalese:sri-lankan:maldivan:burmese:thai:lao:vietnamese:kampuchean:malaysian:bruneian:indonesian:australian:new-zealanders:fijians:tongans:samoans:vanuatuans:wallisians:kiribatians:tuvaluans:solomon-islanders:marshallese:micronesians:hawaiians",all_programming_language_options:"python:c:c++:java:javascript:php:ruby:go:swift:kotlin:rust:haskell:erlang:lisp:scheme:prolog:cobol:fortran:pascal:delphi:d:eiffel:h:basic:visual_basic:smalltalk:objective-c:html5:node.js:vue.js:svelte:react:angular:ember:clipper:stex:arduino:brainfuck:r:assembly:mason:lepton:seacat:bbc_microbit:raspberry_pi_gpio:raspberry_pi_spi:raspberry_pi_i2c:raspberry_pi_uart:raspberry_pi_adc:raspberry_pi_ddio"}).forEach(([E,b])=>{console.log(`Key: ${E}, Value: ${b}`);function m(A){return A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const S=m(E),C=new RegExp(S,"g");u=u.replace(C,b)});let _=u.split(":"),p=_[0],g=_[1]||"",f=[];_.length>2&&(f=_.slice(1));let h=await Jb(p,g,f);h!==null&&(n[l]=h)}else{let d=await Jb(u);d!==null&&(n[l]=d)}}let a=Promise.resolve();s.forEach(l=>{a=a.then(()=>i(l)).then(u=>{console.log(u)})}),a.then(()=>{Object.entries(n).forEach(([l,u])=>{console.log(`Key: ${l}, Value: ${u}`);function d(g){return g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const _=d(l),p=new RegExp(_,"g");t=t.replace(p,u)}),e(t)})}const x8e={name:"PlayGroundView",data(){return{selecting_model:!1,tab_id:"source",generating:!1,isSpeaking:!1,voices:[],isLesteningToVoice:!1,presets:[],selectedPreset:"",cursorPosition:0,text:"",pre_text:"",post_text:"",temperature:.1,top_k:50,top_p:.9,repeat_penalty:1.3,repeat_last_n:50,n_crop:-1,n_predicts:2e3,seed:-1,silenceTimeout:5e3}},components:{Toast:Sr,MarkdownRenderer:uT,ClipBoardTextInput:vp,Card:ao},mounted(){Te.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}),Ne.on("text_chunk",t=>{this.appendToOutput(t.chunk)}),Ne.on("text_generated",t=>{this.generating=!1}),Ne.on("generation_error",t=>{console.log("generation_error:",t),this.$refs.toast.showToast(`Error: ${t}`,4,!1),this.generating=!1}),Ne.on("connect",()=>{console.log("Connected to LoLLMs server"),this.$store.state.isConnected=!0,this.generating=!1}),Ne.on("buzzy",t=>{console.error("Server is busy. Wait for your turn",t),this.$refs.toast.showToast(`Error: ${t.message}`,4,!1),this.generating=!1}),Ne.on("generation_canceled",t=>{this.generating=!1,console.log("Generation canceled OK")}),this.$nextTick(()=>{Re.replace()}),"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser.")},created(){},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}},isTalking:{get(){return this.isSpeaking}}},methods:{insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,s=e.value.substring(0,n),o=e.value.substring(r),i=s+" "+o;this.text=i,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},text_element_changed(){console.log("text_element_changed"),this.cursorPosition=this.$refs.text_element.selectionStart},text_element_clicked(){console.log("text_element_clicked"),this.cursorPosition=this.$refs.text_element.selectionStart},setModel(){this.selecting_model=!0,Te.post("/update_setting",{setting_name:"model_name",setting_value:this.selectedModel}).then(t=>{console.log(t),t.status&&this.$refs.toast.showToast(`Model changed to ${this.selectedModel}`,4,!0),this.selecting_model=!1}).catch(t=>{this.$refs.toast.showToast(`Error ${t}`,4,!0),this.selecting_model=!1})},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},speak(){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.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const n=s=>{let o=this.text.substring(s,s+e);const i=[".","!","?",` +`];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{const s=n(t),o=this.text.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",s))},this.speechSynthesis.speak(this.msg)};r()},getCursorPosition(){return this.cursorPosition},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),Ne.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(t),Ne.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){Ne.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=R8e(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={name:t,content:this.text},Te.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){Te.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},O8e={class:"container bg-bg-light dark:bg-bg-dark shadow-lg 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"},A8e={class:"container flex flex-row m-2"},N8e={class:"flex-grow m-2"},w8e={class:"flex gap-3 flex-1 items-center flex-grow flex-row m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4"},I8e=c("i",{"data-feather":"pen-tool"},null,-1),D8e=[I8e],k8e=c("i",{"data-feather":"archive"},null,-1),M8e=[k8e],L8e=c("span",{class:"w-80"},null,-1),P8e=c("i",{"data-feather":"x"},null,-1),F8e=[P8e],U8e=c("i",{"data-feather":"mic"},null,-1),B8e=[U8e],G8e=c("i",{"data-feather":"volume-2"},null,-1),q8e=[G8e],Y8e=c("i",{"data-feather":"upload"},null,-1),V8e=[Y8e],z8e=c("i",{"data-feather":"download"},null,-1),H8e=[z8e],$8e={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},W8e=c("input",{type:"file",id:"import-input",class:"hidden"},null,-1),K8e={key:0},Q8e={key:1},j8e=["value"],Z8e={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},X8e=c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Selecting model...")],-1),J8e=[X8e],eqe=["value"],tqe=c("br",null,null,-1),nqe=c("i",{"data-feather":"check"},null,-1),rqe=[nqe],sqe=c("i",{"data-feather":"plus"},null,-1),oqe=[sqe],iqe=c("i",{"data-feather":"x"},null,-1),aqe=[iqe],lqe=c("i",{"data-feather":"refresh-ccw"},null,-1),cqe=[lqe],dqe={class:"slider-container ml-2 mr-2"},uqe=c("h3",{class:"text-gray-600"},"Temperature",-1),_qe={class:"slider-value text-gray-500"},pqe={class:"slider-container ml-2 mr-2"},mqe=c("h3",{class:"text-gray-600"},"Top K",-1),gqe={class:"slider-value text-gray-500"},fqe={class:"slider-container ml-2 mr-2"},hqe=c("h3",{class:"text-gray-600"},"Top P",-1),Eqe={class:"slider-value text-gray-500"},bqe={class:"slider-container ml-2 mr-2"},Sqe=c("h3",{class:"text-gray-600"},"Repeat Penalty",-1),yqe={class:"slider-value text-gray-500"},vqe={class:"slider-container ml-2 mr-2"},Tqe=c("h3",{class:"text-gray-600"},"Repeat Last N",-1),Cqe={class:"slider-value text-gray-500"},Rqe={class:"slider-container ml-2 mr-2"},xqe=c("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1),Oqe={class:"slider-value text-gray-500"},Aqe={class:"slider-container ml-2 mr-2"},Nqe=c("h3",{class:"text-gray-600"},"Number of tokens to generate",-1),wqe={class:"slider-value text-gray-500"},Iqe={class:"slider-container ml-2 mr-2"},Dqe=c("h3",{class:"text-gray-600"},"Seed",-1),kqe={class:"slider-value text-gray-500"};function Mqe(t,e,n,r,s,o){const i=Pe("MarkdownRenderer"),a=Pe("Card"),l=Pe("Toast");return v(),T(we,null,[c("div",O8e,[c("div",A8e,[c("div",N8e,[c("div",w8e,[ce(c("button",{id:"generate-button",onClick:e[0]||(e[0]=(...u)=>o.generate&&o.generate(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},D8e,512),[[We,!s.generating]]),ce(c("button",{id:"generate-next-button",onClick:e[1]||(e[1]=(...u)=>o.generate_in_placeholder&&o.generate_in_placeholder(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},M8e,512),[[We,!s.generating]]),L8e,ce(c("button",{id:"stop-button",onClick:e[2]||(e[2]=(...u)=>o.stopGeneration&&o.stopGeneration(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},F8e,512),[[We,s.generating]]),c("button",{type:"button",onClick:e[3]||(e[3]=(...u)=>o.startSpeechRecognition&&o.startSpeechRecognition(...u)),class:Ae([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},B8e,2),c("button",{title:"speak",onClick:e[4]||(e[4]=_e(u=>o.speak(),["stop"])),class:Ae([{"text-red-500":o.isTalking},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},q8e,2),ce(c("button",{id:"export-button",onClick:e[5]||(e[5]=(...u)=>o.exportText&&o.exportText(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},V8e,512),[[We,!s.generating]]),ce(c("button",{id:"import-button",onClick:e[6]||(e[6]=(...u)=>o.importText&&o.importText(...u)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},H8e,512),[[We,!s.generating]]),c("div",$8e,[c("button",{class:Ae(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":s.tab_id=="source"}]),onClick:e[7]||(e[7]=u=>s.tab_id="source")}," Source ",2),c("button",{class:Ae(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":s.tab_id=="render"}]),onClick:e[8]||(e[8]=u=>s.tab_id="render")}," Render ",2)]),W8e]),c("div",{class:Ae(["flex-grow m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4",{"border-red-500":s.generating}])},[s.tab_id==="source"?(v(),T("div",K8e,[ce(c("textarea",{ref:"mdTextarea",onKeydown:e[9]||(e[9]=Kr(_e((...u)=>o.insertTab&&o.insertTab(...u),["prevent"]),["tab"])),class:"block min-h-500 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,style:ht({minHeight:t.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[10]||(e[10]=u=>s.text=u)},`\r + `,36),[[De,s.text]]),c("span",null,"Cursor position "+j(s.cursorPosition),1)])):U("",!0),s.tab_id==="render"?(v(),T("div",Q8e,[he(i,{ref:"mdRender","markdown-text":s.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["markdown-text"])])):U("",!0)],2)]),he(a,{title:"settings",class:"slider-container ml-0 mr-0 max-width",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(a,{title:"Model",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(c("select",{"onUpdate:modelValue":e[11]||(e[11]=u=>o.selectedModel=u),onChange:e[12]||(e[12]=(...u)=>o.setModel&&o.setModel(...u)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(we,null,Be(o.models,u=>(v(),T("option",{key:u,value:u},j(u),9,j8e))),128))],544),[[Kt,o.selectedModel]]),s.selecting_model?(v(),T("div",Z8e,J8e)):U("",!0)]),_:1}),he(a,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(c("select",{"onUpdate:modelValue":e[13]||(e[13]=u=>s.selectedPreset=u),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(we,null,Be(s.presets,u=>(v(),T("option",{key:u,value:u},j(u.name),9,eqe))),128))],512),[[Kt,s.selectedPreset]]),tqe,c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[14]||(e[14]=(...u)=>o.setPreset&&o.setPreset(...u)),title:"Use preset"},rqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[15]||(e[15]=(...u)=>o.addPreset&&o.addPreset(...u)),title:"Add this text as a preset"},oqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[16]||(e[16]=(...u)=>o.removePreset&&o.removePreset(...u)),title:"Remove preset"},aqe),c("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[17]||(e[17]=(...u)=>o.reloadPresets&&o.reloadPresets(...u)),title:"Reload presets list"},cqe)]),_:1}),he(a,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[c("div",dqe,[uqe,ce(c("input",{type:"range","onUpdate:modelValue":e[18]||(e[18]=u=>s.temperature=u),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[De,s.temperature]]),c("span",_qe,"Current value: "+j(s.temperature),1)]),c("div",pqe,[mqe,ce(c("input",{type:"range","onUpdate:modelValue":e[19]||(e[19]=u=>s.top_k=u),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[De,s.top_k]]),c("span",gqe,"Current value: "+j(s.top_k),1)]),c("div",fqe,[hqe,ce(c("input",{type:"range","onUpdate:modelValue":e[20]||(e[20]=u=>s.top_p=u),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[De,s.top_p]]),c("span",Eqe,"Current value: "+j(s.top_p),1)]),c("div",bqe,[Sqe,ce(c("input",{type:"range","onUpdate:modelValue":e[21]||(e[21]=u=>s.repeat_penalty=u),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_penalty]]),c("span",yqe,"Current value: "+j(s.repeat_penalty),1)]),c("div",vqe,[Tqe,ce(c("input",{type:"range","onUpdate:modelValue":e[22]||(e[22]=u=>s.repeat_last_n=u),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_last_n]]),c("span",Cqe,"Current value: "+j(s.repeat_last_n),1)]),c("div",Rqe,[xqe,ce(c("input",{type:"number","onUpdate:modelValue":e[23]||(e[23]=u=>s.n_crop=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_crop]]),c("span",Oqe,"Current value: "+j(s.n_crop),1)]),c("div",Aqe,[Nqe,ce(c("input",{type:"number","onUpdate:modelValue":e[24]||(e[24]=u=>s.n_predicts=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_predicts]]),c("span",wqe,"Current value: "+j(s.n_predicts),1)]),c("div",Iqe,[Dqe,ce(c("input",{type:"number","onUpdate:modelValue":e[25]||(e[25]=u=>s.seed=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.seed]]),c("span",kqe,"Current value: "+j(s.seed),1)])]),_:1})]),_:1})])]),he(l,{ref:"toast"},null,512)],64)}const Lqe=Ye(x8e,[["render",Mqe]]);const Pqe={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(qT(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},Fqe={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},Uqe={key:0},Bqe=["onClick"],Gqe={key:0},qqe=["src"],Yqe={key:1},Vqe=c("p",null,"No extension is active. Please install and activate an extension.",-1),zqe=[Vqe];function Hqe(t,e,n,r,s,o){return v(),T("div",Fqe,[o.activeExtensions.length>0?(v(),T("div",Uqe,[(v(!0),T(we,null,Be(o.activeExtensions,i=>(v(),T("div",{key:i.name,onClick:a=>o.showExtensionPage(i)},[c("div",{class:Ae({"active-tab":i===s.activeExtension})},j(i.name),3)],8,Bqe))),128)),s.activeExtension?(v(),T("div",Gqe,[c("iframe",{src:s.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,qqe)])):U("",!0)])):(v(),T("div",Yqe,zqe))])}const $qe=Ye(Pqe,[["render",Hqe]]);var _T={exports:{}};/* @license Papa Parse v5.4.1 https://github.com/mholt/PapaParse @@ -92,7 +92,7 @@ License: MIT `:"\r"}(Y,O)),L=!1,y.delimiter)k(y.delimiter)&&(y.delimiter=y.delimiter(Y),ee.meta.delimiter=y.delimiter);else{var N=function($,W,ae,me,D){var K,G,q,V;D=D||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var ne=0;ne=B)return Ge(!0)}else for(oe=I,I++;;){if((oe=re.indexOf(R,oe+1))===-1)return pe||te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:z.length,index:I}),Oe();if(oe===ee-1)return Oe(re.substring(I,oe).replace(ne,R));if(R!==H||re[oe+1]!==H){if(R===H||oe===0||re[oe-1]!==H){q!==-1&&q=B)return Ge(!0);break}te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:z.length,index:I}),oe++}}else oe++}return Oe();function le(Ze){z.push(Ze),ue=I}function Se(Ze){var tt=0;if(Ze!==-1){var Xe=re.substring(oe+1,Ze);Xe&&Xe.trim()===""&&(tt=Xe.length)}return tt}function Oe(Ze){return pe||(Ze===void 0&&(Ze=re.substring(I)),Y.push(Ze),I=ee,le(Y),Ee&&nt()),Ge()}function Le(Ze){I=Ze,le(Y),Y=[],V=re.indexOf(L,I)}function Ge(Ze){return{data:z,errors:te,meta:{delimiter:w,linebreak:L,aborted:Q,truncated:!!Ze,cursor:ue+(X||0)}}}function nt(){Z(Ge()),z=[],te=[]}},this.abort=function(){Q=!0},this.getCharIndex=function(){return I}}function m(y){var R=y.data,w=i[R.workerId],L=!1;if(R.error)w.userError(R.error,R.file);else if(R.results&&R.results.data){var M={abort:function(){L=!0,S(R.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(k(w.userStep)){for(var Z=0;Zt.text()).then(t=>{const{data:e}=Wqe.parse(t,{header:!0});console.log("Recovered data"),console.log(e),this.faqs=e}).catch(t=>{console.error("Error loading FAQs:",t)})},parseMultiline(t){return t.replace(/\n/g,"
")}}},vn=t=>(hr("data-v-1c00af41"),t=t(),Er(),t),Qqe={class:"container flex-row mx-auto p-4 bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-1 md:grid-cols-2 gap-4"},jqe=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"About Lord of large Language Models",-1)),Zqe={class:"mb-4"},Xqe=vn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/vsGcArzs")],-1)),Jqe=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Frequently Asked Questions",-1)),e7e={class:"list-disc pl-4"},t7e={class:"text-xl font-bold mb-1"},n7e=["innerHTML"],r7e=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Contact Us",-1)),s7e=vn(()=>c("p",{class:"mb-4"},"If you have any further questions or need assistance, feel free to reach out to me.",-1)),o7e=vn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/vsGcArzs")],-1)),i7e=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Credits",-1)),a7e=vn(()=>c("p",{class:"mb-4"},[xe("This project is developed by "),c("span",{class:"font-bold"},"ParisNeo"),xe(" With help from the community.")],-1)),l7e=vn(()=>c("p",{class:"mb-4"},[c("span",{class:"font-bold"},[c("a",{href:"https://github.com/ParisNeo/lollms-webui/graphs/contributors"},"Check out the full list of developers here and show them some love.")])],-1)),c7e=["href"];function d7e(t,e,n,r,s,o){const i=Pe("Card");return v(),T("div",Qqe,[he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[jqe,c("p",Zqe," Lollms version "+j(o.version),1),Xqe]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[Jqe,c("ul",e7e,[(v(!0),T(we,null,Be(s.faqs,(a,l)=>(v(),T("li",{key:l},[c("h3",t7e,j(a.question),1),c("p",{class:"mb-4",innerHTML:o.parseMultiline(a.answer)},null,8,n7e)]))),128))])]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[r7e,s7e,o7e]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[i7e,a7e,l7e,c("p",null,[xe("Check out the project on "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:s.githubLink,target:"_blank",rel:"noopener noreferrer"},"GitHub",8,c7e),xe(".")])]),_:1})])}const u7e=Ye(Kqe,[["render",d7e],["__scopeId","data-v-1c00af41"]]);function Xt(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&oo.hide&&o.hide(...i)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):U("",!0)}const pT=Ye(_7e,[["render",h7e]]),E7e={data(){return{show:!1,message:"",resolve:null,ConfirmButtonText:"Yes, I'm sure",DenyButtonText:"No, cancel"}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t,e,n){return this.ConfirmButtonText=e||this.ConfirmButtonText,this.DenyButtonText=n||this.DenyButtonText,new Promise(r=>{this.message=t,this.show=!0,this.resolve=r})}}},b7e={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},S7e={class:"relative w-full max-w-md max-h-full"},y7e={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},v7e=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),T7e=c("span",{class:"sr-only"},"Close modal",-1),C7e=[v7e,T7e],R7e={class:"p-4 text-center"},x7e=c("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"},[c("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),O7e={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none break-all"};function A7e(t,e,n,r,s,o){return s.show?(v(),T("div",b7e,[c("div",S7e,[c("div",y7e,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},C7e),c("div",R7e,[x7e,c("h3",O7e,j(s.message),1),c("button",{onClick:e[1]||(e[1]=i=>o.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-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"},j(s.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=i=>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"},j(s.DenyButtonText),1)])])])])):U("",!0)}const N7e=Ye(E7e,[["render",A7e]]),zn="/assets/default_model-eeb65acd.png";const w7e={props:{title:{type:String,required:!1,value:"menu"},icon:{type:String,required:!1,value:"feather:menu"},commands:{type:Array,required:!0},force_position:{required:!1,value:0},execute_cmd:{type:Function,required:!1},menuIconClass:{type:String,required:!1,default:""},selected_entry:{type:String,required:!1}},data(){return{isMenuOpen:!1,menuPosition:{bottom:"auto",top:"calc(100% + 10px)"}}},methods:{handleClickOutside(t){const e=this.$refs.menu,n=this.$refs.menuButton;e&&!e.contains(t.target)&&!n.contains(t.target)&&(this.isMenuOpen=!1,window.removeEventListener("click",this.handleClickOutside))},toggleMenu(){this.positionMenu(),this.isMenuOpen=!this.isMenuOpen,this.isMenuOpen?window.addEventListener("click",this.handleClickOutside):window.removeEventListener("click",this.handleClickOutside),ve(()=>{Re.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected"),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(),ve(()=>{Re.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},I7e={class:"menu-container"},D7e=["title"],k7e=["src"],M7e=["data-feather"],L7e={key:2,class:"w-5 h-5"},P7e={key:3,"data-feather":"menu"},F7e={class:"flex-grow menu-ul"},U7e=["onClick"],B7e={key:0,"data-feather":"check"},G7e=["src","alt"],q7e=["data-feather"],Y7e={key:3,class:"menu-icon"};function V7e(t,e,n,r,s,o){return v(),T("div",I7e,[c("button",{onClick:e[0]||(e[0]=_e((...i)=>o.toggleMenu&&o.toggleMenu(...i),["prevent"])),title:n.title,class:Ae([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")?(v(),T("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,k7e)):n.icon&&n.icon.includes("feather")?(v(),T("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,M7e)):n.icon&&n.icon.includes("#")?(v(),T("p",L7e,j(n.icon.split("#")[1]),1)):(v(),T("i",P7e))],10,D7e),he($r,{name:"slide"},{default:ke(()=>[s.isMenuOpen?(v(),T("div",{key:0,class:"menu-list flex-grow",style:ht(s.menuPosition),ref:"menu"},[c("ul",F7e,[(v(!0),T(we,null,Be(n.commands,(i,a)=>(v(),T("li",{key:a,onClick:_e(l=>o.executeCommand(i),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==i.name?(v(),T("i",B7e)):i.icon&&!i.icon.includes("feather")&&!i.is_file?(v(),T("img",{key:1,src:i.icon,alt:i.name,class:"menu-icon"},null,8,G7e)):U("",!0),i.icon&&i.icon.includes("feather")&&!i.is_file?(v(),T("i",{key:2,"data-feather":i.icon.split(":")[1],class:"mr-2"},null,8,q7e)):(v(),T("span",Y7e)),c("span",null,j(i.name),1)],8,U7e))),128))])],4)):U("",!0)]),_:1})])}const lo=Ye(w7e,[["render",V7e]]),z7e={components:{InteractiveMenu:lo},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(){ve(()=>{Re.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 Xt(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?zn:this.model.icon},defaultImg(t){t.target.src=zn},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t=!1){this.onSelected(this,t),model.selected=!0,ve(()=>{Re.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){installing=!1,this.onCancelInstall(this)},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?"Uninstall":"Install",icon:"feather:settings",is_file:!1,value:this.toggleInstall},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return 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 Xt(this.speed)},total_size_computed(){return Xt(this.total_size)},downloaded_size_computed(){return Xt(this.downloaded_size)}},watch:{linkNotValid(){ve(()=>{Re.replace()})}}},H7e=["title"],$7e={key:0,class:"flex flex-row"},W7e={class:"max-w-[300px] overflow-x-auto"},K7e={class:"flex gap-3 items-center grow"},Q7e=["href"],j7e=["src"],Z7e={class:"flex-1 overflow-hidden"},X7e={class:"font-bold font-large text-lg truncate"},J7e={key:1,class:"flex items-center flex-row gap-2 my-1"},eYe={class:"flex grow items-center"},tYe=c("i",{"data-feather":"box",class:"w-5"},null,-1),nYe=c("span",{class:"sr-only"},"Custom model / local model",-1),rYe=[tYe,nYe],sYe=c("span",{class:"sr-only"},"Remove",-1),oYe={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"},iYe={class:"relative flex flex-col items-center justify-center flex-grow h-full"},aYe=c("div",{role:"status",class:"justify-center"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1),lYe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},cYe={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},dYe={class:"flex justify-between mb-1"},uYe=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),_Ye={class:"text-sm font-medium text-blue-700 dark:text-white"},pYe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},mYe={class:"flex justify-between mb-1"},gYe={class:"text-base font-medium text-blue-700 dark:text-white"},fYe={class:"text-sm font-medium text-blue-700 dark:text-white"},hYe={class:"flex flex-grow"},EYe={class:"flex flex-row flex-grow gap-3"},bYe={class:"p-2 text-center grow"},SYe={key:3},yYe={class:"flex flex-row items-center gap-3"},vYe=["src"],TYe={class:"font-bold font-large text-lg truncate"},CYe=c("div",{class:"grow"},null,-1),RYe={class:"flex items-center flex-row-reverse gap-2 my-1"},xYe={class:"flex flex-row items-center"},OYe={key:0,class:"text-base text-red-600 flex items-center mt-1"},AYe=c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),NYe=["title"],wYe={class:""},IYe={class:"flex flex-row items-center"},DYe=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),kYe=c("b",null,"Card: ",-1),MYe=["href","title"],LYe=c("div",{class:"grow"},null,-1),PYe=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),FYe=[PYe],UYe={class:"flex items-center"},BYe=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),GYe=c("b",null,"File size: ",-1),qYe={class:"flex items-center"},YYe=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),VYe=c("b",null,"License: ",-1),zYe={key:0,class:"flex items-center"},HYe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),$Ye=c("b",null,"quantizer: ",-1),WYe=["href"],KYe={class:"flex items-center"},QYe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),jYe=c("b",null,"Model creator: ",-1),ZYe=["href"],XYe={class:"flex items-center"},JYe=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),eVe=c("b",null,"Release date: ",-1),tVe={class:"flex items-center"},nVe=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),rVe=c("b",null,"Category: ",-1),sVe=["href"],oVe={class:"flex items-center"},iVe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),aVe=c("b",null,"Hugging face rank: ",-1);function lVe(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["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[11]||(e[11]=_e(a=>o.toggleSelected(),["prevent"]))},[n.model.isCustomModel?(v(),T("div",$7e,[c("div",W7e,[c("div",K7e,[c("a",{href:n.model.model_creator_link,target:"_blank"},[c("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,j7e)],8,Q7e),c("div",Z7e,[c("h3",X7e,j(n.model.name),1)])])])])):U("",!0),n.model.isCustomModel?(v(),T("div",J7e,[c("div",eYe,[c("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]=_e(()=>{},["stop"]))},rYe),xe(" Custom model ")]),c("div",null,[n.model.isInstalled?(v(),T("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=_e((...a)=>o.toggleInstall&&o.toggleInstall(...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"},[xe(" Uninstall "),sYe])):U("",!0)])])):U("",!0),s.installing?(v(),T("div",oYe,[c("div",iYe,[aYe,c("div",lYe,[c("div",cYe,[c("div",dYe,[uYe,c("span",_Ye,j(Math.floor(s.progress))+"%",1)]),c("div",pYe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht({width:s.progress+"%"})},null,4)]),c("div",mYe,[c("span",gYe,"Download speed: "+j(o.speed_computed)+"/s",1),c("span",fYe,j(o.downloaded_size_computed)+"/"+j(o.total_size_computed),1)])])]),c("div",hYe,[c("div",EYe,[c("div",bYe,[c("button",{onClick:e[3]||(e[3]=_e((...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 ")])])])])])):U("",!0),n.model.isCustomModel?U("",!0):(v(),T("div",SYe,[c("div",yYe,[c("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:Ae(["w-10 h-10 rounded-lg object-fill",s.linkNotValid?"grayscale":""])},null,42,vYe),c("h3",TYe,j(n.model.name),1),CYe,he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",RYe,[c("div",xYe,[s.linkNotValid?(v(),T("div",OYe,[AYe,xe(" Link is not valid ")])):U("",!0)])]),c("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[c("div",wYe,[c("div",IYe,[DYe,kYe,c("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=_e(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:s.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,MYe),LYe,c("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]=_e(a=>o.toggleCopyLink(),["stop"]))},FYe)]),c("div",UYe,[c("div",{class:Ae(["flex flex-shrink-0 items-center",s.linkNotValid?"text-red-600":""])},[BYe,GYe,xe(" "+j(o.fileSize),1)],2)]),c("div",qYe,[YYe,VYe,xe(" "+j(n.model.license),1)]),n.model.quantizer!="None"?(v(),T("div",zYe,[HYe,$Ye,c("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.quantizer),9,WYe)])):U("",!0),c("div",KYe,[QYe,jYe,c("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.model_creator),9,ZYe)]),c("div",XYe,[JYe,eVe,xe(" "+j(n.model.last_commit_time),1)]),c("div",tVe,[nVe,rVe,c("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.category),9,sVe)]),c("div",oVe,[iVe,aVe,c("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",rel:"noopener noreferrer",onClick:e[10]||(e[10]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.rank),1)])])],8,NYe)]))],10,H7e)}const cVe=Ye(z7e,[["render",lVe]]),dVe={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}}},uVe={class:"p-4"},_Ve={class:"flex items-center mb-4"},pVe=["src"],mVe={class:"text-lg font-semibold"},gVe=c("strong",null,"Author:",-1),fVe=c("strong",null,"Description:",-1),hVe=c("strong",null,"Category:",-1),EVe={key:0},bVe=c("strong",null,"Disclaimer:",-1),SVe=c("strong",null,"Conditioning Text:",-1),yVe=c("strong",null,"AI Prefix:",-1),vVe=c("strong",null,"User Prefix:",-1),TVe=c("strong",null,"Antiprompts:",-1);function CVe(t,e,n,r,s,o){return v(),T("div",uVe,[c("div",_Ve,[c("img",{src:s.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,pVe),c("h2",mVe,j(s.personalityName),1)]),c("p",null,[gVe,xe(" "+j(s.personalityAuthor),1)]),c("p",null,[fVe,xe(" "+j(s.personalityDescription),1)]),c("p",null,[hVe,xe(" "+j(s.personalityCategory),1)]),s.disclaimer?(v(),T("p",EVe,[bVe,xe(" "+j(s.disclaimer),1)])):U("",!0),c("p",null,[SVe,xe(" "+j(s.conditioningText),1)]),c("p",null,[yVe,xe(" "+j(s.aiPrefix),1)]),c("p",null,[vVe,xe(" "+j(s.userPrefix),1)]),c("div",null,[TVe,c("ul",null,[(v(!0),T(we,null,Be(s.antipromptsList,i=>(v(),T("li",{key:i.id},j(i.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=i=>s.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),s.editMode?(v(),T("button",{key:1,onClick:e[1]||(e[1]=(...i)=>o.commitChanges&&o.commitChanges(...i)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):U("",!0)])}const RVe=Ye(dVe,[["render",CVe]]),ms="/assets/logo-9d653710.svg",xVe="/",OVe={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function},components:{InteractiveMenu:lo},data(){return{isMounted:!1,name:this.personality.name}},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 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,ve(()=>{Re.replace()})},methods:{getImgUrl(){return xVe+this.personality.avatar},defaultImg(t){t.target.src=ms},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){ve(()=>{Re.replace()})}}},AVe=["title"],NVe={class:"flex flex-row items-center flex-shrink-0 gap-3"},wVe=["src"],IVe=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),DVe=[IVe],kVe={class:""},MVe={class:""},LVe={class:"flex items-center"},PVe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),FVe=c("b",null,"Author: ",-1),UVe={class:"flex items-center"},BVe=c("i",{"data-feather":"git-commit",class:"w-5 m-1"},null,-1),GVe=c("b",null,"Version: ",-1),qVe={key:0,class:"flex items-center"},YVe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),VVe=c("b",null,"Languages: ",-1),zVe=["selected"],HVe={key:1,class:"flex items-center"},$Ve=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),WVe=c("b",null,"Language: ",-1),KVe={class:"flex items-center"},QVe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),jVe=c("b",null,"Category: ",-1),ZVe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),XVe=["title","innerHTML"],JVe={class:"rounded bg-blue-300"},eze=c("i",{"data-feather":"check"},null,-1),tze=c("span",{class:"sr-only"},"Select",-1),nze=[eze,tze],rze=c("i",{"data-feather":"send",class:"w-5"},null,-1),sze=c("span",{class:"sr-only"},"Talk",-1),oze=[rze,sze];function ize(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",o.selected_computed?"border-2 border-primary-light":"border-transparent",s.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[c("div",{class:Ae(n.personality.installed?"":"border-red-500")},[c("div",NVe,[c("img",{onClick:e[0]||(e[0]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),ref:"imgElement",src:o.getImgUrl(),onError:e[1]||(e[1]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,wVe),c("h3",{onClick:e[2]||(e[2]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},j(n.personality.name),1),c("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[3]||(e[3]=_e(a=>o.toggleCopyLink(),["stop"]))},DVe)]),c("div",kVe,[c("div",MVe,[c("div",LVe,[PVe,FVe,xe(" "+j(n.personality.author),1)]),c("div",UVe,[BVe,GVe,xe(" "+j(n.personality.version),1)]),n.personality.languages&&n.select_language?(v(),T("div",qVe,[YVe,VVe,ce(c("select",{id:"languages","onUpdate:modelValue":e[4]||(e[4]=a=>n.personality.language=a),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"},[(v(!0),T(we,null,Be(n.personality.languages,(a,l)=>(v(),T("option",{key:l,selected:a==n.personality.languages[0]},j(a),9,zVe))),128))],512),[[Kt,n.personality.language]])])):U("",!0),n.personality.language?(v(),T("div",HVe,[$Ve,WVe,xe(" "+j(n.personality.language),1)])):U("",!0),c("div",KVe,[QVe,jVe,xe(" "+j(n.personality.category),1)])]),ZVe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.personality.description,innerHTML:n.personality.description},null,8,XVe)]),c("div",JVe,[s.isMounted?(v(),T("button",{key:0,type:"button",title:"Select",onClick:[e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),e[6]||(e[6]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},nze)):U("",!0),s.isMounted?(v(),T("button",{key:1,type:"button",title:"Talk",onClick:[e[7]||(e[7]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),e[8]||(e[8]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},oze)):U("",!0),he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,AVe)}const mT=Ye(OVe,[["render",ize]]);const aze={props:{code:String},data(){return{evaluatedCode:"",componentKey:0}},watch:{code:{handler(t){console.log("Code changed"),this.evaluateScriptTags(t),this.componentKey++},immediate:!0}},methods:{evaluateScriptTags(t){const e=document.createElement("div");e.innerHTML=t,e.querySelectorAll("script").forEach(r=>{const s=document.createElement("script");s.textContent=r.textContent,document.body.appendChild(s),document.body.removeChild(s)}),this.evaluatedCode=e.innerHTML,console.log("evaluated code: "+this.evaluatedCode)}}},lze=["innerHTML"];function cze(t,e,n,r,s,o){return v(),T("div",{innerHTML:s.evaluatedCode,key:s.componentKey},null,8,lze)}const gT=Ye(aze,[["render",cze]]),dze="/",uze={components:{DynamicUIRenderer:gT},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){ve(()=>{Re.replace()})},methods:{getImgUrl(){return dze+this.binding.icon},defaultImg(t){t.target.src=ms},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(){ve(()=>{Re.replace()})}}},_ze=["title"],pze={class:"flex flex-row items-center gap-3"},mze=["src"],gze={class:"font-bold font-large text-lg truncate"},fze=c("div",{class:"grow"},null,-1),hze={class:"flex-none gap-1"},Eze=c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),bze=c("span",{class:"sr-only"},"Help",-1),Sze=[Eze,bze],yze={class:"flex items-center flex-row-reverse gap-2 my-1"},vze=c("span",{class:"sr-only"},"Click to install",-1),Tze=c("span",{class:"sr-only"},"Reinstall",-1),Cze=c("span",{class:"sr-only"},"UnInstall",-1),Rze=c("span",{class:"sr-only"},"Settings",-1),xze={class:""},Oze={class:""},Aze={class:"flex items-center"},Nze=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),wze=c("b",null,"Author: ",-1),Ize={class:"flex items-center"},Dze=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),kze=c("b",null,"Folder: ",-1),Mze={class:"flex items-center"},Lze=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Pze=c("b",null,"Version: ",-1),Fze={class:"flex items-center"},Uze=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),Bze=c("b",null,"Link: ",-1),Gze=["href"],qze=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),Yze=["title","innerHTML"];function Vze(t,e,n,r,s,o){const i=Pe("DynamicUIRenderer");return v(),T("div",{class:Ae(["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[7]||(e[7]=_e((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[c("div",null,[c("div",pze,[c("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,mze),c("h3",gze,j(n.binding.name),1),fze,c("div",hze,[n.selected?(v(),T("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},Sze)):U("",!0)])]),c("div",yze,[n.binding.installed?U("",!0):(v(),T("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=_e((...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"},[xe(" Install "),vze])),n.binding.installed?(v(),T("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=_e((...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"},[xe(" Reinstall "),Tze])):U("",!0),n.binding.installed?(v(),T("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=_e((...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"},[xe(" Uninstall "),Cze])):U("",!0),n.selected?(v(),T("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=_e((...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"},[xe(" Settings "),Rze])):U("",!0)]),n.binding.ui?(v(),rt(i,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):U("",!0),c("div",xze,[c("div",Oze,[c("div",Aze,[Nze,wze,xe(" "+j(n.binding.author),1)]),c("div",Ize,[Dze,kze,xe(" "+j(n.binding.folder),1)]),c("div",Mze,[Lze,Pze,xe(" "+j(n.binding.version),1)]),c("div",Fze,[Uze,Bze,c("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},j(n.binding.link),9,Gze)])]),qze,c("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,Yze)])])],10,_ze)}const zze=Ye(uze,[["render",Vze]]),Hze={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})}}},$ze={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},Wze={class:"relative w-full max-w-md max-h-full"},Kze={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},Qze=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),jze=c("span",{class:"sr-only"},"Close modal",-1),Zze=[Qze,jze],Xze={class:"p-4 text-center"},Jze=c("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"},[c("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),eHe={class:"p-4 text-center mx-auto mb-4"},tHe=c("label",{class:"mr-2"},"Model path",-1);function nHe(t,e,n,r,s,o){return s.show?(v(),T("div",$ze,[c("div",Wze,[c("div",Kze,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},Zze),c("div",Xze,[Jze,c("div",eHe,[tHe,ce(c("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>s.model_path=i),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[De,s.model_path]])]),c("button",{onClick:e[2]||(e[2]=i=>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 "),c("button",{onClick:e[3]||(e[3]=i=>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")])])])])):U("",!0)}const rHe=Ye(Hze,[["render",nHe]]),sHe={setup(){return{}},name:"UniversalForm",data(){return{show:!1,resolve:null,controls_array:[],title:"Universal form",ConfirmButtonText:"Submit",DenyButtonText:"Cancel"}},mounted(){ve(()=>{Re.replace()})},methods:{hide(t){this.show=!1,this.resolve&&t&&(this.resolve(this.controls_array),this.resolve=null)},showForm(t,e,n,r){this.ConfirmButtonText=n||this.ConfirmButtonText,this.DenyButtonText=r||this.DenyButtonText;for(let s=0;s{this.controls_array=t,this.show=!0,this.title=e||this.title,this.resolve=s,console.log("show form",this.controls_array)})}},watch:{controls_array:{deep:!0,handler(t){t.forEach(e=>{e.type==="int"?e.value=parseInt(e.value):e.type==="float"&&(e.value=parseFloat(e.value))})}},show(){ve(()=>{Re.replace()})}}},oHe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 p-4"},iHe={class:"relative w-full max-w-md"},aHe={class:"flex flex-col rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel duration-150 shadow-lg max-h-screen"},lHe={class:"flex flex-row flex-grow items-center m-2 p-1"},cHe={class:"grow flex items-center"},dHe=c("i",{"data-feather":"sliders",class:"mr-2 flex-shrink-0"},null,-1),uHe={class:"text-lg font-semibold select-none mr-2"},_He={class:"items-end"},pHe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),mHe=c("span",{class:"sr-only"},"Close form modal",-1),gHe=[pHe,mHe],fHe={class:"flex flex-col relative no-scrollbar overflow-y-scroll p-2"},hHe={class:"px-2"},EHe={key:0},bHe={key:0},SHe={class:"text-base font-semibold"},yHe={key:0,class:"relative inline-flex"},vHe=["onUpdate:modelValue"],THe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),CHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},RHe=["onUpdate:modelValue"],xHe={key:1},OHe={class:"text-base font-semibold"},AHe={key:0,class:"relative inline-flex"},NHe=["onUpdate:modelValue"],wHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),IHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},DHe=["onUpdate:modelValue"],kHe=["value","selected"],MHe={key:1},LHe={class:"text-base font-semibold"},PHe={key:0,class:"relative inline-flex"},FHe=["onUpdate:modelValue"],UHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),BHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},GHe=["onUpdate:modelValue"],qHe=["onUpdate:modelValue","min","max"],YHe={key:2},VHe={class:"text-base font-semibold"},zHe={key:0,class:"relative inline-flex"},HHe=["onUpdate:modelValue"],$He=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),WHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},KHe=["onUpdate:modelValue"],QHe=["onUpdate:modelValue","min","max"],jHe={key:3},ZHe={class:"mb-2 relative flex items-center gap-2"},XHe={for:"default-checkbox",class:"text-base font-semibold"},JHe=["onUpdate:modelValue"],e$e={key:0,class:"relative inline-flex"},t$e=["onUpdate:modelValue"],n$e=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),r$e={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},s$e={key:4},o$e={class:"text-base font-semibold"},i$e={key:0,class:"relative inline-flex"},a$e=["onUpdate:modelValue"],l$e=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),c$e={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},d$e=["onUpdate:modelValue"],u$e=c("hr",{class:"h-px my-4 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),_$e={class:"flex flex-row flex-grow gap-3"},p$e={class:"p-2 text-center grow"};function m$e(t,e,n,r,s,o){return s.show?(v(),T("div",oHe,[c("div",iHe,[c("div",aHe,[c("div",lHe,[c("div",cHe,[dHe,c("h3",uHe,j(s.title),1)]),c("div",_He,[c("button",{type:"button",onClick:e[0]||(e[0]=_e(i=>o.hide(!1),["stop"])),title:"Close",class:"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"},gHe)])]),c("div",fHe,[(v(!0),T(we,null,Be(s.controls_array,(i,a)=>(v(),T("div",hHe,[i.type=="str"?(v(),T("div",EHe,[i.options?U("",!0):(v(),T("div",bHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",SHe,j(i.name)+": ",1),i.help?(v(),T("label",yHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,vHe),[[Je,i.isHelp]]),THe])):U("",!0)],2),i.isHelp?(v(),T("p",CHe,j(i.help),1)):U("",!0),ce(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 string"},null,8,RHe),[[De,i.value]])])),i.options?(v(),T("div",xHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",OHe,j(i.name)+": ",1),i.help?(v(),T("label",AHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,NHe),[[Je,i.isHelp]]),wHe])):U("",!0)],2),i.isHelp?(v(),T("p",IHe,j(i.help),1)):U("",!0),ce(c("select",{"onUpdate:modelValue":l=>i.value=l,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"},[(v(!0),T(we,null,Be(i.options,l=>(v(),T("option",{value:l,selected:i.value===l},j(l),9,kHe))),256))],8,DHe),[[Kt,i.value]])])):U("",!0)])):U("",!0),i.type=="int"?(v(),T("div",MHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",LHe,j(i.name)+": ",1),i.help?(v(),T("label",PHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,FHe),[[Je,i.isHelp]]),UHe])):U("",!0)],2),i.isHelp?(v(),T("p",BHe,j(i.help),1)):U("",!0),ce(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,step:"1",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 number"},null,8,GHe),[[De,i.value]]),i.min!=null&&i.max!=null?ce((v(),T("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"1",class:"flex-none h-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,8,qHe)),[[De,i.value]]):U("",!0)])):U("",!0),i.type=="float"?(v(),T("div",YHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",VHe,j(i.name)+": ",1),i.help?(v(),T("label",zHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,HHe),[[Je,i.isHelp]]),$He])):U("",!0)],2),i.isHelp?(v(),T("p",WHe,j(i.help),1)):U("",!0),ce(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,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 number"},null,8,KHe),[[De,i.value]]),i.min!=null&&i.max!=null?ce((v(),T("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"0.1",class:"flex-none h-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,8,QHe)),[[De,i.value]]):U("",!0)])):U("",!0),i.type=="bool"?(v(),T("div",jHe,[c("div",ZHe,[c("label",XHe,j(i.name)+": ",1),ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.value=l,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-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"},null,8,JHe),[[Je,i.value]]),i.help?(v(),T("label",e$e,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,t$e),[[Je,i.isHelp]]),n$e])):U("",!0)]),i.isHelp?(v(),T("p",r$e,j(i.help),1)):U("",!0)])):U("",!0),i.type=="list"?(v(),T("div",s$e,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",o$e,j(i.name)+": ",1),i.help?(v(),T("label",i$e,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,a$e),[[Je,i.isHelp]]),l$e])):U("",!0)],2),i.isHelp?(v(),T("p",c$e,j(i.help),1)):U("",!0),ce(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 comma separated values"},null,8,d$e),[[De,i.value]])])):U("",!0),u$e]))),256)),c("div",_$e,[c("div",p$e,[c("button",{onClick:e[1]||(e[1]=_e(i=>o.hide(!0),["stop"])),type:"button",class:"mr-2 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 sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},j(s.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=_e(i=>o.hide(!1),["stop"])),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-11 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"},j(s.DenyButtonText),1)])])])])])])):U("",!0)}const ea=Ye(sHe,[["render",m$e]]);const g$e={props:{show:{type:Boolean,default:!1,required:!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 console.log("choice:",t),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){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"},toggleInput(){this.showInput=!this.showInput},addNewFilename(){const t=this.newFilename.trim();t!==""&&(this.choices.push(t),this.newFilename="",this.selectChoice(t)),this.showInput=!1},removeChoice(t,e){this.choices.splice(e,1),t===this.selectedChoice&&(this.selectedChoice=null),this.$emit("choice-removed",t)}}},f$e={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},h$e={class:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96"},E$e={class:"text-xl font-semibold mb-4"},b$e={class:"h-48 overflow-y-auto"},S$e=["onClick"],y$e={class:"font-bold"},v$e=c("br",null,null,-1),T$e={key:0,class:"text-xs text-gray-500"},C$e=["onClick"],R$e={key:0,class:"mt-4"},x$e={class:"flex justify-end mt-4"},O$e=["disabled"];function A$e(t,e,n,r,s,o){return v(),rt($r,{name:"fade"},{default:ke(()=>[n.show?(v(),T("div",f$e,[c("div",h$e,[c("h2",E$e,j(n.title),1),c("div",b$e,[c("ul",null,[(v(!0),T(we,null,Be(n.choices,(i,a)=>(v(),T("li",{key:a,onClick:l=>o.selectChoice(i),class:Ae([{"selected-choice":i===s.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700"])},[c("span",y$e,j(o.displayName(i)),1),v$e,i.size?(v(),T("span",T$e,j(o.formatSize(i.size)),1)):U("",!0),n.can_remove?(v(),T("button",{key:1,onClick:l=>o.removeChoice(i,a),class:"ml-2 text-red-500 hover:text-red-600"}," X ",8,C$e)):U("",!0)],10,S$e))),128))])]),s.showInput?(v(),T("div",R$e,[ce(c("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>s.newFilename=i),placeholder:"Enter a filename",class:"border border-gray-300 p-2 rounded-lg w-full"},null,512),[[De,s.newFilename]]),c("button",{onClick:e[1]||(e[1]=(...i)=>o.addNewFilename&&o.addNewFilename(...i)),class:"mt-2 py-2 px-4 bg-green-500 hover:bg-green-600 text-white rounded-lg transition duration-300"}," Add ")])):U("",!0),c("div",x$e,[c("button",{onClick:e[2]||(e[2]=(...i)=>o.closeDialog&&o.closeDialog(...i)),class:"py-2 px-4 mr-2 bg-red-500 hover:bg-red-600 text-white rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[3]||(e[3]=(...i)=>o.validateChoice&&o.validateChoice(...i)),class:Ae([{"bg-gray-400 cursor-not-allowed":!s.selectedChoice,"bg-blue-500 hover:bg-blue-600":s.selectedChoice,"text-white":s.selectedChoice,"text-gray-500":!s.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!s.selectedChoice}," Validate ",10,O$e),c("button",{onClick:e[4]||(e[4]=(...i)=>o.toggleInput&&o.toggleInput(...i)),class:"py-2 px-4 ml-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300"}," Add New ")])])])):U("",!0)]),_:1})}const Tp=Ye(g$e,[["render",A$e]]),N$e={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:0}},data(){return{selectedValue:this.defaultValue}},methods:{handleRadioChange(t){this.selectedValue!==null&&this.$emit("radio-selected",this.selectedValue,t)}}},w$e={class:"flex space-x-4"},I$e=["value","onChange"],D$e={class:"text-gray-700"};function k$e(t,e,n,r,s,o){return v(),T("div",w$e,[(v(!0),T(we,null,Be(n.radioOptions,(i,a)=>(v(),T("label",{key:i.value,class:"flex items-center space-x-2"},[ce(c("input",{type:"radio",value:i.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.selectedValue=l),onChange:l=>o.handleRadioChange(a),class:"text-blue-500 focus:ring-2 focus:ring-blue-200"},null,40,I$e),[[P1,s.selectedValue]]),c("span",D$e,j(i.label),1)]))),128))])}const M$e=Ye(N$e,[["render",k$e]]),L$e="/",P$e={props:{extension:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function},components:{InteractiveMenu:lo},data(){return{isMounted:!1,name:this.extension.name}},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 this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.extension.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.extension.isMounted,ve(()=>{Re.replace()})},methods:{getImgUrl(){return L$e+this.extension.avatar},defaultImg(t){t.target.src=ms},toggleTalk(){this.onTalk(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){ve(()=>{Re.replace()})}}},F$e=["title"],U$e={class:"flex flex-row items-center flex-shrink-0 gap-3"},B$e=["src"],G$e={class:""},q$e={class:""},Y$e={class:"flex items-center"},V$e=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),z$e=c("b",null,"Author: ",-1),H$e={class:"flex items-center"},$$e=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),W$e=c("b",null,"Based on: ",-1),K$e={key:0,class:"flex items-center"},Q$e=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),j$e=c("b",null,"Languages: ",-1),Z$e=["selected"],X$e={key:1,class:"flex items-center"},J$e=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),eWe=c("b",null,"Language: ",-1),tWe={class:"flex items-center"},nWe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),rWe=c("b",null,"Category: ",-1),sWe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),oWe=["title","innerHTML"],iWe={class:"rounded bg-blue-300"},aWe=c("i",{"data-feather":"check"},null,-1),lWe=c("span",{class:"sr-only"},"Select",-1),cWe=[aWe,lWe],dWe=c("i",{"data-feather":"send",class:"w-5"},null,-1),uWe=c("span",{class:"sr-only"},"Talk",-1),_We=[dWe,uWe];function pWe(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",o.selected_computed?"border-2 border-primary-light":"border-transparent",s.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.extension.installed?"":"Not installed"},[c("div",{class:Ae(n.extension.installed?"":"border-red-500")},[c("div",U$e,[c("img",{onClick:e[0]||(e[0]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),ref:"imgElement",src:o.getImgUrl(),onError:e[1]||(e[1]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,B$e),c("h3",{onClick:e[2]||(e[2]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},j(n.extension.name),1)]),c("div",G$e,[c("div",q$e,[c("div",Y$e,[V$e,z$e,xe(" "+j(n.extension.author),1)]),c("div",H$e,[$$e,W$e,xe(" "+j(n.extension.based_on),1)]),n.extension.languages&&n.select_language?(v(),T("div",K$e,[Q$e,j$e,ce(c("select",{id:"languages","onUpdate:modelValue":e[3]||(e[3]=a=>n.extension.language=a),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"},[(v(!0),T(we,null,Be(n.extension.languages,(a,l)=>(v(),T("option",{key:l,selected:a==n.extension.languages[0]},j(a),9,Z$e))),128))],512),[[Kt,n.extension.language]])])):U("",!0),n.extension.language?(v(),T("div",X$e,[J$e,eWe,xe(" "+j(n.extension.language),1)])):U("",!0),c("div",tWe,[nWe,rWe,xe(" "+j(n.extension.category),1)])]),sWe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.extension.description,innerHTML:n.extension.description},null,8,oWe)]),c("div",iWe,[s.isMounted?(v(),T("button",{key:0,type:"button",title:"Select",onClick:[e[4]||(e[4]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),e[5]||(e[5]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},cWe)):U("",!0),s.isMounted?(v(),T("button",{key:1,type:"button",title:"Talk",onClick:[e[6]||(e[6]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),e[7]||(e[7]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},_We)):U("",!0),he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,F$e)}const mWe=Ye(P$e,[["render",pWe]]),gWe="/assets/gpu-df72bf63.svg";const fWe="/";Te.defaults.baseURL="/";const hWe={components:{AddModelDialog:rHe,MessageBox:pT,YesNoDialog:N7e,ModelEntry:cVe,PersonalityViewer:RVe,Toast:Sr,PersonalityEntry:mT,BindingEntry:zze,UniversalForm:ea,ChoiceDialog:Tp,Card:ao,RadioOptions:M$e,ExtensionEntry:mWe},data(){return{imgModel:zn,SVGGPU:gWe,models_zoo:[],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}],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",extension_category:"bound_extensions",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],extensionsFiltererd:[],collapsedArr:[],all_collapsed:!0,minconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,ezc_collapsed:!0,mep_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:fWe,searchPersonality:"",searchExtension:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchExtensionInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){Ne.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{async modelsZooToggleCollapse(){this.mzc_collapsed=!this.mzc_collapsed,!this.mzc_collapsed&&(this.modelsZoo==null||this.modelsZoo.length==0)&&(console.log("Refreshing models"),await this.$store.dispatch("refreshConfig"),this.models_zoo=[],this.refreshModelsZoo())},async selectSortOption(t){this.$store.state.sort_type=t,this.modelsFiltered=this.models_zoo,console.log(`Selected sorting:${t}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(this.audioVoices=speechSynthesis.getVoices(),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(t){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let e=this.currenModelToInstall;if(e.linkNotValid){e.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let n="https://huggingface.co/"+e.model.quantizer+"/"+e.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:n},console.log("installing...",this.addModel);const r=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(this.addModel=s,console.log("Progress",s),e.progress=s.progress,e.speed=s.speed,e.total_size=s.total_size,e.downloaded_size=s.downloaded_size,e.start_time=s.start_time,e.installing=!0,e.progress==100){const o=this.models_zoo.findIndex(i=>i.name===e.model.name);this.models_zoo[o].isInstalled=!0,this.showProgress=!1,e.installing=!1,console.log("Received succeeded"),Ne.off("install_progress",r),console.log("Installed successfully"),this.$refs.toast.showToast(`Model: +`);var I=0,Q=!1;this.parse=function(re,X,pe){if(typeof re!="string")throw new Error("Input must be a string");var ee=re.length,be=w.length,Ce=L.length,fe=M.length,Ee=k(Z),z=[],te=[],Y=[],ue=I=0;if(!re)return Ge();if(y.header&&!X){var ye=re.split(L)[0].split(w),O=[],N={},F=!1;for(var $ in ye){var W=ye[$];k(y.transformHeader)&&(W=y.transformHeader(W,$));var ae=W,me=N[W]||0;for(0=B)return Ge(!0)}else for(oe=I,I++;;){if((oe=re.indexOf(R,oe+1))===-1)return pe||te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:z.length,index:I}),Oe();if(oe===ee-1)return Oe(re.substring(I,oe).replace(ne,R));if(R!==H||re[oe+1]!==H){if(R===H||oe===0||re[oe-1]!==H){q!==-1&&q=B)return Ge(!0);break}te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:z.length,index:I}),oe++}}else oe++}return Oe();function le(Ze){z.push(Ze),ue=I}function Se(Ze){var tt=0;if(Ze!==-1){var Xe=re.substring(oe+1,Ze);Xe&&Xe.trim()===""&&(tt=Xe.length)}return tt}function Oe(Ze){return pe||(Ze===void 0&&(Ze=re.substring(I)),Y.push(Ze),I=ee,le(Y),Ee&&nt()),Ge()}function Le(Ze){I=Ze,le(Y),Y=[],V=re.indexOf(L,I)}function Ge(Ze){return{data:z,errors:te,meta:{delimiter:w,linebreak:L,aborted:Q,truncated:!!Ze,cursor:ue+(X||0)}}}function nt(){Z(Ge()),z=[],te=[]}},this.abort=function(){Q=!0},this.getCharIndex=function(){return I}}function m(y){var R=y.data,w=i[R.workerId],L=!1;if(R.error)w.userError(R.error,R.file);else if(R.results&&R.results.data){var M={abort:function(){L=!0,S(R.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(k(w.userStep)){for(var Z=0;Zt.text()).then(t=>{const{data:e}=Kqe.parse(t,{header:!0});console.log("Recovered data"),console.log(e),this.faqs=e}).catch(t=>{console.error("Error loading FAQs:",t)})},parseMultiline(t){return t.replace(/\n/g,"
")}}},vn=t=>(hr("data-v-1c00af41"),t=t(),Er(),t),jqe={class:"container flex-row mx-auto p-4 bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-1 md:grid-cols-2 gap-4"},Zqe=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"About Lord of large Language Models",-1)),Xqe={class:"mb-4"},Jqe=vn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/vsGcArzs")],-1)),e7e=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Frequently Asked Questions",-1)),t7e={class:"list-disc pl-4"},n7e={class:"text-xl font-bold mb-1"},r7e=["innerHTML"],s7e=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Contact Us",-1)),o7e=vn(()=>c("p",{class:"mb-4"},"If you have any further questions or need assistance, feel free to reach out to me.",-1)),i7e=vn(()=>c("p",null,[xe("Discord link: "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:"https://discord.gg/C73K7hjy"},"https://discord.gg/vsGcArzs")],-1)),a7e=vn(()=>c("h2",{class:"text-2xl font-bold mb-2"},"Credits",-1)),l7e=vn(()=>c("p",{class:"mb-4"},[xe("This project is developed by "),c("span",{class:"font-bold"},"ParisNeo"),xe(" With help from the community.")],-1)),c7e=vn(()=>c("p",{class:"mb-4"},[c("span",{class:"font-bold"},[c("a",{href:"https://github.com/ParisNeo/lollms-webui/graphs/contributors"},"Check out the full list of developers here and show them some love.")])],-1)),d7e=["href"];function u7e(t,e,n,r,s,o){const i=Pe("Card");return v(),T("div",jqe,[he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[Zqe,c("p",Xqe," Lollms version "+j(o.version),1),Jqe]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[e7e,c("ul",t7e,[(v(!0),T(we,null,Be(s.faqs,(a,l)=>(v(),T("li",{key:l},[c("h3",n7e,j(a.question),1),c("p",{class:"mb-4",innerHTML:o.parseMultiline(a.answer)},null,8,r7e)]))),128))])]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[s7e,o7e,i7e]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[a7e,l7e,c7e,c("p",null,[xe("Check out the project on "),c("a",{class:"text-blue-500 hover:text-blue-400 duration-150",href:s.githubLink,target:"_blank",rel:"noopener noreferrer"},"GitHub",8,d7e),xe(".")])]),_:1})])}const _7e=Ye(Qqe,[["render",u7e],["__scopeId","data-v-1c00af41"]]);function Xt(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&oo.hide&&o.hide(...i)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):U("",!0)}const pT=Ye(p7e,[["render",E7e]]),b7e={data(){return{show:!1,message:"",resolve:null,ConfirmButtonText:"Yes, I'm sure",DenyButtonText:"No, cancel"}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t,e,n){return this.ConfirmButtonText=e||this.ConfirmButtonText,this.DenyButtonText=n||this.DenyButtonText,new Promise(r=>{this.message=t,this.show=!0,this.resolve=r})}}},S7e={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},y7e={class:"relative w-full max-w-md max-h-full"},v7e={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},T7e=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),C7e=c("span",{class:"sr-only"},"Close modal",-1),R7e=[T7e,C7e],x7e={class:"p-4 text-center"},O7e=c("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"},[c("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),A7e={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none break-all"};function N7e(t,e,n,r,s,o){return s.show?(v(),T("div",S7e,[c("div",y7e,[c("div",v7e,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},R7e),c("div",x7e,[O7e,c("h3",A7e,j(s.message),1),c("button",{onClick:e[1]||(e[1]=i=>o.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-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"},j(s.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=i=>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"},j(s.DenyButtonText),1)])])])])):U("",!0)}const w7e=Ye(b7e,[["render",N7e]]),zn="/assets/default_model-eeb65acd.png";const I7e={props:{title:{type:String,required:!1,value:"menu"},icon:{type:String,required:!1,value:"feather:menu"},commands:{type:Array,required:!0},force_position:{required:!1,value:0},execute_cmd:{type:Function,required:!1},menuIconClass:{type:String,required:!1,default:""},selected_entry:{type:String,required:!1}},data(){return{isMenuOpen:!1,menuPosition:{bottom:"auto",top:"calc(100% + 10px)"}}},methods:{handleClickOutside(t){const e=this.$refs.menu,n=this.$refs.menuButton;e&&!e.contains(t.target)&&!n.contains(t.target)&&(this.isMenuOpen=!1,window.removeEventListener("click",this.handleClickOutside))},toggleMenu(){this.positionMenu(),this.isMenuOpen=!this.isMenuOpen,this.isMenuOpen?window.addEventListener("click",this.handleClickOutside):window.removeEventListener("click",this.handleClickOutside),ve(()=>{Re.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected"),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(),ve(()=>{Re.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},D7e={class:"menu-container"},k7e=["title"],M7e=["src"],L7e=["data-feather"],P7e={key:2,class:"w-5 h-5"},F7e={key:3,"data-feather":"menu"},U7e={class:"flex-grow menu-ul"},B7e=["onClick"],G7e={key:0,"data-feather":"check"},q7e=["src","alt"],Y7e=["data-feather"],V7e={key:3,class:"menu-icon"};function z7e(t,e,n,r,s,o){return v(),T("div",D7e,[c("button",{onClick:e[0]||(e[0]=_e((...i)=>o.toggleMenu&&o.toggleMenu(...i),["prevent"])),title:n.title,class:Ae([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")?(v(),T("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,M7e)):n.icon&&n.icon.includes("feather")?(v(),T("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,L7e)):n.icon&&n.icon.includes("#")?(v(),T("p",P7e,j(n.icon.split("#")[1]),1)):(v(),T("i",F7e))],10,k7e),he($r,{name:"slide"},{default:ke(()=>[s.isMenuOpen?(v(),T("div",{key:0,class:"menu-list flex-grow",style:ht(s.menuPosition),ref:"menu"},[c("ul",U7e,[(v(!0),T(we,null,Be(n.commands,(i,a)=>(v(),T("li",{key:a,onClick:_e(l=>o.executeCommand(i),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==i.name?(v(),T("i",G7e)):i.icon&&!i.icon.includes("feather")&&!i.is_file?(v(),T("img",{key:1,src:i.icon,alt:i.name,class:"menu-icon"},null,8,q7e)):U("",!0),i.icon&&i.icon.includes("feather")&&!i.is_file?(v(),T("i",{key:2,"data-feather":i.icon.split(":")[1],class:"mr-2"},null,8,Y7e)):(v(),T("span",V7e)),c("span",null,j(i.name),1)],8,B7e))),128))])],4)):U("",!0)]),_:1})])}const lo=Ye(I7e,[["render",z7e]]),H7e={components:{InteractiveMenu:lo},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(){ve(()=>{Re.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 Xt(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?zn:this.model.icon},defaultImg(t){t.target.src=zn},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t=!1){this.onSelected(this,t),model.selected=!0,ve(()=>{Re.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){installing=!1,this.onCancelInstall(this)},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?"Uninstall":"Install",icon:"feather:settings",is_file:!1,value:this.toggleInstall},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return 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 Xt(this.speed)},total_size_computed(){return Xt(this.total_size)},downloaded_size_computed(){return Xt(this.downloaded_size)}},watch:{linkNotValid(){ve(()=>{Re.replace()})}}},$7e=["title"],W7e={key:0,class:"flex flex-row"},K7e={class:"max-w-[300px] overflow-x-auto"},Q7e={class:"flex gap-3 items-center grow"},j7e=["href"],Z7e=["src"],X7e={class:"flex-1 overflow-hidden"},J7e={class:"font-bold font-large text-lg truncate"},eYe={key:1,class:"flex items-center flex-row gap-2 my-1"},tYe={class:"flex grow items-center"},nYe=c("i",{"data-feather":"box",class:"w-5"},null,-1),rYe=c("span",{class:"sr-only"},"Custom model / local model",-1),sYe=[nYe,rYe],oYe=c("span",{class:"sr-only"},"Remove",-1),iYe={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"},aYe={class:"relative flex flex-col items-center justify-center flex-grow h-full"},lYe=c("div",{role:"status",class:"justify-center"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1),cYe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},dYe={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},uYe={class:"flex justify-between mb-1"},_Ye=c("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),pYe={class:"text-sm font-medium text-blue-700 dark:text-white"},mYe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},gYe={class:"flex justify-between mb-1"},fYe={class:"text-base font-medium text-blue-700 dark:text-white"},hYe={class:"text-sm font-medium text-blue-700 dark:text-white"},EYe={class:"flex flex-grow"},bYe={class:"flex flex-row flex-grow gap-3"},SYe={class:"p-2 text-center grow"},yYe={key:3},vYe={class:"flex flex-row items-center gap-3"},TYe=["src"],CYe={class:"font-bold font-large text-lg truncate"},RYe=c("div",{class:"grow"},null,-1),xYe={class:"flex items-center flex-row-reverse gap-2 my-1"},OYe={class:"flex flex-row items-center"},AYe={key:0,class:"text-base text-red-600 flex items-center mt-1"},NYe=c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),wYe=["title"],IYe={class:""},DYe={class:"flex flex-row items-center"},kYe=c("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),MYe=c("b",null,"Card: ",-1),LYe=["href","title"],PYe=c("div",{class:"grow"},null,-1),FYe=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),UYe=[FYe],BYe={class:"flex items-center"},GYe=c("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),qYe=c("b",null,"File size: ",-1),YYe={class:"flex items-center"},VYe=c("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),zYe=c("b",null,"License: ",-1),HYe={key:0,class:"flex items-center"},$Ye=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),WYe=c("b",null,"quantizer: ",-1),KYe=["href"],QYe={class:"flex items-center"},jYe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),ZYe=c("b",null,"Model creator: ",-1),XYe=["href"],JYe={class:"flex items-center"},eVe=c("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),tVe=c("b",null,"Release date: ",-1),nVe={class:"flex items-center"},rVe=c("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),sVe=c("b",null,"Category: ",-1),oVe=["href"],iVe={class:"flex items-center"},aVe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),lVe=c("b",null,"Hugging face rank: ",-1);function cVe(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["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[11]||(e[11]=_e(a=>o.toggleSelected(),["prevent"]))},[n.model.isCustomModel?(v(),T("div",W7e,[c("div",K7e,[c("div",Q7e,[c("a",{href:n.model.model_creator_link,target:"_blank"},[c("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Z7e)],8,j7e),c("div",X7e,[c("h3",J7e,j(n.model.name),1)])])])])):U("",!0),n.model.isCustomModel?(v(),T("div",eYe,[c("div",tYe,[c("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]=_e(()=>{},["stop"]))},sYe),xe(" Custom model ")]),c("div",null,[n.model.isInstalled?(v(),T("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=_e((...a)=>o.toggleInstall&&o.toggleInstall(...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"},[xe(" Uninstall "),oYe])):U("",!0)])])):U("",!0),s.installing?(v(),T("div",iYe,[c("div",aYe,[lYe,c("div",cYe,[c("div",dYe,[c("div",uYe,[_Ye,c("span",pYe,j(Math.floor(s.progress))+"%",1)]),c("div",mYe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht({width:s.progress+"%"})},null,4)]),c("div",gYe,[c("span",fYe,"Download speed: "+j(o.speed_computed)+"/s",1),c("span",hYe,j(o.downloaded_size_computed)+"/"+j(o.total_size_computed),1)])])]),c("div",EYe,[c("div",bYe,[c("div",SYe,[c("button",{onClick:e[3]||(e[3]=_e((...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 ")])])])])])):U("",!0),n.model.isCustomModel?U("",!0):(v(),T("div",yYe,[c("div",vYe,[c("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:Ae(["w-10 h-10 rounded-lg object-fill",s.linkNotValid?"grayscale":""])},null,42,TYe),c("h3",CYe,j(n.model.name),1),RYe,he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),c("div",xYe,[c("div",OYe,[s.linkNotValid?(v(),T("div",AYe,[NYe,xe(" Link is not valid ")])):U("",!0)])]),c("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[c("div",IYe,[c("div",DYe,[kYe,MYe,c("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=_e(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:s.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,LYe),PYe,c("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]=_e(a=>o.toggleCopyLink(),["stop"]))},UYe)]),c("div",BYe,[c("div",{class:Ae(["flex flex-shrink-0 items-center",s.linkNotValid?"text-red-600":""])},[GYe,qYe,xe(" "+j(o.fileSize),1)],2)]),c("div",YYe,[VYe,zYe,xe(" "+j(n.model.license),1)]),n.model.quantizer!="None"?(v(),T("div",HYe,[$Ye,WYe,c("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.quantizer),9,KYe)])):U("",!0),c("div",QYe,[jYe,ZYe,c("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.model_creator),9,XYe)]),c("div",JYe,[eVe,tVe,xe(" "+j(n.model.last_commit_time),1)]),c("div",nVe,[rVe,sVe,c("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.category),9,oVe)]),c("div",iVe,[aVe,lVe,c("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",rel:"noopener noreferrer",onClick:e[10]||(e[10]=_e(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},j(n.model.rank),1)])])],8,wYe)]))],10,$7e)}const dVe=Ye(H7e,[["render",cVe]]),uVe={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}}},_Ve={class:"p-4"},pVe={class:"flex items-center mb-4"},mVe=["src"],gVe={class:"text-lg font-semibold"},fVe=c("strong",null,"Author:",-1),hVe=c("strong",null,"Description:",-1),EVe=c("strong",null,"Category:",-1),bVe={key:0},SVe=c("strong",null,"Disclaimer:",-1),yVe=c("strong",null,"Conditioning Text:",-1),vVe=c("strong",null,"AI Prefix:",-1),TVe=c("strong",null,"User Prefix:",-1),CVe=c("strong",null,"Antiprompts:",-1);function RVe(t,e,n,r,s,o){return v(),T("div",_Ve,[c("div",pVe,[c("img",{src:s.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,mVe),c("h2",gVe,j(s.personalityName),1)]),c("p",null,[fVe,xe(" "+j(s.personalityAuthor),1)]),c("p",null,[hVe,xe(" "+j(s.personalityDescription),1)]),c("p",null,[EVe,xe(" "+j(s.personalityCategory),1)]),s.disclaimer?(v(),T("p",bVe,[SVe,xe(" "+j(s.disclaimer),1)])):U("",!0),c("p",null,[yVe,xe(" "+j(s.conditioningText),1)]),c("p",null,[vVe,xe(" "+j(s.aiPrefix),1)]),c("p",null,[TVe,xe(" "+j(s.userPrefix),1)]),c("div",null,[CVe,c("ul",null,[(v(!0),T(we,null,Be(s.antipromptsList,i=>(v(),T("li",{key:i.id},j(i.text),1))),128))])]),c("button",{onClick:e[0]||(e[0]=i=>s.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),s.editMode?(v(),T("button",{key:1,onClick:e[1]||(e[1]=(...i)=>o.commitChanges&&o.commitChanges(...i)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):U("",!0)])}const xVe=Ye(uVe,[["render",RVe]]),ms="/assets/logo-9d653710.svg",OVe="/",AVe={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function},components:{InteractiveMenu:lo},data(){return{isMounted:!1,name:this.personality.name}},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 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,ve(()=>{Re.replace()})},methods:{getImgUrl(){return OVe+this.personality.avatar},defaultImg(t){t.target.src=ms},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){ve(()=>{Re.replace()})}}},NVe=["title"],wVe={class:"flex flex-row items-center flex-shrink-0 gap-3"},IVe=["src"],DVe=c("i",{"data-feather":"clipboard",class:"w-5"},null,-1),kVe=[DVe],MVe={class:""},LVe={class:""},PVe={class:"flex items-center"},FVe=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),UVe=c("b",null,"Author: ",-1),BVe={class:"flex items-center"},GVe=c("i",{"data-feather":"git-commit",class:"w-5 m-1"},null,-1),qVe=c("b",null,"Version: ",-1),YVe={key:0,class:"flex items-center"},VVe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),zVe=c("b",null,"Languages: ",-1),HVe=["selected"],$Ve={key:1,class:"flex items-center"},WVe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),KVe=c("b",null,"Language: ",-1),QVe={class:"flex items-center"},jVe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),ZVe=c("b",null,"Category: ",-1),XVe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),JVe=["title","innerHTML"],eze={class:"rounded bg-blue-300"},tze=c("i",{"data-feather":"check"},null,-1),nze=c("span",{class:"sr-only"},"Select",-1),rze=[tze,nze],sze=c("i",{"data-feather":"send",class:"w-5"},null,-1),oze=c("span",{class:"sr-only"},"Talk",-1),ize=[sze,oze];function aze(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",o.selected_computed?"border-2 border-primary-light":"border-transparent",s.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[c("div",{class:Ae(n.personality.installed?"":"border-red-500")},[c("div",wVe,[c("img",{onClick:e[0]||(e[0]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),ref:"imgElement",src:o.getImgUrl(),onError:e[1]||(e[1]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,IVe),c("h3",{onClick:e[2]||(e[2]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},j(n.personality.name),1),c("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[3]||(e[3]=_e(a=>o.toggleCopyLink(),["stop"]))},kVe)]),c("div",MVe,[c("div",LVe,[c("div",PVe,[FVe,UVe,xe(" "+j(n.personality.author),1)]),c("div",BVe,[GVe,qVe,xe(" "+j(n.personality.version),1)]),n.personality.languages&&n.select_language?(v(),T("div",YVe,[VVe,zVe,ce(c("select",{id:"languages","onUpdate:modelValue":e[4]||(e[4]=a=>n.personality.language=a),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"},[(v(!0),T(we,null,Be(n.personality.languages,(a,l)=>(v(),T("option",{key:l,selected:a==n.personality.languages[0]},j(a),9,HVe))),128))],512),[[Kt,n.personality.language]])])):U("",!0),n.personality.language?(v(),T("div",$Ve,[WVe,KVe,xe(" "+j(n.personality.language),1)])):U("",!0),c("div",QVe,[jVe,ZVe,xe(" "+j(n.personality.category),1)])]),XVe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.personality.description,innerHTML:n.personality.description},null,8,JVe)]),c("div",eze,[s.isMounted?(v(),T("button",{key:0,type:"button",title:"Select",onClick:[e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),e[6]||(e[6]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},rze)):U("",!0),s.isMounted?(v(),T("button",{key:1,type:"button",title:"Talk",onClick:[e[7]||(e[7]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),e[8]||(e[8]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},ize)):U("",!0),he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,NVe)}const mT=Ye(AVe,[["render",aze]]);const lze={props:{code:String},data(){return{evaluatedCode:"",componentKey:0}},watch:{code:{handler(t){console.log("Code changed"),this.evaluateScriptTags(t),this.componentKey++},immediate:!0}},methods:{evaluateScriptTags(t){const e=document.createElement("div");e.innerHTML=t,e.querySelectorAll("script").forEach(r=>{const s=document.createElement("script");s.textContent=r.textContent,document.body.appendChild(s),document.body.removeChild(s)}),this.evaluatedCode=e.innerHTML,console.log("evaluated code: "+this.evaluatedCode)}}},cze=["innerHTML"];function dze(t,e,n,r,s,o){return v(),T("div",{innerHTML:s.evaluatedCode,key:s.componentKey},null,8,cze)}const gT=Ye(lze,[["render",dze]]),uze="/",_ze={components:{DynamicUIRenderer:gT},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){ve(()=>{Re.replace()})},methods:{getImgUrl(){return uze+this.binding.icon},defaultImg(t){t.target.src=ms},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(){ve(()=>{Re.replace()})}}},pze=["title"],mze={class:"flex flex-row items-center gap-3"},gze=["src"],fze={class:"font-bold font-large text-lg truncate"},hze=c("div",{class:"grow"},null,-1),Eze={class:"flex-none gap-1"},bze=c("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),Sze=c("span",{class:"sr-only"},"Help",-1),yze=[bze,Sze],vze={class:"flex items-center flex-row-reverse gap-2 my-1"},Tze=c("span",{class:"sr-only"},"Click to install",-1),Cze=c("span",{class:"sr-only"},"Reinstall",-1),Rze=c("span",{class:"sr-only"},"UnInstall",-1),xze=c("span",{class:"sr-only"},"Settings",-1),Oze={class:""},Aze={class:""},Nze={class:"flex items-center"},wze=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Ize=c("b",null,"Author: ",-1),Dze={class:"flex items-center"},kze=c("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),Mze=c("b",null,"Folder: ",-1),Lze={class:"flex items-center"},Pze=c("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Fze=c("b",null,"Version: ",-1),Uze={class:"flex items-center"},Bze=c("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),Gze=c("b",null,"Link: ",-1),qze=["href"],Yze=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),Vze=["title","innerHTML"];function zze(t,e,n,r,s,o){const i=Pe("DynamicUIRenderer");return v(),T("div",{class:Ae(["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[7]||(e[7]=_e((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[c("div",null,[c("div",mze,[c("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,gze),c("h3",fze,j(n.binding.name),1),hze,c("div",Eze,[n.selected?(v(),T("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},yze)):U("",!0)])]),c("div",vze,[n.binding.installed?U("",!0):(v(),T("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=_e((...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"},[xe(" Install "),Tze])),n.binding.installed?(v(),T("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=_e((...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"},[xe(" Reinstall "),Cze])):U("",!0),n.binding.installed?(v(),T("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=_e((...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"},[xe(" Uninstall "),Rze])):U("",!0),n.selected?(v(),T("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=_e((...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"},[xe(" Settings "),xze])):U("",!0)]),n.binding.ui?(v(),rt(i,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):U("",!0),c("div",Oze,[c("div",Aze,[c("div",Nze,[wze,Ize,xe(" "+j(n.binding.author),1)]),c("div",Dze,[kze,Mze,xe(" "+j(n.binding.folder),1)]),c("div",Lze,[Pze,Fze,xe(" "+j(n.binding.version),1)]),c("div",Uze,[Bze,Gze,c("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},j(n.binding.link),9,qze)])]),Yze,c("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,Vze)])])],10,pze)}const Hze=Ye(_ze,[["render",zze]]),$ze={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})}}},Wze={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},Kze={class:"relative w-full max-w-md max-h-full"},Qze={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},jze=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),Zze=c("span",{class:"sr-only"},"Close modal",-1),Xze=[jze,Zze],Jze={class:"p-4 text-center"},eHe=c("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"},[c("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),tHe={class:"p-4 text-center mx-auto mb-4"},nHe=c("label",{class:"mr-2"},"Model path",-1);function rHe(t,e,n,r,s,o){return s.show?(v(),T("div",Wze,[c("div",Kze,[c("div",Qze,[c("button",{type:"button",onClick:e[0]||(e[0]=i=>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"},Xze),c("div",Jze,[eHe,c("div",tHe,[nHe,ce(c("input",{"onUpdate:modelValue":e[1]||(e[1]=i=>s.model_path=i),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[De,s.model_path]])]),c("button",{onClick:e[2]||(e[2]=i=>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 "),c("button",{onClick:e[3]||(e[3]=i=>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")])])])])):U("",!0)}const sHe=Ye($ze,[["render",rHe]]),oHe={setup(){return{}},name:"UniversalForm",data(){return{show:!1,resolve:null,controls_array:[],title:"Universal form",ConfirmButtonText:"Submit",DenyButtonText:"Cancel"}},mounted(){ve(()=>{Re.replace()})},methods:{hide(t){this.show=!1,this.resolve&&t&&(this.resolve(this.controls_array),this.resolve=null)},showForm(t,e,n,r){this.ConfirmButtonText=n||this.ConfirmButtonText,this.DenyButtonText=r||this.DenyButtonText;for(let s=0;s{this.controls_array=t,this.show=!0,this.title=e||this.title,this.resolve=s,console.log("show form",this.controls_array)})}},watch:{controls_array:{deep:!0,handler(t){t.forEach(e=>{e.type==="int"?e.value=parseInt(e.value):e.type==="float"&&(e.value=parseFloat(e.value))})}},show(){ve(()=>{Re.replace()})}}},iHe={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 p-4"},aHe={class:"relative w-full max-w-md"},lHe={class:"flex flex-col rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel duration-150 shadow-lg max-h-screen"},cHe={class:"flex flex-row flex-grow items-center m-2 p-1"},dHe={class:"grow flex items-center"},uHe=c("i",{"data-feather":"sliders",class:"mr-2 flex-shrink-0"},null,-1),_He={class:"text-lg font-semibold select-none mr-2"},pHe={class:"items-end"},mHe=c("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[c("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),gHe=c("span",{class:"sr-only"},"Close form modal",-1),fHe=[mHe,gHe],hHe={class:"flex flex-col relative no-scrollbar overflow-y-scroll p-2"},EHe={class:"px-2"},bHe={key:0},SHe={key:0},yHe={class:"text-base font-semibold"},vHe={key:0,class:"relative inline-flex"},THe=["onUpdate:modelValue"],CHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),RHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},xHe=["onUpdate:modelValue"],OHe={key:1},AHe={class:"text-base font-semibold"},NHe={key:0,class:"relative inline-flex"},wHe=["onUpdate:modelValue"],IHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),DHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},kHe=["onUpdate:modelValue"],MHe=["value","selected"],LHe={key:1},PHe={class:"text-base font-semibold"},FHe={key:0,class:"relative inline-flex"},UHe=["onUpdate:modelValue"],BHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),GHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},qHe=["onUpdate:modelValue"],YHe=["onUpdate:modelValue","min","max"],VHe={key:2},zHe={class:"text-base font-semibold"},HHe={key:0,class:"relative inline-flex"},$He=["onUpdate:modelValue"],WHe=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),KHe={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},QHe=["onUpdate:modelValue"],jHe=["onUpdate:modelValue","min","max"],ZHe={key:3},XHe={class:"mb-2 relative flex items-center gap-2"},JHe={for:"default-checkbox",class:"text-base font-semibold"},e$e=["onUpdate:modelValue"],t$e={key:0,class:"relative inline-flex"},n$e=["onUpdate:modelValue"],r$e=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),s$e={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},o$e={key:4},i$e={class:"text-base font-semibold"},a$e={key:0,class:"relative inline-flex"},l$e=["onUpdate:modelValue"],c$e=c("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary"},[c("i",{"data-feather":"help-circle",class:"w-5 h-5"})],-1),d$e={key:0,class:"text-sm font-normal text-gray-700 dark:text-gray-400 mb-2"},u$e=["onUpdate:modelValue"],_$e=c("hr",{class:"h-px my-4 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),p$e={class:"flex flex-row flex-grow gap-3"},m$e={class:"p-2 text-center grow"};function g$e(t,e,n,r,s,o){return s.show?(v(),T("div",iHe,[c("div",aHe,[c("div",lHe,[c("div",cHe,[c("div",dHe,[uHe,c("h3",_He,j(s.title),1)]),c("div",pHe,[c("button",{type:"button",onClick:e[0]||(e[0]=_e(i=>o.hide(!1),["stop"])),title:"Close",class:"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"},fHe)])]),c("div",hHe,[(v(!0),T(we,null,Be(s.controls_array,(i,a)=>(v(),T("div",EHe,[i.type=="str"?(v(),T("div",bHe,[i.options?U("",!0):(v(),T("div",SHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",yHe,j(i.name)+": ",1),i.help?(v(),T("label",vHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,THe),[[Je,i.isHelp]]),CHe])):U("",!0)],2),i.isHelp?(v(),T("p",RHe,j(i.help),1)):U("",!0),ce(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 string"},null,8,xHe),[[De,i.value]])])),i.options?(v(),T("div",OHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",AHe,j(i.name)+": ",1),i.help?(v(),T("label",NHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,wHe),[[Je,i.isHelp]]),IHe])):U("",!0)],2),i.isHelp?(v(),T("p",DHe,j(i.help),1)):U("",!0),ce(c("select",{"onUpdate:modelValue":l=>i.value=l,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"},[(v(!0),T(we,null,Be(i.options,l=>(v(),T("option",{value:l,selected:i.value===l},j(l),9,MHe))),256))],8,kHe),[[Kt,i.value]])])):U("",!0)])):U("",!0),i.type=="int"?(v(),T("div",LHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",PHe,j(i.name)+": ",1),i.help?(v(),T("label",FHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,UHe),[[Je,i.isHelp]]),BHe])):U("",!0)],2),i.isHelp?(v(),T("p",GHe,j(i.help),1)):U("",!0),ce(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,step:"1",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 number"},null,8,qHe),[[De,i.value]]),i.min!=null&&i.max!=null?ce((v(),T("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"1",class:"flex-none h-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,8,YHe)),[[De,i.value]]):U("",!0)])):U("",!0),i.type=="float"?(v(),T("div",VHe,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",zHe,j(i.name)+": ",1),i.help?(v(),T("label",HHe,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,$He),[[Je,i.isHelp]]),WHe])):U("",!0)],2),i.isHelp?(v(),T("p",KHe,j(i.help),1)):U("",!0),ce(c("input",{type:"number","onUpdate:modelValue":l=>i.value=l,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 number"},null,8,QHe),[[De,i.value]]),i.min!=null&&i.max!=null?ce((v(),T("input",{key:1,type:"range","onUpdate:modelValue":l=>i.value=l,min:i.min,max:i.max,step:"0.1",class:"flex-none h-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,8,jHe)),[[De,i.value]]):U("",!0)])):U("",!0),i.type=="bool"?(v(),T("div",ZHe,[c("div",XHe,[c("label",JHe,j(i.name)+": ",1),ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.value=l,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-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"},null,8,e$e),[[Je,i.value]]),i.help?(v(),T("label",t$e,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,n$e),[[Je,i.isHelp]]),r$e])):U("",!0)]),i.isHelp?(v(),T("p",s$e,j(i.help),1)):U("",!0)])):U("",!0),i.type=="list"?(v(),T("div",o$e,[c("label",{class:Ae(["mb-2 relative flex items-center gap-2 text-sm font-medium text-gray-900 dark:text-white select-none",i.help?"cursor-pointer ":""])},[c("div",i$e,j(i.name)+": ",1),i.help?(v(),T("label",a$e,[ce(c("input",{type:"checkbox","onUpdate:modelValue":l=>i.isHelp=l,class:"sr-only peer"},null,8,l$e),[[Je,i.isHelp]]),c$e])):U("",!0)],2),i.isHelp?(v(),T("p",d$e,j(i.help),1)):U("",!0),ce(c("input",{type:"text","onUpdate:modelValue":l=>i.value=l,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 comma separated values"},null,8,u$e),[[De,i.value]])])):U("",!0),_$e]))),256)),c("div",p$e,[c("div",m$e,[c("button",{onClick:e[1]||(e[1]=_e(i=>o.hide(!0),["stop"])),type:"button",class:"mr-2 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 sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},j(s.ConfirmButtonText),1),c("button",{onClick:e[2]||(e[2]=_e(i=>o.hide(!1),["stop"])),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-11 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"},j(s.DenyButtonText),1)])])])])])])):U("",!0)}const ea=Ye(oHe,[["render",g$e]]);const f$e={props:{show:{type:Boolean,default:!1,required:!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 console.log("choice:",t),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){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"},toggleInput(){this.showInput=!this.showInput},addNewFilename(){const t=this.newFilename.trim();t!==""&&(this.choices.push(t),this.newFilename="",this.selectChoice(t)),this.showInput=!1},removeChoice(t,e){this.choices.splice(e,1),t===this.selectedChoice&&(this.selectedChoice=null),this.$emit("choice-removed",t)}}},h$e={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"},E$e={class:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96"},b$e={class:"text-xl font-semibold mb-4"},S$e={class:"h-48 overflow-y-auto"},y$e=["onClick"],v$e={class:"font-bold"},T$e=c("br",null,null,-1),C$e={key:0,class:"text-xs text-gray-500"},R$e=["onClick"],x$e={key:0,class:"mt-4"},O$e={class:"flex justify-end mt-4"},A$e=["disabled"];function N$e(t,e,n,r,s,o){return v(),rt($r,{name:"fade"},{default:ke(()=>[n.show?(v(),T("div",h$e,[c("div",E$e,[c("h2",b$e,j(n.title),1),c("div",S$e,[c("ul",null,[(v(!0),T(we,null,Be(n.choices,(i,a)=>(v(),T("li",{key:a,onClick:l=>o.selectChoice(i),class:Ae([{"selected-choice":i===s.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700"])},[c("span",v$e,j(o.displayName(i)),1),T$e,i.size?(v(),T("span",C$e,j(o.formatSize(i.size)),1)):U("",!0),n.can_remove?(v(),T("button",{key:1,onClick:l=>o.removeChoice(i,a),class:"ml-2 text-red-500 hover:text-red-600"}," X ",8,R$e)):U("",!0)],10,y$e))),128))])]),s.showInput?(v(),T("div",x$e,[ce(c("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>s.newFilename=i),placeholder:"Enter a filename",class:"border border-gray-300 p-2 rounded-lg w-full"},null,512),[[De,s.newFilename]]),c("button",{onClick:e[1]||(e[1]=(...i)=>o.addNewFilename&&o.addNewFilename(...i)),class:"mt-2 py-2 px-4 bg-green-500 hover:bg-green-600 text-white rounded-lg transition duration-300"}," Add ")])):U("",!0),c("div",O$e,[c("button",{onClick:e[2]||(e[2]=(...i)=>o.closeDialog&&o.closeDialog(...i)),class:"py-2 px-4 mr-2 bg-red-500 hover:bg-red-600 text-white rounded-lg transition duration-300"}," Cancel "),c("button",{onClick:e[3]||(e[3]=(...i)=>o.validateChoice&&o.validateChoice(...i)),class:Ae([{"bg-gray-400 cursor-not-allowed":!s.selectedChoice,"bg-blue-500 hover:bg-blue-600":s.selectedChoice,"text-white":s.selectedChoice,"text-gray-500":!s.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!s.selectedChoice}," Validate ",10,A$e),c("button",{onClick:e[4]||(e[4]=(...i)=>o.toggleInput&&o.toggleInput(...i)),class:"py-2 px-4 ml-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition duration-300"}," Add New ")])])])):U("",!0)]),_:1})}const Tp=Ye(f$e,[["render",N$e]]),w$e={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:0}},data(){return{selectedValue:this.defaultValue}},methods:{handleRadioChange(t){this.selectedValue!==null&&this.$emit("radio-selected",this.selectedValue,t)}}},I$e={class:"flex space-x-4"},D$e=["value","onChange"],k$e={class:"text-gray-700"};function M$e(t,e,n,r,s,o){return v(),T("div",I$e,[(v(!0),T(we,null,Be(n.radioOptions,(i,a)=>(v(),T("label",{key:i.value,class:"flex items-center space-x-2"},[ce(c("input",{type:"radio",value:i.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.selectedValue=l),onChange:l=>o.handleRadioChange(a),class:"text-blue-500 focus:ring-2 focus:ring-blue-200"},null,40,D$e),[[P1,s.selectedValue]]),c("span",k$e,j(i.label),1)]))),128))])}const L$e=Ye(w$e,[["render",M$e]]),P$e="/",F$e={props:{extension:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onReinstall:Function,onSettings:Function},components:{InteractiveMenu:lo},data(){return{isMounted:!1,name:this.extension.name}},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 this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.extension.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.extension.isMounted,ve(()=>{Re.replace()})},methods:{getImgUrl(){return P$e+this.extension.avatar},defaultImg(t){t.target.src=ms},toggleTalk(){this.onTalk(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this)},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){ve(()=>{Re.replace()})}}},U$e=["title"],B$e={class:"flex flex-row items-center flex-shrink-0 gap-3"},G$e=["src"],q$e={class:""},Y$e={class:""},V$e={class:"flex items-center"},z$e=c("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),H$e=c("b",null,"Author: ",-1),$$e={class:"flex items-center"},W$e=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),K$e=c("b",null,"Based on: ",-1),Q$e={key:0,class:"flex items-center"},j$e=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),Z$e=c("b",null,"Languages: ",-1),X$e=["selected"],J$e={key:1,class:"flex items-center"},eWe=c("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),tWe=c("b",null,"Language: ",-1),nWe={class:"flex items-center"},rWe=c("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),sWe=c("b",null,"Category: ",-1),oWe=c("div",{class:"flex items-center"},[c("i",{"data-feather":"info",class:"w-5 m-1"}),c("b",null,"Description: "),c("br")],-1),iWe=["title","innerHTML"],aWe={class:"rounded bg-blue-300"},lWe=c("i",{"data-feather":"check"},null,-1),cWe=c("span",{class:"sr-only"},"Select",-1),dWe=[lWe,cWe],uWe=c("i",{"data-feather":"send",class:"w-5"},null,-1),_We=c("span",{class:"sr-only"},"Talk",-1),pWe=[uWe,_We];function mWe(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return v(),T("div",{class:Ae(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",o.selected_computed?"border-2 border-primary-light":"border-transparent",s.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.extension.installed?"":"Not installed"},[c("div",{class:Ae(n.extension.installed?"":"border-red-500")},[c("div",B$e,[c("img",{onClick:e[0]||(e[0]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),ref:"imgElement",src:o.getImgUrl(),onError:e[1]||(e[1]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer"},null,40,G$e),c("h3",{onClick:e[2]||(e[2]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer"},j(n.extension.name),1)]),c("div",q$e,[c("div",Y$e,[c("div",V$e,[z$e,H$e,xe(" "+j(n.extension.author),1)]),c("div",$$e,[W$e,K$e,xe(" "+j(n.extension.based_on),1)]),n.extension.languages&&n.select_language?(v(),T("div",Q$e,[j$e,Z$e,ce(c("select",{id:"languages","onUpdate:modelValue":e[3]||(e[3]=a=>n.extension.language=a),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"},[(v(!0),T(we,null,Be(n.extension.languages,(a,l)=>(v(),T("option",{key:l,selected:a==n.extension.languages[0]},j(a),9,X$e))),128))],512),[[Kt,n.extension.language]])])):U("",!0),n.extension.language?(v(),T("div",J$e,[eWe,tWe,xe(" "+j(n.extension.language),1)])):U("",!0),c("div",nWe,[rWe,sWe,xe(" "+j(n.extension.category),1)])]),oWe,c("p",{class:"mx-1 opacity-80 h-20 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",title:n.extension.description,innerHTML:n.extension.description},null,8,iWe)]),c("div",aWe,[s.isMounted?(v(),T("button",{key:0,type:"button",title:"Select",onClick:[e[4]||(e[4]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),e[5]||(e[5]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},dWe)):U("",!0),s.isMounted?(v(),T("button",{key:1,type:"button",title:"Talk",onClick:[e[6]||(e[6]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),e[7]||(e[7]=_e(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},pWe)):U("",!0),he(i,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,U$e)}const gWe=Ye(F$e,[["render",mWe]]),fWe="/assets/gpu-df72bf63.svg";const hWe="/";Te.defaults.baseURL="/";const EWe={components:{AddModelDialog:sHe,MessageBox:pT,YesNoDialog:w7e,ModelEntry:dVe,PersonalityViewer:xVe,Toast:Sr,PersonalityEntry:mT,BindingEntry:Hze,UniversalForm:ea,ChoiceDialog:Tp,Card:ao,RadioOptions:L$e,ExtensionEntry:gWe},data(){return{imgModel:zn,SVGGPU:fWe,models_zoo:[],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}],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",extension_category:"bound_extensions",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],extensionsFiltererd:[],collapsedArr:[],all_collapsed:!0,minconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,ezc_collapsed:!0,mep_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:hWe,searchPersonality:"",searchExtension:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchExtensionInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){Ne.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{async modelsZooToggleCollapse(){this.mzc_collapsed=!this.mzc_collapsed,!this.mzc_collapsed&&(this.modelsZoo==null||this.modelsZoo.length==0)&&(console.log("Refreshing models"),await this.$store.dispatch("refreshConfig"),this.models_zoo=[],this.refreshModelsZoo())},async selectSortOption(t){this.$store.state.sort_type=t,this.modelsFiltered=this.models_zoo,console.log(`Selected sorting:${t}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(this.audioVoices=speechSynthesis.getVoices(),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(t){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let e=this.currenModelToInstall;if(e.linkNotValid){e.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let n="https://huggingface.co/"+e.model.quantizer+"/"+e.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:n},console.log("installing...",this.addModel);const r=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(this.addModel=s,console.log("Progress",s),e.progress=s.progress,e.speed=s.speed,e.total_size=s.total_size,e.downloaded_size=s.downloaded_size,e.start_time=s.start_time,e.installing=!0,e.progress==100){const o=this.models_zoo.findIndex(i=>i.name===e.model.name);this.models_zoo[o].isInstalled=!0,this.showProgress=!1,e.installing=!1,console.log("Received succeeded"),Ne.off("install_progress",r),console.log("Installed successfully"),this.$refs.toast.showToast(`Model: `+e.model.name+` installed!`,4,!0),this.$store.dispatch("refreshDiskUsage")}}else Ne.off("install_progress",r),console.log("Install failed"),e.installing=!1,this.showProgress=!1,console.error("Installation failed:",s.error),this.$refs.toast.showToast(`Model: `+e.model.name+` @@ -153,11 +153,11 @@ Response: Error: `+e.error,4,!1);this.isLoading=!1},async remountExtension(t){await this.unmountExtension(t),await this.mountExtension(t)},onExtensionReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log(t),Te.post("/reinstall_extension",{name:t.extension.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_extension",e),e.data.status?this.$refs.toast.showToast("Extension reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall extension",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,Te.post("/reinstall_personality",{name:t.personality.path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=ms},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){clearTimeout(this.searchModelTimer),this.searchModel&&(this.searchModelInProgress=!0,setTimeout(this.filterModels,this.searchModelTimer))}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything()},activated(){},computed:{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}},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"/user_infos/"+this.$store.state.config.user_avatar},set(t){this.$store.state.config.user_avatar=t}},enable_gpu:{get(){return this.$store.state.config.enable_gpu},set(t){this.$store.state.config.enable_gpu=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}},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}},db_path:{get(){return this.$store.state.config.db_path},set(t){this.$store.state.config.db_path=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)}},mountedExtensions:{get(){return console.log("this.$store.state.mountedExtensions:",this.$store.state.mountedExtensions),this.$store.state.mountedExtensions},set(t){this.$store.commit("setActiveExtensions",t)}},bindingsArr:{get(){return this.$store.state.bindingsArr},set(t){this.$store.commit("setBindingsArr",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)},imgBinding(){if(this.isMounted)try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return zn}},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const t=this.bindingsArr.findIndex(e=>e.folder===this.configFile.binding_name);if(t>-1)return this.bindingsArr[t].name},active_pesonality(){if(!this.isMounted)return;const t=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);if(t>-1)return this.personalities[t].name},speed_computed(){return Xt(this.addModel.speed)},total_size_computed(){return Xt(this.addModel.total_size)},downloaded_size_computed(){return Xt(this.addModel.downloaded_size)}},watch:{bec_collapsed(){ve(()=>{Re.replace()})},pc_collapsed(){ve(()=>{Re.replace()})},mc_collapsed(){ve(()=>{Re.replace()})},sc_collapsed(){ve(()=>{Re.replace()})},showConfirmation(){ve(()=>{Re.replace()})},mzl_collapsed(){ve(()=>{Re.replace()})},pzl_collapsed(){ve(()=>{Re.replace()})},bzl_collapsed(){ve(()=>{Re.replace()})},all_collapsed(t){this.collapseAll(t),ve(()=>{Re.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,ve(()=>{Re.replace()})},isLoading(){ve(()=>{Re.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},searchModel(t){t==""&&this.filterModels()},mzdc_collapsed(){ve(()=>{Re.replace()})}},async beforeRouteLeave(t){if(await this.$router.isReady(),this.settingsChanged)return await this.$refs.yesNoDialog.askQuestion(`Did You forget to apply changes? -You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},ie=t=>(hr("data-v-feda1672"),t=t(),Er(),t),EWe={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},bWe={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},SWe={key:0,class:"flex gap-3 flex-1 items-center duration-75"},yWe=ie(()=>c("i",{"data-feather":"x"},null,-1)),vWe=[yWe],TWe=ie(()=>c("i",{"data-feather":"check"},null,-1)),CWe=[TWe],RWe={key:1,class:"flex gap-3 flex-1 items-center"},xWe=ie(()=>c("i",{"data-feather":"save"},null,-1)),OWe=[xWe],AWe=ie(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),NWe=[AWe],wWe=ie(()=>c("i",{"data-feather":"list"},null,-1)),IWe=[wWe],DWe={class:"flex gap-3 flex-1 items-center justify-end"},kWe=ie(()=>c("i",{"data-feather":"trash-2"},null,-1)),MWe=[kWe],LWe=ie(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),PWe=[LWe],FWe=ie(()=>c("i",{"data-feather":"arrow-up-circle"},null,-1)),UWe={key:0},BWe=ie(()=>c("i",{"data-feather":"alert-circle"},null,-1)),GWe=[BWe],qWe={class:"flex gap-3 items-center"},YWe={key:0,class:"flex gap-3 items-center"},VWe=ie(()=>c("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),zWe=ie(()=>c("i",{"data-feather":"check"},null,-1)),HWe=[zWe],$We={key:1,role:"status"},WWe=ie(()=>c("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"},[c("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"}),c("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)),KWe=ie(()=>c("span",{class:"sr-only"},"Loading...",-1)),QWe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},jWe={class:"flex flex-row p-3"},ZWe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),XWe=[ZWe],JWe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),eKe=[JWe],tKe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),nKe=ie(()=>c("div",{class:"mr-2"},"|",-1)),rKe={class:"text-base font-semibold cursor-pointer select-none items-center"},sKe={class:"flex gap-2 items-center"},oKe={key:0},iKe={class:"flex gap-2 items-center"},aKe=["src"],lKe={class:"font-bold font-large text-lg"},cKe={key:1},dKe={class:"flex gap-2 items-center"},uKe=["src"],_Ke={class:"font-bold font-large text-lg"},pKe=ie(()=>c("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),mKe={class:"font-bold font-large text-lg"},gKe=ie(()=>c("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),fKe={class:"font-bold font-large text-lg"},hKe={class:"mb-2"},EKe=ie(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[c("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"})]),xe(" CPU Ram usage: ")],-1)),bKe={class:"flex flex-col mx-2"},SKe=ie(()=>c("b",null,"Avaliable ram: ",-1)),yKe=ie(()=>c("b",null,"Ram usage: ",-1)),vKe={class:"p-2"},TKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},CKe={class:"mb-2"},RKe=ie(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),xe(" Disk usage: ")],-1)),xKe={class:"flex flex-col mx-2"},OKe=ie(()=>c("b",null,"Avaliable disk space: ",-1)),AKe=ie(()=>c("b",null,"Disk usage: ",-1)),NKe={class:"p-2"},wKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},IKe={class:"mb-2"},DKe={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},kKe=["src"],MKe={class:"flex flex-col mx-2"},LKe=ie(()=>c("b",null,"Model: ",-1)),PKe=ie(()=>c("b",null,"Avaliable vram: ",-1)),FKe=ie(()=>c("b",null,"GPU usage: ",-1)),UKe={class:"p-2"},BKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},GKe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},qKe={class:"flex flex-row p-3"},YKe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),VKe=[YKe],zKe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),HKe=[zKe],$Ke=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),WKe={class:"flex flex-col mb-2 px-3 pb-2"},KKe={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"},QKe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),jKe={style:{width:"100%"}},ZKe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),XKe={style:{width:"100%"}},JKe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),eQe={style:{width:"100%"}},tQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),nQe={class:"flex flex-row"},rQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_gpu",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable GPU:")],-1)),sQe={class:"text-center items-center"},oQe={class:"flex flex-row"},iQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),aQe={class:"flex flex-row"},lQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),cQe={class:"flex flex-row"},dQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),uQe={class:"flex flex-row"},_Qe={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"},pQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),mQe={style:{width:"100%"}},gQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),fQe={style:{width:"100%"}},hQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),EQe={style:{width:"100%"}},bQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),SQe={style:{width:"100%"}},yQe={for:"avatar-upload"},vQe=["src"],TQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),CQe={class:"flex flex-row"},RQe={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"},xQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),OQe={class:"flex flex-row"},AQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_discussions_history",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate discussion vectorization:")],-1)),NQe={class:"flex flex-row"},wQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),IQe={class:"flex flex-row"},DQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate data Vectorization:")],-1)),kQe={class:"flex flex-row"},MQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),LQe={class:"flex flex-row"},PQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),FQe=ie(()=>c("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),UQe=ie(()=>c("option",{value:"model_embedding"},"Model Embedding",-1)),BQe=[FQe,UQe],GQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),qQe=ie(()=>c("option",{value:"PCA"},"PCA",-1)),YQe=ie(()=>c("option",{value:"TSNE"},"TSNE",-1)),VQe=[qQe,YQe],zQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("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)),HQe={class:"flex flex-row"},$Qe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),WQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),KQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),QQe={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"},jQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),ZQe={class:"flex flex-row"},XQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),JQe={class:"flex flex-row"},eje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),tje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),nje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),rje=["value"],sje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),oje=["value"],ije={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},aje={class:"flex flex-row p-3"},lje=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),cje=[lje],dje=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),uje=[dje],_je=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),pje={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},mje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),gje={key:1,class:"mr-2"},fje={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},hje={class:"flex gap-1 items-center"},Eje=["src"],bje={class:"font-bold font-large text-lg line-clamp-1"},Sje={key:0,class:"mb-2"},yje={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},vje=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),Tje=[vje],Cje=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Rje=[Cje],xje={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Oje={class:"flex flex-row p-3"},Aje=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Nje=[Aje],wje=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Ije=[wje],Dje=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),kje={class:"flex flex-row items-center"},Mje={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Lje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Pje={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Fje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Uje={key:2,class:"mr-2"},Bje={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},Gje={class:"flex gap-1 items-center"},qje=["src"],Yje={class:"font-bold font-large text-lg line-clamp-1"},Vje={class:"mx-2 mb-4"},zje={class:"relative"},Hje={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},$je={key:0},Wje=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Kje=[Wje],Qje={key:1},jje=ie(()=>c("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"},[c("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)),Zje=[jje],Xje=ie(()=>c("label",{for:"only_installed"},"Show only installed models",-1)),Jje=ie(()=>c("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)),eZe={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},tZe=ie(()=>c("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"},[c("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"}),c("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)),nZe=ie(()=>c("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),rZe=[tZe,nZe],sZe={key:1},oZe={key:0,class:"mb-2"},iZe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},aZe={key:2},lZe={key:0,class:"mb-2"},cZe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},dZe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),uZe=[dZe],_Ze=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),pZe=[_Ze],mZe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},gZe={class:"flex flex-row p-3"},fZe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),hZe=[fZe],EZe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),bZe=[EZe],SZe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Add models for binding",-1)),yZe={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},vZe=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),TZe={key:1,class:"mr-2"},CZe={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},RZe={class:"flex gap-1 items-center"},xZe=["src"],OZe={class:"font-bold font-large text-lg line-clamp-1"},AZe={class:"mb-2"},NZe={class:"p-2"},wZe={class:"mb-3"},IZe=ie(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),DZe={key:0},kZe={class:"mb-3"},MZe=ie(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),LZe={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},PZe=ie(()=>c("div",{role:"status",class:"justify-center"},null,-1)),FZe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},UZe={class:"w-full p-2"},BZe={class:"flex justify-between mb-1"},GZe=G_(' Downloading Loading...',1),qZe={class:"text-sm font-medium text-blue-700 dark:text-white"},YZe=["title"],VZe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},zZe={class:"flex justify-between mb-1"},HZe={class:"text-base font-medium text-blue-700 dark:text-white"},$Ze={class:"text-sm font-medium text-blue-700 dark:text-white"},WZe={class:"flex flex-grow"},KZe={class:"flex flex-row flex-grow gap-3"},QZe={class:"p-2 text-center grow"},jZe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},ZZe={class:"flex flex-row p-3 items-center"},XZe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),JZe=[XZe],eXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),tXe=[eXe],nXe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),rXe={key:0,class:"mr-2"},sXe={class:"mr-2 font-bold font-large text-lg line-clamp-1"},oXe={key:1,class:"mr-2"},iXe={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},aXe={key:0,class:"flex -space-x-4 items-center"},lXe={class:"group items-center flex flex-row"},cXe=["onClick"],dXe=["src","title"],uXe=["onClick"],_Xe=ie(()=>c("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),pXe=[_Xe],mXe={class:"mx-2 mb-4"},gXe=ie(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),fXe={class:"relative"},hXe={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},EXe={key:0},bXe=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),SXe=[bXe],yXe={key:1},vXe=ie(()=>c("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"},[c("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)),TXe=[vXe],CXe={key:0,class:"mx-2 mb-4"},RXe={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},xXe=["selected"],OXe={key:0,class:"mb-2"},AXe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},NXe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),wXe=[NXe],IXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),DXe=[IXe],kXe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},MXe={class:"flex flex-row p-3 items-center"},LXe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),PXe=[LXe],FXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),UXe=[FXe],BXe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),GXe={key:0,class:"mr-2"},qXe={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},YXe={key:0,class:"flex -space-x-4 items-center"},VXe={class:"group items-center flex flex-row"},zXe=["onClick"],HXe=["src","title"],$Xe=["onClick"],WXe=ie(()=>c("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),KXe=[WXe],QXe={class:"mx-2 mb-4"},jXe=ie(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),ZXe={class:"relative"},XXe={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},JXe={key:0},eJe=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),tJe=[eJe],nJe={key:1},rJe=ie(()=>c("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"},[c("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)),sJe=[rJe],oJe={key:0,class:"mx-2 mb-4"},iJe={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},aJe=["selected"],lJe={key:0,class:"mb-2"},cJe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},dJe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),uJe=[dJe],_Je=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),pJe=[_Je],mJe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},gJe={class:"flex flex-row p-3 items-center"},fJe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),hJe=[fJe],EJe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),bJe=[EJe],SJe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),yJe={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},vJe={class:"flex flex-row"},TJe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),CJe=[TJe],RJe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),xJe=[RJe],OJe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),AJe={class:"m-2"},NJe={class:"flex flex-row gap-2 items-center"},wJe=ie(()=>c("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),IJe={class:"m-2"},DJe=ie(()=>c("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),kJe={class:"m-2"},MJe={class:"flex flex-col align-bottom"},LJe={class:"relative"},PJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),FJe={class:"absolute right-0"},UJe={class:"m-2"},BJe={class:"flex flex-col align-bottom"},GJe={class:"relative"},qJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),YJe={class:"absolute right-0"},VJe={class:"m-2"},zJe={class:"flex flex-col align-bottom"},HJe={class:"relative"},$Je=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),WJe={class:"absolute right-0"},KJe={class:"m-2"},QJe={class:"flex flex-col align-bottom"},jJe={class:"relative"},ZJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),XJe={class:"absolute right-0"},JJe={class:"m-2"},eet={class:"flex flex-col align-bottom"},tet={class:"relative"},net=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),ret={class:"absolute right-0"},set={class:"m-2"},oet={class:"flex flex-col align-bottom"},iet={class:"relative"},aet=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),cet={class:"absolute right-0"};function det(t,e,n,r,s,o){const i=Pe("Card"),a=Pe("BindingEntry"),l=Pe("RadioOptions"),u=Pe("model-entry"),d=Pe("personality-entry"),_=Pe("ExtensionEntry"),p=Pe("Toast"),g=Pe("YesNoDialog"),f=Pe("AddModelDialog"),h=Pe("MessageBox"),E=Pe("UniversalForm"),b=Pe("ChoiceDialog");return v(),T(we,null,[c("div",EWe,[c("div",bWe,[s.showConfirmation?(v(),T("div",SWe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=_e(m=>s.showConfirmation=!1,["stop"]))},vWe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=_e(m=>o.save_configuration(),["stop"]))},CWe)])):U("",!0),s.showConfirmation?U("",!0):(v(),T("div",RWe,[c("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=m=>s.showConfirmation=!0)},OWe),c("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=m=>o.reset_configuration())},NWe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=_e(m=>s.all_collapsed=!s.all_collapsed,["stop"]))},IWe)])),c("div",DWe,[c("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=m=>o.api_get_req("clear_uploads").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},MWe),c("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=m=>o.api_get_req("restart_program").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},PWe),c("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=m=>o.api_get_req("update_software").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast("Success!",4,!0)}))},[FWe,s.has_updates?(v(),T("div",UWe,GWe)):U("",!0)]),c("div",qWe,[s.settingsChanged?(v(),T("div",YWe,[VWe,s.isLoading?U("",!0):(v(),T("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=_e(m=>o.applyConfiguration(),["stop"]))},HWe))])):U("",!0),s.isLoading?(v(),T("div",$We,[c("p",null,j(s.loading_text),1),WWe,KWe])):U("",!0)])])]),c("div",{class:Ae(s.isLoading?"pointer-events-none opacity-30":"")},[c("div",QWe,[c("div",jWe,[c("button",{onClick:e[9]||(e[9]=_e(m=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,XWe,512),[[We,s.sc_collapsed]]),ce(c("div",null,eKe,512),[[We,!s.sc_collapsed]]),tKe,nKe,c("div",rKe,[c("div",sKe,[c("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(v(),T("div",oKe,[(v(!0),T(we,null,Be(o.vramUsage.gpus,m=>(v(),T("div",iKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,aKe),c("h3",lKe,[c("div",null,j(o.computedFileSize(m.used_vram))+" / "+j(o.computedFileSize(m.total_vram))+" ("+j(m.percentage)+"%) ",1)])]))),256))])):U("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(v(),T("div",cKe,[c("div",dKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,uKe),c("h3",_Ke,[c("div",null,j(o.vramUsage.gpus.length)+"x ",1)])])])):U("",!0)]),pKe,c("h3",mKe,[c("div",null,j(o.ram_usage)+" / "+j(o.ram_total_space)+" ("+j(o.ram_percent_usage)+"%)",1)]),gKe,c("h3",fKe,[c("div",null,j(o.disk_binding_models_usage)+" / "+j(o.disk_total_space)+" ("+j(o.disk_percent_usage)+"%)",1)])])])])]),c("div",{class:Ae([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",hKe,[EKe,c("div",bKe,[c("div",null,[SKe,xe(j(o.ram_available_space),1)]),c("div",null,[yKe,xe(" "+j(o.ram_usage)+" / "+j(o.ram_total_space)+" ("+j(o.ram_percent_usage)+")% ",1)])]),c("div",vKe,[c("div",TKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+o.ram_percent_usage+"%;")},null,4)])])]),c("div",CKe,[RKe,c("div",xKe,[c("div",null,[OKe,xe(j(o.disk_available_space),1)]),c("div",null,[AKe,xe(" "+j(o.disk_binding_models_usage)+" / "+j(o.disk_total_space)+" ("+j(o.disk_percent_usage)+"%)",1)])]),c("div",NKe,[c("div",wKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(v(!0),T(we,null,Be(o.vramUsage.gpus,m=>(v(),T("div",IKe,[c("label",DKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,kKe),xe(" GPU usage: ")]),c("div",MKe,[c("div",null,[LKe,xe(j(m.gpu_model),1)]),c("div",null,[PKe,xe(j(this.computedFileSize(m.available_space)),1)]),c("div",null,[FKe,xe(" "+j(this.computedFileSize(m.used_vram))+" / "+j(this.computedFileSize(m.total_vram))+" ("+j(m.percentage)+"%)",1)])]),c("div",UKe,[c("div",BKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+m.percentage+"%;")},null,4)])])]))),256))],2)]),c("div",GKe,[c("div",qKe,[c("button",{onClick:e[10]||(e[10]=_e(m=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,VKe,512),[[We,s.minconf_collapsed]]),ce(c("div",null,HKe,512),[[We,!s.minconf_collapsed]]),$Ke])]),c("div",{class:Ae([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",WKe,[he(i,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",KKe,[c("tr",null,[QKe,c("td",jKe,[ce(c("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[11]||(e[11]=m=>o.configFile.host=m),onChange:e[12]||(e[12]=m=>s.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),[[De,o.configFile.host]])])]),c("tr",null,[ZKe,c("td",XKe,[ce(c("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[13]||(e[13]=m=>o.configFile.port=m),onChange:e[14]||(e[14]=m=>s.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),[[De,o.configFile.port]])])]),c("tr",null,[JKe,c("td",eQe,[ce(c("input",{type:"text",id:"db_path",required:"","onUpdate:modelValue":e[15]||(e[15]=m=>o.configFile.db_path=m),onChange:e[16]||(e[16]=m=>s.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),[[De,o.configFile.db_path]])])]),c("tr",null,[tQe,c("td",null,[c("div",nQe,[ce(c("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=m=>o.configFile.auto_show_browser=m),onChange:e[18]||(e[18]=m=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_show_browser]])])])]),c("tr",null,[rQe,c("td",sQe,[c("div",oQe,[ce(c("input",{type:"checkbox",id:"enable_gpu",required:"","onUpdate:modelValue":e[19]||(e[19]=m=>o.configFile.enable_gpu=m),onChange:e[20]||(e[20]=m=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.enable_gpu]]),o.configFile.enable_gpu?U("",!0):(v(),T("button",{key:0,onClick:e[21]||(e[21]=_e((...m)=>o.upgrade2GPU&&o.upgrade2GPU(...m),["prevent"])),class:"w-100 text-center rounded m-2 bg-blue-300 hover:bg-blue-200 text-l hover:text-primary p-2 m-2 text-left flex flex-row"}," Upgrade from CPU to GPU "))])])]),c("tr",null,[iQe,c("td",null,[c("div",aQe,[ce(c("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[22]||(e[22]=m=>o.configFile.auto_save=m),onChange:e[23]||(e[23]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_save]])])])]),c("tr",null,[lQe,c("td",null,[c("div",cQe,[ce(c("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[24]||(e[24]=m=>o.configFile.auto_update=m),onChange:e[25]||(e[25]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_update]])])])]),c("tr",null,[dQe,c("td",null,[c("div",uQe,[ce(c("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[26]||(e[26]=m=>o.configFile.auto_title=m),onChange:e[27]||(e[27]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_title]])])])])])]),_:1}),he(i,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",_Qe,[c("tr",null,[pQe,c("td",mQe,[ce(c("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[28]||(e[28]=m=>o.configFile.user_name=m),onChange:e[29]||(e[29]=m=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.user_name]])])]),c("tr",null,[gQe,c("td",fQe,[ce(c("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[30]||(e[30]=m=>o.configFile.user_description=m),onChange:e[31]||(e[31]=m=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.user_description]])])]),c("tr",null,[hQe,c("td",EQe,[ce(c("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[32]||(e[32]=m=>o.configFile.override_personality_model_parameters=m),onChange:e[33]||(e[33]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.override_personality_model_parameters]])])]),c("tr",null,[bQe,c("td",SQe,[c("label",yQe,[c("img",{src:"/user_infos/"+o.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,vQe)]),c("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[34]||(e[34]=(...m)=>o.uploadAvatar&&o.uploadAvatar(...m))},null,32)])]),c("tr",null,[TQe,c("td",null,[c("div",CQe,[ce(c("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[35]||(e[35]=m=>o.configFile.use_user_name_in_discussions=m),onChange:e[36]||(e[36]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_user_name_in_discussions]])])])])])]),_:1}),he(i,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",RQe,[c("tr",null,[xQe,c("td",null,[c("div",OQe,[ce(c("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[37]||(e[37]=m=>o.configFile.use_files=m),onChange:e[38]||(e[38]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_files]])])])]),c("tr",null,[AQe,c("td",null,[c("div",NQe,[ce(c("input",{type:"checkbox",id:"use_discussions_history",required:"","onUpdate:modelValue":e[39]||(e[39]=m=>o.configFile.use_discussions_history=m),onChange:e[40]||(e[40]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_discussions_history]])])])]),c("tr",null,[wQe,c("td",null,[c("div",IQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[41]||(e[41]=m=>o.configFile.data_vectorization_visualize_on_vectorization=m),onChange:e[42]||(e[42]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_visualize_on_vectorization]])])])]),c("tr",null,[DQe,c("td",null,[c("div",kQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[43]||(e[43]=m=>o.configFile.data_vectorization_activate=m),onChange:e[44]||(e[44]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_activate]])])])]),c("tr",null,[MQe,c("td",null,[c("div",LQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[45]||(e[45]=m=>o.configFile.data_vectorization_build_keys_words=m),onChange:e[46]||(e[46]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_build_keys_words]])])])]),c("tr",null,[PQe,c("td",null,[ce(c("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[47]||(e[47]=m=>o.configFile.data_vectorization_method=m),onChange:e[48]||(e[48]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},BQe,544),[[Kt,o.configFile.data_vectorization_method]])])]),c("tr",null,[GQe,c("td",null,[ce(c("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[49]||(e[49]=m=>o.configFile.data_visualization_method=m),onChange:e[50]||(e[50]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},VQe,544),[[Kt,o.configFile.data_visualization_method]])])]),c("tr",null,[zQe,c("td",null,[c("div",HQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[51]||(e[51]=m=>o.configFile.data_vectorization_save_db=m),onChange:e[52]||(e[52]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_save_db]])])])]),c("tr",null,[$Qe,c("td",null,[ce(c("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[53]||(e[53]=m=>o.configFile.data_vectorization_chunk_size=m),onChange:e[54]||(e[54]=m=>s.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),[[De,o.configFile.data_vectorization_chunk_size]]),ce(c("input",{"onUpdate:modelValue":e[55]||(e[55]=m=>o.configFile.data_vectorization_chunk_size=m),type:"number",onChange:e[56]||(e[56]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_chunk_size]])])]),c("tr",null,[WQe,c("td",null,[ce(c("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[57]||(e[57]=m=>o.configFile.data_vectorization_overlap_size=m),onChange:e[58]||(e[58]=m=>s.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),[[De,o.configFile.data_vectorization_overlap_size]]),ce(c("input",{"onUpdate:modelValue":e[59]||(e[59]=m=>o.configFile.data_vectorization_overlap_size=m),type:"number",onChange:e[60]||(e[60]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_overlap_size]])])]),c("tr",null,[KQe,c("td",null,[ce(c("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[61]||(e[61]=m=>o.configFile.data_vectorization_nb_chunks=m),onChange:e[62]||(e[62]=m=>s.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),[[De,o.configFile.data_vectorization_nb_chunks]]),ce(c("input",{"onUpdate:modelValue":e[63]||(e[63]=m=>o.configFile.data_vectorization_nb_chunks=m),type:"number",onChange:e[64]||(e[64]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),he(i,{title:"Audio",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",QQe,[c("tr",null,[jQe,c("td",null,[c("div",ZQe,[ce(c("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[65]||(e[65]=m=>o.configFile.audio_auto_send_input=m),onChange:e[66]||(e[66]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.audio_auto_send_input]])])])]),c("tr",null,[XQe,c("td",null,[c("div",JQe,[ce(c("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[67]||(e[67]=m=>o.configFile.auto_speak=m),onChange:e[68]||(e[68]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_speak]])])])]),c("tr",null,[eje,c("td",null,[ce(c("input",{id:"audio_pitch","onUpdate:modelValue":e[69]||(e[69]=m=>o.configFile.audio_pitch=m),onChange:e[70]||(e[70]=m=>s.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),[[De,o.configFile.audio_pitch]]),ce(c("input",{"onUpdate:modelValue":e[71]||(e[71]=m=>o.configFile.audio_pitch=m),onChange:e[72]||(e[72]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.audio_pitch]])])]),c("tr",null,[tje,c("td",null,[ce(c("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[73]||(e[73]=m=>o.configFile.audio_silenceTimer=m),onChange:e[74]||(e[74]=m=>s.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),[[De,o.configFile.audio_silenceTimer]]),ce(c("input",{"onUpdate:modelValue":e[75]||(e[75]=m=>o.configFile.audio_silenceTimer=m),onChange:e[76]||(e[76]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.audio_silenceTimer]])])]),c("tr",null,[nje,c("td",null,[ce(c("select",{id:"audio_in_language","onUpdate:modelValue":e[77]||(e[77]=m=>o.configFile.audio_in_language=m),onChange:e[78]||(e[78]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(v(!0),T(we,null,Be(o.audioLanguages,m=>(v(),T("option",{key:m.code,value:m.code},j(m.name),9,rje))),128))],544),[[Kt,o.configFile.audio_in_language]])])]),c("tr",null,[sje,c("td",null,[ce(c("select",{id:"audio_out_voice","onUpdate:modelValue":e[79]||(e[79]=m=>o.configFile.audio_out_voice=m),onChange:e[80]||(e[80]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(v(!0),T(we,null,Be(s.audioVoices,m=>(v(),T("option",{key:m.name,value:m.name},j(m.name),9,oje))),128))],544),[[Kt,o.configFile.audio_out_voice]])])])])]),_:1})])],2)]),c("div",ije,[c("div",aje,[c("button",{onClick:e[81]||(e[81]=_e(m=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,cje,512),[[We,s.bzc_collapsed]]),ce(c("div",null,uje,512),[[We,!s.bzc_collapsed]]),_je,o.configFile.binding_name?U("",!0):(v(),T("div",pje,[mje,xe(" No binding selected! ")])),o.configFile.binding_name?(v(),T("div",gje,"|")):U("",!0),o.configFile.binding_name?(v(),T("div",fje,[c("div",hje,[c("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Eje),c("h3",bje,j(o.binding_name),1)])])):U("",!0)])]),c("div",{class:Ae([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsArr&&o.bindingsArr.length>0?(v(),T("div",Sje,[c("label",yje," Bindings: ("+j(o.bindingsArr.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(o.bindingsArr,(m,S)=>(v(),rt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+S+"-"+m.folder,binding:m,"on-selected":o.onSelectedBinding,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:m.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)])):U("",!0),s.bzl_collapsed?(v(),T("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[82]||(e[82]=m=>s.bzl_collapsed=!s.bzl_collapsed)},Tje)):(v(),T("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[83]||(e[83]=m=>s.bzl_collapsed=!s.bzl_collapsed)},Rje))],2)]),c("div",xje,[c("div",Oje,[c("button",{onClick:e[84]||(e[84]=_e(m=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,Nje,512),[[We,s.mzc_collapsed]]),ce(c("div",null,Ije,512),[[We,!s.mzc_collapsed]]),Dje,c("div",kje,[o.configFile.binding_name?U("",!0):(v(),T("div",Mje,[Lje,xe(" Select binding first! ")])),!s.isModelSelected&&o.configFile.binding_name?(v(),T("div",Pje,[Fje,xe(" No model selected! ")])):U("",!0),o.configFile.model_name?(v(),T("div",Uje,"|")):U("",!0),o.configFile.model_name?(v(),T("div",Bje,[c("div",Gje,[c("img",{src:s.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,qje),c("h3",Yje,j(o.configFile.model_name),1)])])):U("",!0)])])]),c("div",{class:Ae([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",Vje,[c("div",zje,[c("div",Hje,[s.searchModelInProgress?(v(),T("div",$je,Kje)):U("",!0),s.searchModelInProgress?U("",!0):(v(),T("div",Qje,Zje))]),ce(c("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[85]||(e[85]=m=>s.searchModel=m),onKeyup:e[86]||(e[86]=Kr((...m)=>o.searchModel_func&&o.searchModel_func(...m),["enter"]))},null,544),[[De,s.searchModel]]),s.searchModel?(v(),T("button",{key:0,onClick:e[87]||(e[87]=_e(m=>s.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")):U("",!0)])]),c("div",null,[ce(c("input",{"onUpdate:modelValue":e[88]||(e[88]=m=>s.show_only_installed_models=m),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Je,s.show_only_installed_models]]),Xje]),c("div",null,[he(l,{radioOptions:s.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),Jje,s.is_loading_zoo?(v(),T("div",eZe,rZe)):U("",!0),s.searchModel?(v(),T("div",sZe,[s.modelsFiltered.length>0?(v(),T("div",oZe,[c("label",iZe," Search results: ("+j(s.modelsFiltered.length)+") ",1),c("div",{class:Ae(["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",s.mzl_collapsed?"":"max-h-96"])},[(v(!0),T(we,null,Be(s.show_only_installed_models?o.filter_installed(s.modelsFiltered):s.modelsFiltered,(m,S)=>(v(),rt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+S+"-"+m.name,model:m,"is-installed":m.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onSelected,selected:m.name===o.configFile.model_name,model_type:m.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))],2)])):U("",!0)])):U("",!0),s.searchModel?U("",!0):(v(),T("div",aZe,[s.models_zoo&&s.models_zoo.length>0?(v(),T("div",lZe,[c("label",cZe," Models: ("+j(s.models_zoo.length)+") ",1),c("div",{class:Ae(["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",s.mzl_collapsed?"":"max-h-96"])},[(v(!0),T(we,null,Be(s.show_only_installed_models?o.filter_installed(s.models_zoo):s.models_zoo,(m,S)=>(v(),rt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+S+"-"+m.name,model:m,"is-installed":m.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onSelected,selected:m.name===o.configFile.model_name,model_type:m.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))],2)])):U("",!0)])),s.mzl_collapsed?(v(),T("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:"Collapse",type:"button",onClick:e[89]||(e[89]=(...m)=>o.open_mzl&&o.open_mzl(...m))},uZe)):(v(),T("button",{key:4,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[90]||(e[90]=(...m)=>o.open_mzl&&o.open_mzl(...m))},pZe))],2)]),c("div",mZe,[c("div",gZe,[c("button",{onClick:e[91]||(e[91]=_e(m=>s.mzdc_collapsed=!s.mzdc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,hZe,512),[[We,s.mzdc_collapsed]]),ce(c("div",null,bZe,512),[[We,!s.mzdc_collapsed]]),SZe,o.binding_name?U("",!0):(v(),T("div",yZe,[vZe,xe(" No binding selected! ")])),o.configFile.binding_name?(v(),T("div",TZe,"|")):U("",!0),o.configFile.binding_name?(v(),T("div",CZe,[c("div",RZe,[c("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,xZe),c("h3",OZe,j(o.binding_name),1)])])):U("",!0)])]),c("div",{class:Ae([{hidden:s.mzdc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",AZe,[c("div",NZe,[c("div",null,[c("div",wZe,[IZe,ce(c("input",{type:"text","onUpdate:modelValue":e[92]||(e[92]=m=>s.reference_path=m),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),[[De,s.reference_path]])]),c("button",{type:"button",onClick:e[93]||(e[93]=_e(m=>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")]),s.modelDownlaodInProgress?U("",!0):(v(),T("div",DZe,[c("div",kZe,[MZe,ce(c("input",{type:"text","onUpdate:modelValue":e[94]||(e[94]=m=>s.addModel.url=m),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),[[De,s.addModel.url]])]),c("button",{type:"button",onClick:e[95]||(e[95]=_e(m=>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")])),s.modelDownlaodInProgress?(v(),T("div",LZe,[PZe,c("div",FZe,[c("div",UZe,[c("div",BZe,[GZe,c("span",qZe,j(Math.floor(s.addModel.progress))+"%",1)]),c("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},j(s.addModel.url),9,YZe),c("div",VZe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht({width:s.addModel.progress+"%"})},null,4)]),c("div",zZe,[c("span",HZe,"Download speed: "+j(o.speed_computed)+"/s",1),c("span",$Ze,j(o.downloaded_size_computed)+"/"+j(o.total_size_computed),1)])])]),c("div",WZe,[c("div",KZe,[c("div",QZe,[c("button",{onClick:e[96]||(e[96]=_e((...m)=>o.onCancelInstall&&o.onCancelInstall(...m),["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 ")])])])])):U("",!0)])])],2)]),c("div",jZe,[c("div",ZZe,[c("button",{onClick:e[98]||(e[98]=_e(m=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,JZe,512),[[We,s.pzc_collapsed]]),ce(c("div",null,tXe,512),[[We,!s.pzc_collapsed]]),nXe,o.configFile.personalities?(v(),T("div",rXe,"|")):U("",!0),c("div",sXe,j(o.active_pesonality),1),o.configFile.personalities?(v(),T("div",oXe,"|")):U("",!0),o.configFile.personalities?(v(),T("div",iXe,[o.mountedPersArr.length>0?(v(),T("div",aXe,[(v(!0),T(we,null,Be(o.mountedPersArr,(m,S)=>(v(),T("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:S+"-"+m.name,ref_for:!0,ref:"mountedPersonalities"},[c("div",lXe,[c("button",{onClick:_e(C=>o.onPersonalitySelected(m),["stop"])},[c("img",{src:s.bUrl+m.avatar,onError:e[97]||(e[97]=(...C)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...C)),class:Ae(["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(m.full_path)?"border-secondary":"border-transparent z-0"]),title:m.name},null,42,dXe)],8,cXe),c("button",{onClick:_e(C=>o.unmountPersonality(m),["stop"])},pXe,8,uXe)])]))),128))])):U("",!0)])):U("",!0)])]),c("div",{class:Ae([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",mXe,[gXe,c("div",fXe,[c("div",hXe,[s.searchPersonalityInProgress?(v(),T("div",EXe,SXe)):U("",!0),s.searchPersonalityInProgress?U("",!0):(v(),T("div",yXe,TXe))]),ce(c("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[99]||(e[99]=m=>s.searchPersonality=m),onKeyup:e[100]||(e[100]=_e((...m)=>o.searchPersonality_func&&o.searchPersonality_func(...m),["stop"]))},null,544),[[De,s.searchPersonality]]),s.searchPersonality?(v(),T("button",{key:0,onClick:e[101]||(e[101]=_e(m=>s.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")):U("",!0)])]),s.searchPersonality?U("",!0):(v(),T("div",CXe,[c("label",RXe," Personalities Category: ("+j(s.persCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[102]||(e[102]=m=>o.update_personality_category(m.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"},[(v(!0),T(we,null,Be(s.persCatgArr,(m,S)=>(v(),T("option",{key:S,selected:m==this.configFile.personality_category},j(m),9,xXe))),128))],32)])),c("div",null,[s.personalitiesFiltered.length>0?(v(),T("div",OXe,[c("label",AXe,j(s.searchPersonality?"Search results":"Personalities")+": ("+j(s.personalitiesFiltered.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(s.personalitiesFiltered,(m,S)=>(v(),rt(d,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+S+"-"+m.name,personality:m,select_language:!0,full_path:m.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(C=>C===m.full_path||C===m.full_path+":"+m.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):U("",!0)]),s.pzl_collapsed?(v(),T("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[103]||(e[103]=m=>s.pzl_collapsed=!s.pzl_collapsed)},wXe)):(v(),T("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[104]||(e[104]=m=>s.pzl_collapsed=!s.pzl_collapsed)},DXe))],2)]),c("div",kXe,[c("div",MXe,[c("button",{onClick:e[106]||(e[106]=_e(m=>s.ezc_collapsed=!s.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,PXe,512),[[We,s.ezc_collapsed]]),ce(c("div",null,UXe,512),[[We,!s.ezc_collapsed]]),BXe,o.configFile.extensions?(v(),T("div",GXe,"|")):U("",!0),o.configFile.extensions?(v(),T("div",qXe,[o.mountedExtensions.length>0?(v(),T("div",YXe,[(v(!0),T(we,null,Be(o.mountedExtensions,(m,S)=>(v(),T("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:S+"-"+m.name,ref_for:!0,ref:"mountedExtensions"},[c("div",VXe,[c("button",{onClick:_e(C=>o.onExtensionSelected(m),["stop"])},[c("img",{src:s.bUrl+m.avatar,onError:e[105]||(e[105]=(...C)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...C)),class:Ae(["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.extensions.indexOf(m.full_path)?"border-secondary":"border-transparent z-0"]),title:m.name},null,42,HXe)],8,zXe),c("button",{onClick:_e(C=>o.unmountExtension(m),["stop"])},KXe,8,$Xe)])]))),128))])):U("",!0)])):U("",!0)])]),c("div",{class:Ae([{hidden:s.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",QXe,[jXe,c("div",ZXe,[c("div",XXe,[s.searchExtensionInProgress?(v(),T("div",JXe,tJe)):U("",!0),s.searchExtensionInProgress?U("",!0):(v(),T("div",nJe,sJe))]),ce(c("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 extension...",required:"","onUpdate:modelValue":e[107]||(e[107]=m=>s.searchExtension=m),onKeyup:e[108]||(e[108]=_e((...m)=>t.searchExtension_func&&t.searchExtension_func(...m),["stop"]))},null,544),[[De,s.searchExtension]]),s.searchExtension?(v(),T("button",{key:0,onClick:e[109]||(e[109]=_e(m=>s.searchExtension="",["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")):U("",!0)])]),s.searchExtension?U("",!0):(v(),T("div",oJe,[c("label",iJe," Extensions Category: ("+j(s.extCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[110]||(e[110]=m=>o.update_extension_category(m.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"},[(v(!0),T(we,null,Be(s.extCatgArr,(m,S)=>(v(),T("option",{key:S,selected:m==this.extension_category},j(m),9,aJe))),128))],32)])),c("div",null,[s.extensionsFiltererd.length>0?(v(),T("div",lJe,[c("label",cJe,j(s.searchExtension?"Search results":"Personalities")+": ("+j(s.extensionsFiltererd.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(s.extensionsFiltererd,(m,S)=>(v(),rt(_,{ref_for:!0,ref:"extensionsZoo",key:"index-"+S+"-"+m.name,extension:m,select_language:!0,full_path:m.full_path,"on-selected":o.onExtensionSelected,"on-mount":o.mountExtension,"on-un-mount":o.unmountExtension,"on-remount":o.remountExtension,"on-reinstall":o.onExtensionReinstall,"on-settings":t.onSettingsExtension},null,8,["extension","full_path","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))]),_:1})],2)])):U("",!0)]),s.pzl_collapsed?(v(),T("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[111]||(e[111]=m=>s.pzl_collapsed=!s.pzl_collapsed)},uJe)):(v(),T("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[112]||(e[112]=m=>s.pzl_collapsed=!s.pzl_collapsed)},pJe))],2)]),c("div",mJe,[c("div",gJe,[c("button",{onClick:e[113]||(e[113]=_e(m=>s.mep_collapsed=!s.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,hJe,512),[[We,s.mep_collapsed]]),ce(c("div",null,bJe,512),[[We,!s.mep_collapsed]]),SJe])]),c("div",{class:Ae([{hidden:s.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),c("div",yJe,[c("div",vJe,[c("button",{onClick:e[114]||(e[114]=_e(m=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,CJe,512),[[We,s.mc_collapsed]]),ce(c("div",null,xJe,512),[[We,!s.mc_collapsed]]),OJe])]),c("div",{class:Ae([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[c("div",AJe,[c("div",NJe,[ce(c("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[115]||(e[115]=_e(()=>{},["stop"])),"onUpdate:modelValue":e[116]||(e[116]=m=>o.configFile.override_personality_model_parameters=m),onChange:e[117]||(e[117]=m=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[Je,o.configFile.override_personality_model_parameters]]),wJe])]),c("div",{class:Ae(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[c("div",IJe,[DJe,ce(c("input",{type:"text",id:"seed","onUpdate:modelValue":e[118]||(e[118]=m=>o.configFile.seed=m),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),[[De,o.configFile.seed]])]),c("div",kJe,[c("div",MJe,[c("div",LJe,[PJe,c("p",FJe,[ce(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[119]||(e[119]=m=>o.configFile.temperature=m),onChange:e[120]||(e[120]=m=>s.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),[[De,o.configFile.temperature]])])]),ce(c("input",{id:"temperature",onChange:e[121]||(e[121]=m=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[122]||(e[122]=m=>o.configFile.temperature=m),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),[[De,o.configFile.temperature]])])]),c("div",UJe,[c("div",BJe,[c("div",GJe,[qJe,c("p",YJe,[ce(c("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[123]||(e[123]=m=>o.configFile.n_predict=m),onChange:e[124]||(e[124]=m=>s.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),[[De,o.configFile.n_predict]])])]),ce(c("input",{id:"predict",type:"range",onChange:e[125]||(e[125]=m=>s.settingsChanged=!0),"onUpdate:modelValue":e[126]||(e[126]=m=>o.configFile.n_predict=m),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),[[De,o.configFile.n_predict]])])]),c("div",VJe,[c("div",zJe,[c("div",HJe,[$Je,c("p",WJe,[ce(c("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[127]||(e[127]=m=>o.configFile.top_k=m),onChange:e[128]||(e[128]=m=>s.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),[[De,o.configFile.top_k]])])]),ce(c("input",{id:"top_k",type:"range",onChange:e[129]||(e[129]=m=>s.settingsChanged=!0),"onUpdate:modelValue":e[130]||(e[130]=m=>o.configFile.top_k=m),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),[[De,o.configFile.top_k]])])]),c("div",KJe,[c("div",QJe,[c("div",jJe,[ZJe,c("p",XJe,[ce(c("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[131]||(e[131]=m=>o.configFile.top_p=m),onChange:e[132]||(e[132]=m=>s.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),[[De,o.configFile.top_p]])])]),ce(c("input",{id:"top_p",type:"range","onUpdate:modelValue":e[133]||(e[133]=m=>o.configFile.top_p=m),min:"0",max:"1",step:"0.01",onChange:e[134]||(e[134]=m=>s.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),[[De,o.configFile.top_p]])])]),c("div",JJe,[c("div",eet,[c("div",tet,[net,c("p",ret,[ce(c("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[135]||(e[135]=m=>o.configFile.repeat_penalty=m),onChange:e[136]||(e[136]=m=>s.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),[[De,o.configFile.repeat_penalty]])])]),ce(c("input",{id:"repeat_penalty",onChange:e[137]||(e[137]=m=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[138]||(e[138]=m=>o.configFile.repeat_penalty=m),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),[[De,o.configFile.repeat_penalty]])])]),c("div",set,[c("div",oet,[c("div",iet,[aet,c("p",cet,[ce(c("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[139]||(e[139]=m=>o.configFile.repeat_last_n=m),onChange:e[140]||(e[140]=m=>s.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),[[De,o.configFile.repeat_last_n]])])]),ce(c("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[141]||(e[141]=m=>o.configFile.repeat_last_n=m),min:"0",max:"100",step:"1",onChange:e[142]||(e[142]=m=>s.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),[[De,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),he(p,{ref:"toast"},null,512),he(g,{ref:"yesNoDialog",class:"z-20"},null,512),he(f,{ref:"addmodeldialog"},null,512),he(h,{ref:"messageBox"},null,512),he(E,{ref:"universalForm",class:"z-20"},null,512),he(b,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const uet=Ye(hWe,[["render",det],["__scopeId","data-v-feda1672"]]),_et={components:{ClipBoardTextInput:vp,Card:ao},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};Te.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}}},pet={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"},met={class:"mb-4"},get=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),fet=["value"],het={class:"mb-4"},Eet=c("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),bet={class:"mb-4"},yet=c("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),vet={class:"mb-4"},Tet=c("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Cet={class:"mb-4"},Ret=c("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),xet={class:"mb-4"},Oet=c("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Aet={class:"mb-4"},Net=c("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),wet=c("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Iet={key:1};function Det(t,e,n,r,s,o){const i=Pe("Card"),a=Pe("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(v(),T("div",pet,[c("form",{onSubmit:e[2]||(e[2]=_e((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[he(i,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(i,{title:"Model",class:"",isHorizontal:!1},{default:ke(()=>[c("div",met,[get,ce(c("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"},[(v(!0),T(we,null,Be(o.models,l=>(v(),T("option",{key:l,value:l},j(l),9,fet))),128))],544),[[Kt,o.selectedModel]])])]),_:1}),he(i,{title:"Data",isHorizontal:!1},{default:ke(()=>[c("div",het,[Eet,he(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),he(i,{title:"Training",isHorizontal:!1},{default:ke(()=>[c("div",bet,[yet,he(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),c("div",vet,[Tet,he(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),c("div",Cet,[Ret,he(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),c("div",xet,[Oet,he(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),he(i,{title:"Output",isHorizontal:!1},{default:ke(()=>[c("div",Aet,[Net,he(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[wet]),_:1})],32)])):(v(),T("div",Iet,[he(i,{title:"Info",class:"",isHorizontal:!1},{default:ke(()=>[xe(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const ket=Ye(_et,[["render",Det]]),Met={components:{ClipBoardTextInput:vp,Card:ao},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)}}},Let={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"},Pet={class:"mb-4"},Fet=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Uet={class:"mb-4"},Bet=c("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),Get=c("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function qet(t,e,n,r,s,o){const i=Pe("ClipBoardTextInput"),a=Pe("Card");return v(),T("div",Let,[c("form",{onSubmit:e[0]||(e[0]=_e((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[he(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(a,{title:"Model",class:"",isHorizontal:!1},{default:ke(()=>[c("div",Pet,[Fet,he(i,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),c("div",Uet,[Bet,he(i,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),he(a,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[Get]),_:1})],32)])}const Yet=Ye(Met,[["render",qet]]),Vet={name:"Discussion",emits:["delete","select","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!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")},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,ve(()=>{Re.replace()})},watch:{showConfirmation(){ve(()=>{Re.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&ve(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&ve(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},zet=["id"],Het={class:"flex flex-row items-center gap-2"},$et={key:0},Wet=["title"],Ket=["value"],Qet={class:"flex items-center flex-1 max-h-6"},jet={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},Zet=c("i",{"data-feather":"x"},null,-1),Xet=[Zet],Jet=c("i",{"data-feather":"check"},null,-1),ett=[Jet],ttt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},ntt=c("i",{"data-feather":"type"},null,-1),rtt=[ntt],stt=c("i",{"data-feather":"edit-2"},null,-1),ott=[stt],itt=c("i",{"data-feather":"trash"},null,-1),att=[itt];function ltt(t,e,n,r,s,o){return v(),T("div",{class:Ae([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm 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"]),id:"dis-"+n.id,onClick:e[12]||(e[12]=_e(i=>o.selectEvent(),["stop"]))},[c("div",Het,[n.isCheckbox?(v(),T("div",$et,[ce(c("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]=_e(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=i=>s.checkBoxValue_local=i),onInput:e[2]||(e[2]=i=>o.checkedChangeEvent(i,n.id))},null,544),[[Je,s.checkBoxValue_local]])])):U("",!0),n.selected?(v(),T("div",{key:1,class:Ae(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):U("",!0),n.selected?U("",!0):(v(),T("div",{key:2,class:Ae(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),s.editTitle?U("",!0):(v(),T("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},j(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,Wet)),s.editTitle?(v(),T("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]=Kr(_e(i=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Kr(_e(i=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=i=>o.chnageTitle(i.target.value)),onClick:e[6]||(e[6]=_e(()=>{},["stop"]))},null,40,Ket)):U("",!0),c("div",Qet,[s.showConfirmation?(v(),T("div",jet,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=_e(i=>o.cancel(),["stop"]))},Xet),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=_e(i=>s.editTitleMode?o.editTitleEvent():s.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},ett)])):U("",!0),s.showConfirmation?U("",!0):(v(),T("div",ttt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[9]||(e[9]=_e(i=>s.makeTitleMode=!0,["stop"]))},rtt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[10]||(e[10]=_e(i=>s.editTitleMode=!0,["stop"]))},ott),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[11]||(e[11]=_e(i=>s.deleteMode=!0,["stop"]))},att)]))])],10,zet)}const fT=Ye(Vet,[["render",ltt]]),ctt={props:{htmlContent:{type:String,required:!0}}},dtt=["innerHTML"];function utt(t,e,n,r,s,o){return v(),T("div",null,[c("div",{innerHTML:n.htmlContent},null,8,dtt)])}const _tt=Ye(ctt,[["render",utt]]);const ptt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},mtt={key:0},gtt={class:"toggle-icon mr-1"},ftt={key:0,class:"fas fa-plus-circle text-gray-600"},htt={key:1,class:"fas fa-minus-circle text-gray-600"},Ett={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},btt={key:0,class:"fas fa-plus-circle text-gray-600"},Stt={key:1,class:"fas fa-minus-circle text-gray-600"},ytt=["innerHTML"];function vtt(t,e,n,r,s,o){return o.isContentPresent?(v(),T("div",mtt,[c("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...i)=>o.toggleCollapsible&&o.toggleCollapsible(...i))},[c("span",gtt,[s.collapsed?(v(),T("i",ftt)):(v(),T("i",htt))]),xe(" "+j(n.jsonFormText),1)]),ce(c("div",null,[c("div",Ett,[o.isObject?(v(),T("span",{key:0,onClick:e[1]||(e[1]=(...i)=>o.toggleCollapsed&&o.toggleCollapsed(...i)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(v(),T("i",btt)):(v(),T("i",Stt))])):U("",!0),c("pre",{innerHTML:o.formattedJson},null,8,ytt)])],512),[[We,!s.collapsed]])])):U("",!0)}const Ttt=Ye(ptt,[["render",vtt]]),Ctt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0}}},Rtt={class:"step flex items-center mb-4"},xtt={class:"flex items-center justify-center w-6 h-6 mr-2"},Ott={key:0},Att=c("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),Ntt=[Att],wtt={key:1},Itt=c("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),Dtt=[Itt],ktt={key:2},Mtt=c("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),Ltt=[Mtt],Ptt={key:0,role:"status"},Ftt=c("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"},[c("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"}),c("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),Utt=[Ftt];function Btt(t,e,n,r,s,o){return v(),T("div",Rtt,[c("div",xtt,[n.done?U("",!0):(v(),T("div",Ott,Ntt)),n.done&&n.status?(v(),T("div",wtt,Dtt)):U("",!0),n.done&&!n.status?(v(),T("div",ktt,Ltt)):U("",!0)]),n.done?U("",!0):(v(),T("div",Ptt,Utt)),c("div",{class:Ae(["content flex-1 px-2",{"text-green-500":n.done,"text-yellow-500":!n.done}])},j(n.message),3)])}const Gtt=Ye(Ctt,[["render",Btt]]);const eS="/",qtt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:uT,Step:Gtt,RenderHTMLJS:_tt,JsonViewer:Ttt,DynamicUIRenderer:gT},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:""},data(){return{msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser."),ve(()=>{Re.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight})},methods:{insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,s=e.value.substring(0,n),o=e.value.substring(r),i=s+" "+o;this.message.content=i,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},speak(){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(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const n=s=>{let o=this.message.content.substring(s,s+e);const i=[".","!","?",` -`];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{if(this.message.content.includes(".")){const s=n(t),o=this.message.content.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{r()},1)};r()},toggleModel(){this.expanded=!this.expanded},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.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?(console.log("Avatar:",eS+this.avatar),eS+this.avatar):(console.log("No avatar found"),Ks)},defaultImg(t){t.target.src=Ks},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:{"message.content":function(t){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){ve(()=>{Re.replace()})},deleteMsgMode(){ve(()=>{Re.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,ve(()=>{Re.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.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let r=e.getTime()-t.getTime();const s=Math.floor(r/(1e3*60*60));r-=s*(1e3*60*60);const o=Math.floor(r/(1e3*60));r-=o*(1e3*60);const i=Math.floor(r/1e3);r-=i*1e3;function a(u){return u<10&&(u="0"+u),u}return a(s)+"h:"+a(o)+"m:"+a(i)+"s"}}},Ytt={class:"relative group 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 flex-grow flex-wrap overflow-visible p-4 pb-2"},Vtt={class:"flex flex-row gap-2"},ztt={class:"flex-shrink-0"},Htt={class:"group/avatar"},$tt=["src","data-popover-target"],Wtt={class:"flex flex-col w-full flex-grow-0"},Ktt={class:"flex flex-row flex-grow items-start"},Qtt={class:"flex flex-col mb-2"},jtt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Ztt=["title"],Xtt=c("div",{class:"flex-grow"},null,-1),Jtt={class:"flex-row justify-end mx-2"},ent={class:"invisible group-hover:visible flex flex-row"},tnt={key:0,class:"flex items-center duration-75"},nnt=c("i",{"data-feather":"x"},null,-1),rnt=[nnt],snt=c("i",{"data-feather":"check"},null,-1),ont=[snt],int=c("i",{"data-feather":"edit"},null,-1),ant=[int],lnt=c("i",{"data-feather":"copy"},null,-1),cnt=[lnt],dnt=c("i",{"data-feather":"send"},null,-1),unt=[dnt],_nt=c("i",{"data-feather":"send"},null,-1),pnt=[_nt],mnt=c("i",{"data-feather":"fast-forward"},null,-1),gnt=[mnt],fnt={key:5,class:"flex items-center duration-75"},hnt=c("i",{"data-feather":"x"},null,-1),Ent=[hnt],bnt=c("i",{"data-feather":"check"},null,-1),Snt=[bnt],ynt=c("i",{"data-feather":"trash"},null,-1),vnt=[ynt],Tnt=c("i",{"data-feather":"thumbs-up"},null,-1),Cnt=[Tnt],Rnt={class:"flex flex-row items-center"},xnt=c("i",{"data-feather":"thumbs-down"},null,-1),Ont=[xnt],Ant={class:"flex flex-row items-center"},Nnt=c("i",{"data-feather":"volume-2"},null,-1),wnt=[Nnt],Int={class:"overflow-x-auto w-full"},Dnt={class:"flex flex-col items-start w-full"},knt={class:"flex flex-col items-start w-full"},Mnt={key:1},Lnt={class:"text-sm text-gray-400 mt-2"},Pnt={class:"flex flex-row items-center gap-2"},Fnt={key:0},Unt={class:"font-thin"},Bnt={key:1},Gnt={class:"font-thin"},qnt={key:2},Ynt={class:"font-thin"},Vnt={key:3},znt=["title"];function Hnt(t,e,n,r,s,o){const i=Pe("Step"),a=Pe("RenderHTMLJS"),l=Pe("MarkdownRenderer"),u=Pe("JsonViewer"),d=Pe("DynamicUIRenderer");return v(),T("div",Ytt,[c("div",Vtt,[c("div",ztt,[c("div",Htt,[c("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=_=>o.defaultImg(_)),"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,$tt)])]),c("div",Wtt,[c("div",Ktt,[c("div",Qtt,[c("div",jtt,j(n.message.sender)+" ",1),n.message.created_at?(v(),T("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},j(o.created_at),9,Ztt)):U("",!0)]),Xtt,c("div",Jtt,[c("div",ent,[o.editMsgMode?(v(),T("div",tnt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=_e(_=>o.editMsgMode=!1,["stop"]))},rnt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=_e((..._)=>o.updateMessage&&o.updateMessage(..._),["stop"]))},ont)])):U("",!0),o.editMsgMode?U("",!0):(v(),T("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=_e(_=>o.editMsgMode=!0,["stop"]))},ant)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[4]||(e[4]=_e(_=>o.copyContentToClipboard(),["stop"]))},cnt),!o.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(v(),T("div",{key:2,class:Ae(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":o.editMsgMode}]),title:"Resend message with full context",onClick:e[5]||(e[5]=_e(_=>o.resendMessage("full_context"),["stop"]))},unt,2)):U("",!0),!o.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(v(),T("div",{key:3,class:Ae(["text-lg hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":o.editMsgMode}]),title:"Resend message without the full context",onClick:e[6]||(e[6]=_e(_=>o.resendMessage("simple_question"),["stop"]))},pnt,2)):U("",!0),!o.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(v(),T("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[7]||(e[7]=_e(_=>o.continueMessage(),["stop"]))},gnt)):U("",!0),s.deleteMsgMode?(v(),T("div",fnt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[8]||(e[8]=_e(_=>s.deleteMsgMode=!1,["stop"]))},Ent),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[9]||(e[9]=_e(_=>o.deleteMsg(),["stop"]))},Snt)])):U("",!0),!o.editMsgMode&&!s.deleteMsgMode?(v(),T("div",{key:6,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[10]||(e[10]=_=>s.deleteMsgMode=!0)},vnt)):U("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[11]||(e[11]=_e(_=>o.rankUp(),["stop"]))},Cnt),c("div",Rnt,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[12]||(e[12]=_e(_=>o.rankDown(),["stop"]))},Ont),n.message.rank!=0?(v(),T("div",{key:0,class:Ae(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},j(n.message.rank),3)):U("",!0)]),c("div",Ant,[c("div",{class:Ae(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[13]||(e[13]=_e(_=>o.speak(),["stop"]))},wnt,2)])])])]),c("div",Int,[c("div",Dnt,[(v(!0),T(we,null,Be(n.message.steps,(_,p)=>(v(),T("div",{key:"step-"+n.message.id+"-"+p,class:"step font-bold",style:ht({backgroundColor:_.done?"transparent":"inherit"})},[he(i,{done:_.done,message:_.message,status:_.status},null,8,["done","message","status"])],4))),128))]),c("div",knt,[(v(!0),T(we,null,Be(n.message.html_js_s,(_,p)=>(v(),T("div",{key:"htmljs-"+n.message.id+"-"+p,class:"htmljs font-bold",style:ht({backgroundColor:t.step.done?"transparent":"inherit"})},[he(a,{htmlContent:_},null,8,["htmlContent"])],4))),128))]),o.editMsgMode?U("",!0):(v(),rt(l,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id},null,8,["host","markdown-text","message_id","discussion_id"])),c("div",null,[n.message.open?ce((v(),T("textarea",{key:0,ref:"mdTextarea",onKeydown:e[14]||(e[14]=Kr(_e((..._)=>o.insertTab&&o.insertTab(..._),["prevent"]),["tab"])),class:"block 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 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",rows:4,style:ht({minHeight:s.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[15]||(e[15]=_=>n.message.content=_)},`\r - `,36)),[[De,n.message.content]]):U("",!0)]),n.message.metadata!==null?(v(),T("div",Mnt,[(v(!0),T(we,null,Be(n.message.metadata,(_,p)=>(v(),T("div",{key:"json-"+n.message.id+"-"+p,class:"json font-bold"},[he(u,{jsonFormText:_.title,jsonData:_.content},null,8,["jsonFormText","jsonData"])]))),128))])):U("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(v(),rt(d,{key:2,class:"w-full h-full",code:n.message.ui},null,8,["code"])):U("",!0)]),c("div",Lnt,[c("div",Pnt,[n.message.binding?(v(),T("p",Fnt,[xe("Binding: "),c("span",Unt,j(n.message.binding),1)])):U("",!0),n.message.model?(v(),T("p",Bnt,[xe("Model: "),c("span",Gnt,j(n.message.model),1)])):U("",!0),n.message.seed?(v(),T("p",qnt,[xe("Seed: "),c("span",Ynt,j(n.message.seed),1)])):U("",!0),o.time_spent?(v(),T("p",Vnt,[xe("Time spent: "),c("span",{class:"font-thin",title:"Finished generating: "+o.finished_generating_at_parsed},j(o.time_spent),9,znt)])):U("",!0)])])])])])}const hT=Ye(qtt,[["render",Hnt]]),$nt="/";Te.defaults.baseURL="/";const Wnt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Sr,UniversalForm:ea},data(){return{bUrl:$nt,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 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:{onSettingsPersonality(t){try{Te.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{Te.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. +You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},ie=t=>(hr("data-v-feda1672"),t=t(),Er(),t),bWe={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},SWe={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},yWe={key:0,class:"flex gap-3 flex-1 items-center duration-75"},vWe=ie(()=>c("i",{"data-feather":"x"},null,-1)),TWe=[vWe],CWe=ie(()=>c("i",{"data-feather":"check"},null,-1)),RWe=[CWe],xWe={key:1,class:"flex gap-3 flex-1 items-center"},OWe=ie(()=>c("i",{"data-feather":"save"},null,-1)),AWe=[OWe],NWe=ie(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),wWe=[NWe],IWe=ie(()=>c("i",{"data-feather":"list"},null,-1)),DWe=[IWe],kWe={class:"flex gap-3 flex-1 items-center justify-end"},MWe=ie(()=>c("i",{"data-feather":"trash-2"},null,-1)),LWe=[MWe],PWe=ie(()=>c("i",{"data-feather":"refresh-ccw"},null,-1)),FWe=[PWe],UWe=ie(()=>c("i",{"data-feather":"arrow-up-circle"},null,-1)),BWe={key:0},GWe=ie(()=>c("i",{"data-feather":"alert-circle"},null,-1)),qWe=[GWe],YWe={class:"flex gap-3 items-center"},VWe={key:0,class:"flex gap-3 items-center"},zWe=ie(()=>c("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),HWe=ie(()=>c("i",{"data-feather":"check"},null,-1)),$We=[HWe],WWe={key:1,role:"status"},KWe=ie(()=>c("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"},[c("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"}),c("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)),QWe=ie(()=>c("span",{class:"sr-only"},"Loading...",-1)),jWe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},ZWe={class:"flex flex-row p-3"},XWe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),JWe=[XWe],eKe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),tKe=[eKe],nKe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),rKe=ie(()=>c("div",{class:"mr-2"},"|",-1)),sKe={class:"text-base font-semibold cursor-pointer select-none items-center"},oKe={class:"flex gap-2 items-center"},iKe={key:0},aKe={class:"flex gap-2 items-center"},lKe=["src"],cKe={class:"font-bold font-large text-lg"},dKe={key:1},uKe={class:"flex gap-2 items-center"},_Ke=["src"],pKe={class:"font-bold font-large text-lg"},mKe=ie(()=>c("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),gKe={class:"font-bold font-large text-lg"},fKe=ie(()=>c("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),hKe={class:"font-bold font-large text-lg"},EKe={class:"mb-2"},bKe=ie(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[c("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"})]),xe(" CPU Ram usage: ")],-1)),SKe={class:"flex flex-col mx-2"},yKe=ie(()=>c("b",null,"Avaliable ram: ",-1)),vKe=ie(()=>c("b",null,"Ram usage: ",-1)),TKe={class:"p-2"},CKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},RKe={class:"mb-2"},xKe=ie(()=>c("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[c("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),xe(" Disk usage: ")],-1)),OKe={class:"flex flex-col mx-2"},AKe=ie(()=>c("b",null,"Avaliable disk space: ",-1)),NKe=ie(()=>c("b",null,"Disk usage: ",-1)),wKe={class:"p-2"},IKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},DKe={class:"mb-2"},kKe={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},MKe=["src"],LKe={class:"flex flex-col mx-2"},PKe=ie(()=>c("b",null,"Model: ",-1)),FKe=ie(()=>c("b",null,"Avaliable vram: ",-1)),UKe=ie(()=>c("b",null,"GPU usage: ",-1)),BKe={class:"p-2"},GKe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},qKe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},YKe={class:"flex flex-row p-3"},VKe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),zKe=[VKe],HKe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),$Ke=[HKe],WKe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),KKe={class:"flex flex-col mb-2 px-3 pb-2"},QKe={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"},jKe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),ZKe={style:{width:"100%"}},XKe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),JKe={style:{width:"100%"}},eQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),tQe={style:{width:"100%"}},nQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),rQe={class:"flex flex-row"},sQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"enable_gpu",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable GPU:")],-1)),oQe={class:"text-center items-center"},iQe={class:"flex flex-row"},aQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),lQe={class:"flex flex-row"},cQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),dQe={class:"flex flex-row"},uQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),_Qe={class:"flex flex-row"},pQe={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"},mQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),gQe={style:{width:"100%"}},fQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),hQe={style:{width:"100%"}},EQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),bQe={style:{width:"100%"}},SQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),yQe={style:{width:"100%"}},vQe={for:"avatar-upload"},TQe=["src"],CQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),RQe={class:"flex flex-row"},xQe={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"},OQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),AQe={class:"flex flex-row"},NQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"use_discussions_history",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate discussion vectorization:")],-1)),wQe={class:"flex flex-row"},IQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),DQe={class:"flex flex-row"},kQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate data Vectorization:")],-1)),MQe={class:"flex flex-row"},LQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),PQe={class:"flex flex-row"},FQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),UQe=ie(()=>c("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),BQe=ie(()=>c("option",{value:"model_embedding"},"Model Embedding",-1)),GQe=[UQe,BQe],qQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),YQe=ie(()=>c("option",{value:"PCA"},"PCA",-1)),VQe=ie(()=>c("option",{value:"TSNE"},"TSNE",-1)),zQe=[YQe,VQe],HQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("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)),$Qe={class:"flex flex-row"},WQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),KQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),QQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),jQe={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"},ZQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),XQe={class:"flex flex-row"},JQe=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),eje={class:"flex flex-row"},tje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),nje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),rje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),sje=["value"],oje=ie(()=>c("td",{style:{"min-width":"200px"}},[c("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),ije=["value"],aje={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},lje={class:"flex flex-row p-3"},cje=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),dje=[cje],uje=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),_je=[uje],pje=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),mje={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},gje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),fje={key:1,class:"mr-2"},hje={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Eje={class:"flex gap-1 items-center"},bje=["src"],Sje={class:"font-bold font-large text-lg line-clamp-1"},yje={key:0,class:"mb-2"},vje={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Tje=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),Cje=[Tje],Rje=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),xje=[Rje],Oje={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Aje={class:"flex flex-row p-3"},Nje=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),wje=[Nje],Ije=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),Dje=[Ije],kje=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Mje={class:"flex flex-row items-center"},Lje={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Pje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Fje={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Uje=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Bje={key:2,class:"mr-2"},Gje={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},qje={class:"flex gap-1 items-center"},Yje=["src"],Vje={class:"font-bold font-large text-lg line-clamp-1"},zje={class:"mx-2 mb-4"},Hje={class:"relative"},$je={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Wje={key:0},Kje=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Qje=[Kje],jje={key:1},Zje=ie(()=>c("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"},[c("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)),Xje=[Zje],Jje=ie(()=>c("label",{for:"only_installed"},"Show only installed models",-1)),eZe=ie(()=>c("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)),tZe={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},nZe=ie(()=>c("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"},[c("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"}),c("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)),rZe=ie(()=>c("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),sZe=[nZe,rZe],oZe={key:1},iZe={key:0,class:"mb-2"},aZe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},lZe={key:2},cZe={key:0,class:"mb-2"},dZe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},uZe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),_Ze=[uZe],pZe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),mZe=[pZe],gZe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},fZe={class:"flex flex-row p-3"},hZe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),EZe=[hZe],bZe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),SZe=[bZe],yZe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Add models for binding",-1)),vZe={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},TZe=ie(()=>c("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),CZe={key:1,class:"mr-2"},RZe={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},xZe={class:"flex gap-1 items-center"},OZe=["src"],AZe={class:"font-bold font-large text-lg line-clamp-1"},NZe={class:"mb-2"},wZe={class:"p-2"},IZe={class:"mb-3"},DZe=ie(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),kZe={key:0},MZe={class:"mb-3"},LZe=ie(()=>c("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),PZe={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},FZe=ie(()=>c("div",{role:"status",class:"justify-center"},null,-1)),UZe={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},BZe={class:"w-full p-2"},GZe={class:"flex justify-between mb-1"},qZe=G_(' Downloading Loading...',1),YZe={class:"text-sm font-medium text-blue-700 dark:text-white"},VZe=["title"],zZe={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},HZe={class:"flex justify-between mb-1"},$Ze={class:"text-base font-medium text-blue-700 dark:text-white"},WZe={class:"text-sm font-medium text-blue-700 dark:text-white"},KZe={class:"flex flex-grow"},QZe={class:"flex flex-row flex-grow gap-3"},jZe={class:"p-2 text-center grow"},ZZe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},XZe={class:"flex flex-row p-3 items-center"},JZe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),eXe=[JZe],tXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),nXe=[tXe],rXe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),sXe={key:0,class:"mr-2"},oXe={class:"mr-2 font-bold font-large text-lg line-clamp-1"},iXe={key:1,class:"mr-2"},aXe={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},lXe={key:0,class:"flex -space-x-4 items-center"},cXe={class:"group items-center flex flex-row"},dXe=["onClick"],uXe=["src","title"],_Xe=["onClick"],pXe=ie(()=>c("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),mXe=[pXe],gXe={class:"mx-2 mb-4"},fXe=ie(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),hXe={class:"relative"},EXe={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},bXe={key:0},SXe=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),yXe=[SXe],vXe={key:1},TXe=ie(()=>c("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"},[c("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)),CXe=[TXe],RXe={key:0,class:"mx-2 mb-4"},xXe={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},OXe=["selected"],AXe={key:0,class:"mb-2"},NXe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},wXe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),IXe=[wXe],DXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),kXe=[DXe],MXe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},LXe={class:"flex flex-row p-3 items-center"},PXe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),FXe=[PXe],UXe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),BXe=[UXe],GXe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),qXe={key:0,class:"mr-2"},YXe={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},VXe={key:0,class:"flex -space-x-4 items-center"},zXe={class:"group items-center flex flex-row"},HXe=["onClick"],$Xe=["src","title"],WXe=["onClick"],KXe=ie(()=>c("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),QXe=[KXe],jXe={class:"mx-2 mb-4"},ZXe=ie(()=>c("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),XXe={class:"relative"},JXe={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},eJe={key:0},tJe=ie(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),nJe=[tJe],rJe={key:1},sJe=ie(()=>c("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"},[c("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)),oJe=[sJe],iJe={key:0,class:"mx-2 mb-4"},aJe={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},lJe=["selected"],cJe={key:0,class:"mb-2"},dJe={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},uJe=ie(()=>c("i",{"data-feather":"chevron-up"},null,-1)),_Je=[uJe],pJe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),mJe=[pJe],gJe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},fJe={class:"flex flex-row p-3 items-center"},hJe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),EJe=[hJe],bJe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),SJe=[bJe],yJe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),vJe={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},TJe={class:"flex flex-row"},CJe=ie(()=>c("i",{"data-feather":"chevron-right"},null,-1)),RJe=[CJe],xJe=ie(()=>c("i",{"data-feather":"chevron-down"},null,-1)),OJe=[xJe],AJe=ie(()=>c("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),NJe={class:"m-2"},wJe={class:"flex flex-row gap-2 items-center"},IJe=ie(()=>c("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),DJe={class:"m-2"},kJe=ie(()=>c("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),MJe={class:"m-2"},LJe={class:"flex flex-col align-bottom"},PJe={class:"relative"},FJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),UJe={class:"absolute right-0"},BJe={class:"m-2"},GJe={class:"flex flex-col align-bottom"},qJe={class:"relative"},YJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),VJe={class:"absolute right-0"},zJe={class:"m-2"},HJe={class:"flex flex-col align-bottom"},$Je={class:"relative"},WJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),KJe={class:"absolute right-0"},QJe={class:"m-2"},jJe={class:"flex flex-col align-bottom"},ZJe={class:"relative"},XJe=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),JJe={class:"absolute right-0"},eet={class:"m-2"},tet={class:"flex flex-col align-bottom"},net={class:"relative"},ret=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),set={class:"absolute right-0"},oet={class:"m-2"},iet={class:"flex flex-col align-bottom"},aet={class:"relative"},cet=ie(()=>c("p",{class:"absolute left-0 mt-6"},[c("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),det={class:"absolute right-0"};function uet(t,e,n,r,s,o){const i=Pe("Card"),a=Pe("BindingEntry"),l=Pe("RadioOptions"),u=Pe("model-entry"),d=Pe("personality-entry"),_=Pe("ExtensionEntry"),p=Pe("Toast"),g=Pe("YesNoDialog"),f=Pe("AddModelDialog"),h=Pe("MessageBox"),E=Pe("UniversalForm"),b=Pe("ChoiceDialog");return v(),T(we,null,[c("div",bWe,[c("div",SWe,[s.showConfirmation?(v(),T("div",yWe,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=_e(m=>s.showConfirmation=!1,["stop"]))},TWe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=_e(m=>o.save_configuration(),["stop"]))},RWe)])):U("",!0),s.showConfirmation?U("",!0):(v(),T("div",xWe,[c("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=m=>s.showConfirmation=!0)},AWe),c("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=m=>o.reset_configuration())},wWe),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=_e(m=>s.all_collapsed=!s.all_collapsed,["stop"]))},DWe)])),c("div",kWe,[c("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=m=>o.api_get_req("clear_uploads").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},LWe),c("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=m=>o.api_get_req("restart_program").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast(["failed!"],4,!1)}))},FWe),c("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=m=>o.api_get_req("update_software").then(S=>{S.status?this.$refs.toast.showToast("Success!",4,!0):this.$refs.toast.showToast("Success!",4,!0)}))},[UWe,s.has_updates?(v(),T("div",BWe,qWe)):U("",!0)]),c("div",YWe,[s.settingsChanged?(v(),T("div",VWe,[zWe,s.isLoading?U("",!0):(v(),T("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=_e(m=>o.applyConfiguration(),["stop"]))},$We))])):U("",!0),s.isLoading?(v(),T("div",WWe,[c("p",null,j(s.loading_text),1),KWe,QWe])):U("",!0)])])]),c("div",{class:Ae(s.isLoading?"pointer-events-none opacity-30":"")},[c("div",jWe,[c("div",ZWe,[c("button",{onClick:e[9]||(e[9]=_e(m=>s.sc_collapsed=!s.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,JWe,512),[[We,s.sc_collapsed]]),ce(c("div",null,tKe,512),[[We,!s.sc_collapsed]]),nKe,rKe,c("div",sKe,[c("div",oKe,[c("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(v(),T("div",iKe,[(v(!0),T(we,null,Be(o.vramUsage.gpus,m=>(v(),T("div",aKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,lKe),c("h3",cKe,[c("div",null,j(o.computedFileSize(m.used_vram))+" / "+j(o.computedFileSize(m.total_vram))+" ("+j(m.percentage)+"%) ",1)])]))),256))])):U("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(v(),T("div",dKe,[c("div",uKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,_Ke),c("h3",pKe,[c("div",null,j(o.vramUsage.gpus.length)+"x ",1)])])])):U("",!0)]),mKe,c("h3",gKe,[c("div",null,j(o.ram_usage)+" / "+j(o.ram_total_space)+" ("+j(o.ram_percent_usage)+"%)",1)]),fKe,c("h3",hKe,[c("div",null,j(o.disk_binding_models_usage)+" / "+j(o.disk_total_space)+" ("+j(o.disk_percent_usage)+"%)",1)])])])])]),c("div",{class:Ae([{hidden:s.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",EKe,[bKe,c("div",SKe,[c("div",null,[yKe,xe(j(o.ram_available_space),1)]),c("div",null,[vKe,xe(" "+j(o.ram_usage)+" / "+j(o.ram_total_space)+" ("+j(o.ram_percent_usage)+")% ",1)])]),c("div",TKe,[c("div",CKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+o.ram_percent_usage+"%;")},null,4)])])]),c("div",RKe,[xKe,c("div",OKe,[c("div",null,[AKe,xe(j(o.disk_available_space),1)]),c("div",null,[NKe,xe(" "+j(o.disk_binding_models_usage)+" / "+j(o.disk_total_space)+" ("+j(o.disk_percent_usage)+"%)",1)])]),c("div",wKe,[c("div",IKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(v(!0),T(we,null,Be(o.vramUsage.gpus,m=>(v(),T("div",DKe,[c("label",kKe,[c("img",{src:s.SVGGPU,width:"25",height:"25"},null,8,MKe),xe(" GPU usage: ")]),c("div",LKe,[c("div",null,[PKe,xe(j(m.gpu_model),1)]),c("div",null,[FKe,xe(j(this.computedFileSize(m.available_space)),1)]),c("div",null,[UKe,xe(" "+j(this.computedFileSize(m.used_vram))+" / "+j(this.computedFileSize(m.total_vram))+" ("+j(m.percentage)+"%)",1)])]),c("div",BKe,[c("div",GKe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht("width: "+m.percentage+"%;")},null,4)])])]))),256))],2)]),c("div",qKe,[c("div",YKe,[c("button",{onClick:e[10]||(e[10]=_e(m=>s.minconf_collapsed=!s.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,zKe,512),[[We,s.minconf_collapsed]]),ce(c("div",null,$Ke,512),[[We,!s.minconf_collapsed]]),WKe])]),c("div",{class:Ae([{hidden:s.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",KKe,[he(i,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",QKe,[c("tr",null,[jKe,c("td",ZKe,[ce(c("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[11]||(e[11]=m=>o.configFile.host=m),onChange:e[12]||(e[12]=m=>s.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),[[De,o.configFile.host]])])]),c("tr",null,[XKe,c("td",JKe,[ce(c("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[13]||(e[13]=m=>o.configFile.port=m),onChange:e[14]||(e[14]=m=>s.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),[[De,o.configFile.port]])])]),c("tr",null,[eQe,c("td",tQe,[ce(c("input",{type:"text",id:"db_path",required:"","onUpdate:modelValue":e[15]||(e[15]=m=>o.configFile.db_path=m),onChange:e[16]||(e[16]=m=>s.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),[[De,o.configFile.db_path]])])]),c("tr",null,[nQe,c("td",null,[c("div",rQe,[ce(c("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=m=>o.configFile.auto_show_browser=m),onChange:e[18]||(e[18]=m=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_show_browser]])])])]),c("tr",null,[sQe,c("td",oQe,[c("div",iQe,[ce(c("input",{type:"checkbox",id:"enable_gpu",required:"","onUpdate:modelValue":e[19]||(e[19]=m=>o.configFile.enable_gpu=m),onChange:e[20]||(e[20]=m=>s.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.enable_gpu]]),o.configFile.enable_gpu?U("",!0):(v(),T("button",{key:0,onClick:e[21]||(e[21]=_e((...m)=>o.upgrade2GPU&&o.upgrade2GPU(...m),["prevent"])),class:"w-100 text-center rounded m-2 bg-blue-300 hover:bg-blue-200 text-l hover:text-primary p-2 m-2 text-left flex flex-row"}," Upgrade from CPU to GPU "))])])]),c("tr",null,[aQe,c("td",null,[c("div",lQe,[ce(c("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[22]||(e[22]=m=>o.configFile.auto_save=m),onChange:e[23]||(e[23]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_save]])])])]),c("tr",null,[cQe,c("td",null,[c("div",dQe,[ce(c("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[24]||(e[24]=m=>o.configFile.auto_update=m),onChange:e[25]||(e[25]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_update]])])])]),c("tr",null,[uQe,c("td",null,[c("div",_Qe,[ce(c("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[26]||(e[26]=m=>o.configFile.auto_title=m),onChange:e[27]||(e[27]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_title]])])])])])]),_:1}),he(i,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",pQe,[c("tr",null,[mQe,c("td",gQe,[ce(c("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[28]||(e[28]=m=>o.configFile.user_name=m),onChange:e[29]||(e[29]=m=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.user_name]])])]),c("tr",null,[fQe,c("td",hQe,[ce(c("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[30]||(e[30]=m=>o.configFile.user_description=m),onChange:e[31]||(e[31]=m=>s.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.user_description]])])]),c("tr",null,[EQe,c("td",bQe,[ce(c("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[32]||(e[32]=m=>o.configFile.override_personality_model_parameters=m),onChange:e[33]||(e[33]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.override_personality_model_parameters]])])]),c("tr",null,[SQe,c("td",yQe,[c("label",vQe,[c("img",{src:"/user_infos/"+o.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,TQe)]),c("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[34]||(e[34]=(...m)=>o.uploadAvatar&&o.uploadAvatar(...m))},null,32)])]),c("tr",null,[CQe,c("td",null,[c("div",RQe,[ce(c("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[35]||(e[35]=m=>o.configFile.use_user_name_in_discussions=m),onChange:e[36]||(e[36]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_user_name_in_discussions]])])])])])]),_:1}),he(i,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",xQe,[c("tr",null,[OQe,c("td",null,[c("div",AQe,[ce(c("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[37]||(e[37]=m=>o.configFile.use_files=m),onChange:e[38]||(e[38]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_files]])])])]),c("tr",null,[NQe,c("td",null,[c("div",wQe,[ce(c("input",{type:"checkbox",id:"use_discussions_history",required:"","onUpdate:modelValue":e[39]||(e[39]=m=>o.configFile.use_discussions_history=m),onChange:e[40]||(e[40]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.use_discussions_history]])])])]),c("tr",null,[IQe,c("td",null,[c("div",DQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[41]||(e[41]=m=>o.configFile.data_vectorization_visualize_on_vectorization=m),onChange:e[42]||(e[42]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_visualize_on_vectorization]])])])]),c("tr",null,[kQe,c("td",null,[c("div",MQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[43]||(e[43]=m=>o.configFile.data_vectorization_activate=m),onChange:e[44]||(e[44]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_activate]])])])]),c("tr",null,[LQe,c("td",null,[c("div",PQe,[ce(c("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[45]||(e[45]=m=>o.configFile.data_vectorization_build_keys_words=m),onChange:e[46]||(e[46]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_build_keys_words]])])])]),c("tr",null,[FQe,c("td",null,[ce(c("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[47]||(e[47]=m=>o.configFile.data_vectorization_method=m),onChange:e[48]||(e[48]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},GQe,544),[[Kt,o.configFile.data_vectorization_method]])])]),c("tr",null,[qQe,c("td",null,[ce(c("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[49]||(e[49]=m=>o.configFile.data_visualization_method=m),onChange:e[50]||(e[50]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},zQe,544),[[Kt,o.configFile.data_visualization_method]])])]),c("tr",null,[HQe,c("td",null,[c("div",$Qe,[ce(c("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[51]||(e[51]=m=>o.configFile.data_vectorization_save_db=m),onChange:e[52]||(e[52]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.data_vectorization_save_db]])])])]),c("tr",null,[WQe,c("td",null,[ce(c("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[53]||(e[53]=m=>o.configFile.data_vectorization_chunk_size=m),onChange:e[54]||(e[54]=m=>s.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),[[De,o.configFile.data_vectorization_chunk_size]]),ce(c("input",{"onUpdate:modelValue":e[55]||(e[55]=m=>o.configFile.data_vectorization_chunk_size=m),type:"number",onChange:e[56]||(e[56]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_chunk_size]])])]),c("tr",null,[KQe,c("td",null,[ce(c("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[57]||(e[57]=m=>o.configFile.data_vectorization_overlap_size=m),onChange:e[58]||(e[58]=m=>s.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),[[De,o.configFile.data_vectorization_overlap_size]]),ce(c("input",{"onUpdate:modelValue":e[59]||(e[59]=m=>o.configFile.data_vectorization_overlap_size=m),type:"number",onChange:e[60]||(e[60]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_overlap_size]])])]),c("tr",null,[QQe,c("td",null,[ce(c("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[61]||(e[61]=m=>o.configFile.data_vectorization_nb_chunks=m),onChange:e[62]||(e[62]=m=>s.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),[[De,o.configFile.data_vectorization_nb_chunks]]),ce(c("input",{"onUpdate:modelValue":e[63]||(e[63]=m=>o.configFile.data_vectorization_nb_chunks=m),type:"number",onChange:e[64]||(e[64]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),he(i,{title:"Audio",is_subcard:!0,class:"pb-2 m-2"},{default:ke(()=>[c("table",jQe,[c("tr",null,[ZQe,c("td",null,[c("div",XQe,[ce(c("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[65]||(e[65]=m=>o.configFile.audio_auto_send_input=m),onChange:e[66]||(e[66]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.audio_auto_send_input]])])])]),c("tr",null,[JQe,c("td",null,[c("div",eje,[ce(c("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[67]||(e[67]=m=>o.configFile.auto_speak=m),onChange:e[68]||(e[68]=m=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Je,o.configFile.auto_speak]])])])]),c("tr",null,[tje,c("td",null,[ce(c("input",{id:"audio_pitch","onUpdate:modelValue":e[69]||(e[69]=m=>o.configFile.audio_pitch=m),onChange:e[70]||(e[70]=m=>s.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),[[De,o.configFile.audio_pitch]]),ce(c("input",{"onUpdate:modelValue":e[71]||(e[71]=m=>o.configFile.audio_pitch=m),onChange:e[72]||(e[72]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.audio_pitch]])])]),c("tr",null,[nje,c("td",null,[ce(c("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[73]||(e[73]=m=>o.configFile.audio_silenceTimer=m),onChange:e[74]||(e[74]=m=>s.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),[[De,o.configFile.audio_silenceTimer]]),ce(c("input",{"onUpdate:modelValue":e[75]||(e[75]=m=>o.configFile.audio_silenceTimer=m),onChange:e[76]||(e[76]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[De,o.configFile.audio_silenceTimer]])])]),c("tr",null,[rje,c("td",null,[ce(c("select",{id:"audio_in_language","onUpdate:modelValue":e[77]||(e[77]=m=>o.configFile.audio_in_language=m),onChange:e[78]||(e[78]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(v(!0),T(we,null,Be(o.audioLanguages,m=>(v(),T("option",{key:m.code,value:m.code},j(m.name),9,sje))),128))],544),[[Kt,o.configFile.audio_in_language]])])]),c("tr",null,[oje,c("td",null,[ce(c("select",{id:"audio_out_voice","onUpdate:modelValue":e[79]||(e[79]=m=>o.configFile.audio_out_voice=m),onChange:e[80]||(e[80]=m=>s.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(v(!0),T(we,null,Be(s.audioVoices,m=>(v(),T("option",{key:m.name,value:m.name},j(m.name),9,ije))),128))],544),[[Kt,o.configFile.audio_out_voice]])])])])]),_:1})])],2)]),c("div",aje,[c("div",lje,[c("button",{onClick:e[81]||(e[81]=_e(m=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ce(c("div",null,dje,512),[[We,s.bzc_collapsed]]),ce(c("div",null,_je,512),[[We,!s.bzc_collapsed]]),pje,o.configFile.binding_name?U("",!0):(v(),T("div",mje,[gje,xe(" No binding selected! ")])),o.configFile.binding_name?(v(),T("div",fje,"|")):U("",!0),o.configFile.binding_name?(v(),T("div",hje,[c("div",Eje,[c("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,bje),c("h3",Sje,j(o.binding_name),1)])])):U("",!0)])]),c("div",{class:Ae([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsArr&&o.bindingsArr.length>0?(v(),T("div",yje,[c("label",vje," Bindings: ("+j(o.bindingsArr.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(o.bindingsArr,(m,S)=>(v(),rt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+S+"-"+m.folder,binding:m,"on-selected":o.onSelectedBinding,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:m.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)])):U("",!0),s.bzl_collapsed?(v(),T("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[82]||(e[82]=m=>s.bzl_collapsed=!s.bzl_collapsed)},Cje)):(v(),T("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[83]||(e[83]=m=>s.bzl_collapsed=!s.bzl_collapsed)},xje))],2)]),c("div",Oje,[c("div",Aje,[c("button",{onClick:e[84]||(e[84]=_e(m=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,wje,512),[[We,s.mzc_collapsed]]),ce(c("div",null,Dje,512),[[We,!s.mzc_collapsed]]),kje,c("div",Mje,[o.configFile.binding_name?U("",!0):(v(),T("div",Lje,[Pje,xe(" Select binding first! ")])),!s.isModelSelected&&o.configFile.binding_name?(v(),T("div",Fje,[Uje,xe(" No model selected! ")])):U("",!0),o.configFile.model_name?(v(),T("div",Bje,"|")):U("",!0),o.configFile.model_name?(v(),T("div",Gje,[c("div",qje,[c("img",{src:s.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Yje),c("h3",Vje,j(o.configFile.model_name),1)])])):U("",!0)])])]),c("div",{class:Ae([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",zje,[c("div",Hje,[c("div",$je,[s.searchModelInProgress?(v(),T("div",Wje,Qje)):U("",!0),s.searchModelInProgress?U("",!0):(v(),T("div",jje,Xje))]),ce(c("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[85]||(e[85]=m=>s.searchModel=m),onKeyup:e[86]||(e[86]=Kr((...m)=>o.searchModel_func&&o.searchModel_func(...m),["enter"]))},null,544),[[De,s.searchModel]]),s.searchModel?(v(),T("button",{key:0,onClick:e[87]||(e[87]=_e(m=>s.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")):U("",!0)])]),c("div",null,[ce(c("input",{"onUpdate:modelValue":e[88]||(e[88]=m=>s.show_only_installed_models=m),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Je,s.show_only_installed_models]]),Jje]),c("div",null,[he(l,{radioOptions:s.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),eZe,s.is_loading_zoo?(v(),T("div",tZe,sZe)):U("",!0),s.searchModel?(v(),T("div",oZe,[s.modelsFiltered.length>0?(v(),T("div",iZe,[c("label",aZe," Search results: ("+j(s.modelsFiltered.length)+") ",1),c("div",{class:Ae(["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",s.mzl_collapsed?"":"max-h-96"])},[(v(!0),T(we,null,Be(s.show_only_installed_models?o.filter_installed(s.modelsFiltered):s.modelsFiltered,(m,S)=>(v(),rt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+S+"-"+m.name,model:m,"is-installed":m.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onSelected,selected:m.name===o.configFile.model_name,model_type:m.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))],2)])):U("",!0)])):U("",!0),s.searchModel?U("",!0):(v(),T("div",lZe,[s.models_zoo&&s.models_zoo.length>0?(v(),T("div",cZe,[c("label",dZe," Models: ("+j(s.models_zoo.length)+") ",1),c("div",{class:Ae(["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",s.mzl_collapsed?"":"max-h-96"])},[(v(!0),T(we,null,Be(s.show_only_installed_models?o.filter_installed(s.models_zoo):s.models_zoo,(m,S)=>(v(),rt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+S+"-"+m.name,model:m,"is-installed":m.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onSelected,selected:m.name===o.configFile.model_name,model_type:m.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))],2)])):U("",!0)])),s.mzl_collapsed?(v(),T("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:"Collapse",type:"button",onClick:e[89]||(e[89]=(...m)=>o.open_mzl&&o.open_mzl(...m))},_Ze)):(v(),T("button",{key:4,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[90]||(e[90]=(...m)=>o.open_mzl&&o.open_mzl(...m))},mZe))],2)]),c("div",gZe,[c("div",fZe,[c("button",{onClick:e[91]||(e[91]=_e(m=>s.mzdc_collapsed=!s.mzdc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,EZe,512),[[We,s.mzdc_collapsed]]),ce(c("div",null,SZe,512),[[We,!s.mzdc_collapsed]]),yZe,o.binding_name?U("",!0):(v(),T("div",vZe,[TZe,xe(" No binding selected! ")])),o.configFile.binding_name?(v(),T("div",CZe,"|")):U("",!0),o.configFile.binding_name?(v(),T("div",RZe,[c("div",xZe,[c("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,OZe),c("h3",AZe,j(o.binding_name),1)])])):U("",!0)])]),c("div",{class:Ae([{hidden:s.mzdc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",NZe,[c("div",wZe,[c("div",null,[c("div",IZe,[DZe,ce(c("input",{type:"text","onUpdate:modelValue":e[92]||(e[92]=m=>s.reference_path=m),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),[[De,s.reference_path]])]),c("button",{type:"button",onClick:e[93]||(e[93]=_e(m=>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")]),s.modelDownlaodInProgress?U("",!0):(v(),T("div",kZe,[c("div",MZe,[LZe,ce(c("input",{type:"text","onUpdate:modelValue":e[94]||(e[94]=m=>s.addModel.url=m),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),[[De,s.addModel.url]])]),c("button",{type:"button",onClick:e[95]||(e[95]=_e(m=>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")])),s.modelDownlaodInProgress?(v(),T("div",PZe,[FZe,c("div",UZe,[c("div",BZe,[c("div",GZe,[qZe,c("span",YZe,j(Math.floor(s.addModel.progress))+"%",1)]),c("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},j(s.addModel.url),9,VZe),c("div",zZe,[c("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ht({width:s.addModel.progress+"%"})},null,4)]),c("div",HZe,[c("span",$Ze,"Download speed: "+j(o.speed_computed)+"/s",1),c("span",WZe,j(o.downloaded_size_computed)+"/"+j(o.total_size_computed),1)])])]),c("div",KZe,[c("div",QZe,[c("div",jZe,[c("button",{onClick:e[96]||(e[96]=_e((...m)=>o.onCancelInstall&&o.onCancelInstall(...m),["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 ")])])])])):U("",!0)])])],2)]),c("div",ZZe,[c("div",XZe,[c("button",{onClick:e[98]||(e[98]=_e(m=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,eXe,512),[[We,s.pzc_collapsed]]),ce(c("div",null,nXe,512),[[We,!s.pzc_collapsed]]),rXe,o.configFile.personalities?(v(),T("div",sXe,"|")):U("",!0),c("div",oXe,j(o.active_pesonality),1),o.configFile.personalities?(v(),T("div",iXe,"|")):U("",!0),o.configFile.personalities?(v(),T("div",aXe,[o.mountedPersArr.length>0?(v(),T("div",lXe,[(v(!0),T(we,null,Be(o.mountedPersArr,(m,S)=>(v(),T("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:S+"-"+m.name,ref_for:!0,ref:"mountedPersonalities"},[c("div",cXe,[c("button",{onClick:_e(C=>o.onPersonalitySelected(m),["stop"])},[c("img",{src:s.bUrl+m.avatar,onError:e[97]||(e[97]=(...C)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...C)),class:Ae(["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(m.full_path)?"border-secondary":"border-transparent z-0"]),title:m.name},null,42,uXe)],8,dXe),c("button",{onClick:_e(C=>o.unmountPersonality(m),["stop"])},mXe,8,_Xe)])]))),128))])):U("",!0)])):U("",!0)])]),c("div",{class:Ae([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",gXe,[fXe,c("div",hXe,[c("div",EXe,[s.searchPersonalityInProgress?(v(),T("div",bXe,yXe)):U("",!0),s.searchPersonalityInProgress?U("",!0):(v(),T("div",vXe,CXe))]),ce(c("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[99]||(e[99]=m=>s.searchPersonality=m),onKeyup:e[100]||(e[100]=_e((...m)=>o.searchPersonality_func&&o.searchPersonality_func(...m),["stop"]))},null,544),[[De,s.searchPersonality]]),s.searchPersonality?(v(),T("button",{key:0,onClick:e[101]||(e[101]=_e(m=>s.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")):U("",!0)])]),s.searchPersonality?U("",!0):(v(),T("div",RXe,[c("label",xXe," Personalities Category: ("+j(s.persCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[102]||(e[102]=m=>o.update_personality_category(m.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"},[(v(!0),T(we,null,Be(s.persCatgArr,(m,S)=>(v(),T("option",{key:S,selected:m==this.configFile.personality_category},j(m),9,OXe))),128))],32)])),c("div",null,[s.personalitiesFiltered.length>0?(v(),T("div",AXe,[c("label",NXe,j(s.searchPersonality?"Search results":"Personalities")+": ("+j(s.personalitiesFiltered.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(s.personalitiesFiltered,(m,S)=>(v(),rt(d,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+S+"-"+m.name,personality:m,select_language:!0,full_path:m.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(C=>C===m.full_path||C===m.full_path+":"+m.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):U("",!0)]),s.pzl_collapsed?(v(),T("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[103]||(e[103]=m=>s.pzl_collapsed=!s.pzl_collapsed)},IXe)):(v(),T("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[104]||(e[104]=m=>s.pzl_collapsed=!s.pzl_collapsed)},kXe))],2)]),c("div",MXe,[c("div",LXe,[c("button",{onClick:e[106]||(e[106]=_e(m=>s.ezc_collapsed=!s.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,FXe,512),[[We,s.ezc_collapsed]]),ce(c("div",null,BXe,512),[[We,!s.ezc_collapsed]]),GXe,o.configFile.extensions?(v(),T("div",qXe,"|")):U("",!0),o.configFile.extensions?(v(),T("div",YXe,[o.mountedExtensions.length>0?(v(),T("div",VXe,[(v(!0),T(we,null,Be(o.mountedExtensions,(m,S)=>(v(),T("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:S+"-"+m.name,ref_for:!0,ref:"mountedExtensions"},[c("div",zXe,[c("button",{onClick:_e(C=>o.onExtensionSelected(m),["stop"])},[c("img",{src:s.bUrl+m.avatar,onError:e[105]||(e[105]=(...C)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...C)),class:Ae(["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.extensions.indexOf(m.full_path)?"border-secondary":"border-transparent z-0"]),title:m.name},null,42,$Xe)],8,HXe),c("button",{onClick:_e(C=>o.unmountExtension(m),["stop"])},QXe,8,WXe)])]))),128))])):U("",!0)])):U("",!0)])]),c("div",{class:Ae([{hidden:s.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[c("div",jXe,[ZXe,c("div",XXe,[c("div",JXe,[s.searchExtensionInProgress?(v(),T("div",eJe,nJe)):U("",!0),s.searchExtensionInProgress?U("",!0):(v(),T("div",rJe,oJe))]),ce(c("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 extension...",required:"","onUpdate:modelValue":e[107]||(e[107]=m=>s.searchExtension=m),onKeyup:e[108]||(e[108]=_e((...m)=>t.searchExtension_func&&t.searchExtension_func(...m),["stop"]))},null,544),[[De,s.searchExtension]]),s.searchExtension?(v(),T("button",{key:0,onClick:e[109]||(e[109]=_e(m=>s.searchExtension="",["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")):U("",!0)])]),s.searchExtension?U("",!0):(v(),T("div",iJe,[c("label",aJe," Extensions Category: ("+j(s.extCatgArr.length)+") ",1),c("select",{id:"persCat",onChange:e[110]||(e[110]=m=>o.update_extension_category(m.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"},[(v(!0),T(we,null,Be(s.extCatgArr,(m,S)=>(v(),T("option",{key:S,selected:m==this.extension_category},j(m),9,lJe))),128))],32)])),c("div",null,[s.extensionsFiltererd.length>0?(v(),T("div",cJe,[c("label",dJe,j(s.searchExtension?"Search results":"Personalities")+": ("+j(s.extensionsFiltererd.length)+") ",1),c("div",{class:Ae(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(s.extensionsFiltererd,(m,S)=>(v(),rt(_,{ref_for:!0,ref:"extensionsZoo",key:"index-"+S+"-"+m.name,extension:m,select_language:!0,full_path:m.full_path,"on-selected":o.onExtensionSelected,"on-mount":o.mountExtension,"on-un-mount":o.unmountExtension,"on-remount":o.remountExtension,"on-reinstall":o.onExtensionReinstall,"on-settings":t.onSettingsExtension},null,8,["extension","full_path","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))]),_:1})],2)])):U("",!0)]),s.pzl_collapsed?(v(),T("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[111]||(e[111]=m=>s.pzl_collapsed=!s.pzl_collapsed)},_Je)):(v(),T("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[112]||(e[112]=m=>s.pzl_collapsed=!s.pzl_collapsed)},mJe))],2)]),c("div",gJe,[c("div",fJe,[c("button",{onClick:e[113]||(e[113]=_e(m=>s.mep_collapsed=!s.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ce(c("div",null,EJe,512),[[We,s.mep_collapsed]]),ce(c("div",null,SJe,512),[[We,!s.mep_collapsed]]),yJe])]),c("div",{class:Ae([{hidden:s.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),c("div",vJe,[c("div",TJe,[c("button",{onClick:e[114]||(e[114]=_e(m=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ce(c("div",null,RJe,512),[[We,s.mc_collapsed]]),ce(c("div",null,OJe,512),[[We,!s.mc_collapsed]]),AJe])]),c("div",{class:Ae([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[c("div",NJe,[c("div",wJe,[ce(c("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[115]||(e[115]=_e(()=>{},["stop"])),"onUpdate:modelValue":e[116]||(e[116]=m=>o.configFile.override_personality_model_parameters=m),onChange:e[117]||(e[117]=m=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[Je,o.configFile.override_personality_model_parameters]]),IJe])]),c("div",{class:Ae(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[c("div",DJe,[kJe,ce(c("input",{type:"text",id:"seed","onUpdate:modelValue":e[118]||(e[118]=m=>o.configFile.seed=m),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),[[De,o.configFile.seed]])]),c("div",MJe,[c("div",LJe,[c("div",PJe,[FJe,c("p",UJe,[ce(c("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[119]||(e[119]=m=>o.configFile.temperature=m),onChange:e[120]||(e[120]=m=>s.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),[[De,o.configFile.temperature]])])]),ce(c("input",{id:"temperature",onChange:e[121]||(e[121]=m=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[122]||(e[122]=m=>o.configFile.temperature=m),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),[[De,o.configFile.temperature]])])]),c("div",BJe,[c("div",GJe,[c("div",qJe,[YJe,c("p",VJe,[ce(c("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[123]||(e[123]=m=>o.configFile.n_predict=m),onChange:e[124]||(e[124]=m=>s.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),[[De,o.configFile.n_predict]])])]),ce(c("input",{id:"predict",type:"range",onChange:e[125]||(e[125]=m=>s.settingsChanged=!0),"onUpdate:modelValue":e[126]||(e[126]=m=>o.configFile.n_predict=m),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),[[De,o.configFile.n_predict]])])]),c("div",zJe,[c("div",HJe,[c("div",$Je,[WJe,c("p",KJe,[ce(c("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[127]||(e[127]=m=>o.configFile.top_k=m),onChange:e[128]||(e[128]=m=>s.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),[[De,o.configFile.top_k]])])]),ce(c("input",{id:"top_k",type:"range",onChange:e[129]||(e[129]=m=>s.settingsChanged=!0),"onUpdate:modelValue":e[130]||(e[130]=m=>o.configFile.top_k=m),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),[[De,o.configFile.top_k]])])]),c("div",QJe,[c("div",jJe,[c("div",ZJe,[XJe,c("p",JJe,[ce(c("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[131]||(e[131]=m=>o.configFile.top_p=m),onChange:e[132]||(e[132]=m=>s.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),[[De,o.configFile.top_p]])])]),ce(c("input",{id:"top_p",type:"range","onUpdate:modelValue":e[133]||(e[133]=m=>o.configFile.top_p=m),min:"0",max:"1",step:"0.01",onChange:e[134]||(e[134]=m=>s.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),[[De,o.configFile.top_p]])])]),c("div",eet,[c("div",tet,[c("div",net,[ret,c("p",set,[ce(c("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[135]||(e[135]=m=>o.configFile.repeat_penalty=m),onChange:e[136]||(e[136]=m=>s.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),[[De,o.configFile.repeat_penalty]])])]),ce(c("input",{id:"repeat_penalty",onChange:e[137]||(e[137]=m=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[138]||(e[138]=m=>o.configFile.repeat_penalty=m),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),[[De,o.configFile.repeat_penalty]])])]),c("div",oet,[c("div",iet,[c("div",aet,[cet,c("p",det,[ce(c("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[139]||(e[139]=m=>o.configFile.repeat_last_n=m),onChange:e[140]||(e[140]=m=>s.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),[[De,o.configFile.repeat_last_n]])])]),ce(c("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[141]||(e[141]=m=>o.configFile.repeat_last_n=m),min:"0",max:"100",step:"1",onChange:e[142]||(e[142]=m=>s.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),[[De,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),he(p,{ref:"toast"},null,512),he(g,{ref:"yesNoDialog",class:"z-20"},null,512),he(f,{ref:"addmodeldialog"},null,512),he(h,{ref:"messageBox"},null,512),he(E,{ref:"universalForm",class:"z-20"},null,512),he(b,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const _et=Ye(EWe,[["render",uet],["__scopeId","data-v-feda1672"]]),pet={components:{ClipBoardTextInput:vp,Card:ao},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};Te.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}}},met={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"},get={class:"mb-4"},fet=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),het=["value"],Eet={class:"mb-4"},bet=c("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),yet={class:"mb-4"},vet=c("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Tet={class:"mb-4"},Cet=c("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Ret={class:"mb-4"},xet=c("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Oet={class:"mb-4"},Aet=c("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Net={class:"mb-4"},wet=c("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Iet=c("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Det={key:1};function ket(t,e,n,r,s,o){const i=Pe("Card"),a=Pe("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(v(),T("div",met,[c("form",{onSubmit:e[2]||(e[2]=_e((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[he(i,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(i,{title:"Model",class:"",isHorizontal:!1},{default:ke(()=>[c("div",get,[fet,ce(c("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"},[(v(!0),T(we,null,Be(o.models,l=>(v(),T("option",{key:l,value:l},j(l),9,het))),128))],544),[[Kt,o.selectedModel]])])]),_:1}),he(i,{title:"Data",isHorizontal:!1},{default:ke(()=>[c("div",Eet,[bet,he(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),he(i,{title:"Training",isHorizontal:!1},{default:ke(()=>[c("div",yet,[vet,he(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),c("div",Tet,[Cet,he(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),c("div",Ret,[xet,he(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),c("div",Oet,[Aet,he(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),he(i,{title:"Output",isHorizontal:!1},{default:ke(()=>[c("div",Net,[wet,he(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),he(i,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[Iet]),_:1})],32)])):(v(),T("div",Det,[he(i,{title:"Info",class:"",isHorizontal:!1},{default:ke(()=>[xe(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const Met=Ye(pet,[["render",ket]]),Let={components:{ClipBoardTextInput:vp,Card:ao},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)}}},Pet={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"},Fet={class:"mb-4"},Uet=c("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Bet={class:"mb-4"},Get=c("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),qet=c("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function Yet(t,e,n,r,s,o){const i=Pe("ClipBoardTextInput"),a=Pe("Card");return v(),T("div",Pet,[c("form",{onSubmit:e[0]||(e[0]=_e((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[he(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(a,{title:"Model",class:"",isHorizontal:!1},{default:ke(()=>[c("div",Fet,[Uet,he(i,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),c("div",Bet,[Get,he(i,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),he(a,{disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[qet]),_:1})],32)])}const Vet=Ye(Let,[["render",Yet]]),zet={name:"Discussion",emits:["delete","select","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!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")},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,ve(()=>{Re.replace()})},watch:{showConfirmation(){ve(()=>{Re.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&ve(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&ve(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},Het=["id"],$et={class:"flex flex-row items-center gap-2"},Wet={key:0},Ket=["title"],Qet=["value"],jet={class:"flex items-center flex-1 max-h-6"},Zet={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},Xet=c("i",{"data-feather":"x"},null,-1),Jet=[Xet],ett=c("i",{"data-feather":"check"},null,-1),ttt=[ett],ntt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},rtt=c("i",{"data-feather":"type"},null,-1),stt=[rtt],ott=c("i",{"data-feather":"edit-2"},null,-1),itt=[ott],att=c("i",{"data-feather":"trash"},null,-1),ltt=[att];function ctt(t,e,n,r,s,o){return v(),T("div",{class:Ae([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm 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"]),id:"dis-"+n.id,onClick:e[12]||(e[12]=_e(i=>o.selectEvent(),["stop"]))},[c("div",$et,[n.isCheckbox?(v(),T("div",Wet,[ce(c("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]=_e(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=i=>s.checkBoxValue_local=i),onInput:e[2]||(e[2]=i=>o.checkedChangeEvent(i,n.id))},null,544),[[Je,s.checkBoxValue_local]])])):U("",!0),n.selected?(v(),T("div",{key:1,class:Ae(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):U("",!0),n.selected?U("",!0):(v(),T("div",{key:2,class:Ae(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),s.editTitle?U("",!0):(v(),T("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},j(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,Ket)),s.editTitle?(v(),T("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]=Kr(_e(i=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Kr(_e(i=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=i=>o.chnageTitle(i.target.value)),onClick:e[6]||(e[6]=_e(()=>{},["stop"]))},null,40,Qet)):U("",!0),c("div",jet,[s.showConfirmation?(v(),T("div",Zet,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=_e(i=>o.cancel(),["stop"]))},Jet),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=_e(i=>s.editTitleMode?o.editTitleEvent():s.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},ttt)])):U("",!0),s.showConfirmation?U("",!0):(v(),T("div",ntt,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[9]||(e[9]=_e(i=>s.makeTitleMode=!0,["stop"]))},stt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[10]||(e[10]=_e(i=>s.editTitleMode=!0,["stop"]))},itt),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[11]||(e[11]=_e(i=>s.deleteMode=!0,["stop"]))},ltt)]))])],10,Het)}const fT=Ye(zet,[["render",ctt]]),dtt={props:{htmlContent:{type:String,required:!0}}},utt=["innerHTML"];function _tt(t,e,n,r,s,o){return v(),T("div",null,[c("div",{innerHTML:n.htmlContent},null,8,utt)])}const ptt=Ye(dtt,[["render",_tt]]);const mtt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},gtt={key:0},ftt={class:"toggle-icon mr-1"},htt={key:0,class:"fas fa-plus-circle text-gray-600"},Ett={key:1,class:"fas fa-minus-circle text-gray-600"},btt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},Stt={key:0,class:"fas fa-plus-circle text-gray-600"},ytt={key:1,class:"fas fa-minus-circle text-gray-600"},vtt=["innerHTML"];function Ttt(t,e,n,r,s,o){return o.isContentPresent?(v(),T("div",gtt,[c("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...i)=>o.toggleCollapsible&&o.toggleCollapsible(...i))},[c("span",ftt,[s.collapsed?(v(),T("i",htt)):(v(),T("i",Ett))]),xe(" "+j(n.jsonFormText),1)]),ce(c("div",null,[c("div",btt,[o.isObject?(v(),T("span",{key:0,onClick:e[1]||(e[1]=(...i)=>o.toggleCollapsed&&o.toggleCollapsed(...i)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(v(),T("i",Stt)):(v(),T("i",ytt))])):U("",!0),c("pre",{innerHTML:o.formattedJson},null,8,vtt)])],512),[[We,!s.collapsed]])])):U("",!0)}const Ctt=Ye(mtt,[["render",Ttt]]),Rtt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0}}},xtt={class:"step flex items-center mb-4"},Ott={class:"flex items-center justify-center w-6 h-6 mr-2"},Att={key:0},Ntt=c("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),wtt=[Ntt],Itt={key:1},Dtt=c("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),ktt=[Dtt],Mtt={key:2},Ltt=c("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),Ptt=[Ltt],Ftt={key:0,role:"status"},Utt=c("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"},[c("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"}),c("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),Btt=[Utt];function Gtt(t,e,n,r,s,o){return v(),T("div",xtt,[c("div",Ott,[n.done?U("",!0):(v(),T("div",Att,wtt)),n.done&&n.status?(v(),T("div",Itt,ktt)):U("",!0),n.done&&!n.status?(v(),T("div",Mtt,Ptt)):U("",!0)]),n.done?U("",!0):(v(),T("div",Ftt,Btt)),c("div",{class:Ae(["content flex-1 px-2",{"text-green-500":n.done,"text-yellow-500":!n.done}])},j(n.message),3)])}const qtt=Ye(Rtt,[["render",Gtt]]);const eS="/",Ytt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:uT,Step:qtt,RenderHTMLJS:ptt,JsonViewer:Ctt,DynamicUIRenderer:gT},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:""},data(){return{msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser."),ve(()=>{Re.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight})},methods:{insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,s=e.value.substring(0,n),o=e.value.substring(r),i=s+" "+o;this.message.content=i,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},speak(){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(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const n=s=>{let o=this.message.content.substring(s,s+e);const i=[".","!","?",` +`];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{if(this.message.content.includes(".")){const s=n(t),o=this.message.content.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{r()},1)};r()},toggleModel(){this.expanded=!this.expanded},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.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?(console.log("Avatar:",eS+this.avatar),eS+this.avatar):(console.log("No avatar found"),Ks)},defaultImg(t){t.target.src=Ks},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:{"message.content":function(t){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){ve(()=>{Re.replace()})},deleteMsgMode(){ve(()=>{Re.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,ve(()=>{Re.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.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let r=e.getTime()-t.getTime();const s=Math.floor(r/(1e3*60*60));r-=s*(1e3*60*60);const o=Math.floor(r/(1e3*60));r-=o*(1e3*60);const i=Math.floor(r/1e3);r-=i*1e3;function a(u){return u<10&&(u="0"+u),u}return a(s)+"h:"+a(o)+"m:"+a(i)+"s"}}},Vtt={class:"relative group 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 flex-grow flex-wrap overflow-visible p-4 pb-2"},ztt={class:"flex flex-row gap-2"},Htt={class:"flex-shrink-0"},$tt={class:"group/avatar"},Wtt=["src","data-popover-target"],Ktt={class:"flex flex-col w-full flex-grow-0"},Qtt={class:"flex flex-row flex-grow items-start"},jtt={class:"flex flex-col mb-2"},Ztt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Xtt=["title"],Jtt=c("div",{class:"flex-grow"},null,-1),ent={class:"flex-row justify-end mx-2"},tnt={class:"invisible group-hover:visible flex flex-row"},nnt={key:0,class:"flex items-center duration-75"},rnt=c("i",{"data-feather":"x"},null,-1),snt=[rnt],ont=c("i",{"data-feather":"check"},null,-1),int=[ont],ant=c("i",{"data-feather":"edit"},null,-1),lnt=[ant],cnt=c("i",{"data-feather":"copy"},null,-1),dnt=[cnt],unt=c("i",{"data-feather":"send"},null,-1),_nt=[unt],pnt=c("i",{"data-feather":"send"},null,-1),mnt=[pnt],gnt=c("i",{"data-feather":"fast-forward"},null,-1),fnt=[gnt],hnt={key:5,class:"flex items-center duration-75"},Ent=c("i",{"data-feather":"x"},null,-1),bnt=[Ent],Snt=c("i",{"data-feather":"check"},null,-1),ynt=[Snt],vnt=c("i",{"data-feather":"trash"},null,-1),Tnt=[vnt],Cnt=c("i",{"data-feather":"thumbs-up"},null,-1),Rnt=[Cnt],xnt={class:"flex flex-row items-center"},Ont=c("i",{"data-feather":"thumbs-down"},null,-1),Ant=[Ont],Nnt={class:"flex flex-row items-center"},wnt=c("i",{"data-feather":"volume-2"},null,-1),Int=[wnt],Dnt={class:"overflow-x-auto w-full"},knt={class:"flex flex-col items-start w-full"},Mnt={class:"flex flex-col items-start w-full"},Lnt={key:1},Pnt={class:"text-sm text-gray-400 mt-2"},Fnt={class:"flex flex-row items-center gap-2"},Unt={key:0},Bnt={class:"font-thin"},Gnt={key:1},qnt={class:"font-thin"},Ynt={key:2},Vnt={class:"font-thin"},znt={key:3},Hnt=["title"];function $nt(t,e,n,r,s,o){const i=Pe("Step"),a=Pe("RenderHTMLJS"),l=Pe("MarkdownRenderer"),u=Pe("JsonViewer"),d=Pe("DynamicUIRenderer");return v(),T("div",Vtt,[c("div",ztt,[c("div",Htt,[c("div",$tt,[c("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=_=>o.defaultImg(_)),"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,Wtt)])]),c("div",Ktt,[c("div",Qtt,[c("div",jtt,[c("div",Ztt,j(n.message.sender)+" ",1),n.message.created_at?(v(),T("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},j(o.created_at),9,Xtt)):U("",!0)]),Jtt,c("div",ent,[c("div",tnt,[o.editMsgMode?(v(),T("div",nnt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=_e(_=>o.editMsgMode=!1,["stop"]))},snt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=_e((..._)=>o.updateMessage&&o.updateMessage(..._),["stop"]))},int)])):U("",!0),o.editMsgMode?U("",!0):(v(),T("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=_e(_=>o.editMsgMode=!0,["stop"]))},lnt)),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[4]||(e[4]=_e(_=>o.copyContentToClipboard(),["stop"]))},dnt),!o.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(v(),T("div",{key:2,class:Ae(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":o.editMsgMode}]),title:"Resend message with full context",onClick:e[5]||(e[5]=_e(_=>o.resendMessage("full_context"),["stop"]))},_nt,2)):U("",!0),!o.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(v(),T("div",{key:3,class:Ae(["text-lg hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":o.editMsgMode}]),title:"Resend message without the full context",onClick:e[6]||(e[6]=_e(_=>o.resendMessage("simple_question"),["stop"]))},mnt,2)):U("",!0),!o.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(v(),T("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[7]||(e[7]=_e(_=>o.continueMessage(),["stop"]))},fnt)):U("",!0),s.deleteMsgMode?(v(),T("div",hnt,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[8]||(e[8]=_e(_=>s.deleteMsgMode=!1,["stop"]))},bnt),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[9]||(e[9]=_e(_=>o.deleteMsg(),["stop"]))},ynt)])):U("",!0),!o.editMsgMode&&!s.deleteMsgMode?(v(),T("div",{key:6,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[10]||(e[10]=_=>s.deleteMsgMode=!0)},Tnt)):U("",!0),c("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[11]||(e[11]=_e(_=>o.rankUp(),["stop"]))},Rnt),c("div",xnt,[c("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[12]||(e[12]=_e(_=>o.rankDown(),["stop"]))},Ant),n.message.rank!=0?(v(),T("div",{key:0,class:Ae(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},j(n.message.rank),3)):U("",!0)]),c("div",Nnt,[c("div",{class:Ae(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[13]||(e[13]=_e(_=>o.speak(),["stop"]))},Int,2)])])])]),c("div",Dnt,[c("div",knt,[(v(!0),T(we,null,Be(n.message.steps,(_,p)=>(v(),T("div",{key:"step-"+n.message.id+"-"+p,class:"step font-bold",style:ht({backgroundColor:_.done?"transparent":"inherit"})},[he(i,{done:_.done,message:_.message,status:_.status},null,8,["done","message","status"])],4))),128))]),c("div",Mnt,[(v(!0),T(we,null,Be(n.message.html_js_s,(_,p)=>(v(),T("div",{key:"htmljs-"+n.message.id+"-"+p,class:"htmljs font-bold",style:ht({backgroundColor:t.step.done?"transparent":"inherit"})},[he(a,{htmlContent:_},null,8,["htmlContent"])],4))),128))]),o.editMsgMode?U("",!0):(v(),rt(l,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id},null,8,["host","markdown-text","message_id","discussion_id"])),c("div",null,[n.message.open?ce((v(),T("textarea",{key:0,ref:"mdTextarea",onKeydown:e[14]||(e[14]=Kr(_e((..._)=>o.insertTab&&o.insertTab(..._),["prevent"]),["tab"])),class:"block 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 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",rows:4,style:ht({minHeight:s.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[15]||(e[15]=_=>n.message.content=_)},`\r + `,36)),[[De,n.message.content]]):U("",!0)]),n.message.metadata!==null?(v(),T("div",Lnt,[(v(!0),T(we,null,Be(n.message.metadata,(_,p)=>(v(),T("div",{key:"json-"+n.message.id+"-"+p,class:"json font-bold"},[he(u,{jsonFormText:_.title,jsonData:_.content},null,8,["jsonFormText","jsonData"])]))),128))])):U("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(v(),rt(d,{key:2,class:"w-full h-full",code:n.message.ui},null,8,["code"])):U("",!0)]),c("div",Pnt,[c("div",Fnt,[n.message.binding?(v(),T("p",Unt,[xe("Binding: "),c("span",Bnt,j(n.message.binding),1)])):U("",!0),n.message.model?(v(),T("p",Gnt,[xe("Model: "),c("span",qnt,j(n.message.model),1)])):U("",!0),n.message.seed?(v(),T("p",Ynt,[xe("Seed: "),c("span",Vnt,j(n.message.seed),1)])):U("",!0),o.time_spent?(v(),T("p",znt,[xe("Time spent: "),c("span",{class:"font-thin",title:"Finished generating: "+o.finished_generating_at_parsed},j(o.time_spent),9,Hnt)])):U("",!0)])])])])])}const hT=Ye(Ytt,[["render",$nt]]),Wnt="/";Te.defaults.baseURL="/";const Knt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Sr,UniversalForm:ea},data(){return{bUrl:Wnt,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 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:{onSettingsPersonality(t){try{Te.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{Te.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+r,4,!1)})}catch(r){this.$refs.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+r.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(ve(()=>{Re.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Te.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ms}}},Knt={class:"w-fit select-none"},Qnt={key:0,class:"flex -space-x-4"},jnt=["src","title"],Znt={key:1,class:"flex -space-x-4"},Xnt=["src","title"],Jnt={key:2,title:"Loading personalities"},ert=c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1),trt=[ert];function nrt(t,e,n,r,s,o){const i=Pe("UniversalForm");return v(),T(we,null,[c("div",Knt,[o.mountedPersArr.length>1?(v(),T("div",Qnt,[c("img",{src:s.bUrl+o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+o.mountedPers.name,onClick:e[1]||(e[1]=a=>o.onSettingsPersonality(o.mountedPers))},null,40,jnt),c("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+j(o.mountedPersArr.length-1),1)])):U("",!0),o.mountedPersArr.length==1?(v(),T("div",Znt,[c("img",{src:s.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"]))},null,40,Xnt)])):U("",!0),o.mountedPersArr.length==0?(v(),T("div",Jnt,trt)):U("",!0)]),he(i,{ref:"universalForm",class:"z-20"},null,512)],64)}const rrt=Ye(Wnt,[["render",nrt]]);const srt="/";Te.defaults.baseURL="/";const ort={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:mT,Toast:Sr,UniversalForm:ea},name:"MountedPersonalitiesList",data(){return{bUrl:srt,isMounted:!1,isLoading:!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)}},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:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await Te.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ms},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,Te.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality + Endpoint error: `+r.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(ve(()=>{Re.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Te.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ms}}},Qnt={class:"w-fit select-none"},jnt={key:0,class:"flex -space-x-4"},Znt=["src","title"],Xnt={key:1,class:"flex -space-x-4"},Jnt=["src","title"],ert={key:2,title:"Loading personalities"},trt=c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1),nrt=[trt];function rrt(t,e,n,r,s,o){const i=Pe("UniversalForm");return v(),T(we,null,[c("div",Qnt,[o.mountedPersArr.length>1?(v(),T("div",jnt,[c("img",{src:s.bUrl+o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+o.mountedPers.name,onClick:e[1]||(e[1]=a=>o.onSettingsPersonality(o.mountedPers))},null,40,Znt),c("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+j(o.mountedPersArr.length-1),1)])):U("",!0),o.mountedPersArr.length==1?(v(),T("div",Xnt,[c("img",{src:s.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"]))},null,40,Jnt)])):U("",!0),o.mountedPersArr.length==0?(v(),T("div",ert,nrt)):U("",!0)]),he(i,{ref:"universalForm",class:"z-20"},null,512)],64)}const srt=Ye(Knt,[["render",rrt]]);const ort="/";Te.defaults.baseURL="/";const irt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:mT,Toast:Sr,UniversalForm:ea},name:"MountedPersonalitiesList",data(){return{bUrl:ort,isMounted:!1,isLoading:!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)}},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:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await Te.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ms},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,Te.post("/reinstall_personality",{name:t.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOnTalk(t){if(Re.replace(),console.log("ppa",t),t){if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t);this.onTalk(t)}},async onPersonalitySelected(t){if(Re.replace(),console.log("Selected personality : ",JSON.stringify(t.personality)),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{Te.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.personality.name,"Save changes","Cancel").then(n=>{try{Te.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. @@ -167,17 +167,17 @@ You need to apply changes before you leave, or else.`,"Apply configuration","Can Error: `+e.error,4,!1))},async reMountPersonality(t){if(console.log("remount pers",t),!t)return;if(!this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(t.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality remounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality: `+t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality Error: `+e.error,4,!1))},async unmountPersonality(t){if(!t)return;console.log(`Unmounting ${JSON.stringify(t.personality)}`);const e=await this.unmount_personality(t.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const n=this.configFile.personalities[this.configFile.active_personality_id],r=this.personalities.findIndex(a=>a.full_path==n),s=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path),o=this.personalities[r];o.isMounted=!1,o.selected=!0,this.$refs.personalitiesZoo[s].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(o)).status&&Re.replace(),this.$refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this.$refs.toast.showToast(`Could not unmount personality -Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;eo.full_path==n),s=this.personalities[r];if(s)console.log("adding from config"),t.push(s);else{console.log("adding default");const o=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),i=this.personalities[o];t.push(i)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==n);if(console.log("discussionPersonalities -includes",r),console.log("discussionPersonalities -mounted list",this.mountedPersArr),r==-1){const s=this.personalities.findIndex(i=>i.full_path==n),o=this.personalities[s];console.log("adding discucc121",o,n),o&&(this.mountedPersArr.push(o),console.log("adding discucc",o))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},Cp=t=>(hr("data-v-d16a58b9"),t=t(),Er(),t),irt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-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"},art={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},lrt=Cp(()=>c("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"},[c("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"}),c("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)),crt=Cp(()=>c("span",{class:"sr-only"},"Loading...",-1)),drt=[lrt,crt],urt=Cp(()=>c("i",{"data-feather":"chevron-down"},null,-1)),_rt=[urt],prt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},mrt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function grt(t,e,n,r,s,o){const i=Pe("personality-entry"),a=Pe("Toast"),l=Pe("UniversalForm");return v(),T("div",irt,[s.isLoading?(v(),T("div",art,drt)):U("",!0),c("div",null,[o.mountedPersArr.length>0?(v(),T("div",{key:0,class:Ae(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[c("button",{class:"mt-0 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:"Close personality list",type:"button",onClick:e[0]||(e[0]=_e((...u)=>o.toggleShowPersList&&o.toggleShowPersList(...u),["stop"]))},_rt),c("label",prt," Mounted Personalities: ("+j(o.mountedPersArr.length)+") ",1),c("div",mrt,[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(this.$store.state.mountedPersArr,(u,d)=>(v(),rt(i,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:o.configFile.personalities[o.configFile.active_personality_id]===u.full_path||o.configFile.personalities[o.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":o.onPersonalitySelected,"on-mount":o.onPersonalityMounted,"on-un-mount":o.onPersonalityUnMounted,"on-remount":o.onPersonalityRemount,"on-settings":o.onSettingsPersonality,"on-reinstall":o.onPersonalityReinstall,"on-talk":o.handleOnTalk},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-settings","on-reinstall","on-talk"]))),128))]),_:1})])],2)):U("",!0)]),he(a,{ref:"toast"},null,512),he(l,{ref:"universalForm",class:"z-20"},null,512)])}const frt=Ye(ort,[["render",grt],["__scopeId","data-v-d16a58b9"]]);const hrt={components:{InteractiveMenu:lo},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){nextTick(()=>{Re.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};Ne.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,Ne.off("file_received")}),Ne.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){nextTick(()=>{Re.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)}},mounted(){this.commands=this.commandsList,document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Ert=t=>(hr("data-v-52cfa09c"),t=t(),Er(),t),brt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Srt=Ert(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),yrt=[Srt];function vrt(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return s.loading?(v(),T("div",brt,yrt)):(v(),rt(i,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const Trt=Ye(hrt,[["render",vrt],["__scopeId","data-v-52cfa09c"]]);console.log("modelImgPlaceholder:",zn);const Crt="/",Rrt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage"],props:{onTalk:Function,discussionList:Array,loading:!1,onShowToastMessage:Function},components:{Toast:Sr,UniversalForm:ea,MountedPersonalities:rrt,MountedPersonalitiesList:frt,PersonalitiesCommands:Trt,InteractiveMenu:lo},setup(){},data(){return{modelImgPlaceholder:zn,bUrl:Crt,message:"",selecting_model:!1,selectedModel:"",isLesteningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:""}},computed:{currentModel(){return this.$store.state.currentModel},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Te.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get binding settings responses. +Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;eo.full_path==n),s=this.personalities[r];if(s)console.log("adding from config"),t.push(s);else{console.log("adding default");const o=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),i=this.personalities[o];t.push(i)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;es.full_path==n);if(console.log("discussionPersonalities -includes",r),console.log("discussionPersonalities -mounted list",this.mountedPersArr),r==-1){const s=this.personalities.findIndex(i=>i.full_path==n),o=this.personalities[s];console.log("adding discucc121",o,n),o&&(this.mountedPersArr.push(o),console.log("adding discucc",o))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},Cp=t=>(hr("data-v-d16a58b9"),t=t(),Er(),t),art={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-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"},lrt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},crt=Cp(()=>c("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"},[c("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"}),c("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)),drt=Cp(()=>c("span",{class:"sr-only"},"Loading...",-1)),urt=[crt,drt],_rt=Cp(()=>c("i",{"data-feather":"chevron-down"},null,-1)),prt=[_rt],mrt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},grt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function frt(t,e,n,r,s,o){const i=Pe("personality-entry"),a=Pe("Toast"),l=Pe("UniversalForm");return v(),T("div",art,[s.isLoading?(v(),T("div",lrt,urt)):U("",!0),c("div",null,[o.mountedPersArr.length>0?(v(),T("div",{key:0,class:Ae(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[c("button",{class:"mt-0 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:"Close personality list",type:"button",onClick:e[0]||(e[0]=_e((...u)=>o.toggleShowPersList&&o.toggleShowPersList(...u),["stop"]))},prt),c("label",mrt," Mounted Personalities: ("+j(o.mountedPersArr.length)+") ",1),c("div",grt,[he(Vn,{name:"bounce"},{default:ke(()=>[(v(!0),T(we,null,Be(this.$store.state.mountedPersArr,(u,d)=>(v(),rt(i,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:o.configFile.personalities[o.configFile.active_personality_id]===u.full_path||o.configFile.personalities[o.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":o.onPersonalitySelected,"on-mount":o.onPersonalityMounted,"on-un-mount":o.onPersonalityUnMounted,"on-remount":o.onPersonalityRemount,"on-settings":o.onSettingsPersonality,"on-reinstall":o.onPersonalityReinstall,"on-talk":o.handleOnTalk},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-settings","on-reinstall","on-talk"]))),128))]),_:1})])],2)):U("",!0)]),he(a,{ref:"toast"},null,512),he(l,{ref:"universalForm",class:"z-20"},null,512)])}const hrt=Ye(irt,[["render",frt],["__scopeId","data-v-d16a58b9"]]);const Ert={components:{InteractiveMenu:lo},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){nextTick(()=>{Re.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};Ne.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,Ne.off("file_received")}),Ne.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){nextTick(()=>{Re.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)}},mounted(){this.commands=this.commandsList,document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},brt=t=>(hr("data-v-52cfa09c"),t=t(),Er(),t),Srt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},yrt=brt(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),vrt=[yrt];function Trt(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return s.loading?(v(),T("div",Srt,vrt)):(v(),rt(i,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const Crt=Ye(Ert,[["render",Trt],["__scopeId","data-v-52cfa09c"]]);console.log("modelImgPlaceholder:",zn);const Rrt="/",xrt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage"],props:{onTalk:Function,discussionList:Array,loading:!1,onShowToastMessage:Function},components:{Toast:Sr,UniversalForm:ea,MountedPersonalities:srt,MountedPersonalitiesList:hrt,PersonalitiesCommands:Crt,InteractiveMenu:lo},setup(){},data(){return{modelImgPlaceholder:zn,bUrl:Rrt,message:"",selecting_model:!1,selectedModel:"",isLesteningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:""}},computed:{currentModel(){return this.$store.state.currentModel},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Te.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$refs.toast.showToast(`Did not get binding settings responses. Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$refs.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$refs.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},async unmountPersonality(t){if(this.loading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.$store.state.config.personalities=e.personalities,this.$refs.toast.showToast("Personality unmounted",4,!0),this.$store.dispatch("refreshMountedPersonalities");const n=this.$store.state.mountedPersArr[this.$store.state.mountedPersArr.length-1];console.log(n,this.$store.state.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality: `+n.name,4,!0)}else this.$refs.toast.showToast(`Could not unmount personality Error: `+e.error,4,!1);this.loading=!1},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={language:t.language,category:t.category,folder:t.folder};try{const n=await Te.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async onPersonalitySelected(t){if(console.log("on pers",t),console.log("selecting ",t),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted&&this.$store.state.config.personalities.includes(t.full_path)){const e=await this.select_personality(t);console.log("pers is mounted",e),e&&e.status&&e.active_personality_id>-1?this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0):this.$refs.toast.showToast(`Error on select personality: -`+t.name,4,!1)}else console.log("mounting pers"),this.mountPersonality(t);ve(()=>{Re.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const n={id:this.$store.state.config.personalities.findIndex(r=>r===t.full_path)};try{const r=await Te.post("/select_personality",n);if(r)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),r.data}catch(r){console.log(r.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,Te.post("/update_setting",{setting_name:"model_name",setting_value:t.name}).then(async e=>{console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$refs.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$refs.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},clear_files(){Te.get("/clear_personality_files_list").then(t=>{t.data.status?console.log("Files removed"):console.log("Files couldn't be removed")}),this.filesList=[],this.isFileSentList=[]},send_file(t,e){const n=new FileReader,r=24*1024;let s=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=s+a.byteLength>=t.size;Ne.emit("send_file_chunk",{filename:t.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:o}),s+=a.byteLength,o++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.onShowToastMessage("File uploaded successfully",4,!0),this.loading=!1,e()):i()};function i(){const a=t.slice(s,s+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),i()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage")},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},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.isLesteningToVoice=!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.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){this.showPersonalities=!1,this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return ve(()=>{Re.replace()}),Xt(t)},removeItem(t){this.filesList=this.filesList.filter(e=>e!=t)},sendMessageEvent(t){this.filesList=[],this.$emit("messageSentEvent",t)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},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="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t.target.files];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[n];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{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(){ve(()=>{Re.replace()})},loading(t,e){ve(()=>{Re.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Re.replace()})},activated(){ve(()=>{Re.replace()})}},it=t=>(hr("data-v-424e1da1"),t=t(),Er(),t),xrt={class:"absolute bottom-0 min-w-96 w-full justify-center text-center p-4"},Ort={key:0,class:"flex items-center justify-center w-full"},Art={class:"flex flex-row p-2 rounded-t-lg"},Nrt=it(()=>c("label",{for:"chat",class:"sr-only"},"Send message",-1)),wrt={class:"px-3 py-3 rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel shadow-lg"},Irt={class:"flex flex-col gap-2"},Drt={class:"flex"},krt=["title"],Mrt=it(()=>c("i",{"data-feather":"list"},null,-1)),Lrt=[Mrt],Prt={key:0},Frt={class:"flex flex-col max-h-64"},Urt=["title"],Brt={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary"},Grt={key:0,filesList:"",role:"status"},qrt=it(()=>c("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"},[c("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"}),c("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)),Yrt=it(()=>c("span",{class:"sr-only"},"Loading...",-1)),Vrt=[qrt,Yrt],zrt=it(()=>c("div",null,[c("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),Hrt=it(()=>c("div",{class:"grow"},null,-1)),$rt={class:"flex flex-row items-center"},Wrt={class:"whitespace-nowrap"},Krt=["onClick"],Qrt=it(()=>c("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),jrt=[Qrt],Zrt={key:1,class:"flex items-center mx-1"},Xrt={class:"whitespace-nowrap flex flex-row gap-2"},Jrt=it(()=>c("p",{class:"font-bold"}," Total size: ",-1)),est=it(()=>c("div",{class:"grow"},null,-1)),tst=it(()=>c("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),nst=[tst],rst={key:2,class:"mx-1"},sst={class:"flex flex-row flex-grow items-center gap-2 overflow-visible"},ost={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},ist=it(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Selecting model...")],-1)),ast=[ist],lst={key:1,class:"w-fit group relative"},cst={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},dst={key:0,class:"group items-center flex flex-row"},ust=["onClick"],_st=["src","title"],pst={class:"group items-center flex flex-row"},mst=["src","title"],gst={class:"w-fit group relative"},fst={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},hst={key:0,class:"group items-center flex flex-row"},Est=["onClick"],bst=["src","title"],Sst=["onClick"],yst=it(()=>c("span",{class:"hidden hover:block top-3 left-9 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),vst=[yst],Tst={class:"w-fit"},Cst={class:"relative grow"},Rst=it(()=>c("i",{"data-feather":"file-plus"},null,-1)),xst=[Rst],Ost={class:"inline-flex justify-center rounded-full"},Ast=it(()=>c("i",{"data-feather":"mic"},null,-1)),Nst=[Ast],wst=it(()=>c("i",{"data-feather":"message-square"},null,-1)),Ist=it(()=>c("span",{class:"sr-only"},"New empty User message",-1)),Dst=[wst,Ist],kst=it(()=>c("i",{"data-feather":"message-square"},null,-1)),Mst=it(()=>c("span",{class:"sr-only"},"New empty message",-1)),Lst=[kst,Mst],Pst=it(()=>c("i",{"data-feather":"send"},null,-1)),Fst=it(()=>c("span",{class:"sr-only"},"Send message",-1)),Ust=[Pst,Fst],Bst={key:4,title:"Waiting for reply"},Gst=it(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),qst=[Gst];function Yst(t,e,n,r,s,o){const i=Pe("MountedPersonalitiesList"),a=Pe("MountedPersonalities"),l=Pe("PersonalitiesCommands"),u=Pe("Toast"),d=Pe("UniversalForm");return v(),T(we,null,[c("div",xrt,[n.loading?(v(),T("div",Ort,[c("div",Art,[c("button",{type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[0]||(e[0]=_e((..._)=>o.stopGenerating&&o.stopGenerating(..._),["stop"]))}," Stop generating ")])])):U("",!0),c("form",null,[Nrt,c("div",wrt,[c("div",Irt,[c("div",Drt,[s.filesList.length>0?(v(),T("button",{key:0,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:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[1]||(e[1]=_e(_=>s.showfilesList=!s.showfilesList,["stop"]))},Lrt,8,krt)):U("",!0)]),s.filesList.length>0&&s.showfilesList==!0?(v(),T("div",Prt,[c("div",Frt,[he(Vn,{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:ke(()=>[(v(!0),T(we,null,Be(s.filesList,(_,p)=>(v(),T("div",{key:p+"-"+_.name},[c("div",{class:"m-1",title:_.name},[c("div",Brt,[s.isFileSentList[p]?U("",!0):(v(),T("div",Grt,Vrt)),zrt,c("div",{class:Ae(["line-clamp-1 w-3/5",s.isFileSentList[p]?"text-green-200":"text-red-200"])},j(_.name),3),Hrt,c("div",$rt,[c("p",Wrt,j(o.computedFileSize(_.size)),1),c("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:g=>o.removeItem(_)},jrt,8,Krt)])])],8,Urt)]))),128))]),_:1})])])):U("",!0),s.filesList.length>0?(v(),T("div",Zrt,[c("div",Xrt,[Jrt,xe(" "+j(s.totalSize)+" ("+j(s.filesList.length)+") ",1)]),est,c("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[2]||(e[2]=(..._)=>o.clear_files&&o.clear_files(..._))},nst)])):U("",!0),s.showPersonalities?(v(),T("div",rst,[he(i,{ref:"mountedPersList",onShowPersList:o.onShowPersListFun,"on-mounted":o.onMountFun,"on-un-mounted":o.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":o.handleOnTalk,discussionPersonalities:o.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):U("",!0),c("div",sst,[s.selecting_model?(v(),T("div",ost,ast)):U("",!0),n.loading?U("",!0):(v(),T("div",lst,[c("div",cst,[(v(!0),T(we,null,Be(o.installedModels,(_,p)=>(v(),T("div",{class:"w-full",key:p+"-"+_.name,ref_for:!0,ref:"installedModels"},[_.name!=o.model_name?(v(),T("div",dst,[c("button",{onClick:_e(g=>o.setModel(_),["prevent"]),class:"w-8 h-8"},[c("img",{src:_.icon?_.icon:s.modelImgPlaceholder,onError:e[3]||(e[3]=(...g)=>s.modelImgPlaceholder&&s.modelImgPlaceholder(...g)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:_.name},null,40,_st)],8,ust)])):U("",!0)]))),128))]),c("div",pst,[c("button",{onClick:e[5]||(e[5]=_e(_=>o.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:o.currentModel.icon?o.currentModel.icon:s.modelImgPlaceholder,onError:e[4]||(e[4]=(..._)=>s.modelImgPlaceholder&&s.modelImgPlaceholder(..._)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:o.currentModel?o.currentModel.name:"unknown"},null,40,mst)])])])),c("div",gst,[c("div",fst,[(v(!0),T(we,null,Be(this.$store.state.mountedPersArr,(_,p)=>(v(),T("div",{class:"w-full",key:p+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[p!=this.$store.state.config.active_personality_id?(v(),T("div",hst,[c("button",{onClick:_e(g=>o.onPersonalitySelected(_),["prevent"]),class:"w-8 h-8"},[c("img",{src:s.bUrl+_.avatar,onError:e[6]||(e[6]=(...g)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...g)),class:Ae(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,bst)],8,Est),c("button",{onClick:_e(g=>o.unmountPersonality(_),["prevent"])},vst,8,Sst)])):U("",!0)]))),128))]),he(a,{ref:"mountedPers",onShowPersList:o.onShowPersListFun,onReady:o.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])]),c("div",Tst,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(v(),rt(l,{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"])):U("",!0)]),c("div",Cst,[ce(c("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[7]||(e[7]=_=>s.message=_),title:"Hold SHIFT + ENTER to add new line",class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[8]||(e[8]=Kr(_e(_=>o.submitOnEnter(_),["exact"]),["enter"]))},`\r +`+t.name,4,!1)}else console.log("mounting pers"),this.mountPersonality(t);ve(()=>{Re.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const n={id:this.$store.state.config.personalities.findIndex(r=>r===t.full_path)};try{const r=await Te.post("/select_personality",n);if(r)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),r.data}catch(r){console.log(r.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,Te.post("/update_setting",{setting_name:"model_name",setting_value:t.name}).then(async e=>{console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$refs.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$refs.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},clear_files(){Te.get("/clear_personality_files_list").then(t=>{t.data.status?console.log("Files removed"):console.log("Files couldn't be removed")}),this.filesList=[],this.isFileSentList=[]},send_file(t,e){const n=new FileReader,r=24*1024;let s=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=s+a.byteLength>=t.size;Ne.emit("send_file_chunk",{filename:t.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:o}),s+=a.byteLength,o++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.onShowToastMessage("File uploaded successfully",4,!0),this.loading=!1,e()):i()};function i(){const a=t.slice(s,s+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),i()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage")},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},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.isLesteningToVoice=!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.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){this.showPersonalities=!1,this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return ve(()=>{Re.replace()}),Xt(t)},removeItem(t){this.filesList=this.filesList.filter(e=>e!=t)},sendMessageEvent(t){this.filesList=[],this.$emit("messageSentEvent",t)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},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="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t.target.files];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const s=e[n];this.filesList.push(s),this.isFileSentList.push(!1),this.send_file(s,()=>{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(){ve(()=>{Re.replace()})},loading(t,e){ve(()=>{Re.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Re.replace()})},activated(){ve(()=>{Re.replace()})}},it=t=>(hr("data-v-424e1da1"),t=t(),Er(),t),Ort={class:"absolute bottom-0 min-w-96 w-full justify-center text-center p-4"},Art={key:0,class:"flex items-center justify-center w-full"},Nrt={class:"flex flex-row p-2 rounded-t-lg"},wrt=it(()=>c("label",{for:"chat",class:"sr-only"},"Send message",-1)),Irt={class:"px-3 py-3 rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel shadow-lg"},Drt={class:"flex flex-col gap-2"},krt={class:"flex"},Mrt=["title"],Lrt=it(()=>c("i",{"data-feather":"list"},null,-1)),Prt=[Lrt],Frt={key:0},Urt={class:"flex flex-col max-h-64"},Brt=["title"],Grt={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary"},qrt={key:0,filesList:"",role:"status"},Yrt=it(()=>c("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"},[c("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"}),c("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)),Vrt=it(()=>c("span",{class:"sr-only"},"Loading...",-1)),zrt=[Yrt,Vrt],Hrt=it(()=>c("div",null,[c("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),$rt=it(()=>c("div",{class:"grow"},null,-1)),Wrt={class:"flex flex-row items-center"},Krt={class:"whitespace-nowrap"},Qrt=["onClick"],jrt=it(()=>c("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),Zrt=[jrt],Xrt={key:1,class:"flex items-center mx-1"},Jrt={class:"whitespace-nowrap flex flex-row gap-2"},est=it(()=>c("p",{class:"font-bold"}," Total size: ",-1)),tst=it(()=>c("div",{class:"grow"},null,-1)),nst=it(()=>c("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),rst=[nst],sst={key:2,class:"mx-1"},ost={class:"flex flex-row flex-grow items-center gap-2 overflow-visible"},ist={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},ast=it(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Selecting model...")],-1)),lst=[ast],cst={key:1,class:"w-fit group relative"},dst={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},ust={key:0,class:"group items-center flex flex-row"},_st=["onClick"],pst=["src","title"],mst={class:"group items-center flex flex-row"},gst=["src","title"],fst={class:"w-fit group relative"},hst={class:"group w-full inline-flex absolute opacity-0 group-hover:opacity-100 transform group-hover:-translate-y-10 group-hover:translate-x-15 transition-all duration-300"},Est={key:0,class:"group items-center flex flex-row"},bst=["onClick"],Sst=["src","title"],yst=["onClick"],vst=it(()=>c("span",{class:"hidden hover:block top-3 left-9 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[c("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"},[c("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)),Tst=[vst],Cst={class:"w-fit"},Rst={class:"relative grow"},xst=it(()=>c("i",{"data-feather":"file-plus"},null,-1)),Ost=[xst],Ast={class:"inline-flex justify-center rounded-full"},Nst=it(()=>c("i",{"data-feather":"mic"},null,-1)),wst=[Nst],Ist=it(()=>c("i",{"data-feather":"message-square"},null,-1)),Dst=it(()=>c("span",{class:"sr-only"},"New empty User message",-1)),kst=[Ist,Dst],Mst=it(()=>c("i",{"data-feather":"message-square"},null,-1)),Lst=it(()=>c("span",{class:"sr-only"},"New empty message",-1)),Pst=[Mst,Lst],Fst=it(()=>c("i",{"data-feather":"send"},null,-1)),Ust=it(()=>c("span",{class:"sr-only"},"Send message",-1)),Bst=[Fst,Ust],Gst={key:4,title:"Waiting for reply"},qst=it(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Yst=[qst];function Vst(t,e,n,r,s,o){const i=Pe("MountedPersonalitiesList"),a=Pe("MountedPersonalities"),l=Pe("PersonalitiesCommands"),u=Pe("Toast"),d=Pe("UniversalForm");return v(),T(we,null,[c("div",Ort,[n.loading?(v(),T("div",Art,[c("div",Nrt,[c("button",{type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[0]||(e[0]=_e((..._)=>o.stopGenerating&&o.stopGenerating(..._),["stop"]))}," Stop generating ")])])):U("",!0),c("form",null,[wrt,c("div",Irt,[c("div",Drt,[c("div",krt,[s.filesList.length>0?(v(),T("button",{key:0,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:s.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[1]||(e[1]=_e(_=>s.showfilesList=!s.showfilesList,["stop"]))},Prt,8,Mrt)):U("",!0)]),s.filesList.length>0&&s.showfilesList==!0?(v(),T("div",Frt,[c("div",Urt,[he(Vn,{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:ke(()=>[(v(!0),T(we,null,Be(s.filesList,(_,p)=>(v(),T("div",{key:p+"-"+_.name},[c("div",{class:"m-1",title:_.name},[c("div",Grt,[s.isFileSentList[p]?U("",!0):(v(),T("div",qrt,zrt)),Hrt,c("div",{class:Ae(["line-clamp-1 w-3/5",s.isFileSentList[p]?"text-green-200":"text-red-200"])},j(_.name),3),$rt,c("div",Wrt,[c("p",Krt,j(o.computedFileSize(_.size)),1),c("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:g=>o.removeItem(_)},Zrt,8,Qrt)])])],8,Brt)]))),128))]),_:1})])])):U("",!0),s.filesList.length>0?(v(),T("div",Xrt,[c("div",Jrt,[est,xe(" "+j(s.totalSize)+" ("+j(s.filesList.length)+") ",1)]),tst,c("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[2]||(e[2]=(..._)=>o.clear_files&&o.clear_files(..._))},rst)])):U("",!0),s.showPersonalities?(v(),T("div",sst,[he(i,{ref:"mountedPersList",onShowPersList:o.onShowPersListFun,"on-mounted":o.onMountFun,"on-un-mounted":o.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":o.handleOnTalk,discussionPersonalities:o.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):U("",!0),c("div",ost,[s.selecting_model?(v(),T("div",ist,lst)):U("",!0),n.loading?U("",!0):(v(),T("div",cst,[c("div",dst,[(v(!0),T(we,null,Be(o.installedModels,(_,p)=>(v(),T("div",{class:"w-full",key:p+"-"+_.name,ref_for:!0,ref:"installedModels"},[_.name!=o.model_name?(v(),T("div",ust,[c("button",{onClick:_e(g=>o.setModel(_),["prevent"]),class:"w-8 h-8"},[c("img",{src:_.icon?_.icon:s.modelImgPlaceholder,onError:e[3]||(e[3]=(...g)=>s.modelImgPlaceholder&&s.modelImgPlaceholder(...g)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:_.name},null,40,pst)],8,_st)])):U("",!0)]))),128))]),c("div",mst,[c("button",{onClick:e[5]||(e[5]=_e(_=>o.showModelConfig(),["prevent"])),class:"w-8 h-8"},[c("img",{src:o.currentModel.icon?o.currentModel.icon:s.modelImgPlaceholder,onError:e[4]||(e[4]=(..._)=>s.modelImgPlaceholder&&s.modelImgPlaceholder(..._)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",title:o.currentModel?o.currentModel.name:"unknown"},null,40,gst)])])])),c("div",fst,[c("div",hst,[(v(!0),T(we,null,Be(this.$store.state.mountedPersArr,(_,p)=>(v(),T("div",{class:"w-full",key:p+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[p!=this.$store.state.config.active_personality_id?(v(),T("div",Est,[c("button",{onClick:_e(g=>o.onPersonalitySelected(_),["prevent"]),class:"w-8 h-8"},[c("img",{src:s.bUrl+_.avatar,onError:e[6]||(e[6]=(...g)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...g)),class:Ae(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary",this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,Sst)],8,bst),c("button",{onClick:_e(g=>o.unmountPersonality(_),["prevent"])},Tst,8,yst)])):U("",!0)]))),128))]),he(a,{ref:"mountedPers",onShowPersList:o.onShowPersListFun,onReady:o.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])]),c("div",Cst,[s.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(v(),rt(l,{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"])):U("",!0)]),c("div",Rst,[ce(c("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[7]||(e[7]=_=>s.message=_),title:"Hold SHIFT + ENTER to add new line",class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[8]||(e[8]=Kr(_e(_=>o.submitOnEnter(_),["exact"]),["enter"]))},`\r \r \r - `,544),[[De,s.message]]),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[9]||(e[9]=(..._)=>o.addFiles&&o.addFiles(..._)),multiple:""},null,544),c("button",{type:"button",onClick:e[10]||(e[10]=_e(_=>t.$refs.fileDialog.click(),["stop"])),title:"Add files",class:"absolute inset-y-0 right-0 flex items-center mr-2 w-6 hover:text-secondary duration-75 active:scale-90"},xst)]),c("div",Ost,[n.loading?U("",!0):(v(),T("button",{key:0,type:"button",onClick:e[11]||(e[11]=(..._)=>o.startSpeechRecognition&&o.startSpeechRecognition(..._)),class:Ae([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},Nst,2)),n.loading?U("",!0):(v(),T("button",{key:1,type:"button",onClick:e[12]||(e[12]=(..._)=>o.makeAnEmptyUserMessage&&o.makeAnEmptyUserMessage(..._)),title:"New empty user message",class:"w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90"},Dst)),n.loading?U("",!0):(v(),T("button",{key:2,type:"button",onClick:e[13]||(e[13]=(..._)=>o.makeAnEmptyAIMessage&&o.makeAnEmptyAIMessage(..._)),title:"New empty ai message",class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90"},Lst)),n.loading?U("",!0):(v(),T("button",{key:3,type:"button",onClick:e[14]||(e[14]=(..._)=>o.submit&&o.submit(..._)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},Ust)),n.loading?(v(),T("div",Bst,qst)):U("",!0)])])])])])]),he(u,{ref:"toast"},null,512),he(d,{ref:"universalForm",class:"z-20"},null,512)],64)}const ET=Ye(Rrt,[["render",Yst],["__scopeId","data-v-424e1da1"]]),Vst={name:"WelcomeComponent",setup(){return{}}},zst={class:"flex flex-col text-center"},Hst=G_('
Logo

Lord of Large Language Models

One tool to rule them all


Welcome

Please create a new discussion or select existing one to start

',1),$st=[Hst];function Wst(t,e,n,r,s,o){return v(),T("div",zst,$st)}const bT=Ye(Vst,[["render",Wst]]);var Kst=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}(),pi=globalThis&&globalThis.__assign||function(){return pi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n"u")return!1;var e=Tt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function aot(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},s=e.attributes[n]||{},o=e.elements[n];!It(o)||!rn(o)||(Object.assign(o.style,r),Object.keys(s).forEach(function(i){var a=s[i];a===!1?o.removeAttribute(i):o.setAttribute(i,a===!0?"":a)}))})}function lot(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var s=e.elements[r],o=e.attributes[r]||{},i=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=i.reduce(function(l,u){return l[u]="",l},{});!It(s)||!rn(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}const cot={name:"applyStyles",enabled:!0,phase:"write",fn:aot,effect:lot,requires:["computeStyles"]};function en(t){return t.split("-")[0]}var ur=Math.max,hi=Math.min,ts=Math.round;function f_(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xT(){return!/^((?!chrome|android).)*safari/i.test(f_())}function ns(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,o=1;e&&It(t)&&(s=t.offsetWidth>0&&ts(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ts(r.height)/t.offsetHeight||1);var i=gr(t)?Tt(t):window,a=i.visualViewport,l=!xT()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/s,d=(r.top+(l&&a?a.offsetTop:0))/o,_=r.width/s,p=r.height/o;return{width:_,height:p,top:d,right:u+_,bottom:d+p,left:u,x:u,y:d}}function Ip(t){var e=ns(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function OT(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&wp(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function En(t){return Tt(t).getComputedStyle(t)}function dot(t){return["table","td","th"].indexOf(rn(t))>=0}function Qn(t){return((gr(t)?t.ownerDocument:t.document)||window.document).documentElement}function ta(t){return rn(t)==="html"?t:t.assignedSlot||t.parentNode||(wp(t)?t.host:null)||Qn(t)}function sS(t){return!It(t)||En(t).position==="fixed"?null:t.offsetParent}function uot(t){var e=/firefox/i.test(f_()),n=/Trident/i.test(f_());if(n&&It(t)){var r=En(t);if(r.position==="fixed")return null}var s=ta(t);for(wp(s)&&(s=s.host);It(s)&&["html","body"].indexOf(rn(s))<0;){var o=En(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function uo(t){for(var e=Tt(t),n=sS(t);n&&dot(n)&&En(n).position==="static";)n=sS(n);return n&&(rn(n)==="html"||rn(n)==="body"&&En(n).position==="static")?e:n||uot(t)||e}function Dp(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ms(t,e,n){return ur(t,hi(e,n))}function _ot(t,e,n){var r=Ms(t,e,n);return r>n?n:r}function AT(){return{top:0,right:0,bottom:0,left:0}}function NT(t){return Object.assign({},AT(),t)}function wT(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var pot=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,NT(typeof e!="number"?e:wT(e,co))};function mot(t){var e,n=t.state,r=t.name,s=t.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,a=en(n.placement),l=Dp(a),u=[bt,Mt].indexOf(a)>=0,d=u?"height":"width";if(!(!o||!i)){var _=pot(s.padding,n),p=Ip(o),g=l==="y"?Et:bt,f=l==="y"?kt:Mt,h=n.rects.reference[d]+n.rects.reference[l]-i[l]-n.rects.popper[d],E=i[l]-n.rects.reference[l],b=uo(o),m=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=h/2-E/2,C=_[g],A=m-p[d]-_[f],x=m/2-p[d]/2+S,k=Ms(C,x,A),y=l;n.modifiersData[r]=(e={},e[y]=k,e.centerOffset=k-x,e)}}function got(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||OT(e.elements.popper,s)&&(e.elements.arrow=s))}const fot={name:"arrow",enabled:!0,phase:"main",fn:mot,effect:got,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(t){return t.split("-")[1]}var hot={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Eot(t,e){var n=t.x,r=t.y,s=e.devicePixelRatio||1;return{x:ts(n*s)/s||0,y:ts(r*s)/s||0}}function oS(t){var e,n=t.popper,r=t.popperRect,s=t.placement,o=t.variation,i=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,_=t.isFixed,p=i.x,g=p===void 0?0:p,f=i.y,h=f===void 0?0:f,E=typeof d=="function"?d({x:g,y:h}):{x:g,y:h};g=E.x,h=E.y;var b=i.hasOwnProperty("x"),m=i.hasOwnProperty("y"),S=bt,C=Et,A=window;if(u){var x=uo(n),k="clientHeight",y="clientWidth";if(x===Tt(n)&&(x=Qn(n),En(x).position!=="static"&&a==="absolute"&&(k="scrollHeight",y="scrollWidth")),x=x,s===Et||(s===bt||s===Mt)&&o===Xs){C=kt;var R=_&&x===A&&A.visualViewport?A.visualViewport.height:x[k];h-=R-r.height,h*=l?1:-1}if(s===bt||(s===Et||s===kt)&&o===Xs){S=Mt;var w=_&&x===A&&A.visualViewport?A.visualViewport.width:x[y];g-=w-r.width,g*=l?1:-1}}var L=Object.assign({position:a},u&&hot),M=d===!0?Eot({x:g,y:h},Tt(n)):{x:g,y:h};if(g=M.x,h=M.y,l){var Z;return Object.assign({},L,(Z={},Z[C]=m?"0":"",Z[S]=b?"0":"",Z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",Z))}return Object.assign({},L,(e={},e[C]=m?h+"px":"",e[S]=b?g+"px":"",e.transform="",e))}function bot(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,o=n.adaptive,i=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:en(e.placement),variation:rs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,oS(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oS(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Sot={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bot,data:{}};var Po={passive:!0};function yot(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,o=s===void 0?!0:s,i=r.resize,a=i===void 0?!0:i,l=Tt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,Po)}),a&&l.addEventListener("resize",n.update,Po),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Po)}),a&&l.removeEventListener("resize",n.update,Po)}}const vot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yot,data:{}};var Tot={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(t){return t.replace(/left|right|bottom|top/g,function(e){return Tot[e]})}var Cot={start:"end",end:"start"};function iS(t){return t.replace(/start|end/g,function(e){return Cot[e]})}function kp(t){var e=Tt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Mp(t){return ns(Qn(t)).left+kp(t).scrollLeft}function Rot(t,e){var n=Tt(t),r=Qn(t),s=n.visualViewport,o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;var u=xT();(u||!u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a+Mp(t),y:l}}function xot(t){var e,n=Qn(t),r=kp(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=ur(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),i=ur(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+Mp(t),l=-r.scrollTop;return En(s||n).direction==="rtl"&&(a+=ur(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:i,x:a,y:l}}function Lp(t){var e=En(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function IT(t){return["html","body","#document"].indexOf(rn(t))>=0?t.ownerDocument.body:It(t)&&Lp(t)?t:IT(ta(t))}function Ls(t,e){var n;e===void 0&&(e=[]);var r=IT(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),o=Tt(r),i=s?[o].concat(o.visualViewport||[],Lp(r)?r:[]):r,a=e.concat(i);return s?a:a.concat(Ls(ta(i)))}function h_(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Oot(t,e){var n=ns(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function aS(t,e,n){return e===CT?h_(Rot(t,n)):gr(e)?Oot(e,n):h_(xot(Qn(t)))}function Aot(t){var e=Ls(ta(t)),n=["absolute","fixed"].indexOf(En(t).position)>=0,r=n&&It(t)?uo(t):t;return gr(r)?e.filter(function(s){return gr(s)&&OT(s,r)&&rn(s)!=="body"}):[]}function Not(t,e,n,r){var s=e==="clippingParents"?Aot(t):[].concat(e),o=[].concat(s,[n]),i=o[0],a=o.reduce(function(l,u){var d=aS(t,u,r);return l.top=ur(d.top,l.top),l.right=hi(d.right,l.right),l.bottom=hi(d.bottom,l.bottom),l.left=ur(d.left,l.left),l},aS(t,i,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function DT(t){var e=t.reference,n=t.element,r=t.placement,s=r?en(r):null,o=r?rs(r):null,i=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case Et:l={x:i,y:e.y-n.height};break;case kt:l={x:i,y:e.y+e.height};break;case Mt:l={x:e.x+e.width,y:a};break;case bt:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=s?Dp(s):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case es:l[u]=l[u]-(e[d]/2-n[d]/2);break;case Xs:l[u]=l[u]+(e[d]/2-n[d]/2);break}}return l}function Js(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,o=n.strategy,i=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?Qst:a,u=n.rootBoundary,d=u===void 0?CT:u,_=n.elementContext,p=_===void 0?Cs:_,g=n.altBoundary,f=g===void 0?!1:g,h=n.padding,E=h===void 0?0:h,b=NT(typeof E!="number"?E:wT(E,co)),m=p===Cs?jst:Cs,S=t.rects.popper,C=t.elements[f?m:p],A=Not(gr(C)?C:C.contextElement||Qn(t.elements.popper),l,d,i),x=ns(t.elements.reference),k=DT({reference:x,element:S,strategy:"absolute",placement:s}),y=h_(Object.assign({},S,k)),R=p===Cs?y:x,w={top:A.top-R.top+b.top,bottom:R.bottom-A.bottom+b.bottom,left:A.left-R.left+b.left,right:R.right-A.right+b.right},L=t.modifiersData.offset;if(p===Cs&&L){var M=L[s];Object.keys(w).forEach(function(Z){var B=[Mt,kt].indexOf(Z)>=0?1:-1,se=[Et,kt].indexOf(Z)>=0?"y":"x";w[Z]+=M[se]*B})}return w}function wot(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,o=n.rootBoundary,i=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?RT:l,d=rs(r),_=d?a?rS:rS.filter(function(f){return rs(f)===d}):co,p=_.filter(function(f){return u.indexOf(f)>=0});p.length===0&&(p=_);var g=p.reduce(function(f,h){return f[h]=Js(t,{placement:h,boundary:s,rootBoundary:o,padding:i})[en(h)],f},{});return Object.keys(g).sort(function(f,h){return g[f]-g[h]})}function Iot(t){if(en(t)===Np)return[];var e=Jo(t);return[iS(t),e,iS(e)]}function Dot(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,d=n.boundary,_=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,f=g===void 0?!0:g,h=n.allowedAutoPlacements,E=e.options.placement,b=en(E),m=b===E,S=l||(m||!f?[Jo(E)]:Iot(E)),C=[E].concat(S).reduce(function(Ce,fe){return Ce.concat(en(fe)===Np?wot(e,{placement:fe,boundary:d,rootBoundary:_,padding:u,flipVariations:f,allowedAutoPlacements:h}):fe)},[]),A=e.rects.reference,x=e.rects.popper,k=new Map,y=!0,R=C[0],w=0;w=0,se=B?"width":"height",H=Js(e,{placement:L,boundary:d,rootBoundary:_,altBoundary:p,padding:u}),I=B?Z?Mt:bt:Z?kt:Et;A[se]>x[se]&&(I=Jo(I));var Q=Jo(I),re=[];if(o&&re.push(H[M]<=0),a&&re.push(H[I]<=0,H[Q]<=0),re.every(function(Ce){return Ce})){R=L,y=!1;break}k.set(L,re)}if(y)for(var X=f?3:1,pe=function(fe){var Ee=C.find(function(z){var te=k.get(z);if(te)return te.slice(0,fe).every(function(Y){return Y})});if(Ee)return R=Ee,"break"},ee=X;ee>0;ee--){var be=pe(ee);if(be==="break")break}e.placement!==R&&(e.modifiersData[r]._skip=!0,e.placement=R,e.reset=!0)}}const kot={name:"flip",enabled:!0,phase:"main",fn:Dot,requiresIfExists:["offset"],data:{_skip:!1}};function lS(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function cS(t){return[Et,Mt,kt,bt].some(function(e){return t[e]>=0})}function Mot(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,i=Js(e,{elementContext:"reference"}),a=Js(e,{altBoundary:!0}),l=lS(i,r),u=lS(a,s,o),d=cS(l),_=cS(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:_},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":_})}const Lot={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Mot};function Pot(t,e,n){var r=en(t),s=[bt,Et].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,i=o[0],a=o[1];return i=i||0,a=(a||0)*s,[bt,Mt].indexOf(r)>=0?{x:a,y:i}:{x:i,y:a}}function Fot(t){var e=t.state,n=t.options,r=t.name,s=n.offset,o=s===void 0?[0,0]:s,i=RT.reduce(function(d,_){return d[_]=Pot(_,e.rects,o),d},{}),a=i[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=i}const Uot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fot};function Bot(t){var e=t.state,n=t.name;e.modifiersData[n]=DT({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Got={name:"popperOffsets",enabled:!0,phase:"read",fn:Bot,data:{}};function qot(t){return t==="x"?"y":"x"}function Yot(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,o=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,_=n.padding,p=n.tether,g=p===void 0?!0:p,f=n.tetherOffset,h=f===void 0?0:f,E=Js(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:d}),b=en(e.placement),m=rs(e.placement),S=!m,C=Dp(b),A=qot(C),x=e.modifiersData.popperOffsets,k=e.rects.reference,y=e.rects.popper,R=typeof h=="function"?h(Object.assign({},e.rects,{placement:e.placement})):h,w=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(x){if(o){var Z,B=C==="y"?Et:bt,se=C==="y"?kt:Mt,H=C==="y"?"height":"width",I=x[C],Q=I+E[B],re=I-E[se],X=g?-y[H]/2:0,pe=m===es?k[H]:y[H],ee=m===es?-y[H]:-k[H],be=e.elements.arrow,Ce=g&&be?Ip(be):{width:0,height:0},fe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:AT(),Ee=fe[B],z=fe[se],te=Ms(0,k[H],Ce[H]),Y=S?k[H]/2-X-te-Ee-w.mainAxis:pe-te-Ee-w.mainAxis,ue=S?-k[H]/2+X+te+z+w.mainAxis:ee+te+z+w.mainAxis,ye=e.elements.arrow&&uo(e.elements.arrow),O=ye?C==="y"?ye.clientTop||0:ye.clientLeft||0:0,N=(Z=L==null?void 0:L[C])!=null?Z:0,F=I+Y-N-O,$=I+ue-N,W=Ms(g?hi(Q,F):Q,I,g?ur(re,$):re);x[C]=W,M[C]=W-I}if(a){var ae,me=C==="x"?Et:bt,D=C==="x"?kt:Mt,K=x[A],G=A==="y"?"height":"width",q=K+E[me],V=K-E[D],ne=[Et,bt].indexOf(b)!==-1,oe=(ae=L==null?void 0:L[A])!=null?ae:0,ge=ne?q:K-k[G]-y[G]-oe+w.altAxis,J=ne?K+k[G]+y[G]-oe-w.altAxis:V,le=g&&ne?_ot(ge,K,J):Ms(g?ge:q,K,g?J:V);x[A]=le,M[A]=le-K}e.modifiersData[r]=M}}const Vot={name:"preventOverflow",enabled:!0,phase:"main",fn:Yot,requiresIfExists:["offset"]};function zot(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Hot(t){return t===Tt(t)||!It(t)?kp(t):zot(t)}function $ot(t){var e=t.getBoundingClientRect(),n=ts(e.width)/t.offsetWidth||1,r=ts(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Wot(t,e,n){n===void 0&&(n=!1);var r=It(e),s=It(e)&&$ot(e),o=Qn(e),i=ns(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((rn(e)!=="body"||Lp(o))&&(a=Hot(e)),It(e)?(l=ns(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Mp(o))),{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function Kot(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function s(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||s(o)}),r}function Qot(t){var e=Kot(t);return iot.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function jot(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Zot(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var dS={placement:"bottom",modifiers:[],strategy:"absolute"};function uS(){for(var t=arguments.length,e=new Array(t),n=0;n(hr("data-v-caaca9ad"),t=t(),Er(),t),sit={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},oit={class:"flex flex-col text-center"},iit={class:"flex flex-col text-center items-center"},ait={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},lit=Qe(()=>c("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:Ks,alt:"Logo"},null,-1)),cit={class:"flex flex-col items-start"},dit={class:"text-2xl"},uit=Qe(()=>c("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),_it=Qe(()=>c("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),pit=Qe(()=>c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),mit=Qe(()=>c("p",{class:"text-2xl"},"Welcome",-1)),git=Qe(()=>c("div",{role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},[c("p",{class:"text-2xl animate-pulse"},"Loading ...")],-1)),fit=Qe(()=>c("i",{"data-feather":"chevron-right"},null,-1)),hit=[fit],Eit=Qe(()=>c("i",{"data-feather":"chevron-left"},null,-1)),bit=[Eit],Sit={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},yit={class:"sticky z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md"},vit={class:"flex-row p-4 flex items-center gap-3 flex-0"},Tit=Qe(()=>c("i",{"data-feather":"plus"},null,-1)),Cit=[Tit],Rit=Qe(()=>c("i",{"data-feather":"check-square"},null,-1)),xit=[Rit],Oit=Qe(()=>c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},[c("i",{"data-feather":"refresh-ccw"})],-1)),Ait=Qe(()=>c("i",{"data-feather":"database"},null,-1)),Nit=[Ait],wit=Qe(()=>c("i",{"data-feather":"log-in"},null,-1)),Iit=[wit],Dit={key:0,class:"dropdown"},kit=Qe(()=>c("i",{"data-feather":"search"},null,-1)),Mit=[kit],Lit=Qe(()=>c("i",{"data-feather":"save"},null,-1)),Pit=[Lit],Fit={key:2,class:"flex gap-3 flex-1 items-center duration-75"},Uit=Qe(()=>c("i",{"data-feather":"x"},null,-1)),Bit=[Uit],Git=Qe(()=>c("i",{"data-feather":"check"},null,-1)),qit=[Git],Yit=["src"],Vit=["src"],zit=["src"],Hit={key:4,title:"Loading..",class:"flex flex-row flex-grow justify-end"},$it=Qe(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Wit=[$it],Kit={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},Qit={class:"p-4 pt-2"},jit={class:"relative"},Zit=Qe(()=>c("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[c("div",{class:"scale-75"},[c("i",{"data-feather":"search"})])],-1)),Xit={class:"absolute inset-y-0 right-0 flex items-center pr-3"},Jit=Qe(()=>c("i",{"data-feather":"x"},null,-1)),eat=[Jit],tat={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},nat={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},rat={class:"flex flex-row flex-grow"},sat={key:0},oat={class:"flex flex-row"},iat={key:0,class:"flex gap-3"},aat=Qe(()=>c("i",{"data-feather":"trash"},null,-1)),lat=[aat],cat={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},dat=Qe(()=>c("i",{"data-feather":"check"},null,-1)),uat=[dat],_at=Qe(()=>c("i",{"data-feather":"x"},null,-1)),pat=[_at],mat={class:"flex gap-3"},gat=Qe(()=>c("i",{"data-feather":"log-out"},null,-1)),fat=[gat],hat=Qe(()=>c("i",{"data-feather":"bookmark"},null,-1)),Eat=[hat],bat=Qe(()=>c("i",{"data-feather":"list"},null,-1)),Sat=[bat],yat={class:"relative flex flex-row flex-grow mb-10 z-0"},vat={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"},Tat=Qe(()=>c("p",{class:"px-3"},"No discussions are found",-1)),Cat=[Tat],Rat=Qe(()=>c("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),xat={class:"ml-2"},Oat={key:1,class:"relative flex flex-col flex-grow"},Aat={class:"container pt-4 pb-10 mb-28"},Nat=Qe(()=>c("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)),wat={key:0,class:"bottom-0 container flex flex-row items-center justify-center"},Iat={setup(){},data(){return{host:"",msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],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,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{onSettingsBinding(){try{this.isLoading=!0,Te.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Te.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get binding settings responses. + `,544),[[De,s.message]]),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[9]||(e[9]=(..._)=>o.addFiles&&o.addFiles(..._)),multiple:""},null,544),c("button",{type:"button",onClick:e[10]||(e[10]=_e(_=>t.$refs.fileDialog.click(),["stop"])),title:"Add files",class:"absolute inset-y-0 right-0 flex items-center mr-2 w-6 hover:text-secondary duration-75 active:scale-90"},Ost)]),c("div",Ast,[n.loading?U("",!0):(v(),T("button",{key:0,type:"button",onClick:e[11]||(e[11]=(..._)=>o.startSpeechRecognition&&o.startSpeechRecognition(..._)),class:Ae([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},wst,2)),n.loading?U("",!0):(v(),T("button",{key:1,type:"button",onClick:e[12]||(e[12]=(..._)=>o.makeAnEmptyUserMessage&&o.makeAnEmptyUserMessage(..._)),title:"New empty user message",class:"w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90"},kst)),n.loading?U("",!0):(v(),T("button",{key:2,type:"button",onClick:e[13]||(e[13]=(..._)=>o.makeAnEmptyAIMessage&&o.makeAnEmptyAIMessage(..._)),title:"New empty ai message",class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90"},Pst)),n.loading?U("",!0):(v(),T("button",{key:3,type:"button",onClick:e[14]||(e[14]=(..._)=>o.submit&&o.submit(..._)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},Bst)),n.loading?(v(),T("div",Gst,Yst)):U("",!0)])])])])])]),he(u,{ref:"toast"},null,512),he(d,{ref:"universalForm",class:"z-20"},null,512)],64)}const ET=Ye(xrt,[["render",Vst],["__scopeId","data-v-424e1da1"]]),zst={name:"WelcomeComponent",setup(){return{}}},Hst={class:"flex flex-col text-center"},$st=G_('
Logo

Lord of Large Language Models

One tool to rule them all


Welcome

Please create a new discussion or select existing one to start

',1),Wst=[$st];function Kst(t,e,n,r,s,o){return v(),T("div",Hst,Wst)}const bT=Ye(zst,[["render",Kst]]);var Qst=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}(),pi=globalThis&&globalThis.__assign||function(){return pi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n"u")return!1;var e=Tt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function lot(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},s=e.attributes[n]||{},o=e.elements[n];!It(o)||!rn(o)||(Object.assign(o.style,r),Object.keys(s).forEach(function(i){var a=s[i];a===!1?o.removeAttribute(i):o.setAttribute(i,a===!0?"":a)}))})}function cot(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var s=e.elements[r],o=e.attributes[r]||{},i=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=i.reduce(function(l,u){return l[u]="",l},{});!It(s)||!rn(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}const dot={name:"applyStyles",enabled:!0,phase:"write",fn:lot,effect:cot,requires:["computeStyles"]};function en(t){return t.split("-")[0]}var ur=Math.max,hi=Math.min,ts=Math.round;function f_(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xT(){return!/^((?!chrome|android).)*safari/i.test(f_())}function ns(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,o=1;e&&It(t)&&(s=t.offsetWidth>0&&ts(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ts(r.height)/t.offsetHeight||1);var i=gr(t)?Tt(t):window,a=i.visualViewport,l=!xT()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/s,d=(r.top+(l&&a?a.offsetTop:0))/o,_=r.width/s,p=r.height/o;return{width:_,height:p,top:d,right:u+_,bottom:d+p,left:u,x:u,y:d}}function Ip(t){var e=ns(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function OT(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&wp(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function En(t){return Tt(t).getComputedStyle(t)}function uot(t){return["table","td","th"].indexOf(rn(t))>=0}function Qn(t){return((gr(t)?t.ownerDocument:t.document)||window.document).documentElement}function ta(t){return rn(t)==="html"?t:t.assignedSlot||t.parentNode||(wp(t)?t.host:null)||Qn(t)}function sS(t){return!It(t)||En(t).position==="fixed"?null:t.offsetParent}function _ot(t){var e=/firefox/i.test(f_()),n=/Trident/i.test(f_());if(n&&It(t)){var r=En(t);if(r.position==="fixed")return null}var s=ta(t);for(wp(s)&&(s=s.host);It(s)&&["html","body"].indexOf(rn(s))<0;){var o=En(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function uo(t){for(var e=Tt(t),n=sS(t);n&&uot(n)&&En(n).position==="static";)n=sS(n);return n&&(rn(n)==="html"||rn(n)==="body"&&En(n).position==="static")?e:n||_ot(t)||e}function Dp(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ms(t,e,n){return ur(t,hi(e,n))}function pot(t,e,n){var r=Ms(t,e,n);return r>n?n:r}function AT(){return{top:0,right:0,bottom:0,left:0}}function NT(t){return Object.assign({},AT(),t)}function wT(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var mot=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,NT(typeof e!="number"?e:wT(e,co))};function got(t){var e,n=t.state,r=t.name,s=t.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,a=en(n.placement),l=Dp(a),u=[bt,Mt].indexOf(a)>=0,d=u?"height":"width";if(!(!o||!i)){var _=mot(s.padding,n),p=Ip(o),g=l==="y"?Et:bt,f=l==="y"?kt:Mt,h=n.rects.reference[d]+n.rects.reference[l]-i[l]-n.rects.popper[d],E=i[l]-n.rects.reference[l],b=uo(o),m=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=h/2-E/2,C=_[g],A=m-p[d]-_[f],x=m/2-p[d]/2+S,k=Ms(C,x,A),y=l;n.modifiersData[r]=(e={},e[y]=k,e.centerOffset=k-x,e)}}function fot(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||OT(e.elements.popper,s)&&(e.elements.arrow=s))}const hot={name:"arrow",enabled:!0,phase:"main",fn:got,effect:fot,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(t){return t.split("-")[1]}var Eot={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bot(t,e){var n=t.x,r=t.y,s=e.devicePixelRatio||1;return{x:ts(n*s)/s||0,y:ts(r*s)/s||0}}function oS(t){var e,n=t.popper,r=t.popperRect,s=t.placement,o=t.variation,i=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,_=t.isFixed,p=i.x,g=p===void 0?0:p,f=i.y,h=f===void 0?0:f,E=typeof d=="function"?d({x:g,y:h}):{x:g,y:h};g=E.x,h=E.y;var b=i.hasOwnProperty("x"),m=i.hasOwnProperty("y"),S=bt,C=Et,A=window;if(u){var x=uo(n),k="clientHeight",y="clientWidth";if(x===Tt(n)&&(x=Qn(n),En(x).position!=="static"&&a==="absolute"&&(k="scrollHeight",y="scrollWidth")),x=x,s===Et||(s===bt||s===Mt)&&o===Xs){C=kt;var R=_&&x===A&&A.visualViewport?A.visualViewport.height:x[k];h-=R-r.height,h*=l?1:-1}if(s===bt||(s===Et||s===kt)&&o===Xs){S=Mt;var w=_&&x===A&&A.visualViewport?A.visualViewport.width:x[y];g-=w-r.width,g*=l?1:-1}}var L=Object.assign({position:a},u&&Eot),M=d===!0?bot({x:g,y:h},Tt(n)):{x:g,y:h};if(g=M.x,h=M.y,l){var Z;return Object.assign({},L,(Z={},Z[C]=m?"0":"",Z[S]=b?"0":"",Z.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",Z))}return Object.assign({},L,(e={},e[C]=m?h+"px":"",e[S]=b?g+"px":"",e.transform="",e))}function Sot(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,o=n.adaptive,i=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:en(e.placement),variation:rs(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,oS(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oS(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const yot={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Sot,data:{}};var Po={passive:!0};function vot(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,o=s===void 0?!0:s,i=r.resize,a=i===void 0?!0:i,l=Tt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",n.update,Po)}),a&&l.addEventListener("resize",n.update,Po),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Po)}),a&&l.removeEventListener("resize",n.update,Po)}}const Tot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vot,data:{}};var Cot={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(t){return t.replace(/left|right|bottom|top/g,function(e){return Cot[e]})}var Rot={start:"end",end:"start"};function iS(t){return t.replace(/start|end/g,function(e){return Rot[e]})}function kp(t){var e=Tt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Mp(t){return ns(Qn(t)).left+kp(t).scrollLeft}function xot(t,e){var n=Tt(t),r=Qn(t),s=n.visualViewport,o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;var u=xT();(u||!u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a+Mp(t),y:l}}function Oot(t){var e,n=Qn(t),r=kp(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=ur(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),i=ur(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+Mp(t),l=-r.scrollTop;return En(s||n).direction==="rtl"&&(a+=ur(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:i,x:a,y:l}}function Lp(t){var e=En(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function IT(t){return["html","body","#document"].indexOf(rn(t))>=0?t.ownerDocument.body:It(t)&&Lp(t)?t:IT(ta(t))}function Ls(t,e){var n;e===void 0&&(e=[]);var r=IT(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),o=Tt(r),i=s?[o].concat(o.visualViewport||[],Lp(r)?r:[]):r,a=e.concat(i);return s?a:a.concat(Ls(ta(i)))}function h_(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Aot(t,e){var n=ns(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function aS(t,e,n){return e===CT?h_(xot(t,n)):gr(e)?Aot(e,n):h_(Oot(Qn(t)))}function Not(t){var e=Ls(ta(t)),n=["absolute","fixed"].indexOf(En(t).position)>=0,r=n&&It(t)?uo(t):t;return gr(r)?e.filter(function(s){return gr(s)&&OT(s,r)&&rn(s)!=="body"}):[]}function wot(t,e,n,r){var s=e==="clippingParents"?Not(t):[].concat(e),o=[].concat(s,[n]),i=o[0],a=o.reduce(function(l,u){var d=aS(t,u,r);return l.top=ur(d.top,l.top),l.right=hi(d.right,l.right),l.bottom=hi(d.bottom,l.bottom),l.left=ur(d.left,l.left),l},aS(t,i,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function DT(t){var e=t.reference,n=t.element,r=t.placement,s=r?en(r):null,o=r?rs(r):null,i=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case Et:l={x:i,y:e.y-n.height};break;case kt:l={x:i,y:e.y+e.height};break;case Mt:l={x:e.x+e.width,y:a};break;case bt:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=s?Dp(s):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case es:l[u]=l[u]-(e[d]/2-n[d]/2);break;case Xs:l[u]=l[u]+(e[d]/2-n[d]/2);break}}return l}function Js(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,o=n.strategy,i=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?jst:a,u=n.rootBoundary,d=u===void 0?CT:u,_=n.elementContext,p=_===void 0?Cs:_,g=n.altBoundary,f=g===void 0?!1:g,h=n.padding,E=h===void 0?0:h,b=NT(typeof E!="number"?E:wT(E,co)),m=p===Cs?Zst:Cs,S=t.rects.popper,C=t.elements[f?m:p],A=wot(gr(C)?C:C.contextElement||Qn(t.elements.popper),l,d,i),x=ns(t.elements.reference),k=DT({reference:x,element:S,strategy:"absolute",placement:s}),y=h_(Object.assign({},S,k)),R=p===Cs?y:x,w={top:A.top-R.top+b.top,bottom:R.bottom-A.bottom+b.bottom,left:A.left-R.left+b.left,right:R.right-A.right+b.right},L=t.modifiersData.offset;if(p===Cs&&L){var M=L[s];Object.keys(w).forEach(function(Z){var B=[Mt,kt].indexOf(Z)>=0?1:-1,se=[Et,kt].indexOf(Z)>=0?"y":"x";w[Z]+=M[se]*B})}return w}function Iot(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,o=n.rootBoundary,i=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?RT:l,d=rs(r),_=d?a?rS:rS.filter(function(f){return rs(f)===d}):co,p=_.filter(function(f){return u.indexOf(f)>=0});p.length===0&&(p=_);var g=p.reduce(function(f,h){return f[h]=Js(t,{placement:h,boundary:s,rootBoundary:o,padding:i})[en(h)],f},{});return Object.keys(g).sort(function(f,h){return g[f]-g[h]})}function Dot(t){if(en(t)===Np)return[];var e=Jo(t);return[iS(t),e,iS(e)]}function kot(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,d=n.boundary,_=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,f=g===void 0?!0:g,h=n.allowedAutoPlacements,E=e.options.placement,b=en(E),m=b===E,S=l||(m||!f?[Jo(E)]:Dot(E)),C=[E].concat(S).reduce(function(Ce,fe){return Ce.concat(en(fe)===Np?Iot(e,{placement:fe,boundary:d,rootBoundary:_,padding:u,flipVariations:f,allowedAutoPlacements:h}):fe)},[]),A=e.rects.reference,x=e.rects.popper,k=new Map,y=!0,R=C[0],w=0;w=0,se=B?"width":"height",H=Js(e,{placement:L,boundary:d,rootBoundary:_,altBoundary:p,padding:u}),I=B?Z?Mt:bt:Z?kt:Et;A[se]>x[se]&&(I=Jo(I));var Q=Jo(I),re=[];if(o&&re.push(H[M]<=0),a&&re.push(H[I]<=0,H[Q]<=0),re.every(function(Ce){return Ce})){R=L,y=!1;break}k.set(L,re)}if(y)for(var X=f?3:1,pe=function(fe){var Ee=C.find(function(z){var te=k.get(z);if(te)return te.slice(0,fe).every(function(Y){return Y})});if(Ee)return R=Ee,"break"},ee=X;ee>0;ee--){var be=pe(ee);if(be==="break")break}e.placement!==R&&(e.modifiersData[r]._skip=!0,e.placement=R,e.reset=!0)}}const Mot={name:"flip",enabled:!0,phase:"main",fn:kot,requiresIfExists:["offset"],data:{_skip:!1}};function lS(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function cS(t){return[Et,Mt,kt,bt].some(function(e){return t[e]>=0})}function Lot(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,i=Js(e,{elementContext:"reference"}),a=Js(e,{altBoundary:!0}),l=lS(i,r),u=lS(a,s,o),d=cS(l),_=cS(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:_},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":_})}const Pot={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lot};function Fot(t,e,n){var r=en(t),s=[bt,Et].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,i=o[0],a=o[1];return i=i||0,a=(a||0)*s,[bt,Mt].indexOf(r)>=0?{x:a,y:i}:{x:i,y:a}}function Uot(t){var e=t.state,n=t.options,r=t.name,s=n.offset,o=s===void 0?[0,0]:s,i=RT.reduce(function(d,_){return d[_]=Fot(_,e.rects,o),d},{}),a=i[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=i}const Bot={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Uot};function Got(t){var e=t.state,n=t.name;e.modifiersData[n]=DT({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const qot={name:"popperOffsets",enabled:!0,phase:"read",fn:Got,data:{}};function Yot(t){return t==="x"?"y":"x"}function Vot(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,o=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,_=n.padding,p=n.tether,g=p===void 0?!0:p,f=n.tetherOffset,h=f===void 0?0:f,E=Js(e,{boundary:l,rootBoundary:u,padding:_,altBoundary:d}),b=en(e.placement),m=rs(e.placement),S=!m,C=Dp(b),A=Yot(C),x=e.modifiersData.popperOffsets,k=e.rects.reference,y=e.rects.popper,R=typeof h=="function"?h(Object.assign({},e.rects,{placement:e.placement})):h,w=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(x){if(o){var Z,B=C==="y"?Et:bt,se=C==="y"?kt:Mt,H=C==="y"?"height":"width",I=x[C],Q=I+E[B],re=I-E[se],X=g?-y[H]/2:0,pe=m===es?k[H]:y[H],ee=m===es?-y[H]:-k[H],be=e.elements.arrow,Ce=g&&be?Ip(be):{width:0,height:0},fe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:AT(),Ee=fe[B],z=fe[se],te=Ms(0,k[H],Ce[H]),Y=S?k[H]/2-X-te-Ee-w.mainAxis:pe-te-Ee-w.mainAxis,ue=S?-k[H]/2+X+te+z+w.mainAxis:ee+te+z+w.mainAxis,ye=e.elements.arrow&&uo(e.elements.arrow),O=ye?C==="y"?ye.clientTop||0:ye.clientLeft||0:0,N=(Z=L==null?void 0:L[C])!=null?Z:0,F=I+Y-N-O,$=I+ue-N,W=Ms(g?hi(Q,F):Q,I,g?ur(re,$):re);x[C]=W,M[C]=W-I}if(a){var ae,me=C==="x"?Et:bt,D=C==="x"?kt:Mt,K=x[A],G=A==="y"?"height":"width",q=K+E[me],V=K-E[D],ne=[Et,bt].indexOf(b)!==-1,oe=(ae=L==null?void 0:L[A])!=null?ae:0,ge=ne?q:K-k[G]-y[G]-oe+w.altAxis,J=ne?K+k[G]+y[G]-oe-w.altAxis:V,le=g&&ne?pot(ge,K,J):Ms(g?ge:q,K,g?J:V);x[A]=le,M[A]=le-K}e.modifiersData[r]=M}}const zot={name:"preventOverflow",enabled:!0,phase:"main",fn:Vot,requiresIfExists:["offset"]};function Hot(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function $ot(t){return t===Tt(t)||!It(t)?kp(t):Hot(t)}function Wot(t){var e=t.getBoundingClientRect(),n=ts(e.width)/t.offsetWidth||1,r=ts(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Kot(t,e,n){n===void 0&&(n=!1);var r=It(e),s=It(e)&&Wot(e),o=Qn(e),i=ns(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((rn(e)!=="body"||Lp(o))&&(a=$ot(e)),It(e)?(l=ns(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Mp(o))),{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function Qot(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function s(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||s(o)}),r}function jot(t){var e=Qot(t);return aot.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function Zot(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Xot(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var dS={placement:"bottom",modifiers:[],strategy:"absolute"};function uS(){for(var t=arguments.length,e=new Array(t),n=0;n(hr("data-v-caaca9ad"),t=t(),Er(),t),oit={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center"},iit={class:"flex flex-col text-center"},ait={class:"flex flex-col text-center items-center"},lit={class:"flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"},cit=Qe(()=>c("img",{class:"w-24 animate-bounce",title:"LoLLMS WebUI",src:Ks,alt:"Logo"},null,-1)),dit={class:"flex flex-col items-start"},uit={class:"text-2xl"},_it=Qe(()=>c("p",{class:"text-gray-400 text-base"},"One tool to rule them all",-1)),pit=Qe(()=>c("p",{class:"text-gray-400 text-base"},"by ParisNeo",-1)),mit=Qe(()=>c("hr",{class:"mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"},null,-1)),git=Qe(()=>c("p",{class:"text-2xl"},"Welcome",-1)),fit=Qe(()=>c("div",{role:"status",class:"text-center w-full display: flex; flex-row align-items: center;"},[c("p",{class:"text-2xl animate-pulse"},"Loading ...")],-1)),hit=Qe(()=>c("i",{"data-feather":"chevron-right"},null,-1)),Eit=[hit],bit=Qe(()=>c("i",{"data-feather":"chevron-left"},null,-1)),Sit=[bit],yit={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},vit={class:"sticky z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md"},Tit={class:"flex-row p-4 flex items-center gap-3 flex-0"},Cit=Qe(()=>c("i",{"data-feather":"plus"},null,-1)),Rit=[Cit],xit=Qe(()=>c("i",{"data-feather":"check-square"},null,-1)),Oit=[xit],Ait=Qe(()=>c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},[c("i",{"data-feather":"refresh-ccw"})],-1)),Nit=Qe(()=>c("i",{"data-feather":"database"},null,-1)),wit=[Nit],Iit=Qe(()=>c("i",{"data-feather":"log-in"},null,-1)),Dit=[Iit],kit={key:0,class:"dropdown"},Mit=Qe(()=>c("i",{"data-feather":"search"},null,-1)),Lit=[Mit],Pit=Qe(()=>c("i",{"data-feather":"save"},null,-1)),Fit=[Pit],Uit={key:2,class:"flex gap-3 flex-1 items-center duration-75"},Bit=Qe(()=>c("i",{"data-feather":"x"},null,-1)),Git=[Bit],qit=Qe(()=>c("i",{"data-feather":"check"},null,-1)),Yit=[qit],Vit=["src"],zit=["src"],Hit=["src"],$it={key:4,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Wit=Qe(()=>c("div",{role:"status"},[c("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"},[c("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"}),c("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"})]),c("span",{class:"sr-only"},"Loading...")],-1)),Kit=[Wit],Qit={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},jit={class:"p-4 pt-2"},Zit={class:"relative"},Xit=Qe(()=>c("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[c("div",{class:"scale-75"},[c("i",{"data-feather":"search"})])],-1)),Jit={class:"absolute inset-y-0 right-0 flex items-center pr-3"},eat=Qe(()=>c("i",{"data-feather":"x"},null,-1)),tat=[eat],nat={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},rat={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},sat={class:"flex flex-row flex-grow"},oat={key:0},iat={class:"flex flex-row"},aat={key:0,class:"flex gap-3"},lat=Qe(()=>c("i",{"data-feather":"trash"},null,-1)),cat=[lat],dat={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},uat=Qe(()=>c("i",{"data-feather":"check"},null,-1)),_at=[uat],pat=Qe(()=>c("i",{"data-feather":"x"},null,-1)),mat=[pat],gat={class:"flex gap-3"},fat=Qe(()=>c("i",{"data-feather":"log-out"},null,-1)),hat=[fat],Eat=Qe(()=>c("i",{"data-feather":"bookmark"},null,-1)),bat=[Eat],Sat=Qe(()=>c("i",{"data-feather":"list"},null,-1)),yat=[Sat],vat={class:"relative flex flex-row flex-grow mb-10 z-0"},Tat={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"},Cat=Qe(()=>c("p",{class:"px-3"},"No discussions are found",-1)),Rat=[Cat],xat=Qe(()=>c("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),Oat={class:"ml-2"},Aat={key:1,class:"relative flex flex-col flex-grow"},Nat={class:"container pt-4 pb-10 mb-28"},wat=Qe(()=>c("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)),Iat={key:0,class:"bottom-0 container flex flex-row items-center justify-center"},Dat={setup(){},data(){return{host:"",msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],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,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,panelCollapsed:!1,isOpen:!1,discussion_id:0}},methods:{onSettingsBinding(){try{this.isLoading=!0,Te.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings - "+bindingEntry.binding.name,"Save changes","Cancel").then(e=>{try{Te.post("/set_active_binding_settings",e).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$refs.toast.showToast(`Did not get binding settings responses. Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$refs.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$refs.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogSelected(t){console.log("Selected:",t)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(t){if(this.database_selectorDialogVisible=!1,(await Te.post("/select_database",{name:t})).status){console.log("Selected database"),this.$store.state.config=await Te.get("/get_config"),console.log("new config loaded :",this.$store.state.config);let n=await Te.get("/list_databases").data;console.log("New list of database: ",n),this.$store.state.databases=n,console.log("New list of database: ",this.$store.state.databases),location.reload()}},toggleLTM(){this.$store.state.config.use_discussions_history=!this.$store.state.config.use_discussions_history,this.applyConfiguration()},applyConfiguration(){this.loading=!0,Te.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.loading=!1,t.data.status?this.$refs.toast.showToast("Configuration changed successfully.",4,!0):this.$refs.toast.showToast("Configuration change failed.",4,!1),ve(()=>{Re.replace()})}).catch(t=>{this.loading=!1,this.$refs.toast.showToast("Configuration change failed.",4,!1)})},save_configuration(){this.showConfirmation=!1,Te.post("/save_settings",{}).then(t=>{if(t)return t.status?this.$refs.toast.showToast("Settings saved!",4,!0):this.$refs.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(console.log(t.message,"save_configuration"),this.$refs.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(t,e,n){console.log("sending",t),this.$refs.toast.showToast(t,e,n)},togglePanel(){this.panelCollapsed=!this.panelCollapsed},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(t){try{const e=await Te.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const t=await Te.get("/list_discussions");if(t)return this.createDiscussionList(t.data),t.data}catch(t){return console.log("Error: Could not list discussions",t.message),[]}},load_discussion(t,e){t&&(console.log("Loading discussion",t),this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(t,this.loading),Ne.on("discussion",n=>{this.loading=!1,this.setDiscussionLoading(t,this.loading),n&&(this.discussionArr=n.filter(r=>r.message_type==this.msgTypes.MSG_TYPE_CHUNK||r.message_type==this.msgTypes.MSG_TYPE_FULL||r.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI||r.message_type==this.msgTypes.MSG_TYPE_CODE||r.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS||r.message_type==this.msgTypes.MSG_TYPE_UI),console.log("this.discussionArr"),console.log(this.discussionArr),e&&e()),Ne.off("discussion")}),Ne.emit("load_discussion",{id:t}))},recoverFiles(){console.log("Recovering files"),Te.get("/get_current_personality_files_list").then(t=>{this.$refs.chatBox.filesList=t.data.files,this.$refs.chatBox.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.$refs.chatBox.filesList}`)})},new_discussion(t){try{this.loading=!0,Ne.on("discussion_created",e=>{Ne.off("discussion_created"),this.list_discussions().then(()=>{const n=this.list.findIndex(s=>s.id==e.id),r=this.list[n];this.selectDiscussion(r),this.load_discussion(e.id,()=>{this.loading=!1,Te.get("/get_current_personality_files_list").then(s=>{console.log("Files recovered"),this.fileList=s.files}),ve(()=>{const s=document.getElementById("dis-"+e.id);this.scrollToElement(s),console.log("Scrolling tp "+s)})})})}),console.log("new_discussion ",t),Ne.emit("new_discussion",{title:t})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(t){try{t&&(this.loading=!0,this.setDiscussionLoading(t,this.loading),await Te.post("/delete_discussion",{client_id:this.client_id,id:t}),this.loading=!1,this.setDiscussionLoading(t,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async edit_title(t,e){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const n=await Te.post("/edit_title",{client_id:this.client_id,id:t,title:e});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),n.status==200){const r=this.list.findIndex(o=>o.id==t),s=this.list[r];s.title=e,this.tempList=this.list}}}catch(n){console.log("Error: Could not edit title",n.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async make_title(t){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const e=await Te.post("/make_title",{client_id:this.client_id,id:t});if(console.log("Making title:",e),this.loading=!1,this.setDiscussionLoading(t,this.loading),e.status==200){const n=this.list.findIndex(s=>s.id==t),r=this.list[n];r.title=e.data.title,this.tempList=this.list}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async delete_message(t){try{const e=await Te.get("/delete_message",{params:{client_id:this.client_id,id:t}});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(Ne.emit("cancel_generation"),res)return res.data}catch(t){return console.log("Error: Could not stop generating",t.message),{}}},async message_rank_up(t){try{const e=await Te.get("/message_rank_up",{params:{client_id:this.client_id,id:t}});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(t){try{const e=await Te.get("/message_rank_down",{params:{client_id:this.client_id,id:t}});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(t,e){try{const n=await Te.get("/edit_message",{params:{client_id:this.client_id,id:t,message:e}});if(n)return n.data}catch(n){return console.log("Error: Could not update message",n.message),{}}},async export_multiple_discussions(t,e){try{if(t.length>0){const n=await Te.post("/export_multiple_discussions",{discussion_ids:t,export_format:e});if(n)return n.data}}catch(n){return console.log("Error: Could not export multiple discussions",n.message),{}}},async import_multiple_discussions(t){try{if(t.length>0){console.log("sending import",t);const e=await Te.post("/import_multiple_discussions",{jArray:t});if(e)return console.log("import response",e.data),e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.list=this.tempList.filter(t=>t.title&&t.title.includes(this.filterTitle)):this.list=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(t){if(this.isGenerating){this.$refs.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}t&&(this.currentDiscussion===void 0?(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})):this.currentDiscussion.id!=t.id&&(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)})),ve(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const n=document.getElementById("messages-list");this.scrollBottom(n)}))},scrollToElement(t){t?t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(t,e){try{const n=t.offsetTop;document.getElementById(e).scrollTo({top:n,behavior:"smooth"})}catch{}},scrollBottom(t){t?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(t){t?t.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(t){let e={content:t.message,id:t.id,rank:0,sender:t.user,created_at:t.created_at,steps:[],html_js_s:[]};this.discussionArr.push(e),ve(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},updateLastUserMsg(t){const e=this.discussionArr.indexOf(r=>r.id=t.user_id),n={binding:t.binding,content:t.message,created_at:t.created_at,type:t.type,finished_generating_at:t.finished_generating_at,id:t.user_id,model:t.model,personality:t.personality,sender:t.user,steps:[]};e!==-1&&(this.discussionArr[e]=n)},socketIOConnected(){return console.log("socketIOConnected"),this.$store.state.isConnected=!0,!0},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(t){console.log("Making a new message"),console.log("New message",t);let e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content,id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata,open:t.open};console.log(e),this.discussionArr.push(e),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.message),console.log("infos",t)},talk(t){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Te.get("/get_generation_status",{}).then(e=>{e&&(e.data.status?console.log("Already generating"):(console.log("Generating message from ",e.data.status),Ne.emit("generate_msg_from",{id:-1}),this.discussionArr.length>0&&Number(this.discussionArr[this.discussionArr.length-1].id)+1))}).catch(e=>{console.log("Error: Could not get generation status",e)})},createEmptyUserMessage(){Ne.emit("create_empty_message",{type:0})},createEmptyAIMessage(){Ne.emit("create_empty_message",{type:1})},sendMsg(t){if(!t){this.$refs.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Te.get("/get_generation_status",{}).then(e=>{if(e)if(e.data.status)console.log("Already generating");else{Ne.emit("generate_msg",{prompt:t});let n=0;this.discussionArr.length>0&&(n=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let r={message:t,id:n,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.msgTypes.MSG_TYPE_FULL,sender_type:this.senderTypes.SENDER_TYPES_USER,content:t,id:n,discussion_id:this.discussion_id,parent_id:n,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(r)}}).catch(e=>{console.log("Error: Could not get generation status",e)})},sendCmd(t){this.isGenerating=!0,Ne.emit("execute_command",{command:t,parameters:[]})},notify(t){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ve(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),this.$refs.toast.showToast(t.content,5,t.status),this.chime.play()},streamMessageContent(t){if(this.discussion_id=t.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(r=>r.id==t.id),n=this.discussionArr[e];if(n&&(t.message_type==this.msgTypes.MSG_TYPE_FULL||t.message_type==this.msgTypes.MSG_TYPE_FULL_INVISIBLE_TO_AI))n.content=t.content,n.finished_generating_at=t.finished_generating_at;else if(n&&t.message_type==this.msgTypes.MSG_TYPE_CHUNK)n.content+=t.content;else if(t.message_type==this.msgTypes.MSG_TYPE_STEP)n.steps.push({message:t.content,done:!0,status:!0});else if(t.message_type==this.msgTypes.MSG_TYPE_STEP_START)n.steps.push({message:t.content,done:!1,status:!0});else if(t.message_type==this.msgTypes.MSG_TYPE_STEP_END){const r=n.steps.find(s=>s.message===t.content);if(r){r.done=!0;try{console.log(t.parameters);const s=t.parameters;r.status=s.status,console.log(s)}catch(s){console.error("Error parsing JSON:",s.message)}}}else t.message_type==this.msgTypes.MSG_TYPE_JSON_INFOS?(console.log("JSON message"),console.log(t.metadata),n.metadata=t.metadata):t.message_type==this.msgTypes.MSG_TYPE_UI?(console.log("UI message"),n.ui=t.ui,console.log(n.ui)):t.message_type==this.msgTypes.MSG_TYPE_EXCEPTION&&this.$refs.toast.showToast(t.content,5,!1)}this.$nextTick(()=>{Re.replace()})},async changeTitleUsingUserMSG(t,e){const n=this.list.findIndex(s=>s.id==t),r=this.list[n];e&&(r.title=e,this.tempList=this.list,await this.edit_title(t,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){console.log("Loading last discussion");const t=localStorage.getItem("selected_discussion");if(console.log("Last discussion id: ",t),t){const e=this.list.findIndex(r=>r.id==t),n=this.list[e];n&&this.selectDiscussion(n)}},onCopyPersonalityName(t){this.$refs.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async deleteDiscussion(t){await this.delete_discussion(t),this.currentDiscussion.id==t&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.list.splice(this.list.findIndex(e=>e.id==t),1),this.createDiscussionList(this.list)},async deleteDiscussionMulti(){const t=this.selectedDiscussions;for(let e=0;er.id==n.id),1)}this.tempList=this.list,this.isCheckbox=!1,this.$refs.toast.showToast("Removed ("+t.length+") items",4,!0),this.showConfirmation=!1,console.log("Multi delete done")},async deleteMessage(t){await this.delete_message(t).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==t),1)}).catch(()=>{this.$refs.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async editTitle(t){const e=this.list.findIndex(r=>r.id==t.id),n=this.list[e];n.title=t.title,n.loading=!0,await this.edit_title(t.id,t.title),n.loading=!1},async makeTitle(t){this.list.findIndex(e=>e.id==t.id),await this.make_title(t.id)},checkUncheckDiscussion(t,e){const n=this.list.findIndex(s=>s.id==e),r=this.list[n];r.checkBoxValue=t.target.checked,this.tempList=this.list},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(t=>t.checkBoxValue==!1).length>0;for(let t=0;t({id:n.id,title:n.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(n,r){return r.id-n.id});this.list=e,this.tempList=e}},setDiscussionLoading(t,e){const n=this.list.findIndex(s=>s.id==t),r=this.list[n];r.loading=e},setPageTitle(t){if(t)if(t.id){const e=t.title?t.title==="untitled"?"New discussion":t.title:"New discussion";document.title="LoLLMS WebUI - "+e}else{const e=t||"Welcome";document.title="LoLLMS WebUI - "+e}else{const e=t||"Welcome";document.title="LoLLMS WebUI - "+e}},async rankUpMessage(t){await this.message_rank_up(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$refs.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(t){await this.message_rank_down(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$refs.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(t,e){await this.edit_message(t,e).then(()=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.content=e}).catch(()=>{this.$refs.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(t,e,n){ve(()=>{Re.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Te.get("/get_generation_status",{}).then(r=>{r&&(r.data.status?(this.$refs.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Ne.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}))}).catch(r=>{console.log("Error: Could not get generation status",r)})},continueMessage(t,e){ve(()=>{Re.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Te.get("/get_generation_status",{}).then(n=>{n&&(n.data.status?console.log("Already generating"):Ne.emit("continue_generate_msg_from",{prompt:e,id:t}))}).catch(n=>{console.log("Error: Could not get generation status",n)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),console.log("Stopped generating"),ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},finalMsgEvent(t){if(console.log("final",t),t.parent_id,this.discussion_id=t.discussion_id,this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(n=>n.id==t.id);this.discussionArr[e].content=t.content,this.discussionArr[e].finished_generating_at=t.finished_generating_at}ve(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play()},copyToClipBoard(t){this.$refs.toast.showToast("Copied to clipboard successfully",4,!0);let e="";t.message.binding&&(e=`Binding: ${t.message.binding}`);let n="";t.message.personality&&(n=` Personality: ${t.message.personality}`);let r="";t.created_at_parsed&&(r=` @@ -188,4 +188,4 @@ ${s} ${l}`;navigator.clipboard.writeText(u),ve(()=>{Re.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.$refs.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=s=>e(this.parseJsonObj(s.target.result)),r.onerror=s=>n(s),r.readAsText(t)})},async exportDiscussionsAsMarkdown(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+r+"."+s+"."+o+i+a)+".md";this.loading=!0;const d=await this.export_multiple_discussions(t,"markdown");d?(this.saveMarkdowntoFile(d,u),this.$refs.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$refs.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussionsAsJson(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+r+"."+s+"."+o+i+a)+".json";this.loading=!0;const d=await this.export_multiple_discussions(t,"json");d?(this.saveJSONtoFile(d,u),this.$refs.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$refs.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this.$refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$refs.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 console.log("Avatar",n.avatar),n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$refs.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$refs.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.$refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$refs.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){for(this.$nextTick(()=>{Re.replace()}),Ne.on("disucssion_renamed",t=>{console.log("Received new title",t.discussion_id,t.title);const e=this.list.findIndex(r=>r.id==t.discussion_id),n=this.list[e];n.title=t.title}),Ne.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason),this.socketIODisconnected()},Ne.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),Ne.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),Ne.disconnect()},Ne.on("connected",this.socketIOConnected),Ne.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ne.on("notification",this.notify),Ne.on("new_message",this.new_message),Ne.on("update_message",this.streamMessageContent),Ne.on("close_message",this.finalMsgEvent),Ne.onopen=()=>{console.log("WebSocket connection established."),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.isCreated=!0},async mounted(){try{let e=await(await fetch("/get_server_address")).text();e.includes("<")&&(console.log("Server address not found"),e="http://localhost:9600/"),console.log(`Server address: ${e}`),this.host=`${e}`}catch(t){console.error("Error fetching server address:",t),this.host="http://localhost:9600/"}this.$nextTick(()=>{Re.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},components:{Discussion:fT,Message:hT,ChatBox:ET,WelcomeComponent:bT,Toast:Sr,ChoiceDialog:Tp},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ve(()=>{Re.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ve(()=>{Re.replace()})},isSearch(){ve(()=>{Re.replace()})}},computed:{isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},formatted_database_name(){const t=this.$store.state.config.db_path;return t.slice(0,t.length-3)},UseDiscussionHistory(){return this.$store.state.config.use_discussions_history},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ne.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},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 ve(()=>{Re.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},Dat=Object.assign(Iat,{__name:"DiscussionsView",setup(t){return to(()=>{BT()}),Te.defaults.baseURL="/",(e,n)=>(v(),T(we,null,[he($r,{name:"fade-and-fly"},{default:ke(()=>[e.isReady?U("",!0):(v(),T("div",sit,[c("div",oit,[c("div",iit,[c("div",ait,[lit,c("div",cit,[c("p",dit,"Lord of Large Language Models v "+j(ct(GT).state.version),1),uit,_it])]),pit,mit,git])])]))]),_:1}),e.isReady?(v(),T("button",{key:0,onClick:n[0]||(n[0]=(...r)=>e.togglePanel&&e.togglePanel(...r)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[ce(c("div",null,hit,512),[[We,e.panelCollapsed]]),ce(c("div",null,bit,512),[[We,!e.panelCollapsed]])])):U("",!0),he($r,{name:"slide-right"},{default:ke(()=>[e.showPanel?(v(),T("div",Sit,[c("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[22]||(n[22]=_e(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[c("div",yit,[c("div",vit,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[1]||(n[1]=r=>e.createNewDiscussion())},Cit),c("button",{class:Ae(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[2]||(n[2]=r=>e.isCheckbox=!e.isCheckbox)},xit,2),Oit,c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[3]||(n[3]=_e(r=>e.database_selectorDialogVisible=!0,["stop"]))},Nit),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[4]||(n[4]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[5]||(n[5]=_e(r=>e.$refs.fileDialog.click(),["stop"]))},Iit),e.isOpen?(v(),T("div",Dit,[c("button",{onClick:n[6]||(n[6]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},"LOLLMS"),c("button",{onClick:n[7]||(n[7]=(...r)=>e.importChatGPT&&e.importChatGPT(...r))},"ChatGPT")])):U("",!0),c("button",{class:Ae(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[8]||(n[8]=r=>e.isSearch=!e.isSearch)},Mit,2),e.showSaveConfirmation?U("",!0):(v(),T("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:n[9]||(n[9]=r=>e.showSaveConfirmation=!0)},Pit)),e.showSaveConfirmation?(v(),T("div",Fit,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[10]||(n[10]=_e(r=>e.showSaveConfirmation=!1,["stop"]))},Bit),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[11]||(n[11]=_e(r=>e.save_configuration(),["stop"]))},qit)])):U("",!0),e.showBrainConfirmation?U("",!0):(v(),T("button",{key:3,title:"Activate Long term Memory",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:n[12]||(n[12]=r=>e.toggleLTM())},[e.loading?(v(),T("img",{key:0,src:ct(nit),width:"25",height:"25",class:"animate-pulse",title:"Applying config, please stand by..."},null,8,Yit)):e.UseDiscussionHistory?(v(),T("img",{key:1,src:ct(rit),width:"25",height:"25"},null,8,Vit)):(v(),T("img",{key:2,src:ct(tit),width:"25",height:"25"},null,8,zit))])),e.loading?(v(),T("div",Hit,Wit)):U("",!0)]),e.isSearch?(v(),T("div",Kit,[c("div",Qit,[c("div",jit,[Zit,c("div",Xit,[c("div",{class:Ae(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[13]||(n[13]=r=>e.filterTitle="")},eat,2)]),ce(c("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light 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",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[14]||(n[14]=r=>e.filterTitle=r),onInput:n[15]||(n[15]=r=>e.filterDiscussions())},null,544),[[De,e.filterTitle]])])])])):U("",!0),e.isCheckbox?(v(),T("hr",tat)):U("",!0),e.isCheckbox?(v(),T("div",nat,[c("div",rat,[e.selectedDiscussions.length>0?(v(),T("p",sat,"Selected: "+j(e.selectedDiscussions.length),1)):U("",!0)]),c("div",oat,[e.selectedDiscussions.length>0?(v(),T("div",iat,[e.showConfirmation?U("",!0):(v(),T("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[16]||(n[16]=_e(r=>e.showConfirmation=!0,["stop"]))},lat)),e.showConfirmation?(v(),T("div",cat,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[17]||(n[17]=_e((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},uat),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[18]||(n[18]=_e(r=>e.showConfirmation=!1,["stop"]))},pat)])):U("",!0)])):U("",!0),c("div",mat,[c("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[19]||(n[19]=_e((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},fat),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[20]||(n[20]=_e((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},Eat),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[21]||(n[21]=_e((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},Sat)])])])):U("",!0)]),c("div",yat,[c("div",{class:Ae(["mx-4 flex flex-col flex-grow",e.isDragOverDiscussion?"pointer-events-none":""])},[c("div",{id:"dis-list",class:Ae([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow"])},[e.list.length>0?(v(),rt(Vn,{key:0,name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(e.list,(r,s)=>(v(),rt(fT,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):U("",!0),e.list.length<1?(v(),T("div",vat,Cat)):U("",!0),Rat],2)],2)])],32),c("div",{class:"absolute bottom-0 left-0 w-full bg-blue-200 dark:bg-blue-800 text-white py-2 cursor-pointer hover:text-green-500",onClick:n[23]||(n[23]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[c("p",xat,"Current database: "+j(e.formatted_database_name),1)])])):U("",!0)]),_:1}),e.isReady?(v(),T("div",Oat,[c("div",{id:"messages-list",class:Ae(["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",e.isDragOverChat?"pointer-events-none":""])},[c("div",Aat,[e.discussionArr.length>0?(v(),rt(Vn,{key:0,name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(e.discussionArr,(r,s)=>(v(),rt(hT,{key:r.id,message:r,id:"msg-"+r.id,host:e.host,ref_for:!0,ref:"messages",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))]),_:1})):U("",!0),e.currentDiscussion.id?U("",!0):(v(),rt(bT,{key:1}))]),Nat,e.currentDiscussion.id?(v(),T("div",wat,[he(ET,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onMessageSentEvent","onSendCMDEvent","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):U("",!0)],2)])):U("",!0),he(Sr,{ref:"toast"},null,512),he(pT,{ref:"messageBox"},null,512),he(Tp,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64))}}),kat=Ye(Dat,[["__scopeId","data-v-caaca9ad"]]),Mat=wO({history:Kx("/"),routes:[{path:"/playground/",name:"playground",component:Mqe},{path:"/extensions/",name:"extensions",component:Hqe},{path:"/help/",name:"help",component:u7e},{path:"/settings/",name:"settings",component:uet},{path:"/training/",name:"training",component:ket},{path:"/quantizing/",name:"quantizing",component:Yet},{path:"/",name:"discussions",component:kat}]});const na=Y1(fA);console.log("Loaded main.js");function pS(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const GT=gR({state(){return{ready:!1,version:"unknown",settingsChanged:!1,isConnected:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],mountedExtensions:[],bindingsArr:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],currentModel:null,extensionsZoo:[],databases:[]}},mutations:{setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=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},setMountedExtensions(t,e){t.mountedExtensions=e},setBindingsArr(t,e){t.bindingsArr=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},setCurrentModel(t,e){t.currentModel=e},setExtensionsZoo(t,e){t.extensionsZoo=e},setDatabases(t,e){t.databases=e}},getters:{getIsConnected(t){return t.isConnected},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getmmountedExtensions(t){return t.mountedExtensions},getMountedPers(t){return t.mountedPers},getbindingsArr(t){return t.bindingsArr},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},getCurrentModel(t){return t.currentModel},getExtensionsZoo(t){return t.extensionsZoo}},actions:{async getVersion(){let t=await Te.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data.version)},async refreshConfig({commit:t}){console.log("Fetching configuration");try{const e=await Ht("get_config");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],e.extensions.length>0?e.extension_category=e.extensions[-1]:e.extension_category="ai_sensors",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 Ht("list_databases");console.log("databases:",e),t("setDatabases",e)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Ht("get_all_personalities"),r=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let u=!1;for(const _ of this.state.config.personalities)if(_.includes(o+"/"+l.folder)&&(u=!0,_.includes(":"))){const p=_.split(":");l.language=p[1]}let d={};return d=l,d.category=o,d.full_path=o+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,o)=>s.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 r=0;ra.full_path==s||a.full_path==o[0]);if(i>=0){let a=pS(this.state.personalities[i]);o.length>1&&(a.language=o[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(r),console.log("Couldn't load personality : ",s)}for(let r=n.length-1;r>=0;r--)console.log("Removing personality : ",this.state.config.personalities[n[r]]),this.state.config.personalities.splice(n[r],1),this.state.config.active_personality_id>n[r]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(r=>r.full_path==this.state.config.personalities[this.state.config.active_personality_id]||r.full_path+":"+r.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await Ht("list_bindings");t("setBindingsArr",e)},async refreshModelsZoo({commit:t}){console.log("Fetching models");const e=await Te.get("/get_available_models");t("setModelsZoo",e.data.filter(n=>n.variants&&n.variants.length>0))},async refreshModels({commit:t}){console.log("Fetching models");let e=await Ht("list_models");console.log(`Found ${e}`);let n=await Ht("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const r=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshExtensionsZoo({commit:t}){let e=[],n=await Ht("list_extensions");const r=Object.keys(n);console.log("Extensions recovered:"+n);for(let s=0;s{let u=!1;for(const _ of this.state.config.extensions)_.includes(o+"/"+l.folder)&&(u=!0);let d={};return d=l,d.category=o,d.full_path=o+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,o)=>s.name.localeCompare(o.name)),t("setActiveExtensions",this.state.config.extensions),console.log("Done loading extensions"),t("setExtensionsZoo",e)},refreshmountedExtensions({commit:t}){console.log("Mounting extensions");let e=[];const n=[];for(let r=0;ri.full_path==s);if(o>=0){let i=pS(this.state.config.extensions[o]);i&&e.push(i)}else n.push(r),console.log("Couldn't load extension : ",s)}for(let r=n.length-1;r>=0;r--)console.log("Removing extensions : ",this.state.config.extensions[n[r]]),this.state.config.extensions.splice(n[r],1);t("setMountedExtensions",e)},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Ht("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Ht("ram_usage")},async refreshVramUsage({commit:t}){const e=await Ht("vram_usage"),n=[];if(e.nb_gpus>0){for(let s=0;s1){this.$refs.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.$refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$refs.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){for(this.$nextTick(()=>{Re.replace()}),Ne.on("disucssion_renamed",t=>{console.log("Received new title",t.discussion_id,t.title);const e=this.list.findIndex(r=>r.id==t.discussion_id),n=this.list[e];n.title=t.title}),Ne.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason),this.socketIODisconnected()},Ne.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),Ne.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),Ne.disconnect()},Ne.on("connected",this.socketIOConnected),Ne.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100)),console.log(this.$store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ne.on("notification",this.notify),Ne.on("new_message",this.new_message),Ne.on("update_message",this.streamMessageContent),Ne.on("close_message",this.finalMsgEvent),Ne.onopen=()=>{console.log("WebSocket connection established."),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.isCreated=!0},async mounted(){try{let e=await(await fetch("/get_server_address")).text();e.includes("<")&&(console.log("Server address not found"),e="http://localhost:9600/"),console.log(`Server address: ${e}`),this.host=`${e}`}catch(t){console.error("Error fetching server address:",t),this.host="http://localhost:9600/"}this.$nextTick(()=>{Re.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},components:{Discussion:fT,Message:hT,ChatBox:ET,WelcomeComponent:bT,Toast:Sr,ChoiceDialog:Tp},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ve(()=>{Re.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ve(()=>{Re.replace()})},isSearch(){ve(()=>{Re.replace()})}},computed:{isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},formatted_database_name(){const t=this.$store.state.config.db_path;return t.slice(0,t.length-3)},UseDiscussionHistory(){return this.$store.state.config.use_discussions_history},isReady:{get(){return this.$store.state.ready}},databases(){return this.$store.state.databases},client_id(){return Ne.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this.$store.state.ready&&!this.panelCollapsed},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 ve(()=>{Re.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},kat=Object.assign(Dat,{__name:"DiscussionsView",setup(t){return to(()=>{BT()}),Te.defaults.baseURL="/",(e,n)=>(v(),T(we,null,[he($r,{name:"fade-and-fly"},{default:ke(()=>[e.isReady?U("",!0):(v(),T("div",oit,[c("div",iit,[c("div",ait,[c("div",lit,[cit,c("div",dit,[c("p",uit,"Lord of Large Language Models v "+j(ct(GT).state.version),1),_it,pit])]),mit,git,fit])])]))]),_:1}),e.isReady?(v(),T("button",{key:0,onClick:n[0]||(n[0]=(...r)=>e.togglePanel&&e.togglePanel(...r)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[ce(c("div",null,Eit,512),[[We,e.panelCollapsed]]),ce(c("div",null,Sit,512),[[We,!e.panelCollapsed]])])):U("",!0),he($r,{name:"slide-right"},{default:ke(()=>[e.showPanel?(v(),T("div",yit,[c("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[22]||(n[22]=_e(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[c("div",vit,[c("div",Tit,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[1]||(n[1]=r=>e.createNewDiscussion())},Rit),c("button",{class:Ae(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[2]||(n[2]=r=>e.isCheckbox=!e.isCheckbox)},Oit,2),Ait,c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[3]||(n[3]=_e(r=>e.database_selectorDialogVisible=!0,["stop"]))},wit),c("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[4]||(n[4]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[5]||(n[5]=_e(r=>e.$refs.fileDialog.click(),["stop"]))},Dit),e.isOpen?(v(),T("div",kit,[c("button",{onClick:n[6]||(n[6]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},"LOLLMS"),c("button",{onClick:n[7]||(n[7]=(...r)=>e.importChatGPT&&e.importChatGPT(...r))},"ChatGPT")])):U("",!0),c("button",{class:Ae(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[8]||(n[8]=r=>e.isSearch=!e.isSearch)},Lit,2),e.showSaveConfirmation?U("",!0):(v(),T("button",{key:1,title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:n[9]||(n[9]=r=>e.showSaveConfirmation=!0)},Fit)),e.showSaveConfirmation?(v(),T("div",Uit,[c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[10]||(n[10]=_e(r=>e.showSaveConfirmation=!1,["stop"]))},Git),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[11]||(n[11]=_e(r=>e.save_configuration(),["stop"]))},Yit)])):U("",!0),e.showBrainConfirmation?U("",!0):(v(),T("button",{key:3,title:"Activate Long term Memory",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:n[12]||(n[12]=r=>e.toggleLTM())},[e.loading?(v(),T("img",{key:0,src:ct(rit),width:"25",height:"25",class:"animate-pulse",title:"Applying config, please stand by..."},null,8,Vit)):e.UseDiscussionHistory?(v(),T("img",{key:1,src:ct(sit),width:"25",height:"25"},null,8,zit)):(v(),T("img",{key:2,src:ct(nit),width:"25",height:"25"},null,8,Hit))])),e.loading?(v(),T("div",$it,Kit)):U("",!0)]),e.isSearch?(v(),T("div",Qit,[c("div",jit,[c("div",Zit,[Xit,c("div",Jit,[c("div",{class:Ae(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[13]||(n[13]=r=>e.filterTitle="")},tat,2)]),ce(c("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light 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",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[14]||(n[14]=r=>e.filterTitle=r),onInput:n[15]||(n[15]=r=>e.filterDiscussions())},null,544),[[De,e.filterTitle]])])])])):U("",!0),e.isCheckbox?(v(),T("hr",nat)):U("",!0),e.isCheckbox?(v(),T("div",rat,[c("div",sat,[e.selectedDiscussions.length>0?(v(),T("p",oat,"Selected: "+j(e.selectedDiscussions.length),1)):U("",!0)]),c("div",iat,[e.selectedDiscussions.length>0?(v(),T("div",aat,[e.showConfirmation?U("",!0):(v(),T("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[16]||(n[16]=_e(r=>e.showConfirmation=!0,["stop"]))},cat)),e.showConfirmation?(v(),T("div",dat,[c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[17]||(n[17]=_e((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},_at),c("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[18]||(n[18]=_e(r=>e.showConfirmation=!1,["stop"]))},mat)])):U("",!0)])):U("",!0),c("div",gat,[c("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[19]||(n[19]=_e((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},hat),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[20]||(n[20]=_e((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},bat),c("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[21]||(n[21]=_e((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},yat)])])])):U("",!0)]),c("div",vat,[c("div",{class:Ae(["mx-4 flex flex-col flex-grow",e.isDragOverDiscussion?"pointer-events-none":""])},[c("div",{id:"dis-list",class:Ae([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow"])},[e.list.length>0?(v(),rt(Vn,{key:0,name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(e.list,(r,s)=>(v(),rt(fT,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.id),onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):U("",!0),e.list.length<1?(v(),T("div",Tat,Rat)):U("",!0),xat],2)],2)])],32),c("div",{class:"absolute bottom-0 left-0 w-full bg-blue-200 dark:bg-blue-800 text-white py-2 cursor-pointer hover:text-green-500",onClick:n[23]||(n[23]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[c("p",Oat,"Current database: "+j(e.formatted_database_name),1)])])):U("",!0)]),_:1}),e.isReady?(v(),T("div",Aat,[c("div",{id:"messages-list",class:Ae(["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",e.isDragOverChat?"pointer-events-none":""])},[c("div",Nat,[e.discussionArr.length>0?(v(),rt(Vn,{key:0,name:"list"},{default:ke(()=>[(v(!0),T(we,null,Be(e.discussionArr,(r,s)=>(v(),rt(hT,{key:r.id,message:r,id:"msg-"+r.id,host:e.host,ref_for:!0,ref:"messages",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))]),_:1})):U("",!0),e.currentDiscussion.id?U("",!0):(v(),rt(bT,{key:1}))]),wat,e.currentDiscussion.id?(v(),T("div",Iat,[he(ET,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onMessageSentEvent","onSendCMDEvent","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):U("",!0)],2)])):U("",!0),he(Sr,{ref:"toast"},null,512),he(pT,{ref:"messageBox"},null,512),he(Tp,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64))}}),Mat=Ye(kat,[["__scopeId","data-v-caaca9ad"]]),Lat=wO({history:Kx("/"),routes:[{path:"/playground/",name:"playground",component:Lqe},{path:"/extensions/",name:"extensions",component:$qe},{path:"/help/",name:"help",component:_7e},{path:"/settings/",name:"settings",component:_et},{path:"/training/",name:"training",component:Met},{path:"/quantizing/",name:"quantizing",component:Vet},{path:"/",name:"discussions",component:Mat}]});const na=Y1(fA);console.log("Loaded main.js");function pS(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const GT=gR({state(){return{ready:!1,version:"unknown",settingsChanged:!1,isConnected:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],mountedExtensions:[],bindingsArr:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],currentModel:null,extensionsZoo:[],databases:[]}},mutations:{setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=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},setMountedExtensions(t,e){t.mountedExtensions=e},setBindingsArr(t,e){t.bindingsArr=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},setCurrentModel(t,e){t.currentModel=e},setExtensionsZoo(t,e){t.extensionsZoo=e},setDatabases(t,e){t.databases=e}},getters:{getIsConnected(t){return t.isConnected},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getmmountedExtensions(t){return t.mountedExtensions},getMountedPers(t){return t.mountedPers},getbindingsArr(t){return t.bindingsArr},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},getCurrentModel(t){return t.currentModel},getExtensionsZoo(t){return t.extensionsZoo}},actions:{async getVersion(){let t=await Te.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data.version)},async refreshConfig({commit:t}){console.log("Fetching configuration");try{const e=await Ht("get_config");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],e.extensions.length>0?e.extension_category=e.extensions[-1]:e.extension_category="ai_sensors",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 Ht("list_databases");console.log("databases:",e),t("setDatabases",e)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Ht("get_all_personalities"),r=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let s=0;s{let u=!1;for(const _ of this.state.config.personalities)if(_.includes(o+"/"+l.folder)&&(u=!0,_.includes(":"))){const p=_.split(":");l.language=p[1]}let d={};return d=l,d.category=o,d.full_path=o+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,o)=>s.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 r=0;ra.full_path==s||a.full_path==o[0]);if(i>=0){let a=pS(this.state.personalities[i]);o.length>1&&(a.language=o[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(r),console.log("Couldn't load personality : ",s)}for(let r=n.length-1;r>=0;r--)console.log("Removing personality : ",this.state.config.personalities[n[r]]),this.state.config.personalities.splice(n[r],1),this.state.config.active_personality_id>n[r]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(r=>r.full_path==this.state.config.personalities[this.state.config.active_personality_id]||r.full_path+":"+r.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await Ht("list_bindings");t("setBindingsArr",e)},async refreshModelsZoo({commit:t}){console.log("Fetching models");const e=await Te.get("/get_available_models");t("setModelsZoo",e.data.filter(n=>n.variants&&n.variants.length>0))},async refreshModels({commit:t}){console.log("Fetching models");let e=await Ht("list_models");console.log(`Found ${e}`);let n=await Ht("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(s=>{s.isInstalled=e.includes(s.name)}),this.state.installedModels=this.state.modelsZoo.filter(s=>s.isInstalled);const r=this.state.modelsZoo.findIndex(s=>s.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshExtensionsZoo({commit:t}){let e=[],n=await Ht("list_extensions");const r=Object.keys(n);console.log("Extensions recovered:"+n);for(let s=0;s{let u=!1;for(const _ of this.state.config.extensions)_.includes(o+"/"+l.folder)&&(u=!0);let d={};return d=l,d.category=o,d.full_path=o+"/"+l.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((s,o)=>s.name.localeCompare(o.name)),t("setActiveExtensions",this.state.config.extensions),console.log("Done loading extensions"),t("setExtensionsZoo",e)},refreshmountedExtensions({commit:t}){console.log("Mounting extensions");let e=[];const n=[];for(let r=0;ri.full_path==s);if(o>=0){let i=pS(this.state.config.extensions[o]);i&&e.push(i)}else n.push(r),console.log("Couldn't load extension : ",s)}for(let r=n.length-1;r>=0;r--)console.log("Removing extensions : ",this.state.config.extensions[n[r]]),this.state.config.extensions.splice(n[r],1);t("setMountedExtensions",e)},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Ht("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Ht("ram_usage")},async refreshVramUsage({commit:t}){const e=await Ht("vram_usage"),n=[];if(e.nb_gpus>0){for(let s=0;s LoLLMS WebUI - Welcome - + diff --git a/web/src/components/CodeBlock.vue b/web/src/components/CodeBlock.vue index 6878b5d6..18b2c831 100644 --- a/web/src/components/CodeBlock.vue +++ b/web/src/components/CodeBlock.vue @@ -1,7 +1,7 @@