n.value,set:e=>n.value=e})}return n}function Jr(e,t,n,r,i=!1){if(_(e)){e.forEach((e,a)=>Jr(e,t&&(_(t)?t[a]:t),n,r,i));return}if(li(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Jr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?ds(r.component):r.el,o=i?null:a,{i:c,r:l}=e,u=t&&t.r,d=c.refs===s?c.refs={}:c.refs,f=c.setupState,p=pn(f),h=f===s?()=>!1:e=>g(p,e);if(u!=null&&u!==l&&(C(u)?(d[u]=null,h(u)&&(f[u]=null)):_n(u)&&(u.value=null)),S(l))Un(l,c,12,[o,d]);else{let t=C(l),r=_n(l);if(t||r){let s=()=>{if(e.f){let n=t?h(l)?f[l]:d[l]:l.value;i?_(n)&&m(n,a):_(n)?n.includes(a)||n.push(a):t?(d[l]=[a],h(l)&&(f[l]=d[l])):(l.value=[a],e.k&&(d[e.k]=l.value))}else t?(d[l]=o,h(l)&&(f[l]=o)):r&&(l.value=o,e.k&&(d[e.k]=o))};o?(s.id=-1,Ba(s,n)):s()}}}var Yr=!1,Xr=()=>{Yr||(console.error(`Hydration completed but contains mismatches.`),Yr=!0)},pee=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,mee=e=>e.namespaceURI.includes(`MathML`),Zr=e=>{if(e.nodeType===1){if(pee(e))return`svg`;if(mee(e))return`mathml`}},Qr=e=>e.nodeType===8;function hee(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:s,insert:c,createComment:l}}=e,u=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),ar(),t._vnode=e;return}f(t.firstChild,e,null,null,null),ar(),t._vnode=e},f=(n,r,s,l,u,d=!1)=>{d=d||!!r.dynamicChildren;let b=Qr(n)&&n.data===`[`,x=()=>g(n,r,s,l,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,E=n.nodeType;r.el=n,T===-2&&(d=!1,r.dynamicChildren=null);let D=null;switch(S){case Co:E===3?(n.data!==r.children&&(Xr(),n.data=r.children),D=a(n)):r.children===``?(c(r.el=i(``),o(n),n),D=n):D=x();break;case wo:y(n)?(D=a(n),v(r.el=n.content.firstChild,n,s)):D=E!==8||b?x():a(n);break;case To:if(b&&(n=a(n),E=n.nodeType),E===1||E===3){D=n;let e=!r.children.length;for(let t=0;t{o=o||!!t.dynamicChildren;let{type:c,props:l,patchFlag:u,shapeFlag:f,dirs:p,transition:h}=t,g=c===`input`||c===`option`;if(g||u!==-1){p&&vr(t,null,n,`created`);let c=!1;if(y(e)){c=Ka(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;c&&h.beforeEnter(r),v(r,e,n),t.el=e=r}if(f&16&&!(l&&(l.innerHTML||l.textContent))){let r=m(e.firstChild,t,e,n,i,a,o);for(;r;){ei(e,1)||Xr();let t=r;r=r.nextSibling,s(t)}}else if(f&8){let n=t.children;n[0]===`
`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1)),e.textContent!==n&&(ei(e,0)||Xr(),e.textContent=t.children)}if(l){if(g||!o||u&48){let t=e.tagName.includes(`-`);for(let i in l)(g&&(i.endsWith(`value`)||i===`indeterminate`)||d(i)&&!te(i)||i[0]===`.`||t)&&r(e,i,null,l[i],void 0,n)}else if(l.onClick)r(e,`onClick`,null,l.onClick,void 0,n);else if(u&4&&ln(l.style))for(let e in l.style)l.style[e]}let _;(_=l&&l.onVnodeBeforeMount)&&Wo(_,n,t),p&&vr(t,null,n,`beforeMount`),((_=l&&l.onVnodeMounted)||p||c)&&xo(()=>{_&&Wo(_,n,t),c&&h.enter(e),p&&vr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,l,u)=>{u=u||!!t.dynamicChildren;let d=t.children,p=d.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&Qr(f)&&f.data===`]`?a(t.anchor=f):(Xr(),c(t.anchor=l(`]`),d,f),f)},g=(e,t,r,i,c,l)=>{if(ei(e.parentElement,1)||Xr(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,Zr(d),c),r&&(r.vnode.el=t.el,mo(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&Qr(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[u,f]}var $r=`data-allow-mismatch`,gee={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function ei(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute($r);)e=e.parentElement;let n=e&&e.getAttribute($r);if(n==null)return!1;if(n===``)return!0;{let e=n.split(`,`);return t===0&&e.includes(`children`)?!0:n.split(`,`).includes(gee[t])}}var ti=he().requestIdleCallback||(e=>setTimeout(e,1)),ni=he().cancelIdleCallback||(e=>clearTimeout(e)),ri=(e=1e4)=>t=>{let n=ti(t,{timeout:e});return()=>ni(n)};function ii(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(ii(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},oi=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},si=(e=[])=>(t,n)=>{C(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function ci(e,t){if(Qr(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Qr(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var li=e=>!!e.type.__asyncLoader;function ui(e){S(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return L({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=a?()=>{let r=a(n,t=>ci(e,t));r&&(t.bum||(t.bum=[])).push(r)}:n;u?r():p().then(()=>!t.isUnmounted&&r())},get __asyncResolved(){return u},setup(){let e=Ko;if(Kr(e),u)return()=>di(u,e);let t=t=>{l=null,Gn(t,e,13,!r)};if(s&&e.suspense||$o)return p().then(t=>()=>di(t,e)).catch(e=>(t(e),()=>r?W(r,{error:e}):null));let a=P(!1),c=P(),d=P(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&fi(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return di(u,e);if(c.value&&r)return W(r,{error:c.value});if(n&&!d.value)return W(n)}}})}function di(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=W(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var fi=e=>e.type.__isKeepAlive,pi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=qo(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),Ba(()=>{a.isDeactivated=!1,a.a&&ue(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Wo(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;Xa(t.m),Xa(t.a),l(e,f,null,1,s),Ba(()=>{t.da&&ue(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Wo(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){yi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=fs(t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!No(t,o))?p(t):o&&yi(o),i.delete(e),a.delete(e)}no(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>mi(e,t)),t&&m(e=>!mi(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(ho(n.subTree.type)?Ba(()=>{i.set(g,bi(n.subTree))},n.subTree.suspense):i.set(g,bi(n.subTree)))};return wi(_),Ei(_),Di(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=bi(t);if(e.type===i.type&&e.key===i.key){yi(i);let e=i.component.da;e&&Ba(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!Mo(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=bi(r);if(s.type===wo)return o=null,s;let c=s.type,l=fs(li(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!mi(u,l))||d&&l&&mi(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=zo(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&Ur(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,ho(r.type)?r:s}}};function mi(e,t){return _(e)?e.some(e=>mi(e,t)):C(e)?e.split(`,`).includes(t):x(e)?(e.lastIndex=0,e.test(t)):!1}function hi(e,t){_i(e,`a`,t)}function gi(e,t){_i(e,`da`,t)}function _i(e,t,n=Ko){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(xi(t,r,n),n){let e=n.parent;for(;e&&e.parent;)fi(e.parent.vnode)&&vi(r,t,n,e),e=e.parent}}function vi(e,t,n,r){let i=xi(t,e,r,!0);Oi(()=>{m(r[t],i)},n)}function yi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function bi(e){return e.shapeFlag&128?e.ssContent:e}function xi(e,t,n=Ko,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...r)=>{ft();let i=Xo(n),a=Wn(t,n,e,r);return i(),pt(),a});return r?i.unshift(a):i.push(a),a}}var Si=e=>(t,n=Ko)=>{(!$o||e===`sp`)&&xi(e,(...e)=>t(...e),n)},Ci=Si(`bm`),wi=Si(`m`),Ti=Si(`bu`),Ei=Si(`u`),Di=Si(`bum`),Oi=Si(`um`),ki=Si(`sp`),Ai=Si(`rtg`),ji=Si(`rtc`);function Mi(e,t=Ko){xi(`ec`,e,t)}var Ni=`components`,Pi=`directives`;function Fi(e,t){return zi(Ni,e,!0,t)||e}var Ii=Symbol.for(`v-ndc`);function Li(e){return C(e)?zi(Ni,e,!1)||e:e||Ii}function Ri(e){return zi(Pi,e)}function zi(e,t,n=!0,r=!1){let i=dr||Ko;if(i){let n=i.type;if(e===Ni){let e=fs(n,!1);if(e&&(e===t||e===ie(t)||e===se(ie(t))))return n}let a=Bi(i[e]||n[e],t)||Bi(i.appContext[e],t);return!a&&r?n:a}}function Bi(e,t){return e&&(e[t]||e[ie(t)]||e[se(ie(t))])}function Vi(e,t,n,r){let i,a=n&&n[r],o=_(e);if(o||C(e)){let n=o&&ln(e),r=!1;n&&(r=!dn(e),e=Dt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function R(e,t,n={},r,i){if(dr.ce||dr.parent&&li(dr.parent)&&dr.parent.ce)return t!==`default`&&(n.name=t),B(),H(z,null,[W(`slot`,n,r&&r())],64);let a=e[t];a&&a._c&&(a._d=!1),B();let o=a&&Ui(a(n)),s=n.key||o&&o.key,c=H(z,{key:(s&&!w(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Ui(e){return e.some(e=>Mo(e)?!(e.type===wo||e.type===z&&!Ui(e.children)):!0)?e:null}function Wi(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:ce(r)]=e[r];return n}var Gi=e=>e?Qo(e)?ds(e):Gi(e.parent):null,Ki=p(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Gi(e.parent),$root:e=>Gi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ma(e),$forceUpdate:e=>e.f||(e.f=()=>{tr(e.update)}),$nextTick:e=>e.n||(e.n=er.bind(e.proxy)),$watch:e=>io.bind(e)}),qi=(e,t)=>e!==s&&!e.__isScriptSetup&&g(e,t),Ji={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:c,appContext:l}=e,u;if(t[0]!==`$`){let c=o[t];if(c!==void 0)switch(c){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(qi(r,t))return o[t]=1,r[t];else if(i!==s&&g(i,t))return o[t]=2,i[t];else if((u=e.propsOptions[0])&&g(u,t))return o[t]=3,a[t];else if(n!==s&&g(n,t))return o[t]=4,n[t];else da&&(o[t]=0)}let d=Ki[t],f,p;if(d)return t===`$attrs`&&Ct(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(n!==s&&g(n,t))return o[t]=4,n[t];if(p=l.config.globalProperties,g(p,t))return p[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return qi(i,t)?(i[t]=n,!0):r!==s&&g(r,t)?(r[t]=n,!0):g(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},o){let c;return!!n[o]||e!==s&&g(e,o)||qi(t,o)||(c=a[0])&&g(c,o)||g(r,o)||g(Ki,o)||g(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get==null?g(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},Yi=p({},Ji,{get(e,t){if(t!==Symbol.unscopables)return Ji.get(e,t,e)},has(e,t){return t[0]!==`_`&&!_e(t)}});function Xi(){return null}function Zi(){return null}function Qi(e){}function $i(e){}function ea(){return null}function ta(){}function na(e,t){return null}function ra(){return aa().slots}function ia(){return aa().attrs}function aa(){let e=qo();return e.setupContext||(e.setupContext=us(e))}function oa(e){return _(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function sa(e,t){let n=oa(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?_(r)||S(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ca(e,t){return!e||!t?e||t:_(e)&&_(t)?e.concat(t):p({},oa(e),oa(t))}function la(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function ua(e){let t=qo(),n=e();return Zo(),E(n)&&(n=n.catch(e=>{throw Xo(t),e})),[n,()=>Xo(t)]}var da=!0;function _ee(e){let t=ma(e),n=e.proxy,r=e.ctx;da=!1,t.beforeCreate&&fa(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:u,created:d,beforeMount:f,mounted:p,beforeUpdate:m,updated:h,activated:g,deactivated:v,beforeDestroy:y,beforeUnmount:b,destroyed:x,unmounted:C,render:w,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:ee,components:te,directives:ne,filters:j}=t;if(u&&vee(u,r,null),o)for(let e in o){let t=o[e];S(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);T(t)&&(e.data=rn(t))}if(da=!0,a)for(let e in a){let t=a[e],i=J({get:S(t)?t.bind(n,n):S(t.get)?t.get.bind(n,n):l,set:!S(t)&&S(t.set)?t.set.bind(n):l});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)pa(s[e],r,n,e);if(c){let e=S(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Ca(t,e[t])})}d&&fa(d,e,`c`);function re(e,t){_(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(re(Ci,f),re(wi,p),re(Ti,m),re(Ei,h),re(hi,g),re(gi,v),re(Mi,O),re(ji,E),re(Ai,D),re(Di,b),re(Oi,C),re(ki,k),_(A))if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={});w&&e.render===l&&(e.render=w),ee!=null&&(e.inheritAttrs=ee),te&&(e.components=te),ne&&(e.directives=ne),k&&Kr(e)}function vee(e,t,n=l){_(e)&&(e=_a(e));for(let n in e){let r=e[n],i;i=T(r)?`default`in r?wa(r.from||n,r.default,!0):wa(r.from||n):wa(r),_n(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function fa(e,t,n){Wn(_(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function pa(e,t,n,r){let i=r.includes(`.`)?ao(n,r):()=>n[r];if(C(e)){let n=t[e];S(n)&&no(i,n)}else if(S(e))no(i,e.bind(n));else if(T(e))if(_(e))e.forEach(e=>pa(e,t,n,r));else{let r=S(e.handler)?e.handler.bind(n):t[e.handler];S(r)&&no(i,r,e)}}function ma(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ha(c,e,o,!0)),ha(c,t,o)),T(t)&&a.set(t,c),c}function ha(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ha(e,a,n,!0),i&&i.forEach(t=>ha(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=yee[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var yee={data:ga,props:ba,emits:ba,methods:ya,computed:ya,beforeCreate:va,created:va,beforeMount:va,mounted:va,beforeUpdate:va,updated:va,beforeDestroy:va,beforeUnmount:va,destroyed:va,unmounted:va,activated:va,deactivated:va,errorCaptured:va,serverPrefetch:va,components:ya,directives:ya,watch:xee,provide:ga,inject:bee};function ga(e,t){return t?e?function(){return p(S(e)?e.call(this,this):e,S(t)?t.call(this,this):t)}:t:e}function bee(e,t){return ya(_a(e),_a(t))}function _a(e){if(_(e)){let t={};for(let n=0;n1)return n&&S(t)?t.call(r&&r.proxy):t}}function Ta(){return!!(Ko||dr||Sa)}var Ea={},Da=()=>Object.create(Ea),Oa=e=>Object.getPrototypeOf(e)===Ea;function wee(e,t,n,r=!1){let i={},a=Da();e.propsDefaults=Object.create(null),Aa(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:an(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ka(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=pn(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{u=!0;let[n,r]=Ma(e,t,!0);p(o,n),r&&l.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!u)return T(e)&&r.set(e,c),c;if(_(a))for(let e=0;ee[0]===`_`||e===`$stable`,Fa=e=>_(e)?e.map(Vo):[Vo(e)],Ia=(e,t,n)=>{if(t._n)return t;let r=I((...e)=>Fa(t(...e)),n);return r._c=!1,r},La=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Pa(n))continue;let i=e[n];if(S(i))t[n]=Ia(n,i,r);else if(i!=null){let e=Fa(i);t[n]=()=>e}}},Ra=(e,t)=>{let n=Fa(t);e.slots.default=()=>n},za=(e,t,n)=>{for(let r in t)(n||r!==`_`)&&(e[r]=t[r])},Eee=(e,t,n)=>{let r=e.slots=Da();if(e.vnode.shapeFlag&32){let e=t._;e?(za(r,t,n),n&&de(r,`_`,e,!0)):La(t,r)}else t&&Ra(e,t)},Dee=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=s;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:za(i,t,n):(a=!t.$stable,La(t,i)),o=t}else t&&(Ra(e,t),o={default:1});if(a)for(let e in i)!Pa(e)&&o[e]==null&&delete i[e]},Ba=xo;function Va(e){return Ua(e)}function Ha(e){return Ua(e,hee)}function Ua(e,t){let n=he();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=l,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!No(e,t)&&(r=_e(e),de(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Co:y(e,t,n,r);break;case wo:b(e,t,n,r);break;case To:e??x(t,n,r,o);break;case z:ee(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?ne(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,be)}u!=null&&i&&Jr(u,e&&e.ref,a,t||e,!t)},y=(e,t,n,i)=>{if(e==null)r(t.el=u(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=d(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},w=(e,t,n,r,i,a,o,s,c)=>{t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null?T(t,n,r,i,a,o,s,c):O(e,t,i,a,o,s,c)},T=(e,t,n,i,s,c,l,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=o(e.type,c,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,i,s,Wa(e,c),l,u),_&&vr(e,null,i,`created`),E(d,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!te(e)&&a(d,e,null,m[e],c,i);`value`in m&&a(d,`value`,null,m.value,c),(f=m.onVnodeBeforeMount)&&Wo(f,i,e)}_&&vr(e,null,i,`beforeMount`);let v=Ka(s,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Ba(()=>{f&&Wo(f,i,e),v&&g.enter(d),_&&vr(e,null,i,`mounted`)},s)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||s,h=t.props||s,g;if(n&&Ga(n,!1),(g=h.onVnodeBeforeUpdate)&&Wo(g,n,t,e),f&&vr(t,e,n,`beforeUpdate`),n&&Ga(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?k(e.dynamicChildren,d,l,n,r,Wa(t,i),o):c||oe(e,t,l,null,n,r,Wa(t,i),o,!1),u>0){if(u&16)A(l,m,h,n,i);else if(u&2&&m.class!==h.class&&a(l,`class`,null,h.class,i),u&4&&a(l,`style`,m.style,h.style,i),u&8){let e=t.dynamicProps;for(let t=0;t{g&&Wo(g,n,t,e),f&&vr(t,e,n,`updated`)},r)},k=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==s)for(let o in t)!te(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(te(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ee=(e,t,n,i,a,o,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(r(d,n,i),r(f,n,i),D(t.children||[],n,f,a,o,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren?(k(e.dynamicChildren,m,n,a,o,s,c),(t.key!=null||a&&t===a.subTree)&&qa(e,t,!0)):oe(e,t,n,f,a,o,s,c,l)},ne=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):j(t,n,r,i,a,o,c):re(e,t,c)},j=(e,t,n,r,i,a,o)=>{let s=e.component=Go(e,r,i);fi(e)&&(s.ctx.renderer=be),es(s,!1,o),s.asyncDep?(i&&i.registerDep(s,ie,o),e.el||b(null,s.subTree=W(wo),t,n)):ie(s,e,t,n,i,a,o)},re=(e,t,n)=>{let r=t.component=e.component;if(jee(e,t,n))if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ie=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{let n=Ya(e);if(n){t&&(t.el=l.el,ae(e,t,o)),n.asyncDep.then(()=>{e.isUnmounted||s()});return}}let u=t,d;Ga(e,!1),t?(t.el=l.el,ae(e,t,o)):t=l,n&&ue(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Wo(d,c,t,l),Ga(e,!0);let f=fo(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),_e(p),e,i,a),t.el=f.el,u===null&&mo(e,f.el),r&&Ba(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Ba(()=>Wo(d,c,t,l),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=li(t);if(Ga(e,!1),l&&ue(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Wo(o,d,t),Ga(e,!0),s&&Se){let t=()=>{e.subTree=fo(e),Se(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._injectChildStyle(p);let o=e.subTree=fo(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Ba(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Ba(()=>Wo(o,d,e),i)}(t.shapeFlag&256||d&&li(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Ba(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ye(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>tr(u),Ga(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ka(e,t.props,r,n),Dee(e,t.children,n),ft(),ir(e),pt()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}else if(f&256){se(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ge(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):ge(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},se=(e,t,n,r,i,a,o,s,l)=>{e=e||c,t=t||c;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?ge(e,i,a,!0,!1,f):D(t,n,r,i,a,o,s,l,f)},ce=(e,t,n,r,i,a,o,s,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],c=t[u]=l?Ho(t[u]):Vo(t[u]);if(No(r,c))v(r,c,n,null,i,a,o,s,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],c=t[p]=l?Ho(t[p]):Vo(t[p]);if(No(r,c))v(r,c,n,null,i,a,o,s,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,c=ep)for(;u<=f;)de(e[u],i,a,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Ho(t[u]):Vo(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){de(r,i,a,!0);continue}let c;if(r.key!=null)c=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&No(r,t[_])){c=_;break}c===void 0?de(r,i,a,!0):(C[c-h]=u+1,c>=S?S=c:x=!0,v(r,t[c],n,null,i,a,o,s,l),y++)}let w=x?Ja(C):c;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,c=t[e],f=e+1{let{el:o,type:s,transition:c,children:l,shapeFlag:u}=e;if(u&6){le(e.component.subTree,t,n,i);return}if(u&128){e.suspense.move(t,n,i);return}if(u&64){s.move(e,t,n,be);return}if(s===z){r(o,t,n);for(let e=0;ec.enter(o),a);else{let{leave:e,delayLeave:i,afterLeave:a}=c,s=()=>r(o,t,n),l=()=>{e(o,()=>{s(),a&&a()})};i?i(o,s,l):l()}else r(o,t,n)},de=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&Jr(s,null,n,e,!0),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!li(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&Wo(g,t,e),u&6)me(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&vr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,be,r):l&&!l.hasOnce&&(a!==z||d>0&&d&64)?ge(l,t,n,!1,!0):(a===z&&d&384||!i&&u&16)&&ge(c,t,n),r&&fe(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&Ba(()=>{g&&Wo(g,t,e),m&&vr(e,null,t,`unmounted`)},n)},fe=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===z){pe(n,r);return}if(t===To){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},pe=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},me=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Xa(c),Xa(l),r&&ue(r),i.stop(),a&&(a.flags|=8,de(o,e,t,n)),s&&Ba(s,t),Ba(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,t.deps===0&&t.resolve())},ge=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return _e(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[yr];return n?h(n):t},ve=!1,ye=(e,t,n)=>{e==null?t._vnode&&de(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ve||(ve=!0,ir(),ar(),ve=!1)},be={p:v,um:de,m:le,r:fe,mt:j,mc:D,pc:oe,pbc:k,n:_e,o:e},xe,Se;return t&&([xe,Se]=t(be)),{render:ye,hydrate:xe,createApp:Cee(ye,xe)}}function Wa({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ga({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ka(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function qa(e,t,n=!1){let r=e.children,i=t.children;if(_(r)&&_(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Ya(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ya(t)}function Xa(e){if(e)for(let t=0;twa(Za);function $a(e,t){return ro(e,null,t)}function eo(e,t){return ro(e,null,{flush:`post`})}function to(e,t){return ro(e,null,{flush:`sync`})}function no(e,t,n){return ro(e,t,n)}function ro(e,t,n=s){let{immediate:r,deep:i,flush:a,once:o}=n,c=p({},n),u=t&&r||!t&&a!==`post`,d;if($o){if(a===`sync`){let e=Qa();d=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){let e=()=>{};return e.stop=l,e.resume=l,e.pause=l,e}}let f=Ko;c.call=(e,t,n)=>Wn(e,f,t,n);let m=!1;a===`post`?c.scheduler=e=>{Ba(e,f&&f.suspense)}:a!==`sync`&&(m=!0,c.scheduler=(e,t)=>{t?e():tr(e)}),c.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,f&&(e.id=f.uid,e.i=f))};let h=In(e,t,c);return $o&&(d?d.push(h):u&&h()),h}function io(e,t,n){let r=this.proxy,i=C(e)?e.includes(`.`)?ao(r,e):()=>r[e]:e.bind(r,r),a;S(t)?a=t:(a=t.handler,n=t);let o=Xo(this),s=ro(i,a.bind(r),n);return o(),s}function ao(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e{let l,u=s,d;return to(()=>{let t=e[i];le(l,t)&&(l=t,c())}),{get(){return o(),n.get?n.get(l):l},set(e){let o=n.set?n.set(e):e;if(!le(o,l)&&!(u!==s&&le(e,u)))return;let f=r.vnode.props;f&&(t in f||i in f||a in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${a}`in f)||(l=e,c()),r.emit(`update:${t}`,o),le(e,o)&&le(e,u)&&!le(o,d)&&c(),u=e,d=o}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||s:c,done:!1}:{done:!0}}}},c}var so=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ie(t)}Modifiers`]||e[`${oe(t)}Modifiers`];function co(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||s,i=n,a=t.startsWith(`update:`),o=a&&so(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>C(e)?e.trim():e)),o.number&&(i=n.map(fe)));let c,l=r[c=ce(t)]||r[c=ce(ie(t))];!l&&a&&(l=r[c=ce(oe(t))]),l&&Wn(l,e,6,i);let u=r[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Wn(u,e,6,i)}}function lo(e,t,n=!1){let r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!S(e)){let r=e=>{let n=lo(e,t,!0);n&&(s=!0,p(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(T(e)&&r.set(e,null),null):(_(a)?a.forEach(e=>o[e]=null):p(o,a),T(e)&&r.set(e,o),o)}function uo(e,t){return!e||!d(t)?!1:(t=t.slice(2).replace(/Once$/,``),g(e,t[0].toLowerCase()+t.slice(1))||g(e,oe(t))||g(e,t))}function fo(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=pr(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Vo(l.call(t,e,u,d,m,p,h)),y=s}else{let e=t;v=Vo(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:kee(s)}}catch(t){Eo.length=0,Gn(t,e,1),v=W(wo)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(f)&&(y=Aee(y,a)),b=zo(b,y,!1,!0))}return n.dirs&&(b=zo(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Ur(b,n.transition),v=b,pr(_),v}function Oee(e,t=!0){let n;for(let t=0;t{let t;for(let n in e)(n===`class`||n===`style`||d(n))&&((t||(t={}))[n]=e[n]);return t},Aee=(e,t)=>{let n={};for(let r in e)(!f(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function jee(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?po(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;te.__isSuspense,go=0,_o={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)Mee(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Nee(e,t,n,r,i,o,s,c,l)}},hydrate:Pee,normalize:Fee};function vo(e,t){let n=e.props&&e.props[t];S(n)&&n()}function Mee(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=yo(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(vo(e,`onPending`),vo(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),So(f,e.ssFallback)):f.resolve(!1,!0)}function Nee(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,No(f,h)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),So(d,p)))):(d.pendingId=go++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),So(d,p))):m&&No(f,m)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&No(f,m))c(m,f,n,r,i,d,a,o,s),So(d,f);else if(vo(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=go++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function yo(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=Iee(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?pe(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:go++,timeout:typeof y==`number`?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u}=x,d=!1;x.isHydrating?x.isHydrating=!1:e||(d=i&&o.transition&&o.transition.mode===`out-in`,d&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b?m(i):a,0),rr(c))}),i&&(h(i.el)===u&&(a=m(i)),p(i,l,x,!0)),d||f(o,u,a,0)),So(x,o),x.pendingBranch=null,x.isInFallback=!1;let g=x.parent,y=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),y=!0;break}g=g.parent}!y&&!d&&rr(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),vo(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;vo(t,`onFallback`);let o=m(n),l=()=>{x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),So(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Gn(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:s}=e;ns(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&g(c),mo(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function Pee(e,t,n,r,i,a,o,s,c){let l=t.suspense=yo(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function Fee(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=bo(r?n.default:n),e.ssFallback=r?bo(n.fallback):W(wo)}function bo(e){let t;if(S(e)){let n=ko&&e._c;n&&(e._d=!1,B()),e=e(),n&&(e._d=!0,t=Do,Oo())}return _(e)&&(e=Oee(e)),e=Vo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function xo(e,t){t&&t.pendingBranch?_(e)?t.effects.push(...e):t.effects.push(e):rr(e)}function So(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,mo(r,i))}function Iee(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var z=Symbol.for(`v-fgt`),Co=Symbol.for(`v-txt`),wo=Symbol.for(`v-cmt`),To=Symbol.for(`v-stc`),Eo=[],Do=null;function B(e=!1){Eo.push(Do=e?null:[])}function Oo(){Eo.pop(),Do=Eo[Eo.length-1]||null}var ko=1;function Ao(e,t=!1){ko+=e,e<0&&Do&&t&&(Do.hasOnce=!0)}function jo(e){return e.dynamicChildren=ko>0?Do||c:null,Oo(),ko>0&&Do&&Do.push(e),e}function V(e,t,n,r,i,a){return jo(U(e,t,n,r,i,a,!0))}function H(e,t,n,r,i){return jo(W(e,t,n,r,i,!0))}function Mo(e){return e?e.__v_isVNode===!0:!1}function No(e,t){return e.type===t.type&&e.key===t.key}function Po(e){}var Fo=({key:e})=>e??null,Io=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:C(e)||_n(e)||S(e)?{i:dr,r:e,k:t,f:!!n}:e);function U(e,t=null,n=null,r=0,i=null,a=e===z?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Fo(t),ref:t&&Io(t),scopeId:fr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:dr};return s?(Uo(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=C(n)?8:16),ko>0&&!o&&Do&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Do.push(c),c}var W=Lo;function Lo(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Ii)&&(e=wo),Mo(e)){let r=zo(e,t,!0);return n&&Uo(r,n),ko>0&&!a&&Do&&(r.shapeFlag&6?Do[Do.indexOf(e)]=r:Do.push(r)),r.patchFlag=-2,r}if(ps(e)&&(e=e.__vccOpts),t){t=Ro(t);let{class:e,style:n}=t;e&&!C(e)&&(t.class=M(e)),T(n)&&(fn(n)&&!_(n)&&(n=p({},n)),t.style=ve(n))}let o=C(e)?1:ho(e)?128:br(e)?64:T(e)?4:S(e)?2:0;return U(e,t,n,r,i,o,a,!0)}function Ro(e){return e?fn(e)||Oa(e)?p({},e):e:null}function zo(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?q(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Fo(l),ref:t&&t.ref?n&&a?_(a)?a.concat(Io(t)):[a,Io(t)]:Io(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==z?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zo(e.ssContent),ssFallback:e.ssFallback&&zo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Ur(u,c.clone(u)),u}function G(e=` `,t=0){return W(Co,null,e,t)}function Bo(e,t){let n=W(To,null,e);return n.staticCount=t,n}function K(e=``,t=!1){return t?(B(),H(wo,null,e)):W(wo,null,e)}function Vo(e){return e==null||typeof e==`boolean`?W(wo):_(e)?W(z,null,e.slice()):Mo(e)?Ho(e):W(Co,null,String(e))}function Ho(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zo(e)}function Uo(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(_(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Uo(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Oa(t)?t._ctx=dr:r===3&&dr&&(dr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else S(t)?(t={default:t,_ctx:dr},n=32):(t=String(t),r&64?(n=16,t=[G(t)]):n=8);e.children=t,e.shapeFlag|=n}function q(...e){let t={};for(let n=0;nKo||dr,Jo,Yo;{let e=he(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Jo=t(`__VUE_INSTANCE_SETTERS__`,e=>Ko=e),Yo=t(`__VUE_SSR_SETTERS__`,e=>$o=e)}var Xo=e=>{let t=Ko;return Jo(e),e.scope.on(),()=>{e.scope.off(),Jo(t)}},Zo=()=>{Ko&&Ko.scope.off(),Jo(null)};function Qo(e){return e.vnode.shapeFlag&4}var $o=!1;function es(e,t=!1,n=!1){t&&Yo(t);let{props:r,children:i}=e.vnode,a=Qo(e);wee(e,r,a,t),Eee(e,i,n);let o=a?ts(e,t):void 0;return t&&Yo(!1),o}function ts(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ji);let{setup:r}=n;if(r){ft();let n=e.setupContext=r.length>1?us(e):null,i=Xo(e),a=Un(r,e,0,[e.props,n]),o=E(a);if(pt(),i(),(o||e.sp)&&!li(e)&&Kr(e),o){if(a.then(Zo,Zo),t)return a.then(n=>{ns(e,n,t)}).catch(t=>{Gn(t,e,0)});e.asyncDep=a}else ns(e,a,t)}else cs(e,t)}function ns(e,t,n){S(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:T(t)&&(e.setupState=wn(t)),cs(e,n)}var rs,is;function as(e){rs=e,is=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Yi))}}var ss=()=>!rs;function cs(e,t,n){let r=e.type;if(!e.render){if(!t&&rs&&!r.render){let t=r.template||ma(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=p(p({isCustomElement:n,delimiters:a},i),o);r.render=rs(t,s)}}e.render=r.render||l,is&&is(e)}{let t=Xo(e);ft();try{_ee(e)}finally{pt(),t()}}}var ls={get(e,t){return Ct(e,`get`,``),e[t]}};function us(e){return{attrs:new Proxy(e.attrs,ls),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(wn(mn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ki)return Ki[n](e)},has(e,t){return t in e||t in Ki}})):e.proxy}function fs(e,t=!0){return S(e)?e.displayName||e.name:e.name||t&&e.__name}function ps(e){return S(e)&&`__vccOpts`in e}var J=(e,t)=>cee(e,t,$o);function ms(e,t,n){let r=arguments.length;return r===2?T(t)&&!_(t)?Mo(t)?W(e,null,[t]):W(e,t):W(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Mo(n)&&(n=[n]),W(e,t,n))}function hs(){return;function e(t,n,r){let i=t[r];if(_(i)&&i.includes(n)||T(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function gs(e,t,n,r){let i=n[r];if(i&&_s(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function _s(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&Do&&Do.push(e),!0}var vs=`3.5.13`,ys=l,bs=Hn,xs=cr,Ss=ur,Cs={createComponentInstance:Go,setupComponent:es,renderComponentRoot:fo,setCurrentRenderingInstance:pr,isVNode:Mo,normalizeVNode:Vo,getComponentPublicInstance:ds,ensureValidVNode:Ui,pushWarningContext:zn,popWarningContext:lee},ws=e({BaseTransition:()=>Rr,BaseTransitionPropsValidators:()=>Fr,Comment:()=>wo,DeprecationTypes:()=>null,EffectScope:()=>Ue,ErrorCodes:()=>Vn,ErrorTypeStrings:()=>bs,Fragment:()=>z,KeepAlive:()=>pi,ReactiveEffect:()=>Ye,Static:()=>To,Suspense:()=>_o,Teleport:()=>Or,Text:()=>Co,TrackOpTypes:()=>kn,Transition:()=>Rs,TransitionGroup:()=>kc,TriggerOpTypes:()=>An,VueElement:()=>xc,assertNumber:()=>Bn,callWithAsyncErrorHandling:()=>Wn,callWithErrorHandling:()=>Un,camelize:()=>ie,capitalize:()=>se,cloneVNode:()=>zo,compatUtils:()=>null,computed:()=>J,createApp:()=>$c,createBlock:()=>H,createCommentVNode:()=>K,createElementBlock:()=>V,createElementVNode:()=>U,createHydrationRenderer:()=>Ha,createPropsRestProxy:()=>la,createRenderer:()=>Va,createSSRApp:()=>el,createSlots:()=>Hi,createStaticVNode:()=>Bo,createTextVNode:()=>G,createVNode:()=>W,customRef:()=>Tn,defineAsyncComponent:()=>ui,defineComponent:()=>L,defineCustomElement:()=>yc,defineEmits:()=>Zi,defineExpose:()=>Qi,defineModel:()=>ta,defineOptions:()=>$i,defineProps:()=>Xi,defineSSRCustomElement:()=>bc,defineSlots:()=>ea,devtools:()=>xs,effect:()=>ct,effectScope:()=>We,getCurrentInstance:()=>qo,getCurrentScope:()=>Ge,getCurrentWatcher:()=>Pn,getTransitionRawChildren:()=>Wr,guardReactiveProps:()=>Ro,h:()=>ms,handleError:()=>Gn,hasInjectionContext:()=>Ta,hydrate:()=>Qc,hydrateOnIdle:()=>ri,hydrateOnInteraction:()=>si,hydrateOnMediaQuery:()=>oi,hydrateOnVisible:()=>ai,initCustomFormatter:()=>hs,initDirectivesForSSR:()=>il,inject:()=>wa,isMemoSame:()=>_s,isProxy:()=>fn,isReactive:()=>ln,isReadonly:()=>un,isRef:()=>_n,isRuntimeOnly:()=>ss,isShallow:()=>dn,isVNode:()=>Mo,markRaw:()=>mn,mergeDefaults:()=>sa,mergeModels:()=>ca,mergeProps:()=>q,nextTick:()=>er,normalizeClass:()=>M,normalizeProps:()=>we,normalizeStyle:()=>ve,onActivated:()=>hi,onBeforeMount:()=>Ci,onBeforeUnmount:()=>Di,onBeforeUpdate:()=>Ti,onDeactivated:()=>gi,onErrorCaptured:()=>Mi,onMounted:()=>wi,onRenderTracked:()=>ji,onRenderTriggered:()=>Ai,onScopeDispose:()=>Ke,onServerPrefetch:()=>ki,onUnmounted:()=>Oi,onUpdated:()=>Ei,onWatcherCleanup:()=>Fn,openBlock:()=>B,popScopeId:()=>hr,provide:()=>Ca,proxyRefs:()=>wn,pushScopeId:()=>mr,queuePostFlushCb:()=>rr,reactive:()=>rn,readonly:()=>on,ref:()=>P,registerRuntimeCompiler:()=>as,render:()=>Zc,renderList:()=>Vi,renderSlot:()=>R,resolveComponent:()=>Fi,resolveDirective:()=>Ri,resolveDynamicComponent:()=>Li,resolveFilter:()=>null,resolveTransitionHooks:()=>Br,setBlockTracking:()=>Ao,setDevtoolsHook:()=>Ss,setTransitionHooks:()=>Ur,shallowReactive:()=>an,shallowReadonly:()=>sn,shallowRef:()=>vn,ssrContextKey:()=>Za,ssrUtils:()=>Cs,stop:()=>lt,toDisplayString:()=>N,toHandlerKey:()=>ce,toHandlers:()=>Wi,toRaw:()=>pn,toRef:()=>Dn,toRefs:()=>En,toValue:()=>Sn,transformVNodeArgs:()=>Po,triggerRef:()=>xn,unref:()=>F,useAttrs:()=>ia,useCssModule:()=>wc,useCssVars:()=>rc,useHost:()=>Sc,useId:()=>Gr,useModel:()=>oo,useSSRContext:()=>Qa,useShadowRoot:()=>Cc,useSlots:()=>ra,useTemplateRef:()=>qr,useTransitionState:()=>Nr,vModelCheckbox:()=>Pc,vModelDynamic:()=>Vc,vModelRadio:()=>Ic,vModelSelect:()=>Lc,vModelText:()=>Nc,vShow:()=>ec,version:()=>vs,warn:()=>ys,watch:()=>no,watchEffect:()=>$a,watchPostEffect:()=>eo,watchSyncEffect:()=>to,withAsyncContext:()=>ua,withCtx:()=>I,withDefaults:()=>na,withDirectives:()=>_r,withKeys:()=>Gc,withMemo:()=>gs,withModifiers:()=>Wc,withScopeId:()=>gr}),Ts=void 0,Es=typeof window<`u`&&window.trustedTypes;if(Es)try{Ts=Es.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ds=Ts?e=>Ts.createHTML(e):e=>e,Os=`http://www.w3.org/2000/svg`,ks=`http://www.w3.org/1998/Math/MathML`,As=typeof document<`u`?document:null,js=As&&As.createElement(`template`),Ms={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?As.createElementNS(Os,e):t===`mathml`?As.createElementNS(ks,e):n?As.createElement(e,{is:n}):As.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>As.createTextNode(e),createComment:e=>As.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>As.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{js.innerHTML=Ds(r===`svg`?``:r===`mathml`?``:e);let i=js.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ns=`transition`,Ps=`animation`,Fs=Symbol(`_vtc`),Is={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ls=p({},Fr,Is),Rs=(e=>(e.displayName=`Transition`,e.props=Ls,e))((e,{slots:t})=>ms(Rr,Vs(e),t)),zs=(e,t=[])=>{_(e)?e.forEach(e=>e(...t)):e&&e(...t)},Bs=e=>e?_(e)?e.some(e=>e.length>1):e.length>1:!1;function Vs(e){let t={};for(let n in e)n in Is||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Hs(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,Gs(e,t?u:s),Gs(e,t?l:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,Gs(e,d),Gs(e,m),Gs(e,f),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);zs(i,[t,o]),Ks(()=>{Gs(t,e?c:a),Ws(t,e?u:s),Bs(i)||qs(t,r,g,o)})};return p(t,{onBeforeEnter(e){zs(v,[e]),Ws(e,a),Ws(e,o)},onBeforeAppear(e){zs(C,[e]),Ws(e,c),Ws(e,l)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Ws(e,d),e._enterCancelled?(Ws(e,f),Zs()):(Zs(),Ws(e,f)),Ks(()=>{e._isLeaving&&(Gs(e,d),Ws(e,m),Bs(x)||qs(e,r,_,n))}),zs(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),zs(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),zs(T,[e])},onLeaveCancelled(e){D(e),zs(S,[e])}})}function Hs(e){if(e==null)return null;if(T(e))return[Us(e.enter),Us(e.leave)];{let t=Us(e);return[t,t]}}function Us(e){return pe(e)}function Ws(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Fs]||(e[Fs]=new Set)).add(t)}function Gs(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Fs];n&&(n.delete(t),n.size||(e[Fs]=void 0))}function Ks(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var zee=0;function qs(e,t,n,r){let i=e._endId=++zee,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Js(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${Ns}Delay`),a=r(`${Ns}Duration`),o=Ys(i,a),s=r(`${Ps}Delay`),c=r(`${Ps}Duration`),l=Ys(s,c),u=null,d=0,f=0;t===Ns?o>0&&(u=Ns,d=o,f=a.length):t===Ps?l>0&&(u=Ps,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Ns:Ps:null,f=u?u===Ns?a.length:c.length:0);let p=u===Ns&&/\b(transform|all)(,|$)/.test(r(`${Ns}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Ys(e,t){for(;e.lengthXs(t)+Xs(e[n])))}function Xs(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Zs(){return document.body.offsetHeight}function Bee(e,t,n){let r=e[Fs];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Qs=Symbol(`_vod`),$s=Symbol(`_vsh`),ec={beforeMount(e,{value:t},{transition:n}){e[Qs]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):tc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),tc(e,!0),r.enter(e)):r.leave(e,()=>{tc(e,!1)}):tc(e,t))},beforeUnmount(e,{value:t}){tc(e,t)}};function tc(e,t){e.style.display=t?e[Qs]:`none`,e[$s]=!t}function Vee(){ec.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var nc=Symbol(``);function rc(e){let t=qo();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ac(e,n))},r=()=>{let r=e(t.proxy);t.ce?ac(t.ce,r):ic(t.subTree,r),n(r)};Ti(()=>{rr(r)}),wi(()=>{no(r,l,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Oi(()=>e.disconnect())})}function ic(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ic(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ac(e.el,t);else if(e.type===z)e.children.forEach(e=>ic(e,t));else if(e.type===To){let{el:n,anchor:r}=e;for(;n&&(ac(n,t),n!==r);)n=n.nextSibling}}function ac(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[nc]=r}}var Hee=/(^|;)\s*display\s*:/;function Uee(e,t,n){let r=e.style,i=C(n),a=!1;if(n&&!i){if(t)if(C(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??sc(r,t,``)}else for(let e in t)n[e]??sc(r,e,``);for(let e in n)e===`display`&&(a=!0),sc(r,e,n[e])}else if(i){if(t!==n){let e=r[nc];e&&(n+=`;`+e),r.cssText=n,a=Hee.test(n)}}else t&&e.removeAttribute(`style`);Qs in e&&(e[Qs]=a?r.display:``,e[$s]&&(r.display=`none`))}var oc=/\s*!important$/;function sc(e,t,n){if(_(n))n.forEach(n=>sc(e,t,n));else if(n??(n=``),t.startsWith(`--`))e.setProperty(t,n);else{let r=Wee(e,t);oc.test(n)?e.setProperty(oe(r),n.replace(oc,``),`important`):e[r]=n}}var cc=[`Webkit`,`Moz`,`ms`],lc={};function Wee(e,t){let n=lc[t];if(n)return n;let r=ie(t);if(r!==`filter`&&r in e)return lc[t]=r;r=se(r);for(let n=0;ngc||(Jee.then(()=>gc=0),gc=Date.now());function Xee(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;Wn(Zee(e,n.value),t,5,[e])};return n.value=e,n.attached=Yee(),n}function Zee(e,t){if(_(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var _c=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qee=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Bee(e,r,o):t===`style`?Uee(e,n,r):d(t)?f(t)||Kee(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):$ee(e,t,r,o))?(fc(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&dc(e,t,r,o,a,t!==`value`)):e._isVueCE&&(/[A-Z]/.test(t)||!C(r))?fc(e,ie(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),dc(e,t,r,o))};function $ee(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&_c(t)&&S(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return _c(t)&&C(n)?!1:t in e}var vc={};function yc(e,t,n){let r=L(e,t);A(r)&&p(r,t);class i extends xc{constructor(e){super(r,e,n)}}return i.def=r,i}var bc=(e,t)=>yc(e,t,el),ete=typeof HTMLElement<`u`?HTMLElement:class{},xc=class e extends ete{constructor(e,t={},n=$c){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==$c?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow({mode:`open`}),this._root=this.shadowRoot),this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,er(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!_(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=pe(this._props[e])),(i||(i=Object.create(null)))[ie(e)]=!0)}this._numberProps=i,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)g(this,e)||Object.defineProperty(this,e,{get:()=>F(t[e])})}_resolveProps(e){let{props:t}=e,n=_(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(ie))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):vc,r=ie(e);t&&this._numberProps&&this._numberProps[r]&&(n=pe(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(t===vc?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),t===!0?this.setAttribute(oe(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(oe(e),t+``):t||this.removeAttribute(oe(e)),n&&n.observe(this,{attributes:!0})}}_update(){Zc(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=W(this._def,p(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,A(t[0])?p({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),oe(e)!==e&&t(oe(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement(`style`);n&&r.setAttribute(`nonce`,n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll(`slot`),t=this._instance.type.__scopeId;for(let n=0;n(delete e.props.mode,e))({name:`TransitionGroup`,props:p({},Ls,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=qo(),r=Nr(),i,a;return Ei(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!ite(i[0].el,n.vnode.el,t))return;i.forEach(tte),i.forEach(nte);let r=i.filter(rte);Zs(),r.forEach(e=>{let n=e.el,r=n.style;Ws(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Dc]=e=>{e&&e.target!==n||(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener(`transitionend`,i),n[Dc]=null,Gs(n,t))};n.addEventListener(`transitionend`,i)})}),()=>{let o=pn(e),s=Vs(o),c=o.tag||z;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Js(r);return a.removeChild(r),o}var Ac=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return _(t)?e=>ue(t,e):t};function ate(e){e.target.composing=!0}function jc(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Mc=Symbol(`_assign`),Nc={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Mc]=Ac(i);let a=r||i.props&&i.props.type===`number`;pc(e,t?`change`:`input`,t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),a&&(r=fe(r)),e[Mc](r)}),n&&pc(e,`change`,()=>{e.value=e.value.trim()}),t||(pc(e,`compositionstart`,ate),pc(e,`compositionend`,jc),pc(e,`change`,jc))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Mc]=Ac(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?fe(e.value):e.value,c=t??``;s!==c&&(document.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c))}},Pc={deep:!0,created(e,t,n){e[Mc]=Ac(n),pc(e,`change`,()=>{let t=e._modelValue,n=zc(e),r=e.checked,i=e[Mc];if(_(t)){let e=Re(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(y(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Bc(e,r))})},mounted:Fc,beforeUpdate(e,t,n){e[Mc]=Ac(n),Fc(e,t,n)}};function Fc(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(_(t))i=Re(t,r.props.value)>-1;else if(y(t))i=t.has(r.props.value);else{if(t===n)return;i=Le(t,Bc(e,!0))}e.checked!==i&&(e.checked=i)}var Ic={created(e,{value:t},n){e.checked=Le(t,n.props.value),e[Mc]=Ac(n),pc(e,`change`,()=>{e[Mc](zc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Mc]=Ac(r),t!==n&&(e.checked=Le(t,r.props.value))}},Lc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=y(t);pc(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?fe(zc(e)):zc(e));e[Mc](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,er(()=>{e._assigning=!1})}),e[Mc]=Ac(r)},mounted(e,{value:t}){Rc(e,t)},beforeUpdate(e,t,n){e[Mc]=Ac(n)},updated(e,{value:t}){e._assigning||Rc(e,t)}};function Rc(e,t){let n=e.multiple,r=_(t);if(!(n&&!r&&!y(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=Re(t,o)>-1}else a.selected=t.has(o);else if(Le(zc(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zc(e){return`_value`in e?e._value:e.value}function Bc(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Vc={created(e,t,n){Uc(e,t,n,null,`created`)},mounted(e,t,n){Uc(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Uc(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Uc(e,t,n,r,`updated`)}};function Hc(e,t){switch(e){case`SELECT`:return Lc;case`TEXTAREA`:return Nc;default:switch(t){case`checkbox`:return Pc;case`radio`:return Ic;default:return Nc}}}function Uc(e,t,n,r,i){let a=Hc(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function ote(){Nc.getSSRProps=({value:e})=>({value:e}),Ic.getSSRProps=({value:e},t)=>{if(t.props&&Le(t.props.value,e))return{checked:!0}},Pc.getSSRProps=({value:e},t)=>{if(_(e)){if(t.props&&Re(e,t.props.value)>-1)return{checked:!0}}else if(y(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Vc.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=Hc(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var ste=[`ctrl`,`shift`,`alt`,`meta`],cte={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>ste.some(n=>e[`${n}Key`]&&!t.includes(n))},Wc=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(`.`);return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||(e._withKeys={}),r=t.join(`.`);return n[r]||(n[r]=n=>{if(!(`key`in n))return;let r=oe(n.key);if(t.some(e=>e===r||lte[e]===r))return e(n)})},Kc=p({patchProp:Qee},Ms),qc,Jc=!1;function Yc(){return qc||(qc=Va(Kc))}function Xc(){return qc=Jc?qc:Ha(Kc),Jc=!0,qc}var Zc=(...e)=>{Yc().render(...e)},Qc=(...e)=>{Xc().hydrate(...e)},$c=(...e)=>{let t=Yc().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=nl(e);if(!r)return;let i=t._component;!S(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,tl(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t},el=(...e)=>{let t=Xc().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=nl(e);if(t)return n(t,!0,tl(t))},t};function tl(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function nl(e){return C(e)?document.querySelector(e):e}var rl=!1,il=()=>{rl||(rl=!0,ote(),Vee())},al=Symbol(``),ol=Symbol(``),sl=Symbol(``),cl=Symbol(``),ll=Symbol(``),ul=Symbol(``),dl=Symbol(``),fl=Symbol(``),pl=Symbol(``),ml=Symbol(``),hl=Symbol(``),gl=Symbol(``),_l=Symbol(``),vl=Symbol(``),yl=Symbol(``),bl=Symbol(``),xl=Symbol(``),Sl=Symbol(``),Cl=Symbol(``),wl=Symbol(``),Tl=Symbol(``),El=Symbol(``),Dl=Symbol(``),Ol=Symbol(``),kl=Symbol(``),Al=Symbol(``),jl=Symbol(``),Ml=Symbol(``),Nl=Symbol(``),ute=Symbol(``),Pl=Symbol(``),Fl=Symbol(``),dte=Symbol(``),fte=Symbol(``),Il=Symbol(``),pte=Symbol(``),mte=Symbol(``),Ll=Symbol(``),Rl=Symbol(``),zl={[al]:`Fragment`,[ol]:`Teleport`,[sl]:`Suspense`,[cl]:`KeepAlive`,[ll]:`BaseTransition`,[ul]:`openBlock`,[dl]:`createBlock`,[fl]:`createElementBlock`,[pl]:`createVNode`,[ml]:`createElementVNode`,[hl]:`createCommentVNode`,[gl]:`createTextVNode`,[_l]:`createStaticVNode`,[vl]:`resolveComponent`,[yl]:`resolveDynamicComponent`,[bl]:`resolveDirective`,[xl]:`resolveFilter`,[Sl]:`withDirectives`,[Cl]:`renderList`,[wl]:`renderSlot`,[Tl]:`createSlots`,[El]:`toDisplayString`,[Dl]:`mergeProps`,[Ol]:`normalizeClass`,[kl]:`normalizeStyle`,[Al]:`normalizeProps`,[jl]:`guardReactiveProps`,[Ml]:`toHandlers`,[Nl]:`camelize`,[ute]:`capitalize`,[Pl]:`toHandlerKey`,[Fl]:`setBlockTracking`,[dte]:`pushScopeId`,[fte]:`popScopeId`,[Il]:`withCtx`,[pte]:`unref`,[mte]:`isRef`,[Ll]:`withMemo`,[Rl]:`isMemoSame`};function Bl(e){Object.getOwnPropertySymbols(e).forEach(t=>{zl[t]=e[t]})}var Vl={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:``};function Hl(e,t=``){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Vl}}function Ul(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=Vl){return e&&(s?(e.helper(ul),e.helper(tu(e.inSSR,l))):e.helper(eu(e.inSSR,l)),o&&e.helper(Sl)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:a,directives:o,isBlock:s,disableTracking:c,isComponent:l,loc:u}}function Wl(e,t=Vl){return{type:17,loc:t,elements:e}}function Gl(e,t=Vl){return{type:15,loc:t,properties:e}}function Kl(e,t){return{type:16,loc:Vl,key:C(e)?ql(e,!0):e,value:t}}function ql(e,t=!1,n=Vl,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function Jl(e,t=Vl){return{type:8,loc:t,children:e}}function Yl(e,t=[],n=Vl){return{type:14,loc:n,callee:e,arguments:t}}function Xl(e,t=void 0,n=!1,r=!1,i=Vl){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function Zl(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:Vl}}function Ql(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:Vl}}function $l(e){return{type:21,body:e,loc:Vl}}function eu(e,t){return e||t?pl:ml}function tu(e,t){return e||t?dl:fl}function nu(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(eu(r,e.isComponent)),t(ul),t(tu(r,e.isComponent)))}var ru=new Uint8Array([123,123]),iu=new Uint8Array([125,125]);function au(e){return e>=97&&e<=122||e>=65&&e<=90}function ou(e){return e===32||e===10||e===9||e===12||e===13}function su(e){return e===47||e===62||ou(e)}function cu(e){let t=new Uint8Array(e.length);for(let n=0;n=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?su(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||ou(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(this.state===28?this.currentSequence===lu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}};function du(e,{compatConfig:t}){let n=t&&t[e];return e===`MODE`?n||3:n}function fu(e,t){let n=du(`MODE`,t),r=du(e,t);return n===3?r===!0:r!==!1}function pu(e,t,n,...r){return fu(e,t)}function mu(e){throw e}function hu(e){}function gu(e,t,n,r){let i=`https://vuejs.org/error-reference/#compiler-${e}`,a=SyntaxError(String(i));return a.code=e,a.loc=t,a}var _u=e=>e.type===4&&e.isStatic;function vu(e){switch(e){case`Teleport`:case`teleport`:return ol;case`Suspense`:case`suspense`:return sl;case`KeepAlive`:case`keep-alive`:return cl;case`BaseTransition`:case`base-transition`:return ll}}var hte=/^\d|[^\$\w\xA0-\uFFFF]/,yu=e=>!hte.test(e),gte=/[A-Za-z_$\xA0-\uFFFF]/,_te=/[\.\?\w$\xA0-\uFFFF]/,vte=/\s+[.[]\s*|\s*[.[]\s+/g,bu=e=>e.type===4?e.content:e.loc.source,xu=e=>{let t=bu(e).trim().replace(vte,e=>e.trim()),n=0,r=[],i=0,a=0,o=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,bte=e=>yte.test(bu(e));function Su(e,t,n=!1){for(let r=0;re.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Tu(e){return e.type===5||e.type===2}function Ste(e){return e.type===7&&e.name===`slot`}function Eu(e){return e.type===1&&e.tagType===3}function Du(e){return e.type===1&&e.tagType===2}var Cte=new Set([Al,jl]);function Ou(e,t=[]){if(e&&!C(e)&&e.type===14){let n=e.callee;if(!C(n)&&Cte.has(n))return Ou(e.arguments[0],t.concat(e))}return[e,t]}function ku(e,t,n){let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!C(i)&&i.type===14){let e=Ou(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||C(i))r=Gl([t]);else if(i.type===14){let e=i.arguments[0];!C(e)&&e.type===15?Au(t,e)||e.properties.unshift(t):i.callee===Ml?r=Yl(n.helper(Dl),[Gl([t]),i]):i.arguments.unshift(Gl([t])),!r&&(r=i)}else i.type===15?(Au(t,i)||i.properties.unshift(t),r=i):(r=Yl(n.helper(Dl),[Gl([t]),i]),o&&o.callee===jl&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function Au(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===4&&e.key.content===r)}return n}function ju(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>t===`-`?`_`:e.charCodeAt(n).toString())}`}function wte(e){return e.type===14&&e.callee===Ll?e.arguments[1].returns:e}var Tte=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Mu={parseMode:`base`,ns:0,delimiters:[`{{`,`}}`],getNamespace:()=>0,isVoidTag:u,isPreTag:u,isIgnoreNewlineTag:u,isCustomElement:u,onError:mu,onWarn:hu,comments:!1,prefixIdentifiers:!1},Nu=Mu,Pu=null,Fu=``,Iu=null,Lu=null,Ru=``,zu=-1,Bu=-1,Vu=0,Hu=!1,Uu=null,Wu=[],Gu=new uu(Wu,{onerr:gd,ontext(e,t){Zu(Yu(e,t),e,t)},ontextentity(e,t,n){Zu(e,t,n)},oninterpolation(e,t){if(Hu)return Zu(Yu(e,t),e,t);let n=e+Gu.delimiterOpen.length,r=t-Gu.delimiterClose.length;for(;ou(Fu.charCodeAt(n));)n++;for(;ou(Fu.charCodeAt(r-1));)r--;let i=Yu(n,r);i.includes(`&`)&&(i=Nu.decodeEntities(i,!1)),ud({type:5,content:hd(i,!1,dd(n,r)),loc:dd(e,t)})},onopentagname(e,t){let n=Yu(e,t);Iu={type:1,tag:n,ns:Nu.getNamespace(n,Wu[0],Nu.ns),tagType:0,props:[],children:[],loc:dd(e-1,t),codegenNode:void 0}},onopentagend(e){Xu(e)},onclosetag(e,t){let n=Yu(e,t);if(!Nu.isVoidTag(n)){let r=!1;for(let e=0;e0&&gd(24,Wu[0].loc.start.offset);for(let n=0;n<=e;n++)Qu(Wu.shift(),t,n(e.type===7?e.rawName:e.name)===n)&&gd(2,t)},onattribend(e,t){if(Iu&&Lu){if(pd(Lu.loc,t),e!==0)if(Ru.includes(`&`)&&(Ru=Nu.decodeEntities(Ru,!0)),Lu.type===6)Lu.name===`class`&&(Ru=ld(Ru).trim()),e===1&&!Ru&&gd(13,t),Lu.value={type:2,content:Ru,loc:e===1?dd(zu,Bu):dd(zu-1,Bu+1)},Gu.inSFCRoot&&Iu.tag===`template`&&Lu.name===`lang`&&Ru&&Ru!==`html`&&Gu.enterRCDATA(cu(`e.content===`sync`))>-1&&pu(`COMPILER_V_BIND_SYNC`,Nu,Lu.loc,Lu.rawName)&&(Lu.name=`model`,Lu.modifiers.splice(e,1))}(Lu.type!==7||Lu.name!==`pre`)&&Iu.props.push(Lu)}Ru=``,zu=Bu=-1},oncomment(e,t){Nu.comments&&ud({type:3,content:Yu(e,t),loc:dd(e-4,t+3)})},onend(){let e=Fu.length;for(let t=0;t{let i=t.start.offset+n;return hd(e,!1,dd(i,i+e.length),0,+!!r)},s={source:o(a.trim(),n.indexOf(a,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},c=i.trim().replace(qu,``).trim(),l=i.indexOf(c),u=c.match(Ku);if(u){c=c.replace(Ku,``).trim();let e=u[1].trim(),t;if(e&&(t=n.indexOf(e,l+c.length),s.key=o(e,t,!0)),u[2]){let r=u[2].trim();r&&(s.index=o(r,n.indexOf(r,s.key?t+e.length:l+c.length),!0))}}return c&&(s.value=o(c,l,!0)),s}function Yu(e,t){return Fu.slice(e,t)}function Xu(e){Gu.inSFCRoot&&(Iu.innerLoc=dd(e+1,e+1)),ud(Iu);let{tag:t,ns:n}=Iu;n===0&&Nu.isPreTag(t)&&Vu++,Nu.isVoidTag(t)?Qu(Iu,e):(Wu.unshift(Iu),(n===1||n===2)&&(Gu.inXML=!0)),Iu=null}function Zu(e,t,n){{let t=Wu[0]&&Wu[0].tag;t!==`script`&&t!==`style`&&e.includes(`&`)&&(e=Nu.decodeEntities(e,!1))}let r=Wu[0]||Pu,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=e,pd(i.loc,n)):r.children.push({type:2,content:e,loc:dd(t,n)})}function Qu(e,t,n=!1){n?pd(e.loc,ed(t,60)):pd(e.loc,$u(t,62)+1),Gu.inSFCRoot&&(e.children.length?e.innerLoc.end=p({},e.children[e.children.length-1].loc.end):e.innerLoc.end=p({},e.innerLoc.start),e.innerLoc.source=Yu(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:a}=e;if(Hu||(r===`slot`?e.tagType=2:nd(e)?e.tagType=3:rd(e)&&(e.tagType=1)),Gu.inRCDATA||(e.children=od(a)),i===0&&Nu.isIgnoreNewlineTag(r)){let e=a[0];e&&e.type===2&&(e.content=e.content.replace(/^\r?\n/,``))}i===0&&Nu.isPreTag(r)&&Vu--,Uu===e&&(Hu=Gu.inVPre=!1,Uu=null),Gu.inXML&&(Wu[0]?Wu[0].ns:Nu.ns)===0&&(Gu.inXML=!1);{let t=e.props;if(!Gu.inSFCRoot&&fu(`COMPILER_NATIVE_TEMPLATE`,Nu)&&e.tag===`template`&&!nd(e)){let t=Wu[0]||Pu,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>e.type===6&&e.name===`inline-template`);n&&pu(`COMPILER_INLINE_TEMPLATE`,Nu,n.loc)&&e.children.length&&(n.value={type:2,content:Yu(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function $u(e,t){let n=e;for(;Fu.charCodeAt(n)!==t&&n=0;)n--;return n}var td=new Set([`if`,`else`,`else-if`,`for`,`slot`]);function nd({tag:e,props:t}){if(e===`template`){for(let e=0;e64&&e<91}var ad=/\r\n/g;function od(e,t){let n=Nu.whitespace!==`preserve`,r=!1;for(let t=0;t0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&Td(s,n)>=2){let t=Ed(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(s.type===12&&(r?0:Sd(s,n))>=2){o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,xd(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)xd(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;te.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function Sd(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=Td(e,t);if(a===0)return n.set(e,0),0;a1)for(let i=0;in&&(D.childIndex--,D.onNodeRemoved()),D.parent.children.splice(n,1)},onNodeRemoved:l,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){C(e)&&(e=ql(e)),D.hoists.push(e);let t=ql(`_hoisted_${D.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=Ql(D.cached.length,e,t,n);return D.cached.push(r),r}};return D.filters=new Set,D}function Od(e,t){let n=Dd(e,t);jd(e,n),t.hoistStatic&&yd(e,n),t.ssr||kd(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function kd(e,t){let{helper:n}=t,{children:r}=e;if(r.length===1){let n=r[0];if(bd(e,n)&&n.codegenNode){let r=n.codegenNode;r.type===13&&nu(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=Ul(t,n(al),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}function Ad(e,t){let n=0,r=()=>{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(e.type===1){let{props:i}=e;if(e.tagType===3&&i.some(Ste))return;let a=[];for(let o=0;o`${zl[e]}: _${zl[e]}`;function Fd(e,{mode:t=`function`,prefixIdentifiers:n=t===`module`,sourceMap:r=!1,filename:i=`template.vue.html`,scopeId:a=null,optimizeImports:o=!1,runtimeGlobalName:s=`Vue`,runtimeModuleName:c=`vue`,ssrRuntimeModuleName:l=`vue/server-renderer`,ssr:u=!1,isTS:d=!1,inSSR:f=!1}){let p={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:a,optimizeImports:o,runtimeGlobalName:s,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:u,isTS:d,inSSR:f,source:e.source,code:``,column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${zl[e]}`},push(e,t=-2,n){p.code+=e},indent(){m(++p.indentLevel)},deindent(e=!1){e?--p.indentLevel:m(--p.indentLevel)},newline(){m(p.indentLevel)}};function m(e){p.push(`
@@ -246,7 +246,7 @@ Z`}function xge(e,t){let n=Dn(e),r=rn(pT(e)),i=rn(pT(t)),a=P(null);return no([r,
`);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(YU.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[NQ({find:exe,type:this.type,getAttributes:e=>({language:e[1]})}),NQ({find:txe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new _W({key:new bW(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
`));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection($U.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}).extend({addProseMirrorPlugins(){return[...this.parent(),new _W({key:new bW(`codeBlockLanguageDecoration`),props:{decorations(e){let t=[];return e.doc.descendants((e,n)=>{e.type.name===J6.name&&e.attrs.language&&t.push(Zq.node(n,n+e.nodeSize,{"data-language":e.attrs.language}))}),eJ.create(e.doc,t)}}})]}});function nxe(e){let t=1,n=[];return e.doc.descendants((r,i)=>{r.type.name==`footnoteReference`&&(e.setNodeAttribute(i,`referenceNumber`,`${t}`),n.push(r),t+=1)}),n}function rxe(e){let t,n=[];return e.doc.descendants((e,r)=>{if(e.type.name==`footnote`)n.push(e);else if(e.type.name==`footnotes`)t={from:r,to:r+e.nodeSize};else return!1}),{footnotesRange:t,footnotes:n}}function ixe(e,t){let n=nxe(e),r=t.schema.nodes.footnote,i=t.schema.nodes.footnotes,a=t.schema.nodeFromJSON({type:`paragraph`,content:[]}),{footnotesRange:o,footnotes:s}=rxe(e),c=s.reduce((e,t)=>(e[t.attrs[`data-id`]]=t,e),{}),l=[],u=new Set(n.map(e=>e.attrs[`data-id`])),d=new Set;for(let e of s){let t=e.attrs[`data-id`];(!u.has(t)||d.has(t))&&(d.add(t),e.content.descendants(e=>{e.type.name==`footnoteReference`&&d.add(e.attrs[`data-id`])}))}for(let e=0;e{n?.type.name==`doc`&&e.type.name!=`footnotes`?i=!0:e.type.name==`footnote`?a+=1:e.type.name==`footnotes`&&(r=!0)}),!(i&&r)&&a<=1},appendTransaction(e,t,n){let r=n.tr,i=!1;for(let t of e)if(t.docChanged){if(i)break;for(let e of t.steps){if(!(e instanceof tU))continue;if(i)break;let n=e.from!=e.to;e.slice.size>0&&e.slice.content.descendants(e=>{if(e?.type.name==`footnoteReference`)return i=!0,!1}),n&&!i&&t.before.nodesBetween(e.from,Math.min(t.before.content.size,e.to),e=>{if(e.type.name==`footnoteReference`)return i=!0,!1})}}return i?(ixe(r,n),r):null}})]}}),Y6=xbe.extend({name:`footnotes`,group:``,isolating:!0,defining:!0,draggable:!1,content(){return`footnote*`},addAttributes(){return{class:{default:`footnotes`}}},parseHTML(){return[{tag:`ol.footnotes`,priority:1e3}]},addKeyboardShortcuts(){return{}},addCommands(){return{}},addInputRules(){return[]},addExtensions(){return[axe]}}),X6=`data-reference-number`,Z6=`footnote-ref`,oxe=FQ.create({name:`footnoteReference`,inline:!0,content:`text*`,group:`inline`,atom:!0,draggable:!0,parseHTML(){return[{tag:`sup`,priority:1e3,getAttrs(e){let t=e.querySelector(`a.${Z6}:first-child`);if(!t)return!1;let n=t.getAttribute(`data-id`),r=t.getAttribute(X6);return{"data-id":n??crypto.randomUUID(),referenceNumber:r??t.innerText}},contentElement(e){return e.firstChild}}]},addAttributes(){return{class:{default:Z6},"data-id":{renderHTML(e){return{"data-id":e[`data-id`]||crypto.randomUUID()}}},referenceNumber:{},href:{renderHTML(e){return{href:`#fn:${e.referenceNumber}`}}}}},renderHTML({HTMLAttributes:e}){let{referenceNumber:t,...n}=e,r=pX(this.options.HTMLAttributes,n);return r[X6]=t,[`sup`,{id:`fnref:${t}`},[`a`,r,e.referenceNumber]]},addProseMirrorPlugins(){let{editor:e}=this,t=e=>{if(e.type.name===this.name){let t={...e.attrs,"data-id":crypto.randomUUID()};return e.type.create(t,e.content,e.marks)}if(e.content&&e.content.size>0){let n=[],r=!1;if(e.content.forEach(e=>{let i=t(e);i!==e&&(r=!0),n.push(i)}),r)return e.copy($.from(n))}return e};return[new _W({key:new bW(`footnotePasteHandler`),props:{transformPasted(e){let n=[],r=!1;return e.content.forEach(e=>{let i=t(e);i!==e&&(r=!0),n.push(i)}),r?new bV($.from(n),e.openStart,e.openEnd):e}}}),new _W({key:new bW(`footnoteRefClick`),props:{handleDoubleClickOn(t,n,r,i,a){if(r.type.name!=`footnoteReference`)return!1;a.preventDefault();let o=r.attrs[`data-id`];return e.commands.focusFootnote(o)},handleClickOn(t,n,r,i,a){if(r.type.name!=`footnoteReference`)return!1;a.preventDefault();let{selection:o}=e.state.tr;if(o instanceof tW&&o.node.eq(r)){let t=r.attrs[`data-id`];return e.commands.focusFootnote(t)}else return e.chain().setNodeSelection(i).run(),!0}}})]},addCommands(){return{addFootnote:()=>({state:e,tr:t})=>{let n=this.type.create({"data-id":crypto.randomUUID()});return t.insert(e.selection.anchor,n),!0}}},addInputRules(){return[{find:/\[\^(.*?)\]/,type:this.type,undoable:!0,handler({range:e,match:t,chain:n}){let r=e.from,i=e.to;t[1]&&n().deleteRange({from:r,to:i}).addFootnote().run()}}]}}),sxe=pye.extend({name:`footnote`,content(){return this.options.content},isolating:!0,defining:!0,draggable:!1,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`,...this.parent?.(),content:`paragraph+`}},addAttributes(){return{id:{isRequired:!0},"data-id":{isRequired:!0}}},parseHTML(){return[{tag:`li`,getAttrs(e){return e.getAttribute(`data-id`)?{"data-id":e.getAttribute(`data-id`)}:!1},priority:1e3}]},renderHTML({HTMLAttributes:e}){return[`li`,pX(this.options.HTMLAttributes,e),0]},addCommands(){return{focusFootnote:e=>({editor:t,chain:n})=>{let r=t.$node(`footnote`,{"data-id":e});return r?(n().focus().setTextSelection(r.from+r.content.size).run(),r.element.scrollIntoView(),!0):!1}}},addKeyboardShortcuts(){return{"Mod-a":({editor:e})=>{try{let{selection:t}=e.state,{$from:n}=t;for(let t=n.depth;t>=0;t--)if(n.node(t).type.name===`footnote`){let r=n.start(t),i=n.end(t);return e.commands.setTextSelection({from:r+1,to:i-1}),!0}return!1}catch{return!1}},Tab:({editor:e})=>{try{let{selection:t}=e.state,n=e.$pos(t.anchor);if(!n.after)return!1;if(n.after.node.type.name==`footnotes`){let t=n.after.node.child(0);return e.chain().setTextSelection(n.after.from+t.content.size).scrollIntoView().run(),!0}else{let n=t.$from.start(2);if(Number.isNaN(n))return!1;let r=e.$pos(n);return r.node.type.name!=`footnote`||!r.after?!1:(e.chain().setTextSelection(r.after.to-1).scrollIntoView().run(),!0)}}catch{return!1}},"Shift-Tab":({editor:e})=>{let{selection:t}=e.state,n=t.$from.start(2);if(Number.isNaN(n))return!1;let r=e.$pos(n);return r.node.type.name!=`footnote`||!r.before?!1:(e.chain().setTextSelection(r.before.to-1).scrollIntoView().run(),!0)}}}}),cxe=xZ.create({name:`footnotesExtension`,addExtensions(){return[Y6,sxe.extend({addProseMirrorPlugins(){let e=this.editor;return[new _W({key:new bW(`footnoteDecoration`),props:{decorations:e=>{let t=[];return e.doc.descendants((e,n)=>{if(e.type.name===`footnote`){let r=e.attrs.id,i=r?.startsWith(`fn:`)?r.replace(`fn:`,``):r;t.push(Zq.widget(n+1,()=>{let e=document.createElement(`sup`),t=document.createElement(`a`);return t.href=`#fnref:${i}`,t.draggable=!1,t.className=`underline p-1 -m-1 underline-offset-4 decoration-foreground/20 hover:decoration-foreground select-none`,t.textContent=`[^]`,e.className=`footnote-backref absolute left-[.125em] top-1.5`,e.appendChild(t),e}))}}),eJ.create(e.doc,t)},handleClickOn(t,n,r,i,a){if(a.target?.closest(`.footnote-backref`)){a.preventDefault();let t=a.target.closest(`[data-id]`).getAttribute(`data-id`);return setTimeout(()=>e.commands.focusFootnoteReference(t)),!0}}}})]},addCommands(){return{focusFootnote:e=>({editor:t,chain:n})=>{let r=t.$node(`footnote`,{"data-id":e});return r?(n().focus().setTextSelection(r.from+r.content.size).run(),r.element.scrollIntoView({block:`nearest`}),!0):!1}}}}),oxe.extend({addCommands(){return{...this.parent(),focusFootnoteReference:e=>({editor:t,chain:n})=>{let r=null;return t.state.doc.descendants((t,n)=>{if(t.type.name===`footnoteReference`&&t.attrs[`data-id`]===e)return r={from:n},!1}),r?(n().focus().setTextSelection(r.from).run(),t.view.dom.querySelector(`.footnote-ref[data-id="${e}"]`).scrollIntoView({block:`nearest`}),!0):!1}}},addProseMirrorPlugins(){let e=this.editor;return[new _W({key:new bW(`customFootnoteRefClick`),props:{handleDOMEvents:{click(e,t){t.target?.closest(`.footnote-ref`)&&t.preventDefault()}},handleClickOn(t,n,r,i,a){if(r.type.name===`footnoteReference`){let t=r.attrs[`data-id`];return setTimeout(()=>e.commands.focusFootnote(t)),!0}}}}),...this.parent()]}})]}});function Q6({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}function $6(e){let{lastChild:t}=e;return t?.type.name===Y6.name?{node:e.content.child(e.childCount-2),pos:e.content.size-t.nodeSize}:{node:t,pos:e.content.size}}var lxe=xZ.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new bW(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new _W({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),{pos:l}=$6(a),u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let{node:r}=$6(t.tr.doc);return console.log(`lastNode`,r),!Q6({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let{node:r}=$6(e.doc);return!Q6({node:r,types:n})}}})]}});function uxe(e){let t=t=>e.toolbar?.some(e=>Array.isArray(t)?t.includes(e):e===t);return[t(`blockquote`)&&gve,t(`bold`)&&xve,t(`bullet-list`)&&U2,xZ.create({name:`characterCountExtension`,addExtensions(){return[Vve.configure()]}}),Qbe.configure({inline:e.inline}),t(`code`)&&rye,t(`code-block`)&&J6,fve.extend({content:[e.uploads||Object.keys(e.embeds??{}).length?`(block | embed)+`:`block+`,t(`footnote`)&&`footnotes?`].filter(Boolean).join(` `)}),Hve,t(`footnote`)&&cxe,Uve,aye.extend({addKeyboardShortcuts(){return e.inline?{Enter:()=>this.editor.commands.setHardBreak(),...this.parent()}:this.parent()}}),t(`highlight`)&&ybe,t([`heading-1`,`heading-2`,`heading-3`])&&iye.configure({levels:[1,2,3].filter(e=>t(`heading-${e}`))}),t(`horizontal-rule`)&&mye.extend({}),Zbe,t(`iframe`)&&x2,t(`italic`)&&fye,t(`link`)&&Kbe.extend({inclusive:!1}).configure({openOnClick:!1,HTMLAttributes:{rel:null,target:null}}),t([`bullet-list`,`ordered-list`])&&W2,sye,t(`ordered-list`)&&n4,mve,e.placeholder&&Wve.configure({placeholder:e.placeholder}),qbe,t(`small`)&&$be,t(`superscript`)&&bbe,t(`table`)&&[Q4,q4,K4,G4],pve,!e.inline&&lxe,Gve].flat().filter(e=>!!e)}var e8=class{constructor(e,t,n){this.embeds={},this.state=rn({contentEmbeds:{}}),this.root=e,this.embeds=t??{},this.contentEmbeds=Object.fromEntries(Object.entries(n??{}).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([t,n])=>[t,{embed:this.embeds[e],value:n}]))]))}get contentEmbeds(){return this.state.contentEmbeds}set contentEmbeds(e){this.state.contentEmbeds=e}get serializedEmbeds(){return Object.fromEntries(Object.entries(this.contentEmbeds).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([e,t])=>!t.removed).map(([e,t])=>[e,t.value]))]))}getEmbed(e,t){return this.contentEmbeds[e.key]?.[t]?.value}newEmbed(e,t,n){var r,i;let a=String(Object.keys(this.contentEmbeds[e.key]??{}).length);return(r=this.contentEmbeds)[i=e.key]??(r[i]={}),this.contentEmbeds[e.key][a]={embed:e,value:n?{...n,_locale:t}:null},a}syncEmbeds(e,t,n){this.contentEmbeds[e.key]={...Object.fromEntries(Object.entries(this.contentEmbeds[e.key]??{}).map(([e,r])=>[e,{...r,removed:r.value?._locale==t?!n.some(t=>String(t)===e):r.removed}]))}}postResolveForm(e,t){let{entityKey:n,instanceId:r}=this.root;return gL.post(r?HP(`code16.sharp.api.embed.instance.form.show`,{embedKey:t.key,entityKey:n,instanceId:r}):HP(`code16.sharp.api.embed.form.show`,{embedKey:t.key,entityKey:n}),{...this.contentEmbeds[t.key]?.[e]?.value}).then(e=>e.data)}async postForm(e,t,n,r){let{entityKey:i,instanceId:a}=this.root,o=await gL.post(a?HP(`code16.sharp.api.embed.instance.form.update`,{embedKey:t.key,entityKey:i,instanceId:a}):HP(`code16.sharp.api.embed.form.update`,{embedKey:t.key,entityKey:i}),{...r}).then(e=>e.data);return e??(e=this.newEmbed(t,n)),this.contentEmbeds[t.key][e]={embed:t,value:{...o,_locale:n}},{id:e}}},t8=class{constructor(e,t,n={editorField:null}){this.state=rn({contentUploads:{}}),this.root=e,this.editorField=n.editorField,this.contentUploads=Object.fromEntries(Object.entries(t??{}).map(([e,t])=>[e,{value:t}]))}get contentUploads(){return this.state.contentUploads}set contentUploads(e){this.state.contentUploads=e}get serializedUploads(){return Object.fromEntries(Object.entries(this.contentUploads).filter(([e,t])=>!t.removed).map(([e,t])=>[e,t.value]))}getUpload(e){return this.contentUploads[e]?.value}newUpload(e,t){let n=String(Object.keys(this.contentUploads).length);return this.contentUploads[n]={value:{...t,_locale:e}},n}syncUploads(e,t){this.contentUploads=Object.fromEntries(Object.entries(this.contentUploads).map(([n,r])=>[n,{...r,removed:r.value?._locale==e?!t.some(e=>String(e)===n):r.removed}]))}updateUpload(e,t){this.contentUploads[e].value={...this.contentUploads[e].value,...t}}async postForm(e,t,n){let{entityKey:r,instanceId:i}=this.root,a=await gL.post(HP(`code16.sharp.api.form.editor.upload.form.update`,{entityKey:r,instanceId:i}),{data:n,fields:this.editorField.uploads.fields}).then(e=>e.data);return e??(e=this.newUpload(t)),this.contentUploads[e]={value:a},{id:e}}},n8=class extends Error{constructor(e,t=null){super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`),HC(this,`cause`,void 0),HC(this,`isNetworkError`,void 0),HC(this,`request`,void 0),this.cause=e,this.isNetworkError=!0,this.request=t}};function r8(e,t,n){return e.set(RC(e,t),n),n}var i8=new WeakMap,a8=new WeakMap,o8=new WeakMap,s8=new WeakMap,dxe=class{constructor(e,t){LC(this,i8,void 0),LC(this,a8,!1),LC(this,o8,void 0),LC(this,s8,void 0),r8(s8,this,e),r8(o8,this,()=>t(e))}progress(){Z(a8,this)||Z(s8,this)>0&&(clearTimeout(Z(i8,this)),r8(i8,this,setTimeout(Z(o8,this),Z(s8,this))))}done(){Z(a8,this)||(clearTimeout(Z(i8,this)),r8(i8,this,void 0),r8(a8,this,!0))}},c8=()=>{};function fxe(e,t={}){let{body:n=null,headers:r={},method:i=`GET`,onBeforeRequest:a=c8,onUploadProgress:o=c8,shouldRetry:s=()=>!0,onAfterResponse:c=c8,onTimeout:l=c8,responseType:u,retries:d=3,signal:f=null,timeout:p=3e4,withCredentials:m=!1}=t,h=e=>.3*2**(e-1)*1e3,g=new dxe(p,l);function _(t=0){return new Promise(async(l,p)=>{let v=new XMLHttpRequest,y=e=>{s(v)&&t{_(t+1).then(l,p)},h(t)):(g.done(),p(e))};v.open(i,e,!0),v.withCredentials=m,u&&(v.responseType=u),v.onload=async()=>{try{await c(v,t)}catch(e){e.request=v,y(e);return}v.status>=200&&v.status<300?(g.done(),l(v)):s(v)&&t{_(t+1).then(l,p)},h(t)):(g.done(),p(new n8(v.statusText,v)))},v.onerror=()=>y(new n8(v.statusText,v)),v.upload.onprogress=e=>{g.progress(),o(e)},r&&Object.keys(r).forEach(e=>{v.setRequestHeader(e,r[e])});function b(){v.abort(),p(new DOMException(`Aborted`,`AbortError`))}if(f?.addEventListener(`abort`,b),f?.aborted){b();return}await a(v,t),v.send(n)})}return _()}var pxe=e=>`error`in e&&!!e.error,mxe=e=>e.progress.uploadComplete;function hxe(e){return e.filter(e=>!pxe(e)&&!mxe(e))}function gxe(e){return e.filter(e=>!e.progress?.uploadStarted||!e.isRestored)}function l8(e){let t=e.lastIndexOf(`.`);return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var u8={__proto__:null,md:`text/markdown`,markdown:`text/markdown`,mp4:`video/mp4`,mp3:`audio/mp3`,svg:`image/svg+xml`,jpg:`image/jpeg`,png:`image/png`,webp:`image/webp`,gif:`image/gif`,heic:`image/heic`,heif:`image/heif`,yaml:`text/yaml`,yml:`text/yaml`,csv:`text/csv`,tsv:`text/tab-separated-values`,tab:`text/tab-separated-values`,avi:`video/x-msvideo`,mks:`video/x-matroska`,mkv:`video/x-matroska`,mov:`video/quicktime`,dicom:`application/dicom`,doc:`application/msword`,msg:`application/vnd.ms-outlook`,docm:`application/vnd.ms-word.document.macroenabled.12`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,dot:`application/msword`,dotm:`application/vnd.ms-word.template.macroenabled.12`,dotx:`application/vnd.openxmlformats-officedocument.wordprocessingml.template`,xla:`application/vnd.ms-excel`,xlam:`application/vnd.ms-excel.addin.macroenabled.12`,xlc:`application/vnd.ms-excel`,xlf:`application/x-xliff+xml`,xlm:`application/vnd.ms-excel`,xls:`application/vnd.ms-excel`,xlsb:`application/vnd.ms-excel.sheet.binary.macroenabled.12`,xlsm:`application/vnd.ms-excel.sheet.macroenabled.12`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,xlt:`application/vnd.ms-excel`,xltm:`application/vnd.ms-excel.template.macroenabled.12`,xltx:`application/vnd.openxmlformats-officedocument.spreadsheetml.template`,xlw:`application/vnd.ms-excel`,txt:`text/plain`,text:`text/plain`,conf:`text/plain`,log:`text/plain`,pdf:`application/pdf`,zip:`application/zip`,"7z":`application/x-7z-compressed`,rar:`application/x-rar-compressed`,tar:`application/x-tar`,gz:`application/gzip`,dmg:`application/x-apple-diskimage`};function d8(e){if(e.type)return e.type;let t=e.name?l8(e.name).extension?.toLowerCase():null;return t&&t in u8?u8[t]:`application/octet-stream`}function _xe(e){return e.charCodeAt(0).toString(32)}function f8(e){let t=``;return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${_xe(e)}`,`/`))+t}function vxe(e,t){let n=t||`uppy`;return typeof e.name==`string`&&(n+=`-${f8(e.name.toLowerCase())}`),e.type!==void 0&&(n+=`-${e.type}`),e.meta&&typeof e.meta.relativePath==`string`&&(n+=`-${f8(e.meta.relativePath.toLowerCase())}`),e.data?.size!==void 0&&(n+=`-${e.data.size}`),e.data.lastModified!==void 0&&(n+=`-${e.data.lastModified}`),n}function yxe(e){return!e.isRemote||!e.remote?!1:new Set([`box`,`dropbox`,`drive`,`facebook`,`unsplash`]).has(e.remote.provider)}function bxe(e,t){if(yxe(e))return e.id;let n=d8(e);return vxe({...e,type:n},t)}function p8(e,t){return e===!0?Object.keys(t):Array.isArray(e)?e:[]}var m8=Array.from;function xxe(e){let t=m8(e.files);return Promise.resolve(t)}function h8(e,t,n,{onSuccess:r}){e.readEntries(i=>{let a=[...t,...i];i.length?queueMicrotask(()=>{h8(e,a,n,{onSuccess:r})}):r(a)},e=>{n(e),r(t)})}function g8(e,t){return e==null?e:{kind:e.isFile?`file`:e.isDirectory?`directory`:void 0,name:e.name,getFile(){return new Promise((t,n)=>e.file(t,n))},async*values(){let n=e.createReader();yield*await new Promise(e=>{h8(n,[],t,{onSuccess:n=>e(n.map(e=>g8(e,t)))})})},isSameEntry:void 0}}async function*_8(e,t,n=void 0){let r=()=>`${t}/${e.name}`;if(e.kind===`file`){let i=await e.getFile();i==null?n!=null&&(yield n):(i.relativePath=t?r():null,yield i)}else if(e.kind===`directory`)for await(let n of e.values())yield*_8(n,t?r():e.name);else n!=null&&(yield n)}async function*Sxe(e,t){let n=await Promise.all(Array.from(e.items,async e=>{let n;return n??(n=g8(typeof e.getAsEntry==`function`?e.getAsEntry():e.webkitGetAsEntry(),t)),{fileSystemHandle:n,lastResortFile:e.getAsFile()}}));for(let{lastResortFile:e,fileSystemHandle:r}of n)if(r!=null)try{yield*_8(r,``,e)}catch(n){e==null?t(n):yield e}else e!=null&&(yield e)}async function Cxe(e,t){let n=t?.logDropError??Function.prototype;try{let t=[];for await(let r of Sxe(e,n))t.push(r);return t}catch{return xxe(e)}}function v8(e){return e<10?`0${e}`:e.toString()}function y8(){let e=new Date;return`${v8(e.getHours())}:${v8(e.getMinutes())}:${v8(e.getSeconds())}`}function wxe(e){return e?e.readyState===4&&e.status===0:!1}function b8(e,t){IC(e,t),t.add(e)}var x8=new WeakMap,S8=new WeakMap,C8=new WeakMap,w8=new WeakMap,T8=new WeakSet,Txe=class{constructor(e){b8(this,T8),LC(this,x8,[]),LC(this,S8,0),LC(this,C8,void 0),LC(this,w8,!1);let t=e?.concurrency;r8(C8,this,typeof t!=`number`||t===0?1/0:t)}add(e){let t=new AbortController,n,r,i=new Promise((e,t)=>{n=e,r=t}),a={run:()=>e(t.signal),resolve:n,reject:r,controller:t};return t.signal.addEventListener(`abort`,()=>{let e=Z(x8,this).indexOf(a);e!==-1&&(Z(x8,this).splice(e,1),r(t.signal.reason??new DOMException(`Aborted`,`AbortError`)))},{once:!0}),i.abort=e=>{t.abort(e??new DOMException(`Aborted`,`AbortError`))},i.abortOn=e=>{if(e){let t=()=>i.abort(e.reason);e.addEventListener(`abort`,t,{once:!0}),i.then(()=>e.removeEventListener(`abort`,t),()=>e.removeEventListener(`abort`,t))}return i},!Z(w8,this)&&Z(S8,this)this.add(n=>e(...t))}};function E8(e){var t;if(r8(S8,this,(t=Z(S8,this),t++,t)),e.controller.signal.aborted){var n;r8(S8,this,(n=Z(S8,this),n--,n)),e.reject(e.controller.signal.reason??new DOMException(`Aborted`,`AbortError`)),RC(T8,this,D8).call(this);return}let r;try{r=e.run()}catch(e){r=Promise.reject(e)}r.then(t=>{e.controller.signal.aborted?e.reject(e.controller.signal.reason??new DOMException(`Aborted`,`AbortError`)):e.resolve(t)},t=>{e.reject(t)}).finally(()=>{var e;r8(S8,this,(e=Z(S8,this),e--,e)),RC(T8,this,D8).call(this)})}function D8(){queueMicrotask(()=>{if(!(Z(w8,this)||Z(S8,this)>=Z(C8,this)))for(;Z(x8,this).length>0;){let e=Z(x8,this).shift();if(!e.controller.signal.aborted){RC(T8,this,E8).call(this,e);return}}})}function Exe(e,t,n){let r=[];return e.forEach(e=>typeof e==`string`?t[Symbol.split](e).forEach((e,t,i)=>{e!==``&&r.push(e),t{throw Error(`missing string: ${e}`)},k8=new WeakMap,A8=new WeakSet,j8=class{constructor(e,{onMissingKey:t=Dxe}={}){b8(this,A8),HC(this,`locale`,void 0),LC(this,k8,void 0),this.locale={strings:{},pluralize(e){return e===1?0:1}},Array.isArray(e)?e.forEach(RC(A8,this,M8),this):RC(A8,this,M8).call(this,e),r8(k8,this,t)}translate(e,t){return this.translateArray(e,t).join(``)}translateArray(e,t){let n=this.locale.strings[e];if(n??(Z(k8,this).call(this,e),n=e),typeof n==`object`){if(t&&t.smart_count!==void 0){let e=this.locale.pluralize(t.smart_count);return O8(n[e],t)}throw Error(`Attempted to use a string with plural forms, but no value was given for %{smart_count}`)}if(typeof n!=`string`)throw Error(`string was not a string`);return O8(n,t)}};function M8(e){if(!e?.strings)return;let t=this.locale;Object.assign(this.locale,{strings:{...t.strings,...e.strings},pluralize:e.pluralize||t.pluralize})}var N8=class{constructor(e,t){HC(this,`uppy`,void 0),HC(this,`opts`,void 0),HC(this,`id`,void 0),HC(this,`defaultLocale`,void 0),HC(this,`i18n`,void 0),HC(this,`i18nArray`,void 0),HC(this,`type`,void 0),HC(this,`VERSION`,void 0),this.uppy=e,this.opts=t??{}}getPluginState(){let{plugins:e}=this.uppy.getState();return e?.[this.id]||{}}setPluginState(e){let{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){let e=new j8([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw Error(`Extend the addTarget method to add your plugin to another plugin's target`)}install(){}uninstall(){}update(e){}afterUpdate(){}},P8=new WeakMap,F8=new WeakMap,Oxe=class{constructor(e){LC(this,P8,void 0),LC(this,F8,[]),r8(P8,this,e)}on(e,t){return Z(F8,this).push([e,t]),Z(P8,this).on(e,t)}remove(){for(let[e,t]of Z(F8,this).splice(0))Z(P8,this).off(e,t)}onFilePause(e,t){this.on(`upload-pause`,(n,r)=>{e===n?.id&&t(r)})}onFileRemove(e,t){this.on(`file-removed`,n=>{e===n.id&&t(n.id)})}onPause(e,t){this.on(`upload-pause`,(n,r)=>{e===n?.id&&t(r)})}onRetry(e,t){this.on(`upload-retry`,n=>{e===n?.id&&t()})}onRetryAll(e,t){this.on(`retry-all`,()=>{Z(P8,this).getFile(e)&&t()})}onPauseAll(e,t){this.on(`pause-all`,()=>{Z(P8,this).getFile(e)&&t()})}onCancelAll(e,t){this.on(`cancel-all`,(...n)=>{Z(P8,this).getFile(e)&&t(...n)})}onResumeAll(e,t){this.on(`resume-all`,()=>{Z(P8,this).getFile(e)&&t()})}},kxe={debug:()=>{},warn:()=>{},error:(...e)=>console.error(`[Uppy] [${y8()}]`,...e)},Axe={debug:(...e)=>console.debug(`[Uppy] [${y8()}]`,...e),warn:(...e)=>console.warn(`[Uppy] [${y8()}]`,...e),error:(...e)=>console.error(`[Uppy] [${y8()}]`,...e)},jxe=n(((e,t)=>{t.exports=function(e){if(typeof e!=`number`||Number.isNaN(e))throw TypeError(`Expected a number, got ${typeof e}`);let t=e<0,n=Math.abs(e);if(t&&(n=-n),n===0)return`0 B`;let r=[`B`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],i=Math.min(Math.floor(Math.log(n)/Math.log(1024)),r.length-1),a=Number(n/1024**i),o=r[i];return`${a>=10||a%1==0?Math.round(a):a.toFixed(1)} ${o}`}})),Mxe=n(((e,t)=>{function n(e,t){this.text=e=e||``,this.hasWild=~e.indexOf(`*`),this.separator=t,this.parts=e.split(t)}n.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,a;if(typeof e==`string`||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(a=(e||``).split(this.separator),r=0;t&&r{var n=Mxe(),r=/[\/\+\.]/;t.exports=function(e,t){function i(t){var i=n(t,e,r);return i&&i.length>=2}return t?i(t.split(`;`)[0]):i}})),I8=t(jxe(),1),Pxe=t(Nxe(),1),Fxe={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},L8=class extends Error{constructor(e,t){super(e),HC(this,`isUserFacing`,void 0),HC(this,`file`,void 0),HC(this,`isRestriction`,!0),this.isUserFacing=t?.isUserFacing??!0,t?.file&&(this.file=t.file)}},Ixe=class{constructor(e,t){HC(this,`getI18n`,void 0),HC(this,`getOpts`,void 0),this.getI18n=t,this.getOpts=()=>{let t=e();if(t.restrictions?.allowedFileTypes!=null&&!Array.isArray(t.restrictions.allowedFileTypes))throw TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validateAggregateRestrictions(e,t){let{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r&&e.filter(e=>!e.isGhost).length+t.length>r)throw new L8(`${this.getI18n()(`youCanOnlyUploadX`,{smart_count:r})}`);if(n){let r=[...e,...t].reduce((e,t)=>e+(t.size??0),0);if(r>n)throw new L8(this.getI18n()(`aggregateExceedsSize`,{sizeAllowed:(0,I8.default)(n),size:(0,I8.default)(r)}))}}validateSingleFile(e){let{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r&&!r.some(t=>t.includes(`/`)?e.type?(0,Pxe.default)(e.type.replace(/;.*?$/,``),t):!1:t[0]===`.`&&e.extension?e.extension.toLowerCase()===t.slice(1).toLowerCase():!1)){let t=r.join(`, `);throw new L8(this.getI18n()(`youCanOnlyUploadFileTypes`,{types:t}),{file:e})}if(t&&e.size!=null&&e.size>t)throw new L8(this.getI18n()(`exceedsSize`,{size:(0,I8.default)(t),file:e.name??this.getI18n()(`unnamed`)}),{file:e});if(n&&e.size!=null&&e.size{this.validateSingleFile(e)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){let{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length{Z(R8,this).delete(e)}}};function Rxe(...e){Z(R8,this).forEach(t=>{t(...e)})}HC(B8,`VERSION`,Lxe.version);var zxe=n(((e,t)=>{var n=GI(),r=ZP(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a})),Bxe=n(((e,t)=>{t.exports=function(){var e={},t=e._fns={};e.emit=function(e,t,i,a,o,s,c){var l=n(e);l.length&&r(e,l,[t,i,a,o,s,c])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){function r(){n.apply(this,arguments),e.off(t,r)}this.on(t,r)},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],i=0,a=r?r.length:0;i{let t=``,n=e|0;for(;n--;)t+=Vxe[Math.random()*64|0];return t},Uxe={name:`@uppy/core`,description:`Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:`,version:`5.2.0`,license:`MIT`,style:`dist/style.min.css`,type:`module`,sideEffects:[`*.css`],scripts:{build:`tsc --build tsconfig.build.json`,"build:css":`sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css`,typecheck:`tsc --build`,test:`vitest run --environment=jsdom --silent='passed-only'`},keywords:[`file uploader`,`uppy`,`uppy-plugin`],homepage:`https://uppy.io`,bugs:{url:`https://github.com/transloadit/uppy/issues`},repository:{type:`git`,url:`git+https://github.com/transloadit/uppy.git`},files:[`src`,`lib`,`dist`,`CHANGELOG.md`],exports:{".":`./lib/index.js`,"./css/style.min.css":`./dist/style.min.css`,"./css/style.css":`./dist/style.css`,"./css/style.scss":`./src/style.scss`,"./package.json":`./package.json`},dependencies:{"@transloadit/prettier-bytes":`^0.3.4`,"@uppy/store-default":`^5.0.0`,"@uppy/utils":`^7.1.4`,lodash:`^4.17.21`,"mime-match":`^1.0.2`,"namespace-emitter":`^2.0.1`,nanoid:`^5.0.9`,preact:`^10.5.13`},devDependencies:{"@types/deep-freeze":`^0`,cssnano:`^7.0.7`,"deep-freeze":`^0.0.1`,jsdom:`^26.1.0`,postcss:`^8.5.6`,"postcss-cli":`^11.0.1`,sass:`^1.89.2`,typescript:`^5.8.3`,vitest:`^3.2.4`}};function Wxe(e,t){return t.name?t.name:e.split(`/`)[0]===`image`?`${e.split(`/`)[0]}.${e.split(`/`)[1]}`:`noname`}var Gxe={strings:{addBulkFilesFailed:{0:`Failed to add %{smart_count} file due to an internal error`,1:`Failed to add %{smart_count} files due to internal errors`},youCanOnlyUploadX:{0:`You can only upload %{smart_count} file`,1:`You can only upload %{smart_count} files`},youHaveToAtLeastSelectX:{0:`You have to select at least %{smart_count} file`,1:`You have to select at least %{smart_count} files`},aggregateExceedsSize:`You selected %{size} of files, but maximum allowed size is %{sizeAllowed}`,exceedsSize:`%{file} exceeds maximum allowed size of %{size}`,missingRequiredMetaField:`Missing required meta fields`,missingRequiredMetaFieldOnFile:`Missing required meta fields in %{fileName}`,inferiorSize:`This file is smaller than the allowed size of %{size}`,youCanOnlyUploadFileTypes:`You can only upload: %{types}`,noMoreFilesAllowed:`Cannot add more files`,noDuplicates:`Cannot add the duplicate file '%{fileName}', it already exists`,companionError:`Connection with Companion failed`,authAborted:`Authentication aborted`,companionUnauthorizeHint:`To unauthorize to your %{provider} account, please go to %{url}`,failedToUpload:`Failed to upload %{file}`,noInternetConnection:`No Internet connection`,connectedToInternet:`Connected to the Internet`,noFilesFound:`You have no files or folders here`,noSearchResults:`Unfortunately, there are no results for this search`,selectX:{0:`Select %{smart_count}`,1:`Select %{smart_count}`},allFilesFromFolderNamed:`All files from folder %{name}`,openFolderNamed:`Open folder %{name}`,cancel:`Cancel`,logOut:`Log out`,logIn:`Log in`,pickFiles:`Pick files`,pickPhotos:`Pick photos`,filter:`Filter`,resetFilter:`Reset filter`,loading:`Loading...`,loadedXFiles:`Loaded %{numFiles} files`,authenticateWithTitle:`Please authenticate with %{pluginName} to select files`,authenticateWith:`Connect to %{pluginName}`,signInWithGoogle:`Sign in with Google`,searchImages:`Search for images`,enterTextToSearch:`Enter text to search for images`,search:`Search`,resetSearch:`Reset search`,emptyFolderAdded:`No files were added from empty folder`,addedNumFiles:`Added %{numFiles} file(s)`,folderAlreadyAdded:`The folder "%{folder}" was already added`,folderAdded:{0:`Added %{smart_count} file from %{folder}`,1:`Added %{smart_count} files from %{folder}`},additionalRestrictionsFailed:`%{count} additional restrictions were not fulfilled`,unnamed:`Unnamed`,pleaseWait:`Please wait`}};function Kxe(e){if(e==null&&typeof navigator<`u`&&(e=navigator.userAgent),!e)return!0;let t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;let n=t[1].split(`.`,2),r=parseInt(n[0],10),i=parseInt(n[1],10);return r<15||r===15&&i<15063||r>18||r===18&&i>=18218}var qxe=t(zxe(),1),Jxe=t(Bxe(),1),V8,H8,U8,W8={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null},G8=new WeakMap,K8=new WeakMap,q8=new WeakMap,J8=new WeakMap,Y8=new WeakMap,X8=new WeakMap,Z8=new WeakMap,Q8=new WeakSet,$8=new WeakMap,e5=new WeakMap,t5=new WeakMap,n5=new WeakMap;V8=Symbol.for(`uppy test: updateTotalProgress`),H8=Symbol.for(`uppy test: getPlugins`),U8=Symbol.for(`uppy test: createUpload`);var r5=class e{constructor(t){b8(this,Q8),LC(this,G8,Object.create(null)),LC(this,K8,void 0),LC(this,q8,void 0),LC(this,J8,(0,Jxe.default)()),LC(this,Y8,new Set),LC(this,X8,new Set),LC(this,Z8,new Set),HC(this,`defaultLocale`,void 0),HC(this,`locale`,void 0),HC(this,`opts`,void 0),HC(this,`store`,void 0),HC(this,`i18n`,void 0),HC(this,`i18nArray`,void 0),HC(this,`scheduledAutoProceed`,null),HC(this,`wasOffline`,!1),LC(this,$8,(e,t)=>{let n=e?this.getFile(e.id):void 0;if(e==null||!n){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}if(n.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);return}let r={bytesTotal:t.bytesTotal,percentage:t.bytesTotal!=null&&Number.isFinite(t.bytesTotal)&&t.bytesTotal>0?Math.round(t.bytesUploaded/t.bytesTotal*100):void 0};n.progress.uploadStarted==null?this.setFileState(e.id,{progress:{...n.progress,...r}}):this.setFileState(e.id,{progress:{...n.progress,...r,bytesUploaded:t.bytesUploaded}}),Z(e5,this).call(this)}),LC(this,e5,(0,qxe.default)(()=>RC(Q8,this,u5).call(this),500,{leading:!0,trailing:!0})),LC(this,t5,this.updateOnlineStatus.bind(this)),LC(this,n5,new Map),this.defaultLocale=Gxe;let n={id:`uppy`,autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Fxe,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new B8,logger:kxe,infoTimeout:5e3},r={...n,...t};this.opts={...r,restrictions:{...n.restrictions,...t?.restrictions}},t?.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.",`warning`):t?.debug&&(this.opts.logger=Axe),this.log(`Using Core v${e.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...W8,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:Kxe(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),r8(K8,this,new Ixe(()=>this.opts,()=>this.i18n)),r8(q8,this,this.store.subscribe((e,t,n)=>{this.emit(`state-update`,e,t,n),this.updateAll(t)})),this.opts.debug&&typeof window<`u`&&(window[this.opts.id]=this),RC(Q8,this,$xe).call(this)}emit(e,...t){Z(J8,this).emit(e,...t)}on(e,t){return Z(J8,this).on(e,t),this}once(e,t){return Z(J8,this).once(e,t),this}off(e,t){return Z(J8,this).off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){let t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...t[e],...n}]))}})}setFileState(e,t){if(!this.getState().files[e])throw Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){let e=new j8([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,`error`)});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){let e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n=Object.create(null);Object.keys(t).forEach(r=>{n[r]={...t[r],progress:{...t[r].progress,...e},tus:void 0,transloadit:void 0}}),this.setState({files:n,...W8})}clear(){let{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw Error(`The installed uploader plugin does not allow removing files during an upload.`);this.setState({...W8,files:{}})}addPreProcessor(e){Z(Y8,this).add(e)}removePreProcessor(e){return Z(Y8,this).delete(e)}addPostProcessor(e){Z(Z8,this).add(e)}removePostProcessor(e){return Z(Z8,this).delete(e)}addUploader(e){Z(X8,this).add(e)}removeUploader(e){return Z(X8,this).delete(e)}setMeta(e){let t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log(`Adding metadata:`),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){let n={...this.getState().files};if(!n[e]){this.log(`Was trying to set metadata for a file that has been removed: ${e}`);return}let r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(e=>this.getFile(e))}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[];for(let e of r){let{progress:t}=e;!t.uploadComplete&&t.uploadStarted&&(i.push(e),e.isPaused||d.push(e)),t.uploadStarted||a.push(e),(t.uploadStarted||t.preprocess||t.postprocess)&&o.push(e),t.uploadStarted&&s.push(e),e.isPaused&&c.push(e),t.uploadComplete&&l.push(e),e.error&&u.push(e),(t.preprocess||t.postprocess)&&f.push(e)}return{newFiles:a,startedFiles:o,uploadStartedFiles:s,pausedFiles:c,completeFiles:l,erroredFiles:u,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:t===100&&l.length===r.length&&f.length===0,isAllErrored:!!n&&u.length===r.length,isAllPaused:i.length!==0&&c.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t=this.getFiles()){try{Z(K8,this).validate(t,[e])}catch(e){return e}return null}validateSingleFile(e){try{Z(K8,this).validateSingleFile(e)}catch(e){return e.message}return null}validateAggregateRestrictions(e){let t=this.getFiles();try{Z(K8,this).validateAggregateRestrictions(t,e)}catch(e){return e.message}return null}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){let{nextFilesState:t,validFilesToAdd:n,errors:r}=RC(Q8,this,s5).call(this,[e]),i=r.filter(e=>e.isRestriction);if(RC(Q8,this,i5).call(this,i),r.length>0)throw r[0];this.setState({files:t});let[a]=n;return this.emit(`file-added`,a),this.emit(`files-added`,n),this.log(`Added file: ${a.name}, ${a.id}, mime type: ${a.type}`),RC(Q8,this,o5).call(this),a.id}addFiles(e){let{nextFilesState:t,validFilesToAdd:n,errors:r}=RC(Q8,this,s5).call(this,e),i=r.filter(e=>e.isRestriction);RC(Q8,this,i5).call(this,i);let a=r.filter(e=>!e.isRestriction);if(a.length>0){let e=`Multiple errors occurred while adding files:
`;if(a.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n(`addBulkFilesFailed`,{smart_count:a.length}),details:e},`error`,this.opts.infoTimeout),typeof AggregateError==`function`)throw AggregateError(a,e);{let t=Error(e);throw t.errors=a,t}}this.setState({files:t}),n.forEach(e=>{this.emit(`file-added`,e)}),this.emit(`files-added`,n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)}),n.length>0&&RC(Q8,this,o5).call(this)}removeFiles(e){let{files:t,currentUploads:n}=this.getState(),r={...t},i={...n},a=Object.create(null);e.forEach(e=>{t[e]&&(a[e]=t[e],delete r[e])});function o(e){return a[e]===void 0}Object.keys(i).forEach(e=>{let t=n[e].fileIDs.filter(o);if(t.length===0){delete i[e];return}let{capabilities:r}=this.getState();if(t.length!==n[e].fileIDs.length&&!r.individualCancellation)throw Error(`The installed uploader plugin does not allow removing files during an upload.`);i[e]={...n[e],fileIDs:t}});let s={currentUploads:i,files:r};Object.keys(r).length===0&&(s.allowNewUpload=!0,s.error=null,s.recoveredState=null),this.setState(s),Z(e5,this).call(this);let c=Object.keys(a);c.forEach(e=>{this.emit(`file-removed`,a[e])}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(`, `)}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;let t=this.getFile(e),n=!t.isPaused;return this.setFileState(e,{isPaused:n}),this.emit(`upload-pause`,t,n),n}pauseAll(){let e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{e[t]={...e[t],isPaused:!0}}),this.setState({files:e}),this.emit(`pause-all`)}resumeAll(){let e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{e[t]={...e[t],isPaused:!1,error:null}}),this.setState({files:e}),this.emit(`resume-all`)}async retryAll(){let e=await RC(Q8,this,l5).call(this);return this.emit(`complete`,e),e}cancelAll(){this.emit(`cancel-all`);let{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t),this.setState(W8)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit(`upload-retry`,this.getFile(e));let t=RC(Q8,this,d5).call(this,[e],{forceAllowNewUpload:!0});return RC(Q8,this,p5).call(this,t)}logout(){this.iteratePlugins(e=>{e.provider?.logout?.()})}[V8](){return RC(Q8,this,u5).call(this)}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit(`is-online`),this.wasOffline&&(this.emit(`back-online`),this.info(this.i18n(`connectedToInternet`),`success`,3e3),this.wasOffline=!1)):(this.emit(`is-offline`),this.info(this.i18n(`noInternetConnection`),`error`,0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a plugin class, but got ${e===null?`null`:typeof e}. Please verify that the plugin was imported and spelled correctly.`);let n=new e(this,...t),r=n.id;if(!r)throw Error(`Your plugin must have an id`);if(!n.type)throw Error(`Your plugin must have a type`);let i=this.getPlugin(r);if(i){let e=`Already found a plugin named '${i.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options.`;throw Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in Z(G8,this)?Z(G8,this)[n.type].push(n):Z(G8,this)[n.type]=[n],n.install(),this.emit(`plugin-added`,n),this}getPlugin(e){for(let t of Object.values(Z(G8,this))){let n=t.find(t=>t.id===e);if(n!=null)return n}}[H8](e){return Z(G8,this)[e]}iteratePlugins(e){Object.values(Z(G8,this)).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit(`plugin-remove`,e),e.uninstall&&e.uninstall();let t=Z(G8,this)[e.type],n=t.findIndex(t=>t.id===e.id);n!==-1&&t.splice(n,1);let r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),Z(q8,this).call(this),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<`u`&&window.removeEventListener&&(window.removeEventListener(`online`,Z(t5,this)),window.removeEventListener(`offline`,Z(t5,this)))}hideInfo(){let{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit(`info-hidden`)}info(e,t=`info`,n=3e3){let r=typeof e==`object`;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit(`info-visible`)}log(e,t){let{logger:n}=this.opts;switch(t){case`error`:n.error(e);break;case`warning`:n.warn(e);break;default:n.debug(e);break}}registerRequestClient(e,t){Z(n5,this).set(e,t)}getRequestClientForFile(e){if(!(`remote`in e&&e.remote))throw Error(`Tried to get RequestClient for a non-remote file ${e.id}`);let t=Z(n5,this).get(e.remote.requestClientId);if(t==null)throw Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}async restore(e){this.log(`Core: Running restored upload "${e}"`);let t=await RC(Q8,this,p5).call(this,e);return this.emit(`complete`,t),t}[U8](...e){return RC(Q8,this,d5).call(this,...e)}addResultData(e,t){if(!RC(Q8,this,eSe).call(this,e)){this.log(`Not setting result for an upload that has been removed: ${e}`);return}let{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}async upload(){Z(G8,this).uploader?.length||this.log(`No uploader type plugins are used`,`warning`);let{files:e}=this.getState();if(RC(Q8,this,c5).call(this).length>0){let t=await RC(Q8,this,l5).call(this);if(!(this.getFiles().filter(e=>e.progress.uploadStarted==null).length>0))return this.emit(`complete`,t),t;({files:e}=this.getState())}let t=this.opts.onBeforeUpload(e);if(t===!1)throw Error(`Not starting the upload because onBeforeUpload returned false`);t&&typeof t==`object`&&(e=t,this.setState({files:e}));try{if(Z(K8,this).validateMinNumberOfFiles(e),!RC(Q8,this,Yxe).call(this,e))throw new L8(this.i18n(`missingRequiredMetaField`));let{currentUploads:t}=this.getState(),n=Object.values(t).flatMap(e=>e.fileIDs),r=Object.keys(e).filter(e=>{let t=this.getFile(e);return t&&!t.progress.uploadStarted&&!n.includes(e)}),i=RC(Q8,this,d5).call(this,r),a=await RC(Q8,this,p5).call(this,i);return this.emit(`complete`,a),a}catch(e){throw RC(Q8,this,i5).call(this,[e]),e}}};function i5(e){for(let t of e)t.isRestriction?this.emit(`restriction-failed`,t.file,t):this.emit(`error`,t,t.file),this.log(t,`warning`);let t=e.filter(e=>e.isUserFacing),n=t.slice(0,4),r=t.slice(4);n.forEach(({message:e,details:t=``})=>{this.info({message:e,details:t},`error`,this.opts.infoTimeout)}),r.length>0&&this.info({message:this.i18n(`additionalRestrictionsFailed`,{count:r.length})})}function a5(e){let{missingFields:t,error:n}=Z(K8,this).getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t,error:n.message}),this.log(n.message),this.emit(`restriction-failed`,e,n),!1):(t.length===0&&e.missingRequiredMetaFields&&this.setFileState(e.id,{missingRequiredMetaFields:[]}),!0)}function Yxe(e){let t=!0;for(let n of Object.values(e))RC(Q8,this,a5).call(this,n)||(t=!1);return t}function Xxe(e){let{allowNewUpload:t}=this.getState();if(t===!1){let t=new L8(this.i18n(`noMoreFilesAllowed`),{file:e});throw RC(Q8,this,i5).call(this,[t]),t}}function Zxe(e){let t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e,meta:{},isRemote:!1,source:void 0,preview:void 0}:e,n=d8(t),r=Wxe(n,t),i=l8(r).extension,a=bxe(t,this.getID()),o={...t.meta,name:r,type:n},s=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||``,id:a,name:r,extension:i||``,meta:{...this.getState().meta,...o},type:n,progress:{percentage:0,bytesUploaded:!1,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isGhost:!1,...t.isRemote?{isRemote:!0,remote:t.remote,data:t.data}:{isRemote:!1,data:t.data},preview:t.preview}}function o5(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function s5(e){let{files:t}=this.getState(),n={...t},r=[],i=[];for(let a of e)try{let e=RC(Q8,this,Zxe).call(this,a);RC(Q8,this,Xxe).call(this,e);let i=t[e.id],o=i?.isGhost;if(o&&!e.isRemote){if(e.data==null)throw Error(`File data is missing`);e={...i,isGhost:!1,data:e.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}let s=this.opts.onBeforeFileAdded(e,n);if(t=this.getState().files,n={...t,...n},!s&&this.checkIfFileAlreadyExists(e.id))throw new L8(this.i18n(`noDuplicates`,{fileName:e.name??this.i18n(`unnamed`)}),{file:e});if(s===!1&&!o)throw new L8(`Cannot add the file because onBeforeFileAdded returned false.`,{isUserFacing:!1,file:e});typeof s==`object`&&s&&(e=s),Z(K8,this).validateSingleFile(e),n[e.id]=e,r.push(e)}catch(e){i.push(e)}try{Z(K8,this).validateAggregateRestrictions(Object.values(t),r)}catch(e){return i.push(e),{nextFilesState:t,validFilesToAdd:[],errors:i}}return{nextFilesState:n,validFilesToAdd:r,errors:i}}function c5(){let{files:e}=this.getState();return Object.keys(e).filter(t=>{let n=e[t];return n.error&&(!n.missingRequiredMetaFields||n.missingRequiredMetaFields.length===0)})}async function l5(){let e=RC(Q8,this,c5).call(this),t={...this.getState().files};if(e.forEach(e=>{t[e]={...t[e],isPaused:!1,error:null}}),this.setState({files:t,error:null}),this.emit(`retry-all`,this.getFilesByIds(e)),e.length===0)return{successful:[],failed:[]};let n=RC(Q8,this,d5).call(this,e,{forceAllowNewUpload:!0});return RC(Q8,this,p5).call(this,n)}function u5(){let e=RC(Q8,this,Qxe).call(this),t=null;e!=null&&(t=Math.round(e*100),t>100?t=100:t<0&&(t=0)),this.emit(`progress`,t??0),this.setState({totalProgress:t??0})}function Qxe(){let e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(e.length===0)return 0;if(e.every(e=>e.progress.uploadComplete))return 1;let t=e=>e.progress.bytesTotal!=null&&e.progress.bytesTotal!==0,n=e.filter(t),r=e.filter(e=>!t(e));if(n.every(e=>e.progress.uploadComplete)&&r.length>0&&!r.every(e=>e.progress.uploadComplete))return null;let i=n.reduce((e,t)=>e+(t.progress.bytesTotal??0),0),a=n.reduce((e,t)=>e+(t.progress.bytesUploaded||0),0);return i===0?0:a/i}function $xe(){let e=(e,t,n)=>{let r=e.message||`Unknown error`;e.details&&(r+=` ${e.details}`),this.setState({error:r}),t!=null&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on(`error`,e),this.on(`upload-error`,(t,n,r)=>{if(e(n,t,r),typeof n==`object`&&n.message){this.log(n.message,`error`);let e=Error(this.i18n(`failedToUpload`,{file:t?.name??``}));e.isUserFacing=!0,e.details=n.message,n.details&&(e.details+=` ${n.details}`),RC(Q8,this,i5).call(this,[e])}else RC(Q8,this,i5).call(this,[n])});let t=null;this.on(`upload-stalled`,(e,n)=>{let{message:r}=e,i=n.map(e=>e.meta.name).join(`, `);t||(this.info({message:r,details:i},`warning`,this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${r} ${i}`.trim(),`warning`)}),this.on(`upload`,()=>{this.setState({error:null})}),this.on(`upload-start`,e=>{let t=e.filter(e=>{let t=e!=null&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${e?.id}`),t}),n=Object.fromEntries(t.map(e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:e.size}}]));this.patchFilesState(n)}),this.on(`upload-progress`,Z($8,this)),this.on(`upload-success`,(e,t)=>{if(e==null||!this.getFile(e.id)){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}let n=this.getFile(e.id).progress,r=Z(Z8,this).size>0;this.setFileState(e.id,{progress:{...n,postprocess:r?{mode:`indeterminate`}:void 0,uploadComplete:!0,...!r&&{complete:!0},percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),e.size??this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),Z(e5,this).call(this)}),this.on(`preprocess-progress`,(e,t)=>{if(e==null||!this.getFile(e.id)){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}})}),this.on(`preprocess-complete`,e=>{if(e==null||!this.getFile(e.id)){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}let t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on(`postprocess-progress`,(e,t)=>{if(e==null||!this.getFile(e.id)){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}})}),this.on(`postprocess-complete`,e=>{let t=e&&this.getFile(e.id);if(t==null){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}let{postprocess:n,...r}=t.progress;this.patchFilesState({[t.id]:{progress:{...r,complete:!0}}})}),this.on(`restored`,()=>{Z(e5,this).call(this)}),this.on(`dashboard:file-edit-complete`,e=>{e&&RC(Q8,this,a5).call(this,e)}),typeof window<`u`&&window.addEventListener&&(window.addEventListener(`online`,Z(t5,this)),window.addEventListener(`offline`,Z(t5,this)),setTimeout(Z(t5,this),3e3))}function d5(e,t={}){let{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw Error(`Cannot create a new upload: already uploading.`);let a=Hxe();return this.emit(`upload`,a,this.getFilesByIds(e)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...i,[a]:{fileIDs:e,step:0,result:{}}}}),a}function eSe(e){let{currentUploads:t}=this.getState();return t[e]}function f5(e){let{[e]:t,...n}=this.getState().currentUploads;this.setState({currentUploads:n})}async function p5(e){let t=()=>{let{currentUploads:t}=this.getState();return t[e]},n=t();if(!n)throw Error(`Nonexistent upload`);let r=[...Z(Y8,this),...Z(X8,this),...Z(Z8,this)];try{for(let i=n.step||0;i{let t=this.getFile(e);t?.progress.postprocess&&this.emit(`postprocess-complete`,t)});let r=n.fileIDs.map(e=>this.getFile(e)),i=r.filter(e=>!e.error),a=r.filter(e=>e.error);this.addResultData(e,{successful:i,failed:a,uploadID:e}),n=t()}let i;return n&&(i=n.result,RC(Q8,this,f5).call(this,e)),i??(this.log(`Not setting result for an upload that has been removed: ${e}`),i={successful:[],failed:[],uploadID:e}),i}HC(r5,`VERSION`,Uxe.version);var tSe={name:`@uppy/xhr-upload`,description:`Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.`,version:`5.2.0`,license:`MIT`,type:`module`,sideEffects:!1,scripts:{build:`tsc --build tsconfig.build.json`,typecheck:`tsc --build`,test:`vitest run --silent='passed-only'`,"test:e2e":`vitest run --project browser`},keywords:[`file uploader`,`xhr`,`xhr upload`,`XMLHttpRequest`,`ajax`,`fetch`,`uppy`,`uppy-plugin`],homepage:`https://uppy.io`,bugs:{url:`https://github.com/transloadit/uppy/issues`},repository:{type:`git`,url:`git+https://github.com/transloadit/uppy.git`},files:[`src`,`lib`,`dist`,`CHANGELOG.md`],exports:{".":`./lib/index.js`,"./package.json":`./package.json`},dependencies:{"@uppy/companion-client":`^5.1.1`,"@uppy/utils":`^7.2.0`},devDependencies:{"@uppy/core":`^5.2.0`,"@uppy/dashboard":`^5.1.1`,"@vitest/browser":`^3.2.4`,jsdom:`^26.1.0`,msw:`^2.10.4`,nock:`^13.1.0`,playwright:`1.57.0`,typescript:`^5.8.3`,vitest:`^3.2.4`},peerDependencies:{"@uppy/core":`^5.2.0`}},nSe={strings:{uploadStalled:`Upload has not made any progress for %{seconds} seconds. You may want to retry it.`}};function rSe(e,t){let n=t;return n||(n=Error(`Upload error`)),typeof n==`string`&&(n=Error(n)),n instanceof Error||(n=Object.assign(Error(`Upload error`),{data:n})),wxe(e)?(n=new n8(n,e),n):(n.request=e,n)}function m5(e){return e.data.slice(0,e.data.size,e.meta.type)}var iSe={formData:!0,fieldName:`file`,method:`post`,allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:``},h5=new WeakMap,g5=new WeakMap,_5=new WeakSet,v5=new WeakMap,y5=class extends N8{constructor(e,t){if(super(e,{...iSe,fieldName:t.bundle?`files[]`:`file`,...t}),b8(this,_5),LC(this,h5,void 0),LC(this,g5,void 0),HC(this,`uploaderEvents`,void 0),LC(this,v5,async e=>{if(e.length===0){this.uppy.log(`[XHRUpload] No files to upload!`);return}this.opts.limit===0&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0",`warning`),this.uppy.log(`[XHRUpload] Uploading...`);let t=hxe(this.uppy.getFilesByIds(e)),n=gxe(t);if(this.uppy.emit(`upload-start`,n),this.opts.bundle){if(t.some(e=>e.isRemote))throw Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers==`function`)throw TypeError("`headers` may not be a function when the `bundle: true` option is set");await RC(_5,this,oSe).call(this,t)}else await RC(_5,this,cSe).call(this,t)}),this.type=`uploader`,this.id=this.opts.id||`XHRUpload`,this.defaultLocale=nSe,this.i18nInit(),r8(g5,this,new Txe({concurrency:this.opts.limit})),this.opts.bundle&&!this.opts.formData)throw Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&typeof this.opts.headers==`function`)throw Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(t?.allowedMetaFields===void 0&&`metaFields`in this.opts)throw Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),r8(h5,this,e=>async(t,n)=>{try{let r=await fxe(t,{...n,onBeforeRequest:(t,n)=>this.opts.onBeforeRequest?.(t,n,e),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:t=>{let n=Math.ceil(t/1e3),r=Error(this.i18n(`uploadStalled`,{seconds:n}));this.uppy.emit(`upload-stalled`,r,e)},onUploadProgress:t=>{if(t.lengthComputable)for(let{id:n}of e){let e=this.uppy.getFile(n);e!=null&&this.uppy.emit(`upload-progress`,e,{uploadStarted:e.progress.uploadStarted??0,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}}}),i=await this.opts.getResponseData?.(r);if(r.responseType===`json`)i??(i=r.response);else try{i??(i=JSON.parse(r.responseText))}catch(e){throw Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:e})}let a=typeof i?.url==`string`?i.url:void 0;for(let{id:t}of e)this.uppy.emit(`upload-success`,this.uppy.getFile(t),{status:r.status,body:i,uploadURL:a});return r}catch(t){if(t.name===`AbortError`)return;let n=t.request;for(let r of e)this.uppy.emit(`upload-error`,this.uppy.getFile(r.id),rSe(n,t),n);throw t}})}getOptions(e){let t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return typeof n==`function`?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){p8(n.allowedMetaFields,t).forEach(n=>{let r=t[n];Array.isArray(r)?r.forEach(t=>e.append(n,t)):e.append(n,r)})}createFormDataUpload(e,t){let n=new FormData;this.addMetadata(n,e.meta,t);let r=m5(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){let n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(e=>{let t=this.getOptions(e),r=m5(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)}),n}install(){if(this.opts.bundle){let{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(Z(v5,this))}uninstall(){if(this.opts.bundle){let{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(Z(v5,this))}};async function aSe(e){let t=new Oxe(this.uppy),n=new AbortController;t.onFileRemove(e.id,()=>n.abort()),t.onCancelAll(e.id,()=>n.abort());try{await Z(g5,this).add(async t=>{let r=this.getOptions(e),i=Z(h5,this).call(this,[e]),a=r.formData?this.createFormDataUpload(e,r):e.data;return i(typeof r.endpoint==`string`?r.endpoint:await r.endpoint(e),{...r,body:a,signal:AbortSignal.any([t,n.signal])})})}catch(e){if(e.name===`AbortError`)return;throw e}finally{t.remove()}}async function oSe(e){let t=new AbortController;function n(){t.abort()}this.uppy.once(`cancel-all`,n);try{await Z(g5,this).add(async n=>{let r=this.uppy.getState().xhrUpload??{},i=Z(h5,this).call(this,e),a=this.createBundledUpload(e,{...this.opts,...r});return i(typeof this.opts.endpoint==`string`?this.opts.endpoint:await this.opts.endpoint(e),{...this.opts,body:a,signal:AbortSignal.any([n,t.signal])})})}catch(e){if(e.name===`AbortError`)return;throw e}finally{this.uppy.off(`cancel-all`,n)}}function sSe(e){let t=this.getOptions(e),n=p8(t.allowedMetaFields,e.meta);return{...e.remote?.body,protocol:`multipart`,endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:Object.fromEntries(n.map(t=>[t,e.meta[t]])),httpMethod:t.method,useFormData:t.formData,headers:t.headers}}async function cSe(e){await Promise.allSettled(e.map(e=>{if(e.isRemote){let t=()=>Z(g5,this),n=new AbortController,r=t=>{t.id===e.id&&n.abort()};return this.uppy.on(`file-removed`,r),this.uppy.getRequestClientForFile(e).uploadRemoteFile(e,RC(_5,this,sSe).call(this,e),{signal:n.signal,getQueue:t}).finally(()=>{this.uppy.off(`file-removed`,r)})}return RC(_5,this,aSe).call(this,e)}))}HC(y5,`VERSION`,tSe.version);var lSe={name:`@uppy/drop-target`,description:`Lets your users drag and drop files on a DOM element`,version:`4.1.0`,license:`MIT`,type:`module`,sideEffects:[`*.css`],scripts:{build:`tsc --build tsconfig.build.json`,"build:css":`sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css`,typecheck:`tsc --build`},keywords:[`file uploader`,`uppy`,`uppy-plugin`,`drag-drop`,`drag`,`drop`,`dropzone`,`upload`],homepage:`https://uppy.io`,bugs:{url:`https://github.com/transloadit/uppy/issues`},repository:{type:`git`,url:`git+https://github.com/transloadit/uppy.git`},files:[`src`,`lib`,`dist`,`CHANGELOG.md`],exports:{".":`./lib/index.js`,"./css/style.css":`./dist/style.css`,"./css/style.min.css":`./dist/style.min.css`,"./css/style.scss":`./src/style.scss`,"./package.json":`./package.json`},dependencies:{"@uppy/utils":`^7.1.4`},peerDependencies:{"@uppy/core":`^5.2.0`},publishConfig:{access:`public`},devDependencies:{cssnano:`^7.0.7`,postcss:`^8.5.6`,"postcss-cli":`^11.0.1`,sass:`^1.89.2`,typescript:`^5.8.3`}},uSe={target:null};function b5(e){return e.dataTransfer?.types?.some(e=>e===`Files`)??!1}var x5=class extends N8{constructor(e,t){super(e,{...uSe,...t}),HC(this,`nodes`,void 0),HC(this,`addFiles`,e=>{let t=e.map(e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}}));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}}),HC(this,`handleDrop`,async e=>{if(!b5(e))return;e.preventDefault(),e.stopPropagation(),e.currentTarget?.classList.remove(`uppy-is-drag-over`),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(t=>{t.type===`acquirer`&&t.handleRootDrop?.(e)});let t=!1,n=await Cxe(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,`error`),t||(this.uppy.info(e.message,`error`),t=!0)}});n.length>0&&(this.uppy.log(`[DropTarget] Files were dropped`),this.addFiles(n)),this.opts.onDrop?.(e)}),HC(this,`handleDragOver`,e=>{b5(e)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,e.currentTarget.classList.add(`uppy-is-drag-over`),this.setPluginState({isDraggingOver:!0}),this.opts.onDragOver?.(e))}),HC(this,`handleDragLeave`,e=>{b5(e)&&(e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),e.currentTarget?.classList.remove(`uppy-is-drag-over`),this.opts.onDragLeave?.(e))}),HC(this,`addListeners`,()=>{let{target:e}=this.opts;if(e instanceof Element?this.nodes=[e]:typeof e==`string`&&(this.nodes=m8(document.querySelectorAll(e))),!this.nodes||this.nodes.length===0)throw Error(`"${e}" does not match any HTML elements`);this.nodes.forEach(e=>{e.addEventListener(`dragover`,this.handleDragOver,!1),e.addEventListener(`dragleave`,this.handleDragLeave,!1),e.addEventListener(`drop`,this.handleDrop,!1)})}),HC(this,`removeListeners`,()=>{this.nodes&&this.nodes.forEach(e=>{e.removeEventListener(`dragover`,this.handleDragOver,!1),e.removeEventListener(`dragleave`,this.handleDragLeave,!1),e.removeEventListener(`drop`,this.handleDrop,!1)})}),this.type=`acquirer`,this.id=this.opts.id||`DropTarget`}install(){this.setPluginState({isDraggingOver:!1}),this.addListeners()}uninstall(){this.removeListeners()}};HC(x5,`VERSION`,lSe.version);var S5=t(n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.Cropper=r())})(e,(function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n
`,Ne=Number.isNaN||m.isNaN;function Pe(e){return typeof e==`number`&&!Ne(e)}var Fe=function(e){return e>0&&e<1/0};function Ie(e){return e===void 0}function Le(e){return n(e)===`object`&&e!==null}var Re=Object.prototype.hasOwnProperty;function ze(e){if(!Le(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Re.call(n,`isPrototypeOf`)}catch{return!1}}function N(e){return typeof e==`function`}var Be=Array.prototype.slice;function Ve(e){return Array.from?Array.from(e):Be.call(e)}function He(e,t){return e&&N(t)&&(Array.isArray(e)||Pe(e.length)?Ve(e).forEach(function(n,r){t.call(e,n,r,e)}):Le(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)})),e}var Ue=Object.assign||function(e){var t=[...arguments].slice(1);return Le(e)&&t.length>0&&t.forEach(function(t){Le(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},We=/\.\d*(?:0|9){12}\d*$/;function Ge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return We.test(e)?Math.round(e*t)/t:e}var Ke=/^width|height|left|top|marginLeft|marginTop$/;function qe(e,t){var n=e.style;He(t,function(e,t){Ke.test(t)&&Pe(e)&&(e=`${e}px`),n[t]=e})}function Je(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Ye(e,t){if(t){if(Pe(e.length)){He(e,function(e){Ye(e,t)});return}if(e.classList){e.classList.add(t);return}var n=e.className.trim();n?n.indexOf(t)<0&&(e.className=`${n} ${t}`):e.className=t}}function Xe(e,t){if(t){if(Pe(e.length)){He(e,function(e){Xe(e,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,``))}}function Ze(e,t,n){if(t){if(Pe(e.length)){He(e,function(e){Ze(e,t,n)});return}n?Ye(e,t):Xe(e,t)}}var Qe=/([a-z\d])([A-Z])/g;function $e(e){return e.replace(Qe,`$1-$2`).toLowerCase()}function et(e,t){return Le(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute(`data-${$e(t)}`)}function tt(e,t,n){Le(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute(`data-${$e(t)}`,n)}function nt(e,t){if(Le(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute(`data-${$e(t)}`)}var rt=/\s\s*/,it=function(){var e=!1;if(p){var t=!1,n=function(){},r=Object.defineProperty({},`once`,{get:function(){return e=!0,t},set:function(e){t=e}});m.addEventListener(`test`,n,r),m.removeEventListener(`test`,n,r)}return e}();function at(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(rt).forEach(function(t){if(!it){var a=e.listeners;a&&a[t]&&a[t][n]&&(i=a[t][n],delete a[t][n],Object.keys(a[t]).length===0&&delete a[t],Object.keys(a).length===0&&delete e.listeners)}e.removeEventListener(t,i,r)})}function ot(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(rt).forEach(function(t){if(r.once&&!it){var a=e.listeners,o=a===void 0?{}:a;i=function(){delete o[t][n],e.removeEventListener(t,i,r);var a=[...arguments];n.apply(e,a)},o[t]||(o[t]={}),o[t][n]&&e.removeEventListener(t,o[t][n],r),o[t][n]=i,e.listeners=o}e.addEventListener(t,i,r)})}function st(e,t,n){var r;return N(Event)&&N(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent(`CustomEvent`),r.initCustomEvent(t,!0,!0,n)),e.dispatchEvent(r)}function ct(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var lt=m.location,ut=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function dt(e){var t=e.match(ut);return t!==null&&(t[1]!==lt.protocol||t[2]!==lt.hostname||t[3]!==lt.port)}function ft(e){var t=`timestamp=${new Date().getTime()}`;return e+(e.indexOf(`?`)===-1?`?`:`&`)+t}function pt(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,a=e.translateY,o=[];Pe(i)&&i!==0&&o.push(`translateX(${i}px)`),Pe(a)&&a!==0&&o.push(`translateY(${a}px)`),Pe(t)&&t!==0&&o.push(`rotate(${t}deg)`),Pe(n)&&n!==1&&o.push(`scaleX(${n})`),Pe(r)&&r!==1&&o.push(`scaleY(${r})`);var s=o.length?o.join(` `):`none`;return{WebkitTransform:s,msTransform:s,transform:s}}function mt(e){var n=t({},e),r=0;return He(e,function(e,t){delete n[t],He(n,function(t){var n=Math.abs(e.startX-t.startX),i=Math.abs(e.startY-t.startY),a=Math.abs(e.endX-t.endX),o=Math.abs(e.endY-t.endY),s=Math.sqrt(n*n+i*i),c=(Math.sqrt(a*a+o*o)-s)/s;Math.abs(c)>Math.abs(r)&&(r=c)})}),r}function ht(e,n){var r=e.pageX,i=e.pageY,a={endX:r,endY:i};return n?a:t({startX:r,startY:i},a)}function gt(e){var t=0,n=0,r=0;return He(e,function(e){var i=e.startX,a=e.startY;t+=i,n+=a,r+=1}),t/=r,n/=r,{pageX:t,pageY:n}}function _t(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`contain`,a=Fe(r),o=Fe(n);if(a&&o){var s=n*t;i===`contain`&&s>r||i===`cover`&&s90?{width:c,height:s}:{width:s,height:c}}function yt(e,t,n,r){var i=t.aspectRatio,a=t.naturalWidth,o=t.naturalHeight,c=t.rotate,l=c===void 0?0:c,u=t.scaleX,d=u===void 0?1:u,f=t.scaleY,p=f===void 0?1:f,m=n.aspectRatio,h=n.naturalWidth,g=n.naturalHeight,_=r.fillColor,v=_===void 0?`transparent`:_,y=r.imageSmoothingEnabled,b=y===void 0?!0:y,x=r.imageSmoothingQuality,S=x===void 0?`low`:x,C=r.maxWidth,w=C===void 0?1/0:C,T=r.maxHeight,E=T===void 0?1/0:T,D=r.minWidth,O=D===void 0?0:D,k=r.minHeight,A=k===void 0?0:k,ee=document.createElement(`canvas`),te=ee.getContext(`2d`),ne=_t({aspectRatio:m,width:w,height:E}),j=_t({aspectRatio:m,width:O,height:A},`cover`),re=Math.min(ne.width,Math.max(j.width,h)),ie=Math.min(ne.height,Math.max(j.height,g)),ae=_t({aspectRatio:i,width:w,height:E}),oe=_t({aspectRatio:i,width:O,height:A},`cover`),se=Math.min(ae.width,Math.max(oe.width,a)),ce=Math.min(ae.height,Math.max(oe.height,o)),le=[-se/2,-ce/2,se,ce];return ee.width=Ge(re),ee.height=Ge(ie),te.fillStyle=v,te.fillRect(0,0,re,ie),te.save(),te.translate(re/2,ie/2),te.rotate(l*Math.PI/180),te.scale(d,p),te.imageSmoothingEnabled=b,te.imageSmoothingQuality=S,te.drawImage.apply(te,[e].concat(s(le.map(function(e){return Math.floor(Ge(e))})))),te.restore(),ee}var bt=String.fromCharCode;function xt(e,t,n){var r=``;n+=t;for(var i=t;i0;)n.push(bt.apply(null,Ve(i.subarray(0,r)))),i=i.subarray(r);return`data:${t};base64,${btoa(n.join(``))}`}function Tt(e){var t=new DataView(e),n;try{var r,i,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(a=l+d)}}}if(a){var f=t.getUint16(a,r),p,m;for(m=0;m=0?i:ke),height:Math.max(n.offsetHeight,a>=0?a:Ae)};this.containerData=o,qe(r,{width:o.width,height:o.height}),Ye(e,te),Xe(r,te)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,a=r?t.naturalWidth:t.naturalHeight,o=i/a,s=e.width,c=e.height;e.height*o>e.width?n===3?s=e.height*o:c=e.width/o:n===3?c=e.width/o:s=e.height*o;var l={aspectRatio:o,naturalWidth:i,naturalHeight:a,width:s,height:c};this.canvasData=l,this.limited=n===1||n===2,this.limitCanvas(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.left=(e.width-l.width)/2,l.top=(e.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCanvasData=Ue({},l)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,a=this.cropBoxData,o=n.viewMode,s=i.aspectRatio,c=this.cropped&&a;if(e){var l=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;o>1?(l=Math.max(l,r.width),u=Math.max(u,r.height),o===3&&(u*s>l?l=u*s:u=l/s)):o>0&&(l?l=Math.max(l,c?a.width:0):u?u=Math.max(u,c?a.height:0):c&&(l=a.width,u=a.height,u*s>l?l=u*s:u=l/s));var d=_t({aspectRatio:s,width:l,height:u});l=d.width,u=d.height,i.minWidth=l,i.minHeight=u,i.maxWidth=1/0,i.maxHeight=1/0}if(t)if(o>+!c){var f=r.width-i.width,p=r.height-i.height;i.minLeft=Math.min(0,f),i.minTop=Math.min(0,p),i.maxLeft=Math.max(0,f),i.maxTop=Math.max(0,p),c&&this.limited&&(i.minLeft=Math.min(a.left,a.left+(a.width-i.width)),i.minTop=Math.min(a.top,a.top+(a.height-i.height)),i.maxLeft=a.left,i.maxTop=a.top,o===2&&(i.width>=r.width&&(i.minLeft=Math.min(0,f),i.maxLeft=Math.max(0,f)),i.height>=r.height&&(i.minTop=Math.min(0,p),i.maxTop=Math.max(0,p))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var i=vt({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),a=i.width,o=i.height,s=n.width*(a/n.naturalWidth),c=n.height*(o/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(c-n.height)/2,n.width=s,n.height=c,n.aspectRatio=a/o,n.naturalWidth=a,n.naturalHeight=o,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightt.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*r),i.height=Math.max(i.minHeight,i.height*r),i.left=t.left+(t.width-i.width)/2,i.top=t.top+(t.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=Ue({},i)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,a=this.cropBoxData,o=this.limited,s=n.aspectRatio;if(e){var c=Number(n.minCropBoxWidth)||0,l=Number(n.minCropBoxHeight)||0,u=o?Math.min(r.width,i.width,i.width+i.left,r.width-i.left):r.width,d=o?Math.min(r.height,i.height,i.height+i.top,r.height-i.top):r.height;c=Math.min(c,r.width),l=Math.min(l,r.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),d*s>u?d=u/s:u=d*s),a.minWidth=Math.min(c,u),a.minHeight=Math.min(l,d),a.maxWidth=u,a.maxHeight=d}t&&(o?(a.minLeft=Math.max(0,i.left),a.minTop=Math.max(0,i.top),a.maxLeft=Math.min(r.width,i.left+i.width)-a.width,a.maxTop=Math.min(r.height,i.top+i.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=r.width-a.width,a.maxTop=r.height-a.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=t.width&&n.height>=t.height?b:v),qe(this.cropBox,Ue({width:n.width,height:n.height},pt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),st(this.element,ue,this.getData())}},Ot={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,i=e.alt||`The image to preview`,a=document.createElement(`img`);if(t&&(a.crossOrigin=t),a.src=r,a.alt=i,this.viewBox.appendChild(a),this.viewBoxImage=a,n){var o=n;typeof n==`string`?o=e.ownerDocument.querySelectorAll(n):n.querySelector&&(o=[n]),this.previews=o,He(o,function(e){var n=document.createElement(`img`);tt(e,oe,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=i,n.style.cssText=`display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"`,e.innerHTML=``,e.appendChild(n)})}},resetPreview:function(){He(this.previews,function(e){var t=et(e,oe);qe(e,{width:t.width,height:t.height}),e.innerHTML=t.html,nt(e,oe)})},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,i=n.height,a=e.width,o=e.height,s=n.left-t.left-e.left,c=n.top-t.top-e.top;!this.cropped||this.disabled||(qe(this.viewBoxImage,Ue({width:a,height:o},pt(Ue({translateX:-s,translateY:-c},e)))),He(this.previews,function(t){var n=et(t,oe),l=n.width,u=n.height,d=l,f=u,p=1;r&&(p=l/r,f=i*p),i&&f>u&&(p=u/i,d=r*p,f=u),qe(t,{width:d,height:f}),qe(t.getElementsByTagName(`img`)[0],Ue({width:a*p,height:o*p},pt(Ue({translateX:-s*p,translateY:-c*p},e))))}))}},kt={bind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&ot(e,pe,t.cropstart),N(t.cropmove)&&ot(e,fe,t.cropmove),N(t.cropend)&&ot(e,de,t.cropend),N(t.crop)&&ot(e,ue,t.crop),N(t.zoom)&&ot(e,M,t.zoom),ot(n,ve,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&ot(n,Ce,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&ot(n,me,this.onDblclick=this.dblclick.bind(this)),ot(e.ownerDocument,ye,this.onCropMove=this.cropMove.bind(this)),ot(e.ownerDocument,be,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&ot(window,Se,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&at(e,pe,t.cropstart),N(t.cropmove)&&at(e,fe,t.cropmove),N(t.cropend)&&at(e,de,t.cropend),N(t.crop)&&at(e,ue,t.crop),N(t.zoom)&&at(e,M,t.zoom),at(n,ve,this.onCropStart),t.zoomable&&t.zoomOnWheel&&at(n,Ce,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&at(n,me,this.onDblclick),at(e.ownerDocument,ye,this.onCropMove),at(e.ownerDocument,be,this.onCropEnd),t.responsive&&at(window,Se,this.onResize)}},At={resize:function(){if(!this.disabled){var e=this.options,t=this.container,n=this.containerData,r=t.offsetWidth/n.width,i=t.offsetHeight/n.height,a=Math.abs(r-1)>Math.abs(i-1)?r:i;if(a!==1){var o,s;e.restore&&(o=this.getCanvasData(),s=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(He(o,function(e,t){o[t]=e*a})),this.setCropBoxData(He(s,function(e,t){s[t]=e*a})))}}},dblclick:function(){this.disabled||this.options.dragMode===le||this.setDragMode(Je(this.dragBox,A)?ce:se)},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||(e.type===`mousedown`||e.type===`pointerdown`&&e.pointerType===`mouse`)&&(Pe(t)&&t!==1||Pe(n)&&n!==0||e.ctrlKey))){var r=this.options,i=this.pointers,a;e.changedTouches?He(e.changedTouches,function(e){i[e.identifier]=ht(e)}):i[e.pointerId||0]=ht(e),a=Object.keys(i).length>1&&r.zoomable&&r.zoomOnTouch?x:et(e.target,ae),Te.test(a)&&st(this.element,pe,{originalEvent:e,action:a})!==!1&&(e.preventDefault(),this.action=a,this.cropping=!1,a===y&&(this.cropping=!0,Ye(this.dragBox,re)))}},cropMove:function(e){var t=this.action;if(!(this.disabled||!t)){var n=this.pointers;e.preventDefault(),st(this.element,fe,{originalEvent:e,action:t})!==!1&&(e.changedTouches?He(e.changedTouches,function(e){Ue(n[e.identifier]||{},ht(e,!0))}):Ue(n[e.pointerId||0]||{},ht(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?He(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=``),this.cropping&&(this.cropping=!1,Ze(this.dragBox,re,this.cropped&&this.options.modal)),st(this.element,de,{originalEvent:e,action:t}))}}},jt={change:function(e){var t=this.options,n=this.canvasData,r=this.containerData,i=this.cropBoxData,a=this.pointers,o=this.action,s=t.aspectRatio,c=i.left,l=i.top,u=i.width,d=i.height,f=c+u,p=l+d,m=0,h=0,g=r.width,_=r.height,A=!0,ee;!s&&e.shiftKey&&(s=u&&d?u/d:1),this.limited&&(m=i.minLeft,h=i.minTop,g=m+Math.min(r.width,n.width,n.left+n.width),_=h+Math.min(r.height,n.height,n.top+n.height));var ne=a[Object.keys(a)[0]],j={x:ne.endX-ne.startX,y:ne.endY-ne.startY},re=function(e){switch(e){case S:f+j.x>g&&(j.x=g-f);break;case C:c+j.x_&&(j.y=_-p);break}};switch(o){case v:c+=j.x,l+=j.y;break;case S:if(j.x>=0&&(f>=g||s&&(l<=h||p>=_))){A=!1;break}re(S),u+=j.x,u<0&&(o=C,u=-u,c-=u),s&&(d=u/s,l+=(i.height-d)/2);break;case T:if(j.y<=0&&(l<=h||s&&(c<=m||f>=g))){A=!1;break}re(T),d-=j.y,l+=j.y,d<0&&(o=w,d=-d,l-=d),s&&(u=d*s,c+=(i.width-u)/2);break;case C:if(j.x<=0&&(c<=m||s&&(l<=h||p>=_))){A=!1;break}re(C),u-=j.x,c+=j.x,u<0&&(o=S,u=-u,c-=u),s&&(d=u/s,l+=(i.height-d)/2);break;case w:if(j.y>=0&&(p>=_||s&&(c<=m||f>=g))){A=!1;break}re(w),d+=j.y,d<0&&(o=T,d=-d,l-=d),s&&(u=d*s,c+=(i.width-u)/2);break;case E:if(s){if(j.y<=0&&(l<=h||f>=g)){A=!1;break}re(T),d-=j.y,l+=j.y,u=d*s}else re(T),re(S),j.x>=0?fh&&(d-=j.y,l+=j.y):(d-=j.y,l+=j.y);u<0&&d<0?(o=k,d=-d,u=-u,l-=d,c-=u):u<0?(o=D,u=-u,c-=u):d<0&&(o=O,d=-d,l-=d);break;case D:if(s){if(j.y<=0&&(l<=h||c<=m)){A=!1;break}re(T),d-=j.y,l+=j.y,u=d*s,c+=i.width-u}else re(T),re(C),j.x<=0?c>m?(u-=j.x,c+=j.x):j.y<=0&&l<=h&&(A=!1):(u-=j.x,c+=j.x),j.y<=0?l>h&&(d-=j.y,l+=j.y):(d-=j.y,l+=j.y);u<0&&d<0?(o=O,d=-d,u=-u,l-=d,c-=u):u<0?(o=E,u=-u,c-=u):d<0&&(o=k,d=-d,l-=d);break;case k:if(s){if(j.x<=0&&(c<=m||p>=_)){A=!1;break}re(C),u-=j.x,c+=j.x,d=u/s}else re(w),re(C),j.x<=0?c>m?(u-=j.x,c+=j.x):j.y>=0&&p>=_&&(A=!1):(u-=j.x,c+=j.x),j.y>=0?p<_&&(d+=j.y):d+=j.y;u<0&&d<0?(o=E,d=-d,u=-u,l-=d,c-=u):u<0?(o=O,u=-u,c-=u):d<0&&(o=D,d=-d,l-=d);break;case O:if(s){if(j.x>=0&&(f>=g||p>=_)){A=!1;break}re(S),u+=j.x,d=u/s}else re(w),re(S),j.x>=0?f=0&&p>=_&&(A=!1):u+=j.x,j.y>=0?p<_&&(d+=j.y):d+=j.y;u<0&&d<0?(o=D,d=-d,u=-u,l-=d,c-=u):u<0?(o=k,u=-u,c-=u):d<0&&(o=E,d=-d,l-=d);break;case b:this.move(j.x,j.y),A=!1;break;case x:this.zoom(mt(a),e),A=!1;break;case y:if(!j.x||!j.y){A=!1;break}ee=ct(this.cropper),c=ne.startX-ee.left,l=ne.startY-ee.top,u=i.minWidth,d=i.minHeight,j.x>0?o=j.y>0?O:E:j.x<0&&(c-=u,o=j.y>0?k:D),j.y<0&&(l-=d),this.cropped||(Xe(this.cropBox,te),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}A&&(i.width=u,i.height=d,i.left=c,i.top=l,this.action=o,this.renderCropBox()),He(a,function(e){e.startX=e.endX,e.startY=e.endY})}},Mt={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Ye(this.dragBox,re),Xe(this.cropBox,te),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ue({},this.initialImageData),this.canvasData=Ue({},this.initialCanvasData),this.cropBoxData=Ue({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ue(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Xe(this.dragBox,re),Ye(this.cropBox,te)),this},replace:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,He(this.previews,function(t){t.getElementsByTagName(`img`)[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Xe(this.cropper,ee)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Ye(this.cropper,ee)),this},destroy:function(){var e=this.element;return e[_]?(e[_]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.canvasData,r=n.left,i=n.top;return this.moveTo(Ie(e)?e:r+Number(e),Ie(t)?t:i+Number(t))},moveTo:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(Pe(e)&&(n.left=e,r=!0),Pe(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),e=e<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,i=this.canvasData,a=i.width,o=i.height,s=i.naturalWidth,c=i.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&r.zoomable){var l=s*e,u=c*e;if(st(this.element,M,{ratio:e,oldRatio:a/s,originalEvent:n})===!1)return this;if(n){var d=this.pointers,f=ct(this.cropper),p=d&&Object.keys(d).length?gt(d):{pageX:n.pageX,pageY:n.pageY};i.left-=(l-a)*((p.pageX-f.left-i.left)/a),i.top-=(u-o)*((p.pageY-f.top-i.top)/o)}else ze(t)&&Pe(t.x)&&Pe(t.y)?(i.left-=(l-a)*((t.x-i.left)/a),i.top-=(u-o)*((t.y-i.top)/o)):(i.left-=(l-a)/2,i.top-=(u-o)/2);i.width=l,i.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),Pe(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,Pe(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(Pe(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(Pe(e)&&(n.scaleX=e,r=!0),Pe(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.options,n=this.imageData,r=this.canvasData,i=this.cropBoxData,a;if(this.ready&&this.cropped){a={x:i.left-r.left,y:i.top-r.top,width:i.width,height:i.height};var o=n.width/n.naturalWidth;if(He(a,function(e,t){a[t]=e/o}),e){var s=Math.round(a.y+a.height),c=Math.round(a.x+a.width);a.x=Math.round(a.x),a.y=Math.round(a.y),a.width=c-a.x,a.height=s-a.y}}else a={x:0,y:0,width:0,height:0};return t.rotatable&&(a.rotate=n.rotate||0),t.scalable&&(a.scaleX=n.scaleX||1,a.scaleY=n.scaleY||1),a},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,i={};if(this.ready&&!this.disabled&&ze(e)){var a=!1;t.rotatable&&Pe(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,a=!0),t.scalable&&(Pe(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,a=!0),Pe(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var o=n.width/n.naturalWidth;Pe(e.x)&&(i.left=e.x*o+r.left),Pe(e.y)&&(i.top=e.y*o+r.top),Pe(e.width)&&(i.width=e.width*o),Pe(e.height)&&(i.height=e.height*o),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?Ue({},this.containerData):{}},getImageData:function(){return this.sized?Ue({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&He([`left`,`top`,`width`,`height`,`naturalWidth`,`naturalHeight`],function(n){t[n]=e[n]}),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&ze(e)&&(Pe(e.left)&&(t.left=e.left),Pe(e.top)&&(t.top=e.top),Pe(e.width)?(t.width=e.width,t.height=e.width/n):Pe(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,t;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(e){var t=this.cropBoxData,n=this.options.aspectRatio,r,i;return this.ready&&this.cropped&&!this.disabled&&ze(e)&&(Pe(e.left)&&(t.left=e.left),Pe(e.top)&&(t.top=e.top),Pe(e.width)&&e.width!==t.width&&(r=!0,t.width=e.width),Pe(e.height)&&e.height!==t.height&&(i=!0,t.height=e.height),n&&(r?t.height=t.width/n:i&&(t.width=t.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=yt(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(),i=r.x,a=r.y,o=r.width,c=r.height,l=n.width/Math.floor(t.naturalWidth);l!==1&&(i*=l,a*=l,o*=l,c*=l);var u=o/c,d=_t({aspectRatio:u,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),f=_t({aspectRatio:u,width:e.minWidth||0,height:e.minHeight||0},`cover`),p=_t({aspectRatio:u,width:e.width||(l===1?o:n.width),height:e.height||(l===1?c:n.height)}),m=p.width,h=p.height;m=Math.min(d.width,Math.max(f.width,m)),h=Math.min(d.height,Math.max(f.height,h));var g=document.createElement(`canvas`),_=g.getContext(`2d`);g.width=Ge(m),g.height=Ge(h),_.fillStyle=e.fillColor||`transparent`,_.fillRect(0,0,m,h);var v=e.imageSmoothingEnabled,y=v===void 0?!0:v,b=e.imageSmoothingQuality;_.imageSmoothingEnabled=y,b&&(_.imageSmoothingQuality=b);var x=n.width,S=n.height,C=i,w=a,T,E,D,O,k,A;C<=-o||C>x?(C=0,T=0,D=0,k=0):C<=0?(D=-C,C=0,T=Math.min(x,o+C),k=T):C<=x&&(D=0,T=Math.min(o,x-C),k=T),T<=0||w<=-c||w>S?(w=0,E=0,O=0,A=0):w<=0?(O=-w,w=0,E=Math.min(S,c+w),A=E):w<=S&&(O=0,E=Math.min(c,S-w),A=E);var ee=[C,w,T,E];if(k>0&&A>0){var te=m/o;ee.push(D*te,O*te,k*te,A*te)}return _.drawImage.apply(_,[n].concat(s(ee.map(function(e){return Math.floor(Ge(e))})))),g},setAspectRatio:function(e){var t=this.options;return!this.disabled&&!Ie(e)&&(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var i=e===se,a=t.movable&&e===ce;e=i||a?e:le,t.dragMode=e,tt(n,ae,e),Ze(n,A,i),Ze(n,ie,a),t.cropBoxMovable||(tt(r,ae,e),Ze(r,A,i),Ze(r,ie,a))}return this}},Nt=m.Cropper,Pt=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r(this,e),!t||!Oe.test(t.tagName))throw Error(`The first argument is required and must be an
or