lollms-webui/web/dist/assets/index-0d62c0a3.js

144 lines
855 KiB
JavaScript
Raw Normal View History

2023-07-02 22:17:01 +00:00
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();function pl(t,e){const n=Object.create(null),s=t.split(",");for(let o=0;o<s.length;o++)n[s[o]]=!0;return e?o=>!!n[o.toLowerCase()]:o=>!!n[o]}function en(t){if(ve(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],o=Ge(s)?pm(s):en(s);if(o)for(const r in o)e[r]=o[r]}return e}else{if(Ge(t))return t;if(He(t))return t}}const dm=/;(?![^(]*\))/g,fm=/:([^]+)/,hm=/\/\*.*?\*\//gs;function pm(t){const e={};return t.replace(hm,"").split(dm).forEach(n=>{if(n){const s=n.split(fm);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Me(t){let e="";if(Ge(t))e=t;else if(ve(t))for(let n=0;n<t.length;n++){const s=Me(t[n]);s&&(e+=s+" ")}else if(He(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const gm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",mm=pl(gm);function Of(t){return!!t||t===""}function _m(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=So(t[s],e[s]);return n}function So(t,e){if(t===e)return!0;let n=vc(t),s=vc(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=lo(t),s=lo(e),n||s)return t===e;if(n=ve(t),s=ve(e),n||s)return n&&s?_m(t,e):!1;if(n=He(t),s=He(e),n||s){if(!n||!s)return!1;const o=Object.keys(t).length,r=Object.keys(e).length;if(o!==r)return!1;for(const i in t){const a=t.hasOwnProperty(i),l=e.hasOwnProperty(i);if(a&&!l||!a&&l||!So(t[i],e[i]))return!1}}return String(t)===String(e)}function gl(t,e){return t.findIndex(n=>So(n,e))}const ne=t=>Ge(t)?t:t==null?"":ve(t)||He(t)&&(t.toString===Nf||!Se(t.toString))?JSON.stringify(t,Mf,2):String(t),Mf=(t,e)=>e&&e.__v_isRef?Mf(t,e.value):hs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,o])=>(n[`${s} =>`]=o,n),{})}:Ns(e)?{[`Set(${e.size})`]:[...e.values()]}:He(e)&&!ve(e)&&!Df(e)?String(e):e,Ve={},fs=[],Dt=()=>{},bm=()=>!1,ym=/^on[^a-z]/,Ir=t=>ym.test(t),ml=t=>t.startsWith("onUpdate:"),et=Object.assign,_l=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},vm=Object.prototype.hasOwnProperty,Ie=(t,e)=>vm.call(t,e),ve=Array.isArray,hs=t=>Ds(t)==="[object Map]",Ns=t=>Ds(t)==="[object Set]",vc=t=>Ds(t)==="[object Date]",wm=t=>Ds(t)==="[object RegExp]",Se=t=>typeof t=="function",Ge=t=>typeof t=="string",lo=t=>typeof t=="symbol",He=t=>t!==null&&typeof t=="object",Rf=t=>He(t)&&Se(t.then)&&Se(t.catch),Nf=Object.prototype.toString,Ds=t=>Nf.call(t),xm=t=>Ds(t).slice(8,-1),Df=t=>Ds(t)==="[object Object]",bl=t=>Ge(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,er=pl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pr=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},km=/-(\w)/g,Gt=Pr(t=>t.replace(km,(e,n)=>n?n.toUpperCase():"")),Em=/\B([A-Z])/g,Xn=Pr(t=>t.replace(Em,"-$1").toLowerCase()),Fr=Pr(t=>t.charAt(0).toUpperCase()+t.slice(1)),gi=Pr(t=>t?`on${Fr(t)}`:""),co=(t,e)=>!Object.is(t,e),ps=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},hr=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},pr=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cm=t=>{const e=Ge(t)?Number(t):NaN;return isNaN(e)?t:e};let wc;const Am=()=>wc||(wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Ot;class Sm{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ot,!e&&Ot&&(this.index=(Ot.scopes||(Ot.scopes=[])).push(this
2023-06-30 13:38:01 +00:00
* vuex v4.0.2
* (c) 2021 Evan You
* @license MIT
2023-07-02 22:17:01 +00:00
*/var e0="store";function js(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function t0(t){return t!==null&&typeof t=="object"}function n0(t){return t&&typeof t.then=="function"}function s0(t,e){return function(){return t(e)}}function Fh(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var s=e.indexOf(t);s>-1&&e.splice(s,1)}}function Bh(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Wr(t,n,[],t._modules.root,!0),Pl(t,n,e)}function Pl(t,e,n){var s=t._state;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,r={};js(o,function(i,a){r[a]=s0(i,t),Object.defineProperty(t.getters,a,{get:function(){return r[a]()},enumerable:!0})}),t._state=Ps({data:e}),t.strict&&l0(t),s&&n&&t._withCommit(function(){s.data=null})}function Wr(t,e,n,s,o){var r=!n.length,i=t._modules.getNamespace(n);if(s.namespaced&&(t._modulesNamespaceMap[i],t._modulesNamespaceMap[i]=s),!r&&!o){var a=Fl(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit(function(){a[l]=s.state})}var c=s.context=o0(t,i,n);s.forEachMutation(function(u,f){var h=i+f;r0(t,h,u,c)}),s.forEachAction(function(u,f){var h=u.root?f:i+f,g=u.handler||u;i0(t,h,g,c)}),s.forEachGetter(function(u,f){var h=i+f;a0(t,h,u,c)}),s.forEachChild(function(u,f){Wr(t,e,n.concat(f),u,o)})}function o0(t,e,n){var s=e==="",o={dispatch:s?t.dispatch:function(r,i,a){var l=br(r,i,a),c=l.payload,u=l.options,f=l.type;return(!u||!u.root)&&(f=e+f),t.dispatch(f,c)},commit:s?t.commit:function(r,i,a){var l=br(r,i,a),c=l.payload,u=l.options,f=l.type;(!u||!u.root)&&(f=e+f),t.commit(f,c,u)}};return Object.defineProperties(o,{getters:{get:s?function(){return t.getters}:function(){return jh(t,e)}},state:{get:function(){return Fl(t.state,n)}}}),o}function jh(t,e){if(!t._makeLocalGettersCache[e]){var n={},s=e.length;Object.keys(t.getters).forEach(function(o){if(o.slice(0,s)===e){var r=o.slice(s);Object.defineProperty(n,r,{get:function(){return t.getters[o]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function r0(t,e,n,s){var o=t._mutations[e]||(t._mutations[e]=[]);o.push(function(i){n.call(t,s.state,i)})}function i0(t,e,n,s){var o=t._actions[e]||(t._actions[e]=[]);o.push(function(i){var a=n.call(t,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:t.getters,rootState:t.state},i);return n0(a)||(a=Promise.resolve(a)),t._devtoolHook?a.catch(function(l){throw t._devtoolHook.emit("vuex:error",l),l}):a})}function a0(t,e,n,s){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(r){return n(s.state,s.getters,r.state,r.getters)})}function l0(t){Gn(function(){return t._state.data},function(){},{deep:!0,flush:"sync"})}function Fl(t,e){return e.reduce(function(n,s){return n[s]},t)}function br(t,e,n){return t0(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}var c0="vuex bindings",su="vuex:mutations",Ei="vuex:actions",os="vuex",u0=0;function d0(t,e){X1({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[c0]},function(n){n.addTimelineLayer({id:su,label:"Vuex Mutations",color:ou}),n.addTimelineLayer({id:Ei,label:"Vuex Actions",color:ou}),n.addInspector({id:os,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(s){if(s.app===t&&s.inspectorId===os)if(s.filter){var o=[];Uh(o,e._modules.root,s.filter,""),s.rootNodes=o}else s.rootNodes=[qh(e._modules.root,"")]}),n.on.getInspectorState(function(s){if(s.app===t&&s.inspectorId===os){var o=s.nodeId;jh(e,o),s.state=p0(m0(e._modules,o),o==="root"?e.getters:e._makeLocalGettersCache,o)}}),n.on.editInspectorState(function(s){if(s.app===t&&s.inspectorId===os){var o=s.nodeId,r=s.path;o!=="root"&&(r=o.split("/").filter(Boolean).concat(r)),e._withCommit(function(){s.set(e._state.data,r,s.state.value)})}}),e.subscribe(function(s,o){var r={};s.payload&&(r.payload=s.payload),r.state
2023-06-30 13:38:01 +00:00
* vue-router v4.1.6
* (c) 2022 Eduardo San Martin Morote
* @license MIT
2023-07-02 22:17:01 +00:00
*/const ls=typeof window<"u";function b0(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const qe=Object.assign;function Ci(t,e){const n={};for(const s in e){const o=e[s];n[s]=Lt(o)?o.map(t):t(o)}return n}const to=()=>{},Lt=Array.isArray,y0=/\/$/,v0=t=>t.replace(y0,"");function Ai(t,e,n="/"){let s,o={},r="",i="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),o=t(r)),a>-1&&(s=s||e.slice(0,a),i=e.slice(a,e.length)),s=E0(s??e,n),{fullPath:s+(r&&"?")+r+i,path:s,query:o,hash:i}}function w0(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function ru(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function x0(t,e,n){const s=e.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&ks(e.matched[s],n.matched[o])&&Gh(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function ks(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Gh(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!k0(t[n],e[n]))return!1;return!0}function k0(t,e){return Lt(t)?iu(t,e):Lt(e)?iu(e,t):t===e}function iu(t,e){return Lt(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function E0(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/");let o=n.length-1,r,i;for(r=0;r<s.length;r++)if(i=s[r],i!==".")if(i==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r-(r===s.length?1:0)).join("/")}var yo;(function(t){t.pop="pop",t.push="push"})(yo||(yo={}));var no;(function(t){t.back="back",t.forward="forward",t.unknown=""})(no||(no={}));function C0(t){if(!t)if(ls){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),v0(t)}const A0=/^[^#]+#/;function S0(t,e){return t.replace(A0,"#")+e}function T0(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const Zr=()=>({left:window.pageXOffset,top:window.pageYOffset});function O0(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;e=T0(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function au(t,e){return(history.state?history.state.position-e:-1)+t}const Va=new Map;function M0(t,e){Va.set(t,e)}function R0(t){const e=Va.get(t);return Va.delete(t),e}let N0=()=>location.protocol+"//"+location.host;function Kh(t,e){const{pathname:n,search:s,hash:o}=e,r=t.indexOf("#");if(r>-1){let a=o.includes(t.slice(r))?t.slice(r).length:1,l=o.slice(a);return l[0]!=="/"&&(l="/"+l),ru(l,"")}return ru(n,t)+s+o}function D0(t,e,n,s){let o=[],r=[],i=null;const a=({state:h})=>{const g=Kh(t,location),p=n.value,m=e.value;let v=0;if(h){if(n.value=g,e.value=h,i&&i===p){i=null;return}v=m?h.position-m.position:0}else s(g);o.forEach(_=>{_(n.value,p,{delta:v,type:yo.pop,direction:v?v>0?no.forward:no.back:no.unknown})})};function l(){i=n.value}function c(h){o.push(h);const g=()=>{const p=o.indexOf(h);p>-1&&o.splice(p,1)};return r.push(g),g}function u(){const{history:h}=window;h.state&&h.replaceState(qe({},h.state,{scroll:Zr()}),"")}function f(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u),{pauseListeners:l,listen:c,destroy:f}}function lu(t,e,n,s=!1,o=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:o?Zr():null}}function L0(t){const{history:e,location:n}=window,s={value:Kh(t,n)},o={value:e.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=t.indexOf("#"
2023-06-30 13:38:01 +00:00
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
2023-07-02 22:17:01 +00:00
*/(function(){var a=function(){function l(){}l.prototype=Object.create(null);function c(_,b){for(var x=b.length,C=0;C<x;++C)m(_,b[C])}var u={}.hasOwnProperty;function f(_,b){_[b]=!0}function h(_,b){for(var x in b)u.call(b,x)&&(_[x]=!!b[x])}var g=/\s+/;function p(_,b){for(var x=b.split(g),C=x.length,M=0;M<C;++M)_[x[M]]=!0}function m(_,b){if(b){var x=typeof b;x==="string"?p(_,b):Array.isArray(b)?c(_,b):x==="object"?h(_,b):x==="number"&&f(_,b)}}function v(){for(var _=arguments.length,b=Array(_),x=0;x<_;x++)b[x]=arguments[x];var C=new l;c(C,b);var M=[];for(var T in C)C[T]&&M.push(T);return M.join(" ")}return v}();typeof n<"u"&&n.exports?n.exports=a:(r=[],i=function(){return a}.apply(s,r),i!==void 0&&(n.exports=i))})()},"./node_modules/core-js/es/array/from.js":function(n,s,o){o("./node_modules/core-js/modules/es.string.iterator.js"),o("./node_modules/core-js/modules/es.array.from.js");var r=o("./node_modules/core-js/internals/path.js");n.exports=r.Array.from},"./node_modules/core-js/internals/a-function.js":function(n,s){n.exports=function(o){if(typeof o!="function")throw TypeError(String(o)+" is not a function");return o}},"./node_modules/core-js/internals/an-object.js":function(n,s,o){var r=o("./node_modules/core-js/internals/is-object.js");n.exports=function(i){if(!r(i))throw TypeError(String(i)+" is not an object");return i}},"./node_modules/core-js/internals/array-from.js":function(n,s,o){var r=o("./node_modules/core-js/internals/bind-context.js"),i=o("./node_modules/core-js/internals/to-object.js"),a=o("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),l=o("./node_modules/core-js/internals/is-array-iterator-method.js"),c=o("./node_modules/core-js/internals/to-length.js"),u=o("./node_modules/core-js/internals/create-property.js"),f=o("./node_modules/core-js/internals/get-iterator-method.js");n.exports=function(g){var p=i(g),m=typeof this=="function"?this:Array,v=arguments.length,_=v>1?arguments[1]:void 0,b=_!==void 0,x=0,C=f(p),M,T,D,y;if(b&&(_=r(_,v>2?arguments[2]:void 0,2)),C!=null&&!(m==Array&&l(C)))for(y=C.call(p),T=new m;!(D=y.next()).done;x++)u(T,x,b?a(y,_,[D.value,x],!0):D.value);else for(M=c(p.length),T=new m(M);M>x;x++)u(T,x,b?_(p[x],x):p[x]);return T.length=x,T}},"./node_modules/core-js/internals/array-includes.js":function(n,s,o){var r=o("./node_modules/core-js/internals/to-indexed-object.js"),i=o("./node_modules/core-js/internals/to-length.js"),a=o("./node_modules/core-js/internals/to-absolute-index.js");n.exports=function(l){return function(c,u,f){var h=r(c),g=i(h.length),p=a(f,g),m;if(l&&u!=u){for(;g>p;)if(m=h[p++],m!=m)return!0}else for(;g>p;p++)if((l||p in h)&&h[p]===u)return l||p||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(n,s,o){var r=o("./node_modules/core-js/internals/a-function.js");n.exports=function(i,a,l){if(r(i),a===void 0)return i;switch(l){case 0:return function(){return i.call(a)};case 1:return function(c){return i.call(a,c)};case 2:return function(c,u){return i.call(a,c,u)};case 3:return function(c,u,f){return i.call(a,c,u,f)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(n,s,o){var r=o("./node_modules/core-js/internals/an-object.js");n.exports=function(i,a,l,c){try{return c?a(r(l)[0],l[1]):a(l)}catch(f){var u=i.return;throw u!==void 0&&r(u.call(i)),f}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(n,s,o){var r=o("./node_modules/core-js/internals/well-known-symbol.js"),i=r("iterator"),a=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){a=!0}};c[i]=function(){return this},Array.from(c,function(){throw 2})}catch{}n.exports=function(u,f){if(!f&&!a)return!1;var h=!1;try{var g={};g[i]=function(){return{next:function(){return{done:h=!0}}}},u(g)}catch{}return h}},"./node_modules/core-js/internals/classof-raw.js":function(n,s){var o={}.toString;n.exports=function(r){return o.call(r).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(n,s,o){var r=o("./node_modules/core-js/internals/classof-r
2023-06-30 13:38:01 +00:00
Papa Parse
v5.4.1
https://github.com/mholt/PapaParse
License: MIT
2023-07-02 22:17:01 +00:00
*/(function(t,e){(function(n,s){t.exports=s()})(rp,function n(){var s=typeof self<"u"?self:typeof window<"u"?window:s!==void 0?s:{},o=!s.document&&!!s.postMessage,r=s.IS_PAPA_WORKER||!1,i={},a=0,l={parse:function(y,k){var S=(k=k||{}).dynamicTyping||!1;if(D(S)&&(k.dynamicTypingFunction=S,S={}),k.dynamicTyping=S,k.transform=!!D(k.transform)&&k.transform,k.worker&&l.WORKERS_SUPPORTED){var L=function(){if(!l.WORKERS_SUPPORTED)return!1;var Y=(ae=s.URL||s.webkitURL||null,W=n.toString(),l.BLOB_URL||(l.BLOB_URL=ae.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",W,")();"],{type:"text/javascript"})))),I=new s.Worker(Y),ae,W;return I.onmessage=b,I.id=a++,i[I.id]=I}();return L.userStep=k.step,L.userChunk=k.chunk,L.userComplete=k.complete,L.userError=k.error,k.step=D(k.step),k.chunk=D(k.chunk),k.complete=D(k.complete),k.error=D(k.error),delete k.worker,void L.postMessage({input:y,config:k,workerId:L.id})}var F=null;return l.NODE_STREAM_INPUT,typeof y=="string"?(y=function(Y){return Y.charCodeAt(0)===65279?Y.slice(1):Y}(y),F=k.download?new f(k):new g(k)):y.readable===!0&&D(y.read)&&D(y.on)?F=new p(k):(s.File&&y instanceof File||y instanceof Object)&&(F=new h(k)),F.stream(y)},unparse:function(y,k){var S=!1,L=!0,F=",",Y=`\r
2023-06-30 13:38:01 +00:00
`,I='"',ae=I+I,W=!1,A=null,q=!1;(function(){if(typeof k=="object"){if(typeof k.delimiter!="string"||l.BAD_DELIMITERS.filter(function(X){return k.delimiter.indexOf(X)!==-1}).length||(F=k.delimiter),(typeof k.quotes=="boolean"||typeof k.quotes=="function"||Array.isArray(k.quotes))&&(S=k.quotes),typeof k.skipEmptyLines!="boolean"&&typeof k.skipEmptyLines!="string"||(W=k.skipEmptyLines),typeof k.newline=="string"&&(Y=k.newline),typeof k.quoteChar=="string"&&(I=k.quoteChar),typeof k.header=="boolean"&&(L=k.header),Array.isArray(k.columns)){if(k.columns.length===0)throw new Error("Option columns is empty");A=k.columns}k.escapeChar!==void 0&&(ae=k.escapeChar+I),(typeof k.escapeFormulae=="boolean"||k.escapeFormulae instanceof RegExp)&&(q=k.escapeFormulae instanceof RegExp?k.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var V=new RegExp(v(I),"g");if(typeof y=="string"&&(y=JSON.parse(y)),Array.isArray(y)){if(!y.length||Array.isArray(y[0]))return me(null,y,W);if(typeof y[0]=="object")return me(A||Object.keys(y[0]),y,W)}else if(typeof y=="object")return typeof y.data=="string"&&(y.data=JSON.parse(y.data)),Array.isArray(y.data)&&(y.fields||(y.fields=y.meta&&y.meta.fields||A),y.fields||(y.fields=Array.isArray(y.data[0])?y.fields:typeof y.data[0]=="object"?Object.keys(y.data[0]):[]),Array.isArray(y.data[0])||typeof y.data[0]=="object"||(y.data=[y.data])),me(y.fields||[],y.data||[],W);throw new Error("Unable to serialize unrecognized input");function me(X,_e,we){var N="";typeof X=="string"&&(X=JSON.parse(X)),typeof _e=="string"&&(_e=JSON.parse(_e));var Q=Array.isArray(X)&&0<X.length,H=!Array.isArray(_e[0]);if(Q&&L){for(var ee=0;ee<X.length;ee++)0<ee&&(N+=F),N+=pe(X[ee],ee);0<_e.length&&(N+=Y)}for(var J=0;J<_e.length;J++){var fe=Q?X.length:_e[J].length,le=!1,w=Q?Object.keys(_e[J]).length===0:_e[J].length===0;if(we&&!Q&&(le=we==="greedy"?_e[J].join("").trim()==="":_e[J].length===1&&_e[J][0].length===0),we==="greedy"&&Q){for(var E=[],P=0;P<fe;P++){var B=H?X[P]:P;E.push(_e[J][B])}le=E.join("").trim()===""}if(!le){for(var j=0;j<fe;j++){0<j&&!w&&(N+=F);var te=Q&&H?X[j]:j;N+=pe(_e[J][te],j)}J<_e.length-1&&(!we||0<fe&&!w)&&(N+=Y)}}return N}function pe(X,_e){if(X==null)return"";if(X.constructor===Date)return JSON.stringify(X).slice(1,25);var we=!1;q&&typeof X=="string"&&q.test(X)&&(X="'"+X,we=!0);var N=X.toString().replace(V,ae);return(we=we||S===!0||typeof S=="function"&&S(X,_e)||Array.isArray(S)&&S[_e]||function(Q,H){for(var ee=0;ee<H.length;ee++)if(-1<Q.indexOf(H[ee]))return!0;return!1}(N,l.BAD_DELIMITERS)||-1<N.indexOf(F)||N.charAt(0)===" "||N.charAt(N.length-1)===" ")?I+N+I:N}}};if(l.RECORD_SEP=String.fromCharCode(30),l.UNIT_SEP=String.fromCharCode(31),l.BYTE_ORDER_MARK="\uFEFF",l.BAD_DELIMITERS=["\r",`
2023-07-02 22:17:01 +00:00
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!o&&!!s.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=_,l.ParserHandle=m,l.NetworkStreamer=f,l.FileStreamer=h,l.StringStreamer=g,l.ReadableStreamStreamer=p,s.jQuery){var c=s.jQuery;c.fn.parse=function(y){var k=y.config||{},S=[];return this.each(function(Y){if(!(c(this).prop("tagName").toUpperCase()==="INPUT"&&c(this).attr("type").toLowerCase()==="file"&&s.FileReader)||!this.files||this.files.length===0)return!0;for(var I=0;I<this.files.length;I++)S.push({file:this.files[I],inputElem:this,instanceConfig:c.extend({},k)})}),L(),this;function L(){if(S.length!==0){var Y,I,ae,W,A=S[0];if(D(y.before)){var q=y.before(A.file,A.inputElem);if(typeof q=="object"){if(q.action==="abort")return Y="AbortError",I=A.file,ae=A.inputElem,W=q.reason,void(D(y.error)&&y.error({name:Y},I,ae,W));if(q.action==="skip")return void F();typeof q.config=="object"&&(A.instanceConfig=c.extend(A.instanceConfig,q.config))}else if(q==="skip")return void F()}var V=A.instanceConfig.complete;A.instanceConfig.complete=function(me){D(V)&&V(me,A.file,A.inputElem),F()},l.parse(A.file,A.instanceConfig)}else D(y.complete)&&y.complete()}function F(){S.splice(0,1),L()}}}function u(y){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(k){var S=M(k);S.chunkSize=parseInt(S.chunkSize),k.step||k.chunk||(S.chunkSize=null),this._handle=new m(S),(this._handle.streamer=this)._config=S}.call(this,y),this.parseChunk=function(k,S){if(this.isFirstChunk&&D(this._config.beforeFirstChunk)){var L=this._config.beforeFirstChunk(k);L!==void 0&&(k=L)}this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+k;this._partialLine="";var Y=this._handle.parse(F,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var I=Y.meta.cursor;this._finished||(this._partialLine=F.substring(I-this._baseIndex),this._baseIndex=I),Y&&Y.data&&(this._rowCount+=Y.data.length);var ae=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)s.postMessage({results:Y,workerId:l.WORKER_ID,finished:ae});else if(D(this._config.chunk)&&!S){if(this._config.chunk(Y,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);Y=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Y.data),this._completeResults.errors=this._completeResults.errors.concat(Y.errors),this._completeResults.meta=Y.meta),this._completed||!ae||!D(this._config.complete)||Y&&Y.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),ae||Y&&Y.meta.paused||this._nextChunk(),Y}this._halted=!0},this._sendError=function(k){D(this._config.error)?this._config.error(k):r&&this._config.error&&s.postMessage({workerId:l.WORKER_ID,error:k,finished:!1})}}function f(y){var k;(y=y||{}).chunkSize||(y.chunkSize=l.RemoteChunkSize),u.call(this,y),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(S){this._input=S,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(k=new XMLHttpRequest,this._config.withCredentials&&(k.withCredentials=this._config.withCredentials),o||(k.onload=T(this._chunkLoaded,this),k.onerror=T(this._chunkError,this)),k.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var S=this._config.downloadRequestHeaders;for(var L in S)k.setRequestHeader(L,S[L])}if(this._config.chunkSize){var F=this._start+this._config.chunkSize-1;k.setRequestHeader("Range","bytes="+this._start+"-"+F)}try{k.send(this._config.downloadRequestBody)}catch(Y){this._chunkError(Y.message)}o&&k.status===0&&this._chunkError()}},this._chunkLoaded=function(){k.readyState===4&&(k.status<200||400<=k.status?th
2023-06-30 13:38:01 +00:00
`),se=1<z.length&&z[0].length<re[0].length;if(re.length===1||se)return`
`;for(var $=0,Z=0;Z<re.length;Z++)re[Z][0]===`
`&&$++;return $>=re.length/2?`\r
2023-07-02 22:17:01 +00:00
`:"\r"}(J,w)),L=!1,y.delimiter)D(y.delimiter)&&(y.delimiter=y.delimiter(J),X.meta.delimiter=y.delimiter);else{var E=function(B,j,te,re,z){var se,$,Z,ie;z=z||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var de=0;de<z.length;de++){var ce=z[de],ye=0,K=0,oe=0;Z=void 0;for(var he=new _({comments:re,delimiter:ce,newline:j,preview:10}).parse(B),xe=0;xe<he.data.length;xe++)if(te&&we(he.data[xe]))oe++;else{var Le=he.data[xe].length;K+=Le,Z!==void 0?0<Le&&(ye+=Math.abs(Le-Z),Z=Le):Z=Le}0<he.data.length&&(K/=he.data.length-oe),($===void 0||ye<=$)&&(ie===void 0||ie<K)&&1.99<K&&($=ye,se=ce,ie=K)}return{successful:!!(y.delimiter=se),bestDelimiter:se}}(J,y.newline,y.skipEmptyLines,y.comments,y.delimitersToGuess);E.successful?y.delimiter=E.bestDelimiter:(L=!0,y.delimiter=l.DefaultDelimiter),X.meta.delimiter=y.delimiter}var P=M(y);return y.preview&&y.header&&P.preview++,k=J,S=new _(P),X=S.parse(k,fe,le),N(),V?{meta:{paused:!0}}:X||{meta:{paused:!1}}},this.paused=function(){return V},this.pause=function(){V=!0,S.abort(),k=D(y.chunk)?"":k.substring(S.getCharIndex())},this.resume=function(){W.streamer._halted?(V=!1,W.streamer.parseChunk(k,!0)):setTimeout(W.resume,3)},this.aborted=function(){return me},this.abort=function(){me=!0,S.abort(),X.meta.aborted=!0,D(y.complete)&&y.complete(X),k=""}}function v(y){return y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _(y){var k,S=(y=y||{}).delimiter,L=y.newline,F=y.comments,Y=y.step,I=y.preview,ae=y.fastMode,W=k=y.quoteChar===void 0||y.quoteChar===null?'"':y.quoteChar;if(y.escapeChar!==void 0&&(W=y.escapeChar),(typeof S!="string"||-1<l.BAD_DELIMITERS.indexOf(S))&&(S=","),F===S)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<l.BAD_DELIMITERS.indexOf(F))&&(F=!1),L!==`
2023-06-30 13:38:01 +00:00
`&&L!=="\r"&&L!==`\r
`&&(L=`
2023-07-02 22:17:01 +00:00
`);var A=0,q=!1;this.parse=function(V,me,pe){if(typeof V!="string")throw new Error("Input must be a string");var X=V.length,_e=S.length,we=L.length,N=F.length,Q=D(Y),H=[],ee=[],J=[],fe=A=0;if(!V)return Ue();if(y.header&&!me){var le=V.split(L)[0].split(S),w=[],E={},P=!1;for(var B in le){var j=le[B];D(y.transformHeader)&&(j=y.transformHeader(j,B));var te=j,re=E[j]||0;for(0<re&&(P=!0,te=j+"_"+re),E[j]=re+1;w.includes(te);)te=te+"_"+re;w.push(te)}if(P){var z=V.split(L);z[0]=w.join(S),V=z.join(L)}}if(ae||ae!==!1&&V.indexOf(k)===-1){for(var se=V.split(L),$=0;$<se.length;$++){if(J=se[$],A+=J.length,$!==se.length-1)A+=L.length;else if(pe)return Ue();if(!F||J.substring(0,N)!==F){if(Q){if(H=[],oe(J.split(S)),Ne(),q)return Ue()}else oe(J.split(S));if(I&&I<=$)return H=H.slice(0,I),Ue(!0)}}return Ue()}for(var Z=V.indexOf(S,A),ie=V.indexOf(L,A),de=new RegExp(v(W)+v(k),"g"),ce=V.indexOf(k,A);;)if(V[A]!==k)if(F&&J.length===0&&V.substring(A,A+N)===F){if(ie===-1)return Ue();A=ie+we,ie=V.indexOf(L,A),Z=V.indexOf(S,A)}else if(Z!==-1&&(Z<ie||ie===-1))J.push(V.substring(A,Z)),A=Z+_e,Z=V.indexOf(S,A);else{if(ie===-1)break;if(J.push(V.substring(A,ie)),Le(ie+we),Q&&(Ne(),q))return Ue();if(I&&H.length>=I)return Ue(!0)}else for(ce=A,A++;;){if((ce=V.indexOf(k,ce+1))===-1)return pe||ee.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:H.length,index:A}),xe();if(ce===X-1)return xe(V.substring(A,ce).replace(de,k));if(k!==W||V[ce+1]!==W){if(k===W||ce===0||V[ce-1]!==W){Z!==-1&&Z<ce+1&&(Z=V.indexOf(S,ce+1)),ie!==-1&&ie<ce+1&&(ie=V.indexOf(L,ce+1));var ye=he(ie===-1?Z:Math.min(Z,ie));if(V.substr(ce+1+ye,_e)===S){J.push(V.substring(A,ce).replace(de,k)),V[A=ce+1+ye+_e]!==k&&(ce=V.indexOf(k,A)),Z=V.indexOf(S,A),ie=V.indexOf(L,A);break}var K=he(ie);if(V.substring(ce+1+K,ce+1+K+we)===L){if(J.push(V.substring(A,ce).replace(de,k)),Le(ce+1+K+we),Z=V.indexOf(S,A),ce=V.indexOf(k,A),Q&&(Ne(),q))return Ue();if(I&&H.length>=I)return Ue(!0);break}ee.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:H.length,index:A}),ce++}}else ce++}return xe();function oe(Ze){H.push(Ze),fe=A}function he(Ze){var Qe=0;if(Ze!==-1){var ot=V.substring(ce+1,Ze);ot&&ot.trim()===""&&(Qe=ot.length)}return Qe}function xe(Ze){return pe||(Ze===void 0&&(Ze=V.substring(A)),J.push(Ze),A=X,oe(J),Q&&Ne()),Ue()}function Le(Ze){A=Ze,oe(J),J=[],ie=V.indexOf(L,A)}function Ue(Ze){return{data:H,errors:ee,meta:{delimiter:S,linebreak:L,aborted:q,truncated:!!Ze,cursor:fe+(me||0)}}}function Ne(){Y(Ue()),H=[],ee=[]}},this.abort=function(){q=!0},this.getCharIndex=function(){return A}}function b(y){var k=y.data,S=i[k.workerId],L=!1;if(k.error)S.userError(k.error,k.file);else if(k.results&&k.results.data){var F={abort:function(){L=!0,x(k.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(D(S.userStep)){for(var Y=0;Y<k.results.data.length&&(S.userStep({data:k.results.data[Y],errors:k.results.errors,meta:k.results.meta},F),!L);Y++);delete k.results}else D(S.userChunk)&&(S.userChunk(k.results,F,k.file),delete k.results)}k.finished&&!L&&x(k.workerId,k.results)}function x(y,k){var S=i[y];D(S.userComplete)&&S.userComplete(k),S.terminate(),delete i[y]}function C(){throw new Error("Not implemented.")}function M(y){if(typeof y!="object"||y===null)return y;var k=Array.isArray(y)?[]:{};for(var S in y)k[S]=M(y[S]);return k}function T(y,k){return function(){y.apply(k,arguments)}}function D(y){return typeof y=="function"}return r&&(s.onmessage=function(y){var k=y.data;if(l.WORKER_ID===void 0&&k&&(l.WORKER_ID=k.workerId),typeof k.input=="string")s.postMessage({workerId:l.WORKER_ID,results:l.parse(k.input,k.config),finished:!0});else if(s.File&&k.input instanceof File||k.input instanceof Object){var S=l.parse(k.input,k.config);S&&s.postMessage({workerId:l.WORKER_ID,results:S,finished:!0})}}),(f.prototype=Object.create(u.prototype)).constructor=f,(h.prototype=Object.create(u.prototype)).constructor=h,(g.prototype=Object.create(g.prototype)).constructor=g,(p.prototype=Object.create(u.prototype)).constructor=p,l})})(lp);var Yb=lp.expor
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),s=i.substring(o+1).trim(),!(!n||e[n]&&ov[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},Su=Symbol("internals");function Ks(t){return t&&String(t).trim().toLowerCase()}function rr(t){return t===!1||t==null?t:G.isArray(t)?t.map(rr):String(t)}function iv(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const av=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Mi(t,e,n,s,o){if(G.isFunction(s))return s.call(this,e,n);if(o&&(e=n),!!G.isString(e)){if(G.isString(s))return e.indexOf(s)!==-1;if(G.isRegExp(s))return s.test(e)}}function lv(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function cv(t,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(o,r,i){return this[s].call(this,e,o,r,i)},configurable:!0})})}class ei{constructor(e){e&&this.set(e)}set(e,n,s){const o=this;function r(a,l,c){const u=Ks(l);if(!u)throw new Error("header name must be a non-empty string");const f=G.findKey(o,u);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||l]=rr(a))}const i=(a,l)=>G.forEach(a,(c,u)=>r(c,u,l));return G.isPlainObject(e)||e instanceof this.constructor?i(e,n):G.isString(e)&&(e=e.trim())&&!av(e)?i(rv(e),n):e!=null&&r(n,e,s),this}get(e,n){if(e=Ks(e),e){const s=G.findKey(this,e);if(s){const o=this[s];if(!n)return o;if(n===!0)return iv(o);if(G.isFunction(n))return n.call(this,o,s);if(G.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ks(e),e){const s=G.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Mi(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let o=!1;function r(i){if(i=Ks(i),i){const a=G.findKey(s,i);a&&(!n||Mi(s,s[a],a,n))&&(delete s[a],o=!0)}}return G.isArray(e)?e.forEach(r):r(e),o}clear(e){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const r=n[s];(!e||Mi(this,this[r],r,e,!0))&&(delete this[r],o=!0)}return o}normalize(e){const n=this,s={};return G.forEach(this,(o,r)=>{const i=G.findKey(s,r);if(i){n[i]=rr(o),delete n[r];return}const a=e?lv(r):String(r).trim();a!==r&&delete n[r],n[a]=rr(o),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return G.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=e&&G.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[Su]=this[Su]={accessors:{}}).accessors,o=this.prototype;function r(i){const a=Ks(i);s[a]||(cv(o,i),s[a]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}ei.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.freezeMethods(ei.prototype);G.freezeMethods(ei);const nn=ei;function Ri(t,e){const n=this||Hl,s=e||n,o=nn.from(s.headers);let r=s.data;return G.forEach(t,function(a){r=a.call(n,r,o.normalize(),e?e.status:void 0)}),o.normalize(),r}function Cp(t){return!!(t&&t.__CANCEL__)}function Mo(t,e,n){Pe.call(this,t??"canceled",Pe.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(Mo,Pe,{__CANCEL__:!0});function uv(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new Pe("Request failed with status code "+n.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const dv=$t.isStandardBrowserEnv?function(){return{write:function(n,s,o,r,i,a){const l=[];l.push(n+"="+encodeURIComponent(s)),G.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),G.isString(r)&&l.push("path="+r),G.isString(i)&&l.push("domain="+i),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function fv(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hv(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Ap(t,e){return t&&!fv(e)?hv(t,e):e}const pv=$t.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function o(r){let i=r;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=o(window.location.href),function(i){const a=G.isString(i)?o(i):i;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function gv(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function mv(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,r=0,i;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=s[r];i||(i=c),n[o]=l,s[o]=c;let f=r,h=0;for(;f!==o;)h+=n[f++],f=f%t;if(o=(o+1)%t,o===r&&(r=(r+1)%t),c-i<e)return;const g=u&&c-u;return g?Math.round(h*1e3/g):void 0}}function Tu(t,e){let n=0;const s=mv(50,250);return o=>{const r=o.loaded,i=o.lengthComputable?o.total:void 0,a=r-n,l=s(a),c=r<=i;n=r;const u={loaded:r,total:i,progress:i?r/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&c?(i-r)/l:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const _v=typeof XMLHttpRequest<"u",bv=_v&&function(t){return new Promise(function(n,s){let o=t.data;const r=nn.from(t.headers).normalize(),i=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}G.isFormData(o)&&($t.isStandardBrowserEnv||$t.isStandardBrowserWebWorkerEnv)&&r.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",p=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(g+":"+p))}const u=Ap(t.baseURL,t.url);c.open(t.method.toUpperCase(),xp(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function f(){if(!c)return;const g=nn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:g,config:t,request:c};uv(function(_){n(_),l()},function(_){s(_),l()
2023-06-30 13:38:01 +00:00
`+model_object.title+`
installed!`,4,!0),this.api_get_req("disk_usage").then(e=>{this.diskUsage=e})}else if(t.status==="failed"&&(console.log("Install failed"),this.$refs.modelZoo)){const e=this.$refs.modelZoo.findIndex(s=>s.model.path==t.model_url&&s.model.title==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models[e];n&&(n.installing=!1,n.isInstalled=!1),console.error("Installation failed:",t.error),this.$refs.toast.showToast(`Model:
`+model_object.title+`
failed to install!`,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s})}},showAddModelDialog(){this.$refs.addmodeldialog.showDialog("").then(()=>{console.log(this.$refs.addmodeldialog.model_path);const t=this.$refs.addmodeldialog.model_path;$e.emit("install_model",{path:t},e=>{console.log("Model installation successful:",e)}),console.log(this.$refs.addmodeldialog.model_path)})},closeAddModelDialog(){this.addModelDialogVisibility=!1},collapseAll(t){this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t,this.sc_collapsed=t,this.mzdc_collapsed=t},fetchModels(){Ae.get("/get_available_models").then(t=>{this.models=t.data,this.models.sort((e,n)=>e.title.localeCompare(n.title)),this.fetchCustomModels()}).catch(t=>{console.log(t.message,"fetchModels")})},fetchCustomModels(){Ae.get("/list_models").then(t=>{for(let e=0;e<t.data.length;e++){const n=t.data[e];if(this.models.findIndex(o=>o.title==n)==-1){let o={};o.title=n,o.path=n,o.isCustomModel=!0,o.isInstalled=!0,this.models.push(o)}}}).catch(t=>{console.log(t.message,"fetchCustomModels")})},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("ppa",t),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}if(t.isMounted&&this.configFile.personalities.includes(t.personality.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),this.isLoading=!1}else console.log("mounting pers"),this.onPersonalityMounted(t);ge(()=>{Ee.replace()})}},onSelected(t){this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),t&&(t.isInstalled?this.configFile.model_name!=t.title&&(this.update_model(t.title),this.configFile.model_name=t.title,this.$refs.toast.showToast(`Selected model:
`+t.title,4,!0),this.settingsChanged=!0,this.isModelSelected=!0):this.$refs.toast.showToast(`Model:
`+t.title+`
is not installed`,4,!1),ge(()=>{Ee.replace()}))},onCopy(t){let e;t.model.isCustomModel?e=`Model name: ${t.title}
File size: ${t.fileSize}
Manually downloaded model `:e=`Model name: ${t.title}
File size: ${t.fileSize}
Download: ${t.path}
License: ${t.license}
Owner: ${t.owner}
Website: ${t.owner_link}
Description: ${t.description}`,this.$refs.toast.showToast("Copied model info to clipboard!",4,!0),navigator.clipboard.writeText(e.trim())},onCopyLink(t){this.$refs.toast.showToast("Copied link to clipboard!",4,!0),navigator.clipboard.writeText(t.path)},onCancelInstall(){const t=this.addModel;console.log("cancel install",t),this.modelDownlaodInProgress=!1,this.addModel={},this.$refs.toast.showToast("Model installation aborted",4,!1),$e.emit("cancel_install",{model_name:t.model_name,binding_folder:t.binding_folder,model_url:t.model_url})},onInstall(t){if(t.linkNotValid){t.installing=!1,this.$refs.toast.showToast("Link is not valid, file does not exist",4,!1);return}let e=t.path;this.showProgress=!0,this.progress=0,this.addModel={model_name:t.model.title,binding_folder:this.configFile.binding_name,model_url:t.path},console.log("installing...",this.addModel);const n=s=>{if(console.log("received something"),s.status&&s.progress<=100){if(this.addModel=s,console.log("Progress",s),t.progress=s.progress,t.speed=s.speed,t.total_size=s.total_size,t.downloaded_size=s.downloaded_size,t.start_time=s.start_time,t.installing=!0,t.progress==100){const o=this.models.findIndex(r=>r.path===e);this.models[o].isInstalled=!0,this.showProgress=!1,t.installing=!1,console.log("Received succeeded"),$e.off("install_progress",n),console.log("Installed successfully"),this.$refs.toast.showToast(`Model:
`+t.title+`
installed!`,4,!0),this.api_get_req("disk_usage").then(r=>{this.diskUsage=r})}}else $e.off("install_progress",n),console.log("Install failed"),t.installing=!1,this.showProgress=!1,console.error("Installation failed:",s.error),this.$refs.toast.showToast(`Model:
`+t.title+`
failed to install!`,4,!1),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o})};$e.on("install_progress",n),$e.emit("install_model",{path:e}),console.log("Started installation, please wait")},onInstallAddModel(){if(!this.addModel.url){this.$refs.toast.showToast("Link is empty",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.modelDownlaodInProgress=!0,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),$e.off("install_progress",e),console.log("Installed successfully"),this.addModel={},this.$refs.toast.showToast(`Model:
`+this.addModel.model_name+`
installed!`,4,!0),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))):($e.off("install_progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$refs.toast.showToast(`Model:
`+this.addModel.model_name+`
failed to install!`,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))};$e.on("install_progress",e),$e.emit("install_model",{path:t}),console.log("Started installation, please wait")},uploadLocalModel(){if(this.uploadData.length==0){this.$refs.toast.showToast("No files to upload",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.modelDownlaodInProgress=!0,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),$e.off("progress",e),console.log("Installed successfully"),this.addModel={},this.$refs.toast.showToast(`Model:
`+this.addModel.model_name+`
installed!`,4,!0),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))):($e.off("progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$refs.toast.showToast(`Model:
`+this.addModel.model_name+`
failed to install!`,4,!1),this.api_get_req("disk_usage").then(s=>{this.diskUsage=s}))};$e.on("progress",e),console.log("Started installation, please wait")},setFileList(t){this.uploadData=t.target.files,console.log("set file list",this.uploadData)},onUninstall(t){this.$refs.yesNoDialog.askQuestion(`Are you sure you want to delete this model?
[`+t.title+"]","Yes","Cancel").then(e=>{if(e){console.log("uninstalling model...");const n=s=>{if(console.log("uninstalling res",s),s.status){console.log("uninstalling success",s),t.uninstalling=!1,$e.off("install_progress",n),this.showProgress=!1;const o=this.models.findIndex(r=>r.path===t.path);this.models[o].isInstalled=!1,t.model.isCustomModel&&(this.models=this.models.filter(r=>r.title!==t.title)),this.$refs.toast.showToast(`Model:
`+t.title+`
was uninstalled!`,4,!0),this.api_get_req("disk_usage").then(r=>{this.diskUsage=r})}else console.log("uninstalling failed",s),t.uninstalling=!1,this.showProgress=!1,$e.off("install_progress",n),console.error("Uninstallation failed:",message.error),this.$refs.toast.showToast(`Model:
`+t.title+`
failed to uninstall!`,4,!1),this.api_get_req("disk_usage").then(o=>{this.diskUsage=o})};$e.on("install_progress",n),$e.emit("uninstall_model",{path:t.path})}})},onSelectedBinding(t){if(!t.binding.installed){this.$refs.toast.showToast(`Binding is not installed:
`+t.binding.name,4,!1);return}this.configFile.binding_name!=t.binding.folder&&this.update_binding(t.binding.folder)},onInstallBinding(t){this.configFile.binding_name!=t.binding.folder&&this.update_binding(t.binding.folder)},onReinstallBinding(t){this.isLoading=!0,Ae.post("/reinstall_binding",{name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_binding",e),e.data.status?this.$refs.toast.showToast("Reinstalled binding successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall binding",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall binding
`+e.message,4,!1),{status:!1}))},onSettingsBinding(t){try{this.isLoading=!0,Ae.get("/get_active_binding_settings").then(e=>{this.isLoading=!1,e&&(console.log("binding sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Binding settings - "+t.binding.name,"Save changes","Cancel").then(n=>{try{Ae.post("/set_active_binding_settings",n).then(s=>{s&&s.data?(console.log("binding set with new settings",s.data),this.$refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get binding settings responses.
`+s,4,!1),this.isLoading=!1)})}catch(s){this.$refs.toast.showToast(`Did not get binding settings responses.
Endpoint error: `+s.message,4,!1),this.isLoading=!1}}):(this.$refs.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this.$refs.toast.showToast("Could not open binding settings. Endpoint error: "+e.message,4,!1)}},onSettingsPersonality(t){try{this.isLoading=!0,Ae.get("/get_active_personality_settings").then(e=>{this.isLoading=!1,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{Ae.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):(this.$refs.toast.showToast(`Did not get Personality settings responses.
`+s,4,!1),this.isLoading=!1)})}catch(s){this.$refs.toast.showToast(`Did not get Personality settings responses.
Endpoint error: `+s.message,4,!1),this.isLoading=!1}}):(this.$refs.toast.showToast("Personality has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},onMessageBoxOk(){console.log("OK button clicked")},refresh(){this.api_get_req("list_models").then(t=>{this.modelsArr=t,this.modelsArr.sort()}),this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t,this.persCatgArr.sort()}),this.api_get_req("get_config").then(t=>{this.getPersonalitiesArr().then(()=>{this.getMountedPersonalities()}),console.log("Received config"),this.configFile=t,this.models.forEach(e=>{e.title==t.model_name?e.selected=!0:e.selected=!1})}).then(()=>{this.api_get_req("get_current_personality_path_infos").then(t=>{this.configFile.personality_language=t.personality_language,this.configFile.personality_category=t.personality_category,this.configFile.personality_folder=t.personality_name,console.log("received infos")})}),this.api_get_req("list_personalities").then(t=>{this.persArr=t,this.persArr.sort(),console.log(`Listed personalities:
${t}`)}),this.api_get_req("disk_usage").then(t=>{this.diskUsage=t}),this.api_get_req("ram_usage").then(t=>{this.ramUsage=t}),this.fetchModels(),this.api_get_req("list_bindings"),then(t=>{this.bindings=t,this.bindings.sort((e,n)=>e.name.localeCompare(n.name))})},toggleAccordion(){this.showAccordion=!this.showAccordion},update_setting(t,e,n){this.isLoading=!0;const s={setting_name:t,setting_value:e};Ae.post("/update_setting",s).then(o=>{if(o)return this.isLoading=!1,console.log("update_setting",o),n!==void 0&&n(o),o.data;this.isLoading=!1}).catch(o=>(this.isLoading=!1,{status:!1}))},update_binding(t){this.isLoading=!0,this.update_setting("binding_name",t,e=>{const n=this.bindings.findIndex(o=>o.folder==t),s=this.bindings[n];s&&(s.installed=!0),this.$refs.toast.showToast("Binding changed.",4,!0),this.settingsChanged=!0,this.isLoading=!1,this.update_model(null),this.configFile.model_name=null,this.refresh(),ge(()=>{Ee.replace()})})},update_model(t){t||(this.isModelSelected=!1),this.isLoading=!0,this.update_setting("model_name",t,e=>{this.isLoading=!1})},applyConfiguration(){this.isLoading=!0,Ae.post("/apply_settings").then(t=>{this.isLoading=!1,t.data.status?(this.$refs.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$refs.toast.showToast("Configuration change failed.",4,!1),ge(()=>{Ee.replace()})})},save_configuration(){this.showConfirmation=!1,Ae.post("/save_settings",{}).then(t=>{if(t)return t.status||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}))},reset_configuration(){this.$refs.yesNoDialog.askQuestion(`Are you sure?
This will delete all your configurations and get back to default configuration.`).then(t=>{t&&Ae.post("/reset_settings",{}).then(e=>{if(e)return e.status?this.$refs.messageBox.showMessage("Settings have been reset correctly"):this.$refs.messageBox.showMessage("Couldn't reset settings!"),e.data}).catch(e=>(console.log(e.message,"reset_configuration"),this.$refs.messageBox.showMessage("Couldn't reset settings!"),{status:!1}))})},async api_get_req(t){try{const e=await Ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - settings");return}},closeToast(){this.showToast=!1},async getPersonalitiesArr(){this.isLoading=!0,this.personalities=[];const t=await this.api_get_req("get_all_personalities"),e=await this.api_get_req("get_config"),n=Object.keys(t);for(let s=0;s<n.length;s++){const o=n[s],r=t[o],i=Object.keys(r);for(let a=0;a<i.length;a++){const l=i[a],u=r[l].map(f=>{const h=e.personalities.includes(o+"/"+l+"/"+f.folder);let g={};return g=f,g.category=l,g.language=o,g.full_path=o+"/"+l+"/"+f.folder,g.isMounted=h,g});this.personalities.length==0?this.personalities=u:this.personalities=this.personalities.concat(u)}}this.personalities.sort((s,o)=>s.name.localeCompare(o.name)),this.personalitiesFiltered=this.personalities.filter(s=>s.category===this.configFile.personality_category&&s.language===this.configFile.personality_language),this.personalitiesFiltered.sort(),console.log("per filtered",this.personalitiesFiltered),this.isLoading=!1},async filterPersonalities(){if(!this.searchPersonality){this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category&&n.language===this.configFile.personality_language),this.personalitiesFiltered.sort(),this.searchPersonalityInProgress=!1;return}const t=this.searchPersonality.toLowerCase(),e=this.personalities.filter(n=>{if(n.name&&n.name.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)||n.full_path&&n.full_path.toLowerCase().includes(t))return n});e.length>0?this.personalitiesFiltered=e.sort():(this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category&&n.language===this.configFile.personality_language),this.personalitiesFiltered.sort()),this.searchPersonalityInProgress=!1},async filterModels(){if(!this.searchModel){this.modelsFiltered=this.models,this.modelsFiltered.sort(),this.searchModelInProgress=!1;return}const t=this.searchModel.toLowerCase(),e=this.models.filter(n=>{if(n.title&&n.title.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)||n.path&&n.path.toLowerCase().includes(t))return n});e.length>0?this.modelsFiltered=e.sort():(this.modelsFiltered=this.models,this.modelsFiltered.sort()),this.searchModelInProgress=!1},computedFileSize(t){return zt(t)},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await Ae.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},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 Ae.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};console.log("select pers",t);const n={id:this.configFile.personalities.findIndex(s=>s===t.full_path)};try{const s=await Ae.post("/select_personality",n);if(s){this.configFile=await this.api_get_req("get_config");let o=await this.api_get_req("get_current_personality_path_infos");return this.configFile.personality_language=o.personality_language,this.configFile.personality_category=o.personality_category,this.configFile.personality_folder=o.personality_name,s.data}}catch(s){console.log(s.message,"select_personality - settings");return}},async mountPersonality(t){if(this.isLoadi
`+t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality
Error: `+e.error+`
Response:
`+e,4,!1)),this.isLoading=!1},async unmountPersonality(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality unmounted",4,!0);const n=this.personalities.findIndex(a=>a.full_path==t.full_path),s=this.personalitiesFiltered.findIndex(a=>a.full_path==t.full_path),o=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,s>-1&&(this.personalitiesFiltered[s].isMounted=!1),o>-1&&(this.$refs.personalitiesZoo[o].isMounted=!1),this.getMountedPersonalities();const r=this.mountedPersArr[this.mountedPersArr.length-1];console.log(r,this.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality:
`+r.name,4,!0)}else this.$refs.toast.showToast(`Could not unmount personality
2023-07-02 22:17:01 +00:00
Error: `+e.error,4,!1);this.isLoading=!1},getMountedPersonalities(){let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],s=this.personalities.findIndex(r=>r.full_path==n);console.log("index",s),console.log("i:",e);const o=this.personalities[s];o?t.push(o):t.push(this.personalities[this.personalities.findIndex(r=>r.full_path=="english/generic/lollms")])}this.mountedPersArr=[],this.mountedPersArr=t,console.log("getMountedPersonalities",t),ge(()=>{})},onPersonalityMounted(t){console.log("on sel ",t),this.configFile.personalities.includes(t.full_path)?this.configFile.personalities.length==1?this.$refs.toast.showToast("Can't unmount last personality",4,!1):this.unmountPersonality(t):this.mountPersonality(t)},personalityImgPlacehodler(t){t.target.src=Yn},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(){this.constructor()},activated(){this.isMounted&&this.constructor()},computed:{disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return 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)},vram_available_space(){return this.computedFileSize(this.vramUsage.gpu_0_total_vram-this.vramUsage.gpu_0_used_vram)},vram_usage(){return this.computedFileSize(this.vramUsage.gpu_0_used_vram)},vram_percent_usage(){return(this.vramUsage.gpu_0_used_vram/this.vramUsage.gpu_0_total_vram*100).toFixed(2)},vram_total_space(){return this.computedFileSize(this.vramUsage.gpu_0_total_vram)},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 defaultImgPlaceholder}},imgModel(){if(this.isMounted)try{return this.$refs.modelZoo[this.$refs.modelZoo.findIndex(t=>t.title==this.configFile.model_name)].$refs.imgElement.src}catch{return Ja}},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 zt(this.addModel.speed)},total_size_computed(){return zt(this.addModel.total_size)},downloaded_size_computed(){return zt(this.addModel.downloaded_size)}},watch:{bec_collapsed(){ge(()=>{Ee.replace()})},pc_collapsed(){ge(()=>{Ee.replace()})},mc_collapsed(){ge(()=>{Ee.replace()})},sc_collapsed(){ge(()=>{Ee.replace()})},showConfirmation(){ge(()=>{Ee.replace()})},mzl_collapsed(){ge(()=>{Ee.replace()})},pzl_collapsed(){ge(()=>{Ee.replace()})},bzl_collapsed(){ge(()=>{Ee.replace()})},all_collapsed(t){this.collapseAll(t),ge(()=>{Ee.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,ge(()=>{Ee.replace()})},isLoading(){ge(()=>{Ee.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},searchModel(t){t==""&&this.filterModels()},mzdc_collapsed(){ge(()=>{Ee.replace()})}},async beforeRouteLeave(t){if(await this.$router.isReady(),this.settingsChanged)return await this.$refs.yesNoDialog.askQuestion(`Did You forgot to apply changes?
2023-06-30 13:38:01 +00:00
You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1;if(!this.isModelSelected)return await this.$refs.yesNoDialog.askQuestion(`Did You forgot to select model?
2023-07-02 22:17:01 +00:00
You need to select model before you leave, or else.`,"Ok","Cancel"),!1}},be=t=>(Fs("data-v-bac4dabe"),t=t(),Bs(),t),KE={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-0"},WE={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"},ZE={key:0,class:"flex gap-3 flex-1 items-center duration-75"},YE=be(()=>d("i",{"data-feather":"x"},null,-1)),QE=[YE],JE=be(()=>d("i",{"data-feather":"check"},null,-1)),XE=[JE],eC={key:1,class:"flex gap-3 flex-1 items-center"},tC=be(()=>d("i",{"data-feather":"save"},null,-1)),nC=[tC],sC=be(()=>d("i",{"data-feather":"refresh-ccw"},null,-1)),oC=[sC],rC=be(()=>d("i",{"data-feather":"list"},null,-1)),iC=[rC],aC={class:"flex gap-3 flex-1 items-center justify-end"},lC={class:"flex gap-3 items-center"},cC={key:0,class:"flex gap-3 items-center"},uC=be(()=>d("i",{"data-feather":"check"},null,-1)),dC=[uC],fC={key:1,role:"status"},hC=be(()=>d("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"},[d("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"}),d("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)),pC=be(()=>d("span",{class:"sr-only"},"Loading...",-1)),gC=[hC,pC],mC={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"},_C={class:"flex flex-row p-3"},bC=be(()=>d("i",{"data-feather":"chevron-right",class:"mr-2 flex-shrink-0"},null,-1)),yC=be(()=>d("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),vC=be(()=>d("div",{class:"mr-2"},"|",-1)),wC={class:"text-base font-semibold cursor-pointer select-none items-center"},xC={class:"flex gap-2 items-center"},kC=To('<svg aria-hidden="true" class="w-10 h-10 fill-secondary" viewBox="0 -3 82 66" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-bac4dabe><path d="M 5.9133057,14.000286 H 70.974329 a 8.9999999,8.9999999 0 0 1 8.999987,8.999998 V 47.889121 H 5.9133057 Z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1116" data-v-bac4dabe></path><path d="m 5.9133057,28.634282 h -2.244251 v -9.367697 h 2.244251 z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1118" data-v-bac4dabe></path><path d="M 5.9133057,42.648417 H 3.6690547 V 33.28072 h 2.244251 z" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1120" data-v-bac4dabe></path><path d="m 5.9133057,47.889121 v 4.42369" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1122" data-v-bac4dabe></path><path d="M 5.9133057,14.000286 H 2.3482707" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1124" data-v-bac4dabe></path><path d="M 2.3482707,14.000286 V 10.006515" style="fill:none;stroke:currentColor;stroke-width:2.5;stroke-opacity:1;" id="path1126" data-v-bac4dabe></path><path d="m 74.31472,30.942798 a 11.594069,11.594069 0 0 0 -23.188136,0 11.594069,11.594069 0 0 0 23.188136,0 z" style="fill:none;stroke:currentColor;s
`,gU="∄",mU="∄",_U="𝔑",bU="𝔫",yU="≧̸",vU="≱",wU="≱",xU="≧̸",kU="⩾̸",EU="⩾̸",CU="⋙̸",AU="≵",SU="≫⃒",TU="≯",OU="≯",MU="≫̸",RU="↮",NU="⇎",DU="⫲",LU="∋",IU="⋼",PU="⋺",FU="∋",BU="Њ",jU="њ",zU="↚",$U="⇍",qU="‥",UU="≦̸",HU="≰",VU="↚",GU="⇍",KU="↮",WU="⇎",ZU="≰",YU="≦̸",QU="⩽̸",JU="⩽̸",XU="≮",eH="⋘̸",tH="≴",nH="≪⃒",sH="≮",oH="⋪",rH="⋬",iH="≪̸",aH="∤",lH="",cH=" ",uH="𝕟",dH="",fH="⫬",hH="¬",pH="≢",gH="≭",mH="∦",_H="∉",bH="≠",yH="≂̸",vH="∄",wH="≯",xH="≱",kH="≧̸",EH="≫̸",CH="≹",AH="⩾̸",SH="≵",TH="≎̸",OH="≏̸",MH="∉",RH="⋵̸",NH="⋹̸",DH="∉",LH="⋷",IH="⋶",PH="⧏̸",FH="⋪",BH="⋬",jH="≮",zH="≰",$H="≸",qH="≪̸",UH="⩽̸",HH="≴",VH="⪢̸",GH="⪡̸",KH="∌",WH="∌",ZH="⋾",YH="⋽",QH="⊀",JH="⪯̸",XH="⋠",eV="∌",tV="⧐̸",nV="⋫",sV="⋭",oV="⊏̸",rV="⋢",iV="⊐̸",aV="⋣",lV="⊂⃒",cV="⊈",uV="⊁",dV="⪰̸",fV="⋡",hV="≿̸",pV="⊃⃒",gV="⊉",mV="≁",_V="≄",bV="≇",yV="≉",vV="∤",wV="∦",xV="∦",kV="⫽⃥",EV="∂̸",CV="⨔",AV="⊀",SV="⋠",TV="⊀",OV="⪯̸",MV="⪯̸",RV="⤳̸",NV="↛",DV="⇏",LV="↝̸",IV="↛",PV="⇏",FV="⋫",BV="⋭",jV="⊁",zV="⋡",$V="⪰̸",qV="𝒩",UV="𝓃",HV="∤",VV="∦",GV="≁",KV="≄",WV="≄",ZV="∤",YV="∦",QV="⋢",JV="⋣",XV="⊄",eG="⫅̸",tG="⊈",nG="⊂⃒",sG="⊈",oG="⫅̸",rG="⊁",iG="⪰̸",aG="⊅",lG="⫆̸",cG="⊉",uG="⊃⃒",dG="⊉",fG="⫆̸",hG="≹",pG="Ñ",gG="ñ",mG="≸",_G="⋪",bG="⋬",yG="⋫",vG="⋭",wG="Ν",xG="ν",kG="#",EG="№",CG="",AG="≍⃒",SG="⊬",TG="⊭",OG="⊮",MG="⊯",RG="≥⃒",NG=">⃒",DG="⤄",LG="⧞",IG="⤂",PG="≤⃒",FG="<⃒",BG="⊴⃒",jG="⤃",zG="⊵⃒",$G="∼⃒",qG="⤣",UG="↖",HG="⇖",VG="↖",GG="⤧",KG="Ó",WG="ó",ZG="⊛",YG="Ô",QG="ô",JG="⊚",XG="О",eK="о",tK="⊝",nK="Ő",sK="ő",oK="⨸",rK="⊙",iK="⦼",aK="Œ",lK="œ",cK="⦿",uK="𝔒",dK="𝔬",fK="˛",hK="Ò",pK="ò",gK="⧁",mK="⦵",_K="Ω",bK="∮",yK="↺",vK="⦾",wK="⦻",xK="‾",kK="⧀",EK="Ō",CK="ō",AK="Ω",SK="ω",TK="Ο",OK="ο",MK="⦶",RK="⊖",NK="𝕆",DK="𝕠",LK="⦷",IK="“",PK="",FK="⦹",BK="⊕",jK="↻",zK="⩔",$K="",qK="⩝",UK="",HK="",VK="ª",GK="º",KK="⊶",WK="⩖",ZK="⩗",YK="⩛",QK="Ⓢ",JK="𝒪",XK="",eW="Ø",tW="ø",nW="⊘",sW="Õ",oW="õ",rW="⨶",iW="⨷",aW="⊗",lW="Ö",cW="ö",uW="⌽",dW="‾",fW="⏞",hW="⎴",pW="⏜",gW="¶",mW="∥",_W="∥",bW="⫳",yW="⫽",vW="∂",wW="∂",xW="П",kW="п",EW="%",CW=".",AW="‰",SW="⊥",TW="‱",OW="𝔓",MW="𝔭",RW="Φ",NW="φ",DW="ϕ",LW="",IW="☎",PW="Π",FW="π",BW="⋔",jW="ϖ",zW="ℏ",$W="",qW="ℏ",UW="⨣",HW="⊞",VW="⨢",GW="+",KW="∔",WW="⨥",ZW="⩲",YW="±",QW="±",JW="⨦",XW="⨧",eZ="±",tZ="",nZ="⨕",sZ="𝕡",oZ="",rZ="£",iZ="⪷",aZ="⪻",lZ="≺",cZ="≼",uZ="⪷",dZ="≺",fZ="≼",hZ="≺",pZ="⪯",gZ="≼",mZ="≾",_Z="⪯",bZ="⪹",yZ="⪵",vZ="⋨",wZ="⪯",xZ="⪳",kZ="≾",EZ="",CZ="″",AZ="",SZ="⪹",TZ="⪵",OZ="⋨",MZ="∏",RZ="∏",NZ="⌮",DZ="⌒",LZ="⌓",IZ="∝",PZ="∝",FZ="∷",BZ="∝",jZ="≾",zZ="⊰",$Z="𝒫",qZ="𝓅",UZ="Ψ",HZ="ψ",VZ="",GZ="𝔔",KZ="𝔮",WZ="⨌",ZZ="𝕢",YZ="",QZ="⁗",JZ="𝒬",XZ="𝓆",eY="",tY="⨖",nY="?",sY="≟",oY='"',rY='"',iY="⇛",aY="∽̱",lY="Ŕ",cY="ŕ",uY="√",dY="⦳",fY="⟩",hY="⟫",pY="⦒",gY="⦥",mY="⟩",_Y="»",bY="⥵",yY="⇥",vY="⤠",wY="⤳",xY="→",kY="↠",EY="⇒",CY="⤞",AY="↪",SY="↬",TY="⥅",OY="⥴",MY="⤖",RY="↣",NY="↝",DY="⤚",LY="⤜",IY="",PY="",FY="⤍",BY="⤏",jY="⤐",zY="",$Y="}",qY="]",UY="⦌",HY="⦎",VY="⦐",GY="Ř",KY="ř",WY="Ŗ",ZY="ŗ",YY="⌉",QY="}",JY="Р",XY="р",eQ="⤷",tQ="⥩",nQ="”",sQ="”",oQ="↳",rQ="",iQ="",aQ="",lQ="",cQ="",uQ="▭",dQ="®",fQ="®",hQ="∋",pQ="⇋",gQ="⥯",mQ="⥽",_Q="⌋",bQ="𝔯",yQ="",vQ="⥤",wQ="⇁",xQ="⇀",kQ="⥬",EQ="Ρ",CQ="ρ",AQ="ϱ",SQ="⟩",TQ="⇥",OQ="→",MQ="→
`," "],ple=["{","}","|","\\","^","`"].concat(hle),gle=["'"].concat(ple),qu=["%","/","?",";","#"].concat(gle),Uu=["/","?","#"],mle=255,Hu=/^[+a-z0-9A-Z_-]{0,63}$/,_le=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Vu={javascript:!0,"javascript:":!0},Gu={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ble(t,e){if(t&&t instanceof wr)return t;var n=new wr;return n.parse(t,e),n}wr.prototype.parse=function(t,e){var n,s,o,r,i,a=t;if(a=a.trim(),!e&&t.split("#").length===1){var l=fle.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=ule.exec(a);if(c&&(c=c[0],o=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(e||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(c&&Vu[c])&&(a=a.substr(2),this.slashes=!0)),!Vu[c]&&(i||c&&!Gu[c])){var u=-1;for(n=0;n<Uu.length;n++)r=a.indexOf(Uu[n]),r!==-1&&(u===-1||r<u)&&(u=r);var f,h;for(u===-1?h=a.lastIndexOf("@"):h=a.lastIndexOf("@",u),h!==-1&&(f=a.slice(0,h),a=a.slice(h+1),this.auth=f),u=-1,n=0;n<qu.length;n++)r=a.indexOf(qu[n]),r!==-1&&(u===-1||r<u)&&(u=r);u===-1&&(u=a.length),a[u-1]===":"&&u--;var g=a.slice(0,u);a=a.slice(u),this.parseHost(g),this.hostname=this.hostname||"";var p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){var m=this.hostname.split(/\./);for(n=0,s=m.length;n<s;n++){var v=m[n];if(v&&!v.match(Hu)){for(var _="",b=0,x=v.length;b<x;b++)v.charCodeAt(b)>127?_+="x":_+=v[b];if(!_.match(Hu)){var C=m.slice(0,n),M=m.slice(n+1),T=v.match(_le);T&&(C.push(T[1]),M.unshift(T[2])),M.length&&(a=M.join(".")+a),this.hostname=C.join(".");break}}}}this.hostname.length>mle&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=a.indexOf("#");D!==-1&&(this.hash=a.substr(D),a=a.slice(0,D));var y=a.indexOf("?");return y!==-1&&(this.search=a.substr(y),a=a.slice(0,y)),a&&(this.pathname=a),Gu[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};wr.prototype.parseHost=function(t){var e=dle.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var yle=ble;qs.encode=ile;qs.decode=lle;qs.format=cle;qs.parse=yle;var Ln={},Di,Ku;function Yp(){return Ku||(Ku=1,Di=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Di}var Li,Wu;function Qp(){return Wu||(Wu=1,Li=/[\0-\x1F\x7F-\x9F]/),Li}var Ii,Zu;function vle(){return Zu||(Zu=1,Ii=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),Ii}var Pi,Yu;function Jp(){return Yu||(Yu=1,Pi=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Pi}var Qu;function wle(){return Qu||(Qu=1,Ln.Any=Yp(),Ln.Cc=Qp(),Ln.Cf=vle(),Ln.P=Zl,Ln.Z=Jp()),Ln}(function(t){function e(I){return Object.prototype.toString.call(I)}function n(I){return e(I)==="[object String]"}var s=Object.prototype.hasOwnProperty;function o(I,ae){return s.call(I,ae)}function r(I){var ae=Array.prototype.slice.call(arguments,1);return ae.forEach(function(W){if(W){if(typeof W!="object")throw new TypeError(W+"must be object");Object.keys(W).forEach(function(A){I[A]=W[A]})}}),I}function i(I,ae,W){return[].concat(I.slice(0,ae),W,I.slice(ae+1))}function a(I){return!(I>=55296&&I<=57343||I>=64976&&I<=65007||(I&65535)===65535||(I&65535)===65534||I>=0&&I<=8||I===11||I>=14&&I<=31||I>=127&&I<=159||I>1114111)}function l(I){if(I>65535){I-=65536;var ae=55296+(I>>10),W=56320+(I&1023);return String.fromCharCode(ae,W)}return String.fromCharCode(I)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,f=new RegExp(c.source+"|"+u.source,"gi"),h=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,g=Zp;function p(I,ae){var W=0;return o(g,ae)?g[ae]:ae.charCodeAt(0)===35&&h.test(ae)&&(W=ae[1].toLowerCase()==="x"?parseInt(ae.slice(2),16):parseInt(ae.slice(1),10),a(W))?l(W):I}function m(I){return I.indexOf("\\")<0?I:I.replace(c,"$1")}function v(I){return I.indexOf("\\"
`};Zt.fence=function(t,e,n,s,o){var r=t[e],i=r.info?Sle(r.info).trim():"",a="",l="",c,u,f,h,g;return i&&(f=i.split(/(\s+)/g),a=f[0],l=f.slice(2).join("")),n.highlight?c=n.highlight(r.content,a,l)||Qn(r.content):c=Qn(r.content),c.indexOf("<pre")===0?c+`
2023-06-30 13:38:01 +00:00
`:i?(u=r.attrIndex("class"),h=r.attrs?r.attrs.slice():[],u<0?h.push(["class",n.langPrefix+a]):(h[u]=h[u].slice(),h[u][1]+=" "+n.langPrefix+a),g={attrs:h},"<pre><code"+o.renderAttrs(g)+">"+c+`</code></pre>
`):"<pre><code"+o.renderAttrs(r)+">"+c+`</code></pre>
`};Zt.image=function(t,e,n,s,o){var r=t[e];return r.attrs[r.attrIndex("alt")][1]=o.renderInlineAsText(r.children,n,s),o.renderToken(t,e,n)};Zt.hardbreak=function(t,e,n){return n.xhtmlOut?`<br />
`:`<br>
`};Zt.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
2023-07-02 22:17:01 +00:00
`};Zt.text=function(t,e){return Qn(t[e].content)};Zt.html_block=function(t,e){return t[e].content};Zt.html_inline=function(t,e){return t[e].content};function Us(){this.rules=Ale({},Zt)}Us.prototype.renderAttrs=function(e){var n,s,o;if(!e.attrs)return"";for(o="",n=0,s=e.attrs.length;n<s;n++)o+=" "+Qn(e.attrs[n][0])+'="'+Qn(e.attrs[n][1])+'"';return o};Us.prototype.renderToken=function(e,n,s){var o,r="",i=!1,a=e[n];return a.hidden?"":(a.block&&a.nesting!==-1&&n&&e[n-1].hidden&&(r+=`
2023-06-30 13:38:01 +00:00
`),r+=(a.nesting===-1?"</":"<")+a.tag,r+=this.renderAttrs(a),a.nesting===0&&s.xhtmlOut&&(r+=" /"),a.block&&(i=!0,a.nesting===1&&n+1<e.length&&(o=e[n+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===a.tag)&&(i=!1))),r+=i?`>
2023-07-02 22:17:01 +00:00
`:">",r)};Us.prototype.renderInline=function(t,e,n){for(var s,o="",r=this.rules,i=0,a=t.length;i<a;i++)s=t[i].type,typeof r[s]<"u"?o+=r[s](t,i,e,n,this):o+=this.renderToken(t,i,e);return o};Us.prototype.renderInlineAsText=function(t,e,n){for(var s="",o=0,r=t.length;o<r;o++)t[o].type==="text"?s+=t[o].content:t[o].type==="image"?s+=this.renderInlineAsText(t[o].children,e,n):t[o].type==="softbreak"&&(s+=`
`);return s};Us.prototype.render=function(t,e,n){var s,o,r,i="",a=this.rules;for(s=0,o=t.length;s<o;s++)r=t[s].type,r==="inline"?i+=this.renderInline(t[s].children,e,n):typeof a[r]<"u"?i+=a[t[s].type](t,s,e,n,this):i+=this.renderToken(t,s,e,n);return i};var Tle=Us;function Pt(){this.__rules__=[],this.__cache__=null}Pt.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};Pt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(s){e.indexOf(s)<0&&e.push(s)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(s){s.enabled&&(n&&s.alt.indexOf(n)<0||t.__cache__[n].push(s.fn))})})};Pt.prototype.at=function(t,e,n){var s=this.__find__(t),o=n||{};if(s===-1)throw new Error("Parser rule not found: "+t);this.__rules__[s].fn=e,this.__rules__[s].alt=o.alt||[],this.__cache__=null};Pt.prototype.before=function(t,e,n,s){var o=this.__find__(t),r=s||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null};Pt.prototype.after=function(t,e,n,s){var o=this.__find__(t),r=s||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null};Pt.prototype.push=function(t,e,n){var s=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:s.alt||[]}),this.__cache__=null};Pt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(s){var o=this.__find__(s);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[o].enabled=!0,n.push(s)},this),this.__cache__=null,n};Pt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};Pt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(s){var o=this.__find__(s);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[o].enabled=!1,n.push(s)},this),this.__cache__=null,n};Pt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var Yl=Pt,Ole=/\r\n?|\n/g,Mle=/\0/g,Rle=function(e){var n;n=e.src.replace(Ole,`
`),n=n.replace(Mle,"<22>"),e.src=n},Nle=function(e){var n;e.inlineMode?(n=new e.Token("inline","",0),n.content=e.src,n.map=[0,1],n.children=[],e.tokens.push(n)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},Dle=function(e){var n=e.tokens,s,o,r;for(o=0,r=n.length;o<r;o++)s=n[o],s.type==="inline"&&e.md.inline.parse(s.content,e.md,e.env,s.children)},Lle=ze.arrayReplaceAt;function Ile(t){return/^<a[>\s]/i.test(t)}function Ple(t){return/^<\/a\s*>/i.test(t)}var Fle=function(e){var n,s,o,r,i,a,l,c,u,f,h,g,p,m,v,_,b=e.tokens,x;if(e.md.options.linkify){for(s=0,o=b.length;s<o;s++)if(!(b[s].type!=="inline"||!e.md.linkify.pretest(b[s].content)))for(r=b[s].children,p=0,n=r.length-1;n>=0;n--){if(a=r[n],a.type==="link_close"){for(n--;r[n].level!==a.level&&r[n].type!=="link_open";)n--;continue}if(a.type==="html_inline"&&(Ile(a.content)&&p>0&&p--,Ple(a.content)&&p++),!(p>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(u=a.content,x=e.md.linkify.match(u),l=[],g=a.level,h=0,x.length>0&&x[0].index===0&&n>0&&r[n-1].type==="text_special"&&(x=x.slice(1)),c=0;c<x.length;c++)m=x[c].url,v=e.md.normalizeLink(m),e.md.validateLink(v)&&(_=x[c].text,x[c].schema?x[c].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,""),f=x[c].index,f>h&&(i=new e.Token("text","",0),i.content=u.slice(h,f),i.level=g,l.push(i)),i=new e.Token("link_open","a",1),i.attrs=[["href",v]],i.level=g++,i.markup="linkify",i.info="auto",l.push(i),i=new e.Token("text","",0),i.content=_,i.level=g,l.push(i),i=new e.Token("link_close","a",-1),i.level=--g,i.markup="linkify",i.info="auto",l.push(i),h=x[c].lastIndex);h<u.length&&(i=new e.Token("text","",0),i.content=u.slice(h),i.level=g,l.push(i)),b[s].children=r=Lle(r,n,l)}}}},Xp=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ble=/\((c|tm|r)\)/i,jle=/\((c|tm|r)\)/ig,zle={c:"©",r:"®",tm:"™"};function $le(t,e){return zle[e.toLowerCase()]}function qle(t){var e,n,s=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!s&&(n.content=n.content.replace(jle,$le)),n.type==="link_open"&&n.info==="auto"&&s--,n.type==="link_close"&&n.info==="auto"&&s++}function Ule(t){var e,n,s=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!s&&Xp.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1")),n.type==="link_open"&&n.info==="auto"&&s--,n.type==="link_close"&&n.info==="auto"&&s++}var Hle=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(Ble.test(e.tokens[n].content)&&qle(e.tokens[n].children),Xp.test(e.tokens[n].content)&&Ule(e.tokens[n].children))},Xu=ze.isWhiteSpace,ed=ze.isPunctChar,td=ze.isMdAsciiPunct,Vle=/['"]/,nd=/['"]/g,sd="";function Ho(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function Gle(t,e){var n,s,o,r,i,a,l,c,u,f,h,g,p,m,v,_,b,x,C,M,T;for(C=[],n=0;n<t.length;n++){for(s=t[n],l=t[n].level,b=C.length-1;b>=0&&!(C[b].level<=l);b--);if(C.length=b+1,s.type==="text"){o=s.content,i=0,a=o.length;e:for(;i<a&&(nd.lastIndex=i,r=nd.exec(o),!!r);){if(v=_=!0,i=r.index+1,x=r[0]==="'",u=32,r.index-1>=0)u=o.charCodeAt(r.index-1);else for(b=n-1;b>=0&&!(t[b].type==="softbreak"||t[b].type==="hardbreak");b--)if(t[b].content){u=t[b].content.charCodeAt(t[b].content.length-1);break}if(f=32,i<a)f=o.charCodeAt(i);else for(b=n+1;b<t.length&&!(t[b].type==="softbreak"||t[b].type==="hardbreak");b++)if(t[b].content){f=t[b].content.charCodeAt(0);break}if(h=td(u)||ed(String.fromCharCode(u)),g=td(f)||ed(String.fromCharCode(f)),p=Xu(u),m=Xu(f),m?v=!1:g&&(p||h||(v=!1)),p?_=!1:h&&(m||g||(_=!1)),f===34&&r[0]==='"'&&u>=48&&u<=57&&(_=v=!1),v&&_&&(v=h,_=g),!v&&!_){x&&(s.content=Ho(s.content,r.index,sd));continue}if(_){for(b=C.length-1;b>=0&&(c=C[b],!(C[b].level<l));b--)if(c.single===x&&C[b].level===l){c=C[b],x?(M=e.md.options.quotes[2],T=e.md.options.quotes[
`,i.map=[n,e.line],!0},tce=function(e,n,s,o){var r,i,a,l,c,u,f,h=!1,g=e.bMarks[n]+e.tShift[n],p=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||g+3>p||(r=e.src.charCodeAt(g),r!==126&&r!==96)||(c=g,g=e.skipChars(g,r),i=g-c,i<3)||(f=e.src.slice(c,g),a=e.src.slice(g,p),r===96&&a.indexOf(String.fromCharCode(r))>=0))return!1;if(o)return!0;for(l=n;l++,!(l>=s||(g=c=e.bMarks[l]+e.tShift[l],p=e.eMarks[l],g<p&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(g)===r&&!(e.sCount[l]-e.blkIndent>=4)&&(g=e.skipChars(g,r),!(g-c<i)&&(g=e.skipSpaces(g),!(g<p)))){h=!0;break}return i=e.sCount[n],e.line=l+(h?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(n+1,l,i,!0),u.markup=f,u.map=[n,e.line],!0},rd=ze.isSpace,nce=function(e,n,s,o){var r,i,a,l,c,u,f,h,g,p,m,v,_,b,x,C,M,T,D,y,k=e.lineMax,S=e.bMarks[n]+e.tShift[n],L=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(S++)!==62)return!1;if(o)return!0;for(l=g=e.sCount[n]+1,e.src.charCodeAt(S)===32?(S++,l++,g++,r=!1,C=!0):e.src.charCodeAt(S)===9?(C=!0,(e.bsCount[n]+g)%4===3?(S++,l++,g++,r=!1):r=!0):C=!1,p=[e.bMarks[n]],e.bMarks[n]=S;S<L&&(i=e.src.charCodeAt(S),rd(i));){i===9?g+=4-(g+e.bsCount[n]+(r?1:0))%4:g++;S++}for(m=[e.bsCount[n]],e.bsCount[n]=e.sCount[n]+1+(C?1:0),u=S>=L,b=[e.sCount[n]],e.sCount[n]=g-l,x=[e.tShift[n]],e.tShift[n]=S-e.bMarks[n],T=e.md.block.ruler.getRules("blockquote"),_=e.parentType,e.parentType="blockquote",h=n+1;h<s&&(y=e.sCount[h]<e.blkIndent,S=e.bMarks[h]+e.tShift[h],L=e.eMarks[h],!(S>=L));h++){if(e.src.charCodeAt(S++)===62&&!y){for(l=g=e.sCount[h]+1,e.src.charCodeAt(S)===32?(S++,l++,g++,r=!1,C=!0):e.src.charCodeAt(S)===9?(C=!0,(e.bsCount[h]+g)%4===3?(S++,l++,g++,r=!1):r=!0):C=!1,p.push(e.bMarks[h]),e.bMarks[h]=S;S<L&&(i=e.src.charCodeAt(S),rd(i));){i===9?g+=4-(g+e.bsCount[h]+(r?1:0))%4:g++;S++}u=S>=L,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(C?1:0),b.push(e.sCount[h]),e.sCount[h]=g-l,x.push(e.tShift[h]),e.tShift[h]=S-e.bMarks[h];continue}if(u)break;for(M=!1,a=0,c=T.length;a<c;a++)if(T[a](e,h,s,!0)){M=!0;break}if(M){e.lineMax=h,e.blkIndent!==0&&(p.push(e.bMarks[h]),m.push(e.bsCount[h]),x.push(e.tShift[h]),b.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}p.push(e.bMarks[h]),m.push(e.bsCount[h]),x.push(e.tShift[h]),b.push(e.sCount[h]),e.sCount[h]=-1}for(v=e.blkIndent,e.blkIndent=0,D=e.push("blockquote_open","blockquote",1),D.markup=">",D.map=f=[n,0],e.md.block.tokenize(e,n,h),D=e.push("blockquote_close","blockquote",-1),D.markup=">",e.lineMax=k,e.parentType=_,f[1]=e.line,a=0;a<x.length;a++)e.bMarks[a+n]=p[a],e.tShift[a+n]=x[a],e.sCount[a+n]=b[a],e.bsCount[a+n]=m[a];return e.blkIndent=v,!0},sce=ze.isSpace,oce=function(e,n,s,o){var r,i,a,l,c=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(i=1;c<u;){if(a=e.src.charCodeAt(c++),a!==r&&!sce(a))return!1;a===r&&i++}return i<3?!1:(o||(e.line=n+1,l=e.push("hr","hr",0),l.map=[n,e.line],l.markup=Array(i+1).join(String.fromCharCode(r))),!0)},tg=ze.isSpace;function id(t,e){var n,s,o,r;return s=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(s++),n!==42&&n!==45&&n!==43||s<o&&(r=t.src.charCodeAt(s),!tg(r))?-1:s}function ad(t,e){var n,s=t.bMarks[e]+t.tShift[e],o=s,r=t.eMarks[e];if(o+1>=r||(n=t.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=r)return-1;if(n=t.src.charCodeAt(o++),n>=48&&n<=57){if(o-s>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<r&&(n=t.src.charCodeAt(o),!tg(n))?-1:o}function rce(t,e){var n,s,o=t.level+2;for(n=e+2,s=t.tokens.length-2;n<s;n++)t.tokens[n].level===o&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var ice=function(e,n,s,o){var r,i,a,l,c,u,f,h,g,p,m,v,_,b,x,C,M,T,D,y,k,S,L,F,Y,I,ae,W,A=!1,q=!0;if(e.sCount[n]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[n]-e.listIndent>=4&&e.sCount[n]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[n]>=e.blkIndent&&(A=!0),(L=ad(e,n))>=0){if(f=!0,Y=e.bMarks[n]+e.tShift[n],_=Number(e.src.slice(Y,L-1)),A&&_!==1)return!1}else if((L=id(e,n))>=0)f=!1;else return!1;if(A&&e.skipSpaces(L)>=e.
`})),s.tokens.splice(o+3+u.length+1,0,Object.assign(new s.Token("html_block","",0),{content:e.wrapper[1]+`
`})))});function Cd(t,e,n,s){var o=t,r=s;if(n&&Object.prototype.hasOwnProperty.call(e,o))throw new Error("User defined `id` attribute `"+t+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(e,o);)o=t+"-"+r,r+=1;return e[o]=!0,o}function us(t,e){e=Object.assign({},us.defaults,e),t.core.ruler.push("anchor",function(n){for(var s,o={},r=n.tokens,i=Array.isArray(e.level)?(s=e.level,function(f){return s.includes(f)}):function(f){return function(h){return h>=f}}(e.level),a=0;a<r.length;a++){var l=r[a];if(l.type==="heading_open"&&i(Number(l.tag.substr(1)))){var c=e.getTokensText(r[a+1].children),u=l.attrGet("id");u=u==null?Cd(e.slugify(c),o,!1,e.uniqueSlugStartIndex):Cd(u,o,!0,e.uniqueSlugStartIndex),l.attrSet("id",u),e.tabIndex!==!1&&l.attrSet("tabindex",""+e.tabIndex),typeof e.permalink=="function"?e.permalink(u,e,n,a):(e.permalink||e.renderPermalink&&e.renderPermalink!==il)&&e.renderPermalink(u,e,n,a),a=r.indexOf(l),e.callback&&e.callback(l,{slug:u,title:c})}}})}Object.assign(Ed.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),us.permalink={__proto__:null,legacy:il,renderHref:mg,renderAttrs:_g,makePermalink:Do,linkInsideHeader:fi,ariaHidden:Pn,headerLink:bg,linkAfterHeader:Ed},us.defaults={level:1,slugify:function(t){return encodeURIComponent(String(t).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(t){return t.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:il,permalinkClass:Pn.defaults.class,permalinkSpace:Pn.defaults.space,permalinkSymbol:"¶",permalinkBefore:Pn.defaults.placement==="before",permalinkHref:Pn.defaults.renderHref,permalinkAttrs:Pn.defaults.renderAttrs},us.default=us;var eIe=function(e,n){n=n||{};function s(o){for(var r=1,i=1,a=o.tokens.length;i<a-1;++i){var l=o.tokens[i];if(l.type==="inline"&&!(!l.children||l.children.length!==1&&l.children.length!==3)&&!(l.children.length===1&&l.children[0].type!=="image")&&!(l.children.length===3&&(l.children[0].type!=="link_open"||l.children[1].type!=="image"||l.children[2].type!=="link_close"))&&!(i!==0&&o.tokens[i-1].type!=="paragraph_open")&&!(i!==a-1&&o.tokens[i+1].type!=="paragraph_close")){var c=o.tokens[i-1];c.type="figure_open",c.tag="figure",o.tokens[i+1].type="figure_close",o.tokens[i+1].tag="figure",n.dataType==!0&&o.tokens[i-1].attrPush(["data-type","image"]);var u;if(n.link==!0&&l.children.length===1&&(u=l.children[0],l.children.unshift(new o.Token("link_open","a",1)),l.children[0].attrPush(["href",u.attrGet("src")]),l.children.push(new o.Token("link_close","a",-1))),u=l.children.length===1?l.children[0]:l.children[1],n.figcaption==!0&&u.children&&u.children.length&&(l.children.push(new o.Token("figcaption_open","figcaption",1)),l.children.splice(l.children.length,0,...u.children),l.children.push(new o.Token("figcaption_close","figcaption",-1)),u.children.length=0),n.copyAttrs&&u.attrs){const f=n.copyAttrs===!0?"":n.copyAttrs;c.attrs=u.attrs.filter(([h,g])=>h.match(f))}n.tabindex==!0&&(o.tokens[i-1].attrPush(["tabindex",r]),r++),n.lazyLoading==!0&&u.attrPush(["loading","lazy"])}}}e.core.ruler.before("linkify","implicit_figures",s)};const tIe=ts(eIe);function yg(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const n=t[e],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&yg(n)}),t}class Ad{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function vg(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function En(t,...e){const n=Object.create(null);for(const s in t)n[s]=t[s];return e.forEach(function(s){for(const o in s)n[o]=s[o]}),n}const nIe="</span>",Sd=t=>!!t.scope,sIe=(t,{prefix:
https://github.com/highlightjs/highlight.js/issues/2277`),pe=A,me=q),V===void 0&&(V=!0);const X={code:me,language:pe};ae("before:highlight",X);const _e=X.result?X.result:f(X.language,X.code,V);return _e.code=X.code,ae("after:highlight",_e),_e}function f(A,q,V,me){const pe=Object.create(null);function X(K,oe){return K.keywords[oe]}function _e(){if(!z.keywords){$.addText(Z);return}let K=0;z.keywordPatternRe.lastIndex=0;let oe=z.keywordPatternRe.exec(Z),he="";for(;oe;){he+=Z.substring(K,oe.index);const xe=j.case_insensitive?oe[0].toLowerCase():oe[0],Le=X(z,xe);if(Le){const[Ue,Ne]=Le;if($.addText(he),he="",pe[xe]=(pe[xe]||0)+1,pe[xe]<=KIe&&(ie+=Ne),Ue.startsWith("_"))he+=oe[0];else{const Ze=j.classNameAliases[Ue]||Ue;Q(oe[0],Ze)}}else he+=oe[0];K=z.keywordPatternRe.lastIndex,oe=z.keywordPatternRe.exec(Z)}he+=Z.substring(K),$.addText(he)}function we(){if(Z==="")return;let K=null;if(typeof z.subLanguage=="string"){if(!e[z.subLanguage]){$.addText(Z);return}K=f(z.subLanguage,Z,!0,se[z.subLanguage]),se[z.subLanguage]=K._top}else K=g(Z,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(ie+=K.relevance),$.__addSublanguage(K._emitter,K.language)}function N(){z.subLanguage!=null?we():_e(),Z=""}function Q(K,oe){K!==""&&($.startScope(oe),$.addText(K),$.endScope())}function H(K,oe){let he=1;const xe=oe.length-1;for(;he<=xe;){if(!K._emit[he]){he++;continue}const Le=j.classNameAliases[K[he]]||K[he],Ue=oe[he];Le?Q(Ue,Le):(Z=Ue,_e(),Z=""),he++}}function ee(K,oe){return K.scope&&typeof K.scope=="string"&&$.openNode(j.classNameAliases[K.scope]||K.scope),K.beginScope&&(K.beginScope._wrap?(Q(Z,j.classNameAliases[K.beginScope._wrap]||K.beginScope._wrap),Z=""):K.beginScope._multi&&(H(K.beginScope,oe),Z="")),z=Object.create(K,{parent:{value:z}}),z}function J(K,oe,he){let xe=cIe(K.endRe,he);if(xe){if(K["on:end"]){const Le=new Ad(K);K["on:end"](oe,Le),Le.isMatchIgnored&&(xe=!1)}if(xe){for(;K.endsParent&&K.parent;)K=K.parent;return K}}if(K.endsWithParent)return J(K.parent,oe,he)}function fe(K){return z.matcher.regexIndex===0?(Z+=K[0],1):(ye=!0,0)}function le(K){const oe=K[0],he=K.rule,xe=new Ad(he),Le=[he.__beforeBegin,he["on:begin"]];for(const Ue of Le)if(Ue&&(Ue(K,xe),xe.isMatchIgnored))return fe(oe);return he.skip?Z+=oe:(he.excludeBegin&&(Z+=oe),N(),!he.returnBegin&&!he.excludeBegin&&(Z=oe)),ee(he,K),he.returnBegin?0:oe.length}function w(K){const oe=K[0],he=q.substring(K.index),xe=J(z,K,he);if(!xe)return Nd;const Le=z;z.endScope&&z.endScope._wrap?(N(),Q(oe,z.endScope._wrap)):z.endScope&&z.endScope._multi?(N(),H(z.endScope,K)):Le.skip?Z+=oe:(Le.returnEnd||Le.excludeEnd||(Z+=oe),N(),Le.excludeEnd&&(Z=oe));do z.scope&&$.closeNode(),!z.skip&&!z.subLanguage&&(ie+=z.relevance),z=z.parent;while(z!==xe.parent);return xe.starts&&ee(xe.starts,K),Le.returnEnd?0:oe.length}function E(){const K=[];for(let oe=z;oe!==j;oe=oe.parent)oe.scope&&K.unshift(oe.scope);K.forEach(oe=>$.openNode(oe))}let P={};function B(K,oe){const he=oe&&oe[0];if(Z+=K,he==null)return N(),0;if(P.type==="begin"&&oe.type==="end"&&P.index===oe.index&&he===""){if(Z+=q.slice(oe.index,oe.index+1),!o){const xe=new Error(`0 width match regex (${A})`);throw xe.languageName=A,xe.badRule=P.rule,xe}return 1}if(P=oe,oe.type==="begin")return le(oe);if(oe.type==="illegal"&&!V){const xe=new Error('Illegal lexeme "'+he+'" for mode "'+(z.scope||"<unnamed>")+'"');throw xe.mode=z,xe}else if(oe.type==="end"){const xe=w(oe);if(xe!==Nd)return xe}if(oe.type==="illegal"&&he==="")return 1;if(ce>1e5&&ce>oe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Z+=he,he.length}const j=k(A);if(!j)throw Wn(r.replace("{}",A)),new Error('Unknown language: "'+A+'"');const te=UIe(j);let re="",z=me||te;const se={},$=new a.__emitter(a);E();let Z="",ie=0,de=0,ce=0,ye=!1;try{if(j.__emitTokens)j.__emitTokens(q,$);else{for(z.matcher.considerAll();;){ce++,ye?ye=!1:z.matcher.considerAll(),z.matcher.lastIndex=de;const K=z.matcher.exec(q);if(!K)break;const oe=q.substring(de,K.index),he=B(oe,K);de=K.index+he}B(q.substring(de))}return $.finalize(),re=$.toHTML(),{language:A,value:re,relevance
`},p]}}return ca=o,ca}var ua,Zd;function dPe(){if(Zd)return ua;Zd=1;const t=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.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:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.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"],s=["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"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["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-radiu
]`,p={scope:"string",variants:[u,c,f,h]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],b=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:_,literal:(I=>{const ae=[];return I.forEach(W=>{ae.push(W),W.toLowerCase()===W?ae.push(W.toUpperCase()):ae.push(W.toLowerCase())}),ae})(v),built_in:b},M=I=>I.map(ae=>ae.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",M(b).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},D=n.concat(o,"\\b(?!\\()"),y={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),D],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,n.concat(/::/,n.lookahead(/(?!class\b)/)),D],scope:{1:"title.class",3:"variable.constant"}},{match:[r,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},k={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},S={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[k,i,y,e.C_BLOCK_COMMENT_MODE,p,m,T]},L={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",M(_).join("\\b|"),"|",M(b).join("\\b|"),"\\b)"),o,n.concat(g,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[S]};S.contains.push(L);const F=[k,y,e.C_BLOCK_COMMENT_MODE,p,m,T],Y={begin:n.concat(/#\[\s*/,r),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...F]},
{.a} softbreak then curly in start`,tests:[{shift:0,type:"inline",children:[{position:-2,type:"softbreak"},{position:-1,type:"text",content:Re.hasDelimiters("only",t)}]}],transform:(n,s,o)=>{const r=n[s].children[o],i=Re.getAttrs(r.content,0,t);let a=s+1;for(;n[a+1]&&n[a+1].nesting===-1;)a++;const l=Re.getMatchingOpeningToken(n,a);Re.addAttrs(i,l),n[s].children=n[s].children.slice(0,-2)}},{name:"horizontal rule",tests:[{shift:0,type:"paragraph_open"},{shift:1,type:"inline",children:n=>n.length===1,content:n=>n.match(e)!==null},{shift:2,type:"paragraph_close"}],transform:(n,s)=>{const o=n[s];o.type="hr",o.tag="hr",o.nesting=0;const r=n[s+1].content,i=r.lastIndexOf(t.leftDelimiter),a=Re.getAttrs(r,i,t);Re.addAttrs(a,o),o.markup=r,n.splice(s+1,2)}},{name:"end of block",tests:[{shift:0,type:"inline",children:[{position:-1,content:Re.hasDelimiters("end",t),type:n=>n!=="code_inline"&&n!=="math_inline"}]}],transform:(n,s,o)=>{const r=n[s].children[o],i=r.content,a=Re.getAttrs(i,i.lastIndexOf(t.leftDelimiter),t);let l=s+1;for(;n[l+1]&&n[l+1].nesting===-1;)l++;const c=Re.getMatchingOpeningToken(n,l);Re.addAttrs(a,c);const u=i.slice(0,i.lastIndexOf(t.leftDelimiter));r.content=mf(u)!==" "?u:u.slice(0,-1)}}]};function mf(t){return t.slice(-1)[0]}const FPe=PPe,BPe={leftDelimiter:"{",rightDelimiter:"}",allowedAttributes:[]};var jPe=function(e,n){let s=Object.assign({},BPe);s=Object.assign(s,n);const o=FPe(s);function r(i){const a=i.tokens;for(let l=0;l<a.length;l++)for(let c=0;c<o.length;c++){const u=o[c];let f=null;u.tests.every(g=>{const p=ll(a,l,g);return p.j!==null&&(f=p.j),p.match})&&(u.transform(a,l,f),(u.name==="inline attributes"||u.name==="inline nesting 0")&&c--)}}e.core.ruler.before("linkify","curly_attributes",r)};function ll(t,e,n){const s={match:!1,j:null},o=n.shift!==void 0?e+n.shift:n.position;if(n.shift!==void 0&&o<0)return s;const r=qPe(t,o);if(r===void 0)return s;for(const i of Object.keys(n))if(!(i==="shift"||i==="position")){if(r[i]===void 0)return s;if(i==="children"&&zPe(n.children)){if(r.children.length===0)return s;let a;const l=n.children,c=r.children;if(l.every(u=>u.position!==void 0)){if(a=l.every(u=>ll(c,u.position,u).match),a){const u=UPe(l).position;s.j=u>=0?u:c.length+u}}else for(let u=0;u<c.length;u++)if(a=l.every(f=>ll(c,u,f).match),a){s.j=u;break}if(a===!1)return s;continue}switch(typeof n[i]){case"boolean":case"number":case"string":if(r[i]!==n[i])return s;break;case"function":if(!n[i](r[i]))return s;break;case"object":if($Pe(n[i])){if(n[i].every(l=>l(r[i]))===!1)return s;break}default:throw new Error(`Unknown type of pattern test (key: ${i}). Test should be of type boolean, number, string, function or array of functions.`)}}return s.match=!0,s}function zPe(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="object")}function $Pe(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="function")}function qPe(t,e){return e>=0?t[e]:t[t.length+e]}function UPe(t){return t.slice(-1)[0]||{}}const HPe=ts(jPe);function VPe(){const t=Date.now().toString(),e=Math.floor(Math.random()*1e3).toString();return t+e}const Eo=new Wue("commonmark",{html:!0,xhtmlOut:!0,breaks:!0,linkify:!0,typographer:!0,highlight:(t,e)=>{let n=VPe();if(e&&oo.getLanguage(e))try{const o=oo.highlight(e,t).value;return'<div class="bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm">'+e+'<button class="px-2 py-1 ml-10 mb-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"><span class="mr-1" id="copy-btn_'+n+'" onclick="copyContentToClipboard('+n+')">Copy</span><span class="hidden text-xs text-green-500" id="copyed-btn_'+n+'" onclick="copyContentToClipboard('+n+')">Copied!</span></button><pre class="hljs p-1 rounded-md break-all grid grid-cols-1"><code id="code_'+n+'" 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-pan
2023-06-30 13:38:01 +00:00
// Your inline script code here
console.log('Inline script executed!');
function copyContentToClipboard(id) {
console.log("copied");
const codeElement = document.getElementById('code_' + id);
const copybtnElement = document.getElementById('copy-btn_' + id);
const copyedbtnElement = document.getElementById('copyed-btn_' + id);
copybtnElement.classList.add('hidden');
copyedbtnElement.classList.remove('hidden');
const range = document.createRange();
range.selectNode(codeElement);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
document.execCommand('copy');
window.getSelection().removeAllRanges();
}
2023-07-02 22:17:01 +00:00
`,t.async=!0,document.body.appendChild(t),this.renderedMarkdown=Eo.render(this.markdownText),ge(()=>{Ee.replace()})},methods:{},watch:{markdownText(t){this.renderedMarkdown=Eo.render(t),ge(()=>{Ee.replace()})}}},KPe={class:"break-all"},WPe=["innerHTML"];function ZPe(t,e,n,s,o,r){return O(),R("div",KPe,[d("div",{innerHTML:o.renderedMarkdown,class:"markdown-content"},null,8,WPe)])}const YPe=Ke(GPe,[["render",ZPe]]);const QPe="/",JPe={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage"],components:{MarkdownRenderer:YPe},props:{message:Object,avatar:""},data(){return{expanded:!1,new_message_content:"",showConfirmation:!1,editMsgMode:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){this.new_message_content=this.message.content,ge(()=>{Ee.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight})},methods:{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.new_message_content),this.editMsgMode=!1},resendMessage(){this.$emit("resendMessage",this.message.id,this.new_message_content)},getImgUrl(){return this.message.sender=="user"?this.avatar?this.avatar:jw:this.avatar?QPe+this.avatar:Yn},defaultImg(t){t.target.src=Yn},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==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")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"}},watch:{showConfirmation(){ge(()=>{Ee.replace()})},editMsgMode(t){t||(this.new_message_content=this.message.content),ge(()=>{Ee.replace()})},deleteMsgMode(){ge(()=>{Ee.replace()})}},computed:{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 s=e.getTime()-t.getTime();const o=Math.floor(s/(1e3*60*60));s-=o*(1e3*60*60);const r=Math.floor(s/(1e3*60));s-=r*(1e3*60);const i=Math.floor(s/1e3);s-=i*1e3;function a(c){return c<10&&(c="0"+c),c}return a(o)+"h:"+a(r)+"m:"+a(i)+"s"}}},XPe={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"},eFe={class:"flex flex-row gap-2"},tFe={class:"flex-shrink-0"},nFe={class:"group/avatar"},sFe=["src","data-popover-target"],oFe={class:"flex flex-col w-full flex-grow-0"},rFe={class:"flex flex-row flex-grow items-start"},iFe={class:"flex flex-col mb-2"},aFe={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},lFe=["title"],cFe=d("div",{class:"flex-grow"},null,-1),uFe={class:"flex-row justify-end mx-2"},dFe={class:"invisible group-hover:visible flex flex-row"},fFe={key:0,class:"flex items-center duration-75"},hFe=d("i",{"data-feather":"x"},null,-1),pFe=[hFe],gFe=d("i",{"data-feather":"check"},null,-1),mFe=[gFe],_Fe=d("i",{"data-feather":"edit"},null,-1),bFe
2023-06-30 13:38:01 +00:00
`+t.name,4,!0)}else this.onPersonalityMounted(t)}},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await Ae.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},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 Ae.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};console.log("select pers",t);const n={id:this.configFile.personalities.findIndex(s=>s===t.full_path)};try{const s=await Ae.post("/select_personality",n);if(s){this.configFile=await this.api_get_req("get_config");let o=await this.api_get_req("get_current_personality_path_infos");return this.configFile.personality_language=o.personality_language,this.configFile.personality_category=o.personality_category,this.configFile.personality_folder=o.personality_name,s.data}}catch(s){console.log(s,"select_personality - settings");return}},async mountPersonality(t){if(console.log("mount pers",t),!t)return;if(this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality already mounted",4,!1);return}const e=await this.mount_personality(t.personality);console.log("mount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality mounted",4,!0),t.isMounted=!0,(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;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality unmounted",4,!0);const n=this.personalities.findIndex(a=>a.full_path==t.full_path),s=this.personalitiesFiltered.findIndex(a=>a.full_path==t.full_path),o=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,s>-1&&(this.personalitiesFiltered[s].isMounted=!1),o>-1&&(this.$refs.personalitiesZoo[o].isMounted=!1),this.getMountedPersonalities();const r=this.mountedPersArr[this.mountedPersArr.length-1];console.log(r,this.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality:
`+r.name,4,!0)}else this.$refs.toast.showToast(`Could not unmount personality
2023-07-02 22:17:01 +00:00
Error: `+e.error,4,!1)},getMountedPersonalities(){let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],s=this.personalities.findIndex(r=>r.full_path==n),o=this.personalities[s];o?t.push(o):t.push(this.personalities[this.personalities.findIndex(r=>r.full_path=="english/generic/lollms")])}this.mountedPersArr=[],this.mountedPersArr=t,console.log("getMountedPersonalities",t),console.log("fig",this),this.mountedPers=this.personalities[this.personalities.findIndex(e=>e.full_path==this.configFile.personalities[this.configFile.active_personality_id])]}}},ZFe={class:"w-fit select-none"},YFe={key:0,class:"flex -space-x-4"},QFe=["src","title"],JFe={key:1,class:"flex -space-x-4"},XFe=["src","title"];function eBe(t,e,n,s,o,r){return O(),R("div",ZFe,[o.mountedPersArr.length>1?(O(),R("div",YFe,[d("img",{src:o.bUrl+o.mountedPers.avatar,onError:e[0]||(e[0]=(...i)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...i)),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},null,40,QFe),d("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[1]||(e[1]=ue((...i)=>r.toggleShowPersList&&r.toggleShowPersList(...i),["stop"])),title:"Click to show more"},"+"+ne(o.mountedPersArr.length-1),1)])):U("",!0),o.mountedPersArr.length==1?(O(),R("div",JFe,[d("img",{src:o.bUrl+o.mountedPers.avatar,onError:e[2]||(e[2]=(...i)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...i)),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: "+o.mountedPers.name,onClick:e[3]||(e[3]=ue((...i)=>r.toggleShowPersList&&r.toggleShowPersList(...i),["stop"]))},null,40,XFe)])):U("",!0)])}const tBe=Ke(WFe,[["render",eBe]]);const nBe="/";Ae.defaults.baseURL="/";const sBe={props:{onMountUnmount:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:Op,Toast:ti,UniversalForm:Kp},name:"MountedPersonalitiesList",data(){return{configFile:{},mountedPersArr:[],personalities:[],bUrl:nBe,isMounted:!1,isLoading:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},methods:{toggleShowPersList(){this.onShowPersList()},toggleMountUnmount(){console.log("moununmoun pers list"),this.onMountUnmount(this)},async constructor(){this.isLoading=!0,this.configFile=await this.api_get_req("get_config"),this.getPersonalitiesArr();let t=await this.api_get_req("get_current_personality_path_infos");this.configFile.personality_language=t.personality_language,this.configFile.personality_category=t.personality_category,this.configFile.personality_folder=t.personality_name},async api_get_req(t){try{const e=await Ae.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},async getPersonalitiesArr(){this.isLoading=!0,this.personalities=[];const t=await this.api_get_req("get_all_personalities"),e=await this.api_get_req("get_config"),n=Object.keys(t);for(let s=0;s<n.length;s++){const o=n[s],r=t[o],i=Object.keys(r);for(let a=0;a<i.length;a++){const l=i[a],u=r[l].map(f=>{const h=e.personalities.includes(o+"/"+l+"/"+f.folder);let g={};return g=f,g.category=l,g.language=o,g.full_path=o+"/"+l+"/"+f.folder,g.isMounted=h,g});this.personalities.length==0?this.personalities=u:this.personalities=this.personalities.concat(u)}}this.personalities.sort((s,o)=>s.name.localeCompare(o.name)),this.getMountedPersonalities(),this.isLoading=!1},personalityImgPlacehodler(t){t.target.src=Yn},onPersonalityMounted(t){this.configFile.personalities.includes(t.full_path)?this
2023-06-30 13:38:01 +00:00
`+t.name,4,!0),console.log("ssss",this.configFile))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{Ae.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{Ae.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses.
`+s,4,!1)})}catch(s){this.$refs.toast.showToast(`Did not get Personality settings responses.
Endpoint error: `+s.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)}},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await Ae.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},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 Ae.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};console.log("select pers",t);const n={id:this.configFile.personalities.findIndex(s=>s===t.full_path)};try{const s=await Ae.post("/select_personality",n);if(s){this.toggleMountUnmount(),this.configFile=await this.api_get_req("get_config");let o=await this.api_get_req("get_current_personality_path_infos");return this.configFile.personality_language=o.personality_language,this.configFile.personality_category=o.personality_category,this.configFile.personality_folder=o.personality_name,s.data}}catch(s){console.log(s,"select_personality - settings");return}},async mountPersonality(t){if(console.log("mount pers",t),!t)return;if(this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality already mounted",4,!1);return}const e=await this.mount_personality(t.personality);console.log("mount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality mounted",4,!0),t.isMounted=!0,this.toggleMountUnmount(),(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;const e=await this.unmount_personality(t.personality||t);if(e.status){this.toggleMountUnmount(),console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality unmounted",4,!0);const n=this.configFile.personalities[this.configFile.active_personality_id];console.log();const s=this.personalities.findIndex(a=>a.full_path==n),o=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[s]);const r=this.personalities[s];r.isMounted=!1,r.selected=!0,this.$refs.personalitiesZoo[o].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(r)).status&&this.$refs.toast.showToast(`Selected personality:
`+r.name,4,!0)}else this.$refs.toast.showToast(`Could not unmount personality
2023-07-02 22:17:01 +00:00
Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],s=this.personalities.findIndex(r=>r.full_path==n),o=this.personalities[s];if(o)console.log("adding from config"),t.push(o);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),i=this.personalities[r];t.push(i)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities.length>0)for(let e=0;e<this.discussionPersonalities.length;e++){const n=this.discussionPersonalities[e];console.log("discussionPersonalities - per",n);const s=this.mountedPersArr.findIndex(o=>o.full_path==n);if(console.log("discussionPersonalities -includes",s),console.log("discussionPersonalities -mounted list",this.mountedPersArr),s==-1){const o=this.personalities.findIndex(i=>i.full_path==n),r=this.personalities[o];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},cc=t=>(Fs("data-v-ecabcf2a"),t=t(),Bs(),t),oBe={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"},rBe={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},iBe=cc(()=>d("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"},[d("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"}),d("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)),aBe=cc(()=>d("span",{class:"sr-only"},"Loading...",-1)),lBe=[iBe,aBe],cBe=cc(()=>d("i",{"data-feather":"chevron-down"},null,-1)),uBe=[cBe],dBe={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},fBe={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function hBe(t,e,n,s,o,r){const i=ut("personality-entry"),a=ut("Toast"),l=ut("UniversalForm");return O(),R("div",oBe,[o.isLoading?(O(),R("div",rBe,lBe)):U("",!0),d("div",null,[o.mountedPersArr.length>0?(O(),R("div",{key:0,class:Me(o.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[d("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]=ue((...c)=>r.toggleShowPersList&&r.toggleShowPersList(...c),["stop"]))},uBe),d("label",dBe," Mounted Personalities: ("+ne(o.mountedPersArr.length)+") ",1),d("div",fBe,[Ce(jt,{name:"bounce"},{default:Je(()=>[(O(!0),R(Be,null,rt(o.mountedPersArr,(c,u)=>(O(),at(i,{ref_for:!0,ref:"personalitiesZoo",key
2023-06-30 13:38:01 +00:00
\r
\r
2023-07-02 22:17:01 +00:00
`,544),[[je,o.message]]),d("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[5]||(e[5]=(...l)=>r.addFiles&&r.addFiles(...l)),multiple:""},null,544),d("button",{type:"button",onClick:e[6]||(e[6]=ue(l=>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"},WBe)]),d("div",ZBe,[n.loading?U("",!0):(O(),R("button",{key:0,type:"button",onClick:e[7]||(e[7]=(...l)=>r.submit&&r.submit(...l)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},JBe)),n.loading?(O(),R("div",XBe,tje)):U("",!0)])])])])])])}const Dg=Ke(gBe,[["render",nje],["__scopeId","data-v-fdaaab76"]]),sje={name:"WelcomeComponent",setup(){return{}}},oje={class:"flex flex-col text-center"},rje=To('<div class="flex flex-col text-center items-center"><div class="flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"><img class="w-24 animate-bounce" title="LoLLMS WebUI" src="'+op+'" alt="Logo"><div class="flex flex-col items-start"><p class="text-2xl">Lord of Large Language Models</p><p class="text-gray-400 text-base">One tool to rule them all</p></div></div><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"><p class="text-2xl">Welcome</p><p class="text-lg">Please create a new discussion or select existing one to start</p></div>',1),ije=[rje];function aje(t,e,n,s,o,r){return O(),R("div",oje,ije)}const Lg=Ke(sje,[["render",aje]]);const lje={setup(){return{}},name:"DragDrop",emits:["panelLeave","panelDrop"],data(){return{fileList:[],show:!1,dropRelease:!1}},mounted(){ge(()=>{Ee.replace()})},methods:{async panelDrop(t){const e="getAsFileSystemHandle"in DataTransferItem.prototype,n="webkitGetAsEntry"in DataTransferItem.prototype;if(!e&&!n)return;const s=[...t.dataTransfer.items].filter(r=>r.kind==="file").map(r=>e?r.getAsFileSystemHandle():r.webkitGetAsEntry());let o=[];for await(const r of s)(r.kind==="directory"||r.isDirectory)&&o.push(r.name);this.dropRelease=!0,t.dataTransfer.files.length>0&&[...t.dataTransfer.files].forEach(r=>{o.includes(r.name)||this.fileList.push(r)}),ge(()=>{Ee.replace()}),this.$emit("panelDrop",this.fileList),this.fileList=[],this.show=!1},panelLeave(){this.$emit("panelLeave"),console.log("exit/leave"),this.dropRelease=!1,this.show=!1,ge(()=>{Ee.replace()})}}},cje={class:"text-4xl text-center"};function uje(t,e,n,s,o,r){return O(),at(jt,{name:"list",tag:"div"},{default:Je(()=>[o.show?(O(),R("div",{key:"dropmenu",class:"select-none text-slate-50 absolute top-0 left-0 right-0 bottom-0 flex flex-col items-center justify-center bg-black bg-opacity-50 duration-200 backdrop-blur-sm",onDragleave:e[0]||(e[0]=ue(i=>r.panelLeave(i),["prevent"])),onDrop:e[1]||(e[1]=ue(i=>r.panelDrop(i),["stop","prevent"]))},[d("div",{class:Me(["flex flex-col items-center justify-center p-8 rounded-lg shadow-lg border-dashed border-4 border-secondary w-4/5 h-4/5",o.dropRelease?"":"pointer-events-none"])},[d("div",cje,[hh(t.$slots,"default",{},()=>[ke(" Drop your files here ")])])],2)],32)):U("",!0)]),_:3})}const cl=Ke(lje,[["render",uje]]);var dje=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}(),Cr=globalThis&&globalThis.__assign||function(){return Cr=Object.assign||function(t){for(var e,n=1,s=arguments.length;n<s;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Cr.apply(this,arguments)},Ar={alwaysOpen:!1,activeClasses:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactiveClasses:"text-gray-500 dark:text-gray-400",onOpen:function(){},onClose:function(){},onToggle:function(){}},Ig=function(){function t(e,n){e===void 0&&(e=[]),n===void 0&&(n=Ar),this._items=e,this._options=Cr(Cr({},Ar),n),this._init()}return t.prototype._init=function(){var e=this;this._items.length&&this._items.m
2023-06-30 13:38:01 +00:00
Personality: ${t.message.personality}`);let s="";t.created_at_parsed&&(s=`
Created: ${t.created_at_parsed}`);let o="";t.message.content&&(o=t.message.content);let r="";t.message.model&&(r=`Model: ${t.message.model}`);let i="";t.message.seed&&(i=`Seed: ${t.message.seed}`);let a="";t.time_spent&&(a=`
Time spent: ${t.time_spent}`);let l="";l=`${e} ${r} ${i} ${a}`.trim();const c=`${t.message.sender}${n}${s}
${o}
${l}`;navigator.clipboard.writeText(c),ge(()=>{Ee.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)},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 s=new FileReader;s.onload=o=>e(this.parseJsonObj(o.target.result)),s.onerror=o=>n(o),s.readAsText(t)})},async exportDiscussions(){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(),s=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+s+"."+o+"."+r+i+a)+".json";this.loading=!0;const u=await this.export_multiple_discussions(t);u?(this.saveJSONtoFile(u,c),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(){let t=[];const e=await this.api_get_req("get_all_personalities"),n=Object.keys(e);for(let s=0;s<n.length;s++){const o=n[s],r=e[o],i=Object.keys(r);for(let a=0;a<i.length;a++){const l=i[a],u=r[l].map(f=>{let h={};return h=f,h.category=l,h.language=o,h});t.length==0?t=u:t=t.concat(u)}}this.personalityAvatars=t.map(s=>({name:s.name,avatar:s.avatar}))},getAvatar(t){const e=this.personalityAvatars.findIndex(s=>s.name===t),n=this.personalityAvatars[e];if(n)return n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$refs.toast.showToast(`Failed to set filelist in chatbox
2023-07-02 22:17:01 +00:00
`+e.message,4,!1)}this.isDragOverChat=!1},setDropZoneChat(){this.isDragOverChat=!0,this.$refs.dragdropChat.show=!0},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},setDropZoneDiscussion(){this.isDragOverDiscussion=!0,this.$refs.dragdropDiscussion.show=!0}},async created(){this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,ge(()=>{Ee.replace()}),$e.on("infos",this.createBotMsg),$e.on("message",this.streamMessageContent),$e.on("final",this.finalMsgEvent)},mounted(){},async activated(){console.log("Websocket connected (activated)",this.socketConnected),await this.getPersonalityAvatars(),this.isCreated&&ge(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},components:{Discussion:Wp,Message:Ng,ChatBox:Dg,WelcomeComponent:Lg,Toast:ti,DragDrop:cl},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ge(()=>{Ee.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ge(()=>{Ee.replace()})},isSearch(){ge(()=>{Ee.replace()})}},computed:{socketConnected(){return!0},selectedDiscussions(){return ge(()=>{Ee.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},_$e=Object.assign(m$e,{__name:"DiscussionsView",setup(t){return Hr(()=>{_ze()}),Ae.defaults.baseURL="/",(e,n)=>(O(),R(Be,null,[d("div",yze,[d("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[13]||(n[13]=ue(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[d("div",vze,[d("div",wze,[d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[0]||(n[0]=s=>e.createNewDiscussion())},kze),d("button",{class:Me(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[1]||(n[1]=s=>e.isCheckbox=!e.isCheckbox)},Cze,2),Aze,Sze,d("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[2]||(n[2]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[3]||(n[3]=ue(s=>e.$refs.fileDialog.click(),["stop"]))},Oze),d("button",{class:Me(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[4]||(n[4]=s=>e.isSearch=!e.isSearch)},Rze,2),e.loading?(O(),R("div",Nze,Lze)):U("",!0)]),e.isSearch?(O(),R("div",Ize,[d("div",Pze,[d("div",Fze,[Bze,d("div",jze,[d("div",{class:Me(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[5]||(n[5]=s=>e.filterTitle="")},$ze,2)]),Oe(d("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[6]||(n[6]=s=>e.filterTitle=s),onInput:n[7]||(n[7]=s=>e.filterDiscussions())},null,544),[[je,e.filterTitle]])])])])):U("",!0),e.isCheckbox?(O(),R("hr",qze)):U("",!0),e.isCheckbox?(O(),R("div",Uze,[d("div",Hze,[e.selectedDiscussions.length>0?(O(),R("p",Vze,"Selected: "+ne(e.selectedDiscussions.length),1)):U("",!0)]),d("div",Gze,[e.selectedDiscussions.length>0?(O(),R("div",Kze,[e.showConfirmation?U("",!0):(O(),R("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration