@acedatacloud/nexior 3.19.3 → 3.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Auth-OmVNI-G2.js → Auth-CQobrW7e.js} +1 -1
- package/dist/assets/{BotPlaceholder-CWc2B3sk.js → BotPlaceholder-DLd3-O4U.js} +1 -1
- package/dist/assets/{Callback-DldIe9Xm.js → Callback-Db9TLfvk.js} +1 -1
- package/dist/assets/{Console-C9VBH03V.js → Console-CaAxK4dC.js} +1 -1
- package/dist/assets/{Conversation-QD82yGFw.js → Conversation-ClFlw8TE.js} +2 -2
- package/dist/assets/{CopyToClipboard-8MBu8w6l.js → CopyToClipboard-B3Q4IyIz.js} +1 -1
- package/dist/assets/{Detail-CucDzMTi.js → Detail-Chm7HvSn.js} +1 -1
- package/dist/assets/{EditArray-CynUn1ym.js → EditArray-CcxENZ7T.js} +1 -1
- package/dist/assets/{Extra--joBYh02.js → Extra-9TF3vLJR.js} +1 -1
- package/dist/assets/{FilePreview-CLdjLL8D.js → FilePreview-zNTcfzGK.js} +1 -1
- package/dist/assets/{History-BRl6WH1t.js → History-BaKAOzuz.js} +1 -1
- package/dist/assets/{ImagePreview-k8xiX9go.js → ImagePreview-BO7_kBZK.js} +1 -1
- package/dist/assets/{ImageWrapper-B1GR1vdU.js → ImageWrapper-DDgrcUpN.js} +1 -1
- package/dist/assets/{Index-BEzE_zco.css → Index-3hzmS3eW.css} +1 -1
- package/dist/assets/{Index-C_m2mL_8.js → Index-5df8lDfZ.js} +1 -1
- package/dist/assets/{Index-C_u9SFgi.js → Index-BOSTKYkU.js} +1 -1
- package/dist/assets/{Index-Cu4echf6.js → Index-BWtMiqll.js} +1 -1
- package/dist/assets/{Index-DyyZebnB.js → Index-BurCaFfA.js} +1 -1
- package/dist/assets/{Index-BBvDaYVw.js → Index-CT4KTGwv.js} +1 -1
- package/dist/assets/{Index-BoS5mBFG.js → Index-CZm4gDp_.js} +1 -1
- package/dist/assets/{Index-DDAs69Wm.js → Index-CcqrQ9xY.js} +1 -1
- package/dist/assets/{Index-gK2FgI4V.js → Index-CvfVAnPP.js} +1 -1
- package/dist/assets/{Index-DKFw7rzh.js → Index-D7dWH8D1.js} +1 -1
- package/dist/assets/{Index-2BWumosd.js → Index-WDCakEnG.js} +1 -1
- package/dist/assets/{Index-D8XMHW0_.js → Index-dOcJKd6H.js} +1 -1
- package/dist/assets/{Index-Cw3eXlE5.js → Index-dcEeVAMq.js} +1 -1
- package/dist/assets/{Index-BDAd2SwX.js → Index-hNY2A0bX.js} +1 -1
- package/dist/assets/Index-jL9vh1vt.js +1 -0
- package/dist/assets/{Index-BH3IL5nH.js → Index-utCtwoZl.js} +1 -1
- package/dist/assets/{InfoIcon-vbBWQQje.js → InfoIcon-C9zLZXFd.js} +1 -1
- package/dist/assets/{Invitees-BY36MgGK.js → Invitees-PMwtb0_0.js} +1 -1
- package/dist/assets/{List-Bb6gUE0e.js → List-BIveMp_L.js} +1 -1
- package/dist/assets/{List-DuWa3xk3.js → List-CmFjwdxk.js} +1 -1
- package/dist/assets/{List-KXG0gNF0.js → List-D_iJT2xh.js} +1 -1
- package/dist/assets/{Login-eH4UESEK.js → Login-K2jwS-9w.js} +1 -1
- package/dist/assets/{Main-BYit8MkX.js → Main-BEJjlnb0.js} +1 -1
- package/dist/assets/{Navigator-DA4-Nrbk.js → Navigator-DOMCMM13.js} +1 -1
- package/dist/assets/{NoTasks-D4CPqBrE.js → NoTasks-DDRgjaNt.js} +1 -1
- package/dist/assets/{Pagination-C5qQafok.js → Pagination-BlPseRXs.js} +1 -1
- package/dist/assets/{Status-31VAp8MR.js → Status-B97vIuh1.js} +1 -1
- package/dist/assets/{Subscribe-CrzZlb4E.js → Subscribe-D27qe_Al.js} +1 -1
- package/dist/assets/{VideoPlayer-IYCFIBuz.js → VideoPlayer-61Cqj9GH.js} +1 -1
- package/dist/assets/{_baseClone-CBtznGVq.js → _baseClone-D_93k3Nh.js} +1 -1
- package/dist/assets/{_baseIteratee-DRN1TLj7.js → _baseIteratee-Bl2-nnv8.js} +1 -1
- package/dist/assets/{_initCloneObject-BHh-zcQZ.js → _initCloneObject-DsSkRlN-.js} +1 -1
- package/dist/assets/{castArray-BLVLWkbO.js → castArray-CLbvN5vw.js} +1 -1
- package/dist/assets/{debounce-8xJw-nF5.js → debounce-CMDuVRq1.js} +1 -1
- package/dist/assets/{distribution-CLsD-AkP.js → distribution-giSwFM-4.js} +1 -1
- package/dist/assets/{dropdown-B7GZa7BN.js → dropdown-CyzwdvpU.js} +1 -1
- package/dist/assets/{index-ChSNP0Kq.js → index-AaF22A50.js} +1 -1
- package/dist/assets/{index-C55R-zv4.js → index-B1GAOpEG.js} +1 -1
- package/dist/assets/{index-C7u2q9B_.js → index-B7HazlRJ.js} +1 -1
- package/dist/assets/{index-j3WKbWOT.js → index-BCVtyh6P.js} +1 -1
- package/dist/assets/{index-DP7qjaj4.js → index-BZvTkoKU.js} +1 -1
- package/dist/assets/{index-Dh1BfhAg.js → index-BgfnKNJP.js} +1 -1
- package/dist/assets/{index-BwsIkuew.js → index-Bmb96AgG.js} +1 -1
- package/dist/assets/{index-D-Djt1gp.js → index-BmgQ_NQh.js} +1 -1
- package/dist/assets/{index-DS1vd-hn.js → index-BnQDLfw9.js} +1 -1
- package/dist/assets/{index-DLJcSeSY.js → index-BvHSWWkQ.js} +1 -1
- package/dist/assets/{index-DUrRUc_Y.js → index-CBuIppwi.js} +1 -1
- package/dist/assets/{index-DGnyygE_.js → index-Ci6PT3RL.js} +1 -1
- package/dist/assets/{index-B83P8zpE.js → index-Cq4RGvYP.js} +1 -1
- package/dist/assets/{index-Cl1Bxk_T.js → index-CyE0uqPN.js} +1 -1
- package/dist/assets/{index-DTl1vwTk.js → index-D-Kq9yA_.js} +2 -2
- package/dist/assets/{index-BNMfEZvq.js → index-D1EIYSXf.js} +1 -1
- package/dist/assets/{index-DNnF8aJO.js → index-D7te_1LX.js} +1 -1
- package/dist/assets/{index-DKKcEDCT.js → index-DLCeq8hw.js} +1 -1
- package/dist/assets/{index-C-ZhSofP.js → index-DMG8nVoz.js} +1 -1
- package/dist/assets/{index-Cch9iD7z.js → index-DPFYPrCl.js} +1 -1
- package/dist/assets/{index--R19waBW.js → index-DSYaReFV.js} +1 -1
- package/dist/assets/{index-D1Ennf92.js → index-DUOh2FeK.js} +1 -1
- package/dist/assets/{index-oY3JclvK.js → index-DY15pjGM.js} +1 -1
- package/dist/assets/{index-BLqJYEE_.js → index-DYpr8bba.js} +1 -1
- package/dist/assets/{index-CCpA6MgI.js → index-Pja6Zfr2.js} +1 -1
- package/dist/assets/{index-CC5y91hO.js → index-YIXkK2sp.js} +1 -1
- package/dist/assets/{index-BsOJkwLq.js → index-j_uZdGZu.js} +1 -1
- package/dist/assets/{index-hVlP373B.js → index-lxs5nKhi.js} +1 -1
- package/dist/assets/{index-DE7sDVN2.js → index-xoO8OtTi.js} +1 -1
- package/dist/assets/{index.es-BZdaR5Wv.js → index.es-BsYSuHZG.js} +1 -1
- package/dist/assets/{isEqual-DTFQVxFI.js → isEqual-B9PwPc7o.js} +1 -1
- package/dist/assets/{isPlainObject-BWu10rlc.js → isPlainObject-k9dsakNF.js} +1 -1
- package/dist/assets/{order--VtVycJC.js → order-CdFDtwyf.js} +1 -1
- package/dist/assets/{price-DuZgics8.js → price-Dp6mCDrl.js} +1 -1
- package/dist/assets/{strings-DLqquZWc.js → strings-C6Jtkx-3.js} +1 -1
- package/dist/assets/{typescript-DSwEcZQ6.js → typescript-CbXledGi.js} +1 -1
- package/dist/assets/{use-form-item-71vAE_4O.js → use-form-item-BkhNVF1L.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Index-HBsvo20J.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aM as Te,al as F,aB as de,ak as Se,ci as O,cg as D,ch as Ne,aq as ae,bT as xe,_ as Me,d as te,b2 as Ke,a as Ee,am as ee,bH as Ce,c as y,bG as ve,bp as Xe,bR as Je,ax as ce,aw as Ye,bV as qe,b as X,o as B,J as Fe,y as re,k as me,e as t,c9 as be,n as Y,r as ge,j as oe,i as Z,A as Qe,e2 as Ze,E as ze,d0 as De,e0 as et,bf as tt,ai as he,bO as ye,bF as Oe,bi as Ie,g as We,aO as fe,ao as nt,bd as we,aJ as q,cb as Pe,t as se,x as lt,f as le,bn as at,aD as rt,an as ot,F as Ve,v as ke}from"./index-DTl1vwTk.js";import{a as pe}from"./typescript-DSwEcZQ6.js";import{E as st}from"./index-B83P8zpE.js";import{u as Ue}from"./index-Dh1BfhAg.js";import{u as Ge,a as ut}from"./use-form-item-71vAE_4O.js";import{b as je,E as it}from"./index-BsOJkwLq.js";import{d as Ae}from"./debounce-8xJw-nF5.js";const dt=100,ct=600,Re={beforeMount(e,l){const o=l.value,{interval:a=dt,delay:m=ct}=Te(o)?{}:o;let d,u;const i=()=>Te(o)?o():o.handler(),V=()=>{u&&(clearTimeout(u),u=void 0),d&&(clearInterval(d),d=void 0)};e.addEventListener("mousedown",v=>{v.button===0&&(V(),i(),document.addEventListener("mouseup",()=>V(),{once:!0}),u=setTimeout(()=>{d=setInterval(()=>{i()},a)},m))})}},mt=Se({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:xe,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||F(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Ue(["ariaLabel"]),inputmode:{type:ae(String),default:void 0}}),ft={[Ne]:(e,l)=>l!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[D]:e=>F(e)||de(e),[O]:e=>F(e)||de(e)},vt=te({name:"ElInputNumber"}),bt=te({...vt,props:mt,emits:ft,setup(e,{expose:l,emit:o}){const a=e,{t:m}=Ke(),d=Ee("input-number"),u=ee(),i=Ce({currentValue:a.modelValue,userInput:null}),{formItem:V}=Ge(),v=y(()=>F(a.modelValue)&&a.modelValue<=a.min),w=y(()=>F(a.modelValue)&&a.modelValue>=a.max),f=y(()=>{const n=$(a.step);return ve(a.precision)?Math.max($(a.modelValue),n):(n>a.precision,a.precision)}),k=y(()=>a.controls&&a.controlsPosition==="right"),R=Xe(),z=Je(),A=y(()=>{if(i.userInput!==null)return i.userInput;let n=i.currentValue;if(de(n))return"";if(F(n)){if(Number.isNaN(n))return"";ve(a.precision)||(n=n.toFixed(a.precision))}return n}),T=(n,r)=>{if(ve(r)&&(r=f.value),r===0)return Math.round(n);let c=String(n);const p=c.indexOf(".");if(p===-1||!c.replace(".","").split("")[p+r])return n;const x=c.length;return c.charAt(x-1)==="5"&&(c=`${c.slice(0,Math.max(0,x-1))}6`),Number.parseFloat(Number(c).toFixed(r))},$=n=>{if(de(n))return 0;const r=n.toString(),c=r.indexOf(".");let p=0;return c!==-1&&(p=r.length-c-1),p},I=(n,r=1)=>F(n)?n>=Number.MAX_SAFE_INTEGER&&r===1||n<=Number.MIN_SAFE_INTEGER&&r===-1?n:T(n+a.step*r):i.currentValue,K=()=>{if(a.readonly||z.value||w.value)return;const n=Number(A.value)||0,r=I(n);C(r),o(D,i.currentValue),S()},P=()=>{if(a.readonly||z.value||v.value)return;const n=Number(A.value)||0,r=I(n,-1);C(r),o(D,i.currentValue),S()},M=(n,r)=>{const{max:c,min:p,step:h,precision:N,stepStrictly:x,valueOnClear:_}=a;c<p&&Oe("InputNumber","min should not be greater than max.");let s=Number(n);if(de(n)||Number.isNaN(s))return null;if(n===""){if(_===null)return null;s=Ie(_)?{min:p,max:c}[_]:_}return x&&(s=T(Math.round(s/h)*h,N),s!==n&&r&&o(O,s)),ve(N)||(s=T(s,N)),(s>c||s<p)&&(s=s>c?c:p,r&&o(O,s)),s},C=(n,r=!0)=>{var c;const p=i.currentValue,h=M(n);if(!r){o(O,h);return}p===h&&n||(i.userInput=null,o(O,h),p!==h&&o(Ne,h,p),a.validateEvent&&((c=V?.validate)==null||c.call(V,"change").catch(N=>ye())),i.currentValue=h)},G=n=>{i.userInput=n;const r=n===""?null:Number(n);o(D,r),C(r,!1)},ne=n=>{const r=n!==""?Number(n):"";(F(r)&&!Number.isNaN(r)||n==="")&&C(r),S(),i.userInput=null},j=()=>{var n,r;(r=(n=u.value)==null?void 0:n.focus)==null||r.call(n)},W=()=>{var n,r;(r=(n=u.value)==null?void 0:n.blur)==null||r.call(n)},H=n=>{o("focus",n)},b=n=>{var r,c;i.userInput=null,i.currentValue===null&&((r=u.value)!=null&&r.input)&&(u.value.input.value=""),o("blur",n),a.validateEvent&&((c=V?.validate)==null||c.call(V,"blur").catch(p=>ye()))},S=()=>{i.currentValue!==a.modelValue&&(i.currentValue=a.modelValue)},L=n=>{document.activeElement===n.target&&n.preventDefault()};return ce(()=>a.modelValue,(n,r)=>{const c=M(n,!0);i.userInput===null&&c!==r&&(i.currentValue=c)},{immediate:!0}),Ye(()=>{var n;const{min:r,max:c,modelValue:p}=a,h=(n=u.value)==null?void 0:n.input;if(h.setAttribute("role","spinbutton"),Number.isFinite(c)?h.setAttribute("aria-valuemax",String(c)):h.removeAttribute("aria-valuemax"),Number.isFinite(r)?h.setAttribute("aria-valuemin",String(r)):h.removeAttribute("aria-valuemin"),h.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),h.setAttribute("aria-disabled",String(z.value)),!F(p)&&p!=null){let N=Number(p);Number.isNaN(N)&&(N=null),o(O,N)}h.addEventListener("wheel",L,{passive:!1})}),qe(()=>{var n,r;const c=(n=u.value)==null?void 0:n.input;c?.setAttribute("aria-valuenow",`${(r=i.currentValue)!=null?r:""}`)}),l({focus:j,blur:W}),(n,r)=>(B(),X("div",{class:Y([t(d).b(),t(d).m(t(R)),t(d).is("disabled",t(z)),t(d).is("without-controls",!n.controls),t(d).is("controls-right",t(k))]),onDragstart:he(()=>{},["prevent"])},[n.controls?Fe((B(),X("span",{key:0,role:"button","aria-label":t(m)("el.inputNumber.decrease"),class:Y([t(d).e("decrease"),t(d).is("disabled",t(v))]),onKeydown:be(P,["enter"])},[ge(n.$slots,"decrease-icon",{},()=>[me(t(ze),null,{default:oe(()=>[t(k)?(B(),Z(t(Qe),{key:0})):(B(),Z(t(Ze),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(Re),P]]):re("v-if",!0),n.controls?Fe((B(),X("span",{key:1,role:"button","aria-label":t(m)("el.inputNumber.increase"),class:Y([t(d).e("increase"),t(d).is("disabled",t(w))]),onKeydown:be(K,["enter"])},[ge(n.$slots,"increase-icon",{},()=>[me(t(ze),null,{default:oe(()=>[t(k)?(B(),Z(t(De),{key:0})):(B(),Z(t(et),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(Re),K]]):re("v-if",!0),me(t(st),{id:n.id,ref_key:"input",ref:u,type:"number",step:n.step,"model-value":t(A),placeholder:n.placeholder,readonly:n.readonly,disabled:t(z),size:t(R),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,inputmode:n.inputmode,onKeydown:[be(he(K,["prevent"]),["up"]),be(he(P,["prevent"]),["down"])],onBlur:b,onFocus:H,onInput:G,onChange:ne},tt({_:2},[n.$slots.prefix?{name:"prefix",fn:oe(()=>[ge(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:oe(()=>[ge(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode","onKeydown"])],42,["onDragstart"]))}});var gt=Me(bt,[["__file","input-number.vue"]]);const Vt=We(gt),He=Symbol("sliderContextKey"),ht=Se({modelValue:{type:ae([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:xe,inputSize:xe,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ae(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ae(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:je,default:"top"},marks:{type:ae(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Ue(["ariaLabel"])}),Be=e=>F(e)||fe(e)&&e.every(F),yt={[O]:Be,[D]:Be,[Ne]:Be},wt=Se({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:je,default:"top"}}),pt={[O]:e=>F(e)},St=(e,l,o)=>{const a=ee(),m=ee(!1),d=y(()=>l.value instanceof Function),u=y(()=>d.value&&l.value(e.modelValue)||e.modelValue),i=Ae(()=>{o.value&&(m.value=!0)},50),V=Ae(()=>{o.value&&(m.value=!1)},50);return{tooltip:a,tooltipVisible:m,formatValue:u,displayTooltip:i,hideTooltip:V}},Nt=(e,l,o)=>{const{disabled:a,min:m,max:d,step:u,showTooltip:i,persistent:V,precision:v,sliderSize:w,formatTooltip:f,emitChange:k,resetSize:R,updateDragging:z}=nt(He),{tooltip:A,tooltipVisible:T,formatValue:$,displayTooltip:I,hideTooltip:K}=St(e,f,i),P=ee(),M=y(()=>`${(e.modelValue-m.value)/(d.value-m.value)*100}%`),C=y(()=>e.vertical?{bottom:M.value}:{left:M.value}),G=()=>{l.hovering=!0,I()},ne=()=>{l.hovering=!1,l.dragging||K()},j=s=>{a.value||(s.preventDefault(),h(s),window.addEventListener("mousemove",N),window.addEventListener("touchmove",N),window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("contextmenu",x),P.value.focus())},W=s=>{a.value||(l.newPosition=Number.parseFloat(M.value)+s/(d.value-m.value)*100,_(l.newPosition),k())},H=()=>{W(-u.value)},b=()=>{W(u.value)},S=()=>{W(-u.value*4)},L=()=>{W(u.value*4)},n=()=>{a.value||(_(0),k())},r=()=>{a.value||(_(100),k())},c=s=>{let E=!0;switch(s.code){case q.left:case q.down:H();break;case q.right:case q.up:b();break;case q.home:n();break;case q.end:r();break;case q.pageDown:S();break;case q.pageUp:L();break;default:E=!1;break}E&&s.preventDefault()},p=s=>{let E,U;return s.type.startsWith("touch")?(U=s.touches[0].clientY,E=s.touches[0].clientX):(U=s.clientY,E=s.clientX),{clientX:E,clientY:U}},h=s=>{l.dragging=!0,l.isClick=!0;const{clientX:E,clientY:U}=p(s);e.vertical?l.startY=U:l.startX=E,l.startPosition=Number.parseFloat(M.value),l.newPosition=l.startPosition},N=s=>{if(l.dragging){l.isClick=!1,I(),R();let E;const{clientX:U,clientY:J}=p(s);e.vertical?(l.currentY=J,E=(l.startY-l.currentY)/w.value*100):(l.currentX=U,E=(l.currentX-l.startX)/w.value*100),l.newPosition=l.startPosition+E,_(l.newPosition)}},x=()=>{l.dragging&&(setTimeout(()=>{l.dragging=!1,l.hovering||K(),l.isClick||_(l.newPosition),k()},0),window.removeEventListener("mousemove",N),window.removeEventListener("touchmove",N),window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("contextmenu",x))},_=async s=>{if(s===null||Number.isNaN(+s))return;s<0?s=0:s>100&&(s=100);const E=100/((d.value-m.value)/u.value);let J=Math.round(s/E)*E*(d.value-m.value)*.01+m.value;J=Number.parseFloat(J.toFixed(v.value)),J!==e.modelValue&&o(O,J),!l.dragging&&e.modelValue!==l.oldValue&&(l.oldValue=e.modelValue),await we(),l.dragging&&I(),A.value.updatePopper()};return ce(()=>l.dragging,s=>{z(s)}),pe(P,"touchstart",j,{passive:!1}),{disabled:a,button:P,tooltip:A,tooltipVisible:T,showTooltip:i,persistent:V,wrapperStyle:C,formatValue:$,handleMouseEnter:G,handleMouseLeave:ne,onButtonDown:j,onKeyDown:c,setPosition:_}},Et=te({name:"ElSliderButton"}),kt=te({...Et,props:wt,emits:pt,setup(e,{expose:l,emit:o}){const a=e,m=Ee("slider"),d=Ce({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),u=y(()=>w.value?f.value:!1),{disabled:i,button:V,tooltip:v,showTooltip:w,persistent:f,tooltipVisible:k,wrapperStyle:R,formatValue:z,handleMouseEnter:A,handleMouseLeave:T,onButtonDown:$,onKeyDown:I,setPosition:K}=Nt(a,d,o),{hovering:P,dragging:M}=Pe(d);return l({onButtonDown:$,onKeyDown:I,setPosition:K,hovering:P,dragging:M}),(C,G)=>(B(),X("div",{ref_key:"button",ref:V,class:Y([t(m).e("button-wrapper"),{hover:t(P),dragging:t(M)}]),style:le(t(R)),tabindex:t(i)?-1:0,onMouseenter:t(A),onMouseleave:t(T),onMousedown:t($),onFocus:t(A),onBlur:t(T),onKeydown:t(I)},[me(t(it),{ref_key:"tooltip",ref:v,visible:t(k),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!t(w),persistent:t(u)},{content:oe(()=>[se("span",null,lt(t(z)),1)]),default:oe(()=>[se("div",{class:Y([t(m).e("button"),{hover:t(P),dragging:t(M)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var $e=Me(kt,[["__file","button.vue"]]);const Bt=Se({mark:{type:ae([String,Object]),default:void 0}});var xt=te({name:"ElSliderMarker",props:Bt,setup(e){const l=Ee("slider"),o=y(()=>Ie(e.mark)?e.mark:e.mark.label),a=y(()=>Ie(e.mark)?void 0:e.mark.style);return()=>at("div",{class:l.e("marks-text"),style:a.value},o.value)}});const It=(e,l,o)=>{const{form:a,formItem:m}=Ge(),d=rt(),u=ee(),i=ee(),V={firstButton:u,secondButton:i},v=y(()=>e.disabled||a?.disabled||!1),w=y(()=>Math.min(l.firstValue,l.secondValue)),f=y(()=>Math.max(l.firstValue,l.secondValue)),k=y(()=>e.range?`${100*(f.value-w.value)/(e.max-e.min)}%`:`${100*(l.firstValue-e.min)/(e.max-e.min)}%`),R=y(()=>e.range?`${100*(w.value-e.min)/(e.max-e.min)}%`:"0%"),z=y(()=>e.vertical?{height:e.height}:{}),A=y(()=>e.vertical?{height:k.value,bottom:R.value}:{width:k.value,left:R.value}),T=()=>{d.value&&(l.sliderSize=d.value[`client${e.vertical?"Height":"Width"}`])},$=b=>{const S=e.min+b*(e.max-e.min)/100;if(!e.range)return u;let L;return Math.abs(w.value-S)<Math.abs(f.value-S)?L=l.firstValue<l.secondValue?"firstButton":"secondButton":L=l.firstValue>l.secondValue?"firstButton":"secondButton",V[L]},I=b=>{const S=$(b);return S.value.setPosition(b),S},K=b=>{l.firstValue=b??e.min,M(e.range?[w.value,f.value]:b??e.min)},P=b=>{l.secondValue=b,e.range&&M([w.value,f.value])},M=b=>{o(O,b),o(D,b)},C=async()=>{await we(),o(Ne,e.range?[w.value,f.value]:e.modelValue)},G=b=>{var S,L,n,r,c,p;if(v.value||l.dragging)return;T();let h=0;if(e.vertical){const N=(n=(L=(S=b.touches)==null?void 0:S.item(0))==null?void 0:L.clientY)!=null?n:b.clientY;h=(d.value.getBoundingClientRect().bottom-N)/l.sliderSize*100}else{const N=(p=(c=(r=b.touches)==null?void 0:r.item(0))==null?void 0:c.clientX)!=null?p:b.clientX,x=d.value.getBoundingClientRect().left;h=(N-x)/l.sliderSize*100}if(!(h<0||h>100))return I(h)};return{elFormItem:m,slider:d,firstButton:u,secondButton:i,sliderDisabled:v,minValue:w,maxValue:f,runwayStyle:z,barStyle:A,resetSize:T,setPosition:I,emitChange:C,onSliderWrapperPrevent:b=>{var S,L;((S=V.firstButton.value)!=null&&S.dragging||(L=V.secondButton.value)!=null&&L.dragging)&&b.preventDefault()},onSliderClick:b=>{G(b)&&C()},onSliderDown:async b=>{const S=G(b);S&&(await we(),S.value.onButtonDown(b))},onSliderMarkerDown:b=>{if(v.value||l.dragging)return;I(b)&&C()},setFirstValue:K,setSecondValue:P}},Pt=(e,l,o,a)=>({stops:y(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const u=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),V=Array.from({length:u-1}).map((v,w)=>(w+1)*i);return e.range?V.filter(v=>v<100*(o.value-e.min)/(e.max-e.min)||v>100*(a.value-e.min)/(e.max-e.min)):V.filter(v=>v>100*(l.firstValue-e.min)/(e.max-e.min))}),getStopStyle:u=>e.vertical?{bottom:`${u}%`}:{left:`${u}%`}}),Mt=e=>y(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((o,a)=>o-a).filter(o=>o<=e.max&&o>=e.min).map(o=>({point:o,position:(o-e.min)*100/(e.max-e.min),mark:e.marks[o]})):[]),Ct=(e,l,o,a,m,d)=>{const u=v=>{m(O,v),m(D,v)},i=()=>e.range?![o.value,a.value].every((v,w)=>v===l.oldValue[w]):e.modelValue!==l.oldValue,V=()=>{var v,w;e.min>e.max&&Oe("Slider","min should not be greater than max.");const f=e.modelValue;e.range&&fe(f)?f[1]<e.min?u([e.min,e.min]):f[0]>e.max?u([e.max,e.max]):f[0]<e.min?u([e.min,f[1]]):f[1]>e.max?u([f[0],e.max]):(l.firstValue=f[0],l.secondValue=f[1],i()&&(e.validateEvent&&((v=d?.validate)==null||v.call(d,"change").catch(k=>ye())),l.oldValue=f.slice())):!e.range&&F(f)&&!Number.isNaN(f)&&(f<e.min?u(e.min):f>e.max?u(e.max):(l.firstValue=f,i()&&(e.validateEvent&&((w=d?.validate)==null||w.call(d,"change").catch(k=>ye())),l.oldValue=f)))};V(),ce(()=>l.dragging,v=>{v||V()}),ce(()=>e.modelValue,(v,w)=>{l.dragging||fe(v)&&fe(w)&&v.every((f,k)=>f===w[k])&&l.firstValue===v[0]&&l.secondValue===v[1]||V()},{deep:!0}),ce(()=>[e.min,e.max],()=>{V()})},Lt=(e,l,o)=>{const a=ee();return Ye(async()=>{e.range?(fe(e.modelValue)?(l.firstValue=Math.max(e.min,e.modelValue[0]),l.secondValue=Math.min(e.max,e.modelValue[1])):(l.firstValue=e.min,l.secondValue=e.max),l.oldValue=[l.firstValue,l.secondValue]):(!F(e.modelValue)||Number.isNaN(e.modelValue)?l.firstValue=e.min:l.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),l.oldValue=l.firstValue),pe(window,"resize",o),await we(),o()}),{sliderWrapper:a}},_t=te({name:"ElSlider"}),Tt=te({..._t,props:ht,emits:yt,setup(e,{expose:l,emit:o}){const a=e,m=Ee("slider"),{t:d}=Ke(),u=Ce({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:V,firstButton:v,secondButton:w,sliderDisabled:f,minValue:k,maxValue:R,runwayStyle:z,barStyle:A,resetSize:T,emitChange:$,onSliderWrapperPrevent:I,onSliderClick:K,onSliderDown:P,onSliderMarkerDown:M,setFirstValue:C,setSecondValue:G}=It(a,u,o),{stops:ne,getStopStyle:j}=Pt(a,u,k,R),{inputId:W,isLabeledByFormItem:H}=ut(a,{formItemContext:i}),b=Xe(),S=y(()=>a.inputSize||b.value),L=y(()=>a.ariaLabel||d("el.slider.defaultLabel",{min:a.min,max:a.max})),n=y(()=>a.range?a.rangeStartLabel||d("el.slider.defaultRangeStartLabel"):L.value),r=y(()=>a.formatValueText?a.formatValueText(s.value):`${s.value}`),c=y(()=>a.rangeEndLabel||d("el.slider.defaultRangeEndLabel")),p=y(()=>a.formatValueText?a.formatValueText(E.value):`${E.value}`),h=y(()=>[m.b(),m.m(b.value),m.is("vertical",a.vertical),{[m.m("with-input")]:a.showInput}]),N=Mt(a);Ct(a,u,k,R,o,i);const x=y(()=>{const g=[a.min,a.max,a.step].map(Le=>{const ue=`${Le}`.split(".")[1];return ue?ue.length:0});return Math.max.apply(null,g)}),{sliderWrapper:_}=Lt(a,u,T),{firstValue:s,secondValue:E,sliderSize:U}=Pe(u),J=g=>{u.dragging=g};return pe(_,"touchstart",I,{passive:!1}),pe(_,"touchmove",I,{passive:!1}),ot(He,{...Pe(a),sliderSize:U,disabled:f,precision:x,emitChange:$,resetSize:T,updateDragging:J}),l({onSliderClick:K}),(g,Le)=>{var ue,_e;return B(),X("div",{id:g.range?t(W):void 0,ref_key:"sliderWrapper",ref:_,class:Y(t(h)),role:g.range?"group":void 0,"aria-label":g.range&&!t(H)?t(L):void 0,"aria-labelledby":g.range&&t(H)?(ue=t(i))==null?void 0:ue.labelId:void 0},[se("div",{ref_key:"slider",ref:V,class:Y([t(m).e("runway"),{"show-input":g.showInput&&!g.range},t(m).is("disabled",t(f))]),style:le(t(z)),onMousedown:t(P),onTouchstartPassive:t(P)},[se("div",{class:Y(t(m).e("bar")),style:le(t(A))},null,6),me($e,{id:g.range?void 0:t(W),ref_key:"firstButton",ref:v,"model-value":t(s),vertical:g.vertical,"tooltip-class":g.tooltipClass,placement:g.placement,role:"slider","aria-label":g.range||!t(H)?t(n):void 0,"aria-labelledby":!g.range&&t(H)?(_e=t(i))==null?void 0:_e.labelId:void 0,"aria-valuemin":g.min,"aria-valuemax":g.range?t(E):g.max,"aria-valuenow":t(s),"aria-valuetext":t(r),"aria-orientation":g.vertical?"vertical":"horizontal","aria-disabled":t(f),"onUpdate:modelValue":t(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),g.range?(B(),Z($e,{key:0,ref_key:"secondButton",ref:w,"model-value":t(E),vertical:g.vertical,"tooltip-class":g.tooltipClass,placement:g.placement,role:"slider","aria-label":t(c),"aria-valuemin":t(s),"aria-valuemax":g.max,"aria-valuenow":t(E),"aria-valuetext":t(p),"aria-orientation":g.vertical?"vertical":"horizontal","aria-disabled":t(f),"onUpdate:modelValue":t(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):re("v-if",!0),g.showStops?(B(),X("div",{key:1},[(B(!0),X(Ve,null,ke(t(ne),(Q,ie)=>(B(),X("div",{key:ie,class:Y(t(m).e("stop")),style:le(t(j)(Q))},null,6))),128))])):re("v-if",!0),t(N).length>0?(B(),X(Ve,{key:2},[se("div",null,[(B(!0),X(Ve,null,ke(t(N),(Q,ie)=>(B(),X("div",{key:ie,style:le(t(j)(Q.position)),class:Y([t(m).e("stop"),t(m).e("marks-stop")])},null,6))),128))]),se("div",{class:Y(t(m).e("marks"))},[(B(!0),X(Ve,null,ke(t(N),(Q,ie)=>(B(),Z(t(xt),{key:ie,mark:Q.mark,style:le(t(j)(Q.position)),onMousedown:he(zt=>t(M)(Q.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):re("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),g.showInput&&!g.range?(B(),Z(t(Vt),{key:0,ref:"input","model-value":t(s),class:Y(t(m).e("input")),step:g.step,disabled:t(f),controls:g.showInputControls,min:g.min,max:g.max,precision:t(x),debounce:g.debounce,size:t(S),"onUpdate:modelValue":t(C),onChange:t($)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):re("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var Ft=Me(Tt,[["__file","slider.vue"]]);const Wt=We(Ft);export{Vt as E,Wt as a};
|
|
1
|
+
import{aM as Te,al as F,aB as de,ak as Se,ci as O,cg as D,ch as Ne,aq as ae,bT as xe,_ as Me,d as te,b2 as Ke,a as Ee,am as ee,bH as Ce,c as y,bG as ve,bp as Xe,bR as Je,ax as ce,aw as Ye,bV as qe,b as X,o as B,J as Fe,y as re,k as me,e as t,c9 as be,n as Y,r as ge,j as oe,i as Z,A as Qe,e2 as Ze,E as ze,d0 as De,e0 as et,bf as tt,ai as he,bO as ye,bF as Oe,bi as Ie,g as We,aO as fe,ao as nt,bd as we,aJ as q,cb as Pe,t as se,x as lt,f as le,bn as at,aD as rt,an as ot,F as Ve,v as ke}from"./index-D-Kq9yA_.js";import{a as pe}from"./typescript-CbXledGi.js";import{E as st}from"./index-Cq4RGvYP.js";import{u as Ue}from"./index-BgfnKNJP.js";import{u as Ge,a as ut}from"./use-form-item-BkhNVF1L.js";import{b as je,E as it}from"./index-j_uZdGZu.js";import{d as Ae}from"./debounce-CMDuVRq1.js";const dt=100,ct=600,Re={beforeMount(e,l){const o=l.value,{interval:a=dt,delay:m=ct}=Te(o)?{}:o;let d,u;const i=()=>Te(o)?o():o.handler(),V=()=>{u&&(clearTimeout(u),u=void 0),d&&(clearInterval(d),d=void 0)};e.addEventListener("mousedown",v=>{v.button===0&&(V(),i(),document.addEventListener("mouseup",()=>V(),{once:!0}),u=setTimeout(()=>{d=setInterval(()=>{i()},a)},m))})}},mt=Se({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:xe,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||F(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Ue(["ariaLabel"]),inputmode:{type:ae(String),default:void 0}}),ft={[Ne]:(e,l)=>l!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[D]:e=>F(e)||de(e),[O]:e=>F(e)||de(e)},vt=te({name:"ElInputNumber"}),bt=te({...vt,props:mt,emits:ft,setup(e,{expose:l,emit:o}){const a=e,{t:m}=Ke(),d=Ee("input-number"),u=ee(),i=Ce({currentValue:a.modelValue,userInput:null}),{formItem:V}=Ge(),v=y(()=>F(a.modelValue)&&a.modelValue<=a.min),w=y(()=>F(a.modelValue)&&a.modelValue>=a.max),f=y(()=>{const n=$(a.step);return ve(a.precision)?Math.max($(a.modelValue),n):(n>a.precision,a.precision)}),k=y(()=>a.controls&&a.controlsPosition==="right"),R=Xe(),z=Je(),A=y(()=>{if(i.userInput!==null)return i.userInput;let n=i.currentValue;if(de(n))return"";if(F(n)){if(Number.isNaN(n))return"";ve(a.precision)||(n=n.toFixed(a.precision))}return n}),T=(n,r)=>{if(ve(r)&&(r=f.value),r===0)return Math.round(n);let c=String(n);const p=c.indexOf(".");if(p===-1||!c.replace(".","").split("")[p+r])return n;const x=c.length;return c.charAt(x-1)==="5"&&(c=`${c.slice(0,Math.max(0,x-1))}6`),Number.parseFloat(Number(c).toFixed(r))},$=n=>{if(de(n))return 0;const r=n.toString(),c=r.indexOf(".");let p=0;return c!==-1&&(p=r.length-c-1),p},I=(n,r=1)=>F(n)?n>=Number.MAX_SAFE_INTEGER&&r===1||n<=Number.MIN_SAFE_INTEGER&&r===-1?n:T(n+a.step*r):i.currentValue,K=()=>{if(a.readonly||z.value||w.value)return;const n=Number(A.value)||0,r=I(n);C(r),o(D,i.currentValue),S()},P=()=>{if(a.readonly||z.value||v.value)return;const n=Number(A.value)||0,r=I(n,-1);C(r),o(D,i.currentValue),S()},M=(n,r)=>{const{max:c,min:p,step:h,precision:N,stepStrictly:x,valueOnClear:_}=a;c<p&&Oe("InputNumber","min should not be greater than max.");let s=Number(n);if(de(n)||Number.isNaN(s))return null;if(n===""){if(_===null)return null;s=Ie(_)?{min:p,max:c}[_]:_}return x&&(s=T(Math.round(s/h)*h,N),s!==n&&r&&o(O,s)),ve(N)||(s=T(s,N)),(s>c||s<p)&&(s=s>c?c:p,r&&o(O,s)),s},C=(n,r=!0)=>{var c;const p=i.currentValue,h=M(n);if(!r){o(O,h);return}p===h&&n||(i.userInput=null,o(O,h),p!==h&&o(Ne,h,p),a.validateEvent&&((c=V?.validate)==null||c.call(V,"change").catch(N=>ye())),i.currentValue=h)},G=n=>{i.userInput=n;const r=n===""?null:Number(n);o(D,r),C(r,!1)},ne=n=>{const r=n!==""?Number(n):"";(F(r)&&!Number.isNaN(r)||n==="")&&C(r),S(),i.userInput=null},j=()=>{var n,r;(r=(n=u.value)==null?void 0:n.focus)==null||r.call(n)},W=()=>{var n,r;(r=(n=u.value)==null?void 0:n.blur)==null||r.call(n)},H=n=>{o("focus",n)},b=n=>{var r,c;i.userInput=null,i.currentValue===null&&((r=u.value)!=null&&r.input)&&(u.value.input.value=""),o("blur",n),a.validateEvent&&((c=V?.validate)==null||c.call(V,"blur").catch(p=>ye()))},S=()=>{i.currentValue!==a.modelValue&&(i.currentValue=a.modelValue)},L=n=>{document.activeElement===n.target&&n.preventDefault()};return ce(()=>a.modelValue,(n,r)=>{const c=M(n,!0);i.userInput===null&&c!==r&&(i.currentValue=c)},{immediate:!0}),Ye(()=>{var n;const{min:r,max:c,modelValue:p}=a,h=(n=u.value)==null?void 0:n.input;if(h.setAttribute("role","spinbutton"),Number.isFinite(c)?h.setAttribute("aria-valuemax",String(c)):h.removeAttribute("aria-valuemax"),Number.isFinite(r)?h.setAttribute("aria-valuemin",String(r)):h.removeAttribute("aria-valuemin"),h.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),h.setAttribute("aria-disabled",String(z.value)),!F(p)&&p!=null){let N=Number(p);Number.isNaN(N)&&(N=null),o(O,N)}h.addEventListener("wheel",L,{passive:!1})}),qe(()=>{var n,r;const c=(n=u.value)==null?void 0:n.input;c?.setAttribute("aria-valuenow",`${(r=i.currentValue)!=null?r:""}`)}),l({focus:j,blur:W}),(n,r)=>(B(),X("div",{class:Y([t(d).b(),t(d).m(t(R)),t(d).is("disabled",t(z)),t(d).is("without-controls",!n.controls),t(d).is("controls-right",t(k))]),onDragstart:he(()=>{},["prevent"])},[n.controls?Fe((B(),X("span",{key:0,role:"button","aria-label":t(m)("el.inputNumber.decrease"),class:Y([t(d).e("decrease"),t(d).is("disabled",t(v))]),onKeydown:be(P,["enter"])},[ge(n.$slots,"decrease-icon",{},()=>[me(t(ze),null,{default:oe(()=>[t(k)?(B(),Z(t(Qe),{key:0})):(B(),Z(t(Ze),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(Re),P]]):re("v-if",!0),n.controls?Fe((B(),X("span",{key:1,role:"button","aria-label":t(m)("el.inputNumber.increase"),class:Y([t(d).e("increase"),t(d).is("disabled",t(w))]),onKeydown:be(K,["enter"])},[ge(n.$slots,"increase-icon",{},()=>[me(t(ze),null,{default:oe(()=>[t(k)?(B(),Z(t(De),{key:0})):(B(),Z(t(et),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[t(Re),K]]):re("v-if",!0),me(t(st),{id:n.id,ref_key:"input",ref:u,type:"number",step:n.step,"model-value":t(A),placeholder:n.placeholder,readonly:n.readonly,disabled:t(z),size:t(R),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,inputmode:n.inputmode,onKeydown:[be(he(K,["prevent"]),["up"]),be(he(P,["prevent"]),["down"])],onBlur:b,onFocus:H,onInput:G,onChange:ne},tt({_:2},[n.$slots.prefix?{name:"prefix",fn:oe(()=>[ge(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:oe(()=>[ge(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode","onKeydown"])],42,["onDragstart"]))}});var gt=Me(bt,[["__file","input-number.vue"]]);const Vt=We(gt),He=Symbol("sliderContextKey"),ht=Se({modelValue:{type:ae([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:xe,inputSize:xe,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:ae(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:ae(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:je,default:"top"},marks:{type:ae(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Ue(["ariaLabel"])}),Be=e=>F(e)||fe(e)&&e.every(F),yt={[O]:Be,[D]:Be,[Ne]:Be},wt=Se({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:je,default:"top"}}),pt={[O]:e=>F(e)},St=(e,l,o)=>{const a=ee(),m=ee(!1),d=y(()=>l.value instanceof Function),u=y(()=>d.value&&l.value(e.modelValue)||e.modelValue),i=Ae(()=>{o.value&&(m.value=!0)},50),V=Ae(()=>{o.value&&(m.value=!1)},50);return{tooltip:a,tooltipVisible:m,formatValue:u,displayTooltip:i,hideTooltip:V}},Nt=(e,l,o)=>{const{disabled:a,min:m,max:d,step:u,showTooltip:i,persistent:V,precision:v,sliderSize:w,formatTooltip:f,emitChange:k,resetSize:R,updateDragging:z}=nt(He),{tooltip:A,tooltipVisible:T,formatValue:$,displayTooltip:I,hideTooltip:K}=St(e,f,i),P=ee(),M=y(()=>`${(e.modelValue-m.value)/(d.value-m.value)*100}%`),C=y(()=>e.vertical?{bottom:M.value}:{left:M.value}),G=()=>{l.hovering=!0,I()},ne=()=>{l.hovering=!1,l.dragging||K()},j=s=>{a.value||(s.preventDefault(),h(s),window.addEventListener("mousemove",N),window.addEventListener("touchmove",N),window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("contextmenu",x),P.value.focus())},W=s=>{a.value||(l.newPosition=Number.parseFloat(M.value)+s/(d.value-m.value)*100,_(l.newPosition),k())},H=()=>{W(-u.value)},b=()=>{W(u.value)},S=()=>{W(-u.value*4)},L=()=>{W(u.value*4)},n=()=>{a.value||(_(0),k())},r=()=>{a.value||(_(100),k())},c=s=>{let E=!0;switch(s.code){case q.left:case q.down:H();break;case q.right:case q.up:b();break;case q.home:n();break;case q.end:r();break;case q.pageDown:S();break;case q.pageUp:L();break;default:E=!1;break}E&&s.preventDefault()},p=s=>{let E,U;return s.type.startsWith("touch")?(U=s.touches[0].clientY,E=s.touches[0].clientX):(U=s.clientY,E=s.clientX),{clientX:E,clientY:U}},h=s=>{l.dragging=!0,l.isClick=!0;const{clientX:E,clientY:U}=p(s);e.vertical?l.startY=U:l.startX=E,l.startPosition=Number.parseFloat(M.value),l.newPosition=l.startPosition},N=s=>{if(l.dragging){l.isClick=!1,I(),R();let E;const{clientX:U,clientY:J}=p(s);e.vertical?(l.currentY=J,E=(l.startY-l.currentY)/w.value*100):(l.currentX=U,E=(l.currentX-l.startX)/w.value*100),l.newPosition=l.startPosition+E,_(l.newPosition)}},x=()=>{l.dragging&&(setTimeout(()=>{l.dragging=!1,l.hovering||K(),l.isClick||_(l.newPosition),k()},0),window.removeEventListener("mousemove",N),window.removeEventListener("touchmove",N),window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("contextmenu",x))},_=async s=>{if(s===null||Number.isNaN(+s))return;s<0?s=0:s>100&&(s=100);const E=100/((d.value-m.value)/u.value);let J=Math.round(s/E)*E*(d.value-m.value)*.01+m.value;J=Number.parseFloat(J.toFixed(v.value)),J!==e.modelValue&&o(O,J),!l.dragging&&e.modelValue!==l.oldValue&&(l.oldValue=e.modelValue),await we(),l.dragging&&I(),A.value.updatePopper()};return ce(()=>l.dragging,s=>{z(s)}),pe(P,"touchstart",j,{passive:!1}),{disabled:a,button:P,tooltip:A,tooltipVisible:T,showTooltip:i,persistent:V,wrapperStyle:C,formatValue:$,handleMouseEnter:G,handleMouseLeave:ne,onButtonDown:j,onKeyDown:c,setPosition:_}},Et=te({name:"ElSliderButton"}),kt=te({...Et,props:wt,emits:pt,setup(e,{expose:l,emit:o}){const a=e,m=Ee("slider"),d=Ce({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),u=y(()=>w.value?f.value:!1),{disabled:i,button:V,tooltip:v,showTooltip:w,persistent:f,tooltipVisible:k,wrapperStyle:R,formatValue:z,handleMouseEnter:A,handleMouseLeave:T,onButtonDown:$,onKeyDown:I,setPosition:K}=Nt(a,d,o),{hovering:P,dragging:M}=Pe(d);return l({onButtonDown:$,onKeyDown:I,setPosition:K,hovering:P,dragging:M}),(C,G)=>(B(),X("div",{ref_key:"button",ref:V,class:Y([t(m).e("button-wrapper"),{hover:t(P),dragging:t(M)}]),style:le(t(R)),tabindex:t(i)?-1:0,onMouseenter:t(A),onMouseleave:t(T),onMousedown:t($),onFocus:t(A),onBlur:t(T),onKeydown:t(I)},[me(t(it),{ref_key:"tooltip",ref:v,visible:t(k),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!t(w),persistent:t(u)},{content:oe(()=>[se("span",null,lt(t(z)),1)]),default:oe(()=>[se("div",{class:Y([t(m).e("button"),{hover:t(P),dragging:t(M)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var $e=Me(kt,[["__file","button.vue"]]);const Bt=Se({mark:{type:ae([String,Object]),default:void 0}});var xt=te({name:"ElSliderMarker",props:Bt,setup(e){const l=Ee("slider"),o=y(()=>Ie(e.mark)?e.mark:e.mark.label),a=y(()=>Ie(e.mark)?void 0:e.mark.style);return()=>at("div",{class:l.e("marks-text"),style:a.value},o.value)}});const It=(e,l,o)=>{const{form:a,formItem:m}=Ge(),d=rt(),u=ee(),i=ee(),V={firstButton:u,secondButton:i},v=y(()=>e.disabled||a?.disabled||!1),w=y(()=>Math.min(l.firstValue,l.secondValue)),f=y(()=>Math.max(l.firstValue,l.secondValue)),k=y(()=>e.range?`${100*(f.value-w.value)/(e.max-e.min)}%`:`${100*(l.firstValue-e.min)/(e.max-e.min)}%`),R=y(()=>e.range?`${100*(w.value-e.min)/(e.max-e.min)}%`:"0%"),z=y(()=>e.vertical?{height:e.height}:{}),A=y(()=>e.vertical?{height:k.value,bottom:R.value}:{width:k.value,left:R.value}),T=()=>{d.value&&(l.sliderSize=d.value[`client${e.vertical?"Height":"Width"}`])},$=b=>{const S=e.min+b*(e.max-e.min)/100;if(!e.range)return u;let L;return Math.abs(w.value-S)<Math.abs(f.value-S)?L=l.firstValue<l.secondValue?"firstButton":"secondButton":L=l.firstValue>l.secondValue?"firstButton":"secondButton",V[L]},I=b=>{const S=$(b);return S.value.setPosition(b),S},K=b=>{l.firstValue=b??e.min,M(e.range?[w.value,f.value]:b??e.min)},P=b=>{l.secondValue=b,e.range&&M([w.value,f.value])},M=b=>{o(O,b),o(D,b)},C=async()=>{await we(),o(Ne,e.range?[w.value,f.value]:e.modelValue)},G=b=>{var S,L,n,r,c,p;if(v.value||l.dragging)return;T();let h=0;if(e.vertical){const N=(n=(L=(S=b.touches)==null?void 0:S.item(0))==null?void 0:L.clientY)!=null?n:b.clientY;h=(d.value.getBoundingClientRect().bottom-N)/l.sliderSize*100}else{const N=(p=(c=(r=b.touches)==null?void 0:r.item(0))==null?void 0:c.clientX)!=null?p:b.clientX,x=d.value.getBoundingClientRect().left;h=(N-x)/l.sliderSize*100}if(!(h<0||h>100))return I(h)};return{elFormItem:m,slider:d,firstButton:u,secondButton:i,sliderDisabled:v,minValue:w,maxValue:f,runwayStyle:z,barStyle:A,resetSize:T,setPosition:I,emitChange:C,onSliderWrapperPrevent:b=>{var S,L;((S=V.firstButton.value)!=null&&S.dragging||(L=V.secondButton.value)!=null&&L.dragging)&&b.preventDefault()},onSliderClick:b=>{G(b)&&C()},onSliderDown:async b=>{const S=G(b);S&&(await we(),S.value.onButtonDown(b))},onSliderMarkerDown:b=>{if(v.value||l.dragging)return;I(b)&&C()},setFirstValue:K,setSecondValue:P}},Pt=(e,l,o,a)=>({stops:y(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const u=(e.max-e.min)/e.step,i=100*e.step/(e.max-e.min),V=Array.from({length:u-1}).map((v,w)=>(w+1)*i);return e.range?V.filter(v=>v<100*(o.value-e.min)/(e.max-e.min)||v>100*(a.value-e.min)/(e.max-e.min)):V.filter(v=>v>100*(l.firstValue-e.min)/(e.max-e.min))}),getStopStyle:u=>e.vertical?{bottom:`${u}%`}:{left:`${u}%`}}),Mt=e=>y(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((o,a)=>o-a).filter(o=>o<=e.max&&o>=e.min).map(o=>({point:o,position:(o-e.min)*100/(e.max-e.min),mark:e.marks[o]})):[]),Ct=(e,l,o,a,m,d)=>{const u=v=>{m(O,v),m(D,v)},i=()=>e.range?![o.value,a.value].every((v,w)=>v===l.oldValue[w]):e.modelValue!==l.oldValue,V=()=>{var v,w;e.min>e.max&&Oe("Slider","min should not be greater than max.");const f=e.modelValue;e.range&&fe(f)?f[1]<e.min?u([e.min,e.min]):f[0]>e.max?u([e.max,e.max]):f[0]<e.min?u([e.min,f[1]]):f[1]>e.max?u([f[0],e.max]):(l.firstValue=f[0],l.secondValue=f[1],i()&&(e.validateEvent&&((v=d?.validate)==null||v.call(d,"change").catch(k=>ye())),l.oldValue=f.slice())):!e.range&&F(f)&&!Number.isNaN(f)&&(f<e.min?u(e.min):f>e.max?u(e.max):(l.firstValue=f,i()&&(e.validateEvent&&((w=d?.validate)==null||w.call(d,"change").catch(k=>ye())),l.oldValue=f)))};V(),ce(()=>l.dragging,v=>{v||V()}),ce(()=>e.modelValue,(v,w)=>{l.dragging||fe(v)&&fe(w)&&v.every((f,k)=>f===w[k])&&l.firstValue===v[0]&&l.secondValue===v[1]||V()},{deep:!0}),ce(()=>[e.min,e.max],()=>{V()})},Lt=(e,l,o)=>{const a=ee();return Ye(async()=>{e.range?(fe(e.modelValue)?(l.firstValue=Math.max(e.min,e.modelValue[0]),l.secondValue=Math.min(e.max,e.modelValue[1])):(l.firstValue=e.min,l.secondValue=e.max),l.oldValue=[l.firstValue,l.secondValue]):(!F(e.modelValue)||Number.isNaN(e.modelValue)?l.firstValue=e.min:l.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),l.oldValue=l.firstValue),pe(window,"resize",o),await we(),o()}),{sliderWrapper:a}},_t=te({name:"ElSlider"}),Tt=te({..._t,props:ht,emits:yt,setup(e,{expose:l,emit:o}){const a=e,m=Ee("slider"),{t:d}=Ke(),u=Ce({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:i,slider:V,firstButton:v,secondButton:w,sliderDisabled:f,minValue:k,maxValue:R,runwayStyle:z,barStyle:A,resetSize:T,emitChange:$,onSliderWrapperPrevent:I,onSliderClick:K,onSliderDown:P,onSliderMarkerDown:M,setFirstValue:C,setSecondValue:G}=It(a,u,o),{stops:ne,getStopStyle:j}=Pt(a,u,k,R),{inputId:W,isLabeledByFormItem:H}=ut(a,{formItemContext:i}),b=Xe(),S=y(()=>a.inputSize||b.value),L=y(()=>a.ariaLabel||d("el.slider.defaultLabel",{min:a.min,max:a.max})),n=y(()=>a.range?a.rangeStartLabel||d("el.slider.defaultRangeStartLabel"):L.value),r=y(()=>a.formatValueText?a.formatValueText(s.value):`${s.value}`),c=y(()=>a.rangeEndLabel||d("el.slider.defaultRangeEndLabel")),p=y(()=>a.formatValueText?a.formatValueText(E.value):`${E.value}`),h=y(()=>[m.b(),m.m(b.value),m.is("vertical",a.vertical),{[m.m("with-input")]:a.showInput}]),N=Mt(a);Ct(a,u,k,R,o,i);const x=y(()=>{const g=[a.min,a.max,a.step].map(Le=>{const ue=`${Le}`.split(".")[1];return ue?ue.length:0});return Math.max.apply(null,g)}),{sliderWrapper:_}=Lt(a,u,T),{firstValue:s,secondValue:E,sliderSize:U}=Pe(u),J=g=>{u.dragging=g};return pe(_,"touchstart",I,{passive:!1}),pe(_,"touchmove",I,{passive:!1}),ot(He,{...Pe(a),sliderSize:U,disabled:f,precision:x,emitChange:$,resetSize:T,updateDragging:J}),l({onSliderClick:K}),(g,Le)=>{var ue,_e;return B(),X("div",{id:g.range?t(W):void 0,ref_key:"sliderWrapper",ref:_,class:Y(t(h)),role:g.range?"group":void 0,"aria-label":g.range&&!t(H)?t(L):void 0,"aria-labelledby":g.range&&t(H)?(ue=t(i))==null?void 0:ue.labelId:void 0},[se("div",{ref_key:"slider",ref:V,class:Y([t(m).e("runway"),{"show-input":g.showInput&&!g.range},t(m).is("disabled",t(f))]),style:le(t(z)),onMousedown:t(P),onTouchstartPassive:t(P)},[se("div",{class:Y(t(m).e("bar")),style:le(t(A))},null,6),me($e,{id:g.range?void 0:t(W),ref_key:"firstButton",ref:v,"model-value":t(s),vertical:g.vertical,"tooltip-class":g.tooltipClass,placement:g.placement,role:"slider","aria-label":g.range||!t(H)?t(n):void 0,"aria-labelledby":!g.range&&t(H)?(_e=t(i))==null?void 0:_e.labelId:void 0,"aria-valuemin":g.min,"aria-valuemax":g.range?t(E):g.max,"aria-valuenow":t(s),"aria-valuetext":t(r),"aria-orientation":g.vertical?"vertical":"horizontal","aria-disabled":t(f),"onUpdate:modelValue":t(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),g.range?(B(),Z($e,{key:0,ref_key:"secondButton",ref:w,"model-value":t(E),vertical:g.vertical,"tooltip-class":g.tooltipClass,placement:g.placement,role:"slider","aria-label":t(c),"aria-valuemin":t(s),"aria-valuemax":g.max,"aria-valuenow":t(E),"aria-valuetext":t(p),"aria-orientation":g.vertical?"vertical":"horizontal","aria-disabled":t(f),"onUpdate:modelValue":t(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):re("v-if",!0),g.showStops?(B(),X("div",{key:1},[(B(!0),X(Ve,null,ke(t(ne),(Q,ie)=>(B(),X("div",{key:ie,class:Y(t(m).e("stop")),style:le(t(j)(Q))},null,6))),128))])):re("v-if",!0),t(N).length>0?(B(),X(Ve,{key:2},[se("div",null,[(B(!0),X(Ve,null,ke(t(N),(Q,ie)=>(B(),X("div",{key:ie,style:le(t(j)(Q.position)),class:Y([t(m).e("stop"),t(m).e("marks-stop")])},null,6))),128))]),se("div",{class:Y(t(m).e("marks"))},[(B(!0),X(Ve,null,ke(t(N),(Q,ie)=>(B(),Z(t(xt),{key:ie,mark:Q.mark,style:le(t(j)(Q.position)),onMousedown:he(zt=>t(M)(Q.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):re("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),g.showInput&&!g.range?(B(),Z(t(Vt),{key:0,ref:"input","model-value":t(s),class:Y(t(m).e("input")),step:g.step,disabled:t(f),controls:g.showInputControls,min:g.min,max:g.max,precision:t(x),debounce:g.debounce,size:t(S),"onUpdate:modelValue":t(C),onChange:t($)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):re("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var Ft=Me(Tt,[["__file","slider.vue"]]);const Wt=We(Ft);export{Vt as E,Wt as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Callback-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Callback-Db9TLfvk.js","assets/Callback-BOWlkJeC.css","assets/Console-CaAxK4dC.js","assets/Navigator-DOMCMM13.js","assets/index.es-BsYSuHZG.js","assets/index-DMG8nVoz.js","assets/index-BmgQ_NQh.js","assets/use-form-item-BkhNVF1L.js","assets/index-r5W6hzzQ.js","assets/index-j_uZdGZu.js","assets/index-BgfnKNJP.js","assets/typescript-CbXledGi.js","assets/index-DPFYPrCl.js","assets/dropdown-CyzwdvpU.js","assets/castArray-CLbvN5vw.js","assets/EditArray-CcxENZ7T.js","assets/index-Cq4RGvYP.js","assets/index-B7HazlRJ.js","assets/index-D1EIYSXf.js","assets/index-DLCeq8hw.js","assets/_baseClone-D_93k3Nh.js","assets/_initCloneObject-DsSkRlN-.js","assets/isEqual-B9PwPc7o.js","assets/index-DYpr8bba.js","assets/EditArray--cNGtcL5.css","assets/index-BZvTkoKU.js","assets/index-xoO8OtTi.js","assets/debounce-CMDuVRq1.js","assets/index-DUOh2FeK.js","assets/index-lxs5nKhi.js","assets/index-DY15pjGM.js","assets/index-B1GAOpEG.js","assets/Navigator-C3rJMxVO.css","assets/Console-CtzDEiv9.css","assets/List-D_iJT2xh.js","assets/order-CdFDtwyf.js","assets/Pagination-BlPseRXs.js","assets/index-CBuIppwi.js","assets/strings-C6Jtkx-3.js","assets/_baseIteratee-Bl2-nnv8.js","assets/Pagination-CnOUH4Ut.css","assets/CopyToClipboard-B3Q4IyIz.js","assets/CopyToClipboard-D6Bl8XZW.css","assets/order-CWHwECRB.js","assets/price-Dp6mCDrl.js","assets/index-BCVtyh6P.js","assets/index-BvHSWWkQ.js","assets/isPlainObject-k9dsakNF.js","assets/index-DSYaReFV.js","assets/Detail-Chm7HvSn.js","assets/index-D7te_1LX.js","assets/index-Pja6Zfr2.js","assets/Detail-B7sD3rtq.css","assets/List-CmFjwdxk.js","assets/credential-DWyZQ5lE.js","assets/Extra-9TF3vLJR.js","assets/api-Ch0ZHArw.js","assets/index-AaF22A50.js","assets/Extra-BWQZ0rxR.css","assets/Subscribe-D27qe_Al.js","assets/Subscribe-CRhapGtL.css","assets/List-BIveMp_L.js","assets/Main-BEJjlnb0.js","assets/Status-B97vIuh1.js","assets/Status-61u7CQ2x.css","assets/Main-CqaRC_rT.css","assets/Conversation-ClFlw8TE.js","assets/FilePreview-zNTcfzGK.js","assets/ImagePreview-BO7_kBZK.js","assets/index-Bmb96AgG.js","assets/Conversation-CjRJo_oi.css","assets/Index-hNY2A0bX.js","assets/InfoIcon-C9zLZXFd.js","assets/index-CyE0uqPN.js","assets/VideoPlayer-61Cqj9GH.js","assets/vue-plyr-QZFBikSk.js","assets/vue-plyr-BqJN4-Iw.css","assets/index-BnQDLfw9.js","assets/NoTasks-DDRgjaNt.js","assets/ImageWrapper-DDgrcUpN.js","assets/ImageWrapper-DEadO_7m.css","assets/BotPlaceholder-DLd3-O4U.js","assets/Index-iMvcjizb.css","assets/Index-utCtwoZl.js","assets/distribution-giSwFM-4.js","assets/Index-cOOQ1_jY.css","assets/History-BaKAOzuz.js","assets/History-DCa2CRRX.css","assets/Invitees-PMwtb0_0.js","assets/Invitees-G_3SLFJA.css","assets/Index-CcqrQ9xY.js","assets/Index-BIleXhAP.css","assets/Index-CvfVAnPP.js","assets/Index-Cmh5PQ4o.css","assets/Index-BOSTKYkU.js","assets/Index-CKGUdObo.css","assets/Index-D7dWH8D1.js","assets/Index-CPRjinBb.css","assets/Index-BurCaFfA.js","assets/Index-DNIkVrSE.css","assets/Index-CZm4gDp_.js","assets/Index-dIHinIPb.css","assets/Index-5df8lDfZ.js","assets/Index-Und3gfGe.css","assets/Index-CT4KTGwv.js","assets/Index-BudoEJZI.css","assets/Index-dOcJKd6H.js","assets/Index-BPXoskz4.css","assets/Index-dcEeVAMq.js","assets/index-Ci6PT3RL.js","assets/Index-DQe4G4cg.css","assets/Index-jL9vh1vt.js","assets/Index-3hzmS3eW.css","assets/Index-BWtMiqll.js","assets/Index-CZVUVmvo.css","assets/Index-WDCakEnG.js","assets/Index-PQerfBmJ.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
|
|
3
3
|
* @vue/shared v3.5.18
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -64,7 +64,7 @@ Minimum version required to store current data is: `+R+`.
|
|
|
64
64
|
* vue-router v4.5.1
|
|
65
65
|
* (c) 2025 Eduardo San Martin Morote
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/const mo=typeof document<"u";function xb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function o$(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xb(e.default)}const He=Object.assign;function cu(e,t){const n={};for(const a in t){const o=t[a];n[a]=fn(o)?o.map(e):e(o)}return n}const mr=()=>{},fn=Array.isArray,zb=/#/g,r$=/&/g,s$=/\//g,i$=/=/g,c$=/\?/g,Db=/\+/g,l$=/%5B/g,u$=/%5D/g,Nb=/%5E/g,p$=/%60/g,Mb=/%7B/g,d$=/%7C/g,$b=/%7D/g,f$=/%20/g;function Zd(e){return encodeURI(""+e).replace(d$,"|").replace(l$,"[").replace(u$,"]")}function m$(e){return Zd(e).replace(Mb,"{").replace($b,"}").replace(Nb,"^")}function cp(e){return Zd(e).replace(Db,"%2B").replace(f$,"+").replace(zb,"%23").replace(r$,"%26").replace(p$,"`").replace(Mb,"{").replace($b,"}").replace(Nb,"^")}function h$(e){return cp(e).replace(i$,"%3D")}function g$(e){return Zd(e).replace(zb,"%23").replace(c$,"%3F")}function v$(e){return e==null?"":g$(e).replace(s$,"%2F")}function Mr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const _$=/\/$/,y$=e=>e.replace(_$,"");function lu(e,t,n="/"){let a,o={},r="",s="";const i=t.indexOf("#");let c=t.indexOf("?");return i<c&&i>=0&&(c=-1),c>-1&&(a=t.slice(0,c),r=t.slice(c+1,i>-1?i:t.length),o=e(r)),i>-1&&(a=a||t.slice(0,i),s=t.slice(i,t.length)),a=j$(a??t,n),{fullPath:a+(r&&"?")+r+s,path:a,query:o,hash:Mr(s)}}function b$(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function R0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function k$(e,t,n){const a=t.matched.length-1,o=n.matched.length-1;return a>-1&&a===o&&Po(t.matched[a],n.matched[o])&&Vb(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Po(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!w$(e[n],t[n]))return!1;return!0}function w$(e,t){return fn(e)?C0(e,t):fn(t)?C0(t,e):e===t}function C0(e,t){return fn(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function j$(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),o=a[a.length-1];(o===".."||o===".")&&a.push("");let r=n.length-1,s,i;for(s=0;s<a.length;s++)if(i=a[s],i!==".")if(i==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+a.slice(s).join("/")}const oa={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var $r;(function(e){e.pop="pop",e.push="push"})($r||($r={}));var hr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(hr||(hr={}));function E$(e){if(!e)if(mo){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),y$(e)}const A$=/^[^#]+#/;function T$(e,t){return e.replace(A$,"#")+t}function O$(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const oc=()=>({left:window.scrollX,top:window.scrollY});function L$(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=O$(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function P0(e,t){return(history.state?history.state.position-t:-1)+e}const lp=new Map;function S$(e,t){lp.set(e,t)}function I$(e){const t=lp.get(e);return lp.delete(e),t}let R$=()=>location.protocol+"//"+location.host;function Fb(e,t){const{pathname:n,search:a,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(i);return c[0]!=="/"&&(c="/"+c),R0(c,"")}return R0(n,e)+a+o}function C$(e,t,n,a){let o=[],r=[],s=null;const i=({state:d})=>{const f=Fb(e,location),h=n.value,v=t.value;let _=0;if(d){if(n.value=f,t.value=d,s&&s===h){s=null;return}_=v?d.position-v.position:0}else a(f);o.forEach(g=>{g(n.value,h,{delta:_,type:$r.pop,direction:_?_>0?hr.forward:hr.back:hr.unknown})})};function c(){s=n.value}function l(d){o.push(d);const f=()=>{const h=o.indexOf(d);h>-1&&o.splice(h,1)};return r.push(f),f}function u(){const{history:d}=window;d.state&&d.replaceState(He({},d.state,{scroll:oc()}),"")}function p(){for(const d of r)d();r=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:l,destroy:p}}function x0(e,t,n,a=!1,o=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:o?oc():null}}function P$(e){const{history:t,location:n}=window,a={value:Fb(e,n)},o={value:t.state};o.value||r(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,l,u){const p=e.indexOf("#"),d=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+c:R$()+e+c;try{t[u?"replaceState":"pushState"](l,"",d),o.value=l}catch(f){console.error(f),n[u?"replace":"assign"](d)}}function s(c,l){const u=He({},t.state,x0(o.value.back,c,o.value.forward,!0),l,{position:o.value.position});r(c,u,!0),a.value=c}function i(c,l){const u=He({},o.value,t.state,{forward:c,scroll:oc()});r(u.current,u,!0);const p=He({},x0(a.value,c,null),{position:u.position+1},l);r(c,p,!1),a.value=c}return{location:a,state:o,push:i,replace:s}}function x$(e){e=E$(e);const t=P$(e),n=C$(e,t.state,t.location,t.replace);function a(r,s=!0){s||n.pauseListeners(),history.go(r)}const o=He({location:"",base:e,go:a,createHref:T$.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function z$(e){return typeof e=="string"||e&&typeof e=="object"}function Ub(e){return typeof e=="string"||typeof e=="symbol"}const Bb=Symbol("");var z0;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(z0||(z0={}));function xo(e,t){return He(new Error,{type:e,[Bb]:!0},t)}function Dn(e,t){return e instanceof Error&&Bb in e&&(t==null||!!(e.type&t))}const D0="[^/]+?",D$={sensitive:!1,strict:!1,start:!0,end:!0},N$=/[.+*?^${}()[\]/\\]/g;function M$(e,t){const n=He({},D$,t),a=[];let o=n.start?"^":"";const r=[];for(const l of e){const u=l.length?[]:[90];n.strict&&!l.length&&(o+="/");for(let p=0;p<l.length;p++){const d=l[p];let f=40+(n.sensitive?.25:0);if(d.type===0)p||(o+="/"),o+=d.value.replace(N$,"\\$&"),f+=40;else if(d.type===1){const{value:h,repeatable:v,optional:_,regexp:g}=d;r.push({name:h,repeatable:v,optional:_});const y=g||D0;if(y!==D0){f+=10;try{new RegExp(`(${y})`)}catch(b){throw new Error(`Invalid custom RegExp for param "${h}" (${y}): `+b.message)}}let k=v?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;p||(k=_&&l.length<2?`(?:/${k})`:"/"+k),_&&(k+="?"),o+=k,f+=20,_&&(f+=-8),v&&(f+=-20),y===".*"&&(f+=-50)}u.push(f)}a.push(u)}if(n.strict&&n.end){const l=a.length-1;a[l][a[l].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const s=new RegExp(o,n.sensitive?"":"i");function i(l){const u=l.match(s),p={};if(!u)return null;for(let d=1;d<u.length;d++){const f=u[d]||"",h=r[d-1];p[h.name]=f&&h.repeatable?f.split("/"):f}return p}function c(l){let u="",p=!1;for(const d of e){(!p||!u.endsWith("/"))&&(u+="/"),p=!1;for(const f of d)if(f.type===0)u+=f.value;else if(f.type===1){const{value:h,repeatable:v,optional:_}=f,g=h in l?l[h]:"";if(fn(g)&&!v)throw new Error(`Provided param "${h}" is an array but it is not repeatable (* or + modifiers)`);const y=fn(g)?g.join("/"):g;if(!y)if(_)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):p=!0);else throw new Error(`Missing required param "${h}"`);u+=y}}return u||"/"}return{re:s,score:a,keys:r,parse:i,stringify:c}}function $$(e,t){let n=0;for(;n<e.length&&n<t.length;){const a=t[n]-e[n];if(a)return a;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Hb(e,t){let n=0;const a=e.score,o=t.score;for(;n<a.length&&n<o.length;){const r=$$(a[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-a.length)===1){if(N0(a))return 1;if(N0(o))return-1}return o.length-a.length}function N0(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const V$={type:0,value:""},F$=/[a-zA-Z0-9_]/;function U$(e){if(!e)return[[]];if(e==="/")return[[V$]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${l}": ${f}`)}let n=0,a=n;const o=[];let r;function s(){r&&o.push(r),r=[]}let i=0,c,l="",u="";function p(){l&&(n===0?r.push({type:0,value:l}):n===1||n===2||n===3?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:l,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),l="")}function d(){l+=c}for(;i<e.length;){if(c=e[i++],c==="\\"&&n!==2){a=n,n=4;continue}switch(n){case 0:c==="/"?(l&&p(),s()):c===":"?(p(),n=1):d();break;case 4:d(),n=a;break;case 1:c==="("?n=2:F$.test(c)?d():(p(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--);break;case 2:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:p(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),p(),s(),o}function B$(e,t,n){const a=M$(U$(e.path),n),o=He(a,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function H$(e,t){const n=[],a=new Map;t=F0({strict:!1,end:!0,sensitive:!1},t);function o(p){return a.get(p)}function r(p,d,f){const h=!f,v=$0(p);v.aliasOf=f&&f.record;const _=F0(t,p),g=[v];if("alias"in p){const b=typeof p.alias=="string"?[p.alias]:p.alias;for(const O of b)g.push($0(He({},v,{components:f?f.record.components:v.components,path:O,aliasOf:f?f.record:v})))}let y,k;for(const b of g){const{path:O}=b;if(d&&O[0]!=="/"){const A=d.record.path,T=A[A.length-1]==="/"?"":"/";b.path=d.record.path+(O&&T+O)}if(y=B$(b,d,_),f?f.alias.push(y):(k=k||y,k!==y&&k.alias.push(y),h&&p.name&&!V0(y)&&s(p.name)),qb(y)&&c(y),v.children){const A=v.children;for(let T=0;T<A.length;T++)r(A[T],y,f&&f.children[T])}f=f||y}return k?()=>{s(k)}:mr}function s(p){if(Ub(p)){const d=a.get(p);d&&(a.delete(p),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(p);d>-1&&(n.splice(d,1),p.record.name&&a.delete(p.record.name),p.children.forEach(s),p.alias.forEach(s))}}function i(){return n}function c(p){const d=G$(p,n);n.splice(d,0,p),p.record.name&&!V0(p)&&a.set(p.record.name,p)}function l(p,d){let f,h={},v,_;if("name"in p&&p.name){if(f=a.get(p.name),!f)throw xo(1,{location:p});_=f.record.name,h=He(M0(d.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),p.params&&M0(p.params,f.keys.map(k=>k.name))),v=f.stringify(h)}else if(p.path!=null)v=p.path,f=n.find(k=>k.re.test(v)),f&&(h=f.parse(v),_=f.record.name);else{if(f=d.name?a.get(d.name):n.find(k=>k.re.test(d.path)),!f)throw xo(1,{location:p,currentLocation:d});_=f.record.name,h=He({},d.params,p.params),v=f.stringify(h)}const g=[];let y=f;for(;y;)g.unshift(y.record),y=y.parent;return{name:_,path:v,params:h,matched:g,meta:W$(g)}}e.forEach(p=>r(p));function u(){n.length=0,a.clear()}return{addRoute:r,resolve:l,removeRoute:s,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function M0(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function $0(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:q$(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function q$(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function V0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function W$(e){return e.reduce((t,n)=>He(t,n.meta),{})}function F0(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}function G$(e,t){let n=0,a=t.length;for(;n!==a;){const r=n+a>>1;Hb(e,t[r])<0?a=r:n=r+1}const o=Y$(e);return o&&(a=t.lastIndexOf(o,a-1)),a}function Y$(e){let t=e;for(;t=t.parent;)if(qb(t)&&Hb(e,t)===0)return t}function qb({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function K$(e){const t={};if(e===""||e==="?")return t;const a=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<a.length;++o){const r=a[o].replace(Db," "),s=r.indexOf("="),i=Mr(s<0?r:r.slice(0,s)),c=s<0?null:Mr(r.slice(s+1));if(i in t){let l=t[i];fn(l)||(l=t[i]=[l]),l.push(c)}else t[i]=c}return t}function U0(e){let t="";for(let n in e){const a=e[n];if(n=h$(n),a==null){a!==void 0&&(t+=(t.length?"&":"")+n);continue}(fn(a)?a.map(r=>r&&cp(r)):[a&&cp(a)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function X$(e){const t={};for(const n in e){const a=e[n];a!==void 0&&(t[n]=fn(a)?a.map(o=>o==null?null:""+o):a==null?a:""+a)}return t}const J$=Symbol(""),B0=Symbol(""),Qd=Symbol(""),Wb=Symbol(""),up=Symbol("");function Qo(){let e=[];function t(a){return e.push(a),()=>{const o=e.indexOf(a);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function pa(e,t,n,a,o,r=s=>s()){const s=a&&(a.enterCallbacks[o]=a.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const l=d=>{d===!1?c(xo(4,{from:n,to:t})):d instanceof Error?c(d):z$(d)?c(xo(2,{from:t,to:d})):(s&&a.enterCallbacks[o]===s&&typeof d=="function"&&s.push(d),i())},u=r(()=>e.call(a&&a.instances[o],t,n,l));let p=Promise.resolve(u);e.length<3&&(p=p.then(l)),p.catch(d=>c(d))})}function uu(e,t,n,a,o=r=>r()){const r=[];for(const s of e)for(const i in s.components){let c=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(xb(c)){const u=(c.__vccOpts||c)[t];u&&r.push(pa(u,n,a,s,i,o))}else{let l=c();r.push(()=>l.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${s.path}"`);const p=o$(u)?u.default:u;s.mods[i]=u,s.components[i]=p;const f=(p.__vccOpts||p)[t];return f&&pa(f,n,a,s,i,o)()}))}}return r}function H0(e){const t=Qe(Qd),n=Qe(Wb),a=he(()=>{const c=re(e.to);return t.resolve(c)}),o=he(()=>{const{matched:c}=a.value,{length:l}=c,u=c[l-1],p=n.matched;if(!u||!p.length)return-1;const d=p.findIndex(Po.bind(null,u));if(d>-1)return d;const f=q0(c[l-2]);return l>1&&q0(u)===f&&p[p.length-1].path!==f?p.findIndex(Po.bind(null,c[l-2])):d}),r=he(()=>o.value>-1&&nV(n.params,a.value.params)),s=he(()=>o.value>-1&&o.value===n.matched.length-1&&Vb(n.params,a.value.params));function i(c={}){if(tV(c)){const l=t[re(e.replace)?"replace":"push"](re(e.to)).catch(mr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:a,href:he(()=>a.value.href),isActive:r,isExactActive:s,navigate:i}}function Z$(e){return e.length===1?e[0]:e}const Q$=_e({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:H0,setup(e,{slots:t}){const n=In(H0(e)),{options:a}=Qe(Qd),o=he(()=>({[W0(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[W0(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&Z$(t.default(n));return e.custom?r:Dt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),eV=Q$;function tV(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function nV(e,t){for(const n in t){const a=t[n],o=e[n];if(typeof a=="string"){if(a!==o)return!1}else if(!fn(o)||o.length!==a.length||a.some((r,s)=>r!==o[s]))return!1}return!0}function q0(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const W0=(e,t,n)=>e??t??n,aV=_e({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=Qe(up),o=he(()=>e.route||a.value),r=Qe(B0,0),s=he(()=>{let l=re(r);const{matched:u}=o.value;let p;for(;(p=u[l])&&!p.components;)l++;return l}),i=he(()=>o.value.matched[s.value]);Ba(B0,he(()=>s.value+1)),Ba(J$,i),Ba(up,o);const c=ze();return Ve(()=>[c.value,i.value,e.name],([l,u,p],[d,f,h])=>{u&&(u.instances[p]=l,f&&f!==u&&l&&l===d&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),l&&u&&(!f||!Po(u,f)||!d)&&(u.enterCallbacks[p]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=o.value,u=e.name,p=i.value,d=p&&p.components[u];if(!d)return G0(n.default,{Component:d,route:l});const f=p.props[u],h=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=Dt(d,He({},h,t,{onVnodeUnmounted:g=>{g.component.isUnmounted&&(p.instances[u]=null)},ref:c}));return G0(n.default,{Component:_,route:l})||_}}});function G0(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const oV=aV;function rV(e){const t=H$(e.routes,e),n=e.parseQuery||K$,a=e.stringifyQuery||U0,o=e.history,r=Qo(),s=Qo(),i=Qo(),c=qr(oa);let l=oa;mo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=cu.bind(null,B=>""+B),p=cu.bind(null,v$),d=cu.bind(null,Mr);function f(B,ne){let te,Q;return Ub(B)?(te=t.getRecordMatcher(B),Q=ne):Q=B,t.addRoute(Q,te)}function h(B){const ne=t.getRecordMatcher(B);ne&&t.removeRoute(ne)}function v(){return t.getRoutes().map(B=>B.record)}function _(B){return!!t.getRecordMatcher(B)}function g(B,ne){if(ne=He({},ne||c.value),typeof B=="string"){const D=lu(n,B,ne.path),Y=t.resolve({path:D.path},ne),X=o.createHref(D.fullPath);return He(D,Y,{params:d(Y.params),hash:Mr(D.hash),redirectedFrom:void 0,href:X})}let te;if(B.path!=null)te=He({},B,{path:lu(n,B.path,ne.path).path});else{const D=He({},B.params);for(const Y in D)D[Y]==null&&delete D[Y];te=He({},B,{params:p(D)}),ne.params=p(ne.params)}const Q=t.resolve(te,ne),me=B.hash||"";Q.params=u(d(Q.params));const j=b$(a,He({},B,{hash:m$(me),path:Q.path})),L=o.createHref(j);return He({fullPath:j,hash:me,query:a===U0?X$(B.query):B.query||{}},Q,{redirectedFrom:void 0,href:L})}function y(B){return typeof B=="string"?lu(n,B,c.value.path):He({},B)}function k(B,ne){if(l!==B)return xo(8,{from:ne,to:B})}function b(B){return T(B)}function O(B){return b(He(y(B),{replace:!0}))}function A(B){const ne=B.matched[B.matched.length-1];if(ne&&ne.redirect){const{redirect:te}=ne;let Q=typeof te=="function"?te(B):te;return typeof Q=="string"&&(Q=Q.includes("?")||Q.includes("#")?Q=y(Q):{path:Q},Q.params={}),He({query:B.query,hash:B.hash,params:Q.path!=null?{}:B.params},Q)}}function T(B,ne){const te=l=g(B),Q=c.value,me=B.state,j=B.force,L=B.replace===!0,D=A(te);if(D)return T(He(y(D),{state:typeof D=="object"?He({},me,D.state):me,force:j,replace:L}),ne||te);const Y=te;Y.redirectedFrom=ne;let X;return!j&&k$(a,Q,te)&&(X=xo(16,{to:Y,from:Q}),pe(Q,Q,!0,!1)),(X?Promise.resolve(X):S(Y,Q)).catch(K=>Dn(K)?Dn(K,2)?K:ie(K):V(K,Y,Q)).then(K=>{if(K){if(Dn(K,2))return T(He({replace:L},y(K.to),{state:typeof K.to=="object"?He({},me,K.to.state):me,force:j}),ne||Y)}else K=I(Y,Q,!0,L,me);return R(Y,Q,K),K})}function C(B,ne){const te=k(B,ne);return te?Promise.reject(te):Promise.resolve()}function P(B){const ne=Te.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(B):B()}function S(B,ne){let te;const[Q,me,j]=sV(B,ne);te=uu(Q.reverse(),"beforeRouteLeave",B,ne);for(const D of Q)D.leaveGuards.forEach(Y=>{te.push(pa(Y,B,ne))});const L=C.bind(null,B,ne);return te.push(L),Ie(te).then(()=>{te=[];for(const D of r.list())te.push(pa(D,B,ne));return te.push(L),Ie(te)}).then(()=>{te=uu(me,"beforeRouteUpdate",B,ne);for(const D of me)D.updateGuards.forEach(Y=>{te.push(pa(Y,B,ne))});return te.push(L),Ie(te)}).then(()=>{te=[];for(const D of j)if(D.beforeEnter)if(fn(D.beforeEnter))for(const Y of D.beforeEnter)te.push(pa(Y,B,ne));else te.push(pa(D.beforeEnter,B,ne));return te.push(L),Ie(te)}).then(()=>(B.matched.forEach(D=>D.enterCallbacks={}),te=uu(j,"beforeRouteEnter",B,ne,P),te.push(L),Ie(te))).then(()=>{te=[];for(const D of s.list())te.push(pa(D,B,ne));return te.push(L),Ie(te)}).catch(D=>Dn(D,8)?D:Promise.reject(D))}function R(B,ne,te){i.list().forEach(Q=>P(()=>Q(B,ne,te)))}function I(B,ne,te,Q,me){const j=k(B,ne);if(j)return j;const L=ne===oa,D=mo?history.state:{};te&&(Q||L?o.replace(B.fullPath,He({scroll:L&&D&&D.scroll},me)):o.push(B.fullPath,me)),c.value=B,pe(B,ne,te,L),ie()}let F;function $(){F||(F=o.listen((B,ne,te)=>{if(!Pe.listening)return;const Q=g(B),me=A(Q);if(me){T(He(me,{replace:!0,force:!0}),Q).catch(mr);return}l=Q;const j=c.value;mo&&S$(P0(j.fullPath,te.delta),oc()),S(Q,j).catch(L=>Dn(L,12)?L:Dn(L,2)?(T(He(y(L.to),{force:!0}),Q).then(D=>{Dn(D,20)&&!te.delta&&te.type===$r.pop&&o.go(-1,!1)}).catch(mr),Promise.reject()):(te.delta&&o.go(-te.delta,!1),V(L,Q,j))).then(L=>{L=L||I(Q,j,!1),L&&(te.delta&&!Dn(L,8)?o.go(-te.delta,!1):te.type===$r.pop&&Dn(L,20)&&o.go(-1,!1)),R(Q,j,L)}).catch(mr)}))}let H=Qo(),G=Qo(),ee;function V(B,ne,te){ie(B);const Q=G.list();return Q.length?Q.forEach(me=>me(B,ne,te)):console.error(B),Promise.reject(B)}function oe(){return ee&&c.value!==oa?Promise.resolve():new Promise((B,ne)=>{H.add([B,ne])})}function ie(B){return ee||(ee=!B,$(),H.list().forEach(([ne,te])=>B?te(B):ne()),H.reset()),B}function pe(B,ne,te,Q){const{scrollBehavior:me}=e;if(!mo||!me)return Promise.resolve();const j=!te&&I$(P0(B.fullPath,0))||(Q||!te)&&history.state&&history.state.scroll||null;return Wn().then(()=>me(B,ne,j)).then(L=>L&&L$(L)).catch(L=>V(L,B,ne))}const fe=B=>o.go(B);let ke;const Te=new Set,Pe={currentRoute:c,listening:!0,addRoute:f,removeRoute:h,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:v,resolve:g,options:e,push:b,replace:O,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:r.add,beforeResolve:s.add,afterEach:i.add,onError:G.add,isReady:oe,install(B){const ne=this;B.component("RouterLink",eV),B.component("RouterView",oV),B.config.globalProperties.$router=ne,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>re(c)}),mo&&!ke&&c.value===oa&&(ke=!0,b(o.location).catch(me=>{}));const te={};for(const me in oa)Object.defineProperty(te,me,{get:()=>c.value[me],enumerable:!0});B.provide(Qd,ne),B.provide(Wb,sv(te)),B.provide(up,c);const Q=B.unmount;Te.add(B),B.unmount=function(){Te.delete(B),Te.size<1&&(l=oa,F&&F(),F=null,c.value=oa,ke=!1,ee=!1),Q()}}};function Ie(B){return B.reduce((ne,te)=>ne.then(()=>P(te)),Promise.resolve())}return Pe}function sV(e,t){const n=[],a=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let s=0;s<r;s++){const i=t.matched[s];i&&(e.matched.find(l=>Po(l,i))?a.push(i):n.push(i));const c=e.matched[s];c&&(t.matched.find(l=>Po(l,c))||o.push(c))}return[n,a,o]}const kX="index",iV="auth-login",cV="auth-callback",Gb="site-index",lV="chatgpt-conversation",pp="chatgpt-conversation-new",uV="deepseek-conversation",Y0="deepseek-conversation-new",pV="grok-conversation",K0="grok-conversation-new",dV="midjourney-index",fV="qrart-index",mV="luma-index",wX="luma-history",hV="pika-index",gV="kling-index",jX="kling-history",vV="veo-index",EX="veo-history",_V="pixverse-index",AX="pixverse-history",yV="flux-index",bV="hailuo-index",TX="hailuo-history",kV="headshots-index",wV="suno-index",OX="suno-history",jV="nanobanana-index",EV="profile-index",AV="console-root",TV="console-order-list",OV="console-order-detail",X0="console-application-list",LV="console-application-extra",SV="console-application-subscribe",IV="distribution-index",RV="distribution-history",CV="distribution-invitees",PV="console-usage-list",xV={path:"/auth",component:()=>m(()=>import("./Auth-OmVNI-G2.js"),[]),children:[{path:"login",name:iV,component:()=>m(()=>import("./Login-eH4UESEK.js"),[])},{path:"callback",name:cV,component:()=>m(()=>import("./Callback-DldIe9Xm.js"),__vite__mapDeps([0,1]))}]},zV={path:"/console",meta:{auth:!0},component:()=>m(()=>import("./Console-C9VBH03V.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),children:[{path:"",name:AV,redirect:{name:X0}},{path:"orders",name:TV,component:()=>m(()=>import("./List-KXG0gNF0.js"),__vite__mapDeps([34,35,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,43,44,45,6,8,46,47,48]))},{path:"orders/:id",name:OV,component:()=>m(()=>import("./Detail-CucDzMTi.js"),__vite__mapDeps([49,35,43,45,11,44,41,4,9,10,42,50,28,51,6,7,8,52]))},{path:"applications",name:X0,component:()=>m(()=>import("./List-DuWa3xk3.js"),__vite__mapDeps([53,54,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48,6,8]))},{path:"applications/:id/extra",name:LV,component:()=>m(()=>import("./Extra--joBYh02.js"),__vite__mapDeps([55,56,44,35,57,10,7,28,6,8,25,14,11,20,21,45,51,23,58]))},{path:"applications/:id/subscribe",name:SV,component:()=>m(()=>import("./Subscribe-CrzZlb4E.js"),__vite__mapDeps([59,56,35,44,4,6,7,8,45,11,51,23,60]))},{path:"usages",name:PV,component:()=>m(()=>import("./List-Bb6gUE0e.js"),__vite__mapDeps([61,54,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48]))}]},DV={path:"/grok",meta:{modelGroup:fy,appName:"chat"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:K0}},{path:"conversations",name:K0,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations/:id",name:pV,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},NV={path:"/deepseek",meta:{modelGroup:dy,appName:"chat"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:Y0}},{path:"conversations/:id",name:uV,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations",name:Y0,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},MV={path:"/chatgpt",meta:{modelGroup:Nd,appName:"chat"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:pp}},{path:"conversations",name:pp,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations/:id",name:lV,component:()=>m(()=>import("./Conversation-QD82yGFw.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},$V={path:"/midjourney",meta:{auth:!0,appName:"midjourney"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:dV,component:()=>m(()=>import("./Index-BDAd2SwX.js"),__vite__mapDeps([71,4,6,7,8,69,29,10,72,9,11,37,12,38,14,22,21,16,17,27,39,31,68,19,18,20,23,73,26,57,74,75,76,77,47,5,13,78,44,41,42,79,80,50,81,51,82]))}]},VV={path:"/distribution",meta:{auth:!0},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:IV,component:()=>m(()=>import("./Index-BH3IL5nH.js"),__vite__mapDeps([83,41,4,9,10,11,42,84,44,51,46,12,21,47,39,22,14,27,48,7,31,45,28,6,8,19,85]))},{path:"history",name:RV,component:()=>m(()=>import("./History-BRl6WH1t.js"),__vite__mapDeps([86,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,84,44,45,46,47,48,87]))},{path:"invitees",name:CV,component:()=>m(()=>import("./Invitees-BY36MgGK.js"),__vite__mapDeps([88,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48,89]))}]},FV={path:"/qrart",meta:{auth:!0,appName:"qrart"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:fV,component:()=>m(()=>import("./Index-DDAs69Wm.js"),__vite__mapDeps([90,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,29,26,68,19,57,18,20,23,78,44,63,64,41,42,79,80,50,81,51,91]))}]},UV={path:"/luma",meta:{auth:!0,appName:"luma"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:mV,component:()=>m(()=>import("./Index-gK2FgI4V.js"),__vite__mapDeps([92,4,6,7,8,69,72,9,10,11,29,68,19,18,20,21,22,23,67,16,17,74,75,76,78,44,41,42,50,26,27,81,51,93]))}]},BV={path:"/pika",meta:{auth:!0,appName:"pika"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:hV,component:()=>m(()=>import("./Index-C_u9SFgi.js"),__vite__mapDeps([94,4,6,7,8,69,72,9,10,11,29,37,12,38,14,22,21,16,17,27,39,31,57,68,19,18,20,23,78,44,41,42,75,76,50,26,81,51,95]))}]},HV={path:"/kling",meta:{auth:!0,appName:"kling"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:gV,component:()=>m(()=>import("./Index-DKFw7rzh.js"),__vite__mapDeps([96,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,73,44,41,42,74,75,76,50,26,81,51,97]))}]},qV={path:"/veo",meta:{auth:!0,appName:"veo"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:vV,component:()=>m(()=>import("./Index-DyyZebnB.js"),__vite__mapDeps([98,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,29,74,75,76,68,19,18,20,23,78,44,41,42,50,26,81,51,99]))}]},WV={path:"/pixverse",meta:{auth:!0,appName:"pixverse"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:_V,component:()=>m(()=>import("./Index-BoS5mBFG.js"),__vite__mapDeps([100,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,68,19,18,20,23,78,44,41,42,74,75,76,50,26,81,51,101]))}]},GV={path:"/flux",meta:{auth:!0,appName:"flux"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:yV,component:()=>m(()=>import("./Index-C_m2mL_8.js"),__vite__mapDeps([102,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,68,19,18,20,23,78,44,41,42,79,80,50,26,81,51,103]))}]},YV={path:"/hailuo",meta:{auth:!0,appName:"hailuo"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:bV,component:()=>m(()=>import("./Index-BBvDaYVw.js"),__vite__mapDeps([104,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,44,41,42,74,75,76,50,26,81,51,105]))}]},KV={path:"/headshots",meta:{auth:!0,appName:"headshots"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:kV,component:()=>m(()=>import("./Index-D8XMHW0_.js"),__vite__mapDeps([106,4,6,7,8,69,72,9,10,11,68,19,18,20,21,22,23,57,26,27,17,77,38,47,63,64,41,42,50,51,107]))}]},XV={path:"/suno",meta:{auth:!0,appName:"suno"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:wV,component:()=>m(()=>import("./Index-Cw3eXlE5.js"),__vite__mapDeps([108,4,6,7,8,69,29,10,37,9,11,12,38,14,22,21,16,17,27,39,31,72,18,19,20,23,73,26,78,44,5,13,109,51,110]))}]},JV={path:"/nanobanana",meta:{auth:!0,appName:"nanobanana"},component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:jV,component:()=>m(()=>import("./Index-HBsvo20J.js"),__vite__mapDeps([111,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,44,41,42,79,80,50,26,81,51,112]))}]},ZV={path:"/site",component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:Gb,component:()=>m(()=>import("./Index-Cu4echf6.js"),__vite__mapDeps([113,15,6,7,8,16,11,10,17,4,18,19,20,21,22,23,24,25,14,29,45,26,27,28,114]))}]},QV={path:"/profile",component:()=>m(()=>import("./Main-BYit8MkX.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:EV,component:()=>m(()=>import("./Index-2BWumosd.js"),__vite__mapDeps([115,4,30,11,9,10,8,31,109,13,26,27,17,116]))}]},eF=[{path:"/",redirect:{name:pp}},zV,xV,MV,DV,NV,FV,UV,BV,HV,qV,WV,GV,YV,KV,XV,JV,$V,VV,ZV,QV],Yb=rV({history:x$(),routes:eF});Yb.beforeEach(async(e,t,n)=>{const a=bi(Sn("LOCALE")||E_);return await BO(a),n()});const tF=_e({name:"AuthPanel",components:{ElDialog:K8,QrCode:a$},data(){return{showQR:!1,qrLink:""}},computed:{iframeUrl(){return`${zr()}/auth/login?inviter_id=${this.inviterId}`},inviterId(){return this.$store?.state?.site?.distribution?.force_inviter_id?this.$store?.state?.site?.distribution?.force_inviter_id:this.$route.query.inviter_id?.toString()||Sn("INVITER_ID")||this.$store?.state?.site?.distribution?.default_inviter_id},authenticated(){return!!this.$store.state.token.access}},mounted(){window.addEventListener("message",async e=>{if(e.origin===zr()){if(console.debug("received from child page",e),e.data.name==="login"){const t=e.data.data,n={access:t.access_token,refresh:t.refresh_token,expiration:t.expires_in};await this.$store.dispatch("setToken",n),await this.$store.dispatch("getUser"),this.$store.state.site?.origin||(await this.$store.dispatch("initializeSite"),await this.$router.push({name:Gb})),window.location.reload()}if(e.data.name==="show_qr"){const t=e.data.data;this.qrLink=t.qrLink,this.showQR=!0}}})}}),Kb=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n},nF=["src"];function aF(e,t,n,a,o,r){const s=ho("el-dialog"),i=ho("qr-code");return ye(),Se(ht,null,[Xe(s,{"model-value":!e.authenticated,"modal-class":"dialog",width:"400px","show-close":!1,"close-on-press-escape":!1,"close-on-click-modal":!1},{default:vt(()=>[je("iframe",{width:"360",height:"560",src:e.iframeUrl,frameborder:"0"},null,8,nF)]),_:1},8,["model-value"]),Xe(s,{modelValue:e.showQR,"onUpdate:modelValue":t[0]||(t[0]=c=>e.showQR=c),width:"400px","show-close":!0},{default:vt(()=>[e.qrLink?(ye(),Nt(i,{key:0,value:e.qrLink,width:230,height:230,class:"qrcode w-[320px] h-[320px] block mx-auto mb-[20px]",type:"image/jpeg",color:{dark:"#000000ff",light:"#ffffffff"}},null,8,["value"])):_a("",!0)]),_:1},8,["modelValue"])],64)}const oF=Kb(tF,[["render",aF],["__scopeId","data-v-2f9f80d0"]]),rF={en:()=>m(()=>Promise.resolve().then(()=>UE),void 0),de:()=>m(()=>import("./de-BZu7ZZ9y.js"),[]),pt:()=>m(()=>import("./pt-iBE8V_rF.js"),[]),es:()=>m(()=>import("./es-Idilhmtq.js"),[]),fr:()=>m(()=>import("./fr-fyTGkfid.js"),[]),"zh-CN":()=>m(()=>import("./zh-cn-CnyULPxw.js"),[]),"zh-TW":()=>m(()=>import("./zh-tw-ZQmLUxJy.js"),[]),it:()=>m(()=>import("./it-CLf6lrMi.js"),[]),ko:()=>m(()=>import("./ko-DUrUYy0R.js"),[]),ja:()=>m(()=>import("./ja-DFyNu3tl.js"),[]),ru:()=>m(()=>import("./ru-a9O4dLvt.js"),[]),pl:()=>m(()=>import("./pl-By8ttK5W.js"),[]),fi:()=>m(()=>import("./fi-BhhlDzr_.js"),[]),sv:()=>m(()=>import("./sv-CiSSmJ4h.js"),[]),el:()=>m(()=>import("./el-DJ93mLwP.js"),[]),uk:()=>m(()=>import("./uk-Ci2KIGcW.js"),[]),ar:()=>m(()=>import("./ar-D1hnTQ2h.js"),[]),sr:()=>m(()=>import("./sr-BuqPpavQ.js"),[])},sF=_e({name:"App",components:{ElConfigProvider:I8,ElTag:T8,AuthPanel:oF},data(){return{isTest:Jr,epLocale:null}},computed:{authPopup(){return this.$store.state.auth.flow==="popup"&&this.$store.state.auth.visible},currentLocale(){return bi(this.$i18n.locale)}},watch:{currentLocale:{immediate:!0,handler(){this.loadElementPlusLocale()}}},mounted(){const e=!!this.$store.state.token.access&&!!this.$store.state.user?.id;console.debug("App mounted, authenticated:",e),e||(this.$store.dispatch("logout"),this.$store.dispatch("login"))},methods:{async loadElementPlusLocale(){const e=this.currentLocale;console.debug(`[i18n] Loading Element Plus locale for: ${e}`);const t=rF[e];if(!t){console.warn(`[i18n] No Element Plus locale found for: ${e}`);return}try{const n=await t();this.epLocale=n.default,console.debug(`[i18n] Loaded Element Plus locale: ${e}`)}catch(n){console.error(`[i18n] Failed to load Element Plus locale for: ${e}`,n)}}}});function iF(e,t,n,a,o,r){const s=ho("auth-panel"),i=ho("router-view"),c=ho("el-tag"),l=ho("el-config-provider");return ye(),Nt(l,{locale:e.epLocale},{default:vt(()=>[e.authPopup?(ye(),Nt(s,{key:0})):_a("",!0),Xe(i),e.isTest?(ye(),Nt(c,{key:1,size:"large",class:"fixed bottom-4 right-4 z-50",type:"warning"},{default:vt(()=>[Kv(Bp(e.$t("index.button.testEnv")),1)]),_:1})):_a("",!0)]),_:1},8,["locale"])}const cF=Kb(sF,[["render",iF]]),lF={install:(e,t)=>{e.config.globalProperties.$dayjs={format(n,a){return n?b8(n).format(a||t.formatString):""}}}};/*!
|
|
67
|
+
*/const mo=typeof document<"u";function xb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function o$(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&xb(e.default)}const He=Object.assign;function cu(e,t){const n={};for(const a in t){const o=t[a];n[a]=fn(o)?o.map(e):e(o)}return n}const mr=()=>{},fn=Array.isArray,zb=/#/g,r$=/&/g,s$=/\//g,i$=/=/g,c$=/\?/g,Db=/\+/g,l$=/%5B/g,u$=/%5D/g,Nb=/%5E/g,p$=/%60/g,Mb=/%7B/g,d$=/%7C/g,$b=/%7D/g,f$=/%20/g;function Zd(e){return encodeURI(""+e).replace(d$,"|").replace(l$,"[").replace(u$,"]")}function m$(e){return Zd(e).replace(Mb,"{").replace($b,"}").replace(Nb,"^")}function cp(e){return Zd(e).replace(Db,"%2B").replace(f$,"+").replace(zb,"%23").replace(r$,"%26").replace(p$,"`").replace(Mb,"{").replace($b,"}").replace(Nb,"^")}function h$(e){return cp(e).replace(i$,"%3D")}function g$(e){return Zd(e).replace(zb,"%23").replace(c$,"%3F")}function v$(e){return e==null?"":g$(e).replace(s$,"%2F")}function Mr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const _$=/\/$/,y$=e=>e.replace(_$,"");function lu(e,t,n="/"){let a,o={},r="",s="";const i=t.indexOf("#");let c=t.indexOf("?");return i<c&&i>=0&&(c=-1),c>-1&&(a=t.slice(0,c),r=t.slice(c+1,i>-1?i:t.length),o=e(r)),i>-1&&(a=a||t.slice(0,i),s=t.slice(i,t.length)),a=j$(a??t,n),{fullPath:a+(r&&"?")+r+s,path:a,query:o,hash:Mr(s)}}function b$(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function R0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function k$(e,t,n){const a=t.matched.length-1,o=n.matched.length-1;return a>-1&&a===o&&Po(t.matched[a],n.matched[o])&&Vb(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Po(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!w$(e[n],t[n]))return!1;return!0}function w$(e,t){return fn(e)?C0(e,t):fn(t)?C0(t,e):e===t}function C0(e,t){return fn(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function j$(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),o=a[a.length-1];(o===".."||o===".")&&a.push("");let r=n.length-1,s,i;for(s=0;s<a.length;s++)if(i=a[s],i!==".")if(i==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+a.slice(s).join("/")}const oa={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var $r;(function(e){e.pop="pop",e.push="push"})($r||($r={}));var hr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(hr||(hr={}));function E$(e){if(!e)if(mo){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),y$(e)}const A$=/^[^#]+#/;function T$(e,t){return e.replace(A$,"#")+t}function O$(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const oc=()=>({left:window.scrollX,top:window.scrollY});function L$(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=O$(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function P0(e,t){return(history.state?history.state.position-t:-1)+e}const lp=new Map;function S$(e,t){lp.set(e,t)}function I$(e){const t=lp.get(e);return lp.delete(e),t}let R$=()=>location.protocol+"//"+location.host;function Fb(e,t){const{pathname:n,search:a,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(i);return c[0]!=="/"&&(c="/"+c),R0(c,"")}return R0(n,e)+a+o}function C$(e,t,n,a){let o=[],r=[],s=null;const i=({state:d})=>{const f=Fb(e,location),h=n.value,v=t.value;let _=0;if(d){if(n.value=f,t.value=d,s&&s===h){s=null;return}_=v?d.position-v.position:0}else a(f);o.forEach(g=>{g(n.value,h,{delta:_,type:$r.pop,direction:_?_>0?hr.forward:hr.back:hr.unknown})})};function c(){s=n.value}function l(d){o.push(d);const f=()=>{const h=o.indexOf(d);h>-1&&o.splice(h,1)};return r.push(f),f}function u(){const{history:d}=window;d.state&&d.replaceState(He({},d.state,{scroll:oc()}),"")}function p(){for(const d of r)d();r=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:l,destroy:p}}function x0(e,t,n,a=!1,o=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:o?oc():null}}function P$(e){const{history:t,location:n}=window,a={value:Fb(e,n)},o={value:t.state};o.value||r(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,l,u){const p=e.indexOf("#"),d=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+c:R$()+e+c;try{t[u?"replaceState":"pushState"](l,"",d),o.value=l}catch(f){console.error(f),n[u?"replace":"assign"](d)}}function s(c,l){const u=He({},t.state,x0(o.value.back,c,o.value.forward,!0),l,{position:o.value.position});r(c,u,!0),a.value=c}function i(c,l){const u=He({},o.value,t.state,{forward:c,scroll:oc()});r(u.current,u,!0);const p=He({},x0(a.value,c,null),{position:u.position+1},l);r(c,p,!1),a.value=c}return{location:a,state:o,push:i,replace:s}}function x$(e){e=E$(e);const t=P$(e),n=C$(e,t.state,t.location,t.replace);function a(r,s=!0){s||n.pauseListeners(),history.go(r)}const o=He({location:"",base:e,go:a,createHref:T$.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function z$(e){return typeof e=="string"||e&&typeof e=="object"}function Ub(e){return typeof e=="string"||typeof e=="symbol"}const Bb=Symbol("");var z0;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(z0||(z0={}));function xo(e,t){return He(new Error,{type:e,[Bb]:!0},t)}function Dn(e,t){return e instanceof Error&&Bb in e&&(t==null||!!(e.type&t))}const D0="[^/]+?",D$={sensitive:!1,strict:!1,start:!0,end:!0},N$=/[.+*?^${}()[\]/\\]/g;function M$(e,t){const n=He({},D$,t),a=[];let o=n.start?"^":"";const r=[];for(const l of e){const u=l.length?[]:[90];n.strict&&!l.length&&(o+="/");for(let p=0;p<l.length;p++){const d=l[p];let f=40+(n.sensitive?.25:0);if(d.type===0)p||(o+="/"),o+=d.value.replace(N$,"\\$&"),f+=40;else if(d.type===1){const{value:h,repeatable:v,optional:_,regexp:g}=d;r.push({name:h,repeatable:v,optional:_});const y=g||D0;if(y!==D0){f+=10;try{new RegExp(`(${y})`)}catch(b){throw new Error(`Invalid custom RegExp for param "${h}" (${y}): `+b.message)}}let k=v?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;p||(k=_&&l.length<2?`(?:/${k})`:"/"+k),_&&(k+="?"),o+=k,f+=20,_&&(f+=-8),v&&(f+=-20),y===".*"&&(f+=-50)}u.push(f)}a.push(u)}if(n.strict&&n.end){const l=a.length-1;a[l][a[l].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const s=new RegExp(o,n.sensitive?"":"i");function i(l){const u=l.match(s),p={};if(!u)return null;for(let d=1;d<u.length;d++){const f=u[d]||"",h=r[d-1];p[h.name]=f&&h.repeatable?f.split("/"):f}return p}function c(l){let u="",p=!1;for(const d of e){(!p||!u.endsWith("/"))&&(u+="/"),p=!1;for(const f of d)if(f.type===0)u+=f.value;else if(f.type===1){const{value:h,repeatable:v,optional:_}=f,g=h in l?l[h]:"";if(fn(g)&&!v)throw new Error(`Provided param "${h}" is an array but it is not repeatable (* or + modifiers)`);const y=fn(g)?g.join("/"):g;if(!y)if(_)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):p=!0);else throw new Error(`Missing required param "${h}"`);u+=y}}return u||"/"}return{re:s,score:a,keys:r,parse:i,stringify:c}}function $$(e,t){let n=0;for(;n<e.length&&n<t.length;){const a=t[n]-e[n];if(a)return a;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Hb(e,t){let n=0;const a=e.score,o=t.score;for(;n<a.length&&n<o.length;){const r=$$(a[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-a.length)===1){if(N0(a))return 1;if(N0(o))return-1}return o.length-a.length}function N0(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const V$={type:0,value:""},F$=/[a-zA-Z0-9_]/;function U$(e){if(!e)return[[]];if(e==="/")return[[V$]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${l}": ${f}`)}let n=0,a=n;const o=[];let r;function s(){r&&o.push(r),r=[]}let i=0,c,l="",u="";function p(){l&&(n===0?r.push({type:0,value:l}):n===1||n===2||n===3?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:l,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),l="")}function d(){l+=c}for(;i<e.length;){if(c=e[i++],c==="\\"&&n!==2){a=n,n=4;continue}switch(n){case 0:c==="/"?(l&&p(),s()):c===":"?(p(),n=1):d();break;case 4:d(),n=a;break;case 1:c==="("?n=2:F$.test(c)?d():(p(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--);break;case 2:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:p(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),p(),s(),o}function B$(e,t,n){const a=M$(U$(e.path),n),o=He(a,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function H$(e,t){const n=[],a=new Map;t=F0({strict:!1,end:!0,sensitive:!1},t);function o(p){return a.get(p)}function r(p,d,f){const h=!f,v=$0(p);v.aliasOf=f&&f.record;const _=F0(t,p),g=[v];if("alias"in p){const b=typeof p.alias=="string"?[p.alias]:p.alias;for(const O of b)g.push($0(He({},v,{components:f?f.record.components:v.components,path:O,aliasOf:f?f.record:v})))}let y,k;for(const b of g){const{path:O}=b;if(d&&O[0]!=="/"){const A=d.record.path,T=A[A.length-1]==="/"?"":"/";b.path=d.record.path+(O&&T+O)}if(y=B$(b,d,_),f?f.alias.push(y):(k=k||y,k!==y&&k.alias.push(y),h&&p.name&&!V0(y)&&s(p.name)),qb(y)&&c(y),v.children){const A=v.children;for(let T=0;T<A.length;T++)r(A[T],y,f&&f.children[T])}f=f||y}return k?()=>{s(k)}:mr}function s(p){if(Ub(p)){const d=a.get(p);d&&(a.delete(p),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(p);d>-1&&(n.splice(d,1),p.record.name&&a.delete(p.record.name),p.children.forEach(s),p.alias.forEach(s))}}function i(){return n}function c(p){const d=G$(p,n);n.splice(d,0,p),p.record.name&&!V0(p)&&a.set(p.record.name,p)}function l(p,d){let f,h={},v,_;if("name"in p&&p.name){if(f=a.get(p.name),!f)throw xo(1,{location:p});_=f.record.name,h=He(M0(d.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),p.params&&M0(p.params,f.keys.map(k=>k.name))),v=f.stringify(h)}else if(p.path!=null)v=p.path,f=n.find(k=>k.re.test(v)),f&&(h=f.parse(v),_=f.record.name);else{if(f=d.name?a.get(d.name):n.find(k=>k.re.test(d.path)),!f)throw xo(1,{location:p,currentLocation:d});_=f.record.name,h=He({},d.params,p.params),v=f.stringify(h)}const g=[];let y=f;for(;y;)g.unshift(y.record),y=y.parent;return{name:_,path:v,params:h,matched:g,meta:W$(g)}}e.forEach(p=>r(p));function u(){n.length=0,a.clear()}return{addRoute:r,resolve:l,removeRoute:s,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function M0(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function $0(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:q$(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function q$(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function V0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function W$(e){return e.reduce((t,n)=>He(t,n.meta),{})}function F0(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}function G$(e,t){let n=0,a=t.length;for(;n!==a;){const r=n+a>>1;Hb(e,t[r])<0?a=r:n=r+1}const o=Y$(e);return o&&(a=t.lastIndexOf(o,a-1)),a}function Y$(e){let t=e;for(;t=t.parent;)if(qb(t)&&Hb(e,t)===0)return t}function qb({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function K$(e){const t={};if(e===""||e==="?")return t;const a=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<a.length;++o){const r=a[o].replace(Db," "),s=r.indexOf("="),i=Mr(s<0?r:r.slice(0,s)),c=s<0?null:Mr(r.slice(s+1));if(i in t){let l=t[i];fn(l)||(l=t[i]=[l]),l.push(c)}else t[i]=c}return t}function U0(e){let t="";for(let n in e){const a=e[n];if(n=h$(n),a==null){a!==void 0&&(t+=(t.length?"&":"")+n);continue}(fn(a)?a.map(r=>r&&cp(r)):[a&&cp(a)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function X$(e){const t={};for(const n in e){const a=e[n];a!==void 0&&(t[n]=fn(a)?a.map(o=>o==null?null:""+o):a==null?a:""+a)}return t}const J$=Symbol(""),B0=Symbol(""),Qd=Symbol(""),Wb=Symbol(""),up=Symbol("");function Qo(){let e=[];function t(a){return e.push(a),()=>{const o=e.indexOf(a);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function pa(e,t,n,a,o,r=s=>s()){const s=a&&(a.enterCallbacks[o]=a.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const l=d=>{d===!1?c(xo(4,{from:n,to:t})):d instanceof Error?c(d):z$(d)?c(xo(2,{from:t,to:d})):(s&&a.enterCallbacks[o]===s&&typeof d=="function"&&s.push(d),i())},u=r(()=>e.call(a&&a.instances[o],t,n,l));let p=Promise.resolve(u);e.length<3&&(p=p.then(l)),p.catch(d=>c(d))})}function uu(e,t,n,a,o=r=>r()){const r=[];for(const s of e)for(const i in s.components){let c=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(xb(c)){const u=(c.__vccOpts||c)[t];u&&r.push(pa(u,n,a,s,i,o))}else{let l=c();r.push(()=>l.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${s.path}"`);const p=o$(u)?u.default:u;s.mods[i]=u,s.components[i]=p;const f=(p.__vccOpts||p)[t];return f&&pa(f,n,a,s,i,o)()}))}}return r}function H0(e){const t=Qe(Qd),n=Qe(Wb),a=he(()=>{const c=re(e.to);return t.resolve(c)}),o=he(()=>{const{matched:c}=a.value,{length:l}=c,u=c[l-1],p=n.matched;if(!u||!p.length)return-1;const d=p.findIndex(Po.bind(null,u));if(d>-1)return d;const f=q0(c[l-2]);return l>1&&q0(u)===f&&p[p.length-1].path!==f?p.findIndex(Po.bind(null,c[l-2])):d}),r=he(()=>o.value>-1&&nV(n.params,a.value.params)),s=he(()=>o.value>-1&&o.value===n.matched.length-1&&Vb(n.params,a.value.params));function i(c={}){if(tV(c)){const l=t[re(e.replace)?"replace":"push"](re(e.to)).catch(mr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:a,href:he(()=>a.value.href),isActive:r,isExactActive:s,navigate:i}}function Z$(e){return e.length===1?e[0]:e}const Q$=_e({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:H0,setup(e,{slots:t}){const n=In(H0(e)),{options:a}=Qe(Qd),o=he(()=>({[W0(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[W0(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&Z$(t.default(n));return e.custom?r:Dt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),eV=Q$;function tV(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function nV(e,t){for(const n in t){const a=t[n],o=e[n];if(typeof a=="string"){if(a!==o)return!1}else if(!fn(o)||o.length!==a.length||a.some((r,s)=>r!==o[s]))return!1}return!0}function q0(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const W0=(e,t,n)=>e??t??n,aV=_e({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=Qe(up),o=he(()=>e.route||a.value),r=Qe(B0,0),s=he(()=>{let l=re(r);const{matched:u}=o.value;let p;for(;(p=u[l])&&!p.components;)l++;return l}),i=he(()=>o.value.matched[s.value]);Ba(B0,he(()=>s.value+1)),Ba(J$,i),Ba(up,o);const c=ze();return Ve(()=>[c.value,i.value,e.name],([l,u,p],[d,f,h])=>{u&&(u.instances[p]=l,f&&f!==u&&l&&l===d&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),l&&u&&(!f||!Po(u,f)||!d)&&(u.enterCallbacks[p]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=o.value,u=e.name,p=i.value,d=p&&p.components[u];if(!d)return G0(n.default,{Component:d,route:l});const f=p.props[u],h=f?f===!0?l.params:typeof f=="function"?f(l):f:null,_=Dt(d,He({},h,t,{onVnodeUnmounted:g=>{g.component.isUnmounted&&(p.instances[u]=null)},ref:c}));return G0(n.default,{Component:_,route:l})||_}}});function G0(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const oV=aV;function rV(e){const t=H$(e.routes,e),n=e.parseQuery||K$,a=e.stringifyQuery||U0,o=e.history,r=Qo(),s=Qo(),i=Qo(),c=qr(oa);let l=oa;mo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=cu.bind(null,B=>""+B),p=cu.bind(null,v$),d=cu.bind(null,Mr);function f(B,ne){let te,Q;return Ub(B)?(te=t.getRecordMatcher(B),Q=ne):Q=B,t.addRoute(Q,te)}function h(B){const ne=t.getRecordMatcher(B);ne&&t.removeRoute(ne)}function v(){return t.getRoutes().map(B=>B.record)}function _(B){return!!t.getRecordMatcher(B)}function g(B,ne){if(ne=He({},ne||c.value),typeof B=="string"){const D=lu(n,B,ne.path),Y=t.resolve({path:D.path},ne),X=o.createHref(D.fullPath);return He(D,Y,{params:d(Y.params),hash:Mr(D.hash),redirectedFrom:void 0,href:X})}let te;if(B.path!=null)te=He({},B,{path:lu(n,B.path,ne.path).path});else{const D=He({},B.params);for(const Y in D)D[Y]==null&&delete D[Y];te=He({},B,{params:p(D)}),ne.params=p(ne.params)}const Q=t.resolve(te,ne),me=B.hash||"";Q.params=u(d(Q.params));const j=b$(a,He({},B,{hash:m$(me),path:Q.path})),L=o.createHref(j);return He({fullPath:j,hash:me,query:a===U0?X$(B.query):B.query||{}},Q,{redirectedFrom:void 0,href:L})}function y(B){return typeof B=="string"?lu(n,B,c.value.path):He({},B)}function k(B,ne){if(l!==B)return xo(8,{from:ne,to:B})}function b(B){return T(B)}function O(B){return b(He(y(B),{replace:!0}))}function A(B){const ne=B.matched[B.matched.length-1];if(ne&&ne.redirect){const{redirect:te}=ne;let Q=typeof te=="function"?te(B):te;return typeof Q=="string"&&(Q=Q.includes("?")||Q.includes("#")?Q=y(Q):{path:Q},Q.params={}),He({query:B.query,hash:B.hash,params:Q.path!=null?{}:B.params},Q)}}function T(B,ne){const te=l=g(B),Q=c.value,me=B.state,j=B.force,L=B.replace===!0,D=A(te);if(D)return T(He(y(D),{state:typeof D=="object"?He({},me,D.state):me,force:j,replace:L}),ne||te);const Y=te;Y.redirectedFrom=ne;let X;return!j&&k$(a,Q,te)&&(X=xo(16,{to:Y,from:Q}),pe(Q,Q,!0,!1)),(X?Promise.resolve(X):S(Y,Q)).catch(K=>Dn(K)?Dn(K,2)?K:ie(K):V(K,Y,Q)).then(K=>{if(K){if(Dn(K,2))return T(He({replace:L},y(K.to),{state:typeof K.to=="object"?He({},me,K.to.state):me,force:j}),ne||Y)}else K=I(Y,Q,!0,L,me);return R(Y,Q,K),K})}function C(B,ne){const te=k(B,ne);return te?Promise.reject(te):Promise.resolve()}function P(B){const ne=Te.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(B):B()}function S(B,ne){let te;const[Q,me,j]=sV(B,ne);te=uu(Q.reverse(),"beforeRouteLeave",B,ne);for(const D of Q)D.leaveGuards.forEach(Y=>{te.push(pa(Y,B,ne))});const L=C.bind(null,B,ne);return te.push(L),Ie(te).then(()=>{te=[];for(const D of r.list())te.push(pa(D,B,ne));return te.push(L),Ie(te)}).then(()=>{te=uu(me,"beforeRouteUpdate",B,ne);for(const D of me)D.updateGuards.forEach(Y=>{te.push(pa(Y,B,ne))});return te.push(L),Ie(te)}).then(()=>{te=[];for(const D of j)if(D.beforeEnter)if(fn(D.beforeEnter))for(const Y of D.beforeEnter)te.push(pa(Y,B,ne));else te.push(pa(D.beforeEnter,B,ne));return te.push(L),Ie(te)}).then(()=>(B.matched.forEach(D=>D.enterCallbacks={}),te=uu(j,"beforeRouteEnter",B,ne,P),te.push(L),Ie(te))).then(()=>{te=[];for(const D of s.list())te.push(pa(D,B,ne));return te.push(L),Ie(te)}).catch(D=>Dn(D,8)?D:Promise.reject(D))}function R(B,ne,te){i.list().forEach(Q=>P(()=>Q(B,ne,te)))}function I(B,ne,te,Q,me){const j=k(B,ne);if(j)return j;const L=ne===oa,D=mo?history.state:{};te&&(Q||L?o.replace(B.fullPath,He({scroll:L&&D&&D.scroll},me)):o.push(B.fullPath,me)),c.value=B,pe(B,ne,te,L),ie()}let F;function $(){F||(F=o.listen((B,ne,te)=>{if(!Pe.listening)return;const Q=g(B),me=A(Q);if(me){T(He(me,{replace:!0,force:!0}),Q).catch(mr);return}l=Q;const j=c.value;mo&&S$(P0(j.fullPath,te.delta),oc()),S(Q,j).catch(L=>Dn(L,12)?L:Dn(L,2)?(T(He(y(L.to),{force:!0}),Q).then(D=>{Dn(D,20)&&!te.delta&&te.type===$r.pop&&o.go(-1,!1)}).catch(mr),Promise.reject()):(te.delta&&o.go(-te.delta,!1),V(L,Q,j))).then(L=>{L=L||I(Q,j,!1),L&&(te.delta&&!Dn(L,8)?o.go(-te.delta,!1):te.type===$r.pop&&Dn(L,20)&&o.go(-1,!1)),R(Q,j,L)}).catch(mr)}))}let H=Qo(),G=Qo(),ee;function V(B,ne,te){ie(B);const Q=G.list();return Q.length?Q.forEach(me=>me(B,ne,te)):console.error(B),Promise.reject(B)}function oe(){return ee&&c.value!==oa?Promise.resolve():new Promise((B,ne)=>{H.add([B,ne])})}function ie(B){return ee||(ee=!B,$(),H.list().forEach(([ne,te])=>B?te(B):ne()),H.reset()),B}function pe(B,ne,te,Q){const{scrollBehavior:me}=e;if(!mo||!me)return Promise.resolve();const j=!te&&I$(P0(B.fullPath,0))||(Q||!te)&&history.state&&history.state.scroll||null;return Wn().then(()=>me(B,ne,j)).then(L=>L&&L$(L)).catch(L=>V(L,B,ne))}const fe=B=>o.go(B);let ke;const Te=new Set,Pe={currentRoute:c,listening:!0,addRoute:f,removeRoute:h,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:v,resolve:g,options:e,push:b,replace:O,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:r.add,beforeResolve:s.add,afterEach:i.add,onError:G.add,isReady:oe,install(B){const ne=this;B.component("RouterLink",eV),B.component("RouterView",oV),B.config.globalProperties.$router=ne,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>re(c)}),mo&&!ke&&c.value===oa&&(ke=!0,b(o.location).catch(me=>{}));const te={};for(const me in oa)Object.defineProperty(te,me,{get:()=>c.value[me],enumerable:!0});B.provide(Qd,ne),B.provide(Wb,sv(te)),B.provide(up,c);const Q=B.unmount;Te.add(B),B.unmount=function(){Te.delete(B),Te.size<1&&(l=oa,F&&F(),F=null,c.value=oa,ke=!1,ee=!1),Q()}}};function Ie(B){return B.reduce((ne,te)=>ne.then(()=>P(te)),Promise.resolve())}return Pe}function sV(e,t){const n=[],a=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let s=0;s<r;s++){const i=t.matched[s];i&&(e.matched.find(l=>Po(l,i))?a.push(i):n.push(i));const c=e.matched[s];c&&(t.matched.find(l=>Po(l,c))||o.push(c))}return[n,a,o]}const kX="index",iV="auth-login",cV="auth-callback",Gb="site-index",lV="chatgpt-conversation",pp="chatgpt-conversation-new",uV="deepseek-conversation",Y0="deepseek-conversation-new",pV="grok-conversation",K0="grok-conversation-new",dV="midjourney-index",fV="qrart-index",mV="luma-index",wX="luma-history",hV="pika-index",gV="kling-index",jX="kling-history",vV="veo-index",EX="veo-history",_V="pixverse-index",AX="pixverse-history",yV="flux-index",bV="hailuo-index",TX="hailuo-history",kV="headshots-index",wV="suno-index",OX="suno-history",jV="nanobanana-index",EV="profile-index",AV="console-root",TV="console-order-list",OV="console-order-detail",X0="console-application-list",LV="console-application-extra",SV="console-application-subscribe",IV="distribution-index",RV="distribution-history",CV="distribution-invitees",PV="console-usage-list",xV={path:"/auth",component:()=>m(()=>import("./Auth-CQobrW7e.js"),[]),children:[{path:"login",name:iV,component:()=>m(()=>import("./Login-K2jwS-9w.js"),[])},{path:"callback",name:cV,component:()=>m(()=>import("./Callback-Db9TLfvk.js"),__vite__mapDeps([0,1]))}]},zV={path:"/console",meta:{auth:!0},component:()=>m(()=>import("./Console-CaAxK4dC.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),children:[{path:"",name:AV,redirect:{name:X0}},{path:"orders",name:TV,component:()=>m(()=>import("./List-D_iJT2xh.js"),__vite__mapDeps([34,35,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,43,44,45,6,8,46,47,48]))},{path:"orders/:id",name:OV,component:()=>m(()=>import("./Detail-Chm7HvSn.js"),__vite__mapDeps([49,35,43,45,11,44,41,4,9,10,42,50,28,51,6,7,8,52]))},{path:"applications",name:X0,component:()=>m(()=>import("./List-CmFjwdxk.js"),__vite__mapDeps([53,54,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48,6,8]))},{path:"applications/:id/extra",name:LV,component:()=>m(()=>import("./Extra-9TF3vLJR.js"),__vite__mapDeps([55,56,44,35,57,10,7,28,6,8,25,14,11,20,21,45,51,23,58]))},{path:"applications/:id/subscribe",name:SV,component:()=>m(()=>import("./Subscribe-D27qe_Al.js"),__vite__mapDeps([59,56,35,44,4,6,7,8,45,11,51,23,60]))},{path:"usages",name:PV,component:()=>m(()=>import("./List-BIveMp_L.js"),__vite__mapDeps([61,54,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48]))}]},DV={path:"/grok",meta:{modelGroup:fy,appName:"chat"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:K0}},{path:"conversations",name:K0,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations/:id",name:pV,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},NV={path:"/deepseek",meta:{modelGroup:dy,appName:"chat"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:Y0}},{path:"conversations/:id",name:uV,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations",name:Y0,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},MV={path:"/chatgpt",meta:{modelGroup:Nd,appName:"chat"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",redirect:{name:pp}},{path:"conversations",name:pp,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))},{path:"conversations/:id",name:lV,component:()=>m(()=>import("./Conversation-ClFlw8TE.js"),__vite__mapDeps([66,41,4,9,10,11,42,67,19,16,17,7,26,27,6,8,50,68,18,20,21,22,23,5,12,13,14,51,69,70]))}]},$V={path:"/midjourney",meta:{auth:!0,appName:"midjourney"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:dV,component:()=>m(()=>import("./Index-hNY2A0bX.js"),__vite__mapDeps([71,4,6,7,8,69,29,10,72,9,11,37,12,38,14,22,21,16,17,27,39,31,68,19,18,20,23,73,26,57,74,75,76,77,47,5,13,78,44,41,42,79,80,50,81,51,82]))}]},VV={path:"/distribution",meta:{auth:!0},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:IV,component:()=>m(()=>import("./Index-utCtwoZl.js"),__vite__mapDeps([83,41,4,9,10,11,42,84,44,51,46,12,21,47,39,22,14,27,48,7,31,45,28,6,8,19,85]))},{path:"history",name:RV,component:()=>m(()=>import("./History-BaKAOzuz.js"),__vite__mapDeps([86,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,84,44,45,46,47,48,87]))},{path:"invitees",name:CV,component:()=>m(()=>import("./Invitees-PMwtb0_0.js"),__vite__mapDeps([88,36,37,9,10,11,12,38,14,22,21,7,16,17,27,39,31,40,41,4,42,45,46,47,48,89]))}]},FV={path:"/qrart",meta:{auth:!0,appName:"qrart"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:fV,component:()=>m(()=>import("./Index-CcqrQ9xY.js"),__vite__mapDeps([90,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,29,26,68,19,57,18,20,23,78,44,63,64,41,42,79,80,50,81,51,91]))}]},UV={path:"/luma",meta:{auth:!0,appName:"luma"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:mV,component:()=>m(()=>import("./Index-CvfVAnPP.js"),__vite__mapDeps([92,4,6,7,8,69,72,9,10,11,29,68,19,18,20,21,22,23,67,16,17,74,75,76,78,44,41,42,50,26,27,81,51,93]))}]},BV={path:"/pika",meta:{auth:!0,appName:"pika"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:hV,component:()=>m(()=>import("./Index-BOSTKYkU.js"),__vite__mapDeps([94,4,6,7,8,69,72,9,10,11,29,37,12,38,14,22,21,16,17,27,39,31,57,68,19,18,20,23,78,44,41,42,75,76,50,26,81,51,95]))}]},HV={path:"/kling",meta:{auth:!0,appName:"kling"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:gV,component:()=>m(()=>import("./Index-D7dWH8D1.js"),__vite__mapDeps([96,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,73,44,41,42,74,75,76,50,26,81,51,97]))}]},qV={path:"/veo",meta:{auth:!0,appName:"veo"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:vV,component:()=>m(()=>import("./Index-BurCaFfA.js"),__vite__mapDeps([98,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,29,74,75,76,68,19,18,20,23,78,44,41,42,50,26,81,51,99]))}]},WV={path:"/pixverse",meta:{auth:!0,appName:"pixverse"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:_V,component:()=>m(()=>import("./Index-CZm4gDp_.js"),__vite__mapDeps([100,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,68,19,18,20,23,78,44,41,42,74,75,76,50,26,81,51,101]))}]},GV={path:"/flux",meta:{auth:!0,appName:"flux"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:yV,component:()=>m(()=>import("./Index-5df8lDfZ.js"),__vite__mapDeps([102,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,73,68,19,18,20,23,78,44,41,42,79,80,50,26,81,51,103]))}]},YV={path:"/hailuo",meta:{auth:!0,appName:"hailuo"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:bV,component:()=>m(()=>import("./Index-CT4KTGwv.js"),__vite__mapDeps([104,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,44,41,42,74,75,76,50,26,81,51,105]))}]},KV={path:"/headshots",meta:{auth:!0,appName:"headshots"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:kV,component:()=>m(()=>import("./Index-dOcJKd6H.js"),__vite__mapDeps([106,4,6,7,8,69,72,9,10,11,68,19,18,20,21,22,23,57,26,27,17,77,38,47,63,64,41,42,50,51,107]))}]},XV={path:"/suno",meta:{auth:!0,appName:"suno"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:wV,component:()=>m(()=>import("./Index-dcEeVAMq.js"),__vite__mapDeps([108,4,6,7,8,69,29,10,37,9,11,12,38,14,22,21,16,17,27,39,31,72,18,19,20,23,73,26,78,44,5,13,109,51,110]))}]},JV={path:"/nanobanana",meta:{auth:!0,appName:"nanobanana"},component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:jV,component:()=>m(()=>import("./Index-jL9vh1vt.js"),__vite__mapDeps([111,4,6,7,8,69,37,9,10,11,12,38,14,22,21,16,17,27,39,31,72,68,19,18,20,23,78,44,41,42,79,80,50,26,81,51,112]))}]},ZV={path:"/site",component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:Gb,component:()=>m(()=>import("./Index-BWtMiqll.js"),__vite__mapDeps([113,15,6,7,8,16,11,10,17,4,18,19,20,21,22,23,24,25,14,29,45,26,27,28,114]))}]},QV={path:"/profile",component:()=>m(()=>import("./Main-BEJjlnb0.js"),__vite__mapDeps([62,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,63,64,48,65])),children:[{path:"",name:EV,component:()=>m(()=>import("./Index-WDCakEnG.js"),__vite__mapDeps([115,4,30,11,9,10,8,31,109,13,26,27,17,116]))}]},eF=[{path:"/",redirect:{name:pp}},zV,xV,MV,DV,NV,FV,UV,BV,HV,qV,WV,GV,YV,KV,XV,JV,$V,VV,ZV,QV],Yb=rV({history:x$(),routes:eF});Yb.beforeEach(async(e,t,n)=>{const a=bi(Sn("LOCALE")||E_);return await BO(a),n()});const tF=_e({name:"AuthPanel",components:{ElDialog:K8,QrCode:a$},data(){return{showQR:!1,qrLink:""}},computed:{iframeUrl(){return`${zr()}/auth/login?inviter_id=${this.inviterId}`},inviterId(){return this.$store?.state?.site?.distribution?.force_inviter_id?this.$store?.state?.site?.distribution?.force_inviter_id:this.$route.query.inviter_id?.toString()||Sn("INVITER_ID")||this.$store?.state?.site?.distribution?.default_inviter_id},authenticated(){return!!this.$store.state.token.access}},mounted(){window.addEventListener("message",async e=>{if(e.origin===zr()){if(console.debug("received from child page",e),e.data.name==="login"){const t=e.data.data,n={access:t.access_token,refresh:t.refresh_token,expiration:t.expires_in};await this.$store.dispatch("setToken",n),await this.$store.dispatch("getUser"),this.$store.state.site?.origin||(await this.$store.dispatch("initializeSite"),await this.$router.push({name:Gb})),window.location.reload()}if(e.data.name==="show_qr"){const t=e.data.data;this.qrLink=t.qrLink,this.showQR=!0}}})}}),Kb=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n},nF=["src"];function aF(e,t,n,a,o,r){const s=ho("el-dialog"),i=ho("qr-code");return ye(),Se(ht,null,[Xe(s,{"model-value":!e.authenticated,"modal-class":"dialog",width:"400px","show-close":!1,"close-on-press-escape":!1,"close-on-click-modal":!1},{default:vt(()=>[je("iframe",{width:"360",height:"560",src:e.iframeUrl,frameborder:"0"},null,8,nF)]),_:1},8,["model-value"]),Xe(s,{modelValue:e.showQR,"onUpdate:modelValue":t[0]||(t[0]=c=>e.showQR=c),width:"400px","show-close":!0},{default:vt(()=>[e.qrLink?(ye(),Nt(i,{key:0,value:e.qrLink,width:230,height:230,class:"qrcode w-[320px] h-[320px] block mx-auto mb-[20px]",type:"image/jpeg",color:{dark:"#000000ff",light:"#ffffffff"}},null,8,["value"])):_a("",!0)]),_:1},8,["modelValue"])],64)}const oF=Kb(tF,[["render",aF],["__scopeId","data-v-2f9f80d0"]]),rF={en:()=>m(()=>Promise.resolve().then(()=>UE),void 0),de:()=>m(()=>import("./de-BZu7ZZ9y.js"),[]),pt:()=>m(()=>import("./pt-iBE8V_rF.js"),[]),es:()=>m(()=>import("./es-Idilhmtq.js"),[]),fr:()=>m(()=>import("./fr-fyTGkfid.js"),[]),"zh-CN":()=>m(()=>import("./zh-cn-CnyULPxw.js"),[]),"zh-TW":()=>m(()=>import("./zh-tw-ZQmLUxJy.js"),[]),it:()=>m(()=>import("./it-CLf6lrMi.js"),[]),ko:()=>m(()=>import("./ko-DUrUYy0R.js"),[]),ja:()=>m(()=>import("./ja-DFyNu3tl.js"),[]),ru:()=>m(()=>import("./ru-a9O4dLvt.js"),[]),pl:()=>m(()=>import("./pl-By8ttK5W.js"),[]),fi:()=>m(()=>import("./fi-BhhlDzr_.js"),[]),sv:()=>m(()=>import("./sv-CiSSmJ4h.js"),[]),el:()=>m(()=>import("./el-DJ93mLwP.js"),[]),uk:()=>m(()=>import("./uk-Ci2KIGcW.js"),[]),ar:()=>m(()=>import("./ar-D1hnTQ2h.js"),[]),sr:()=>m(()=>import("./sr-BuqPpavQ.js"),[])},sF=_e({name:"App",components:{ElConfigProvider:I8,ElTag:T8,AuthPanel:oF},data(){return{isTest:Jr,epLocale:null}},computed:{authPopup(){return this.$store.state.auth.flow==="popup"&&this.$store.state.auth.visible},currentLocale(){return bi(this.$i18n.locale)}},watch:{currentLocale:{immediate:!0,handler(){this.loadElementPlusLocale()}}},mounted(){const e=!!this.$store.state.token.access&&!!this.$store.state.user?.id;console.debug("App mounted, authenticated:",e),e||(this.$store.dispatch("logout"),this.$store.dispatch("login"))},methods:{async loadElementPlusLocale(){const e=this.currentLocale;console.debug(`[i18n] Loading Element Plus locale for: ${e}`);const t=rF[e];if(!t){console.warn(`[i18n] No Element Plus locale found for: ${e}`);return}try{const n=await t();this.epLocale=n.default,console.debug(`[i18n] Loaded Element Plus locale: ${e}`)}catch(n){console.error(`[i18n] Failed to load Element Plus locale for: ${e}`,n)}}}});function iF(e,t,n,a,o,r){const s=ho("auth-panel"),i=ho("router-view"),c=ho("el-tag"),l=ho("el-config-provider");return ye(),Nt(l,{locale:e.epLocale},{default:vt(()=>[e.authPopup?(ye(),Nt(s,{key:0})):_a("",!0),Xe(i),e.isTest?(ye(),Nt(c,{key:1,size:"large",class:"fixed bottom-4 right-4 z-50",type:"warning"},{default:vt(()=>[Kv(Bp(e.$t("index.button.testEnv")),1)]),_:1})):_a("",!0)]),_:1},8,["locale"])}const cF=Kb(sF,[["render",iF]]),lF={install:(e,t)=>{e.config.globalProperties.$dayjs={format(n,a){return n?b8(n).format(a||t.formatString):""}}}};/*!
|
|
68
68
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
69
69
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
70
70
|
* Copyright 2024 Fonticons, Inc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bF as Q,aO as ue,aB as ce,ak as A,aq as v,ar as k,_ as M,d as _,b2 as ke,a as N,bR as K,am as de,c as X,i as U,o as y,j as R,b as w,r as $,F as Ee,v as Ce,c9 as pe,e as t,n as m,y as g,t as q,ai as B,k as L,E as D,cp as $e,x as Z,f as Re,cq as Fe,cr as Pe,b4 as Le,b8 as we,cs as Se,cf as Te,ao as Ue,aD as W,ct as x,cu as _e,aM as Oe,ax as ee,bO as De,ap as Be,an as je,aP as qe,bf as te,az as se,g as Ne}from"./index-DTl1vwTk.js";import{E as Ae}from"./index-DKKcEDCT.js";import{m as J,c as Me}from"./typescript-DSwEcZQ6.js";import{b as Ke}from"./_baseClone-CBtznGVq.js";import{i as He}from"./isEqual-DTFQVxFI.js";var ze=1,Ie=4;function ae(o){return Ke(o,ze|Ie)}const fe=Symbol("uploadContextKey"),Ge="ElUpload";class Ve extends Error{constructor(l,a,d,i){super(l),this.name="UploadAjaxError",this.status=a,this.method=d,this.url=i}}function oe(o,l,a){let d;return a.response?d=`${a.response.error||a.response}`:a.responseText?d=`${a.responseText}`:d=`fail to ${l.method} ${o} ${a.status}`,new Ve(d,a.status,l.method,o)}function Xe(o){const l=o.responseText||o.response;if(!l)return l;try{return JSON.parse(l)}catch{return l}}const We=o=>{typeof XMLHttpRequest>"u"&&Q(Ge,"XMLHttpRequest is undefined");const l=new XMLHttpRequest,a=o.action;l.upload&&l.upload.addEventListener("progress",c=>{const f=c;f.percent=c.total>0?c.loaded/c.total*100:0,o.onProgress(f)});const d=new FormData;if(o.data)for(const[c,f]of Object.entries(o.data))ue(f)&&f.length?d.append(c,...f):d.append(c,f);d.append(o.filename,o.file,o.file.name),l.addEventListener("error",()=>{o.onError(oe(a,o,l))}),l.addEventListener("load",()=>{if(l.status<200||l.status>=300)return o.onError(oe(a,o,l));o.onSuccess(Xe(l))}),l.open(o.method,a,!0),o.withCredentials&&"withCredentials"in l&&(l.withCredentials=!0);const i=o.headers||{};if(i instanceof Headers)i.forEach((c,f)=>l.setRequestHeader(f,c));else for(const[c,f]of Object.entries(i))ce(f)||l.setRequestHeader(c,String(f));return l.send(d),l},ve=["text","picture","picture-card"];let Je=1;const Y=()=>Date.now()+Je++,me=A({action:{type:String,default:"#"},headers:{type:v(Object)},method:{type:String,default:"post"},data:{type:v([Object,Function,Promise]),default:()=>J({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:v(Array),default:()=>J([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:ve,default:"text"},httpRequest:{type:v(Function),default:We},disabled:Boolean,limit:Number}),Ye=A({...me,beforeUpload:{type:v(Function),default:k},beforeRemove:{type:v(Function)},onRemove:{type:v(Function),default:k},onChange:{type:v(Function),default:k},onPreview:{type:v(Function),default:k},onSuccess:{type:v(Function),default:k},onProgress:{type:v(Function),default:k},onError:{type:v(Function),default:k},onExceed:{type:v(Function),default:k},crossorigin:{type:v(String)}}),Qe=A({files:{type:v(Array),default:()=>J([])},disabled:Boolean,handlePreview:{type:v(Function),default:k},listType:{type:String,values:ve,default:"text"},crossorigin:{type:v(String)}}),Ze={remove:o=>!!o},xe=_({name:"ElUploadList"}),et=_({...xe,props:Qe,emits:Ze,setup(o,{emit:l}){const a=o,{t:d}=ke(),i=N("upload"),c=N("icon"),f=N("list"),C=K(),h=de(!1),b=X(()=>[i.b("list"),i.bm("list",a.listType),i.is("disabled",a.disabled)]),E=p=>{l("remove",p)};return(p,S)=>(y(),U(Te,{tag:"ul",class:m(t(b)),name:t(f).b()},{default:R(()=>[(y(!0),w(Ee,null,Ce(p.files,(s,n)=>(y(),w("li",{key:s.uid||s.name,class:m([t(i).be("list","item"),t(i).is(s.status),{focusing:h.value}]),tabindex:"0",onKeydown:pe(e=>!t(C)&&E(s),["delete"]),onFocus:e=>h.value=!0,onBlur:e=>h.value=!1,onClick:e=>h.value=!1},[$(p.$slots,"default",{file:s,index:n},()=>[p.listType==="picture"||s.status!=="uploading"&&p.listType==="picture-card"?(y(),w("img",{key:0,class:m(t(i).be("list","item-thumbnail")),src:s.url,crossorigin:p.crossorigin,alt:""},null,10,["src","crossorigin"])):g("v-if",!0),s.status==="uploading"||p.listType!=="picture-card"?(y(),w("div",{key:1,class:m(t(i).be("list","item-info"))},[q("a",{class:m(t(i).be("list","item-name")),onClick:B(e=>p.handlePreview(s),["prevent"])},[L(t(D),{class:m(t(c).m("document"))},{default:R(()=>[L(t($e))]),_:1},8,["class"]),q("span",{class:m(t(i).be("list","item-file-name")),title:s.name},Z(s.name),11,["title"])],10,["onClick"]),s.status==="uploading"?(y(),U(t(Ae),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(s.percentage),style:Re(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):g("v-if",!0)],2)):g("v-if",!0),q("label",{class:m(t(i).be("list","item-status-label"))},[p.listType==="text"?(y(),U(t(D),{key:0,class:m([t(c).m("upload-success"),t(c).m("circle-check")])},{default:R(()=>[L(t(Fe))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(y(),U(t(D),{key:1,class:m([t(c).m("upload-success"),t(c).m("check")])},{default:R(()=>[L(t(Pe))]),_:1},8,["class"])):g("v-if",!0)],2),t(C)?g("v-if",!0):(y(),U(t(D),{key:2,class:m(t(c).m("close")),onClick:e=>E(s)},{default:R(()=>[L(t(Le))]),_:2},1032,["class","onClick"])),g(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),g(" This is a bug which needs to be fixed "),g(" TODO: Fix the incorrect navigation interaction "),t(C)?g("v-if",!0):(y(),w("i",{key:3,class:m(t(c).m("close-tip"))},Z(t(d)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(y(),w("span",{key:4,class:m(t(i).be("list","item-actions"))},[q("span",{class:m(t(i).be("list","item-preview")),onClick:e=>p.handlePreview(s)},[L(t(D),{class:m(t(c).m("zoom-in"))},{default:R(()=>[L(t(we))]),_:1},8,["class"])],10,["onClick"]),t(C)?g("v-if",!0):(y(),w("span",{key:0,class:m(t(i).be("list","item-delete")),onClick:e=>E(s)},[L(t(D),{class:m(t(c).m("delete"))},{default:R(()=>[L(t(Se))]),_:1},8,["class"])],10,["onClick"]))],2)):g("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),$(p.$slots,"append")]),_:3},8,["class","name"]))}});var ne=M(et,[["__file","upload-list.vue"]]);const tt=A({disabled:Boolean}),st={file:o=>ue(o)},ye="ElUploadDrag",at=_({name:ye}),ot=_({...at,props:tt,emits:st,setup(o,{emit:l}){Ue(fe)||Q(ye,"usage: <el-upload><el-upload-dragger /></el-upload>");const d=N("upload"),i=de(!1),c=K(),f=b=>{if(c.value)return;i.value=!1,b.stopPropagation();const E=Array.from(b.dataTransfer.files),p=b.dataTransfer.items||[];E.forEach((S,s)=>{var n;const e=p[s],u=(n=e?.webkitGetAsEntry)==null?void 0:n.call(e);u&&(S.isDirectory=u.isDirectory)}),l("file",E)},C=()=>{c.value||(i.value=!0)},h=b=>{b.currentTarget.contains(b.relatedTarget)||(i.value=!1)};return(b,E)=>(y(),w("div",{class:m([t(d).b("dragger"),t(d).is("dragover",i.value)]),onDrop:B(f,["prevent"]),onDragover:B(C,["prevent"]),onDragleave:B(h,["prevent"])},[$(b.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var nt=M(ot,[["__file","upload-dragger.vue"]]);const rt=A({...me,beforeUpload:{type:v(Function),default:k},onRemove:{type:v(Function),default:k},onStart:{type:v(Function),default:k},onSuccess:{type:v(Function),default:k},onProgress:{type:v(Function),default:k},onError:{type:v(Function),default:k},onExceed:{type:v(Function),default:k}}),lt=_({name:"ElUploadContent",inheritAttrs:!1}),it=_({...lt,props:rt,setup(o,{expose:l}){const a=o,d=N("upload"),i=K(),c=W({}),f=W(),C=e=>{if(e.length===0)return;const{autoUpload:u,limit:r,fileList:F,multiple:P,onStart:T,onExceed:H}=a;if(r&&F.length+e.length>r){H(e,F);return}P||(e=e.slice(0,1));for(const z of e){const j=z;j.uid=Y(),T(j),u&&h(j)}},h=async e=>{if(f.value.value="",!a.beforeUpload)return E(e);let u,r={};try{const P=a.data,T=a.beforeUpload(e);r=x(a.data)?ae(a.data):a.data,u=await T,x(a.data)&&He(P,r)&&(r=ae(a.data))}catch{u=!1}if(u===!1){a.onRemove(e);return}let F=e;u instanceof Blob&&(u instanceof File?F=u:F=new File([u],e.name,{type:e.type})),E(Object.assign(F,{uid:e.uid}),r)},b=async(e,u)=>Oe(e)?e(u):e,E=async(e,u)=>{const{headers:r,data:F,method:P,withCredentials:T,name:H,action:z,onProgress:j,onSuccess:ge,onError:be,httpRequest:he}=a;try{u=await b(u??F,e)}catch{a.onRemove(e);return}const{uid:I}=e,G={headers:r||{},withCredentials:T,file:e,data:u,method:P,filename:H,action:z,onProgress:O=>{j(O,e)},onSuccess:O=>{ge(O,e),delete c.value[I]},onError:O=>{be(O,e),delete c.value[I]}},V=he(G);c.value[I]=V,V instanceof Promise&&V.then(G.onSuccess,G.onError)},p=e=>{const u=e.target.files;u&&C(Array.from(u))},S=()=>{i.value||(f.value.value="",f.value.click())},s=()=>{S()};return l({abort:e=>{_e(c.value).filter(e?([r])=>String(e.uid)===r:()=>!0).forEach(([r,F])=>{F instanceof XMLHttpRequest&&F.abort(),delete c.value[r]})},upload:h}),(e,u)=>(y(),w("div",{class:m([t(d).b(),t(d).m(e.listType),t(d).is("drag",e.drag),t(d).is("disabled",t(i))]),tabindex:t(i)?"-1":"0",onClick:S,onKeydown:pe(B(s,["self"]),["enter","space"])},[e.drag?(y(),U(nt,{key:0,disabled:t(i),onFile:C},{default:R(()=>[$(e.$slots,"default")]),_:3},8,["disabled"])):$(e.$slots,"default",{key:1}),q("input",{ref_key:"inputRef",ref:f,class:m(t(d).e("input")),name:e.name,disabled:t(i),multiple:e.multiple,accept:e.accept,type:"file",onChange:p,onClick:B(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var re=M(it,[["__file","upload-content.vue"]]);const le="ElUpload",ie=o=>{var l;(l=o.url)!=null&&l.startsWith("blob:")&&URL.revokeObjectURL(o.url)},ut=(o,l)=>{const a=Me(o,"fileList",void 0,{passive:!0}),d=s=>a.value.find(n=>n.uid===s.uid);function i(s){var n;(n=l.value)==null||n.abort(s)}function c(s=["ready","uploading","success","fail"]){a.value=a.value.filter(n=>!s.includes(n.status))}function f(s){a.value=a.value.filter(n=>n.uid!==s.uid)}const C=(s,n)=>{const e=d(n);e&&(console.error(s),e.status="fail",f(e),o.onError(s,e,a.value),o.onChange(e,a.value))},h=(s,n)=>{const e=d(n);e&&(o.onProgress(s,e,a.value),e.status="uploading",e.percentage=Math.round(s.percent))},b=(s,n)=>{const e=d(n);e&&(e.status="success",e.response=s,o.onSuccess(s,e,a.value),o.onChange(e,a.value))},E=s=>{ce(s.uid)&&(s.uid=Y());const n={name:s.name,percentage:0,status:"ready",size:s.size,raw:s,uid:s.uid};if(o.listType==="picture-card"||o.listType==="picture")try{n.url=URL.createObjectURL(s)}catch(e){De(le,e.message),o.onError(e,n,a.value)}a.value=[...a.value,n],o.onChange(n,a.value)},p=async s=>{const n=s instanceof File?d(s):s;n||Q(le,"file to be removed not found");const e=u=>{i(u),f(u),o.onRemove(u,a.value),ie(u)};o.beforeRemove?await o.beforeRemove(n,a.value)!==!1&&e(n):e(n)};function S(){a.value.filter(({status:s})=>s==="ready").forEach(({raw:s})=>{var n;return s&&((n=l.value)==null?void 0:n.upload(s))})}return ee(()=>o.listType,s=>{s!=="picture-card"&&s!=="picture"||(a.value=a.value.map(n=>{const{raw:e,url:u}=n;if(!u&&e)try{n.url=URL.createObjectURL(e)}catch(r){o.onError(r,n,a.value)}return n}))}),ee(a,s=>{for(const n of s)n.uid||(n.uid=Y()),n.status||(n.status="success")},{immediate:!0,deep:!0}),{uploadFiles:a,abort:i,clearFiles:c,handleError:C,handleProgress:h,handleStart:E,handleSuccess:b,handleRemove:p,submit:S,revokeFileObjectURL:ie}},ct=_({name:"ElUpload"}),dt=_({...ct,props:Ye,setup(o,{expose:l}){const a=o,d=K(),i=W(),{abort:c,submit:f,clearFiles:C,uploadFiles:h,handleStart:b,handleError:E,handleRemove:p,handleSuccess:S,handleProgress:s,revokeFileObjectURL:n}=ut(a,i),e=X(()=>a.listType==="picture-card"),u=X(()=>({...a,fileList:h.value,onStart:b,onProgress:s,onSuccess:S,onError:E,onRemove:p}));return Be(()=>{h.value.forEach(n)}),je(fe,{accept:qe(a,"accept")}),l({abort:c,submit:f,clearFiles:C,handleStart:b,handleRemove:p}),(r,F)=>(y(),w("div",null,[t(e)&&r.showFileList?(y(),U(ne,{key:0,disabled:t(d),"list-type":r.listType,files:t(h),crossorigin:r.crossorigin,"handle-preview":r.onPreview,onRemove:t(p)},te({append:R(()=>[L(re,se({ref_key:"uploadRef",ref:i},t(u)),{default:R(()=>[r.$slots.trigger?$(r.$slots,"trigger",{key:0}):g("v-if",!0),!r.$slots.trigger&&r.$slots.default?$(r.$slots,"default",{key:1}):g("v-if",!0)]),_:3},16)]),_:2},[r.$slots.file?{name:"default",fn:R(({file:P,index:T})=>[$(r.$slots,"file",{file:P,index:T})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):g("v-if",!0),!t(e)||t(e)&&!r.showFileList?(y(),U(re,se({key:1,ref_key:"uploadRef",ref:i},t(u)),{default:R(()=>[r.$slots.trigger?$(r.$slots,"trigger",{key:0}):g("v-if",!0),!r.$slots.trigger&&r.$slots.default?$(r.$slots,"default",{key:1}):g("v-if",!0)]),_:3},16)):g("v-if",!0),r.$slots.trigger?$(r.$slots,"default",{key:2}):g("v-if",!0),$(r.$slots,"tip"),!t(e)&&r.showFileList?(y(),U(ne,{key:3,disabled:t(d),"list-type":r.listType,files:t(h),crossorigin:r.crossorigin,"handle-preview":r.onPreview,onRemove:t(p)},te({_:2},[r.$slots.file?{name:"default",fn:R(({file:P,index:T})=>[$(r.$slots,"file",{file:P,index:T})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):g("v-if",!0)]))}});var pt=M(dt,[["__file","upload.vue"]]);const bt=Ne(pt);export{bt as E};
|
|
1
|
+
import{bF as Q,aO as ue,aB as ce,ak as A,aq as v,ar as k,_ as M,d as _,b2 as ke,a as N,bR as K,am as de,c as X,i as U,o as y,j as R,b as w,r as $,F as Ee,v as Ce,c9 as pe,e as t,n as m,y as g,t as q,ai as B,k as L,E as D,cp as $e,x as Z,f as Re,cq as Fe,cr as Pe,b4 as Le,b8 as we,cs as Se,cf as Te,ao as Ue,aD as W,ct as x,cu as _e,aM as Oe,ax as ee,bO as De,ap as Be,an as je,aP as qe,bf as te,az as se,g as Ne}from"./index-D-Kq9yA_.js";import{E as Ae}from"./index-DLCeq8hw.js";import{m as J,c as Me}from"./typescript-CbXledGi.js";import{b as Ke}from"./_baseClone-D_93k3Nh.js";import{i as He}from"./isEqual-B9PwPc7o.js";var ze=1,Ie=4;function ae(o){return Ke(o,ze|Ie)}const fe=Symbol("uploadContextKey"),Ge="ElUpload";class Ve extends Error{constructor(l,a,d,i){super(l),this.name="UploadAjaxError",this.status=a,this.method=d,this.url=i}}function oe(o,l,a){let d;return a.response?d=`${a.response.error||a.response}`:a.responseText?d=`${a.responseText}`:d=`fail to ${l.method} ${o} ${a.status}`,new Ve(d,a.status,l.method,o)}function Xe(o){const l=o.responseText||o.response;if(!l)return l;try{return JSON.parse(l)}catch{return l}}const We=o=>{typeof XMLHttpRequest>"u"&&Q(Ge,"XMLHttpRequest is undefined");const l=new XMLHttpRequest,a=o.action;l.upload&&l.upload.addEventListener("progress",c=>{const f=c;f.percent=c.total>0?c.loaded/c.total*100:0,o.onProgress(f)});const d=new FormData;if(o.data)for(const[c,f]of Object.entries(o.data))ue(f)&&f.length?d.append(c,...f):d.append(c,f);d.append(o.filename,o.file,o.file.name),l.addEventListener("error",()=>{o.onError(oe(a,o,l))}),l.addEventListener("load",()=>{if(l.status<200||l.status>=300)return o.onError(oe(a,o,l));o.onSuccess(Xe(l))}),l.open(o.method,a,!0),o.withCredentials&&"withCredentials"in l&&(l.withCredentials=!0);const i=o.headers||{};if(i instanceof Headers)i.forEach((c,f)=>l.setRequestHeader(f,c));else for(const[c,f]of Object.entries(i))ce(f)||l.setRequestHeader(c,String(f));return l.send(d),l},ve=["text","picture","picture-card"];let Je=1;const Y=()=>Date.now()+Je++,me=A({action:{type:String,default:"#"},headers:{type:v(Object)},method:{type:String,default:"post"},data:{type:v([Object,Function,Promise]),default:()=>J({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:v(Array),default:()=>J([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:ve,default:"text"},httpRequest:{type:v(Function),default:We},disabled:Boolean,limit:Number}),Ye=A({...me,beforeUpload:{type:v(Function),default:k},beforeRemove:{type:v(Function)},onRemove:{type:v(Function),default:k},onChange:{type:v(Function),default:k},onPreview:{type:v(Function),default:k},onSuccess:{type:v(Function),default:k},onProgress:{type:v(Function),default:k},onError:{type:v(Function),default:k},onExceed:{type:v(Function),default:k},crossorigin:{type:v(String)}}),Qe=A({files:{type:v(Array),default:()=>J([])},disabled:Boolean,handlePreview:{type:v(Function),default:k},listType:{type:String,values:ve,default:"text"},crossorigin:{type:v(String)}}),Ze={remove:o=>!!o},xe=_({name:"ElUploadList"}),et=_({...xe,props:Qe,emits:Ze,setup(o,{emit:l}){const a=o,{t:d}=ke(),i=N("upload"),c=N("icon"),f=N("list"),C=K(),h=de(!1),b=X(()=>[i.b("list"),i.bm("list",a.listType),i.is("disabled",a.disabled)]),E=p=>{l("remove",p)};return(p,S)=>(y(),U(Te,{tag:"ul",class:m(t(b)),name:t(f).b()},{default:R(()=>[(y(!0),w(Ee,null,Ce(p.files,(s,n)=>(y(),w("li",{key:s.uid||s.name,class:m([t(i).be("list","item"),t(i).is(s.status),{focusing:h.value}]),tabindex:"0",onKeydown:pe(e=>!t(C)&&E(s),["delete"]),onFocus:e=>h.value=!0,onBlur:e=>h.value=!1,onClick:e=>h.value=!1},[$(p.$slots,"default",{file:s,index:n},()=>[p.listType==="picture"||s.status!=="uploading"&&p.listType==="picture-card"?(y(),w("img",{key:0,class:m(t(i).be("list","item-thumbnail")),src:s.url,crossorigin:p.crossorigin,alt:""},null,10,["src","crossorigin"])):g("v-if",!0),s.status==="uploading"||p.listType!=="picture-card"?(y(),w("div",{key:1,class:m(t(i).be("list","item-info"))},[q("a",{class:m(t(i).be("list","item-name")),onClick:B(e=>p.handlePreview(s),["prevent"])},[L(t(D),{class:m(t(c).m("document"))},{default:R(()=>[L(t($e))]),_:1},8,["class"]),q("span",{class:m(t(i).be("list","item-file-name")),title:s.name},Z(s.name),11,["title"])],10,["onClick"]),s.status==="uploading"?(y(),U(t(Ae),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(s.percentage),style:Re(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):g("v-if",!0)],2)):g("v-if",!0),q("label",{class:m(t(i).be("list","item-status-label"))},[p.listType==="text"?(y(),U(t(D),{key:0,class:m([t(c).m("upload-success"),t(c).m("circle-check")])},{default:R(()=>[L(t(Fe))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(y(),U(t(D),{key:1,class:m([t(c).m("upload-success"),t(c).m("check")])},{default:R(()=>[L(t(Pe))]),_:1},8,["class"])):g("v-if",!0)],2),t(C)?g("v-if",!0):(y(),U(t(D),{key:2,class:m(t(c).m("close")),onClick:e=>E(s)},{default:R(()=>[L(t(Le))]),_:2},1032,["class","onClick"])),g(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),g(" This is a bug which needs to be fixed "),g(" TODO: Fix the incorrect navigation interaction "),t(C)?g("v-if",!0):(y(),w("i",{key:3,class:m(t(c).m("close-tip"))},Z(t(d)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(y(),w("span",{key:4,class:m(t(i).be("list","item-actions"))},[q("span",{class:m(t(i).be("list","item-preview")),onClick:e=>p.handlePreview(s)},[L(t(D),{class:m(t(c).m("zoom-in"))},{default:R(()=>[L(t(we))]),_:1},8,["class"])],10,["onClick"]),t(C)?g("v-if",!0):(y(),w("span",{key:0,class:m(t(i).be("list","item-delete")),onClick:e=>E(s)},[L(t(D),{class:m(t(c).m("delete"))},{default:R(()=>[L(t(Se))]),_:1},8,["class"])],10,["onClick"]))],2)):g("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),$(p.$slots,"append")]),_:3},8,["class","name"]))}});var ne=M(et,[["__file","upload-list.vue"]]);const tt=A({disabled:Boolean}),st={file:o=>ue(o)},ye="ElUploadDrag",at=_({name:ye}),ot=_({...at,props:tt,emits:st,setup(o,{emit:l}){Ue(fe)||Q(ye,"usage: <el-upload><el-upload-dragger /></el-upload>");const d=N("upload"),i=de(!1),c=K(),f=b=>{if(c.value)return;i.value=!1,b.stopPropagation();const E=Array.from(b.dataTransfer.files),p=b.dataTransfer.items||[];E.forEach((S,s)=>{var n;const e=p[s],u=(n=e?.webkitGetAsEntry)==null?void 0:n.call(e);u&&(S.isDirectory=u.isDirectory)}),l("file",E)},C=()=>{c.value||(i.value=!0)},h=b=>{b.currentTarget.contains(b.relatedTarget)||(i.value=!1)};return(b,E)=>(y(),w("div",{class:m([t(d).b("dragger"),t(d).is("dragover",i.value)]),onDrop:B(f,["prevent"]),onDragover:B(C,["prevent"]),onDragleave:B(h,["prevent"])},[$(b.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var nt=M(ot,[["__file","upload-dragger.vue"]]);const rt=A({...me,beforeUpload:{type:v(Function),default:k},onRemove:{type:v(Function),default:k},onStart:{type:v(Function),default:k},onSuccess:{type:v(Function),default:k},onProgress:{type:v(Function),default:k},onError:{type:v(Function),default:k},onExceed:{type:v(Function),default:k}}),lt=_({name:"ElUploadContent",inheritAttrs:!1}),it=_({...lt,props:rt,setup(o,{expose:l}){const a=o,d=N("upload"),i=K(),c=W({}),f=W(),C=e=>{if(e.length===0)return;const{autoUpload:u,limit:r,fileList:F,multiple:P,onStart:T,onExceed:H}=a;if(r&&F.length+e.length>r){H(e,F);return}P||(e=e.slice(0,1));for(const z of e){const j=z;j.uid=Y(),T(j),u&&h(j)}},h=async e=>{if(f.value.value="",!a.beforeUpload)return E(e);let u,r={};try{const P=a.data,T=a.beforeUpload(e);r=x(a.data)?ae(a.data):a.data,u=await T,x(a.data)&&He(P,r)&&(r=ae(a.data))}catch{u=!1}if(u===!1){a.onRemove(e);return}let F=e;u instanceof Blob&&(u instanceof File?F=u:F=new File([u],e.name,{type:e.type})),E(Object.assign(F,{uid:e.uid}),r)},b=async(e,u)=>Oe(e)?e(u):e,E=async(e,u)=>{const{headers:r,data:F,method:P,withCredentials:T,name:H,action:z,onProgress:j,onSuccess:ge,onError:be,httpRequest:he}=a;try{u=await b(u??F,e)}catch{a.onRemove(e);return}const{uid:I}=e,G={headers:r||{},withCredentials:T,file:e,data:u,method:P,filename:H,action:z,onProgress:O=>{j(O,e)},onSuccess:O=>{ge(O,e),delete c.value[I]},onError:O=>{be(O,e),delete c.value[I]}},V=he(G);c.value[I]=V,V instanceof Promise&&V.then(G.onSuccess,G.onError)},p=e=>{const u=e.target.files;u&&C(Array.from(u))},S=()=>{i.value||(f.value.value="",f.value.click())},s=()=>{S()};return l({abort:e=>{_e(c.value).filter(e?([r])=>String(e.uid)===r:()=>!0).forEach(([r,F])=>{F instanceof XMLHttpRequest&&F.abort(),delete c.value[r]})},upload:h}),(e,u)=>(y(),w("div",{class:m([t(d).b(),t(d).m(e.listType),t(d).is("drag",e.drag),t(d).is("disabled",t(i))]),tabindex:t(i)?"-1":"0",onClick:S,onKeydown:pe(B(s,["self"]),["enter","space"])},[e.drag?(y(),U(nt,{key:0,disabled:t(i),onFile:C},{default:R(()=>[$(e.$slots,"default")]),_:3},8,["disabled"])):$(e.$slots,"default",{key:1}),q("input",{ref_key:"inputRef",ref:f,class:m(t(d).e("input")),name:e.name,disabled:t(i),multiple:e.multiple,accept:e.accept,type:"file",onChange:p,onClick:B(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var re=M(it,[["__file","upload-content.vue"]]);const le="ElUpload",ie=o=>{var l;(l=o.url)!=null&&l.startsWith("blob:")&&URL.revokeObjectURL(o.url)},ut=(o,l)=>{const a=Me(o,"fileList",void 0,{passive:!0}),d=s=>a.value.find(n=>n.uid===s.uid);function i(s){var n;(n=l.value)==null||n.abort(s)}function c(s=["ready","uploading","success","fail"]){a.value=a.value.filter(n=>!s.includes(n.status))}function f(s){a.value=a.value.filter(n=>n.uid!==s.uid)}const C=(s,n)=>{const e=d(n);e&&(console.error(s),e.status="fail",f(e),o.onError(s,e,a.value),o.onChange(e,a.value))},h=(s,n)=>{const e=d(n);e&&(o.onProgress(s,e,a.value),e.status="uploading",e.percentage=Math.round(s.percent))},b=(s,n)=>{const e=d(n);e&&(e.status="success",e.response=s,o.onSuccess(s,e,a.value),o.onChange(e,a.value))},E=s=>{ce(s.uid)&&(s.uid=Y());const n={name:s.name,percentage:0,status:"ready",size:s.size,raw:s,uid:s.uid};if(o.listType==="picture-card"||o.listType==="picture")try{n.url=URL.createObjectURL(s)}catch(e){De(le,e.message),o.onError(e,n,a.value)}a.value=[...a.value,n],o.onChange(n,a.value)},p=async s=>{const n=s instanceof File?d(s):s;n||Q(le,"file to be removed not found");const e=u=>{i(u),f(u),o.onRemove(u,a.value),ie(u)};o.beforeRemove?await o.beforeRemove(n,a.value)!==!1&&e(n):e(n)};function S(){a.value.filter(({status:s})=>s==="ready").forEach(({raw:s})=>{var n;return s&&((n=l.value)==null?void 0:n.upload(s))})}return ee(()=>o.listType,s=>{s!=="picture-card"&&s!=="picture"||(a.value=a.value.map(n=>{const{raw:e,url:u}=n;if(!u&&e)try{n.url=URL.createObjectURL(e)}catch(r){o.onError(r,n,a.value)}return n}))}),ee(a,s=>{for(const n of s)n.uid||(n.uid=Y()),n.status||(n.status="success")},{immediate:!0,deep:!0}),{uploadFiles:a,abort:i,clearFiles:c,handleError:C,handleProgress:h,handleStart:E,handleSuccess:b,handleRemove:p,submit:S,revokeFileObjectURL:ie}},ct=_({name:"ElUpload"}),dt=_({...ct,props:Ye,setup(o,{expose:l}){const a=o,d=K(),i=W(),{abort:c,submit:f,clearFiles:C,uploadFiles:h,handleStart:b,handleError:E,handleRemove:p,handleSuccess:S,handleProgress:s,revokeFileObjectURL:n}=ut(a,i),e=X(()=>a.listType==="picture-card"),u=X(()=>({...a,fileList:h.value,onStart:b,onProgress:s,onSuccess:S,onError:E,onRemove:p}));return Be(()=>{h.value.forEach(n)}),je(fe,{accept:qe(a,"accept")}),l({abort:c,submit:f,clearFiles:C,handleStart:b,handleRemove:p}),(r,F)=>(y(),w("div",null,[t(e)&&r.showFileList?(y(),U(ne,{key:0,disabled:t(d),"list-type":r.listType,files:t(h),crossorigin:r.crossorigin,"handle-preview":r.onPreview,onRemove:t(p)},te({append:R(()=>[L(re,se({ref_key:"uploadRef",ref:i},t(u)),{default:R(()=>[r.$slots.trigger?$(r.$slots,"trigger",{key:0}):g("v-if",!0),!r.$slots.trigger&&r.$slots.default?$(r.$slots,"default",{key:1}):g("v-if",!0)]),_:3},16)]),_:2},[r.$slots.file?{name:"default",fn:R(({file:P,index:T})=>[$(r.$slots,"file",{file:P,index:T})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):g("v-if",!0),!t(e)||t(e)&&!r.showFileList?(y(),U(re,se({key:1,ref_key:"uploadRef",ref:i},t(u)),{default:R(()=>[r.$slots.trigger?$(r.$slots,"trigger",{key:0}):g("v-if",!0),!r.$slots.trigger&&r.$slots.default?$(r.$slots,"default",{key:1}):g("v-if",!0)]),_:3},16)):g("v-if",!0),r.$slots.trigger?$(r.$slots,"default",{key:2}):g("v-if",!0),$(r.$slots,"tip"),!t(e)&&r.showFileList?(y(),U(ne,{key:3,disabled:t(d),"list-type":r.listType,files:t(h),crossorigin:r.crossorigin,"handle-preview":r.onPreview,onRemove:t(p)},te({_:2},[r.$slots.file?{name:"default",fn:R(({file:P,index:T})=>[$(r.$slots,"file",{file:P,index:T})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):g("v-if",!0)]))}});var pt=M(dt,[["__file","upload.vue"]]);const bt=Ne(pt);export{bt as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bG as $,ak as I,bc as P,cx as E,_ as V,d as S,u as F,a as O,am as U,c as g,aP as d,aC as j,i,o,j as u,J as z,t as h,n as a,e,y as r,E as b,r as m,b9 as G,b as c,D as w,x as y,F as J,k as K,cy as M,K as R,aU as _,g as q}from"./index-
|
|
1
|
+
import{bG as $,ak as I,bc as P,cx as E,_ as V,d as S,u as F,a as O,am as U,c as g,aP as d,aC as j,i,o,j as u,J as z,t as h,n as a,e,y as r,E as b,r as m,b9 as G,b as c,D as w,x as y,F as J,k as K,cy as M,K as R,aU as _,g as q}from"./index-D-Kq9yA_.js";import{d as H,e as L}from"./index-j_uZdGZu.js";const Q=["light","dark"],W=I({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:P(E),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Q,default:"light"},...H}),X={open:()=>!0,close:n=>$(n)||n instanceof Event},Y=S({name:"ElAlert"}),Z=S({...Y,props:W,emits:X,setup(n,{emit:v}){const l=n,{Close:T}=M,A=F(),t=O("alert"),p=U(!1),C=g(()=>E[l.type]),f=g(()=>!!(l.description||A.default)),B=()=>{p.value=!0,v("open")},k=s=>{p.value=!1,v("close",s)},{onOpen:D,onClose:N}=L({showAfter:d(l,"showAfter"),hideAfter:d(l,"hideAfter"),autoClose:d(l,"autoClose"),open:B,close:k});return j&&D(),(s,ee)=>(o(),i(_,{name:e(t).b("fade"),persisted:""},{default:u(()=>[z(h("div",{class:a([e(t).b(),e(t).m(s.type),e(t).is("center",s.center),e(t).is(s.effect)]),role:"alert"},[s.showIcon&&(s.$slots.icon||e(C))?(o(),i(e(b),{key:0,class:a([e(t).e("icon"),{[e(t).is("big")]:e(f)}])},{default:u(()=>[m(s.$slots,"icon",{},()=>[(o(),i(G(e(C))))])]),_:3},8,["class"])):r("v-if",!0),h("div",{class:a(e(t).e("content"))},[s.title||s.$slots.title?(o(),c("span",{key:0,class:a([e(t).e("title"),{"with-description":e(f)}])},[m(s.$slots,"title",{},()=>[w(y(s.title),1)])],2)):r("v-if",!0),e(f)?(o(),c("p",{key:1,class:a(e(t).e("description"))},[m(s.$slots,"default",{},()=>[w(y(s.description),1)])],2)):r("v-if",!0),s.closable?(o(),c(J,{key:2},[s.closeText?(o(),c("div",{key:0,class:a([e(t).e("close-btn"),e(t).is("customed")]),onClick:k},y(s.closeText),3)):(o(),i(e(b),{key:1,class:a(e(t).e("close-btn")),onClick:e(N)},{default:u(()=>[K(e(T))]),_:1},8,["class","onClick"]))],64)):r("v-if",!0)],2)],2),[[R,p.value]])]),_:3},8,["name"]))}});var x=V(Z,[["__file","alert.vue"]]);const oe=q(x);export{oe as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ak as A,aq as b,_ as V,d as T,a as q,c as o,cM as O,cq as j,co as R,cr as U,b4 as G,aM as H,bi as B,b as c,o as l,y as C,n as i,e as t,t as y,f,r as N,x as D,i as I,j as J,b9 as K,E as Q,g as X}from"./index-
|
|
1
|
+
import{ak as A,aq as b,_ as V,d as T,a as q,c as o,cM as O,cq as j,co as R,cr as U,b4 as G,aM as H,bi as B,b as c,o as l,y as C,n as i,e as t,t as y,f,r as N,x as D,i as I,j as J,b9 as K,E as Q,g as X}from"./index-D-Kq9yA_.js";const Y=A({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:u=>u>=0&&u<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:b(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:b([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:b(Function),default:u=>`${u}%`}}),Z=T({name:"ElProgress"}),_=T({...Z,props:Y,setup(u){const s=u,m={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},a=q("progress"),F=o(()=>{const e={width:`${s.percentage}%`,animationDuration:`${s.duration}s`},r=P(s.percentage);return r.includes("gradient")?e.background=r:e.backgroundColor=r,e}),g=o(()=>(s.strokeWidth/s.width*100).toFixed(1)),v=o(()=>["circle","dashboard"].includes(s.type)?Number.parseInt(`${50-Number.parseFloat(g.value)/2}`,10):0),w=o(()=>{const e=v.value,r=s.type==="dashboard";return`
|
|
2
2
|
M 50 50
|
|
3
3
|
m 0 ${r?"":"-"}${e}
|
|
4
4
|
a ${e} ${e} 0 1 1 0 ${r?"-":""}${e*2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as ce}from"./index-D-Djt1gp.js";import{c as k,O as Te,E as $e,w as ie}from"./index-BsOJkwLq.js";import{E as Fe}from"./index-Cch9iD7z.js";import{ak as Re,aq as Q,_ as M,d as A,r as P,am as T,ao as C,c as y,e as O,an as V,aP as U,aY as Se,ax as pe,l as w,i as z,o as N,j as m,k as R,bg as Oe,bh as ke,b as W,y as Z,bf as Ne,az as j,n as q,A as Pe,E as fe,a as ee,b2 as De,bo as Be,bp as Ke,aX as ve,ap as Le,aL as me,aJ as H,bd as Me,t as Ae,b9 as Ge,ai as x,F as ze,bq as be,f as Ye,br as Ue,g as He,w as ge}from"./index-DTl1vwTk.js";import{a as Je}from"./typescript-DSwEcZQ6.js";import{c as Ve,d as We,E as je,a as we,C as qe,b as Xe,e as Qe,f as Ze,g as xe,F as eo,L as oo}from"./dropdown-B7GZa7BN.js";import{c as no}from"./castArray-BLVLWkbO.js";const to=Re({style:{type:Q([String,Array,Object])},currentTabId:{type:Q(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Q(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ro,ElCollectionItem:lo,COLLECTION_INJECTION_KEY:oe,COLLECTION_ITEM_INJECTION_KEY:so}=Ve("RovingFocusGroup"),ne=Symbol("elRovingFocusGroup"),_e=Symbol("elRovingFocusGroupItem"),ao={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},io=(e,n)=>e,uo=(e,n,d)=>{const r=io(e.code);return ao[r]},co=(e,n)=>e.map((d,r)=>e[(r+n)%e.length]),te=e=>{const{activeElement:n}=document;for(const d of e)if(d===n||(d.focus(),n!==document.activeElement))return},de="currentTabIdChange",ue="rovingFocusGroup.entryFocus",po={bubbles:!1,cancelable:!0},fo=A({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:to,emits:[de,"entryFocus"],setup(e,{emit:n}){var d;const r=T((d=e.currentTabId||e.defaultCurrentTabId)!=null?d:null),c=T(!1),u=T(!1),a=T(),{getItems:l}=C(oe,void 0),p=y(()=>[{outline:"none"},e.style]),b=i=>{n(de,i)},g=()=>{c.value=!0},_=k(i=>{var f;(f=e.onMousedown)==null||f.call(e,i)},()=>{u.value=!0}),E=k(i=>{var f;(f=e.onFocus)==null||f.call(e,i)},i=>{const f=!O(u),{target:D,currentTarget:$}=i;if(D===$&&f&&!O(c)){const B=new Event(ue,po);if($?.dispatchEvent(B),!B.defaultPrevented){const v=l().filter(F=>F.focusable),S=v.find(F=>F.active),I=v.find(F=>F.id===O(r)),L=[S,I,...v].filter(Boolean).map(F=>F.ref);te(L)}}u.value=!1}),o=k(i=>{var f;(f=e.onBlur)==null||f.call(e,i)},()=>{c.value=!1}),s=(...i)=>{n("entryFocus",...i)};V(ne,{currentTabbedId:Se(r),loop:U(e,"loop"),tabIndex:y(()=>O(c)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:p,orientation:U(e,"orientation"),dir:U(e,"dir"),onItemFocus:b,onItemShiftTab:g,onBlur:o,onFocus:E,onMousedown:_}),pe(()=>e.currentTabId,i=>{r.value=i??null}),Je(a,ue,s)}});function vo(e,n,d,r,c,u){return P(e.$slots,"default")}var mo=M(fo,[["render",vo],["__file","roving-focus-group-impl.vue"]]);const bo=A({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ro,ElRovingFocusGroupImpl:mo}});function go(e,n,d,r,c,u){const a=w("el-roving-focus-group-impl"),l=w("el-focus-group-collection");return N(),z(l,null,{default:m(()=>[R(a,Oe(ke(e.$attrs)),{default:m(()=>[P(e.$slots,"default")]),_:3},16)]),_:3})}var wo=M(bo,[["render",go],["__file","roving-focus-group.vue"]]);const X=Symbol("elDropdown"),Ie="elDropdown",{ButtonGroup:_o}=ce,Io=A({name:"ElDropdown",components:{ElButton:ce,ElButtonGroup:_o,ElScrollbar:Fe,ElDropdownCollection:je,ElTooltip:$e,ElRovingFocusGroup:wo,ElOnlyChild:Te,ElIcon:fe,ArrowDown:Pe},props:We,emits:["visible-change","click","command"],setup(e,{emit:n}){const d=me(),r=ee("dropdown"),{t:c}=De(),u=T(),a=T(),l=T(),p=T(),b=T(null),g=T(null),_=T(!1),E=y(()=>({maxHeight:Be(e.maxHeight)})),o=y(()=>[r.m(v.value)]),s=y(()=>no(e.trigger)),i=ve().value,f=y(()=>e.id||i);pe([u,s],([t,h],[G])=>{var le,se,ae;(le=G?.$el)!=null&&le.removeEventListener&&G.$el.removeEventListener("pointerenter",I),(se=t?.$el)!=null&&se.removeEventListener&&t.$el.removeEventListener("pointerenter",I),(ae=t?.$el)!=null&&ae.addEventListener&&h.includes("hover")&&t.$el.addEventListener("pointerenter",I)},{immediate:!0}),Le(()=>{var t,h;(h=(t=u.value)==null?void 0:t.$el)!=null&&h.removeEventListener&&u.value.$el.removeEventListener("pointerenter",I)});function D(){$()}function $(){var t;(t=l.value)==null||t.onClose()}function B(){var t;(t=l.value)==null||t.onOpen()}const v=Ke();function S(...t){n("command",...t)}function I(){var t,h;(h=(t=u.value)==null?void 0:t.$el)==null||h.focus()}function K(){}function L(){const t=O(p);s.value.includes("hover")&&t?.focus(),g.value=null}function F(t){g.value=t}function re(t){_.value||(t.preventDefault(),t.stopImmediatePropagation())}function J(){n("visible-change",!0)}function Y(t){var h;t?.type==="keydown"&&((h=p.value)==null||h.focus())}function ye(){n("visible-change",!1)}return V(X,{contentRef:p,role:y(()=>e.role),triggerId:f,isUsingKeyboard:_,onItemEnter:K,onItemLeave:L}),V(Ie,{instance:d,dropdownSize:v,handleClick:D,commandHandler:S,trigger:U(e,"trigger"),hideOnClick:U(e,"hideOnClick")}),{t:c,ns:r,scrollbar:b,wrapStyle:E,dropdownTriggerKls:o,dropdownSize:v,triggerId:f,currentTabId:g,handleCurrentTabIdChange:F,handlerMainButtonClick:t=>{n("click",t)},handleEntryFocus:re,handleClose:$,handleOpen:B,handleBeforeShowTooltip:J,handleShowTooltip:Y,handleBeforeHideTooltip:ye,onFocusAfterTrapped:t=>{var h,G;t.preventDefault(),(G=(h=p.value)==null?void 0:h.focus)==null||G.call(h,{preventScroll:!0})},popperRef:l,contentRef:p,triggeringElementRef:u,referenceElementRef:a}}});function Eo(e,n,d,r,c,u){var a;const l=w("el-dropdown-collection"),p=w("el-roving-focus-group"),b=w("el-scrollbar"),g=w("el-only-child"),_=w("el-tooltip"),E=w("el-button"),o=w("arrow-down"),s=w("el-icon"),i=w("el-button-group");return N(),W("div",{class:q([e.ns.b(),e.ns.is("disabled",e.disabled)])},[R(_,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Ne({content:m(()=>[R(b,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:m(()=>[R(p,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:m(()=>[R(l,null,{default:m(()=>[P(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:m(()=>[R(g,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(N(),z(i,{key:0},{default:m(()=>[R(E,j({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),R(E,j({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:m(()=>[R(s,{class:q(e.ns.e("icon"))},{default:m(()=>[R(o)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Z("v-if",!0)],2)}var ho=M(Io,[["render",Eo],["__file","dropdown.vue"]]);const Co=A({components:{ElRovingFocusCollectionItem:lo},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:n}){const{currentTabbedId:d,loop:r,onItemFocus:c,onItemShiftTab:u}=C(ne,void 0),{getItems:a}=C(oe,void 0),l=ve(),p=T(),b=k(o=>{n("mousedown",o)},o=>{e.focusable?c(O(l)):o.preventDefault()}),g=k(o=>{n("focus",o)},()=>{c(O(l))}),_=k(o=>{n("keydown",o)},o=>{const{code:s,shiftKey:i,target:f,currentTarget:D}=o;if(s===H.tab&&i){u();return}if(f!==D)return;const $=uo(o);if($){o.preventDefault();let v=a().filter(S=>S.focusable).map(S=>S.ref);switch($){case"last":{v.reverse();break}case"prev":case"next":{$==="prev"&&v.reverse();const S=v.indexOf(D);v=r.value?co(v,S+1):v.slice(S+1);break}}Me(()=>{te(v)})}}),E=y(()=>d.value===O(l));return V(_e,{rovingFocusGroupItemRef:p,tabIndex:y(()=>O(E)?0:-1),handleMousedown:b,handleFocus:g,handleKeydown:_}),{id:l,handleKeydown:_,handleFocus:g,handleMousedown:b}}});function yo(e,n,d,r,c,u){const a=w("el-roving-focus-collection-item");return N(),z(a,{id:e.id,focusable:e.focusable,active:e.active},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var To=M(Co,[["render",yo],["__file","roving-focus-item.vue"]]);const $o=A({name:"DropdownItemImpl",components:{ElIcon:fe},props:we,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:n}){const d=ee("dropdown"),{role:r}=C(X,void 0),{collectionItemRef:c}=C(Xe,void 0),{collectionItemRef:u}=C(so,void 0),{rovingFocusGroupItemRef:a,tabIndex:l,handleFocus:p,handleKeydown:b,handleMousedown:g}=C(_e,void 0),_=be(c,u,a),E=y(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),o=k(s=>{if([H.enter,H.numpadEnter,H.space].includes(s.code))return s.preventDefault(),s.stopImmediatePropagation(),n("clickimpl",s),!0},b);return{ns:d,itemRef:_,dataset:{[qe]:""},role:E,tabIndex:l,handleFocus:p,handleKeydown:o,handleMousedown:g}}});function Fo(e,n,d,r,c,u){const a=w("el-icon");return N(),W(ze,null,[e.divided?(N(),W("li",{key:0,role:"separator",class:q(e.ns.bem("menu","item","divided"))},null,2)):Z("v-if",!0),Ae("li",j({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:l=>e.$emit("clickimpl",l),onFocus:e.handleFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:l=>e.$emit("pointermove",l),onPointerleave:l=>e.$emit("pointerleave",l)}),[e.icon?(N(),z(a,{key:0},{default:m(()=>[(N(),z(Ge(e.icon)))]),_:1})):Z("v-if",!0),P(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Ro=M($o,[["render",Fo],["__file","dropdown-item-impl.vue"]]);const Ee=()=>{const e=C(Ie,{}),n=y(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:n}},So=A({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Qe,ElRovingFocusItem:To,ElDropdownItemImpl:Ro},inheritAttrs:!1,props:we,emits:["pointermove","pointerleave","click"],setup(e,{emit:n,attrs:d}){const{elDropdown:r}=Ee(),c=me(),u=T(null),a=y(()=>{var o,s;return(s=(o=O(u))==null?void 0:o.textContent)!=null?s:""}),{onItemEnter:l,onItemLeave:p}=C(X,void 0),b=k(o=>(n("pointermove",o),o.defaultPrevented),ie(o=>{if(e.disabled){p(o);return}const s=o.currentTarget;s===document.activeElement||s.contains(document.activeElement)||(l(o),o.defaultPrevented||s?.focus())})),g=k(o=>(n("pointerleave",o),o.defaultPrevented),ie(p)),_=k(o=>{if(!e.disabled)return n("click",o),o.type!=="keydown"&&o.defaultPrevented},o=>{var s,i,f;if(e.disabled){o.stopImmediatePropagation();return}(s=r?.hideOnClick)!=null&&s.value&&((i=r.handleClick)==null||i.call(r)),(f=r.commandHandler)==null||f.call(r,e.command,c,o)}),E=y(()=>({...e,...d}));return{handleClick:_,handlePointerMove:b,handlePointerLeave:g,textContent:a,propsAndAttrs:E}}});function Oo(e,n,d,r,c,u){var a;const l=w("el-dropdown-item-impl"),p=w("el-roving-focus-item"),b=w("el-dropdown-collection-item");return N(),z(b,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:m(()=>[R(p,{focusable:!e.disabled},{default:m(()=>[R(l,j(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var he=M(So,[["render",Oo],["__file","dropdown-item.vue"]]);const ko=A({name:"ElDropdownMenu",props:Ze,setup(e){const n=ee("dropdown"),{_elDropdownSize:d}=Ee(),r=d.value,{focusTrapRef:c,onKeydown:u}=C(Ue,void 0),{contentRef:a,role:l,triggerId:p}=C(X,void 0),{collectionRef:b,getItems:g}=C(xe,void 0),{rovingFocusGroupRef:_,rovingFocusGroupRootStyle:E,tabIndex:o,onBlur:s,onFocus:i,onMousedown:f}=C(ne,void 0),{collectionRef:D}=C(oe,void 0),$=y(()=>[n.b("menu"),n.bm("menu",r?.value)]),B=be(a,b,c,_,D),v=k(I=>{var K;(K=e.onKeydown)==null||K.call(e,I)},I=>{const{currentTarget:K,code:L,target:F}=I;if(K.contains(F),H.tab===L&&I.stopImmediatePropagation(),I.preventDefault(),F!==O(a)||!eo.includes(L))return;const J=g().filter(Y=>!Y.disabled).map(Y=>Y.ref);oo.includes(L)&&J.reverse(),te(J)});return{size:r,rovingFocusGroupRootStyle:E,tabIndex:o,dropdownKls:$,role:l,triggerId:p,dropdownListWrapperRef:B,handleKeydown:I=>{v(I),u(I)},onBlur:s,onFocus:i,onMousedown:f}}});function No(e,n,d,r,c,u){return N(),W("ul",{ref:e.dropdownListWrapperRef,class:q(e.dropdownKls),style:Ye(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:x(e.onMousedown,["self"])},[P(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var Ce=M(ko,[["render",No],["__file","dropdown-menu.vue"]]);const Yo=He(ho,{DropdownItem:he,DropdownMenu:Ce}),Uo=ge(he),Ho=ge(Ce);export{Uo as E,Ho as a,Yo as b};
|
|
1
|
+
import{E as ce}from"./index-BmgQ_NQh.js";import{c as k,O as Te,E as $e,w as ie}from"./index-j_uZdGZu.js";import{E as Fe}from"./index-DPFYPrCl.js";import{ak as Re,aq as Q,_ as M,d as A,r as P,am as T,ao as C,c as y,e as O,an as V,aP as U,aY as Se,ax as pe,l as w,i as z,o as N,j as m,k as R,bg as Oe,bh as ke,b as W,y as Z,bf as Ne,az as j,n as q,A as Pe,E as fe,a as ee,b2 as De,bo as Be,bp as Ke,aX as ve,ap as Le,aL as me,aJ as H,bd as Me,t as Ae,b9 as Ge,ai as x,F as ze,bq as be,f as Ye,br as Ue,g as He,w as ge}from"./index-D-Kq9yA_.js";import{a as Je}from"./typescript-CbXledGi.js";import{c as Ve,d as We,E as je,a as we,C as qe,b as Xe,e as Qe,f as Ze,g as xe,F as eo,L as oo}from"./dropdown-CyzwdvpU.js";import{c as no}from"./castArray-CLbvN5vw.js";const to=Re({style:{type:Q([String,Array,Object])},currentTabId:{type:Q(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Q(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ro,ElCollectionItem:lo,COLLECTION_INJECTION_KEY:oe,COLLECTION_ITEM_INJECTION_KEY:so}=Ve("RovingFocusGroup"),ne=Symbol("elRovingFocusGroup"),_e=Symbol("elRovingFocusGroupItem"),ao={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},io=(e,n)=>e,uo=(e,n,d)=>{const r=io(e.code);return ao[r]},co=(e,n)=>e.map((d,r)=>e[(r+n)%e.length]),te=e=>{const{activeElement:n}=document;for(const d of e)if(d===n||(d.focus(),n!==document.activeElement))return},de="currentTabIdChange",ue="rovingFocusGroup.entryFocus",po={bubbles:!1,cancelable:!0},fo=A({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:to,emits:[de,"entryFocus"],setup(e,{emit:n}){var d;const r=T((d=e.currentTabId||e.defaultCurrentTabId)!=null?d:null),c=T(!1),u=T(!1),a=T(),{getItems:l}=C(oe,void 0),p=y(()=>[{outline:"none"},e.style]),b=i=>{n(de,i)},g=()=>{c.value=!0},_=k(i=>{var f;(f=e.onMousedown)==null||f.call(e,i)},()=>{u.value=!0}),E=k(i=>{var f;(f=e.onFocus)==null||f.call(e,i)},i=>{const f=!O(u),{target:D,currentTarget:$}=i;if(D===$&&f&&!O(c)){const B=new Event(ue,po);if($?.dispatchEvent(B),!B.defaultPrevented){const v=l().filter(F=>F.focusable),S=v.find(F=>F.active),I=v.find(F=>F.id===O(r)),L=[S,I,...v].filter(Boolean).map(F=>F.ref);te(L)}}u.value=!1}),o=k(i=>{var f;(f=e.onBlur)==null||f.call(e,i)},()=>{c.value=!1}),s=(...i)=>{n("entryFocus",...i)};V(ne,{currentTabbedId:Se(r),loop:U(e,"loop"),tabIndex:y(()=>O(c)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:p,orientation:U(e,"orientation"),dir:U(e,"dir"),onItemFocus:b,onItemShiftTab:g,onBlur:o,onFocus:E,onMousedown:_}),pe(()=>e.currentTabId,i=>{r.value=i??null}),Je(a,ue,s)}});function vo(e,n,d,r,c,u){return P(e.$slots,"default")}var mo=M(fo,[["render",vo],["__file","roving-focus-group-impl.vue"]]);const bo=A({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ro,ElRovingFocusGroupImpl:mo}});function go(e,n,d,r,c,u){const a=w("el-roving-focus-group-impl"),l=w("el-focus-group-collection");return N(),z(l,null,{default:m(()=>[R(a,Oe(ke(e.$attrs)),{default:m(()=>[P(e.$slots,"default")]),_:3},16)]),_:3})}var wo=M(bo,[["render",go],["__file","roving-focus-group.vue"]]);const X=Symbol("elDropdown"),Ie="elDropdown",{ButtonGroup:_o}=ce,Io=A({name:"ElDropdown",components:{ElButton:ce,ElButtonGroup:_o,ElScrollbar:Fe,ElDropdownCollection:je,ElTooltip:$e,ElRovingFocusGroup:wo,ElOnlyChild:Te,ElIcon:fe,ArrowDown:Pe},props:We,emits:["visible-change","click","command"],setup(e,{emit:n}){const d=me(),r=ee("dropdown"),{t:c}=De(),u=T(),a=T(),l=T(),p=T(),b=T(null),g=T(null),_=T(!1),E=y(()=>({maxHeight:Be(e.maxHeight)})),o=y(()=>[r.m(v.value)]),s=y(()=>no(e.trigger)),i=ve().value,f=y(()=>e.id||i);pe([u,s],([t,h],[G])=>{var le,se,ae;(le=G?.$el)!=null&&le.removeEventListener&&G.$el.removeEventListener("pointerenter",I),(se=t?.$el)!=null&&se.removeEventListener&&t.$el.removeEventListener("pointerenter",I),(ae=t?.$el)!=null&&ae.addEventListener&&h.includes("hover")&&t.$el.addEventListener("pointerenter",I)},{immediate:!0}),Le(()=>{var t,h;(h=(t=u.value)==null?void 0:t.$el)!=null&&h.removeEventListener&&u.value.$el.removeEventListener("pointerenter",I)});function D(){$()}function $(){var t;(t=l.value)==null||t.onClose()}function B(){var t;(t=l.value)==null||t.onOpen()}const v=Ke();function S(...t){n("command",...t)}function I(){var t,h;(h=(t=u.value)==null?void 0:t.$el)==null||h.focus()}function K(){}function L(){const t=O(p);s.value.includes("hover")&&t?.focus(),g.value=null}function F(t){g.value=t}function re(t){_.value||(t.preventDefault(),t.stopImmediatePropagation())}function J(){n("visible-change",!0)}function Y(t){var h;t?.type==="keydown"&&((h=p.value)==null||h.focus())}function ye(){n("visible-change",!1)}return V(X,{contentRef:p,role:y(()=>e.role),triggerId:f,isUsingKeyboard:_,onItemEnter:K,onItemLeave:L}),V(Ie,{instance:d,dropdownSize:v,handleClick:D,commandHandler:S,trigger:U(e,"trigger"),hideOnClick:U(e,"hideOnClick")}),{t:c,ns:r,scrollbar:b,wrapStyle:E,dropdownTriggerKls:o,dropdownSize:v,triggerId:f,currentTabId:g,handleCurrentTabIdChange:F,handlerMainButtonClick:t=>{n("click",t)},handleEntryFocus:re,handleClose:$,handleOpen:B,handleBeforeShowTooltip:J,handleShowTooltip:Y,handleBeforeHideTooltip:ye,onFocusAfterTrapped:t=>{var h,G;t.preventDefault(),(G=(h=p.value)==null?void 0:h.focus)==null||G.call(h,{preventScroll:!0})},popperRef:l,contentRef:p,triggeringElementRef:u,referenceElementRef:a}}});function Eo(e,n,d,r,c,u){var a;const l=w("el-dropdown-collection"),p=w("el-roving-focus-group"),b=w("el-scrollbar"),g=w("el-only-child"),_=w("el-tooltip"),E=w("el-button"),o=w("arrow-down"),s=w("el-icon"),i=w("el-button-group");return N(),W("div",{class:q([e.ns.b(),e.ns.is("disabled",e.disabled)])},[R(_,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Ne({content:m(()=>[R(b,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:m(()=>[R(p,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:m(()=>[R(l,null,{default:m(()=>[P(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:m(()=>[R(g,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(N(),z(i,{key:0},{default:m(()=>[R(E,j({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),R(E,j({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:m(()=>[R(s,{class:q(e.ns.e("icon"))},{default:m(()=>[R(o)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Z("v-if",!0)],2)}var ho=M(Io,[["render",Eo],["__file","dropdown.vue"]]);const Co=A({components:{ElRovingFocusCollectionItem:lo},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:n}){const{currentTabbedId:d,loop:r,onItemFocus:c,onItemShiftTab:u}=C(ne,void 0),{getItems:a}=C(oe,void 0),l=ve(),p=T(),b=k(o=>{n("mousedown",o)},o=>{e.focusable?c(O(l)):o.preventDefault()}),g=k(o=>{n("focus",o)},()=>{c(O(l))}),_=k(o=>{n("keydown",o)},o=>{const{code:s,shiftKey:i,target:f,currentTarget:D}=o;if(s===H.tab&&i){u();return}if(f!==D)return;const $=uo(o);if($){o.preventDefault();let v=a().filter(S=>S.focusable).map(S=>S.ref);switch($){case"last":{v.reverse();break}case"prev":case"next":{$==="prev"&&v.reverse();const S=v.indexOf(D);v=r.value?co(v,S+1):v.slice(S+1);break}}Me(()=>{te(v)})}}),E=y(()=>d.value===O(l));return V(_e,{rovingFocusGroupItemRef:p,tabIndex:y(()=>O(E)?0:-1),handleMousedown:b,handleFocus:g,handleKeydown:_}),{id:l,handleKeydown:_,handleFocus:g,handleMousedown:b}}});function yo(e,n,d,r,c,u){const a=w("el-roving-focus-collection-item");return N(),z(a,{id:e.id,focusable:e.focusable,active:e.active},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var To=M(Co,[["render",yo],["__file","roving-focus-item.vue"]]);const $o=A({name:"DropdownItemImpl",components:{ElIcon:fe},props:we,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:n}){const d=ee("dropdown"),{role:r}=C(X,void 0),{collectionItemRef:c}=C(Xe,void 0),{collectionItemRef:u}=C(so,void 0),{rovingFocusGroupItemRef:a,tabIndex:l,handleFocus:p,handleKeydown:b,handleMousedown:g}=C(_e,void 0),_=be(c,u,a),E=y(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),o=k(s=>{if([H.enter,H.numpadEnter,H.space].includes(s.code))return s.preventDefault(),s.stopImmediatePropagation(),n("clickimpl",s),!0},b);return{ns:d,itemRef:_,dataset:{[qe]:""},role:E,tabIndex:l,handleFocus:p,handleKeydown:o,handleMousedown:g}}});function Fo(e,n,d,r,c,u){const a=w("el-icon");return N(),W(ze,null,[e.divided?(N(),W("li",{key:0,role:"separator",class:q(e.ns.bem("menu","item","divided"))},null,2)):Z("v-if",!0),Ae("li",j({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:l=>e.$emit("clickimpl",l),onFocus:e.handleFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:l=>e.$emit("pointermove",l),onPointerleave:l=>e.$emit("pointerleave",l)}),[e.icon?(N(),z(a,{key:0},{default:m(()=>[(N(),z(Ge(e.icon)))]),_:1})):Z("v-if",!0),P(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Ro=M($o,[["render",Fo],["__file","dropdown-item-impl.vue"]]);const Ee=()=>{const e=C(Ie,{}),n=y(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:n}},So=A({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Qe,ElRovingFocusItem:To,ElDropdownItemImpl:Ro},inheritAttrs:!1,props:we,emits:["pointermove","pointerleave","click"],setup(e,{emit:n,attrs:d}){const{elDropdown:r}=Ee(),c=me(),u=T(null),a=y(()=>{var o,s;return(s=(o=O(u))==null?void 0:o.textContent)!=null?s:""}),{onItemEnter:l,onItemLeave:p}=C(X,void 0),b=k(o=>(n("pointermove",o),o.defaultPrevented),ie(o=>{if(e.disabled){p(o);return}const s=o.currentTarget;s===document.activeElement||s.contains(document.activeElement)||(l(o),o.defaultPrevented||s?.focus())})),g=k(o=>(n("pointerleave",o),o.defaultPrevented),ie(p)),_=k(o=>{if(!e.disabled)return n("click",o),o.type!=="keydown"&&o.defaultPrevented},o=>{var s,i,f;if(e.disabled){o.stopImmediatePropagation();return}(s=r?.hideOnClick)!=null&&s.value&&((i=r.handleClick)==null||i.call(r)),(f=r.commandHandler)==null||f.call(r,e.command,c,o)}),E=y(()=>({...e,...d}));return{handleClick:_,handlePointerMove:b,handlePointerLeave:g,textContent:a,propsAndAttrs:E}}});function Oo(e,n,d,r,c,u){var a;const l=w("el-dropdown-item-impl"),p=w("el-roving-focus-item"),b=w("el-dropdown-collection-item");return N(),z(b,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:m(()=>[R(p,{focusable:!e.disabled},{default:m(()=>[R(l,j(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var he=M(So,[["render",Oo],["__file","dropdown-item.vue"]]);const ko=A({name:"ElDropdownMenu",props:Ze,setup(e){const n=ee("dropdown"),{_elDropdownSize:d}=Ee(),r=d.value,{focusTrapRef:c,onKeydown:u}=C(Ue,void 0),{contentRef:a,role:l,triggerId:p}=C(X,void 0),{collectionRef:b,getItems:g}=C(xe,void 0),{rovingFocusGroupRef:_,rovingFocusGroupRootStyle:E,tabIndex:o,onBlur:s,onFocus:i,onMousedown:f}=C(ne,void 0),{collectionRef:D}=C(oe,void 0),$=y(()=>[n.b("menu"),n.bm("menu",r?.value)]),B=be(a,b,c,_,D),v=k(I=>{var K;(K=e.onKeydown)==null||K.call(e,I)},I=>{const{currentTarget:K,code:L,target:F}=I;if(K.contains(F),H.tab===L&&I.stopImmediatePropagation(),I.preventDefault(),F!==O(a)||!eo.includes(L))return;const J=g().filter(Y=>!Y.disabled).map(Y=>Y.ref);oo.includes(L)&&J.reverse(),te(J)});return{size:r,rovingFocusGroupRootStyle:E,tabIndex:o,dropdownKls:$,role:l,triggerId:p,dropdownListWrapperRef:B,handleKeydown:I=>{v(I),u(I)},onBlur:s,onFocus:i,onMousedown:f}}});function No(e,n,d,r,c,u){return N(),W("ul",{ref:e.dropdownListWrapperRef,class:q(e.dropdownKls),style:Ye(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:x(e.onMousedown,["self"])},[P(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var Ce=M(ko,[["render",No],["__file","dropdown-menu.vue"]]);const Yo=He(ho,{DropdownItem:he,DropdownMenu:Ce}),Uo=ge(he),Ho=ge(Ce);export{Uo as E,Ho as a,Yo as b};
|