mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-01-26 11:19:55 +00:00
69 lines
386 KiB
JavaScript
69 lines
386 KiB
JavaScript
(function(Tn){typeof define=="function"&&define.amd?define(Tn):Tn()})(function(){"use strict";var l1=Object.defineProperty;var u1=(Tn,Kt,Ai)=>Kt in Tn?l1(Tn,Kt,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):Tn[Kt]=Ai;var Ed=(Tn,Kt,Ai)=>(u1(Tn,typeof Kt!="symbol"?Kt+"":Kt,Ai),Ai);function Tn(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 Kt(e){if(Ue(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],r=Mt(i)?kd(i):Kt(i);if(r)for(const o in r)t[o]=r[o]}return t}else{if(Mt(e))return e;if(Tt(e))return e}}const Ai=/;(?![^(]*\))/g,Sd=/:([^]+)/,xd=/\/\*.*?\*\//gs;function kd(e){const t={};return e.replace(xd,"").split(Ai).forEach(n=>{if(n){const i=n.split(Sd);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function St(e){let t="";if(Mt(e))t=e;else if(Ue(e))for(let n=0;n<e.length;n++){const i=St(e[n]);i&&(t+=i+" ")}else if(Tt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ad=Tn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Ml(e){return!!e||e===""}function Ld(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=Hl(e),i=Hl(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=Ue(e),i=Ue(t),n||i)return n&&i?Ld(e,t):!1;if(n=Tt(e),i=Tt(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 Bo(e,t){return e.findIndex(n=>Ar(n,t))}const ae=e=>Mt(e)?e:e==null?"":Ue(e)||Tt(e)&&(e.toString===jl||!Je(e.toString))?JSON.stringify(e,Fl,2):String(e),Fl=(e,t)=>t&&t.__v_isRef?Fl(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()]}:Tt(t)&&!Ue(t)&&!$l(t)?String(t):t,wt={},Qi=[],Dn=()=>{},Od=()=>!1,Dd=/^on[^a-z]/,ws=e=>Dd.test(e),jo=e=>e.startsWith("onUpdate:"),Gt=Object.assign,$o=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Pd=Object.prototype.hasOwnProperty,it=(e,t)=>Pd.call(e,t),Ue=Array.isArray,er=e=>Or(e)==="[object Map]",tr=e=>Or(e)==="[object Set]",Hl=e=>Or(e)==="[object Date]",Je=e=>typeof e=="function",Mt=e=>typeof e=="string",Lr=e=>typeof e=="symbol",Tt=e=>e!==null&&typeof e=="object",Bl=e=>Tt(e)&&Je(e.then)&&Je(e.catch),jl=Object.prototype.toString,Or=e=>jl.call(e),Id=e=>Or(e).slice(8,-1),$l=e=>Or(e)==="[object Object]",Uo=e=>Mt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ts=Tn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_s=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Nd=/-(\w)/g,Un=_s(e=>e.replace(Nd,(t,n)=>n?n.toUpperCase():"")),Rd=/\B([A-Z])/g,nr=_s(e=>e.replace(Rd,"-$1").toLowerCase()),Es=_s(e=>e.charAt(0).toUpperCase()+e.slice(1)),Wo=_s(e=>e?`on${Es(e)}`:""),Ss=(e,t)=>!Object.is(e,t),xs=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ks=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},As=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ul;const Md=()=>Ul||(Ul=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Pn;class Fd{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Pn,!t&&Pn&&(this.index=(Pn.scopes||(Pn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Pn;try{return Pn=this,t()}finally{Pn=n}}}on(){Pn=this}off(){Pn=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 Hd(e,t=Pn){t&&t.active&&t.effects.push(e)}function Bd(){return Pn}const Vo=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Wl=e=>(e.w&gi)>0,Vl=e=>(e.n&gi)>0,jd=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=gi},$d=e=>{const{deps:t}=e;if(t.length){let n=0;for(let i=0;i<t.length;i++){const r=t[i];Wl(r)&&!Vl(r)?r.delete(e):t[n++]=r,r.w&=~gi,r.n&=~gi}t.length=n}},Ko=new WeakMap;let Dr=0,gi=1;const qo=30;let In;const Li=Symbol(""),zo=Symbol("");class Xo{constructor(t,n=null,i){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Hd(this,i)}run(){if(!this.active)return this.fn();let t=In,n=mi;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=In,In=this,mi=!0,gi=1<<++Dr,Dr<=qo?jd(this):Kl(this),this.fn()}finally{Dr<=qo&&$d(this),gi=1<<--Dr,In=this.parent,mi=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){In===this?this.deferStop=!0:this.active&&(Kl(this),this.onStop&&this.onStop(),this.active=!1)}}function Kl(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 ql=[];function ir(){ql.push(mi),mi=!1}function rr(){const e=ql.pop();mi=e===void 0?!0:e}function tn(e,t,n){if(mi&&In){let i=Ko.get(e);i||Ko.set(e,i=new Map);let r=i.get(n);r||i.set(n,r=Vo()),zl(r)}}function zl(e,t){let n=!1;Dr<=qo?Vl(e)||(e.n|=gi,n=!Wl(e)):n=!e.has(In),n&&(e.add(In),In.deps.push(e))}function ii(e,t,n,i,r,o){const l=Ko.get(e);if(!l)return;let c=[];if(t==="clear")c=[...l.values()];else if(n==="length"&&Ue(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":Ue(e)?Uo(n)&&c.push(l.get("length")):(c.push(l.get(Li)),er(e)&&c.push(l.get(zo)));break;case"delete":Ue(e)||(c.push(l.get(Li)),er(e)&&c.push(l.get(zo)));break;case"set":er(e)&&c.push(l.get(Li));break}if(c.length===1)c[0]&&Yo(c[0]);else{const d=[];for(const m of c)m&&d.push(...m);Yo(Vo(d))}}function Yo(e,t){const n=Ue(e)?e:[...e];for(const i of n)i.computed&&Xl(i);for(const i of n)i.computed||Xl(i)}function Xl(e,t){(e!==In||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Ud=Tn("__proto__,__v_isRef,__isVue"),Yl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Lr)),Wd=Go(),Vd=Go(!1,!0),Kd=Go(!0),Gl=qd();function qd(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const i=gt(this);for(let o=0,l=this.length;o<l;o++)tn(i,"get",o+"");const r=i[t](...n);return r===-1||r===!1?i[t](...n.map(gt)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ir();const i=gt(this)[t].apply(this,n);return rr(),i}}),e}function zd(e){const t=gt(this);return tn(t,"has",e),t.hasOwnProperty(e)}function Go(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?up:su:t?ru:iu).get(i))return i;const l=Ue(i);if(!e){if(l&&it(Gl,r))return Reflect.get(Gl,r,o);if(r==="hasOwnProperty")return zd}const c=Reflect.get(i,r,o);return(Lr(r)?Yl.has(r):Ud(r))||(e||tn(i,"get",r),t)?c:Jt(c)?l&&Uo(r)?c:c.value:Tt(c)?e?ou(c):Qo(c):c}}const Xd=Jl(),Yd=Jl(!0);function Jl(e=!1){return function(n,i,r,o){let l=n[i];if(Pr(l)&&Jt(l)&&!Jt(r))return!1;if(!e&&(!ta(r)&&!Pr(r)&&(l=gt(l),r=gt(r)),!Ue(n)&&Jt(l)&&!Jt(r)))return l.value=r,!0;const c=Ue(n)&&Uo(i)?Number(i)<n.length:it(n,i),d=Reflect.set(n,i,r,o);return n===gt(o)&&(c?Ss(r,l)&&ii(n,"set",i,r):ii(n,"add",i,r)),d}}function Gd(e,t){const n=it(e,t);e[t];const i=Reflect.deleteProperty(e,t);return i&&n&&ii(e,"delete",t,void 0),i}function Jd(e,t){const n=Reflect.has(e,t);return(!Lr(t)||!Yl.has(t))&&tn(e,"has",t),n}function Zd(e){return tn(e,"iterate",Ue(e)?"length":Li),Reflect.ownKeys(e)}const Zl={get:Wd,set:Xd,deleteProperty:Gd,has:Jd,ownKeys:Zd},Qd={get:Kd,set(e,t){return!0},deleteProperty(e,t){return!0}},ep=Gt({},Zl,{get:Vd,set:Yd}),Jo=e=>e,Ls=e=>Reflect.getPrototypeOf(e);function Os(e,t,n=!1,i=!1){e=e.__v_raw;const r=gt(e),o=gt(t);n||(t!==o&&tn(r,"get",t),tn(r,"get",o));const{has:l}=Ls(r),c=i?Jo:n?ia:na;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 Ds(e,t=!1){const n=this.__v_raw,i=gt(n),r=gt(e);return t||(e!==r&&tn(i,"has",e),tn(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&&tn(gt(e),"iterate",Li),Reflect.get(e,"size",e)}function Ql(e){e=gt(e);const t=gt(this);return Ls(t).has.call(t,e)||(t.add(e),ii(t,"add",e,e)),this}function eu(e,t){t=gt(t);const n=gt(this),{has:i,get:r}=Ls(n);let o=i.call(n,e);o||(e=gt(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 tu(e){const t=gt(this),{has:n,get:i}=Ls(t);let r=n.call(t,e);r||(e=gt(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 nu(){const e=gt(this),t=e.size!==0,n=e.clear();return t&&ii(e,"clear",void 0,void 0),n}function Is(e,t){return function(i,r){const o=this,l=o.__v_raw,c=gt(l),d=t?Jo:e?ia:na;return!e&&tn(c,"iterate",Li),l.forEach((m,g)=>i.call(r,d(m),d(g),o))}}function Ns(e,t,n){return function(...i){const r=this.__v_raw,o=gt(r),l=er(o),c=e==="entries"||e===Symbol.iterator&&l,d=e==="keys"&&l,m=r[e](...i),g=n?Jo:t?ia:na;return!t&&tn(o,"iterate",d?zo:Li),{next(){const{value:w,done:_}=m.next();return _?{value:w,done:_}:{value:c?[g(w[0]),g(w[1])]:g(w),done:_}},[Symbol.iterator](){return this}}}}function vi(e){return function(...t){return e==="delete"?!1:this}}function tp(){const e={get(o){return Os(this,o)},get size(){return Ps(this)},has:Ds,add:Ql,set:eu,delete:tu,clear:nu,forEach:Is(!1,!1)},t={get(o){return Os(this,o,!1,!0)},get size(){return Ps(this)},has:Ds,add:Ql,set:eu,delete:tu,clear:nu,forEach:Is(!1,!0)},n={get(o){return Os(this,o,!0)},get size(){return Ps(this,!0)},has(o){return Ds.call(this,o,!0)},add:vi("add"),set:vi("set"),delete:vi("delete"),clear:vi("clear"),forEach:Is(!0,!1)},i={get(o){return Os(this,o,!0,!0)},get size(){return Ps(this,!0)},has(o){return Ds.call(this,o,!0)},add:vi("add"),set:vi("set"),delete:vi("delete"),clear:vi("clear"),forEach:Is(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Ns(o,!1,!1),n[o]=Ns(o,!0,!1),t[o]=Ns(o,!1,!0),i[o]=Ns(o,!0,!0)}),[e,n,t,i]}const[np,ip,rp,sp]=tp();function Zo(e,t){const n=t?e?sp:rp:e?ip:np;return(i,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(it(n,r)&&r in i?n:i,r,o)}const op={get:Zo(!1,!1)},ap={get:Zo(!1,!0)},lp={get:Zo(!0,!1)},iu=new WeakMap,ru=new WeakMap,su=new WeakMap,up=new WeakMap;function cp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fp(e){return e.__v_skip||!Object.isExtensible(e)?0:cp(Id(e))}function Qo(e){return Pr(e)?e:ea(e,!1,Zl,op,iu)}function dp(e){return ea(e,!1,ep,ap,ru)}function ou(e){return ea(e,!0,Qd,lp,su)}function ea(e,t,n,i,r){if(!Tt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const l=fp(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 Pr(e)?sr(e.__v_raw):!!(e&&e.__v_isReactive)}function Pr(e){return!!(e&&e.__v_isReadonly)}function ta(e){return!!(e&&e.__v_isShallow)}function au(e){return sr(e)||Pr(e)}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}function lu(e){return ks(e,"__v_skip",!0),e}const na=e=>Tt(e)?Qo(e):e,ia=e=>Tt(e)?ou(e):e;function pp(e){mi&&In&&(e=gt(e),zl(e.dep||(e.dep=Vo())))}function hp(e,t){e=gt(e);const n=e.dep;n&&Yo(n)}function Jt(e){return!!(e&&e.__v_isRef===!0)}function gp(e){return Jt(e)?e.value:e}const mp={get:(e,t,n)=>gp(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const r=e[t];return Jt(r)&&!Jt(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};function uu(e){return sr(e)?e:new Proxy(e,mp)}var cu;class vp{constructor(t,n,i,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[cu]=!1,this._dirty=!0,this.effect=new Xo(t,()=>{this._dirty||(this._dirty=!0,hp(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=i}get value(){const t=gt(this);return pp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}cu="__v_isReadonly";function yp(e,t,n=!1){let i,r;const o=Je(e);return o?(i=e,r=Dn):(i=e.get,r=e.set),new vp(i,r,o||!r,n)}function f1(e,...t){}function yi(e,t,n,i){let r;try{r=i?e(...i):e()}catch(o){Rs(o,t,n)}return r}function Nn(e,t,n,i){if(Je(e)){const o=yi(e,t,n,i);return o&&Bl(o)&&o.catch(l=>{Rs(l,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(Nn(e[o],t,n,i));return r}function Rs(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}}bp(e,n,r,i)}function bp(e,t,n,i=!0){console.error(e)}let Ir=!1,ra=!1;const qt=[];let Wn=0;const or=[];let ri=null,Oi=0;const fu=Promise.resolve();let sa=null;function Cp(e){const t=sa||fu;return e?t.then(this?e.bind(this):e):t}function wp(e){let t=Wn+1,n=qt.length;for(;t<n;){const i=t+n>>>1;Nr(qt[i])<e?t=i+1:n=i}return t}function oa(e){(!qt.length||!qt.includes(e,Ir&&e.allowRecurse?Wn+1:Wn))&&(e.id==null?qt.push(e):qt.splice(wp(e.id),0,e),du())}function du(){!Ir&&!ra&&(ra=!0,sa=fu.then(gu))}function Tp(e){const t=qt.indexOf(e);t>Wn&&qt.splice(t,1)}function _p(e){Ue(e)?or.push(...e):(!ri||!ri.includes(e,e.allowRecurse?Oi+1:Oi))&&or.push(e),du()}function pu(e,t=Ir?Wn+1:0){for(;t<qt.length;t++){const n=qt[t];n&&n.pre&&(qt.splice(t,1),t--,n())}}function hu(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,Ep=(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 gu(e){ra=!1,Ir=!0,qt.sort(Ep);const t=Dn;try{for(Wn=0;Wn<qt.length;Wn++){const n=qt[Wn];n&&n.active!==!1&&yi(n,null,14)}}finally{Wn=0,qt.length=0,hu(),Ir=!1,sa=null,(qt.length||or.length)&&gu()}}function Sp(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||wt;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:_}=i[g]||wt;_&&(r=n.map(R=>Mt(R)?R.trim():R)),w&&(r=n.map(As))}let c,d=i[c=Wo(t)]||i[c=Wo(Un(t))];!d&&o&&(d=i[c=Wo(nr(t))]),d&&Nn(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,Nn(m,e,6,r)}}function mu(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(!Je(e)){const d=m=>{const g=mu(m,t,!0);g&&(c=!0,Gt(l,g))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!o&&!c?(Tt(e)&&i.set(e,null),null):(Ue(o)?o.forEach(d=>l[d]=null):Gt(l,o),Tt(e)&&i.set(e,l),l)}function Ms(e,t){return!e||!ws(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,nr(t))||it(e,t))}let _n=null,vu=null;function Fs(e){const t=_n;return _n=e,vu=e&&e.type.__scopeId||null,t}function xp(e,t=_n,n){if(!t||e._n)return e;const i=(...r)=>{i._d&&$u(-1);const o=Fs(t);let l;try{l=e(...r)}finally{Fs(o),i._d&&$u(1)}return l};return i._n=!0,i._c=!0,i._d=!0,i}function d1(){}function aa(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:_,setupState:R,ctx:x,inheritAttrs:O}=e;let U,P;const Z=Fs(e);try{if(n.shapeFlag&4){const L=r||i;U=Vn(g.call(L,L,w,o,R,_,x)),P=d}else{const L=t;U=Vn(L.length>1?L(o,{attrs:d,slots:c,emit:m}):L(o,null)),P=t.props?d:kp(d)}}catch(L){Mr.length=0,Rs(L,e,1),U=pe(Ri)}let se=U;if(P&&O!==!1){const L=Object.keys(P),{shapeFlag:ke}=se;L.length&&ke&7&&(l&&L.some(jo)&&(P=Ap(P,l)),se=ar(se,P))}return n.dirs&&(se=ar(se),se.dirs=se.dirs?se.dirs.concat(n.dirs):n.dirs),n.transition&&(se.transition=n.transition),U=se,Fs(Z),U}const kp=e=>{let t;for(const n in e)(n==="class"||n==="style"||ws(n))&&((t||(t={}))[n]=e[n]);return t},Ap=(e,t)=>{const n={};for(const i in e)(!jo(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function Lp(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?yu(i,l,m):!!l;if(d&8){const g=t.dynamicProps;for(let w=0;w<g.length;w++){const _=g[w];if(l[_]!==i[_]&&!Ms(m,_))return!0}}}else return(r||c)&&(!c||!c.$stable)?!0:i===l?!1:i?l?yu(i,l,m):!0:!!l;return!1}function yu(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]&&!Ms(n,o))return!0}return!1}function Op({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Dp=e=>e.__isSuspense;function Pp(e,t){t&&t.pendingBranch?Ue(e)?t.effects.push(...e):t.effects.push(e):_p(e)}function Ip(e,t){if(It){let n=It.provides;const i=It.parent&&It.parent.provides;i===n&&(n=It.provides=Object.create(i)),n[e]=t}}function Hs(e,t,n=!1){const i=It||_n;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&&Je(t)?t.call(i.proxy):t}}const Bs={};function la(e,t,n){return bu(e,t,n)}function bu(e,t,{immediate:n,deep:i,flush:r,onTrack:o,onTrigger:l}=wt){const c=Bd()===(It==null?void 0:It.scope)?It:null;let d,m=!1,g=!1;if(Jt(e)?(d=()=>e.value,m=ta(e)):sr(e)?(d=()=>e,i=!0):Ue(e)?(g=!0,m=e.some(se=>sr(se)||ta(se)),d=()=>e.map(se=>{if(Jt(se))return se.value;if(sr(se))return Di(se);if(Je(se))return yi(se,c,2)})):Je(e)?t?d=()=>yi(e,c,2):d=()=>{if(!(c&&c.isUnmounted))return w&&w(),Nn(e,c,3,[_])}:d=Dn,t&&i){const se=d;d=()=>Di(se())}let w,_=se=>{w=P.onStop=()=>{yi(se,c,4)}},R;if(Br)if(_=Dn,t?n&&Nn(t,c,3,[d(),g?[]:void 0,_]):d(),r==="sync"){const se=Ah();R=se.__watcherHandles||(se.__watcherHandles=[])}else return Dn;let x=g?new Array(e.length).fill(Bs):Bs;const O=()=>{if(P.active)if(t){const se=P.run();(i||m||(g?se.some((L,ke)=>Ss(L,x[ke])):Ss(se,x)))&&(w&&w(),Nn(t,c,3,[se,x===Bs?void 0:g&&x[0]===Bs?[]:x,_]),x=se)}else P.run()};O.allowRecurse=!!t;let U;r==="sync"?U=O:r==="post"?U=()=>nn(O,c&&c.suspense):(O.pre=!0,c&&(O.id=c.uid),U=()=>oa(O));const P=new Xo(d,U);t?n?O():x=P.run():r==="post"?nn(P.run.bind(P),c&&c.suspense):P.run();const Z=()=>{P.stop(),c&&c.scope&&$o(c.scope.effects,P)};return R&&R.push(Z),Z}function Np(e,t,n){const i=this.proxy,r=Mt(e)?e.includes(".")?Cu(i,e):()=>i[e]:e.bind(i,i);let o;Je(t)?o=t:(o=t.handler,n=t);const l=It;lr(this);const c=bu(r,o.bind(i),n);return l?lr(l):Mi(),c}function Cu(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(!Tt(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Jt(e))Di(e.value,t);else if(Ue(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($l(e))for(const n in e)Di(e[n],t);return e}function Rp(e){return Je(e)?{setup:e,name:e.name}:e}const js=e=>!!e.type.__asyncLoader,wu=e=>e.type.__isKeepAlive;function Mp(e,t){Tu(e,"a",t)}function Fp(e,t){Tu(e,"da",t)}function Tu(e,t,n=It){const i=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if($s(t,i,n),n){let r=n.parent;for(;r&&r.parent;)wu(r.parent.vnode)&&Hp(i,t,n,r),r=r.parent}}function Hp(e,t,n,i){const r=$s(t,e,i,!0);_u(()=>{$o(i[t],r)},n)}function $s(e,t,n=It,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=Nn(t,n,e,l);return Mi(),rr(),c});return i?r.unshift(o):r.push(o),o}}const si=e=>(t,n=It)=>(!Br||e==="sp")&&$s(e,(...i)=>t(...i),n),Bp=si("bm"),jp=si("m"),$p=si("bu"),Up=si("u"),Wp=si("bum"),_u=si("um"),Vp=si("sp"),Kp=si("rtg"),qp=si("rtc");function zp(e,t=It){$s("ec",e,t)}function fe(e,t){const n=_n;if(n===null)return e;const i=zs(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[l,c,d,m=wt]=t[o];l&&(Je(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 Pi(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(),Nn(d,n,8,[e.el,c,e,t]),rr())}}const Eu="components",Xp="directives";function Lt(e,t){return Su(Eu,e,!0,t)||e}const Yp=Symbol();function Us(e){return Su(Xp,e)}function Su(e,t,n=!0,i=!1){const r=_n||It;if(r){const o=r.type;if(e===Eu){const c=Eh(o,!1);if(c&&(c===t||c===Un(t)||c===Es(Un(t))))return o}const l=xu(r[e]||o[e],t)||xu(r.appContext[e],t);return!l&&i?o:l}}function xu(e,t){return e&&(e[t]||e[Un(t)]||e[Es(Un(t))])}function vt(e,t,n,i){let r;const o=n&&n[i];if(Ue(e)||Mt(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(Tt(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 ua=e=>e?Ku(e)?zs(e)||e.proxy:ua(e.parent):null,Rr=Gt(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=>ua(e.parent),$root:e=>ua(e.root),$emit:e=>e.emit,$options:e=>da(e),$forceUpdate:e=>e.f||(e.f=()=>oa(e.update)),$nextTick:e=>e.n||(e.n=Cp.bind(e.proxy)),$watch:e=>Np.bind(e)}),ca=(e,t)=>e!==wt&&!e.__isScriptSetup&&it(e,t),Gp={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 R=l[t];if(R!==void 0)switch(R){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(ca(i,t))return l[t]=1,i[t];if(r!==wt&&it(r,t))return l[t]=2,r[t];if((m=e.propsOptions[0])&&it(m,t))return l[t]=3,o[t];if(n!==wt&&it(n,t))return l[t]=4,n[t];fa&&(l[t]=0)}}const g=Rr[t];let w,_;if(g)return t==="$attrs"&&tn(e,"get",t),g(e);if((w=c.__cssModules)&&(w=w[t]))return w;if(n!==wt&&it(n,t))return l[t]=4,n[t];if(_=d.config.globalProperties,it(_,t))return _[t]},set({_:e},t,n){const{data:i,setupState:r,ctx:o}=e;return ca(r,t)?(r[t]=n,!0):i!==wt&&it(i,t)?(i[t]=n,!0):it(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!==wt&&it(e,l)||ca(t,l)||(c=o[0])&&it(c,l)||it(i,l)||it(Rr,l)||it(r.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let fa=!0;function Jp(e){const t=da(e),n=e.proxy,i=e.ctx;fa=!1,t.beforeCreate&&ku(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:c,provide:d,inject:m,created:g,beforeMount:w,mounted:_,beforeUpdate:R,updated:x,activated:O,deactivated:U,beforeDestroy:P,beforeUnmount:Z,destroyed:se,unmounted:L,render:ke,renderTracked:p,renderTriggered:Pe,errorCaptured:Me,serverPrefetch:ne,expose:Y,inheritAttrs:Ee,components:De,directives:Te,filters:nt}=t;if(m&&Zp(m,i,null,e.appContext.config.unwrapInjectedRef),l)for(const Ie in l){const be=l[Ie];Je(be)&&(i[Ie]=be.bind(n))}if(r){const Ie=r.call(n,n);Tt(Ie)&&(e.data=Qo(Ie))}if(fa=!0,o)for(const Ie in o){const be=o[Ie],ot=Je(be)?be.bind(n,n):Je(be.get)?be.get.bind(n,n):Dn,kt=!Je(be)&&Je(be.set)?be.set.bind(n):Dn,at=xh({get:ot,set:kt});Object.defineProperty(i,Ie,{enumerable:!0,configurable:!0,get:()=>at.value,set:we=>at.value=we})}if(c)for(const Ie in c)Au(c[Ie],i,n,Ie);if(d){const Ie=Je(d)?d.call(n):d;Reflect.ownKeys(Ie).forEach(be=>{Ip(be,Ie[be])})}g&&ku(g,e,"c");function $e(Ie,be){Ue(be)?be.forEach(ot=>Ie(ot.bind(n))):be&&Ie(be.bind(n))}if($e(Bp,w),$e(jp,_),$e($p,R),$e(Up,x),$e(Mp,O),$e(Fp,U),$e(zp,Me),$e(qp,p),$e(Kp,Pe),$e(Wp,Z),$e(_u,L),$e(Vp,ne),Ue(Y))if(Y.length){const Ie=e.exposed||(e.exposed={});Y.forEach(be=>{Object.defineProperty(Ie,be,{get:()=>n[be],set:ot=>n[be]=ot})})}else e.exposed||(e.exposed={});ke&&e.render===Dn&&(e.render=ke),Ee!=null&&(e.inheritAttrs=Ee),De&&(e.components=De),Te&&(e.directives=Te)}function Zp(e,t,n=Dn,i=!1){Ue(e)&&(e=pa(e));for(const r in e){const o=e[r];let l;Tt(o)?"default"in o?l=Hs(o.from||r,o.default,!0):l=Hs(o.from||r):l=Hs(o),Jt(l)&&i?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):t[r]=l}}function ku(e,t,n){Nn(Ue(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function Au(e,t,n,i){const r=i.includes(".")?Cu(n,i):()=>n[i];if(Mt(e)){const o=t[e];Je(o)&&la(r,o)}else if(Je(e))la(r,e.bind(n));else if(Tt(e))if(Ue(e))e.forEach(o=>Au(o,t,n,i));else{const o=Je(e.handler)?e.handler.bind(n):t[e.handler];Je(o)&&la(r,o,e)}}function da(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=>Ws(d,m,l,!0)),Ws(d,t,l)),Tt(t)&&o.set(t,d),d}function Ws(e,t,n,i=!1){const{mixins:r,extends:o}=t;o&&Ws(e,o,n,!0),r&&r.forEach(l=>Ws(e,l,n,!0));for(const l in t)if(!(i&&l==="expose")){const c=Qp[l]||n&&n[l];e[l]=c?c(e[l],t[l]):t[l]}return e}const Qp={data:Lu,props:Ii,emits:Ii,methods:Ii,computed:Ii,beforeCreate:Zt,created:Zt,beforeMount:Zt,mounted:Zt,beforeUpdate:Zt,updated:Zt,beforeDestroy:Zt,beforeUnmount:Zt,destroyed:Zt,unmounted:Zt,activated:Zt,deactivated:Zt,errorCaptured:Zt,serverPrefetch:Zt,components:Ii,directives:Ii,watch:th,provide:Lu,inject:eh};function Lu(e,t){return t?e?function(){return Gt(Je(e)?e.call(this,this):e,Je(t)?t.call(this,this):t)}:t:e}function eh(e,t){return Ii(pa(e),pa(t))}function pa(e){if(Ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Zt(e,t){return e?[...new Set([].concat(e,t))]:t}function Ii(e,t){return e?Gt(Gt(Object.create(null),e),t):t}function th(e,t){if(!e)return t;if(!t)return e;const n=Gt(Object.create(null),e);for(const i in t)n[i]=Zt(e[i],t[i]);return n}function nh(e,t,n,i=!1){const r={},o={};ks(o,Ks,1),e.propsDefaults=Object.create(null),Ou(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=i?r:dp(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function ih(e,t,n,i){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,c=gt(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 _=g[w];if(Ms(e.emitsOptions,_))continue;const R=t[_];if(d)if(it(o,_))R!==o[_]&&(o[_]=R,m=!0);else{const x=Un(_);r[x]=ha(d,c,x,R,e,!1)}else R!==o[_]&&(o[_]=R,m=!0)}}}else{Ou(e,t,r,o)&&(m=!0);let g;for(const w in c)(!t||!it(t,w)&&((g=nr(w))===w||!it(t,g)))&&(d?n&&(n[w]!==void 0||n[g]!==void 0)&&(r[w]=ha(d,c,w,void 0,e,!0)):delete r[w]);if(o!==c)for(const w in o)(!t||!it(t,w))&&(delete o[w],m=!0)}m&&ii(e,"set","$attrs")}function Ou(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&&it(r,g=Un(d))?!o||!o.includes(g)?n[g]=m:(c||(c={}))[g]=m:Ms(e.emitsOptions,d)||(!(d in i)||m!==i[d])&&(i[d]=m,l=!0)}if(o){const d=gt(n),m=c||wt;for(let g=0;g<o.length;g++){const w=o[g];n[w]=ha(r,d,w,m[w],e,!it(m,w))}}return l}function ha(e,t,n,i,r,o){const l=e[n];if(l!=null){const c=it(l,"default");if(c&&i===void 0){const d=l.default;if(l.type!==Function&&Je(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 Du(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(!Je(e)){const g=w=>{d=!0;const[_,R]=Du(w,t,!0);Gt(l,_),R&&c.push(...R)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!o&&!d)return Tt(e)&&i.set(e,Qi),Qi;if(Ue(o))for(let g=0;g<o.length;g++){const w=Un(o[g]);Pu(w)&&(l[w]=wt)}else if(o)for(const g in o){const w=Un(g);if(Pu(w)){const _=o[g],R=l[w]=Ue(_)||Je(_)?{type:_}:Object.assign({},_);if(R){const x=Ru(Boolean,R.type),O=Ru(String,R.type);R[0]=x>-1,R[1]=O<0||x<O,(x>-1||it(R,"default"))&&c.push(w)}}}const m=[l,c];return Tt(e)&&i.set(e,m),m}function Pu(e){return e[0]!=="$"}function Iu(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Nu(e,t){return Iu(e)===Iu(t)}function Ru(e,t){return Ue(t)?t.findIndex(n=>Nu(n,e)):Je(t)&&Nu(t,e)?0:-1}const Mu=e=>e[0]==="_"||e==="$stable",ga=e=>Ue(e)?e.map(Vn):[Vn(e)],rh=(e,t,n)=>{if(t._n)return t;const i=xp((...r)=>ga(t(...r)),n);return i._c=!1,i},Fu=(e,t,n)=>{const i=e._ctx;for(const r in e){if(Mu(r))continue;const o=e[r];if(Je(o))t[r]=rh(r,o,i);else if(o!=null){const l=ga(o);t[r]=()=>l}}},Hu=(e,t)=>{const n=ga(t);e.slots.default=()=>n},sh=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=gt(t),ks(t,"_",n)):Fu(t,e.slots={})}else e.slots={},t&&Hu(e,t);ks(e.slots,Ks,1)},oh=(e,t,n)=>{const{vnode:i,slots:r}=e;let o=!0,l=wt;if(i.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:(Gt(r,t),!n&&c===1&&delete r._):(o=!t.$stable,Fu(t,r)),l=t}else t&&(Hu(e,t),l={default:1});if(o)for(const c in r)!Mu(c)&&!(c in l)&&delete r[c]};function Bu(){return{app:null,config:{isNativeTag:Od,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 ah=0;function lh(e,t){return function(i,r=null){Je(i)||(i=Object.assign({},i)),r!=null&&!Tt(r)&&(r=null);const o=Bu(),l=new Set;let c=!1;const d=o.app={_uid:ah++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:Lh,get config(){return o.config},set config(m){},use(m,...g){return l.has(m)||(m&&Je(m.install)?(l.add(m),m.install(d,...g)):Je(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 _=pe(i,r);return _.appContext=o,g&&t?t(_,m):e(_,m,w),c=!0,d._container=m,m.__vue_app__=d,zs(_.component)||_.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 ma(e,t,n,i,r=!1){if(Ue(e)){e.forEach((_,R)=>ma(_,t&&(Ue(t)?t[R]:t),n,i,r));return}if(js(i)&&!r)return;const o=i.shapeFlag&4?zs(i.component)||i.component.proxy:i.el,l=r?null:o,{i:c,r:d}=e,m=t&&t.r,g=c.refs===wt?c.refs={}:c.refs,w=c.setupState;if(m!=null&&m!==d&&(Mt(m)?(g[m]=null,it(w,m)&&(w[m]=null)):Jt(m)&&(m.value=null)),Je(d))yi(d,c,12,[l,g]);else{const _=Mt(d),R=Jt(d);if(_||R){const x=()=>{if(e.f){const O=_?it(w,d)?w[d]:g[d]:d.value;r?Ue(O)&&$o(O,o):Ue(O)?O.includes(o)||O.push(o):_?(g[d]=[o],it(w,d)&&(w[d]=g[d])):(d.value=[o],e.k&&(g[e.k]=d.value))}else _?(g[d]=l,it(w,d)&&(w[d]=l)):R&&(d.value=l,e.k&&(g[e.k]=l))};l?(x.id=-1,nn(x,n)):x()}}}const nn=Pp;function uh(e){return ch(e)}function ch(e,t){const n=Md();n.__VUE__=!0;const{insert:i,remove:r,patchProp:o,createElement:l,createText:c,createComment:d,setText:m,setElementText:g,parentNode:w,nextSibling:_,setScopeId:R=Dn,insertStaticContent:x}=e,O=(k,D,W,J=null,H=null,V=null,ue=!1,ie=null,re=!!D.dynamicChildren)=>{if(k===D)return;k&&!Hr(k,D)&&(J=Fe(k),we(k,H,V,!0),k=null),D.patchFlag===-2&&(re=!1,D.dynamicChildren=null);const{type:Q,ref:Se,shapeFlag:me}=D;switch(Q){case Vs:U(k,D,W,J);break;case Ri:P(k,D,W,J);break;case va:k==null&&Z(D,W,J,ue);break;case Re:De(k,D,W,J,H,V,ue,ie,re);break;default:me&1?ke(k,D,W,J,H,V,ue,ie,re):me&6?Te(k,D,W,J,H,V,ue,ie,re):(me&64||me&128)&&Q.process(k,D,W,J,H,V,ue,ie,re,pt)}Se!=null&&H&&ma(Se,k&&k.ref,V,D||k,!D)},U=(k,D,W,J)=>{if(k==null)i(D.el=c(D.children),W,J);else{const H=D.el=k.el;D.children!==k.children&&m(H,D.children)}},P=(k,D,W,J)=>{k==null?i(D.el=d(D.children||""),W,J):D.el=k.el},Z=(k,D,W,J)=>{[k.el,k.anchor]=x(k.children,D,W,J,k.el,k.anchor)},se=({el:k,anchor:D},W,J)=>{let H;for(;k&&k!==D;)H=_(k),i(k,W,J),k=H;i(D,W,J)},L=({el:k,anchor:D})=>{let W;for(;k&&k!==D;)W=_(k),r(k),k=W;r(D)},ke=(k,D,W,J,H,V,ue,ie,re)=>{ue=ue||D.type==="svg",k==null?p(D,W,J,H,V,ue,ie,re):ne(k,D,H,V,ue,ie,re)},p=(k,D,W,J,H,V,ue,ie)=>{let re,Q;const{type:Se,props:me,shapeFlag:Ce,transition:Le,dirs:qe}=k;if(re=k.el=l(k.type,V,me&&me.is,me),Ce&8?g(re,k.children):Ce&16&&Me(k.children,re,null,J,H,V&&Se!=="foreignObject",ue,ie),qe&&Pi(k,null,J,"created"),Pe(re,k,k.scopeId,ue,J),me){for(const Ze in me)Ze!=="value"&&!Ts(Ze)&&o(re,Ze,null,me[Ze],V,k.children,J,H,_e);"value"in me&&o(re,"value",null,me.value),(Q=me.onVnodeBeforeMount)&&Kn(Q,J,k)}qe&&Pi(k,null,J,"beforeMount");const lt=(!H||H&&!H.pendingBranch)&&Le&&!Le.persisted;lt&&Le.beforeEnter(re),i(re,D,W),((Q=me&&me.onVnodeMounted)||lt||qe)&&nn(()=>{Q&&Kn(Q,J,k),lt&&Le.enter(re),qe&&Pi(k,null,J,"mounted")},H)},Pe=(k,D,W,J,H)=>{if(W&&R(k,W),J)for(let V=0;V<J.length;V++)R(k,J[V]);if(H){let V=H.subTree;if(D===V){const ue=H.vnode;Pe(k,ue,ue.scopeId,ue.slotScopeIds,H.parent)}}},Me=(k,D,W,J,H,V,ue,ie,re=0)=>{for(let Q=re;Q<k.length;Q++){const Se=k[Q]=ie?bi(k[Q]):Vn(k[Q]);O(null,Se,D,W,J,H,V,ue,ie)}},ne=(k,D,W,J,H,V,ue)=>{const ie=D.el=k.el;let{patchFlag:re,dynamicChildren:Q,dirs:Se}=D;re|=k.patchFlag&16;const me=k.props||wt,Ce=D.props||wt;let Le;W&&Ni(W,!1),(Le=Ce.onVnodeBeforeUpdate)&&Kn(Le,W,D,k),Se&&Pi(D,k,W,"beforeUpdate"),W&&Ni(W,!0);const qe=H&&D.type!=="foreignObject";if(Q?Y(k.dynamicChildren,Q,ie,W,J,qe,V):ue||be(k,D,ie,null,W,J,qe,V,!1),re>0){if(re&16)Ee(ie,D,me,Ce,W,J,H);else if(re&2&&me.class!==Ce.class&&o(ie,"class",null,Ce.class,H),re&4&&o(ie,"style",me.style,Ce.style,H),re&8){const lt=D.dynamicProps;for(let Ze=0;Ze<lt.length;Ze++){const Et=lt[Ze],Xt=me[Et],ti=Ce[Et];(ti!==Xt||Et==="value")&&o(ie,Et,Xt,ti,H,k.children,W,J,_e)}}re&1&&k.children!==D.children&&g(ie,D.children)}else!ue&&Q==null&&Ee(ie,D,me,Ce,W,J,H);((Le=Ce.onVnodeUpdated)||Se)&&nn(()=>{Le&&Kn(Le,W,D,k),Se&&Pi(D,k,W,"updated")},J)},Y=(k,D,W,J,H,V,ue)=>{for(let ie=0;ie<D.length;ie++){const re=k[ie],Q=D[ie],Se=re.el&&(re.type===Re||!Hr(re,Q)||re.shapeFlag&70)?w(re.el):W;O(re,Q,Se,null,J,H,V,ue,!0)}},Ee=(k,D,W,J,H,V,ue)=>{if(W!==J){if(W!==wt)for(const ie in W)!Ts(ie)&&!(ie in J)&&o(k,ie,W[ie],null,ue,D.children,H,V,_e);for(const ie in J){if(Ts(ie))continue;const re=J[ie],Q=W[ie];re!==Q&&ie!=="value"&&o(k,ie,Q,re,ue,D.children,H,V,_e)}"value"in J&&o(k,"value",W.value,J.value)}},De=(k,D,W,J,H,V,ue,ie,re)=>{const Q=D.el=k?k.el:c(""),Se=D.anchor=k?k.anchor:c("");let{patchFlag:me,dynamicChildren:Ce,slotScopeIds:Le}=D;Le&&(ie=ie?ie.concat(Le):Le),k==null?(i(Q,W,J),i(Se,W,J),Me(D.children,W,Se,H,V,ue,ie,re)):me>0&&me&64&&Ce&&k.dynamicChildren?(Y(k.dynamicChildren,Ce,W,H,V,ue,ie),(D.key!=null||H&&D===H.subTree)&&ju(k,D,!0)):be(k,D,W,Se,H,V,ue,ie,re)},Te=(k,D,W,J,H,V,ue,ie,re)=>{D.slotScopeIds=ie,k==null?D.shapeFlag&512?H.ctx.activate(D,W,J,ue,re):nt(D,W,J,H,V,ue,re):dt(k,D,re)},nt=(k,D,W,J,H,V,ue)=>{const ie=k.component=bh(k,J,H);if(wu(k)&&(ie.ctx.renderer=pt),Ch(ie),ie.asyncDep){if(H&&H.registerDep(ie,$e),!k.el){const re=ie.subTree=pe(Ri);P(null,re,D,W)}return}$e(ie,k,D,W,H,V,ue)},dt=(k,D,W)=>{const J=D.component=k.component;if(Lp(k,D,W))if(J.asyncDep&&!J.asyncResolved){Ie(J,D,W);return}else J.next=D,Tp(J.update),J.update();else D.el=k.el,J.vnode=D},$e=(k,D,W,J,H,V,ue)=>{const ie=()=>{if(k.isMounted){let{next:Se,bu:me,u:Ce,parent:Le,vnode:qe}=k,lt=Se,Ze;Ni(k,!1),Se?(Se.el=qe.el,Ie(k,Se,ue)):Se=qe,me&&xs(me),(Ze=Se.props&&Se.props.onVnodeBeforeUpdate)&&Kn(Ze,Le,Se,qe),Ni(k,!0);const Et=aa(k),Xt=k.subTree;k.subTree=Et,O(Xt,Et,w(Xt.el),Fe(Xt),k,H,V),Se.el=Et.el,lt===null&&Op(k,Et.el),Ce&&nn(Ce,H),(Ze=Se.props&&Se.props.onVnodeUpdated)&&nn(()=>Kn(Ze,Le,Se,qe),H)}else{let Se;const{el:me,props:Ce}=D,{bm:Le,m:qe,parent:lt}=k,Ze=js(D);if(Ni(k,!1),Le&&xs(Le),!Ze&&(Se=Ce&&Ce.onVnodeBeforeMount)&&Kn(Se,lt,D),Ni(k,!0),me&&ln){const Et=()=>{k.subTree=aa(k),ln(me,k.subTree,k,H,null)};Ze?D.type.__asyncLoader().then(()=>!k.isUnmounted&&Et()):Et()}else{const Et=k.subTree=aa(k);O(null,Et,W,J,k,H,V),D.el=Et.el}if(qe&&nn(qe,H),!Ze&&(Se=Ce&&Ce.onVnodeMounted)){const Et=D;nn(()=>Kn(Se,lt,Et),H)}(D.shapeFlag&256||lt&&js(lt.vnode)&<.vnode.shapeFlag&256)&&k.a&&nn(k.a,H),k.isMounted=!0,D=W=J=null}},re=k.effect=new Xo(ie,()=>oa(Q),k.scope),Q=k.update=()=>re.run();Q.id=k.uid,Ni(k,!0),Q()},Ie=(k,D,W)=>{D.component=k;const J=k.vnode.props;k.vnode=D,k.next=null,ih(k,D.props,J,W),oh(k,D.children,W),ir(),pu(),rr()},be=(k,D,W,J,H,V,ue,ie,re=!1)=>{const Q=k&&k.children,Se=k?k.shapeFlag:0,me=D.children,{patchFlag:Ce,shapeFlag:Le}=D;if(Ce>0){if(Ce&128){kt(Q,me,W,J,H,V,ue,ie,re);return}else if(Ce&256){ot(Q,me,W,J,H,V,ue,ie,re);return}}Le&8?(Se&16&&_e(Q,H,V),me!==Q&&g(W,me)):Se&16?Le&16?kt(Q,me,W,J,H,V,ue,ie,re):_e(Q,H,V,!0):(Se&8&&g(W,""),Le&16&&Me(me,W,J,H,V,ue,ie,re))},ot=(k,D,W,J,H,V,ue,ie,re)=>{k=k||Qi,D=D||Qi;const Q=k.length,Se=D.length,me=Math.min(Q,Se);let Ce;for(Ce=0;Ce<me;Ce++){const Le=D[Ce]=re?bi(D[Ce]):Vn(D[Ce]);O(k[Ce],Le,W,null,H,V,ue,ie,re)}Q>Se?_e(k,H,V,!0,!1,me):Me(D,W,J,H,V,ue,ie,re,me)},kt=(k,D,W,J,H,V,ue,ie,re)=>{let Q=0;const Se=D.length;let me=k.length-1,Ce=Se-1;for(;Q<=me&&Q<=Ce;){const Le=k[Q],qe=D[Q]=re?bi(D[Q]):Vn(D[Q]);if(Hr(Le,qe))O(Le,qe,W,null,H,V,ue,ie,re);else break;Q++}for(;Q<=me&&Q<=Ce;){const Le=k[me],qe=D[Ce]=re?bi(D[Ce]):Vn(D[Ce]);if(Hr(Le,qe))O(Le,qe,W,null,H,V,ue,ie,re);else break;me--,Ce--}if(Q>me){if(Q<=Ce){const Le=Ce+1,qe=Le<Se?D[Le].el:J;for(;Q<=Ce;)O(null,D[Q]=re?bi(D[Q]):Vn(D[Q]),W,qe,H,V,ue,ie,re),Q++}}else if(Q>Ce)for(;Q<=me;)we(k[Q],H,V,!0),Q++;else{const Le=Q,qe=Q,lt=new Map;for(Q=qe;Q<=Ce;Q++){const de=D[Q]=re?bi(D[Q]):Vn(D[Q]);de.key!=null&<.set(de.key,Q)}let Ze,Et=0;const Xt=Ce-qe+1;let ti=!1,Bn=0;const vn=new Array(Xt);for(Q=0;Q<Xt;Q++)vn[Q]=0;for(Q=Le;Q<=me;Q++){const de=k[Q];if(Et>=Xt){we(de,H,V,!0);continue}let ye;if(de.key!=null)ye=lt.get(de.key);else for(Ze=qe;Ze<=Ce;Ze++)if(vn[Ze-qe]===0&&Hr(de,D[Ze])){ye=Ze;break}ye===void 0?we(de,H,V,!0):(vn[ye-qe]=Q+1,ye>=Bn?Bn=ye:ti=!0,O(de,D[ye],W,null,H,V,ue,ie,re),Et++)}const q=ti?fh(vn):Qi;for(Ze=q.length-1,Q=Xt-1;Q>=0;Q--){const de=qe+Q,ye=D[de],ze=de+1<Se?D[de+1].el:J;vn[Q]===0?O(null,ye,W,ze,H,V,ue,ie,re):ti&&(Ze<0||Q!==q[Ze]?at(ye,W,ze,2):Ze--)}}},at=(k,D,W,J,H=null)=>{const{el:V,type:ue,transition:ie,children:re,shapeFlag:Q}=k;if(Q&6){at(k.component.subTree,D,W,J);return}if(Q&128){k.suspense.move(D,W,J);return}if(Q&64){ue.move(k,D,W,pt);return}if(ue===Re){i(V,D,W);for(let me=0;me<re.length;me++)at(re[me],D,W,J);i(k.anchor,D,W);return}if(ue===va){se(k,D,W);return}if(J!==2&&Q&1&&ie)if(J===0)ie.beforeEnter(V),i(V,D,W),nn(()=>ie.enter(V),H);else{const{leave:me,delayLeave:Ce,afterLeave:Le}=ie,qe=()=>i(V,D,W),lt=()=>{me(V,()=>{qe(),Le&&Le()})};Ce?Ce(V,qe,lt):lt()}else i(V,D,W)},we=(k,D,W,J=!1,H=!1)=>{const{type:V,props:ue,ref:ie,children:re,dynamicChildren:Q,shapeFlag:Se,patchFlag:me,dirs:Ce}=k;if(ie!=null&&ma(ie,null,W,k,!0),Se&256){D.ctx.deactivate(k);return}const Le=Se&1&&Ce,qe=!js(k);let lt;if(qe&&(lt=ue&&ue.onVnodeBeforeUnmount)&&Kn(lt,D,k),Se&6)xe(k.component,W,J);else{if(Se&128){k.suspense.unmount(W,J);return}Le&&Pi(k,null,D,"beforeUnmount"),Se&64?k.type.remove(k,D,W,H,pt,J):Q&&(V!==Re||me>0&&me&64)?_e(Q,D,W,!1,!0):(V===Re&&me&384||!H&&Se&16)&&_e(re,D,W),J&&he(k)}(qe&&(lt=ue&&ue.onVnodeUnmounted)||Le)&&nn(()=>{lt&&Kn(lt,D,k),Le&&Pi(k,null,D,"unmounted")},W)},he=k=>{const{type:D,el:W,anchor:J,transition:H}=k;if(D===Re){ge(W,J);return}if(D===va){L(k);return}const V=()=>{r(W),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(k.shapeFlag&1&&H&&!H.persisted){const{leave:ue,delayLeave:ie}=H,re=()=>ue(W,V);ie?ie(k.el,V,re):re()}else V()},ge=(k,D)=>{let W;for(;k!==D;)W=_(k),r(k),k=W;r(D)},xe=(k,D,W)=>{const{bum:J,scope:H,update:V,subTree:ue,um:ie}=k;J&&xs(J),H.stop(),V&&(V.active=!1,we(ue,k,D,W)),ie&&nn(ie,D),nn(()=>{k.isUnmounted=!0},D),D&&D.pendingBranch&&!D.isUnmounted&&k.asyncDep&&!k.asyncResolved&&k.suspenseId===D.pendingId&&(D.deps--,D.deps===0&&D.resolve())},_e=(k,D,W,J=!1,H=!1,V=0)=>{for(let ue=V;ue<k.length;ue++)we(k[ue],D,W,J,H)},Fe=k=>k.shapeFlag&6?Fe(k.component.subTree):k.shapeFlag&128?k.suspense.next():_(k.anchor||k.el),ft=(k,D,W)=>{k==null?D._vnode&&we(D._vnode,null,null,!0):O(D._vnode||null,k,D,null,null,null,W),pu(),hu(),D._vnode=k},pt={p:O,um:we,m:at,r:he,mt:nt,mc:Me,pc:be,pbc:Y,n:Fe,o:e};let Wt,ln;return t&&([Wt,ln]=t(pt)),{render:ft,hydrate:Wt,createApp:lh(ft,Wt)}}function Ni({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ju(e,t,n=!1){const i=e.children,r=t.children;if(Ue(i)&&Ue(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||ju(l,c)),c.type===Vs&&(c.el=l.el)}}function fh(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 dh=e=>e.__isTeleport,Re=Symbol(void 0),Vs=Symbol(void 0),Ri=Symbol(void 0),va=Symbol(void 0),Mr=[];let Rn=null;function N(e=!1){Mr.push(Rn=e?null:[])}function ph(){Mr.pop(),Rn=Mr[Mr.length-1]||null}let Fr=1;function $u(e){Fr+=e}function Uu(e){return e.dynamicChildren=Fr>0?Rn||Qi:null,ph(),Fr>0&&Rn&&Rn.push(e),e}function B(e,t,n,i,r,o){return Uu(T(e,t,n,i,r,o,!0))}function mt(e,t,n,i,r){return Uu(pe(e,t,n,i,r,!0))}function hh(e){return e?e.__v_isVNode===!0:!1}function Hr(e,t){return e.type===t.type&&e.key===t.key}const Ks="__vInternal",Wu=({key:e})=>e??null,qs=({ref:e,ref_key:t,ref_for:n})=>e!=null?Mt(e)||Jt(e)||Je(e)?{i:_n,r:e,k:t,f:!!n}:e:null;function T(e,t=null,n=null,i=0,r=null,o=e===Re?0:1,l=!1,c=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wu(t),ref:t&&qs(t),scopeId:vu,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:_n};return c?(ya(d,n),o&128&&e.normalize(d)):n&&(d.shapeFlag|=Mt(n)?8:16),Fr>0&&!l&&Rn&&(d.patchFlag>0||o&6)&&d.patchFlag!==32&&Rn.push(d),d}const pe=gh;function gh(e,t=null,n=null,i=0,r=null,o=!1){if((!e||e===Yp)&&(e=Ri),hh(e)){const c=ar(e,t,!0);return n&&ya(c,n),Fr>0&&!o&&Rn&&(c.shapeFlag&6?Rn[Rn.indexOf(e)]=c:Rn.push(c)),c.patchFlag|=-2,c}if(Sh(e)&&(e=e.__vccOpts),t){t=mh(t);let{class:c,style:d}=t;c&&!Mt(c)&&(t.class=St(c)),Tt(d)&&(au(d)&&!Ue(d)&&(d=Gt({},d)),t.style=Kt(d))}const l=Mt(e)?1:Dp(e)?128:dh(e)?64:Tt(e)?4:Je(e)?2:0;return T(e,t,n,i,r,l,o,!0)}function mh(e){return e?au(e)||Ks in e?Gt({},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&&Wu(c),ref:t&&t.ref?n&&r?Ue(r)?r.concat(qs(t)):[r,qs(t)]:qs(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!==Re?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 Ft(e=" ",t=0){return pe(Vs,null,e,t)}function We(e="",t=!1){return t?(N(),mt(Ri,null,e)):pe(Ri,null,e)}function Vn(e){return e==null||typeof e=="boolean"?pe(Ri):Ue(e)?pe(Re,null,e.slice()):typeof e=="object"?bi(e):pe(Vs,null,String(e))}function bi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ar(e)}function ya(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Ue(t))n=16;else if(typeof t=="object")if(i&65){const r=t.default;r&&(r._c&&(r._d=!1),ya(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Ks in t)?t._ctx=_n:r===3&&_n&&(_n.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Je(t)?(t={default:t,_ctx:_n},n=32):(t=String(t),i&64?(n=16,t=[Ft(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=St([t.class,i.class]));else if(r==="style")t.style=Kt([t.style,i.style]);else if(ws(r)){const o=t[r],l=i[r];l&&o!==l&&!(Ue(o)&&o.includes(l))&&(t[r]=o?[].concat(o,l):l)}else r!==""&&(t[r]=i[r])}return t}function Kn(e,t,n,i=null){Nn(e,t,7,[n,i])}const vh=Bu();let yh=0;function bh(e,t,n){const i=e.type,r=(t?t.appContext:e.appContext)||vh,o={uid:yh++,vnode:e,type:i,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Fd(!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:Du(i,r),emitsOptions:mu(i,r),emit:null,emitted:null,propsDefaults:wt,inheritAttrs:i.inheritAttrs,ctx:wt,data:wt,props:wt,attrs:wt,slots:wt,refs:wt,setupState:wt,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=Sp.bind(null,o),e.ce&&e.ce(o),o}let It=null;const lr=e=>{It=e,e.scope.on()},Mi=()=>{It&&It.scope.off(),It=null};function Ku(e){return e.vnode.shapeFlag&4}let Br=!1;function Ch(e,t=!1){Br=t;const{props:n,children:i}=e.vnode,r=Ku(e);nh(e,n,r,t),sh(e,i);const o=r?wh(e,t):void 0;return Br=!1,o}function wh(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=lu(new Proxy(e.ctx,Gp));const{setup:i}=n;if(i){const r=e.setupContext=i.length>1?_h(e):null;lr(e),ir();const o=yi(i,e,0,[e.props,r]);if(rr(),Mi(),Bl(o)){if(o.then(Mi,Mi),t)return o.then(l=>{qu(e,l,t)}).catch(l=>{Rs(l,e,0)});e.asyncDep=o}else qu(e,o,t)}else Xu(e,t)}function qu(e,t,n){Je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Tt(t)&&(e.setupState=uu(t)),Xu(e,n)}let zu;function Xu(e,t,n){const i=e.type;if(!e.render){if(!t&&zu&&!i.render){const r=i.template||da(e).template;if(r){const{isCustomElement:o,compilerOptions:l}=e.appContext.config,{delimiters:c,compilerOptions:d}=i,m=Gt(Gt({isCustomElement:o,delimiters:c},l),d);i.render=zu(r,m)}}e.render=i.render||Dn}lr(e),ir(),Jp(e),rr(),Mi()}function Th(e){return new Proxy(e.attrs,{get(t,n){return tn(e,"get","$attrs"),t[n]}})}function _h(e){const t=i=>{e.exposed=i||{}};let n;return{get attrs(){return n||(n=Th(e))},slots:e.slots,emit:e.emit,expose:t}}function zs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(uu(lu(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 Eh(e,t=!0){return Je(e)?e.displayName||e.name:e.name||t&&e.__name}function Sh(e){return Je(e)&&"__vccOpts"in e}const xh=(e,t)=>yp(e,t,Br),kh=Symbol(""),Ah=()=>Hs(kh),Lh="3.2.47",Oh="http://www.w3.org/2000/svg",Fi=typeof document<"u"?document:null,Yu=Fi&&Fi.createElement("template"),Dh={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(Oh,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{Yu.innerHTML=i?`<svg>${e}</svg>`:e;const c=Yu.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 Ph(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 Ih(e,t,n){const i=e.style,r=Mt(n);if(n&&!r){if(t&&!Mt(t))for(const o in t)n[o]==null&&ba(i,o,"");for(const o in n)ba(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 Gu=/\s*!important$/;function ba(e,t,n){if(Ue(n))n.forEach(i=>ba(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Nh(e,t);Gu.test(n)?e.setProperty(nr(i),n.replace(Gu,""),"important"):e[i]=n}}const Ju=["Webkit","Moz","ms"],Ca={};function Nh(e,t){const n=Ca[t];if(n)return n;let i=Un(t);if(i!=="filter"&&i in e)return Ca[t]=i;i=Es(i);for(let r=0;r<Ju.length;r++){const o=Ju[r]+i;if(o in e)return Ca[t]=o}return t}const Zu="http://www.w3.org/1999/xlink";function Rh(e,t,n,i,r){if(i&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Zu,t.slice(6,t.length)):e.setAttributeNS(Zu,t,n);else{const o=Ad(t);n==null||o&&!Ml(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function Mh(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=Ml(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 Fh(e,t,n,i){e.removeEventListener(t,n,i)}function Hh(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]=Bh(t);if(i){const m=o[t]=Uh(i,r);Ci(e,c,m,d)}else l&&(Fh(e,c,l,d),o[t]=void 0)}}const Qu=/(?:Once|Passive|Capture)$/;function Bh(e){let t;if(Qu.test(e)){t={};let i;for(;i=e.match(Qu);)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 wa=0;const jh=Promise.resolve(),$h=()=>wa||(jh.then(()=>wa=0),wa=Date.now());function Uh(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Nn(Wh(i,n.value),t,5,[i])};return n.value=e,n.attached=$h(),n}function Wh(e,t){if(Ue(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 ec=/^on[a-z]/,Vh=(e,t,n,i,r=!1,o,l,c,d)=>{t==="class"?Ph(e,i,r):t==="style"?Ih(e,n,i):ws(t)?jo(t)||Hh(e,t,n,i,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kh(e,t,i,r))?Mh(e,t,i,o,l,c,d):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),Rh(e,t,i,r))};function Kh(e,t,n,i){return i?!!(t==="innerHTML"||t==="textContent"||t in e&&ec.test(t)&&Je(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||ec.test(t)&&Mt(n)?!1:t in e}const ur=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ue(t)?n=>xs(t,n):t};function qh(e){e.target.composing=!0}function tc(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=As(c)),e._assign(c)}),n&&Ci(e,"change",()=>{e.value=e.value.trim()}),t||(Ci(e,"compositionstart",qh),Ci(e,"compositionend",tc),Ci(e,"change",tc))},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")&&As(e.value)===t))return;const l=t??"";e.value!==l&&(e.value=l)}},zh={deep:!0,created(e,t,n){e._assign=ur(n),Ci(e,"change",()=>{const i=e._modelValue,r=jr(e),o=e.checked,l=e._assign;if(Ue(i)){const c=Bo(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(rc(e,o))})},mounted:nc,beforeUpdate(e,t,n){e._assign=ur(n),nc(e,t,n)}};function nc(e,{value:t,oldValue:n},i){e._modelValue=t,Ue(t)?e.checked=Bo(t,i.props.value)>-1:tr(t)?e.checked=t.has(i.props.value):t!==n&&(e.checked=Ar(t,rc(e,!0)))}const Xs={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?As(jr(l)):jr(l));e._assign(e.multiple?r?new Set(o):o:o[0])}),e._assign=ur(i)},mounted(e,{value:t}){ic(e,t)},beforeUpdate(e,t,n){e._assign=ur(n)},updated(e,{value:t}){ic(e,t)}};function ic(e,t){const n=e.multiple;if(!(n&&!Ue(t)&&!tr(t))){for(let i=0,r=e.options.length;i<r;i++){const o=e.options[i],l=jr(o);if(n)Ue(t)?o.selected=Bo(t,l)>-1:o.selected=t.has(l);else if(Ar(jr(o),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function jr(e){return"_value"in e?e._value:e.value}function rc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Xh=["ctrl","shift","alt","meta"],Yh={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)=>Xh.some(n=>e[`${n}Key`]&&!t.includes(n))},tt=(e,t)=>(n,...i)=>{for(let r=0;r<t.length;r++){const o=Yh[t[r]];if(o&&o(n,t))return}return e(n,...i)},_t={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):$r(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),$r(e,!0),i.enter(e)):i.leave(e,()=>{$r(e,!1)}):$r(e,t))},beforeUnmount(e,{value:t}){$r(e,t)}};function $r(e,t){e.style.display=t?e._vod:"none"}const Gh=Gt({patchProp:Vh},Dh);let sc;function Jh(){return sc||(sc=uh(Gh))}const Zh=(...e)=>{const t=Jh().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=Qh(i);if(!r)return;const o=t._component;!Je(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 Qh(e){return Mt(e)?document.querySelector(e):e}/**!
|
||
* Sortable 1.15.0
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/function oc(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 qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oc(Object(n),!0).forEach(function(i){eg(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oc(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 eg(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 tg(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 ng(e,t){if(e==null)return{};var n=tg(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 ig="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),Ur=ai(/Edge/i),ac=ai(/firefox/i),Wr=ai(/safari/i)&&!ai(/chrome/i)&&!ai(/android/i),lc=ai(/iP(ad|od|hone)/i),uc=ai(/chrome/i)&&ai(/android/i),cc={capture:!1,passive:!1};function ct(e,t,n){e.addEventListener(t,n,!li&&cc)}function rt(e,t,n){e.removeEventListener(t,n,!li&&cc)}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 rg(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function zn(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=rg(e))}return null}var fc=/\s+/g;function pn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(fc," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(fc," ")}}function Ve(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=Ve(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 dc(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 Xn(){var e=document.scrollingElement;return e||document.documentElement}function Ht(e,t,n,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var o,l,c,d,m,g,w;if(e!==window&&e.parentNode&&e!==Xn()?(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&&(Ve(r,"transform")!=="none"||n&&Ve(r,"position")!=="static")){var _=r.getBoundingClientRect();l-=_.top+parseInt(Ve(r,"border-top-width")),c-=_.left+parseInt(Ve(r,"border-left-width")),d=l+o.height,m=c+o.width;break}while(r=r.parentNode);if(i&&e!==window){var R=cr(r||e),x=R&&R.a,O=R&&R.d;R&&(l/=O,c/=x,w/=x,g/=O,d=l+g,m=c+w)}return{top:l,left:c,bottom:d,right:m,width:w,height:g}}}function pc(e,t,n){for(var i=wi(e,!0),r=Ht(e)[t];i;){var o=Ht(i)[n],l=void 0;if(n==="top"||n==="left"?l=r>=o:l=r<=o,!l)return i;if(i===Xn())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]!==Ke.ghost&&(i||l[o]!==Ke.dragged)&&zn(l[o],n.draggable,e,!1)){if(r===t)return l[o];r++}o++}return null}function Ta(e,t){for(var n=e.lastElementChild;n&&(n===Ke.ghost||Ve(n,"display")==="none"||t&&!Gs(n,t));)n=n.previousElementSibling;return n||null}function En(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Ke.clone&&(!t||Gs(e,t))&&n++;return n}function hc(e){var t=0,n=0,i=Xn();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 sg(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 Xn();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=Ve(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 Xn();if(i||t)return n;i=!0}}while(n=n.parentNode);return Xn()}function og(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function _a(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 Vr;function gc(e,t){return function(){if(!Vr){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),Vr=setTimeout(function(){Vr=void 0},t)}}}function ag(){clearTimeout(Vr),Vr=void 0}function mc(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function vc(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 hn="Sortable"+new Date().getTime();function lg(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(Ve(r,"display")==="none"||r===Ke.ghost)){e.push({target:r,rect:Ht(r)});var o=qn({},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(sg(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=Ht(m),_=m.prevFromRect,R=m.prevToRect,x=c.rect,O=cr(m,!0);O&&(w.top-=O.f,w.left-=O.e),m.toRect=w,m.thisAnimationDuration&&_a(_,w)&&!_a(g,w)&&(x.top-w.top)/(x.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(d=cg(x,_,R,r.options)),_a(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){Ve(i,"transition",""),Ve(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,Ve(i,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=ug(i),Ve(i,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),Ve(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Ve(i,"transition",""),Ve(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},l)}}}}function ug(e){return e.offsetWidth}function cg(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=[],Ea={initializeByDefault:!0},Kr={mount:function(t){for(var n in Ea)Ea.hasOwnProperty(n)&&!(n in t)&&(t[n]=Ea[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](qn({sortable:n},i)),n.options[l.pluginName]&&n[l.pluginName][t]&&n[l.pluginName][t](qn({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 fg(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,_=e.originalEvent,R=e.putSortable,x=e.extraEventProperties;if(t=t||n&&n[hn],!!t){var O,U=t.options,P="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!li&&!Ur?O=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(O=document.createEvent("Event"),O.initEvent(i,!0,!0)),O.to=l||n,O.from=c||n,O.item=r||n,O.clone=o,O.oldIndex=d,O.newIndex=m,O.oldDraggableIndex=g,O.newDraggableIndex=w,O.originalEvent=_,O.pullMode=R?R.lastPutMode:void 0;var Z=qn(qn({},x),Kr.getEventProperties(i,t));for(var se in Z)O[se]=Z[se];n&&n.dispatchEvent(O),U[P]&&U[P].call(t,O)}}var dg=["evt"],rn=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=ng(i,dg);Kr.pluginEvent.bind(Ke)(t,n,qn({dragEl:le,parentEl:Pt,ghostEl:Ge,rootEl:xt,nextEl:Bi,lastDownEl:Js,cloneEl:Ot,cloneHidden:Ti,dragStarted:zr,putSortable:Ut,activeSortable:Ke.active,originalEvent:r,oldIndex:pr,oldDraggableIndex:qr,newIndex:gn,newDraggableIndex:_i,hideGhostForTarget:Ec,unhideGhostForTarget:Sc,cloneNowHidden:function(){Ti=!0},cloneNowShown:function(){Ti=!1},dispatchSortableEvent:function(c){Qt({sortable:n,name:c,originalEvent:r})}},o))};function Qt(e){fg(qn({putSortable:Ut,cloneEl:Ot,targetEl:le,rootEl:xt,oldIndex:pr,oldDraggableIndex:qr,newIndex:gn,newDraggableIndex:_i},e))}var le,Pt,Ge,xt,Bi,Js,Ot,Ti,pr,gn,qr,_i,Zs,Ut,hr=!1,Qs=!1,eo=[],ji,Mn,Sa,xa,yc,bc,zr,gr,Xr,Yr=!1,to=!1,no,zt,ka=[],Aa=!1,io=[],ro=typeof document<"u",so=lc,Cc=Ur||li?"cssFloat":"float",pg=ro&&!uc&&!lc&&"draggable"in document.createElement("div"),wc=function(){if(ro){if(li)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Tc=function(t,n){var i=Ve(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&&Ve(o),d=l&&Ve(l),m=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Ht(o).width,g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Ht(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[Cc]==="none"||l&&i[Cc]==="none"&&m+g>r)?"vertical":"horizontal"},hg=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},gg=function(t,n){var i;return eo.some(function(r){var o=r[hn].options.emptyInsertThreshold;if(!(!o||Ta(r))){var l=Ht(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},_c=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 _=(l?c:d).options.group.name;return o===!0||typeof o=="string"&&o===_||o.join&&o.indexOf(_)>-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},Ec=function(){!wc&&Ge&&Ve(Ge,"display","none")},Sc=function(){!wc&&Ge&&Ve(Ge,"display","")};ro&&!uc&&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(le){t=t.touches?t.touches[0]:t;var n=gg(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[hn]._onDragOver(i)}}},mg=function(t){le&&le.parentNode[hn]._isOutsideThisEl(t.target)};function Ke(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[hn]=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 Tc(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:Ke.supportPointer!==!1&&"PointerEvent"in window&&!Wr,emptyInsertThreshold:5};Kr.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);_c(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:pg,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ct(e,"pointerdown",this._onTapStart):(ct(e,"mousedown",this._onTapStart),ct(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ct(e,"dragover",this),ct(e,"dragenter",this)),eo.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),oi(this,lg())}Ke.prototype={constructor:Ke,_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,le):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(Eg(i),!le&&!(/mousedown|pointerdown/.test(l)&&t.button!==0||r.disabled)&&!m.isContentEditable&&!(!this.nativeDraggable&&Wr&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=zn(d,r.draggable,i,!1),!(d&&d.animated)&&Js!==d)){if(pr=En(d),qr=En(d,r.draggable),typeof g=="function"){if(g.call(this,t,d,this)){Qt({sortable:n,rootEl:m,name:"filter",targetEl:d,toEl:i,fromEl:i}),rn("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=zn(m,w.trim(),i,!1),w)return Qt({sortable:n,rootEl:w,name:"filter",targetEl:d,fromEl:i,toEl:i}),rn("filter",n,{evt:t}),!0}),g)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!zn(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&&!le&&i.parentNode===o){var m=Ht(i);if(xt=o,le=i,Pt=le.parentNode,Bi=le.nextSibling,Js=i,Zs=l.group,Ke.dragged=le,ji={target:le,clientX:(n||t).clientX,clientY:(n||t).clientY},yc=ji.clientX-m.left,bc=ji.clientY-m.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,le.style["will-change"]="all",d=function(){if(rn("delayEnded",r,{evt:t}),Ke.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ac&&r.nativeDraggable&&(le.draggable=!0),r._triggerDragStart(t,n),Qt({sortable:r,name:"choose",originalEvent:t}),pn(le,l.chosenClass,!0)},l.ignore.split(",").forEach(function(g){dc(le,g.trim(),La)}),ct(c,"dragover",$i),ct(c,"mousemove",$i),ct(c,"touchmove",$i),ct(c,"mouseup",r._onDrop),ct(c,"touchend",r._onDrop),ct(c,"touchcancel",r._onDrop),ac&&this.nativeDraggable&&(this.options.touchStartThreshold=4,le.draggable=!0),rn("delayStart",this,{evt:t}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ur||li))){if(Ke.eventCanceled){this._onDrop();return}ct(c,"mouseup",r._disableDelayedDrag),ct(c,"touchend",r._disableDelayedDrag),ct(c,"touchcancel",r._disableDelayedDrag),ct(c,"mousemove",r._delayedDragTouchMoveHandler),ct(c,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&ct(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(){le&&La(le),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;rt(t,"mouseup",this._disableDelayedDrag),rt(t,"touchend",this._disableDelayedDrag),rt(t,"touchcancel",this._disableDelayedDrag),rt(t,"mousemove",this._delayedDragTouchMoveHandler),rt(t,"touchmove",this._delayedDragTouchMoveHandler),rt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?ct(document,"pointermove",this._onTouchMove):n?ct(document,"touchmove",this._onTouchMove):ct(document,"mousemove",this._onTouchMove):(ct(le,"dragend",this),ct(xt,"dragstart",this._onDragStart));try{document.selection?ao(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(hr=!1,xt&&le){rn("dragStarted",this,{evt:n}),this.nativeDraggable&&ct(document,"dragover",mg);var i=this.options;!t&&pn(le,i.dragClass,!1),pn(le,i.ghostClass,!0),Ke.active=this,t&&this._appendGhost(),Qt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Mn){this._lastX=Mn.clientX,this._lastY=Mn.clientY,Ec();for(var t=document.elementFromPoint(Mn.clientX,Mn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Mn.clientX,Mn.clientY),t!==n);)n=t;if(le.parentNode[hn]._isOutsideThisEl(t),n)do{if(n[hn]){var i=void 0;if(i=n[hn]._onDragOver({clientX:Mn.clientX,clientY:Mn.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Sc()}},_onTouchMove:function(t){if(ji){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,l=Ge&&cr(Ge,!0),c=Ge&&l&&l.a,d=Ge&&l&&l.d,m=so&&zt&&hc(zt),g=(o.clientX-ji.clientX+r.x)/(c||1)+(m?m[0]-ka[0]:0)/(c||1),w=(o.clientY-ji.clientY+r.y)/(d||1)+(m?m[1]-ka[1]:0)/(d||1);if(!Ke.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(Ge){l?(l.e+=g-(Sa||0),l.f+=w-(xa||0)):l={a:1,b:0,c:0,d:1,e:g,f:w};var _="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");Ve(Ge,"webkitTransform",_),Ve(Ge,"mozTransform",_),Ve(Ge,"msTransform",_),Ve(Ge,"transform",_),Sa=g,xa=w,Mn=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Ge){var t=this.options.fallbackOnBody?document.body:xt,n=Ht(le,!0,so,!0,t),i=this.options;if(so){for(zt=t;Ve(zt,"position")==="static"&&Ve(zt,"transform")==="none"&&zt!==document;)zt=zt.parentNode;zt!==document.body&&zt!==document.documentElement?(zt===document&&(zt=Xn()),n.top+=zt.scrollTop,n.left+=zt.scrollLeft):zt=Xn(),ka=hc(zt)}Ge=le.cloneNode(!0),pn(Ge,i.ghostClass,!1),pn(Ge,i.fallbackClass,!0),pn(Ge,i.dragClass,!0),Ve(Ge,"transition",""),Ve(Ge,"transform",""),Ve(Ge,"box-sizing","border-box"),Ve(Ge,"margin",0),Ve(Ge,"top",n.top),Ve(Ge,"left",n.left),Ve(Ge,"width",n.width),Ve(Ge,"height",n.height),Ve(Ge,"opacity","0.8"),Ve(Ge,"position",so?"absolute":"fixed"),Ve(Ge,"zIndex","100000"),Ve(Ge,"pointerEvents","none"),Ke.ghost=Ge,t.appendChild(Ge),Ve(Ge,"transform-origin",yc/parseInt(Ge.style.width)*100+"% "+bc/parseInt(Ge.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,r=t.dataTransfer,o=i.options;if(rn("dragStart",this,{evt:t}),Ke.eventCanceled){this._onDrop();return}rn("setupClone",this),Ke.eventCanceled||(Ot=vc(le),Ot.removeAttribute("id"),Ot.draggable=!1,Ot.style["will-change"]="",this._hideClone(),pn(Ot,this.options.chosenClass,!1),Ke.clone=Ot),i.cloneId=ao(function(){rn("clone",i),!Ke.eventCanceled&&(i.options.removeCloneOnHide||xt.insertBefore(Ot,le),i._hideClone(),Qt({sortable:i,name:"clone"}))}),!n&&pn(le,o.dragClass,!0),n?(Qs=!0,i._loopId=setInterval(i._emulateDragOver,50)):(rt(document,"mouseup",i._onDrop),rt(document,"touchend",i._onDrop),rt(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,le)),ct(document,"drop",i),Ve(le,"transform","translateZ(0)")),hr=!0,i._dragStartId=ao(i._dragStarted.bind(i,n,t)),ct(document,"selectstart",i),zr=!0,Wr&&Ve(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=Ke.active,g=Zs===d,w=c.sort,_=Ut||m,R,x=this,O=!1;if(Aa)return;function U(be,ot){rn(be,x,qn({evt:t,isOwner:g,axis:R?"vertical":"horizontal",revert:l,dragRect:r,targetRect:o,canSort:w,fromSortable:_,target:i,completed:Z,onMove:function(at,we){return oo(xt,n,le,r,at,Ht(at),t,we)},changed:se},ot))}function P(){U("dragOverAnimationCapture"),x.captureAnimationState(),x!==_&&_.captureAnimationState()}function Z(be){return U("dragOverCompleted",{insertion:be}),be&&(g?m._hideClone():m._showClone(x),x!==_&&(pn(le,Ut?Ut.options.ghostClass:m.options.ghostClass,!1),pn(le,c.ghostClass,!0)),Ut!==x&&x!==Ke.active?Ut=x:x===Ke.active&&Ut&&(Ut=null),_===x&&(x._ignoreWhileAnimating=i),x.animateAll(function(){U("dragOverAnimationComplete"),x._ignoreWhileAnimating=null}),x!==_&&(_.animateAll(),_._ignoreWhileAnimating=null)),(i===le&&!le.animated||i===n&&!i.animated)&&(gr=null),!c.dragoverBubble&&!t.rootEl&&i!==document&&(le.parentNode[hn]._isOutsideThisEl(t.target),!be&&$i(t)),!c.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),O=!0}function se(){gn=En(le),_i=En(le,c.draggable),Qt({sortable:x,name:"change",toEl:n,newIndex:gn,newDraggableIndex:_i,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=zn(i,c.draggable,n,!0),U("dragOver"),Ke.eventCanceled)return O;if(le.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||x._ignoreWhileAnimating===i)return Z(!1);if(Qs=!1,m&&!c.disabled&&(g?w||(l=Pt!==xt):Ut===this||(this.lastPutMode=Zs.checkPull(this,m,le,t))&&d.checkPut(this,m,le,t))){if(R=this._getDirection(t,i)==="vertical",r=Ht(le),U("dragOverValid"),Ke.eventCanceled)return O;if(l)return Pt=xt,P(),this._hideClone(),U("revert"),Ke.eventCanceled||(Bi?xt.insertBefore(le,Bi):xt.appendChild(le)),Z(!0);var L=Ta(n,c.draggable);if(!L||Cg(t,R,this)&&!L.animated){if(L===le)return Z(!1);if(L&&n===t.target&&(i=L),i&&(o=Ht(i)),oo(xt,n,le,r,i,o,t,!!i)!==!1)return P(),L&&L.nextSibling?n.insertBefore(le,L.nextSibling):n.appendChild(le),Pt=n,se(),Z(!0)}else if(L&&bg(t,R,this)){var ke=fr(n,0,c,!0);if(ke===le)return Z(!1);if(i=ke,o=Ht(i),oo(xt,n,le,r,i,o,t,!1)!==!1)return P(),n.insertBefore(le,ke),Pt=n,se(),Z(!0)}else if(i.parentNode===n){o=Ht(i);var p=0,Pe,Me=le.parentNode!==n,ne=!hg(le.animated&&le.toRect||r,i.animated&&i.toRect||o,R),Y=R?"top":"left",Ee=pc(i,"top","top")||pc(le,"top","top"),De=Ee?Ee.scrollTop:void 0;gr!==i&&(Pe=o[Y],Yr=!1,to=!ne&&c.invertSwap||Me),p=wg(t,i,o,R,ne?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,to,gr===i);var Te;if(p!==0){var nt=En(le);do nt-=p,Te=Pt.children[nt];while(Te&&(Ve(Te,"display")==="none"||Te===Ge))}if(p===0||Te===i)return Z(!1);gr=i,Xr=p;var dt=i.nextElementSibling,$e=!1;$e=p===1;var Ie=oo(xt,n,le,r,i,o,t,$e);if(Ie!==!1)return(Ie===1||Ie===-1)&&($e=Ie===1),Aa=!0,setTimeout(yg,30),P(),$e&&!dt?n.appendChild(le):i.parentNode.insertBefore(le,$e?dt:i),Ee&&mc(Ee,0,De-Ee.scrollTop),Pt=le.parentNode,Pe!==void 0&&!to&&(no=Math.abs(Pe-Ht(i)[Y])),se(),Z(!0)}if(n.contains(le))return Z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){rt(document,"mousemove",this._onTouchMove),rt(document,"touchmove",this._onTouchMove),rt(document,"pointermove",this._onTouchMove),rt(document,"dragover",$i),rt(document,"mousemove",$i),rt(document,"touchmove",$i)},_offUpEvents:function(){var t=this.el.ownerDocument;rt(t,"mouseup",this._onDrop),rt(t,"touchend",this._onDrop),rt(t,"pointerup",this._onDrop),rt(t,"touchcancel",this._onDrop),rt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(gn=En(le),_i=En(le,i.draggable),rn("drop",this,{evt:t}),Pt=le&&le.parentNode,gn=En(le),_i=En(le,i.draggable),Ke.eventCanceled){this._nulling();return}hr=!1,to=!1,Yr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Oa(this.cloneId),Oa(this._dragStartId),this.nativeDraggable&&(rt(document,"drop",this),rt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Wr&&Ve(document.body,"user-select",""),Ve(le,"transform",""),t&&(zr&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),(xt===Pt||Ut&&Ut.lastPutMode!=="clone")&&Ot&&Ot.parentNode&&Ot.parentNode.removeChild(Ot),le&&(this.nativeDraggable&&rt(le,"dragend",this),La(le),le.style["will-change"]="",zr&&!hr&&pn(le,Ut?Ut.options.ghostClass:this.options.ghostClass,!1),pn(le,this.options.chosenClass,!1),Qt({sortable:this,name:"unchoose",toEl:Pt,newIndex:null,newDraggableIndex:null,originalEvent:t}),xt!==Pt?(gn>=0&&(Qt({rootEl:Pt,name:"add",toEl:Pt,fromEl:xt,originalEvent:t}),Qt({sortable:this,name:"remove",toEl:Pt,originalEvent:t}),Qt({rootEl:Pt,name:"sort",toEl:Pt,fromEl:xt,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:Pt,originalEvent:t})),Ut&&Ut.save()):gn!==pr&&gn>=0&&(Qt({sortable:this,name:"update",toEl:Pt,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:Pt,originalEvent:t})),Ke.active&&((gn==null||gn===-1)&&(gn=pr,_i=qr),Qt({sortable:this,name:"end",toEl:Pt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){rn("nulling",this),xt=le=Pt=Ge=Bi=Ot=Js=Ti=ji=Mn=zr=gn=_i=pr=qr=gr=Xr=Ut=Zs=Ke.dragged=Ke.ghost=Ke.clone=Ke.active=null,io.forEach(function(t){t.checked=!0}),io.length=Sa=xa=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":le&&(this._onDragOver(t),vg(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],zn(n,l.draggable,this.el,!1)&&t.push(n.getAttribute(l.dataIdAttr)||_g(n));return t},sort:function(t,n){var i={},r=this.el;this.toArray().forEach(function(o,l){var c=r.children[l];zn(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 zn(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=Kr.modifyOption(this,t,n);typeof r<"u"?i[t]=r:i[t]=n,t==="group"&&_c(i)},destroy:function(){rn("destroy",this);var t=this.el;t[hn]=null,rt(t,"mousedown",this._onTapStart),rt(t,"touchstart",this._onTapStart),rt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(rt(t,"dragover",this),rt(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(!Ti){if(rn("hideClone",this),Ke.eventCanceled)return;Ve(Ot,"display","none"),this.options.removeCloneOnHide&&Ot.parentNode&&Ot.parentNode.removeChild(Ot),Ti=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ti){if(rn("showClone",this),Ke.eventCanceled)return;le.parentNode==xt&&!this.options.group.revertClone?xt.insertBefore(Ot,le):Bi?xt.insertBefore(Ot,Bi):xt.appendChild(Ot),this.options.group.revertClone&&this.animate(le,Ot),Ve(Ot,"display",""),Ti=!1}}};function vg(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[hn],g=m.options.onMove,w;return window.CustomEvent&&!li&&!Ur?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||Ht(t),d.willInsertAfter=c,d.originalEvent=l,e.dispatchEvent(d),g&&(w=g.call(m,d,l)),w}function La(e){e.draggable=!1}function yg(){Aa=!1}function bg(e,t,n){var i=Ht(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 Cg(e,t,n){var i=Ht(Ta(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 wg(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,_=!1;if(!l){if(c&&no<m*r){if(!Yr&&(Xr===1?d>g+m*o/2:d<w-m*o/2)&&(Yr=!0),Yr)_=!0;else if(Xr===1?d<g+no:d>w-no)return-Xr}else if(d>g+m*(1-r)/2&&d<w-m*(1-r)/2)return Tg(t)}return _=_||l,_&&(d<g+m*o/2||d>w-m*o/2)?d>g+m/2?1:-1:0}function Tg(e){return En(le)<En(e)?1:-1}function _g(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 Eg(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 Oa(e){return clearTimeout(e)}ro&&ct(document,"touchmove",function(e){(Ke.active||hr)&&e.cancelable&&e.preventDefault()}),Ke.utils={on:ct,off:rt,css:Ve,find:dc,is:function(t,n){return!!zn(t,n,t,!1)},extend:og,throttle:gc,closest:zn,toggleClass:pn,clone:vc,index:En,nextTick:ao,cancelNextTick:Oa,detectDirection:Tc,getChild:fr},Ke.get=function(e){return e[hn]},Ke.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&&(Ke.utils=qn(qn({},Ke.utils),i.utils)),Kr.mount(i)})},Ke.create=function(e,t){return new Ke(e,t)},Ke.version=ig;var Nt=[],Gr,Da,Pa=!1,Ia,Na,lo,Jr;function Sg(){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?ct(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ct(document,"pointermove",this._handleFallbackAutoScroll):i.touches?ct(document,"touchmove",this._handleFallbackAutoScroll):ct(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?rt(document,"dragover",this._handleAutoScroll):(rt(document,"pointermove",this._handleFallbackAutoScroll),rt(document,"touchmove",this._handleFallbackAutoScroll),rt(document,"mousemove",this._handleFallbackAutoScroll)),xc(),uo(),ag()},nulling:function(){lo=Da=Gr=Pa=Jr=Ia=Na=null,Nt.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||Ur||li||Wr){Ra(n,this.options,c,i);var d=wi(c,!0);Pa&&(!Jr||o!==Ia||l!==Na)&&(Jr&&xc(),Jr=setInterval(function(){var m=wi(document.elementFromPoint(o,l),!0);m!==d&&(d=m,uo()),Ra(n,r.options,m,i)},10),Ia=o,Na=l)}else{if(!this.options.bubbleScroll||wi(c,!0)===Xn()){uo();return}Ra(n,this.options,wi(c,!1),!1)}}},oi(e,{pluginName:"scroll",initializeByDefault:!0})}function uo(){Nt.forEach(function(e){clearInterval(e.pid)}),Nt=[]}function xc(){clearInterval(Jr)}var Ra=gc(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=Xn(),m=!1,g;Da!==n&&(Da=n,uo(),Gr=t.scroll,g=t.scrollFn,Gr===!0&&(Gr=wi(n,!0)));var w=0,_=Gr;do{var R=_,x=Ht(R),O=x.top,U=x.bottom,P=x.left,Z=x.right,se=x.width,L=x.height,ke=void 0,p=void 0,Pe=R.scrollWidth,Me=R.scrollHeight,ne=Ve(R),Y=R.scrollLeft,Ee=R.scrollTop;R===d?(ke=se<Pe&&(ne.overflowX==="auto"||ne.overflowX==="scroll"||ne.overflowX==="visible"),p=L<Me&&(ne.overflowY==="auto"||ne.overflowY==="scroll"||ne.overflowY==="visible")):(ke=se<Pe&&(ne.overflowX==="auto"||ne.overflowX==="scroll"),p=L<Me&&(ne.overflowY==="auto"||ne.overflowY==="scroll"));var De=ke&&(Math.abs(Z-r)<=l&&Y+se<Pe)-(Math.abs(P-r)<=l&&!!Y),Te=p&&(Math.abs(U-o)<=l&&Ee+L<Me)-(Math.abs(O-o)<=l&&!!Ee);if(!Nt[w])for(var nt=0;nt<=w;nt++)Nt[nt]||(Nt[nt]={});(Nt[w].vx!=De||Nt[w].vy!=Te||Nt[w].el!==R)&&(Nt[w].el=R,Nt[w].vx=De,Nt[w].vy=Te,clearInterval(Nt[w].pid),(De!=0||Te!=0)&&(m=!0,Nt[w].pid=setInterval(function(){i&&this.layer===0&&Ke.active._onTouchMove(lo);var dt=Nt[this.layer].vy?Nt[this.layer].vy*c:0,$e=Nt[this.layer].vx?Nt[this.layer].vx*c:0;typeof g=="function"&&g.call(Ke.dragged.parentNode[hn],$e,dt,e,lo,Nt[this.layer].el)!=="continue"||mc(Nt[this.layer].el,$e,dt)}.bind({layer:w}),24))),w++}while(t.bubbleScroll&&_!==d&&(_=wi(_,!1)));Pa=m}},30),kc=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 Ma(){}Ma.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:kc},oi(Ma,{pluginName:"revertOnSpill"});function Fa(){}Fa.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:kc},oi(Fa,{pluginName:"removeOnSpill"}),Ke.mount(new Sg),Ke.mount(Fa,Ma);const xg=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===l?(c--,c===0&&(o="",l=""),r+=g):(g===o&&c++,r+=g)}return r!==""&&d.push(r.trim()),d},oe={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 xg(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},getLang(e,t,n){return n[t]&&n[t].lang&&n[t].lang[e]?n[t].lang[e]:n.en_US&&n.en_US.lang&&n.en_US.lang[e]?n.en_US.lang[e]: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}},Yn={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}},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 oe.getLang(e,this.languageCode,this.languages)},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=l.replace(/\r/g,`
|
||
`),l.split(`
|
||
`).forEach(d=>{if(d===""||d.trim()==="")return;let m=d.split(",");if(m.length<2)return;let g=m[0].trim(),w=m[1].trim();g===""||w===""||o(g,w)}),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,kg=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,Ag=/\.\d*(?:0|9){10}\d*$/,Ac=(e,t=1e11)=>Ag.test(String(e))?Math.round(e*t)/t:e,Lg=Rp({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&&!kg.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Ui(e)&&(e=0),this.setValue(Ac(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Ui(e)&&(e=0),this.setValue(Ac(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)}}}),sn=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},Og=["disabled"],Dg=["name","value","min","max","step","readonly","disabled","placeholder"],Pg=["disabled"];function Ig(e,t,n,i,r,o){return N(),B("div",{class:St(["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?(N(),B("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]=tt((...l)=>e.decrease&&e.decrease(...l),["prevent"]))},null,8,Og)):We("",!0),T("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,Dg),e.controls?(N(),B("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]=tt((...l)=>e.increase&&e.increase(...l),["prevent"]))},null,8,Pg)):We("",!0)],2)}const Ng=sn(Lg,[["render",Ig]]),Rg={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:[]}]}},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(){[{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(),oe.hasBrackets(n)&&(n=oe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags();else{oe.hasBrackets(n)?(n=oe.replaceBrackets(n),n=[n]):n=oe.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(),oe.hasBrackets(n)&&(n=oe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags()},300)}}},Mg={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 Lc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ba="__autosizeInputGhost",Fg={" ":"nbsp","<":"lt",">":"gt"};function Hg(e){return"&"+Fg[e]+";"}function Bg(e){return e.replace(/\s|<|>/g,Hg)}function jg(){var e=document.createElement("div");return e.id=Ba,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 $g=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(Ba)||jg();c.style.cssText+=i,c.innerHTML=Bg(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(Ba);l&&l.parentNode.removeChild(l)}};const Ug=Ha($g),Wg={data(){return{tagClickTimeId:0}},mounted(){oe.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=oe.getTagWeightNum(e.value),e.weightNum=e.weightNum<=0?1:e.weightNum,e.incWeight=oe.getTagIncWeight(e.value),e.decWeight=oe.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(oe.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(oe.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);i!==!1&&(e.isEmbedding=!0,e.value=i)}}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]&&Ug(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=oe.escapeHtml(n),t.incWeight>0){n=oe.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=oe.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=oe.hasBrackets(r);l[0]==="("&&l[1]===")"&&(r=oe.setLayers(r,0,l[0],l[1]),o!==""&&(o=oe.setLayers(o,0,l[0],l[1]))),r=r.replace(oe.weightNumRegex,"$1"),o!==""&&(o=o.replace(oe.weightNumRegex,"$1"))}else{if(!oe.weightNumRegex.test(r)){let l=oe.hasBrackets(r);l?(r=oe.setLayers(r,1,l[0],l[1],":"+i),o!==""&&(o=oe.setLayers(o,1,l[0],l[1],":"+i))):(r=r+":"+i,o!==""&&(o=o+":"+i))}oe.hasBrackets(r)||(r=oe.setLayers(r,1,"(",")"),o!==""&&(o=oe.setLayers(o,1,"(",")")))}r!==n.value&&(n.value=r,o!==""&&(n.localValue=o),this._setTag(n))}else{const l=oe.hasBrackets(r);l[0]==="<"&&l[1]===">"?i=.1:this.autoKeepWeightZero?(n.value=r.replace(oe.weightNumRegex,"$1:0"),o!==""&&(n.localValue=n.localValue.replace(oe.weightNumRegex,"$1:0"))):(n.value=r.replace(oe.weightNumRegex,"$1"),o!==""&&(n.localValue=n.localValue.replace(oe.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=oe.setLayers(i,0,"[","]"),r!==""&&(r=oe.setLayers(r,0,"[","]"));let o=n.incWeight;o+=t,o<0&&(o=0),n.incWeight=o,n.decWeight=0,i=oe.setLayers(i,o,"(",")"),r!==""&&(r=oe.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=oe.setLayers(i,0,"(",")"),r!==""&&(r=oe.setLayers(r,0,"(",")"));let o=n.decWeight;o+=t,o<0&&(o=0),n.incWeight=0,n.decWeight=o,i=oe.setLayers(i,o,"[","]"),r!==""&&(r=oe.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()})}}},Vg={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})}}},Kg=["innerHTML"];function qg(e,t,n,i,r,o){return fe((N(),B("div",{class:St(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:r.svgCode},null,10,Kg)),[[_t,r.svgCode]])}const Fn=sn(Vg,[["render",qg]]),zg={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=oe.escapeHtml(t),n=oe.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 Xg(e,t,n,i,r,o){return N(),B("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...l)=>o.hide&&o.hide(...l))},null,512)}const Yg={name:"PhystonPrompt",components:{HighlightPrompt:sn(zg,[["render",Xg]]),VueNumberInput:Ng,IconSvg:Fn},mixins:[Yn,Rg,Mg,Wg],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 oe.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=oe.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 R of l)if(R.value===d){m=R;break}const g=m?m.localValue:"",w=m?m.disabled:!1,_=this._appendTag(d,g,w,-1,"text");!m&&_!==-1&&o.push(_)}}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=oe.replaceTag(r.value);c!==r.value&&(r.value=c,this._setTag(r));let d=oe.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(oe.weightNumRegex,"$1:"+r.weightNum),r.localValue!==""&&(r.localValue=r.localValue.replace(oe.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 _=[" BREAK"," ADDCOL"," ADDROW"," ADDCOMM"," ADDBASE"];for(const R of _)r.value.endsWith(R)&&(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,oe.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=Ke.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=>{oe.insertBefore(d,n)}),c.forEach(d=>{oe.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=oe.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,_)=>{w.forEach(R=>{c(R,_)})},c=(w,_)=>{this.canOneTranslate?(this.loading[w.id+"_local"]=_,this.loading[w.id+"_en"]=_):w.toLocal?this.loading[w.id+"_local"]=_:this.loading[w.id+"_en"]=_},d=(w,_)=>{w.toLocal?w.localValue=_:(w.localValue=w.value,w.value=_),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 _=this.tags[w],R=m(_);if(R!==_.value){_.localValue=R;return}if(oe.canTranslate(_.value)){if(_.isEnglish=oe.isEnglishByLangCode(_.value,this.languageCode),_.isEnglish===-1)t?_.toLocal=!0:_.toLocal=!1;else if(_.isEnglish===0)if(t)if(_.localValue==="")_.localValue=_.value,_.toLocal=!1;else{const x=_.value;_.value=_.localValue,_.localValue=x}else _.toLocal=!1;else _.toLocal=!0;c(_,!0),o.push(_)}});const g=w=>{if(w.length<=0){l(w,!1),i();return}let _={};w.forEach((x,O)=>{let U=x.toLocal?"en_US":this.languageCode,P=x.toLocal?this.languageCode:"en_US",Z=U+"."+P;_[Z]||(_[Z]={fromLang:U,toLang:P,tags:[]}),_[Z].tags.push(x)});const R=()=>{let x=_[Object.keys(_)[0]];if(!x){i();return}let O=x.tags.map(U=>m(U));this.gradioAPI.translates(O,x.fromLang,x.toLang,this.translateApi,this.translateApiConfig).then(U=>{U.success?(U.translated_text.forEach((Z,se)=>{let L=x.tags[se];Z!==""&&d(L,Z),c(L,!1)}),delete _[Object.keys(_)[0]],R()):(l(w,!1),this.$toastr.error(U.message),r(U.message))}).catch(U=>{l(w,!1),this.$toastr.error(U.message),r(U.message)})};R()};if(this.tagCompleteFile){let w=[];o.forEach(_=>{const R=oe.splitTag(_.value);R.value!==_.value&&(_.value=R.value,_.splits=R),_.toLocal?w.push(this.translateToLocalByCSV(_.value)):w.push(this.translateToEnByCSV(_.value))}),Promise.all(w).then(_=>{let R=[];_.forEach((x,O)=>{let U=o[O];U.splits&&(U.value=U.splits.left+U.value+U.splits.right),x===""?R.push(U):(U.splits&&(x=U.splits.left+x+U.splits.right),c(U,!1),d(U,x))}),n?g(R):(l(R,!1),i())}).catch(_=>{l(o,!1),this.$toastr.error(_),r(_)})}else n?g(o):(l(o,!1),i())})}}},Gg=["name"],Jg={class:"prompt-header"},Zg={class:"prompt-header-title"},Qg={class:"prompt-header-extend"},em={class:"extend-content"},tm={class:"extend-btn-group"},nm={class:"setting-box"},im={key:0,class:"gradio-checkbox hover-scale-120"},rm=["checked"],sm={class:"gradio-checkbox hover-scale-120"},om=["checked"],am={class:"gradio-checkbox hover-scale-120"},lm=["checked"],um={class:"gradio-checkbox hover-scale-120"},cm=["checked"],fm={class:"prompt-header-extend"},dm={class:"extend-content"},pm={class:"extend-btn-group"},hm={key:0,class:"prompt-header-extend"},gm={class:"extend-content"},mm={class:"extend-btn-group"},vm={class:"prompt-header-extend"},ym={class:"extend-content"},bm={class:"extend-btn-group"},Cm={key:1,class:"prompt-header-extend"},wm={class:"extend-content"},Tm={class:"extend-btn-group"},_m={class:"prompt-header-extend prompt-append"},Em={class:"extend-content"},Sm={class:"gradio-checkbox hover-scale-120"},xm={key:0},km=["checked"],Am={key:1},Lm=["checked"],Om=["placeholder"],Dm=["onClick"],Pm={class:"arrow-right"},Im=["onMouseleave","onMouseenter","onClick"],Nm={key:0,class:"tags-name"},Rm={key:1,class:"tags-name"},Mm={class:"tags-detail"},Fm={class:"tags-list"},Hm={key:0,class:"item-wrap"},Bm={key:1,class:"tags-item"},jm={class:"item-tag-value"},$m={class:"item-tag-local-value"},Um={class:"prompt-tags-list",ref:"promptTagsList"},Wm=["data-id"],Vm=["onMouseenter","onMousemove"],Km={class:"prompt-tag-edit"},qm=["onClick","onDblclick","innerHTML"],zm=["placeholder","value","onBlur","onKeydown","onChange"],Xm=["onClick"],Ym=["onClick"],Gm=["onClick"],Jm=["onClick"],Zm=["onClick"],Qm=["onClick"],ev=["onClick"],tv=["onClick"],nv=["onClick"],iv=["onClick"],rv={class:"prompt-local-language"},sv=["onClick"],ov={class:"local-language"},av=["data-id"],lv={class:"btns-title"};function uv(e,t,n,i,r,o){const l=Lt("icon-svg"),c=Lt("vue-number-input"),d=Lt("highlight-prompt"),m=Us("tooltip");return N(),B("div",{class:"physton-prompt",name:n.name},[T("div",{class:St(["prompt-main",n.hidePanel?"fold":""]),onClick:t[51]||(t[51]=(...g)=>o.onPromptMainClick&&o.onPromptMainClick(...g))},[T("div",Jg,[T("div",{class:"prompt-unfold",onClick:t[0]||(t[0]=(...g)=>e.onUnfoldClick&&e.onUnfoldClick(...g))},[pe(l,{class:"hover-scale-120",name:"unfold"})]),T("div",Zg,ae(n.neg?e.getLang("negative_prompt"):e.getLang("prompt")),1),fe(T("div",{class:"prompt-header-counter"},"("+ae(r.counterText)+")",513),[[_t,r.counterText]]),T("div",Qg,[T("div",em,[T("div",tm,[fe((N(),B("div",{class:"extend-btn-item",onClick:t[1]||(t[1]=g=>e.$emit("click:selectLanguage",g))},[pe(l,{class:"hover-scale-120",name:"i18n"})])),[[m,"Language: "+e.langName]]),T("div",{class:St(["extend-btn-item",n.isLatestVersion?"":"red-dot"])},[fe(pe(l,{class:"hover-scale-120",name:"setting"},null,512),[[m,e.getLang("setting_desc")]]),T("div",nm,[o.translateApiItem.name&&!o.isEnglish?fe((N(),B("div",{key:0,class:"extend-btn-item",onClick:t[2]||(t[2]=g=>e.$emit("click:translateApi",g))},[pe(l,{class:"hover-scale-120",name:"api"})])),[[m,e.getLang("translate_api")+": "+o.translateApiItem.name]]):We("",!0),fe((N(),B("div",{class:"extend-btn-item",onClick:t[3]||(t[3]=g=>e.$emit("click:promptFormat",g))},[pe(l,{class:"hover-scale-120",name:"format"})])),[[m,e.getLang("prompt_format")]]),fe((N(),B("div",{class:"extend-btn-item",onClick:t[4]||(t[4]=g=>e.$emit("click:selectTheme",g))},[pe(l,{class:"hover-scale-120",name:"theme"})])),[[m,e.getLang("theme_extension")]]),fe((N(),B("div",{class:"extend-btn-item",onClick:t[5]||(t[5]=g=>e.$emit("click:switchTheme",g))},[pe(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")]]),fe((N(),B("div",{class:St(["extend-btn-item",n.isLatestVersion?"":"red-dot"]),onClick:t[6]||(t[6]=g=>e.$emit("click:showAbout",g))},[pe(l,{class:"hover-scale-120",name:"about"})],2)),[[m,e.getLang("about_desc")]]),o.isEnglish?We("",!0):(N(),B(Re,{key:1},[n.canOneTranslate?(N(),B("div",im,[fe((N(),B("label",null,[T("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,rm),pe(l,{name:"translate"})])),[[m,e.getLang("auto_translate")]])])):(N(),B(Re,{key:1},[T("div",sm,[fe((N(),B("label",null,[T("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,om),pe(l,{name:"translate"})])),[[m,e.getLang("auto_translate_to_local_language")]])]),T("div",am,[fe((N(),B("label",null,[T("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,lm),pe(l,{name:"english"})])),[[m,e.getLang("auto_translate_to_english")]])])],64))],64)),T("div",um,[fe((N(),B("label",null,[T("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,cm),pe(l,{name:"tooltip"})])),[[m,e.getLang("whether_to_enable_tooltip")]])])])],2)])])]),T("div",fm,[T("div",dm,[T("div",pm,[fe((N(),B("div",{class:"extend-btn-item",ref:"historyButton",onClick:t[11]||(t[11]=g=>e.$emit("click:showHistory",g))},[pe(l,{class:"hover-scale-120",name:"history"})])),[[m,e.getLang("history")]]),fe((N(),B("div",{class:"extend-btn-item",ref:"favoriteButton",onClick:t[12]||(t[12]=g=>e.$emit("click:showFavorite",g))},[pe(l,{class:"hover-scale-120",name:"favorite"})])),[[m,e.getLang("favorite")]])])])]),o.isEnglish?We("",!0):(N(),B("div",hm,[T("div",gm,[T("div",mm,[n.canOneTranslate?fe((N(),B("div",{key:0,class:"extend-btn-item",onClick:t[13]||(t[13]=(...g)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...g))},[r.loading.all_local?We("",!0):(N(),mt(l,{key:0,class:"hover-scale-120",name:"translate"})),r.loading.all_local?(N(),mt(l,{key:1,class:"hover-scale-120",name:"loading"})):We("",!0)])),[[m,e.getLang("one_translate_all_keywords")]]):(N(),B(Re,{key:1},[fe((N(),B("div",{class:"extend-btn-item",onClick:t[14]||(t[14]=(...g)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...g))},[r.loading.all_local?We("",!0):(N(),mt(l,{key:0,class:"hover-scale-120",name:"translate"})),r.loading.all_local?(N(),mt(l,{key:1,class:"hover-scale-120",name:"loading"})):We("",!0)])),[[m,e.getLang("translate_keywords_to_local_language")]]),fe((N(),B("div",{class:"extend-btn-item",onClick:t[15]||(t[15]=(...g)=>e.onTranslatesToEnglishClick&&e.onTranslatesToEnglishClick(...g))},[r.loading.all_en?We("",!0):(N(),mt(l,{key:0,class:"hover-scale-120",name:"english"})),r.loading.all_en?(N(),mt(l,{key:1,class:"hover-scale-120",name:"loading"})):We("",!0)])),[[m,e.getLang("translate_all_keywords_to_english")]])],64))])])])),T("div",vm,[T("div",ym,[T("div",bm,[fe((N(),B("div",{class:"extend-btn-item",onClick:t[16]||(t[16]=(...g)=>e.onCopyAllTagsClick&&e.onCopyAllTagsClick(...g))},[pe(l,{class:"hover-scale-120",name:"copy"})])),[[m,e.getLang("copy_keywords_to_clipboard")]]),fe((N(),B("div",{class:"extend-btn-item",onClick:t[17]||(t[17]=(...g)=>e.onDeleteAllTagsClick&&e.onDeleteAllTagsClick(...g))},[pe(l,{class:"hover-scale-120",name:"remove"})])),[[m,e.getLang("delete_all_keywords")]])])])]),n.neg?We("",!0):(N(),B("div",Cm,[T("div",wm,[T("div",Tm,[fe((N(),B("div",{class:"extend-btn-item",onClick:t[18]||(t[18]=g=>e.$emit("click:showChatgpt",g))},[pe(l,{class:"hover-scale-120",name:"chatgpt"})])),[[m,e.getLang("use_chatgpt_gen_prompts")]])])])])),T("div",_m,[T("div",Em,[T("div",Sm,[n.hideDefaultInput?fe((N(),B("label",xm,[T("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[19]||(t[19]=g=>e.$emit("update:hideDefaultInput",!g.target.checked))},null,40,km),pe(l,{name:"input"})])),[[m,e.getLang("show_default_input_box")]]):fe((N(),B("label",Am,[T("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[20]||(t[20]=g=>e.$emit("update:hideDefaultInput",!g.target.checked))},null,40,Lm),pe(l,{name:"input"})])),[[m,e.getLang("hide_default_input_box")]])]),fe(T("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-append",ref:"promptTagAppend",placeholder:e.getLang("please_enter_new_keyword"),onFocus:t[21]||(t[21]=(...g)=>e.onAppendTagFocus&&e.onAppendTagFocus(...g)),onBlur:t[22]||(t[22]=(...g)=>e.onAppendTagBlur&&e.onAppendTagBlur(...g)),onKeyup:t[23]||(t[23]=(...g)=>e.onAppendTagKeyUp&&e.onAppendTagKeyUp(...g)),onKeydown:t[24]||(t[24]=(...g)=>e.onAppendTagKeyDown&&e.onAppendTagKeyDown(...g))},null,40,Om),[[m,e.getLang("enter_to_add")]]),fe(T("div",{class:"prompt-append-list",ref:"promptAppendList",style:Kt(e.appendListStyle)},[(N(!0),B(Re,null,vt(e.appendList,(g,w)=>(N(),B("div",{key:g.type,class:St(["prompt-append-group",e.appendListSelected===w?"selected":""])},[T("div",{class:"append-group-name",onClick:_=>e.onAppendGroupClick(w,null,_)},[g.icon==="wrap"?(N(),mt(l,{key:0,class:"name-icon",name:"wrap"})):g.icon==="history"?(N(),mt(l,{key:1,class:"name-icon",name:"history"})):g.icon==="favorite"?(N(),mt(l,{key:2,class:"name-icon",name:"favorite"})):We("",!0),Ft(" "+ae(e.appendListItemName(g))+" ",1),fe(T("span",Pm,null,512),[[_t,g.children.length>0]])],8,Dm),fe(T("div",{class:"append-group-list",ref_for:!0,ref:"promptAppendListChildren"},[(N(!0),B(Re,null,vt(g.children,(_,R)=>(N(),B("div",{key:R,ref_for:!0,ref:"promptAppendListChild",class:St(["append-item",e.appendListChildSelected===R?"selected":""]),onMouseleave:x=>e.onAppendListChildMouseLeave(w,R,x),onMouseenter:x=>e.onAppendListChildMouseEnter(w,R,x),onClick:x=>e.onAppendGroupClick(w,R,x)},[g.type==="favorite"||g.type==="history"?(N(),B(Re,{key:0},[_.name?(N(),B("div",Nm,ae(_.name),1)):(N(),B("div",Rm,ae(_.prompt),1))],64)):We("",!0)],42,Im))),128))],512),[[_t,g.children.length>0]]),fe(T("div",Mm,[T("div",Fm,[(N(!0),B(Re,null,vt(e.appendListChildItemTags,(_,R)=>(N(),B(Re,{key:R},[_.type&&_.type==="wrap"?(N(),B("div",Hm)):(N(),B("div",Bm,[T("div",jm,ae(_.value),1),T("div",$m,ae(_.localValue),1)]))],64))),128))])],512),[[_t,e.appendListSelected!==null&&e.appendListChildSelected!==null&&e.appendListSelected===w&&(g.type==="favorite"||g.type==="history")]])],2))),128))],4),[[_t,e.showAppendList]])])])]),T("div",{class:St(["prompt-tags",r.droping?"droping":"",e.dropIsSelecting||e.dropIsEnd&&e.dropTags.length?"selecting":""]),ref:"promptTags",onMousedown:t[48]||(t[48]=(...g)=>e.onDropMouseDown&&e.onDropMouseDown(...g)),onMousemove:t[49]||(t[49]=(...g)=>e.onDropMouseMove&&e.onDropMouseMove(...g)),onMouseup:t[50]||(t[50]=(...g)=>e.onDropMouseUp&&e.onDropMouseUp(...g))},[T("div",Um,[(N(!0),B(Re,null,vt(r.tags,(g,w)=>(N(),B("div",{key:g.id,class:St(["prompt-tag",g.disabled?"disabled":"",g.type==="wrap"?"wrap-tag":""]),ref_for:!0,ref:"promptTag-"+g.id,"data-id":g.id},[T("div",{class:"prompt-tag-main",onMouseenter:_=>e.onTagMouseEnter(g.id),onMousemove:tt(_=>e.onTagMouseMove(g.id),["stop"])},[T("div",Km,[g.type==="wrap"?fe((N(),B("div",{key:0,class:"prompt-tag-value",ref_for:!0,ref:"promptTagValue-"+g.id,style:{width:"100%"}},[pe(l,{name:"wrap"})])),[[m,e.getLang("line_break_character")+"<br/>"+e.getLang("drop_to_order")]]):(N(),B(Re,{key:1},[fe(T("div",{class:St(g.classes),ref_for:!0,ref:"promptTagValue-"+g.id,onClick:_=>e.onTagClick(g.id,_),onDblclick:_=>e.onTagDblclick(g.id),innerHTML:e.renderTag(g.id)},null,42,qm),[[_t,!r.editing[g.id]],[m,e.getLang("click_to_edit")+"<br/>"+e.getLang("dblclick_to_disable")+"<br/>"+e.getLang("drop_to_order")]]),fe(T("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[25]||(t[25]=tt(()=>{},["stop"])),onMousemove:t[26]||(t[26]=tt(()=>{},["stop"])),onMouseup:t[27]||(t[27]=tt(()=>{},["stop"])),onBlur:_=>e.onTagInputBlur(g.id),onKeydown:_=>e.onTagInputKeyDown(g.id,_),onChange:_=>e.onTagInputChange(g.id,_)},null,40,zm),[[_t,r.editing[g.id]]])],64)),T("div",{class:"btn-tag-delete",ref_for:!0,ref:"promptTagDelete-"+g.id,onClick:_=>e.onDeleteTagClick(g.id),onMousedown:t[28]||(t[28]=tt(()=>{},["stop"])),onMousemove:t[29]||(t[29]=tt(()=>{},["stop"])),onMouseup:t[30]||(t[30]=tt(()=>{},["stop"]))},[pe(l,{name:"close"})],40,Xm)]),fe(T("div",{class:"btn-tag-extend",onMousedown:t[31]||(t[31]=tt(()=>{},["stop"])),onMousemove:t[32]||(t[32]=tt(()=>{},["stop"])),onMouseup:t[33]||(t[33]=tt(()=>{},["stop"]))},[pe(c,{class:"input-number","model-value":g.weightNum,center:"",controls:"",min:0,step:.1,size:"small","onUpdate:modelValue":_=>e.onTagWeightNumChange(g.id,_)},null,8,["model-value","step","onUpdate:modelValue"]),fe((N(),B("button",{type:"button",onClick:_=>e.onIncWeightClick(g.id,1)},[pe(l,{name:"weight-parentheses-inc"})],8,Ym)),[[m,e.getLang("increase_weight_add_parentheses")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onIncWeightClick(g.id,-1)},[pe(l,{name:"weight-parentheses-dec"})],8,Gm)),[[m,e.getLang("increase_weight_subtract_parentheses")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onDecWeightClick(g.id,1)},[pe(l,{name:"weight-brackets-inc"})],8,Jm)),[[m,e.getLang("decrease_weight_add_brackets")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onDecWeightClick(g.id,-1)},[pe(l,{name:"weight-brackets-dec"})],8,Zm)),[[m,e.getLang("decrease_weight_subtract_brackets")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onWrapTagClick(g.id)},[pe(l,{name:"wrap"})],8,Qm)),[[m,e.getLang("line_break_character")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onTranslateToEnglishClick(g.id)},[r.loading[g.id+"_en"]?We("",!0):(N(),mt(l,{key:0,name:"english"})),r.loading[g.id+"_en"]?(N(),mt(l,{key:1,name:"loading"})):We("",!0)],8,ev)),[[m,e.getLang("translate_keyword_to_english")],[_t,!o.isEnglish]]),fe((N(),B("button",{type:"button",onClick:_=>o.copy(g.value)},[pe(l,{name:"copy"})],8,tv)),[[m,e.getLang("copy_to_clipboard")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onFavoriteTagClick(g.id)},[g.isFavorite?(N(),mt(l,{key:0,name:"favorite-yes"})):We("",!0),g.isFavorite?We("",!0):(N(),mt(l,{key:1,name:"favorite-no"}))],8,nv)),[[m,e.getLang(g.isFavorite?"remove_from_favorite":"add_to_favorite")]]),fe((N(),B("button",{type:"button",onClick:_=>e.onDisabledTagClick(g.id)},[g.disabled?We("",!0):(N(),mt(l,{key:0,name:"disabled"})),g.disabled?(N(),mt(l,{key:1,name:"enable"})):We("",!0)],8,iv)),[[m,e.getLang(g.disabled?"enable_keyword":"disable_keyword")]])],544),[[_t,g.type==="text"||!g.type]])],40,Vm),fe(T("div",rv,[fe((N(),B("div",{class:"translate-to-local hover-scale-120",onClick:_=>e.onTranslateToLocalClick(g.id),onMousedown:t[34]||(t[34]=tt(()=>{},["stop"])),onMousemove:t[35]||(t[35]=tt(()=>{},["stop"])),onMouseup:t[36]||(t[36]=tt(()=>{},["stop"]))},[r.loading[g.id+"_local"]?We("",!0):(N(),mt(l,{key:0,name:"translate"})),r.loading[g.id+"_local"]?(N(),mt(l,{key:1,name:"loading"})):We("",!0)],40,sv)),[[m,e.getLang("translate_keyword_to_local_language")]]),T("div",ov,ae(g.localValue),1)],512),[[_t,!o.isEnglish&&(g.type==="text"||!g.type)]])],10,Wm))),128)),(N(!0),B(Re,null,vt(r.tags,(g,w)=>(N(),B("div",{key:g.id,class:St(["prompt-wrap",g.type==="wrap"?"wrap-tag":""]),"data-id":g.id,ref_for:!0,ref:"promptTagWrap",onMousedown:t[37]||(t[37]=tt(()=>{},["stop"])),onMousemove:t[38]||(t[38]=tt(()=>{},["stop"])),onMouseup:t[39]||(t[39]=tt(()=>{},["stop"]))},null,42,av))),128))],512),T("div",{class:"drop-select-bg",ref:"dropSelectBg",style:Kt({display:e.dropIsStart?"block":"none"})},null,4),T("div",{class:"drop-select-box",ref:"dropSelectBox",style:Kt({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),T("div",{class:"drop-select-btns",ref:"dropSelectBtns",style:Kt({display:e.dropIsEnd&&e.dropTags.length?"flex":"none",top:e.dropEndY-32+"px",left:e.dropEndX+"px"}),onMousedown:t[45]||(t[45]=tt(()=>{},["stop"])),onMousemove:t[46]||(t[46]=tt(()=>{},["stop"])),onMouseup:t[47]||(t[47]=tt(()=>{},["stop"]))},[T("div",lv,ae(e.getLang("batch_operation")),1),fe((N(),B("button",{type:"button",onClick:t[40]||(t[40]=(...g)=>e.onDropCopy&&e.onDropCopy(...g))},[pe(l,{name:"copy"})])),[[m,e.getLang("copy_to_clipboard")]]),fe((N(),B("button",{type:"button",onClick:t[41]||(t[41]=(...g)=>e.onDropFavorite&&e.onDropFavorite(...g))},[pe(l,{name:"favorite-no"})])),[[m,e.getLang("add_to_favorite")]]),fe((N(),B("button",{type:"button",onClick:t[42]||(t[42]=(...g)=>e.onDropDisable&&e.onDropDisable(...g))},[pe(l,{name:"disabled"})])),[[m,e.getLang("disable_keyword")]]),fe((N(),B("button",{type:"button",onClick:t[43]||(t[43]=(...g)=>e.onDropEnable&&e.onDropEnable(...g))},[pe(l,{name:"enable"})])),[[m,e.getLang("enable_keyword")]]),T("button",{type:"button",onClick:t[44]||(t[44]=(...g)=>e.onDropDelete&&e.onDropDelete(...g))},[pe(l,{name:"remove"})])],36)],34)],2),pe(d,{ref:"highlightPrompt",textarea:n.textarea,"hide-default-input":n.hideDefaultInput},null,8,["textarea","hide-default-input"])],8,Gg)}const cv=sn(Yg,[["render",uv]]),fv={name:"TranslateSetting",components:{IconSvg:Fn},mixins:[Yn],props:{},data(){return{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: Physton/sd-webui-prompt-all-in-one`,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 oe.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.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})}}},dv={key:0,class:"physton-prompt-translate-setting"},pv={class:"translate-setting-main"},hv={class:"translate-setting-content"},gv={class:"setting-line"},mv={class:"line-title"},vv={class:"line-content"},yv=["label"],bv=["value","disabled"],Cv={key:0,class:"setting-line"},wv=T("div",{class:"line-title"},null,-1),Tv={class:"line-content"},_v={class:"common-red"},Ev={key:1,class:"setting-line"},Sv=T("div",{class:"line-title"},null,-1),xv={class:"line-content"},kv={class:"help-list"},Av={class:"help-item"},Lv=["href"],Ov={class:"setting-line"},Dv={class:"line-title"},Pv={class:"line-content"},Iv=["onUpdate:modelValue","onChange"],Nv=["onUpdate:modelValue"],Rv=["value"],Mv={key:2,class:"setting-line"},Fv={class:"line-title"},Hv={class:"line-content"},Bv=["innerHTML"],jv={key:3,class:"setting-line"},$v=T("div",{class:"line-title"},null,-1),Uv={class:"line-content"},Wv={class:"setting-line"},Vv={class:"line-title"},Kv={class:"line-content"},qv={class:"setting-line"},zv=T("div",{class:"line-title"},null,-1),Xv={class:"line-content"},Yv={class:"setting-line"},Gv=T("div",{class:"line-title"},null,-1),Jv={class:"line-content"},Zv={key:0,class:"translate-error"},Qv={class:"setting-line"},ey=T("div",{class:"line-title"},"TagComplete",-1),ty={class:"line-content"},ny=T("div",{class:"help-list"},[T("div",{class:"help-item"},[Ft("[?] "),T("a",{href:"https://physton.github.io/sd-webui-prompt-all-in-one-assets/TranslationApiConfiguration.html#tagcomplete-translation-enhancement",target:"_blank"},"[Wiki] TagComplete Translation enhancement")])],-1),iy=["innerHTML"],ry=["innerHTML"],sy={class:"line-row"},oy=["value"],ay={class:"setting-line"},ly=T("div",{class:"line-title"},null,-1),uy={class:"line-content"},cy={ref:"tagCompleteResults"},fy={class:"setting-btns"};function dy(e,t,n,i,r,o){const l=Lt("icon-svg"),c=Us("tooltip");return r.isOpen?(N(),B("div",dv,[T("div",pv,[T("div",hv,[T("div",gv,[T("div",mv,ae(e.getLang("translate_api")),1),T("div",vv,[fe(T("select",{"onUpdate:modelValue":t[0]||(t[0]=d=>r.apiKey=d)},[(N(!0),B(Re,null,vt(o.supportApi,d=>(N(),B("optgroup",{key:d.type,label:e.getLang(d.type)},[(N(!0),B(Re,null,vt(d.children,m=>(N(),B("option",{key:m.key,value:m.key,disabled:m.disabled},ae(o.getItemName(m)),9,bv))),128))],8,yv))),128))],512),[[Xs,r.apiKey]])])]),o.apiItem&&o.apiItem.type=="translators"?(N(),B("div",Cv,[wv,T("div",Tv,[T("span",_v,"*"+ae(e.getLang("not_api_key_desc")),1)])])):We("",!0),o.apiItem.help?(N(),B("div",Ev,[Sv,T("div",xv,[(N(!0),B(Re,null,vt(o.apiItem.help,d=>(N(),B("div",kv,[T("div",Av,[Ft("[?] "),T("a",{href:d.url,target:"_blank"},ae(d.title),9,Lv)])]))),256))])])):We("",!0),(N(!0),B(Re,null,vt(r.configs,d=>(N(),B("div",Ov,[T("div",Dv,ae(d.title),1),T("div",Pv,[d.type=="input"?fe((N(),B("input",{key:0,type:"text","onUpdate:modelValue":m=>d.value=m,onChange:m=>o.onChangeConfigValue(d)},null,40,Iv)),[[Hi,d.value]]):We("",!0),d.type=="select"?fe((N(),B("select",{key:1,"onUpdate:modelValue":m=>d.value=m},[(N(!0),B(Re,null,vt(d.options,m=>(N(),B("option",{value:m},ae(m),9,Rv))),256))],8,Nv)),[[Xs,d.value]]):We("",!0)])]))),256)),o.apiItem.key==="mbart50"?(N(),B("div",Mv,[T("div",Fv,ae(e.getLang("initialize")),1),T("div",Hv,[T("div",{class:"hover-scale-120 test-btn",onClick:t[1]||(t[1]=(...d)=>o.onMbart50Initialize&&o.onMbart50Initialize(...d))},[r.mbart50Loading?(N(),mt(l,{key:0,name:"loading"})):(N(),B(Re,{key:1},[Ft(ae(e.getLang("initialize")),1)],64))]),T("p",{class:"common-red",innerHTML:e.getLang("download_model_desc")},null,8,Bv)])])):We("",!0),o.apiItem.key==="mbart50"&&r.mbart50Message?(N(),B("div",jv,[$v,T("div",Uv,[T("div",{class:St([r.mbart50Success?"":"common-red"])},ae(r.mbart50Message),3)])])):We("",!0),T("div",Wv,[T("div",Vv,ae(e.getLang("translate_test")),1),T("div",Kv,[fe(T("textarea",{class:"test-input","onUpdate:modelValue":t[2]||(t[2]=d=>r.testText=d)},null,512),[[Hi,r.testText]])])]),T("div",qv,[zv,T("div",Xv,[T("div",{class:"hover-scale-120 test-btn",onClick:t[3]||(t[3]=(...d)=>o.onTestClick&&o.onTestClick(...d))},[r.loading?(N(),mt(l,{key:0,name:"loading"})):(N(),B(Re,{key:1},[Ft(ae(e.getLang("test")),1)],64))])])]),T("div",Yv,[Gv,T("div",Jv,[!r.translateSuccess&&r.errorMessage?(N(),B("div",Zv,ae(r.errorMessage),1)):We("",!0),r.translatedText?fe((N(),B("textarea",{key:1,class:"test-input","onUpdate:modelValue":t[4]||(t[4]=d=>r.translatedText=d)},null,512)),[[Hi,r.translatedText]]):We("",!0)])]),T("div",Qv,[ey,T("div",ty,[ny,T("div",{innerHTML:e.getLang("tagcomplete_translate_desc")},null,8,iy),T("div",{class:"common-red",innerHTML:e.getLang("tagcomplete_translate_desc2")},null,8,ry),T("div",sy,[fe(T("select",{"onUpdate:modelValue":t[5]||(t[5]=d=>r.tagCompleteFileKey=d),onChange:t[6]||(t[6]=d=>r.tagCompleteResults=[])},[(N(!0),B(Re,null,vt(r.tagCompleteFiles,d=>(N(),B("option",{value:d.key},ae(d.name),9,oy))),256))],544),[[Xs,r.tagCompleteFileKey]]),fe((N(),B("div",{class:"refresh-btn hover-scale-120",onClick:t[7]||(t[7]=(...d)=>o.refreshCSVs&&o.refreshCSVs(...d))},[r.tagCompleteFilesLoading?(N(),mt(l,{key:0,name:"loading"})):(N(),mt(l,{key:1,name:"refresh"}))])),[[c,e.getLang("refresh")]])]),T("label",{class:"onlyCsvOnAuto",style:Kt({display:r.tagCompleteFileKey?"flex":"none"})},[fe(T("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[8]||(t[8]=d=>r.onlyCsvOnAutoValue=d)},null,512),[[zh,r.onlyCsvOnAutoValue]]),T("span",null,ae(e.getLang("only_csv_on_auto")),1)],4)])]),fe(T("div",ay,[ly,T("div",uy,[T("div",{class:"hover-scale-120 test-btn",onClick:t[9]||(t[9]=(...d)=>o.onTagCompleteTestClick&&o.onTagCompleteTestClick(...d))},ae(e.getLang("test")),1),fe(T("div",cy,[(N(!0),B(Re,null,vt(r.tagCompleteResults,d=>(N(),B("p",{key:d},ae(d),1))),128))],512),[[_t,r.tagCompleteResults.length>0]])])],512),[[_t,r.tagCompleteFileKey]])]),T("div",fy,[T("div",{class:"translate-save hover-scale-120",onClick:t[10]||(t[10]=(...d)=>o.onSaveClick&&o.onSaveClick(...d))},ae(e.getLang("save")),1),T("div",{class:"translate-close hover-scale-120",onClick:t[11]||(t[11]=(...d)=>o.onCloseClick&&o.onCloseClick(...d))},ae(e.getLang("close")),1)])])])):We("",!0)}const py=sn(fv,[["render",dy]]),hy={name:"SelectLanguage",components:{IconSvg:Fn},mixins:[Yn],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}}}},gy=["onClick"];function my(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-prompt-select-language",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"language-main",onClick:t[2]||(t[2]=tt(()=>{},["stop"]))},[T("div",{class:"language-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"language-list",onClick:t[1]||(t[1]=tt(()=>{},["stop"]))},[(N(!0),B(Re,null,vt(e.languages,c=>(N(),B("div",{key:c.code,class:St(["language-item",c.code==e.languageCode?"selected":""]),ref_for:!0,ref:"items",onClick:d=>o.onLanguageClick(c)},ae(c.code)+" - "+ae(c.name),11,gy))),128))])])])):We("",!0)}const vy=sn(hy,[["render",my]]),yy={components:{IconSvg:Fn},props:{},mixins:[Yn],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 oe.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]))}}},by={class:"popup-tabs"},Cy=["onClick"],wy={class:"tab-name"},Ty={class:"tab-type"},_y={class:"tab-count"},Ey={class:"popup-detail"},Sy={class:"popup-item-tags"},xy={key:0,class:"item-wrap"},ky={key:1,class:"item-tag"},Ay={class:"item-tag-value"},Ly={class:"item-tag-local-value"},Oy={class:"content-list"},Dy=["onMouseenter","onMouseleave"],Py={class:"item-header"},Iy={class:"item-header-left"},Ny={class:"item-header-index"},Ry={class:"item-header-time"},My={class:"item-header-name"},Fy=["value","onKeydown","onChange","placeholder"],Hy={class:"item-header-right"},By=["onClick"],jy=["onClick"],$y=["onClick"],Uy=["onClick"],Wy={class:"item-prompt"},Vy={class:"content-empty"},Ky={key:1};function qy(e,t,n,i,r,o){const l=Lt("icon-svg"),c=Us("tooltip");return fe((N(),B("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]=tt(()=>{},["stop"]))},[T("div",by,[(N(!0),B(Re,null,vt(r.favorites,d=>(N(),B("div",{key:d.key,class:St(["popup-tab",d.key===r.favoriteKey?"active":""]),onClick:m=>o.onTabClick(d.key)},[T("div",wy,ae(e.getLang(d.name)),1),T("div",Ty,ae(e.getLang(d.type)),1),T("div",_y,ae(d.list.length),1)],10,Cy))),128))]),fe(T("div",Ey,[T("div",Sy,[(N(!0),B(Re,null,vt(r.currentItem.tags,(d,m)=>(N(),B(Re,{key:m},[d.type&&d.type==="wrap"?(N(),B("div",xy)):(N(),B("div",ky,[T("div",Ay,ae(d.value),1),T("div",Ly,ae(d.localValue),1)]))],64))),128))])],512),[[_t,r.currentItem&&r.currentItem.tags]]),(N(!0),B(Re,null,vt(r.favorites,d=>(N(),B("div",{key:d.key,class:St(["popup-tab-content",d.key===r.favoriteKey?"active":""])},[fe(T("div",Oy,[(N(!0),B(Re,null,vt(d.list,(m,g)=>(N(),B("div",{class:"content-item",key:m.id,onMouseenter:w=>o.onItemMouseEnter(g),onMouseleave:w=>o.onItemMouseLeave(g)},[T("div",Py,[T("div",Iy,[T("div",Ny,ae(d.list.length-g),1),T("div",Ry,ae(o.formatTime(m.time)),1),T("div",My,[T("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,Fy)])]),T("div",Hy,[fe((N(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[pe(l,{name:"favorite-yes"})],8,By)),[[_t,m.is_favorite],[c,e.getLang("remove_from_favorite")]]),fe((N(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[pe(l,{name:"favorite-no"})],8,jy)),[[_t,!m.is_favorite],[c,e.getLang("add_to_favorite")]]),fe((N(),B("div",{class:"header-btn-copy hover-scale-140",onClick:w=>o.onCopyClick(g)},[pe(l,{name:"copy"})],8,$y)),[[c,e.getLang("copy_to_clipboard")]]),fe((N(),B("div",{class:"header-btn-use hover-scale-140",onClick:w=>o.onUseClick(g)},[pe(l,{name:"use"})],8,Uy)),[[c,e.getLang("use")]])])]),T("div",Wy,ae(m.prompt),1)],40,Dy))),128))],512),[[_t,d.list.length>0]]),fe(T("div",Vy,[r.loading?(N(),mt(l,{key:0,name:"loading"})):(N(),B("span",Ky,ae(r.emptyMsg),1))],512),[[_t,d.list.length===0]])],2))),128))],544)),[[_t,r.isShow]])}const zy=sn(yy,[["render",qy]]),Xy={components:{IconSvg:Fn},props:{},mixins:[Yn],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 oe.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=>{})}}},Yy={class:"popup-tabs"},Gy=["onClick"],Jy={class:"tab-name"},Zy={class:"tab-type"},Qy={class:"tab-count"},eb={class:"popup-detail"},tb={class:"popup-item-tags"},nb={key:0,class:"item-wrap"},ib={key:1,class:"item-tag"},rb={class:"item-tag-value"},sb={class:"item-tag-local-value"},ob={class:"content-list"},ab=["onMouseenter","onMouseleave"],lb={class:"item-header"},ub={class:"item-header-left"},cb={class:"item-header-index"},fb={class:"item-header-time"},db={class:"item-header-name"},pb=["value","onKeydown","onChange","placeholder"],hb={class:"item-header-right"},gb=["onClick"],mb=["onClick"],vb=["onClick"],yb=["onClick"],bb=["onClick"],Cb={class:"item-prompt"},wb={class:"content-empty"},Tb={key:1};function _b(e,t,n,i,r,o){const l=Lt("icon-svg"),c=Us("tooltip");return fe((N(),B("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]=tt(()=>{},["stop"]))},[T("div",Yy,[(N(!0),B(Re,null,vt(r.histories,d=>(N(),B("div",{key:d.key,class:St(["popup-tab",d.key===r.historyKey?"active":""]),onClick:m=>o.onTabClick(d.key)},[T("div",Jy,ae(e.getLang(d.name)),1),T("div",Zy,ae(e.getLang(d.type)),1),T("div",Qy,ae(d.list.length),1)],10,Gy))),128))]),fe(T("div",eb,[T("div",tb,[(N(!0),B(Re,null,vt(r.currentItem.tags,(d,m)=>(N(),B(Re,{key:m},[d.type&&d.type==="wrap"?(N(),B("div",nb)):(N(),B("div",ib,[T("div",rb,ae(d.value),1),T("div",sb,ae(d.localValue),1)]))],64))),128))])],512),[[_t,r.currentItem&&r.currentItem.tags]]),(N(!0),B(Re,null,vt(r.histories,d=>(N(),B("div",{key:d.key,class:St(["popup-tab-content",d.key===r.historyKey?"active":""])},[fe(T("div",ob,[T("div",{class:"clear-btn",onClick:t[0]||(t[0]=(...m)=>o.onDeleteAllHistoryClick&&o.onDeleteAllHistoryClick(...m))},[pe(l,{name:"remove"}),Ft(" "+ae(e.getLang("delete_all_history")),1)]),(N(!0),B(Re,null,vt(d.list,(m,g)=>(N(),B("div",{class:"content-item",key:m.id,onMouseenter:w=>o.onItemMouseEnter(g),onMouseleave:w=>o.onItemMouseLeave(g)},[T("div",lb,[T("div",ub,[T("div",cb,ae(d.list.length-g),1),T("div",fb,ae(o.formatTime(m.time)),1),T("div",db,[T("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,pb)])]),T("div",hb,[T("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onDeleteClick(g)},[pe(l,{name:"remove"})],8,gb),fe((N(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[pe(l,{name:"favorite-yes"})],8,mb)),[[_t,m.is_favorite],[c,e.getLang("remove_from_favorite")]]),fe((N(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:w=>o.onFavoriteClick(g)},[pe(l,{name:"favorite-no"})],8,vb)),[[_t,!m.is_favorite],[c,e.getLang("add_to_favorite")]]),fe((N(),B("div",{class:"header-btn-copy hover-scale-140",onClick:w=>o.onCopyClick(g)},[pe(l,{name:"copy"})],8,yb)),[[c,e.getLang("copy_to_clipboard")]]),fe((N(),B("div",{class:"header-btn-use hover-scale-140",onClick:w=>o.onUseClick(g)},[pe(l,{name:"use"})],8,bb)),[[c,e.getLang("use")]])])]),T("div",Cb,ae(m.prompt),1)],40,ab))),128))],512),[[_t,d.list.length>0]]),fe(T("div",wb,[r.loading?(N(),mt(l,{key:0,name:"loading"})):(N(),B("span",Tb,ae(r.emptyMsg),1))],512),[[_t,d.list.length===0]])],2))),128))],544)),[[_t,r.isShow]])}const Eb=sn(Xy,[["render",_b]]),Sb={name:"ExtensionCss",components:{IconSvg:Fn},mixins:[Yn],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&&oe.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?oe.loadCSS(t.style,t.id,!0,!1):oe.removeCSS(t.id),this.gradioAPI.setData(t.dataName,t.selected))},open(){this.isOpen=!0,this.refresh(!1)},close(){this.isOpen=!1}}},xb={class:"extension-table"},kb=["checked","onChange"],Ab={class:"extension-name"},Lb={class:"extension-type"},Ob={class:"extension-dir"},Db={class:"extension-author"};function Pb(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-prompt-extension-css",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"extension-main",onClick:t[2]||(t[2]=tt(()=>{},["stop"]))},[T("div",{class:"extension-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"extension-list",onClick:t[1]||(t[1]=tt(()=>{},["stop"]))},[T("table",xb,[(N(!0),B(Re,null,vt(r.list,(c,d)=>(N(),B("tr",{key:c.dir,class:"extension-item",ref_for:!0,ref:"items"},[T("td",null,[T("input",{class:"extension-checkbox",type:"checkbox",name:"extension-item",checked:c.selected,onChange:m=>o.onChangeSelect(c.id)},null,40,kb)]),T("td",Ab,ae(o.getName(c)),1),T("td",Lb,ae(e.getLang(c.manifest.type)),1),T("td",Ob,ae(c.dir),1),T("td",Db,[c.manifest.author?(N(),B(Re,{key:0},[Ft("By: "+ae(c.manifest.author),1)],64)):We("",!0)])]))),128))])])])])):We("",!0)}const Ib=sn(Sb,[["render",Pb]]),Nb={name:"PromptFormat",components:{IconSvg:Fn},mixins:[Yn],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}}},Rb={class:"format-item"},Mb=["checked"],Fb=["innerHTML"],Hb={class:"format-item"},Bb=["checked"],jb=["innerHTML"],$b={class:"format-item"},Ub=["checked"],Wb=["innerHTML"],Vb={class:"format-item"},Kb=["checked"],qb=["innerHTML"];function zb(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-prompt-format",onClick:t[7]||(t[7]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"format-main",onClick:t[6]||(t[6]=tt(()=>{},["stop"]))},[T("div",{class:"format-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"format-list",onClick:t[5]||(t[5]=tt(()=>{},["stop"]))},[T("div",Rb,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveSpace,onChange:t[1]||(t[1]=c=>e.$emit("update:autoRemoveSpace",c.target.checked))},null,40,Mb),T("div",{class:"format-desc",innerHTML:e.getLang("is_remove_space")},null,8,Fb)]),T("div",Hb,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveLastComma,onChange:t[2]||(t[2]=c=>e.$emit("update:autoRemoveLastComma",c.target.checked))},null,40,Bb),T("div",{class:"format-desc",innerHTML:e.getLang("is_remove_last_comma")},null,8,jb)]),T("div",$b,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightZero,onChange:t[3]||(t[3]=c=>e.$emit("update:autoKeepWeightZero",c.target.checked))},null,40,Ub),T("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_zero")},null,8,Wb)]),T("div",Vb,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightOne,onChange:t[4]||(t[4]=c=>e.$emit("update:autoKeepWeightOne",c.target.checked))},null,40,Kb),T("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_one")},null,8,qb)])])])])):We("",!0)}const Xb=sn(Nb,[["render",zb]]),Yb={name:"PackagesState",components:{IconSvg:Fn},mixins:[Yn],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}}},Gb={class:"today-now-show"},Jb=["value"],Zb=T("div",{class:"state-body-name"},"sd-webui-prompt-all-in-one",-1),Qb=["innerHTML"],eC={class:"package-list"},tC={class:"package-name"},nC={class:"package-command"},iC={key:0,class:"install-result"};function rC(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-packages-state",onClick:t[6]||(t[6]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"state-main",onClick:t[5]||(t[5]=tt(()=>{},["stop"]))},[T("div",{class:"state-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"state-body",onClick:t[4]||(t[4]=tt(()=>{},["stop"]))},[T("div",Gb,[T("label",null,[T("input",{type:"checkbox",value:r.todayNotShow,onChange:t[1]||(t[1]=(...c)=>o.onTodayNotShowChange&&o.onTodayNotShowChange(...c))},null,40,Jb),Ft(" "+ae(e.getLang("today_not_show")),1)])]),Zb,T("div",{class:"state-body-language",onClick:t[2]||(t[2]=c=>e.$emit("click:selectLanguage",c))},[pe(l,{name:"i18n"}),T("div",null,"Language: "+ae(e.langName),1)]),T("div",{class:"state-body-desc",innerHTML:e.getLang("packages_desc")},null,8,Qb),T("div",eC,[(N(!0),B(Re,null,vt(n.packagesState,c=>(N(),B("div",{key:c.name,class:"package-item"},[T("div",tC,ae(c.name),1),T("div",{class:St(["package-state",c.state?"installed":"not_install"])},ae(e.getLang(c.state?"installed":"not_install")),3),T("div",nC,ae(o.getCommand(c)),1)]))),128))]),T("div",{class:"btn-packages-install hover-scale-120",onClick:t[3]||(t[3]=(...c)=>o.onInstallClick&&o.onInstallClick(...c))},[r.loading?(N(),mt(l,{key:0,name:"loading"})):(N(),B(Re,{key:1},[Ft(ae(e.getLang("install")),1)],64))]),r.showResult?(N(),B("div",iC,[Ft(ae(e.getLang("packages_installing"))+" ",1),r.result?(N(),B("div",{key:0,class:"result-content",ref:"result"},ae(r.result),513)):We("",!0)])):We("",!0)])])])):We("",!0)}const sC=sn(Yb,[["render",rC]]),oC={name:"ChatgptPrompt",components:{IconSvg:Fn},mixins:[Yn],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=oe.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 if(e["translate_api.openai"]&&e["translate_api.openai"].api_key)for(const i of n.config)t[i.key]=e["translate_api.openai"][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()}}},aC={class:"panel-header"},lC={class:"panel-title"},uC={class:"panel-content"},cC={class:"body-line"},fC={class:"line-title"},dC={class:"line-content"},pC=["onUpdate:modelValue"],hC=["onUpdate:modelValue"],gC=["value"],mC={class:"body-line"},vC=T("div",{class:"line-title"},null,-1),yC={class:"line-content text-right"},bC={class:"panel-header"},CC={class:"panel-title"},wC={class:"panel-content"},TC={class:"body-line"},_C={class:"line-title"},EC={class:"line-subtitle"},SC={class:"line-content"},xC=["value"],kC={class:"body-line"},AC=T("div",{class:"line-title"},null,-1),LC={class:"line-content text-right"},OC={class:"body-line"},DC={class:"line-title"},PC={class:"line-subtitle"},IC={class:"line-content"},NC=["placeholder"],RC={class:"body-line"},MC=T("div",{class:"line-title"},null,-1),FC={class:"line-content text-right"},HC={class:"panel-header"},BC={class:"panel-title"},jC={class:"panel-content"},$C={class:"body-line"},UC={class:"line-title"},WC={class:"line-content"},VC={key:0,class:"body-line"},KC=T("div",{class:"line-title"},null,-1),qC={class:"line-content text-right"};function zC(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-chatgpt-prompt",onClick:t[13]||(t[13]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"chatgpt-main",onClick:t[12]||(t[12]=tt(()=>{},["stop"]))},[T("div",{class:"chatgpt-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"chatgpt-body",onClick:t[11]||(t[11]=tt(()=>{},["stop"]))},[T("div",{class:St(["body-panel",r.hidePanels.api?"fold":""])},[T("div",aC,[T("div",{class:"panel-unfold",onClick:t[1]||(t[1]=c=>o.onUnfoldClick("api"))},[pe(l,{class:"hover-scale-120",name:"unfold"})]),T("div",lC,ae(e.getLang("api_config")),1)]),T("div",uC,[(N(!0),B(Re,null,vt(r.configs,c=>(N(),B("div",cC,[T("div",fC,ae(c.title),1),T("div",dC,[c.type=="input"?fe((N(),B("input",{key:0,type:"text","onUpdate:modelValue":d=>c.value=d},null,8,pC)),[[Hi,c.value]]):We("",!0),c.type=="select"?fe((N(),B("select",{key:1,"onUpdate:modelValue":d=>c.value=d},[(N(!0),B(Re,null,vt(c.options,d=>(N(),B("option",{value:d},ae(d),9,gC))),256))],8,hC)),[[Xs,c.value]]):We("",!0)])]))),256)),T("div",mC,[vC,T("div",yC,[T("div",{class:"common-btn hover-scale-120",onClick:t[2]||(t[2]=(...c)=>o.onSaveConfigClick&&o.onSaveConfigClick(...c))},[r.saveConfigIng?(N(),mt(l,{key:0,name:"loading"})):(N(),B(Re,{key:1},[Ft(ae(e.getLang("save")),1)],64))])])])])],2),T("div",{class:St(["body-panel",r.hidePanels.send?"fold":""])},[T("div",bC,[T("div",{class:"panel-unfold",onClick:t[3]||(t[3]=c=>o.onUnfoldClick("send"))},[pe(l,{class:"hover-scale-120",name:"unfold"})]),T("div",CC,ae(e.getLang("image_desc")),1)]),T("div",wC,[T("div",TC,[T("div",_C,[Ft(ae(e.getLang("preset"))+" ",1),T("div",EC,ae(e.getLang("ai_one")),1)]),T("div",SC,[T("textarea",{value:r.chatPreset,onChange:t[4]||(t[4]=(...c)=>o.onPresetChange&&o.onPresetChange(...c)),style:{height:"100px"}},null,40,xC)])]),T("div",kC,[AC,T("div",LC,[T("a",{href:"javascript:",onClick:t[5]||(t[5]=(...c)=>o.onRestoreClick&&o.onRestoreClick(...c))},ae(e.getLang("restore_to_default")),1)])]),T("div",OC,[T("div",DC,[Ft(ae(e.getLang("image_desc"))+" ",1),T("div",PC,ae(e.getLang("ai_two")),1)]),T("div",IC,[fe(T("textarea",{style:{height:"100px"},ref:"imageDesc","onUpdate:modelValue":t[6]||(t[6]=c=>r.imageDesc=c),placeholder:e.getLang("input_image_desc")},null,8,NC),[[Hi,r.imageDesc]])])]),T("div",RC,[MC,T("div",FC,[T("div",{class:"common-btn hover-scale-120",onClick:t[7]||(t[7]=(...c)=>o.onGenClick&&o.onGenClick(...c))},[r.genIng?(N(),mt(l,{key:0,name:"loading"})):(N(),B(Re,{key:1},[Ft(ae(e.getLang("generate")),1)],64))])])])])],2),T("div",{class:St(["body-panel",r.hidePanels.result?"fold":""])},[T("div",HC,[T("div",{class:"panel-unfold",onClick:t[8]||(t[8]=c=>o.onUnfoldClick("result"))},[pe(l,{class:"hover-scale-120",name:"unfold"})]),T("div",BC,ae(e.getLang("generate_result")),1)]),T("div",jC,[T("div",$C,[T("div",UC,ae(e.getLang("generate_result")),1),T("div",WC,[fe(T("textarea",{style:{height:"100px"},"onUpdate:modelValue":t[9]||(t[9]=c=>r.promptResult=c)},null,512),[[Hi,r.promptResult]])])]),r.promptResult?(N(),B("div",VC,[KC,T("div",qC,[T("div",{class:"common-btn hover-scale-120",onClick:t[10]||(t[10]=(...c)=>o.onUseClick&&o.onUseClick(...c))},ae(e.getLang("use")),1)])])):We("",!0)])],2)])])])):We("",!0)}const XC=sn(oC,[["render",zC]]),YC={name:"About",components:{IconSvg:Fn},mixins:[Yn],data(){return{version:"",latestVersion:"",isLatestVersion:!0,isOpen:!1,loading:!1,versions:[],icons:[{title:"GitHub stars",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/stargazers",image:"https://img.shields.io/github/stars/Physton/sd-webui-prompt-all-in-one?style=flat-square"},{title:"GitHub forks",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/network/members",image:"https://img.shields.io/github/forks/Physton/sd-webui-prompt-all-in-one?style=flat-square"},{title:"GitHub issues",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/issues",image:"https://img.shields.io/github/issues/Physton/sd-webui-prompt-all-in-one?style=flat-square"},{title:"GitHub issues closed",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/issues?q=is%3Aissue+is%3Aclosed",image:"https://img.shields.io/github/issues-closed/Physton/sd-webui-prompt-all-in-one?style=flat-square"},{title:"GitHub license",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/blob/master/LICENSE.md",image:"https://img.shields.io/github/license/Physton/sd-webui-prompt-all-in-one?style=flat-square"},{title:"GitHub commits",url:"https://github.com/Physton/sd-webui-prompt-all-in-one/commits/main",image:"https://img.shields.io/github/last-commit/Physton/sd-webui-prompt-all-in-one?style=flat-square"}]}},emits:["use"],computed:{},mounted(){},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=oe.formatTime(n.date),t.push(n))}),this.versions=t}).catch(e=>{this.loading=!1})},close(){this.isOpen=!1},commitUrl(e){return"https://github.com/Physton/sd-webui-prompt-all-in-one/commit/"+e},formatVersion(e){return e?e.slice(0,7):this.getLang("unknown_version")},message(e){return e=oe.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="https://github.com/Physton/sd-webui-prompt-all-in-one/issues/$1" target="_blank">#$1</a>'),e}}},GC=T("p",{class:"body-title"},[T("a",{href:"https://github.com/Physton/sd-webui-prompt-all-in-one",target:"_blank"},"sd-webui-prompt-all-in-one")],-1),JC=["href"],ZC=["src","alt"],QC={key:0},ew=["href"],tw={key:0,class:"has-new-version"},nw=["href"],iw=T("a",{href:"https://physton.github.io/sd-webui-prompt-all-in-one-assets/",target:"_blank"},"Wiki",-1),rw={class:"version-list"},sw={class:"item-header"},ow={class:"version-sha"},aw=["href"],lw={class:"version-date"},uw=["innerHTML"];function cw(e,t,n,i,r,o){const l=Lt("icon-svg");return r.isOpen?(N(),B("div",{key:0,class:"physton-about-prompt",onClick:t[3]||(t[3]=(...c)=>o.close&&o.close(...c))},[T("div",{class:"about-main",onClick:t[2]||(t[2]=tt(()=>{},["stop"]))},[T("div",{class:"about-close",onClick:t[0]||(t[0]=(...c)=>o.close&&o.close(...c))},[pe(l,{name:"close"})]),T("div",{class:"about-body",onClick:t[1]||(t[1]=tt(()=>{},["stop"]))},[GC,T("p",null,[(N(!0),B(Re,null,vt(r.icons,c=>(N(),B("a",{key:c.title,href:c.url,target:"_blank"},[T("img",{src:c.image,alt:c.title},null,8,ZC)],8,JC))),128))]),r.loading?We("",!0):(N(),B("p",QC,[T("span",null,[Ft(ae(e.getLang("version"))+": ",1),T("a",{href:o.commitUrl(r.version),target:"_blank"},ae(o.formatVersion(r.version)),9,ew)]),!r.isLatestVersion&&r.latestVersion?(N(),B("span",tw,[Ft(" ("+ae(e.getLang("has_new_version"))+": ",1),T("a",{href:o.commitUrl(r.latestVersion),target:"_blank"},ae(o.formatVersion(r.latestVersion)),9,nw),Ft(")")])):We("",!0)])),T("p",null,[Ft(ae(e.getLang("wiki_desc"))+" ",1),iw]),T("div",rw,[r.loading?(N(),mt(l,{key:0,name:"loading"})):We("",!0),(N(!0),B(Re,null,vt(r.versions,c=>(N(),B("div",{class:"version-item",key:c.version},[T("div",sw,[T("div",ow,[T("a",{href:o.commitUrl(c.version),target:"_blank"},ae(o.formatVersion(c.version)),9,aw)]),T("div",lw,ae(c.date),1)]),T("div",{class:"version-msg",innerHTML:o.message(c.message)},null,8,uw)]))),128))])])])])):We("",!0)}const fw={name:"App",components:{About:sn(YC,[["render",cw]]),ChatgptPrompt:XC,PackagesState:sC,PromptFormat:Xb,ExtensionCss:Ib,IconSvg:Fn,History:Eb,Favorite:zy,SelectLanguage:vy,TranslateSetting:py,PhystonPrompt:cv},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=oe.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(){oe.loadCSS("toastr.min.css","physton-prompt-toastr",!0,!0,!1),oe.loadCSS("tippy.css","physton-prompt-tippy",!0,!0,!1),oe.loadCSS("main.min.css","physton-prompt-main",!0);let t=new URLSearchParams(window.location.search).get("__theme");["dark","light"].includes(t)&&(this.theme=t,oe.gradioApp().classList.contains(this.theme)||oe.gradioApp().classList.add(this.theme)),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,"sd-webui-prompt-all-in-one",{timeOut:2e4}),console.log(n)})},methods:{getLang(e){return oe.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.canOneTranslate=oe.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&&(t.translateApi==="alibaba_free"?this.gradioAPI.setData("translateApi",this.translateApi):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=oe.gradioApp().querySelector("#"+n.prompt),n.$textarea=n.$prompt.getElementsByTagName("textarea")[0],n.$steps=oe.gradioApp().querySelector("#"+n.steps)}),this.$nextTick(()=>{this.prompts.forEach(n=>{const i=oe.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=oe.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),oe.hideCompleteResults(t),oe.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}}},dw={class:"paste-popup-title"},pw={class:"paste-popup-body"},hw=["placeholder"],gw={key:1,class:"paste-submit"};function mw(e,t,n,i,r,o){const l=Lt("physton-prompt"),c=Lt("translate-setting"),d=Lt("select-language"),m=Lt("prompt-format"),g=Lt("history"),w=Lt("favorite"),_=Lt("extension-css"),R=Lt("packages-state"),x=Lt("chatgpt-prompt"),O=Lt("about"),U=Lt("icon-svg");return N(),B("div",null,[(N(!0),B(Re,null,vt(r.prompts,P=>(N(),B(Re,{key:P.name},[P.$textarea?(N(),mt(l,{key:0,id:P.id,ref_for:!0,ref:P.id,name:P.name,neg:P.neg,textarea:P.$textarea,steps:P.$steps,"language-code":r.languageCode,"onUpdate:languageCode":t[0]||(t[0]=Z=>r.languageCode=Z),"translate-apis":r.translateApis,languages:r.languages,"history-key":P.historyKey,"onClick:showHistory":Z=>o.onShowHistory(P.id,Z),"favorite-key":P.favoriteKey,onRefreshFavorites:o.onRefreshFavorites,"onClick:showFavorite":Z=>o.onShowFavorite(P.id,Z),"can-one-translate":r.canOneTranslate,"onUpdate:canOneTranslate":t[1]||(t[1]=Z=>r.canOneTranslate=Z),"auto-translate":r.autoTranslate,"onUpdate:autoTranslate":t[2]||(t[2]=Z=>r.autoTranslate=Z),"auto-translate-to-english":r.autoTranslateToEnglish,"onUpdate:autoTranslateToEnglish":t[3]||(t[3]=Z=>r.autoTranslateToEnglish=Z),"auto-translate-to-local":r.autoTranslateToLocal,"onUpdate:autoTranslateToLocal":t[4]||(t[4]=Z=>r.autoTranslateToLocal=Z),"auto-remove-space":r.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[5]||(t[5]=Z=>r.autoRemoveSpace=Z),"auto-remove-last-comma":r.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[6]||(t[6]=Z=>r.autoRemoveLastComma=Z),"auto-keep-weight-zero":r.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[7]||(t[7]=Z=>r.autoKeepWeightZero=Z),"auto-keep-weight-one":r.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[8]||(t[8]=Z=>r.autoKeepWeightOne=Z),"hide-default-input":P.hideDefaultInput,"onUpdate:hideDefaultInput":Z=>o.onUpdateHideDefaultInput(P.id,Z),"hide-panel":P.hidePanel,"onUpdate:hidePanel":Z=>o.onUpdateHidePanel(P.id,Z),"enable-tooltip":r.enableTooltip,"onUpdate:enableTooltip":t[9]||(t[9]=Z=>r.enableTooltip=Z),"translate-api":r.translateApi,"onUpdate:translateApi":t[10]||(t[10]=Z=>r.translateApi=Z),"translate-api-config":r.translateApiConfig,"onClick:translateApi":o.onTranslateApiClick,"onClick:promptFormat":o.onPromptFormatClick,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[11]||(t[11]=Z=>r.tagCompleteFile=Z),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[12]||(t[12]=Z=>r.onlyCsvOnAuto=Z),"onClick:selectLanguage":o.onSelectLanguageClick,"onClick:selectTheme":o.onSelectThemeClick,"onClick:showChatgpt":Z=>o.onShowChatgpt(P.id,Z),"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"])):We("",!0)],64))),128)),pe(c,{ref:"translateSetting","language-code":r.languageCode,"onUpdate:languageCode":t[13]||(t[13]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,"onForceUpdate:translateApi":o.updateTranslateApiConfig,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[14]||(t[14]=P=>r.tagCompleteFile=P),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[15]||(t[15]=P=>r.onlyCsvOnAuto=P),"translate-api":r.translateApi,"onUpdate:translateApi":t[16]||(t[16]=P=>r.translateApi=P)},null,8,["language-code","translate-apis","languages","onForceUpdate:translateApi","tag-complete-file","only-csv-on-auto","translate-api"]),pe(d,{ref:"selectLanguage","language-code":r.languageCode,"onUpdate:languageCode":t[17]||(t[17]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,"translate-api":r.translateApi,"onUpdate:translateApi":t[18]||(t[18]=P=>r.translateApi=P),"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[19]||(t[19]=P=>r.tagCompleteFile=P),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[20]||(t[20]=P=>r.onlyCsvOnAuto=P)},null,8,["language-code","translate-apis","languages","translate-api","tag-complete-file","only-csv-on-auto"]),pe(m,{ref:"promptFormat","language-code":r.languageCode,"onUpdate:languageCode":t[21]||(t[21]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,"auto-remove-space":r.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[22]||(t[22]=P=>r.autoRemoveSpace=P),"auto-remove-last-comma":r.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[23]||(t[23]=P=>r.autoRemoveLastComma=P),"auto-keep-weight-zero":r.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[24]||(t[24]=P=>r.autoKeepWeightZero=P),"auto-keep-weight-one":r.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[25]||(t[25]=P=>r.autoKeepWeightOne=P)},null,8,["language-code","translate-apis","languages","auto-remove-space","auto-remove-last-comma","auto-keep-weight-zero","auto-keep-weight-one"]),pe(g,{ref:"history","language-code":r.languageCode,"onUpdate:languageCode":t[26]||(t[26]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[27]||(t[27]=P=>r.tagCompleteFile=P),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[28]||(t[28]=P=>r.onlyCsvOnAuto=P),onRefreshFavorites:o.onRefreshFavorites,onUse:o.onUseHistory},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onRefreshFavorites","onUse"]),pe(w,{ref:"favorite","language-code":r.languageCode,"onUpdate:languageCode":t[29]||(t[29]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,"tag-complete-file":r.tagCompleteFile,"onUpdate:tagCompleteFile":t[30]||(t[30]=P=>r.tagCompleteFile=P),"only-csv-on-auto":r.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[31]||(t[31]=P=>r.onlyCsvOnAuto=P),onUse:o.onUseFavorite},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onUse"]),pe(_,{ref:"extensionCss","language-code":r.languageCode,"onUpdate:languageCode":t[32]||(t[32]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages},null,8,["language-code","translate-apis","languages"]),pe(R,{ref:"packagesState","language-code":r.languageCode,"onUpdate:languageCode":t[33]||(t[33]=P=>r.languageCode=P),"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"]),pe(x,{ref:"chatgptPrompt","language-code":r.languageCode,"onUpdate:languageCode":t[34]||(t[34]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages,onUse:o.onUseChatgpt},null,8,["language-code","translate-apis","languages","onUse"]),pe(O,{ref:"about","language-code":r.languageCode,"onUpdate:languageCode":t[35]||(t[35]=P=>r.languageCode=P),"translate-apis":r.translateApis,languages:r.languages},null,8,["language-code","translate-apis","languages"]),r.showPastePopup?(N(),B("div",{key:0,class:"physton-paste-popup",onClick:t[40]||(t[40]=(...P)=>o.closePastePopup&&o.closePastePopup(...P))},[T("div",{class:"paste-popup-main",onClick:t[39]||(t[39]=tt(()=>{},["stop"]))},[T("div",{class:"paste-popup-close",onClick:t[36]||(t[36]=(...P)=>o.closePastePopup&&o.closePastePopup(...P))},[pe(U,{name:"close"})]),T("div",dw,ae(r.pasteTitle),1),T("div",pw,[fe(T("textarea",{class:"paste-content","onUpdate:modelValue":t[37]||(t[37]=P=>r.pasteContent=P),placeholder:o.getLang("please_enter_the_content_here")},null,8,hw),[[Hi,r.pasteContent]]),r.pasteLoading?(N(),B("div",gw,[pe(U,{name:"loading"})])):(N(),B("div",{key:0,class:"paste-submit",onClick:t[38]||(t[38]=(...P)=>o.onClickPasteSubmit&&o.onClickPasteSubmit(...P))},"Submit"))])])])):We("",!0)])}const vw=sn(fw,[["render",mw]]);var Oc={exports:{}},ja={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 Dc;function yw(){return Dc||(Dc=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:Lc,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,_=w.toString,R=_.call(Object),x={},O=function(u){return typeof u=="function"&&typeof u.nodeType!="number"&&typeof u.item!="function"},U=function(u){return u!=null&&u===u.window},P=t.document,Z={type:!0,src:!0,nonce:!0,noModule:!0};function se(s,u,f){f=f||P;var h,v,y=f.createElement("script");if(y.text=s,u)for(h in Z)v=u[h]||u.getAttribute&&u.getAttribute(h),v&&y.setAttribute(h,v);f.head.appendChild(y).parentNode.removeChild(y)}function L(s){return s==null?s+"":typeof s=="object"||typeof s=="function"?m[g.call(s)]||"object":typeof s}var ke="3.6.4",p=function(s,u){return new p.fn.init(s,u)};p.fn=p.prototype={jquery:ke,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]||{},A=1,E=arguments.length,F=!1;for(typeof b=="boolean"&&(F=b,b=arguments[A]||{},A++),typeof b!="object"&&!O(b)&&(b={}),A===E&&(b=this,A--);A<E;A++)if((s=arguments[A])!=null)for(u in s)h=s[u],!(u==="__proto__"||b===h)&&(F&&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(F,y,h)):h!==void 0&&(b[u]=h));return b},p.extend({expando:"jQuery"+(ke+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"&&_.call(f)===R):!0)},isEmptyObject:function(s){var u;for(u in s)return!1;return!0},globalEval:function(s,u,f){se(s,{nonce:u&&u.nonce},f)},each:function(s,u){var f,h=0;if(Pe(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&&(Pe(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,A=!f;y<b;y++)h=!u(s[y],y),h!==A&&v.push(s[y]);return v},map:function(s,u,f){var h,v,y=0,b=[];if(Pe(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 Pe(s){var u=!!s&&"length"in s&&s.length,f=L(s);return O(s)||U(s)?!1:f==="array"||u===0||typeof u=="number"&&u>0&&u-1 in s}var Me=function(s){var u,f,h,v,y,b,A,E,F,$,ee,j,K,Oe,Ye,Ae,jt,Rt,yn,yt="sizzle"+1*new Date,Xe=s.document,fn=0,ut=0,Dt=Ro(),vs=Ro(),Po=Ro(),bn=Ro(),Xi=function(C,S){return C===S&&(ee=!0),0},Yi={}.hasOwnProperty,dn=[],xi=dn.pop,Ln=dn.push,ki=dn.push,gd=dn.slice,Gi=function(C,S){for(var I=0,z=C.length;I<z;I++)if(C[I]===S)return I;return-1},Al="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ht="[\\x20\\t\\r\\n\\f]",Ji="(?:\\\\[\\da-fA-F]{1,6}"+ht+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",md="\\["+ht+"*("+Ji+")(?:"+ht+"*([*^$|!~]?=)"+ht+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Ji+"))|)"+ht+"*\\]",Ll=":("+Ji+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+md+")*)|.*)\\)|)",X_=new RegExp(ht+"+","g"),Io=new RegExp("^"+ht+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ht+"+$","g"),Y_=new RegExp("^"+ht+"*,"+ht+"*"),vd=new RegExp("^"+ht+"*([>+~]|"+ht+")"+ht+"*"),G_=new RegExp(ht+"|>"),J_=new RegExp(Ll),Z_=new RegExp("^"+Ji+"$"),No={ID:new RegExp("^#("+Ji+")"),CLASS:new RegExp("^\\.("+Ji+")"),TAG:new RegExp("^("+Ji+"|[*])"),ATTR:new RegExp("^"+md),PSEUDO:new RegExp("^"+Ll),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ht+"*(even|odd|(([+-]|)(\\d*)n|)"+ht+"*(?:([+-]|)"+ht+"*(\\d+)|))"+ht+"*\\)|)","i"),bool:new RegExp("^(?:"+Al+")$","i"),needsContext:new RegExp("^"+ht+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ht+"*((?:-\\d)?\\d*)"+ht+"*\\)|)(?=[^-]|$)","i")},Q_=/HTML$/i,e1=/^(?:input|select|textarea|button)$/i,t1=/^h\d$/i,ys=/^[^{]+\{\s*\[native \w/,n1=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ol=/[+~]/,pi=new RegExp("\\\\[\\da-fA-F]{1,6}"+ht+"?|\\\\([^\\r\\n\\f])","g"),hi=function(C,S){var I="0x"+C.slice(1)-65536;return S||(I<0?String.fromCharCode(I+65536):String.fromCharCode(I>>10|55296,I&1023|56320))},yd=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,bd=function(C,S){return S?C==="\0"?"<22>":C.slice(0,-1)+"\\"+C.charCodeAt(C.length-1).toString(16)+" ":"\\"+C},Cd=function(){j()},i1=Fo(function(C){return C.disabled===!0&&C.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{ki.apply(dn=gd.call(Xe.childNodes),Xe.childNodes),dn[Xe.childNodes.length].nodeType}catch{ki={apply:dn.length?function(S,I){Ln.apply(S,gd.call(I))}:function(S,I){for(var z=S.length,M=0;S[z++]=I[M++];);S.length=z-1}}}function bt(C,S,I,z){var M,G,te,ce,ve,He,Ne,je=S&&S.ownerDocument,Qe=S?S.nodeType:9;if(I=I||[],typeof C!="string"||!C||Qe!==1&&Qe!==9&&Qe!==11)return I;if(!z&&(j(S),S=S||K,Ye)){if(Qe!==11&&(ve=n1.exec(C)))if(M=ve[1]){if(Qe===9)if(te=S.getElementById(M)){if(te.id===M)return I.push(te),I}else return I;else if(je&&(te=je.getElementById(M))&&yn(S,te)&&te.id===M)return I.push(te),I}else{if(ve[2])return ki.apply(I,S.getElementsByTagName(C)),I;if((M=ve[3])&&f.getElementsByClassName&&S.getElementsByClassName)return ki.apply(I,S.getElementsByClassName(M)),I}if(f.qsa&&!bn[C+" "]&&(!Ae||!Ae.test(C))&&(Qe!==1||S.nodeName.toLowerCase()!=="object")){if(Ne=C,je=S,Qe===1&&(G_.test(C)||vd.test(C))){for(je=Ol.test(C)&&Pl(S.parentNode)||S,(je!==S||!f.scope)&&((ce=S.getAttribute("id"))?ce=ce.replace(yd,bd):S.setAttribute("id",ce=yt)),He=b(C),G=He.length;G--;)He[G]=(ce?"#"+ce:":scope")+" "+Mo(He[G]);Ne=He.join(",")}try{return ki.apply(I,je.querySelectorAll(Ne)),I}catch{bn(C,!0)}finally{ce===yt&&S.removeAttribute("id")}}}return E(C.replace(Io,"$1"),S,I,z)}function Ro(){var C=[];function S(I,z){return C.push(I+" ")>h.cacheLength&&delete S[C.shift()],S[I+" "]=z}return S}function $n(C){return C[yt]=!0,C}function On(C){var S=K.createElement("fieldset");try{return!!C(S)}catch{return!1}finally{S.parentNode&&S.parentNode.removeChild(S),S=null}}function Dl(C,S){for(var I=C.split("|"),z=I.length;z--;)h.attrHandle[I[z]]=S}function wd(C,S){var I=S&&C,z=I&&C.nodeType===1&&S.nodeType===1&&C.sourceIndex-S.sourceIndex;if(z)return z;if(I){for(;I=I.nextSibling;)if(I===S)return-1}return C?1:-1}function r1(C){return function(S){var I=S.nodeName.toLowerCase();return I==="input"&&S.type===C}}function s1(C){return function(S){var I=S.nodeName.toLowerCase();return(I==="input"||I==="button")&&S.type===C}}function Td(C){return function(S){return"form"in S?S.parentNode&&S.disabled===!1?"label"in S?"label"in S.parentNode?S.parentNode.disabled===C:S.disabled===C:S.isDisabled===C||S.isDisabled!==!C&&i1(S)===C:S.disabled===C:"label"in S?S.disabled===C:!1}}function Zi(C){return $n(function(S){return S=+S,$n(function(I,z){for(var M,G=C([],I.length,S),te=G.length;te--;)I[M=G[te]]&&(I[M]=!(z[M]=I[M]))})})}function Pl(C){return C&&typeof C.getElementsByTagName<"u"&&C}f=bt.support={},y=bt.isXML=function(C){var S=C&&C.namespaceURI,I=C&&(C.ownerDocument||C).documentElement;return!Q_.test(S||I&&I.nodeName||"HTML")},j=bt.setDocument=function(C){var S,I,z=C?C.ownerDocument||C:Xe;return z==K||z.nodeType!==9||!z.documentElement||(K=z,Oe=K.documentElement,Ye=!y(K),Xe!=K&&(I=K.defaultView)&&I.top!==I&&(I.addEventListener?I.addEventListener("unload",Cd,!1):I.attachEvent&&I.attachEvent("onunload",Cd)),f.scope=On(function(M){return Oe.appendChild(M).appendChild(K.createElement("div")),typeof M.querySelectorAll<"u"&&!M.querySelectorAll(":scope fieldset div").length}),f.cssHas=On(function(){try{return K.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),f.attributes=On(function(M){return M.className="i",!M.getAttribute("className")}),f.getElementsByTagName=On(function(M){return M.appendChild(K.createComment("")),!M.getElementsByTagName("*").length}),f.getElementsByClassName=ys.test(K.getElementsByClassName),f.getById=On(function(M){return Oe.appendChild(M).id=yt,!K.getElementsByName||!K.getElementsByName(yt).length}),f.getById?(h.filter.ID=function(M){var G=M.replace(pi,hi);return function(te){return te.getAttribute("id")===G}},h.find.ID=function(M,G){if(typeof G.getElementById<"u"&&Ye){var te=G.getElementById(M);return te?[te]:[]}}):(h.filter.ID=function(M){var G=M.replace(pi,hi);return function(te){var ce=typeof te.getAttributeNode<"u"&&te.getAttributeNode("id");return ce&&ce.value===G}},h.find.ID=function(M,G){if(typeof G.getElementById<"u"&&Ye){var te,ce,ve,He=G.getElementById(M);if(He){if(te=He.getAttributeNode("id"),te&&te.value===M)return[He];for(ve=G.getElementsByName(M),ce=0;He=ve[ce++];)if(te=He.getAttributeNode("id"),te&&te.value===M)return[He]}return[]}}),h.find.TAG=f.getElementsByTagName?function(M,G){if(typeof G.getElementsByTagName<"u")return G.getElementsByTagName(M);if(f.qsa)return G.querySelectorAll(M)}:function(M,G){var te,ce=[],ve=0,He=G.getElementsByTagName(M);if(M==="*"){for(;te=He[ve++];)te.nodeType===1&&ce.push(te);return ce}return He},h.find.CLASS=f.getElementsByClassName&&function(M,G){if(typeof G.getElementsByClassName<"u"&&Ye)return G.getElementsByClassName(M)},jt=[],Ae=[],(f.qsa=ys.test(K.querySelectorAll))&&(On(function(M){var G;Oe.appendChild(M).innerHTML="<a id='"+yt+"'></a><select id='"+yt+"-\r\\' msallowcapture=''><option selected=''></option></select>",M.querySelectorAll("[msallowcapture^='']").length&&Ae.push("[*^$]="+ht+`*(?:''|"")`),M.querySelectorAll("[selected]").length||Ae.push("\\["+ht+"*(?:value|"+Al+")"),M.querySelectorAll("[id~="+yt+"-]").length||Ae.push("~="),G=K.createElement("input"),G.setAttribute("name",""),M.appendChild(G),M.querySelectorAll("[name='']").length||Ae.push("\\["+ht+"*name"+ht+"*="+ht+`*(?:''|"")`),M.querySelectorAll(":checked").length||Ae.push(":checked"),M.querySelectorAll("a#"+yt+"+*").length||Ae.push(".#.+[+~]"),M.querySelectorAll("\\\f"),Ae.push("[\\r\\n\\f]")}),On(function(M){M.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var G=K.createElement("input");G.setAttribute("type","hidden"),M.appendChild(G).setAttribute("name","D"),M.querySelectorAll("[name=d]").length&&Ae.push("name"+ht+"*[*^$|!~]?="),M.querySelectorAll(":enabled").length!==2&&Ae.push(":enabled",":disabled"),Oe.appendChild(M).disabled=!0,M.querySelectorAll(":disabled").length!==2&&Ae.push(":enabled",":disabled"),M.querySelectorAll("*,:x"),Ae.push(",.*:")})),(f.matchesSelector=ys.test(Rt=Oe.matches||Oe.webkitMatchesSelector||Oe.mozMatchesSelector||Oe.oMatchesSelector||Oe.msMatchesSelector))&&On(function(M){f.disconnectedMatch=Rt.call(M,"*"),Rt.call(M,"[s!='']:x"),jt.push("!=",Ll)}),f.cssHas||Ae.push(":has"),Ae=Ae.length&&new RegExp(Ae.join("|")),jt=jt.length&&new RegExp(jt.join("|")),S=ys.test(Oe.compareDocumentPosition),yn=S||ys.test(Oe.contains)?function(M,G){var te=M.nodeType===9&&M.documentElement||M,ce=G&&G.parentNode;return M===ce||!!(ce&&ce.nodeType===1&&(te.contains?te.contains(ce):M.compareDocumentPosition&&M.compareDocumentPosition(ce)&16))}:function(M,G){if(G){for(;G=G.parentNode;)if(G===M)return!0}return!1},Xi=S?function(M,G){if(M===G)return ee=!0,0;var te=!M.compareDocumentPosition-!G.compareDocumentPosition;return te||(te=(M.ownerDocument||M)==(G.ownerDocument||G)?M.compareDocumentPosition(G):1,te&1||!f.sortDetached&&G.compareDocumentPosition(M)===te?M==K||M.ownerDocument==Xe&&yn(Xe,M)?-1:G==K||G.ownerDocument==Xe&&yn(Xe,G)?1:$?Gi($,M)-Gi($,G):0:te&4?-1:1)}:function(M,G){if(M===G)return ee=!0,0;var te,ce=0,ve=M.parentNode,He=G.parentNode,Ne=[M],je=[G];if(!ve||!He)return M==K?-1:G==K?1:ve?-1:He?1:$?Gi($,M)-Gi($,G):0;if(ve===He)return wd(M,G);for(te=M;te=te.parentNode;)Ne.unshift(te);for(te=G;te=te.parentNode;)je.unshift(te);for(;Ne[ce]===je[ce];)ce++;return ce?wd(Ne[ce],je[ce]):Ne[ce]==Xe?-1:je[ce]==Xe?1:0}),K},bt.matches=function(C,S){return bt(C,null,null,S)},bt.matchesSelector=function(C,S){if(j(C),f.matchesSelector&&Ye&&!bn[S+" "]&&(!jt||!jt.test(S))&&(!Ae||!Ae.test(S)))try{var I=Rt.call(C,S);if(I||f.disconnectedMatch||C.document&&C.document.nodeType!==11)return I}catch{bn(S,!0)}return bt(S,K,null,[C]).length>0},bt.contains=function(C,S){return(C.ownerDocument||C)!=K&&j(C),yn(C,S)},bt.attr=function(C,S){(C.ownerDocument||C)!=K&&j(C);var I=h.attrHandle[S.toLowerCase()],z=I&&Yi.call(h.attrHandle,S.toLowerCase())?I(C,S,!Ye):void 0;return z!==void 0?z:f.attributes||!Ye?C.getAttribute(S):(z=C.getAttributeNode(S))&&z.specified?z.value:null},bt.escape=function(C){return(C+"").replace(yd,bd)},bt.error=function(C){throw new Error("Syntax error, unrecognized expression: "+C)},bt.uniqueSort=function(C){var S,I=[],z=0,M=0;if(ee=!f.detectDuplicates,$=!f.sortStable&&C.slice(0),C.sort(Xi),ee){for(;S=C[M++];)S===C[M]&&(z=I.push(M));for(;z--;)C.splice(I[z],1)}return $=null,C},v=bt.getText=function(C){var S,I="",z=0,M=C.nodeType;if(M){if(M===1||M===9||M===11){if(typeof C.textContent=="string")return C.textContent;for(C=C.firstChild;C;C=C.nextSibling)I+=v(C)}else if(M===3||M===4)return C.nodeValue}else for(;S=C[z++];)I+=v(S);return I},h=bt.selectors={cacheLength:50,createPseudo:$n,match:No,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]||bt.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]&&bt.error(C[0]),C},PSEUDO:function(C){var S,I=!C[6]&&C[2];return No.CHILD.test(C[0])?null:(C[3]?C[2]=C[4]||C[5]||"":I&&J_.test(I)&&(S=b(I,!0))&&(S=I.indexOf(")",I.length-S)-I.length)&&(C[0]=C[0].slice(0,S),C[2]=I.slice(0,S)),C.slice(0,3))}},filter:{TAG:function(C){var S=C.replace(pi,hi).toLowerCase();return C==="*"?function(){return!0}:function(I){return I.nodeName&&I.nodeName.toLowerCase()===S}},CLASS:function(C){var S=Dt[C+" "];return S||(S=new RegExp("(^|"+ht+")"+C+"("+ht+"|$)"))&&Dt(C,function(I){return S.test(typeof I.className=="string"&&I.className||typeof I.getAttribute<"u"&&I.getAttribute("class")||"")})},ATTR:function(C,S,I){return function(z){var M=bt.attr(z,C);return M==null?S==="!=":S?(M+="",S==="="?M===I:S==="!="?M!==I:S==="^="?I&&M.indexOf(I)===0:S==="*="?I&&M.indexOf(I)>-1:S==="$="?I&&M.slice(-I.length)===I:S==="~="?(" "+M.replace(X_," ")+" ").indexOf(I)>-1:S==="|="?M===I||M.slice(0,I.length+1)===I+"-":!1):!0}},CHILD:function(C,S,I,z,M){var G=C.slice(0,3)!=="nth",te=C.slice(-4)!=="last",ce=S==="of-type";return z===1&&M===0?function(ve){return!!ve.parentNode}:function(ve,He,Ne){var je,Qe,Ct,Be,$t,Yt,Cn=G!==te?"nextSibling":"previousSibling",At=ve.parentNode,bs=ce&&ve.nodeName.toLowerCase(),Cs=!Ne&&!ce,wn=!1;if(At){if(G){for(;Cn;){for(Be=ve;Be=Be[Cn];)if(ce?Be.nodeName.toLowerCase()===bs:Be.nodeType===1)return!1;Yt=Cn=C==="only"&&!Yt&&"nextSibling"}return!0}if(Yt=[te?At.firstChild:At.lastChild],te&&Cs){for(Be=At,Ct=Be[yt]||(Be[yt]={}),Qe=Ct[Be.uniqueID]||(Ct[Be.uniqueID]={}),je=Qe[C]||[],$t=je[0]===fn&&je[1],wn=$t&&je[2],Be=$t&&At.childNodes[$t];Be=++$t&&Be&&Be[Cn]||(wn=$t=0)||Yt.pop();)if(Be.nodeType===1&&++wn&&Be===ve){Qe[C]=[fn,$t,wn];break}}else if(Cs&&(Be=ve,Ct=Be[yt]||(Be[yt]={}),Qe=Ct[Be.uniqueID]||(Ct[Be.uniqueID]={}),je=Qe[C]||[],$t=je[0]===fn&&je[1],wn=$t),wn===!1)for(;(Be=++$t&&Be&&Be[Cn]||(wn=$t=0)||Yt.pop())&&!((ce?Be.nodeName.toLowerCase()===bs:Be.nodeType===1)&&++wn&&(Cs&&(Ct=Be[yt]||(Be[yt]={}),Qe=Ct[Be.uniqueID]||(Ct[Be.uniqueID]={}),Qe[C]=[fn,wn]),Be===ve)););return wn-=M,wn===z||wn%z===0&&wn/z>=0}}},PSEUDO:function(C,S){var I,z=h.pseudos[C]||h.setFilters[C.toLowerCase()]||bt.error("unsupported pseudo: "+C);return z[yt]?z(S):z.length>1?(I=[C,C,"",S],h.setFilters.hasOwnProperty(C.toLowerCase())?$n(function(M,G){for(var te,ce=z(M,S),ve=ce.length;ve--;)te=Gi(M,ce[ve]),M[te]=!(G[te]=ce[ve])}):function(M){return z(M,0,I)}):z}},pseudos:{not:$n(function(C){var S=[],I=[],z=A(C.replace(Io,"$1"));return z[yt]?$n(function(M,G,te,ce){for(var ve,He=z(M,null,ce,[]),Ne=M.length;Ne--;)(ve=He[Ne])&&(M[Ne]=!(G[Ne]=ve))}):function(M,G,te){return S[0]=M,z(S,null,te,I),S[0]=null,!I.pop()}}),has:$n(function(C){return function(S){return bt(C,S).length>0}}),contains:$n(function(C){return C=C.replace(pi,hi),function(S){return(S.textContent||v(S)).indexOf(C)>-1}}),lang:$n(function(C){return Z_.test(C||"")||bt.error("unsupported lang: "+C),C=C.replace(pi,hi).toLowerCase(),function(S){var I;do if(I=Ye?S.lang:S.getAttribute("xml:lang")||S.getAttribute("lang"))return I=I.toLowerCase(),I===C||I.indexOf(C+"-")===0;while((S=S.parentNode)&&S.nodeType===1);return!1}}),target:function(C){var S=s.location&&s.location.hash;return S&&S.slice(1)===C.id},root:function(C){return C===Oe},focus:function(C){return C===K.activeElement&&(!K.hasFocus||K.hasFocus())&&!!(C.type||C.href||~C.tabIndex)},enabled:Td(!1),disabled:Td(!0),checked:function(C){var S=C.nodeName.toLowerCase();return S==="input"&&!!C.checked||S==="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 t1.test(C.nodeName)},input:function(C){return e1.test(C.nodeName)},button:function(C){var S=C.nodeName.toLowerCase();return S==="input"&&C.type==="button"||S==="button"},text:function(C){var S;return C.nodeName.toLowerCase()==="input"&&C.type==="text"&&((S=C.getAttribute("type"))==null||S.toLowerCase()==="text")},first:Zi(function(){return[0]}),last:Zi(function(C,S){return[S-1]}),eq:Zi(function(C,S,I){return[I<0?I+S:I]}),even:Zi(function(C,S){for(var I=0;I<S;I+=2)C.push(I);return C}),odd:Zi(function(C,S){for(var I=1;I<S;I+=2)C.push(I);return C}),lt:Zi(function(C,S,I){for(var z=I<0?I+S:I>S?S:I;--z>=0;)C.push(z);return C}),gt:Zi(function(C,S,I){for(var z=I<0?I+S:I;++z<S;)C.push(z);return C})}},h.pseudos.nth=h.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})h.pseudos[u]=r1(u);for(u in{submit:!0,reset:!0})h.pseudos[u]=s1(u);function _d(){}_d.prototype=h.filters=h.pseudos,h.setFilters=new _d,b=bt.tokenize=function(C,S){var I,z,M,G,te,ce,ve,He=vs[C+" "];if(He)return S?0:He.slice(0);for(te=C,ce=[],ve=h.preFilter;te;){(!I||(z=Y_.exec(te)))&&(z&&(te=te.slice(z[0].length)||te),ce.push(M=[])),I=!1,(z=vd.exec(te))&&(I=z.shift(),M.push({value:I,type:z[0].replace(Io," ")}),te=te.slice(I.length));for(G in h.filter)(z=No[G].exec(te))&&(!ve[G]||(z=ve[G](z)))&&(I=z.shift(),M.push({value:I,type:G,matches:z}),te=te.slice(I.length));if(!I)break}return S?te.length:te?bt.error(C):vs(C,ce).slice(0)};function Mo(C){for(var S=0,I=C.length,z="";S<I;S++)z+=C[S].value;return z}function Fo(C,S,I){var z=S.dir,M=S.next,G=M||z,te=I&&G==="parentNode",ce=ut++;return S.first?function(ve,He,Ne){for(;ve=ve[z];)if(ve.nodeType===1||te)return C(ve,He,Ne);return!1}:function(ve,He,Ne){var je,Qe,Ct,Be=[fn,ce];if(Ne){for(;ve=ve[z];)if((ve.nodeType===1||te)&&C(ve,He,Ne))return!0}else for(;ve=ve[z];)if(ve.nodeType===1||te)if(Ct=ve[yt]||(ve[yt]={}),Qe=Ct[ve.uniqueID]||(Ct[ve.uniqueID]={}),M&&M===ve.nodeName.toLowerCase())ve=ve[z]||ve;else{if((je=Qe[G])&&je[0]===fn&&je[1]===ce)return Be[2]=je[2];if(Qe[G]=Be,Be[2]=C(ve,He,Ne))return!0}return!1}}function Il(C){return C.length>1?function(S,I,z){for(var M=C.length;M--;)if(!C[M](S,I,z))return!1;return!0}:C[0]}function o1(C,S,I){for(var z=0,M=S.length;z<M;z++)bt(C,S[z],I);return I}function Ho(C,S,I,z,M){for(var G,te=[],ce=0,ve=C.length,He=S!=null;ce<ve;ce++)(G=C[ce])&&(!I||I(G,z,M))&&(te.push(G),He&&S.push(ce));return te}function Nl(C,S,I,z,M,G){return z&&!z[yt]&&(z=Nl(z)),M&&!M[yt]&&(M=Nl(M,G)),$n(function(te,ce,ve,He){var Ne,je,Qe,Ct=[],Be=[],$t=ce.length,Yt=te||o1(S||"*",ve.nodeType?[ve]:ve,[]),Cn=C&&(te||!S)?Ho(Yt,Ct,C,ve,He):Yt,At=I?M||(te?C:$t||z)?[]:ce:Cn;if(I&&I(Cn,At,ve,He),z)for(Ne=Ho(At,Be),z(Ne,[],ve,He),je=Ne.length;je--;)(Qe=Ne[je])&&(At[Be[je]]=!(Cn[Be[je]]=Qe));if(te){if(M||C){if(M){for(Ne=[],je=At.length;je--;)(Qe=At[je])&&Ne.push(Cn[je]=Qe);M(null,At=[],Ne,He)}for(je=At.length;je--;)(Qe=At[je])&&(Ne=M?Gi(te,Qe):Ct[je])>-1&&(te[Ne]=!(ce[Ne]=Qe))}}else At=Ho(At===ce?At.splice($t,At.length):At),M?M(null,ce,At,He):ki.apply(ce,At)})}function Rl(C){for(var S,I,z,M=C.length,G=h.relative[C[0].type],te=G||h.relative[" "],ce=G?1:0,ve=Fo(function(je){return je===S},te,!0),He=Fo(function(je){return Gi(S,je)>-1},te,!0),Ne=[function(je,Qe,Ct){var Be=!G&&(Ct||Qe!==F)||((S=Qe).nodeType?ve(je,Qe,Ct):He(je,Qe,Ct));return S=null,Be}];ce<M;ce++)if(I=h.relative[C[ce].type])Ne=[Fo(Il(Ne),I)];else{if(I=h.filter[C[ce].type].apply(null,C[ce].matches),I[yt]){for(z=++ce;z<M&&!h.relative[C[z].type];z++);return Nl(ce>1&&Il(Ne),ce>1&&Mo(C.slice(0,ce-1).concat({value:C[ce-2].type===" "?"*":""})).replace(Io,"$1"),I,ce<z&&Rl(C.slice(ce,z)),z<M&&Rl(C=C.slice(z)),z<M&&Mo(C))}Ne.push(I)}return Il(Ne)}function a1(C,S){var I=S.length>0,z=C.length>0,M=function(G,te,ce,ve,He){var Ne,je,Qe,Ct=0,Be="0",$t=G&&[],Yt=[],Cn=F,At=G||z&&h.find.TAG("*",He),bs=fn+=Cn==null?1:Math.random()||.1,Cs=At.length;for(He&&(F=te==K||te||He);Be!==Cs&&(Ne=At[Be])!=null;Be++){if(z&&Ne){for(je=0,!te&&Ne.ownerDocument!=K&&(j(Ne),ce=!Ye);Qe=C[je++];)if(Qe(Ne,te||K,ce)){ve.push(Ne);break}He&&(fn=bs)}I&&((Ne=!Qe&&Ne)&&Ct--,G&&$t.push(Ne))}if(Ct+=Be,I&&Be!==Ct){for(je=0;Qe=S[je++];)Qe($t,Yt,te,ce);if(G){if(Ct>0)for(;Be--;)$t[Be]||Yt[Be]||(Yt[Be]=xi.call(ve));Yt=Ho(Yt)}ki.apply(ve,Yt),He&&!G&&Yt.length>0&&Ct+S.length>1&&bt.uniqueSort(ve)}return He&&(fn=bs,F=Cn),$t};return I?$n(M):M}return A=bt.compile=function(C,S){var I,z=[],M=[],G=Po[C+" "];if(!G){for(S||(S=b(C)),I=S.length;I--;)G=Rl(S[I]),G[yt]?z.push(G):M.push(G);G=Po(C,a1(M,z)),G.selector=C}return G},E=bt.select=function(C,S,I,z){var M,G,te,ce,ve,He=typeof C=="function"&&C,Ne=!z&&b(C=He.selector||C);if(I=I||[],Ne.length===1){if(G=Ne[0]=Ne[0].slice(0),G.length>2&&(te=G[0]).type==="ID"&&S.nodeType===9&&Ye&&h.relative[G[1].type]){if(S=(h.find.ID(te.matches[0].replace(pi,hi),S)||[])[0],S)He&&(S=S.parentNode);else return I;C=C.slice(G.shift().value.length)}for(M=No.needsContext.test(C)?0:G.length;M--&&(te=G[M],!h.relative[ce=te.type]);)if((ve=h.find[ce])&&(z=ve(te.matches[0].replace(pi,hi),Ol.test(G[0].type)&&Pl(S.parentNode)||S))){if(G.splice(M,1),C=z.length&&Mo(G),!C)return ki.apply(I,z),I;break}}return(He||A(C,Ne))(z,S,!Ye,I,!S||Ol.test(C)&&Pl(S.parentNode)||S),I},f.sortStable=yt.split("").sort(Xi).join("")===yt,f.detectDuplicates=!!ee,j(),f.sortDetached=On(function(C){return C.compareDocumentPosition(K.createElement("fieldset"))&1}),On(function(C){return C.innerHTML="<a href='#'></a>",C.firstChild.getAttribute("href")==="#"})||Dl("type|href|height|width",function(C,S,I){if(!I)return C.getAttribute(S,S.toLowerCase()==="type"?1:2)}),(!f.attributes||!On(function(C){return C.innerHTML="<input/>",C.firstChild.setAttribute("value",""),C.firstChild.getAttribute("value")===""}))&&Dl("value",function(C,S,I){if(!I&&C.nodeName.toLowerCase()==="input")return C.defaultValue}),On(function(C){return C.getAttribute("disabled")==null})||Dl(Al,function(C,S,I){var z;if(!I)return C[S]===!0?S.toLowerCase():(z=C.getAttributeNode(S))&&z.specified?z.value:null}),bt}(t);p.find=Me,p.expr=Me.selectors,p.expr[":"]=p.expr.pseudos,p.uniqueSort=p.unique=Me.uniqueSort,p.text=Me.getText,p.isXMLDoc=Me.isXML,p.contains=Me.contains,p.escapeSelector=Me.escape;var ne=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},Y=function(s,u){for(var f=[];s;s=s.nextSibling)s.nodeType===1&&s!==u&&f.push(s);return f},Ee=p.expr.match.needsContext;function De(s,u){return s.nodeName&&s.nodeName.toLowerCase()===u.toLowerCase()}var Te=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function nt(s,u,f){return O(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(nt(this,s||[],!1))},not:function(s){return this.pushStack(nt(this,s||[],!0))},is:function(s){return!!nt(this,typeof s=="string"&&Ee.test(s)?p(s):s||[],!1).length}});var dt,$e=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ie=p.fn.init=function(s,u,f){var h,v;if(!s)return this;if(f=f||dt,typeof s=="string")if(s[0]==="<"&&s[s.length-1]===">"&&s.length>=3?h=[null,s,null]:h=$e.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:P,!0)),Te.test(h[1])&&p.isPlainObject(u))for(h in u)O(this[h])?this[h](u[h]):this.attr(h,u[h]);return this}else return v=P.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(O(s))return f.ready!==void 0?f.ready(s):s(p)}return p.makeArray(s,this)};Ie.prototype=p.fn,dt=p(P);var be=/^(?:parents|prev(?:Until|All))/,ot={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(!Ee.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 kt(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 ne(s,"parentNode")},parentsUntil:function(s,u,f){return ne(s,"parentNode",f)},next:function(s){return kt(s,"nextSibling")},prev:function(s){return kt(s,"previousSibling")},nextAll:function(s){return ne(s,"nextSibling")},prevAll:function(s){return ne(s,"previousSibling")},nextUntil:function(s,u,f){return ne(s,"nextSibling",f)},prevUntil:function(s,u,f){return ne(s,"previousSibling",f)},siblings:function(s){return Y((s.parentNode||{}).firstChild,s)},children:function(s){return Y(s.firstChild)},contents:function(s){return s.contentDocument!=null&&r(s.contentDocument)?s.contentDocument:(De(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&&(ot[s]||p.uniqueSort(v),be.test(s)&&v.reverse()),this.pushStack(v)}});var at=/[^\x20\t\r\n\f]+/g;function we(s){var u={};return p.each(s.match(at)||[],function(f,h){u[h]=!0}),u}p.Callbacks=function(s){s=typeof s=="string"?we(s):p.extend({},s);var u,f,h,v,y=[],b=[],A=-1,E=function(){for(v=v||s.once,h=u=!0;b.length;A=-1)for(f=b.shift();++A<y.length;)y[A].apply(f[0],f[1])===!1&&s.stopOnFalse&&(A=y.length,f=!1);s.memory||(f=!1),u=!1,v&&(f?y=[]:y="")},F={add:function(){return y&&(f&&!u&&(A=y.length-1,b.push(f)),function $(ee){p.each(ee,function(j,K){O(K)?(!s.unique||!F.has(K))&&y.push(K):K&&K.length&&L(K)!=="string"&&$(K)})}(arguments),f&&!u&&E()),this},remove:function(){return p.each(arguments,function($,ee){for(var j;(j=p.inArray(ee,y,j))>-1;)y.splice(j,1),j<=A&&A--}),this},has:function($){return $?p.inArray($,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($,ee){return v||(ee=ee||[],ee=[$,ee.slice?ee.slice():ee],b.push(ee),u||E()),this},fire:function(){return F.fireWith(this,arguments),this},fired:function(){return!!h}};return F};function he(s){return s}function ge(s){throw s}function xe(s,u,f,h){var v;try{s&&O(v=s.promise)?v.call(s).done(u).fail(f):s&&O(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(A,E){var F=O(y[E[4]])&&y[E[4]];v[E[1]](function(){var $=F&&F.apply(this,arguments);$&&O($.promise)?$.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[E[0]+"With"](this,F?[$]:arguments)})}),y=null}).promise()},then:function(y,b,A){var E=0;function F($,ee,j,K){return function(){var Oe=this,Ye=arguments,Ae=function(){var Rt,yn;if(!($<E)){if(Rt=j.apply(Oe,Ye),Rt===ee.promise())throw new TypeError("Thenable self-resolution");yn=Rt&&(typeof Rt=="object"||typeof Rt=="function")&&Rt.then,O(yn)?K?yn.call(Rt,F(E,ee,he,K),F(E,ee,ge,K)):(E++,yn.call(Rt,F(E,ee,he,K),F(E,ee,ge,K),F(E,ee,he,ee.notifyWith))):(j!==he&&(Oe=void 0,Ye=[Rt]),(K||ee.resolveWith)(Oe,Ye))}},jt=K?Ae:function(){try{Ae()}catch(Rt){p.Deferred.exceptionHook&&p.Deferred.exceptionHook(Rt,jt.stackTrace),$+1>=E&&(j!==ge&&(Oe=void 0,Ye=[Rt]),ee.rejectWith(Oe,Ye))}};$?jt():(p.Deferred.getStackHook&&(jt.stackTrace=p.Deferred.getStackHook()),t.setTimeout(jt))}}return p.Deferred(function($){u[0][3].add(F(0,$,O(A)?A:he,$.notifyWith)),u[1][3].add(F(0,$,O(y)?y:he)),u[2][3].add(F(0,$,O(b)?b:ge))}).promise()},promise:function(y){return y!=null?p.extend(y,h):h}},v={};return p.each(u,function(y,b){var A=b[2],E=b[5];h[b[1]]=A.add,E&&A.add(function(){f=E},u[3-y][2].disable,u[3-y][3].disable,u[0][2].lock,u[0][3].lock),A.add(b[3].fire),v[b[0]]=function(){return v[b[0]+"With"](this===v?void 0:this,arguments),this},v[b[0]+"With"]=A.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(A){return function(E){h[A]=this,v[A]=arguments.length>1?o.call(arguments):E,--u||y.resolveWith(h,v)}};if(u<=1&&(xe(s,y.done(b(f)).resolve,y.reject,!u),y.state()==="pending"||O(v[f]&&v[f].then)))return y.then();for(;f--;)xe(v[f],b(f),y.reject);return y.promise()}});var _e=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(s,u){t.console&&t.console.warn&&s&&_e.test(s.name)&&t.console.warn("jQuery.Deferred exception: "+s.message,s.stack,u)},p.readyException=function(s){t.setTimeout(function(){throw s})};var Fe=p.Deferred();p.fn.ready=function(s){return Fe.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)&&Fe.resolveWith(P,[p]))}}),p.ready.then=Fe.then;function ft(){P.removeEventListener("DOMContentLoaded",ft),t.removeEventListener("load",ft),p.ready()}P.readyState==="complete"||P.readyState!=="loading"&&!P.documentElement.doScroll?t.setTimeout(p.ready):(P.addEventListener("DOMContentLoaded",ft),t.addEventListener("load",ft));var pt=function(s,u,f,h,v,y,b){var A=0,E=s.length,F=f==null;if(L(f)==="object"){v=!0;for(A in f)pt(s,u,A,f[A],!0,y,b)}else if(h!==void 0&&(v=!0,O(h)||(b=!0),F&&(b?(u.call(s,h),u=null):(F=u,u=function($,ee,j){return F.call(p($),j)})),u))for(;A<E;A++)u(s[A],f,b?h:h.call(s[A],A,u(s[A],f)));return v?s:F?u.call(s):E?u(s[0],f):y},Wt=/^-ms-/,ln=/-([a-z])/g;function k(s,u){return u.toUpperCase()}function D(s){return s.replace(Wt,"ms-").replace(ln,k)}var W=function(s){return s.nodeType===1||s.nodeType===9||!+s.nodeType};function J(){this.expando=p.expando+J.uid++}J.uid=1,J.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[D(u)]=f;else for(h in u)v[D(h)]=u[h];return v},get:function(s,u){return u===void 0?this.cache(s):s[this.expando]&&s[this.expando][D(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(D):(u=D(u),u=u in h?[u]:u.match(at)||[]),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 H=new J,V=new J,ue=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ie=/[A-Z]/g;function re(s){return s==="true"?!0:s==="false"?!1:s==="null"?null:s===+s+""?+s:ue.test(s)?JSON.parse(s):s}function Q(s,u,f){var h;if(f===void 0&&s.nodeType===1)if(h="data-"+u.replace(ie,"-$&").toLowerCase(),f=s.getAttribute(h),typeof f=="string"){try{f=re(f)}catch{}V.set(s,u,f)}else f=void 0;return f}p.extend({hasData:function(s){return V.hasData(s)||H.hasData(s)},data:function(s,u,f){return V.access(s,u,f)},removeData:function(s,u){V.remove(s,u)},_data:function(s,u,f){return H.access(s,u,f)},_removeData:function(s,u){H.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=V.get(y),y.nodeType===1&&!H.get(y,"hasDataAttrs"))){for(f=b.length;f--;)b[f]&&(h=b[f].name,h.indexOf("data-")===0&&(h=D(h.slice(5)),Q(y,h,v[h])));H.set(y,"hasDataAttrs",!0)}return v}return typeof s=="object"?this.each(function(){V.set(this,s)}):pt(this,function(A){var E;if(y&&A===void 0)return E=V.get(y,s),E!==void 0||(E=Q(y,s),E!==void 0)?E:void 0;this.each(function(){V.set(this,s,A)})},null,u,arguments.length>1,null,!0)},removeData:function(s){return this.each(function(){V.remove(this,s)})}}),p.extend({queue:function(s,u,f){var h;if(s)return u=(u||"fx")+"queue",h=H.get(s,u),f&&(!h||Array.isArray(f)?h=H.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 H.get(s,f)||H.access(s,f,{empty:p.Callbacks("once memory").add(function(){H.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,A=function(){--h||v.resolveWith(y,[y])};for(typeof s!="string"&&(u=s,s=void 0),s=s||"fx";b--;)f=H.get(y[b],s+"queueHooks"),f&&f.empty&&(h++,f.empty.add(A));return A(),v.promise(u)}});var Se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,me=new RegExp("^(?:([+-])=|)("+Se+")([a-z%]*)$","i"),Ce=["Top","Right","Bottom","Left"],Le=P.documentElement,qe=function(s){return p.contains(s.ownerDocument,s)},lt={composed:!0};Le.getRootNode&&(qe=function(s){return p.contains(s.ownerDocument,s)||s.getRootNode(lt)===s.ownerDocument});var Ze=function(s,u){return s=u||s,s.style.display==="none"||s.style.display===""&&qe(s)&&p.css(s,"display")==="none"};function Et(s,u,f,h){var v,y,b=20,A=h?function(){return h.cur()}:function(){return p.css(s,u,"")},E=A(),F=f&&f[3]||(p.cssNumber[u]?"":"px"),$=s.nodeType&&(p.cssNumber[u]||F!=="px"&&+E)&&me.exec(p.css(s,u));if($&&$[3]!==F){for(E=E/2,F=F||$[3],$=+E||1;b--;)p.style(s,u,$+F),(1-y)*(1-(y=A()/E||.5))<=0&&(b=0),$=$/y;$=$*2,p.style(s,u,$+F),f=f||[]}return f&&($=+$||+E||0,v=f[1]?$+(f[1]+1)*f[2]:+f[2],h&&(h.unit=F,h.start=$,h.end=v)),v}var Xt={};function ti(s){var u,f=s.ownerDocument,h=s.nodeName,v=Xt[h];return v||(u=f.body.appendChild(f.createElement(h)),v=p.css(u,"display"),u.parentNode.removeChild(u),v==="none"&&(v="block"),Xt[h]=v,v)}function Bn(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]=H.get(h,"display")||null,v[y]||(h.style.display="")),h.style.display===""&&Ze(h)&&(v[y]=ti(h))):f!=="none"&&(v[y]="none",H.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 Bn(this,!0)},hide:function(){return Bn(this)},toggle:function(s){return typeof s=="boolean"?s?this.show():this.hide():this.each(function(){Ze(this)?p(this).show():p(this).hide()})}});var vn=/^(?:checkbox|radio)$/i,q=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,de=/^$|^module$|\/(?:java|ecma)script/i;(function(){var s=P.createDocumentFragment(),u=s.appendChild(P.createElement("div")),f=P.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 ye={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,"",""]};ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td,x.option||(ye.optgroup=ye.option=[1,"<select multiple='multiple'>","</select>"]);function ze(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&&De(s,u)?p.merge([s],f):f}function et(s,u){for(var f=0,h=s.length;f<h;f++)H.set(s[f],"globalEval",!u||H.get(u[f],"globalEval"))}var Vt=/<|&#?\w+;/;function en(s,u,f,h,v){for(var y,b,A,E,F,$,ee=u.createDocumentFragment(),j=[],K=0,Oe=s.length;K<Oe;K++)if(y=s[K],y||y===0)if(L(y)==="object")p.merge(j,y.nodeType?[y]:y);else if(!Vt.test(y))j.push(u.createTextNode(y));else{for(b=b||ee.appendChild(u.createElement("div")),A=(q.exec(y)||["",""])[1].toLowerCase(),E=ye[A]||ye._default,b.innerHTML=E[1]+p.htmlPrefilter(y)+E[2],$=E[0];$--;)b=b.lastChild;p.merge(j,b.childNodes),b=ee.firstChild,b.textContent=""}for(ee.textContent="",K=0;y=j[K++];){if(h&&p.inArray(y,h)>-1){v&&v.push(y);continue}if(F=qe(y),b=ze(ee.appendChild(y),"script"),F&&et(b),f)for($=0;y=b[$++];)de.test(y.type||"")&&f.push(y)}return ee}var fi=/^([^.]*)(?:\.(.+)|)/;function di(){return!0}function un(){return!1}function fs(s,u){return s===_r()==(u==="focus")}function _r(){try{return P.activeElement}catch{}}function ni(s,u,f,h,v,y){var b,A;if(typeof u=="object"){typeof f!="string"&&(h=h||f,f=void 0);for(A in u)ni(s,A,f,h,u[A],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=un;else if(!v)return s;return y===1&&(b=v,v=function(E){return p().off(E),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,A,E,F,$,ee,j,K,Oe,Ye,Ae=H.get(s);if(W(s))for(f.handler&&(y=f,f=y.handler,v=y.selector),v&&p.find.matchesSelector(Le,v),f.guid||(f.guid=p.guid++),(E=Ae.events)||(E=Ae.events=Object.create(null)),(b=Ae.handle)||(b=Ae.handle=function(jt){return typeof p<"u"&&p.event.triggered!==jt.type?p.event.dispatch.apply(s,arguments):void 0}),u=(u||"").match(at)||[""],F=u.length;F--;)A=fi.exec(u[F])||[],K=Ye=A[1],Oe=(A[2]||"").split(".").sort(),K&&(ee=p.event.special[K]||{},K=(v?ee.delegateType:ee.bindType)||K,ee=p.event.special[K]||{},$=p.extend({type:K,origType:Ye,data:h,handler:f,guid:f.guid,selector:v,needsContext:v&&p.expr.match.needsContext.test(v),namespace:Oe.join(".")},y),(j=E[K])||(j=E[K]=[],j.delegateCount=0,(!ee.setup||ee.setup.call(s,h,Oe,b)===!1)&&s.addEventListener&&s.addEventListener(K,b)),ee.add&&(ee.add.call(s,$),$.handler.guid||($.handler.guid=f.guid)),v?j.splice(j.delegateCount++,0,$):j.push($),p.event.global[K]=!0)},remove:function(s,u,f,h,v){var y,b,A,E,F,$,ee,j,K,Oe,Ye,Ae=H.hasData(s)&&H.get(s);if(!(!Ae||!(E=Ae.events))){for(u=(u||"").match(at)||[""],F=u.length;F--;){if(A=fi.exec(u[F])||[],K=Ye=A[1],Oe=(A[2]||"").split(".").sort(),!K){for(K in E)p.event.remove(s,K+u[F],f,h,!0);continue}for(ee=p.event.special[K]||{},K=(h?ee.delegateType:ee.bindType)||K,j=E[K]||[],A=A[2]&&new RegExp("(^|\\.)"+Oe.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=j.length;y--;)$=j[y],(v||Ye===$.origType)&&(!f||f.guid===$.guid)&&(!A||A.test($.namespace))&&(!h||h===$.selector||h==="**"&&$.selector)&&(j.splice(y,1),$.selector&&j.delegateCount--,ee.remove&&ee.remove.call(s,$));b&&!j.length&&((!ee.teardown||ee.teardown.call(s,Oe,Ae.handle)===!1)&&p.removeEvent(s,K,Ae.handle),delete E[K])}p.isEmptyObject(E)&&H.remove(s,"handle events")}},dispatch:function(s){var u,f,h,v,y,b,A=new Array(arguments.length),E=p.event.fix(s),F=(H.get(this,"events")||Object.create(null))[E.type]||[],$=p.event.special[E.type]||{};for(A[0]=E,u=1;u<arguments.length;u++)A[u]=arguments[u];if(E.delegateTarget=this,!($.preDispatch&&$.preDispatch.call(this,E)===!1)){for(b=p.event.handlers.call(this,E,F),u=0;(v=b[u++])&&!E.isPropagationStopped();)for(E.currentTarget=v.elem,f=0;(y=v.handlers[f++])&&!E.isImmediatePropagationStopped();)(!E.rnamespace||y.namespace===!1||E.rnamespace.test(y.namespace))&&(E.handleObj=y,E.data=y.data,h=((p.event.special[y.origType]||{}).handle||y.handler).apply(v.elem,A),h!==void 0&&(E.result=h)===!1&&(E.preventDefault(),E.stopPropagation()));return $.postDispatch&&$.postDispatch.call(this,E),E.result}},handlers:function(s,u){var f,h,v,y,b,A=[],E=u.delegateCount,F=s.target;if(E&&F.nodeType&&!(s.type==="click"&&s.button>=1)){for(;F!==this;F=F.parentNode||this)if(F.nodeType===1&&!(s.type==="click"&&F.disabled===!0)){for(y=[],b={},f=0;f<E;f++)h=u[f],v=h.selector+" ",b[v]===void 0&&(b[v]=h.needsContext?p(v,this).index(F)>-1:p.find(v,this,null,[F]).length),b[v]&&y.push(h);y.length&&A.push({elem:F,handlers:y})}}return F=this,E<u.length&&A.push({elem:F,handlers:u.slice(E)}),A},addProp:function(s,u){Object.defineProperty(p.Event.prototype,s,{enumerable:!0,configurable:!0,get:O(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 vn.test(u.type)&&u.click&&De(u,"input")&&Er(u,"click",di),!1},trigger:function(s){var u=this||s;return vn.test(u.type)&&u.click&&De(u,"input")&&Er(u,"click"),!0},_default:function(s){var u=s.target;return vn.test(u.type)&&u.click&&De(u,"input")&&H.get(u,"click")||De(u,"a")}},beforeunload:{postDispatch:function(s){s.result!==void 0&&s.originalEvent&&(s.originalEvent.returnValue=s.result)}}}};function Er(s,u,f){if(!f){H.get(s,u)===void 0&&p.event.add(s,u,di);return}H.set(s,u,!1),p.event.add(s,u,{namespace:!1,handler:function(h){var v,y,b=H.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),H.set(this,u,b),v=f(this,u),this[u](),y=H.get(this,u),b!==y||v?H.set(this,u,!1):y={},b!==y)return h.stopImmediatePropagation(),h.preventDefault(),y&&y.value}else b.length&&(H.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:un,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:un,isPropagationStopped:un,isImmediatePropagationStopped:un,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,fs),!1},trigger:function(){return Er(this,s),!0},_default:function(f){return H.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=un),this.each(function(){p.event.remove(this,s,f,u)})}});var ds=/<script|<style|<link/i,Sr=/checked\s*(?:[^=]|=\s*.checked.)/i,m_=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Kf(s,u){return De(s,"table")&&De(u.nodeType!==11?u:u.firstChild,"tr")&&p(s).children("tbody")[0]||s}function v_(s){return s.type=(s.getAttribute("type")!==null)+"/"+s.type,s}function y_(s){return(s.type||"").slice(0,5)==="true/"?s.type=s.type.slice(5):s.removeAttribute("type"),s}function qf(s,u){var f,h,v,y,b,A,E;if(u.nodeType===1){if(H.hasData(s)&&(y=H.get(s),E=y.events,E)){H.remove(u,"handle events");for(v in E)for(f=0,h=E[v].length;f<h;f++)p.event.add(u,v,E[v][f])}V.hasData(s)&&(b=V.access(s),A=p.extend({},b),V.set(u,A))}}function b_(s,u){var f=u.nodeName.toLowerCase();f==="input"&&vn.test(s.type)?u.checked=s.checked:(f==="input"||f==="textarea")&&(u.defaultValue=s.defaultValue)}function xr(s,u,f,h){u=l(u);var v,y,b,A,E,F,$=0,ee=s.length,j=ee-1,K=u[0],Oe=O(K);if(Oe||ee>1&&typeof K=="string"&&!x.checkClone&&Sr.test(K))return s.each(function(Ye){var Ae=s.eq(Ye);Oe&&(u[0]=K.call(this,Ye,Ae.html())),xr(Ae,u,f,h)});if(ee&&(v=en(u,s[0].ownerDocument,!1,s,h),y=v.firstChild,v.childNodes.length===1&&(v=y),y||h)){for(b=p.map(ze(v,"script"),v_),A=b.length;$<ee;$++)E=v,$!==j&&(E=p.clone(E,!0,!0),A&&p.merge(b,ze(E,"script"))),f.call(s[$],E,$);if(A)for(F=b[b.length-1].ownerDocument,p.map(b,y_),$=0;$<A;$++)E=b[$],de.test(E.type||"")&&!H.access(E,"globalEval")&&p.contains(F,E)&&(E.src&&(E.type||"").toLowerCase()!=="module"?p._evalUrl&&!E.noModule&&p._evalUrl(E.src,{nonce:E.nonce||E.getAttribute("nonce")},F):se(E.textContent.replace(m_,""),E,F))}return s}function zf(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(ze(h)),h.parentNode&&(f&&qe(h)&&et(ze(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,A=s.cloneNode(!0),E=qe(s);if(!x.noCloneChecked&&(s.nodeType===1||s.nodeType===11)&&!p.isXMLDoc(s))for(b=ze(A),y=ze(s),h=0,v=y.length;h<v;h++)b_(y[h],b[h]);if(u)if(f)for(y=y||ze(s),b=b||ze(A),h=0,v=y.length;h<v;h++)qf(y[h],b[h]);else qf(s,A);return b=ze(A,"script"),b.length>0&&et(b,!E&&ze(s,"script")),A},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[H.expando]){if(u.events)for(h in u.events)v[h]?p.event.remove(f,h):p.removeEvent(f,h,u.handle);f[H.expando]=void 0}f[V.expando]&&(f[V.expando]=void 0)}}}),p.fn.extend({detach:function(s){return zf(this,s,!0)},remove:function(s){return zf(this,s)},text:function(s){return pt(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 xr(this,arguments,function(s){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var u=Kf(this,s);u.appendChild(s)}})},prepend:function(){return xr(this,arguments,function(s){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var u=Kf(this,s);u.insertBefore(s,u.firstChild)}})},before:function(){return xr(this,arguments,function(s){this.parentNode&&this.parentNode.insertBefore(s,this)})},after:function(){return xr(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(ze(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 pt(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"&&!ds.test(u)&&!ye[(q.exec(u)||["",""])[1].toLowerCase()]){u=p.htmlPrefilter(u);try{for(;h<v;h++)f=this[h]||{},f.nodeType===1&&(p.cleanData(ze(f,!1)),f.innerHTML=u);f=0}catch{}}f&&this.empty().append(u)},null,s,arguments.length)},replaceWith:function(){var s=[];return xr(this,arguments,function(u){var f=this.parentNode;p.inArray(this,s)<0&&(p.cleanData(ze(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,A=0;A<=b;A++)h=A===b?this:this.clone(!0),p(y[A])[u](h),c.apply(v,h.get());return this.pushStack(v)}});var ml=new RegExp("^("+Se+")(?!px)[a-z%]+$","i"),vl=/^--/,Lo=function(s){var u=s.ownerDocument.defaultView;return(!u||!u.opener)&&(u=t),u.getComputedStyle(s)},Xf=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},C_=new RegExp(Ce.join("|"),"i"),Yf="[\\x20\\t\\r\\n\\f]",w_=new RegExp("^"+Yf+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Yf+"+$","g");(function(){function s(){if(F){E.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",F.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Le.appendChild(E).appendChild(F);var $=t.getComputedStyle(F);f=$.top!=="1%",A=u($.marginLeft)===12,F.style.right="60%",y=u($.right)===36,h=u($.width)===36,F.style.position="absolute",v=u(F.offsetWidth/3)===12,Le.removeChild(E),F=null}}function u($){return Math.round(parseFloat($))}var f,h,v,y,b,A,E=P.createElement("div"),F=P.createElement("div");F.style&&(F.style.backgroundClip="content-box",F.cloneNode(!0).style.backgroundClip="",x.clearCloneStyle=F.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(),A},scrollboxSize:function(){return s(),v},reliableTrDimensions:function(){var $,ee,j,K;return b==null&&($=P.createElement("table"),ee=P.createElement("tr"),j=P.createElement("div"),$.style.cssText="position:absolute;left:-11111px;border-collapse:separate",ee.style.cssText="border:1px solid",ee.style.height="1px",j.style.height="9px",j.style.display="block",Le.appendChild($).appendChild(ee).appendChild(j),K=t.getComputedStyle(ee),b=parseInt(K.height,10)+parseInt(K.borderTopWidth,10)+parseInt(K.borderBottomWidth,10)===ee.offsetHeight,Le.removeChild($)),b}}))})();function ps(s,u,f){var h,v,y,b,A=vl.test(u),E=s.style;return f=f||Lo(s),f&&(b=f.getPropertyValue(u)||f[u],A&&b&&(b=b.replace(w_,"$1")||void 0),b===""&&!qe(s)&&(b=p.style(s,u)),!x.pixelBoxStyles()&&ml.test(b)&&C_.test(u)&&(h=E.width,v=E.minWidth,y=E.maxWidth,E.minWidth=E.maxWidth=E.width=b,b=f.width,E.width=h,E.minWidth=v,E.maxWidth=y)),b!==void 0?b+"":b}function Gf(s,u){return{get:function(){if(s()){delete this.get;return}return(this.get=u).apply(this,arguments)}}}var Jf=["Webkit","Moz","ms"],Zf=P.createElement("div").style,Qf={};function T_(s){for(var u=s[0].toUpperCase()+s.slice(1),f=Jf.length;f--;)if(s=Jf[f]+u,s in Zf)return s}function yl(s){var u=p.cssProps[s]||Qf[s];return u||(s in Zf?s:Qf[s]=T_(s)||s)}var __=/^(none|table(?!-c[ea]).+)/,E_={position:"absolute",visibility:"hidden",display:"block"},ed={letterSpacing:"0",fontWeight:"400"};function td(s,u,f){var h=me.exec(u);return h?Math.max(0,h[2]-(f||0))+(h[3]||"px"):u}function bl(s,u,f,h,v,y){var b=u==="width"?1:0,A=0,E=0;if(f===(h?"border":"content"))return 0;for(;b<4;b+=2)f==="margin"&&(E+=p.css(s,f+Ce[b],!0,v)),h?(f==="content"&&(E-=p.css(s,"padding"+Ce[b],!0,v)),f!=="margin"&&(E-=p.css(s,"border"+Ce[b]+"Width",!0,v))):(E+=p.css(s,"padding"+Ce[b],!0,v),f!=="padding"?E+=p.css(s,"border"+Ce[b]+"Width",!0,v):A+=p.css(s,"border"+Ce[b]+"Width",!0,v));return!h&&y>=0&&(E+=Math.max(0,Math.ceil(s["offset"+u[0].toUpperCase()+u.slice(1)]-y-E-A-.5))||0),E}function nd(s,u,f){var h=Lo(s),v=!x.boxSizingReliable()||f,y=v&&p.css(s,"boxSizing",!1,h)==="border-box",b=y,A=ps(s,u,h),E="offset"+u[0].toUpperCase()+u.slice(1);if(ml.test(A)){if(!f)return A;A="auto"}return(!x.boxSizingReliable()&&y||!x.reliableTrDimensions()&&De(s,"tr")||A==="auto"||!parseFloat(A)&&p.css(s,"display",!1,h)==="inline")&&s.getClientRects().length&&(y=p.css(s,"boxSizing",!1,h)==="border-box",b=E in s,b&&(A=s[E])),A=parseFloat(A)||0,A+bl(s,u,f||(y?"border":"content"),b,h,A)+"px"}p.extend({cssHooks:{opacity:{get:function(s,u){if(u){var f=ps(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,A=D(u),E=vl.test(u),F=s.style;if(E||(u=yl(A)),b=p.cssHooks[u]||p.cssHooks[A],f!==void 0){if(y=typeof f,y==="string"&&(v=me.exec(f))&&v[1]&&(f=Et(s,u,v),y="number"),f==null||f!==f)return;y==="number"&&!E&&(f+=v&&v[3]||(p.cssNumber[A]?"":"px")),!x.clearCloneStyle&&f===""&&u.indexOf("background")===0&&(F[u]="inherit"),(!b||!("set"in b)||(f=b.set(s,f,h))!==void 0)&&(E?F.setProperty(u,f):F[u]=f)}else return b&&"get"in b&&(v=b.get(s,!1,h))!==void 0?v:F[u]}},css:function(s,u,f,h){var v,y,b,A=D(u),E=vl.test(u);return E||(u=yl(A)),b=p.cssHooks[u]||p.cssHooks[A],b&&"get"in b&&(v=b.get(s,!0,f)),v===void 0&&(v=ps(s,u,h)),v==="normal"&&u in ed&&(v=ed[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 __.test(p.css(f,"display"))&&(!f.getClientRects().length||!f.getBoundingClientRect().width)?Xf(f,E_,function(){return nd(f,u,v)}):nd(f,u,v)},set:function(f,h,v){var y,b=Lo(f),A=!x.scrollboxSize()&&b.position==="absolute",E=A||v,F=E&&p.css(f,"boxSizing",!1,b)==="border-box",$=v?bl(f,u,v,F,b):0;return F&&A&&($-=Math.ceil(f["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(b[u])-bl(f,u,"border",!1,b)-.5)),$&&(y=me.exec(h))&&(y[3]||"px")!=="px"&&(f.style[u]=h,h=p.css(f,u)),td(f,h,$)}}}),p.cssHooks.marginLeft=Gf(x.reliableMarginLeft,function(s,u){if(u)return(parseFloat(ps(s,"marginLeft"))||s.getBoundingClientRect().left-Xf(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+Ce[h]+u]=y[h]||y[h-2]||y[0];return v}},s!=="margin"&&(p.cssHooks[s+u].set=td)}),p.fn.extend({css:function(s,u){return pt(this,function(f,h,v){var y,b,A={},E=0;if(Array.isArray(h)){for(y=Lo(f),b=h.length;E<b;E++)A[h[E]]=p.css(f,h[E],!1,y);return A}return v!==void 0?p.style(f,h,v):p.css(f,h)},s,u,arguments.length>1)}});function cn(s,u,f,h,v){return new cn.prototype.init(s,u,f,h,v)}p.Tween=cn,cn.prototype={constructor:cn,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=cn.propHooks[this.prop];return s&&s.get?s.get(this):cn.propHooks._default.get(this)},run:function(s){var u,f=cn.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):cn.propHooks._default.set(this),this}},cn.prototype.init.prototype=cn.prototype,cn.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[yl(s.prop)]!=null)?p.style(s.elem,s.prop,s.now+s.unit):s.elem[s.prop]=s.now}}},cn.propHooks.scrollTop=cn.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=cn.prototype.init,p.fx.step={};var kr,Oo,S_=/^(?:toggle|show|hide)$/,x_=/queueHooks$/;function Cl(){Oo&&(P.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Cl):t.setTimeout(Cl,p.fx.interval),p.fx.tick())}function id(){return t.setTimeout(function(){kr=void 0}),kr=Date.now()}function Do(s,u){var f,h=0,v={height:s};for(u=u?1:0;h<4;h+=2-u)f=Ce[h],v["margin"+f]=v["padding"+f]=s;return u&&(v.opacity=v.width=s),v}function rd(s,u,f){for(var h,v=(jn.tweeners[u]||[]).concat(jn.tweeners["*"]),y=0,b=v.length;y<b;y++)if(h=v[y].call(f,u,s))return h}function k_(s,u,f){var h,v,y,b,A,E,F,$,ee="width"in u||"height"in u,j=this,K={},Oe=s.style,Ye=s.nodeType&&Ze(s),Ae=H.get(s,"fxshow");f.queue||(b=p._queueHooks(s,"fx"),b.unqueued==null&&(b.unqueued=0,A=b.empty.fire,b.empty.fire=function(){b.unqueued||A()}),b.unqueued++,j.always(function(){j.always(function(){b.unqueued--,p.queue(s,"fx").length||b.empty.fire()})}));for(h in u)if(v=u[h],S_.test(v)){if(delete u[h],y=y||v==="toggle",v===(Ye?"hide":"show"))if(v==="show"&&Ae&&Ae[h]!==void 0)Ye=!0;else continue;K[h]=Ae&&Ae[h]||p.style(s,h)}if(E=!p.isEmptyObject(u),!(!E&&p.isEmptyObject(K))){ee&&s.nodeType===1&&(f.overflow=[Oe.overflow,Oe.overflowX,Oe.overflowY],F=Ae&&Ae.display,F==null&&(F=H.get(s,"display")),$=p.css(s,"display"),$==="none"&&(F?$=F:(Bn([s],!0),F=s.style.display||F,$=p.css(s,"display"),Bn([s]))),($==="inline"||$==="inline-block"&&F!=null)&&p.css(s,"float")==="none"&&(E||(j.done(function(){Oe.display=F}),F==null&&($=Oe.display,F=$==="none"?"":$)),Oe.display="inline-block")),f.overflow&&(Oe.overflow="hidden",j.always(function(){Oe.overflow=f.overflow[0],Oe.overflowX=f.overflow[1],Oe.overflowY=f.overflow[2]})),E=!1;for(h in K)E||(Ae?"hidden"in Ae&&(Ye=Ae.hidden):Ae=H.access(s,"fxshow",{display:F}),y&&(Ae.hidden=!Ye),Ye&&Bn([s],!0),j.done(function(){Ye||Bn([s]),H.remove(s,"fxshow");for(h in K)p.style(s,h,K[h])})),E=rd(Ye?Ae[h]:0,h,j),h in Ae||(Ae[h]=E.start,Ye&&(E.end=E.start,E.start=0))}}function A_(s,u){var f,h,v,y,b;for(f in s)if(h=D(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 jn(s,u,f){var h,v,y=0,b=jn.prefilters.length,A=p.Deferred().always(function(){delete E.elem}),E=function(){if(v)return!1;for(var ee=kr||id(),j=Math.max(0,F.startTime+F.duration-ee),K=j/F.duration||0,Oe=1-K,Ye=0,Ae=F.tweens.length;Ye<Ae;Ye++)F.tweens[Ye].run(Oe);return A.notifyWith(s,[F,Oe,j]),Oe<1&&Ae?j:(Ae||A.notifyWith(s,[F,1,0]),A.resolveWith(s,[F]),!1)},F=A.promise({elem:s,props:p.extend({},u),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},f),originalProperties:u,originalOptions:f,startTime:kr||id(),duration:f.duration,tweens:[],createTween:function(ee,j){var K=p.Tween(s,F.opts,ee,j,F.opts.specialEasing[ee]||F.opts.easing);return F.tweens.push(K),K},stop:function(ee){var j=0,K=ee?F.tweens.length:0;if(v)return this;for(v=!0;j<K;j++)F.tweens[j].run(1);return ee?(A.notifyWith(s,[F,1,0]),A.resolveWith(s,[F,ee])):A.rejectWith(s,[F,ee]),this}}),$=F.props;for(A_($,F.opts.specialEasing);y<b;y++)if(h=jn.prefilters[y].call(F,s,$,F.opts),h)return O(h.stop)&&(p._queueHooks(F.elem,F.opts.queue).stop=h.stop.bind(h)),h;return p.map($,rd,F),O(F.opts.start)&&F.opts.start.call(s,F),F.progress(F.opts.progress).done(F.opts.done,F.opts.complete).fail(F.opts.fail).always(F.opts.always),p.fx.timer(p.extend(E,{elem:s,anim:F,queue:F.opts.queue})),F}p.Animation=p.extend(jn,{tweeners:{"*":[function(s,u){var f=this.createTween(s,u);return Et(f.elem,s,me.exec(u),f),f}]},tweener:function(s,u){O(s)?(u=s,s=["*"]):s=s.match(at);for(var f,h=0,v=s.length;h<v;h++)f=s[h],jn.tweeners[f]=jn.tweeners[f]||[],jn.tweeners[f].unshift(u)},prefilters:[k_],prefilter:function(s,u){u?jn.prefilters.unshift(s):jn.prefilters.push(s)}}),p.speed=function(s,u,f){var h=s&&typeof s=="object"?p.extend({},s):{complete:f||!f&&u||O(s)&&s,duration:s,easing:f&&u||u&&!O(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(){O(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(Ze).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 A=jn(this,p.extend({},s),y);(v||H.get(this,"finish"))&&A.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,A=H.get(this);if(y)A[y]&&A[y].stop&&h(A[y]);else for(y in A)A[y]&&A[y].stop&&x_.test(y)&&h(A[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=H.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(Do(u,!0),h,v,y)}}),p.each({slideDown:Do("show"),slideUp:Do("hide"),slideToggle:Do("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(kr=Date.now();u<f.length;u++)s=f[u],!s()&&f[u]===s&&f.splice(u--,1);f.length||p.fx.stop(),kr=void 0},p.fx.timer=function(s){p.timers.push(s),p.fx.start()},p.fx.interval=13,p.fx.start=function(){Oo||(Oo=!0,Cl())},p.fx.stop=function(){Oo=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=P.createElement("input"),u=P.createElement("select"),f=u.appendChild(P.createElement("option"));s.type="checkbox",x.checkOn=s.value!=="",x.optSelected=f.selected,s=P.createElement("input"),s.value="t",s.type="radio",x.radioValue=s.value==="t"}();var sd,hs=p.expr.attrHandle;p.fn.extend({attr:function(s,u){return pt(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)?sd: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"&&De(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(at);if(v&&s.nodeType===1)for(;f=v[h++];)s.removeAttribute(f)}}),sd={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=hs[u]||p.find.attr;hs[u]=function(h,v,y){var b,A,E=v.toLowerCase();return y||(A=hs[E],hs[E]=b,b=f(h,v,y)!=null?E:null,hs[E]=A),b}});var L_=/^(?:input|select|textarea|button)$/i,O_=/^(?:a|area)$/i;p.fn.extend({prop:function(s,u){return pt(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):L_.test(s.nodeName)||O_.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 qi(s){var u=s.match(at)||[];return u.join(" ")}function zi(s){return s.getAttribute&&s.getAttribute("class")||""}function wl(s){return Array.isArray(s)?s:typeof s=="string"?s.match(at)||[]:[]}p.fn.extend({addClass:function(s){var u,f,h,v,y,b;return O(s)?this.each(function(A){p(this).addClass(s.call(this,A,zi(this)))}):(u=wl(s),u.length?this.each(function(){if(h=zi(this),f=this.nodeType===1&&" "+qi(h)+" ",f){for(y=0;y<u.length;y++)v=u[y],f.indexOf(" "+v+" ")<0&&(f+=v+" ");b=qi(f),h!==b&&this.setAttribute("class",b)}}):this)},removeClass:function(s){var u,f,h,v,y,b;return O(s)?this.each(function(A){p(this).removeClass(s.call(this,A,zi(this)))}):arguments.length?(u=wl(s),u.length?this.each(function(){if(h=zi(this),f=this.nodeType===1&&" "+qi(h)+" ",f){for(y=0;y<u.length;y++)for(v=u[y];f.indexOf(" "+v+" ")>-1;)f=f.replace(" "+v+" "," ");b=qi(f),h!==b&&this.setAttribute("class",b)}}):this):this.attr("class","")},toggleClass:function(s,u){var f,h,v,y,b=typeof s,A=b==="string"||Array.isArray(s);return O(s)?this.each(function(E){p(this).toggleClass(s.call(this,E,zi(this),u),u)}):typeof u=="boolean"&&A?u?this.addClass(s):this.removeClass(s):(f=wl(s),this.each(function(){if(A)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&&H.set(this,"__className__",h),this.setAttribute&&this.setAttribute("class",h||s===!1?"":H.get(this,"__className__")||""))}))},hasClass:function(s){var u,f,h=0;for(u=" "+s+" ";f=this[h++];)if(f.nodeType===1&&(" "+qi(zi(f))+" ").indexOf(u)>-1)return!0;return!1}});var D_=/\r/g;p.fn.extend({val:function(s){var u,f,h,v=this[0];return arguments.length?(h=O(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(A){return A==null?"":A+""})),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(D_,""):f??"")):void 0}}),p.extend({valHooks:{option:{get:function(s){var u=p.find.attr(s,"value");return u??qi(p.text(s))}},select:{get:function(s){var u,f,h,v=s.options,y=s.selectedIndex,b=s.type==="select-one",A=b?null:[],E=b?y+1:v.length;for(y<0?h=E:h=b?y:0;h<E;h++)if(f=v[h],(f.selected||h===y)&&!f.disabled&&(!f.parentNode.disabled||!De(f.parentNode,"optgroup"))){if(u=p(f).val(),b)return u;A.push(u)}return A},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 od=/^(?:focusinfocus|focusoutblur)$/,ad=function(s){s.stopPropagation()};p.extend(p.event,{trigger:function(s,u,f,h){var v,y,b,A,E,F,$,ee,j=[f||P],K=w.call(s,"type")?s.type:s,Oe=w.call(s,"namespace")?s.namespace.split("."):[];if(y=ee=b=f=f||P,!(f.nodeType===3||f.nodeType===8)&&!od.test(K+p.event.triggered)&&(K.indexOf(".")>-1&&(Oe=K.split("."),K=Oe.shift(),Oe.sort()),E=K.indexOf(":")<0&&"on"+K,s=s[p.expando]?s:new p.Event(K,typeof s=="object"&&s),s.isTrigger=h?2:3,s.namespace=Oe.join("."),s.rnamespace=s.namespace?new RegExp("(^|\\.)"+Oe.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,s.result=void 0,s.target||(s.target=f),u=u==null?[s]:p.makeArray(u,[s]),$=p.event.special[K]||{},!(!h&&$.trigger&&$.trigger.apply(f,u)===!1))){if(!h&&!$.noBubble&&!U(f)){for(A=$.delegateType||K,od.test(A+K)||(y=y.parentNode);y;y=y.parentNode)j.push(y),b=y;b===(f.ownerDocument||P)&&j.push(b.defaultView||b.parentWindow||t)}for(v=0;(y=j[v++])&&!s.isPropagationStopped();)ee=y,s.type=v>1?A:$.bindType||K,F=(H.get(y,"events")||Object.create(null))[s.type]&&H.get(y,"handle"),F&&F.apply(y,u),F=E&&y[E],F&&F.apply&&W(y)&&(s.result=F.apply(y,u),s.result===!1&&s.preventDefault());return s.type=K,!h&&!s.isDefaultPrevented()&&(!$._default||$._default.apply(j.pop(),u)===!1)&&W(f)&&E&&O(f[K])&&!U(f)&&(b=f[E],b&&(f[E]=null),p.event.triggered=K,s.isPropagationStopped()&&ee.addEventListener(K,ad),f[K](),s.isPropagationStopped()&&ee.removeEventListener(K,ad),p.event.triggered=void 0,b&&(f[E]=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=H.access(h,u);v||h.addEventListener(s,f,!0),H.access(h,u,(v||0)+1)},teardown:function(){var h=this.ownerDocument||this.document||this,v=H.access(h,u)-1;v?H.access(h,u,v):(h.removeEventListener(s,f,!0),H.remove(h,u))}}});var gs=t.location,ld={guid:Date.now()},Tl=/\?/;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 P_=/\[\]$/,ud=/\r?\n/g,I_=/^(?:submit|button|image|reset|file)$/i,N_=/^(?:input|select|textarea|keygen)/i;function _l(s,u,f,h){var v;if(Array.isArray(u))p.each(u,function(y,b){f||P_.test(s)?h(s,b):_l(s+"["+(typeof b=="object"&&b!=null?y:"")+"]",b,f,h)});else if(!f&&L(u)==="object")for(v in u)_l(s+"["+v+"]",u[v],f,h);else h(s,u)}p.param=function(s,u){var f,h=[],v=function(y,b){var A=O(b)?b():b;h[h.length]=encodeURIComponent(y)+"="+encodeURIComponent(A??"")};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)_l(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")&&N_.test(this.nodeName)&&!I_.test(s)&&(this.checked||!vn.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(ud,`\r
|
||
`)}}):{name:u.name,value:f.replace(ud,`\r
|
||
`)}}).get()}});var R_=/%20/g,M_=/#.*$/,F_=/([?&])_=[^&]*/,H_=/^(.*?):[ \t]*([^\r\n]*)$/mg,B_=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,j_=/^(?:GET|HEAD)$/,$_=/^\/\//,cd={},El={},fd="*/".concat("*"),Sl=P.createElement("a");Sl.href=gs.href;function dd(s){return function(u,f){typeof u!="string"&&(f=u,u="*");var h,v=0,y=u.toLowerCase().match(at)||[];if(O(f))for(;h=y[v++];)h[0]==="+"?(h=h.slice(1)||"*",(s[h]=s[h]||[]).unshift(f)):(s[h]=s[h]||[]).push(f)}}function pd(s,u,f,h){var v={},y=s===El;function b(A){var E;return v[A]=!0,p.each(s[A]||[],function(F,$){var ee=$(u,f,h);if(typeof ee=="string"&&!y&&!v[ee])return u.dataTypes.unshift(ee),b(ee),!1;if(y)return!(E=ee)}),E}return b(u.dataTypes[0])||!v["*"]&&b("*")}function xl(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 U_(s,u,f){for(var h,v,y,b,A=s.contents,E=s.dataTypes;E[0]==="*";)E.shift(),h===void 0&&(h=s.mimeType||u.getResponseHeader("Content-Type"));if(h){for(v in A)if(A[v]&&A[v].test(h)){E.unshift(v);break}}if(E[0]in f)y=E[0];else{for(v in f){if(!E[0]||s.converters[v+" "+E[0]]){y=v;break}b||(b=v)}y=y||b}if(y)return y!==E[0]&&E.unshift(y),f[y]}function W_(s,u,f,h){var v,y,b,A,E,F={},$=s.dataTypes.slice();if($[1])for(b in s.converters)F[b.toLowerCase()]=s.converters[b];for(y=$.shift();y;)if(s.responseFields[y]&&(f[s.responseFields[y]]=u),!E&&h&&s.dataFilter&&(u=s.dataFilter(u,s.dataType)),E=y,y=$.shift(),y){if(y==="*")y=E;else if(E!=="*"&&E!==y){if(b=F[E+" "+y]||F["* "+y],!b){for(v in F)if(A=v.split(" "),A[1]===y&&(b=F[E+" "+A[0]]||F["* "+A[0]],b)){b===!0?b=F[v]:F[v]!==!0&&(y=A[0],$.unshift(A[1]));break}}if(b!==!0)if(b&&s.throws)u=b(u);else try{u=b(u)}catch(ee){return{state:"parsererror",error:b?ee:"No conversion from "+E+" to "+y}}}}return{state:"success",data:u}}p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gs.href,type:"GET",isLocal:B_.test(gs.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":fd,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?xl(xl(s,p.ajaxSettings),u):xl(p.ajaxSettings,s)},ajaxPrefilter:dd(cd),ajaxTransport:dd(El),ajax:function(s,u){typeof s=="object"&&(u=s,s=void 0),u=u||{};var f,h,v,y,b,A,E,F,$,ee,j=p.ajaxSetup({},u),K=j.context||j,Oe=j.context&&(K.nodeType||K.jquery)?p(K):p.event,Ye=p.Deferred(),Ae=p.Callbacks("once memory"),jt=j.statusCode||{},Rt={},yn={},yt="canceled",Xe={readyState:0,getResponseHeader:function(ut){var Dt;if(E){if(!y)for(y={};Dt=H_.exec(v);)y[Dt[1].toLowerCase()+" "]=(y[Dt[1].toLowerCase()+" "]||[]).concat(Dt[2]);Dt=y[ut.toLowerCase()+" "]}return Dt==null?null:Dt.join(", ")},getAllResponseHeaders:function(){return E?v:null},setRequestHeader:function(ut,Dt){return E==null&&(ut=yn[ut.toLowerCase()]=yn[ut.toLowerCase()]||ut,Rt[ut]=Dt),this},overrideMimeType:function(ut){return E==null&&(j.mimeType=ut),this},statusCode:function(ut){var Dt;if(ut)if(E)Xe.always(ut[Xe.status]);else for(Dt in ut)jt[Dt]=[jt[Dt],ut[Dt]];return this},abort:function(ut){var Dt=ut||yt;return f&&f.abort(Dt),fn(0,Dt),this}};if(Ye.promise(Xe),j.url=((s||j.url||gs.href)+"").replace($_,gs.protocol+"//"),j.type=u.method||u.type||j.method||j.type,j.dataTypes=(j.dataType||"*").toLowerCase().match(at)||[""],j.crossDomain==null){A=P.createElement("a");try{A.href=j.url,A.href=A.href,j.crossDomain=Sl.protocol+"//"+Sl.host!=A.protocol+"//"+A.host}catch{j.crossDomain=!0}}if(j.data&&j.processData&&typeof j.data!="string"&&(j.data=p.param(j.data,j.traditional)),pd(cd,j,u,Xe),E)return Xe;F=p.event&&j.global,F&&p.active++===0&&p.event.trigger("ajaxStart"),j.type=j.type.toUpperCase(),j.hasContent=!j_.test(j.type),h=j.url.replace(M_,""),j.hasContent?j.data&&j.processData&&(j.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(j.data=j.data.replace(R_,"+")):(ee=j.url.slice(h.length),j.data&&(j.processData||typeof j.data=="string")&&(h+=(Tl.test(h)?"&":"?")+j.data,delete j.data),j.cache===!1&&(h=h.replace(F_,"$1"),ee=(Tl.test(h)?"&":"?")+"_="+ld.guid+++ee),j.url=h+ee),j.ifModified&&(p.lastModified[h]&&Xe.setRequestHeader("If-Modified-Since",p.lastModified[h]),p.etag[h]&&Xe.setRequestHeader("If-None-Match",p.etag[h])),(j.data&&j.hasContent&&j.contentType!==!1||u.contentType)&&Xe.setRequestHeader("Content-Type",j.contentType),Xe.setRequestHeader("Accept",j.dataTypes[0]&&j.accepts[j.dataTypes[0]]?j.accepts[j.dataTypes[0]]+(j.dataTypes[0]!=="*"?", "+fd+"; q=0.01":""):j.accepts["*"]);for($ in j.headers)Xe.setRequestHeader($,j.headers[$]);if(j.beforeSend&&(j.beforeSend.call(K,Xe,j)===!1||E))return Xe.abort();if(yt="abort",Ae.add(j.complete),Xe.done(j.success),Xe.fail(j.error),f=pd(El,j,u,Xe),!f)fn(-1,"No Transport");else{if(Xe.readyState=1,F&&Oe.trigger("ajaxSend",[Xe,j]),E)return Xe;j.async&&j.timeout>0&&(b=t.setTimeout(function(){Xe.abort("timeout")},j.timeout));try{E=!1,f.send(Rt,fn)}catch(ut){if(E)throw ut;fn(-1,ut)}}function fn(ut,Dt,vs,Po){var bn,Xi,Yi,dn,xi,Ln=Dt;E||(E=!0,b&&t.clearTimeout(b),f=void 0,v=Po||"",Xe.readyState=ut>0?4:0,bn=ut>=200&&ut<300||ut===304,vs&&(dn=U_(j,Xe,vs)),!bn&&p.inArray("script",j.dataTypes)>-1&&p.inArray("json",j.dataTypes)<0&&(j.converters["text script"]=function(){}),dn=W_(j,dn,Xe,bn),bn?(j.ifModified&&(xi=Xe.getResponseHeader("Last-Modified"),xi&&(p.lastModified[h]=xi),xi=Xe.getResponseHeader("etag"),xi&&(p.etag[h]=xi)),ut===204||j.type==="HEAD"?Ln="nocontent":ut===304?Ln="notmodified":(Ln=dn.state,Xi=dn.data,Yi=dn.error,bn=!Yi)):(Yi=Ln,(ut||!Ln)&&(Ln="error",ut<0&&(ut=0))),Xe.status=ut,Xe.statusText=(Dt||Ln)+"",bn?Ye.resolveWith(K,[Xi,Ln,Xe]):Ye.rejectWith(K,[Xe,Ln,Yi]),Xe.statusCode(jt),jt=void 0,F&&Oe.trigger(bn?"ajaxSuccess":"ajaxError",[Xe,j,bn?Xi:Yi]),Ae.fireWith(K,[Xe,Ln]),F&&(Oe.trigger("ajaxComplete",[Xe,j]),--p.active||p.event.trigger("ajaxStop")))}return Xe},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 O(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]&&(O(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 O(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=O(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 V_={0:200,1223:204},ms=p.ajaxSettings.xhr();x.cors=!!ms&&"withCredentials"in ms,x.ajax=ms=!!ms,p.ajaxTransport(function(s){var u,f;if(x.cors||ms&&!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(A){return function(){u&&(u=f=b.onload=b.onerror=b.onabort=b.ontimeout=b.onreadystatechange=null,A==="abort"?b.abort():A==="error"?typeof b.status!="number"?v(0,"error"):v(b.status,b.statusText):v(V_[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(A){if(u)throw A}},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)}),P.head.appendChild(u[0])},abort:function(){f&&f()}}}});var hd=[],kl=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var s=hd.pop()||p.expando+"_"+ld.guid++;return this[s]=!0,s}}),p.ajaxPrefilter("json jsonp",function(s,u,f){var h,v,y,b=s.jsonp!==!1&&(kl.test(s.url)?"url":typeof s.data=="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&kl.test(s.data)&&"data");if(b||s.dataTypes[0]==="jsonp")return h=s.jsonpCallback=O(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,b?s[b]=s[b].replace(kl,"$1"+h):s.jsonp!==!1&&(s.url+=(Tl.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,hd.push(h)),y&&O(v)&&v(y[0]),y=v=void 0}),"script"}),x.createHTMLDocument=function(){var s=P.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=P.implementation.createHTMLDocument(""),h=u.createElement("base"),h.href=P.location.href,u.head.appendChild(h)):u=P),v=Te.exec(s),y=!f&&[],v?[u.createElement(v[1])]:(v=en([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,A=s.indexOf(" ");return A>-1&&(h=qi(s.slice(A)),s=s.slice(0,A)),O(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(E){y=arguments,b.html(h?p("<div>").append(p.parseHTML(E)).find(h):E)}).always(f&&function(E,F){b.each(function(){f.apply(this,y||[E.responseText,F,E])})}),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,A,E,F,$=p.css(s,"position"),ee=p(s),j={};$==="static"&&(s.style.position="relative"),A=ee.offset(),y=p.css(s,"top"),E=p.css(s,"left"),F=($==="absolute"||$==="fixed")&&(y+E).indexOf("auto")>-1,F?(h=ee.position(),b=h.top,v=h.left):(b=parseFloat(y)||0,v=parseFloat(E)||0),O(u)&&(u=u.call(s,f,p.extend({},A))),u.top!=null&&(j.top=u.top-A.top+b),u.left!=null&&(j.left=u.left-A.left+v),"using"in u?u.using.call(s,j):ee.css(j)}},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||Le})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(s,u){var f=u==="pageYOffset";p.fn[s]=function(h){return pt(this,function(v,y,b){var A;if(U(v)?A=v:v.nodeType===9&&(A=v.defaultView),b===void 0)return A?A[u]:v[y];A?A.scrollTo(f?A.pageXOffset:b,f?b:A.pageYOffset):v[y]=b},s,h,arguments.length)}}),p.each(["top","left"],function(s,u){p.cssHooks[u]=Gf(x.pixelPosition,function(f,h){if(h)return h=ps(f,u),ml.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"),A=f||(v===!0||y===!0?"margin":"border");return pt(this,function(E,F,$){var ee;return U(E)?h.indexOf("outer")===0?E["inner"+s]:E.document.documentElement["client"+s]:E.nodeType===9?(ee=E.documentElement,Math.max(E.body["scroll"+s],ee["scroll"+s],E.body["offset"+s],ee["offset"+s],ee["client"+s])):$===void 0?p.css(E,F,A):p.style(E,F,$,A)},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 K_=/^[\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),!!O(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=De,p.isFunction=O,p.isWindow=U,p.camelCase=D,p.type=L,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(K_,"$1")};var q_=t.jQuery,z_=t.$;return p.noConflict=function(s){return t.$===p&&(t.$=z_),s&&t.jQuery===p&&(t.jQuery=q_),p},typeof n>"u"&&(t.jQuery=t.$=p),p})}(ja)),ja.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:O,remove:U,error:m,getContainer:g,info:w,options:{},subscribe:_,success:R,version:"2.1.4",warning:x},d;return c;function m(ne,Y,Ee){return p({type:l.error,iconClass:Pe().iconClasses.error,message:ne,optionsOverride:Ee,title:Y})}function g(ne,Y){return ne||(ne=Pe()),i=n("#"+ne.containerId),i.length||Y&&(i=se(ne)),i}function w(ne,Y,Ee){return p({type:l.info,iconClass:Pe().iconClasses.info,message:ne,optionsOverride:Ee,title:Y})}function _(ne){r=ne}function R(ne,Y,Ee){return p({type:l.success,iconClass:Pe().iconClasses.success,message:ne,optionsOverride:Ee,title:Y})}function x(ne,Y,Ee){return p({type:l.warning,iconClass:Pe().iconClasses.warning,message:ne,optionsOverride:Ee,title:Y})}function O(ne,Y){var Ee=Pe();i||g(Ee),Z(ne,Ee,Y)||P(Ee)}function U(ne){var Y=Pe();if(i||g(Y),ne&&n(":focus",ne).length===0){Me(ne);return}i.children().length&&i.remove()}function P(ne){for(var Y=i.children(),Ee=Y.length-1;Ee>=0;Ee--)Z(n(Y[Ee]),ne)}function Z(ne,Y,Ee){var De=Ee&&Ee.force?Ee.force:!1;return ne&&(De||n(":focus",ne).length===0)?(ne[Y.hideMethod]({duration:Y.hideDuration,easing:Y.hideEasing,complete:function(){Me(ne)}}),!0):!1}function se(ne){return i=n("<div/>").attr("id",ne.containerId).addClass(ne.positionClass),i.appendTo(n(ne.target)),i}function L(){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 ke(ne){r&&r(ne)}function p(ne){var Y=Pe(),Ee=ne.iconClass||Y.iconClass;if(typeof ne.optionsOverride<"u"&&(Y=n.extend(Y,ne.optionsOverride),Ee=ne.optionsOverride.iconClass||Ee),k(Y,ne))return;o++,i=g(Y,!0);var De=null,Te=n("<div/>"),nt=n("<div/>"),dt=n("<div/>"),$e=n("<div/>"),Ie=n(Y.closeHtml),be={intervalId:null,hideEta:null,maxHideTime:null},ot={toastId:o,state:"visible",startTime:new Date,options:Y,map:ne};return at(),ge(),he(),ke(ot),Y.debug&&console&&console.log(ot),Te;function kt(V){return V==null&&(V=""),V.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function at(){xe(),Fe(),ft(),pt(),Wt(),ln(),_e(),we()}function we(){var V="";switch(ne.iconClass){case"toast-success":case"toast-info":V="polite";break;default:V="assertive"}Te.attr("aria-live",V)}function he(){Y.closeOnHover&&Te.hover(J,W),!Y.onclick&&Y.tapToDismiss&&Te.click(D),Y.closeButton&&Ie&&Ie.click(function(V){V.stopPropagation?V.stopPropagation():V.cancelBubble!==void 0&&V.cancelBubble!==!0&&(V.cancelBubble=!0),Y.onCloseClick&&Y.onCloseClick(V),D(!0)}),Y.onclick&&Te.click(function(V){Y.onclick(V),D()})}function ge(){Te.hide(),Te[Y.showMethod]({duration:Y.showDuration,easing:Y.showEasing,complete:Y.onShown}),Y.timeOut>0&&(De=setTimeout(D,Y.timeOut),be.maxHideTime=parseFloat(Y.timeOut),be.hideEta=new Date().getTime()+be.maxHideTime,Y.progressBar&&(be.intervalId=setInterval(H,10)))}function xe(){ne.iconClass&&Te.addClass(Y.toastClass).addClass(Ee)}function _e(){Y.newestOnTop?i.prepend(Te):i.append(Te)}function Fe(){if(ne.title){var V=ne.title;Y.escapeHtml&&(V=kt(ne.title)),nt.append(V).addClass(Y.titleClass),Te.append(nt)}}function ft(){if(ne.message){var V=ne.message;Y.escapeHtml&&(V=kt(ne.message)),dt.append(V).addClass(Y.messageClass),Te.append(dt)}}function pt(){Y.closeButton&&(Ie.addClass(Y.closeClass).attr("role","button"),Te.prepend(Ie))}function Wt(){Y.progressBar&&($e.addClass(Y.progressClass),Te.prepend($e))}function ln(){Y.rtl&&Te.addClass("rtl")}function k(V,ue){if(V.preventDuplicates){if(ue.message===d)return!0;d=ue.message}return!1}function D(V){var ue=V&&Y.closeMethod!==!1?Y.closeMethod:Y.hideMethod,ie=V&&Y.closeDuration!==!1?Y.closeDuration:Y.hideDuration,re=V&&Y.closeEasing!==!1?Y.closeEasing:Y.hideEasing;if(!(n(":focus",Te).length&&!V))return clearTimeout(be.intervalId),Te[ue]({duration:ie,easing:re,complete:function(){Me(Te),clearTimeout(De),Y.onHidden&&ot.state!=="hidden"&&Y.onHidden(),ot.state="hidden",ot.endTime=new Date,ke(ot)}})}function W(){(Y.timeOut>0||Y.extendedTimeOut>0)&&(De=setTimeout(D,Y.extendedTimeOut),be.maxHideTime=parseFloat(Y.extendedTimeOut),be.hideEta=new Date().getTime()+be.maxHideTime)}function J(){clearTimeout(De),be.hideEta=0,Te.stop(!0,!0)[Y.showMethod]({duration:Y.showDuration,easing:Y.showEasing})}function H(){var V=(be.hideEta-new Date().getTime())/be.maxHideTime*100;$e.width(V+"%")}}function Pe(){return n.extend({},L(),c.options)}function Me(ne){i||(i=g()),!ne.is(":visible")&&(ne.remove(),ne=null,i.children().length===0&&(i.remove(),d=void 0))}}()})})(function(t,n){e.exports?e.exports=n(yw()):window.toastr=n(window.jQuery)})})(Oc);var bw=Oc.exports;const Cw=Ha(bw);var Pc={exports:{}};/*!
|
||
* clipboard.js v2.0.11
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/(function(e,t){(function(i,r){e.exports=r()})(Lc,function(){return function(){var n={686:function(o,l,c){c.d(l,{default:function(){return at}});var d=c(279),m=c.n(d),g=c(370),w=c.n(g),_=c(817),R=c.n(_);function x(we){try{return document.execCommand(we)}catch{return!1}}var O=function(he){var ge=R()(he);return x("cut"),ge},U=O;function P(we){var he=document.documentElement.getAttribute("dir")==="rtl",ge=document.createElement("textarea");ge.style.fontSize="12pt",ge.style.border="0",ge.style.padding="0",ge.style.margin="0",ge.style.position="absolute",ge.style[he?"right":"left"]="-9999px";var xe=window.pageYOffset||document.documentElement.scrollTop;return ge.style.top="".concat(xe,"px"),ge.setAttribute("readonly",""),ge.value=we,ge}var Z=function(he,ge){var xe=P(he);ge.container.appendChild(xe);var _e=R()(xe);return x("copy"),xe.remove(),_e},se=function(he){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},xe="";return typeof he=="string"?xe=Z(he,ge):he instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(he==null?void 0:he.type)?xe=Z(he.value,ge):(xe=R()(he),x("copy")),xe},L=se;function ke(we){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ke=function(ge){return typeof ge}:ke=function(ge){return ge&&typeof Symbol=="function"&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge},ke(we)}var p=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ge=he.action,xe=ge===void 0?"copy":ge,_e=he.container,Fe=he.target,ft=he.text;if(xe!=="copy"&&xe!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Fe!==void 0)if(Fe&&ke(Fe)==="object"&&Fe.nodeType===1){if(xe==="copy"&&Fe.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(xe==="cut"&&(Fe.hasAttribute("readonly")||Fe.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(ft)return L(ft,{container:_e});if(Fe)return xe==="cut"?U(Fe):L(Fe,{container:_e})},Pe=p;function Me(we){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(ge){return typeof ge}:Me=function(ge){return ge&&typeof Symbol=="function"&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge},Me(we)}function ne(we,he){if(!(we instanceof he))throw new TypeError("Cannot call a class as a function")}function Y(we,he){for(var ge=0;ge<he.length;ge++){var xe=he[ge];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(we,xe.key,xe)}}function Ee(we,he,ge){return he&&Y(we.prototype,he),ge&&Y(we,ge),we}function De(we,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");we.prototype=Object.create(he&&he.prototype,{constructor:{value:we,writable:!0,configurable:!0}}),he&&Te(we,he)}function Te(we,he){return Te=Object.setPrototypeOf||function(xe,_e){return xe.__proto__=_e,xe},Te(we,he)}function nt(we){var he=Ie();return function(){var xe=be(we),_e;if(he){var Fe=be(this).constructor;_e=Reflect.construct(xe,arguments,Fe)}else _e=xe.apply(this,arguments);return dt(this,_e)}}function dt(we,he){return he&&(Me(he)==="object"||typeof he=="function")?he:$e(we)}function $e(we){if(we===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we}function Ie(){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 be(we){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(ge){return ge.__proto__||Object.getPrototypeOf(ge)},be(we)}function ot(we,he){var ge="data-clipboard-".concat(we);if(he.hasAttribute(ge))return he.getAttribute(ge)}var kt=function(we){De(ge,we);var he=nt(ge);function ge(xe,_e){var Fe;return ne(this,ge),Fe=he.call(this),Fe.resolveOptions(_e),Fe.listenClick(xe),Fe}return Ee(ge,[{key:"resolveOptions",value:function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof _e.action=="function"?_e.action:this.defaultAction,this.target=typeof _e.target=="function"?_e.target:this.defaultTarget,this.text=typeof _e.text=="function"?_e.text:this.defaultText,this.container=Me(_e.container)==="object"?_e.container:document.body}},{key:"listenClick",value:function(_e){var Fe=this;this.listener=w()(_e,"click",function(ft){return Fe.onClick(ft)})}},{key:"onClick",value:function(_e){var Fe=_e.delegateTarget||_e.currentTarget,ft=this.action(Fe)||"copy",pt=Pe({action:ft,container:this.container,target:this.target(Fe),text:this.text(Fe)});this.emit(pt?"success":"error",{action:ft,text:pt,trigger:Fe,clearSelection:function(){Fe&&Fe.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(_e){return ot("action",_e)}},{key:"defaultTarget",value:function(_e){var Fe=ot("target",_e);if(Fe)return document.querySelector(Fe)}},{key:"defaultText",value:function(_e){return ot("text",_e)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(_e){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return L(_e,Fe)}},{key:"cut",value:function(_e){return U(_e)}},{key:"isSupported",value:function(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Fe=typeof _e=="string"?[_e]:_e,ft=!!document.queryCommandSupported;return Fe.forEach(function(pt){ft=ft&&!!document.queryCommandSupported(pt)}),ft}}]),ge}(m()),at=kt},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(_,R,x,O,U){var P=w.apply(this,arguments);return _.addEventListener(x,P,U),{destroy:function(){_.removeEventListener(x,P,U)}}}function g(_,R,x,O,U){return typeof _.addEventListener=="function"?m.apply(null,arguments):typeof x=="function"?m.bind(null,document).apply(null,arguments):(typeof _=="string"&&(_=document.querySelectorAll(_)),Array.prototype.map.call(_,function(P){return m(P,R,x,O,U)}))}function w(_,R,x,O){return function(U){U.delegateTarget=d(U.target,R),U.delegateTarget&&O.call(_,U)}}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,O,U){if(!x&&!O&&!U)throw new Error("Missing required arguments");if(!d.string(O))throw new TypeError("Second argument must be a String");if(!d.fn(U))throw new TypeError("Third argument must be a Function");if(d.node(x))return w(x,O,U);if(d.nodeList(x))return _(x,O,U);if(d.string(x))return R(x,O,U);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function w(x,O,U){return x.addEventListener(O,U),{destroy:function(){x.removeEventListener(O,U)}}}function _(x,O,U){return Array.prototype.forEach.call(x,function(P){P.addEventListener(O,U)}),{destroy:function(){Array.prototype.forEach.call(x,function(P){P.removeEventListener(O,U)})}}}function R(x,O,U){return m(document.body,x,O,U)}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 _=0,R=g.length;_<R;_++)g[_].fn!==d&&g[_].fn._!==d&&w.push(g[_]);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})})(Pc);var ww=Pc.exports;const Tw=Ha(ww),_w=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 Tw(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 Ic(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ew}=Object.prototype,{getPrototypeOf:$a}=Object,co=(e=>t=>{const n=Ew.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gn=e=>(e=e.toLowerCase(),t=>co(t)===e),fo=e=>t=>typeof t===e,{isArray:mr}=Array,Zr=fo("undefined");function Sw(e){return e!==null&&!Zr(e)&&e.constructor!==null&&!Zr(e.constructor)&&Sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Nc=Gn("ArrayBuffer");function xw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Nc(e.buffer),t}const kw=fo("string"),Sn=fo("function"),Rc=fo("number"),po=e=>e!==null&&typeof e=="object",Aw=e=>e===!0||e===!1,ho=e=>{if(co(e)!=="object")return!1;const t=$a(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Lw=Gn("Date"),Ow=Gn("File"),Dw=Gn("Blob"),Pw=Gn("FileList"),Iw=e=>po(e)&&Sn(e.pipe),Nw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Sn(e.append)&&((t=co(e))==="formdata"||t==="object"&&Sn(e.toString)&&e.toString()==="[object FormData]"))},Rw=Gn("URLSearchParams"),Mw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qr(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 Mc(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 Fc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Hc=e=>!Zr(e)&&e!==Fc;function Ua(){const{caseless:e}=Hc(this)&&this||{},t={},n=(i,r)=>{const o=e&&Mc(t,r)||r;ho(t[o])&&ho(i)?t[o]=Ua(t[o],i):ho(i)?t[o]=Ua({},i):mr(i)?t[o]=i.slice():t[o]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&Qr(arguments[i],n);return t}const Fw=(e,t,n,{allOwnKeys:i}={})=>(Qr(t,(r,o)=>{n&&Sn(r)?e[o]=Ic(r,n):e[o]=r},{allOwnKeys:i}),e),Hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bw=(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)},jw=(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&&$a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$w=(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},Uw=e=>{if(!e)return null;if(mr(e))return e;let t=e.length;if(!Rc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ww=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$a(Uint8Array)),Vw=(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])}},Kw=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},qw=Gn("HTMLFormElement"),zw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Bc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xw=Gn("RegExp"),jc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Qr(n,(r,o)=>{t(r,o,e)!==!1&&(i[o]=r)}),Object.defineProperties(e,i)},Yw=e=>{jc(e,(t,n)=>{if(Sn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(Sn(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+"'")})}})},Gw=(e,t)=>{const n={},i=r=>{r.forEach(o=>{n[o]=!0})};return mr(e)?i(e):i(String(e).split(t)),n},Jw=()=>{},Zw=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Wa="abcdefghijklmnopqrstuvwxyz",$c="0123456789",Uc={DIGIT:$c,ALPHA:Wa,ALPHA_DIGIT:Wa+Wa.toUpperCase()+$c},Qw=(e=16,t=Uc.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n};function e0(e){return!!(e&&Sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const t0=e=>{const t=new Array(10),n=(i,r)=>{if(po(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[r]=i;const o=mr(i)?[]:{};return Qr(i,(l,c)=>{const d=n(l,r+1);!Zr(d)&&(o[c]=d)}),t[r]=void 0,o}}return i};return n(e,0)},n0=Gn("AsyncFunction"),X={isArray:mr,isArrayBuffer:Nc,isBuffer:Sw,isFormData:Nw,isArrayBufferView:xw,isString:kw,isNumber:Rc,isBoolean:Aw,isObject:po,isPlainObject:ho,isUndefined:Zr,isDate:Lw,isFile:Ow,isBlob:Dw,isRegExp:Xw,isFunction:Sn,isStream:Iw,isURLSearchParams:Rw,isTypedArray:Ww,isFileList:Pw,forEach:Qr,merge:Ua,extend:Fw,trim:Mw,stripBOM:Hw,inherits:Bw,toFlatObject:jw,kindOf:co,kindOfTest:Gn,endsWith:$w,toArray:Uw,forEachEntry:Vw,matchAll:Kw,isHTMLForm:qw,hasOwnProperty:Bc,hasOwnProp:Bc,reduceDescriptors:jc,freezeMethods:Yw,toObjectSet:Gw,toCamelCase:zw,noop:Jw,toFiniteNumber:Zw,findKey:Mc,global:Fc,isContextDefined:Hc,ALPHABET:Uc,generateString:Qw,isSpecCompliantForm:e0,toJSONObject:t0,isAsyncFn:n0,isThenable:e=>e&&(po(e)||Sn(e))&&Sn(e.then)&&Sn(e.catch)};function st(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)}X.inherits(st,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:X.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wc=st.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(st,Vc),Object.defineProperty(Wc,"isAxiosError",{value:!0}),st.from=(e,t,n,i,r,o)=>{const l=Object.create(Wc);return X.toFlatObject(e,l,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),st.call(l,e.message,t,n,i,r),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const i0=null;function Va(e){return X.isPlainObject(e)||X.isArray(e)}function Kc(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function qc(e,t,n){return e?e.concat(t).map(function(r,o){return r=Kc(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}function r0(e){return X.isArray(e)&&!e.some(Va)}const s0=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function go(e,t,n){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,U){return!X.isUndefined(U[O])});const i=n.metaTokens,r=n.visitor||g,o=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(r))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(X.isDate(x))return x.toISOString();if(!d&&X.isBlob(x))throw new st("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(x)||X.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function g(x,O,U){let P=x;if(x&&!U&&typeof x=="object"){if(X.endsWith(O,"{}"))O=i?O:O.slice(0,-2),x=JSON.stringify(x);else if(X.isArray(x)&&r0(x)||(X.isFileList(x)||X.endsWith(O,"[]"))&&(P=X.toArray(x)))return O=Kc(O),P.forEach(function(se,L){!(X.isUndefined(se)||se===null)&&t.append(l===!0?qc([O],L,o):l===null?O:O+"[]",m(se))}),!1}return Va(x)?!0:(t.append(qc(U,O,o),m(x)),!1)}const w=[],_=Object.assign(s0,{defaultVisitor:g,convertValue:m,isVisitable:Va});function R(x,O){if(!X.isUndefined(x)){if(w.indexOf(x)!==-1)throw Error("Circular reference detected in "+O.join("."));w.push(x),X.forEach(x,function(P,Z){(!(X.isUndefined(P)||P===null)&&r.call(t,P,X.isString(Z)?Z.trim():Z,O,_))===!0&&R(P,O?O.concat(Z):[Z])}),w.pop()}}if(!X.isObject(e))throw new TypeError("data must be an object");return R(e),t}function zc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Ka(e,t){this._pairs=[],e&&go(e,this,t)}const Xc=Ka.prototype;Xc.append=function(t,n){this._pairs.push([t,n])},Xc.toString=function(t){const n=t?function(i){return t.call(this,i,zc)}:zc;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function o0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yc(e,t,n){if(!t)return e;const i=n&&n.encode||o0,r=n&&n.serialize;let o;if(r?o=r(t,n):o=X.isURLSearchParams(t)?t.toString():new Ka(t,n).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class a0{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){X.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Gc=a0,Jc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},l0=typeof URLSearchParams<"u"?URLSearchParams:Ka,u0=typeof FormData<"u"?FormData:null,c0=typeof Blob<"u"?Blob:null,f0=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),d0=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Jn={isBrowser:!0,classes:{URLSearchParams:l0,FormData:u0,Blob:c0},isStandardBrowserEnv:f0,isStandardBrowserWebWorkerEnv:d0,protocols:["http","https","file","blob","url","data"]};function p0(e,t){return go(e,new Jn.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,o){return Jn.isNode&&X.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function h0(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function g0(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 Zc(e){function t(n,i,r,o){let l=n[o++];const c=Number.isFinite(+l),d=o>=n.length;return l=!l&&X.isArray(r)?r.length:l,d?(X.hasOwnProp(r,l)?r[l]=[r[l],i]:r[l]=i,!c):((!r[l]||!X.isObject(r[l]))&&(r[l]=[]),t(n,i,r[l],o)&&X.isArray(r[l])&&(r[l]=g0(r[l])),!c)}if(X.isFormData(e)&&X.isFunction(e.entries)){const n={};return X.forEachEntry(e,(i,r)=>{t(h0(i),r,n,0)}),n}return null}const m0={"Content-Type":void 0};function v0(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const mo={transitional:Jc,adapter:["xhr","http"],transformRequest:[function(t,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,o=X.isObject(t);if(o&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return r&&r?JSON.stringify(Zc(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.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 p0(t,this.formSerializer).toString();if((c=X.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return go(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||r?(n.setContentType("application/json",!1),v0(t)):t}],transformResponse:[function(t){const n=this.transitional||mo.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(t&&X.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"?st.from(c,st.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:Jn.classes.FormData,Blob:Jn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};X.forEach(["delete","get","head"],function(t){mo.headers[t]={}}),X.forEach(["post","put","patch"],function(t){mo.headers[t]=X.merge(m0)});const qa=mo,y0=X.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"]),b0=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]&&y0[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Qc=Symbol("internals");function es(e){return e&&String(e).trim().toLowerCase()}function vo(e){return e===!1||e==null?e:X.isArray(e)?e.map(vo):String(e)}function C0(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 w0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function za(e,t,n,i,r){if(X.isFunction(i))return i.call(this,t,n);if(r&&(t=n),!!X.isString(t)){if(X.isString(i))return t.indexOf(i)!==-1;if(X.isRegExp(i))return i.test(t)}}function T0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function _0(e,t){const n=X.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 yo{constructor(t){t&&this.set(t)}set(t,n,i){const r=this;function o(c,d,m){const g=es(d);if(!g)throw new Error("header name must be a non-empty string");const w=X.findKey(r,g);(!w||r[w]===void 0||m===!0||m===void 0&&r[w]!==!1)&&(r[w||d]=vo(c))}const l=(c,d)=>X.forEach(c,(m,g)=>o(m,g,d));return X.isPlainObject(t)||t instanceof this.constructor?l(t,n):X.isString(t)&&(t=t.trim())&&!w0(t)?l(b0(t),n):t!=null&&o(n,t,i),this}get(t,n){if(t=es(t),t){const i=X.findKey(this,t);if(i){const r=this[i];if(!n)return r;if(n===!0)return C0(r);if(X.isFunction(n))return n.call(this,r,i);if(X.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=es(t),t){const i=X.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||za(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let r=!1;function o(l){if(l=es(l),l){const c=X.findKey(i,l);c&&(!n||za(i,i[c],c,n))&&(delete i[c],r=!0)}}return X.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||za(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,i={};return X.forEach(this,(r,o)=>{const l=X.findKey(i,o);if(l){n[l]=vo(r),delete n[o];return}const c=t?T0(o):String(o).trim();c!==o&&delete n[o],n[c]=vo(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return X.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=t&&X.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[Qc]=this[Qc]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=es(l);i[c]||(_0(r,l),i[c]=!0)}return X.isArray(t)?t.forEach(o):o(t),this}}yo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.freezeMethods(yo.prototype),X.freezeMethods(yo);const ui=yo;function Xa(e,t){const n=this||qa,i=t||n,r=ui.from(i.headers);let o=i.data;return X.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function ef(e){return!!(e&&e.__CANCEL__)}function ts(e,t,n){st.call(this,e??"canceled",st.ERR_CANCELED,t,n),this.name="CanceledError"}X.inherits(ts,st,{__CANCEL__:!0});function E0(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new st("Request failed with status code "+n.status,[st.ERR_BAD_REQUEST,st.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const S0=Jn.isStandardBrowserEnv?function(){return{write:function(n,i,r,o,l,c){const d=[];d.push(n+"="+encodeURIComponent(i)),X.isNumber(r)&&d.push("expires="+new Date(r).toGMTString()),X.isString(o)&&d.push("path="+o),X.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 x0(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function k0(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function tf(e,t){return e&&!x0(t)?k0(e,t):t}const A0=Jn.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=X.isString(l)?r(l):l;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}();function L0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O0(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,_=0;for(;w!==r;)_+=n[w++],w=w%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),m-l<t)return;const R=g&&m-g;return R?Math.round(_*1e3/R):void 0}}function nf(e,t){let n=0;const i=O0(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 bo={http:i0,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)}X.isFormData(r)&&(Jn.isStandardBrowserEnv||Jn.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let m=new XMLHttpRequest;if(e.auth){const R=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(R+":"+x))}const g=tf(e.baseURL,e.url);m.open(e.method.toUpperCase(),Yc(g,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function w(){if(!m)return;const R=ui.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),O={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:R,config:e,request:m};E0(function(P){n(P),d()},function(P){i(P),d()},O),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 st("Request aborted",st.ECONNABORTED,e,m)),m=null)},m.onerror=function(){i(new st("Network Error",st.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const O=e.transitional||Jc;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),i(new st(x,O.clarifyTimeoutError?st.ETIMEDOUT:st.ECONNABORTED,e,m)),m=null},Jn.isStandardBrowserEnv){const R=(e.withCredentials||A0(g))&&e.xsrfCookieName&&S0.read(e.xsrfCookieName);R&&o.set(e.xsrfHeaderName,R)}r===void 0&&o.setContentType(null),"setRequestHeader"in m&&X.forEach(o.toJSON(),function(x,O){m.setRequestHeader(O,x)}),X.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),l&&l!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",nf(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",nf(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=R=>{m&&(i(!R||R.type?new ts(null,e,m):R),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const _=L0(g);if(_&&Jn.protocols.indexOf(_)===-1){i(new st("Unsupported protocol "+_+":",st.ERR_BAD_REQUEST,e));return}m.send(r||null)})}};X.forEach(bo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const D0={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:t}=e;let n,i;for(let r=0;r<t&&(n=e[r],!(i=X.isString(n)?bo[n.toLowerCase()]:n));r++);if(!i)throw i===!1?new st(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(X.hasOwnProp(bo,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!X.isFunction(i))throw new TypeError("adapter is not a function");return i},adapters:bo};function Ya(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ts(null,e)}function rf(e){return Ya(e),e.headers=ui.from(e.headers),e.data=Xa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),D0.getAdapter(e.adapter||qa.adapter)(e).then(function(i){return Ya(e),i.data=Xa.call(e,e.transformResponse,i),i.headers=ui.from(i.headers),i},function(i){return ef(i)||(Ya(e),i&&i.response&&(i.response.data=Xa.call(e,e.transformResponse,i.response),i.response.headers=ui.from(i.response.headers))),Promise.reject(i)})}const sf=e=>e instanceof ui?e.toJSON():e;function vr(e,t){t=t||{};const n={};function i(m,g,w){return X.isPlainObject(m)&&X.isPlainObject(g)?X.merge.call({caseless:w},m,g):X.isPlainObject(g)?X.merge({},g):X.isArray(g)?g.slice():g}function r(m,g,w){if(X.isUndefined(g)){if(!X.isUndefined(m))return i(void 0,m,w)}else return i(m,g,w)}function o(m,g){if(!X.isUndefined(g))return i(void 0,g)}function l(m,g){if(X.isUndefined(g)){if(!X.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(sf(m),sf(g),!0)};return X.forEach(Object.keys(Object.assign({},e,t)),function(g){const w=d[g]||r,_=w(e[g],t[g],g);X.isUndefined(_)&&w!==c||(n[g]=_)}),n}const of="1.4.0",Ga={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ga[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const af={};Ga.transitional=function(t,n,i){function r(o,l){return"[Axios v"+of+"] Transitional option '"+o+"'"+l+(i?". "+i:"")}return(o,l,c)=>{if(t===!1)throw new st(r(l," has been removed"+(n?" in "+n:"")),st.ERR_DEPRECATED);return n&&!af[l]&&(af[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 P0(e,t,n){if(typeof e!="object")throw new st("options must be an object",st.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 st("option "+o+" must be "+d,st.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new st("Unknown option "+o,st.ERR_BAD_OPTION)}}const Ja={assertOptions:P0,validators:Ga},Ei=Ja.validators;class Co{constructor(t){this.defaults=t,this.interceptors={request:new Gc,response:new Gc}}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&&Ja.assertOptions(i,{silentJSONParsing:Ei.transitional(Ei.boolean),forcedJSONParsing:Ei.transitional(Ei.boolean),clarifyTimeoutError:Ei.transitional(Ei.boolean)},!1),r!=null&&(X.isFunction(r)?n.paramsSerializer={serialize:r}:Ja.assertOptions(r,{encode:Ei.function,serialize:Ei.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l;l=o&&X.merge(o.common,o[n.method]),l&&X.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(O){typeof O.runWhen=="function"&&O.runWhen(n)===!1||(d=d&&O.synchronous,c.unshift(O.fulfilled,O.rejected))});const m=[];this.interceptors.response.forEach(function(O){m.push(O.fulfilled,O.rejected)});let g,w=0,_;if(!d){const x=[rf.bind(this),void 0];for(x.unshift.apply(x,c),x.push.apply(x,m),_=x.length,g=Promise.resolve(n);w<_;)g=g.then(x[w++],x[w++]);return g}_=c.length;let R=n;for(w=0;w<_;){const x=c[w++],O=c[w++];try{R=x(R)}catch(U){O.call(this,U);break}}try{g=rf.call(this,R)}catch(x){return Promise.reject(x)}for(w=0,_=m.length;w<_;)g=g.then(m[w++],m[w++]);return g}getUri(t){t=vr(this.defaults,t);const n=tf(t.baseURL,t.url);return Yc(n,t.params,t.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(t){Co.prototype[t]=function(n,i){return this.request(vr(i||{},{method:t,url:n,data:(i||{}).data}))}}),X.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}))}}Co.prototype[t]=n(),Co.prototype[t+"Form"]=n(!0)});const wo=Co;class Za{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 ts(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 Za(function(r){t=r}),cancel:t}}}const I0=Za;function N0(e){return function(n){return e.apply(null,n)}}function R0(e){return X.isObject(e)&&e.isAxiosError===!0}const Qa={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(Qa).forEach(([e,t])=>{Qa[t]=e});const M0=Qa;function lf(e){const t=new wo(e),n=Ic(wo.prototype.request,t);return X.extend(n,wo.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return lf(vr(e,r))},n}const Bt=lf(qa);Bt.Axios=wo,Bt.CanceledError=ts,Bt.CancelToken=I0,Bt.isCancel=ef,Bt.VERSION=of,Bt.toFormData=go,Bt.AxiosError=st,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=N0,Bt.isAxiosError=R0,Bt.mergeConfig=vr,Bt.AxiosHeaders=ui,Bt.formToJSON=e=>Zc(X.isHTMLForm(e)?new FormData(e):e),Bt.HttpStatusCode=M0,Bt.default=Bt;const F0=Bt;class H0{constructor(){Ed(this,"apiBaseURL","");this.apiBaseURL=oe.apiUrl(),this.api=F0.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=oe.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]=oe.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 B0={data(){return{gradioAPI:null}},beforeMount(){this.gradioAPI=new H0},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 on="top",xn="bottom",kn="right",an="left",el="auto",ns=[on,xn,kn,an],yr="start",is="end",j0="clippingParents",uf="viewport",rs="popper",$0="reference",cf=ns.reduce(function(e,t){return e.concat([t+"-"+yr,t+"-"+is])},[]),ff=[].concat(ns,[el]).reduce(function(e,t){return e.concat([t,t+"-"+yr,t+"-"+is])},[]),U0="beforeRead",W0="read",V0="afterRead",K0="beforeMain",q0="main",z0="afterMain",X0="beforeWrite",Y0="write",G0="afterWrite",J0=[U0,W0,V0,K0,q0,z0,X0,Y0,G0];function Zn(e){return e?(e.nodeName||"").toLowerCase():null}function mn(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=mn(e).Element;return e instanceof t||e instanceof Element}function An(e){var t=mn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tl(e){if(typeof ShadowRoot>"u")return!1;var t=mn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Z0(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];!An(o)||!Zn(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 Q0(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},{});!An(r)||!Zn(r)||(Object.assign(r.style,c),Object.keys(o).forEach(function(d){r.removeAttribute(d)}))})}}const df={name:"applyStyles",enabled:!0,phase:"write",fn:Z0,effect:Q0,requires:["computeStyles"]};function Qn(e){return e.split("-")[0]}var Vi=Math.max,To=Math.min,br=Math.round;function nl(){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 pf(){return!/^((?!chrome|android).)*safari/i.test(nl())}function Cr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),r=1,o=1;t&&An(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)?mn(e):window,c=l.visualViewport,d=!pf()&&n,m=(i.left+(d&&c?c.offsetLeft:0))/r,g=(i.top+(d&&c?c.offsetTop:0))/o,w=i.width/r,_=i.height/o;return{width:w,height:_,top:g,right:m+w,bottom:g+_,left:m,x:m,y:g}}function il(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 hf(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tl(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 mn(e).getComputedStyle(e)}function eT(e){return["table","td","th"].indexOf(Zn(e))>=0}function Si(e){return((Wi(e)?e.ownerDocument:e.document)||window.document).documentElement}function _o(e){return Zn(e)==="html"?e:e.assignedSlot||e.parentNode||(tl(e)?e.host:null)||Si(e)}function gf(e){return!An(e)||ci(e).position==="fixed"?null:e.offsetParent}function tT(e){var t=/firefox/i.test(nl()),n=/Trident/i.test(nl());if(n&&An(e)){var i=ci(e);if(i.position==="fixed")return null}var r=_o(e);for(tl(r)&&(r=r.host);An(r)&&["html","body"].indexOf(Zn(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 ss(e){for(var t=mn(e),n=gf(e);n&&eT(n)&&ci(n).position==="static";)n=gf(n);return n&&(Zn(n)==="html"||Zn(n)==="body"&&ci(n).position==="static")?t:n||tT(e)||t}function rl(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function os(e,t,n){return Vi(e,To(t,n))}function nT(e,t,n){var i=os(e,t,n);return i>n?n:i}function mf(){return{top:0,right:0,bottom:0,left:0}}function vf(e){return Object.assign({},mf(),e)}function yf(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var iT=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,vf(typeof t!="number"?t:yf(t,ns))};function rT(e){var t,n=e.state,i=e.name,r=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,c=Qn(n.placement),d=rl(c),m=[an,kn].indexOf(c)>=0,g=m?"height":"width";if(!(!o||!l)){var w=iT(r.padding,n),_=il(o),R=d==="y"?on:an,x=d==="y"?xn:kn,O=n.rects.reference[g]+n.rects.reference[d]-l[d]-n.rects.popper[g],U=l[d]-n.rects.reference[d],P=ss(o),Z=P?d==="y"?P.clientHeight||0:P.clientWidth||0:0,se=O/2-U/2,L=w[R],ke=Z-_[g]-w[x],p=Z/2-_[g]/2+se,Pe=os(L,p,ke),Me=d;n.modifiersData[i]=(t={},t[Me]=Pe,t.centerOffset=Pe-p,t)}}function sT(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)||hf(t.elements.popper,r)&&(t.elements.arrow=r))}const oT={name:"arrow",enabled:!0,phase:"main",fn:rT,effect:sT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wr(e){return e.split("-")[1]}var aT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lT(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 bf(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,_=l.x,R=_===void 0?0:_,x=l.y,O=x===void 0?0:x,U=typeof g=="function"?g({x:R,y:O}):{x:R,y:O};R=U.x,O=U.y;var P=l.hasOwnProperty("x"),Z=l.hasOwnProperty("y"),se=an,L=on,ke=window;if(m){var p=ss(n),Pe="clientHeight",Me="clientWidth";if(p===mn(n)&&(p=Si(n),ci(p).position!=="static"&&c==="absolute"&&(Pe="scrollHeight",Me="scrollWidth")),p=p,r===on||(r===an||r===kn)&&o===is){L=xn;var ne=w&&p===ke&&ke.visualViewport?ke.visualViewport.height:p[Pe];O-=ne-i.height,O*=d?1:-1}if(r===an||(r===on||r===xn)&&o===is){se=kn;var Y=w&&p===ke&&ke.visualViewport?ke.visualViewport.width:p[Me];R-=Y-i.width,R*=d?1:-1}}var Ee=Object.assign({position:c},m&&aT),De=g===!0?lT({x:R,y:O},mn(n)):{x:R,y:O};if(R=De.x,O=De.y,d){var Te;return Object.assign({},Ee,(Te={},Te[L]=Z?"0":"",Te[se]=P?"0":"",Te.transform=(ke.devicePixelRatio||1)<=1?"translate("+R+"px, "+O+"px)":"translate3d("+R+"px, "+O+"px, 0)",Te))}return Object.assign({},Ee,(t={},t[L]=Z?O+"px":"",t[se]=P?R+"px":"",t.transform="",t))}function uT(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:Qn(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,bf(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,bf(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 cT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uT,data:{}};var Eo={passive:!0};function fT(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=mn(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&m.forEach(function(g){g.addEventListener("scroll",n.update,Eo)}),c&&d.addEventListener("resize",n.update,Eo),function(){o&&m.forEach(function(g){g.removeEventListener("scroll",n.update,Eo)}),c&&d.removeEventListener("resize",n.update,Eo)}}const dT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:fT,data:{}};var pT={left:"right",right:"left",bottom:"top",top:"bottom"};function So(e){return e.replace(/left|right|bottom|top/g,function(t){return pT[t]})}var hT={start:"end",end:"start"};function Cf(e){return e.replace(/start|end/g,function(t){return hT[t]})}function sl(e){var t=mn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function ol(e){return Cr(Si(e)).left+sl(e).scrollLeft}function gT(e,t){var n=mn(e),i=Si(e),r=n.visualViewport,o=i.clientWidth,l=i.clientHeight,c=0,d=0;if(r){o=r.width,l=r.height;var m=pf();(m||!m&&t==="fixed")&&(c=r.offsetLeft,d=r.offsetTop)}return{width:o,height:l,x:c+ol(e),y:d}}function mT(e){var t,n=Si(e),i=sl(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=Vi(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=Vi(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+ol(e),d=-i.scrollTop;return ci(r||n).direction==="rtl"&&(c+=Vi(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:l,x:c,y:d}}function al(e){var t=ci(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function wf(e){return["html","body","#document"].indexOf(Zn(e))>=0?e.ownerDocument.body:An(e)&&al(e)?e:wf(_o(e))}function as(e,t){var n;t===void 0&&(t=[]);var i=wf(e),r=i===((n=e.ownerDocument)==null?void 0:n.body),o=mn(i),l=r?[o].concat(o.visualViewport||[],al(i)?i:[]):i,c=t.concat(l);return r?c:c.concat(as(_o(l)))}function ll(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vT(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 Tf(e,t,n){return t===uf?ll(gT(e,n)):Wi(t)?vT(t,n):ll(mT(Si(e)))}function yT(e){var t=as(_o(e)),n=["absolute","fixed"].indexOf(ci(e).position)>=0,i=n&&An(e)?ss(e):e;return Wi(i)?t.filter(function(r){return Wi(r)&&hf(r,i)&&Zn(r)!=="body"}):[]}function bT(e,t,n,i){var r=t==="clippingParents"?yT(e):[].concat(t),o=[].concat(r,[n]),l=o[0],c=o.reduce(function(d,m){var g=Tf(e,m,i);return d.top=Vi(g.top,d.top),d.right=To(g.right,d.right),d.bottom=To(g.bottom,d.bottom),d.left=Vi(g.left,d.left),d},Tf(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 _f(e){var t=e.reference,n=e.element,i=e.placement,r=i?Qn(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 on:d={x:l,y:t.y-n.height};break;case xn:d={x:l,y:t.y+t.height};break;case kn:d={x:t.x+t.width,y:c};break;case an:d={x:t.x-n.width,y:c};break;default:d={x:t.x,y:t.y}}var m=r?rl(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 is:d[m]=d[m]+(t[g]/2-n[g]/2);break}}return d}function ls(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?j0:c,m=n.rootBoundary,g=m===void 0?uf:m,w=n.elementContext,_=w===void 0?rs:w,R=n.altBoundary,x=R===void 0?!1:R,O=n.padding,U=O===void 0?0:O,P=vf(typeof U!="number"?U:yf(U,ns)),Z=_===rs?$0:rs,se=e.rects.popper,L=e.elements[x?Z:_],ke=bT(Wi(L)?L:L.contextElement||Si(e.elements.popper),d,g,l),p=Cr(e.elements.reference),Pe=_f({reference:p,element:se,strategy:"absolute",placement:r}),Me=ll(Object.assign({},se,Pe)),ne=_===rs?Me:p,Y={top:ke.top-ne.top+P.top,bottom:ne.bottom-ke.bottom+P.bottom,left:ke.left-ne.left+P.left,right:ne.right-ke.right+P.right},Ee=e.modifiersData.offset;if(_===rs&&Ee){var De=Ee[r];Object.keys(Y).forEach(function(Te){var nt=[kn,xn].indexOf(Te)>=0?1:-1,dt=[on,xn].indexOf(Te)>=0?"y":"x";Y[Te]+=De[dt]*nt})}return Y}function CT(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?ff:d,g=wr(i),w=g?c?cf:cf.filter(function(x){return wr(x)===g}):ns,_=w.filter(function(x){return m.indexOf(x)>=0});_.length===0&&(_=w);var R=_.reduce(function(x,O){return x[O]=ls(e,{placement:O,boundary:r,rootBoundary:o,padding:l})[Qn(O)],x},{});return Object.keys(R).sort(function(x,O){return R[x]-R[O]})}function wT(e){if(Qn(e)===el)return[];var t=So(e);return[Cf(e),t,Cf(t)]}function TT(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,_=n.altBoundary,R=n.flipVariations,x=R===void 0?!0:R,O=n.allowedAutoPlacements,U=t.options.placement,P=Qn(U),Z=P===U,se=d||(Z||!x?[So(U)]:wT(U)),L=[U].concat(se).reduce(function(ge,xe){return ge.concat(Qn(xe)===el?CT(t,{placement:xe,boundary:g,rootBoundary:w,padding:m,flipVariations:x,allowedAutoPlacements:O}):xe)},[]),ke=t.rects.reference,p=t.rects.popper,Pe=new Map,Me=!0,ne=L[0],Y=0;Y<L.length;Y++){var Ee=L[Y],De=Qn(Ee),Te=wr(Ee)===yr,nt=[on,xn].indexOf(De)>=0,dt=nt?"width":"height",$e=ls(t,{placement:Ee,boundary:g,rootBoundary:w,altBoundary:_,padding:m}),Ie=nt?Te?kn:an:Te?xn:on;ke[dt]>p[dt]&&(Ie=So(Ie));var be=So(Ie),ot=[];if(o&&ot.push($e[De]<=0),c&&ot.push($e[Ie]<=0,$e[be]<=0),ot.every(function(ge){return ge})){ne=Ee,Me=!1;break}Pe.set(Ee,ot)}if(Me)for(var kt=x?3:1,at=function(xe){var _e=L.find(function(Fe){var ft=Pe.get(Fe);if(ft)return ft.slice(0,xe).every(function(pt){return pt})});if(_e)return ne=_e,"break"},we=kt;we>0;we--){var he=at(we);if(he==="break")break}t.placement!==ne&&(t.modifiersData[i]._skip=!0,t.placement=ne,t.reset=!0)}}const _T={name:"flip",enabled:!0,phase:"main",fn:TT,requiresIfExists:["offset"],data:{_skip:!1}};function Ef(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 Sf(e){return[on,kn,xn,an].some(function(t){return e[t]>=0})}function ET(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,l=ls(t,{elementContext:"reference"}),c=ls(t,{altBoundary:!0}),d=Ef(l,i),m=Ef(c,r,o),g=Sf(d),w=Sf(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 ST={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ET};function xT(e,t,n){var i=Qn(e),r=[an,on].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,[an,kn].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}function kT(e){var t=e.state,n=e.options,i=e.name,r=n.offset,o=r===void 0?[0,0]:r,l=ff.reduce(function(g,w){return g[w]=xT(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 AT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kT};function LT(e){var t=e.state,n=e.name;t.modifiersData[n]=_f({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const OT={name:"popperOffsets",enabled:!0,phase:"read",fn:LT,data:{}};function DT(e){return e==="x"?"y":"x"}function PT(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,_=n.tether,R=_===void 0?!0:_,x=n.tetherOffset,O=x===void 0?0:x,U=ls(t,{boundary:d,rootBoundary:m,padding:w,altBoundary:g}),P=Qn(t.placement),Z=wr(t.placement),se=!Z,L=rl(P),ke=DT(L),p=t.modifiersData.popperOffsets,Pe=t.rects.reference,Me=t.rects.popper,ne=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,Y=typeof ne=="number"?{mainAxis:ne,altAxis:ne}:Object.assign({mainAxis:0,altAxis:0},ne),Ee=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,De={x:0,y:0};if(p){if(o){var Te,nt=L==="y"?on:an,dt=L==="y"?xn:kn,$e=L==="y"?"height":"width",Ie=p[L],be=Ie+U[nt],ot=Ie-U[dt],kt=R?-Me[$e]/2:0,at=Z===yr?Pe[$e]:Me[$e],we=Z===yr?-Me[$e]:-Pe[$e],he=t.elements.arrow,ge=R&&he?il(he):{width:0,height:0},xe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mf(),_e=xe[nt],Fe=xe[dt],ft=os(0,Pe[$e],ge[$e]),pt=se?Pe[$e]/2-kt-ft-_e-Y.mainAxis:at-ft-_e-Y.mainAxis,Wt=se?-Pe[$e]/2+kt+ft+Fe+Y.mainAxis:we+ft+Fe+Y.mainAxis,ln=t.elements.arrow&&ss(t.elements.arrow),k=ln?L==="y"?ln.clientTop||0:ln.clientLeft||0:0,D=(Te=Ee==null?void 0:Ee[L])!=null?Te:0,W=Ie+pt-D-k,J=Ie+Wt-D,H=os(R?To(be,W):be,Ie,R?Vi(ot,J):ot);p[L]=H,De[L]=H-Ie}if(c){var V,ue=L==="x"?on:an,ie=L==="x"?xn:kn,re=p[ke],Q=ke==="y"?"height":"width",Se=re+U[ue],me=re-U[ie],Ce=[on,an].indexOf(P)!==-1,Le=(V=Ee==null?void 0:Ee[ke])!=null?V:0,qe=Ce?Se:re-Pe[Q]-Me[Q]-Le+Y.altAxis,lt=Ce?re+Pe[Q]+Me[Q]-Le-Y.altAxis:me,Ze=R&&Ce?nT(qe,re,lt):os(R?qe:Se,re,R?lt:me);p[ke]=Ze,De[ke]=Ze-re}t.modifiersData[i]=De}}const IT={name:"preventOverflow",enabled:!0,phase:"main",fn:PT,requiresIfExists:["offset"]};function NT(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function RT(e){return e===mn(e)||!An(e)?sl(e):NT(e)}function MT(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 FT(e,t,n){n===void 0&&(n=!1);var i=An(t),r=An(t)&&MT(t),o=Si(t),l=Cr(e,r,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!n)&&((Zn(t)!=="body"||al(o))&&(c=RT(t)),An(t)?(d=Cr(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):o&&(d.x=ol(o))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function HT(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 BT(e){var t=HT(e);return J0.reduce(function(n,i){return n.concat(t.filter(function(r){return r.phase===i}))},[])}function jT(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function $T(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 xf={placement:"bottom",modifiers:[],strategy:"absolute"};function kf(){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 UT(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,r=t.defaultOptions,o=r===void 0?xf:r;return function(c,d,m){m===void 0&&(m=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},xf,o),modifiersData:{},elements:{reference:c,popper:d},attributes:{},styles:{}},w=[],_=!1,R={state:g,setOptions:function(P){var Z=typeof P=="function"?P(g.options):P;O(),g.options=Object.assign({},o,g.options,Z),g.scrollParents={reference:Wi(c)?as(c):c.contextElement?as(c.contextElement):[],popper:as(d)};var se=BT($T([].concat(i,g.options.modifiers)));return g.orderedModifiers=se.filter(function(L){return L.enabled}),x(),R.update()},forceUpdate:function(){if(!_){var P=g.elements,Z=P.reference,se=P.popper;if(kf(Z,se)){g.rects={reference:FT(Z,ss(se),g.options.strategy==="fixed"),popper:il(se)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(Y){return g.modifiersData[Y.name]=Object.assign({},Y.data)});for(var L=0;L<g.orderedModifiers.length;L++){if(g.reset===!0){g.reset=!1,L=-1;continue}var ke=g.orderedModifiers[L],p=ke.fn,Pe=ke.options,Me=Pe===void 0?{}:Pe,ne=ke.name;typeof p=="function"&&(g=p({state:g,options:Me,name:ne,instance:R})||g)}}}},update:jT(function(){return new Promise(function(U){R.forceUpdate(),U(g)})}),destroy:function(){O(),_=!0}};if(!kf(c,d))return R;R.setOptions(m).then(function(U){!_&&m.onFirstUpdate&&m.onFirstUpdate(U)});function x(){g.orderedModifiers.forEach(function(U){var P=U.name,Z=U.options,se=Z===void 0?{}:Z,L=U.effect;if(typeof L=="function"){var ke=L({state:g,name:P,instance:R,options:se}),p=function(){};w.push(ke||p)}})}function O(){w.forEach(function(U){return U()}),w=[]}return R}}var WT=[dT,OT,cT,df,AT,_T,IT,oT,ST],VT=UT({defaultModifiers:WT}),KT="tippy-box",Af="tippy-content",qT="tippy-backdrop",Lf="tippy-arrow",Of="tippy-svg-arrow",Ki={passive:!0,capture:!0},Df=function(){return document.body};function ul(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function cl(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Pf(e,t){return typeof e=="function"?e.apply(void 0,t):e}function If(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function zT(e){return e.split(/\s+/).filter(Boolean)}function Tr(e){return[].concat(e)}function Nf(e,t){e.indexOf(t)===-1&&e.push(t)}function XT(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function YT(e){return e.split("-")[0]}function xo(e){return[].slice.call(e)}function Rf(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function us(){return document.createElement("div")}function ko(e){return["Element","Fragment"].some(function(t){return cl(e,t)})}function GT(e){return cl(e,"NodeList")}function JT(e){return cl(e,"MouseEvent")}function ZT(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function QT(e){return ko(e)?[e]:GT(e)?xo(e):Array.isArray(e)?e:xo(document.querySelectorAll(e))}function fl(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Mf(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function e_(e){var t,n=Tr(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function t_(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=YT(l.placement),g=l.modifiersData.offset;if(!g)return!0;var w=m==="bottom"?g.top.y:0,_=m==="top"?g.bottom.y:0,R=m==="right"?g.left.x:0,x=m==="left"?g.right.x:0,O=o.top-i+w>d,U=i-o.bottom-_>d,P=o.left-n+R>d,Z=n-o.right-x>d;return O||U||P||Z})}function dl(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[i](r,n)})}function Ff(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 ei={isTouch:!1},Hf=0;function n_(){ei.isTouch||(ei.isTouch=!0,window.performance&&document.addEventListener("mousemove",Bf))}function Bf(){var e=performance.now();e-Hf<20&&(ei.isTouch=!1,document.removeEventListener("mousemove",Bf)),Hf=e}function i_(){var e=document.activeElement;if(ZT(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function r_(){document.addEventListener("touchstart",n_,Ki),window.addEventListener("blur",i_)}var s_=typeof window<"u"&&typeof document<"u",o_=s_?!!window.msCrypto:!1,a_={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},l_={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Hn=Object.assign({appendTo:Df,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},a_,l_),u_=Object.keys(Hn),c_=function(t){var n=Object.keys(t);n.forEach(function(i){Hn[i]=t[i]})};function jf(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=Hn[o])!=null?c:l}return i},{});return Object.assign({},e,n)}function f_(e,t){var n=t?Object.keys(jf(Object.assign({},Hn,{plugins:t}))):u_,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 $f(e,t){var n=Object.assign({},t,{content:Pf(t.content,[e])},t.ignoreAttributes?{}:f_(e,t.plugins));return n.aria=Object.assign({},Hn.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 d_=function(){return"innerHTML"};function pl(e,t){e[d_()]=t}function Uf(e){var t=us();return e===!0?t.className=Lf:(t.className=Of,ko(e)?t.appendChild(e):pl(t,e)),t}function Wf(e,t){ko(t.content)?(pl(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?pl(e,t.content):e.textContent=t.content)}function hl(e){var t=e.firstElementChild,n=xo(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(Af)}),arrow:n.find(function(i){return i.classList.contains(Lf)||i.classList.contains(Of)}),backdrop:n.find(function(i){return i.classList.contains(qT)})}}function Vf(e){var t=us(),n=us();n.className=KT,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=us();i.className=Af,i.setAttribute("data-state","hidden"),Wf(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props);function r(o,l){var c=hl(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)&&Wf(m,e.props),l.arrow?g?o.arrow!==l.arrow&&(d.removeChild(g),d.appendChild(Uf(l.arrow))):d.appendChild(Uf(l.arrow)):g&&d.removeChild(g)}return{popper:t,onUpdate:r}}Vf.$$tippy=!0;var p_=1,Ao=[],gl=[];function h_(e,t){var n=$f(e,Object.assign({},Hn,jf(Rf(t)))),i,r,o,l=!1,c=!1,d=!1,m=!1,g,w,_,R=[],x=If(W,n.interactiveDebounce),O,U=p_++,P=null,Z=XT(n.plugins),se={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},L={id:U,reference:e,popper:us(),popperInstance:P,props:n,state:se,plugins:Z,clearDelayTimeouts:qe,setProps:lt,setContent:Ze,show:Et,hide:Xt,hideWithInteractivity:ti,enable:Ce,disable:Le,unmount:Bn,destroy:vn};if(!n.render)return L;var ke=n.render(L),p=ke.popper,Pe=ke.onUpdate;p.setAttribute("data-tippy-root",""),p.id="tippy-"+L.id,L.popper=p,e._tippy=L,p._tippy=L;var Me=Z.map(function(q){return q.fn(L)}),ne=e.hasAttribute("aria-expanded");return ln(),kt(),Ie(),be("onCreate",[L]),n.showOnCreate&&Se(),p.addEventListener("mouseenter",function(){L.props.interactive&&L.state.isVisible&&L.clearDelayTimeouts()}),p.addEventListener("mouseleave",function(){L.props.interactive&&L.props.trigger.indexOf("mouseenter")>=0&&nt().addEventListener("mousemove",x)}),L;function Y(){var q=L.props.touch;return Array.isArray(q)?q:[q,0]}function Ee(){return Y()[0]==="hold"}function De(){var q;return!!((q=L.props.render)!=null&&q.$$tippy)}function Te(){return O||e}function nt(){var q=Te().parentNode;return q?e_(q):document}function dt(){return hl(p)}function $e(q){return L.state.isMounted&&!L.state.isVisible||ei.isTouch||g&&g.type==="focus"?0:ul(L.props.delay,q?0:1,Hn.delay)}function Ie(q){q===void 0&&(q=!1),p.style.pointerEvents=L.props.interactive&&!q?"":"none",p.style.zIndex=""+L.props.zIndex}function be(q,de,ye){if(ye===void 0&&(ye=!0),Me.forEach(function(et){et[q]&&et[q].apply(et,de)}),ye){var ze;(ze=L.props)[q].apply(ze,de)}}function ot(){var q=L.props.aria;if(q.content){var de="aria-"+q.content,ye=p.id,ze=Tr(L.props.triggerTarget||e);ze.forEach(function(et){var Vt=et.getAttribute(de);if(L.state.isVisible)et.setAttribute(de,Vt?Vt+" "+ye:ye);else{var en=Vt&&Vt.replace(ye,"").trim();en?et.setAttribute(de,en):et.removeAttribute(de)}})}}function kt(){if(!(ne||!L.props.aria.expanded)){var q=Tr(L.props.triggerTarget||e);q.forEach(function(de){L.props.interactive?de.setAttribute("aria-expanded",L.state.isVisible&&de===Te()?"true":"false"):de.removeAttribute("aria-expanded")})}}function at(){nt().removeEventListener("mousemove",x),Ao=Ao.filter(function(q){return q!==x})}function we(q){if(!(ei.isTouch&&(d||q.type==="mousedown"))){var de=q.composedPath&&q.composedPath()[0]||q.target;if(!(L.props.interactive&&Ff(p,de))){if(Tr(L.props.triggerTarget||e).some(function(ye){return Ff(ye,de)})){if(ei.isTouch||L.state.isVisible&&L.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[L,q]);L.props.hideOnClick===!0&&(L.clearDelayTimeouts(),L.hide(),c=!0,setTimeout(function(){c=!1}),L.state.isMounted||_e())}}}function he(){d=!0}function ge(){d=!1}function xe(){var q=nt();q.addEventListener("mousedown",we,!0),q.addEventListener("touchend",we,Ki),q.addEventListener("touchstart",ge,Ki),q.addEventListener("touchmove",he,Ki)}function _e(){var q=nt();q.removeEventListener("mousedown",we,!0),q.removeEventListener("touchend",we,Ki),q.removeEventListener("touchstart",ge,Ki),q.removeEventListener("touchmove",he,Ki)}function Fe(q,de){pt(q,function(){!L.state.isVisible&&p.parentNode&&p.parentNode.contains(p)&&de()})}function ft(q,de){pt(q,de)}function pt(q,de){var ye=dt().box;function ze(et){et.target===ye&&(dl(ye,"remove",ze),de())}if(q===0)return de();dl(ye,"remove",w),dl(ye,"add",ze),w=ze}function Wt(q,de,ye){ye===void 0&&(ye=!1);var ze=Tr(L.props.triggerTarget||e);ze.forEach(function(et){et.addEventListener(q,de,ye),R.push({node:et,eventType:q,handler:de,options:ye})})}function ln(){Ee()&&(Wt("touchstart",D,{passive:!0}),Wt("touchend",J,{passive:!0})),zT(L.props.trigger).forEach(function(q){if(q!=="manual")switch(Wt(q,D),q){case"mouseenter":Wt("mouseleave",J);break;case"focus":Wt(o_?"focusout":"blur",H);break;case"focusin":Wt("focusout",H);break}})}function k(){R.forEach(function(q){var de=q.node,ye=q.eventType,ze=q.handler,et=q.options;de.removeEventListener(ye,ze,et)}),R=[]}function D(q){var de,ye=!1;if(!(!L.state.isEnabled||V(q)||c)){var ze=((de=g)==null?void 0:de.type)==="focus";g=q,O=q.currentTarget,kt(),!L.state.isVisible&&JT(q)&&Ao.forEach(function(et){return et(q)}),q.type==="click"&&(L.props.trigger.indexOf("mouseenter")<0||l)&&L.props.hideOnClick!==!1&&L.state.isVisible?ye=!0:Se(q),q.type==="click"&&(l=!ye),ye&&!ze&&me(q)}}function W(q){var de=q.target,ye=Te().contains(de)||p.contains(de);if(!(q.type==="mousemove"&&ye)){var ze=Q().concat(p).map(function(et){var Vt,en=et._tippy,fi=(Vt=en.popperInstance)==null?void 0:Vt.state;return fi?{popperRect:et.getBoundingClientRect(),popperState:fi,props:n}:null}).filter(Boolean);t_(ze,q)&&(at(),me(q))}}function J(q){var de=V(q)||L.props.trigger.indexOf("click")>=0&&l;if(!de){if(L.props.interactive){L.hideWithInteractivity(q);return}me(q)}}function H(q){L.props.trigger.indexOf("focusin")<0&&q.target!==Te()||L.props.interactive&&q.relatedTarget&&p.contains(q.relatedTarget)||me(q)}function V(q){return ei.isTouch?Ee()!==q.type.indexOf("touch")>=0:!1}function ue(){ie();var q=L.props,de=q.popperOptions,ye=q.placement,ze=q.offset,et=q.getReferenceClientRect,Vt=q.moveTransition,en=De()?hl(p).arrow:null,fi=et?{getBoundingClientRect:et,contextElement:et.contextElement||Te()}:e,di={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_r){var ni=_r.state;if(De()){var Er=dt(),ds=Er.box;["placement","reference-hidden","escaped"].forEach(function(Sr){Sr==="placement"?ds.setAttribute("data-placement",ni.placement):ni.attributes.popper["data-popper-"+Sr]?ds.setAttribute("data-"+Sr,""):ds.removeAttribute("data-"+Sr)}),ni.attributes.popper={}}}},un=[{name:"offset",options:{offset:ze}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Vt}},di];De()&&en&&un.push({name:"arrow",options:{element:en,padding:3}}),un.push.apply(un,(de==null?void 0:de.modifiers)||[]),L.popperInstance=VT(fi,p,Object.assign({},de,{placement:ye,onFirstUpdate:_,modifiers:un}))}function ie(){L.popperInstance&&(L.popperInstance.destroy(),L.popperInstance=null)}function re(){var q=L.props.appendTo,de,ye=Te();L.props.interactive&&q===Df||q==="parent"?de=ye.parentNode:de=Pf(q,[ye]),de.contains(p)||de.appendChild(p),L.state.isMounted=!0,ue()}function Q(){return xo(p.querySelectorAll("[data-tippy-root]"))}function Se(q){L.clearDelayTimeouts(),q&&be("onTrigger",[L,q]),xe();var de=$e(!0),ye=Y(),ze=ye[0],et=ye[1];ei.isTouch&&ze==="hold"&&et&&(de=et),de?i=setTimeout(function(){L.show()},de):L.show()}function me(q){if(L.clearDelayTimeouts(),be("onUntrigger",[L,q]),!L.state.isVisible){_e();return}if(!(L.props.trigger.indexOf("mouseenter")>=0&&L.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(q.type)>=0&&l)){var de=$e(!1);de?r=setTimeout(function(){L.state.isVisible&&L.hide()},de):o=requestAnimationFrame(function(){L.hide()})}}function Ce(){L.state.isEnabled=!0}function Le(){L.hide(),L.state.isEnabled=!1}function qe(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)}function lt(q){if(!L.state.isDestroyed){be("onBeforeUpdate",[L,q]),k();var de=L.props,ye=$f(e,Object.assign({},de,Rf(q),{ignoreAttributes:!0}));L.props=ye,ln(),de.interactiveDebounce!==ye.interactiveDebounce&&(at(),x=If(W,ye.interactiveDebounce)),de.triggerTarget&&!ye.triggerTarget?Tr(de.triggerTarget).forEach(function(ze){ze.removeAttribute("aria-expanded")}):ye.triggerTarget&&e.removeAttribute("aria-expanded"),kt(),Ie(),Pe&&Pe(de,ye),L.popperInstance&&(ue(),Q().forEach(function(ze){requestAnimationFrame(ze._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[L,q])}}function Ze(q){L.setProps({content:q})}function Et(){var q=L.state.isVisible,de=L.state.isDestroyed,ye=!L.state.isEnabled,ze=ei.isTouch&&!L.props.touch,et=ul(L.props.duration,0,Hn.duration);if(!(q||de||ye||ze)&&!Te().hasAttribute("disabled")&&(be("onShow",[L],!1),L.props.onShow(L)!==!1)){if(L.state.isVisible=!0,De()&&(p.style.visibility="visible"),Ie(),xe(),L.state.isMounted||(p.style.transition="none"),De()){var Vt=dt(),en=Vt.box,fi=Vt.content;fl([en,fi],0)}_=function(){var un;if(!(!L.state.isVisible||m)){if(m=!0,p.offsetHeight,p.style.transition=L.props.moveTransition,De()&&L.props.animation){var fs=dt(),_r=fs.box,ni=fs.content;fl([_r,ni],et),Mf([_r,ni],"visible")}ot(),kt(),Nf(gl,L),(un=L.popperInstance)==null||un.forceUpdate(),be("onMount",[L]),L.props.animation&&De()&&ft(et,function(){L.state.isShown=!0,be("onShown",[L])})}},re()}}function Xt(){var q=!L.state.isVisible,de=L.state.isDestroyed,ye=!L.state.isEnabled,ze=ul(L.props.duration,1,Hn.duration);if(!(q||de||ye)&&(be("onHide",[L],!1),L.props.onHide(L)!==!1)){if(L.state.isVisible=!1,L.state.isShown=!1,m=!1,l=!1,De()&&(p.style.visibility="hidden"),at(),_e(),Ie(!0),De()){var et=dt(),Vt=et.box,en=et.content;L.props.animation&&(fl([Vt,en],ze),Mf([Vt,en],"hidden"))}ot(),kt(),L.props.animation?De()&&Fe(ze,L.unmount):L.unmount()}}function ti(q){nt().addEventListener("mousemove",x),Nf(Ao,x),x(q)}function Bn(){L.state.isVisible&&L.hide(),L.state.isMounted&&(ie(),Q().forEach(function(q){q._tippy.unmount()}),p.parentNode&&p.parentNode.removeChild(p),gl=gl.filter(function(q){return q!==L}),L.state.isMounted=!1,be("onHidden",[L]))}function vn(){L.state.isDestroyed||(L.clearDelayTimeouts(),L.unmount(),k(),delete e._tippy,L.state.isDestroyed=!0,be("onDestroy",[L]))}}function cs(e,t){t===void 0&&(t={});var n=Hn.plugins.concat(t.plugins||[]);r_();var i=Object.assign({},t,{plugins:n}),r=QT(e),o=r.reduce(function(l,c){var d=c&&h_(c,i);return d&&l.push(d),l},[]);return ko(e)?o[0]:o}cs.defaultProps=Hn,cs.setDefaultProps=c_,cs.currentInput=ei,Object.assign({},df,{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)}}),cs.setDefaultProps({render:Vf});const{toClipboard:g_}=_w();onUiLoaded(()=>{const e=document.createElement("div");e.id="physton-prompt-all-in-one",oe.gradioApp().appendChild(e);const t=Zh(vw);t.config.globalProperties.$toastr=Cw,t.config.globalProperties.$copyText=g_,t.config.globalProperties.$tippyList=[],t.mixin(B0),t.directive("tooltip",{mounted(n,i){n.setAttribute("data-tippy-content",i.value);const r=cs(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
|