mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-02-10 02:10:06 +00:00
81 lines
410 KiB
JavaScript
81 lines
410 KiB
JavaScript
(function(En){typeof define=="function"&&define.amd?define(En):En()})(function(){"use strict";var _1=Object.defineProperty;var T1=(En,Gt,Ai)=>Gt in En?_1(En,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):En[Gt]=Ai;var Sd=(En,Gt,Ai)=>(T1(En,typeof Gt!="symbol"?Gt+"":Gt,Ai),Ai);function En(e,t){const n=Object.create(null),i=e.split(",");for(let r=0;r<i.length;r++)n[i[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}function Gt(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],r=jt(i)?Ld(i):Gt(i);if(r)for(const o in r)t[o]=r[o]}return t}else{if(jt(e))return e;if(St(e))return e}}const Ai=/;(?![^(]*\))/g,xd=/:([^]+)/,Ad=/\/\*.*?\*\//gs;function Ld(e){const t={};return e.replace(Ad,"").split(Ai).forEach(n=>{if(n){const i=n.split(xd);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function Lt(e){let t="";if(jt(e))t=e;else if(Ye(e))for(let n=0;n<e.length;n++){const i=Lt(e[n]);i&&(t+=i+" ")}else if(St(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Od=En("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Hl(e){return!!e||e===""}function Dd(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=Ar(e[i],t[i]);return n}function Ar(e,t){if(e===t)return!0;let n=jl(e),i=jl(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=Lr(e),i=Lr(t),n||i)return e===t;if(n=Ye(e),i=Ye(t),n||i)return n&&i?Dd(e,t):!1;if(n=St(e),i=St(t),n||i){if(!n||!i)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const c=e.hasOwnProperty(l),d=t.hasOwnProperty(l);if(c&&!d||!c&&d||!Ar(e[l],t[l]))return!1}}return String(e)===String(t)}function $o(e,t){return e.findIndex(n=>Ar(n,t))}const ve=e=>jt(e)?e:e==null?"":Ye(e)||St(e)&&(e.toString===Ul||!ot(e.toString))?JSON.stringify(e,Bl,2):String(e),Bl=(e,t)=>t&&t.__v_isRef?Bl(e,t.value):er(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,r])=>(n[`${i} =>`]=r,n),{})}:tr(t)?{[`Set(${t.size})`]:[...t.values()]}:St(t)&&!Ye(t)&&!Wl(t)?String(t):t,kt={},Qi=[],Pn=()=>{},Id=()=>!1,Pd=/^on[^a-z]/,_s=e=>Pd.test(e),Uo=e=>e.startsWith("onUpdate:"),en=Object.assign,Wo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nd=Object.prototype.hasOwnProperty,pt=(e,t)=>Nd.call(e,t),Ye=Array.isArray,er=e=>Or(e)==="[object Map]",tr=e=>Or(e)==="[object Set]",jl=e=>Or(e)==="[object Date]",ot=e=>typeof e=="function",jt=e=>typeof e=="string",Lr=e=>typeof e=="symbol",St=e=>e!==null&&typeof e=="object",$l=e=>St(e)&&ot(e.then)&&ot(e.catch),Ul=Object.prototype.toString,Or=e=>Ul.call(e),Rd=e=>Or(e).slice(8,-1),Wl=e=>Or(e)==="[object Object]",Ko=e=>jt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ts=En(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Es=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Md=/-(\w)/g,Wn=Es(e=>e.replace(Md,(t,n)=>n?n.toUpperCase():"")),Fd=/\B([A-Z])/g,nr=Es(e=>e.replace(Fd,"-$1").toLowerCase()),ks=Es(e=>e.charAt(0).toUpperCase()+e.slice(1)),qo=Es(e=>e?`on${ks(e)}`:""),Ss=(e,t)=>!Object.is(e,t),xs=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},As=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ls=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Kl;const Hd=()=>Kl||(Kl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Nn;class Bd{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Nn,!t&&Nn&&(this.index=(Nn.scopes||(Nn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Nn;try{return Nn=this,t()}finally{Nn=n}}}on(){Nn=this}off(){Nn=this.parent}stop(t){if(this._active){let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.scopes)for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function jd(e,t=Nn){t&&t.active&&t.effects.push(e)}function $d(){return Nn}const Vo=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ql=e=>(e.w&gi)>0,Vl=e=>(e.n&gi)>0,Ud=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=gi},Wd=e=>{const{deps:t}=e;if(t.length){let n=0;for(let i=0;i<t.length;i++){const r=t[i];ql(r)&&!Vl(r)?r.delete(e):t[n++]=r,r.w&=~gi,r.n&=~gi}t.length=n}},zo=new WeakMap;let Dr=0,gi=1;const Xo=30;let Rn;const Li=Symbol(""),Yo=Symbol("");class Go{constructor(t,n=null,i){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,jd(this,i)}run(){if(!this.active)return this.fn();let t=Rn,n=mi;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=Rn,Rn=this,mi=!0,gi=1<<++Dr,Dr<=Xo?Ud(this):zl(this),this.fn()}finally{Dr<=Xo&&Wd(this),gi=1<<--Dr,Rn=this.parent,mi=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Rn===this?this.deferStop=!0:this.active&&(zl(this),this.onStop&&this.onStop(),this.active=!1)}}function zl(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let mi=!0;const Xl=[];function ir(){Xl.push(mi),mi=!1}function rr(){const e=Xl.pop();mi=e===void 0?!0:e}function on(e,t,n){if(mi&&Rn){let i=zo.get(e);i||zo.set(e,i=new Map);let r=i.get(n);r||i.set(n,r=Vo()),Yl(r)}}function Yl(e,t){let n=!1;Dr<=Xo?Vl(e)||(e.n|=gi,n=!ql(e)):n=!e.has(Rn),n&&(e.add(Rn),Rn.deps.push(e))}function ii(e,t,n,i,r,o){const l=zo.get(e);if(!l)return;let c=[];if(t==="clear")c=[...l.values()];else if(n==="length"&&Ye(e)){const d=Number(i);l.forEach((m,g)=>{(g==="length"||g>=d)&&c.push(m)})}else switch(n!==void 0&&c.push(l.get(n)),t){case"add":Ye(e)?Ko(n)&&c.push(l.get("length")):(c.push(l.get(Li)),er(e)&&c.push(l.get(Yo)));break;case"delete":Ye(e)||(c.push(l.get(Li)),er(e)&&c.push(l.get(Yo)));break;case"set":er(e)&&c.push(l.get(Li));break}if(c.length===1)c[0]&&Jo(c[0]);else{const d=[];for(const m of c)m&&d.push(...m);Jo(Vo(d))}}function Jo(e,t){const n=Ye(e)?e:[...e];for(const i of n)i.computed&&Gl(i);for(const i of n)i.computed||Gl(i)}function Gl(e,t){(e!==Rn||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Kd=En("__proto__,__v_isRef,__isVue"),Jl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Lr)),qd=Zo(),Vd=Zo(!1,!0),zd=Zo(!0),Zl=Xd();function Xd(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const i=Ct(this);for(let o=0,l=this.length;o<l;o++)on(i,"get",o+"");const r=i[t](...n);return r===-1||r===!1?i[t](...n.map(Ct)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ir();const i=Ct(this)[t].apply(this,n);return rr(),i}}),e}function Yd(e){const t=Ct(this);return on(t,"has",e),t.hasOwnProperty(e)}function Zo(e=!1,t=!1){return function(i,r,o){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&o===(e?t?fp:au:t?ou:su).get(i))return i;const l=Ye(i);if(!e){if(l&&pt(Zl,r))return Reflect.get(Zl,r,o);if(r==="hasOwnProperty")return Yd}const c=Reflect.get(i,r,o);return(Lr(r)?Jl.has(r):Kd(r))||(e||on(i,"get",r),t)?c:tn(c)?l&&Ko(r)?c:c.value:St(c)?e?lu(c):ta(c):c}}const Gd=Ql(),Jd=Ql(!0);function Ql(e=!1){return function(n,i,r,o){let l=n[i];if(Ir(l)&&tn(l)&&!tn(r))return!1;if(!e&&(!ia(r)&&!Ir(r)&&(l=Ct(l),r=Ct(r)),!Ye(n)&&tn(l)&&!tn(r)))return l.value=r,!0;const c=Ye(n)&&Ko(i)?Number(i)<n.length:pt(n,i),d=Reflect.set(n,i,r,o);return n===Ct(o)&&(c?Ss(r,l)&&ii(n,"set",i,r):ii(n,"add",i,r)),d}}function Zd(e,t){const n=pt(e,t);e[t];const i=Reflect.deleteProperty(e,t);return i&&n&&ii(e,"delete",t,void 0),i}function Qd(e,t){const n=Reflect.has(e,t);return(!Lr(t)||!Jl.has(t))&&on(e,"has",t),n}function ep(e){return on(e,"iterate",Ye(e)?"length":Li),Reflect.ownKeys(e)}const eu={get:qd,set:Gd,deleteProperty:Zd,has:Qd,ownKeys:ep},tp={get:zd,set(e,t){return!0},deleteProperty(e,t){return!0}},np=en({},eu,{get:Vd,set:Jd}),Qo=e=>e,Os=e=>Reflect.getPrototypeOf(e);function Ds(e,t,n=!1,i=!1){e=e.__v_raw;const r=Ct(e),o=Ct(t);n||(t!==o&&on(r,"get",t),on(r,"get",o));const{has:l}=Os(r),c=i?Qo:n?sa:ra;if(l.call(r,t))return c(e.get(t));if(l.call(r,o))return c(e.get(o));e!==r&&e.get(t)}function Is(e,t=!1){const n=this.__v_raw,i=Ct(n),r=Ct(e);return t||(e!==r&&on(i,"has",e),on(i,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ps(e,t=!1){return e=e.__v_raw,!t&&on(Ct(e),"iterate",Li),Reflect.get(e,"size",e)}function tu(e){e=Ct(e);const t=Ct(this);return Os(t).has.call(t,e)||(t.add(e),ii(t,"add",e,e)),this}function nu(e,t){t=Ct(t);const n=Ct(this),{has:i,get:r}=Os(n);let o=i.call(n,e);o||(e=Ct(e),o=i.call(n,e));const l=r.call(n,e);return n.set(e,t),o?Ss(t,l)&&ii(n,"set",e,t):ii(n,"add",e,t),this}function iu(e){const t=Ct(this),{has:n,get:i}=Os(t);let r=n.call(t,e);r||(e=Ct(e),r=n.call(t,e)),i&&i.call(t,e);const o=t.delete(e);return r&&ii(t,"delete",e,void 0),o}function ru(){const e=Ct(this),t=e.size!==0,n=e.clear();return t&&ii(e,"clear",void 0,void 0),n}function Ns(e,t){return function(i,r){const o=this,l=o.__v_raw,c=Ct(l),d=t?Qo:e?sa:ra;return!e&&on(c,"iterate",Li),l.forEach((m,g)=>i.call(r,d(m),d(g),o))}}function Rs(e,t,n){return function(...i){const r=this.__v_raw,o=Ct(r),l=er(o),c=e==="entries"||e===Symbol.iterator&&l,d=e==="keys"&&l,m=r[e](...i),g=n?Qo:t?sa:ra;return!t&&on(o,"iterate",d?Yo:Li),{next(){const{value:w,done:T}=m.next();return T?{value:w,done:T}:{value:c?[g(w[0]),g(w[1])]:g(w),done:T}},[Symbol.iterator](){return this}}}}function vi(e){return function(...t){return e==="delete"?!1:this}}function ip(){const e={get(o){return Ds(this,o)},get size(){return Ps(this)},has:Is,add:tu,set:nu,delete:iu,clear:ru,forEach:Ns(!1,!1)},t={get(o){return Ds(this,o,!1,!0)},get size(){return Ps(this)},has:Is,add:tu,set:nu,delete:iu,clear:ru,forEach:Ns(!1,!0)},n={get(o){return Ds(this,o,!0)},get size(){return Ps(this,!0)},has(o){return Is.call(this,o,!0)},add:vi("add"),set:vi("set"),delete:vi("delete"),clear:vi("clear"),forEach:Ns(!0,!1)},i={get(o){return Ds(this,o,!0,!0)},get size(){return Ps(this,!0)},has(o){return Is.call(this,o,!0)},add:vi("add"),set:vi("set"),delete:vi("delete"),clear:vi("clear"),forEach:Ns(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Rs(o,!1,!1),n[o]=Rs(o,!0,!1),t[o]=Rs(o,!1,!0),i[o]=Rs(o,!0,!0)}),[e,n,t,i]}const[rp,sp,op,ap]=ip();function ea(e,t){const n=t?e?ap:op:e?sp:rp;return(i,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(pt(n,r)&&r in i?n:i,r,o)}const lp={get:ea(!1,!1)},up={get:ea(!1,!0)},cp={get:ea(!0,!1)},su=new WeakMap,ou=new WeakMap,au=new WeakMap,fp=new WeakMap;function dp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pp(e){return e.__v_skip||!Object.isExtensible(e)?0:dp(Rd(e))}function ta(e){return Ir(e)?e:na(e,!1,eu,lp,su)}function hp(e){return na(e,!1,np,up,ou)}function lu(e){return na(e,!0,tp,cp,au)}function na(e,t,n,i,r){if(!St(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const l=pp(e);if(l===0)return e;const c=new Proxy(e,l===2?i:n);return r.set(e,c),c}function sr(e){return Ir(e)?sr(e.__v_raw):!!(e&&e.__v_isReactive)}function Ir(e){return!!(e&&e.__v_isReadonly)}function ia(e){return!!(e&&e.__v_isShallow)}function uu(e){return sr(e)||Ir(e)}function Ct(e){const t=e&&e.__v_raw;return t?Ct(t):e}function cu(e){return As(e,"__v_skip",!0),e}const ra=e=>St(e)?ta(e):e,sa=e=>St(e)?lu(e):e;function gp(e){mi&&Rn&&(e=Ct(e),Yl(e.dep||(e.dep=Vo())))}function mp(e,t){e=Ct(e);const n=e.dep;n&&Jo(n)}function tn(e){return!!(e&&e.__v_isRef===!0)}function vp(e){return tn(e)?e.value:e}const yp={get:(e,t,n)=>vp(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const r=e[t];return tn(r)&&!tn(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};function fu(e){return sr(e)?e:new Proxy(e,yp)}var du;class bp{constructor(t,n,i,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[du]=!1,this._dirty=!0,this.effect=new Go(t,()=>{this._dirty||(this._dirty=!0,mp(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=i}get value(){const t=Ct(this);return gp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}du="__v_isReadonly";function Cp(e,t,n=!1){let i,r;const o=ot(e);return o?(i=e,r=Pn):(i=e.get,r=e.set),new bp(i,r,o||!r,n)}function k1(e,...t){}function yi(e,t,n,i){let r;try{r=i?e(...i):e()}catch(o){Ms(o,t,n)}return r}function Mn(e,t,n,i){if(ot(e)){const o=yi(e,t,n,i);return o&&$l(o)&&o.catch(l=>{Ms(l,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(Mn(e[o],t,n,i));return r}function Ms(e,t,n,i=!0){const r=t?t.vnode:null;if(t){let o=t.parent;const l=t.proxy,c=n;for(;o;){const m=o.ec;if(m){for(let g=0;g<m.length;g++)if(m[g](e,l,c)===!1)return}o=o.parent}const d=t.appContext.config.errorHandler;if(d){yi(d,null,10,[e,l,c]);return}}wp(e,n,r,i)}function wp(e,t,n,i=!0){console.error(e)}let Pr=!1,oa=!1;const Jt=[];let Kn=0;const or=[];let ri=null,Oi=0;const pu=Promise.resolve();let aa=null;function _p(e){const t=aa||pu;return e?t.then(this?e.bind(this):e):t}function Tp(e){let t=Kn+1,n=Jt.length;for(;t<n;){const i=t+n>>>1;Nr(Jt[i])<e?t=i+1:n=i}return t}function la(e){(!Jt.length||!Jt.includes(e,Pr&&e.allowRecurse?Kn+1:Kn))&&(e.id==null?Jt.push(e):Jt.splice(Tp(e.id),0,e),hu())}function hu(){!Pr&&!oa&&(oa=!0,aa=pu.then(vu))}function Ep(e){const t=Jt.indexOf(e);t>Kn&&Jt.splice(t,1)}function kp(e){Ye(e)?or.push(...e):(!ri||!ri.includes(e,e.allowRecurse?Oi+1:Oi))&&or.push(e),hu()}function gu(e,t=Pr?Kn+1:0){for(;t<Jt.length;t++){const n=Jt[t];n&&n.pre&&(Jt.splice(t,1),t--,n())}}function mu(e){if(or.length){const t=[...new Set(or)];if(or.length=0,ri){ri.push(...t);return}for(ri=t,ri.sort((n,i)=>Nr(n)-Nr(i)),Oi=0;Oi<ri.length;Oi++)ri[Oi]();ri=null,Oi=0}}const Nr=e=>e.id==null?1/0:e.id,Sp=(e,t)=>{const n=Nr(e)-Nr(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function vu(e){oa=!1,Pr=!0,Jt.sort(Sp);const t=Pn;try{for(Kn=0;Kn<Jt.length;Kn++){const n=Jt[Kn];n&&n.active!==!1&&yi(n,null,14)}}finally{Kn=0,Jt.length=0,mu(),Pr=!1,aa=null,(Jt.length||or.length)&&vu()}}function xp(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||kt;let r=n;const o=t.startsWith("update:"),l=o&&t.slice(7);if(l&&l in i){const g=`${l==="modelValue"?"model":l}Modifiers`,{number:w,trim:T}=i[g]||kt;T&&(r=n.map(H=>jt(H)?H.trim():H)),w&&(r=n.map(Ls))}let c,d=i[c=qo(t)]||i[c=qo(Wn(t))];!d&&o&&(d=i[c=qo(nr(t))]),d&&Mn(d,e,6,r);const m=i[c+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Mn(m,e,6,r)}}function yu(e,t,n=!1){const i=t.emitsCache,r=i.get(e);if(r!==void 0)return r;const o=e.emits;let l={},c=!1;if(!ot(e)){const d=m=>{const g=yu(m,t,!0);g&&(c=!0,en(l,g))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!o&&!c?(St(e)&&i.set(e,null),null):(Ye(o)?o.forEach(d=>l[d]=null):en(l,o),St(e)&&i.set(e,l),l)}function Fs(e,t){return!e||!_s(t)?!1:(t=t.slice(2).replace(/Once$/,""),pt(e,t[0].toLowerCase()+t.slice(1))||pt(e,nr(t))||pt(e,t))}let kn=null,bu=null;function Hs(e){const t=kn;return kn=e,bu=e&&e.type.__scopeId||null,t}function Ap(e,t=kn,n){if(!t||e._n)return e;const i=(...r)=>{i._d&&Wu(-1);const o=Hs(t);let l;try{l=e(...r)}finally{Hs(o),i._d&&Wu(1)}return l};return i._n=!0,i._c=!0,i._d=!0,i}function S1(){}function ua(e){const{type:t,vnode:n,proxy:i,withProxy:r,props:o,propsOptions:[l],slots:c,attrs:d,emit:m,render:g,renderCache:w,data:T,setupState:H,ctx:x,inheritAttrs:I}=e;let V,N;const te=Hs(e);try{if(n.shapeFlag&4){const D=r||i;V=qn(g.call(D,D,w,o,H,T,x)),N=d}else{const D=t;V=qn(D.length>1?D(o,{attrs:d,slots:c,emit:m}):D(o,null)),N=t.props?d:Lp(d)}}catch(D){Mr.length=0,Ms(D,e,1),V=De(Ri)}let ye=V;if(N&&I!==!1){const D=Object.keys(N),{shapeFlag:Fe}=ye;D.length&&Fe&7&&(l&&D.some(Uo)&&(N=Op(N,l)),ye=ar(ye,N))}return n.dirs&&(ye=ar(ye),ye.dirs=ye.dirs?ye.dirs.concat(n.dirs):n.dirs),n.transition&&(ye.transition=n.transition),V=ye,Hs(te),V}const Lp=e=>{let t;for(const n in e)(n==="class"||n==="style"||_s(n))&&((t||(t={}))[n]=e[n]);return t},Op=(e,t)=>{const n={};for(const i in e)(!Uo(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function Dp(e,t,n){const{props:i,children:r,component:o}=e,{props:l,children:c,patchFlag:d}=t,m=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return i?Cu(i,l,m):!!l;if(d&8){const g=t.dynamicProps;for(let w=0;w<g.length;w++){const T=g[w];if(l[T]!==i[T]&&!Fs(m,T))return!0}}}else return(r||c)&&(!c||!c.$stable)?!0:i===l?!1:i?l?Cu(i,l,m):!0:!!l;return!1}function Cu(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){const o=i[r];if(t[o]!==e[o]&&!Fs(n,o))return!0}return!1}function Ip({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Pp=e=>e.__isSuspense;function Np(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):kp(e)}function Rp(e,t){if(Ft){let n=Ft.provides;const i=Ft.parent&&Ft.parent.provides;i===n&&(n=Ft.provides=Object.create(i)),n[e]=t}}function Bs(e,t,n=!1){const i=Ft||kn;if(i){const r=i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&ot(t)?t.call(i.proxy):t}}const js={};function ca(e,t,n){return wu(e,t,n)}function wu(e,t,{immediate:n,deep:i,flush:r,onTrack:o,onTrigger:l}=kt){const c=$d()===(Ft==null?void 0:Ft.scope)?Ft:null;let d,m=!1,g=!1;if(tn(e)?(d=()=>e.value,m=ia(e)):sr(e)?(d=()=>e,i=!0):Ye(e)?(g=!0,m=e.some(ye=>sr(ye)||ia(ye)),d=()=>e.map(ye=>{if(tn(ye))return ye.value;if(sr(ye))return Di(ye);if(ot(ye))return yi(ye,c,2)})):ot(e)?t?d=()=>yi(e,c,2):d=()=>{if(!(c&&c.isUnmounted))return w&&w(),Mn(e,c,3,[T])}:d=Pn,t&&i){const ye=d;d=()=>Di(ye())}let w,T=ye=>{w=N.onStop=()=>{yi(ye,c,4)}},H;if(Br)if(T=Pn,t?n&&Mn(t,c,3,[d(),g?[]:void 0,T]):d(),r==="sync"){const ye=Oh();H=ye.__watcherHandles||(ye.__watcherHandles=[])}else return Pn;let x=g?new Array(e.length).fill(js):js;const I=()=>{if(N.active)if(t){const ye=N.run();(i||m||(g?ye.some((D,Fe)=>Ss(D,x[Fe])):Ss(ye,x)))&&(w&&w(),Mn(t,c,3,[ye,x===js?void 0:g&&x[0]===js?[]:x,T]),x=ye)}else N.run()};I.allowRecurse=!!t;let V;r==="sync"?V=I:r==="post"?V=()=>an(I,c&&c.suspense):(I.pre=!0,c&&(I.id=c.uid),V=()=>la(I));const N=new Go(d,V);t?n?I():x=N.run():r==="post"?an(N.run.bind(N),c&&c.suspense):N.run();const te=()=>{N.stop(),c&&c.scope&&Wo(c.scope.effects,N)};return H&&H.push(te),te}function Mp(e,t,n){const i=this.proxy,r=jt(e)?e.includes(".")?_u(i,e):()=>i[e]:e.bind(i,i);let o;ot(t)?o=t:(o=t.handler,n=t);const l=Ft;lr(this);const c=wu(r,o.bind(i),n);return l?lr(l):Mi(),c}function _u(e,t){const n=t.split(".");return()=>{let i=e;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}function Di(e,t){if(!St(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),tn(e))Di(e.value,t);else if(Ye(e))for(let n=0;n<e.length;n++)Di(e[n],t);else if(tr(e)||er(e))e.forEach(n=>{Di(n,t)});else if(Wl(e))for(const n in e)Di(e[n],t);return e}function Fp(e){return ot(e)?{setup:e,name:e.name}:e}const $s=e=>!!e.type.__asyncLoader,Tu=e=>e.type.__isKeepAlive;function Hp(e,t){Eu(e,"a",t)}function Bp(e,t){Eu(e,"da",t)}function Eu(e,t,n=Ft){const i=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Us(t,i,n),n){let r=n.parent;for(;r&&r.parent;)Tu(r.parent.vnode)&&jp(i,t,n,r),r=r.parent}}function jp(e,t,n,i){const r=Us(t,e,i,!0);ku(()=>{Wo(i[t],r)},n)}function Us(e,t,n=Ft,i=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...l)=>{if(n.isUnmounted)return;ir(),lr(n);const c=Mn(t,n,e,l);return Mi(),rr(),c});return i?r.unshift(o):r.push(o),o}}const si=e=>(t,n=Ft)=>(!Br||e==="sp")&&Us(e,(...i)=>t(...i),n),$p=si("bm"),Up=si("m"),Wp=si("bu"),Kp=si("u"),qp=si("bum"),ku=si("um"),Vp=si("sp"),zp=si("rtg"),Xp=si("rtc");function Yp(e,t=Ft){Us("ec",e,t)}function xe(e,t){const n=kn;if(n===null)return e;const i=Xs(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[l,c,d,m=kt]=t[o];l&&(ot(l)&&(l={mounted:l,updated:l}),l.deep&&Di(c),r.push({dir:l,instance:i,value:c,oldValue:void 0,arg:d,modifiers:m}))}return e}function Ii(e,t,n,i){const r=e.dirs,o=t&&t.dirs;for(let l=0;l<r.length;l++){const c=r[l];o&&(c.oldValue=o[l].value);let d=c.dir[i];d&&(ir(),Mn(d,n,8,[e.el,c,e,t]),rr())}}const Su="components",Gp="directives";function Pt(e,t){return xu(Su,e,!0,t)||e}const Jp=Symbol();function Ws(e){return xu(Gp,e)}function xu(e,t,n=!0,i=!1){const r=kn||Ft;if(r){const o=r.type;if(e===Su){const c=Sh(o,!1);if(c&&(c===t||c===Wn(t)||c===ks(Wn(t))))return o}const l=Au(r[e]||o[e],t)||Au(r.appContext[e],t);return!l&&i?o:l}}function Au(e,t){return e&&(e[t]||e[Wn(t)]||e[ks(Wn(t))])}function yt(e,t,n,i){let r;const o=n&&n[i];if(Ye(e)||jt(e)){r=new Array(e.length);for(let l=0,c=e.length;l<c;l++)r[l]=t(e[l],l,void 0,o&&o[l])}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o&&o[l])}else if(St(e))if(e[Symbol.iterator])r=Array.from(e,(l,c)=>t(l,c,void 0,o&&o[c]));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,d=l.length;c<d;c++){const m=l[c];r[c]=t(e[m],m,c,o&&o[c])}}else r=[];return n&&(n[i]=r),r}const fa=e=>e?zu(e)?Xs(e)||e.proxy:fa(e.parent):null,Rr=en(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fa(e.parent),$root:e=>fa(e.root),$emit:e=>e.emit,$options:e=>ha(e),$forceUpdate:e=>e.f||(e.f=()=>la(e.update)),$nextTick:e=>e.n||(e.n=_p.bind(e.proxy)),$watch:e=>Mp.bind(e)}),da=(e,t)=>e!==kt&&!e.__isScriptSetup&&pt(e,t),Zp={get({_:e},t){const{ctx:n,setupState:i,data:r,props:o,accessCache:l,type:c,appContext:d}=e;let m;if(t[0]!=="$"){const H=l[t];if(H!==void 0)switch(H){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(da(i,t))return l[t]=1,i[t];if(r!==kt&&pt(r,t))return l[t]=2,r[t];if((m=e.propsOptions[0])&&pt(m,t))return l[t]=3,o[t];if(n!==kt&&pt(n,t))return l[t]=4,n[t];pa&&(l[t]=0)}}const g=Rr[t];let w,T;if(g)return t==="$attrs"&&on(e,"get",t),g(e);if((w=c.__cssModules)&&(w=w[t]))return w;if(n!==kt&&pt(n,t))return l[t]=4,n[t];if(T=d.config.globalProperties,pt(T,t))return T[t]},set({_:e},t,n){const{data:i,setupState:r,ctx:o}=e;return da(r,t)?(r[t]=n,!0):i!==kt&&pt(i,t)?(i[t]=n,!0):pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:r,propsOptions:o}},l){let c;return!!n[l]||e!==kt&&pt(e,l)||da(t,l)||(c=o[0])&&pt(c,l)||pt(i,l)||pt(Rr,l)||pt(r.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let pa=!0;function Qp(e){const t=ha(e),n=e.proxy,i=e.ctx;pa=!1,t.beforeCreate&&Lu(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:c,provide:d,inject:m,created:g,beforeMount:w,mounted:T,beforeUpdate:H,updated:x,activated:I,deactivated:V,beforeDestroy:N,beforeUnmount:te,destroyed:ye,unmounted:D,render:Fe,renderTracked:p,renderTriggered:Ae,errorCaptured:R,serverPrefetch:E,expose:P,inheritAttrs:Z,components:re,directives:se,filters:Me}=t;if(m&&eh(m,i,null,e.appContext.config.unwrapInjectedRef),l)for(const oe in l){const ge=l[oe];ot(ge)&&(i[oe]=ge.bind(n))}if(r){const oe=r.call(n,n);St(oe)&&(e.data=ta(oe))}if(pa=!0,o)for(const oe in o){const ge=o[oe],Ee=ot(ge)?ge.bind(n,n):ot(ge.get)?ge.get.bind(n,n):Pn,ft=!ot(ge)&&ot(ge.set)?ge.set.bind(n):Pn,Ve=Ah({get:Ee,set:ft});Object.defineProperty(i,oe,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:G=>Ve.value=G})}if(c)for(const oe in c)Ou(c[oe],i,n,oe);if(d){const oe=ot(d)?d.call(n):d;Reflect.ownKeys(oe).forEach(ge=>{Rp(ge,oe[ge])})}g&&Lu(g,e,"c");function Ne(oe,ge){Ye(ge)?ge.forEach(Ee=>oe(Ee.bind(n))):ge&&oe(ge.bind(n))}if(Ne($p,w),Ne(Up,T),Ne(Wp,H),Ne(Kp,x),Ne(Hp,I),Ne(Bp,V),Ne(Yp,R),Ne(Xp,p),Ne(zp,Ae),Ne(qp,te),Ne(ku,D),Ne(Vp,E),Ye(P))if(P.length){const oe=e.exposed||(e.exposed={});P.forEach(ge=>{Object.defineProperty(oe,ge,{get:()=>n[ge],set:Ee=>n[ge]=Ee})})}else e.exposed||(e.exposed={});Fe&&e.render===Pn&&(e.render=Fe),Z!=null&&(e.inheritAttrs=Z),re&&(e.components=re),se&&(e.directives=se)}function eh(e,t,n=Pn,i=!1){Ye(e)&&(e=ga(e));for(const r in e){const o=e[r];let l;St(o)?"default"in o?l=Bs(o.from||r,o.default,!0):l=Bs(o.from||r):l=Bs(o),tn(l)&&i?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):t[r]=l}}function Lu(e,t,n){Mn(Ye(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ou(e,t,n,i){const r=i.includes(".")?_u(n,i):()=>n[i];if(jt(e)){const o=t[e];ot(o)&&ca(r,o)}else if(ot(e))ca(r,e.bind(n));else if(St(e))if(Ye(e))e.forEach(o=>Ou(o,t,n,i));else{const o=ot(e.handler)?e.handler.bind(n):t[e.handler];ot(o)&&ca(r,o,e)}}function ha(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,c=o.get(t);let d;return c?d=c:!r.length&&!n&&!i?d=t:(d={},r.length&&r.forEach(m=>Ks(d,m,l,!0)),Ks(d,t,l)),St(t)&&o.set(t,d),d}function Ks(e,t,n,i=!1){const{mixins:r,extends:o}=t;o&&Ks(e,o,n,!0),r&&r.forEach(l=>Ks(e,l,n,!0));for(const l in t)if(!(i&&l==="expose")){const c=th[l]||n&&n[l];e[l]=c?c(e[l],t[l]):t[l]}return e}const th={data:Du,props:Pi,emits:Pi,methods:Pi,computed:Pi,beforeCreate:nn,created:nn,beforeMount:nn,mounted:nn,beforeUpdate:nn,updated:nn,beforeDestroy:nn,beforeUnmount:nn,destroyed:nn,unmounted:nn,activated:nn,deactivated:nn,errorCaptured:nn,serverPrefetch:nn,components:Pi,directives:Pi,watch:ih,provide:Du,inject:nh};function Du(e,t){return t?e?function(){return en(ot(e)?e.call(this,this):e,ot(t)?t.call(this,this):t)}:t:e}function nh(e,t){return Pi(ga(e),ga(t))}function ga(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function nn(e,t){return e?[...new Set([].concat(e,t))]:t}function Pi(e,t){return e?en(en(Object.create(null),e),t):t}function ih(e,t){if(!e)return t;if(!t)return e;const n=en(Object.create(null),e);for(const i in t)n[i]=nn(e[i],t[i]);return n}function rh(e,t,n,i=!1){const r={},o={};As(o,Vs,1),e.propsDefaults=Object.create(null),Iu(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=i?r:hp(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function sh(e,t,n,i){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,c=Ct(r),[d]=e.propsOptions;let m=!1;if((i||l>0)&&!(l&16)){if(l&8){const g=e.vnode.dynamicProps;for(let w=0;w<g.length;w++){let T=g[w];if(Fs(e.emitsOptions,T))continue;const H=t[T];if(d)if(pt(o,T))H!==o[T]&&(o[T]=H,m=!0);else{const x=Wn(T);r[x]=ma(d,c,x,H,e,!1)}else H!==o[T]&&(o[T]=H,m=!0)}}}else{Iu(e,t,r,o)&&(m=!0);let g;for(const w in c)(!t||!pt(t,w)&&((g=nr(w))===w||!pt(t,g)))&&(d?n&&(n[w]!==void 0||n[g]!==void 0)&&(r[w]=ma(d,c,w,void 0,e,!0)):delete r[w]);if(o!==c)for(const w in o)(!t||!pt(t,w))&&(delete o[w],m=!0)}m&&ii(e,"set","$attrs")}function Iu(e,t,n,i){const[r,o]=e.propsOptions;let l=!1,c;if(t)for(let d in t){if(Ts(d))continue;const m=t[d];let g;r&&pt(r,g=Wn(d))?!o||!o.includes(g)?n[g]=m:(c||(c={}))[g]=m:Fs(e.emitsOptions,d)||(!(d in i)||m!==i[d])&&(i[d]=m,l=!0)}if(o){const d=Ct(n),m=c||kt;for(let g=0;g<o.length;g++){const w=o[g];n[w]=ma(r,d,w,m[w],e,!pt(m,w))}}return l}function ma(e,t,n,i,r,o){const l=e[n];if(l!=null){const c=pt(l,"default");if(c&&i===void 0){const d=l.default;if(l.type!==Function&&ot(d)){const{propsDefaults:m}=r;n in m?i=m[n]:(lr(r),i=m[n]=d.call(null,t),Mi())}else i=d}l[0]&&(o&&!c?i=!1:l[1]&&(i===""||i===nr(n))&&(i=!0))}return i}function Pu(e,t,n=!1){const i=t.propsCache,r=i.get(e);if(r)return r;const o=e.props,l={},c=[];let d=!1;if(!ot(e)){const g=w=>{d=!0;const[T,H]=Pu(w,t,!0);en(l,T),H&&c.push(...H)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!o&&!d)return St(e)&&i.set(e,Qi),Qi;if(Ye(o))for(let g=0;g<o.length;g++){const w=Wn(o[g]);Nu(w)&&(l[w]=kt)}else if(o)for(const g in o){const w=Wn(g);if(Nu(w)){const T=o[g],H=l[w]=Ye(T)||ot(T)?{type:T}:Object.assign({},T);if(H){const x=Fu(Boolean,H.type),I=Fu(String,H.type);H[0]=x>-1,H[1]=I<0||x<I,(x>-1||pt(H,"default"))&&c.push(w)}}}const m=[l,c];return St(e)&&i.set(e,m),m}function Nu(e){return e[0]!=="$"}function Ru(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Mu(e,t){return Ru(e)===Ru(t)}function Fu(e,t){return Ye(t)?t.findIndex(n=>Mu(n,e)):ot(t)&&Mu(t,e)?0:-1}const Hu=e=>e[0]==="_"||e==="$stable",va=e=>Ye(e)?e.map(qn):[qn(e)],oh=(e,t,n)=>{if(t._n)return t;const i=Ap((...r)=>va(t(...r)),n);return i._c=!1,i},Bu=(e,t,n)=>{const i=e._ctx;for(const r in e){if(Hu(r))continue;const o=e[r];if(ot(o))t[r]=oh(r,o,i);else if(o!=null){const l=va(o);t[r]=()=>l}}},ju=(e,t)=>{const n=va(t);e.slots.default=()=>n},ah=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ct(t),As(t,"_",n)):Bu(t,e.slots={})}else e.slots={},t&&ju(e,t);As(e.slots,Vs,1)},lh=(e,t,n)=>{const{vnode:i,slots:r}=e;let o=!0,l=kt;if(i.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:(en(r,t),!n&&c===1&&delete r._):(o=!t.$stable,Bu(t,r)),l=t}else t&&(ju(e,t),l={default:1});if(o)for(const c in r)!Hu(c)&&!(c in l)&&delete r[c]};function $u(){return{app:null,config:{isNativeTag:Id,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uh=0;function ch(e,t){return function(i,r=null){ot(i)||(i=Object.assign({},i)),r!=null&&!St(r)&&(r=null);const o=$u(),l=new Set;let c=!1;const d=o.app={_uid:uh++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:Dh,get config(){return o.config},set config(m){},use(m,...g){return l.has(m)||(m&&ot(m.install)?(l.add(m),m.install(d,...g)):ot(m)&&(l.add(m),m(d,...g))),d},mixin(m){return o.mixins.includes(m)||o.mixins.push(m),d},component(m,g){return g?(o.components[m]=g,d):o.components[m]},directive(m,g){return g?(o.directives[m]=g,d):o.directives[m]},mount(m,g,w){if(!c){const T=De(i,r);return T.appContext=o,g&&t?t(T,m):e(T,m,w),c=!0,d._container=m,m.__vue_app__=d,Xs(T.component)||T.component.proxy}},unmount(){c&&(e(null,d._container),delete d._container.__vue_app__)},provide(m,g){return o.provides[m]=g,d}};return d}}function ya(e,t,n,i,r=!1){if(Ye(e)){e.forEach((T,H)=>ya(T,t&&(Ye(t)?t[H]:t),n,i,r));return}if($s(i)&&!r)return;const o=i.shapeFlag&4?Xs(i.component)||i.component.proxy:i.el,l=r?null:o,{i:c,r:d}=e,m=t&&t.r,g=c.refs===kt?c.refs={}:c.refs,w=c.setupState;if(m!=null&&m!==d&&(jt(m)?(g[m]=null,pt(w,m)&&(w[m]=null)):tn(m)&&(m.value=null)),ot(d))yi(d,c,12,[l,g]);else{const T=jt(d),H=tn(d);if(T||H){const x=()=>{if(e.f){const I=T?pt(w,d)?w[d]:g[d]:d.value;r?Ye(I)&&Wo(I,o):Ye(I)?I.includes(o)||I.push(o):T?(g[d]=[o],pt(w,d)&&(w[d]=g[d])):(d.value=[o],e.k&&(g[e.k]=d.value))}else T?(g[d]=l,pt(w,d)&&(w[d]=l)):H&&(d.value=l,e.k&&(g[e.k]=l))};l?(x.id=-1,an(x,n)):x()}}}const an=Np;function fh(e){return dh(e)}function dh(e,t){const n=Hd();n.__VUE__=!0;const{insert:i,remove:r,patchProp:o,createElement:l,createText:c,createComment:d,setText:m,setElementText:g,parentNode:w,nextSibling:T,setScopeId:H=Pn,insertStaticContent:x}=e,I=(k,L,W,Y=null,B=null,q=null,de=!1,ae=null,ce=!!L.dynamicChildren)=>{if(k===L)return;k&&!Hr(k,L)&&(Y=Re(k),G(k,B,q,!0),k=null),L.patchFlag===-2&&(ce=!1,L.dynamicChildren=null);const{type:ee,ref:be,shapeFlag:pe}=L;switch(ee){case qs:V(k,L,W,Y);break;case Ri:N(k,L,W,Y);break;case ba:k==null&&te(L,W,Y,de);break;case $e:re(k,L,W,Y,B,q,de,ae,ce);break;default:pe&1?Fe(k,L,W,Y,B,q,de,ae,ce):pe&6?se(k,L,W,Y,B,q,de,ae,ce):(pe&64||pe&128)&&ee.process(k,L,W,Y,B,q,de,ae,ce,ke)}be!=null&&B&&ya(be,k&&k.ref,q,L||k,!L)},V=(k,L,W,Y)=>{if(k==null)i(L.el=c(L.children),W,Y);else{const B=L.el=k.el;L.children!==k.children&&m(B,L.children)}},N=(k,L,W,Y)=>{k==null?i(L.el=d(L.children||""),W,Y):L.el=k.el},te=(k,L,W,Y)=>{[k.el,k.anchor]=x(k.children,L,W,Y,k.el,k.anchor)},ye=({el:k,anchor:L},W,Y)=>{let B;for(;k&&k!==L;)B=T(k),i(k,W,Y),k=B;i(L,W,Y)},D=({el:k,anchor:L})=>{let W;for(;k&&k!==L;)W=T(k),r(k),k=W;r(L)},Fe=(k,L,W,Y,B,q,de,ae,ce)=>{de=de||L.type==="svg",k==null?p(L,W,Y,B,q,de,ae,ce):E(k,L,B,q,de,ae,ce)},p=(k,L,W,Y,B,q,de,ae)=>{let ce,ee;const{type:be,props:pe,shapeFlag:Oe,transition:Ce,dirs:je}=k;if(ce=k.el=l(k.type,q,pe&&pe.is,pe),Oe&8?g(ce,k.children):Oe&16&&R(k.children,ce,null,Y,B,q&&be!=="foreignObject",de,ae),je&&Ii(k,null,Y,"created"),Ae(ce,k,k.scopeId,de,Y),pe){for(const tt in pe)tt!=="value"&&!Ts(tt)&&o(ce,tt,null,pe[tt],q,k.children,Y,B,Te);"value"in pe&&o(ce,"value",null,pe.value),(ee=pe.onVnodeBeforeMount)&&Vn(ee,Y,k)}je&&Ii(k,null,Y,"beforeMount");const rt=(!B||B&&!B.pendingBranch)&&Ce&&!Ce.persisted;rt&&Ce.beforeEnter(ce),i(ce,L,W),((ee=pe&&pe.onVnodeMounted)||rt||je)&&an(()=>{ee&&Vn(ee,Y,k),rt&&Ce.enter(ce),je&&Ii(k,null,Y,"mounted")},B)},Ae=(k,L,W,Y,B)=>{if(W&&H(k,W),Y)for(let q=0;q<Y.length;q++)H(k,Y[q]);if(B){let q=B.subTree;if(L===q){const de=B.vnode;Ae(k,de,de.scopeId,de.slotScopeIds,B.parent)}}},R=(k,L,W,Y,B,q,de,ae,ce=0)=>{for(let ee=ce;ee<k.length;ee++){const be=k[ee]=ae?bi(k[ee]):qn(k[ee]);I(null,be,L,W,Y,B,q,de,ae)}},E=(k,L,W,Y,B,q,de)=>{const ae=L.el=k.el;let{patchFlag:ce,dynamicChildren:ee,dirs:be}=L;ce|=k.patchFlag&16;const pe=k.props||kt,Oe=L.props||kt;let Ce;W&&Ni(W,!1),(Ce=Oe.onVnodeBeforeUpdate)&&Vn(Ce,W,L,k),be&&Ii(L,k,W,"beforeUpdate"),W&&Ni(W,!0);const je=B&&L.type!=="foreignObject";if(ee?P(k.dynamicChildren,ee,ae,W,Y,je,q):de||ge(k,L,ae,null,W,Y,je,q,!1),ce>0){if(ce&16)Z(ae,L,pe,Oe,W,Y,B);else if(ce&2&&pe.class!==Oe.class&&o(ae,"class",null,Oe.class,B),ce&4&&o(ae,"style",pe.style,Oe.style,B),ce&8){const rt=L.dynamicProps;for(let tt=0;tt<rt.length;tt++){const dt=rt[tt],At=pe[dt],Kt=Oe[dt];(Kt!==At||dt==="value")&&o(ae,dt,At,Kt,B,k.children,W,Y,Te)}}ce&1&&k.children!==L.children&&g(ae,L.children)}else!de&&ee==null&&Z(ae,L,pe,Oe,W,Y,B);((Ce=Oe.onVnodeUpdated)||be)&&an(()=>{Ce&&Vn(Ce,W,L,k),be&&Ii(L,k,W,"updated")},Y)},P=(k,L,W,Y,B,q,de)=>{for(let ae=0;ae<L.length;ae++){const ce=k[ae],ee=L[ae],be=ce.el&&(ce.type===$e||!Hr(ce,ee)||ce.shapeFlag&70)?w(ce.el):W;I(ce,ee,be,null,Y,B,q,de,!0)}},Z=(k,L,W,Y,B,q,de)=>{if(W!==Y){if(W!==kt)for(const ae in W)!Ts(ae)&&!(ae in Y)&&o(k,ae,W[ae],null,de,L.children,B,q,Te);for(const ae in Y){if(Ts(ae))continue;const ce=Y[ae],ee=W[ae];ce!==ee&&ae!=="value"&&o(k,ae,ee,ce,de,L.children,B,q,Te)}"value"in Y&&o(k,"value",W.value,Y.value)}},re=(k,L,W,Y,B,q,de,ae,ce)=>{const ee=L.el=k?k.el:c(""),be=L.anchor=k?k.anchor:c("");let{patchFlag:pe,dynamicChildren:Oe,slotScopeIds:Ce}=L;Ce&&(ae=ae?ae.concat(Ce):Ce),k==null?(i(ee,W,Y),i(be,W,Y),R(L.children,W,be,B,q,de,ae,ce)):pe>0&&pe&64&&Oe&&k.dynamicChildren?(P(k.dynamicChildren,Oe,W,B,q,de,ae),(L.key!=null||B&&L===B.subTree)&&Uu(k,L,!0)):ge(k,L,W,be,B,q,de,ae,ce)},se=(k,L,W,Y,B,q,de,ae,ce)=>{L.slotScopeIds=ae,k==null?L.shapeFlag&512?B.ctx.activate(L,W,Y,de,ce):Me(L,W,Y,B,q,de,ce):Ze(k,L,ce)},Me=(k,L,W,Y,B,q,de)=>{const ae=k.component=wh(k,Y,B);if(Tu(k)&&(ae.ctx.renderer=ke),_h(ae),ae.asyncDep){if(B&&B.registerDep(ae,Ne),!k.el){const ce=ae.subTree=De(Ri);N(null,ce,L,W)}return}Ne(ae,k,L,W,B,q,de)},Ze=(k,L,W)=>{const Y=L.component=k.component;if(Dp(k,L,W))if(Y.asyncDep&&!Y.asyncResolved){oe(Y,L,W);return}else Y.next=L,Ep(Y.update),Y.update();else L.el=k.el,Y.vnode=L},Ne=(k,L,W,Y,B,q,de)=>{const ae=()=>{if(k.isMounted){let{next:be,bu:pe,u:Oe,parent:Ce,vnode:je}=k,rt=be,tt;Ni(k,!1),be?(be.el=je.el,oe(k,be,de)):be=je,pe&&xs(pe),(tt=be.props&&be.props.onVnodeBeforeUpdate)&&Vn(tt,Ce,be,je),Ni(k,!0);const dt=ua(k),At=k.subTree;k.subTree=dt,I(At,dt,w(At.el),Re(At),k,B,q),be.el=dt.el,rt===null&&Ip(k,dt.el),Oe&&an(Oe,B),(tt=be.props&&be.props.onVnodeUpdated)&&an(()=>Vn(tt,Ce,be,je),B)}else{let be;const{el:pe,props:Oe}=L,{bm:Ce,m:je,parent:rt}=k,tt=$s(L);if(Ni(k,!1),Ce&&xs(Ce),!tt&&(be=Oe&&Oe.onVnodeBeforeMount)&&Vn(be,rt,L),Ni(k,!0),pe&&at){const dt=()=>{k.subTree=ua(k),at(pe,k.subTree,k,B,null)};tt?L.type.__asyncLoader().then(()=>!k.isUnmounted&&dt()):dt()}else{const dt=k.subTree=ua(k);I(null,dt,W,Y,k,B,q),L.el=dt.el}if(je&&an(je,B),!tt&&(be=Oe&&Oe.onVnodeMounted)){const dt=L;an(()=>Vn(be,rt,dt),B)}(L.shapeFlag&256||rt&&$s(rt.vnode)&&rt.vnode.shapeFlag&256)&&k.a&&an(k.a,B),k.isMounted=!0,L=W=Y=null}},ce=k.effect=new Go(ae,()=>la(ee),k.scope),ee=k.update=()=>ce.run();ee.id=k.uid,Ni(k,!0),ee()},oe=(k,L,W)=>{L.component=k;const Y=k.vnode.props;k.vnode=L,k.next=null,sh(k,L.props,Y,W),lh(k,L.children,W),ir(),gu(),rr()},ge=(k,L,W,Y,B,q,de,ae,ce=!1)=>{const ee=k&&k.children,be=k?k.shapeFlag:0,pe=L.children,{patchFlag:Oe,shapeFlag:Ce}=L;if(Oe>0){if(Oe&128){ft(ee,pe,W,Y,B,q,de,ae,ce);return}else if(Oe&256){Ee(ee,pe,W,Y,B,q,de,ae,ce);return}}Ce&8?(be&16&&Te(ee,B,q),pe!==ee&&g(W,pe)):be&16?Ce&16?ft(ee,pe,W,Y,B,q,de,ae,ce):Te(ee,B,q,!0):(be&8&&g(W,""),Ce&16&&R(pe,W,Y,B,q,de,ae,ce))},Ee=(k,L,W,Y,B,q,de,ae,ce)=>{k=k||Qi,L=L||Qi;const ee=k.length,be=L.length,pe=Math.min(ee,be);let Oe;for(Oe=0;Oe<pe;Oe++){const Ce=L[Oe]=ce?bi(L[Oe]):qn(L[Oe]);I(k[Oe],Ce,W,null,B,q,de,ae,ce)}ee>be?Te(k,B,q,!0,!1,pe):R(L,W,Y,B,q,de,ae,ce,pe)},ft=(k,L,W,Y,B,q,de,ae,ce)=>{let ee=0;const be=L.length;let pe=k.length-1,Oe=be-1;for(;ee<=pe&&ee<=Oe;){const Ce=k[ee],je=L[ee]=ce?bi(L[ee]):qn(L[ee]);if(Hr(Ce,je))I(Ce,je,W,null,B,q,de,ae,ce);else break;ee++}for(;ee<=pe&&ee<=Oe;){const Ce=k[pe],je=L[Oe]=ce?bi(L[Oe]):qn(L[Oe]);if(Hr(Ce,je))I(Ce,je,W,null,B,q,de,ae,ce);else break;pe--,Oe--}if(ee>pe){if(ee<=Oe){const Ce=Oe+1,je=Ce<be?L[Ce].el:Y;for(;ee<=Oe;)I(null,L[ee]=ce?bi(L[ee]):qn(L[ee]),W,je,B,q,de,ae,ce),ee++}}else if(ee>Oe)for(;ee<=pe;)G(k[ee],B,q,!0),ee++;else{const Ce=ee,je=ee,rt=new Map;for(ee=je;ee<=Oe;ee++){const Le=L[ee]=ce?bi(L[ee]):qn(L[ee]);Le.key!=null&&rt.set(Le.key,ee)}let tt,dt=0;const At=Oe-je+1;let Kt=!1,Dt=0;const zt=new Array(At);for(ee=0;ee<At;ee++)zt[ee]=0;for(ee=Ce;ee<=pe;ee++){const Le=k[ee];if(dt>=At){G(Le,B,q,!0);continue}let Ie;if(Le.key!=null)Ie=rt.get(Le.key);else for(tt=je;tt<=Oe;tt++)if(zt[tt-je]===0&&Hr(Le,L[tt])){Ie=tt;break}Ie===void 0?G(Le,B,q,!0):(zt[Ie-je]=ee+1,Ie>=Dt?Dt=Ie:Kt=!0,I(Le,L[Ie],W,null,B,q,de,ae,ce),dt++)}const X=Kt?ph(zt):Qi;for(tt=X.length-1,ee=At-1;ee>=0;ee--){const Le=je+ee,Ie=L[Le],et=Le+1<be?L[Le+1].el:Y;zt[ee]===0?I(null,Ie,W,et,B,q,de,ae,ce):Kt&&(tt<0||ee!==X[tt]?Ve(Ie,W,et,2):tt--)}}},Ve=(k,L,W,Y,B=null)=>{const{el:q,type:de,transition:ae,children:ce,shapeFlag:ee}=k;if(ee&6){Ve(k.component.subTree,L,W,Y);return}if(ee&128){k.suspense.move(L,W,Y);return}if(ee&64){de.move(k,L,W,ke);return}if(de===$e){i(q,L,W);for(let pe=0;pe<ce.length;pe++)Ve(ce[pe],L,W,Y);i(k.anchor,L,W);return}if(de===ba){ye(k,L,W);return}if(Y!==2&&ee&1&&ae)if(Y===0)ae.beforeEnter(q),i(q,L,W),an(()=>ae.enter(q),B);else{const{leave:pe,delayLeave:Oe,afterLeave:Ce}=ae,je=()=>i(q,L,W),rt=()=>{pe(q,()=>{je(),Ce&&Ce()})};Oe?Oe(q,je,rt):rt()}else i(q,L,W)},G=(k,L,W,Y=!1,B=!1)=>{const{type:q,props:de,ref:ae,children:ce,dynamicChildren:ee,shapeFlag:be,patchFlag:pe,dirs:Oe}=k;if(ae!=null&&ya(ae,null,W,k,!0),be&256){L.ctx.deactivate(k);return}const Ce=be&1&&Oe,je=!$s(k);let rt;if(je&&(rt=de&&de.onVnodeBeforeUnmount)&&Vn(rt,L,k),be&6)we(k.component,W,Y);else{if(be&128){k.suspense.unmount(W,Y);return}Ce&&Ii(k,null,L,"beforeUnmount"),be&64?k.type.remove(k,L,W,B,ke,Y):ee&&(q!==$e||pe>0&&pe&64)?Te(ee,L,W,!1,!0):(q===$e&&pe&384||!B&&be&16)&&Te(ce,L,W),Y&&fe(k)}(je&&(rt=de&&de.onVnodeUnmounted)||Ce)&&an(()=>{rt&&Vn(rt,L,k),Ce&&Ii(k,null,L,"unmounted")},W)},fe=k=>{const{type:L,el:W,anchor:Y,transition:B}=k;if(L===$e){me(W,Y);return}if(L===ba){D(k);return}const q=()=>{r(W),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(k.shapeFlag&1&&B&&!B.persisted){const{leave:de,delayLeave:ae}=B,ce=()=>de(W,q);ae?ae(k.el,q,ce):ce()}else q()},me=(k,L)=>{let W;for(;k!==L;)W=T(k),r(k),k=W;r(L)},we=(k,L,W)=>{const{bum:Y,scope:B,update:q,subTree:de,um:ae}=k;Y&&xs(Y),B.stop(),q&&(q.active=!1,G(de,k,L,W)),ae&&an(ae,L),an(()=>{k.isUnmounted=!0},L),L&&L.pendingBranch&&!L.isUnmounted&&k.asyncDep&&!k.asyncResolved&&k.suspenseId===L.pendingId&&(L.deps--,L.deps===0&&L.resolve())},Te=(k,L,W,Y=!1,B=!1,q=0)=>{for(let de=q;de<k.length;de++)G(k[de],L,W,Y,B)},Re=k=>k.shapeFlag&6?Re(k.component.subTree):k.shapeFlag&128?k.suspense.next():T(k.anchor||k.el),ze=(k,L,W)=>{k==null?L._vnode&&G(L._vnode,null,null,!0):I(L._vnode||null,k,L,null,null,null,W),gu(),mu(),L._vnode=k},ke={p:I,um:G,m:Ve,r:fe,mt:Me,mc:R,pc:ge,pbc:P,n:Re,o:e};let Qe,at;return t&&([Qe,at]=t(ke)),{render:ze,hydrate:Qe,createApp:ch(ze,Qe)}}function Ni({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Uu(e,t,n=!1){const i=e.children,r=t.children;if(Ye(i)&&Ye(r))for(let o=0;o<i.length;o++){const l=i[o];let c=r[o];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=r[o]=bi(r[o]),c.el=l.el),n||Uu(l,c)),c.type===qs&&(c.el=l.el)}}function ph(e){const t=e.slice(),n=[0];let i,r,o,l,c;const d=e.length;for(i=0;i<d;i++){const m=e[i];if(m!==0){if(r=n[n.length-1],e[r]<m){t[i]=r,n.push(i);continue}for(o=0,l=n.length-1;o<l;)c=o+l>>1,e[n[c]]<m?o=c+1:l=c;m<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,l=n[o-1];o-- >0;)n[o]=l,l=t[l];return n}const hh=e=>e.__isTeleport,$e=Symbol(void 0),qs=Symbol(void 0),Ri=Symbol(void 0),ba=Symbol(void 0),Mr=[];let Fn=null;function F(e=!1){Mr.push(Fn=e?null:[])}function gh(){Mr.pop(),Fn=Mr[Mr.length-1]||null}let Fr=1;function Wu(e){Fr+=e}function Ku(e){return e.dynamicChildren=Fr>0?Fn||Qi:null,gh(),Fr>0&&Fn&&Fn.push(e),e}function U(e,t,n,i,r,o){return Ku(_(e,t,n,i,r,o,!0))}function wt(e,t,n,i,r){return Ku(De(e,t,n,i,r,!0))}function mh(e){return e?e.__v_isVNode===!0:!1}function Hr(e,t){return e.type===t.type&&e.key===t.key}const Vs="__vInternal",qu=({key:e})=>e??null,zs=({ref:e,ref_key:t,ref_for:n})=>e!=null?jt(e)||tn(e)||ot(e)?{i:kn,r:e,k:t,f:!!n}:e:null;function _(e,t=null,n=null,i=0,r=null,o=e===$e?0:1,l=!1,c=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qu(t),ref:t&&zs(t),scopeId:bu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:kn};return c?(Ca(d,n),o&128&&e.normalize(d)):n&&(d.shapeFlag|=jt(n)?8:16),Fr>0&&!l&&Fn&&(d.patchFlag>0||o&6)&&d.patchFlag!==32&&Fn.push(d),d}const De=vh;function vh(e,t=null,n=null,i=0,r=null,o=!1){if((!e||e===Jp)&&(e=Ri),mh(e)){const c=ar(e,t,!0);return n&&Ca(c,n),Fr>0&&!o&&Fn&&(c.shapeFlag&6?Fn[Fn.indexOf(e)]=c:Fn.push(c)),c.patchFlag|=-2,c}if(xh(e)&&(e=e.__vccOpts),t){t=yh(t);let{class:c,style:d}=t;c&&!jt(c)&&(t.class=Lt(c)),St(d)&&(uu(d)&&!Ye(d)&&(d=en({},d)),t.style=Gt(d))}const l=jt(e)?1:Pp(e)?128:hh(e)?64:St(e)?4:ot(e)?2:0;return _(e,t,n,i,r,l,o,!0)}function yh(e){return e?uu(e)||Vs in e?en({},e):e:null}function ar(e,t,n=!1){const{props:i,ref:r,patchFlag:o,children:l}=e,c=t?Vu(i||{},t):i;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&qu(c),ref:t&&t.ref?n&&r?Ye(r)?r.concat(zs(t)):[r,zs(t)]:zs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ar(e.ssContent),ssFallback:e.ssFallback&&ar(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function $t(e=" ",t=0){return De(qs,null,e,t)}function qe(e="",t=!1){return t?(F(),wt(Ri,null,e)):De(Ri,null,e)}function qn(e){return e==null||typeof e=="boolean"?De(Ri):Ye(e)?De($e,null,e.slice()):typeof e=="object"?bi(e):De(qs,null,String(e))}function bi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ar(e)}function Ca(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(i&65){const r=t.default;r&&(r._c&&(r._d=!1),Ca(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Vs in t)?t._ctx=kn:r===3&&kn&&(kn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ot(t)?(t={default:t,_ctx:kn},n=32):(t=String(t),i&64?(n=16,t=[$t(t)]):n=8);e.children=t,e.shapeFlag|=n}function Vu(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const r in i)if(r==="class")t.class!==i.class&&(t.class=Lt([t.class,i.class]));else if(r==="style")t.style=Gt([t.style,i.style]);else if(_s(r)){const o=t[r],l=i[r];l&&o!==l&&!(Ye(o)&&o.includes(l))&&(t[r]=o?[].concat(o,l):l)}else r!==""&&(t[r]=i[r])}return t}function Vn(e,t,n,i=null){Mn(e,t,7,[n,i])}const bh=$u();let Ch=0;function wh(e,t,n){const i=e.type,r=(t?t.appContext:e.appContext)||bh,o={uid:Ch++,vnode:e,type:i,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Bd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Pu(i,r),emitsOptions:yu(i,r),emit:null,emitted:null,propsDefaults:kt,inheritAttrs:i.inheritAttrs,ctx:kt,data:kt,props:kt,attrs:kt,slots:kt,refs:kt,setupState:kt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=xp.bind(null,o),e.ce&&e.ce(o),o}let Ft=null;const lr=e=>{Ft=e,e.scope.on()},Mi=()=>{Ft&&Ft.scope.off(),Ft=null};function zu(e){return e.vnode.shapeFlag&4}let Br=!1;function _h(e,t=!1){Br=t;const{props:n,children:i}=e.vnode,r=zu(e);rh(e,n,r,t),ah(e,i);const o=r?Th(e,t):void 0;return Br=!1,o}function Th(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=cu(new Proxy(e.ctx,Zp));const{setup:i}=n;if(i){const r=e.setupContext=i.length>1?kh(e):null;lr(e),ir();const o=yi(i,e,0,[e.props,r]);if(rr(),Mi(),$l(o)){if(o.then(Mi,Mi),t)return o.then(l=>{Xu(e,l,t)}).catch(l=>{Ms(l,e,0)});e.asyncDep=o}else Xu(e,o,t)}else Gu(e,t)}function Xu(e,t,n){ot(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:St(t)&&(e.setupState=fu(t)),Gu(e,n)}let Yu;function Gu(e,t,n){const i=e.type;if(!e.render){if(!t&&Yu&&!i.render){const r=i.template||ha(e).template;if(r){const{isCustomElement:o,compilerOptions:l}=e.appContext.config,{delimiters:c,compilerOptions:d}=i,m=en(en({isCustomElement:o,delimiters:c},l),d);i.render=Yu(r,m)}}e.render=i.render||Pn}lr(e),ir(),Qp(e),rr(),Mi()}function Eh(e){return new Proxy(e.attrs,{get(t,n){return on(e,"get","$attrs"),t[n]}})}function kh(e){const t=i=>{e.exposed=i||{}};let n;return{get attrs(){return n||(n=Eh(e))},slots:e.slots,emit:e.emit,expose:t}}function Xs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(fu(cu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rr)return Rr[n](e)},has(t,n){return n in t||n in Rr}}))}function Sh(e,t=!0){return ot(e)?e.displayName||e.name:e.name||t&&e.__name}function xh(e){return ot(e)&&"__vccOpts"in e}const Ah=(e,t)=>Cp(e,t,Br),Lh=Symbol(""),Oh=()=>Bs(Lh),Dh="3.2.47",Ih="http://www.w3.org/2000/svg",Fi=typeof document<"u"?document:null,Ju=Fi&&Fi.createElement("template"),Ph={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const r=t?Fi.createElementNS(Ih,e):Fi.createElement(e,n?{is:n}:void 0);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>Fi.createTextNode(e),createComment:e=>Fi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Fi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,r,o){const l=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Ju.innerHTML=i?`<svg>${e}</svg>`:e;const c=Ju.content;if(i){const d=c.firstChild;for(;d.firstChild;)c.appendChild(d.firstChild);c.removeChild(d)}t.insertBefore(c,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Nh(e,t,n){const i=e._vtc;i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Rh(e,t,n){const i=e.style,r=jt(n);if(n&&!r){if(t&&!jt(t))for(const o in t)n[o]==null&&wa(i,o,"");for(const o in n)wa(i,o,n[o])}else{const o=i.display;r?t!==n&&(i.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(i.display=o)}}const Zu=/\s*!important$/;function wa(e,t,n){if(Ye(n))n.forEach(i=>wa(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Mh(e,t);Zu.test(n)?e.setProperty(nr(i),n.replace(Zu,""),"important"):e[i]=n}}const Qu=["Webkit","Moz","ms"],_a={};function Mh(e,t){const n=_a[t];if(n)return n;let i=Wn(t);if(i!=="filter"&&i in e)return _a[t]=i;i=ks(i);for(let r=0;r<Qu.length;r++){const o=Qu[r]+i;if(o in e)return _a[t]=o}return t}const ec="http://www.w3.org/1999/xlink";function Fh(e,t,n,i,r){if(i&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(ec,t.slice(6,t.length)):e.setAttributeNS(ec,t,n);else{const o=Od(t);n==null||o&&!Hl(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function Hh(e,t,n,i,r,o,l){if(t==="innerHTML"||t==="textContent"){i&&l(i,r,o),e[t]=n??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const d=n??"";(e.value!==d||e.tagName==="OPTION")&&(e.value=d),n==null&&e.removeAttribute(t);return}let c=!1;if(n===""||n==null){const d=typeof e[t];d==="boolean"?n=Hl(n):n==null&&d==="string"?(n="",c=!0):d==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(t)}function Ci(e,t,n,i){e.addEventListener(t,n,i)}function Bh(e,t,n,i){e.removeEventListener(t,n,i)}function jh(e,t,n,i,r=null){const o=e._vei||(e._vei={}),l=o[t];if(i&&l)l.value=i;else{const[c,d]=$h(t);if(i){const m=o[t]=Kh(i,r);Ci(e,c,m,d)}else l&&(Bh(e,c,l,d),o[t]=void 0)}}const tc=/(?:Once|Passive|Capture)$/;function $h(e){let t;if(tc.test(e)){t={};let i;for(;i=e.match(tc);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):nr(e.slice(2)),t]}let Ta=0;const Uh=Promise.resolve(),Wh=()=>Ta||(Uh.then(()=>Ta=0),Ta=Date.now());function Kh(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Mn(qh(i,n.value),t,5,[i])};return n.value=e,n.attached=Wh(),n}function qh(e,t){if(Ye(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>r=>!r._stopped&&i&&i(r))}else return t}const nc=/^on[a-z]/,Vh=(e,t,n,i,r=!1,o,l,c,d)=>{t==="class"?Nh(e,i,r):t==="style"?Rh(e,n,i):_s(t)?Uo(t)||jh(e,t,n,i,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zh(e,t,i,r))?Hh(e,t,i,o,l,c,d):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Fh(e,t,i,r))};function zh(e,t,n,i){return i?!!(t==="innerHTML"||t==="textContent"||t in e&&nc.test(t)&&ot(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||nc.test(t)&&jt(n)?!1:t in e}const ur=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>xs(t,n):t};function Xh(e){e.target.composing=!0}function ic(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Hi={created(e,{modifiers:{lazy:t,trim:n,number:i}},r){e._assign=ur(r);const o=i||r.props&&r.props.type==="number";Ci(e,t?"change":"input",l=>{if(l.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Ls(c)),e._assign(c)}),n&&Ci(e,"change",()=>{e.value=e.value.trim()}),t||(Ci(e,"compositionstart",Xh),Ci(e,"compositionend",ic),Ci(e,"change",ic))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:i,number:r}},o){if(e._assign=ur(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||i&&e.value.trim()===t||(r||e.type==="number")&&Ls(e.value)===t))return;const l=t??"";e.value!==l&&(e.value=l)}},Yh={deep:!0,created(e,t,n){e._assign=ur(n),Ci(e,"change",()=>{const i=e._modelValue,r=$r(e),o=e.checked,l=e._assign;if(Ye(i)){const c=$o(i,r),d=c!==-1;if(o&&!d)l(i.concat(r));else if(!o&&d){const m=[...i];m.splice(c,1),l(m)}}else if(tr(i)){const c=new Set(i);o?c.add(r):c.delete(r),l(c)}else l(oc(e,o))})},mounted:rc,beforeUpdate(e,t,n){e._assign=ur(n),rc(e,t,n)}};function rc(e,{value:t,oldValue:n},i){e._modelValue=t,Ye(t)?e.checked=$o(t,i.props.value)>-1:tr(t)?e.checked=t.has(i.props.value):t!==n&&(e.checked=Ar(t,oc(e,!0)))}const jr={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const r=tr(t);Ci(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Ls($r(l)):$r(l));e._assign(e.multiple?r?new Set(o):o:o[0])}),e._assign=ur(i)},mounted(e,{value:t}){sc(e,t)},beforeUpdate(e,t,n){e._assign=ur(n)},updated(e,{value:t}){sc(e,t)}};function sc(e,t){const n=e.multiple;if(!(n&&!Ye(t)&&!tr(t))){for(let i=0,r=e.options.length;i<r;i++){const o=e.options[i],l=$r(o);if(n)Ye(t)?o.selected=$o(t,l)>-1:o.selected=t.has(l);else if(Ar($r(o),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function $r(e){return"_value"in e?e._value:e.value}function oc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Gh=["ctrl","shift","alt","meta"],Jh={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gh.some(n=>e[`${n}Key`]&&!t.includes(n))},ct=(e,t)=>(n,...i)=>{for(let r=0;r<t.length;r++){const o=Jh[t[r]];if(o&&o(n,t))return}return e(n,...i)},xt={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ur(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),Ur(e,!0),i.enter(e)):i.leave(e,()=>{Ur(e,!1)}):Ur(e,t))},beforeUnmount(e,{value:t}){Ur(e,t)}};function Ur(e,t){e.style.display=t?e._vod:"none"}const Zh=en({patchProp:Vh},Ph);let ac;function Qh(){return ac||(ac=fh(Zh))}const eg=(...e)=>{const t=Qh().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=tg(i);if(!r)return;const o=t._component;!ot(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const l=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t};function tg(e){return jt(e)?document.querySelector(e):e}/**!
|
||
* Sortable 1.15.0
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/function lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lc(Object(n),!0).forEach(function(i){ng(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ys(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ys=function(t){return typeof t}:Ys=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(e)}function ng(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oi(){return oi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oi.apply(this,arguments)}function ig(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function rg(e,t){if(e==null)return{};var n=ig(e,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var sg="1.15.0";function ai(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var li=ai(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Wr=ai(/Edge/i),uc=ai(/firefox/i),Kr=ai(/safari/i)&&!ai(/chrome/i)&&!ai(/android/i),cc=ai(/iP(ad|od|hone)/i),fc=ai(/chrome/i)&&ai(/android/i),dc={capture:!1,passive:!1};function vt(e,t,n){e.addEventListener(t,n,!li&&dc)}function ht(e,t,n){e.removeEventListener(t,n,!li&&dc)}function Gs(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function og(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Xn(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Gs(e,t):Gs(e,t))||i&&e===n)return e;if(e===n)break}while(e=og(e))}return null}var pc=/\s+/g;function mn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(pc," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(pc," ")}}function Ge(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function cr(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Ge(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function hc(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function Yn(){var e=document.scrollingElement;return e||document.documentElement}function Ut(e,t,n,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var o,l,c,d,m,g,w;if(e!==window&&e.parentNode&&e!==Yn()?(o=e.getBoundingClientRect(),l=o.top,c=o.left,d=o.bottom,m=o.right,g=o.height,w=o.width):(l=0,c=0,d=window.innerHeight,m=window.innerWidth,g=window.innerHeight,w=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!li))do if(r&&r.getBoundingClientRect&&(Ge(r,"transform")!=="none"||n&&Ge(r,"position")!=="static")){var T=r.getBoundingClientRect();l-=T.top+parseInt(Ge(r,"border-top-width")),c-=T.left+parseInt(Ge(r,"border-left-width")),d=l+o.height,m=c+o.width;break}while(r=r.parentNode);if(i&&e!==window){var H=cr(r||e),x=H&&H.a,I=H&&H.d;H&&(l/=I,c/=x,w/=x,g/=I,d=l+g,m=c+w)}return{top:l,left:c,bottom:d,right:m,width:w,height:g}}}function gc(e,t,n){for(var i=wi(e,!0),r=Ut(e)[t];i;){var o=Ut(i)[n],l=void 0;if(n==="top"||n==="left"?l=r>=o:l=r<=o,!l)return i;if(i===Yn())break;i=wi(i,!1)}return!1}function fr(e,t,n,i){for(var r=0,o=0,l=e.children;o<l.length;){if(l[o].style.display!=="none"&&l[o]!==Je.ghost&&(i||l[o]!==Je.dragged)&&Xn(l[o],n.draggable,e,!1)){if(r===t)return l[o];r++}o++}return null}function Ea(e,t){for(var n=e.lastElementChild;n&&(n===Je.ghost||Ge(n,"display")==="none"||t&&!Gs(n,t));)n=n.previousElementSibling;return n||null}function Sn(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Je.clone&&(!t||Gs(e,t))&&n++;return n}function mc(e){var t=0,n=0,i=Yn();if(e)do{var r=cr(e),o=r.a,l=r.d;t+=e.scrollLeft*o,n+=e.scrollTop*l}while(e!==i&&(e=e.parentNode));return[t,n]}function ag(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function wi(e,t){if(!e||!e.getBoundingClientRect)return Yn();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=Ge(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Yn();if(i||t)return n;i=!0}}while(n=n.parentNode);return Yn()}function lg(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function ka(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var qr;function vc(e,t){return function(){if(!qr){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),qr=setTimeout(function(){qr=void 0},t)}}}function ug(){clearTimeout(qr),qr=void 0}function yc(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function bc(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var vn="Sortable"+new Date().getTime();function cg(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(Ge(r,"display")==="none"||r===Je.ghost)){e.push({target:r,rect:Ut(r)});var o=zn({},e[e.length-1].rect);if(r.thisAnimationDuration){var l=cr(r,!0);l&&(o.top-=l.f,o.left-=l.e)}r.fromRect=o}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(ag(e,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var o=!1,l=0;e.forEach(function(c){var d=0,m=c.target,g=m.fromRect,w=Ut(m),T=m.prevFromRect,H=m.prevToRect,x=c.rect,I=cr(m,!0);I&&(w.top-=I.f,w.left-=I.e),m.toRect=w,m.thisAnimationDuration&&ka(T,w)&&!ka(g,w)&&(x.top-w.top)/(x.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(d=dg(x,T,H,r.options)),ka(w,g)||(m.prevFromRect=g,m.prevToRect=w,d||(d=r.options.animation),r.animate(m,x,w,d)),d&&(o=!0,l=Math.max(l,d),clearTimeout(m.animationResetTimer),m.animationResetTimer=setTimeout(function(){m.animationTime=0,m.prevFromRect=null,m.fromRect=null,m.prevToRect=null,m.thisAnimationDuration=null},d),m.thisAnimationDuration=d)}),clearTimeout(t),o?t=setTimeout(function(){typeof i=="function"&&i()},l):typeof i=="function"&&i(),e=[]},animate:function(i,r,o,l){if(l){Ge(i,"transition",""),Ge(i,"transform","");var c=cr(this.el),d=c&&c.a,m=c&&c.d,g=(r.left-o.left)/(d||1),w=(r.top-o.top)/(m||1);i.animatingX=!!g,i.animatingY=!!w,Ge(i,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=fg(i),Ge(i,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),Ge(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Ge(i,"transition",""),Ge(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},l)}}}}function fg(e){return e.offsetWidth}function dg(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var dr=[],Sa={initializeByDefault:!0},Vr={mount:function(t){for(var n in Sa)Sa.hasOwnProperty(n)&&!(n in t)&&(t[n]=Sa[n]);dr.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),dr.push(t)},pluginEvent:function(t,n,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var o=t+"Global";dr.forEach(function(l){n[l.pluginName]&&(n[l.pluginName][o]&&n[l.pluginName][o](zn({sortable:n},i)),n.options[l.pluginName]&&n[l.pluginName][t]&&n[l.pluginName][t](zn({sortable:n},i)))})},initializePlugins:function(t,n,i,r){dr.forEach(function(c){var d=c.pluginName;if(!(!t.options[d]&&!c.initializeByDefault)){var m=new c(t,n,t.options);m.sortable=t,m.options=t.options,t[d]=m,oi(i,m.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var l=this.modifyOption(t,o,t.options[o]);typeof l<"u"&&(t.options[o]=l)}},getEventProperties:function(t,n){var i={};return dr.forEach(function(r){typeof r.eventProperties=="function"&&oi(i,r.eventProperties.call(n[r.pluginName],t))}),i},modifyOption:function(t,n,i){var r;return dr.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[n]=="function"&&(r=o.optionListeners[n].call(t[o.pluginName],i))}),r}};function pg(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,o=e.cloneEl,l=e.toEl,c=e.fromEl,d=e.oldIndex,m=e.newIndex,g=e.oldDraggableIndex,w=e.newDraggableIndex,T=e.originalEvent,H=e.putSortable,x=e.extraEventProperties;if(t=t||n&&n[vn],!!t){var I,V=t.options,N="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!li&&!Wr?I=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(I=document.createEvent("Event"),I.initEvent(i,!0,!0)),I.to=l||n,I.from=c||n,I.item=r||n,I.clone=o,I.oldIndex=d,I.newIndex=m,I.oldDraggableIndex=g,I.newDraggableIndex=w,I.originalEvent=T,I.pullMode=H?H.lastPutMode:void 0;var te=zn(zn({},x),Vr.getEventProperties(i,t));for(var ye in te)I[ye]=te[ye];n&&n.dispatchEvent(I),V[N]&&V[N].call(t,I)}}var hg=["evt"],ln=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=rg(i,hg);Vr.pluginEvent.bind(Je)(t,n,zn({dragEl:_e,parentEl:Mt,ghostEl:st,rootEl:Ot,nextEl:Bi,lastDownEl:Js,cloneEl:Nt,cloneHidden:_i,dragStarted:Xr,putSortable:Xt,activeSortable:Je.active,originalEvent:r,oldIndex:pr,oldDraggableIndex:zr,newIndex:yn,newDraggableIndex:Ti,hideGhostForTarget:Sc,unhideGhostForTarget:xc,cloneNowHidden:function(){_i=!0},cloneNowShown:function(){_i=!1},dispatchSortableEvent:function(c){rn({sortable:n,name:c,originalEvent:r})}},o))};function rn(e){pg(zn({putSortable:Xt,cloneEl:Nt,targetEl:_e,rootEl:Ot,oldIndex:pr,oldDraggableIndex:zr,newIndex:yn,newDraggableIndex:Ti},e))}var _e,Mt,st,Ot,Bi,Js,Nt,_i,pr,yn,zr,Ti,Zs,Xt,hr=!1,Qs=!1,eo=[],ji,Hn,xa,Aa,Cc,wc,Xr,gr,Yr,Gr=!1,to=!1,no,Zt,La=[],Oa=!1,io=[],ro=typeof document<"u",so=cc,_c=Wr||li?"cssFloat":"float",gg=ro&&!fc&&!cc&&"draggable"in document.createElement("div"),Tc=function(){if(ro){if(li)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Ec=function(t,n){var i=Ge(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=fr(t,0,n),l=fr(t,1,n),c=o&&Ge(o),d=l&&Ge(l),m=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Ut(o).width,g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Ut(l).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&c.float&&c.float!=="none"){var w=c.float==="left"?"left":"right";return l&&(d.clear==="both"||d.clear===w)?"vertical":"horizontal"}return o&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||m>=r&&i[_c]==="none"||l&&i[_c]==="none"&&m+g>r)?"vertical":"horizontal"},mg=function(t,n,i){var r=i?t.left:t.top,o=i?t.right:t.bottom,l=i?t.width:t.height,c=i?n.left:n.top,d=i?n.right:n.bottom,m=i?n.width:n.height;return r===c||o===d||r+l/2===c+m/2},vg=function(t,n){var i;return eo.some(function(r){var o=r[vn].options.emptyInsertThreshold;if(!(!o||Ea(r))){var l=Ut(r),c=t>=l.left-o&&t<=l.right+o,d=n>=l.top-o&&n<=l.bottom+o;if(c&&d)return i=r}}),i},kc=function(t){function n(o,l){return function(c,d,m,g){var w=c.options.group.name&&d.options.group.name&&c.options.group.name===d.options.group.name;if(o==null&&(l||w))return!0;if(o==null||o===!1)return!1;if(l&&o==="clone")return o;if(typeof o=="function")return n(o(c,d,m,g),l)(c,d,m,g);var T=(l?c:d).options.group.name;return o===!0||typeof o=="string"&&o===T||o.join&&o.indexOf(T)>-1}}var i={},r=t.group;(!r||Ys(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=n(r.pull,!0),i.checkPut=n(r.put),i.revertClone=r.revertClone,t.group=i},Sc=function(){!Tc&&st&&Ge(st,"display","none")},xc=function(){!Tc&&st&&Ge(st,"display","")};ro&&!fc&&document.addEventListener("click",function(e){if(Qs)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Qs=!1,!1},!0);var $i=function(t){if(_e){t=t.touches?t.touches[0]:t;var n=vg(t.clientX,t.clientY);if(n){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[vn]._onDragOver(i)}}},yg=function(t){_e&&_e.parentNode[vn]._isOutsideThisEl(t.target)};function Je(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=oi({},t),e[vn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ec(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,c){l.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Je.supportPointer!==!1&&"PointerEvent"in window&&!Kr,emptyInsertThreshold:5};Vr.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);kc(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:gg,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?vt(e,"pointerdown",this._onTapStart):(vt(e,"mousedown",this._onTapStart),vt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(vt(e,"dragover",this),vt(e,"dragenter",this)),eo.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),oi(this,cg())}Je.prototype={constructor:Je,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(gr=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,_e):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,r=this.options,o=r.preventOnFilter,l=t.type,c=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,d=(c||t).target,m=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||d,g=r.filter;if(Sg(i),!_e&&!(/mousedown|pointerdown/.test(l)&&t.button!==0||r.disabled)&&!m.isContentEditable&&!(!this.nativeDraggable&&Kr&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=Xn(d,r.draggable,i,!1),!(d&&d.animated)&&Js!==d)){if(pr=Sn(d),zr=Sn(d,r.draggable),typeof g=="function"){if(g.call(this,t,d,this)){rn({sortable:n,rootEl:m,name:"filter",targetEl:d,toEl:i,fromEl:i}),ln("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=Xn(m,w.trim(),i,!1),w)return rn({sortable:n,rootEl:w,name:"filter",targetEl:d,fromEl:i,toEl:i}),ln("filter",n,{evt:t}),!0}),g)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!Xn(m,r.handle,i,!1)||this._prepareDragStart(t,c,d)}}},_prepareDragStart:function(t,n,i){var r=this,o=r.el,l=r.options,c=o.ownerDocument,d;if(i&&!_e&&i.parentNode===o){var m=Ut(i);if(Ot=o,_e=i,Mt=_e.parentNode,Bi=_e.nextSibling,Js=i,Zs=l.group,Je.dragged=_e,ji={target:_e,clientX:(n||t).clientX,clientY:(n||t).clientY},Cc=ji.clientX-m.left,wc=ji.clientY-m.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,_e.style["will-change"]="all",d=function(){if(ln("delayEnded",r,{evt:t}),Je.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!uc&&r.nativeDraggable&&(_e.draggable=!0),r._triggerDragStart(t,n),rn({sortable:r,name:"choose",originalEvent:t}),mn(_e,l.chosenClass,!0)},l.ignore.split(",").forEach(function(g){hc(_e,g.trim(),Da)}),vt(c,"dragover",$i),vt(c,"mousemove",$i),vt(c,"touchmove",$i),vt(c,"mouseup",r._onDrop),vt(c,"touchend",r._onDrop),vt(c,"touchcancel",r._onDrop),uc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,_e.draggable=!0),ln("delayStart",this,{evt:t}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Wr||li))){if(Je.eventCanceled){this._onDrop();return}vt(c,"mouseup",r._disableDelayedDrag),vt(c,"touchend",r._disableDelayedDrag),vt(c,"touchcancel",r._disableDelayedDrag),vt(c,"mousemove",r._delayedDragTouchMoveHandler),vt(c,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&vt(c,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,l.delay)}else d()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){_e&&Da(_e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ht(t,"mouseup",this._disableDelayedDrag),ht(t,"touchend",this._disableDelayedDrag),ht(t,"touchcancel",this._disableDelayedDrag),ht(t,"mousemove",this._delayedDragTouchMoveHandler),ht(t,"touchmove",this._delayedDragTouchMoveHandler),ht(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?vt(document,"pointermove",this._onTouchMove):n?vt(document,"touchmove",this._onTouchMove):vt(document,"mousemove",this._onTouchMove):(vt(_e,"dragend",this),vt(Ot,"dragstart",this._onDragStart));try{document.selection?ao(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(hr=!1,Ot&&_e){ln("dragStarted",this,{evt:n}),this.nativeDraggable&&vt(document,"dragover",yg);var i=this.options;!t&&mn(_e,i.dragClass,!1),mn(_e,i.ghostClass,!0),Je.active=this,t&&this._appendGhost(),rn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Hn){this._lastX=Hn.clientX,this._lastY=Hn.clientY,Sc();for(var t=document.elementFromPoint(Hn.clientX,Hn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Hn.clientX,Hn.clientY),t!==n);)n=t;if(_e.parentNode[vn]._isOutsideThisEl(t),n)do{if(n[vn]){var i=void 0;if(i=n[vn]._onDragOver({clientX:Hn.clientX,clientY:Hn.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);xc()}},_onTouchMove:function(t){if(ji){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,l=st&&cr(st,!0),c=st&&l&&l.a,d=st&&l&&l.d,m=so&&Zt&&mc(Zt),g=(o.clientX-ji.clientX+r.x)/(c||1)+(m?m[0]-La[0]:0)/(c||1),w=(o.clientY-ji.clientY+r.y)/(d||1)+(m?m[1]-La[1]:0)/(d||1);if(!Je.active&&!hr){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(st){l?(l.e+=g-(xa||0),l.f+=w-(Aa||0)):l={a:1,b:0,c:0,d:1,e:g,f:w};var T="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");Ge(st,"webkitTransform",T),Ge(st,"mozTransform",T),Ge(st,"msTransform",T),Ge(st,"transform",T),xa=g,Aa=w,Hn=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!st){var t=this.options.fallbackOnBody?document.body:Ot,n=Ut(_e,!0,so,!0,t),i=this.options;if(so){for(Zt=t;Ge(Zt,"position")==="static"&&Ge(Zt,"transform")==="none"&&Zt!==document;)Zt=Zt.parentNode;Zt!==document.body&&Zt!==document.documentElement?(Zt===document&&(Zt=Yn()),n.top+=Zt.scrollTop,n.left+=Zt.scrollLeft):Zt=Yn(),La=mc(Zt)}st=_e.cloneNode(!0),mn(st,i.ghostClass,!1),mn(st,i.fallbackClass,!0),mn(st,i.dragClass,!0),Ge(st,"transition",""),Ge(st,"transform",""),Ge(st,"box-sizing","border-box"),Ge(st,"margin",0),Ge(st,"top",n.top),Ge(st,"left",n.left),Ge(st,"width",n.width),Ge(st,"height",n.height),Ge(st,"opacity","0.8"),Ge(st,"position",so?"absolute":"fixed"),Ge(st,"zIndex","100000"),Ge(st,"pointerEvents","none"),Je.ghost=st,t.appendChild(st),Ge(st,"transform-origin",Cc/parseInt(st.style.width)*100+"% "+wc/parseInt(st.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,r=t.dataTransfer,o=i.options;if(ln("dragStart",this,{evt:t}),Je.eventCanceled){this._onDrop();return}ln("setupClone",this),Je.eventCanceled||(Nt=bc(_e),Nt.removeAttribute("id"),Nt.draggable=!1,Nt.style["will-change"]="",this._hideClone(),mn(Nt,this.options.chosenClass,!1),Je.clone=Nt),i.cloneId=ao(function(){ln("clone",i),!Je.eventCanceled&&(i.options.removeCloneOnHide||Ot.insertBefore(Nt,_e),i._hideClone(),rn({sortable:i,name:"clone"}))}),!n&&mn(_e,o.dragClass,!0),n?(Qs=!0,i._loopId=setInterval(i._emulateDragOver,50)):(ht(document,"mouseup",i._onDrop),ht(document,"touchend",i._onDrop),ht(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,_e)),vt(document,"drop",i),Ge(_e,"transform","translateZ(0)")),hr=!0,i._dragStartId=ao(i._dragStarted.bind(i,n,t)),vt(document,"selectstart",i),Xr=!0,Kr&&Ge(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,r,o,l,c=this.options,d=c.group,m=Je.active,g=Zs===d,w=c.sort,T=Xt||m,H,x=this,I=!1;if(Oa)return;function V(ge,Ee){ln(ge,x,zn({evt:t,isOwner:g,axis:H?"vertical":"horizontal",revert:l,dragRect:r,targetRect:o,canSort:w,fromSortable:T,target:i,completed:te,onMove:function(Ve,G){return oo(Ot,n,_e,r,Ve,Ut(Ve),t,G)},changed:ye},Ee))}function N(){V("dragOverAnimationCapture"),x.captureAnimationState(),x!==T&&T.captureAnimationState()}function te(ge){return V("dragOverCompleted",{insertion:ge}),ge&&(g?m._hideClone():m._showClone(x),x!==T&&(mn(_e,Xt?Xt.options.ghostClass:m.options.ghostClass,!1),mn(_e,c.ghostClass,!0)),Xt!==x&&x!==Je.active?Xt=x:x===Je.active&&Xt&&(Xt=null),T===x&&(x._ignoreWhileAnimating=i),x.animateAll(function(){V("dragOverAnimationComplete"),x._ignoreWhileAnimating=null}),x!==T&&(T.animateAll(),T._ignoreWhileAnimating=null)),(i===_e&&!_e.animated||i===n&&!i.animated)&&(gr=null),!c.dragoverBubble&&!t.rootEl&&i!==document&&(_e.parentNode[vn]._isOutsideThisEl(t.target),!ge&&$i(t)),!c.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),I=!0}function ye(){yn=Sn(_e),Ti=Sn(_e,c.draggable),rn({sortable:x,name:"change",toEl:n,newIndex:yn,newDraggableIndex:Ti,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=Xn(i,c.draggable,n,!0),V("dragOver"),Je.eventCanceled)return I;if(_e.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||x._ignoreWhileAnimating===i)return te(!1);if(Qs=!1,m&&!c.disabled&&(g?w||(l=Mt!==Ot):Xt===this||(this.lastPutMode=Zs.checkPull(this,m,_e,t))&&d.checkPut(this,m,_e,t))){if(H=this._getDirection(t,i)==="vertical",r=Ut(_e),V("dragOverValid"),Je.eventCanceled)return I;if(l)return Mt=Ot,N(),this._hideClone(),V("revert"),Je.eventCanceled||(Bi?Ot.insertBefore(_e,Bi):Ot.appendChild(_e)),te(!0);var D=Ea(n,c.draggable);if(!D||_g(t,H,this)&&!D.animated){if(D===_e)return te(!1);if(D&&n===t.target&&(i=D),i&&(o=Ut(i)),oo(Ot,n,_e,r,i,o,t,!!i)!==!1)return N(),D&&D.nextSibling?n.insertBefore(_e,D.nextSibling):n.appendChild(_e),Mt=n,ye(),te(!0)}else if(D&&wg(t,H,this)){var Fe=fr(n,0,c,!0);if(Fe===_e)return te(!1);if(i=Fe,o=Ut(i),oo(Ot,n,_e,r,i,o,t,!1)!==!1)return N(),n.insertBefore(_e,Fe),Mt=n,ye(),te(!0)}else if(i.parentNode===n){o=Ut(i);var p=0,Ae,R=_e.parentNode!==n,E=!mg(_e.animated&&_e.toRect||r,i.animated&&i.toRect||o,H),P=H?"top":"left",Z=gc(i,"top","top")||gc(_e,"top","top"),re=Z?Z.scrollTop:void 0;gr!==i&&(Ae=o[P],Gr=!1,to=!E&&c.invertSwap||R),p=Tg(t,i,o,H,E?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,to,gr===i);var se;if(p!==0){var Me=Sn(_e);do Me-=p,se=Mt.children[Me];while(se&&(Ge(se,"display")==="none"||se===st))}if(p===0||se===i)return te(!1);gr=i,Yr=p;var Ze=i.nextElementSibling,Ne=!1;Ne=p===1;var oe=oo(Ot,n,_e,r,i,o,t,Ne);if(oe!==!1)return(oe===1||oe===-1)&&(Ne=oe===1),Oa=!0,setTimeout(Cg,30),N(),Ne&&!Ze?n.appendChild(_e):i.parentNode.insertBefore(_e,Ne?Ze:i),Z&&yc(Z,0,re-Z.scrollTop),Mt=_e.parentNode,Ae!==void 0&&!to&&(no=Math.abs(Ae-Ut(i)[P])),ye(),te(!0)}if(n.contains(_e))return te(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ht(document,"mousemove",this._onTouchMove),ht(document,"touchmove",this._onTouchMove),ht(document,"pointermove",this._onTouchMove),ht(document,"dragover",$i),ht(document,"mousemove",$i),ht(document,"touchmove",$i)},_offUpEvents:function(){var t=this.el.ownerDocument;ht(t,"mouseup",this._onDrop),ht(t,"touchend",this._onDrop),ht(t,"pointerup",this._onDrop),ht(t,"touchcancel",this._onDrop),ht(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(yn=Sn(_e),Ti=Sn(_e,i.draggable),ln("drop",this,{evt:t}),Mt=_e&&_e.parentNode,yn=Sn(_e),Ti=Sn(_e,i.draggable),Je.eventCanceled){this._nulling();return}hr=!1,to=!1,Gr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ia(this.cloneId),Ia(this._dragStartId),this.nativeDraggable&&(ht(document,"drop",this),ht(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Kr&&Ge(document.body,"user-select",""),Ge(_e,"transform",""),t&&(Xr&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),st&&st.parentNode&&st.parentNode.removeChild(st),(Ot===Mt||Xt&&Xt.lastPutMode!=="clone")&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),_e&&(this.nativeDraggable&&ht(_e,"dragend",this),Da(_e),_e.style["will-change"]="",Xr&&!hr&&mn(_e,Xt?Xt.options.ghostClass:this.options.ghostClass,!1),mn(_e,this.options.chosenClass,!1),rn({sortable:this,name:"unchoose",toEl:Mt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ot!==Mt?(yn>=0&&(rn({rootEl:Mt,name:"add",toEl:Mt,fromEl:Ot,originalEvent:t}),rn({sortable:this,name:"remove",toEl:Mt,originalEvent:t}),rn({rootEl:Mt,name:"sort",toEl:Mt,fromEl:Ot,originalEvent:t}),rn({sortable:this,name:"sort",toEl:Mt,originalEvent:t})),Xt&&Xt.save()):yn!==pr&&yn>=0&&(rn({sortable:this,name:"update",toEl:Mt,originalEvent:t}),rn({sortable:this,name:"sort",toEl:Mt,originalEvent:t})),Je.active&&((yn==null||yn===-1)&&(yn=pr,Ti=zr),rn({sortable:this,name:"end",toEl:Mt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ln("nulling",this),Ot=_e=Mt=st=Bi=Nt=Js=_i=ji=Hn=Xr=yn=Ti=pr=zr=gr=Yr=Xt=Zs=Je.dragged=Je.ghost=Je.clone=Je.active=null,io.forEach(function(t){t.checked=!0}),io.length=xa=Aa=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":_e&&(this._onDragOver(t),bg(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,r=0,o=i.length,l=this.options;r<o;r++)n=i[r],Xn(n,l.draggable,this.el,!1)&&t.push(n.getAttribute(l.dataIdAttr)||kg(n));return t},sort:function(t,n){var i={},r=this.el;this.toArray().forEach(function(o,l){var c=r.children[l];Xn(c,this.options.draggable,r,!1)&&(i[o]=c)},this),n&&this.captureAnimationState(),t.forEach(function(o){i[o]&&(r.removeChild(i[o]),r.appendChild(i[o]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return Xn(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var r=Vr.modifyOption(this,t,n);typeof r<"u"?i[t]=r:i[t]=n,t==="group"&&kc(i)},destroy:function(){ln("destroy",this);var t=this.el;t[vn]=null,ht(t,"mousedown",this._onTapStart),ht(t,"touchstart",this._onTapStart),ht(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ht(t,"dragover",this),ht(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),eo.splice(eo.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_i){if(ln("hideClone",this),Je.eventCanceled)return;Ge(Nt,"display","none"),this.options.removeCloneOnHide&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),_i=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_i){if(ln("showClone",this),Je.eventCanceled)return;_e.parentNode==Ot&&!this.options.group.revertClone?Ot.insertBefore(Nt,_e):Bi?Ot.insertBefore(Nt,Bi):Ot.appendChild(Nt),this.options.group.revertClone&&this.animate(_e,Nt),Ge(Nt,"display",""),_i=!1}}};function bg(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function oo(e,t,n,i,r,o,l,c){var d,m=e[vn],g=m.options.onMove,w;return window.CustomEvent&&!li&&!Wr?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=t,d.from=e,d.dragged=n,d.draggedRect=i,d.related=r||t,d.relatedRect=o||Ut(t),d.willInsertAfter=c,d.originalEvent=l,e.dispatchEvent(d),g&&(w=g.call(m,d,l)),w}function Da(e){e.draggable=!1}function Cg(){Oa=!1}function wg(e,t,n){var i=Ut(fr(n.el,0,n.options,!0)),r=10;return t?e.clientX<i.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-r||e.clientY<i.bottom&&e.clientX<i.left}function _g(e,t,n){var i=Ut(Ea(n.el,n.options.draggable)),r=10;return t?e.clientX>i.right+r||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+r}function Tg(e,t,n,i,r,o,l,c){var d=i?e.clientY:e.clientX,m=i?n.height:n.width,g=i?n.top:n.left,w=i?n.bottom:n.right,T=!1;if(!l){if(c&&no<m*r){if(!Gr&&(Yr===1?d>g+m*o/2:d<w-m*o/2)&&(Gr=!0),Gr)T=!0;else if(Yr===1?d<g+no:d>w-no)return-Yr}else if(d>g+m*(1-r)/2&&d<w-m*(1-r)/2)return Eg(t)}return T=T||l,T&&(d<g+m*o/2||d>w-m*o/2)?d>g+m/2?1:-1:0}function Eg(e){return Sn(_e)<Sn(e)?1:-1}function kg(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Sg(e){io.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&io.push(i)}}function ao(e){return setTimeout(e,0)}function Ia(e){return clearTimeout(e)}ro&&vt(document,"touchmove",function(e){(Je.active||hr)&&e.cancelable&&e.preventDefault()}),Je.utils={on:vt,off:ht,css:Ge,find:hc,is:function(t,n){return!!Xn(t,n,t,!1)},extend:lg,throttle:vc,closest:Xn,toggleClass:mn,clone:bc,index:Sn,nextTick:ao,cancelNextTick:Ia,detectDirection:Ec,getChild:fr},Je.get=function(e){return e[vn]},Je.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Je.utils=zn(zn({},Je.utils),i.utils)),Vr.mount(i)})},Je.create=function(e,t){return new Je(e,t)},Je.version=sg;var Ht=[],Jr,Pa,Na=!1,Ra,Ma,lo,Zr;function xg(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?vt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?vt(document,"pointermove",this._handleFallbackAutoScroll):i.touches?vt(document,"touchmove",this._handleFallbackAutoScroll):vt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?ht(document,"dragover",this._handleAutoScroll):(ht(document,"pointermove",this._handleFallbackAutoScroll),ht(document,"touchmove",this._handleFallbackAutoScroll),ht(document,"mousemove",this._handleFallbackAutoScroll)),Ac(),uo(),ug()},nulling:function(){lo=Pa=Jr=Na=Zr=Ra=Ma=null,Ht.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var r=this,o=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,c=document.elementFromPoint(o,l);if(lo=n,i||this.options.forceAutoScrollFallback||Wr||li||Kr){Fa(n,this.options,c,i);var d=wi(c,!0);Na&&(!Zr||o!==Ra||l!==Ma)&&(Zr&&Ac(),Zr=setInterval(function(){var m=wi(document.elementFromPoint(o,l),!0);m!==d&&(d=m,uo()),Fa(n,r.options,m,i)},10),Ra=o,Ma=l)}else{if(!this.options.bubbleScroll||wi(c,!0)===Yn()){uo();return}Fa(n,this.options,wi(c,!1),!1)}}},oi(e,{pluginName:"scroll",initializeByDefault:!0})}function uo(){Ht.forEach(function(e){clearInterval(e.pid)}),Ht=[]}function Ac(){clearInterval(Zr)}var Fa=vc(function(e,t,n,i){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,c=t.scrollSpeed,d=Yn(),m=!1,g;Pa!==n&&(Pa=n,uo(),Jr=t.scroll,g=t.scrollFn,Jr===!0&&(Jr=wi(n,!0)));var w=0,T=Jr;do{var H=T,x=Ut(H),I=x.top,V=x.bottom,N=x.left,te=x.right,ye=x.width,D=x.height,Fe=void 0,p=void 0,Ae=H.scrollWidth,R=H.scrollHeight,E=Ge(H),P=H.scrollLeft,Z=H.scrollTop;H===d?(Fe=ye<Ae&&(E.overflowX==="auto"||E.overflowX==="scroll"||E.overflowX==="visible"),p=D<R&&(E.overflowY==="auto"||E.overflowY==="scroll"||E.overflowY==="visible")):(Fe=ye<Ae&&(E.overflowX==="auto"||E.overflowX==="scroll"),p=D<R&&(E.overflowY==="auto"||E.overflowY==="scroll"));var re=Fe&&(Math.abs(te-r)<=l&&P+ye<Ae)-(Math.abs(N-r)<=l&&!!P),se=p&&(Math.abs(V-o)<=l&&Z+D<R)-(Math.abs(I-o)<=l&&!!Z);if(!Ht[w])for(var Me=0;Me<=w;Me++)Ht[Me]||(Ht[Me]={});(Ht[w].vx!=re||Ht[w].vy!=se||Ht[w].el!==H)&&(Ht[w].el=H,Ht[w].vx=re,Ht[w].vy=se,clearInterval(Ht[w].pid),(re!=0||se!=0)&&(m=!0,Ht[w].pid=setInterval(function(){i&&this.layer===0&&Je.active._onTouchMove(lo);var Ze=Ht[this.layer].vy?Ht[this.layer].vy*c:0,Ne=Ht[this.layer].vx?Ht[this.layer].vx*c:0;typeof g=="function"&&g.call(Je.dragged.parentNode[vn],Ne,Ze,e,lo,Ht[this.layer].el)!=="continue"||yc(Ht[this.layer].el,Ne,Ze)}.bind({layer:w}),24))),w++}while(t.bubbleScroll&&T!==d&&(T=wi(T,!1)));Na=m}},30),Lc=function(t){var n=t.originalEvent,i=t.putSortable,r=t.dragEl,o=t.activeSortable,l=t.dispatchSortableEvent,c=t.hideGhostForTarget,d=t.unhideGhostForTarget;if(n){var m=i||o;c();var g=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,w=document.elementFromPoint(g.clientX,g.clientY);d(),m&&!m.el.contains(w)&&(l("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Ha(){}Ha.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=fr(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(n,r):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:Lc},oi(Ha,{pluginName:"revertOnSpill"});function Ba(){}Ba.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),r.animateAll()},drop:Lc},oi(Ba,{pluginName:"removeOnSpill"}),Je.mount(new xg),Je.mount(Ba,Ha);const Ag=e=>{if(e==null||e===!1||e===""||e.trim()==="")return[];e=e.replace(/,/g,","),e=e.replace(/。/g,","),e=e.replace(/、/g,","),e=e.replace(/;/g,","),e=e.replace(/./g,","),e=e.replace(/\t/g,`
|
||
`),e=e.replace(/\r/g,`
|
||
`),e=e.replace(/\n+/g,`
|
||
`);const t={"(":")","[":"]","<":">","{":"}"},n=Object.keys(t);let i=e.length,r="",o="",l="",c=0,d=[];for(let m=0;m<i;m++){const g=e[m];g===`
|
||
`?o===""?(r.trim()!==""&&d.push(r.trim()),d.push(`
|
||
`),c=0,o="",l="",r=""):r+=" ":g===","?o===""?(d.push(r.trim()),c=0,o="",l="",r=""):r+=g:o===""?n.includes(g)?(c=1,o=g,l=t[g],r+=g):g===" "&&r.trim()==="BREAK"?(d.push(r.trim()),c=0,o="",l="",r=""):(r+=g,r.endsWith(" BREAK")&&(r=r.substring(0,r.length-6),d.push(r.trim()),d.push("BREAK"),c=0,o="",l="",r="")):g===l?(c--,c===0&&(o="",l=""),r+=g):(g===o&&c++,r+=g)}return r!==""&&d.push(r.trim()),d},co={name:"Physton/sd-webui-prompt-all-in-one",shortName:"sd-webui-prompt-all-in-one",github:"https://github.com/Physton/sd-webui-prompt-all-in-one",nameAssets:"Physton/sd-webui-prompt-all-in-one-assets",shortNameAssets:"sd-webui-prompt-all-in-one-assets",githubAssets:"https://github.com/Physton/sd-webui-prompt-all-in-one-assets",gitee:"https://gitee.com/Physton/sd-webui-prompt-all-in-one",docs:"https://aiodoc.physton.com",nameTagComplete:"DominikDoom/a1111-sd-webui-tagcomplete",shortNameTagComplete:"a1111-sd-webui-tagcomplete",githubTagComplete:"https://github.com/DominikDoom/a1111-sd-webui-tagcomplete"},he={loraRegex:/^\<lora:\s*([^\:]+)\s*(:)?\s*([0-9\.]+)?\>$/,lycoRegex:/^\<lyco:\s*([^\:]+)\s*(:)?\s*([0-9\.]+)?\>$/,weightNumRegex:/(.*):([0-9\.]+)/,weightNumRegexEN:/(.*):\s*([0-9\.]+)/,weightNumRegexCN:/(.*):\s*([0-9\.]+)/,bracketsEN:[{"(":"(",")":")"},{"[":"[","]":"]"},{"{":"{","}":"}"},{"<":"<",">":">"}],bracketsCN:[{"(":"(",")":")"},{"【":"[","】":"]"},{"《":"<","》":">"},{"「":"{","」":"}"},{"『":"{","』":"}"},{"〈":"<","〉":">"},{"﹝":"(","﹞":")"},{"﹛":"{","﹜":"}"},{"﹙":"(","﹚":")"}],replaceTag(e){return typeof e!="string"||e===""||(e=this.replaceBrackets(e),this.weightNumRegexEN.test(e)&&(e=e.replace(this.weightNumRegexEN,"$1:$2")),this.weightNumRegexCN.test(e)&&(e=e.replace(this.weightNumRegexCN,"$1:$2"))),e},replaceBrackets(e){const t=e.length;if(t===0)return e;let n={};this.bracketsCN.forEach(o=>{for(const l in o)n[l]=o[l]});let i=e[0],r=e[t-1];return typeof n[i]<"u"&&(e=n[i]+e.substring(1)),typeof n[r]<"u"&&(e=e.substring(0,t-1)+n[r]),e},hasBrackets(e){const t=e.length;if(t===0)return!1;let n=[];this.bracketsEN.forEach(o=>{let l=[];for(const c in o)l.push(c);n.push(l)}),this.bracketsCN.forEach(o=>{let l=[];for(const c in o)l.push(c);n.push(l)});let i=e[0],r=e[t-1];for(const o of n)if(o[0]===i&&o[1]===r)return o;return!1},splitTag(e){let t={left:"",value:"",right:""},n=e.match(/^([\(\<\{\[]+)(.*)$/);return!n||(t.left=n[1],e=n[2],n=e.match(/((\:[0-9\.]+)?[\)\>\}\]]+)$/),!n)?(t.value=e,t):(t.right=n[1],e=e.substring(0,e.length-t.right.length),t.value=e,t)},splitTags(e){return Ag(e)},canTranslate(e){return!(e.trim()===""||e[0]==="<"&&e[e.length-1]===">"||/^[0-9`~!@#$%^&*()_+\-=\[\]{}\\|;:'",.\/<>?]+$/.test(e)||/^[a-zA-Z]$/.test(e))},isEnglish(e){const t=e.length;if(e[0]==="<"&&e[t-1]===">")return!0;for(let n=0;n<t;n++)if(e.charCodeAt(n)>127)return!1;return!0},canOneTranslate(e){const t=["zh_CN","zh_HK","zh_TW","ar_SA","ja_JP","ko_KR","ru_RU"];return t.push("am_ET","hy_AM","as_IN","bn_BD","ba_RU","bg_BG","prs_AF","dv_MV","el_GR","gu_IN","he_IL","hi_IN","iu_CA","kn_IN","kk_KZ","km_KH","ku_Arab_IQ","ky_KG","lo_LA","mk_MK","ml_IN","mr_IN","mn_Cyrl_MN","mn_Mong_CN","my_MM","ne_NP","or_IN","ps_AF","fa_IR","pa_Guru_IN","sr_Cyrl_RS","ta_IN","tt_Latn_RU","te_IN","th_TH","bo_CN","ti_ET","uk_UA","ur_PK","ug_Arab_CN","vi_VN"),!!t.includes(e)},isEnglishByLangCode(e,t){if(!this.canOneTranslate(t))return-1;const n=e.length;for(let i=0;i<n;i++)if(e.charCodeAt(i)>127)return 0;return 1},isSameLang(e,t){if(e===t)return!0;let n=e.toLowerCase(),i=t.toLowerCase();return n===i||(e=e.replace("-","_"),t=t.replace("-","_"),e===t)||(e=e.split("_")[0],t=t.split("_")[0],e===t)},getLang(e,t,n){return n[t]&&n[t].lang&&n[t].lang[e]?this.replaceGlobals(n[t].lang[e],t):n.en_US&&n.en_US.lang&&n.en_US.lang[e]?this.replaceGlobals(n.en_US.lang[e],"en_US"):this.replaceGlobals(e,t)},replaceGlobals(e,t){for(let n in co){let i=co[n];if(n==="docs")switch(t){case"zh_CN":i+="/zh-CN";break;case"zh_HK":case"zh_TW":i+="/zh-TW";break;case"ru_RU":i+="/ru";break}e=e.replace(new RegExp(`{{${n}}}`,"g"),i)}return e},escapeHtml(e){return e.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]||t)},unescapeHtml(e){return e.replace(/&|<|>|'|"/g,t=>({"&":"&","<":"<",">":">","'":"'",""":'"'})[t]||t)},getTagWeightNum(e){const t=e.match(this.weightNumRegex);let n=t?parseFloat(t[2]):0;return n=n>=0?n:0,n},getTagIncWeight(e){return this.countLayers(e,"(",")")},getTagDecWeight(e){return this.countLayers(e,"[","]")},countLayers(e,t="(",n=")"){let i=0;if(e.length<2)return i;for(;;){let r=e[0],o=e[e.length-1];if(r===t&&o===n)i++,e=e.slice(1,e.length-1);else break}return i},setLayers(e,t=0,n="(",i=")",r=""){for(;;){let o=e[0],l=e[e.length-1];if(o===n&&l===i)e=e.slice(1,e.length-1);else break}return t===0?e:n.repeat(t)+e+r+i.repeat(t)},getTranslateApiInfo(e,t){let n=!1;for(const i in t)for(const r in i.children)if(r.key===e){n=r;break}return n},isEqualTags(e,t,n=[]){if(t.length!==e.length)return!1;for(let i=0;i<e.length;i++){for(let r in e[i])if(!n.includes(r)&&t[i][r]!==e[i][r])return!1;for(let r in t[i])if(!n.includes(r)&&t[i][r]!==e[i][r])return!1}return!0},getTranslateApiItem(e,t){if(!e||e.length<=0)return{};for(let n of e)for(let i of n.children)if(i.key===t)return i;return e[0].children[0]},hideCompleteResults(e){typeof hideResults=="function"&&[100,200,300,500,1e3].forEach(n=>{setTimeout(()=>{hideResults(e)},n)})},formatTime(e,t=!0){let n=new Date(e),i=n.getFullYear(),r=n.getMonth()+1;r<10&&(r="0"+r);let o=n.getDate();o<10&&(o="0"+o);let l=n.getHours();l<10&&(l="0"+l);let c=n.getMinutes();c<10&&(c="0"+c);let d=n.getSeconds();return d<10&&(d="0"+d),t?`${i}/${r}/${o} ${l}:${c}:${d}`:`${r}/${o} ${l}:${c}:${d}`},apiUrl(){let e;return e=window.location.origin+window.location.pathname,e+=e.endsWith("/")?"":"/",e+="physton_prompt/",e},removeCSS(e,t=!0){if(!e)return;let n=null;t?n=this.gradioApp().querySelector("#"+e):n=document.querySelector("#"+e),n&&n.remove()},loadCSS(e,t="",n=!0,i=!1,r=!0){n&&this.removeCSS(t,r);let o=this.apiUrl()+"styles?file="+encodeURIComponent(e);i||(o+="&t="+new Date().getTime());let l=document.createElement("link");l.id=t,l.rel="stylesheet",l.href=o,r?this.gradioApp().appendChild(l):document.body.appendChild(l)},swapElement(e,t){let n=e.parentNode,i=t.parentNode,r=e.nextSibling,o=t.nextSibling;n.insertBefore(t,r),i.insertBefore(e,o)},insertBefore(e,t){t.parentNode.insertBefore(e,t)},insertAfter(e,t){t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},gradioContainer:null,gradioApp(){if(this.gradioContainer)return this.gradioContainer;const e=document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;if(t){const n=t.querySelectorAll(".gradio-container");for(let i=0;i<n.length;i++){const r=n[i];if(r.querySelectorAll("#tabs").length)return r.classList.add("physton-gradio-container"),this.gradioContainer=r,r}}else return document.body.classList.add("physton-gradio-container"),this.gradioContainer=document.body,document.body}};var ja=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oc={exports:{}};/* @license
|
||
Papa Parse
|
||
v5.4.1
|
||
https://github.com/mholt/PapaParse
|
||
License: MIT
|
||
*/(function(e,t){(function(n,i){e.exports=i()})(ja,function n(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},r=!i.document&&!!i.postMessage,o=i.IS_PAPA_WORKER||!1,l={},c=0,d={parse:function(R,E){var P=(E=E||{}).dynamicTyping||!1;if(Ae(P)&&(E.dynamicTypingFunction=P,P={}),E.dynamicTyping=P,E.transform=!!Ae(E.transform)&&E.transform,E.worker&&d.WORKERS_SUPPORTED){var Z=function(){if(!d.WORKERS_SUPPORTED)return!1;var se=(Ze=i.URL||i.webkitURL||null,Ne=n.toString(),d.BLOB_URL||(d.BLOB_URL=Ze.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; ","(",Ne,")();"],{type:"text/javascript"})))),Me=new i.Worker(se),Ze,Ne;return Me.onmessage=te,Me.id=c++,l[Me.id]=Me}();return Z.userStep=E.step,Z.userChunk=E.chunk,Z.userComplete=E.complete,Z.userError=E.error,E.step=Ae(E.step),E.chunk=Ae(E.chunk),E.complete=Ae(E.complete),E.error=Ae(E.error),delete E.worker,void Z.postMessage({input:R,config:E,workerId:Z.id})}var re=null;return d.NODE_STREAM_INPUT,typeof R=="string"?(R=function(se){return se.charCodeAt(0)===65279?se.slice(1):se}(R),re=E.download?new w(E):new H(E)):R.readable===!0&&Ae(R.read)&&Ae(R.on)?re=new x(E):(i.File&&R instanceof File||R instanceof Object)&&(re=new T(E)),re.stream(R)},unparse:function(R,E){var P=!1,Z=!0,re=",",se=`\r
|
||
`,Me='"',Ze=Me+Me,Ne=!1,oe=null,ge=!1;(function(){if(typeof E=="object"){if(typeof E.delimiter!="string"||d.BAD_DELIMITERS.filter(function(G){return E.delimiter.indexOf(G)!==-1}).length||(re=E.delimiter),(typeof E.quotes=="boolean"||typeof E.quotes=="function"||Array.isArray(E.quotes))&&(P=E.quotes),typeof E.skipEmptyLines!="boolean"&&typeof E.skipEmptyLines!="string"||(Ne=E.skipEmptyLines),typeof E.newline=="string"&&(se=E.newline),typeof E.quoteChar=="string"&&(Me=E.quoteChar),typeof E.header=="boolean"&&(Z=E.header),Array.isArray(E.columns)){if(E.columns.length===0)throw new Error("Option columns is empty");oe=E.columns}E.escapeChar!==void 0&&(Ze=E.escapeChar+Me),(typeof E.escapeFormulae=="boolean"||E.escapeFormulae instanceof RegExp)&&(ge=E.escapeFormulae instanceof RegExp?E.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var Ee=new RegExp(V(Me),"g");if(typeof R=="string"&&(R=JSON.parse(R)),Array.isArray(R)){if(!R.length||Array.isArray(R[0]))return ft(null,R,Ne);if(typeof R[0]=="object")return ft(oe||Object.keys(R[0]),R,Ne)}else if(typeof R=="object")return typeof R.data=="string"&&(R.data=JSON.parse(R.data)),Array.isArray(R.data)&&(R.fields||(R.fields=R.meta&&R.meta.fields||oe),R.fields||(R.fields=Array.isArray(R.data[0])?R.fields:typeof R.data[0]=="object"?Object.keys(R.data[0]):[]),Array.isArray(R.data[0])||typeof R.data[0]=="object"||(R.data=[R.data])),ft(R.fields||[],R.data||[],Ne);throw new Error("Unable to serialize unrecognized input");function ft(G,fe,me){var we="";typeof G=="string"&&(G=JSON.parse(G)),typeof fe=="string"&&(fe=JSON.parse(fe));var Te=Array.isArray(G)&&0<G.length,Re=!Array.isArray(fe[0]);if(Te&&Z){for(var ze=0;ze<G.length;ze++)0<ze&&(we+=re),we+=Ve(G[ze],ze);0<fe.length&&(we+=se)}for(var ke=0;ke<fe.length;ke++){var Qe=Te?G.length:fe[ke].length,at=!1,k=Te?Object.keys(fe[ke]).length===0:fe[ke].length===0;if(me&&!Te&&(at=me==="greedy"?fe[ke].join("").trim()==="":fe[ke].length===1&&fe[ke][0].length===0),me==="greedy"&&Te){for(var L=[],W=0;W<Qe;W++){var Y=Re?G[W]:W;L.push(fe[ke][Y])}at=L.join("").trim()===""}if(!at){for(var B=0;B<Qe;B++){0<B&&!k&&(we+=re);var q=Te&&Re?G[B]:B;we+=Ve(fe[ke][q],B)}ke<fe.length-1&&(!me||0<Qe&&!k)&&(we+=se)}}return we}function Ve(G,fe){if(G==null)return"";if(G.constructor===Date)return JSON.stringify(G).slice(1,25);var me=!1;ge&&typeof G=="string"&&ge.test(G)&&(G="'"+G,me=!0);var we=G.toString().replace(Ee,Ze);return(me=me||P===!0||typeof P=="function"&&P(G,fe)||Array.isArray(P)&&P[fe]||function(Te,Re){for(var ze=0;ze<Re.length;ze++)if(-1<Te.indexOf(Re[ze]))return!0;return!1}(we,d.BAD_DELIMITERS)||-1<we.indexOf(re)||we.charAt(0)===" "||we.charAt(we.length-1)===" ")?Me+we+Me:we}}};if(d.RECORD_SEP=String.fromCharCode(30),d.UNIT_SEP=String.fromCharCode(31),d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
||
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!r&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=N,d.ParserHandle=I,d.NetworkStreamer=w,d.FileStreamer=T,d.StringStreamer=H,d.ReadableStreamStreamer=x,i.jQuery){var m=i.jQuery;m.fn.parse=function(R){var E=R.config||{},P=[];return this.each(function(se){if(!(m(this).prop("tagName").toUpperCase()==="INPUT"&&m(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var Me=0;Me<this.files.length;Me++)P.push({file:this.files[Me],inputElem:this,instanceConfig:m.extend({},E)})}),Z(),this;function Z(){if(P.length!==0){var se,Me,Ze,Ne,oe=P[0];if(Ae(R.before)){var ge=R.before(oe.file,oe.inputElem);if(typeof ge=="object"){if(ge.action==="abort")return se="AbortError",Me=oe.file,Ze=oe.inputElem,Ne=ge.reason,void(Ae(R.error)&&R.error({name:se},Me,Ze,Ne));if(ge.action==="skip")return void re();typeof ge.config=="object"&&(oe.instanceConfig=m.extend(oe.instanceConfig,ge.config))}else if(ge==="skip")return void re()}var Ee=oe.instanceConfig.complete;oe.instanceConfig.complete=function(ft){Ae(Ee)&&Ee(ft,oe.file,oe.inputElem),re()},d.parse(oe.file,oe.instanceConfig)}else Ae(R.complete)&&R.complete()}function re(){P.splice(0,1),Z()}}}function g(R){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(E){var P=Fe(E);P.chunkSize=parseInt(P.chunkSize),E.step||E.chunk||(P.chunkSize=null),this._handle=new I(P),(this._handle.streamer=this)._config=P}.call(this,R),this.parseChunk=function(E,P){if(this.isFirstChunk&&Ae(this._config.beforeFirstChunk)){var Z=this._config.beforeFirstChunk(E);Z!==void 0&&(E=Z)}this.isFirstChunk=!1,this._halted=!1;var re=this._partialLine+E;this._partialLine="";var se=this._handle.parse(re,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var Me=se.meta.cursor;this._finished||(this._partialLine=re.substring(Me-this._baseIndex),this._baseIndex=Me),se&&se.data&&(this._rowCount+=se.data.length);var Ze=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)i.postMessage({results:se,workerId:d.WORKER_ID,finished:Ze});else if(Ae(this._config.chunk)&&!P){if(this._config.chunk(se,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);se=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(se.data),this._completeResults.errors=this._completeResults.errors.concat(se.errors),this._completeResults.meta=se.meta),this._completed||!Ze||!Ae(this._config.complete)||se&&se.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Ze||se&&se.meta.paused||this._nextChunk(),se}this._halted=!0},this._sendError=function(E){Ae(this._config.error)?this._config.error(E):o&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:E,finished:!1})}}function w(R){var E;(R=R||{}).chunkSize||(R.chunkSize=d.RemoteChunkSize),g.call(this,R),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(P){this._input=P,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(E=new XMLHttpRequest,this._config.withCredentials&&(E.withCredentials=this._config.withCredentials),r||(E.onload=p(this._chunkLoaded,this),E.onerror=p(this._chunkError,this)),E.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var P=this._config.downloadRequestHeaders;for(var Z in P)E.setRequestHeader(Z,P[Z])}if(this._config.chunkSize){var re=this._start+this._config.chunkSize-1;E.setRequestHeader("Range","bytes="+this._start+"-"+re)}try{E.send(this._config.downloadRequestBody)}catch(se){this._chunkError(se.message)}r&&E.status===0&&this._chunkError()}},this._chunkLoaded=function(){E.readyState===4&&(E.status<200||400<=E.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:E.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(P){var Z=P.getResponseHeader("Content-Range");return Z===null?-1:parseInt(Z.substring(Z.lastIndexOf("/")+1))}(E),this.parseChunk(E.responseText)))},this._chunkError=function(P){var Z=E.statusText||P;this._sendError(new Error(Z))}}function T(R){var E,P;(R=R||{}).chunkSize||(R.chunkSize=d.LocalChunkSize),g.call(this,R);var Z=typeof FileReader<"u";this.stream=function(re){this._input=re,P=re.slice||re.webkitSlice||re.mozSlice,Z?((E=new FileReader).onload=p(this._chunkLoaded,this),E.onerror=p(this._chunkError,this)):E=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var re=this._input;if(this._config.chunkSize){var se=Math.min(this._start+this._config.chunkSize,this._input.size);re=P.call(re,this._start,se)}var Me=E.readAsText(re,this._config.encoding);Z||this._chunkLoaded({target:{result:Me}})},this._chunkLoaded=function(re){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(re.target.result)},this._chunkError=function(){this._sendError(E.error)}}function H(R){var E;g.call(this,R=R||{}),this.stream=function(P){return E=P,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var P,Z=this._config.chunkSize;return Z?(P=E.substring(0,Z),E=E.substring(Z)):(P=E,E=""),this._finished=!E,this.parseChunk(P)}}}function x(R){g.call(this,R=R||{});var E=[],P=!0,Z=!1;this.pause=function(){g.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){g.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(re){this._input=re,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Z&&E.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),E.length?this.parseChunk(E.shift()):P=!0},this._streamData=p(function(re){try{E.push(typeof re=="string"?re:re.toString(this._config.encoding)),P&&(P=!1,this._checkIsFinished(),this.parseChunk(E.shift()))}catch(se){this._streamError(se)}},this),this._streamError=p(function(re){this._streamCleanUp(),this._sendError(re)},this),this._streamEnd=p(function(){this._streamCleanUp(),Z=!0,this._streamData("")},this),this._streamCleanUp=p(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function I(R){var E,P,Z,re=Math.pow(2,53),se=-re,Me=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Ze=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ne=this,oe=0,ge=0,Ee=!1,ft=!1,Ve=[],G={data:[],errors:[],meta:{}};if(Ae(R.step)){var fe=R.step;R.step=function(ke){if(G=ke,Te())we();else{if(we(),G.data.length===0)return;oe+=ke.data.length,R.preview&&oe>R.preview?P.abort():(G.data=G.data[0],fe(G,Ne))}}}function me(ke){return R.skipEmptyLines==="greedy"?ke.join("").trim()==="":ke.length===1&&ke[0].length===0}function we(){return G&&Z&&(ze("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),Z=!1),R.skipEmptyLines&&(G.data=G.data.filter(function(ke){return!me(ke)})),Te()&&function(){if(!G)return;function ke(at,k){Ae(R.transformHeader)&&(at=R.transformHeader(at,k)),Ve.push(at)}if(Array.isArray(G.data[0])){for(var Qe=0;Te()&&Qe<G.data.length;Qe++)G.data[Qe].forEach(ke);G.data.splice(0,1)}else G.data.forEach(ke)}(),function(){if(!G||!R.header&&!R.dynamicTyping&&!R.transform)return G;function ke(at,k){var L,W=R.header?{}:[];for(L=0;L<at.length;L++){var Y=L,B=at[L];R.header&&(Y=L>=Ve.length?"__parsed_extra":Ve[L]),R.transform&&(B=R.transform(B,Y)),B=Re(Y,B),Y==="__parsed_extra"?(W[Y]=W[Y]||[],W[Y].push(B)):W[Y]=B}return R.header&&(L>Ve.length?ze("FieldMismatch","TooManyFields","Too many fields: expected "+Ve.length+" fields but parsed "+L,ge+k):L<Ve.length&&ze("FieldMismatch","TooFewFields","Too few fields: expected "+Ve.length+" fields but parsed "+L,ge+k)),W}var Qe=1;return!G.data.length||Array.isArray(G.data[0])?(G.data=G.data.map(ke),Qe=G.data.length):G.data=ke(G.data,0),R.header&&G.meta&&(G.meta.fields=Ve),ge+=Qe,G}()}function Te(){return R.header&&Ve.length===0}function Re(ke,Qe){return at=ke,R.dynamicTypingFunction&&R.dynamicTyping[at]===void 0&&(R.dynamicTyping[at]=R.dynamicTypingFunction(at)),(R.dynamicTyping[at]||R.dynamicTyping)===!0?Qe==="true"||Qe==="TRUE"||Qe!=="false"&&Qe!=="FALSE"&&(function(k){if(Me.test(k)){var L=parseFloat(k);if(se<L&&L<re)return!0}return!1}(Qe)?parseFloat(Qe):Ze.test(Qe)?new Date(Qe):Qe===""?null:Qe):Qe;var at}function ze(ke,Qe,at,k){var L={type:ke,code:Qe,message:at};k!==void 0&&(L.row=k),G.errors.push(L)}this.parse=function(ke,Qe,at){var k=R.quoteChar||'"';if(R.newline||(R.newline=function(Y,B){Y=Y.substring(0,1048576);var q=new RegExp(V(B)+"([^]*?)"+V(B),"gm"),de=(Y=Y.replace(q,"")).split("\r"),ae=Y.split(`
|
||
`),ce=1<ae.length&&ae[0].length<de[0].length;if(de.length===1||ce)return`
|
||
`;for(var ee=0,be=0;be<de.length;be++)de[be][0]===`
|
||
`&&ee++;return ee>=de.length/2?`\r
|
||
`:"\r"}(ke,k)),Z=!1,R.delimiter)Ae(R.delimiter)&&(R.delimiter=R.delimiter(ke),G.meta.delimiter=R.delimiter);else{var L=function(Y,B,q,de,ae){var ce,ee,be,pe;ae=ae||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var Oe=0;Oe<ae.length;Oe++){var Ce=ae[Oe],je=0,rt=0,tt=0;be=void 0;for(var dt=new N({comments:de,delimiter:Ce,newline:B,preview:10}).parse(Y),At=0;At<dt.data.length;At++)if(q&&me(dt.data[At]))tt++;else{var Kt=dt.data[At].length;rt+=Kt,be!==void 0?0<Kt&&(je+=Math.abs(Kt-be),be=Kt):be=Kt}0<dt.data.length&&(rt/=dt.data.length-tt),(ee===void 0||je<=ee)&&(pe===void 0||pe<rt)&&1.99<rt&&(ee=je,ce=Ce,pe=rt)}return{successful:!!(R.delimiter=ce),bestDelimiter:ce}}(ke,R.newline,R.skipEmptyLines,R.comments,R.delimitersToGuess);L.successful?R.delimiter=L.bestDelimiter:(Z=!0,R.delimiter=d.DefaultDelimiter),G.meta.delimiter=R.delimiter}var W=Fe(R);return R.preview&&R.header&&W.preview++,E=ke,P=new N(W),G=P.parse(E,Qe,at),we(),Ee?{meta:{paused:!0}}:G||{meta:{paused:!1}}},this.paused=function(){return Ee},this.pause=function(){Ee=!0,P.abort(),E=Ae(R.chunk)?"":E.substring(P.getCharIndex())},this.resume=function(){Ne.streamer._halted?(Ee=!1,Ne.streamer.parseChunk(E,!0)):setTimeout(Ne.resume,3)},this.aborted=function(){return ft},this.abort=function(){ft=!0,P.abort(),G.meta.aborted=!0,Ae(R.complete)&&R.complete(G),E=""}}function V(R){return R.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(R){var E,P=(R=R||{}).delimiter,Z=R.newline,re=R.comments,se=R.step,Me=R.preview,Ze=R.fastMode,Ne=E=R.quoteChar===void 0||R.quoteChar===null?'"':R.quoteChar;if(R.escapeChar!==void 0&&(Ne=R.escapeChar),(typeof P!="string"||-1<d.BAD_DELIMITERS.indexOf(P))&&(P=","),re===P)throw new Error("Comment character same as delimiter");re===!0?re="#":(typeof re!="string"||-1<d.BAD_DELIMITERS.indexOf(re))&&(re=!1),Z!==`
|
||
`&&Z!=="\r"&&Z!==`\r
|
||
`&&(Z=`
|
||
`);var oe=0,ge=!1;this.parse=function(Ee,ft,Ve){if(typeof Ee!="string")throw new Error("Input must be a string");var G=Ee.length,fe=P.length,me=Z.length,we=re.length,Te=Ae(se),Re=[],ze=[],ke=[],Qe=oe=0;if(!Ee)return Dt();if(R.header&&!ft){var at=Ee.split(Z)[0].split(P),k=[],L={},W=!1;for(var Y in at){var B=at[Y];Ae(R.transformHeader)&&(B=R.transformHeader(B,Y));var q=B,de=L[B]||0;for(0<de&&(W=!0,q=B+"_"+de),L[B]=de+1;k.includes(q);)q=q+"_"+de;k.push(q)}if(W){var ae=Ee.split(Z);ae[0]=k.join(P),Ee=ae.join(Z)}}if(Ze||Ze!==!1&&Ee.indexOf(E)===-1){for(var ce=Ee.split(Z),ee=0;ee<ce.length;ee++){if(ke=ce[ee],oe+=ke.length,ee!==ce.length-1)oe+=Z.length;else if(Ve)return Dt();if(!re||ke.substring(0,we)!==re){if(Te){if(Re=[],tt(ke.split(P)),zt(),ge)return Dt()}else tt(ke.split(P));if(Me&&Me<=ee)return Re=Re.slice(0,Me),Dt(!0)}}return Dt()}for(var be=Ee.indexOf(P,oe),pe=Ee.indexOf(Z,oe),Oe=new RegExp(V(Ne)+V(E),"g"),Ce=Ee.indexOf(E,oe);;)if(Ee[oe]!==E)if(re&&ke.length===0&&Ee.substring(oe,oe+we)===re){if(pe===-1)return Dt();oe=pe+me,pe=Ee.indexOf(Z,oe),be=Ee.indexOf(P,oe)}else if(be!==-1&&(be<pe||pe===-1))ke.push(Ee.substring(oe,be)),oe=be+fe,be=Ee.indexOf(P,oe);else{if(pe===-1)break;if(ke.push(Ee.substring(oe,pe)),Kt(pe+me),Te&&(zt(),ge))return Dt();if(Me&&Re.length>=Me)return Dt(!0)}else for(Ce=oe,oe++;;){if((Ce=Ee.indexOf(E,Ce+1))===-1)return Ve||ze.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Re.length,index:oe}),At();if(Ce===G-1)return At(Ee.substring(oe,Ce).replace(Oe,E));if(E!==Ne||Ee[Ce+1]!==Ne){if(E===Ne||Ce===0||Ee[Ce-1]!==Ne){be!==-1&&be<Ce+1&&(be=Ee.indexOf(P,Ce+1)),pe!==-1&&pe<Ce+1&&(pe=Ee.indexOf(Z,Ce+1));var je=dt(pe===-1?be:Math.min(be,pe));if(Ee.substr(Ce+1+je,fe)===P){ke.push(Ee.substring(oe,Ce).replace(Oe,E)),Ee[oe=Ce+1+je+fe]!==E&&(Ce=Ee.indexOf(E,oe)),be=Ee.indexOf(P,oe),pe=Ee.indexOf(Z,oe);break}var rt=dt(pe);if(Ee.substring(Ce+1+rt,Ce+1+rt+me)===Z){if(ke.push(Ee.substring(oe,Ce).replace(Oe,E)),Kt(Ce+1+rt+me),be=Ee.indexOf(P,oe),Ce=Ee.indexOf(E,oe),Te&&(zt(),ge))return Dt();if(Me&&Re.length>=Me)return Dt(!0);break}ze.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Re.length,index:oe}),Ce++}}else Ce++}return At();function tt(X){Re.push(X),Qe=oe}function dt(X){var Le=0;if(X!==-1){var Ie=Ee.substring(Ce+1,X);Ie&&Ie.trim()===""&&(Le=Ie.length)}return Le}function At(X){return Ve||(X===void 0&&(X=Ee.substring(oe)),ke.push(X),oe=G,tt(ke),Te&&zt()),Dt()}function Kt(X){oe=X,tt(ke),ke=[],pe=Ee.indexOf(Z,oe)}function Dt(X){return{data:Re,errors:ze,meta:{delimiter:P,linebreak:Z,aborted:ge,truncated:!!X,cursor:Qe+(ft||0)}}}function zt(){se(Dt()),Re=[],ze=[]}},this.abort=function(){ge=!0},this.getCharIndex=function(){return oe}}function te(R){var E=R.data,P=l[E.workerId],Z=!1;if(E.error)P.userError(E.error,E.file);else if(E.results&&E.results.data){var re={abort:function(){Z=!0,ye(E.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:D,resume:D};if(Ae(P.userStep)){for(var se=0;se<E.results.data.length&&(P.userStep({data:E.results.data[se],errors:E.results.errors,meta:E.results.meta},re),!Z);se++);delete E.results}else Ae(P.userChunk)&&(P.userChunk(E.results,re,E.file),delete E.results)}E.finished&&!Z&&ye(E.workerId,E.results)}function ye(R,E){var P=l[R];Ae(P.userComplete)&&P.userComplete(E),P.terminate(),delete l[R]}function D(){throw new Error("Not implemented.")}function Fe(R){if(typeof R!="object"||R===null)return R;var E=Array.isArray(R)?[]:{};for(var P in R)E[P]=Fe(R[P]);return E}function p(R,E){return function(){R.apply(E,arguments)}}function Ae(R){return typeof R=="function"}return o&&(i.onmessage=function(R){var E=R.data;if(d.WORKER_ID===void 0&&E&&(d.WORKER_ID=E.workerId),typeof E.input=="string")i.postMessage({workerId:d.WORKER_ID,results:d.parse(E.input,E.config),finished:!0});else if(i.File&&E.input instanceof File||E.input instanceof Object){var P=d.parse(E.input,E.config);P&&i.postMessage({workerId:d.WORKER_ID,results:P,finished:!0})}}),(w.prototype=Object.create(g.prototype)).constructor=w,(T.prototype=Object.create(g.prototype)).constructor=T,(H.prototype=Object.create(H.prototype)).constructor=H,(x.prototype=Object.create(g.prototype)).constructor=x,d})})(Oc);var Lg=Oc.exports;const Og=fo(Lg),Gn={props:{languageCode:{type:String,default:"en_US"},languages:{type:Object,default:()=>{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1}},data(){return{cancelMultiTranslate:!1,globals:co}},computed:{langName(){for(const e in this.languages){const t=this.languages[e];if(t.code===this.languageCode)return t.name}return item.name}},methods:{getLang(e){return he.getLang(e,this.languageCode,this.languages)},replaceGlobals(e){return he.replaceGlobals(e,this.languageCode)},getCSV(e=null,t=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise((n,i)=>{if(e=e||this.tagCompleteFile,!t&&window.tagCompleteFileCache[e]){n(window.tagCompleteFileCache[e]);return}if(window.tagCompleteFileLoading[e]){const l=setInterval(()=>{window.tagCompleteFileLoading[e]||(clearInterval(l),n(window.tagCompleteFileCache[e]))},100);return}window.tagCompleteFileLoading[e]=!0;let r={toEn:new Map,toLocal:new Map},o=(l,c)=>{[l,l.replace(/\_/g," "),l.replace(/\-/g," ")].forEach(m=>r.toLocal.set(m,c)),r.toEn.set(c,l)};if(!e&&typeof translations=="object"&&translations instanceof Map){translations.forEach((l,c)=>{o(c,l)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=r,n(r);return}if(!e){window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=r,i(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(e).then(l=>{l=Og.parse(l,{header:!1,skipEmptyLines:!0}),l.data.forEach(c=>{if(c.length<2)return;let d=c[0].trim(),m=c[1].trim();d===""||m===""||o(d,m)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=r,n(r)}).catch(l=>{window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=r,l.response&&l.response.status===404?i(this.getLang("not_found_csv_file")):i(l.message)})})},async translateToLocalByCSV(e,t=null,n=!1){let i=await this.getCSV(t,n);return e=e.trim().toLowerCase(),i.toLocal.has(e)?i.toLocal.get(e):""},async translateToEnByCSV(e,t=null,n=!1){let i=await this.getCSV(t,n);return e=e.trim().toLowerCase(),i.toEn.has(e)?i.toEn.get(e):""}}},Ui=Number.isNaN||window.isNaN,Dg=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,Ig=/\.\d*(?:0|9){10}\d*$/,Dc=(e,t=1e11)=>Ig.test(String(e))?Math.round(e*t)/t:e,Pg=Fp({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return Ui(this.value)||this.value<this.max},decreasable(){return Ui(this.value)||this.value>this.min}},watch:{modelValue:{immediate:!0,handler(e,t){!(Ui(e)&&typeof t>"u")&&e!==this.value&&this.setValue(e)}}},methods:{isNaN:Ui,change(e){this.setValue(e.target.value)},paste(e){const t=e.clipboardData||window.clipboardData;t&&!Dg.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Ui(e)&&(e=0),this.setValue(Dc(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Ui(e)&&(e=0),this.setValue(Dc(e+this.step))}},setValue(e){const t=this.value;let n=typeof e!="number"?parseFloat(e):e;Ui(n)||(this.min<=this.max&&(n=Math.min(this.max,Math.max(this.min,n))),this.rounded&&(n=Math.round(n))),this.value=n,n===t&&(this.$refs.input.value=String(n)),this.$emit("update:modelValue",n,t)}}}),un=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},Ng=["disabled"],Rg=["name","value","min","max","step","readonly","disabled","placeholder"],Mg=["disabled"];function Fg(e,t,n,i,r,o){return F(),U("div",{class:Lt(["vue-number-input",{"vue-number-input--inline":e.inline,"vue-number-input--center":e.center,"vue-number-input--controls":e.controls,[`vue-number-input--${e.size}`]:e.size}])},[e.controls?(F(),U("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.decreasable,onClick:t[0]||(t[0]=ct((...l)=>e.decrease&&e.decrease(...l),["prevent"]))},null,8,Ng)):qe("",!0),_("input",Vu({ref:"input",class:"vue-number-input__input"},e.attrs,{type:"number",name:e.name,value:isNaN(e.value)?"":e.value,min:e.min,max:e.max,step:e.step,readonly:e.readonly||!e.inputtable,disabled:e.disabled||!e.decreasable&&!e.increasable,placeholder:e.placeholder,autocomplete:"off",onChange:t[1]||(t[1]=(...l)=>e.change&&e.change(...l)),onPaste:t[2]||(t[2]=(...l)=>e.paste&&e.paste(...l))}),null,16,Rg),e.controls?(F(),U("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.increasable,onClick:t[3]||(t[3]=ct((...l)=>e.increase&&e.increase(...l),["prevent"]))},null,8,Mg)):qe("",!0)],2)}const Hg=un(Pg,[["render",Fg]]),Bg={data(){return{autocompleteResults:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(t=>{t.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",t.name],icon:"favorite",key:t.key,dataKey:"favorite."+t.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);return this.translates(e,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);this.translates(e,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},appendListItemName(e){let t=[];if(typeof e.name=="object")for(let n of e.name)t.push(this.getLang(n));else t=[this.getLang(e.name)];return t.join(" / ")},onAppendTagFocus(e){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:e.target.offsetTop+e.target.offsetHeight+"px",left:e.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let t=[];this.appendList.forEach(n=>{typeof n.dataKey=="string"&&t.push(n.dataKey)}),this.gradioAPI.getDatas(t).then(n=>{this.appendList.forEach(i=>{typeof i.dataKey=="string"&&(i.children=n[i.dataKey]||[],i.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(e){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(e=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:e?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(e=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:e?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(e,t=null){if(!(e.keyCode===38||e.keyCode===40))if(e.keyCode===13){if(this.getAutocompleteResults()&&this.autocompleteResults.style.display==="block"&&this.getAutocompleteResultsSelected()){let i=this.getAutocompleteResultsSelectedText();setTimeout(()=>{t=this.$refs.promptTagAppend.value,i?t=i:(i=this.getAutocompleteResultsSelectedText(),i&&(t=i)),this.onAppendTagKeyDown(e,t)},300);return}let n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log(n,t),t)n=n.replace(/\s*,\s*$/,"").trim(),he.hasBrackets(n)&&(n=he.replaceBrackets(n)),this._appendTag(n,t),this.updateTags();else{he.hasBrackets(n)?(n=he.replaceBrackets(n),n=[n]):n=he.splitTags(n);let i=[];n.forEach(r=>{let o=-1;r===`
|
||
`?o=this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap"):o=this._appendTag(r),o!==-1&&i.push(o)}),this.updatePrompt(),this.autoTranslateToEnglish||this.autoTranslateToLocal?this.$nextTick(()=>{let r=!(this.tagCompleteFile&&this.onlyCsvOnAuto);this.autoTranslateToEnglish?this.translates(i,!1,r).finally(()=>{this.updateTags()}):this.autoTranslateToLocal&&this.translates(i,!0,r).finally(()=>{this.updateTags()})}):this.updateTags()}}else this.removeAutocompleteResultsSelected()},onAppendTagKeyUp(e){this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""?(this.$refs.promptTagAppend.value="",this.showAppendList=!0,e.keyCode===38||e.keyCode===40?this.appendListChildSelected===null?this.selectAppendList(e.keyCode===40):this.selectAppendListChild(e.keyCode===40):e.keyCode===37||e.keyCode===39?this.appendListSelected!==null&&(e.keyCode===37?(this.appendListChildSelected=null,this.scrollAppendListChild()):this.appendList[this.appendListSelected].children.length===0?this.appendListChildSelected=null:(this.appendListChildSelected=0,this.scrollAppendListChild())):e.keyCode===13&&(this._appendTagByList(),this.scrollAppendListChild(),this.appendListSelected=null,this.appendListChildSelected=null)):this.showAppendList=!1},onAppendGroupClick(e,t,n){if(e!==null){if(this.appendListSelected=e,t===null){if(this.appendList[this.appendListSelected].children.length>0)return}else this.appendListChildSelected=t;this._appendTagByList()}},onAppendListChildMouseLeave(e,t,n){this.appendListSelected=null,this.appendListChildSelected=null},onAppendListChildMouseEnter(e,t,n){this.appendListSelected=e,this.appendListChildSelected=t},_appendTagByList(){if(this.appendListSelected===null)return;const e=this.appendList[this.appendListSelected];let t=null;e.children.length>0&&this.appendListChildSelected!==null&&(t=e.children[this.appendListChildSelected]);let n=[];switch(e.type){case"wrap":n.push({value:`
|
||
`,localValue:`
|
||
`,disabled:!1,type:"wrap"});break;case"lora":break;case"favorite":case"history":t&&t.tags.forEach(i=>{n.push({value:i.value,localValue:i.localValue,disabled:i.disabled,type:i.type||"text"})});break}n.length<=0||(n.forEach(i=>{this._appendTag(i.value,i.localValue,i.disabled,-1,i.type)}),this.updateTags())},getAutocompleteResults(){if(!this.autocompleteResults){const e=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteResults");e&&(this.autocompleteResults=e,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",t=>{this.bindAutocompleteResultsClick()})))}return this.autocompleteResults},removeAutocompleteResultsSelected(){const e=this.getAutocompleteResults();return e?(e.querySelectorAll("li").forEach(t=>{t.classList.remove("selected")}),!0):!1},getAutocompleteResultsSelected(){const e=this.getAutocompleteResults();if(!e)return null;const t=e.querySelector("li.selected");return t||null},getAutocompleteResultsSelectedText(e=null){if(!e&&(e=this.getAutocompleteResultsSelected(),!e))return null;const i=e.querySelector(".acListItem").innerText.match(/\[(.+?)\]/);return i?i[1]:null},bindAutocompleteResultsClick(){if(this.getAutocompleteResults(),!this.autocompleteResults)return;this.autocompleteResults.querySelectorAll("li").forEach(t=>{t.getAttribute("physton-on-clicked")!=="true"&&(t.setAttribute("physton-on-clicked","true"),t.addEventListener("click",()=>{this.onAutocompleteResultsClicked(t)}))})},onAutocompleteResultsClicked(e){const t=this.getAutocompleteResultsSelectedText(e);setTimeout(()=>{let n=this.$refs.promptTagAppend.value.replace(/,\s*$/,"");this.$refs.promptTagAppend.value="",n=n.replace(/\s*,\s*$/,"").trim(),he.hasBrackets(n)&&(n=he.replaceBrackets(n)),this._appendTag(n,t),this.updateTags()},300)},onSettingBoxMouseEnter(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[]},getCurrentTypeFavorites(){let e=[];return this.favorites.forEach(t=>{if(this.neg){if(t.type!=="negative_prompt")return}else if(t.type!=="prompt")return;e.push(t)}),e},onAutoInputPromptChange(){this.gradioAPI.setData(this.autoInputPromptKey,this.autoInputPrompt).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},initAutoInputPrompt(){this.autoInputPromptKey="autoInputPrompt-"+this.name,this.gradioAPI.getData(this.autoInputPromptKey).then(e=>{if(e!==null)if(this.autoInputPrompt=e,this.autoInputPrompt==="last")this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{this.useHistory(t)});else{const t=()=>{if(typeof window.phystonPromptfavorites=="object"&&window.phystonPromptfavorites.length>0){for(let n of window.phystonPromptfavorites)for(let i of n.list)if(i.id===this.autoInputPrompt){this.useFavorite(i);return}return}setTimeout(t,100)};setTimeout(t,100)}})}}},jg={data(){return{dropStartX:0,dropStartY:0,dropEndX:0,dropEndY:0,dropOffsetX:0,dropOffsetY:0,dropIsSelecting:!1,dropIsStart:!1,dropIsEnd:!1,dropArea:{top:0,left:0,width:0,height:0},dropTags:[],dropTimeId:0}},methods:{_dropOver(){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!1,this.dropTags=[];for(let e=0;e<this.$refs.promptTagsList.children.length;e++){let t=this.$refs.promptTagsList.children[e];t.style.display==="none"&&(t.style.display=""),t.classList.remove("drop-selected")}},onDropMouseDown(e){this.droping||(this._dropOver(),this.dropOffsetX=e.clientX-e.layerX,this.dropOffsetY=e.clientY-e.layerY,this.dropStartX=e.clientX-this.dropOffsetX,this.dropStartY=e.clientY-this.dropOffsetY,this.dropEndX=e.clientX-this.dropOffsetX,this.dropEndY=e.clientY-this.dropOffsetY,this.dropIsStart=!0)},onDropMouseMove(e){if(this.dropIsStart){this.dropIsSelecting=!0,this.dropEndX=e.clientX-this.dropOffsetX,this.dropEndY=e.clientY-this.dropOffsetY;let t=Math.min(this.dropStartX,this.dropEndX),n=Math.min(this.dropStartY,this.dropEndY),i=Math.abs(this.dropStartX-this.dropEndX),r=Math.abs(this.dropStartY-this.dropEndY);t=Math.max(t,0),n=Math.max(n,0),i=Math.min(i,this.$refs.promptTags.clientWidth-t),r=Math.min(r,this.$refs.promptTags.clientHeight-n),this.dropArea.top=n,this.dropArea.left=t,this.dropArea.width=i,this.dropArea.height=r,this.dropTimeId&&clearTimeout(this.dropTimeId),this.dropTimeId=setTimeout(this.dropSelectItems,10)}},dropSelectItems(){this.dropTimeId&&clearTimeout(this.dropTimeId);let e=[];for(let t=0;t<this.$refs.promptTagsList.children.length;t++){let n=this.$refs.promptTagsList.children[t];if(!n.classList.contains("prompt-tag"))continue;let i=n.offsetLeft,r=n.offsetTop,o=n.clientWidth,l=n.clientHeight,c=i+o,d=r+l;!(c<this.dropArea.left||d<this.dropArea.top||i>this.dropArea.left+this.dropArea.width||r>this.dropArea.top+this.dropArea.height)?(e.push(n.getAttribute("data-id")),n.classList.add("drop-selected")):n.classList.remove("drop-selected"),this.dropTags=e}},onDropMouseUp(e){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!0,this.$refs.dropSelectBtns.style.left=this.$refs.dropSelectBox.style.left,this.$refs.dropSelectBtns.style.top=this.$refs.dropSelectBox.style.top},_getDropTags(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.find(i=>i.id===t);n&&e.push(n)}),e},_getDropIndexes(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.findIndex(i=>i.id===t);n!==-1&&e.push(n)}),e},_getDropTagsEle(){let e=[];return this.dropTags.forEach(t=>{let n=this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id="${t}"]`);n&&e.push(n)}),e},onDropCopy(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.copy(t)},onDropFavorite(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.gradioAPI.pushFavorite(this.favoriteKey,e,t,"").then(n=>{n?(this.$toastr.success(this.getLang("success")),this.$emit("refreshFavorites",this.favoriteKey)):this.$toastr.error(this.getLang("failed"))}).catch(n=>{this.$toastr.error(this.getLang("failed"))})},onDropDisable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!0}),this.updateTags()},onDropEnable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!1}),this.updateTags()},onDropDelete(){let e=this._getDropIndexes();this._dropOver(),e.sort((t,n)=>n-t),e.forEach(t=>{this.tags.splice(t,1)}),this.updateTags()}}};var $a="__autosizeInputGhost",$g={" ":"nbsp","<":"lt",">":"gt"};function Ug(e){return"&"+$g[e]+";"}function Wg(e){return e.replace(/\s|<|>/g,Ug)}function Kg(){var e=document.createElement("div");return e.id=$a,e.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",document.body.appendChild(e),e}var qg=function(e,t){var n=window.getComputedStyle(e),i="box-sizing:"+n.boxSizing+";border-left:"+n.borderLeftWidth+" solid red;border-right:"+n.borderRightWidth+" solid red;font-family:"+n.fontFamily+";font-feature-settings:"+n.fontFeatureSettings+";font-kerning:"+n.fontKerning+";font-size:"+n.fontSize+";font-stretch:"+n.fontStretch+";font-style:"+n.fontStyle+";font-variant:"+n.fontVariant+";font-variant-caps:"+n.fontVariantCaps+";font-variant-ligatures:"+n.fontVariantLigatures+";font-variant-numeric:"+n.fontVariantNumeric+";font-weight:"+n.fontWeight+";letter-spacing:"+n.letterSpacing+";margin-left:"+n.marginLeft+";margin-right:"+n.marginRight+";padding-left:"+n.paddingLeft+";padding-right:"+n.paddingRight+";text-indent:"+n.textIndent+";text-transform:"+n.textTransform;function r(){var l=e.value||e.getAttribute("placeholder")||"",c=document.getElementById($a)||Kg();c.style.cssText+=i,c.innerHTML=Wg(l);var d=window.getComputedStyle(c).width;return e.style.width=d,d}e.addEventListener("input",r);var o=r();return t&&t.minWidth&&o!=="0px"&&(e.style.minWidth=o),function(){e.removeEventListener("input",r);var l=document.getElementById($a);l&&l.parentNode.removeChild(l)}};const Vg=fo(qg),zg={data(){return{tagClickTimeId:0}},mounted(){he.gradioApp().addEventListener("mousemove",()=>{this.$refs.highlightPrompt.hide()})},methods:{_setTag(e){typeof e.type=="string"&&e.type==="wrap"?(e.weightNum=1,e.incWeight=0,e.decWeight=0):(e.weightNum=he.getTagWeightNum(e.value),e.weightNum=e.weightNum<=0?1:e.weightNum,e.incWeight=he.getTagIncWeight(e.value),e.decWeight=he.getTagDecWeight(e.value)),this._setTagClass(e),this.$nextTick(()=>{this._setTagHeight(e)})},_setTagHeight(e){setTimeout(()=>{let t=this.$refs["promptTagValue-"+e.id][0],n=t.offsetHeight;t.parentNode.style.height=n+"px",this.$refs["promptTagEdit-"+e.id]&&(this.$refs["promptTagEdit-"+e.id][0].style.height=n+"px"),this.$refs["promptTagDelete-"+e.id]&&(this.$refs["promptTagDelete-"+e.id][0].style.height=n+"px")},300)},_setTagClass(e){if(e.isLora=!1,e.loraExists=!1,e.isLyco=!1,e.lycoExists=!1,e.isEmbedding=!1,!(typeof e.type=="string"&&e.type==="wrap")){const n=e.value.match(he.loraRegex);if(n){e.isLora=!0;const i=this.loraExists(n[1]);i!==!1&&(e.loraExists=!0,e.loraName=i)}if(!e.isLora){const i=e.value.match(he.lycoRegex);if(i){e.isLyco=!0;const r=this.lycoExists(i[1]);r!==!1&&(e.lycoExists=!0,e.lycoName=r)}}if(!e.isLora&&!e.isLyco){const i=this.embeddingExists(e.value);if(i!==!1)e.isEmbedding=!0,e.value=i;else{let r=e.value;const o=he.hasBrackets(r);(o[0]==="("&&o[1]===")"||o[0]==="["&&o[1]==="]")&&(r=he.setLayers(r,0,o[0],o[1]),r=r.replace(he.weightNumRegex,"$1"),this.embeddingExists(r)!==!1&&(e.isEmbedding=!0))}}}let t=["prompt-tag-value"];return e.isLora?(t.push("lora-tag"),e.loraExists||t.push("lora-not-exists")):e.isLyco?(t.push("lyco-tag"),e.lycoExists||t.push("lyco-not-exists")):e.isEmbedding?t.push("embedding-tag"):this.neg&&t.push("neg-tag"),e.classes=t,t},_setTagById(e,t=null,n=null){let i=this.tags.find(r=>r.id===e);return i?(t!==null&&(i.value=t),n!==null&&(i.localValue=n),i):!1},_appendTag(e,t="",n=!1,i=-1,r="text"){if(e==="")return-1;const o=Date.now()+(Math.random()*1e6).toFixed(0);let l={id:o,value:e==null||e===!1?"":e,localValue:t==null||t===!1?"":t,disabled:n,type:r};return this._setTag(l),i>=0?this.tags.splice(i,0,l):i=this.tags.push(l),this.$nextTick(()=>{this.$refs["promptTagEdit-"+o]&&Vg(this.$refs["promptTagEdit-"+o][0])}),i-1},renderTag(e){let t=this.tags.find(i=>i.id===e);if(!t)return"";let n=t.value;if(n=he.escapeHtml(n),t.incWeight>0){n=he.setLayers(n,0,"(",")"),n='<div class="character">'+n+"</div>";let i='<div class="weight-character">'+"(".repeat(t.incWeight)+"</div>",r='<div class="weight-character">'+")".repeat(t.incWeight)+"</div>";n=i+n+r}else if(t.decWeight>0){n=he.setLayers(n,0,"[","]"),n='<div class="character">'+n+"</div>";let i='<div class="weight-character">'+"[".repeat(t.decWeight)+"</div>",r='<div class="weight-character">'+"]".repeat(t.decWeight)+"</div>";n=i+n+r}else n='<div class="character">'+n+"</div>";return n},isFavorite(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;if(typeof window.phystonPromptfavorites=="object"){for(const n of window.phystonPromptfavorites)if(n.key===this.favoriteKey){for(const i of n.list)if(i.tags.length===1&&i.tags[0].value===t.value)return i.id}}return!1},onTagMouseEnter(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;t.isFavorite=this.isFavorite(t.id)},onTagMouseMove(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.$refs.highlightPrompt.show(t)},onTagClick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{this.editing={},this.editing[t.id]=!0,this.$forceUpdate(),this.$nextTick(()=>{const n=this.$refs["promptTagEdit-"+t.id][0];n.focus(),n.dispatchEvent(new Event("input"))}),clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;clearTimeout(this.tagClickTimeId),this.onDisabledTagClick(t.id)},onTagInputBlur(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.editing[t.id]=!1},onTagInputKeyDown(e,t){if(t.keyCode===13){let n=this.tags.find(i=>i.id===e);if(!n)return!1;this.editing[n.id]=!1,n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())}},onTagInputChange(e,t){let n=this.tags.find(i=>i.id===e);if(!n)return!1;n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())},onTagWeightNumChange(e,t){let n=this.tags.find(l=>l.id===e);if(!n)return!1;if(t=typeof t=="number"||typeof a=="string"?t:t.target.value,n.weightNum==t)return;let i=t,r=n.value,o=n.localValue;if(i>0){if(i===1&&!this.autoKeepWeightOne){const l=he.hasBrackets(r);l[0]==="("&&l[1]===")"&&(r=he.setLayers(r,0,l[0],l[1]),o!==""&&(o=he.setLayers(o,0,l[0],l[1]))),r=r.replace(he.weightNumRegex,"$1"),o!==""&&(o=o.replace(he.weightNumRegex,"$1"))}else{if(!he.weightNumRegex.test(r)){let l=he.hasBrackets(r);l?(r=he.setLayers(r,1,l[0],l[1],":"+i),o!==""&&(o=he.setLayers(o,1,l[0],l[1],":"+i))):(r=r+":"+i,o!==""&&(o=o+":"+i))}he.hasBrackets(r)||(r=he.setLayers(r,1,"(",")"),o!==""&&(o=he.setLayers(o,1,"(",")")))}r!==n.value&&(n.value=r,o!==""&&(n.localValue=o),this._setTag(n))}else{const l=he.hasBrackets(r);l[0]==="<"&&l[1]===">"?i=.1:this.autoKeepWeightZero?(n.value=r.replace(he.weightNumRegex,"$1:0"),o!==""&&(n.localValue=n.localValue.replace(he.weightNumRegex,"$1:0"))):(n.value=r.replace(he.weightNumRegex,"$1"),o!==""&&(n.localValue=n.localValue.replace(he.weightNumRegex,"$1")))}n.weightNum=i,this.updateTags()},onDeleteTagClick(e){let t=this.tags.find(i=>i.id===e);if(!t)return!1;let n=this.tags.indexOf(t);this.tags.splice(n,1),this.updateTags()},onFavoriteTagClick(e){let t=this.tags.find(i=>i.id===e);if(!t)return!1;let n=this.isFavorite(t.id);n?this.gradioAPI.unFavorite(this.favoriteKey,n).then(i=>{i&&(t.isFavorite=!1,this.$emit("refreshFavorites",this.favoriteKey))}):this.gradioAPI.pushFavorite(this.favoriteKey,[t],t.value,t.localValue===""?t.value:t.localValue).then(i=>{i&&(t.isFavorite=!0,this.$emit("refreshFavorites",this.favoriteKey))})},onDisabledTagClick(e){let t=this.tags.find(n=>n.id===e);t&&(t.disabled=!t.disabled,this.updateTags())},onIncWeightClick(e,t){let n=this.tags.find(l=>l.id===e);if(!n)return;let i=n.value,r=n.localValue;i=he.setLayers(i,0,"[","]"),r!==""&&(r=he.setLayers(r,0,"[","]"));let o=n.incWeight;o+=t,o<0&&(o=0),n.incWeight=o,n.decWeight=0,i=he.setLayers(i,o,"(",")"),r!==""&&(r=he.setLayers(r,o,"(",")")),n.value=i,r!==""&&(n.localValue=r),this.updateTags()},onDecWeightClick(e,t){let n=this.tags.find(l=>l.id===e);if(!n)return;let i=n.value,r=n.localValue;i=he.setLayers(i,0,"(",")"),r!==""&&(r=he.setLayers(r,0,"(",")"));let o=n.decWeight;o+=t,o<0&&(o=0),n.incWeight=0,n.decWeight=o,i=he.setLayers(i,o,"[","]"),r!==""&&(r=he.setLayers(r,o,"[","]")),n.value=i,r!==""&&(n.localValue=r),this.updateTags()},onWrapTagClick(e){let t=this.tags.find(o=>o.id===e);if(!t)return;let n=this.tags.indexOf(t),i=this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap"),r=this.tags[i];this.tags.splice(i,1),this.tags.splice(n+1,0,r),this.updateTags()},onTranslateToLocalClick(e){let t=this.tags.find(i=>i.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_local"]||this.translates([n],!0,!0).finally(()=>{this.updateTags()})},onTranslateToEnglishClick(e){let t=this.tags.find(i=>i.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_en"]||this.translates([n],!1,!0).finally(()=>{this.updateTags()})}}},Xg={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(e,t){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let e=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[e]){this.svgCode=localStorage.getItem("iconSVG-"+e);return}if(localStorage.getItem("iconSVG-"+e)&&(this.svgCode=localStorage.getItem("iconSVG-"+e)),window.loadingSvg[e]){const t=setInterval(()=>{window.loadingSvg[e]||(clearInterval(t),this.svgCode=localStorage.getItem("iconSVG-"+e))},10);return}window.loadingSvg[e]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+e+".svg",window.iconSvgHash).then(t=>{this.svgCode=t,localStorage.setItem("iconSVG-"+e,t),window.isLoadSvg[e]=!0,window.loadingSvg[e]=!1}).catch(t=>{window.loadingSvg[e]=!1})}}},Yg=["innerHTML"];function Gg(e,t,n,i,r,o){return xe((F(),U("div",{class:Lt(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:r.svgCode},null,10,Yg)),[[xt,r.svgCode]])}const Bn=un(Xg,[["render",Gg]]),Jg={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(e){this.lastHighLightTag&&this.lastHighLightTag.value===e.value||(this.lastHighLightTag=e,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(e),this.showTimeId=0},10))},_show(e){if(this.hideDefaultInput)return this._hide();if(typeof e.type=="string"&&e.type==="wrap")return this._hide();let t=e.value,n=this.textarea.value;if(t===""||t.trim()==="")return this._hide();if(n===""||n.trim()==="")return this._hide();if(t=he.escapeHtml(t),n=he.escapeHtml(this.textarea.value),n.indexOf(t)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const r=window.getComputedStyle(this.textarea);for(const c of r)this.$refs.highlightPrompt.style[c]=r[c];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let o="",l=n;for(;;){const c=l.indexOf(t);if(c===-1){o+=l;break}const d=c+t.length;o+=l.substring(0,c),o+='<span class="physton-highlight-prompt">',o+=l.substring(c,d),o+="</span>",l=l.substring(d)}this.$refs.highlightPrompt.innerHTML=o,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function Zg(e,t,n,i,r,o){return F(),U("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...l)=>o.hide&&o.hide(...l))},null,512)}const Qg={name:"PhystonPrompt",components:{HighlightPrompt:un(Jg,[["render",Zg]]),VueNumberInput:Hg,IconSvg:Bn},mixins:[Gn,Bg,jg,zg],props:{name:{type:String,required:!0},neg:{type:Boolean,default:!1},textarea:{type:Object,required:!0},steps:{type:Object,required:!0},canOneTranslate:{type:Boolean,default:!1},autoTranslate:{type:Boolean,default:!1},autoTranslateToEnglish:{type:Boolean,default:!1},autoTranslateToLocal:{type:Boolean,default:!1},autoRemoveSpace:{type:Boolean,default:!1},autoRemoveLastComma:{type:Boolean,default:!1},autoKeepWeightZero:{type:Boolean,default:!1},autoKeepWeightOne:{type:Boolean,default:!1},hideDefaultInput:{type:Boolean,default:!1},hidePanel:{type:Boolean,default:!1},enableTooltip:{type:Boolean,default:!0},historyKey:{type:String,default:""},favoriteKey:{type:String,default:""},extraNetworks:{type:Array,default:()=>[]},loras:{type:Array,default:()=>[]},lycos:{type:Array,default:()=>[]},embeddings:{type:Array,default:()=>[]},version:{type:String,default:""},latestVersion:{type:String,default:""},isLatestVersion:{type:Boolean,default:!0},theme:{type:String,default:"dark"}},emits:["update:languageCode","update:autoTranslate","update:autoTranslateToEnglish","update:autoTranslateToLocal","update:autoRemoveSpace","update:autoRemoveLastComma","update:autoKeepWeightZero","update:autoKeepWeightOne","update:hideDefaultInput","update:hidePanel","update:enableTooltip","update:translateApi","click:translateApi","click:promptFormat","click:selectTheme","click:switchTheme","click:showAbout","click:selectLanguage","click:showHistory","click:showFavorite","refreshFavorites","click:showChatgpt"],data(){return{prompt:"",counterText:"0/75",tags:[],sortable:null,droping:!1,loading:{},editing:{}}},computed:{isEnglish(){return this.languageCode==="en_US"},translateApiItem(){return he.getTranslateApiItem(this.translateApis,this.translateApi)}},watch:{loras:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1},lycos:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1},embeddings:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1}},mounted(){this.$nextTick(()=>{this.initSortable();let e=[1e3,3e3,5e3,1e4],t=!1;e.forEach(n=>{t||setTimeout(()=>{t||typeof addAutocompleteToArea=="function"&&typeof TAC_CFG=="object"&&TAC_CFG&&TAC_CFG.activeIn&&(t=!0,addAutocompleteToArea(this.$refs.promptTagAppend))},n)}),this.init()})},methods:{init(){this.tags=[],this.onTextareaChange()},onTextareaChange(e){const t=this.textarea.parentElement.getElementsByClassName("autocompleteResults");if(t.length>0&&t[0].style.display!=="none")return;let n=this.textarea.value.trim();if(n===this.prompt.trim())return;let i=he.splitTags(n),r=[];this.tags.forEach((c,d)=>{c.disabled&&r.push({tag:c,index:d})}),r.forEach(({tag:c,index:d})=>{i.splice(d,0,c.value)});let o=[],l=this.tags;this.tags=[];for(let c in i){let d=i[c];if(d===`
|
||
`)this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap");else{let m=!1;for(let H of l)if(H.value===d){m=H;break}const g=m?m.localValue:"",w=m?m.disabled:!1,T=this._appendTag(d,g,w,-1,"text");!m&&T!==-1&&o.push(T)}}if(this.autoTranslateToLocal&&e){let c=!(this.tagCompleteFile&&this.onlyCsvOnAuto);c=!1,this.translates(o,!0,c).finally(()=>{this.updateTags()})}else this.updateTags()},_setTextareaFocus(){if(typeof get_uiCurrentTabContent!="function"||typeof activePromptTextarea!="object")return;const e=get_uiCurrentTabContent();if(!e)return;let t=e.id.replace("tab_","");t&&(activePromptTextarea[t]=this.textarea)},copy(e){this.$copyText(e).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},genPrompt(e=null,t=!1){e=e||this.tags;let n=[],i=e.length;return e.forEach((r,o)=>{let l="";if(typeof r.type=="string"&&r.type==="wrap")l=`
|
||
`;else{let c=he.replaceTag(r.value);c!==r.value&&(r.value=c,this._setTag(r));let d=he.replaceTag(r.localValue);if(d!==r.localValue&&(r.localValue=d),r.weightNum>0&&(r.weightNum=Number(parseFloat(r.weightNum).toFixed(6)),r.value=r.value.replace(he.weightNumRegex,"$1:"+r.weightNum),r.localValue!==""&&(r.localValue=r.localValue.replace(he.weightNumRegex,"$1:"+r.weightNum))),r.disabled&&!t)return;let m=","+(this.autoRemoveSpace?"":" "),g=null,w=!1;if(o+1<i&&(g=e[o+1],typeof g.type=="string"&&g.type==="wrap"&&(w=!0)),w){const T=[" BREAK"," ADDCOL"," ADDROW"," ADDCOMM"," ADDBASE"];for(const H of T)r.value.endsWith(H)&&(m="")}r.value==="BREAK"&&(m=" "),this.autoRemoveLastComma&&o+1===i&&(m=""),l=r.value+m}l&&n.push(l)}),n.length<=0?"":n.join("")},updatePrompt(){this.prompt=this.genPrompt(),this.textarea.value=this.prompt,he.hideCompleteResults(this.textarea),typeof updateInput=="function"?updateInput(this.textarea):this.textarea.dispatchEvent(new Event("input"))},updateTags(){console.log("tags change",this.tags),this.updatePrompt();const e=this.steps.querySelector('input[type="number"]').value;this.gradioAPI.tokenCounter(this.textarea.value,e).then(t=>{const{token_count:n,max_length:i}=t;this.counterText=`${n}/${i}`}),this.tags.length&&this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{t&&t.prompt===this.prompt?this.gradioAPI.setHistory(this.historyKey,t.id,this.tags,this.prompt,t.name).then(n=>{}).catch(n=>{}):this.gradioAPI.pushHistory(this.historyKey,this.tags,this.prompt).then(n=>{}).catch(n=>{})}).catch(t=>{}),this.$nextTick(()=>{for(let t=0;t<this.$refs.promptTagsList.children.length;t++){let n=this.$refs.promptTagsList.children[t];if(!n.classList.contains("prompt-tag"))continue;let i=n.getAttribute("data-id"),r=this.$refs.promptTagWrap.find(o=>o.getAttribute("data-id")===i);r&&n.parentNode.insertBefore(r,n.nextElementSibling)}})},onResize(){this.tags.forEach(e=>{this._setTagHeight(e)})},initSortable(){this.sortable=Je.create(this.$refs.promptTagsList,{animation:150,handle:".prompt-tag-value",draggable:".prompt-tag",onEnd:e=>{if(this.dropTags.length){let n=e.item,i=n.getAttribute("data-id"),r=this._getDropTagsEle(),o=r.findIndex(d=>d.getAttribute("data-id")===i),l=r.slice(0,o),c=r.slice(o+1).reverse();l.forEach(d=>{he.insertBefore(d,n)}),c.forEach(d=>{he.insertAfter(d,n)})}this._dropOver(),this.droping=!1;let t=[];for(let n=0;n<this.$refs.promptTagsList.children.length;n++){let i=this.$refs.promptTagsList.children[n];if(!i.classList.contains("prompt-tag"))continue;let r=i.getAttribute("data-id");t.push(r)}this.tags=this.tags.sort((n,i)=>t.indexOf(n.id)-t.indexOf(i.id)),this.$forceUpdate(),this.updateTags()},onChoose:e=>{if(console.log(e),this.dropTags.length){let n=e.item.getAttribute("data-id");this._getDropTagsEle().forEach(r=>{r.getAttribute("data-id")!==n&&(r.style.display="block",r.style.transition="transform 0.2s",r.style.transform="scale(0)",setTimeout(()=>{r.style.transition="",r.style.transform="",r.style.display="none"},300))})}this.editing={},this.droping=!0},onUnchoose:e=>{if(this.droping=null,this.dropTags.length){let n=e.item.getAttribute("data-id");this._getDropTagsEle().forEach(r=>{r.getAttribute("data-id")!==n&&(r.style.display="")})}}})},useHistory(e){this.tags=[],e.tags.forEach(t=>{this._appendTag(t.value,t.localValue,t.disabled,-1,t.type||"text")}),this.updateTags()},useFavorite(e){this.useHistory(e)},useChatgpt(e){let t=he.splitTags(e);this.tags=[],t.forEach(n=>{this._appendTag(n,"",!1,-1,"text")}),this.updateTags()},onPromptMainClick(){this.onTextareaChange(!0),this._setTextareaFocus()},translates(e,t=!1,n=!0){return new Promise((i,r)=>{if(this.languageCode==="en_US"||this.languageCode==="en_GB"){i();return}let o=[],l=(w,T)=>{w.forEach(H=>{c(H,T)})},c=(w,T)=>{this.canOneTranslate?(this.loading[w.id+"_local"]=T,this.loading[w.id+"_en"]=T):w.toLocal?this.loading[w.id+"_local"]=T:this.loading[w.id+"_en"]=T},d=(w,T)=>{w.toLocal?w.localValue=T:(w.localValue=w.value,w.value=T),this._setTagById(w.id,w.value,w.localValue)},m=w=>w.isLora&&w.loraExists?this.getExtraNetworkFullName(w.loraName,"lora"):w.isLyco&&w.lycoExists?this.getExtraNetworkFullName(w.lycoName,"lycoris"):w.isEmbedding?this.getExtraNetworkFullName(w.value,"textual inversion"):w.value;e.forEach(w=>{let T=this.tags[w],H=m(T);if(H!==T.value){T.localValue=H;return}if(he.canTranslate(T.value)){if(T.isEnglish=he.isEnglishByLangCode(T.value,this.languageCode),T.isEnglish===-1)t?T.toLocal=!0:T.toLocal=!1;else if(T.isEnglish===0)if(t)if(T.localValue==="")T.localValue=T.value,T.toLocal=!1;else{const x=T.value;T.value=T.localValue,T.localValue=x}else T.toLocal=!1;else T.toLocal=!0;c(T,!0),o.push(T)}});const g=w=>{if(w.length<=0){l(w,!1),i();return}let T={};w.forEach((x,I)=>{let V=x.toLocal?"en_US":this.languageCode,N=x.toLocal?this.languageCode:"en_US",te=V+"."+N;T[te]||(T[te]={fromLang:V,toLang:N,tags:[]}),T[te].tags.push(x)});const H=()=>{let x=T[Object.keys(T)[0]];if(!x){i();return}let I=x.tags.map(V=>m(V));this.gradioAPI.translates(I,x.fromLang,x.toLang,this.translateApi,this.translateApiConfig).then(V=>{V.success?(V.translated_text.forEach((te,ye)=>{te=te.replace(/\.$/,"").trim(),he.isEnglish(te)&&te!==te.toUpperCase()&&(te=te.toLowerCase());let D=x.tags[ye];te!==""&&d(D,te),c(D,!1)}),delete T[Object.keys(T)[0]],H()):(l(w,!1),this.$toastr.error(V.message),r(V.message))}).catch(V=>{l(w,!1),this.$toastr.error(V.message),r(V.message)})};H()};if(this.tagCompleteFile){let w=[];o.forEach(T=>{const H=he.splitTag(T.value);H.value!==T.value&&(T.value=H.value,T.splits=H),T.toLocal?w.push(this.translateToLocalByCSV(T.value)):w.push(this.translateToEnByCSV(T.value))}),Promise.all(w).then(T=>{let H=[];T.forEach((x,I)=>{let V=o[I];V.splits&&(V.value=V.splits.left+V.value+V.splits.right),x===""?H.push(V):(V.splits&&(x=V.splits.left+x+V.splits.right),c(V,!1),d(V,x))}),n?g(H):(l(H,!1),i())}).catch(T=>{l(o,!1),this.$toastr.error(T),r(T)})}else n?g(o):(l(o,!1),i())})}}},em=["name"],tm={class:"prompt-header"},nm={class:"prompt-header-title"},im={class:"prompt-header-extend"},rm={class:"extend-content"},sm={class:"extend-btn-group"},om={key:0,class:"gradio-checkbox hover-scale-120"},am=["checked"],lm={class:"gradio-checkbox hover-scale-120"},um=["checked"],cm={class:"gradio-checkbox hover-scale-120"},fm=["checked"],dm={class:"gradio-checkbox hover-scale-120"},pm=["checked"],hm={class:"gradio-checkbox"},gm={value:"disabled"},mm={value:"last"},vm=["label"],ym=["value"],bm={class:"prompt-header-extend"},Cm={class:"extend-content"},wm={class:"extend-btn-group"},_m={key:0,class:"prompt-header-extend"},Tm={class:"extend-content"},Em={class:"extend-btn-group"},km={class:"prompt-header-extend"},Sm={class:"extend-content"},xm={class:"extend-btn-group"},Am={key:1,class:"prompt-header-extend"},Lm={class:"extend-content"},Om={class:"extend-btn-group"},Dm={class:"prompt-header-extend prompt-append"},Im={class:"extend-content"},Pm={class:"gradio-checkbox hover-scale-120"},Nm={key:0},Rm=["checked"],Mm={key:1},Fm=["checked"],Hm=["placeholder"],Bm=["onClick"],jm={class:"arrow-right"},$m=["onMouseleave","onMouseenter","onClick"],Um={key:0,class:"tags-name"},Wm={key:1,class:"tags-name"},Km={class:"tags-detail"},qm={class:"tags-list"},Vm={key:0,class:"item-wrap"},zm={key:1,class:"tags-item"},Xm={class:"item-tag-value"},Ym={class:"item-tag-local-value"},Gm={class:"prompt-tags-list",ref:"promptTagsList"},Jm=["data-id"],Zm=["onMouseenter","onMousemove"],Qm={class:"prompt-tag-edit"},ev=["onClick","onDblclick","innerHTML"],tv=["placeholder","value","onBlur","onKeydown","onChange"],nv=["onClick"],iv=["onClick"],rv=["onClick"],sv=["onClick"],ov=["onClick"],av=["onClick"],lv=["onClick"],uv=["onClick"],cv=["onClick"],fv=["onClick"],dv={class:"prompt-local-language"},pv=["onClick"],hv={class:"local-language"},gv=["data-id"],mv={class:"btns-title"};function vv(e,t,n,i,r,o){const l=Pt("icon-svg"),c=Pt("vue-number-input"),d=Pt("highlight-prompt"),m=Ws("tooltip");return F(),U("div",{class:"physton-prompt",name:n.name},[_("div",{class:Lt(["prompt-main",n.hidePanel?"fold":""]),onClick:t[54]||(t[54]=(...g)=>o.onPromptMainClick&&o.onPromptMainClick(...g))},[_("div",tm,[_("div",{class:"prompt-unfold",onClick:t[0]||(t[0]=(...g)=>e.onUnfoldClick&&e.onUnfoldClick(...g))},[De(l,{class:"hover-scale-120",name:"unfold"})]),_("div",nm,ve(n.neg?e.getLang("negative_prompt"):e.getLang("prompt")),1),xe(_("div",{class:"prompt-header-counter"},"("+ve(r.counterText)+")",513),[[xt,r.counterText]]),_("div",im,[_("div",rm,[_("div",sm,[xe((F(),U("div",{class:"extend-btn-item",onClick:t[1]||(t[1]=g=>e.$emit("click:selectLanguage",g))},[De(l,{class:"hover-scale-120",name:"i18n"})])),[[m,"Language: "+e.langName]]),_("div",{class:Lt(["extend-btn-item",n.isLatestVersion?"":"red-dot"])},[xe(De(l,{class:"hover-scale-120",name:"setting"},null,512),[[m,e.getLang("setting_desc")]]),_("div",{class:"setting-box",onMouseenter:t[13]||(t[13]=(...g)=>e.onSettingBoxMouseEnter&&e.onSettingBoxMouseEnter(...g))},[o.translateApiItem.name&&!o.isEnglish?xe((F(),U("div",{key:0,class:"extend-btn-item",onClick:t[2]||(t[2]=g=>e.$emit("click:translateApi",g))},[De(l,{class:"hover-scale-120",name:"api"})])),[[m,e.getLang("translate_api")+": "+o.translateApiItem.name]]):qe("",!0),xe((F(),U("div",{class:"extend-btn-item",onClick:t[3]||(t[3]=g=>e.$emit("click:promptFormat",g))},[De(l,{class:"hover-scale-120",name:"format"})])),[[m,e.getLang("prompt_format")]]),xe((F(),U("div",{class:"extend-btn-item",onClick:t[4]||(t[4]=g=>e.$emit("click:selectTheme",g))},[De(l,{class:"hover-scale-120",name:"theme"})])),[[m,e.getLang("theme_extension")]]),xe((F(),U("div",{class:"extend-btn-item",onClick:t[5]||(t[5]=g=>e.$emit("click:switchTheme",g))},[De(l,{class:"hover-scale-120",name:n.theme==="dark"?"sun":"moon"},null,8,["name"])])),[[m,e.getLang(n.theme==="dark"?"switch_to_light_theme":"switch_to_dark_theme")]]),xe((F(),U("div",{class:Lt(["extend-btn-item",n.isLatestVersion?"":"red-dot"]),onClick:t[6]||(t[6]=g=>e.$emit("click:showAbout",g))},[De(l,{class:"hover-scale-120",name:"about"})],2)),[[m,e.getLang("about_desc")]]),o.isEnglish?qe("",!0):(F(),U($e,{key:1},[n.canOneTranslate?(F(),U("div",om,[xe((F(),U("label",null,[_("input",{type:"checkbox",name:"auto_translate",value:"1",checked:n.autoTranslate,onChange:t[7]||(t[7]=g=>e.$emit("update:autoTranslate",g.target.checked))},null,40,am),De(l,{name:"translate"})])),[[m,e.getLang("auto_translate")]])])):(F(),U($e,{key:1},[_("div",lm,[xe((F(),U("label",null,[_("input",{type:"checkbox",name:"auto_translate_to_local_language",value:"1",checked:n.autoTranslateToLocal,onChange:t[8]||(t[8]=g=>e.$emit("update:autoTranslateToLocal",g.target.checked))},null,40,um),De(l,{name:"translate"})])),[[m,e.getLang("auto_translate_to_local_language")]])]),_("div",cm,[xe((F(),U("label",null,[_("input",{type:"checkbox",name:"auto_translate_to_english",value:"1",checked:n.autoTranslateToEnglish,onChange:t[9]||(t[9]=g=>e.$emit("update:autoTranslateToEnglish",g.target.checked))},null,40,fm),De(l,{name:"english"})])),[[m,e.getLang("auto_translate_to_english")]])])],64))],64)),_("div",dm,[xe((F(),U("label",null,[_("input",{type:"checkbox",name:"enable_tooltip",value:"1",checked:n.enableTooltip,onChange:t[10]||(t[10]=g=>e.$emit("update:enableTooltip",g.target.checked))},null,40,pm),De(l,{name:"tooltip"})])),[[m,e.getLang("whether_to_enable_tooltip")]])]),_("div",hm,[xe((F(),U("label",null,[xe(_("select",{"onUpdate:modelValue":t[11]||(t[11]=g=>e.autoInputPrompt=g),onChange:t[12]||(t[12]=(...g)=>e.onAutoInputPromptChange&&e.onAutoInputPromptChange(...g))},[_("option",gm,ve(e.getLang("auto_input_prompt"))+": "+ve(e.getLang("disabled")),1),_("option",mm,ve(e.getLang("last_input_prompt")),1),(F(!0),U($e,null,yt(e.getCurrentTypeFavorites(),g=>(F(),U("optgroup",{key:g.key,label:e.getLang("favorite")+" / "+e.getLang(g.name)},[(F(!0),U($e,null,yt(g.list,w=>(F(),U("option",{value:w.id},ve(w.name||w.prompt.substring(0,40)),9,ym))),256))],8,vm))),128))],544),[[jr,e.autoInputPrompt]])])),[[m,e.getLang("auto_input_prompt")]])])],32)],2)])])]),_("div",bm,[_("div",Cm,[_("div",wm,[xe((F(),U("div",{class:"extend-btn-item",ref:"historyButton",onClick:t[14]||(t[14]=g=>e.$emit("click:showHistory",g))},[De(l,{class:"hover-scale-120",name:"history"})])),[[m,e.getLang("history")]]),xe((F(),U("div",{class:"extend-btn-item",ref:"favoriteButton",onClick:t[15]||(t[15]=g=>e.$emit("click:showFavorite",g))},[De(l,{class:"hover-scale-120",name:"favorite"})])),[[m,e.getLang("favorite")]])])])]),o.isEnglish?qe("",!0):(F(),U("div",_m,[_("div",Tm,[_("div",Em,[n.canOneTranslate?xe((F(),U("div",{key:0,class:"extend-btn-item",onClick:t[16]||(t[16]=(...g)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...g))},[r.loading.all_local?qe("",!0):(F(),wt(l,{key:0,class:"hover-scale-120",name:"translate"})),r.loading.all_local?(F(),wt(l,{key:1,class:"hover-scale-120",name:"loading"})):qe("",!0)])),[[m,e.getLang("one_translate_all_keywords")]]):(F(),U($e,{key:1},[xe((F(),U("div",{class:"extend-btn-item",onClick:t[17]||(t[17]=(...g)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...g))},[r.loading.all_local?qe("",!0):(F(),wt(l,{key:0,class:"hover-scale-120",name:"translate"})),r.loading.all_local?(F(),wt(l,{key:1,class:"hover-scale-120",name:"loading"})):qe("",!0)])),[[m,e.getLang("translate_keywords_to_local_language")]]),xe((F(),U("div",{class:"extend-btn-item",onClick:t[18]||(t[18]=(...g)=>e.onTranslatesToEnglishClick&&e.onTranslatesToEnglishClick(...g))},[r.loading.all_en?qe("",!0):(F(),wt(l,{key:0,class:"hover-scale-120",name:"english"})),r.loading.all_en?(F(),wt(l,{key:1,class:"hover-scale-120",name:"loading"})):qe("",!0)])),[[m,e.getLang("translate_all_keywords_to_english")]])],64))])])])),_("div",km,[_("div",Sm,[_("div",xm,[xe((F(),U("div",{class:"extend-btn-item",onClick:t[19]||(t[19]=(...g)=>e.onCopyAllTagsClick&&e.onCopyAllTagsClick(...g))},[De(l,{class:"hover-scale-120",name:"copy"})])),[[m,e.getLang("copy_keywords_to_clipboard")]]),xe((F(),U("div",{class:"extend-btn-item",onClick:t[20]||(t[20]=(...g)=>e.onDeleteAllTagsClick&&e.onDeleteAllTagsClick(...g))},[De(l,{class:"hover-scale-120",name:"remove"})])),[[m,e.getLang("delete_all_keywords")]])])])]),n.neg?qe("",!0):(F(),U("div",Am,[_("div",Lm,[_("div",Om,[xe((F(),U("div",{class:"extend-btn-item",onClick:t[21]||(t[21]=g=>e.$emit("click:showChatgpt",g))},[De(l,{class:"hover-scale-120",name:"chatgpt"})])),[[m,e.getLang("use_chatgpt_gen_prompts")]])])])])),_("div",Dm,[_("div",Im,[_("div",Pm,[n.hideDefaultInput?xe((F(),U("label",Nm,[_("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[22]||(t[22]=g=>e.$emit("update:hideDefaultInput",!g.target.checked))},null,40,Rm),De(l,{name:"input"})])),[[m,e.getLang("show_default_input_box")]]):xe((F(),U("label",Mm,[_("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[23]||(t[23]=g=>e.$emit("update:hideDefaultInput",!g.target.checked))},null,40,Fm),De(l,{name:"input"})])),[[m,e.getLang("hide_default_input_box")]])]),xe(_("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-append",ref:"promptTagAppend",placeholder:e.getLang("please_enter_new_keyword"),onFocus:t[24]||(t[24]=(...g)=>e.onAppendTagFocus&&e.onAppendTagFocus(...g)),onBlur:t[25]||(t[25]=(...g)=>e.onAppendTagBlur&&e.onAppendTagBlur(...g)),onKeyup:t[26]||(t[26]=(...g)=>e.onAppendTagKeyUp&&e.onAppendTagKeyUp(...g)),onKeydown:t[27]||(t[27]=(...g)=>e.onAppendTagKeyDown&&e.onAppendTagKeyDown(...g))},null,40,Hm),[[m,e.getLang("enter_to_add")]]),xe(_("div",{class:"prompt-append-list",ref:"promptAppendList",style:Gt(e.appendListStyle)},[(F(!0),U($e,null,yt(e.appendList,(g,w)=>(F(),U("div",{key:g.type,class:Lt(["prompt-append-group",e.appendListSelected===w?"selected":""])},[_("div",{class:"append-group-name",onClick:T=>e.onAppendGroupClick(w,null,T)},[g.icon==="wrap"?(F(),wt(l,{key:0,class:"name-icon",name:"wrap"})):g.icon==="history"?(F(),wt(l,{key:1,class:"name-icon",name:"history"})):g.icon==="favorite"?(F(),wt(l,{key:2,class:"name-icon",name:"favorite"})):qe("",!0),$t(" "+ve(e.appendListItemName(g))+" ",1),xe(_("span",jm,null,512),[[xt,g.children.length>0]])],8,Bm),xe(_("div",{class:"append-group-list",ref_for:!0,ref:"promptAppendListChildren"},[(F(!0),U($e,null,yt(g.children,(T,H)=>(F(),U("div",{key:H,ref_for:!0,ref:"promptAppendListChild",class:Lt(["append-item",e.appendListChildSelected===H?"selected":""]),onMouseleave:x=>e.onAppendListChildMouseLeave(w,H,x),onMouseenter:x=>e.onAppendListChildMouseEnter(w,H,x),onClick:x=>e.onAppendGroupClick(w,H,x)},[g.type==="favorite"||g.type==="history"?(F(),U($e,{key:0},[T.name?(F(),U("div",Um,ve(T.name),1)):(F(),U("div",Wm,ve(T.prompt),1))],64)):qe("",!0)],42,$m))),128))],512),[[xt,g.children.length>0]]),xe(_("div",Km,[_("div",qm,[(F(!0),U($e,null,yt(e.appendListChildItemTags,(T,H)=>(F(),U($e,{key:H},[T.type&&T.type==="wrap"?(F(),U("div",Vm)):(F(),U("div",zm,[_("div",Xm,ve(T.value),1),_("div",Ym,ve(T.localValue),1)]))],64))),128))])],512),[[xt,e.appendListSelected!==null&&e.appendListChildSelected!==null&&e.appendListSelected===w&&(g.type==="favorite"||g.type==="history")]])],2))),128))],4),[[xt,e.showAppendList]])])])]),_("div",{class:Lt(["prompt-tags",r.droping?"droping":"",e.dropIsSelecting||e.dropIsEnd&&e.dropTags.length?"selecting":""]),ref:"promptTags",onMousedown:t[51]||(t[51]=(...g)=>e.onDropMouseDown&&e.onDropMouseDown(...g)),onMousemove:t[52]||(t[52]=(...g)=>e.onDropMouseMove&&e.onDropMouseMove(...g)),onMouseup:t[53]||(t[53]=(...g)=>e.onDropMouseUp&&e.onDropMouseUp(...g))},[_("div",Gm,[(F(!0),U($e,null,yt(r.tags,(g,w)=>(F(),U("div",{key:g.id,class:Lt(["prompt-tag",g.disabled?"disabled":"",g.type==="wrap"?"wrap-tag":""]),ref_for:!0,ref:"promptTag-"+g.id,"data-id":g.id},[_("div",{class:"prompt-tag-main",onMouseenter:T=>e.onTagMouseEnter(g.id),onMousemove:ct(T=>e.onTagMouseMove(g.id),["stop"])},[_("div",Qm,[g.type==="wrap"?xe((F(),U("div",{key:0,class:"prompt-tag-value",ref_for:!0,ref:"promptTagValue-"+g.id,style:{width:"100%"}},[De(l,{name:"wrap"})])),[[m,e.getLang("line_break_character")+"<br/>"+e.getLang("drop_to_order")]]):(F(),U($e,{key:1},[xe(_("div",{class:Lt(g.classes),ref_for:!0,ref:"promptTagValue-"+g.id,onClick:T=>e.onTagClick(g.id,T),onDblclick:T=>e.onTagDblclick(g.id),innerHTML:e.renderTag(g.id)},null,42,ev),[[xt,!r.editing[g.id]],[m,e.getLang("click_to_edit")+"<br/>"+e.getLang("dblclick_to_disable")+"<br/>"+e.getLang("drop_to_order")]]),xe(_("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-edit",ref_for:!0,ref:"promptTagEdit-"+g.id,placeholder:e.getLang("enter_to_save"),value:g.value,onMousedown:t[28]||(t[28]=ct(()=>{},["stop"])),onMousemove:t[29]||(t[29]=ct(()=>{},["stop"])),onMouseup:t[30]||(t[30]=ct(()=>{},["stop"])),onBlur:T=>e.onTagInputBlur(g.id),onKeydown:T=>e.onTagInputKeyDown(g.id,T),onChange:T=>e.onTagInputChange(g.id,T)},null,40,tv),[[xt,r.editing[g.id]]])],64)),_("div",{class:"btn-tag-delete",ref_for:!0,ref:"promptTagDelete-"+g.id,onClick:T=>e.onDeleteTagClick(g.id),onMousedown:t[31]||(t[31]=ct(()=>{},["stop"])),onMousemove:t[32]||(t[32]=ct(()=>{},["stop"])),onMouseup:t[33]||(t[33]=ct(()=>{},["stop"]))},[De(l,{name:"close"})],40,nv)]),xe(_("div",{class:"btn-tag-extend",onMousedown:t[34]||(t[34]=ct(()=>{},["stop"])),onMousemove:t[35]||(t[35]=ct(()=>{},["stop"])),onMouseup:t[36]||(t[36]=ct(()=>{},["stop"]))},[De(c,{class:"input-number","model-value":g.weightNum,center:"",controls:"",min:0,step:.1,size:"small","onUpdate:modelValue":T=>e.onTagWeightNumChange(g.id,T)},null,8,["model-value","step","onUpdate:modelValue"]),xe((F(),U("button",{type:"button",onClick:T=>e.onIncWeightClick(g.id,1)},[De(l,{name:"weight-parentheses-inc"})],8,iv)),[[m,e.getLang("increase_weight_add_parentheses")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onIncWeightClick(g.id,-1)},[De(l,{name:"weight-parentheses-dec"})],8,rv)),[[m,e.getLang("increase_weight_subtract_parentheses")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onDecWeightClick(g.id,1)},[De(l,{name:"weight-brackets-inc"})],8,sv)),[[m,e.getLang("decrease_weight_add_brackets")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onDecWeightClick(g.id,-1)},[De(l,{name:"weight-brackets-dec"})],8,ov)),[[m,e.getLang("decrease_weight_subtract_brackets")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onWrapTagClick(g.id)},[De(l,{name:"wrap"})],8,av)),[[m,e.getLang("line_break_character")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onTranslateToEnglishClick(g.id)},[r.loading[g.id+"_en"]?qe("",!0):(F(),wt(l,{key:0,name:"english"})),r.loading[g.id+"_en"]?(F(),wt(l,{key:1,name:"loading"})):qe("",!0)],8,lv)),[[m,e.getLang("translate_keyword_to_english")],[xt,!o.isEnglish]]),xe((F(),U("button",{type:"button",onClick:T=>o.copy(g.value)},[De(l,{name:"copy"})],8,uv)),[[m,e.getLang("copy_to_clipboard")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onFavoriteTagClick(g.id)},[g.isFavorite?(F(),wt(l,{key:0,name:"favorite-yes"})):qe("",!0),g.isFavorite?qe("",!0):(F(),wt(l,{key:1,name:"favorite-no"}))],8,cv)),[[m,e.getLang(g.isFavorite?"remove_from_favorite":"add_to_favorite")]]),xe((F(),U("button",{type:"button",onClick:T=>e.onDisabledTagClick(g.id)},[g.disabled?qe("",!0):(F(),wt(l,{key:0,name:"disabled"})),g.disabled?(F(),wt(l,{key:1,name:"enable"})):qe("",!0)],8,fv)),[[m,e.getLang(g.disabled?"enable_keyword":"disable_keyword")]])],544),[[xt,g.type==="text"||!g.type]])],40,Zm),xe(_("div",dv,[xe((F(),U("div",{class:"translate-to-local hover-scale-120",onClick:T=>e.onTranslateToLocalClick(g.id),onMousedown:t[37]||(t[37]=ct(()=>{},["stop"])),onMousemove:t[38]||(t[38]=ct(()=>{},["stop"])),onMouseup:t[39]||(t[39]=ct(()=>{},["stop"]))},[r.loading[g.id+"_local"]?qe("",!0):(F(),wt(l,{key:0,name:"translate"})),r.loading[g.id+"_local"]?(F(),wt(l,{key:1,name:"loading"})):qe("",!0)],40,pv)),[[m,e.getLang("translate_keyword_to_local_language")]]),_("div",hv,ve(g.localValue),1)],512),[[xt,!o.isEnglish&&(g.type==="text"||!g.type)]])],10,Jm))),128)),(F(!0),U($e,null,yt(r.tags,(g,w)=>(F(),U("div",{key:g.id,class:Lt(["prompt-wrap",g.type==="wrap"?"wrap-tag":""]),"data-id":g.id,ref_for:!0,ref:"promptTagWrap",onMousedown:t[40]||(t[40]=ct(()=>{},["stop"])),onMousemove:t[41]||(t[41]=ct(()=>{},["stop"])),onMouseup:t[42]||(t[42]=ct(()=>{},["stop"]))},null,42,gv))),128))],512),_("div",{class:"drop-select-bg",ref:"dropSelectBg",style:Gt({display:e.dropIsStart?"block":"none"})},null,4),_("div",{class:"drop-select-box",ref:"dropSelectBox",style:Gt({display:e.dropIsSelecting?"block":"none",top:e.dropArea.top+"px",left:e.dropArea.left+"px",width:e.dropArea.width+"px",height:e.dropArea.height+"px"})},null,4),_("div",{class:"drop-select-btns",ref:"dropSelectBtns",style:Gt({display:e.dropIsEnd&&e.dropTags.length?"flex":"none",top:e.dropEndY-32+"px",left:e.dropEndX+"px"}),onMousedown:t[48]||(t[48]=ct(()=>{},["stop"])),onMousemove:t[49]||(t[49]=ct(()=>{},["stop"])),onMouseup:t[50]||(t[50]=ct(()=>{},["stop"]))},[_("div",mv,ve(e.getLang("batch_operation")),1),xe((F(),U("button",{type:"button",onClick:t[43]||(t[43]=(...g)=>e.onDropCopy&&e.onDropCopy(...g))},[De(l,{name:"copy"})])),[[m,e.getLang("copy_to_clipboard")]]),xe((F(),U("button",{type:"button",onClick:t[44]||(t[44]=(...g)=>e.onDropFavorite&&e.onDropFavorite(...g))},[De(l,{name:"favorite-no"})])),[[m,e.getLang("add_to_favorite")]]),xe((F(),U("button",{type:"button",onClick:t[45]||(t[45]=(...g)=>e.onDropDisable&&e.onDropDisable(...g))},[De(l,{name:"disabled"})])),[[m,e.getLang("disable_keyword")]]),xe((F(),U("button",{type:"button",onClick:t[46]||(t[46]=(...g)=>e.onDropEnable&&e.onDropEnable(...g))},[De(l,{name:"enable"})])),[[m,e.getLang("enable_keyword")]]),_("button",{type:"button",onClick:t[47]||(t[47]=(...g)=>e.onDropDelete&&e.onDropDelete(...g))},[De(l,{name:"remove"})])],36)],34)],2),De(d,{ref:"highlightPrompt",textarea:n.textarea,"hide-default-input":n.hideDefaultInput},null,8,["textarea","hide-default-input"])],8,em)}const yv=un(Qg,[["render",vv]]),bv={name:"TranslateSetting",components:{IconSvg:Bn},mixins:[Gn],props:{},data(){return{testText:"",translateSuccess:!1,errorMessage:"",translatedText:"",loading:!1,isOpen:!1,configs:[],apiKey:"",tagCompleteFiles:[],tagCompleteFilesLoading:!1,tagCompleteFileKey:"",tagCompleteResults:[],onlyCsvOnAutoValue:!1,mbart50Loading:!1,mbart50Success:!1,mbart50Message:""}},computed:{apiItem(){return he.getTranslateApiItem(this.translateApis,this.apiKey)},supportApi(){if(!this.translateApis||this.translateApis.length<=0)return[];let e=JSON.parse(JSON.stringify(this.translateApis));return e.forEach(t=>{t.children.forEach(n=>{n.disabled=!n.support[this.languageCode]})}),e}},mounted(){this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!1},emits:["update:translateApi","forceUpdate:translateApi","update:tagCompleteFile","update:onlyCsvOnAuto"],watch:{apiKey:{handler:function(e,t){this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!1,this.configs=[],this.gradioAPI.getData("translate_api."+this.apiKey).then(n=>{const i=this.apiItem;if(i&&i.config){for(const r of this.apiItem.config)n?r.value=n[r.key]||r.default:r.value=r.default||"",this.configs.push(r);console.log(this.configs)}})},immediate:!1}},methods:{open(e){this.testText=`Hi, this extension is developed by Physton. Welcome to use it!
|
||
If you have any suggestions or opinions, please feel free to raise an issue or PR on Github.
|
||
If you find this extension helpful, please give me a star on Github!
|
||
|
||
Developed by: Physton
|
||
Github: {{name}}`,this.testText=he.replaceGlobals(this.testText),this.apiKey=e,this.isOpen=!0,this.errorMessage="",this.translatedText="",this.loading=!1,this.tagCompleteFileKey=this.tagCompleteFile,this.onlyCsvOnAutoValue=this.onlyCsvOnAuto,this.mbart50Success=!1,this.mbart50Message="",this.refreshCSVs()},getItemName(e){let t=e.name;return t=t.replace("[Free] ","["+this.getLang("free")+"] "),t=t.replace("[ApiKey] ","["+this.getLang("apply_for_free")+"] "),t},onChangeConfigValue(e){e.type==="input"&&e.value===""&&e.default&&(e.value=e.default)},refreshCSVs(){this.tagCompleteFilesLoading||(this.tagCompleteFilesLoading=!0,this.tagCompleteFiles=[],this.gradioAPI.getCSVs().then(e=>{if(this.tagCompleteFilesLoading=!1,!(!e||e.length<=0)){this.tagCompleteFiles.push({key:"",name:this.getLang("not_enable")});for(const t of e)this.tagCompleteFiles.push({key:t.key,name:t.key})}}).catch(e=>{this.tagCompleteFilesLoading=!1}))},onTestClick(){if(this.loading)return;this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!0;let e={};for(const t of this.configs)e[t.key]=t.value;this.translate(this.testText,"en_US",this.languageCode,this.apiKey,e).then(t=>{t.success?(this.translatedText=t.translated_text,this.translateSuccess=!0):this.errorMessage=t.message,this.loading=!1}).catch(t=>{this.errorMessage=t.message,this.loading=!1})},translate(e,t,n,i=null,r=null){return new Promise(async(o,l)=>{i=i||this.translateApi,r=r||this.translateApiConfig||{},this.gradioAPI.translate(e,t,n,i,r).then(c=>{c.success?o(c):l(c)}).catch(c=>{l(c)})})},onSaveClick(){this.isOpen=!1;let e={};for(const t of this.configs)e[t.key]=t.value;this.$emit("update:translateApi",this.apiKey),this.$emit("update:tagCompleteFile",this.tagCompleteFileKey),this.$emit("update:onlyCsvOnAuto",this.onlyCsvOnAutoValue),this.gradioAPI.setData("translate_api."+this.apiKey,e).then(t=>{this.apiKey===this.translateApi&&this.$emit("forceUpdate:translateApi")})},onCloseClick(){this.isOpen=!1},onTagCompleteTestClick(){this.tagCompleteResults=[],["1girl","Robot dog"].forEach(t=>{let n=this.getLang("translate_result");this.translateToLocalByCSV(t,this.tagCompleteFileKey,!0).then(i=>{this.tagCompleteResults.push(n.replace("{0}",t).replace("{1}",i))}).catch(i=>{this.$toastr.error(i)})})},onMbart50Initialize(){this.mbart50Loading=!0,this.mbart50Success=!1,this.mbart50Message="",this.gradioAPI.mbart50Initialize().then(e=>{this.mbart50Loading=!1,e.success?(this.mbart50Success=!0,this.mbart50Message=this.getLang("initialize_finished")):this.mbart50Message=this.getLang("initialize_failed")+": "+e.message}).catch(e=>{this.mbart50Loading=!1,this.mbart50Message=e.message})}}},Cv={key:0,class:"physton-prompt-translate-setting"},wv={class:"translate-setting-main"},_v={class:"translate-setting-content"},Tv={class:"setting-line"},Ev={class:"line-title"},kv={class:"line-content"},Sv=["label"],xv=["value","disabled"],Av={key:0,class:"setting-line"},Lv=_("div",{class:"line-title"},null,-1),Ov={class:"line-content"},Dv={class:"common-red"},Iv={key:1,class:"setting-line"},Pv=_("div",{class:"line-title"},null,-1),Nv={class:"line-content"},Rv={class:"help-list"},Mv={class:"help-item"},Fv=["href"],Hv={class:"setting-line"},Bv={class:"line-title"},jv={class:"line-content"},$v=["onUpdate:modelValue","onChange"],Uv=["onUpdate:modelValue"],Wv=["value"],Kv=["innerHTML"],qv={key:2,class:"setting-line"},Vv={class:"line-title"},zv={class:"line-content"},Xv=["innerHTML"],Yv=["innerHTML"],Gv={key:3,class:"setting-line"},Jv=_("div",{class:"line-title"},null,-1),Zv={class:"line-content"},Qv={class:"setting-line"},ey={class:"line-title"},ty={class:"line-content"},ny={class:"setting-line"},iy=_("div",{class:"line-title"},null,-1),ry={class:"line-content"},sy={class:"setting-line"},oy=_("div",{class:"line-title"},null,-1),ay={class:"line-content"},ly={key:0,class:"translate-error"},uy={class:"setting-line"},cy=_("div",{class:"line-title"},"TagComplete",-1),fy={class:"line-content"},dy={class:"help-list"},py={class:"help-item"},hy=["href"],gy=["innerHTML"],my=["innerHTML"],vy={class:"line-row"},yy=["value"],by={class:"setting-line"},Cy=_("div",{class:"line-title"},null,-1),wy={class:"line-content"},_y={ref:"tagCompleteResults"},Ty={class:"setting-btns"};function Ey(e,t,n,i,r,o){const l=Pt("icon-svg"),c=Ws("tooltip");return r.isOpen?(F(),U("div",Cv,[_("div",wv,[_("div",_v,[_("div",Tv,[_("div",Ev,ve(e.getLang("translate_api")),1),_("div",kv,[xe(_("select",{"onUpdate:modelValue":t[0]||(t[0]=d=>r.apiKey=d)},[(F(!0),U($e,null,yt(o.supportApi,d=>(F(),U("optgroup",{key:d.type,label:e.getLang(d.type)},[(F(!0),U($e,null,yt(d.children,m=>(F(),U("option",{key:m.key,value:m.key,disabled:m.disabled},ve(o.getItemName(m)),9,xv))),128))],8,Sv))),128))],512),[[jr,r.apiKey]])])]),o.apiItem&&o.apiItem.type=="translators"?(F(),U("div",Av,[Lv,_("div",Ov,[_("span",Dv,"*"+ve(e.getLang("not_api_key_desc")),1)])])):qe("",!0),o.apiItem.help?(F(),U("div",Iv,[Pv,_("div",Nv,[(F(!0),U($e,null,yt(o.apiItem.help,d=>(F(),U("div",Rv,[_("div",Mv,[$t("[?] "),_("a",{href:d.url,target:"_blank"},ve(d.title),9,Fv)])]))),256))])])):qe("",!0),(F(!0),U($e,null,yt(r.configs,d=>(F(),U("div",Hv,[_("div",Bv,ve(d.title),1),_("div",jv,[d.type=="input"?xe((F(),U("input",{key:0,type:"text","onUpdate:modelValue":m=>d.value=m,onChange:m=>o.onChangeConfigValue(d)},null,40,$v)),[[Hi,d.value]]):qe("",!0),d.type=="select"?xe((F(),U("select",{key:1,"onUpdate:modelValue":m=>d.value=m},[(F(!0),U($e,null,yt(d.options,m=>(F(),U("option",{value:m},ve(m),9,Wv))),256))],8,Uv)),[[jr,d.value]]):qe("",!0),d.desc?(F(),U("div",{key:2,innerHTML:d.desc},null,8,Kv)):qe("",!0)])]))),256)),o.apiItem.key==="mbart50"?(F(),U("div",qv,[_("div",Vv,ve(e.getLang("initialize")),1),_("div",zv,[_("div",{class:"hover-scale-120 test-btn",onClick:t[1]||(t[1]=(...d)=>o.onMbart50Initialize&&o.onMbart50Initialize(...d))},[r.mbart50Loading?(F(),wt(l,{key:0,name:"loading"})):(F(),U($e,{key:1},[$t(ve(e.getLang("initialize")),1)],64))]),_("p",{class:"common-red",innerHTML:e.getLang("download_model_desc")},null,8,Xv),_("p",{class:"common-red",innerHTML:e.getLang("download_model_desc2")},null,8,Yv)])])):qe("",!0),o.apiItem.key==="mbart50"&&r.mbart50Message?(F(),U("div",Gv,[Jv,_("div",Zv,[_("div",{class:Lt([r.mbart50Success?"":"common-red"])},ve(r.mbart50Message),3)])])):qe("",!0),_("div",Qv,[_("div",ey,ve(e.getLang("translate_test")),1),_("div",ty,[xe(_("textarea",{class:"test-input","onUpdate:modelValue":t[2]||(t[2]=d=>r.testText=d)},null,512),[[Hi,r.testText]])])]),_("div",ny,[iy,_("div",ry,[_("div",{class:"hover-scale-120 test-btn",onClick:t[3]||(t[3]=(...d)=>o.onTestClick&&o.onTestClick(...d))},[r.loading?(F(),wt(l,{key:0,name:"loading"})):(F(),U($e,{key:1},[$t(ve(e.getLang("test")),1)],64))])])]),_("div",sy,[oy,_("div",ay,[!r.translateSuccess&&r.errorMessage?(F(),U("div",ly,ve(r.errorMessage),1)):qe("",!0),r.translatedText?xe((F(),U("textarea",{key:1,class:"test-input","onUpdate:modelValue":t[4]||(t[4]=d=>r.translatedText=d)},null,512)),[[Hi,r.translatedText]]):qe("",!0)])]),_("div",uy,[cy,_("div",fy,[_("div",dy,[_("div",py,[$t("[?] "),_("a",{href:e.globals.docs+"/TranslationApiConfiguration.html#tagcomplete-translation-enhancement",target:"_blank"},"[Wiki] TagComplete Translation enhancement",8,hy)])]),_("div",{innerHTML:e.getLang("tagcomplete_translate_desc")},null,8,gy),_("div",{class:"common-red",innerHTML:e.getLang("tagcomplete_translate_desc2")},null,8,my),_("div",vy,[xe(_("select",{"onUpdate:modelValue":t[5]||(t[5]=d=>r.tagCompleteFileKey=d),onChange:t[6]||(t[6]=d=>r.tagCompleteResults=[])},[(F(!0),U($e,null,yt(r.tagCompleteFiles,d=>(F(),U("option",{value:d.key},ve(d.name),9,yy))),256))],544),[[jr,r.tagCompleteFileKey]]),xe((F(),U("div",{class:"refresh-btn hover-scale-120",onClick:t[7]||(t[7]=(...d)=>o.refreshCSVs&&o.refreshCSVs(...d))},[r.tagCompleteFilesLoading?(F(),wt(l,{key:0,name:"loading"})):(F(),wt(l,{key:1,name:"refresh"}))])),[[c,e.getLang("refresh")]])]),_("label",{class:"onlyCsvOnAuto",style:Gt({display:r.tagCompleteFileKey?"flex":"none"})},[xe(_("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[8]||(t[8]=d=>r.onlyCsvOnAutoValue=d)},null,512),[[Yh,r.onlyCsvOnAutoValue]]),_("span",null,ve(e.getLang("only_csv_on_auto")),1)],4)])]),xe(_("div",by,[Cy,_("div",wy,[_("div",{class:"hover-scale-120 test-btn",onClick:t[9]||(t[9]=(...d)=>o.onTagCompleteTestClick&&o.onTagCompleteTestClick(...d))},ve(e.getLang("test")),1),xe(_("div",_y,[(F(!0),U($e,null,yt(r.tagCompleteResults,d=>(F(),U("p",{key:d},ve(d),1))),128))],512),[[xt,r.tagCompleteResults.length>0]])])],512),[[xt,r.tagCompleteFileKey]])]),_("div",Ty,[_("div",{class:"translate-save hover-scale-120",onClick:t[10]||(t[10]=(...d)=>o.onSaveClick&&o.onSaveClick(...d))},ve(e.getLang("save")),1),_("div",{class:"translate-close hover-scale-120",onClick:t[11]||(t[11]=(...d)=>o.onCloseClick&&o.onCloseClick(...d))},ve(e.getLang("close")),1)])])])):qe("",!0)}const ky=un(bv,[["render",Ey]]),Sy={name:"SelectLanguage",components:{IconSvg:Bn},mixins:[Gn],props:{},data(){return{isOpen:!1}},computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.$nextTick(()=>{this.scrollToSelectedItem()})},close(){this.isOpen=!1},onLanguageClick(e){this.$emit("update:languageCode",e.code),this.close()},scrollToSelectedItem(){const e=this.$refs.items;for(let t=0;t<e.length;t++)if(e[t].classList.contains("selected")){e[t].scrollIntoView({behavior:"smooth",block:"center"});break}}}},xy=["onClick"];function Ay(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-prompt-select-language",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"language-main",onClick:t[2]||(t[2]=ct(()=>{},["stop"]))},[_("div",{class:"language-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"language-list",onClick:t[1]||(t[1]=ct(()=>{},["stop"]))},[(F(!0),U($e,null,yt(e.languages,c=>(F(),U("div",{key:c.code,class:Lt(["language-item",c.code==e.languageCode?"selected":""]),ref_for:!0,ref:"items",onClick:d=>o.onLanguageClick(c)},ve(c.code)+" - "+ve(c.name),11,xy))),128))])])])):qe("",!0)}const Ly=un(Sy,[["render",Ay]]),Oy={components:{IconSvg:Bn},props:{},mixins:[Gn],data(){return{favoriteKey:"",favorites:[{name:"txt2img",type:"prompt",key:"txt2img",list:[]},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",list:[]},{name:"img2img",type:"prompt",key:"img2img",list:[]},{name:"img2img",type:"negative_prompt",key:"img2img_neg",list:[]}],isShow:!1,loading:!1,emptyMsg:"",mouseEnter:!1,currentItem:{}}},emits:["use"],mounted(){this.favorites.forEach(e=>{this.getFavorites(e.key)})},methods:{formatTime(e){return he.formatTime(e*1e3,!1)},getFavorites(e){if(!e)return;let t=this.favorites.find(n=>n.key===e);t&&(this.loading=!0,this.gradioAPI.getFavorites(e).then(n=>{n&&n.length>0&&(n.reverse(),n.forEach(i=>{i.is_favorite=!0}),t.list=n),window.phystonPromptfavorites=this.favorites,this.emptyMsg=this.getLang("no_favorite"),this.loading=!1}).catch(n=>{this.emptyMsg=this.getLang("get_favorite_error"),this.loading=!1}))},show(e,t){if(!(!e||!t)){if(this.favoriteKey=e,this.isShow){this.isShow=!1;return}this.mouseEnter=!1,this.loading=!0,this.isShow=!0,this.$refs.favorite.style.top=t.pageY+2+"px",this.$refs.favorite.style.left=t.pageX+2+"px",this.getFavorites(this.favoriteKey),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(){this.hide()},onTabClick(e){this.favoriteKey=e,this.getFavorites(this.favoriteKey)},onFavoriteClick(e){let t=this.favorites.find(i=>i.key===this.favoriteKey);if(!t)return;let n=t.list[e];n.is_favorite?this.gradioAPI.unFavorite(this.favoriteKey,n.id).then(i=>{i&&(n.is_favorite=!1,window.phystonPromptfavorites=this.favorites)}):this.gradioAPI.doFavorite(this.favoriteKey,n.id).then(i=>{i&&(n.is_favorite=!0,window.phystonPromptfavorites=this.favorites)})},onCopyClick(e){let t=this.favorites.find(i=>i.key===this.favoriteKey);if(!t)return;let n=t.list[e];this.$copyText(n.prompt).then(()=>{this.$toastr.success("success!")}).catch(()=>{this.$toastr.error("error!")})},onNameKeyDown(e,t){t.keyCode===13&&t.target.blur()},onNameChange(e,t){let n=this.favorites.find(o=>o.key===this.favoriteKey);if(!n)return;let i=n.list[e];const r=t.target.value;this.gradioAPI.setFavoriteName(this.favoriteKey,i.id,r).then(o=>{o?(i.name=r,window.phystonPromptfavorites=this.favorites):t.target.value=i.name}).catch(o=>{t.target.value=i.name})},onItemMouseEnter(e){let t=this.favorites.find(n=>n.key===this.favoriteKey);t&&(this.currentItem=t.list[e])},onItemMouseLeave(e){this.currentItem={}},onUseClick(e){let t=this.favorites.find(n=>n.key===this.favoriteKey);t&&(this.hide(),this.$emit("use",t.list[e]))}}},Dy={class:"popup-tabs"},Iy=["onClick"],Py={class:"tab-name"},Ny={class:"tab-type"},Ry={class:"tab-count"},My={class:"popup-detail"},Fy={class:"popup-item-tags"},Hy={key:0,class:"item-wrap"},By={key:1,class:"item-tag"},jy={class:"item-tag-value"},$y={class:"item-tag-local-value"},Uy={class:"content-list"},Wy=["onMouseenter","onMouseleave"],Ky={class:"item-header"},qy={class:"item-header-left"},Vy={class:"item-header-index"},zy={class:"item-header-time"},Xy={class:"item-header-name"},Yy=["value","onKeydown","onChange","placeholder"],Gy={class:"item-header-right"},Jy=["onClick"],Zy=["onClick"],Qy=["onClick"],eb=["onClick"],tb={class:"item-prompt"},nb={class:"content-empty"},ib={key:1};function rb(e,t,n,i,r,o){const l=Pt("icon-svg"),c=Ws("tooltip");return xe((F(),U("div",{class:"physton-prompt-favorite",ref:"favorite",onMouseenter:t[0]||(t[0]=(...d)=>o.onMouseEnter&&o.onMouseEnter(...d)),onMouseleave:t[1]||(t[1]=(...d)=>o.onMouseLeave&&o.onMouseLeave(...d)),onClick:t[2]||(t[2]=ct(()=>{},["stop"]))},[_("div",Dy,[(F(!0),U($e,null,yt(r.favorites,d=>(F(),U("div",{key:d.key,class:Lt(["popup-tab",d.key===r.favoriteKey?"active":""]),onClick:m=>o.onTabClick(d.key)},[_("div",Py,ve(e.getLang(d.name)),1),_("div",Ny,ve(e.getLang(d.type)),1),_("div",Ry,ve(d.list.length),1)],10,Iy))),128))]),xe(_("div",My,[_("div",Fy,[(F(!0),U($e,null,yt(r.currentItem.tags,(d,m)=>(F(),U($e,{key:m},[d.type&&d.type==="wrap"?(F(),U("div",Hy)):(F(),U("div",By,[_("div",jy,ve(d.value),1),_("div",$y,ve(d.localValue),1)]))],64))),128))])],512),[[xt,r.currentItem&&r.currentItem.tags]]),(F(!0),U($e,null,yt(r.favorites,d=>(F(),U("div",{key:d.key,class:Lt(["popup-tab-content",d.key===r.favoriteKey?"active":""])},[xe(_("div",Uy,[(F(!0),U($e,null,yt(d.list,(m,g)=>(F(),U("div",{class:"content-item",key:m.id,onMouseenter:w=>o.onItemMouseEnter(g),onMouseleave:w=>o.onItemMouseLeave(g)},[_("div",Ky,[_("div",qy,[_("div",Vy,ve(d.list.length-g),1),_("div",zy,ve(o.formatTime(m.time)),1),_("div",Xy,[_("input",{class:"header-name-input",value:m.name,onKeydown:w=>o.onNameKeyDown(g,w),onChange:w=>o.onNameChange(g,w),placeholder:e.getLang("unset_name")},null,40,Yy)])]),_("div",Gy,[xe((F(),U("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[De(l,{name:"favorite-yes"})],8,Jy)),[[xt,m.is_favorite],[c,e.getLang("remove_from_favorite")]]),xe((F(),U("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[De(l,{name:"favorite-no"})],8,Zy)),[[xt,!m.is_favorite],[c,e.getLang("add_to_favorite")]]),xe((F(),U("div",{class:"header-btn-copy hover-scale-140",onClick:w=>o.onCopyClick(g)},[De(l,{name:"copy"})],8,Qy)),[[c,e.getLang("copy_to_clipboard")]]),xe((F(),U("div",{class:"header-btn-use hover-scale-140",onClick:w=>o.onUseClick(g)},[De(l,{name:"use"})],8,eb)),[[c,e.getLang("use")]])])]),_("div",tb,ve(m.prompt),1)],40,Wy))),128))],512),[[xt,d.list.length>0]]),xe(_("div",nb,[r.loading?(F(),wt(l,{key:0,name:"loading"})):(F(),U("span",ib,ve(r.emptyMsg),1))],512),[[xt,d.list.length===0]])],2))),128))],544)),[[xt,r.isShow]])}const sb=un(Oy,[["render",rb]]),ob={components:{IconSvg:Bn},props:{},mixins:[Gn],data(){return{historyKey:"",histories:[{name:"txt2img",type:"prompt",key:"txt2img",list:[]},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",list:[]},{name:"img2img",type:"prompt",key:"img2img",list:[]},{name:"img2img",type:"negative_prompt",key:"img2img_neg",list:[]}],isShow:!1,loading:!1,emptyMsg:"",mouseEnter:!1,currentItem:{}}},emits:["use","refreshFavorites"],mounted(){},methods:{formatTime(e){return he.formatTime(e*1e3,!1)},getHistories(e){if(!e)return;let t=this.histories.find(n=>n.key===e);t&&(this.loading=!0,this.gradioAPI.getHistories(e).then(n=>{n&&n.length>0&&(n.reverse(),t.list=n),this.emptyMsg=this.getLang("no_history"),this.loading=!1}).catch(n=>{this.emptyMsg=this.getLang("get_history_error"),this.loading=!1}))},show(e,t){if(!(!e||!t)){if(this.historyKey=e,this.isShow){this.isShow=!1;return}this.mouseEnter=!1,this.loading=!0,this.isShow=!0,this.$refs.history.style.top=t.pageY+2+"px",this.$refs.history.style.left=t.pageX+2+"px",this.getHistories(this.historyKey),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(){this.hide()},onTabClick(e){this.historyKey=e,this.getHistories(this.historyKey)},onDeleteClick(e){let t=this.histories.find(i=>i.key===this.historyKey);if(!t)return;let n=t.list[e];this.gradioAPI.deleteHistory(this.historyKey,n.id).then(i=>{i&&t.list.splice(e,1)})},onFavoriteClick(e){let t=this.histories.find(i=>i.key===this.historyKey);if(!t)return;let n=t.list[e];n.is_favorite?this.gradioAPI.unFavorite(this.historyKey,n.id).then(i=>{i&&(n.is_favorite=!1,this.$emit("refreshFavorites",this.historyKey))}):this.gradioAPI.doFavorite(this.historyKey,n.id).then(i=>{i&&(n.is_favorite=!0,this.$emit("refreshFavorites",this.historyKey))})},onCopyClick(e){let t=this.histories.find(i=>i.key===this.historyKey);if(!t)return;let n=t.list[e];this.$copyText(n.prompt).then(()=>{this.$toastr.success("success!")}).catch(()=>{this.$toastr.error("error!")})},onNameKeyDown(e,t){t.keyCode===13&&t.target.blur()},onNameChange(e,t){let n=this.histories.find(o=>o.key===this.historyKey);if(!n)return;let i=n.list[e];const r=t.target.value;this.gradioAPI.setHistoryName(this.historyKey,i.id,r).then(o=>{o?(i.name=r,this.$emit("refreshFavorites",this.historyKey)):t.target.value=i.name}).catch(o=>{t.target.value=i.name})},onItemMouseEnter(e){let t=this.histories.find(n=>n.key===this.historyKey);t&&(this.currentItem=t.list[e])},onItemMouseLeave(e){this.currentItem={}},onUseClick(e){let t=this.histories.find(n=>n.key===this.historyKey);t&&(this.hide(),this.$emit("use",t.list[e]))},onDeleteAllHistoryClick(){let e=this.histories.find(t=>t.key===this.historyKey);e&&confirm(this.getLang("delete_all_history_confirm"))&&this.gradioAPI.deleteHistories(this.historyKey).then(t=>{e.list=[]}).catch(t=>{})}}},ab={class:"popup-tabs"},lb=["onClick"],ub={class:"tab-name"},cb={class:"tab-type"},fb={class:"tab-count"},db={class:"popup-detail"},pb={class:"popup-item-tags"},hb={key:0,class:"item-wrap"},gb={key:1,class:"item-tag"},mb={class:"item-tag-value"},vb={class:"item-tag-local-value"},yb={class:"content-list"},bb=["onMouseenter","onMouseleave"],Cb={class:"item-header"},wb={class:"item-header-left"},_b={class:"item-header-index"},Tb={class:"item-header-time"},Eb={class:"item-header-name"},kb=["value","onKeydown","onChange","placeholder"],Sb={class:"item-header-right"},xb=["onClick"],Ab=["onClick"],Lb=["onClick"],Ob=["onClick"],Db=["onClick"],Ib={class:"item-prompt"},Pb={class:"content-empty"},Nb={key:1};function Rb(e,t,n,i,r,o){const l=Pt("icon-svg"),c=Ws("tooltip");return xe((F(),U("div",{class:"physton-prompt-history",ref:"history",onMouseenter:t[1]||(t[1]=(...d)=>o.onMouseEnter&&o.onMouseEnter(...d)),onMouseleave:t[2]||(t[2]=(...d)=>o.onMouseLeave&&o.onMouseLeave(...d)),onClick:t[3]||(t[3]=ct(()=>{},["stop"]))},[_("div",ab,[(F(!0),U($e,null,yt(r.histories,d=>(F(),U("div",{key:d.key,class:Lt(["popup-tab",d.key===r.historyKey?"active":""]),onClick:m=>o.onTabClick(d.key)},[_("div",ub,ve(e.getLang(d.name)),1),_("div",cb,ve(e.getLang(d.type)),1),_("div",fb,ve(d.list.length),1)],10,lb))),128))]),xe(_("div",db,[_("div",pb,[(F(!0),U($e,null,yt(r.currentItem.tags,(d,m)=>(F(),U($e,{key:m},[d.type&&d.type==="wrap"?(F(),U("div",hb)):(F(),U("div",gb,[_("div",mb,ve(d.value),1),_("div",vb,ve(d.localValue),1)]))],64))),128))])],512),[[xt,r.currentItem&&r.currentItem.tags]]),(F(!0),U($e,null,yt(r.histories,d=>(F(),U("div",{key:d.key,class:Lt(["popup-tab-content",d.key===r.historyKey?"active":""])},[xe(_("div",yb,[_("div",{class:"clear-btn",onClick:t[0]||(t[0]=(...m)=>o.onDeleteAllHistoryClick&&o.onDeleteAllHistoryClick(...m))},[De(l,{name:"remove"}),$t(" "+ve(e.getLang("delete_all_history")),1)]),(F(!0),U($e,null,yt(d.list,(m,g)=>(F(),U("div",{class:"content-item",key:m.id,onMouseenter:w=>o.onItemMouseEnter(g),onMouseleave:w=>o.onItemMouseLeave(g)},[_("div",Cb,[_("div",wb,[_("div",_b,ve(d.list.length-g),1),_("div",Tb,ve(o.formatTime(m.time)),1),_("div",Eb,[_("input",{class:"header-name-input",value:m.name,onKeydown:w=>o.onNameKeyDown(g,w),onChange:w=>o.onNameChange(g,w),placeholder:e.getLang("unset_name")},null,40,kb)])]),_("div",Sb,[_("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onDeleteClick(g)},[De(l,{name:"remove"})],8,xb),xe((F(),U("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[De(l,{name:"favorite-yes"})],8,Ab)),[[xt,m.is_favorite],[c,e.getLang("remove_from_favorite")]]),xe((F(),U("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[De(l,{name:"favorite-no"})],8,Lb)),[[xt,!m.is_favorite],[c,e.getLang("add_to_favorite")]]),xe((F(),U("div",{class:"header-btn-copy hover-scale-140",onClick:w=>o.onCopyClick(g)},[De(l,{name:"copy"})],8,Ob)),[[c,e.getLang("copy_to_clipboard")]]),xe((F(),U("div",{class:"header-btn-use hover-scale-140",onClick:w=>o.onUseClick(g)},[De(l,{name:"use"})],8,Db)),[[c,e.getLang("use")]])])]),_("div",Ib,ve(m.prompt),1)],40,bb))),128))],512),[[xt,d.list.length>0]]),xe(_("div",Pb,[r.loading?(F(),wt(l,{key:0,name:"loading"})):(F(),U("span",Nb,ve(r.emptyMsg),1))],512),[[xt,d.list.length===0]])],2))),128))],544)),[[xt,r.isShow]])}const Mb=un(ob,[["render",Rb]]),Fb={name:"ExtensionCss",components:{IconSvg:Bn},mixins:[Gn],props:{},data(){return{isOpen:!1,list:[]}},computed:{},mounted(){},methods:{init(){this.refresh(!0)},refresh(e=!1){this.gradioAPI.getExtensionCssList().then(t=>{let n=[];for(let i=0;i<t.length;i++)t[i].manifest=JSON.parse(t[i].manifest),t[i].manifest&&typeof t[i].manifest=="object"&&t[i].manifest.name&&(t[i].selected=t[i].selected||!1,t[i].id="physton-prompt-extension-"+t[i].dir,n.push(t[i]));n.forEach(i=>{i.sort=i.manifest.type+"."+i.dir}),n.sort((i,r)=>i.sort>r.sort?1:-1),this.list=n,e&&this.list.forEach(i=>{i.selected&&he.loadCSS(i.style,i.id,!0,!1)})})},getName(e){if(!e)return"";let t=e.manifest.name;return e.manifest.i18n&&e.manifest.i18n[this.languageCode]&&(t=e.manifest.i18n[this.languageCode]),t},onChangeSelect(e){let t=this.list.find(n=>n.id===e);t&&(t.selected=!t.selected,t.selected?he.loadCSS(t.style,t.id,!0,!1):he.removeCSS(t.id),this.gradioAPI.setData(t.dataName,t.selected))},open(){this.isOpen=!0,this.refresh(!1)},close(){this.isOpen=!1}}},Hb={class:"extension-table"},Bb=["checked","onChange"],jb={class:"extension-name"},$b={class:"extension-type"},Ub={class:"extension-dir"},Wb={class:"extension-author"};function Kb(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-prompt-extension-css",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"extension-main",onClick:t[2]||(t[2]=ct(()=>{},["stop"]))},[_("div",{class:"extension-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"extension-list",onClick:t[1]||(t[1]=ct(()=>{},["stop"]))},[_("table",Hb,[(F(!0),U($e,null,yt(r.list,(c,d)=>(F(),U("tr",{key:c.dir,class:"extension-item",ref_for:!0,ref:"items"},[_("td",null,[_("input",{class:"extension-checkbox",type:"checkbox",name:"extension-item",checked:c.selected,onChange:m=>o.onChangeSelect(c.id)},null,40,Bb)]),_("td",jb,ve(o.getName(c)),1),_("td",$b,ve(e.getLang(c.manifest.type)),1),_("td",Ub,ve(c.dir),1),_("td",Wb,[c.manifest.author?(F(),U($e,{key:0},[$t("By: "+ve(c.manifest.author),1)],64)):qe("",!0)])]))),128))])])])])):qe("",!0)}const qb=un(Fb,[["render",Kb]]),Vb={name:"PromptFormat",components:{IconSvg:Bn},mixins:[Gn],props:{autoRemoveSpace:{type:Boolean,default:!1},autoRemoveLastComma:{type:Boolean,default:!1},autoKeepWeightZero:{type:Boolean,default:!1},autoKeepWeightOne:{type:Boolean,default:!1}},data(){return{isOpen:!1}},emits:["update:autoRemoveSpace","update:autoRemoveLastComma","update:autoKeepWeightZero","update:autoKeepWeightOne"],computed:{},mounted(){},methods:{open(){this.isOpen=!0},close(){this.isOpen=!1}}},zb={class:"format-item"},Xb=["checked"],Yb=["innerHTML"],Gb={class:"format-item"},Jb=["checked"],Zb=["innerHTML"],Qb={class:"format-item"},e0=["checked"],t0=["innerHTML"],n0={class:"format-item"},i0=["checked"],r0=["innerHTML"];function s0(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-prompt-format",onClick:t[7]||(t[7]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"format-main",onClick:t[6]||(t[6]=ct(()=>{},["stop"]))},[_("div",{class:"format-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"format-list",onClick:t[5]||(t[5]=ct(()=>{},["stop"]))},[_("div",zb,[_("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveSpace,onChange:t[1]||(t[1]=c=>e.$emit("update:autoRemoveSpace",c.target.checked))},null,40,Xb),_("div",{class:"format-desc",innerHTML:e.getLang("is_remove_space")},null,8,Yb)]),_("div",Gb,[_("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveLastComma,onChange:t[2]||(t[2]=c=>e.$emit("update:autoRemoveLastComma",c.target.checked))},null,40,Jb),_("div",{class:"format-desc",innerHTML:e.getLang("is_remove_last_comma")},null,8,Zb)]),_("div",Qb,[_("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightZero,onChange:t[3]||(t[3]=c=>e.$emit("update:autoKeepWeightZero",c.target.checked))},null,40,e0),_("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_zero")},null,8,t0)]),_("div",n0,[_("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightOne,onChange:t[4]||(t[4]=c=>e.$emit("update:autoKeepWeightOne",c.target.checked))},null,40,i0),_("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_one")},null,8,r0)])])])])):qe("",!0)}const o0=un(Vb,[["render",s0]]),a0={name:"PackagesState",components:{IconSvg:Bn},mixins:[Gn],props:{python:{type:String,default:"./python"},packagesState:{type:Array,default:()=>[]}},data(){return{todayNotShow:!1,isOpen:!1,loading:!1,showResult:!1,result:`1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333
|
||
1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333
|
||
1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333`}},emits:[],computed:{},watch:{packagesState:{handler(){this.isAllInstalled()||this.open()},deep:!0}},mounted(){},methods:{isInstalled(e){for(let t of this.packagesState)if(t.name===e)return t.state;return!1},isAllInstalled(){for(let e of this.packagesState)if(!e.state)return!1;return!0},getCommand(e){return`${this.python} -m pip install ${e.package}`},onInstallClick(){if(this.loading)return;this.loading=!0,this.showResult=!0,this.result="";let e=[];this.packagesState.forEach(i=>{i.state||e.push(i)});const t=(i=!1)=>{this.loading=!1,i&&(this.result+=`
|
||
complete!`,setTimeout(this.close,2e3)),this.scrollToBottom()},n=()=>{let i=e.shift();if(!i)return t(!0);this.gradioAPI.installPackage(i.name,i.package).then(r=>{this.result+=`${r.message}
|
||
`,r.state?(this.scrollToBottom(),n()):t(!1)}).catch(r=>{console.log(r),this.result+=`${i.name} install failed
|
||
${r.message}
|
||
`,t(!1)})};n()},scrollToBottom(){this.$nextTick(()=>{this.$refs.result.scrollTop=this.$refs.result.scrollHeight})},onTodayNotShowChange(){this.todayNotShow=!this.todayNotShow,this.gradioAPI.setData("packagesStateTodayNotShow",new Date().toLocaleDateString())},open(){this.gradioAPI.getData("packagesStateTodayNotShow").then(e=>{e&&e===new Date().toLocaleDateString()?this.close():(this.result="",this.loading=!1,this.showResult=!1,this.isOpen=!0)}).catch(e=>{})},close(){this.isOpen=!1}}},l0={class:"today-now-show"},u0=["value"],c0={class:"state-body-name"},f0=["innerHTML"],d0={class:"package-list"},p0={class:"package-name"},h0={class:"package-command"},g0={key:0,class:"install-result"};function m0(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-packages-state",onClick:t[6]||(t[6]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"state-main",onClick:t[5]||(t[5]=ct(()=>{},["stop"]))},[_("div",{class:"state-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"state-body",onClick:t[4]||(t[4]=ct(()=>{},["stop"]))},[_("div",l0,[_("label",null,[_("input",{type:"checkbox",value:r.todayNotShow,onChange:t[1]||(t[1]=(...c)=>o.onTodayNotShowChange&&o.onTodayNotShowChange(...c))},null,40,u0),$t(" "+ve(e.getLang("today_not_show")),1)])]),_("div",c0,ve(e.globals.shortName),1),_("div",{class:"state-body-language",onClick:t[2]||(t[2]=c=>e.$emit("click:selectLanguage",c))},[De(l,{name:"i18n"}),_("div",null,"Language: "+ve(e.langName),1)]),_("div",{class:"state-body-desc",innerHTML:e.getLang("packages_desc")},null,8,f0),_("div",d0,[(F(!0),U($e,null,yt(n.packagesState,c=>(F(),U("div",{key:c.name,class:"package-item"},[_("div",p0,ve(c.name),1),_("div",{class:Lt(["package-state",c.state?"installed":"not_install"])},ve(e.getLang(c.state?"installed":"not_install")),3),_("div",h0,ve(o.getCommand(c)),1)]))),128))]),_("div",{class:"btn-packages-install hover-scale-120",onClick:t[3]||(t[3]=(...c)=>o.onInstallClick&&o.onInstallClick(...c))},[r.loading?(F(),wt(l,{key:0,name:"loading"})):(F(),U($e,{key:1},[$t(ve(e.getLang("install")),1)],64))]),r.showResult?(F(),U("div",g0,[$t(ve(e.getLang("packages_installing"))+" ",1),r.result?(F(),U("div",{key:0,class:"result-content",ref:"result"},ve(r.result),513)):qe("",!0)])):qe("",!0)])])])):qe("",!0)}const v0=un(a0,[["render",m0]]),y0={name:"ChatgptPrompt",components:{IconSvg:Bn},mixins:[Gn],props:{},data(){return{isOpen:!1,api:{},configs:[],chatPreset:"",hidePanels:{api:!0},imageDesc:"",promptResult:"",saveConfigIng:!1,genIng:!1}},emits:["use"],computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.saveConfigIng=!1,this.genIng=!1,this.gradioAPI.getDatas(["chatgpt_prompts_preset","chatgpt_key","translate_api.openai"]).then(e=>{console.log(e),e.chatgpt_prompts_preset!==null?this.chatPreset=e.chatgpt_prompts_preset:this.chatPreset=this.getLang("chatgpt_prompts_preset"),this.configs=[];let t={},n=he.getTranslateApiItem(this.translateApis,"openai");if(n=JSON.parse(JSON.stringify(n)),e.chatgpt_key&&typeof e.chatgpt_key=="object")for(const i of n.config)t[i.key]=e.chatgpt_key[i.key]||i.default||"";else for(const i of n.config)t[i.key]=i.default||"";t.api_key||(this.hidePanels.api=!1);for(const i of n.config)i.value=t[i.key],this.configs.push(i)})},close(){this.isOpen=!1},onUnfoldClick(e){this.hidePanels[e]=!this.hidePanels[e]},onSaveConfigClick(){if(this.saveConfigIng)return;this.saveConfigIng=!0;let e={};this.configs.forEach(t=>{e[t.key]=t.value}),this.gradioAPI.setData("chatgpt_key",e).then(t=>{this.$toastr.success(this.getLang("success")),this.saveConfigIng=!1}).catch(t=>{this.$toastr.error(t.message||t),this.saveConfigIng=!1})},onPresetChange(e){this.chatPreset=e.target.value,this._saveChatPreset()},onRestoreClick(){this.chatPreset=this.getLang("chatgpt_prompts_preset"),this._saveChatPreset()},_saveChatPreset(){this.gradioAPI.setData("chatgpt_prompts_preset",this.chatPreset)},onGenClick(){if(this.genIng)return;if(!this.imageDesc)return this.$refs.imageDesc.focus();if(this.imageDesc=this.imageDesc.trim(),!this.imageDesc)return this.$refs.imageDesc.focus();this.genIng=!0;let e=[{role:"user",content:this.chatPreset},{role:"user",content:this.imageDesc}],t={};this.configs.forEach(n=>{t[n.key]=n.value}),this.gradioAPI.genOpenAI(e,t).then(n=>{n.success?this.promptResult=n.result:this.$toastr.error(n.message||"error"),this.genIng=!1}).catch(n=>{this.$toastr.error(n.message||n),this.genIng=!1})},onUseClick(){this.$emit("use",this.promptResult),this.close()}}},b0={class:"panel-header"},C0={class:"panel-title"},w0={class:"panel-content"},_0={class:"body-line"},T0={class:"line-title"},E0={class:"line-content"},k0=["onUpdate:modelValue"],S0=["onUpdate:modelValue"],x0=["value"],A0=["innerHTML"],L0={class:"body-line"},O0=_("div",{class:"line-title"},null,-1),D0={class:"line-content text-right"},I0={class:"panel-header"},P0={class:"panel-title"},N0={class:"panel-content"},R0={class:"body-line"},M0={class:"line-title"},F0={class:"line-subtitle"},H0={class:"line-content"},B0=["value"],j0={class:"body-line"},$0=_("div",{class:"line-title"},null,-1),U0={class:"line-content text-right"},W0={class:"body-line"},K0={class:"line-title"},q0={class:"line-subtitle"},V0={class:"line-content"},z0=["placeholder"],X0={class:"body-line"},Y0=_("div",{class:"line-title"},null,-1),G0={class:"line-content text-right"},J0={class:"panel-header"},Z0={class:"panel-title"},Q0={class:"panel-content"},eC={class:"body-line"},tC={class:"line-title"},nC={class:"line-content"},iC={key:0,class:"body-line"},rC=_("div",{class:"line-title"},null,-1),sC={class:"line-content text-right"};function oC(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-chatgpt-prompt",onClick:t[13]||(t[13]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"chatgpt-main",onClick:t[12]||(t[12]=ct(()=>{},["stop"]))},[_("div",{class:"chatgpt-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"chatgpt-body",onClick:t[11]||(t[11]=ct(()=>{},["stop"]))},[_("div",{class:Lt(["body-panel",r.hidePanels.api?"fold":""])},[_("div",b0,[_("div",{class:"panel-unfold",onClick:t[1]||(t[1]=c=>o.onUnfoldClick("api"))},[De(l,{class:"hover-scale-120",name:"unfold"})]),_("div",C0,ve(e.getLang("api_config")),1)]),_("div",w0,[(F(!0),U($e,null,yt(r.configs,c=>(F(),U("div",_0,[_("div",T0,ve(c.title),1),_("div",E0,[c.type=="input"?xe((F(),U("input",{key:0,type:"text","onUpdate:modelValue":d=>c.value=d},null,8,k0)),[[Hi,c.value]]):qe("",!0),c.type=="select"?xe((F(),U("select",{key:1,"onUpdate:modelValue":d=>c.value=d},[(F(!0),U($e,null,yt(c.options,d=>(F(),U("option",{value:d},ve(d),9,x0))),256))],8,S0)),[[jr,c.value]]):qe("",!0),c.desc?(F(),U("div",{key:2,innerHTML:c.desc},null,8,A0)):qe("",!0)])]))),256)),_("div",L0,[O0,_("div",D0,[_("div",{class:"common-btn hover-scale-120",onClick:t[2]||(t[2]=(...c)=>o.onSaveConfigClick&&o.onSaveConfigClick(...c))},[r.saveConfigIng?(F(),wt(l,{key:0,name:"loading"})):(F(),U($e,{key:1},[$t(ve(e.getLang("save")),1)],64))])])])])],2),_("div",{class:Lt(["body-panel",r.hidePanels.send?"fold":""])},[_("div",I0,[_("div",{class:"panel-unfold",onClick:t[3]||(t[3]=c=>o.onUnfoldClick("send"))},[De(l,{class:"hover-scale-120",name:"unfold"})]),_("div",P0,ve(e.getLang("image_desc")),1)]),_("div",N0,[_("div",R0,[_("div",M0,[$t(ve(e.getLang("preset"))+" ",1),_("div",F0,ve(e.getLang("ai_one")),1)]),_("div",H0,[_("textarea",{value:r.chatPreset,onChange:t[4]||(t[4]=(...c)=>o.onPresetChange&&o.onPresetChange(...c)),style:{height:"100px"}},null,40,B0)])]),_("div",j0,[$0,_("div",U0,[_("a",{href:"javascript:",onClick:t[5]||(t[5]=(...c)=>o.onRestoreClick&&o.onRestoreClick(...c))},ve(e.getLang("restore_to_default")),1)])]),_("div",W0,[_("div",K0,[$t(ve(e.getLang("image_desc"))+" ",1),_("div",q0,ve(e.getLang("ai_two")),1)]),_("div",V0,[xe(_("textarea",{style:{height:"100px"},ref:"imageDesc","onUpdate:modelValue":t[6]||(t[6]=c=>r.imageDesc=c),placeholder:e.getLang("input_image_desc")},null,8,z0),[[Hi,r.imageDesc]])])]),_("div",X0,[Y0,_("div",G0,[_("div",{class:"common-btn hover-scale-120",onClick:t[7]||(t[7]=(...c)=>o.onGenClick&&o.onGenClick(...c))},[r.genIng?(F(),wt(l,{key:0,name:"loading"})):(F(),U($e,{key:1},[$t(ve(e.getLang("generate")),1)],64))])])])])],2),_("div",{class:Lt(["body-panel",r.hidePanels.result?"fold":""])},[_("div",J0,[_("div",{class:"panel-unfold",onClick:t[8]||(t[8]=c=>o.onUnfoldClick("result"))},[De(l,{class:"hover-scale-120",name:"unfold"})]),_("div",Z0,ve(e.getLang("generate_result")),1)]),_("div",Q0,[_("div",eC,[_("div",tC,ve(e.getLang("generate_result")),1),_("div",nC,[xe(_("textarea",{style:{height:"100px"},"onUpdate:modelValue":t[9]||(t[9]=c=>r.promptResult=c)},null,512),[[Hi,r.promptResult]])])]),r.promptResult?(F(),U("div",iC,[rC,_("div",sC,[_("div",{class:"common-btn hover-scale-120",onClick:t[10]||(t[10]=(...c)=>o.onUseClick&&o.onUseClick(...c))},ve(e.getLang("use")),1)])])):qe("",!0)])],2)])])])):qe("",!0)}const aC=un(y0,[["render",oC]]),lC={name:"About",components:{IconSvg:Bn},mixins:[Gn],data(){return{version:"",latestVersion:"",isLatestVersion:!0,isOpen:!1,loading:!1,versions:[],icons:[]}},emits:["use"],computed:{},mounted(){this.icons=[{title:"GitHub stars",url:this.globals.github+"/stargazers",image:"https://img.shields.io/github/stars/"+this.globals.name+"?style=flat-square"},{title:"GitHub forks",url:this.globals.github+"/network/members",image:"https://img.shields.io/github/forks/"+this.globals.name+"?style=flat-square"},{title:"GitHub issues",url:this.globals.github+"/issues",image:"https://img.shields.io/github/issues/"+this.globals.name+"?style=flat-square"},{title:"GitHub issues closed",url:this.globals.github+"/issues?q=is%3Aissue+is%3Aclosed",image:"https://img.shields.io/github/issues-closed/"+this.globals.name+"?style=flat-square"},{title:"GitHub license",url:this.globals.github+"/blob/master/LICENSE.md",image:"https://img.shields.io/github/license/"+this.globals.name+"?style=flat-square"},{title:"GitHub commits",url:this.globals.github+"/commits/main",image:"https://img.shields.io/github/last-commit/"+this.globals.name+"?style=flat-square"}]},methods:{open(){this.isOpen=!0,this.version="",this.latestVersion="",this.isLatestVersion=!0,this.versions=[],this.loading=!0,this.gradioAPI.getVersion().then(e=>{this.version=e.version,this.latestVersion=e.latest_version,this.isLatestVersion=e.version===e.latest_version}),this.gradioAPI.getRemoteVersions().then(e=>{this.loading=!1;let t=[];e.forEach((n,i)=>{n.is_update_readme||(n.date=he.formatTime(n.date),t.push(n))}),this.versions=t}).catch(e=>{this.loading=!1})},close(){this.isOpen=!1},commitUrl(e){return this.globals.github+"/commit/"+e},formatVersion(e){return e?e.slice(0,7):this.getLang("unknown_version")},message(e){return e=he.escapeHtml(e),e=e.replace(/Former-commit-id: [a-z0-9]{40}/g,""),e=e.trim(),e=e.replace(`
|
||
`,"<br/>"),e=e.replace(/#(\d+)/g,'<a href="'+this.globals.github+'/issues/$1" target="_blank">#$1</a>'),e}}},uC={class:"body-title"},cC=["href"],fC=["href"],dC=["src","alt"],pC={key:0},hC=["href"],gC={key:0,class:"has-new-version"},mC=["href"],vC=["href"],yC={class:"version-list"},bC={class:"item-header"},CC={class:"version-sha"},wC=["href"],_C={class:"version-date"},TC=["innerHTML"];function EC(e,t,n,i,r,o){const l=Pt("icon-svg");return r.isOpen?(F(),U("div",{key:0,class:"physton-about-prompt",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[_("div",{class:"about-main",onClick:t[2]||(t[2]=ct(()=>{},["stop"]))},[_("div",{class:"about-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[De(l,{name:"close"})]),_("div",{class:"about-body",onClick:t[1]||(t[1]=ct(()=>{},["stop"]))},[_("p",uC,[_("a",{href:e.globals.github,target:"_blank"},ve(e.globals.name),9,cC)]),_("p",null,[(F(!0),U($e,null,yt(r.icons,c=>(F(),U("a",{key:c.title,href:c.url,target:"_blank"},[_("img",{src:c.image,alt:c.title},null,8,dC)],8,fC))),128))]),r.loading?qe("",!0):(F(),U("p",pC,[_("span",null,[$t(ve(e.getLang("version"))+": ",1),_("a",{href:o.commitUrl(r.version),target:"_blank"},ve(o.formatVersion(r.version)),9,hC)]),!r.isLatestVersion&&r.latestVersion?(F(),U("span",gC,[$t(" ("+ve(e.getLang("has_new_version"))+": ",1),_("a",{href:o.commitUrl(r.latestVersion),target:"_blank"},ve(o.formatVersion(r.latestVersion)),9,mC),$t(")")])):qe("",!0)])),_("p",null,[$t(ve(e.getLang("wiki_desc"))+" ",1),_("a",{href:e.replaceGlobals("{{docs}}"),target:"_blank"},"Wiki",8,vC)]),_("div",yC,[r.loading?(F(),wt(l,{key:0,name:"loading"})):qe("",!0),(F(!0),U($e,null,yt(r.versions,c=>(F(),U("div",{class:"version-item",key:c.version},[_("div",bC,[_("div",CC,[_("a",{href:o.commitUrl(c.version),target:"_blank"},ve(o.formatVersion(c.version)),9,wC)]),_("div",_C,ve(c.date),1)]),_("div",{class:"version-msg",innerHTML:o.message(c.message)},null,8,TC)]))),128))])])])])):qe("",!0)}const kC={name:"App",components:{About:un(lC,[["render",EC]]),ChatgptPrompt:aC,PackagesState:v0,PromptFormat:o0,ExtensionCss:qb,IconSvg:Bn,History:Mb,Favorite:sb,SelectLanguage:Ly,TranslateSetting:ky,PhystonPrompt:yv},mixins:[],data(){return{prompts:[{tab:"tab_txt2img",prompt:"txt2img_prompt",counter:"txt2img_token_counter",button:"txt2img_token_button",steps:"txt2img_steps",historyKey:"txt2img",favoriteKey:"txt2img",$prompt:null,$textarea:null,$steps:null,name:"txt2img_prompt",neg:!1,hideDefaultInputKey:"txt2ImgHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"txt2ImgHidePanel",hidePanel:!1,id:"phystonPrompt_txt2img_prompt"},{tab:"tab_txt2img",prompt:"txt2img_neg_prompt",counter:"txt2img_negative_token_counter",button:"txt2img_negative_token_button",steps:"txt2img_steps",historyKey:"txt2img_neg",favoriteKey:"txt2img_neg",$prompt:null,$textarea:null,$steps:null,name:"txt2img_neg_prompt",neg:!0,hideDefaultInputKey:"txt2ImgNegHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"txt2ImgNegHidePanel",hidePanel:!1,id:"phystonPrompt_txt2img_neg_prompt"},{tab:"tab_img2img",prompt:"img2img_prompt",counter:"img2img_token_counter",button:"img2img_token_button",steps:"img2img_steps",historyKey:"img2img",favoriteKey:"img2img",$prompt:null,$textarea:null,$steps:null,name:"img2img_prompt",neg:!1,hideDefaultInputKey:"img2ImgHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"img2ImgHidePanel",hidePanel:!1,id:"phystonPrompt_img2img_prompt"},{tab:"tab_img2img",prompt:"img2img_neg_prompt",counter:"img2img_negative_token_counter",button:"img2img_negative_token_button",steps:"img2img_steps",historyKey:"img2img_neg",favoriteKey:"img2img_neg",$prompt:null,$textarea:null,$steps:null,name:"img2img_neg_prompt",neg:!0,hideDefaultInputKey:"img2ImgNegHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"img2ImgNegHidePanel",hidePanel:!1,id:"phystonPrompt_img2img_neg_prompt"}],languageCode:"",languages:{},translateApis:[],translateApi:"",translateApiConfig:{},canOneTranslate:!1,autoTranslate:!1,autoTranslateToEnglish:!1,autoTranslateToLocal:!1,autoRemoveSpace:!0,autoRemoveLastComma:!1,autoKeepWeightZero:!1,autoKeepWeightOne:!1,enableTooltip:!0,tagCompleteFile:"",onlyCsvOnAuto:!1,startWatchSave:!1,pasteBtn:null,showPastePopup:!1,pasteTitle:"",pasteContent:"",pasteLoading:!1,historyCurrentPrompt:"",favoriteCurrentPrompt:"",chatgptCurrentPrompt:"",extraNetworks:[],loras:[],lycos:[],embeddings:[],python:"",packagesState:[],version:"",latestVersion:"",isLatestVersion:!0,theme:"dark"}},watch:{languageCode:{handler:function(e,t){this.startWatchSave&&(console.log("onLanguageCodeChange",e),this.canOneTranslate=he.canOneTranslate(this.languageCode),this.gradioAPI.setData("languageCode",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoTranslateToEnglish:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoTranslateToEnglishChange",e),this.gradioAPI.setData("autoTranslateToEnglish",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoTranslateToLocal:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoTranslateToLocalChange",e),this.gradioAPI.setData("autoTranslateToLocal",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoTranslate:{handler:function(e,t){this.startWatchSave&&(this.autoTranslateToEnglish=this.autoTranslate,this.autoTranslateToLocal=this.autoTranslate,console.log("onAutoTranslateChange",e),this.gradioAPI.setData("autoTranslate",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoRemoveSpace:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoRemoveSpaceChange",e),this.gradioAPI.setData("autoRemoveSpace",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoRemoveLastComma:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoRemoveLastCommaChange",e),this.gradioAPI.setData("autoRemoveLastComma",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoKeepWeightZero:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoKeepWeightZeroChange",e),this.gradioAPI.setData("autoKeepWeightZero",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoKeepWeightOne:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoKeepWeightOneChange",e),this.gradioAPI.setData("autoKeepWeightOne",e).then(n=>{}).catch(n=>{}))},immediate:!1},enableTooltip:{handler:function(e,t){this.startWatchSave&&(localStorage.setItem("phystonPromptEnableTooltip",e?"true":"false"),this.updateTippyState(),this.gradioAPI.setData("enableTooltip",e).then(n=>{}).catch(n=>{}))},immediate:!1},translateApi:{handler:function(e,t){this.startWatchSave&&(console.log("onTranslateApiChange",e,t),this.updateTranslateApiConfig(),this.gradioAPI.setData("translateApi",e).then(n=>{}).catch(n=>{}))},immediate:!1},tagCompleteFile:{handler:function(e,t){this.startWatchSave&&(console.log("onTagCompleteFileChange",e,t),this.gradioAPI.setData("tagCompleteFile",e).then(n=>{}).catch(n=>{}))},immediate:!1},onlyCsvOnAuto(){this.startWatchSave&&(console.log("onOnlyCsvOnAutoChange",this.onlyCsvOnAuto),this.gradioAPI.setData("onlyCsvOnAuto",this.onlyCsvOnAuto).then(e=>{}).catch(e=>{}))}},mounted(){he.loadCSS("toastr.min.css","physton-prompt-toastr",!0,!0,!1),he.loadCSS("tippy.css","physton-prompt-tippy",!0,!0,!1),he.loadCSS("main.min.css","physton-prompt-main",!0);let t=new URLSearchParams(window.location.search).get("__theme");["dark","light"].includes(t)&&(this.theme=t,he.gradioApp().classList.contains(this.theme)||he.gradioApp().classList.add(this.theme)),setTimeout(()=>{document.querySelector('meta[content="LobeHub"]')&&he.gradioApp().classList.add("physton-prompt-lobehub")},3e3),this.gradioAPI.getConfig().then(n=>{console.log("config:",n),this.languageCode=n.i18n.default,this.translateApi=n.translate_apis.default,this.translateApis=n.translate_apis.apis,this.python=n.python,this.packagesState=n.packages_state;let i={};n.i18n.languages.forEach(r=>{i[r.code]=r}),this.languages=i,this.init()}).catch(n=>{this.$toastr.error("Connection to backend API service failed. Please manually refresh the webpage. If it still doesn't work, please restart the WebUI.<br/>连接到后台接口服务失败,请手动再刷新一次网页。如果还是不行,请重启WebUI。<br/><br/>"+n.message,co.shortName,{timeOut:2e4}),console.log(n)})},methods:{getLang(e){return he.getLang(e,this.languageCode,this.languages)},init(){this.loadExtraNetworks();let e=["languageCode","autoTranslate","autoTranslateToEnglish","autoTranslateToLocal","autoRemoveSpace","autoRemoveLastComma","autoKeepWeightZero","autoKeepWeightOne","translateApi","enableTooltip","tagCompleteFile","onlyCsvOnAuto","extensionSelect.minimalist"];this.prompts.forEach(t=>{e.push(t.hideDefaultInputKey),e.push(t.hidePanelKey)}),this.gradioAPI.getDatas(e).then(t=>{if(t.languageCode!==null){let n=!1;for(let i in this.languages)if(this.languages[i].code===t.languageCode){n=!0;break}n&&(this.languageCode=t.languageCode,this.$forceUpdate(),this.gradioAPI.setData("languageCode",this.languageCode))}else{let n=navigator.language||navigator.userLanguage||"";if(n){for(let i in this.languages)if(he.isSameLang(this.languages[i].code,n)){this.languageCode=this.languages[i].code,this.$forceUpdate(),this.gradioAPI.setData("languageCode",this.languageCode);break}}}this.canOneTranslate=he.canOneTranslate(this.languageCode),t.autoTranslateToEnglish!==null&&(this.autoTranslateToEnglish=t.autoTranslateToEnglish),t.autoTranslateToLocal!==null&&(this.autoTranslateToLocal=t.autoTranslateToLocal),t.autoTranslate!==null?this.canOneTranslate?(this.autoTranslate=t.autoTranslate,this.autoTranslateToEnglish=this.autoTranslate,this.autoTranslateToLocal=this.autoTranslate):this.autoTranslate=!1:this.canOneTranslate?(this.autoTranslate=this.autoTranslateToEnglish||this.autoTranslateToLocal,this.autoTranslateToEnglish=!0,this.autoTranslateToLocal=!0):this.autoTranslate=!1,t.autoRemoveSpace!==null&&(this.autoRemoveSpace=t.autoRemoveSpace),t.autoRemoveLastComma!==null&&(this.autoRemoveLastComma=t.autoRemoveLastComma),t.autoKeepWeightZero!==null&&(this.autoKeepWeightZero=t.autoKeepWeightZero),t.autoKeepWeightOne!==null&&(this.autoKeepWeightOne=t.autoKeepWeightOne),t.enableTooltip!==null&&(this.enableTooltip=t.enableTooltip),localStorage.setItem("phystonPromptEnableTooltip",this.enableTooltip?"true":"false"),this.updateTippyState(),t.translateApi!==null&&(this.translateApi=t.translateApi),t.tagCompleteFile!==null&&(this.tagCompleteFile=t.tagCompleteFile,this.$nextTick(()=>{this.$refs.translateSetting.getCSV(this.tagCompleteFile)})),t.onlyCsvOnAuto!==null&&(this.onlyCsvOnAuto=t.onlyCsvOnAuto),t["extensionSelect.minimalist"]===null&&this.gradioAPI.setData("extensionSelect.minimalist",!0),this.updateTranslateApiConfig(),this.$refs.extensionCss.init(),this.prompts.forEach(n=>{t[n.hideDefaultInputKey]!==null&&(n.hideDefaultInput=t[n.hideDefaultInputKey]),t[n.hidePanelKey]!==null&&(n.hidePanel=t[n.hidePanelKey]),n.$prompt=he.gradioApp().querySelector("#"+n.prompt),n.$textarea=n.$prompt.getElementsByTagName("textarea")[0],n.$steps=he.gradioApp().querySelector("#"+n.steps)}),this.$nextTick(()=>{this.prompts.forEach(n=>{const i=he.gradioApp().querySelector("#"+n.id);n.$prompt.parentElement.parentElement.parentElement.appendChild(i),n.$prompt.parentElement.parentElement.style.display=n.hideDefaultInput?"none":"flex"}),this.startWatchSave=!0}),this.handlePaste()})},updateTippyState(){for(const e of this.$tippyList)this.enableTooltip?e.enable():e.disable()},updateTranslateApiConfig(){this.gradioAPI.getData("translate_api."+this.translateApi).then(e=>{let t={};const n=he.getTranslateApiItem(this.translateApis,this.translateApi);if(n.config){for(const i of n.config)n.type==="translators"&&i.key==="region"&&!e.region?t[i.key]=this.languageCode==="zh_CN"||this.languageCode==="zh_HK"||this.languageCode==="zh_TW"?"China":"EN":e?t[i.key]=e[i.key]:t[i.key]=i.default||"";t.concurrent=n.concurrent||0}this.translateApiConfig=t})},onPromptFormatClick(e){this.$refs.promptFormat.open(e)},onSelectLanguageClick(e){this.$refs.selectLanguage.open(e)},onTranslateApiClick(){this.$refs.translateSetting.open(this.translateApi)},onSelectThemeClick(){this.$refs.extensionCss.open()},handlePaste(){if(typeof gradioApp!="function")return;const e=gradioApp().querySelectorAll("#paste");!e||e.length<=0||e.forEach((t,n)=>{const i=t.cloneNode(!0);i.id="paste-new-"+n,i.innerHTML="🗒",t.parentNode.insertBefore(i,t.nextSibling),i.addEventListener("click",()=>{this.pasteBtn=t,this.openPastePopup()}),this.pasteTitle=t.title})},openPastePopup(){this.pasteContent="",this.pasteLoading=!1,this.showPastePopup=!0},closePastePopup(){this.showPastePopup=!1},onClickPasteSubmit(){this.pasteLoading=!0;const e=get_uiCurrentTabContent();let t=null,n=null,i=null,r=null,o=[];for(const l of this.prompts)l.tab==e.id&&(console.log(l),o.push(l.id),l.neg?(n=l.$textarea,r=l.$prompt):(t=l.$textarea,i=l.$prompt));if(!t||!i||!r){this.pasteLoading=!1;return}t.value=this.pasteContent,t.dispatchEvent(new Event("input")),this.pasteBtn.dispatchEvent(new Event("click")),setTimeout(()=>{let l=0,c=0;l=setInterval(()=>{if(c++,c>100){this.pasteLoading=!1,clearInterval(l);return}i.getElementsByClassName("hide").length>0&&r.getElementsByClassName("hide").length>0&&(this.pasteLoading=!1,this.closePastePopup(),clearInterval(l),he.hideCompleteResults(t),he.hideCompleteResults(n),o.forEach((d,m)=>{setTimeout(()=>{this.$refs[d][0].onTextareaChange(!0)},1e3)}))},100)},1e3)},onUpdateHideDefaultInput(e,t){const n=this.prompts.find(i=>i.id==e);n&&(n.hideDefaultInput=t,this.gradioAPI.setData(n.hideDefaultInputKey,n.hideDefaultInput),n.$prompt.parentElement.parentElement.style.display=n.hideDefaultInput?"none":"flex")},onUpdateHidePanel(e,t){const n=this.prompts.find(i=>i.id==e);n&&(n.hidePanel=t,this.gradioAPI.setData(n.hidePanelKey,n.hidePanel))},onShowHistory(e,t){this.$refs.favorite.hide(),this.historyCurrentPrompt=e;const n=this.prompts.find(i=>i.id==e);n&&this.$refs.history.show(n.historyKey,t)},onUseHistory(e){if(!this.historyCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.historyCurrentPrompt);t&&this.$refs[t.id][0].useFavorite(e)},onShowFavorite(e,t){this.$refs.history.hide(),this.favoriteCurrentPrompt=e;const n=this.prompts.find(i=>i.id==e);n&&this.$refs.favorite.show(n.favoriteKey,t)},onUseFavorite(e){if(!this.favoriteCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.favoriteCurrentPrompt);t&&this.$refs[t.id][0].useFavorite(e)},onRefreshFavorites(e){this.$refs.favorite.getFavorites(e)},onShowChatgpt(e,t){this.chatgptCurrentPrompt=e,this.prompts.find(i=>i.id==e)&&this.$refs.chatgptPrompt.open()},onUseChatgpt(e){if(!this.chatgptCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.chatgptCurrentPrompt);t&&this.$refs[t.id][0].useChatgpt(e)},onShowAbout(){this.$refs.about.open()},onSwitchTheme(){this.theme=this.theme==="dark"?"light":"dark";let e=window.location.href,t=new URL(e),n=new URLSearchParams(t.search);n.has("__theme")?n.set("__theme",this.theme):n.append("__theme",this.theme);let i=t.origin+t.pathname+"?"+n.toString();window.location.href=i}}},SC={class:"paste-popup-title"},xC={class:"paste-popup-body"},AC=["placeholder"],LC={key:1,class:"paste-submit"};function OC(e,t,n,i,r,o){const l=Pt("physton-prompt"),c=Pt("translate-setting"),d=Pt("select-language"),m=Pt("prompt-format"),g=Pt("history"),w=Pt("favorite"),T=Pt("extension-css"),H=Pt("packages-state"),x=Pt("chatgpt-prompt"),I=Pt("about"),V=Pt("icon-svg");return F(),U("div",null,[(F(!0),U($e,null,yt(r.prompts,N=>(F(),U($e,{key:N.name},[N.$textarea?(F(),wt(l,{key:0,id:N.id,ref_for:!0,ref:N.id,name:N.name,neg:N.neg,textarea:N.$textarea,steps:N.$steps,"language-code":r.languageCode,"onUpdate:languageCode":t[0]||(t[0]=te=>r.languageCode=te),"translate-apis":r.translateApis,languages:r.languages,"history-key":N.historyKey,"onClick:showHistory":te=>o.onShowHistory(N.id,te),"favorite-key":N.favoriteKey,onRefreshFavorites:o.onRefreshFavorites,"onClick:showFavorite":te=>o.onShowFavorite(N.id,te),"can-one-translate":r.canOneTranslate,"onUpdate:canOneTranslate":t[1]||(t[1]=te=>r.canOneTranslate=te),"auto-translate":r.autoTranslate,"onUpdate:autoTranslate":t[2]||(t[2]=te=>r.autoTranslate=te),"auto-translate-to-english":r.autoTranslateToEnglish,"onUpdate:autoTranslateToEnglish":t[3]||(t[3]=te=>r.autoTranslateToEnglish=te),"auto-translate-to-local":r.autoTranslateToLocal,"onUpdate:autoTranslateToLocal":t[4]||(t[4]=te=>r.autoTranslateToLocal=te),"auto-remove-space":r.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[5]||(t[5]=te=>r.autoRemoveSpace=te),"auto-remove-last-comma":r.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[6]||(t[6]=te=>r.autoRemoveLastComma=te),"auto-keep-weight-zero":r.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[7]||(t[7]=te=>r.autoKeepWeightZero=te),"auto-keep-weight-one":r.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[8]||(t[8]=te=>r.autoKeepWeightOne=te),"hide-default-input":N.hideDefaultInput,"onUpdate:hideDefaultInput":te=>o.onUpdateHideDefaultInput(N.id,te),"hide-panel":N.hidePanel,"onUpdate:hidePanel":te=>o.onUpdateHidePanel(N.id,te),"enable-tooltip":r.enableTooltip,"onUpdate:enableTooltip":t[9]||(t[9]=te=>r.enableTooltip=te),"translate-api":r.translateApi,"onUpdate:translateApi":t[10]||(t[10]=te=>r.translateApi=te),"translate-api-config":r.translateApiConfig,"onClick:translateApi":o.onTranslateApiClick,"onClick:promptFormat":o.onPromptFormatClick,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[11]||(t[11]=te=>r.tagCompleteFile=te),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[12]||(t[12]=te=>r.onlyCsvOnAuto=te),"onClick:selectLanguage":o.onSelectLanguageClick,"onClick:selectTheme":o.onSelectThemeClick,"onClick:showChatgpt":te=>o.onShowChatgpt(N.id,te),"extra-networks":r.extraNetworks,loras:r.loras,lycos:r.lycos,embeddings:r.embeddings,version:r.version,"latest-version":r.latestVersion,"is-latest-version":r.isLatestVersion,"onClick:showAbout":o.onShowAbout,theme:r.theme,"onClick:switchTheme":o.onSwitchTheme},null,8,["id","name","neg","textarea","steps","language-code","translate-apis","languages","history-key","onClick:showHistory","favorite-key","onRefreshFavorites","onClick:showFavorite","can-one-translate","auto-translate","auto-translate-to-english","auto-translate-to-local","auto-remove-space","auto-remove-last-comma","auto-keep-weight-zero","auto-keep-weight-one","hide-default-input","onUpdate:hideDefaultInput","hide-panel","onUpdate:hidePanel","enable-tooltip","translate-api","translate-api-config","onClick:translateApi","onClick:promptFormat","tag-complete-file","only-csv-on-auto","onClick:selectLanguage","onClick:selectTheme","onClick:showChatgpt","extra-networks","loras","lycos","embeddings","version","latest-version","is-latest-version","onClick:showAbout","theme","onClick:switchTheme"])):qe("",!0)],64))),128)),De(c,{ref:"translateSetting","language-code":r.languageCode,"onUpdate:languageCode":t[13]||(t[13]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"onForceUpdate:translateApi":o.updateTranslateApiConfig,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[14]||(t[14]=N=>r.tagCompleteFile=N),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[15]||(t[15]=N=>r.onlyCsvOnAuto=N),"translate-api":r.translateApi,"onUpdate:translateApi":t[16]||(t[16]=N=>r.translateApi=N)},null,8,["language-code","translate-apis","languages","onForceUpdate:translateApi","tag-complete-file","only-csv-on-auto","translate-api"]),De(d,{ref:"selectLanguage","language-code":r.languageCode,"onUpdate:languageCode":t[17]||(t[17]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"translate-api":r.translateApi,"onUpdate:translateApi":t[18]||(t[18]=N=>r.translateApi=N),"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[19]||(t[19]=N=>r.tagCompleteFile=N),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[20]||(t[20]=N=>r.onlyCsvOnAuto=N)},null,8,["language-code","translate-apis","languages","translate-api","tag-complete-file","only-csv-on-auto"]),De(m,{ref:"promptFormat","language-code":r.languageCode,"onUpdate:languageCode":t[21]||(t[21]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"auto-remove-space":r.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[22]||(t[22]=N=>r.autoRemoveSpace=N),"auto-remove-last-comma":r.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[23]||(t[23]=N=>r.autoRemoveLastComma=N),"auto-keep-weight-zero":r.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[24]||(t[24]=N=>r.autoKeepWeightZero=N),"auto-keep-weight-one":r.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[25]||(t[25]=N=>r.autoKeepWeightOne=N)},null,8,["language-code","translate-apis","languages","auto-remove-space","auto-remove-last-comma","auto-keep-weight-zero","auto-keep-weight-one"]),De(g,{ref:"history","language-code":r.languageCode,"onUpdate:languageCode":t[26]||(t[26]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[27]||(t[27]=N=>r.tagCompleteFile=N),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[28]||(t[28]=N=>r.onlyCsvOnAuto=N),onRefreshFavorites:o.onRefreshFavorites,onUse:o.onUseHistory},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onRefreshFavorites","onUse"]),De(w,{ref:"favorite","language-code":r.languageCode,"onUpdate:languageCode":t[29]||(t[29]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[30]||(t[30]=N=>r.tagCompleteFile=N),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[31]||(t[31]=N=>r.onlyCsvOnAuto=N),onUse:o.onUseFavorite},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onUse"]),De(T,{ref:"extensionCss","language-code":r.languageCode,"onUpdate:languageCode":t[32]||(t[32]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages},null,8,["language-code","translate-apis","languages"]),De(H,{ref:"packagesState","language-code":r.languageCode,"onUpdate:languageCode":t[33]||(t[33]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,"onClick:selectLanguage":o.onSelectLanguageClick,"packages-state":r.packagesState,python:r.python},null,8,["language-code","translate-apis","languages","onClick:selectLanguage","packages-state","python"]),De(x,{ref:"chatgptPrompt","language-code":r.languageCode,"onUpdate:languageCode":t[34]||(t[34]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages,onUse:o.onUseChatgpt},null,8,["language-code","translate-apis","languages","onUse"]),De(I,{ref:"about","language-code":r.languageCode,"onUpdate:languageCode":t[35]||(t[35]=N=>r.languageCode=N),"translate-apis":r.translateApis,languages:r.languages},null,8,["language-code","translate-apis","languages"]),r.showPastePopup?(F(),U("div",{key:0,class:"physton-paste-popup",onClick:t[40]||(t[40]=(...N)=>o.closePastePopup&&o.closePastePopup(...N))},[_("div",{class:"paste-popup-main",onClick:t[39]||(t[39]=ct(()=>{},["stop"]))},[_("div",{class:"paste-popup-close",onClick:t[36]||(t[36]=(...N)=>o.closePastePopup&&o.closePastePopup(...N))},[De(V,{name:"close"})]),_("div",SC,ve(r.pasteTitle),1),_("div",xC,[xe(_("textarea",{class:"paste-content","onUpdate:modelValue":t[37]||(t[37]=N=>r.pasteContent=N),placeholder:o.getLang("please_enter_the_content_here")},null,8,AC),[[Hi,r.pasteContent]]),r.pasteLoading?(F(),U("div",LC,[De(V,{name:"loading"})])):(F(),U("div",{key:0,class:"paste-submit",onClick:t[38]||(t[38]=(...N)=>o.onClickPasteSubmit&&o.onClickPasteSubmit(...N))},"Submit"))])])])):qe("",!0)])}const DC=un(kC,[["render",OC]]);var Ic={exports:{}},Ua={exports:{}};/*!
|
||
* jQuery JavaScript Library v3.6.4
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright OpenJS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2023-03-08T15:28Z
|
||
*/var Pc;function IC(){return Pc||(Pc=1,function(e){(function(t,n){e.exports=t.document?n(t,!0):function(i){if(!i.document)throw new Error("jQuery requires a window with a document");return n(i)}})(typeof window<"u"?window:ja,function(t,n){var i=[],r=Object.getPrototypeOf,o=i.slice,l=i.flat?function(s){return i.flat.call(s)}:function(s){return i.concat.apply([],s)},c=i.push,d=i.indexOf,m={},g=m.toString,w=m.hasOwnProperty,T=w.toString,H=T.call(Object),x={},I=function(u){return typeof u=="function"&&typeof u.nodeType!="number"&&typeof u.item!="function"},V=function(u){return u!=null&&u===u.window},N=t.document,te={type:!0,src:!0,nonce:!0,noModule:!0};function ye(s,u,f){f=f||N;var h,v,y=f.createElement("script");if(y.text=s,u)for(h in te)v=u[h]||u.getAttribute&&u.getAttribute(h),v&&y.setAttribute(h,v);f.head.appendChild(y).parentNode.removeChild(y)}function D(s){return s==null?s+"":typeof s=="object"||typeof s=="function"?m[g.call(s)]||"object":typeof s}var Fe="3.6.4",p=function(s,u){return new p.fn.init(s,u)};p.fn=p.prototype={jquery:Fe,constructor:p,length:0,toArray:function(){return o.call(this)},get:function(s){return s==null?o.call(this):s<0?this[s+this.length]:this[s]},pushStack:function(s){var u=p.merge(this.constructor(),s);return u.prevObject=this,u},each:function(s){return p.each(this,s)},map:function(s){return this.pushStack(p.map(this,function(u,f){return s.call(u,f,u)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,function(s,u){return(u+1)%2}))},odd:function(){return this.pushStack(p.grep(this,function(s,u){return u%2}))},eq:function(s){var u=this.length,f=+s+(s<0?u:0);return this.pushStack(f>=0&&f<u?[this[f]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:i.sort,splice:i.splice},p.extend=p.fn.extend=function(){var s,u,f,h,v,y,b=arguments[0]||{},O=1,S=arguments.length,$=!1;for(typeof b=="boolean"&&($=b,b=arguments[O]||{},O++),typeof b!="object"&&!I(b)&&(b={}),O===S&&(b=this,O--);O<S;O++)if((s=arguments[O])!=null)for(u in s)h=s[u],!(u==="__proto__"||b===h)&&($&&h&&(p.isPlainObject(h)||(v=Array.isArray(h)))?(f=b[u],v&&!Array.isArray(f)?y=[]:!v&&!p.isPlainObject(f)?y={}:y=f,v=!1,b[u]=p.extend($,y,h)):h!==void 0&&(b[u]=h));return b},p.extend({expando:"jQuery"+(Fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(s){throw new Error(s)},noop:function(){},isPlainObject:function(s){var u,f;return!s||g.call(s)!=="[object Object]"?!1:(u=r(s),u?(f=w.call(u,"constructor")&&u.constructor,typeof f=="function"&&T.call(f)===H):!0)},isEmptyObject:function(s){var u;for(u in s)return!1;return!0},globalEval:function(s,u,f){ye(s,{nonce:u&&u.nonce},f)},each:function(s,u){var f,h=0;if(Ae(s))for(f=s.length;h<f&&u.call(s[h],h,s[h])!==!1;h++);else for(h in s)if(u.call(s[h],h,s[h])===!1)break;return s},makeArray:function(s,u){var f=u||[];return s!=null&&(Ae(Object(s))?p.merge(f,typeof s=="string"?[s]:s):c.call(f,s)),f},inArray:function(s,u,f){return u==null?-1:d.call(u,s,f)},merge:function(s,u){for(var f=+u.length,h=0,v=s.length;h<f;h++)s[v++]=u[h];return s.length=v,s},grep:function(s,u,f){for(var h,v=[],y=0,b=s.length,O=!f;y<b;y++)h=!u(s[y],y),h!==O&&v.push(s[y]);return v},map:function(s,u,f){var h,v,y=0,b=[];if(Ae(s))for(h=s.length;y<h;y++)v=u(s[y],y,f),v!=null&&b.push(v);else for(y in s)v=u(s[y],y,f),v!=null&&b.push(v);return l(b)},guid:1,support:x}),typeof Symbol=="function"&&(p.fn[Symbol.iterator]=i[Symbol.iterator]),p.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(s,u){m["[object "+u+"]"]=u.toLowerCase()});function Ae(s){var u=!!s&&"length"in s&&s.length,f=D(s);return I(s)||V(s)?!1:f==="array"||u===0||typeof u=="number"&&u>0&&u-1 in s}var R=function(s){var u,f,h,v,y,b,O,S,$,z,le,K,J,Be,it,He,qt,Bt,Cn,_t="sizzle"+1*new Date,nt=s.document,hn=0,mt=0,Rt=Fo(),ys=Fo(),No=Fo(),wn=Fo(),Xi=function(C,A){return C===A&&(le=!0),0},Yi={}.hasOwnProperty,gn=[],Si=gn.pop,Dn=gn.push,xi=gn.push,vd=gn.slice,Gi=function(C,A){for(var M=0,Q=C.length;M<Q;M++)if(C[M]===A)return M;return-1},Ol="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",bt="[\\x20\\t\\r\\n\\f]",Ji="(?:\\\\[\\da-fA-F]{1,6}"+bt+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",yd="\\["+bt+"*("+Ji+")(?:"+bt+"*([*^$|!~]?=)"+bt+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Ji+"))|)"+bt+"*\\]",Dl=":("+Ji+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+yd+")*)|.*)\\)|)",l1=new RegExp(bt+"+","g"),Ro=new RegExp("^"+bt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+bt+"+$","g"),u1=new RegExp("^"+bt+"*,"+bt+"*"),bd=new RegExp("^"+bt+"*([>+~]|"+bt+")"+bt+"*"),c1=new RegExp(bt+"|>"),f1=new RegExp(Dl),d1=new RegExp("^"+Ji+"$"),Mo={ID:new RegExp("^#("+Ji+")"),CLASS:new RegExp("^\\.("+Ji+")"),TAG:new RegExp("^("+Ji+"|[*])"),ATTR:new RegExp("^"+yd),PSEUDO:new RegExp("^"+Dl),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+bt+"*(even|odd|(([+-]|)(\\d*)n|)"+bt+"*(?:([+-]|)"+bt+"*(\\d+)|))"+bt+"*\\)|)","i"),bool:new RegExp("^(?:"+Ol+")$","i"),needsContext:new RegExp("^"+bt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+bt+"*((?:-\\d)?\\d*)"+bt+"*\\)|)(?=[^-]|$)","i")},p1=/HTML$/i,h1=/^(?:input|select|textarea|button)$/i,g1=/^h\d$/i,bs=/^[^{]+\{\s*\[native \w/,m1=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Il=/[+~]/,pi=new RegExp("\\\\[\\da-fA-F]{1,6}"+bt+"?|\\\\([^\\r\\n\\f])","g"),hi=function(C,A){var M="0x"+C.slice(1)-65536;return A||(M<0?String.fromCharCode(M+65536):String.fromCharCode(M>>10|55296,M&1023|56320))},Cd=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,wd=function(C,A){return A?C==="\0"?"<22>":C.slice(0,-1)+"\\"+C.charCodeAt(C.length-1).toString(16)+" ":"\\"+C},_d=function(){K()},v1=Bo(function(C){return C.disabled===!0&&C.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{xi.apply(gn=vd.call(nt.childNodes),nt.childNodes),gn[nt.childNodes.length].nodeType}catch{xi={apply:gn.length?function(A,M){Dn.apply(A,vd.call(M))}:function(A,M){for(var Q=A.length,j=0;A[Q++]=M[j++];);A.length=Q-1}}}function Tt(C,A,M,Q){var j,ie,ue,Se,Pe,We,Ue,Xe=A&&A.ownerDocument,lt=A?A.nodeType:9;if(M=M||[],typeof C!="string"||!C||lt!==1&<!==9&<!==11)return M;if(!Q&&(K(A),A=A||J,it)){if(lt!==11&&(Pe=m1.exec(C)))if(j=Pe[1]){if(lt===9)if(ue=A.getElementById(j)){if(ue.id===j)return M.push(ue),M}else return M;else if(Xe&&(ue=Xe.getElementById(j))&&Cn(A,ue)&&ue.id===j)return M.push(ue),M}else{if(Pe[2])return xi.apply(M,A.getElementsByTagName(C)),M;if((j=Pe[3])&&f.getElementsByClassName&&A.getElementsByClassName)return xi.apply(M,A.getElementsByClassName(j)),M}if(f.qsa&&!wn[C+" "]&&(!He||!He.test(C))&&(lt!==1||A.nodeName.toLowerCase()!=="object")){if(Ue=C,Xe=A,lt===1&&(c1.test(C)||bd.test(C))){for(Xe=Il.test(C)&&Nl(A.parentNode)||A,(Xe!==A||!f.scope)&&((Se=A.getAttribute("id"))?Se=Se.replace(Cd,wd):A.setAttribute("id",Se=_t)),We=b(C),ie=We.length;ie--;)We[ie]=(Se?"#"+Se:":scope")+" "+Ho(We[ie]);Ue=We.join(",")}try{return xi.apply(M,Xe.querySelectorAll(Ue)),M}catch{wn(C,!0)}finally{Se===_t&&A.removeAttribute("id")}}}return S(C.replace(Ro,"$1"),A,M,Q)}function Fo(){var C=[];function A(M,Q){return C.push(M+" ")>h.cacheLength&&delete A[C.shift()],A[M+" "]=Q}return A}function Un(C){return C[_t]=!0,C}function In(C){var A=J.createElement("fieldset");try{return!!C(A)}catch{return!1}finally{A.parentNode&&A.parentNode.removeChild(A),A=null}}function Pl(C,A){for(var M=C.split("|"),Q=M.length;Q--;)h.attrHandle[M[Q]]=A}function Td(C,A){var M=A&&C,Q=M&&C.nodeType===1&&A.nodeType===1&&C.sourceIndex-A.sourceIndex;if(Q)return Q;if(M){for(;M=M.nextSibling;)if(M===A)return-1}return C?1:-1}function y1(C){return function(A){var M=A.nodeName.toLowerCase();return M==="input"&&A.type===C}}function b1(C){return function(A){var M=A.nodeName.toLowerCase();return(M==="input"||M==="button")&&A.type===C}}function Ed(C){return function(A){return"form"in A?A.parentNode&&A.disabled===!1?"label"in A?"label"in A.parentNode?A.parentNode.disabled===C:A.disabled===C:A.isDisabled===C||A.isDisabled!==!C&&v1(A)===C:A.disabled===C:"label"in A?A.disabled===C:!1}}function Zi(C){return Un(function(A){return A=+A,Un(function(M,Q){for(var j,ie=C([],M.length,A),ue=ie.length;ue--;)M[j=ie[ue]]&&(M[j]=!(Q[j]=M[j]))})})}function Nl(C){return C&&typeof C.getElementsByTagName<"u"&&C}f=Tt.support={},y=Tt.isXML=function(C){var A=C&&C.namespaceURI,M=C&&(C.ownerDocument||C).documentElement;return!p1.test(A||M&&M.nodeName||"HTML")},K=Tt.setDocument=function(C){var A,M,Q=C?C.ownerDocument||C:nt;return Q==J||Q.nodeType!==9||!Q.documentElement||(J=Q,Be=J.documentElement,it=!y(J),nt!=J&&(M=J.defaultView)&&M.top!==M&&(M.addEventListener?M.addEventListener("unload",_d,!1):M.attachEvent&&M.attachEvent("onunload",_d)),f.scope=In(function(j){return Be.appendChild(j).appendChild(J.createElement("div")),typeof j.querySelectorAll<"u"&&!j.querySelectorAll(":scope fieldset div").length}),f.cssHas=In(function(){try{return J.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),f.attributes=In(function(j){return j.className="i",!j.getAttribute("className")}),f.getElementsByTagName=In(function(j){return j.appendChild(J.createComment("")),!j.getElementsByTagName("*").length}),f.getElementsByClassName=bs.test(J.getElementsByClassName),f.getById=In(function(j){return Be.appendChild(j).id=_t,!J.getElementsByName||!J.getElementsByName(_t).length}),f.getById?(h.filter.ID=function(j){var ie=j.replace(pi,hi);return function(ue){return ue.getAttribute("id")===ie}},h.find.ID=function(j,ie){if(typeof ie.getElementById<"u"&&it){var ue=ie.getElementById(j);return ue?[ue]:[]}}):(h.filter.ID=function(j){var ie=j.replace(pi,hi);return function(ue){var Se=typeof ue.getAttributeNode<"u"&&ue.getAttributeNode("id");return Se&&Se.value===ie}},h.find.ID=function(j,ie){if(typeof ie.getElementById<"u"&&it){var ue,Se,Pe,We=ie.getElementById(j);if(We){if(ue=We.getAttributeNode("id"),ue&&ue.value===j)return[We];for(Pe=ie.getElementsByName(j),Se=0;We=Pe[Se++];)if(ue=We.getAttributeNode("id"),ue&&ue.value===j)return[We]}return[]}}),h.find.TAG=f.getElementsByTagName?function(j,ie){if(typeof ie.getElementsByTagName<"u")return ie.getElementsByTagName(j);if(f.qsa)return ie.querySelectorAll(j)}:function(j,ie){var ue,Se=[],Pe=0,We=ie.getElementsByTagName(j);if(j==="*"){for(;ue=We[Pe++];)ue.nodeType===1&&Se.push(ue);return Se}return We},h.find.CLASS=f.getElementsByClassName&&function(j,ie){if(typeof ie.getElementsByClassName<"u"&&it)return ie.getElementsByClassName(j)},qt=[],He=[],(f.qsa=bs.test(J.querySelectorAll))&&(In(function(j){var ie;Be.appendChild(j).innerHTML="<a id='"+_t+"'></a><select id='"+_t+"-\r\\' msallowcapture=''><option selected=''></option></select>",j.querySelectorAll("[msallowcapture^='']").length&&He.push("[*^$]="+bt+`*(?:''|"")`),j.querySelectorAll("[selected]").length||He.push("\\["+bt+"*(?:value|"+Ol+")"),j.querySelectorAll("[id~="+_t+"-]").length||He.push("~="),ie=J.createElement("input"),ie.setAttribute("name",""),j.appendChild(ie),j.querySelectorAll("[name='']").length||He.push("\\["+bt+"*name"+bt+"*="+bt+`*(?:''|"")`),j.querySelectorAll(":checked").length||He.push(":checked"),j.querySelectorAll("a#"+_t+"+*").length||He.push(".#.+[+~]"),j.querySelectorAll("\\\f"),He.push("[\\r\\n\\f]")}),In(function(j){j.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var ie=J.createElement("input");ie.setAttribute("type","hidden"),j.appendChild(ie).setAttribute("name","D"),j.querySelectorAll("[name=d]").length&&He.push("name"+bt+"*[*^$|!~]?="),j.querySelectorAll(":enabled").length!==2&&He.push(":enabled",":disabled"),Be.appendChild(j).disabled=!0,j.querySelectorAll(":disabled").length!==2&&He.push(":enabled",":disabled"),j.querySelectorAll("*,:x"),He.push(",.*:")})),(f.matchesSelector=bs.test(Bt=Be.matches||Be.webkitMatchesSelector||Be.mozMatchesSelector||Be.oMatchesSelector||Be.msMatchesSelector))&&In(function(j){f.disconnectedMatch=Bt.call(j,"*"),Bt.call(j,"[s!='']:x"),qt.push("!=",Dl)}),f.cssHas||He.push(":has"),He=He.length&&new RegExp(He.join("|")),qt=qt.length&&new RegExp(qt.join("|")),A=bs.test(Be.compareDocumentPosition),Cn=A||bs.test(Be.contains)?function(j,ie){var ue=j.nodeType===9&&j.documentElement||j,Se=ie&&ie.parentNode;return j===Se||!!(Se&&Se.nodeType===1&&(ue.contains?ue.contains(Se):j.compareDocumentPosition&&j.compareDocumentPosition(Se)&16))}:function(j,ie){if(ie){for(;ie=ie.parentNode;)if(ie===j)return!0}return!1},Xi=A?function(j,ie){if(j===ie)return le=!0,0;var ue=!j.compareDocumentPosition-!ie.compareDocumentPosition;return ue||(ue=(j.ownerDocument||j)==(ie.ownerDocument||ie)?j.compareDocumentPosition(ie):1,ue&1||!f.sortDetached&&ie.compareDocumentPosition(j)===ue?j==J||j.ownerDocument==nt&&Cn(nt,j)?-1:ie==J||ie.ownerDocument==nt&&Cn(nt,ie)?1:z?Gi(z,j)-Gi(z,ie):0:ue&4?-1:1)}:function(j,ie){if(j===ie)return le=!0,0;var ue,Se=0,Pe=j.parentNode,We=ie.parentNode,Ue=[j],Xe=[ie];if(!Pe||!We)return j==J?-1:ie==J?1:Pe?-1:We?1:z?Gi(z,j)-Gi(z,ie):0;if(Pe===We)return Td(j,ie);for(ue=j;ue=ue.parentNode;)Ue.unshift(ue);for(ue=ie;ue=ue.parentNode;)Xe.unshift(ue);for(;Ue[Se]===Xe[Se];)Se++;return Se?Td(Ue[Se],Xe[Se]):Ue[Se]==nt?-1:Xe[Se]==nt?1:0}),J},Tt.matches=function(C,A){return Tt(C,null,null,A)},Tt.matchesSelector=function(C,A){if(K(C),f.matchesSelector&&it&&!wn[A+" "]&&(!qt||!qt.test(A))&&(!He||!He.test(A)))try{var M=Bt.call(C,A);if(M||f.disconnectedMatch||C.document&&C.document.nodeType!==11)return M}catch{wn(A,!0)}return Tt(A,J,null,[C]).length>0},Tt.contains=function(C,A){return(C.ownerDocument||C)!=J&&K(C),Cn(C,A)},Tt.attr=function(C,A){(C.ownerDocument||C)!=J&&K(C);var M=h.attrHandle[A.toLowerCase()],Q=M&&Yi.call(h.attrHandle,A.toLowerCase())?M(C,A,!it):void 0;return Q!==void 0?Q:f.attributes||!it?C.getAttribute(A):(Q=C.getAttributeNode(A))&&Q.specified?Q.value:null},Tt.escape=function(C){return(C+"").replace(Cd,wd)},Tt.error=function(C){throw new Error("Syntax error, unrecognized expression: "+C)},Tt.uniqueSort=function(C){var A,M=[],Q=0,j=0;if(le=!f.detectDuplicates,z=!f.sortStable&&C.slice(0),C.sort(Xi),le){for(;A=C[j++];)A===C[j]&&(Q=M.push(j));for(;Q--;)C.splice(M[Q],1)}return z=null,C},v=Tt.getText=function(C){var A,M="",Q=0,j=C.nodeType;if(j){if(j===1||j===9||j===11){if(typeof C.textContent=="string")return C.textContent;for(C=C.firstChild;C;C=C.nextSibling)M+=v(C)}else if(j===3||j===4)return C.nodeValue}else for(;A=C[Q++];)M+=v(A);return M},h=Tt.selectors={cacheLength:50,createPseudo:Un,match:Mo,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(C){return C[1]=C[1].replace(pi,hi),C[3]=(C[3]||C[4]||C[5]||"").replace(pi,hi),C[2]==="~="&&(C[3]=" "+C[3]+" "),C.slice(0,4)},CHILD:function(C){return C[1]=C[1].toLowerCase(),C[1].slice(0,3)==="nth"?(C[3]||Tt.error(C[0]),C[4]=+(C[4]?C[5]+(C[6]||1):2*(C[3]==="even"||C[3]==="odd")),C[5]=+(C[7]+C[8]||C[3]==="odd")):C[3]&&Tt.error(C[0]),C},PSEUDO:function(C){var A,M=!C[6]&&C[2];return Mo.CHILD.test(C[0])?null:(C[3]?C[2]=C[4]||C[5]||"":M&&f1.test(M)&&(A=b(M,!0))&&(A=M.indexOf(")",M.length-A)-M.length)&&(C[0]=C[0].slice(0,A),C[2]=M.slice(0,A)),C.slice(0,3))}},filter:{TAG:function(C){var A=C.replace(pi,hi).toLowerCase();return C==="*"?function(){return!0}:function(M){return M.nodeName&&M.nodeName.toLowerCase()===A}},CLASS:function(C){var A=Rt[C+" "];return A||(A=new RegExp("(^|"+bt+")"+C+"("+bt+"|$)"))&&Rt(C,function(M){return A.test(typeof M.className=="string"&&M.className||typeof M.getAttribute<"u"&&M.getAttribute("class")||"")})},ATTR:function(C,A,M){return function(Q){var j=Tt.attr(Q,C);return j==null?A==="!=":A?(j+="",A==="="?j===M:A==="!="?j!==M:A==="^="?M&&j.indexOf(M)===0:A==="*="?M&&j.indexOf(M)>-1:A==="$="?M&&j.slice(-M.length)===M:A==="~="?(" "+j.replace(l1," ")+" ").indexOf(M)>-1:A==="|="?j===M||j.slice(0,M.length+1)===M+"-":!1):!0}},CHILD:function(C,A,M,Q,j){var ie=C.slice(0,3)!=="nth",ue=C.slice(-4)!=="last",Se=A==="of-type";return Q===1&&j===0?function(Pe){return!!Pe.parentNode}:function(Pe,We,Ue){var Xe,lt,Et,Ke,Vt,Qt,_n=ie!==ue?"nextSibling":"previousSibling",It=Pe.parentNode,Cs=Se&&Pe.nodeName.toLowerCase(),ws=!Ue&&!Se,Tn=!1;if(It){if(ie){for(;_n;){for(Ke=Pe;Ke=Ke[_n];)if(Se?Ke.nodeName.toLowerCase()===Cs:Ke.nodeType===1)return!1;Qt=_n=C==="only"&&!Qt&&"nextSibling"}return!0}if(Qt=[ue?It.firstChild:It.lastChild],ue&&ws){for(Ke=It,Et=Ke[_t]||(Ke[_t]={}),lt=Et[Ke.uniqueID]||(Et[Ke.uniqueID]={}),Xe=lt[C]||[],Vt=Xe[0]===hn&&Xe[1],Tn=Vt&&Xe[2],Ke=Vt&&It.childNodes[Vt];Ke=++Vt&&Ke&&Ke[_n]||(Tn=Vt=0)||Qt.pop();)if(Ke.nodeType===1&&++Tn&&Ke===Pe){lt[C]=[hn,Vt,Tn];break}}else if(ws&&(Ke=Pe,Et=Ke[_t]||(Ke[_t]={}),lt=Et[Ke.uniqueID]||(Et[Ke.uniqueID]={}),Xe=lt[C]||[],Vt=Xe[0]===hn&&Xe[1],Tn=Vt),Tn===!1)for(;(Ke=++Vt&&Ke&&Ke[_n]||(Tn=Vt=0)||Qt.pop())&&!((Se?Ke.nodeName.toLowerCase()===Cs:Ke.nodeType===1)&&++Tn&&(ws&&(Et=Ke[_t]||(Ke[_t]={}),lt=Et[Ke.uniqueID]||(Et[Ke.uniqueID]={}),lt[C]=[hn,Tn]),Ke===Pe)););return Tn-=j,Tn===Q||Tn%Q===0&&Tn/Q>=0}}},PSEUDO:function(C,A){var M,Q=h.pseudos[C]||h.setFilters[C.toLowerCase()]||Tt.error("unsupported pseudo: "+C);return Q[_t]?Q(A):Q.length>1?(M=[C,C,"",A],h.setFilters.hasOwnProperty(C.toLowerCase())?Un(function(j,ie){for(var ue,Se=Q(j,A),Pe=Se.length;Pe--;)ue=Gi(j,Se[Pe]),j[ue]=!(ie[ue]=Se[Pe])}):function(j){return Q(j,0,M)}):Q}},pseudos:{not:Un(function(C){var A=[],M=[],Q=O(C.replace(Ro,"$1"));return Q[_t]?Un(function(j,ie,ue,Se){for(var Pe,We=Q(j,null,Se,[]),Ue=j.length;Ue--;)(Pe=We[Ue])&&(j[Ue]=!(ie[Ue]=Pe))}):function(j,ie,ue){return A[0]=j,Q(A,null,ue,M),A[0]=null,!M.pop()}}),has:Un(function(C){return function(A){return Tt(C,A).length>0}}),contains:Un(function(C){return C=C.replace(pi,hi),function(A){return(A.textContent||v(A)).indexOf(C)>-1}}),lang:Un(function(C){return d1.test(C||"")||Tt.error("unsupported lang: "+C),C=C.replace(pi,hi).toLowerCase(),function(A){var M;do if(M=it?A.lang:A.getAttribute("xml:lang")||A.getAttribute("lang"))return M=M.toLowerCase(),M===C||M.indexOf(C+"-")===0;while((A=A.parentNode)&&A.nodeType===1);return!1}}),target:function(C){var A=s.location&&s.location.hash;return A&&A.slice(1)===C.id},root:function(C){return C===Be},focus:function(C){return C===J.activeElement&&(!J.hasFocus||J.hasFocus())&&!!(C.type||C.href||~C.tabIndex)},enabled:Ed(!1),disabled:Ed(!0),checked:function(C){var A=C.nodeName.toLowerCase();return A==="input"&&!!C.checked||A==="option"&&!!C.selected},selected:function(C){return C.parentNode&&C.parentNode.selectedIndex,C.selected===!0},empty:function(C){for(C=C.firstChild;C;C=C.nextSibling)if(C.nodeType<6)return!1;return!0},parent:function(C){return!h.pseudos.empty(C)},header:function(C){return g1.test(C.nodeName)},input:function(C){return h1.test(C.nodeName)},button:function(C){var A=C.nodeName.toLowerCase();return A==="input"&&C.type==="button"||A==="button"},text:function(C){var A;return C.nodeName.toLowerCase()==="input"&&C.type==="text"&&((A=C.getAttribute("type"))==null||A.toLowerCase()==="text")},first:Zi(function(){return[0]}),last:Zi(function(C,A){return[A-1]}),eq:Zi(function(C,A,M){return[M<0?M+A:M]}),even:Zi(function(C,A){for(var M=0;M<A;M+=2)C.push(M);return C}),odd:Zi(function(C,A){for(var M=1;M<A;M+=2)C.push(M);return C}),lt:Zi(function(C,A,M){for(var Q=M<0?M+A:M>A?A:M;--Q>=0;)C.push(Q);return C}),gt:Zi(function(C,A,M){for(var Q=M<0?M+A:M;++Q<A;)C.push(Q);return C})}},h.pseudos.nth=h.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})h.pseudos[u]=y1(u);for(u in{submit:!0,reset:!0})h.pseudos[u]=b1(u);function kd(){}kd.prototype=h.filters=h.pseudos,h.setFilters=new kd,b=Tt.tokenize=function(C,A){var M,Q,j,ie,ue,Se,Pe,We=ys[C+" "];if(We)return A?0:We.slice(0);for(ue=C,Se=[],Pe=h.preFilter;ue;){(!M||(Q=u1.exec(ue)))&&(Q&&(ue=ue.slice(Q[0].length)||ue),Se.push(j=[])),M=!1,(Q=bd.exec(ue))&&(M=Q.shift(),j.push({value:M,type:Q[0].replace(Ro," ")}),ue=ue.slice(M.length));for(ie in h.filter)(Q=Mo[ie].exec(ue))&&(!Pe[ie]||(Q=Pe[ie](Q)))&&(M=Q.shift(),j.push({value:M,type:ie,matches:Q}),ue=ue.slice(M.length));if(!M)break}return A?ue.length:ue?Tt.error(C):ys(C,Se).slice(0)};function Ho(C){for(var A=0,M=C.length,Q="";A<M;A++)Q+=C[A].value;return Q}function Bo(C,A,M){var Q=A.dir,j=A.next,ie=j||Q,ue=M&&ie==="parentNode",Se=mt++;return A.first?function(Pe,We,Ue){for(;Pe=Pe[Q];)if(Pe.nodeType===1||ue)return C(Pe,We,Ue);return!1}:function(Pe,We,Ue){var Xe,lt,Et,Ke=[hn,Se];if(Ue){for(;Pe=Pe[Q];)if((Pe.nodeType===1||ue)&&C(Pe,We,Ue))return!0}else for(;Pe=Pe[Q];)if(Pe.nodeType===1||ue)if(Et=Pe[_t]||(Pe[_t]={}),lt=Et[Pe.uniqueID]||(Et[Pe.uniqueID]={}),j&&j===Pe.nodeName.toLowerCase())Pe=Pe[Q]||Pe;else{if((Xe=lt[ie])&&Xe[0]===hn&&Xe[1]===Se)return Ke[2]=Xe[2];if(lt[ie]=Ke,Ke[2]=C(Pe,We,Ue))return!0}return!1}}function Rl(C){return C.length>1?function(A,M,Q){for(var j=C.length;j--;)if(!C[j](A,M,Q))return!1;return!0}:C[0]}function C1(C,A,M){for(var Q=0,j=A.length;Q<j;Q++)Tt(C,A[Q],M);return M}function jo(C,A,M,Q,j){for(var ie,ue=[],Se=0,Pe=C.length,We=A!=null;Se<Pe;Se++)(ie=C[Se])&&(!M||M(ie,Q,j))&&(ue.push(ie),We&&A.push(Se));return ue}function Ml(C,A,M,Q,j,ie){return Q&&!Q[_t]&&(Q=Ml(Q)),j&&!j[_t]&&(j=Ml(j,ie)),Un(function(ue,Se,Pe,We){var Ue,Xe,lt,Et=[],Ke=[],Vt=Se.length,Qt=ue||C1(A||"*",Pe.nodeType?[Pe]:Pe,[]),_n=C&&(ue||!A)?jo(Qt,Et,C,Pe,We):Qt,It=M?j||(ue?C:Vt||Q)?[]:Se:_n;if(M&&M(_n,It,Pe,We),Q)for(Ue=jo(It,Ke),Q(Ue,[],Pe,We),Xe=Ue.length;Xe--;)(lt=Ue[Xe])&&(It[Ke[Xe]]=!(_n[Ke[Xe]]=lt));if(ue){if(j||C){if(j){for(Ue=[],Xe=It.length;Xe--;)(lt=It[Xe])&&Ue.push(_n[Xe]=lt);j(null,It=[],Ue,We)}for(Xe=It.length;Xe--;)(lt=It[Xe])&&(Ue=j?Gi(ue,lt):Et[Xe])>-1&&(ue[Ue]=!(Se[Ue]=lt))}}else It=jo(It===Se?It.splice(Vt,It.length):It),j?j(null,Se,It,We):xi.apply(Se,It)})}function Fl(C){for(var A,M,Q,j=C.length,ie=h.relative[C[0].type],ue=ie||h.relative[" "],Se=ie?1:0,Pe=Bo(function(Xe){return Xe===A},ue,!0),We=Bo(function(Xe){return Gi(A,Xe)>-1},ue,!0),Ue=[function(Xe,lt,Et){var Ke=!ie&&(Et||lt!==$)||((A=lt).nodeType?Pe(Xe,lt,Et):We(Xe,lt,Et));return A=null,Ke}];Se<j;Se++)if(M=h.relative[C[Se].type])Ue=[Bo(Rl(Ue),M)];else{if(M=h.filter[C[Se].type].apply(null,C[Se].matches),M[_t]){for(Q=++Se;Q<j&&!h.relative[C[Q].type];Q++);return Ml(Se>1&&Rl(Ue),Se>1&&Ho(C.slice(0,Se-1).concat({value:C[Se-2].type===" "?"*":""})).replace(Ro,"$1"),M,Se<Q&&Fl(C.slice(Se,Q)),Q<j&&Fl(C=C.slice(Q)),Q<j&&Ho(C))}Ue.push(M)}return Rl(Ue)}function w1(C,A){var M=A.length>0,Q=C.length>0,j=function(ie,ue,Se,Pe,We){var Ue,Xe,lt,Et=0,Ke="0",Vt=ie&&[],Qt=[],_n=$,It=ie||Q&&h.find.TAG("*",We),Cs=hn+=_n==null?1:Math.random()||.1,ws=It.length;for(We&&($=ue==J||ue||We);Ke!==ws&&(Ue=It[Ke])!=null;Ke++){if(Q&&Ue){for(Xe=0,!ue&&Ue.ownerDocument!=J&&(K(Ue),Se=!it);lt=C[Xe++];)if(lt(Ue,ue||J,Se)){Pe.push(Ue);break}We&&(hn=Cs)}M&&((Ue=!lt&&Ue)&&Et--,ie&&Vt.push(Ue))}if(Et+=Ke,M&&Ke!==Et){for(Xe=0;lt=A[Xe++];)lt(Vt,Qt,ue,Se);if(ie){if(Et>0)for(;Ke--;)Vt[Ke]||Qt[Ke]||(Qt[Ke]=Si.call(Pe));Qt=jo(Qt)}xi.apply(Pe,Qt),We&&!ie&&Qt.length>0&&Et+A.length>1&&Tt.uniqueSort(Pe)}return We&&(hn=Cs,$=_n),Vt};return M?Un(j):j}return O=Tt.compile=function(C,A){var M,Q=[],j=[],ie=No[C+" "];if(!ie){for(A||(A=b(C)),M=A.length;M--;)ie=Fl(A[M]),ie[_t]?Q.push(ie):j.push(ie);ie=No(C,w1(j,Q)),ie.selector=C}return ie},S=Tt.select=function(C,A,M,Q){var j,ie,ue,Se,Pe,We=typeof C=="function"&&C,Ue=!Q&&b(C=We.selector||C);if(M=M||[],Ue.length===1){if(ie=Ue[0]=Ue[0].slice(0),ie.length>2&&(ue=ie[0]).type==="ID"&&A.nodeType===9&&it&&h.relative[ie[1].type]){if(A=(h.find.ID(ue.matches[0].replace(pi,hi),A)||[])[0],A)We&&(A=A.parentNode);else return M;C=C.slice(ie.shift().value.length)}for(j=Mo.needsContext.test(C)?0:ie.length;j--&&(ue=ie[j],!h.relative[Se=ue.type]);)if((Pe=h.find[Se])&&(Q=Pe(ue.matches[0].replace(pi,hi),Il.test(ie[0].type)&&Nl(A.parentNode)||A))){if(ie.splice(j,1),C=Q.length&&Ho(ie),!C)return xi.apply(M,Q),M;break}}return(We||O(C,Ue))(Q,A,!it,M,!A||Il.test(C)&&Nl(A.parentNode)||A),M},f.sortStable=_t.split("").sort(Xi).join("")===_t,f.detectDuplicates=!!le,K(),f.sortDetached=In(function(C){return C.compareDocumentPosition(J.createElement("fieldset"))&1}),In(function(C){return C.innerHTML="<a href='#'></a>",C.firstChild.getAttribute("href")==="#"})||Pl("type|href|height|width",function(C,A,M){if(!M)return C.getAttribute(A,A.toLowerCase()==="type"?1:2)}),(!f.attributes||!In(function(C){return C.innerHTML="<input/>",C.firstChild.setAttribute("value",""),C.firstChild.getAttribute("value")===""}))&&Pl("value",function(C,A,M){if(!M&&C.nodeName.toLowerCase()==="input")return C.defaultValue}),In(function(C){return C.getAttribute("disabled")==null})||Pl(Ol,function(C,A,M){var Q;if(!M)return C[A]===!0?A.toLowerCase():(Q=C.getAttributeNode(A))&&Q.specified?Q.value:null}),Tt}(t);p.find=R,p.expr=R.selectors,p.expr[":"]=p.expr.pseudos,p.uniqueSort=p.unique=R.uniqueSort,p.text=R.getText,p.isXMLDoc=R.isXML,p.contains=R.contains,p.escapeSelector=R.escape;var E=function(s,u,f){for(var h=[],v=f!==void 0;(s=s[u])&&s.nodeType!==9;)if(s.nodeType===1){if(v&&p(s).is(f))break;h.push(s)}return h},P=function(s,u){for(var f=[];s;s=s.nextSibling)s.nodeType===1&&s!==u&&f.push(s);return f},Z=p.expr.match.needsContext;function re(s,u){return s.nodeName&&s.nodeName.toLowerCase()===u.toLowerCase()}var se=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Me(s,u,f){return I(u)?p.grep(s,function(h,v){return!!u.call(h,v,h)!==f}):u.nodeType?p.grep(s,function(h){return h===u!==f}):typeof u!="string"?p.grep(s,function(h){return d.call(u,h)>-1!==f}):p.filter(u,s,f)}p.filter=function(s,u,f){var h=u[0];return f&&(s=":not("+s+")"),u.length===1&&h.nodeType===1?p.find.matchesSelector(h,s)?[h]:[]:p.find.matches(s,p.grep(u,function(v){return v.nodeType===1}))},p.fn.extend({find:function(s){var u,f,h=this.length,v=this;if(typeof s!="string")return this.pushStack(p(s).filter(function(){for(u=0;u<h;u++)if(p.contains(v[u],this))return!0}));for(f=this.pushStack([]),u=0;u<h;u++)p.find(s,v[u],f);return h>1?p.uniqueSort(f):f},filter:function(s){return this.pushStack(Me(this,s||[],!1))},not:function(s){return this.pushStack(Me(this,s||[],!0))},is:function(s){return!!Me(this,typeof s=="string"&&Z.test(s)?p(s):s||[],!1).length}});var Ze,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,oe=p.fn.init=function(s,u,f){var h,v;if(!s)return this;if(f=f||Ze,typeof s=="string")if(s[0]==="<"&&s[s.length-1]===">"&&s.length>=3?h=[null,s,null]:h=Ne.exec(s),h&&(h[1]||!u))if(h[1]){if(u=u instanceof p?u[0]:u,p.merge(this,p.parseHTML(h[1],u&&u.nodeType?u.ownerDocument||u:N,!0)),se.test(h[1])&&p.isPlainObject(u))for(h in u)I(this[h])?this[h](u[h]):this.attr(h,u[h]);return this}else return v=N.getElementById(h[2]),v&&(this[0]=v,this.length=1),this;else return!u||u.jquery?(u||f).find(s):this.constructor(u).find(s);else{if(s.nodeType)return this[0]=s,this.length=1,this;if(I(s))return f.ready!==void 0?f.ready(s):s(p)}return p.makeArray(s,this)};oe.prototype=p.fn,Ze=p(N);var ge=/^(?:parents|prev(?:Until|All))/,Ee={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({has:function(s){var u=p(s,this),f=u.length;return this.filter(function(){for(var h=0;h<f;h++)if(p.contains(this,u[h]))return!0})},closest:function(s,u){var f,h=0,v=this.length,y=[],b=typeof s!="string"&&p(s);if(!Z.test(s)){for(;h<v;h++)for(f=this[h];f&&f!==u;f=f.parentNode)if(f.nodeType<11&&(b?b.index(f)>-1:f.nodeType===1&&p.find.matchesSelector(f,s))){y.push(f);break}}return this.pushStack(y.length>1?p.uniqueSort(y):y)},index:function(s){return s?typeof s=="string"?d.call(p(s),this[0]):d.call(this,s.jquery?s[0]:s):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(s,u){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(s,u))))},addBack:function(s){return this.add(s==null?this.prevObject:this.prevObject.filter(s))}});function ft(s,u){for(;(s=s[u])&&s.nodeType!==1;);return s}p.each({parent:function(s){var u=s.parentNode;return u&&u.nodeType!==11?u:null},parents:function(s){return E(s,"parentNode")},parentsUntil:function(s,u,f){return E(s,"parentNode",f)},next:function(s){return ft(s,"nextSibling")},prev:function(s){return ft(s,"previousSibling")},nextAll:function(s){return E(s,"nextSibling")},prevAll:function(s){return E(s,"previousSibling")},nextUntil:function(s,u,f){return E(s,"nextSibling",f)},prevUntil:function(s,u,f){return E(s,"previousSibling",f)},siblings:function(s){return P((s.parentNode||{}).firstChild,s)},children:function(s){return P(s.firstChild)},contents:function(s){return s.contentDocument!=null&&r(s.contentDocument)?s.contentDocument:(re(s,"template")&&(s=s.content||s),p.merge([],s.childNodes))}},function(s,u){p.fn[s]=function(f,h){var v=p.map(this,u,f);return s.slice(-5)!=="Until"&&(h=f),h&&typeof h=="string"&&(v=p.filter(h,v)),this.length>1&&(Ee[s]||p.uniqueSort(v),ge.test(s)&&v.reverse()),this.pushStack(v)}});var Ve=/[^\x20\t\r\n\f]+/g;function G(s){var u={};return p.each(s.match(Ve)||[],function(f,h){u[h]=!0}),u}p.Callbacks=function(s){s=typeof s=="string"?G(s):p.extend({},s);var u,f,h,v,y=[],b=[],O=-1,S=function(){for(v=v||s.once,h=u=!0;b.length;O=-1)for(f=b.shift();++O<y.length;)y[O].apply(f[0],f[1])===!1&&s.stopOnFalse&&(O=y.length,f=!1);s.memory||(f=!1),u=!1,v&&(f?y=[]:y="")},$={add:function(){return y&&(f&&!u&&(O=y.length-1,b.push(f)),function z(le){p.each(le,function(K,J){I(J)?(!s.unique||!$.has(J))&&y.push(J):J&&J.length&&D(J)!=="string"&&z(J)})}(arguments),f&&!u&&S()),this},remove:function(){return p.each(arguments,function(z,le){for(var K;(K=p.inArray(le,y,K))>-1;)y.splice(K,1),K<=O&&O--}),this},has:function(z){return z?p.inArray(z,y)>-1:y.length>0},empty:function(){return y&&(y=[]),this},disable:function(){return v=b=[],y=f="",this},disabled:function(){return!y},lock:function(){return v=b=[],!f&&!u&&(y=f=""),this},locked:function(){return!!v},fireWith:function(z,le){return v||(le=le||[],le=[z,le.slice?le.slice():le],b.push(le),u||S()),this},fire:function(){return $.fireWith(this,arguments),this},fired:function(){return!!h}};return $};function fe(s){return s}function me(s){throw s}function we(s,u,f,h){var v;try{s&&I(v=s.promise)?v.call(s).done(u).fail(f):s&&I(v=s.then)?v.call(s,u,f):u.apply(void 0,[s].slice(h))}catch(y){f.apply(void 0,[y])}}p.extend({Deferred:function(s){var u=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],f="pending",h={state:function(){return f},always:function(){return v.done(arguments).fail(arguments),this},catch:function(y){return h.then(null,y)},pipe:function(){var y=arguments;return p.Deferred(function(b){p.each(u,function(O,S){var $=I(y[S[4]])&&y[S[4]];v[S[1]](function(){var z=$&&$.apply(this,arguments);z&&I(z.promise)?z.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[S[0]+"With"](this,$?[z]:arguments)})}),y=null}).promise()},then:function(y,b,O){var S=0;function $(z,le,K,J){return function(){var Be=this,it=arguments,He=function(){var Bt,Cn;if(!(z<S)){if(Bt=K.apply(Be,it),Bt===le.promise())throw new TypeError("Thenable self-resolution");Cn=Bt&&(typeof Bt=="object"||typeof Bt=="function")&&Bt.then,I(Cn)?J?Cn.call(Bt,$(S,le,fe,J),$(S,le,me,J)):(S++,Cn.call(Bt,$(S,le,fe,J),$(S,le,me,J),$(S,le,fe,le.notifyWith))):(K!==fe&&(Be=void 0,it=[Bt]),(J||le.resolveWith)(Be,it))}},qt=J?He:function(){try{He()}catch(Bt){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(Bt,qt.stackTrace),z+1>=S&&(K!==me&&(Be=void 0,it=[Bt]),le.rejectWith(Be,it))}};z?qt():(p.Deferred.getStackHook&&(qt.stackTrace=p.Deferred.getStackHook()),t.setTimeout(qt))}}return p.Deferred(function(z){u[0][3].add($(0,z,I(O)?O:fe,z.notifyWith)),u[1][3].add($(0,z,I(y)?y:fe)),u[2][3].add($(0,z,I(b)?b:me))}).promise()},promise:function(y){return y!=null?p.extend(y,h):h}},v={};return p.each(u,function(y,b){var O=b[2],S=b[5];h[b[1]]=O.add,S&&O.add(function(){f=S},u[3-y][2].disable,u[3-y][3].disable,u[0][2].lock,u[0][3].lock),O.add(b[3].fire),v[b[0]]=function(){return v[b[0]+"With"](this===v?void 0:this,arguments),this},v[b[0]+"With"]=O.fireWith}),h.promise(v),s&&s.call(v,v),v},when:function(s){var u=arguments.length,f=u,h=Array(f),v=o.call(arguments),y=p.Deferred(),b=function(O){return function(S){h[O]=this,v[O]=arguments.length>1?o.call(arguments):S,--u||y.resolveWith(h,v)}};if(u<=1&&(we(s,y.done(b(f)).resolve,y.reject,!u),y.state()==="pending"||I(v[f]&&v[f].then)))return y.then();for(;f--;)we(v[f],b(f),y.reject);return y.promise()}});var Te=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(s,u){t.console&&t.console.warn&&s&&Te.test(s.name)&&t.console.warn("jQuery.Deferred exception: "+s.message,s.stack,u)},p.readyException=function(s){t.setTimeout(function(){throw s})};var Re=p.Deferred();p.fn.ready=function(s){return Re.then(s).catch(function(u){p.readyException(u)}),this},p.extend({isReady:!1,readyWait:1,ready:function(s){(s===!0?--p.readyWait:p.isReady)||(p.isReady=!0,!(s!==!0&&--p.readyWait>0)&&Re.resolveWith(N,[p]))}}),p.ready.then=Re.then;function ze(){N.removeEventListener("DOMContentLoaded",ze),t.removeEventListener("load",ze),p.ready()}N.readyState==="complete"||N.readyState!=="loading"&&!N.documentElement.doScroll?t.setTimeout(p.ready):(N.addEventListener("DOMContentLoaded",ze),t.addEventListener("load",ze));var ke=function(s,u,f,h,v,y,b){var O=0,S=s.length,$=f==null;if(D(f)==="object"){v=!0;for(O in f)ke(s,u,O,f[O],!0,y,b)}else if(h!==void 0&&(v=!0,I(h)||(b=!0),$&&(b?(u.call(s,h),u=null):($=u,u=function(z,le,K){return $.call(p(z),K)})),u))for(;O<S;O++)u(s[O],f,b?h:h.call(s[O],O,u(s[O],f)));return v?s:$?u.call(s):S?u(s[0],f):y},Qe=/^-ms-/,at=/-([a-z])/g;function k(s,u){return u.toUpperCase()}function L(s){return s.replace(Qe,"ms-").replace(at,k)}var W=function(s){return s.nodeType===1||s.nodeType===9||!+s.nodeType};function Y(){this.expando=p.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(s){var u=s[this.expando];return u||(u={},W(s)&&(s.nodeType?s[this.expando]=u:Object.defineProperty(s,this.expando,{value:u,configurable:!0}))),u},set:function(s,u,f){var h,v=this.cache(s);if(typeof u=="string")v[L(u)]=f;else for(h in u)v[L(h)]=u[h];return v},get:function(s,u){return u===void 0?this.cache(s):s[this.expando]&&s[this.expando][L(u)]},access:function(s,u,f){return u===void 0||u&&typeof u=="string"&&f===void 0?this.get(s,u):(this.set(s,u,f),f!==void 0?f:u)},remove:function(s,u){var f,h=s[this.expando];if(h!==void 0){if(u!==void 0)for(Array.isArray(u)?u=u.map(L):(u=L(u),u=u in h?[u]:u.match(Ve)||[]),f=u.length;f--;)delete h[u[f]];(u===void 0||p.isEmptyObject(h))&&(s.nodeType?s[this.expando]=void 0:delete s[this.expando])}},hasData:function(s){var u=s[this.expando];return u!==void 0&&!p.isEmptyObject(u)}};var B=new Y,q=new Y,de=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ae=/[A-Z]/g;function ce(s){return s==="true"?!0:s==="false"?!1:s==="null"?null:s===+s+""?+s:de.test(s)?JSON.parse(s):s}function ee(s,u,f){var h;if(f===void 0&&s.nodeType===1)if(h="data-"+u.replace(ae,"-$&").toLowerCase(),f=s.getAttribute(h),typeof f=="string"){try{f=ce(f)}catch{}q.set(s,u,f)}else f=void 0;return f}p.extend({hasData:function(s){return q.hasData(s)||B.hasData(s)},data:function(s,u,f){return q.access(s,u,f)},removeData:function(s,u){q.remove(s,u)},_data:function(s,u,f){return B.access(s,u,f)},_removeData:function(s,u){B.remove(s,u)}}),p.fn.extend({data:function(s,u){var f,h,v,y=this[0],b=y&&y.attributes;if(s===void 0){if(this.length&&(v=q.get(y),y.nodeType===1&&!B.get(y,"hasDataAttrs"))){for(f=b.length;f--;)b[f]&&(h=b[f].name,h.indexOf("data-")===0&&(h=L(h.slice(5)),ee(y,h,v[h])));B.set(y,"hasDataAttrs",!0)}return v}return typeof s=="object"?this.each(function(){q.set(this,s)}):ke(this,function(O){var S;if(y&&O===void 0)return S=q.get(y,s),S!==void 0||(S=ee(y,s),S!==void 0)?S:void 0;this.each(function(){q.set(this,s,O)})},null,u,arguments.length>1,null,!0)},removeData:function(s){return this.each(function(){q.remove(this,s)})}}),p.extend({queue:function(s,u,f){var h;if(s)return u=(u||"fx")+"queue",h=B.get(s,u),f&&(!h||Array.isArray(f)?h=B.access(s,u,p.makeArray(f)):h.push(f)),h||[]},dequeue:function(s,u){u=u||"fx";var f=p.queue(s,u),h=f.length,v=f.shift(),y=p._queueHooks(s,u),b=function(){p.dequeue(s,u)};v==="inprogress"&&(v=f.shift(),h--),v&&(u==="fx"&&f.unshift("inprogress"),delete y.stop,v.call(s,b,y)),!h&&y&&y.empty.fire()},_queueHooks:function(s,u){var f=u+"queueHooks";return B.get(s,f)||B.access(s,f,{empty:p.Callbacks("once memory").add(function(){B.remove(s,[u+"queue",f])})})}}),p.fn.extend({queue:function(s,u){var f=2;return typeof s!="string"&&(u=s,s="fx",f--),arguments.length<f?p.queue(this[0],s):u===void 0?this:this.each(function(){var h=p.queue(this,s,u);p._queueHooks(this,s),s==="fx"&&h[0]!=="inprogress"&&p.dequeue(this,s)})},dequeue:function(s){return this.each(function(){p.dequeue(this,s)})},clearQueue:function(s){return this.queue(s||"fx",[])},promise:function(s,u){var f,h=1,v=p.Deferred(),y=this,b=this.length,O=function(){--h||v.resolveWith(y,[y])};for(typeof s!="string"&&(u=s,s=void 0),s=s||"fx";b--;)f=B.get(y[b],s+"queueHooks"),f&&f.empty&&(h++,f.empty.add(O));return O(),v.promise(u)}});var be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pe=new RegExp("^(?:([+-])=|)("+be+")([a-z%]*)$","i"),Oe=["Top","Right","Bottom","Left"],Ce=N.documentElement,je=function(s){return p.contains(s.ownerDocument,s)},rt={composed:!0};Ce.getRootNode&&(je=function(s){return p.contains(s.ownerDocument,s)||s.getRootNode(rt)===s.ownerDocument});var tt=function(s,u){return s=u||s,s.style.display==="none"||s.style.display===""&&je(s)&&p.css(s,"display")==="none"};function dt(s,u,f,h){var v,y,b=20,O=h?function(){return h.cur()}:function(){return p.css(s,u,"")},S=O(),$=f&&f[3]||(p.cssNumber[u]?"":"px"),z=s.nodeType&&(p.cssNumber[u]||$!=="px"&&+S)&&pe.exec(p.css(s,u));if(z&&z[3]!==$){for(S=S/2,$=$||z[3],z=+S||1;b--;)p.style(s,u,z+$),(1-y)*(1-(y=O()/S||.5))<=0&&(b=0),z=z/y;z=z*2,p.style(s,u,z+$),f=f||[]}return f&&(z=+z||+S||0,v=f[1]?z+(f[1]+1)*f[2]:+f[2],h&&(h.unit=$,h.start=z,h.end=v)),v}var At={};function Kt(s){var u,f=s.ownerDocument,h=s.nodeName,v=At[h];return v||(u=f.body.appendChild(f.createElement(h)),v=p.css(u,"display"),u.parentNode.removeChild(u),v==="none"&&(v="block"),At[h]=v,v)}function Dt(s,u){for(var f,h,v=[],y=0,b=s.length;y<b;y++)h=s[y],h.style&&(f=h.style.display,u?(f==="none"&&(v[y]=B.get(h,"display")||null,v[y]||(h.style.display="")),h.style.display===""&&tt(h)&&(v[y]=Kt(h))):f!=="none"&&(v[y]="none",B.set(h,"display",f)));for(y=0;y<b;y++)v[y]!=null&&(s[y].style.display=v[y]);return s}p.fn.extend({show:function(){return Dt(this,!0)},hide:function(){return Dt(this)},toggle:function(s){return typeof s=="boolean"?s?this.show():this.hide():this.each(function(){tt(this)?p(this).show():p(this).hide()})}});var zt=/^(?:checkbox|radio)$/i,X=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Le=/^$|^module$|\/(?:java|ecma)script/i;(function(){var s=N.createDocumentFragment(),u=s.appendChild(N.createElement("div")),f=N.createElement("input");f.setAttribute("type","radio"),f.setAttribute("checked","checked"),f.setAttribute("name","t"),u.appendChild(f),x.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,u.innerHTML="<textarea>x</textarea>",x.noCloneChecked=!!u.cloneNode(!0).lastChild.defaultValue,u.innerHTML="<option></option>",x.option=!!u.lastChild})();var Ie={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ie.tbody=Ie.tfoot=Ie.colgroup=Ie.caption=Ie.thead,Ie.th=Ie.td,x.option||(Ie.optgroup=Ie.option=[1,"<select multiple='multiple'>","</select>"]);function et(s,u){var f;return typeof s.getElementsByTagName<"u"?f=s.getElementsByTagName(u||"*"):typeof s.querySelectorAll<"u"?f=s.querySelectorAll(u||"*"):f=[],u===void 0||u&&re(s,u)?p.merge([s],f):f}function ut(s,u){for(var f=0,h=s.length;f<h;f++)B.set(s[f],"globalEval",!u||B.get(u[f],"globalEval"))}var Yt=/<|&#?\w+;/;function sn(s,u,f,h,v){for(var y,b,O,S,$,z,le=u.createDocumentFragment(),K=[],J=0,Be=s.length;J<Be;J++)if(y=s[J],y||y===0)if(D(y)==="object")p.merge(K,y.nodeType?[y]:y);else if(!Yt.test(y))K.push(u.createTextNode(y));else{for(b=b||le.appendChild(u.createElement("div")),O=(X.exec(y)||["",""])[1].toLowerCase(),S=Ie[O]||Ie._default,b.innerHTML=S[1]+p.htmlPrefilter(y)+S[2],z=S[0];z--;)b=b.lastChild;p.merge(K,b.childNodes),b=le.firstChild,b.textContent=""}for(le.textContent="",J=0;y=K[J++];){if(h&&p.inArray(y,h)>-1){v&&v.push(y);continue}if($=je(y),b=et(le.appendChild(y),"script"),$&&ut(b),f)for(z=0;y=b[z++];)Le.test(y.type||"")&&f.push(y)}return le}var fi=/^([^.]*)(?:\.(.+)|)/;function di(){return!0}function dn(){return!1}function ds(s,u){return s===Tr()==(u==="focus")}function Tr(){try{return N.activeElement}catch{}}function ni(s,u,f,h,v,y){var b,O;if(typeof u=="object"){typeof f!="string"&&(h=h||f,f=void 0);for(O in u)ni(s,O,f,h,u[O],y);return s}if(h==null&&v==null?(v=f,h=f=void 0):v==null&&(typeof f=="string"?(v=h,h=void 0):(v=h,h=f,f=void 0)),v===!1)v=dn;else if(!v)return s;return y===1&&(b=v,v=function(S){return p().off(S),b.apply(this,arguments)},v.guid=b.guid||(b.guid=p.guid++)),s.each(function(){p.event.add(this,u,v,h,f)})}p.event={global:{},add:function(s,u,f,h,v){var y,b,O,S,$,z,le,K,J,Be,it,He=B.get(s);if(W(s))for(f.handler&&(y=f,f=y.handler,v=y.selector),v&&p.find.matchesSelector(Ce,v),f.guid||(f.guid=p.guid++),(S=He.events)||(S=He.events=Object.create(null)),(b=He.handle)||(b=He.handle=function(qt){return typeof p<"u"&&p.event.triggered!==qt.type?p.event.dispatch.apply(s,arguments):void 0}),u=(u||"").match(Ve)||[""],$=u.length;$--;)O=fi.exec(u[$])||[],J=it=O[1],Be=(O[2]||"").split(".").sort(),J&&(le=p.event.special[J]||{},J=(v?le.delegateType:le.bindType)||J,le=p.event.special[J]||{},z=p.extend({type:J,origType:it,data:h,handler:f,guid:f.guid,selector:v,needsContext:v&&p.expr.match.needsContext.test(v),namespace:Be.join(".")},y),(K=S[J])||(K=S[J]=[],K.delegateCount=0,(!le.setup||le.setup.call(s,h,Be,b)===!1)&&s.addEventListener&&s.addEventListener(J,b)),le.add&&(le.add.call(s,z),z.handler.guid||(z.handler.guid=f.guid)),v?K.splice(K.delegateCount++,0,z):K.push(z),p.event.global[J]=!0)},remove:function(s,u,f,h,v){var y,b,O,S,$,z,le,K,J,Be,it,He=B.hasData(s)&&B.get(s);if(!(!He||!(S=He.events))){for(u=(u||"").match(Ve)||[""],$=u.length;$--;){if(O=fi.exec(u[$])||[],J=it=O[1],Be=(O[2]||"").split(".").sort(),!J){for(J in S)p.event.remove(s,J+u[$],f,h,!0);continue}for(le=p.event.special[J]||{},J=(h?le.delegateType:le.bindType)||J,K=S[J]||[],O=O[2]&&new RegExp("(^|\\.)"+Be.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=K.length;y--;)z=K[y],(v||it===z.origType)&&(!f||f.guid===z.guid)&&(!O||O.test(z.namespace))&&(!h||h===z.selector||h==="**"&&z.selector)&&(K.splice(y,1),z.selector&&K.delegateCount--,le.remove&&le.remove.call(s,z));b&&!K.length&&((!le.teardown||le.teardown.call(s,Be,He.handle)===!1)&&p.removeEvent(s,J,He.handle),delete S[J])}p.isEmptyObject(S)&&B.remove(s,"handle events")}},dispatch:function(s){var u,f,h,v,y,b,O=new Array(arguments.length),S=p.event.fix(s),$=(B.get(this,"events")||Object.create(null))[S.type]||[],z=p.event.special[S.type]||{};for(O[0]=S,u=1;u<arguments.length;u++)O[u]=arguments[u];if(S.delegateTarget=this,!(z.preDispatch&&z.preDispatch.call(this,S)===!1)){for(b=p.event.handlers.call(this,S,$),u=0;(v=b[u++])&&!S.isPropagationStopped();)for(S.currentTarget=v.elem,f=0;(y=v.handlers[f++])&&!S.isImmediatePropagationStopped();)(!S.rnamespace||y.namespace===!1||S.rnamespace.test(y.namespace))&&(S.handleObj=y,S.data=y.data,h=((p.event.special[y.origType]||{}).handle||y.handler).apply(v.elem,O),h!==void 0&&(S.result=h)===!1&&(S.preventDefault(),S.stopPropagation()));return z.postDispatch&&z.postDispatch.call(this,S),S.result}},handlers:function(s,u){var f,h,v,y,b,O=[],S=u.delegateCount,$=s.target;if(S&&$.nodeType&&!(s.type==="click"&&s.button>=1)){for(;$!==this;$=$.parentNode||this)if($.nodeType===1&&!(s.type==="click"&&$.disabled===!0)){for(y=[],b={},f=0;f<S;f++)h=u[f],v=h.selector+" ",b[v]===void 0&&(b[v]=h.needsContext?p(v,this).index($)>-1:p.find(v,this,null,[$]).length),b[v]&&y.push(h);y.length&&O.push({elem:$,handlers:y})}}return $=this,S<u.length&&O.push({elem:$,handlers:u.slice(S)}),O},addProp:function(s,u){Object.defineProperty(p.Event.prototype,s,{enumerable:!0,configurable:!0,get:I(u)?function(){if(this.originalEvent)return u(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[s]},set:function(f){Object.defineProperty(this,s,{enumerable:!0,configurable:!0,writable:!0,value:f})}})},fix:function(s){return s[p.expando]?s:new p.Event(s)},special:{load:{noBubble:!0},click:{setup:function(s){var u=this||s;return zt.test(u.type)&&u.click&&re(u,"input")&&Er(u,"click",di),!1},trigger:function(s){var u=this||s;return zt.test(u.type)&&u.click&&re(u,"input")&&Er(u,"click"),!0},_default:function(s){var u=s.target;return zt.test(u.type)&&u.click&&re(u,"input")&&B.get(u,"click")||re(u,"a")}},beforeunload:{postDispatch:function(s){s.result!==void 0&&s.originalEvent&&(s.originalEvent.returnValue=s.result)}}}};function Er(s,u,f){if(!f){B.get(s,u)===void 0&&p.event.add(s,u,di);return}B.set(s,u,!1),p.event.add(s,u,{namespace:!1,handler:function(h){var v,y,b=B.get(this,u);if(h.isTrigger&1&&this[u]){if(b.length)(p.event.special[u]||{}).delegateType&&h.stopPropagation();else if(b=o.call(arguments),B.set(this,u,b),v=f(this,u),this[u](),y=B.get(this,u),b!==y||v?B.set(this,u,!1):y={},b!==y)return h.stopImmediatePropagation(),h.preventDefault(),y&&y.value}else b.length&&(B.set(this,u,{value:p.event.trigger(p.extend(b[0],p.Event.prototype),b.slice(1),this)}),h.stopImmediatePropagation())}})}p.removeEvent=function(s,u,f){s.removeEventListener&&s.removeEventListener(u,f)},p.Event=function(s,u){if(!(this instanceof p.Event))return new p.Event(s,u);s&&s.type?(this.originalEvent=s,this.type=s.type,this.isDefaultPrevented=s.defaultPrevented||s.defaultPrevented===void 0&&s.returnValue===!1?di:dn,this.target=s.target&&s.target.nodeType===3?s.target.parentNode:s.target,this.currentTarget=s.currentTarget,this.relatedTarget=s.relatedTarget):this.type=s,u&&p.extend(this,u),this.timeStamp=s&&s.timeStamp||Date.now(),this[p.expando]=!0},p.Event.prototype={constructor:p.Event,isDefaultPrevented:dn,isPropagationStopped:dn,isImmediatePropagationStopped:dn,isSimulated:!1,preventDefault:function(){var s=this.originalEvent;this.isDefaultPrevented=di,s&&!this.isSimulated&&s.preventDefault()},stopPropagation:function(){var s=this.originalEvent;this.isPropagationStopped=di,s&&!this.isSimulated&&s.stopPropagation()},stopImmediatePropagation:function(){var s=this.originalEvent;this.isImmediatePropagationStopped=di,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()}},p.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},p.event.addProp),p.each({focus:"focusin",blur:"focusout"},function(s,u){p.event.special[s]={setup:function(){return Er(this,s,ds),!1},trigger:function(){return Er(this,s),!0},_default:function(f){return B.get(f.target,s)},delegateType:u}}),p.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(s,u){p.event.special[s]={delegateType:u,bindType:u,handle:function(f){var h,v=this,y=f.relatedTarget,b=f.handleObj;return(!y||y!==v&&!p.contains(v,y))&&(f.type=b.origType,h=b.handler.apply(this,arguments),f.type=u),h}}}),p.fn.extend({on:function(s,u,f,h){return ni(this,s,u,f,h)},one:function(s,u,f,h){return ni(this,s,u,f,h,1)},off:function(s,u,f){var h,v;if(s&&s.preventDefault&&s.handleObj)return h=s.handleObj,p(s.delegateTarget).off(h.namespace?h.origType+"."+h.namespace:h.origType,h.selector,h.handler),this;if(typeof s=="object"){for(v in s)this.off(v,u,s[v]);return this}return(u===!1||typeof u=="function")&&(f=u,u=void 0),f===!1&&(f=dn),this.each(function(){p.event.remove(this,s,f,u)})}});var ps=/<script|<style|<link/i,kr=/checked\s*(?:[^=]|=\s*.checked.)/i,OT=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function zf(s,u){return re(s,"table")&&re(u.nodeType!==11?u:u.firstChild,"tr")&&p(s).children("tbody")[0]||s}function DT(s){return s.type=(s.getAttribute("type")!==null)+"/"+s.type,s}function IT(s){return(s.type||"").slice(0,5)==="true/"?s.type=s.type.slice(5):s.removeAttribute("type"),s}function Xf(s,u){var f,h,v,y,b,O,S;if(u.nodeType===1){if(B.hasData(s)&&(y=B.get(s),S=y.events,S)){B.remove(u,"handle events");for(v in S)for(f=0,h=S[v].length;f<h;f++)p.event.add(u,v,S[v][f])}q.hasData(s)&&(b=q.access(s),O=p.extend({},b),q.set(u,O))}}function PT(s,u){var f=u.nodeName.toLowerCase();f==="input"&&zt.test(s.type)?u.checked=s.checked:(f==="input"||f==="textarea")&&(u.defaultValue=s.defaultValue)}function Sr(s,u,f,h){u=l(u);var v,y,b,O,S,$,z=0,le=s.length,K=le-1,J=u[0],Be=I(J);if(Be||le>1&&typeof J=="string"&&!x.checkClone&&kr.test(J))return s.each(function(it){var He=s.eq(it);Be&&(u[0]=J.call(this,it,He.html())),Sr(He,u,f,h)});if(le&&(v=sn(u,s[0].ownerDocument,!1,s,h),y=v.firstChild,v.childNodes.length===1&&(v=y),y||h)){for(b=p.map(et(v,"script"),DT),O=b.length;z<le;z++)S=v,z!==K&&(S=p.clone(S,!0,!0),O&&p.merge(b,et(S,"script"))),f.call(s[z],S,z);if(O)for($=b[b.length-1].ownerDocument,p.map(b,IT),z=0;z<O;z++)S=b[z],Le.test(S.type||"")&&!B.access(S,"globalEval")&&p.contains($,S)&&(S.src&&(S.type||"").toLowerCase()!=="module"?p._evalUrl&&!S.noModule&&p._evalUrl(S.src,{nonce:S.nonce||S.getAttribute("nonce")},$):ye(S.textContent.replace(OT,""),S,$))}return s}function Yf(s,u,f){for(var h,v=u?p.filter(u,s):s,y=0;(h=v[y])!=null;y++)!f&&h.nodeType===1&&p.cleanData(et(h)),h.parentNode&&(f&&je(h)&&ut(et(h,"script")),h.parentNode.removeChild(h));return s}p.extend({htmlPrefilter:function(s){return s},clone:function(s,u,f){var h,v,y,b,O=s.cloneNode(!0),S=je(s);if(!x.noCloneChecked&&(s.nodeType===1||s.nodeType===11)&&!p.isXMLDoc(s))for(b=et(O),y=et(s),h=0,v=y.length;h<v;h++)PT(y[h],b[h]);if(u)if(f)for(y=y||et(s),b=b||et(O),h=0,v=y.length;h<v;h++)Xf(y[h],b[h]);else Xf(s,O);return b=et(O,"script"),b.length>0&&ut(b,!S&&et(s,"script")),O},cleanData:function(s){for(var u,f,h,v=p.event.special,y=0;(f=s[y])!==void 0;y++)if(W(f)){if(u=f[B.expando]){if(u.events)for(h in u.events)v[h]?p.event.remove(f,h):p.removeEvent(f,h,u.handle);f[B.expando]=void 0}f[q.expando]&&(f[q.expando]=void 0)}}}),p.fn.extend({detach:function(s){return Yf(this,s,!0)},remove:function(s){return Yf(this,s)},text:function(s){return ke(this,function(u){return u===void 0?p.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=u)})},null,s,arguments.length)},append:function(){return Sr(this,arguments,function(s){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var u=zf(this,s);u.appendChild(s)}})},prepend:function(){return Sr(this,arguments,function(s){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var u=zf(this,s);u.insertBefore(s,u.firstChild)}})},before:function(){return Sr(this,arguments,function(s){this.parentNode&&this.parentNode.insertBefore(s,this)})},after:function(){return Sr(this,arguments,function(s){this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling)})},empty:function(){for(var s,u=0;(s=this[u])!=null;u++)s.nodeType===1&&(p.cleanData(et(s,!1)),s.textContent="");return this},clone:function(s,u){return s=s??!1,u=u??s,this.map(function(){return p.clone(this,s,u)})},html:function(s){return ke(this,function(u){var f=this[0]||{},h=0,v=this.length;if(u===void 0&&f.nodeType===1)return f.innerHTML;if(typeof u=="string"&&!ps.test(u)&&!Ie[(X.exec(u)||["",""])[1].toLowerCase()]){u=p.htmlPrefilter(u);try{for(;h<v;h++)f=this[h]||{},f.nodeType===1&&(p.cleanData(et(f,!1)),f.innerHTML=u);f=0}catch{}}f&&this.empty().append(u)},null,s,arguments.length)},replaceWith:function(){var s=[];return Sr(this,arguments,function(u){var f=this.parentNode;p.inArray(this,s)<0&&(p.cleanData(et(this)),f&&f.replaceChild(u,this))},s)}}),p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(s,u){p.fn[s]=function(f){for(var h,v=[],y=p(f),b=y.length-1,O=0;O<=b;O++)h=O===b?this:this.clone(!0),p(y[O])[u](h),c.apply(v,h.get());return this.pushStack(v)}});var yl=new RegExp("^("+be+")(?!px)[a-z%]+$","i"),bl=/^--/,Do=function(s){var u=s.ownerDocument.defaultView;return(!u||!u.opener)&&(u=t),u.getComputedStyle(s)},Gf=function(s,u,f){var h,v,y={};for(v in u)y[v]=s.style[v],s.style[v]=u[v];h=f.call(s);for(v in u)s.style[v]=y[v];return h},NT=new RegExp(Oe.join("|"),"i"),Jf="[\\x20\\t\\r\\n\\f]",RT=new RegExp("^"+Jf+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Jf+"+$","g");(function(){function s(){if($){S.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",$.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ce.appendChild(S).appendChild($);var z=t.getComputedStyle($);f=z.top!=="1%",O=u(z.marginLeft)===12,$.style.right="60%",y=u(z.right)===36,h=u(z.width)===36,$.style.position="absolute",v=u($.offsetWidth/3)===12,Ce.removeChild(S),$=null}}function u(z){return Math.round(parseFloat(z))}var f,h,v,y,b,O,S=N.createElement("div"),$=N.createElement("div");$.style&&($.style.backgroundClip="content-box",$.cloneNode(!0).style.backgroundClip="",x.clearCloneStyle=$.style.backgroundClip==="content-box",p.extend(x,{boxSizingReliable:function(){return s(),h},pixelBoxStyles:function(){return s(),y},pixelPosition:function(){return s(),f},reliableMarginLeft:function(){return s(),O},scrollboxSize:function(){return s(),v},reliableTrDimensions:function(){var z,le,K,J;return b==null&&(z=N.createElement("table"),le=N.createElement("tr"),K=N.createElement("div"),z.style.cssText="position:absolute;left:-11111px;border-collapse:separate",le.style.cssText="border:1px solid",le.style.height="1px",K.style.height="9px",K.style.display="block",Ce.appendChild(z).appendChild(le).appendChild(K),J=t.getComputedStyle(le),b=parseInt(J.height,10)+parseInt(J.borderTopWidth,10)+parseInt(J.borderBottomWidth,10)===le.offsetHeight,Ce.removeChild(z)),b}}))})();function hs(s,u,f){var h,v,y,b,O=bl.test(u),S=s.style;return f=f||Do(s),f&&(b=f.getPropertyValue(u)||f[u],O&&b&&(b=b.replace(RT,"$1")||void 0),b===""&&!je(s)&&(b=p.style(s,u)),!x.pixelBoxStyles()&&yl.test(b)&&NT.test(u)&&(h=S.width,v=S.minWidth,y=S.maxWidth,S.minWidth=S.maxWidth=S.width=b,b=f.width,S.width=h,S.minWidth=v,S.maxWidth=y)),b!==void 0?b+"":b}function Zf(s,u){return{get:function(){if(s()){delete this.get;return}return(this.get=u).apply(this,arguments)}}}var Qf=["Webkit","Moz","ms"],ed=N.createElement("div").style,td={};function MT(s){for(var u=s[0].toUpperCase()+s.slice(1),f=Qf.length;f--;)if(s=Qf[f]+u,s in ed)return s}function Cl(s){var u=p.cssProps[s]||td[s];return u||(s in ed?s:td[s]=MT(s)||s)}var FT=/^(none|table(?!-c[ea]).+)/,HT={position:"absolute",visibility:"hidden",display:"block"},nd={letterSpacing:"0",fontWeight:"400"};function id(s,u,f){var h=pe.exec(u);return h?Math.max(0,h[2]-(f||0))+(h[3]||"px"):u}function wl(s,u,f,h,v,y){var b=u==="width"?1:0,O=0,S=0;if(f===(h?"border":"content"))return 0;for(;b<4;b+=2)f==="margin"&&(S+=p.css(s,f+Oe[b],!0,v)),h?(f==="content"&&(S-=p.css(s,"padding"+Oe[b],!0,v)),f!=="margin"&&(S-=p.css(s,"border"+Oe[b]+"Width",!0,v))):(S+=p.css(s,"padding"+Oe[b],!0,v),f!=="padding"?S+=p.css(s,"border"+Oe[b]+"Width",!0,v):O+=p.css(s,"border"+Oe[b]+"Width",!0,v));return!h&&y>=0&&(S+=Math.max(0,Math.ceil(s["offset"+u[0].toUpperCase()+u.slice(1)]-y-S-O-.5))||0),S}function rd(s,u,f){var h=Do(s),v=!x.boxSizingReliable()||f,y=v&&p.css(s,"boxSizing",!1,h)==="border-box",b=y,O=hs(s,u,h),S="offset"+u[0].toUpperCase()+u.slice(1);if(yl.test(O)){if(!f)return O;O="auto"}return(!x.boxSizingReliable()&&y||!x.reliableTrDimensions()&&re(s,"tr")||O==="auto"||!parseFloat(O)&&p.css(s,"display",!1,h)==="inline")&&s.getClientRects().length&&(y=p.css(s,"boxSizing",!1,h)==="border-box",b=S in s,b&&(O=s[S])),O=parseFloat(O)||0,O+wl(s,u,f||(y?"border":"content"),b,h,O)+"px"}p.extend({cssHooks:{opacity:{get:function(s,u){if(u){var f=hs(s,"opacity");return f===""?"1":f}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(s,u,f,h){if(!(!s||s.nodeType===3||s.nodeType===8||!s.style)){var v,y,b,O=L(u),S=bl.test(u),$=s.style;if(S||(u=Cl(O)),b=p.cssHooks[u]||p.cssHooks[O],f!==void 0){if(y=typeof f,y==="string"&&(v=pe.exec(f))&&v[1]&&(f=dt(s,u,v),y="number"),f==null||f!==f)return;y==="number"&&!S&&(f+=v&&v[3]||(p.cssNumber[O]?"":"px")),!x.clearCloneStyle&&f===""&&u.indexOf("background")===0&&($[u]="inherit"),(!b||!("set"in b)||(f=b.set(s,f,h))!==void 0)&&(S?$.setProperty(u,f):$[u]=f)}else return b&&"get"in b&&(v=b.get(s,!1,h))!==void 0?v:$[u]}},css:function(s,u,f,h){var v,y,b,O=L(u),S=bl.test(u);return S||(u=Cl(O)),b=p.cssHooks[u]||p.cssHooks[O],b&&"get"in b&&(v=b.get(s,!0,f)),v===void 0&&(v=hs(s,u,h)),v==="normal"&&u in nd&&(v=nd[u]),f===""||f?(y=parseFloat(v),f===!0||isFinite(y)?y||0:v):v}}),p.each(["height","width"],function(s,u){p.cssHooks[u]={get:function(f,h,v){if(h)return FT.test(p.css(f,"display"))&&(!f.getClientRects().length||!f.getBoundingClientRect().width)?Gf(f,HT,function(){return rd(f,u,v)}):rd(f,u,v)},set:function(f,h,v){var y,b=Do(f),O=!x.scrollboxSize()&&b.position==="absolute",S=O||v,$=S&&p.css(f,"boxSizing",!1,b)==="border-box",z=v?wl(f,u,v,$,b):0;return $&&O&&(z-=Math.ceil(f["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(b[u])-wl(f,u,"border",!1,b)-.5)),z&&(y=pe.exec(h))&&(y[3]||"px")!=="px"&&(f.style[u]=h,h=p.css(f,u)),id(f,h,z)}}}),p.cssHooks.marginLeft=Zf(x.reliableMarginLeft,function(s,u){if(u)return(parseFloat(hs(s,"marginLeft"))||s.getBoundingClientRect().left-Gf(s,{marginLeft:0},function(){return s.getBoundingClientRect().left}))+"px"}),p.each({margin:"",padding:"",border:"Width"},function(s,u){p.cssHooks[s+u]={expand:function(f){for(var h=0,v={},y=typeof f=="string"?f.split(" "):[f];h<4;h++)v[s+Oe[h]+u]=y[h]||y[h-2]||y[0];return v}},s!=="margin"&&(p.cssHooks[s+u].set=id)}),p.fn.extend({css:function(s,u){return ke(this,function(f,h,v){var y,b,O={},S=0;if(Array.isArray(h)){for(y=Do(f),b=h.length;S<b;S++)O[h[S]]=p.css(f,h[S],!1,y);return O}return v!==void 0?p.style(f,h,v):p.css(f,h)},s,u,arguments.length>1)}});function pn(s,u,f,h,v){return new pn.prototype.init(s,u,f,h,v)}p.Tween=pn,pn.prototype={constructor:pn,init:function(s,u,f,h,v,y){this.elem=s,this.prop=f,this.easing=v||p.easing._default,this.options=u,this.start=this.now=this.cur(),this.end=h,this.unit=y||(p.cssNumber[f]?"":"px")},cur:function(){var s=pn.propHooks[this.prop];return s&&s.get?s.get(this):pn.propHooks._default.get(this)},run:function(s){var u,f=pn.propHooks[this.prop];return this.options.duration?this.pos=u=p.easing[this.easing](s,this.options.duration*s,0,1,this.options.duration):this.pos=u=s,this.now=(this.end-this.start)*u+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),f&&f.set?f.set(this):pn.propHooks._default.set(this),this}},pn.prototype.init.prototype=pn.prototype,pn.propHooks={_default:{get:function(s){var u;return s.elem.nodeType!==1||s.elem[s.prop]!=null&&s.elem.style[s.prop]==null?s.elem[s.prop]:(u=p.css(s.elem,s.prop,""),!u||u==="auto"?0:u)},set:function(s){p.fx.step[s.prop]?p.fx.step[s.prop](s):s.elem.nodeType===1&&(p.cssHooks[s.prop]||s.elem.style[Cl(s.prop)]!=null)?p.style(s.elem,s.prop,s.now+s.unit):s.elem[s.prop]=s.now}}},pn.propHooks.scrollTop=pn.propHooks.scrollLeft={set:function(s){s.elem.nodeType&&s.elem.parentNode&&(s.elem[s.prop]=s.now)}},p.easing={linear:function(s){return s},swing:function(s){return .5-Math.cos(s*Math.PI)/2},_default:"swing"},p.fx=pn.prototype.init,p.fx.step={};var xr,Io,BT=/^(?:toggle|show|hide)$/,jT=/queueHooks$/;function _l(){Io&&(N.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(_l):t.setTimeout(_l,p.fx.interval),p.fx.tick())}function sd(){return t.setTimeout(function(){xr=void 0}),xr=Date.now()}function Po(s,u){var f,h=0,v={height:s};for(u=u?1:0;h<4;h+=2-u)f=Oe[h],v["margin"+f]=v["padding"+f]=s;return u&&(v.opacity=v.width=s),v}function od(s,u,f){for(var h,v=($n.tweeners[u]||[]).concat($n.tweeners["*"]),y=0,b=v.length;y<b;y++)if(h=v[y].call(f,u,s))return h}function $T(s,u,f){var h,v,y,b,O,S,$,z,le="width"in u||"height"in u,K=this,J={},Be=s.style,it=s.nodeType&&tt(s),He=B.get(s,"fxshow");f.queue||(b=p._queueHooks(s,"fx"),b.unqueued==null&&(b.unqueued=0,O=b.empty.fire,b.empty.fire=function(){b.unqueued||O()}),b.unqueued++,K.always(function(){K.always(function(){b.unqueued--,p.queue(s,"fx").length||b.empty.fire()})}));for(h in u)if(v=u[h],BT.test(v)){if(delete u[h],y=y||v==="toggle",v===(it?"hide":"show"))if(v==="show"&&He&&He[h]!==void 0)it=!0;else continue;J[h]=He&&He[h]||p.style(s,h)}if(S=!p.isEmptyObject(u),!(!S&&p.isEmptyObject(J))){le&&s.nodeType===1&&(f.overflow=[Be.overflow,Be.overflowX,Be.overflowY],$=He&&He.display,$==null&&($=B.get(s,"display")),z=p.css(s,"display"),z==="none"&&($?z=$:(Dt([s],!0),$=s.style.display||$,z=p.css(s,"display"),Dt([s]))),(z==="inline"||z==="inline-block"&&$!=null)&&p.css(s,"float")==="none"&&(S||(K.done(function(){Be.display=$}),$==null&&(z=Be.display,$=z==="none"?"":z)),Be.display="inline-block")),f.overflow&&(Be.overflow="hidden",K.always(function(){Be.overflow=f.overflow[0],Be.overflowX=f.overflow[1],Be.overflowY=f.overflow[2]})),S=!1;for(h in J)S||(He?"hidden"in He&&(it=He.hidden):He=B.access(s,"fxshow",{display:$}),y&&(He.hidden=!it),it&&Dt([s],!0),K.done(function(){it||Dt([s]),B.remove(s,"fxshow");for(h in J)p.style(s,h,J[h])})),S=od(it?He[h]:0,h,K),h in He||(He[h]=S.start,it&&(S.end=S.start,S.start=0))}}function UT(s,u){var f,h,v,y,b;for(f in s)if(h=L(f),v=u[h],y=s[f],Array.isArray(y)&&(v=y[1],y=s[f]=y[0]),f!==h&&(s[h]=y,delete s[f]),b=p.cssHooks[h],b&&"expand"in b){y=b.expand(y),delete s[h];for(f in y)f in s||(s[f]=y[f],u[f]=v)}else u[h]=v}function $n(s,u,f){var h,v,y=0,b=$n.prefilters.length,O=p.Deferred().always(function(){delete S.elem}),S=function(){if(v)return!1;for(var le=xr||sd(),K=Math.max(0,$.startTime+$.duration-le),J=K/$.duration||0,Be=1-J,it=0,He=$.tweens.length;it<He;it++)$.tweens[it].run(Be);return O.notifyWith(s,[$,Be,K]),Be<1&&He?K:(He||O.notifyWith(s,[$,1,0]),O.resolveWith(s,[$]),!1)},$=O.promise({elem:s,props:p.extend({},u),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},f),originalProperties:u,originalOptions:f,startTime:xr||sd(),duration:f.duration,tweens:[],createTween:function(le,K){var J=p.Tween(s,$.opts,le,K,$.opts.specialEasing[le]||$.opts.easing);return $.tweens.push(J),J},stop:function(le){var K=0,J=le?$.tweens.length:0;if(v)return this;for(v=!0;K<J;K++)$.tweens[K].run(1);return le?(O.notifyWith(s,[$,1,0]),O.resolveWith(s,[$,le])):O.rejectWith(s,[$,le]),this}}),z=$.props;for(UT(z,$.opts.specialEasing);y<b;y++)if(h=$n.prefilters[y].call($,s,z,$.opts),h)return I(h.stop)&&(p._queueHooks($.elem,$.opts.queue).stop=h.stop.bind(h)),h;return p.map(z,od,$),I($.opts.start)&&$.opts.start.call(s,$),$.progress($.opts.progress).done($.opts.done,$.opts.complete).fail($.opts.fail).always($.opts.always),p.fx.timer(p.extend(S,{elem:s,anim:$,queue:$.opts.queue})),$}p.Animation=p.extend($n,{tweeners:{"*":[function(s,u){var f=this.createTween(s,u);return dt(f.elem,s,pe.exec(u),f),f}]},tweener:function(s,u){I(s)?(u=s,s=["*"]):s=s.match(Ve);for(var f,h=0,v=s.length;h<v;h++)f=s[h],$n.tweeners[f]=$n.tweeners[f]||[],$n.tweeners[f].unshift(u)},prefilters:[$T],prefilter:function(s,u){u?$n.prefilters.unshift(s):$n.prefilters.push(s)}}),p.speed=function(s,u,f){var h=s&&typeof s=="object"?p.extend({},s):{complete:f||!f&&u||I(s)&&s,duration:s,easing:f&&u||u&&!I(u)&&u};return p.fx.off?h.duration=0:typeof h.duration!="number"&&(h.duration in p.fx.speeds?h.duration=p.fx.speeds[h.duration]:h.duration=p.fx.speeds._default),(h.queue==null||h.queue===!0)&&(h.queue="fx"),h.old=h.complete,h.complete=function(){I(h.old)&&h.old.call(this),h.queue&&p.dequeue(this,h.queue)},h},p.fn.extend({fadeTo:function(s,u,f,h){return this.filter(tt).css("opacity",0).show().end().animate({opacity:u},s,f,h)},animate:function(s,u,f,h){var v=p.isEmptyObject(s),y=p.speed(u,f,h),b=function(){var O=$n(this,p.extend({},s),y);(v||B.get(this,"finish"))&&O.stop(!0)};return b.finish=b,v||y.queue===!1?this.each(b):this.queue(y.queue,b)},stop:function(s,u,f){var h=function(v){var y=v.stop;delete v.stop,y(f)};return typeof s!="string"&&(f=u,u=s,s=void 0),u&&this.queue(s||"fx",[]),this.each(function(){var v=!0,y=s!=null&&s+"queueHooks",b=p.timers,O=B.get(this);if(y)O[y]&&O[y].stop&&h(O[y]);else for(y in O)O[y]&&O[y].stop&&jT.test(y)&&h(O[y]);for(y=b.length;y--;)b[y].elem===this&&(s==null||b[y].queue===s)&&(b[y].anim.stop(f),v=!1,b.splice(y,1));(v||!f)&&p.dequeue(this,s)})},finish:function(s){return s!==!1&&(s=s||"fx"),this.each(function(){var u,f=B.get(this),h=f[s+"queue"],v=f[s+"queueHooks"],y=p.timers,b=h?h.length:0;for(f.finish=!0,p.queue(this,s,[]),v&&v.stop&&v.stop.call(this,!0),u=y.length;u--;)y[u].elem===this&&y[u].queue===s&&(y[u].anim.stop(!0),y.splice(u,1));for(u=0;u<b;u++)h[u]&&h[u].finish&&h[u].finish.call(this);delete f.finish})}}),p.each(["toggle","show","hide"],function(s,u){var f=p.fn[u];p.fn[u]=function(h,v,y){return h==null||typeof h=="boolean"?f.apply(this,arguments):this.animate(Po(u,!0),h,v,y)}}),p.each({slideDown:Po("show"),slideUp:Po("hide"),slideToggle:Po("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(s,u){p.fn[s]=function(f,h,v){return this.animate(u,f,h,v)}}),p.timers=[],p.fx.tick=function(){var s,u=0,f=p.timers;for(xr=Date.now();u<f.length;u++)s=f[u],!s()&&f[u]===s&&f.splice(u--,1);f.length||p.fx.stop(),xr=void 0},p.fx.timer=function(s){p.timers.push(s),p.fx.start()},p.fx.interval=13,p.fx.start=function(){Io||(Io=!0,_l())},p.fx.stop=function(){Io=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fn.delay=function(s,u){return s=p.fx&&p.fx.speeds[s]||s,u=u||"fx",this.queue(u,function(f,h){var v=t.setTimeout(f,s);h.stop=function(){t.clearTimeout(v)}})},function(){var s=N.createElement("input"),u=N.createElement("select"),f=u.appendChild(N.createElement("option"));s.type="checkbox",x.checkOn=s.value!=="",x.optSelected=f.selected,s=N.createElement("input"),s.value="t",s.type="radio",x.radioValue=s.value==="t"}();var ad,gs=p.expr.attrHandle;p.fn.extend({attr:function(s,u){return ke(this,p.attr,s,u,arguments.length>1)},removeAttr:function(s){return this.each(function(){p.removeAttr(this,s)})}}),p.extend({attr:function(s,u,f){var h,v,y=s.nodeType;if(!(y===3||y===8||y===2)){if(typeof s.getAttribute>"u")return p.prop(s,u,f);if((y!==1||!p.isXMLDoc(s))&&(v=p.attrHooks[u.toLowerCase()]||(p.expr.match.bool.test(u)?ad:void 0)),f!==void 0){if(f===null){p.removeAttr(s,u);return}return v&&"set"in v&&(h=v.set(s,f,u))!==void 0?h:(s.setAttribute(u,f+""),f)}return v&&"get"in v&&(h=v.get(s,u))!==null?h:(h=p.find.attr(s,u),h??void 0)}},attrHooks:{type:{set:function(s,u){if(!x.radioValue&&u==="radio"&&re(s,"input")){var f=s.value;return s.setAttribute("type",u),f&&(s.value=f),u}}}},removeAttr:function(s,u){var f,h=0,v=u&&u.match(Ve);if(v&&s.nodeType===1)for(;f=v[h++];)s.removeAttribute(f)}}),ad={set:function(s,u,f){return u===!1?p.removeAttr(s,f):s.setAttribute(f,f),f}},p.each(p.expr.match.bool.source.match(/\w+/g),function(s,u){var f=gs[u]||p.find.attr;gs[u]=function(h,v,y){var b,O,S=v.toLowerCase();return y||(O=gs[S],gs[S]=b,b=f(h,v,y)!=null?S:null,gs[S]=O),b}});var WT=/^(?:input|select|textarea|button)$/i,KT=/^(?:a|area)$/i;p.fn.extend({prop:function(s,u){return ke(this,p.prop,s,u,arguments.length>1)},removeProp:function(s){return this.each(function(){delete this[p.propFix[s]||s]})}}),p.extend({prop:function(s,u,f){var h,v,y=s.nodeType;if(!(y===3||y===8||y===2))return(y!==1||!p.isXMLDoc(s))&&(u=p.propFix[u]||u,v=p.propHooks[u]),f!==void 0?v&&"set"in v&&(h=v.set(s,f,u))!==void 0?h:s[u]=f:v&&"get"in v&&(h=v.get(s,u))!==null?h:s[u]},propHooks:{tabIndex:{get:function(s){var u=p.find.attr(s,"tabindex");return u?parseInt(u,10):WT.test(s.nodeName)||KT.test(s.nodeName)&&s.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),x.optSelected||(p.propHooks.selected={get:function(s){var u=s.parentNode;return u&&u.parentNode&&u.parentNode.selectedIndex,null},set:function(s){var u=s.parentNode;u&&(u.selectedIndex,u.parentNode&&u.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){p.propFix[this.toLowerCase()]=this});function Vi(s){var u=s.match(Ve)||[];return u.join(" ")}function zi(s){return s.getAttribute&&s.getAttribute("class")||""}function Tl(s){return Array.isArray(s)?s:typeof s=="string"?s.match(Ve)||[]:[]}p.fn.extend({addClass:function(s){var u,f,h,v,y,b;return I(s)?this.each(function(O){p(this).addClass(s.call(this,O,zi(this)))}):(u=Tl(s),u.length?this.each(function(){if(h=zi(this),f=this.nodeType===1&&" "+Vi(h)+" ",f){for(y=0;y<u.length;y++)v=u[y],f.indexOf(" "+v+" ")<0&&(f+=v+" ");b=Vi(f),h!==b&&this.setAttribute("class",b)}}):this)},removeClass:function(s){var u,f,h,v,y,b;return I(s)?this.each(function(O){p(this).removeClass(s.call(this,O,zi(this)))}):arguments.length?(u=Tl(s),u.length?this.each(function(){if(h=zi(this),f=this.nodeType===1&&" "+Vi(h)+" ",f){for(y=0;y<u.length;y++)for(v=u[y];f.indexOf(" "+v+" ")>-1;)f=f.replace(" "+v+" "," ");b=Vi(f),h!==b&&this.setAttribute("class",b)}}):this):this.attr("class","")},toggleClass:function(s,u){var f,h,v,y,b=typeof s,O=b==="string"||Array.isArray(s);return I(s)?this.each(function(S){p(this).toggleClass(s.call(this,S,zi(this),u),u)}):typeof u=="boolean"&&O?u?this.addClass(s):this.removeClass(s):(f=Tl(s),this.each(function(){if(O)for(y=p(this),v=0;v<f.length;v++)h=f[v],y.hasClass(h)?y.removeClass(h):y.addClass(h);else(s===void 0||b==="boolean")&&(h=zi(this),h&&B.set(this,"__className__",h),this.setAttribute&&this.setAttribute("class",h||s===!1?"":B.get(this,"__className__")||""))}))},hasClass:function(s){var u,f,h=0;for(u=" "+s+" ";f=this[h++];)if(f.nodeType===1&&(" "+Vi(zi(f))+" ").indexOf(u)>-1)return!0;return!1}});var qT=/\r/g;p.fn.extend({val:function(s){var u,f,h,v=this[0];return arguments.length?(h=I(s),this.each(function(y){var b;this.nodeType===1&&(h?b=s.call(this,y,p(this).val()):b=s,b==null?b="":typeof b=="number"?b+="":Array.isArray(b)&&(b=p.map(b,function(O){return O==null?"":O+""})),u=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()],(!u||!("set"in u)||u.set(this,b,"value")===void 0)&&(this.value=b))})):v?(u=p.valHooks[v.type]||p.valHooks[v.nodeName.toLowerCase()],u&&"get"in u&&(f=u.get(v,"value"))!==void 0?f:(f=v.value,typeof f=="string"?f.replace(qT,""):f??"")):void 0}}),p.extend({valHooks:{option:{get:function(s){var u=p.find.attr(s,"value");return u??Vi(p.text(s))}},select:{get:function(s){var u,f,h,v=s.options,y=s.selectedIndex,b=s.type==="select-one",O=b?null:[],S=b?y+1:v.length;for(y<0?h=S:h=b?y:0;h<S;h++)if(f=v[h],(f.selected||h===y)&&!f.disabled&&(!f.parentNode.disabled||!re(f.parentNode,"optgroup"))){if(u=p(f).val(),b)return u;O.push(u)}return O},set:function(s,u){for(var f,h,v=s.options,y=p.makeArray(u),b=v.length;b--;)h=v[b],(h.selected=p.inArray(p.valHooks.option.get(h),y)>-1)&&(f=!0);return f||(s.selectedIndex=-1),y}}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]={set:function(s,u){if(Array.isArray(u))return s.checked=p.inArray(p(s).val(),u)>-1}},x.checkOn||(p.valHooks[this].get=function(s){return s.getAttribute("value")===null?"on":s.value})}),x.focusin="onfocusin"in t;var ld=/^(?:focusinfocus|focusoutblur)$/,ud=function(s){s.stopPropagation()};p.extend(p.event,{trigger:function(s,u,f,h){var v,y,b,O,S,$,z,le,K=[f||N],J=w.call(s,"type")?s.type:s,Be=w.call(s,"namespace")?s.namespace.split("."):[];if(y=le=b=f=f||N,!(f.nodeType===3||f.nodeType===8)&&!ld.test(J+p.event.triggered)&&(J.indexOf(".")>-1&&(Be=J.split("."),J=Be.shift(),Be.sort()),S=J.indexOf(":")<0&&"on"+J,s=s[p.expando]?s:new p.Event(J,typeof s=="object"&&s),s.isTrigger=h?2:3,s.namespace=Be.join("."),s.rnamespace=s.namespace?new RegExp("(^|\\.)"+Be.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,s.result=void 0,s.target||(s.target=f),u=u==null?[s]:p.makeArray(u,[s]),z=p.event.special[J]||{},!(!h&&z.trigger&&z.trigger.apply(f,u)===!1))){if(!h&&!z.noBubble&&!V(f)){for(O=z.delegateType||J,ld.test(O+J)||(y=y.parentNode);y;y=y.parentNode)K.push(y),b=y;b===(f.ownerDocument||N)&&K.push(b.defaultView||b.parentWindow||t)}for(v=0;(y=K[v++])&&!s.isPropagationStopped();)le=y,s.type=v>1?O:z.bindType||J,$=(B.get(y,"events")||Object.create(null))[s.type]&&B.get(y,"handle"),$&&$.apply(y,u),$=S&&y[S],$&&$.apply&&W(y)&&(s.result=$.apply(y,u),s.result===!1&&s.preventDefault());return s.type=J,!h&&!s.isDefaultPrevented()&&(!z._default||z._default.apply(K.pop(),u)===!1)&&W(f)&&S&&I(f[J])&&!V(f)&&(b=f[S],b&&(f[S]=null),p.event.triggered=J,s.isPropagationStopped()&&le.addEventListener(J,ud),f[J](),s.isPropagationStopped()&&le.removeEventListener(J,ud),p.event.triggered=void 0,b&&(f[S]=b)),s.result}},simulate:function(s,u,f){var h=p.extend(new p.Event,f,{type:s,isSimulated:!0});p.event.trigger(h,null,u)}}),p.fn.extend({trigger:function(s,u){return this.each(function(){p.event.trigger(s,u,this)})},triggerHandler:function(s,u){var f=this[0];if(f)return p.event.trigger(s,u,f,!0)}}),x.focusin||p.each({focus:"focusin",blur:"focusout"},function(s,u){var f=function(h){p.event.simulate(u,h.target,p.event.fix(h))};p.event.special[u]={setup:function(){var h=this.ownerDocument||this.document||this,v=B.access(h,u);v||h.addEventListener(s,f,!0),B.access(h,u,(v||0)+1)},teardown:function(){var h=this.ownerDocument||this.document||this,v=B.access(h,u)-1;v?B.access(h,u,v):(h.removeEventListener(s,f,!0),B.remove(h,u))}}});var ms=t.location,cd={guid:Date.now()},El=/\?/;p.parseXML=function(s){var u,f;if(!s||typeof s!="string")return null;try{u=new t.DOMParser().parseFromString(s,"text/xml")}catch{}return f=u&&u.getElementsByTagName("parsererror")[0],(!u||f)&&p.error("Invalid XML: "+(f?p.map(f.childNodes,function(h){return h.textContent}).join(`
|
||
`):s)),u};var VT=/\[\]$/,fd=/\r?\n/g,zT=/^(?:submit|button|image|reset|file)$/i,XT=/^(?:input|select|textarea|keygen)/i;function kl(s,u,f,h){var v;if(Array.isArray(u))p.each(u,function(y,b){f||VT.test(s)?h(s,b):kl(s+"["+(typeof b=="object"&&b!=null?y:"")+"]",b,f,h)});else if(!f&&D(u)==="object")for(v in u)kl(s+"["+v+"]",u[v],f,h);else h(s,u)}p.param=function(s,u){var f,h=[],v=function(y,b){var O=I(b)?b():b;h[h.length]=encodeURIComponent(y)+"="+encodeURIComponent(O??"")};if(s==null)return"";if(Array.isArray(s)||s.jquery&&!p.isPlainObject(s))p.each(s,function(){v(this.name,this.value)});else for(f in s)kl(f,s[f],u,v);return h.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var s=p.prop(this,"elements");return s?p.makeArray(s):this}).filter(function(){var s=this.type;return this.name&&!p(this).is(":disabled")&&XT.test(this.nodeName)&&!zT.test(s)&&(this.checked||!zt.test(s))}).map(function(s,u){var f=p(this).val();return f==null?null:Array.isArray(f)?p.map(f,function(h){return{name:u.name,value:h.replace(fd,`\r
|
||
`)}}):{name:u.name,value:f.replace(fd,`\r
|
||
`)}}).get()}});var YT=/%20/g,GT=/#.*$/,JT=/([?&])_=[^&]*/,ZT=/^(.*?):[ \t]*([^\r\n]*)$/mg,QT=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,e1=/^(?:GET|HEAD)$/,t1=/^\/\//,dd={},Sl={},pd="*/".concat("*"),xl=N.createElement("a");xl.href=ms.href;function hd(s){return function(u,f){typeof u!="string"&&(f=u,u="*");var h,v=0,y=u.toLowerCase().match(Ve)||[];if(I(f))for(;h=y[v++];)h[0]==="+"?(h=h.slice(1)||"*",(s[h]=s[h]||[]).unshift(f)):(s[h]=s[h]||[]).push(f)}}function gd(s,u,f,h){var v={},y=s===Sl;function b(O){var S;return v[O]=!0,p.each(s[O]||[],function($,z){var le=z(u,f,h);if(typeof le=="string"&&!y&&!v[le])return u.dataTypes.unshift(le),b(le),!1;if(y)return!(S=le)}),S}return b(u.dataTypes[0])||!v["*"]&&b("*")}function Al(s,u){var f,h,v=p.ajaxSettings.flatOptions||{};for(f in u)u[f]!==void 0&&((v[f]?s:h||(h={}))[f]=u[f]);return h&&p.extend(!0,s,h),s}function n1(s,u,f){for(var h,v,y,b,O=s.contents,S=s.dataTypes;S[0]==="*";)S.shift(),h===void 0&&(h=s.mimeType||u.getResponseHeader("Content-Type"));if(h){for(v in O)if(O[v]&&O[v].test(h)){S.unshift(v);break}}if(S[0]in f)y=S[0];else{for(v in f){if(!S[0]||s.converters[v+" "+S[0]]){y=v;break}b||(b=v)}y=y||b}if(y)return y!==S[0]&&S.unshift(y),f[y]}function i1(s,u,f,h){var v,y,b,O,S,$={},z=s.dataTypes.slice();if(z[1])for(b in s.converters)$[b.toLowerCase()]=s.converters[b];for(y=z.shift();y;)if(s.responseFields[y]&&(f[s.responseFields[y]]=u),!S&&h&&s.dataFilter&&(u=s.dataFilter(u,s.dataType)),S=y,y=z.shift(),y){if(y==="*")y=S;else if(S!=="*"&&S!==y){if(b=$[S+" "+y]||$["* "+y],!b){for(v in $)if(O=v.split(" "),O[1]===y&&(b=$[S+" "+O[0]]||$["* "+O[0]],b)){b===!0?b=$[v]:$[v]!==!0&&(y=O[0],z.unshift(O[1]));break}}if(b!==!0)if(b&&s.throws)u=b(u);else try{u=b(u)}catch(le){return{state:"parsererror",error:b?le:"No conversion from "+S+" to "+y}}}}return{state:"success",data:u}}p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ms.href,type:"GET",isLocal:QT.test(ms.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pd,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(s,u){return u?Al(Al(s,p.ajaxSettings),u):Al(p.ajaxSettings,s)},ajaxPrefilter:hd(dd),ajaxTransport:hd(Sl),ajax:function(s,u){typeof s=="object"&&(u=s,s=void 0),u=u||{};var f,h,v,y,b,O,S,$,z,le,K=p.ajaxSetup({},u),J=K.context||K,Be=K.context&&(J.nodeType||J.jquery)?p(J):p.event,it=p.Deferred(),He=p.Callbacks("once memory"),qt=K.statusCode||{},Bt={},Cn={},_t="canceled",nt={readyState:0,getResponseHeader:function(mt){var Rt;if(S){if(!y)for(y={};Rt=ZT.exec(v);)y[Rt[1].toLowerCase()+" "]=(y[Rt[1].toLowerCase()+" "]||[]).concat(Rt[2]);Rt=y[mt.toLowerCase()+" "]}return Rt==null?null:Rt.join(", ")},getAllResponseHeaders:function(){return S?v:null},setRequestHeader:function(mt,Rt){return S==null&&(mt=Cn[mt.toLowerCase()]=Cn[mt.toLowerCase()]||mt,Bt[mt]=Rt),this},overrideMimeType:function(mt){return S==null&&(K.mimeType=mt),this},statusCode:function(mt){var Rt;if(mt)if(S)nt.always(mt[nt.status]);else for(Rt in mt)qt[Rt]=[qt[Rt],mt[Rt]];return this},abort:function(mt){var Rt=mt||_t;return f&&f.abort(Rt),hn(0,Rt),this}};if(it.promise(nt),K.url=((s||K.url||ms.href)+"").replace(t1,ms.protocol+"//"),K.type=u.method||u.type||K.method||K.type,K.dataTypes=(K.dataType||"*").toLowerCase().match(Ve)||[""],K.crossDomain==null){O=N.createElement("a");try{O.href=K.url,O.href=O.href,K.crossDomain=xl.protocol+"//"+xl.host!=O.protocol+"//"+O.host}catch{K.crossDomain=!0}}if(K.data&&K.processData&&typeof K.data!="string"&&(K.data=p.param(K.data,K.traditional)),gd(dd,K,u,nt),S)return nt;$=p.event&&K.global,$&&p.active++===0&&p.event.trigger("ajaxStart"),K.type=K.type.toUpperCase(),K.hasContent=!e1.test(K.type),h=K.url.replace(GT,""),K.hasContent?K.data&&K.processData&&(K.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(K.data=K.data.replace(YT,"+")):(le=K.url.slice(h.length),K.data&&(K.processData||typeof K.data=="string")&&(h+=(El.test(h)?"&":"?")+K.data,delete K.data),K.cache===!1&&(h=h.replace(JT,"$1"),le=(El.test(h)?"&":"?")+"_="+cd.guid+++le),K.url=h+le),K.ifModified&&(p.lastModified[h]&&nt.setRequestHeader("If-Modified-Since",p.lastModified[h]),p.etag[h]&&nt.setRequestHeader("If-None-Match",p.etag[h])),(K.data&&K.hasContent&&K.contentType!==!1||u.contentType)&&nt.setRequestHeader("Content-Type",K.contentType),nt.setRequestHeader("Accept",K.dataTypes[0]&&K.accepts[K.dataTypes[0]]?K.accepts[K.dataTypes[0]]+(K.dataTypes[0]!=="*"?", "+pd+"; q=0.01":""):K.accepts["*"]);for(z in K.headers)nt.setRequestHeader(z,K.headers[z]);if(K.beforeSend&&(K.beforeSend.call(J,nt,K)===!1||S))return nt.abort();if(_t="abort",He.add(K.complete),nt.done(K.success),nt.fail(K.error),f=gd(Sl,K,u,nt),!f)hn(-1,"No Transport");else{if(nt.readyState=1,$&&Be.trigger("ajaxSend",[nt,K]),S)return nt;K.async&&K.timeout>0&&(b=t.setTimeout(function(){nt.abort("timeout")},K.timeout));try{S=!1,f.send(Bt,hn)}catch(mt){if(S)throw mt;hn(-1,mt)}}function hn(mt,Rt,ys,No){var wn,Xi,Yi,gn,Si,Dn=Rt;S||(S=!0,b&&t.clearTimeout(b),f=void 0,v=No||"",nt.readyState=mt>0?4:0,wn=mt>=200&&mt<300||mt===304,ys&&(gn=n1(K,nt,ys)),!wn&&p.inArray("script",K.dataTypes)>-1&&p.inArray("json",K.dataTypes)<0&&(K.converters["text script"]=function(){}),gn=i1(K,gn,nt,wn),wn?(K.ifModified&&(Si=nt.getResponseHeader("Last-Modified"),Si&&(p.lastModified[h]=Si),Si=nt.getResponseHeader("etag"),Si&&(p.etag[h]=Si)),mt===204||K.type==="HEAD"?Dn="nocontent":mt===304?Dn="notmodified":(Dn=gn.state,Xi=gn.data,Yi=gn.error,wn=!Yi)):(Yi=Dn,(mt||!Dn)&&(Dn="error",mt<0&&(mt=0))),nt.status=mt,nt.statusText=(Rt||Dn)+"",wn?it.resolveWith(J,[Xi,Dn,nt]):it.rejectWith(J,[nt,Dn,Yi]),nt.statusCode(qt),qt=void 0,$&&Be.trigger(wn?"ajaxSuccess":"ajaxError",[nt,K,wn?Xi:Yi]),He.fireWith(J,[nt,Dn]),$&&(Be.trigger("ajaxComplete",[nt,K]),--p.active||p.event.trigger("ajaxStop")))}return nt},getJSON:function(s,u,f){return p.get(s,u,f,"json")},getScript:function(s,u){return p.get(s,void 0,u,"script")}}),p.each(["get","post"],function(s,u){p[u]=function(f,h,v,y){return I(h)&&(y=y||v,v=h,h=void 0),p.ajax(p.extend({url:f,type:u,dataType:y,data:h,success:v},p.isPlainObject(f)&&f))}}),p.ajaxPrefilter(function(s){var u;for(u in s.headers)u.toLowerCase()==="content-type"&&(s.contentType=s.headers[u]||"")}),p._evalUrl=function(s,u,f){return p.ajax({url:s,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(h){p.globalEval(h,u,f)}})},p.fn.extend({wrapAll:function(s){var u;return this[0]&&(I(s)&&(s=s.call(this[0])),u=p(s,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&u.insertBefore(this[0]),u.map(function(){for(var f=this;f.firstElementChild;)f=f.firstElementChild;return f}).append(this)),this},wrapInner:function(s){return I(s)?this.each(function(u){p(this).wrapInner(s.call(this,u))}):this.each(function(){var u=p(this),f=u.contents();f.length?f.wrapAll(s):u.append(s)})},wrap:function(s){var u=I(s);return this.each(function(f){p(this).wrapAll(u?s.call(this,f):s)})},unwrap:function(s){return this.parent(s).not("body").each(function(){p(this).replaceWith(this.childNodes)}),this}}),p.expr.pseudos.hidden=function(s){return!p.expr.pseudos.visible(s)},p.expr.pseudos.visible=function(s){return!!(s.offsetWidth||s.offsetHeight||s.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var r1={0:200,1223:204},vs=p.ajaxSettings.xhr();x.cors=!!vs&&"withCredentials"in vs,x.ajax=vs=!!vs,p.ajaxTransport(function(s){var u,f;if(x.cors||vs&&!s.crossDomain)return{send:function(h,v){var y,b=s.xhr();if(b.open(s.type,s.url,s.async,s.username,s.password),s.xhrFields)for(y in s.xhrFields)b[y]=s.xhrFields[y];s.mimeType&&b.overrideMimeType&&b.overrideMimeType(s.mimeType),!s.crossDomain&&!h["X-Requested-With"]&&(h["X-Requested-With"]="XMLHttpRequest");for(y in h)b.setRequestHeader(y,h[y]);u=function(O){return function(){u&&(u=f=b.onload=b.onerror=b.onabort=b.ontimeout=b.onreadystatechange=null,O==="abort"?b.abort():O==="error"?typeof b.status!="number"?v(0,"error"):v(b.status,b.statusText):v(r1[b.status]||b.status,b.statusText,(b.responseType||"text")!=="text"||typeof b.responseText!="string"?{binary:b.response}:{text:b.responseText},b.getAllResponseHeaders()))}},b.onload=u(),f=b.onerror=b.ontimeout=u("error"),b.onabort!==void 0?b.onabort=f:b.onreadystatechange=function(){b.readyState===4&&t.setTimeout(function(){u&&f()})},u=u("abort");try{b.send(s.hasContent&&s.data||null)}catch(O){if(u)throw O}},abort:function(){u&&u()}}}),p.ajaxPrefilter(function(s){s.crossDomain&&(s.contents.script=!1)}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(s){return p.globalEval(s),s}}}),p.ajaxPrefilter("script",function(s){s.cache===void 0&&(s.cache=!1),s.crossDomain&&(s.type="GET")}),p.ajaxTransport("script",function(s){if(s.crossDomain||s.scriptAttrs){var u,f;return{send:function(h,v){u=p("<script>").attr(s.scriptAttrs||{}).prop({charset:s.scriptCharset,src:s.url}).on("load error",f=function(y){u.remove(),f=null,y&&v(y.type==="error"?404:200,y.type)}),N.head.appendChild(u[0])},abort:function(){f&&f()}}}});var md=[],Ll=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var s=md.pop()||p.expando+"_"+cd.guid++;return this[s]=!0,s}}),p.ajaxPrefilter("json jsonp",function(s,u,f){var h,v,y,b=s.jsonp!==!1&&(Ll.test(s.url)?"url":typeof s.data=="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&Ll.test(s.data)&&"data");if(b||s.dataTypes[0]==="jsonp")return h=s.jsonpCallback=I(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,b?s[b]=s[b].replace(Ll,"$1"+h):s.jsonp!==!1&&(s.url+=(El.test(s.url)?"&":"?")+s.jsonp+"="+h),s.converters["script json"]=function(){return y||p.error(h+" was not called"),y[0]},s.dataTypes[0]="json",v=t[h],t[h]=function(){y=arguments},f.always(function(){v===void 0?p(t).removeProp(h):t[h]=v,s[h]&&(s.jsonpCallback=u.jsonpCallback,md.push(h)),y&&I(v)&&v(y[0]),y=v=void 0}),"script"}),x.createHTMLDocument=function(){var s=N.implementation.createHTMLDocument("").body;return s.innerHTML="<form></form><form></form>",s.childNodes.length===2}(),p.parseHTML=function(s,u,f){if(typeof s!="string")return[];typeof u=="boolean"&&(f=u,u=!1);var h,v,y;return u||(x.createHTMLDocument?(u=N.implementation.createHTMLDocument(""),h=u.createElement("base"),h.href=N.location.href,u.head.appendChild(h)):u=N),v=se.exec(s),y=!f&&[],v?[u.createElement(v[1])]:(v=sn([s],u,y),y&&y.length&&p(y).remove(),p.merge([],v.childNodes))},p.fn.load=function(s,u,f){var h,v,y,b=this,O=s.indexOf(" ");return O>-1&&(h=Vi(s.slice(O)),s=s.slice(0,O)),I(u)?(f=u,u=void 0):u&&typeof u=="object"&&(v="POST"),b.length>0&&p.ajax({url:s,type:v||"GET",dataType:"html",data:u}).done(function(S){y=arguments,b.html(h?p("<div>").append(p.parseHTML(S)).find(h):S)}).always(f&&function(S,$){b.each(function(){f.apply(this,y||[S.responseText,$,S])})}),this},p.expr.pseudos.animated=function(s){return p.grep(p.timers,function(u){return s===u.elem}).length},p.offset={setOffset:function(s,u,f){var h,v,y,b,O,S,$,z=p.css(s,"position"),le=p(s),K={};z==="static"&&(s.style.position="relative"),O=le.offset(),y=p.css(s,"top"),S=p.css(s,"left"),$=(z==="absolute"||z==="fixed")&&(y+S).indexOf("auto")>-1,$?(h=le.position(),b=h.top,v=h.left):(b=parseFloat(y)||0,v=parseFloat(S)||0),I(u)&&(u=u.call(s,f,p.extend({},O))),u.top!=null&&(K.top=u.top-O.top+b),u.left!=null&&(K.left=u.left-O.left+v),"using"in u?u.using.call(s,K):le.css(K)}},p.fn.extend({offset:function(s){if(arguments.length)return s===void 0?this:this.each(function(v){p.offset.setOffset(this,s,v)});var u,f,h=this[0];if(h)return h.getClientRects().length?(u=h.getBoundingClientRect(),f=h.ownerDocument.defaultView,{top:u.top+f.pageYOffset,left:u.left+f.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var s,u,f,h=this[0],v={top:0,left:0};if(p.css(h,"position")==="fixed")u=h.getBoundingClientRect();else{for(u=this.offset(),f=h.ownerDocument,s=h.offsetParent||f.documentElement;s&&(s===f.body||s===f.documentElement)&&p.css(s,"position")==="static";)s=s.parentNode;s&&s!==h&&s.nodeType===1&&(v=p(s).offset(),v.top+=p.css(s,"borderTopWidth",!0),v.left+=p.css(s,"borderLeftWidth",!0))}return{top:u.top-v.top-p.css(h,"marginTop",!0),left:u.left-v.left-p.css(h,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var s=this.offsetParent;s&&p.css(s,"position")==="static";)s=s.offsetParent;return s||Ce})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(s,u){var f=u==="pageYOffset";p.fn[s]=function(h){return ke(this,function(v,y,b){var O;if(V(v)?O=v:v.nodeType===9&&(O=v.defaultView),b===void 0)return O?O[u]:v[y];O?O.scrollTo(f?O.pageXOffset:b,f?b:O.pageYOffset):v[y]=b},s,h,arguments.length)}}),p.each(["top","left"],function(s,u){p.cssHooks[u]=Zf(x.pixelPosition,function(f,h){if(h)return h=hs(f,u),yl.test(h)?p(f).position()[u]+"px":h})}),p.each({Height:"height",Width:"width"},function(s,u){p.each({padding:"inner"+s,content:u,"":"outer"+s},function(f,h){p.fn[h]=function(v,y){var b=arguments.length&&(f||typeof v!="boolean"),O=f||(v===!0||y===!0?"margin":"border");return ke(this,function(S,$,z){var le;return V(S)?h.indexOf("outer")===0?S["inner"+s]:S.document.documentElement["client"+s]:S.nodeType===9?(le=S.documentElement,Math.max(S.body["scroll"+s],le["scroll"+s],S.body["offset"+s],le["offset"+s],le["client"+s])):z===void 0?p.css(S,$,O):p.style(S,$,z,O)},u,b?v:void 0,b)}})}),p.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(s,u){p.fn[u]=function(f){return this.on(u,f)}}),p.fn.extend({bind:function(s,u,f){return this.on(s,null,u,f)},unbind:function(s,u){return this.off(s,null,u)},delegate:function(s,u,f,h){return this.on(u,s,f,h)},undelegate:function(s,u,f){return arguments.length===1?this.off(s,"**"):this.off(u,s||"**",f)},hover:function(s,u){return this.mouseenter(s).mouseleave(u||s)}}),p.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(s,u){p.fn[u]=function(f,h){return arguments.length>0?this.on(u,null,f,h):this.trigger(u)}});var s1=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;p.proxy=function(s,u){var f,h,v;if(typeof u=="string"&&(f=s[u],u=s,s=f),!!I(s))return h=o.call(arguments,2),v=function(){return s.apply(u||this,h.concat(o.call(arguments)))},v.guid=s.guid=s.guid||p.guid++,v},p.holdReady=function(s){s?p.readyWait++:p.ready(!0)},p.isArray=Array.isArray,p.parseJSON=JSON.parse,p.nodeName=re,p.isFunction=I,p.isWindow=V,p.camelCase=L,p.type=D,p.now=Date.now,p.isNumeric=function(s){var u=p.type(s);return(u==="number"||u==="string")&&!isNaN(s-parseFloat(s))},p.trim=function(s){return s==null?"":(s+"").replace(s1,"$1")};var o1=t.jQuery,a1=t.$;return p.noConflict=function(s){return t.$===p&&(t.$=a1),s&&t.jQuery===p&&(t.jQuery=o1),p},typeof n>"u"&&(t.jQuery=t.$=p),p})}(Ua)),Ua.exports}(function(e){(function(t){t(["jquery"],function(n){return function(){var i,r,o=0,l={error:"error",info:"info",success:"success",warning:"warning"},c={clear:I,remove:V,error:m,getContainer:g,info:w,options:{},subscribe:T,success:H,version:"2.1.4",warning:x},d;return c;function m(E,P,Z){return p({type:l.error,iconClass:Ae().iconClasses.error,message:E,optionsOverride:Z,title:P})}function g(E,P){return E||(E=Ae()),i=n("#"+E.containerId),i.length||P&&(i=ye(E)),i}function w(E,P,Z){return p({type:l.info,iconClass:Ae().iconClasses.info,message:E,optionsOverride:Z,title:P})}function T(E){r=E}function H(E,P,Z){return p({type:l.success,iconClass:Ae().iconClasses.success,message:E,optionsOverride:Z,title:P})}function x(E,P,Z){return p({type:l.warning,iconClass:Ae().iconClasses.warning,message:E,optionsOverride:Z,title:P})}function I(E,P){var Z=Ae();i||g(Z),te(E,Z,P)||N(Z)}function V(E){var P=Ae();if(i||g(P),E&&n(":focus",E).length===0){R(E);return}i.children().length&&i.remove()}function N(E){for(var P=i.children(),Z=P.length-1;Z>=0;Z--)te(n(P[Z]),E)}function te(E,P,Z){var re=Z&&Z.force?Z.force:!1;return E&&(re||n(":focus",E).length===0)?(E[P.hideMethod]({duration:P.hideDuration,easing:P.hideEasing,complete:function(){R(E)}}),!0):!1}function ye(E){return i=n("<div/>").attr("id",E.containerId).addClass(E.positionClass),i.appendTo(n(E.target)),i}function D(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">×</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function Fe(E){r&&r(E)}function p(E){var P=Ae(),Z=E.iconClass||P.iconClass;if(typeof E.optionsOverride<"u"&&(P=n.extend(P,E.optionsOverride),Z=E.optionsOverride.iconClass||Z),k(P,E))return;o++,i=g(P,!0);var re=null,se=n("<div/>"),Me=n("<div/>"),Ze=n("<div/>"),Ne=n("<div/>"),oe=n(P.closeHtml),ge={intervalId:null,hideEta:null,maxHideTime:null},Ee={toastId:o,state:"visible",startTime:new Date,options:P,map:E};return Ve(),me(),fe(),Fe(Ee),P.debug&&console&&console.log(Ee),se;function ft(q){return q==null&&(q=""),q.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ve(){we(),Re(),ze(),ke(),Qe(),at(),Te(),G()}function G(){var q="";switch(E.iconClass){case"toast-success":case"toast-info":q="polite";break;default:q="assertive"}se.attr("aria-live",q)}function fe(){P.closeOnHover&&se.hover(Y,W),!P.onclick&&P.tapToDismiss&&se.click(L),P.closeButton&&oe&&oe.click(function(q){q.stopPropagation?q.stopPropagation():q.cancelBubble!==void 0&&q.cancelBubble!==!0&&(q.cancelBubble=!0),P.onCloseClick&&P.onCloseClick(q),L(!0)}),P.onclick&&se.click(function(q){P.onclick(q),L()})}function me(){se.hide(),se[P.showMethod]({duration:P.showDuration,easing:P.showEasing,complete:P.onShown}),P.timeOut>0&&(re=setTimeout(L,P.timeOut),ge.maxHideTime=parseFloat(P.timeOut),ge.hideEta=new Date().getTime()+ge.maxHideTime,P.progressBar&&(ge.intervalId=setInterval(B,10)))}function we(){E.iconClass&&se.addClass(P.toastClass).addClass(Z)}function Te(){P.newestOnTop?i.prepend(se):i.append(se)}function Re(){if(E.title){var q=E.title;P.escapeHtml&&(q=ft(E.title)),Me.append(q).addClass(P.titleClass),se.append(Me)}}function ze(){if(E.message){var q=E.message;P.escapeHtml&&(q=ft(E.message)),Ze.append(q).addClass(P.messageClass),se.append(Ze)}}function ke(){P.closeButton&&(oe.addClass(P.closeClass).attr("role","button"),se.prepend(oe))}function Qe(){P.progressBar&&(Ne.addClass(P.progressClass),se.prepend(Ne))}function at(){P.rtl&&se.addClass("rtl")}function k(q,de){if(q.preventDuplicates){if(de.message===d)return!0;d=de.message}return!1}function L(q){var de=q&&P.closeMethod!==!1?P.closeMethod:P.hideMethod,ae=q&&P.closeDuration!==!1?P.closeDuration:P.hideDuration,ce=q&&P.closeEasing!==!1?P.closeEasing:P.hideEasing;if(!(n(":focus",se).length&&!q))return clearTimeout(ge.intervalId),se[de]({duration:ae,easing:ce,complete:function(){R(se),clearTimeout(re),P.onHidden&&Ee.state!=="hidden"&&P.onHidden(),Ee.state="hidden",Ee.endTime=new Date,Fe(Ee)}})}function W(){(P.timeOut>0||P.extendedTimeOut>0)&&(re=setTimeout(L,P.extendedTimeOut),ge.maxHideTime=parseFloat(P.extendedTimeOut),ge.hideEta=new Date().getTime()+ge.maxHideTime)}function Y(){clearTimeout(re),ge.hideEta=0,se.stop(!0,!0)[P.showMethod]({duration:P.showDuration,easing:P.showEasing})}function B(){var q=(ge.hideEta-new Date().getTime())/ge.maxHideTime*100;Ne.width(q+"%")}}function Ae(){return n.extend({},D(),c.options)}function R(E){i||(i=g()),!E.is(":visible")&&(E.remove(),E=null,i.children().length===0&&(i.remove(),d=void 0))}}()})})(function(t,n){e.exports?e.exports=n(IC()):window.toastr=n(window.jQuery)})})(Ic);var PC=Ic.exports;const NC=fo(PC);var Nc={exports:{}};/*!
|
||
* clipboard.js v2.0.11
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/(function(e,t){(function(i,r){e.exports=r()})(ja,function(){return function(){var n={686:function(o,l,c){c.d(l,{default:function(){return Ve}});var d=c(279),m=c.n(d),g=c(370),w=c.n(g),T=c(817),H=c.n(T);function x(G){try{return document.execCommand(G)}catch{return!1}}var I=function(fe){var me=H()(fe);return x("cut"),me},V=I;function N(G){var fe=document.documentElement.getAttribute("dir")==="rtl",me=document.createElement("textarea");me.style.fontSize="12pt",me.style.border="0",me.style.padding="0",me.style.margin="0",me.style.position="absolute",me.style[fe?"right":"left"]="-9999px";var we=window.pageYOffset||document.documentElement.scrollTop;return me.style.top="".concat(we,"px"),me.setAttribute("readonly",""),me.value=G,me}var te=function(fe,me){var we=N(fe);me.container.appendChild(we);var Te=H()(we);return x("copy"),we.remove(),Te},ye=function(fe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},we="";return typeof fe=="string"?we=te(fe,me):fe instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(fe==null?void 0:fe.type)?we=te(fe.value,me):(we=H()(fe),x("copy")),we},D=ye;function Fe(G){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(me){return typeof me}:Fe=function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},Fe(G)}var p=function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=fe.action,we=me===void 0?"copy":me,Te=fe.container,Re=fe.target,ze=fe.text;if(we!=="copy"&&we!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Re!==void 0)if(Re&&Fe(Re)==="object"&&Re.nodeType===1){if(we==="copy"&&Re.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(we==="cut"&&(Re.hasAttribute("readonly")||Re.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ze)return D(ze,{container:Te});if(Re)return we==="cut"?V(Re):D(Re,{container:Te})},Ae=p;function R(G){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(me){return typeof me}:R=function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},R(G)}function E(G,fe){if(!(G instanceof fe))throw new TypeError("Cannot call a class as a function")}function P(G,fe){for(var me=0;me<fe.length;me++){var we=fe[me];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(G,we.key,we)}}function Z(G,fe,me){return fe&&P(G.prototype,fe),me&&P(G,me),G}function re(G,fe){if(typeof fe!="function"&&fe!==null)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(fe&&fe.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),fe&&se(G,fe)}function se(G,fe){return se=Object.setPrototypeOf||function(we,Te){return we.__proto__=Te,we},se(G,fe)}function Me(G){var fe=oe();return function(){var we=ge(G),Te;if(fe){var Re=ge(this).constructor;Te=Reflect.construct(we,arguments,Re)}else Te=we.apply(this,arguments);return Ze(this,Te)}}function Ze(G,fe){return fe&&(R(fe)==="object"||typeof fe=="function")?fe:Ne(G)}function Ne(G){if(G===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G}function oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ge(G){return ge=Object.setPrototypeOf?Object.getPrototypeOf:function(me){return me.__proto__||Object.getPrototypeOf(me)},ge(G)}function Ee(G,fe){var me="data-clipboard-".concat(G);if(fe.hasAttribute(me))return fe.getAttribute(me)}var ft=function(G){re(me,G);var fe=Me(me);function me(we,Te){var Re;return E(this,me),Re=fe.call(this),Re.resolveOptions(Te),Re.listenClick(we),Re}return Z(me,[{key:"resolveOptions",value:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Te.action=="function"?Te.action:this.defaultAction,this.target=typeof Te.target=="function"?Te.target:this.defaultTarget,this.text=typeof Te.text=="function"?Te.text:this.defaultText,this.container=R(Te.container)==="object"?Te.container:document.body}},{key:"listenClick",value:function(Te){var Re=this;this.listener=w()(Te,"click",function(ze){return Re.onClick(ze)})}},{key:"onClick",value:function(Te){var Re=Te.delegateTarget||Te.currentTarget,ze=this.action(Re)||"copy",ke=Ae({action:ze,container:this.container,target:this.target(Re),text:this.text(Re)});this.emit(ke?"success":"error",{action:ze,text:ke,trigger:Re,clearSelection:function(){Re&&Re.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Te){return Ee("action",Te)}},{key:"defaultTarget",value:function(Te){var Re=Ee("target",Te);if(Re)return document.querySelector(Re)}},{key:"defaultText",value:function(Te){return Ee("text",Te)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Te){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return D(Te,Re)}},{key:"cut",value:function(Te){return V(Te)}},{key:"isSupported",value:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Re=typeof Te=="string"?[Te]:Te,ze=!!document.queryCommandSupported;return Re.forEach(function(ke){ze=ze&&!!document.queryCommandSupported(ke)}),ze}}]),me}(m()),Ve=ft},828:function(o){var l=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function d(m,g){for(;m&&m.nodeType!==l;){if(typeof m.matches=="function"&&m.matches(g))return m;m=m.parentNode}}o.exports=d},438:function(o,l,c){var d=c(828);function m(T,H,x,I,V){var N=w.apply(this,arguments);return T.addEventListener(x,N,V),{destroy:function(){T.removeEventListener(x,N,V)}}}function g(T,H,x,I,V){return typeof T.addEventListener=="function"?m.apply(null,arguments):typeof x=="function"?m.bind(null,document).apply(null,arguments):(typeof T=="string"&&(T=document.querySelectorAll(T)),Array.prototype.map.call(T,function(N){return m(N,H,x,I,V)}))}function w(T,H,x,I){return function(V){V.delegateTarget=d(V.target,H),V.delegateTarget&&I.call(T,V)}}o.exports=g},879:function(o,l){l.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},l.nodeList=function(c){var d=Object.prototype.toString.call(c);return c!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in c&&(c.length===0||l.node(c[0]))},l.string=function(c){return typeof c=="string"||c instanceof String},l.fn=function(c){var d=Object.prototype.toString.call(c);return d==="[object Function]"}},370:function(o,l,c){var d=c(879),m=c(438);function g(x,I,V){if(!x&&!I&&!V)throw new Error("Missing required arguments");if(!d.string(I))throw new TypeError("Second argument must be a String");if(!d.fn(V))throw new TypeError("Third argument must be a Function");if(d.node(x))return w(x,I,V);if(d.nodeList(x))return T(x,I,V);if(d.string(x))return H(x,I,V);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function w(x,I,V){return x.addEventListener(I,V),{destroy:function(){x.removeEventListener(I,V)}}}function T(x,I,V){return Array.prototype.forEach.call(x,function(N){N.addEventListener(I,V)}),{destroy:function(){Array.prototype.forEach.call(x,function(N){N.removeEventListener(I,V)})}}}function H(x,I,V){return m(document.body,x,I,V)}o.exports=g},817:function(o){function l(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var m=c.hasAttribute("readonly");m||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),m||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var g=window.getSelection(),w=document.createRange();w.selectNodeContents(c),g.removeAllRanges(),g.addRange(w),d=g.toString()}return d}o.exports=l},279:function(o){function l(){}l.prototype={on:function(c,d,m){var g=this.e||(this.e={});return(g[c]||(g[c]=[])).push({fn:d,ctx:m}),this},once:function(c,d,m){var g=this;function w(){g.off(c,w),d.apply(m,arguments)}return w._=d,this.on(c,w,m)},emit:function(c){var d=[].slice.call(arguments,1),m=((this.e||(this.e={}))[c]||[]).slice(),g=0,w=m.length;for(g;g<w;g++)m[g].fn.apply(m[g].ctx,d);return this},off:function(c,d){var m=this.e||(this.e={}),g=m[c],w=[];if(g&&d)for(var T=0,H=g.length;T<H;T++)g[T].fn!==d&&g[T].fn._!==d&&w.push(g[T]);return w.length?m[c]=w:delete m[c],this}},o.exports=l,o.exports.TinyEmitter=l}},i={};function r(o){if(i[o])return i[o].exports;var l=i[o]={exports:{}};return n[o](l,l.exports,r),l.exports}return function(){r.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(l,{a:l}),l}}(),function(){r.d=function(o,l){for(var c in l)r.o(l,c)&&!r.o(o,c)&&Object.defineProperty(o,c,{enumerable:!0,get:l[c]})}}(),function(){r.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)}}(),r(686)}().default})})(Nc);var RC=Nc.exports;const MC=fo(RC),FC=e=>{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,i){return new Promise((r,o)=>{const l=document.createElement("button"),c=new MC(l,{text:()=>n,action:()=>"copy",container:i!==void 0?i:document.body});c.on("success",d=>{c.destroy(),r(d)}),c.on("error",d=>{c.destroy(),o(d)}),t&&document.body.appendChild(l),l.click(),t&&document.body.removeChild(l)})}}};function Rc(e,t){return function(){return e.apply(t,arguments)}}const{toString:HC}=Object.prototype,{getPrototypeOf:Wa}=Object,po=(e=>t=>{const n=HC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>po(t)===e),ho=e=>t=>typeof t===e,{isArray:mr}=Array,Qr=ho("undefined");function BC(e){return e!==null&&!Qr(e)&&e.constructor!==null&&!Qr(e.constructor)&&xn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Mc=Jn("ArrayBuffer");function jC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Mc(e.buffer),t}const $C=ho("string"),xn=ho("function"),Fc=ho("number"),go=e=>e!==null&&typeof e=="object",UC=e=>e===!0||e===!1,mo=e=>{if(po(e)!=="object")return!1;const t=Wa(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},WC=Jn("Date"),KC=Jn("File"),qC=Jn("Blob"),VC=Jn("FileList"),zC=e=>go(e)&&xn(e.pipe),XC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xn(e.append)&&((t=po(e))==="formdata"||t==="object"&&xn(e.toString)&&e.toString()==="[object FormData]"))},YC=Jn("URLSearchParams"),GC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function es(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,r;if(typeof e!="object"&&(e=[e]),mr(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),l=o.length;let c;for(i=0;i<l;i++)c=o[i],t.call(null,e[c],c,e)}}function Hc(e,t){t=t.toLowerCase();const n=Object.keys(e);let i=n.length,r;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const Bc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),jc=e=>!Qr(e)&&e!==Bc;function Ka(){const{caseless:e}=jc(this)&&this||{},t={},n=(i,r)=>{const o=e&&Hc(t,r)||r;mo(t[o])&&mo(i)?t[o]=Ka(t[o],i):mo(i)?t[o]=Ka({},i):mr(i)?t[o]=i.slice():t[o]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&es(arguments[i],n);return t}const JC=(e,t,n,{allOwnKeys:i}={})=>(es(t,(r,o)=>{n&&xn(r)?e[o]=Rc(r,n):e[o]=r},{allOwnKeys:i}),e),ZC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QC=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ew=(e,t,n,i)=>{let r,o,l;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)l=r[o],(!i||i(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&Wa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},nw=e=>{if(!e)return null;if(mr(e))return e;let t=e.length;if(!Fc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},iw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wa(Uint8Array)),rw=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=i.next())&&!r.done;){const o=r.value;t.call(e,o[0],o[1])}},sw=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},ow=Jn("HTMLFormElement"),aw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),$c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lw=Jn("RegExp"),Uc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};es(n,(r,o)=>{t(r,o,e)!==!1&&(i[o]=r)}),Object.defineProperties(e,i)},uw=e=>{Uc(e,(t,n)=>{if(xn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(xn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cw=(e,t)=>{const n={},i=r=>{r.forEach(o=>{n[o]=!0})};return mr(e)?i(e):i(String(e).split(t)),n},fw=()=>{},dw=(e,t)=>(e=+e,Number.isFinite(e)?e:t),qa="abcdefghijklmnopqrstuvwxyz",Wc="0123456789",Kc={DIGIT:Wc,ALPHA:qa,ALPHA_DIGIT:qa+qa.toUpperCase()+Wc},pw=(e=16,t=Kc.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function hw(e){return!!(e&&xn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gw=e=>{const t=new Array(10),n=(i,r)=>{if(go(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[r]=i;const o=mr(i)?[]:{};return es(i,(l,c)=>{const d=n(l,r+1);!Qr(d)&&(o[c]=d)}),t[r]=void 0,o}}return i};return n(e,0)},mw=Jn("AsyncFunction"),ne={isArray:mr,isArrayBuffer:Mc,isBuffer:BC,isFormData:XC,isArrayBufferView:jC,isString:$C,isNumber:Fc,isBoolean:UC,isObject:go,isPlainObject:mo,isUndefined:Qr,isDate:WC,isFile:KC,isBlob:qC,isRegExp:lw,isFunction:xn,isStream:zC,isURLSearchParams:YC,isTypedArray:iw,isFileList:VC,forEach:es,merge:Ka,extend:JC,trim:GC,stripBOM:ZC,inherits:QC,toFlatObject:ew,kindOf:po,kindOfTest:Jn,endsWith:tw,toArray:nw,forEachEntry:rw,matchAll:sw,isHTMLForm:ow,hasOwnProperty:$c,hasOwnProp:$c,reduceDescriptors:Uc,freezeMethods:uw,toObjectSet:cw,toCamelCase:aw,noop:fw,toFiniteNumber:dw,findKey:Hc,global:Bc,isContextDefined:jc,ALPHABET:Kc,generateString:pw,isSpecCompliantForm:hw,toJSONObject:gw,isAsyncFn:mw,isThenable:e=>e&&(go(e)||xn(e))&&xn(e.then)&&xn(e.catch)};function gt(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}ne.inherits(gt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qc=gt.prototype,Vc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Vc[e]={value:e}}),Object.defineProperties(gt,Vc),Object.defineProperty(qc,"isAxiosError",{value:!0}),gt.from=(e,t,n,i,r,o)=>{const l=Object.create(qc);return ne.toFlatObject(e,l,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),gt.call(l,e.message,t,n,i,r),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const vw=null;function Va(e){return ne.isPlainObject(e)||ne.isArray(e)}function zc(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function Xc(e,t,n){return e?e.concat(t).map(function(r,o){return r=zc(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}function yw(e){return ne.isArray(e)&&!e.some(Va)}const bw=ne.toFlatObject(ne,{},null,function(t){return/^is[A-Z]/.test(t)});function vo(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,V){return!ne.isUndefined(V[I])});const i=n.metaTokens,r=n.visitor||g,o=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(r))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(ne.isDate(x))return x.toISOString();if(!d&&ne.isBlob(x))throw new gt("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(x)||ne.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function g(x,I,V){let N=x;if(x&&!V&&typeof x=="object"){if(ne.endsWith(I,"{}"))I=i?I:I.slice(0,-2),x=JSON.stringify(x);else if(ne.isArray(x)&&yw(x)||(ne.isFileList(x)||ne.endsWith(I,"[]"))&&(N=ne.toArray(x)))return I=zc(I),N.forEach(function(ye,D){!(ne.isUndefined(ye)||ye===null)&&t.append(l===!0?Xc([I],D,o):l===null?I:I+"[]",m(ye))}),!1}return Va(x)?!0:(t.append(Xc(V,I,o),m(x)),!1)}const w=[],T=Object.assign(bw,{defaultVisitor:g,convertValue:m,isVisitable:Va});function H(x,I){if(!ne.isUndefined(x)){if(w.indexOf(x)!==-1)throw Error("Circular reference detected in "+I.join("."));w.push(x),ne.forEach(x,function(N,te){(!(ne.isUndefined(N)||N===null)&&r.call(t,N,ne.isString(te)?te.trim():te,I,T))===!0&&H(N,I?I.concat(te):[te])}),w.pop()}}if(!ne.isObject(e))throw new TypeError("data must be an object");return H(e),t}function Yc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function za(e,t){this._pairs=[],e&&vo(e,this,t)}const Gc=za.prototype;Gc.append=function(t,n){this._pairs.push([t,n])},Gc.toString=function(t){const n=t?function(i){return t.call(this,i,Yc)}:Yc;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Cw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Jc(e,t,n){if(!t)return e;const i=n&&n.encode||Cw,r=n&&n.serialize;let o;if(r?o=r(t,n):o=ne.isURLSearchParams(t)?t.toString():new za(t,n).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ww{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ne.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Zc=ww,Qc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_w=typeof URLSearchParams<"u"?URLSearchParams:za,Tw=typeof FormData<"u"?FormData:null,Ew=typeof Blob<"u"?Blob:null,kw=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Sw=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Zn={isBrowser:!0,classes:{URLSearchParams:_w,FormData:Tw,Blob:Ew},isStandardBrowserEnv:kw,isStandardBrowserWebWorkerEnv:Sw,protocols:["http","https","file","blob","url","data"]};function xw(e,t){return vo(e,new Zn.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,o){return Zn.isNode&&ne.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Aw(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lw(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}function ef(e){function t(n,i,r,o){let l=n[o++];const c=Number.isFinite(+l),d=o>=n.length;return l=!l&&ne.isArray(r)?r.length:l,d?(ne.hasOwnProp(r,l)?r[l]=[r[l],i]:r[l]=i,!c):((!r[l]||!ne.isObject(r[l]))&&(r[l]=[]),t(n,i,r[l],o)&&ne.isArray(r[l])&&(r[l]=Lw(r[l])),!c)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(i,r)=>{t(Aw(i),r,n,0)}),n}return null}const Ow={"Content-Type":void 0};function Dw(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const yo={transitional:Qc,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,o=ne.isObject(t);if(o&&ne.isHTMLForm(t)&&(t=new FormData(t)),ne.isFormData(t))return r&&r?JSON.stringify(ef(t)):t;if(ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return xw(t,this.formSerializer).toString();if((c=ne.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return vo(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||r?(n.setContentType("application/json",!1),Dw(t)):t}],transformResponse:[function(t){const n=this.transitional||yo.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(t&&ne.isString(t)&&(i&&!this.responseType||r)){const l=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(l)throw c.name==="SyntaxError"?gt.from(c,gt.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zn.classes.FormData,Blob:Zn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ne.forEach(["delete","get","head"],function(t){yo.headers[t]={}}),ne.forEach(["post","put","patch"],function(t){yo.headers[t]=ne.merge(Ow)});const Xa=yo,Iw=ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pw=e=>{const t={};let n,i,r;return e&&e.split(`
|
||
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),i=l.substring(r+1).trim(),!(!n||t[n]&&Iw[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},tf=Symbol("internals");function ts(e){return e&&String(e).trim().toLowerCase()}function bo(e){return e===!1||e==null?e:ne.isArray(e)?e.map(bo):String(e)}function Nw(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const Rw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ya(e,t,n,i,r){if(ne.isFunction(i))return i.call(this,t,n);if(r&&(t=n),!!ne.isString(t)){if(ne.isString(i))return t.indexOf(i)!==-1;if(ne.isRegExp(i))return i.test(t)}}function Mw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Fw(e,t){const n=ne.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(r,o,l){return this[i].call(this,t,r,o,l)},configurable:!0})})}class Co{constructor(t){t&&this.set(t)}set(t,n,i){const r=this;function o(c,d,m){const g=ts(d);if(!g)throw new Error("header name must be a non-empty string");const w=ne.findKey(r,g);(!w||r[w]===void 0||m===!0||m===void 0&&r[w]!==!1)&&(r[w||d]=bo(c))}const l=(c,d)=>ne.forEach(c,(m,g)=>o(m,g,d));return ne.isPlainObject(t)||t instanceof this.constructor?l(t,n):ne.isString(t)&&(t=t.trim())&&!Rw(t)?l(Pw(t),n):t!=null&&o(n,t,i),this}get(t,n){if(t=ts(t),t){const i=ne.findKey(this,t);if(i){const r=this[i];if(!n)return r;if(n===!0)return Nw(r);if(ne.isFunction(n))return n.call(this,r,i);if(ne.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ts(t),t){const i=ne.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Ya(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let r=!1;function o(l){if(l=ts(l),l){const c=ne.findKey(i,l);c&&(!n||Ya(i,i[c],c,n))&&(delete i[c],r=!0)}}return ne.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const o=n[i];(!t||Ya(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,i={};return ne.forEach(this,(r,o)=>{const l=ne.findKey(i,o);if(l){n[l]=bo(r),delete n[o];return}const c=t?Mw(o):String(o).trim();c!==o&&delete n[o],n[c]=bo(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ne.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=t&&ne.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[tf]=this[tf]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=ts(l);i[c]||(Fw(r,l),i[c]=!0)}return ne.isArray(t)?t.forEach(o):o(t),this}}Co.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ne.freezeMethods(Co.prototype),ne.freezeMethods(Co);const ui=Co;function Ga(e,t){const n=this||Xa,i=t||n,r=ui.from(i.headers);let o=i.data;return ne.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function nf(e){return!!(e&&e.__CANCEL__)}function ns(e,t,n){gt.call(this,e??"canceled",gt.ERR_CANCELED,t,n),this.name="CanceledError"}ne.inherits(ns,gt,{__CANCEL__:!0});function Hw(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new gt("Request failed with status code "+n.status,[gt.ERR_BAD_REQUEST,gt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Bw=Zn.isStandardBrowserEnv?function(){return{write:function(n,i,r,o,l,c){const d=[];d.push(n+"="+encodeURIComponent(i)),ne.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),ne.isString(o)&&d.push("path="+o),ne.isString(l)&&d.push("domain="+l),c===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(n){const i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function jw(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $w(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function rf(e,t){return e&&!jw(t)?$w(e,t):t}const Uw=Zn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function r(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{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 i=r(window.location.href),function(l){const c=ne.isString(l)?r(l):l;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}();function Ww(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kw(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(d){const m=Date.now(),g=i[o];l||(l=m),n[r]=d,i[r]=m;let w=o,T=0;for(;w!==r;)T+=n[w++],w=w%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),m-l<t)return;const H=g&&m-g;return H?Math.round(T*1e3/H):void 0}}function sf(e,t){let n=0;const i=Kw(50,250);return r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,c=o-n,d=i(c),m=o<=l;n=o;const g={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&m?(l-o)/d:void 0,event:r};g[t?"download":"upload"]=!0,e(g)}}const wo={http:vw,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,i){let r=e.data;const o=ui.from(e.headers).normalize(),l=e.responseType;let c;function d(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}ne.isFormData(r)&&(Zn.isStandardBrowserEnv||Zn.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let m=new XMLHttpRequest;if(e.auth){const H=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(H+":"+x))}const g=rf(e.baseURL,e.url);m.open(e.method.toUpperCase(),Jc(g,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function w(){if(!m)return;const H=ui.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),I={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:H,config:e,request:m};Hw(function(N){n(N),d()},function(N){i(N),d()},I),m=null}if("onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(i(new gt("Request aborted",gt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){i(new gt("Network Error",gt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const I=e.transitional||Qc;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),i(new gt(x,I.clarifyTimeoutError?gt.ETIMEDOUT:gt.ECONNABORTED,e,m)),m=null},Zn.isStandardBrowserEnv){const H=(e.withCredentials||Uw(g))&&e.xsrfCookieName&&Bw.read(e.xsrfCookieName);H&&o.set(e.xsrfHeaderName,H)}r===void 0&&o.setContentType(null),"setRequestHeader"in m&&ne.forEach(o.toJSON(),function(x,I){m.setRequestHeader(I,x)}),ne.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),l&&l!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",sf(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",sf(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=H=>{m&&(i(!H||H.type?new ns(null,e,m):H),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const T=Ww(g);if(T&&Zn.protocols.indexOf(T)===-1){i(new gt("Unsupported protocol "+T+":",gt.ERR_BAD_REQUEST,e));return}m.send(r||null)})}};ne.forEach(wo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qw={getAdapter:e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let n,i;for(let r=0;r<t&&(n=e[r],!(i=ne.isString(n)?wo[n.toLowerCase()]:n));r++);if(!i)throw i===!1?new gt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ne.hasOwnProp(wo,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ne.isFunction(i))throw new TypeError("adapter is not a function");return i},adapters:wo};function Ja(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ns(null,e)}function of(e){return Ja(e),e.headers=ui.from(e.headers),e.data=Ga.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qw.getAdapter(e.adapter||Xa.adapter)(e).then(function(i){return Ja(e),i.data=Ga.call(e,e.transformResponse,i),i.headers=ui.from(i.headers),i},function(i){return nf(i)||(Ja(e),i&&i.response&&(i.response.data=Ga.call(e,e.transformResponse,i.response),i.response.headers=ui.from(i.response.headers))),Promise.reject(i)})}const af=e=>e instanceof ui?e.toJSON():e;function vr(e,t){t=t||{};const n={};function i(m,g,w){return ne.isPlainObject(m)&&ne.isPlainObject(g)?ne.merge.call({caseless:w},m,g):ne.isPlainObject(g)?ne.merge({},g):ne.isArray(g)?g.slice():g}function r(m,g,w){if(ne.isUndefined(g)){if(!ne.isUndefined(m))return i(void 0,m,w)}else return i(m,g,w)}function o(m,g){if(!ne.isUndefined(g))return i(void 0,g)}function l(m,g){if(ne.isUndefined(g)){if(!ne.isUndefined(m))return i(void 0,m)}else return i(void 0,g)}function c(m,g,w){if(w in t)return i(m,g);if(w in e)return i(void 0,m)}const d={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(m,g)=>r(af(m),af(g),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),function(g){const w=d[g]||r,T=w(e[g],t[g],g);ne.isUndefined(T)&&w!==c||(n[g]=T)}),n}const lf="1.4.0",Za={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Za[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const uf={};Za.transitional=function(t,n,i){function r(o,l){return"[Axios v"+lf+"] Transitional option '"+o+"'"+l+(i?". "+i:"")}return(o,l,c)=>{if(t===!1)throw new gt(r(l," has been removed"+(n?" in "+n:"")),gt.ERR_DEPRECATED);return n&&!uf[l]&&(uf[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};function Vw(e,t,n){if(typeof e!="object")throw new gt("options must be an object",gt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],l=t[o];if(l){const c=e[o],d=c===void 0||l(c,o,e);if(d!==!0)throw new gt("option "+o+" must be "+d,gt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new gt("Unknown option "+o,gt.ERR_BAD_OPTION)}}const Qa={assertOptions:Vw,validators:Za},Ei=Qa.validators;class _o{constructor(t){this.defaults=t,this.interceptors={request:new Zc,response:new Zc}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vr(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:o}=n;i!==void 0&&Qa.assertOptions(i,{silentJSONParsing:Ei.transitional(Ei.boolean),forcedJSONParsing:Ei.transitional(Ei.boolean),clarifyTimeoutError:Ei.transitional(Ei.boolean)},!1),r!=null&&(ne.isFunction(r)?n.paramsSerializer={serialize:r}:Qa.assertOptions(r,{encode:Ei.function,serialize:Ei.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l;l=o&&ne.merge(o.common,o[n.method]),l&&ne.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=ui.concat(l,o);const c=[];let d=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(n)===!1||(d=d&&I.synchronous,c.unshift(I.fulfilled,I.rejected))});const m=[];this.interceptors.response.forEach(function(I){m.push(I.fulfilled,I.rejected)});let g,w=0,T;if(!d){const x=[of.bind(this),void 0];for(x.unshift.apply(x,c),x.push.apply(x,m),T=x.length,g=Promise.resolve(n);w<T;)g=g.then(x[w++],x[w++]);return g}T=c.length;let H=n;for(w=0;w<T;){const x=c[w++],I=c[w++];try{H=x(H)}catch(V){I.call(this,V);break}}try{g=of.call(this,H)}catch(x){return Promise.reject(x)}for(w=0,T=m.length;w<T;)g=g.then(m[w++],m[w++]);return g}getUri(t){t=vr(this.defaults,t);const n=rf(t.baseURL,t.url);return Jc(n,t.params,t.paramsSerializer)}}ne.forEach(["delete","get","head","options"],function(t){_o.prototype[t]=function(n,i){return this.request(vr(i||{},{method:t,url:n,data:(i||{}).data}))}}),ne.forEach(["post","put","patch"],function(t){function n(i){return function(o,l,c){return this.request(vr(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}_o.prototype[t]=n(),_o.prototype[t+"Form"]=n(!0)});const To=_o;class el{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const i=this;this.promise.then(r=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{i.subscribe(c),o=c}).then(r);return l.cancel=function(){i.unsubscribe(o)},l},t(function(o,l,c){i.reason||(i.reason=new ns(o,l,c),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new el(function(r){t=r}),cancel:t}}}const zw=el;function Xw(e){return function(n){return e.apply(null,n)}}function Yw(e){return ne.isObject(e)&&e.isAxiosError===!0}const tl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tl).forEach(([e,t])=>{tl[t]=e});const Gw=tl;function cf(e){const t=new To(e),n=Rc(To.prototype.request,t);return ne.extend(n,To.prototype,t,{allOwnKeys:!0}),ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return cf(vr(e,r))},n}const Wt=cf(Xa);Wt.Axios=To,Wt.CanceledError=ns,Wt.CancelToken=zw,Wt.isCancel=nf,Wt.VERSION=lf,Wt.toFormData=vo,Wt.AxiosError=gt,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=Xw,Wt.isAxiosError=Yw,Wt.mergeConfig=vr,Wt.AxiosHeaders=ui,Wt.formToJSON=e=>ef(ne.isHTMLForm(e)?new FormData(e):e),Wt.HttpStatusCode=Gw,Wt.default=Wt;const Jw=Wt;class Zw{constructor(){Sd(this,"apiBaseURL","");this.apiBaseURL=he.apiUrl(),this.api=Jw.create({baseURL:this.apiBaseURL,timeout:6e4,headers:{"Content-Type":"application/json"}})}async getVersion(){return(await this.api.get("/get_version")).data}async getRemoteVersions(t=1,n=100){return(await this.api.get("/get_remote_versions",{params:{page:t,per_page:n}})).data.versions}async getConfig(){return(await this.api.get("/get_config")).data}async installPackage(t,n){const i={timeout:1e7};return(await this.api.post("/install_package",{name:t,package:n},i)).data.result}async getExtensions(){return(await this.api.get("/get_extensions")).data.extensions}async tokenCounter(t,n){return(await this.api.post("/token_counter",{text:t,steps:n})).data}async getData(t){return(await this.api.get("/get_data",{params:{key:t}})).data.data}async getDatas(t){return typeof t=="object"&&(t=t.join(",")),(await this.api.get("/get_datas",{params:{keys:t}})).data.datas}async setData(t,n){return(await this.api.post("/set_data",{key:t,data:n})).data.success}async setDatas(t){return(await this.api.post("/set_datas",{datas:t})).data.success}async getDataListItem(t,n){return(await this.api.get("/get_data_list_item",{params:{key:t,index:n}})).data.item}async pushDataList(t,n){return(await this.api.post("/push_data_list",{key:t,item:n})).data.success}async popDataList(t){return(await this.api.post("/pop_data_list",{key:t})).data.item}async shiftDataList(t){return(await this.api.post("/shift_data_list",{key:t})).data.item}async removeDataList(t,n){return(await this.api.post("/remove_data_list",{key:t,index:n})).data.success}async clearDataList(t){return(await this.api.post("/clear_data_list",{key:t})).data.success}async getHistories(t){return(await this.api.get("/get_histories",{params:{type:t}})).data.histories}async getFavorites(t){return(await this.api.get("/get_favorites",{params:{type:t}})).data.favorites}async pushHistory(t,n,i,r=""){return(await this.api.post("/push_history",{type:t,tags:n,prompt:i,name:r})).data.success}async pushFavorite(t,n,i,r=""){return(await this.api.post("/push_favorite",{type:t,tags:n,prompt:i,name:r})).data.success}async getLatestHistory(t){return(await this.api.get("/get_latest_history",{params:{type:t}})).data.history}async setHistory(t,n,i,r,o){return(await this.api.post("/set_history",{type:t,id:n,tags:i,prompt:r,name:o})).data.success}async setHistoryName(t,n,i){return(await this.api.post("/set_history_name",{type:t,id:n,name:i})).data.success}async setFavoriteName(t,n,i){return(await this.api.post("/set_favorite_name",{type:t,id:n,name:i})).data.success}async doFavorite(t,n){return(await this.api.post("/dofavorite",{type:t,id:n})).data.success}async unFavorite(t,n){return(await this.api.post("/unfavorite",{type:t,id:n})).data.success}async deleteHistory(t,n){return(await this.api.post("/delete_history",{type:t,id:n})).data.success}async deleteHistories(t){return(await this.api.post("/delete_histories",{type:t})).data.success}async translate(t,n,i,r,o={}){let l=(await this.api.post("/translate",{text:t,from_lang:n,to_lang:i,api:r,api_config:o})).data;return l.translated_text&&(l.translated_text=he.unescapeHtml(l.translated_text)),l}async translates(t,n,i,r,o={}){let l=(await this.api.post("/translates",{texts:t,from_lang:n,to_lang:i,api:r,api_config:o})).data;return l.translated_text&&l.translated_text.forEach((c,d)=>{l.translated_text[d]=he.unescapeHtml(c)}),l}async getCSVs(){return(await this.api.get("/get_csvs")).data.csvs}async getCSV(t){return(await this.api.get("/get_csv",{params:{key:t}})).data}async styles(t,n=""){return(await this.api.get("/styles",{params:{file:t,hash:n}})).data}async getExtensionCssList(){return(await this.api.get("/get_extension_css_list")).data.css_list}async getExtraNetworks(){return(await this.api.get("/get_extra_networks")).data.extra_networks}async genOpenAI(t,n){return(await this.api.post("/gen_openai",{messages:t,api_config:n})).data}async mbart50Initialize(){const t={timeout:1e11};return(await this.api.post("/mbart50_initialize",{},t)).data}}const Qw={data(){return{gradioAPI:null}},beforeMount(){this.gradioAPI=new Zw},methods:{loadExtraNetworks(){this.gradioAPI.getExtraNetworks().then(e=>{e&&(this.extraNetworks=e,e.forEach(t=>{if(t.name==="textual inversion"){let n=[];t.items.forEach(i=>{n.push(i.name)}),this.embeddings=n}else if(t.name==="lora"||t.name==="lycoris"){let n=[];t.items.forEach(i=>{n.push(i.name),i.output_name&&n.push(i.output_name)}),n=[...new Set(n)],t.name==="lora"?this.loras=n:this.lycos=n}}))})},getExtraNetworkFullName(e,t="lora"){if(typeof this.extraNetworks!="object")return e;for(let n of this.extraNetworks)if(n.name===t){for(let i of n.items)if(i.name===e||i.output_name===e)return!i.civitai_info||!i.civitai_info.name?e:i.civitai_info.model&&i.civitai_info.model.name&&i.civitai_info.model.name!==i.civitai_info.name?"["+i.civitai_info.name+"] "+i.civitai_info.model.name:i.civitai_info.name}return e},loraExists(e){if(typeof this.loras!="object")return e;for(let t in this.loras)if(this.loras[t]===e)return this.loras[t];return!1},lycoExists(e){if(typeof this.lycos!="object")return e;for(let t in this.lycos)if(this.lycos[t]===e)return this.lycos[t];return!1},embeddingExists(e){if(typeof this.embeddings!="object")return e;for(let t in this.embeddings)if(this.embeddings[t]===e)return this.embeddings[t];return!1}}};var cn="top",An="bottom",Ln="right",fn="left",nl="auto",is=[cn,An,Ln,fn],yr="start",rs="end",e_="clippingParents",ff="viewport",ss="popper",t_="reference",df=is.reduce(function(e,t){return e.concat([t+"-"+yr,t+"-"+rs])},[]),pf=[].concat(is,[nl]).reduce(function(e,t){return e.concat([t,t+"-"+yr,t+"-"+rs])},[]),n_="beforeRead",i_="read",r_="afterRead",s_="beforeMain",o_="main",a_="afterMain",l_="beforeWrite",u_="write",c_="afterWrite",f_=[n_,i_,r_,s_,o_,a_,l_,u_,c_];function Qn(e){return e?(e.nodeName||"").toLowerCase():null}function bn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wi(e){var t=bn(e).Element;return e instanceof t||e instanceof Element}function On(e){var t=bn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function il(e){if(typeof ShadowRoot>"u")return!1;var t=bn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function d_(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!On(o)||!Qn(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(l){var c=r[l];c===!1?o.removeAttribute(l):o.setAttribute(l,c===!0?"":c)}))})}function p_(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},l=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),c=l.reduce(function(d,m){return d[m]="",d},{});!On(r)||!Qn(r)||(Object.assign(r.style,c),Object.keys(o).forEach(function(d){r.removeAttribute(d)}))})}}const hf={name:"applyStyles",enabled:!0,phase:"write",fn:d_,effect:p_,requires:["computeStyles"]};function ei(e){return e.split("-")[0]}var Ki=Math.max,Eo=Math.min,br=Math.round;function rl(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gf(){return!/^((?!chrome|android).)*safari/i.test(rl())}function Cr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&On(e)&&(r=e.offsetWidth>0&&br(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&br(i.height)/e.offsetHeight||1);var l=Wi(e)?bn(e):window,c=l.visualViewport,d=!gf()&&n,m=(i.left+(d&&c?c.offsetLeft:0))/r,g=(i.top+(d&&c?c.offsetTop:0))/o,w=i.width/r,T=i.height/o;return{width:w,height:T,top:g,right:m+w,bottom:g+T,left:m,x:m,y:g}}function sl(e){var t=Cr(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function mf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&il(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ci(e){return bn(e).getComputedStyle(e)}function h_(e){return["table","td","th"].indexOf(Qn(e))>=0}function ki(e){return((Wi(e)?e.ownerDocument:e.document)||window.document).documentElement}function ko(e){return Qn(e)==="html"?e:e.assignedSlot||e.parentNode||(il(e)?e.host:null)||ki(e)}function vf(e){return!On(e)||ci(e).position==="fixed"?null:e.offsetParent}function g_(e){var t=/firefox/i.test(rl()),n=/Trident/i.test(rl());if(n&&On(e)){var i=ci(e);if(i.position==="fixed")return null}var r=ko(e);for(il(r)&&(r=r.host);On(r)&&["html","body"].indexOf(Qn(r))<0;){var o=ci(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function os(e){for(var t=bn(e),n=vf(e);n&&h_(n)&&ci(n).position==="static";)n=vf(n);return n&&(Qn(n)==="html"||Qn(n)==="body"&&ci(n).position==="static")?t:n||g_(e)||t}function ol(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function as(e,t,n){return Ki(e,Eo(t,n))}function m_(e,t,n){var i=as(e,t,n);return i>n?n:i}function yf(){return{top:0,right:0,bottom:0,left:0}}function bf(e){return Object.assign({},yf(),e)}function Cf(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var v_=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,bf(typeof t!="number"?t:Cf(t,is))};function y_(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,c=ei(n.placement),d=ol(c),m=[fn,Ln].indexOf(c)>=0,g=m?"height":"width";if(!(!o||!l)){var w=v_(r.padding,n),T=sl(o),H=d==="y"?cn:fn,x=d==="y"?An:Ln,I=n.rects.reference[g]+n.rects.reference[d]-l[d]-n.rects.popper[g],V=l[d]-n.rects.reference[d],N=os(o),te=N?d==="y"?N.clientHeight||0:N.clientWidth||0:0,ye=I/2-V/2,D=w[H],Fe=te-T[g]-w[x],p=te/2-T[g]/2+ye,Ae=as(D,p,Fe),R=d;n.modifiersData[i]=(t={},t[R]=Ae,t.centerOffset=Ae-p,t)}}function b_(e){var t=e.state,n=e.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||mf(t.elements.popper,r)&&(t.elements.arrow=r))}const C_={name:"arrow",enabled:!0,phase:"main",fn:y_,effect:b_,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wr(e){return e.split("-")[1]}var w_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function __(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:br(n*r)/r||0,y:br(i*r)/r||0}}function wf(e){var t,n=e.popper,i=e.popperRect,r=e.placement,o=e.variation,l=e.offsets,c=e.position,d=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,w=e.isFixed,T=l.x,H=T===void 0?0:T,x=l.y,I=x===void 0?0:x,V=typeof g=="function"?g({x:H,y:I}):{x:H,y:I};H=V.x,I=V.y;var N=l.hasOwnProperty("x"),te=l.hasOwnProperty("y"),ye=fn,D=cn,Fe=window;if(m){var p=os(n),Ae="clientHeight",R="clientWidth";if(p===bn(n)&&(p=ki(n),ci(p).position!=="static"&&c==="absolute"&&(Ae="scrollHeight",R="scrollWidth")),p=p,r===cn||(r===fn||r===Ln)&&o===rs){D=An;var E=w&&p===Fe&&Fe.visualViewport?Fe.visualViewport.height:p[Ae];I-=E-i.height,I*=d?1:-1}if(r===fn||(r===cn||r===An)&&o===rs){ye=Ln;var P=w&&p===Fe&&Fe.visualViewport?Fe.visualViewport.width:p[R];H-=P-i.width,H*=d?1:-1}}var Z=Object.assign({position:c},m&&w_),re=g===!0?__({x:H,y:I},bn(n)):{x:H,y:I};if(H=re.x,I=re.y,d){var se;return Object.assign({},Z,(se={},se[D]=te?"0":"",se[ye]=N?"0":"",se.transform=(Fe.devicePixelRatio||1)<=1?"translate("+H+"px, "+I+"px)":"translate3d("+H+"px, "+I+"px, 0)",se))}return Object.assign({},Z,(t={},t[D]=te?I+"px":"",t[ye]=N?H+"px":"",t.transform="",t))}function T_(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=i===void 0?!0:i,o=n.adaptive,l=o===void 0?!0:o,c=n.roundOffsets,d=c===void 0?!0:c,m={placement:ei(t.placement),variation:wr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,wf(Object.assign({},m,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wf(Object.assign({},m,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const E_={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:T_,data:{}};var So={passive:!0};function k_(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,o=r===void 0?!0:r,l=i.resize,c=l===void 0?!0:l,d=bn(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&m.forEach(function(g){g.addEventListener("scroll",n.update,So)}),c&&d.addEventListener("resize",n.update,So),function(){o&&m.forEach(function(g){g.removeEventListener("scroll",n.update,So)}),c&&d.removeEventListener("resize",n.update,So)}}const S_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:k_,data:{}};var x_={left:"right",right:"left",bottom:"top",top:"bottom"};function xo(e){return e.replace(/left|right|bottom|top/g,function(t){return x_[t]})}var A_={start:"end",end:"start"};function _f(e){return e.replace(/start|end/g,function(t){return A_[t]})}function al(e){var t=bn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function ll(e){return Cr(ki(e)).left+al(e).scrollLeft}function L_(e,t){var n=bn(e),i=ki(e),r=n.visualViewport,o=i.clientWidth,l=i.clientHeight,c=0,d=0;if(r){o=r.width,l=r.height;var m=gf();(m||!m&&t==="fixed")&&(c=r.offsetLeft,d=r.offsetTop)}return{width:o,height:l,x:c+ll(e),y:d}}function O_(e){var t,n=ki(e),i=al(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=Ki(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=Ki(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+ll(e),d=-i.scrollTop;return ci(r||n).direction==="rtl"&&(c+=Ki(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:l,x:c,y:d}}function ul(e){var t=ci(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function Tf(e){return["html","body","#document"].indexOf(Qn(e))>=0?e.ownerDocument.body:On(e)&&ul(e)?e:Tf(ko(e))}function ls(e,t){var n;t===void 0&&(t=[]);var i=Tf(e),r=i===((n=e.ownerDocument)==null?void 0:n.body),o=bn(i),l=r?[o].concat(o.visualViewport||[],ul(i)?i:[]):i,c=t.concat(l);return r?c:c.concat(ls(ko(l)))}function cl(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function D_(e,t){var n=Cr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Ef(e,t,n){return t===ff?cl(L_(e,n)):Wi(t)?D_(t,n):cl(O_(ki(e)))}function I_(e){var t=ls(ko(e)),n=["absolute","fixed"].indexOf(ci(e).position)>=0,i=n&&On(e)?os(e):e;return Wi(i)?t.filter(function(r){return Wi(r)&&mf(r,i)&&Qn(r)!=="body"}):[]}function P_(e,t,n,i){var r=t==="clippingParents"?I_(e):[].concat(t),o=[].concat(r,[n]),l=o[0],c=o.reduce(function(d,m){var g=Ef(e,m,i);return d.top=Ki(g.top,d.top),d.right=Eo(g.right,d.right),d.bottom=Eo(g.bottom,d.bottom),d.left=Ki(g.left,d.left),d},Ef(e,l,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function kf(e){var t=e.reference,n=e.element,i=e.placement,r=i?ei(i):null,o=i?wr(i):null,l=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,d;switch(r){case cn:d={x:l,y:t.y-n.height};break;case An:d={x:l,y:t.y+t.height};break;case Ln:d={x:t.x+t.width,y:c};break;case fn:d={x:t.x-n.width,y:c};break;default:d={x:t.x,y:t.y}}var m=r?ol(r):null;if(m!=null){var g=m==="y"?"height":"width";switch(o){case yr:d[m]=d[m]-(t[g]/2-n[g]/2);break;case rs:d[m]=d[m]+(t[g]/2-n[g]/2);break}}return d}function us(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=i===void 0?e.placement:i,o=n.strategy,l=o===void 0?e.strategy:o,c=n.boundary,d=c===void 0?e_:c,m=n.rootBoundary,g=m===void 0?ff:m,w=n.elementContext,T=w===void 0?ss:w,H=n.altBoundary,x=H===void 0?!1:H,I=n.padding,V=I===void 0?0:I,N=bf(typeof V!="number"?V:Cf(V,is)),te=T===ss?t_:ss,ye=e.rects.popper,D=e.elements[x?te:T],Fe=P_(Wi(D)?D:D.contextElement||ki(e.elements.popper),d,g,l),p=Cr(e.elements.reference),Ae=kf({reference:p,element:ye,strategy:"absolute",placement:r}),R=cl(Object.assign({},ye,Ae)),E=T===ss?R:p,P={top:Fe.top-E.top+N.top,bottom:E.bottom-Fe.bottom+N.bottom,left:Fe.left-E.left+N.left,right:E.right-Fe.right+N.right},Z=e.modifiersData.offset;if(T===ss&&Z){var re=Z[r];Object.keys(P).forEach(function(se){var Me=[Ln,An].indexOf(se)>=0?1:-1,Ze=[cn,An].indexOf(se)>=0?"y":"x";P[se]+=re[Ze]*Me})}return P}function N_(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=n.boundary,o=n.rootBoundary,l=n.padding,c=n.flipVariations,d=n.allowedAutoPlacements,m=d===void 0?pf:d,g=wr(i),w=g?c?df:df.filter(function(x){return wr(x)===g}):is,T=w.filter(function(x){return m.indexOf(x)>=0});T.length===0&&(T=w);var H=T.reduce(function(x,I){return x[I]=us(e,{placement:I,boundary:r,rootBoundary:o,padding:l})[ei(I)],x},{});return Object.keys(H).sort(function(x,I){return H[x]-H[I]})}function R_(e){if(ei(e)===nl)return[];var t=xo(e);return[_f(e),t,_f(t)]}function M_(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,l=n.altAxis,c=l===void 0?!0:l,d=n.fallbackPlacements,m=n.padding,g=n.boundary,w=n.rootBoundary,T=n.altBoundary,H=n.flipVariations,x=H===void 0?!0:H,I=n.allowedAutoPlacements,V=t.options.placement,N=ei(V),te=N===V,ye=d||(te||!x?[xo(V)]:R_(V)),D=[V].concat(ye).reduce(function(me,we){return me.concat(ei(we)===nl?N_(t,{placement:we,boundary:g,rootBoundary:w,padding:m,flipVariations:x,allowedAutoPlacements:I}):we)},[]),Fe=t.rects.reference,p=t.rects.popper,Ae=new Map,R=!0,E=D[0],P=0;P<D.length;P++){var Z=D[P],re=ei(Z),se=wr(Z)===yr,Me=[cn,An].indexOf(re)>=0,Ze=Me?"width":"height",Ne=us(t,{placement:Z,boundary:g,rootBoundary:w,altBoundary:T,padding:m}),oe=Me?se?Ln:fn:se?An:cn;Fe[Ze]>p[Ze]&&(oe=xo(oe));var ge=xo(oe),Ee=[];if(o&&Ee.push(Ne[re]<=0),c&&Ee.push(Ne[oe]<=0,Ne[ge]<=0),Ee.every(function(me){return me})){E=Z,R=!1;break}Ae.set(Z,Ee)}if(R)for(var ft=x?3:1,Ve=function(we){var Te=D.find(function(Re){var ze=Ae.get(Re);if(ze)return ze.slice(0,we).every(function(ke){return ke})});if(Te)return E=Te,"break"},G=ft;G>0;G--){var fe=Ve(G);if(fe==="break")break}t.placement!==E&&(t.modifiersData[i]._skip=!0,t.placement=E,t.reset=!0)}}const F_={name:"flip",enabled:!0,phase:"main",fn:M_,requiresIfExists:["offset"],data:{_skip:!1}};function Sf(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xf(e){return[cn,Ln,An,fn].some(function(t){return e[t]>=0})}function H_(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,l=us(t,{elementContext:"reference"}),c=us(t,{altBoundary:!0}),d=Sf(l,i),m=Sf(c,r,o),g=xf(d),w=xf(m);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:m,isReferenceHidden:g,hasPopperEscaped:w},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":w})}const B_={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:H_};function j_(e,t,n){var i=ei(e),r=[fn,cn].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=o[0],c=o[1];return l=l||0,c=(c||0)*r,[fn,Ln].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}function $_(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=r===void 0?[0,0]:r,l=pf.reduce(function(g,w){return g[w]=j_(w,t.rects,o),g},{}),c=l[t.placement],d=c.x,m=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=m),t.modifiersData[i]=l}const U_={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$_};function W_(e){var t=e.state,n=e.name;t.modifiersData[n]=kf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const K_={name:"popperOffsets",enabled:!0,phase:"read",fn:W_,data:{}};function q_(e){return e==="x"?"y":"x"}function V_(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,o=r===void 0?!0:r,l=n.altAxis,c=l===void 0?!1:l,d=n.boundary,m=n.rootBoundary,g=n.altBoundary,w=n.padding,T=n.tether,H=T===void 0?!0:T,x=n.tetherOffset,I=x===void 0?0:x,V=us(t,{boundary:d,rootBoundary:m,padding:w,altBoundary:g}),N=ei(t.placement),te=wr(t.placement),ye=!te,D=ol(N),Fe=q_(D),p=t.modifiersData.popperOffsets,Ae=t.rects.reference,R=t.rects.popper,E=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,P=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),Z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,re={x:0,y:0};if(p){if(o){var se,Me=D==="y"?cn:fn,Ze=D==="y"?An:Ln,Ne=D==="y"?"height":"width",oe=p[D],ge=oe+V[Me],Ee=oe-V[Ze],ft=H?-R[Ne]/2:0,Ve=te===yr?Ae[Ne]:R[Ne],G=te===yr?-R[Ne]:-Ae[Ne],fe=t.elements.arrow,me=H&&fe?sl(fe):{width:0,height:0},we=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yf(),Te=we[Me],Re=we[Ze],ze=as(0,Ae[Ne],me[Ne]),ke=ye?Ae[Ne]/2-ft-ze-Te-P.mainAxis:Ve-ze-Te-P.mainAxis,Qe=ye?-Ae[Ne]/2+ft+ze+Re+P.mainAxis:G+ze+Re+P.mainAxis,at=t.elements.arrow&&os(t.elements.arrow),k=at?D==="y"?at.clientTop||0:at.clientLeft||0:0,L=(se=Z==null?void 0:Z[D])!=null?se:0,W=oe+ke-L-k,Y=oe+Qe-L,B=as(H?Eo(ge,W):ge,oe,H?Ki(Ee,Y):Ee);p[D]=B,re[D]=B-oe}if(c){var q,de=D==="x"?cn:fn,ae=D==="x"?An:Ln,ce=p[Fe],ee=Fe==="y"?"height":"width",be=ce+V[de],pe=ce-V[ae],Oe=[cn,fn].indexOf(N)!==-1,Ce=(q=Z==null?void 0:Z[Fe])!=null?q:0,je=Oe?be:ce-Ae[ee]-R[ee]-Ce+P.altAxis,rt=Oe?ce+Ae[ee]+R[ee]-Ce-P.altAxis:pe,tt=H&&Oe?m_(je,ce,rt):as(H?je:be,ce,H?rt:pe);p[Fe]=tt,re[Fe]=tt-ce}t.modifiersData[i]=re}}const z_={name:"preventOverflow",enabled:!0,phase:"main",fn:V_,requiresIfExists:["offset"]};function X_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Y_(e){return e===bn(e)||!On(e)?al(e):X_(e)}function G_(e){var t=e.getBoundingClientRect(),n=br(t.width)/e.offsetWidth||1,i=br(t.height)/e.offsetHeight||1;return n!==1||i!==1}function J_(e,t,n){n===void 0&&(n=!1);var i=On(t),r=On(t)&&G_(t),o=ki(t),l=Cr(e,r,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!n)&&((Qn(t)!=="body"||ul(o))&&(c=Y_(t)),On(t)?(d=Cr(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):o&&(d.x=ll(o))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function Z_(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function r(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(c){if(!n.has(c)){var d=t.get(c);d&&r(d)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),i}function Q_(e){var t=Z_(e);return f_.reduce(function(n,i){return n.concat(t.filter(function(r){return r.phase===i}))},[])}function eT(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function tT(e){var t=e.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var Af={placement:"bottom",modifiers:[],strategy:"absolute"};function Lf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function nT(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,r=t.defaultOptions,o=r===void 0?Af:r;return function(c,d,m){m===void 0&&(m=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},Af,o),modifiersData:{},elements:{reference:c,popper:d},attributes:{},styles:{}},w=[],T=!1,H={state:g,setOptions:function(N){var te=typeof N=="function"?N(g.options):N;I(),g.options=Object.assign({},o,g.options,te),g.scrollParents={reference:Wi(c)?ls(c):c.contextElement?ls(c.contextElement):[],popper:ls(d)};var ye=Q_(tT([].concat(i,g.options.modifiers)));return g.orderedModifiers=ye.filter(function(D){return D.enabled}),x(),H.update()},forceUpdate:function(){if(!T){var N=g.elements,te=N.reference,ye=N.popper;if(Lf(te,ye)){g.rects={reference:J_(te,os(ye),g.options.strategy==="fixed"),popper:sl(ye)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(P){return g.modifiersData[P.name]=Object.assign({},P.data)});for(var D=0;D<g.orderedModifiers.length;D++){if(g.reset===!0){g.reset=!1,D=-1;continue}var Fe=g.orderedModifiers[D],p=Fe.fn,Ae=Fe.options,R=Ae===void 0?{}:Ae,E=Fe.name;typeof p=="function"&&(g=p({state:g,options:R,name:E,instance:H})||g)}}}},update:eT(function(){return new Promise(function(V){H.forceUpdate(),V(g)})}),destroy:function(){I(),T=!0}};if(!Lf(c,d))return H;H.setOptions(m).then(function(V){!T&&m.onFirstUpdate&&m.onFirstUpdate(V)});function x(){g.orderedModifiers.forEach(function(V){var N=V.name,te=V.options,ye=te===void 0?{}:te,D=V.effect;if(typeof D=="function"){var Fe=D({state:g,name:N,instance:H,options:ye}),p=function(){};w.push(Fe||p)}})}function I(){w.forEach(function(V){return V()}),w=[]}return H}}var iT=[S_,K_,E_,hf,U_,F_,z_,C_,B_],rT=nT({defaultModifiers:iT}),sT="tippy-box",Of="tippy-content",oT="tippy-backdrop",Df="tippy-arrow",If="tippy-svg-arrow",qi={passive:!0,capture:!0},Pf=function(){return document.body};function fl(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function dl(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Nf(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Rf(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function aT(e){return e.split(/\s+/).filter(Boolean)}function _r(e){return[].concat(e)}function Mf(e,t){e.indexOf(t)===-1&&e.push(t)}function lT(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function uT(e){return e.split("-")[0]}function Ao(e){return[].slice.call(e)}function Ff(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function cs(){return document.createElement("div")}function Lo(e){return["Element","Fragment"].some(function(t){return dl(e,t)})}function cT(e){return dl(e,"NodeList")}function fT(e){return dl(e,"MouseEvent")}function dT(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function pT(e){return Lo(e)?[e]:cT(e)?Ao(e):Array.isArray(e)?e:Ao(document.querySelectorAll(e))}function pl(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Hf(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function hT(e){var t,n=_r(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function gT(e,t){var n=t.clientX,i=t.clientY;return e.every(function(r){var o=r.popperRect,l=r.popperState,c=r.props,d=c.interactiveBorder,m=uT(l.placement),g=l.modifiersData.offset;if(!g)return!0;var w=m==="bottom"?g.top.y:0,T=m==="top"?g.bottom.y:0,H=m==="right"?g.left.x:0,x=m==="left"?g.right.x:0,I=o.top-i+w>d,V=i-o.bottom-T>d,N=o.left-n+H>d,te=n-o.right-x>d;return I||V||N||te})}function hl(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[i](r,n)})}function Bf(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var ti={isTouch:!1},jf=0;function mT(){ti.isTouch||(ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",$f))}function $f(){var e=performance.now();e-jf<20&&(ti.isTouch=!1,document.removeEventListener("mousemove",$f)),jf=e}function vT(){var e=document.activeElement;if(dT(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function yT(){document.addEventListener("touchstart",mT,qi),window.addEventListener("blur",vT)}var bT=typeof window<"u"&&typeof document<"u",CT=bT?!!window.msCrypto:!1,wT={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},_T={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},jn=Object.assign({appendTo:Pf,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},wT,_T),TT=Object.keys(jn),ET=function(t){var n=Object.keys(t);n.forEach(function(i){jn[i]=t[i]})};function Uf(e){var t=e.plugins||[],n=t.reduce(function(i,r){var o=r.name,l=r.defaultValue;if(o){var c;i[o]=e[o]!==void 0?e[o]:(c=jn[o])!=null?c:l}return i},{});return Object.assign({},e,n)}function kT(e,t){var n=t?Object.keys(Uf(Object.assign({},jn,{plugins:t}))):TT,i=n.reduce(function(r,o){var l=(e.getAttribute("data-tippy-"+o)||"").trim();if(!l)return r;if(o==="content")r[o]=l;else try{r[o]=JSON.parse(l)}catch{r[o]=l}return r},{});return i}function Wf(e,t){var n=Object.assign({},t,{content:Nf(t.content,[e])},t.ignoreAttributes?{}:kT(e,t.plugins));return n.aria=Object.assign({},jn.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var ST=function(){return"innerHTML"};function gl(e,t){e[ST()]=t}function Kf(e){var t=cs();return e===!0?t.className=Df:(t.className=If,Lo(e)?t.appendChild(e):gl(t,e)),t}function qf(e,t){Lo(t.content)?(gl(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?gl(e,t.content):e.textContent=t.content)}function ml(e){var t=e.firstElementChild,n=Ao(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(Of)}),arrow:n.find(function(i){return i.classList.contains(Df)||i.classList.contains(If)}),backdrop:n.find(function(i){return i.classList.contains(oT)})}}function Vf(e){var t=cs(),n=cs();n.className=sT,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=cs();i.className=Of,i.setAttribute("data-state","hidden"),qf(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props);function r(o,l){var c=ml(t),d=c.box,m=c.content,g=c.arrow;l.theme?d.setAttribute("data-theme",l.theme):d.removeAttribute("data-theme"),typeof l.animation=="string"?d.setAttribute("data-animation",l.animation):d.removeAttribute("data-animation"),l.inertia?d.setAttribute("data-inertia",""):d.removeAttribute("data-inertia"),d.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?d.setAttribute("role",l.role):d.removeAttribute("role"),(o.content!==l.content||o.allowHTML!==l.allowHTML)&&qf(m,e.props),l.arrow?g?o.arrow!==l.arrow&&(d.removeChild(g),d.appendChild(Kf(l.arrow))):d.appendChild(Kf(l.arrow)):g&&d.removeChild(g)}return{popper:t,onUpdate:r}}Vf.$$tippy=!0;var xT=1,Oo=[],vl=[];function AT(e,t){var n=Wf(e,Object.assign({},jn,Uf(Ff(t)))),i,r,o,l=!1,c=!1,d=!1,m=!1,g,w,T,H=[],x=Rf(W,n.interactiveDebounce),I,V=xT++,N=null,te=lT(n.plugins),ye={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},D={id:V,reference:e,popper:cs(),popperInstance:N,props:n,state:ye,plugins:te,clearDelayTimeouts:je,setProps:rt,setContent:tt,show:dt,hide:At,hideWithInteractivity:Kt,enable:Oe,disable:Ce,unmount:Dt,destroy:zt};if(!n.render)return D;var Fe=n.render(D),p=Fe.popper,Ae=Fe.onUpdate;p.setAttribute("data-tippy-root",""),p.id="tippy-"+D.id,D.popper=p,e._tippy=D,p._tippy=D;var R=te.map(function(X){return X.fn(D)}),E=e.hasAttribute("aria-expanded");return at(),ft(),oe(),ge("onCreate",[D]),n.showOnCreate&&be(),p.addEventListener("mouseenter",function(){D.props.interactive&&D.state.isVisible&&D.clearDelayTimeouts()}),p.addEventListener("mouseleave",function(){D.props.interactive&&D.props.trigger.indexOf("mouseenter")>=0&&Me().addEventListener("mousemove",x)}),D;function P(){var X=D.props.touch;return Array.isArray(X)?X:[X,0]}function Z(){return P()[0]==="hold"}function re(){var X;return!!((X=D.props.render)!=null&&X.$$tippy)}function se(){return I||e}function Me(){var X=se().parentNode;return X?hT(X):document}function Ze(){return ml(p)}function Ne(X){return D.state.isMounted&&!D.state.isVisible||ti.isTouch||g&&g.type==="focus"?0:fl(D.props.delay,X?0:1,jn.delay)}function oe(X){X===void 0&&(X=!1),p.style.pointerEvents=D.props.interactive&&!X?"":"none",p.style.zIndex=""+D.props.zIndex}function ge(X,Le,Ie){if(Ie===void 0&&(Ie=!0),R.forEach(function(ut){ut[X]&&ut[X].apply(ut,Le)}),Ie){var et;(et=D.props)[X].apply(et,Le)}}function Ee(){var X=D.props.aria;if(X.content){var Le="aria-"+X.content,Ie=p.id,et=_r(D.props.triggerTarget||e);et.forEach(function(ut){var Yt=ut.getAttribute(Le);if(D.state.isVisible)ut.setAttribute(Le,Yt?Yt+" "+Ie:Ie);else{var sn=Yt&&Yt.replace(Ie,"").trim();sn?ut.setAttribute(Le,sn):ut.removeAttribute(Le)}})}}function ft(){if(!(E||!D.props.aria.expanded)){var X=_r(D.props.triggerTarget||e);X.forEach(function(Le){D.props.interactive?Le.setAttribute("aria-expanded",D.state.isVisible&&Le===se()?"true":"false"):Le.removeAttribute("aria-expanded")})}}function Ve(){Me().removeEventListener("mousemove",x),Oo=Oo.filter(function(X){return X!==x})}function G(X){if(!(ti.isTouch&&(d||X.type==="mousedown"))){var Le=X.composedPath&&X.composedPath()[0]||X.target;if(!(D.props.interactive&&Bf(p,Le))){if(_r(D.props.triggerTarget||e).some(function(Ie){return Bf(Ie,Le)})){if(ti.isTouch||D.state.isVisible&&D.props.trigger.indexOf("click")>=0)return}else ge("onClickOutside",[D,X]);D.props.hideOnClick===!0&&(D.clearDelayTimeouts(),D.hide(),c=!0,setTimeout(function(){c=!1}),D.state.isMounted||Te())}}}function fe(){d=!0}function me(){d=!1}function we(){var X=Me();X.addEventListener("mousedown",G,!0),X.addEventListener("touchend",G,qi),X.addEventListener("touchstart",me,qi),X.addEventListener("touchmove",fe,qi)}function Te(){var X=Me();X.removeEventListener("mousedown",G,!0),X.removeEventListener("touchend",G,qi),X.removeEventListener("touchstart",me,qi),X.removeEventListener("touchmove",fe,qi)}function Re(X,Le){ke(X,function(){!D.state.isVisible&&p.parentNode&&p.parentNode.contains(p)&&Le()})}function ze(X,Le){ke(X,Le)}function ke(X,Le){var Ie=Ze().box;function et(ut){ut.target===Ie&&(hl(Ie,"remove",et),Le())}if(X===0)return Le();hl(Ie,"remove",w),hl(Ie,"add",et),w=et}function Qe(X,Le,Ie){Ie===void 0&&(Ie=!1);var et=_r(D.props.triggerTarget||e);et.forEach(function(ut){ut.addEventListener(X,Le,Ie),H.push({node:ut,eventType:X,handler:Le,options:Ie})})}function at(){Z()&&(Qe("touchstart",L,{passive:!0}),Qe("touchend",Y,{passive:!0})),aT(D.props.trigger).forEach(function(X){if(X!=="manual")switch(Qe(X,L),X){case"mouseenter":Qe("mouseleave",Y);break;case"focus":Qe(CT?"focusout":"blur",B);break;case"focusin":Qe("focusout",B);break}})}function k(){H.forEach(function(X){var Le=X.node,Ie=X.eventType,et=X.handler,ut=X.options;Le.removeEventListener(Ie,et,ut)}),H=[]}function L(X){var Le,Ie=!1;if(!(!D.state.isEnabled||q(X)||c)){var et=((Le=g)==null?void 0:Le.type)==="focus";g=X,I=X.currentTarget,ft(),!D.state.isVisible&&fT(X)&&Oo.forEach(function(ut){return ut(X)}),X.type==="click"&&(D.props.trigger.indexOf("mouseenter")<0||l)&&D.props.hideOnClick!==!1&&D.state.isVisible?Ie=!0:be(X),X.type==="click"&&(l=!Ie),Ie&&!et&&pe(X)}}function W(X){var Le=X.target,Ie=se().contains(Le)||p.contains(Le);if(!(X.type==="mousemove"&&Ie)){var et=ee().concat(p).map(function(ut){var Yt,sn=ut._tippy,fi=(Yt=sn.popperInstance)==null?void 0:Yt.state;return fi?{popperRect:ut.getBoundingClientRect(),popperState:fi,props:n}:null}).filter(Boolean);gT(et,X)&&(Ve(),pe(X))}}function Y(X){var Le=q(X)||D.props.trigger.indexOf("click")>=0&&l;if(!Le){if(D.props.interactive){D.hideWithInteractivity(X);return}pe(X)}}function B(X){D.props.trigger.indexOf("focusin")<0&&X.target!==se()||D.props.interactive&&X.relatedTarget&&p.contains(X.relatedTarget)||pe(X)}function q(X){return ti.isTouch?Z()!==X.type.indexOf("touch")>=0:!1}function de(){ae();var X=D.props,Le=X.popperOptions,Ie=X.placement,et=X.offset,ut=X.getReferenceClientRect,Yt=X.moveTransition,sn=re()?ml(p).arrow:null,fi=ut?{getBoundingClientRect:ut,contextElement:ut.contextElement||se()}:e,di={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Tr){var ni=Tr.state;if(re()){var Er=Ze(),ps=Er.box;["placement","reference-hidden","escaped"].forEach(function(kr){kr==="placement"?ps.setAttribute("data-placement",ni.placement):ni.attributes.popper["data-popper-"+kr]?ps.setAttribute("data-"+kr,""):ps.removeAttribute("data-"+kr)}),ni.attributes.popper={}}}},dn=[{name:"offset",options:{offset:et}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Yt}},di];re()&&sn&&dn.push({name:"arrow",options:{element:sn,padding:3}}),dn.push.apply(dn,(Le==null?void 0:Le.modifiers)||[]),D.popperInstance=rT(fi,p,Object.assign({},Le,{placement:Ie,onFirstUpdate:T,modifiers:dn}))}function ae(){D.popperInstance&&(D.popperInstance.destroy(),D.popperInstance=null)}function ce(){var X=D.props.appendTo,Le,Ie=se();D.props.interactive&&X===Pf||X==="parent"?Le=Ie.parentNode:Le=Nf(X,[Ie]),Le.contains(p)||Le.appendChild(p),D.state.isMounted=!0,de()}function ee(){return Ao(p.querySelectorAll("[data-tippy-root]"))}function be(X){D.clearDelayTimeouts(),X&&ge("onTrigger",[D,X]),we();var Le=Ne(!0),Ie=P(),et=Ie[0],ut=Ie[1];ti.isTouch&&et==="hold"&&ut&&(Le=ut),Le?i=setTimeout(function(){D.show()},Le):D.show()}function pe(X){if(D.clearDelayTimeouts(),ge("onUntrigger",[D,X]),!D.state.isVisible){Te();return}if(!(D.props.trigger.indexOf("mouseenter")>=0&&D.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&l)){var Le=Ne(!1);Le?r=setTimeout(function(){D.state.isVisible&&D.hide()},Le):o=requestAnimationFrame(function(){D.hide()})}}function Oe(){D.state.isEnabled=!0}function Ce(){D.hide(),D.state.isEnabled=!1}function je(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)}function rt(X){if(!D.state.isDestroyed){ge("onBeforeUpdate",[D,X]),k();var Le=D.props,Ie=Wf(e,Object.assign({},Le,Ff(X),{ignoreAttributes:!0}));D.props=Ie,at(),Le.interactiveDebounce!==Ie.interactiveDebounce&&(Ve(),x=Rf(W,Ie.interactiveDebounce)),Le.triggerTarget&&!Ie.triggerTarget?_r(Le.triggerTarget).forEach(function(et){et.removeAttribute("aria-expanded")}):Ie.triggerTarget&&e.removeAttribute("aria-expanded"),ft(),oe(),Ae&&Ae(Le,Ie),D.popperInstance&&(de(),ee().forEach(function(et){requestAnimationFrame(et._tippy.popperInstance.forceUpdate)})),ge("onAfterUpdate",[D,X])}}function tt(X){D.setProps({content:X})}function dt(){var X=D.state.isVisible,Le=D.state.isDestroyed,Ie=!D.state.isEnabled,et=ti.isTouch&&!D.props.touch,ut=fl(D.props.duration,0,jn.duration);if(!(X||Le||Ie||et)&&!se().hasAttribute("disabled")&&(ge("onShow",[D],!1),D.props.onShow(D)!==!1)){if(D.state.isVisible=!0,re()&&(p.style.visibility="visible"),oe(),we(),D.state.isMounted||(p.style.transition="none"),re()){var Yt=Ze(),sn=Yt.box,fi=Yt.content;pl([sn,fi],0)}T=function(){var dn;if(!(!D.state.isVisible||m)){if(m=!0,p.offsetHeight,p.style.transition=D.props.moveTransition,re()&&D.props.animation){var ds=Ze(),Tr=ds.box,ni=ds.content;pl([Tr,ni],ut),Hf([Tr,ni],"visible")}Ee(),ft(),Mf(vl,D),(dn=D.popperInstance)==null||dn.forceUpdate(),ge("onMount",[D]),D.props.animation&&re()&&ze(ut,function(){D.state.isShown=!0,ge("onShown",[D])})}},ce()}}function At(){var X=!D.state.isVisible,Le=D.state.isDestroyed,Ie=!D.state.isEnabled,et=fl(D.props.duration,1,jn.duration);if(!(X||Le||Ie)&&(ge("onHide",[D],!1),D.props.onHide(D)!==!1)){if(D.state.isVisible=!1,D.state.isShown=!1,m=!1,l=!1,re()&&(p.style.visibility="hidden"),Ve(),Te(),oe(!0),re()){var ut=Ze(),Yt=ut.box,sn=ut.content;D.props.animation&&(pl([Yt,sn],et),Hf([Yt,sn],"hidden"))}Ee(),ft(),D.props.animation?re()&&Re(et,D.unmount):D.unmount()}}function Kt(X){Me().addEventListener("mousemove",x),Mf(Oo,x),x(X)}function Dt(){D.state.isVisible&&D.hide(),D.state.isMounted&&(ae(),ee().forEach(function(X){X._tippy.unmount()}),p.parentNode&&p.parentNode.removeChild(p),vl=vl.filter(function(X){return X!==D}),D.state.isMounted=!1,ge("onHidden",[D]))}function zt(){D.state.isDestroyed||(D.clearDelayTimeouts(),D.unmount(),k(),delete e._tippy,D.state.isDestroyed=!0,ge("onDestroy",[D]))}}function fs(e,t){t===void 0&&(t={});var n=jn.plugins.concat(t.plugins||[]);yT();var i=Object.assign({},t,{plugins:n}),r=pT(e),o=r.reduce(function(l,c){var d=c&&AT(c,i);return d&&l.push(d),l},[]);return Lo(e)?o[0]:o}fs.defaultProps=jn,fs.setDefaultProps=ET,fs.currentInput=ti,Object.assign({},hf,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),fs.setDefaultProps({render:Vf});const{toClipboard:LT}=FC();onUiLoaded(()=>{const e=document.createElement("div");e.id="physton-prompt-all-in-one",he.gradioApp().appendChild(e);const t=eg(DC);t.config.globalProperties.$toastr=NC,t.config.globalProperties.$copyText=LT,t.config.globalProperties.$tippyList=[],t.mixin(Qw),t.directive("tooltip",{mounted(n,i){n.setAttribute("data-tippy-content",i.value);const r=fs(n,{placement:"bottom",theme:"light",allowHTML:!0,onCreate(o,l){localStorage.getItem("phystonPromptEnableTooltip")==="true"||o.disable()}});n.$tippyInstance=r,t.config.globalProperties.$tippyList.push(r)},updated(n,i){n.setAttribute("data-tippy-content",i.value),n.$tippyInstance.setContent(i.value)}}),t.mount(e)})});
|
||
//# sourceMappingURL=main.entry.js.map
|