PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.5.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.5.0
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / assets / admin_app.js

admin_app.js in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.5.0, at assets/admin_app.js

1,453 lines 2.7 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var xW=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var n9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Ht=(t,e,n)=>(n9(t,e,"read from private field"),n?n.call(t):e.get(t)),sa=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Zi=(t,e,n,s)=>(n9(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);var F3t=xW((To,Po)=>{const kW="modulepreload",CW=function(t){return"/"+t},s9={},ku=function(e,n,s){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=CW(o),o in s9)return;s9[o]=!0;const r=o.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(!!s)for(let u=i.length-1;u>=0;u--){const d=i[u];if(d.href===o&&(!r||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=r?"stylesheet":kW,r||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),r)return new Promise((u,d)=>{c.addEventListener("load",u),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o})};/**
2 * @vue/shared v3.5.27
3 * (c) 2018-present Yuxi (Evan) You and Vue contributors
4 * @license MIT
5 **/function Ro(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const un={},Wh=[],Lt=()=>{},zh=()=>!1,xd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),hC=t=>t.startsWith("onUpdate:"),on=Object.assign,fC=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},SW=Object.prototype.hasOwnProperty,Ft=(t,e)=>SW.call(t,e),Ae=Array.isArray,Yh=t=>tp(t)==="[object Map]",kd=t=>tp(t)==="[object Set]",By=t=>tp(t)==="[object Date]",$W=t=>tp(t)==="[object RegExp]",Je=t=>typeof t=="function",Ke=t=>typeof t=="string",fo=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",sd=t=>(yt(t)||Je(t))&&Je(t.then)&&Je(t.catch),bP=Object.prototype.toString,tp=t=>bP.call(t),AW=t=>tp(t).slice(8,-1),id=t=>tp(t)==="[object Object]",r_=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,al=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),EW=Ro("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),a_=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},MW=/-\w/g,Jn=a_(t=>t.replace(MW,e=>e.slice(1).toUpperCase())),TW=/\B([A-Z])/g,Vi=a_(t=>t.replace(TW,"-$1").toLowerCase()),Uc=a_(t=>t.charAt(0).toUpperCase()+t.slice(1)),Nu=a_(t=>t?`on${Uc(t)}`:""),Di=(t,e)=>!Object.is(t,e),qh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},_P=(t,e,n,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},l_=t=>{const e=parseFloat(t);return isNaN(e)?t:e},zy=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let i9;const c_=()=>i9||(i9=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function PW(t,e){return t+JSON.stringify(e,(n,s)=>typeof s=="function"?s.toString():s)}const IW="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",LW=Ro(IW);function qe(t){if(Ae(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],i=Ke(s)?wP(s):qe(s);if(i)for(const o in i)e[o]=i[o]}return e}else if(Ke(t)||yt(t))return t}const OW=/;(?![^(]*\))/g,DW=/:([^]+)/,RW=/\/\*[^]*?\*\//g;function wP(t){const e={};return t.replace(RW,"").split(OW).forEach(n=>{if(n){const s=n.split(DW);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function U(t){let e="";if(Ke(t))e=t;else if(Ae(t))for(let n=0;n<t.length;n++){const s=U(t[n]);s&&(e+=s+" ")}else if(yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Gh(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ke(e)&&(t.class=U(e)),n&&(t.style=qe(n)),t}const VW="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",FW="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",NW="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",BW="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",zW=Ro(VW),HW=Ro(FW),UW=Ro(NW),jW=Ro(BW),WW="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",YW=Ro(WW);function xP(t){return!!t||t===""}function qW(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=Tc(t[s],e[s]);return n}function Tc(t,e){if(t===e)return!0;let n=By(t),s=By(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=fo(t),s=fo(e),n||s)return t===e;if(n=Ae(t),s=Ae(e),n||s)return n&&s?qW(t,e):!1;if(n=yt(t),s=yt(e),n||s){if(!n||!s)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!Tc(t[r],e[r]))return!1}}return String(t)===String(e)}function u_(t,e){return t.findIndex(n=>Tc(n,e))}const kP=t=>!!(t&&t.__v_isRef===!0),$=t=>Ke(t)?t:t==null?"":Ae(t)||yt(t)&&(t.toString===bP||!Je(t.toString))?kP(t)?$(t.value):JSON.stringify(t,CP,2):String(t),CP=(t,e)=>kP(e)?CP(t,e.value):Yh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[ew(s,o)+" =>"]=i,n),{})}:kd(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>ew(n))}:fo(e)?ew(e):yt(e)&&!Ae(e)&&!id(e)?String(e):e,ew=(t,e="")=>{var n;return fo(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function GW(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/**
6 * @vue/reactivity v3.5.27
7 * (c) 2018-present Yuxi (Evan) You and Vue contributors
8 * @license MIT
9 **/let bi;class pC{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=bi,!e&&bi&&(this.index=(bi.scopes||(bi.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=bi;try{return bi=this,e()}finally{bi=n}}}on(){++this._on===1&&(this.prevScope=bi,bi=this)}off(){this._on>0&&--this._on===0&&(bi=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function d_(t){return new pC(t)}function h_(){return bi}function f_(t,e=!1){bi&&bi.cleanups.push(t)}let Wn;const tw=new WeakSet;class _g{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,bi&&bi.active&&bi.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,tw.has(this)&&(tw.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||$P(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,o9(this),AP(this);const e=Wn,n=Pr;Wn=this,Pr=!0;try{return this.fn()}finally{EP(this),Wn=e,Pr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)vC(e);this.deps=this.depsTail=void 0,o9(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?tw.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ox(this)&&this.run()}get dirty(){return ox(this)}}let SP=0,Fm,Nm;function $P(t,e=!1){if(t.flags|=8,e){t.next=Nm,Nm=t;return}t.next=Fm,Fm=t}function mC(){SP++}function gC(){if(--SP>0)return;if(Nm){let e=Nm;for(Nm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Fm;){let e=Fm;for(Fm=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=n}}if(t)throw t}function AP(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function EP(t){let e,n=t.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),vC(s),XW(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}t.deps=e,t.depsTail=n}function ox(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(MP(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function MP(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===wg)||(t.globalVersion=wg,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!ox(t))))return;t.flags|=2;const e=t.dep,n=Wn,s=Pr;Wn=t,Pr=!0;try{AP(t);const i=t.fn(t._value);(e.version===0||Di(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{Wn=n,Pr=s,EP(t),t.flags&=-3}}function vC(t,e=!1){const{dep:n,prevSub:s,nextSub:i}=t;if(s&&(s.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=s,t.nextSub=void 0),n.subs===t&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)vC(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function XW(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function KW(t,e){t.effect instanceof _g&&(t=t.effect.fn);const n=new _g(t);e&&on(n,e);try{n.run()}catch(i){throw n.stop(),i}const s=n.run.bind(n);return s.effect=n,s}function ZW(t){t.effect.stop()}let Pr=!0;const TP=[];function fl(){TP.push(Pr),Pr=!1}function pl(){const t=TP.pop();Pr=t===void 0?!0:t}function o9(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Wn;Wn=void 0;try{e()}finally{Wn=n}}}let wg=0;class JW{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class p_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Wn||!Pr||Wn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Wn)n=this.activeLink=new JW(Wn,this),Wn.deps?(n.prevDep=Wn.depsTail,Wn.depsTail.nextDep=n,Wn.depsTail=n):Wn.deps=Wn.depsTail=n,PP(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Wn.depsTail,n.nextDep=void 0,Wn.depsTail.nextDep=n,Wn.depsTail=n,Wn.deps===n&&(Wn.deps=s)}return n}trigger(e){this.version++,wg++,this.notify(e)}notify(e){mC();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{gC()}}}function PP(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let s=e.deps;s;s=s.nextDep)PP(s)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Hy=new WeakMap,Bu=Symbol(""),rx=Symbol(""),xg=Symbol("");function xi(t,e,n){if(Pr&&Wn){let s=Hy.get(t);s||Hy.set(t,s=new Map);let i=s.get(n);i||(s.set(n,i=new p_),i.map=s,i.key=n),i.track()}}function Qa(t,e,n,s,i,o){const r=Hy.get(t);if(!r){wg++;return}const a=l=>{l&&l.trigger()};if(mC(),e==="clear")r.forEach(a);else{const l=Ae(t),c=l&&r_(n);if(l&&n==="length"){const u=Number(s);r.forEach((d,h)=>{(h==="length"||h===xg||!fo(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(xg)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Bu)),Yh(t)&&a(r.get(rx)));break;case"delete":l||(a(r.get(Bu)),Yh(t)&&a(r.get(rx)));break;case"set":Yh(t)&&a(r.get(Bu));break}}gC()}function QW(t,e){const n=Hy.get(t);return n&&n.get(e)}function Zd(t){const e=nn(t);return e===t?e:(xi(e,"iterate",xg),lo(t)?e:e.map(Hr))}function m_(t){return xi(t=nn(t),"iterate",xg),t}function ec(t,e){return wa(t)?vf(Ir(t)?Hr(e):e):Hr(e)}const eY={__proto__:null,[Symbol.iterator](){return nw(this,Symbol.iterator,t=>ec(this,t))},concat(...t){return Zd(this).concat(...t.map(e=>Ae(e)?Zd(e):e))},entries(){return nw(this,"entries",t=>(t[1]=ec(this,t[1]),t))},every(t,e){return za(this,"every",t,e,void 0,arguments)},filter(t,e){return za(this,"filter",t,e,n=>n.map(s=>ec(this,s)),arguments)},find(t,e){return za(this,"find",t,e,n=>ec(this,n),arguments)},findIndex(t,e){return za(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return za(this,"findLast",t,e,n=>ec(this,n),arguments)},findLastIndex(t,e){return za(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return za(this,"forEach",t,e,void 0,arguments)},includes(...t){return sw(this,"includes",t)},indexOf(...t){return sw(this,"indexOf",t)},join(t){return Zd(this).join(t)},lastIndexOf(...t){return sw(this,"lastIndexOf",t)},map(t,e){return za(this,"map",t,e,void 0,arguments)},pop(){return Np(this,"pop")},push(...t){return Np(this,"push",t)},reduce(t,...e){return r9(this,"reduce",t,e)},reduceRight(t,...e){return r9(this,"reduceRight",t,e)},shift(){return Np(this,"shift")},some(t,e){return za(this,"some",t,e,void 0,arguments)},splice(...t){return Np(this,"splice",t)},toReversed(){return Zd(this).toReversed()},toSorted(t){return Zd(this).toSorted(t)},toSpliced(...t){return Zd(this).toSpliced(...t)},unshift(...t){return Np(this,"unshift",t)},values(){return nw(this,"values",t=>ec(this,t))}};function nw(t,e,n){const s=m_(t),i=s[e]();return s!==t&&!lo(t)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=n(o.value)),o}),i}const tY=Array.prototype;function za(t,e,n,s,i,o){const r=m_(t),a=r!==t&&!lo(t),l=r[e];if(l!==tY[e]){const d=l.apply(t,o);return a?Hr(d):d}let c=n;r!==t&&(a?c=function(d,h){return n.call(this,ec(t,d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(r,c,s);return a&&i?i(u):u}function r9(t,e,n,s){const i=m_(t);let o=n;return i!==t&&(lo(t)?n.length>3&&(o=function(r,a,l){return n.call(this,r,a,l,t)}):o=function(r,a,l){return n.call(this,r,ec(t,a),l,t)}),i[e](o,...s)}function sw(t,e,n){const s=nn(t);xi(s,"iterate",xg);const i=s[e](...n);return(i===-1||i===!1)&&_1(n[0])?(n[0]=nn(n[0]),s[e](...n)):i}function Np(t,e,n=[]){fl(),mC();const s=nn(t)[e].apply(t,n);return gC(),pl(),s}const nY=Ro("__proto__,__v_isRef,__isVue"),IP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(fo));function sY(t){fo(t)||(t=String(t));const e=nn(this);return xi(e,"has",t),e.hasOwnProperty(t)}class LP{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){if(n==="__v_skip")return e.__v_skip;const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(i?o?NP:FP:o?VP:RP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const r=Ae(e);if(!i){let l;if(r&&(l=eY[n]))return l;if(n==="hasOwnProperty")return sY}const a=Reflect.get(e,n,hn(e)?e:s);if((fo(n)?IP.has(n):nY(n))||(i||xi(e,"get",n),o))return a;if(hn(a)){const l=r&&r_(n)?a:a.value;return i&&yt(l)?Pc(l):l}return yt(a)?i?Pc(a):Dn(a):a}}class OP extends LP{constructor(e=!1){super(!1,e)}set(e,n,s,i){let o=e[n];const r=Ae(e)&&r_(n);if(!this._isShallow){const c=wa(o);if(!lo(s)&&!wa(s)&&(o=nn(o),s=nn(s)),!r&&hn(o)&&!hn(s))return c||(o.value=s),!0}const a=r?Number(n)<e.length:Ft(e,n),l=Reflect.set(e,n,s,hn(e)?e:i);return e===nn(i)&&(a?Di(s,o)&&Qa(e,"set",n,s):Qa(e,"add",n,s)),l}deleteProperty(e,n){const s=Ft(e,n);e[n];const i=Reflect.deleteProperty(e,n);return i&&s&&Qa(e,"delete",n,void 0),i}has(e,n){const s=Reflect.has(e,n);return(!fo(n)||!IP.has(n))&&xi(e,"has",n),s}ownKeys(e){return xi(e,"iterate",Ae(e)?"length":Bu),Reflect.ownKeys(e)}}class DP extends LP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const iY=new OP,oY=new DP,rY=new OP(!0),aY=new DP(!0),ax=t=>t,Ev=t=>Reflect.getPrototypeOf(t);function lY(t,e,n){return function(...s){const i=this.__v_raw,o=nn(i),r=Yh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=i[t](...s),u=n?ax:e?vf:Hr;return!e&&xi(o,"iterate",l?rx:Bu),on(Object.create(c),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}}})}}function Mv(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function cY(t,e){const n={get(i){const o=this.__v_raw,r=nn(o),a=nn(i);t||(Di(i,a)&&xi(r,"get",i),xi(r,"get",a));const{has:l}=Ev(r),c=e?ax:t?vf:Hr;if(l.call(r,i))return c(o.get(i));if(l.call(r,a))return c(o.get(a));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!t&&xi(nn(i),"iterate",Bu),i.size},has(i){const o=this.__v_raw,r=nn(o),a=nn(i);return t||(Di(i,a)&&xi(r,"has",i),xi(r,"has",a)),i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){const r=this,a=r.__v_raw,l=nn(a),c=e?ax:t?vf:Hr;return!t&&xi(l,"iterate",Bu),a.forEach((u,d)=>i.call(o,c(u),c(d),r))}};return on(n,t?{add:Mv("add"),set:Mv("set"),delete:Mv("delete"),clear:Mv("clear")}:{add(i){!e&&!lo(i)&&!wa(i)&&(i=nn(i));const o=nn(this);return Ev(o).has.call(o,i)||(o.add(i),Qa(o,"add",i,i)),this},set(i,o){!e&&!lo(o)&&!wa(o)&&(o=nn(o));const r=nn(this),{has:a,get:l}=Ev(r);let c=a.call(r,i);c||(i=nn(i),c=a.call(r,i));const u=l.call(r,i);return r.set(i,o),c?Di(o,u)&&Qa(r,"set",i,o):Qa(r,"add",i,o),this},delete(i){const o=nn(this),{has:r,get:a}=Ev(o);let l=r.call(o,i);l||(i=nn(i),l=r.call(o,i)),a&&a.call(o,i);const c=o.delete(i);return l&&Qa(o,"delete",i,void 0),c},clear(){const i=nn(this),o=i.size!==0,r=i.clear();return o&&Qa(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=lY(i,t,e)}),n}function g_(t,e){const n=cY(t,e);return(s,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?s:Reflect.get(Ft(n,i)&&i in s?n:s,i,o)}const uY={get:g_(!1,!1)},dY={get:g_(!1,!0)},hY={get:g_(!0,!1)},fY={get:g_(!0,!0)},RP=new WeakMap,VP=new WeakMap,FP=new WeakMap,NP=new WeakMap;function pY(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mY(t){return t.__v_skip||!Object.isExtensible(t)?0:pY(AW(t))}function Dn(t){return wa(t)?t:v_(t,!1,iY,uY,RP)}function yC(t){return v_(t,!1,rY,dY,VP)}function Pc(t){return v_(t,!0,oY,hY,FP)}function gY(t){return v_(t,!0,aY,fY,NP)}function v_(t,e,n,s,i){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=mY(t);if(o===0)return t;const r=i.get(t);if(r)return r;const a=new Proxy(t,o===2?s:n);return i.set(t,a),a}function Ir(t){return wa(t)?Ir(t.__v_raw):!!(t&&t.__v_isReactive)}function wa(t){return!!(t&&t.__v_isReadonly)}function lo(t){return!!(t&&t.__v_isShallow)}function _1(t){return t?!!t.__v_raw:!1}function nn(t){const e=t&&t.__v_raw;return e?nn(e):t}function Ai(t){return!Ft(t,"__v_skip")&&Object.isExtensible(t)&&_P(t,"__v_skip",!0),t}const Hr=t=>yt(t)?Dn(t):t,vf=t=>yt(t)?Pc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function J(t){return BP(t,!1)}function Zn(t){return BP(t,!0)}function BP(t,e){return hn(t)?t:new vY(t,e)}class vY{constructor(e,n){this.dep=new p_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:nn(e),this._value=n?e:Hr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,s=this.__v_isShallow||lo(e)||wa(e);e=s?e:nn(e),Di(e,n)&&(this._rawValue=e,this._value=s?e:Hr(e),this.dep.trigger())}}function Bm(t){t.dep&&t.dep.trigger()}function M(t){return hn(t)?t.value:t}function lx(t){return Je(t)?t():M(t)}const yY={get:(t,e,n)=>e==="__v_raw"?t:M(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return hn(i)&&!hn(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function bC(t){return Ir(t)?t:new Proxy(t,yY)}class bY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new p_,{get:s,set:i}=e(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=i}get value(){return this._value=this._get()}set value(e){this._set(e)}}function zP(t){return new bY(t)}function po(t){const e=Ae(t)?new Array(t.length):{};for(const n in t)e[n]=HP(t,n);return e}class _Y{constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=nn(e);let i=!0,o=e;if(!Ae(e)||!r_(String(n)))do i=!_1(o)||lo(o);while(i&&(o=o.__v_raw));this._shallow=i}get value(){let e=this._object[this._key];return this._shallow&&(e=M(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&hn(this._raw[this._key])){const n=this._object[this._key];if(hn(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return QW(this._raw,this._key)}}class wY{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Cn(t,e,n){return hn(t)?t:Je(t)?new wY(t):yt(t)&&arguments.length>1?HP(t,e,n):J(t)}function HP(t,e,n){return new _Y(t,e,n)}class xY{constructor(e,n,s){this.fn=e,this.setter=n,this._value=void 0,this.dep=new p_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wg-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Wn!==this)return $P(this,!0),!0}get value(){const e=this.dep.track();return MP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function kY(t,e,n=!1){let s,i;return Je(t)?s=t:(s=t.get,i=t.set),new xY(s,i,n)}const CY={GET:"get",HAS:"has",ITERATE:"iterate"},SY={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Tv={},Uy=new WeakMap;let tc;function $Y(){return tc}function UP(t,e=!1,n=tc){if(n){let s=Uy.get(n);s||Uy.set(n,s=[]),s.push(t)}}function AY(t,e,n=un){const{immediate:s,deep:i,once:o,scheduler:r,augmentJob:a,call:l}=n,c=C=>i?C:lo(C)||i===!1||i===0?el(C,1):el(C);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=lo(t)):Ir(t)?(d=()=>c(t),p=!0):Ae(t)?(m=!0,p=t.some(C=>Ir(C)||lo(C)),d=()=>t.map(C=>{if(hn(C))return C.value;if(Ir(C))return c(C);if(Je(C))return l?l(C,2):C()})):Je(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){fl();try{h()}finally{pl()}}const C=tc;tc=u;try{return l?l(t,3,[f]):t(f)}finally{tc=C}}:d=Lt,e&&i){const C=d,S=i===!0?1/0:i;d=()=>el(C(),S)}const b=h_(),_=()=>{u.stop(),b&&b.active&&fC(b.effects,u)};if(o&&e){const C=e;e=(...S)=>{C(...S),_()}}let x=m?new Array(t.length).fill(Tv):Tv;const k=C=>{if(!(!(u.flags&1)||!u.dirty&&!C))if(e){const S=u.run();if(i||p||(m?S.some((E,P)=>Di(E,x[P])):Di(S,x))){h&&h();const E=tc;tc=u;try{const P=[S,x===Tv?void 0:m&&x[0]===Tv?[]:x,f];x=S,l?l(e,3,P):e(...P)}finally{tc=E}}}else u.run()};return a&&a(k),u=new _g(d),u.scheduler=r?()=>r(k,!1):k,f=C=>UP(C,!1,u),h=u.onStop=()=>{const C=Uy.get(u);if(C){if(l)l(C,4);else for(const S of C)S();Uy.delete(u)}},e?s?k(!0):x=u.run():r?r(k.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function el(t,e=1/0,n){if(e<=0||!yt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,hn(t))el(t.value,e,n);else if(Ae(t))for(let s=0;s<t.length;s++)el(t[s],e,n);else if(kd(t)||Yh(t))t.forEach(s=>{el(s,e,n)});else if(id(t)){for(const s in t)el(t[s],e,n);for(const s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&el(t[s],e,n)}return t}/**
10 * @vue/runtime-core v3.5.27
11 * (c) 2018-present Yuxi (Evan) You and Vue contributors
12 * @license MIT
13 **/const jP=[];function EY(t){jP.push(t)}function MY(){jP.pop()}function TY(t,e){}const PY={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},IY={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function np(t,e,n,s){try{return s?t(...s):t()}catch(i){Cd(i,e,n)}}function fr(t,e,n,s){if(Je(t)){const i=np(t,e,n,s);return i&&sd(i)&&i.catch(o=>{Cd(o,e,n)}),i}if(Ae(t)){const i=[];for(let o=0;o<t.length;o++)i.push(fr(t[o],e,n,s));return i}}function Cd(t,e,n,s=!0){const i=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||un;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(o){fl(),np(o,null,10,[t,l,c]),pl();return}}LY(t,n,i,s,r)}function LY(t,e,n,s=!0,i=!1){if(i)throw t;console.error(t)}const Ri=[];let ua=-1;const Xh=[];let nc=null,yh=0;const WP=Promise.resolve();let jy=null;function st(t){const e=jy||WP;return t?e.then(this?t.bind(this):t):e}function OY(t){let e=ua+1,n=Ri.length;for(;e<n;){const s=e+n>>>1,i=Ri[s],o=Cg(i);o<t||o===t&&i.flags&2?e=s+1:n=s}return e}function _C(t){if(!(t.flags&1)){const e=Cg(t),n=Ri[Ri.length-1];!n||!(t.flags&2)&&e>=Cg(n)?Ri.push(t):Ri.splice(OY(e),0,t),t.flags|=1,YP()}}function YP(){jy||(jy=WP.then(qP))}function kg(t){Ae(t)?Xh.push(...t):nc&&t.id===-1?nc.splice(yh+1,0,t):t.flags&1||(Xh.push(t),t.flags|=1),YP()}function a9(t,e,n=ua+1){for(;n<Ri.length;n++){const s=Ri[n];if(s&&s.flags&2){if(t&&s.id!==t.uid)continue;Ri.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Wy(t){if(Xh.length){const e=[...new Set(Xh)].sort((n,s)=>Cg(n)-Cg(s));if(Xh.length=0,nc){nc.push(...e);return}for(nc=e,yh=0;yh<nc.length;yh++){const n=nc[yh];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}nc=null,yh=0}}const Cg=t=>t.id==null?t.flags&2?-1:1/0:t.id;function qP(t){const e=Lt;try{for(ua=0;ua<Ri.length;ua++){const n=Ri[ua];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),np(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;ua<Ri.length;ua++){const n=Ri[ua];n&&(n.flags&=-2)}ua=-1,Ri.length=0,Wy(),jy=null,(Ri.length||Xh.length)&&qP()}}let bh,Pv=[];function GP(t,e){var n,s;bh=t,bh?(bh.enabled=!0,Pv.forEach(({event:i,args:o})=>bh.emit(i,...o)),Pv=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{GP(o,e)}),setTimeout(()=>{bh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Pv=[])},3e3)):Pv=[]}let ri=null,y_=null;function Sg(t){const e=ri;return ri=t,y_=t&&t.type.__scopeId||null,e}function DY(t){y_=t}function RY(){y_=null}const VY=t=>w;function w(t,e=ri,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&Eg(-1);const o=Sg(e);let r;try{r=t(...i)}finally{Sg(o),s._d&&Eg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Oe(t,e){if(ri===null)return t;const n=k1(ri),s=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,r,a,l=un]=e[i];o&&(Je(o)&&(o={mounted:o,updated:o}),o.deep&&el(r),s.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function fa(t,e,n,s){const i=t.dirs,o=e&&e.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(fl(),fr(l,n,8,[t.el,a,t,e]),pl())}}function Et(t,e){if(ni){let n=ni.provides;const s=ni.parent&&ni.parent.provides;s===n&&(n=ni.provides=Object.create(s)),n[t]=e}}function He(t,e,n=!1){const s=ht();if(s||zu){let i=zu?zu._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return n&&Je(e)?e.call(s&&s.proxy):e}}function XP(){return!!(ht()||zu)}const KP=Symbol.for("v-scx"),ZP=()=>He(KP);function ml(t,e){return w1(t,null,e)}function FY(t,e){return w1(t,null,{flush:"post"})}function JP(t,e){return w1(t,null,{flush:"sync"})}function Ee(t,e,n){return w1(t,e,n)}function w1(t,e,n=un){const{immediate:s,deep:i,flush:o,once:r}=n,a=on({},n),l=e&&s||!e&&o!=="post";let c;if(bf){if(o==="sync"){const f=ZP();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Lt,f.resume=Lt,f.pause=Lt,f}}const u=ni;a.call=(f,p,m)=>fr(f,u,p,m);let d=!1;o==="post"?a.scheduler=f=>{$s(f,u&&u.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():_C(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=AY(t,e,a);return bf&&(c?c.push(h):l&&h()),h}function NY(t,e,n){const s=this.proxy,i=Ke(t)?t.includes(".")?QP(s,t):()=>s[t]:t.bind(s,s);let o;Je(e)?o=e:(o=e.handler,n=e);const r=rd(this),a=w1(i,o.bind(s),n);return r(),a}function QP(t,e){const n=e.split(".");return()=>{let s=t;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}const eI=Symbol("_vte"),tI=t=>t.__isTeleport,zm=t=>t&&(t.disabled||t.disabled===""),l9=t=>t&&(t.defer||t.defer===""),c9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,u9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,cx=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},nI={name:"Teleport",__isTeleport:!0,process(t,e,n,s,i,o,r,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:b}}=c,_=zm(e.props);let{shapeFlag:x,children:k,dynamicChildren:C}=e;if(t==null){const S=e.el=m(""),E=e.anchor=m("");f(S,n,s),f(E,n,s);const P=(L,I)=>{x&16&&u(k,L,I,i,o,r,a,l)},T=()=>{const L=e.target=cx(e.props,p),I=sI(L,e,m,f);L&&(r!=="svg"&&c9(L)?r="svg":r!=="mathml"&&u9(L)&&(r="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(L),_||(P(L,I),x0(e,!1)))};_&&(P(n,E),x0(e,!0)),l9(e.props)?(e.el.__isMounted=!1,$s(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(l9(e.props)&&t.el.__isMounted===!1){$s(()=>{nI.process(t,e,n,s,i,o,r,a,l,c)},o);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,E=e.target=t.target,P=e.targetAnchor=t.targetAnchor,T=zm(t.props),L=T?n:E,I=T?S:P;if(r==="svg"||c9(E)?r="svg":(r==="mathml"||u9(E))&&(r="mathml"),C?(h(t.dynamicChildren,C,L,i,o,r,a),IC(t,e,!0)):l||d(t,e,L,I,i,o,r,a,!1),_)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Iv(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=cx(e.props,p);V&&Iv(e,V,null,c,0)}else T&&Iv(e,E,P,c,1);x0(e,_)}},remove(t,e,n,{um:s,o:{remove:i}},o){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(i(c),i(u)),o&&i(l),r&16){const f=o||!zm(h);for(let p=0;p<a.length;p++){const m=a[p];s(m,e,n,f,!!m.dynamicChildren)}}},move:Iv,hydrate:BY};function Iv(t,e,n,{o:{insert:s},m:i},o=2){o===0&&s(t.targetAnchor,e,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&s(r,e,n),(!d||zm(u))&&l&16)for(let h=0;h<c.length;h++)i(c[h],e,n,2);d&&s(a,e,n)}function BY(t,e,n,s,i,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,b,_,x){b.anchor=d(r(m),b,a(m),n,s,i,o),b.targetStart=_,b.targetAnchor=x}const f=e.target=cx(e.props,l),p=zm(e.props);if(f){const m=f._lpa||f.firstChild;if(e.shapeFlag&16)if(p)h(t,e,m,m&&r(m));else{e.anchor=r(t);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")e.targetStart=b;else if(b.data==="teleport anchor"){e.targetAnchor=b,f._lpa=e.targetAnchor&&r(e.targetAnchor);break}}b=r(b)}e.targetAnchor||sI(f,e,u,c),d(m&&r(m),e,f,n,s,i,o)}x0(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const Ta=nI;function x0(t,e){const n=t.ctx;if(n&&n.ut){let s,i;for(e?(s=t.el,i=t.anchor):(s=t.targetStart,i=t.targetAnchor);s&&s!==i;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function sI(t,e,n,s){const i=e.targetStart=n(""),o=e.targetAnchor=n("");return i[eI]=o,t&&(s(i,t),s(o,t)),o}const Ka=Symbol("_leaveCb"),Lv=Symbol("_enterCb");function wC(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vt(()=>{t.isMounted=!0}),_n(()=>{t.isUnmounting=!0}),t}const Yo=[Function,Array],xC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yo,onEnter:Yo,onAfterEnter:Yo,onEnterCancelled:Yo,onBeforeLeave:Yo,onLeave:Yo,onAfterLeave:Yo,onLeaveCancelled:Yo,onBeforeAppear:Yo,onAppear:Yo,onAfterAppear:Yo,onAppearCancelled:Yo},iI=t=>{const e=t.subTree;return e.component?iI(e.component):e},zY={name:"BaseTransition",props:xC,setup(t,{slots:e}){const n=ht(),s=wC();return()=>{const i=e.default&&b_(e.default(),!0);if(!i||!i.length)return;const o=oI(i),r=nn(t),{mode:a}=r;if(s.isLeaving)return iw(o);const l=d9(o);if(!l)return iw(o);let c=yf(l,r,s,n,d=>c=d);l.type!==Xn&&gl(l,c);let u=n.subTree&&d9(n.subTree);if(u&&u.type!==Xn&&!$r(u,l)&&iI(n).type!==Xn){let d=yf(u,r,s,n);if(gl(u,d),a==="out-in"&&l.type!==Xn)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},iw(o);a==="in-out"&&l.type!==Xn?d.delayLeave=(h,f,p)=>{const m=aI(s,u);m[String(u.key)]=u,h[Ka]=()=>{f(),h[Ka]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function oI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Xn){e=n;break}}return e}const rI=zY;function aI(t,e){const{leavingVNodes:n}=t;let s=n.get(e.type);return s||(s=Object.create(null),n.set(e.type,s)),s}function yf(t,e,n,s,i){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:b,onAppear:_,onAfterAppear:x,onAppearCancelled:k}=e,C=String(t.key),S=aI(n,t),E=(L,I)=>{L&&fr(L,s,9,I)},P=(L,I)=>{const V=I[1];E(L,I),Ae(L)?L.every(R=>R.length<=1)&&V():L.length<=1&&V()},T={mode:r,persisted:a,beforeEnter(L){let I=l;if(!n.isMounted)if(o)I=b||l;else return;L[Ka]&&L[Ka](!0);const V=S[C];V&&$r(t,V)&&V.el[Ka]&&V.el[Ka](),E(I,[L])},enter(L){let I=c,V=u,R=d;if(!n.isMounted)if(o)I=_||c,V=x||u,R=k||d;else return;let N=!1;const F=L[Lv]=B=>{N||(N=!0,B?E(R,[L]):E(V,[L]),T.delayedLeave&&T.delayedLeave(),L[Lv]=void 0)};I?P(I,[L,F]):F()},leave(L,I){const V=String(t.key);if(L[Lv]&&L[Lv](!0),n.isUnmounting)return I();E(h,[L]);let R=!1;const N=L[Ka]=F=>{R||(R=!0,I(),F?E(m,[L]):E(p,[L]),L[Ka]=void 0,S[V]===t&&delete S[V])};S[V]=t,f?P(f,[L,N]):N()},clone(L){const I=yf(L,e,n,s,i);return i&&i(I),I}};return T}function iw(t){if(x1(t))return t=pr(t),t.children=null,t}function d9(t){if(!x1(t))return tI(t.type)&&t.children?oI(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Je(n.default))return n.default()}}function gl(t,e){t.shapeFlag&6&&t.component?(t.transition=e,gl(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function b_(t,e=!1,n){let s=[],i=0;for(let o=0;o<t.length;o++){let r=t[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===te?(r.patchFlag&128&&i++,s=s.concat(b_(r.children,e,a))):(e||r.type!==Xn)&&s.push(a!=null?pr(r,{key:a}):r)}if(i>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function he(t,e){return Je(t)?(()=>on({name:t.name},e,{setup:t}))():t}function HY(){const t=ht();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function kC(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function UY(t){const e=ht(),n=Zn(null);if(e){const i=e.refs===un?e.refs={}:e.refs;Object.defineProperty(i,t,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}const Yy=new WeakMap;function Kh(t,e,n,s,i=!1){if(Ae(t)){t.forEach((p,m)=>Kh(p,e&&(Ae(e)?e[m]:e),n,s,i));return}if(ll(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Kh(t,e,n,s.component.subTree);return}const o=s.shapeFlag&4?k1(s.component):s.el,r=i?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===un?a.refs={}:a.refs,d=a.setupState,h=nn(d),f=d===un?zh:p=>Ft(h,p);if(c!=null&&c!==l){if(h9(e),Ke(c))u[c]=null,f(c)&&(d[c]=null);else if(hn(c)){c.value=null;const p=e;p.k&&(u[p.k]=null)}}if(Je(l))np(l,a,12,[r,u]);else{const p=Ke(l),m=hn(l);if(p||m){const b=()=>{if(t.f){const _=p?f(l)?d[l]:u[l]:l.value;if(i)Ae(_)&&fC(_,o);else if(Ae(_))_.includes(o)||_.push(o);else if(p)u[l]=[o],f(l)&&(d[l]=u[l]);else{const x=[o];l.value=x,t.k&&(u[t.k]=x)}}else p?(u[l]=r,f(l)&&(d[l]=r)):m&&(l.value=r,t.k&&(u[t.k]=r))};if(r){const _=()=>{b(),Yy.delete(t)};_.id=-1,Yy.set(t,_),$s(_,n)}else h9(t),b()}}}function h9(t){const e=Yy.get(t);e&&(e.flags|=8,Yy.delete(t))}let f9=!1;const Jd=()=>{f9||(console.error("Hydration completed but contains mismatches."),f9=!0)},jY=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",WY=t=>t.namespaceURI.includes("MathML"),Ov=t=>{if(t.nodeType===1){if(jY(t))return"svg";if(WY(t))return"mathml"}},Hh=t=>t.nodeType===8;function YY(t){const{mt:e,p:n,o:{patchProp:s,createText:i,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(k,C)=>{if(!C.hasChildNodes()){n(null,k,C),Wy(),C._vnode=k;return}d(C.firstChild,k,null,null,null),Wy(),C._vnode=k},d=(k,C,S,E,P,T=!1)=>{T=T||!!C.dynamicChildren;const L=Hh(k)&&k.data==="[",I=()=>m(k,C,S,E,P,L),{type:V,ref:R,shapeFlag:N,patchFlag:F}=C;let B=k.nodeType;C.el=k,F===-2&&(T=!1,C.dynamicChildren=null);let G=null;switch(V){case va:B!==3?C.children===""?(l(C.el=i(""),r(k),k),G=k):G=I():(k.data!==C.children&&(Jd(),k.data=C.children),G=o(k));break;case Xn:x(k)?(G=o(k),_(C.el=k.content.firstChild,k,S)):B!==8||L?G=I():G=o(k);break;case Hu:if(L&&(k=o(k),B=k.nodeType),B===1||B===3){G=k;const q=!C.children.length;for(let X=0;X<C.staticCount;X++)q&&(C.children+=G.nodeType===1?G.outerHTML:G.data),X===C.staticCount-1&&(C.anchor=G),G=o(G);return L?o(G):G}else I();break;case te:L?G=p(k,C,S,E,P,T):G=I();break;default:if(N&1)(B!==1||C.type.toLowerCase()!==k.tagName.toLowerCase())&&!x(k)?G=I():G=h(k,C,S,E,P,T);else if(N&6){C.slotScopeIds=P;const q=r(k);if(L?G=b(k):Hh(k)&&k.data==="teleport start"?G=b(k,k.data,"teleport end"):G=o(k),e(C,q,null,S,E,Ov(q),T),ll(C)&&!C.type.__asyncResolved){let X;L?(X=y(te),X.anchor=G?G.previousSibling:q.lastChild):X=k.nodeType===3?Y(""):y("div"),X.el=k,C.component.subTree=X}}else N&64?B!==8?G=I():G=C.type.hydrate(k,C,S,E,P,T,t,f):N&128&&(G=C.type.hydrate(k,C,S,E,Ov(r(k)),P,T,t,d))}return R!=null&&Kh(R,null,E,C),G},h=(k,C,S,E,P,T)=>{T=T||!!C.dynamicChildren;const{type:L,props:I,patchFlag:V,shapeFlag:R,dirs:N,transition:F}=C,B=L==="input"||L==="option";if(B||V!==-1){N&&fa(C,null,S,"created");let G=!1;if(x(k)){G=PI(null,F)&&S&&S.vnode.props&&S.vnode.props.appear;const X=k.content.firstChild;if(G){const K=X.getAttribute("class");K&&(X.$cls=K),F.beforeEnter(X)}_(X,k,S),C.el=k=X}if(R&16&&!(I&&(I.innerHTML||I.textContent))){let X=f(k.firstChild,C,k,S,E,P,T);for(;X;){Dv(k,1)||Jd();const K=X;X=X.nextSibling,a(K)}}else if(R&8){let X=C.children;X[0]===`
14 `&&(k.tagName==="PRE"||k.tagName==="TEXTAREA")&&(X=X.slice(1));const{textContent:K}=k;K!==X&&K!==X.replace(/\r\n|\r/g,`
15 `)&&(Dv(k,0)||Jd(),k.textContent=C.children)}if(I){if(B||!T||V&48){const X=k.tagName.includes("-");for(const K in I)(B&&(K.endsWith("value")||K==="indeterminate")||xd(K)&&!al(K)||K[0]==="."||X&&!al(K))&&s(k,K,null,I[K],void 0,S)}else if(I.onClick)s(k,"onClick",null,I.onClick,void 0,S);else if(V&4&&Ir(I.style))for(const X in I.style)I.style[X]}let q;(q=I&&I.onVnodeBeforeMount)&&so(q,S,C),N&&fa(C,null,S,"beforeMount"),((q=I&&I.onVnodeMounted)||N||G)&&DI(()=>{q&&so(q,S,C),G&&F.enter(k),N&&fa(C,null,S,"mounted")},E)}return k.nextSibling},f=(k,C,S,E,P,T,L)=>{L=L||!!C.dynamicChildren;const I=C.children,V=I.length;for(let R=0;R<V;R++){const N=L?I[R]:I[R]=io(I[R]),F=N.type===va;k?(F&&!L&&R+1<V&&io(I[R+1]).type===va&&(l(i(k.data.slice(N.children.length)),S,o(k)),k.data=N.children),k=d(k,N,E,P,T,L)):F&&!N.children?l(N.el=i(""),S):(Dv(S,1)||Jd(),n(null,N,S,null,E,P,Ov(S),T))}return k},p=(k,C,S,E,P,T)=>{const{slotScopeIds:L}=C;L&&(P=P?P.concat(L):L);const I=r(k),V=f(o(k),C,I,S,E,P,T);return V&&Hh(V)&&V.data==="]"?o(C.anchor=V):(Jd(),l(C.anchor=c("]"),I,V),V)},m=(k,C,S,E,P,T)=>{if(Dv(k.parentElement,1)||Jd(),C.el=null,T){const V=b(k);for(;;){const R=o(k);if(R&&R!==V)a(R);else break}}const L=o(k),I=r(k);return a(k),n(null,C,I,L,S,E,Ov(I),P),S&&(S.vnode.el=C.el,k_(S,C.el)),L},b=(k,C="[",S="]")=>{let E=0;for(;k;)if(k=o(k),k&&Hh(k)&&(k.data===C&&E++,k.data===S)){if(E===0)return o(k);E--}return k},_=(k,C,S)=>{const E=C.parentNode;E&&E.replaceChild(k,C);let P=S;for(;P;)P.vnode.el===C&&(P.vnode.el=P.subTree.el=k),P=P.parent},x=k=>k.nodeType===1&&k.tagName==="TEMPLATE";return[u,d]}const p9="data-allow-mismatch",qY={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Dv(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(p9);)t=t.parentElement;const n=t&&t.getAttribute(p9);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return e===0&&s.includes("children")?!0:s.includes(qY[e])}}const GY=c_().requestIdleCallback||(t=>setTimeout(t,1)),XY=c_().cancelIdleCallback||(t=>clearTimeout(t)),KY=(t=1e4)=>e=>{const n=GY(e,{timeout:t});return()=>XY(n)};function ZY(t){const{top:e,left:n,bottom:s,right:i}=t.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(e>0&&e<o||s>0&&s<o)&&(n>0&&n<r||i>0&&i<r)}const JY=t=>(e,n)=>{const s=new IntersectionObserver(i=>{for(const o of i)if(o.isIntersecting){s.disconnect(),e();break}},t);return n(i=>{if(i instanceof Element){if(ZY(i))return e(),s.disconnect(),!1;s.observe(i)}}),()=>s.disconnect()},QY=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},eq=(t=[])=>(e,n)=>{Ke(t)&&(t=[t]);let s=!1;const i=r=>{s||(s=!0,o(),e(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const a of t)r.removeEventListener(a,i)})};return n(r=>{for(const a of t)r.addEventListener(a,i,{once:!0})}),o};function tq(t,e){if(Hh(t)&&t.data==="["){let n=1,s=t.nextSibling;for(;s;){if(s.nodeType===1){if(e(s)===!1)break}else if(Hh(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else e(t)}const ll=t=>!!t.type.__asyncLoader;function nq(t){Je(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:s,delay:i=200,hydrate:o,timeout:r,suspensible:a=!0,onError:l}=t;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let p;return c||(p=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((b,_)=>{l(m,()=>b(h()),()=>_(m),d+1)});throw m}).then(m=>p!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return he({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,m,b){let _=!1;(m.bu||(m.bu=[])).push(()=>_=!0);const x=()=>{_||b()},k=o?()=>{const C=o(x,S=>tq(p,S));C&&(m.bum||(m.bum=[])).push(C)}:x;u?k():f().then(()=>!m.isUnmounted&&k())},get __asyncResolved(){return u},setup(){const p=ni;if(kC(p),u)return()=>Rv(u,p);const m=k=>{c=null,Cd(k,p,13,!s)};if(a&&p.suspense||bf)return f().then(k=>()=>Rv(k,p)).catch(k=>(m(k),()=>s?y(s,{error:k}):null));const b=J(!1),_=J(),x=J(!!i);return i&&setTimeout(()=>{x.value=!1},i),r!=null&&setTimeout(()=>{if(!b.value&&!_.value){const k=new Error(`Async component timed out after ${r}ms.`);m(k),_.value=k}},r),f().then(()=>{b.value=!0,p.parent&&x1(p.parent.vnode)&&p.parent.update()}).catch(k=>{m(k),_.value=k}),()=>{if(b.value&&u)return Rv(u,p);if(_.value&&s)return y(s,{error:_.value});if(n&&!x.value)return Rv(n,p)}}})}function Rv(t,e){const{ref:n,props:s,children:i,ce:o}=e.vnode,r=y(t,s,i);return r.ref=n,r.ce=o,delete e.vnode.ce,r}const x1=t=>t.type.__isKeepAlive,sq={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=ht(),s=n.ctx;if(!s.renderer)return()=>{const x=e.default&&e.default();return x&&x.length===1?x[0]:x};const i=new Map,o=new Set;let r=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=s,h=d("div");s.activate=(x,k,C,S,E)=>{const P=x.component;c(x,k,C,0,a),l(P.vnode,x,k,C,P,a,S,x.slotScopeIds,E),$s(()=>{P.isDeactivated=!1,P.a&&qh(P.a);const T=x.props&&x.props.onVnodeMounted;T&&so(T,P.parent,x)},a)},s.deactivate=x=>{const k=x.component;Gy(k.m),Gy(k.a),c(x,h,null,1,a),$s(()=>{k.da&&qh(k.da);const C=x.props&&x.props.onVnodeUnmounted;C&&so(C,k.parent,x),k.isDeactivated=!0},a)};function f(x){ow(x),u(x,n,a,!0)}function p(x){i.forEach((k,C)=>{const S=_x(ll(k)?k.type.__asyncResolved||{}:k.type);S&&!x(S)&&m(C)})}function m(x){const k=i.get(x);k&&(!r||!$r(k,r))?f(k):r&&ow(r),i.delete(x),o.delete(x)}Ee(()=>[t.include,t.exclude],([x,k])=>{x&&p(C=>Jp(x,C)),k&&p(C=>!Jp(k,C))},{flush:"post",deep:!0});let b=null;const _=()=>{b!=null&&(Xy(n.subTree.type)?$s(()=>{i.set(b,Vv(n.subTree))},n.subTree.suspense):i.set(b,Vv(n.subTree)))};return Vt(_),wl(_),_n(()=>{i.forEach(x=>{const{subTree:k,suspense:C}=n,S=Vv(k);if(x.type===S.type&&x.key===S.key){ow(S);const E=S.component.da;E&&$s(E,C);return}f(x)})}),()=>{if(b=null,!e.default)return r=null;const x=e.default(),k=x[0];if(x.length>1)return r=null,x;if(!is(k)||!(k.shapeFlag&4)&&!(k.shapeFlag&128))return r=null,k;let C=Vv(k);if(C.type===Xn)return r=null,C;const S=C.type,E=_x(ll(C)?C.type.__asyncResolved||{}:S),{include:P,exclude:T,max:L}=t;if(P&&(!E||!Jp(P,E))||T&&E&&Jp(T,E))return C.shapeFlag&=-257,r=C,k;const I=C.key==null?S:C.key,V=i.get(I);return C.el&&(C=pr(C),k.shapeFlag&128&&(k.ssContent=C)),b=I,V?(C.el=V.el,C.component=V.component,C.transition&&gl(C,C.transition),C.shapeFlag|=512,o.delete(I),o.add(I)):(o.add(I),L&&o.size>parseInt(L,10)&&m(o.values().next().value)),C.shapeFlag|=256,r=C,Xy(k.type)?k:C}}},iq=sq;function Jp(t,e){return Ae(t)?t.some(n=>Jp(n,e)):Ke(t)?t.split(",").includes(e):$W(t)?(t.lastIndex=0,t.test(e)):!1}function CC(t,e){lI(t,"a",e)}function SC(t,e){lI(t,"da",e)}function lI(t,e,n=ni){const s=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(__(e,s,n),n){let i=n.parent;for(;i&&i.parent;)x1(i.parent.vnode)&&oq(s,e,n,i),i=i.parent}}function oq(t,e,n,s){const i=__(e,t,s,!0);xl(()=>{fC(s[e],i)},n)}function ow(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Vv(t){return t.shapeFlag&128?t.ssContent:t}function __(t,e,n=ni,s=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{fl();const a=rd(n),l=fr(e,n,t,r);return a(),pl(),l});return s?i.unshift(o):i.push(o),o}}const _l=t=>(e,n=ni)=>{(!bf||t==="sp")&&__(t,(...s)=>e(...s),n)},Sd=_l("bm"),Vt=_l("m"),w_=_l("bu"),wl=_l("u"),_n=_l("bum"),xl=_l("um"),cI=_l("sp"),uI=_l("rtg"),dI=_l("rtc");function hI(t,e=ni){__("ec",t,e)}const $C="components",rq="directives";function W(t,e){return AC($C,t,!0,e)||t}const fI=Symbol.for("v-ndc");function kt(t){return Ke(t)?AC($C,t,!1)||t:t||fI}function xt(t){return AC(rq,t)}function AC(t,e,n=!0,s=!1){const i=ri||ni;if(i){const o=i.type;if(t===$C){const a=_x(o,!1);if(a&&(a===e||a===Jn(e)||a===Uc(Jn(e))))return o}const r=m9(i[t]||o[t],e)||m9(i.appContext[t],e);return!r&&s?o:r}}function m9(t,e){return t&&(t[e]||t[Jn(e)]||t[Uc(Jn(e))])}function we(t,e,n,s){let i;const o=n&&n[s],r=Ae(t);if(r||Ke(t)){const a=r&&Ir(t);let l=!1,c=!1;a&&(l=!lo(t),c=wa(t),t=m_(t)),i=new Array(t.length);for(let u=0,d=t.length;u<d;u++)i[u]=e(l?c?vf(Hr(t[u])):Hr(t[u]):t[u],u,void 0,o&&o[u])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,o&&o[a])}else if(yt(t))if(t[Symbol.iterator])i=Array.from(t,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(t);i=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];i[l]=e(t[u],u,l,o&&o[l])}}else i=[];return n&&(n[s]=i),i}function ks(t,e){for(let n=0;n<e.length;n++){const s=e[n];if(Ae(s))for(let i=0;i<s.length;i++)t[s[i].name]=s[i].fn;else s&&(t[s.name]=s.key?(...i)=>{const o=s.fn(...i);return o&&(o.key=s.key),o}:s.fn)}return t}function le(t,e,n={},s,i){if(ri.ce||ri.parent&&ll(ri.parent)&&ri.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),v(),D(te,null,[y("slot",n,s&&s())],c?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&EC(o(n)),a=n.key||r&&r.key,l=D(te,{key:(a&&!fo(a)?a:`_${e}`)+(!r&&s?"_fb":"")},r||(s?s():[]),r&&t._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function EC(t){return t.some(e=>is(e)?!(e.type===Xn||e.type===te&&!EC(e.children)):!0)?t:null}function pI(t,e){const n={};for(const s in t)n[e&&/[A-Z]/.test(s)?`on:${s}`:Nu(s)]=t[s];return n}const ux=t=>t?BI(t)?k1(t):ux(t.parent):null,Hm=on(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>ux(t.parent),$root:t=>ux(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>MC(t),$forceUpdate:t=>t.f||(t.f=()=>{_C(t.update)}),$nextTick:t=>t.n||(t.n=st.bind(t.proxy)),$watch:t=>NY.bind(t)}),rw=(t,e)=>t!==un&&!t.__isScriptSetup&&Ft(t,e),dx={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=t;if(e[0]!=="$"){const h=r[e];if(h!==void 0)switch(h){case 1:return s[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(rw(s,e))return r[e]=1,s[e];if(i!==un&&Ft(i,e))return r[e]=2,i[e];if(Ft(o,e))return r[e]=3,o[e];if(n!==un&&Ft(n,e))return r[e]=4,n[e];hx&&(r[e]=0)}}const c=Hm[e];let u,d;if(c)return e==="$attrs"&&xi(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==un&&Ft(n,e))return r[e]=4,n[e];if(d=l.config.globalProperties,Ft(d,e))return d[e]},set({_:t},e,n){const{data:s,setupState:i,ctx:o}=t;return rw(i,e)?(i[e]=n,!0):s!==un&&Ft(s,e)?(s[e]=n,!0):Ft(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:s,appContext:i,props:o,type:r}},a){let l;return!!(n[a]||t!==un&&a[0]!=="$"&&Ft(t,a)||rw(e,a)||Ft(o,a)||Ft(s,a)||Ft(Hm,a)||Ft(i.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Ft(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},aq=on({},dx,{get(t,e){if(e!==Symbol.unscopables)return dx.get(t,e,t)},has(t,e){return e[0]!=="_"&&!LW(e)}});function lq(){return null}function cq(){return null}function uq(t){}function dq(t){}function hq(){return null}function fq(){}function pq(t,e){return null}function Gi(){return mI().slots}function sp(){return mI().attrs}function mI(t){const e=ht();return e.setupContext||(e.setupContext=jI(e))}function $g(t){return Ae(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function mq(t,e){const n=$g(t);for(const s in e){if(s.startsWith("__skip"))continue;let i=n[s];i?Ae(i)||Je(i)?i=n[s]={type:i,default:e[s]}:i.default=e[s]:i===null&&(i=n[s]={default:e[s]}),i&&e[`__skip_${s}`]&&(i.skipFactory=!0)}return n}function gq(t,e){return!t||!e?t||e:Ae(t)&&Ae(e)?t.concat(e):on({},$g(t),$g(e))}function vq(t,e){const n={};for(const s in t)e.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>t[s]});return n}function yq(t){const e=ht();let n=t();return vx(),sd(n)&&(n=n.catch(s=>{throw rd(e),s})),[n,()=>rd(e)]}let hx=!0;function bq(t){const e=MC(t),n=t.proxy,s=t.ctx;hx=!1,e.beforeCreate&&g9(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:b,beforeDestroy:_,beforeUnmount:x,destroyed:k,unmounted:C,render:S,renderTracked:E,renderTriggered:P,errorCaptured:T,serverPrefetch:L,expose:I,inheritAttrs:V,components:R,directives:N,filters:F}=e;if(c&&_q(c,s,null),r)for(const q in r){const X=r[q];Je(X)&&(s[q]=X.bind(n))}if(i){const q=i.call(n,n);yt(q)&&(t.data=Dn(q))}if(hx=!0,o)for(const q in o){const X=o[q],K=Je(X)?X.bind(n,n):Je(X.get)?X.get.bind(n,n):Lt,H=!Je(X)&&Je(X.set)?X.set.bind(n):Lt,Q=z({get:K,set:H});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>Q.value,set:se=>Q.value=se})}if(a)for(const q in a)gI(a[q],s,n,q);if(l){const q=Je(l)?l.call(n):l;Reflect.ownKeys(q).forEach(X=>{Et(X,q[X])})}u&&g9(u,t,"c");function G(q,X){Ae(X)?X.forEach(K=>q(K.bind(n))):X&&q(X.bind(n))}if(G(Sd,d),G(Vt,h),G(w_,f),G(wl,p),G(CC,m),G(SC,b),G(hI,T),G(dI,E),G(uI,P),G(_n,x),G(xl,C),G(cI,L),Ae(I))if(I.length){const q=t.exposed||(t.exposed={});I.forEach(X=>{Object.defineProperty(q,X,{get:()=>n[X],set:K=>n[X]=K,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Lt&&(t.render=S),V!=null&&(t.inheritAttrs=V),R&&(t.components=R),N&&(t.directives=N),L&&kC(t)}function _q(t,e,n=Lt){Ae(t)&&(t=fx(t));for(const s in t){const i=t[s];let o;yt(i)?"default"in i?o=He(i.from||s,i.default,!0):o=He(i.from||s):o=He(i),hn(o)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[s]=o}}function g9(t,e,n){fr(Ae(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,n)}function gI(t,e,n,s){let i=s.includes(".")?QP(n,s):()=>n[s];if(Ke(t)){const o=e[t];Je(o)&&Ee(i,o)}else if(Je(t))Ee(i,t.bind(n));else if(yt(t))if(Ae(t))t.forEach(o=>gI(o,e,n,s));else{const o=Je(t.handler)?t.handler.bind(n):e[t.handler];Je(o)&&Ee(i,o,t)}}function MC(t){const e=t.type,{mixins:n,extends:s}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!i.length&&!n&&!s?l=e:(l={},i.length&&i.forEach(c=>qy(l,c,r,!0)),qy(l,e,r)),yt(e)&&o.set(e,l),l}function qy(t,e,n,s=!1){const{mixins:i,extends:o}=e;o&&qy(t,o,n,!0),i&&i.forEach(r=>qy(t,r,n,!0));for(const r in e)if(!(s&&r==="expose")){const a=wq[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const wq={data:v9,props:y9,emits:y9,methods:Qp,computed:Qp,beforeCreate:Ii,created:Ii,beforeMount:Ii,mounted:Ii,beforeUpdate:Ii,updated:Ii,beforeDestroy:Ii,beforeUnmount:Ii,destroyed:Ii,unmounted:Ii,activated:Ii,deactivated:Ii,errorCaptured:Ii,serverPrefetch:Ii,components:Qp,directives:Qp,watch:kq,provide:v9,inject:xq};function v9(t,e){return e?t?function(){return on(Je(t)?t.call(this,this):t,Je(e)?e.call(this,this):e)}:e:t}function xq(t,e){return Qp(fx(t),fx(e))}function fx(t){if(Ae(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Ii(t,e){return t?[...new Set([].concat(t,e))]:e}function Qp(t,e){return t?on(Object.create(null),t,e):e}function y9(t,e){return t?Ae(t)&&Ae(e)?[...new Set([...t,...e])]:on(Object.create(null),$g(t),$g(e??{})):e}function kq(t,e){if(!t)return e;if(!e)return t;const n=on(Object.create(null),t);for(const s in e)n[s]=Ii(t[s],e[s]);return n}function vI(){return{app:null,config:{isNativeTag:zh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Cq=0;function Sq(t,e){return function(s,i=null){Je(s)||(s=on({},s)),i!=null&&!yt(i)&&(i=null);const o=vI(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:Cq++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:YI,get config(){return o.config},set config(u){},use(u,...d){return r.has(u)||(u&&Je(u.install)?(r.add(u),u.install(c,...d)):Je(u)&&(r.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const f=c._ceVNode||y(s,i);return f.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),d&&e?e(f,u):t(f,u,h),l=!0,c._container=u,u.__vue_app__=c,k1(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(fr(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=zu;zu=c;try{return u()}finally{zu=d}}};return c}}let zu=null;function $q(t,e,n=un){const s=ht(),i=Jn(e),o=Vi(e),r=yI(t,i),a=zP((l,c)=>{let u,d=un,h;return JP(()=>{const f=t[i];Di(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const p=n.set?n.set(f):f;if(!Di(p,u)&&!(d!==un&&Di(f,d)))return;const m=s.vnode.props;m&&(e in m||i in m||o in m)&&(`onUpdate:${e}`in m||`onUpdate:${i}`in m||`onUpdate:${o}`in m)||(u=f,c()),s.emit(`update:${e}`,p),Di(f,p)&&Di(f,d)&&!Di(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||un:a,done:!1}:{done:!0}}}},a}const yI=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Jn(e)}Modifiers`]||t[`${Vi(e)}Modifiers`];function Aq(t,e,...n){if(t.isUnmounted)return;const s=t.vnode.props||un;let i=n;const o=e.startsWith("update:"),r=o&&yI(s,e.slice(7));r&&(r.trim&&(i=n.map(u=>Ke(u)?u.trim():u)),r.number&&(i=n.map(l_)));let a,l=s[a=Nu(e)]||s[a=Nu(Jn(e))];!l&&o&&(l=s[a=Nu(Vi(e))]),l&&fr(l,t,6,i);const c=s[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,fr(c,t,6,i)}}const Eq=new WeakMap;function bI(t,e,n=!1){const s=n?Eq:e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!Je(t)){const l=c=>{const u=bI(c,e,!0);u&&(a=!0,on(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(yt(t)&&s.set(t,null),null):(Ae(o)?o.forEach(l=>r[l]=null):on(r,o),yt(t)&&s.set(t,r),r)}function x_(t,e){return!t||!xd(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ft(t,e[0].toLowerCase()+e.slice(1))||Ft(t,Vi(e))||Ft(t,e))}function k0(t){const{type:e,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,b=Sg(t);let _,x;try{if(n.shapeFlag&4){const C=i||s,S=C;_=io(c.call(S,C,u,d,f,h,p)),x=a}else{const C=e;_=io(C.length>1?C(d,{attrs:a,slots:r,emit:l}):C(d,null)),x=e.props?a:Tq(a)}}catch(C){Um.length=0,Cd(C,t,1),_=y(Xn)}let k=_;if(x&&m!==!1){const C=Object.keys(x),{shapeFlag:S}=k;C.length&&S&7&&(o&&C.some(hC)&&(x=Pq(x,o)),k=pr(k,x,!1,!0))}return n.dirs&&(k=pr(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&gl(k,n.transition),_=k,Sg(b),_}function Mq(t,e=!0){let n;for(let s=0;s<t.length;s++){const i=t[s];if(is(i)){if(i.type!==Xn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const Tq=t=>{let e;for(const n in t)(n==="class"||n==="style"||xd(n))&&((e||(e={}))[n]=t[n]);return e},Pq=(t,e)=>{const n={};for(const s in t)(!hC(s)||!(s.slice(9)in e))&&(n[s]=t[s]);return n};function Iq(t,e,n){const{props:s,children:i,component:o}=t,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?b9(s,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(r[h]!==s[h]&&!x_(c,h))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?b9(s,r,c):!0:!!r;return!1}function b9(t,e,n){const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(e[o]!==t[o]&&!x_(n,o))return!0}return!1}function k_({vnode:t,parent:e},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.el=t.el),s===t)(t=e.vnode).el=n,e=e.parent;else break}}const _I={},wI=()=>Object.create(_I),xI=t=>Object.getPrototypeOf(t)===_I;function Lq(t,e,n,s=!1){const i={},o=wI();t.propsDefaults=Object.create(null),kI(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);n?t.props=s?i:yC(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function Oq(t,e,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,a=nn(i),[l]=t.propsOptions;let c=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(x_(t.emitsOptions,h))continue;const f=e[h];if(l)if(Ft(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=Jn(h);i[p]=px(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{kI(t,e,i,o)&&(c=!0);let u;for(const d in a)(!e||!Ft(e,d)&&((u=Vi(d))===d||!Ft(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(i[d]=px(l,a,d,void 0,t,!0)):delete i[d]);if(o!==a)for(const d in o)(!e||!Ft(e,d))&&(delete o[d],c=!0)}c&&Qa(t.attrs,"set","")}function kI(t,e,n,s){const[i,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(al(l))continue;const c=e[l];let u;i&&Ft(i,u=Jn(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:x_(t.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=nn(n),c=a||un;for(let u=0;u<o.length;u++){const d=o[u];n[d]=px(i,l,d,c[d],t,!Ft(c,d))}}return r}function px(t,e,n,s,i,o){const r=t[n];if(r!=null){const a=Ft(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&Je(l)){const{propsDefaults:c}=i;if(n in c)s=c[n];else{const u=rd(i);s=c[n]=l.call(null,e),u()}}else s=l;i.ce&&i.ce._setProp(n,s)}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===Vi(n))&&(s=!0))}return s}const Dq=new WeakMap;function CI(t,e,n=!1){const s=n?Dq:e.propsCache,i=s.get(t);if(i)return i;const o=t.props,r={},a=[];let l=!1;if(!Je(t)){const u=d=>{l=!0;const[h,f]=CI(d,e,!0);on(r,h),f&&a.push(...f)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return yt(t)&&s.set(t,Wh),Wh;if(Ae(o))for(let u=0;u<o.length;u++){const d=Jn(o[u]);_9(d)&&(r[d]=un)}else if(o)for(const u in o){const d=Jn(u);if(_9(d)){const h=o[u],f=r[d]=Ae(h)||Je(h)?{type:h}:on({},h),p=f.type;let m=!1,b=!0;if(Ae(p))for(let _=0;_<p.length;++_){const x=p[_],k=Je(x)&&x.name;if(k==="Boolean"){m=!0;break}else k==="String"&&(b=!1)}else m=Je(p)&&p.name==="Boolean";f[0]=m,f[1]=b,(m||Ft(f,"default"))&&a.push(d)}}const c=[r,a];return yt(t)&&s.set(t,c),c}function _9(t){return t[0]!=="$"&&!al(t)}const TC=t=>t==="_"||t==="_ctx"||t==="$stable",PC=t=>Ae(t)?t.map(io):[io(t)],Rq=(t,e,n)=>{if(e._n)return e;const s=w((...i)=>PC(e(...i)),n);return s._c=!1,s},SI=(t,e,n)=>{const s=t._ctx;for(const i in t){if(TC(i))continue;const o=t[i];if(Je(o))e[i]=Rq(i,o,s);else if(o!=null){const r=PC(o);e[i]=()=>r}}},$I=(t,e)=>{const n=PC(e);t.slots.default=()=>n},AI=(t,e,n)=>{for(const s in e)(n||!TC(s))&&(t[s]=e[s])},Vq=(t,e,n)=>{const s=t.slots=wI();if(t.vnode.shapeFlag&32){const i=e._;i?(AI(s,e,n),n&&_P(s,"_",i,!0)):SI(e,s)}else e&&$I(t,e)},Fq=(t,e,n)=>{const{vnode:s,slots:i}=t;let o=!0,r=un;if(s.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:AI(i,e,n):(o=!e.$stable,SI(e,i)),r=e}else e&&($I(t,e),r={default:1});if(o)for(const a in i)!TC(a)&&r[a]==null&&delete i[a]},$s=DI;function EI(t){return TI(t)}function MI(t){return TI(t,YY)}function TI(t,e){const n=c_();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Lt,insertStaticContent:p}=t,m=(ee,ne,pe,$e=null,Ce=null,Pe=null,Ue=void 0,Fe=null,ze=!!ne.dynamicChildren)=>{if(ee===ne)return;ee&&!$r(ee,ne)&&($e=oe(ee),se(ee,Ce,Pe,!0),ee=null),ne.patchFlag===-2&&(ze=!1,ne.dynamicChildren=null);const{type:De,ref:ct,shapeFlag:Qe}=ne;switch(De){case va:b(ee,ne,pe,$e);break;case Xn:_(ee,ne,pe,$e);break;case Hu:ee==null&&x(ne,pe,$e,Ue);break;case te:R(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze);break;default:Qe&1?S(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze):Qe&6?N(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze):(Qe&64||Qe&128)&&De.process(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze,re)}ct!=null&&Ce?Kh(ct,ee&&ee.ref,Pe,ne||ee,!ne):ct==null&&ee&&ee.ref!=null&&Kh(ee.ref,null,Pe,ee,!0)},b=(ee,ne,pe,$e)=>{if(ee==null)s(ne.el=a(ne.children),pe,$e);else{const Ce=ne.el=ee.el;ne.children!==ee.children&&c(Ce,ne.children)}},_=(ee,ne,pe,$e)=>{ee==null?s(ne.el=l(ne.children||""),pe,$e):ne.el=ee.el},x=(ee,ne,pe,$e)=>{[ee.el,ee.anchor]=p(ee.children,ne,pe,$e,ee.el,ee.anchor)},k=({el:ee,anchor:ne},pe,$e)=>{let Ce;for(;ee&&ee!==ne;)Ce=h(ee),s(ee,pe,$e),ee=Ce;s(ne,pe,$e)},C=({el:ee,anchor:ne})=>{let pe;for(;ee&&ee!==ne;)pe=h(ee),i(ee),ee=pe;i(ne)},S=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze)=>{if(ne.type==="svg"?Ue="svg":ne.type==="math"&&(Ue="mathml"),ee==null)E(ne,pe,$e,Ce,Pe,Ue,Fe,ze);else{const De=ee.el&&ee.el._isVueCE?ee.el:null;try{De&&De._beginPatch(),L(ee,ne,Ce,Pe,Ue,Fe,ze)}finally{De&&De._endPatch()}}},E=(ee,ne,pe,$e,Ce,Pe,Ue,Fe)=>{let ze,De;const{props:ct,shapeFlag:Qe,transition:ot,dirs:be}=ee;if(ze=ee.el=r(ee.type,Pe,ct&&ct.is,ct),Qe&8?u(ze,ee.children):Qe&16&&T(ee.children,ze,null,$e,Ce,aw(ee,Pe),Ue,Fe),be&&fa(ee,null,$e,"created"),P(ze,ee,ee.scopeId,Ue,$e),ct){for(const Me in ct)Me!=="value"&&!al(Me)&&o(ze,Me,null,ct[Me],Pe,$e);"value"in ct&&o(ze,"value",null,ct.value,Pe),(De=ct.onVnodeBeforeMount)&&so(De,$e,ee)}be&&fa(ee,null,$e,"beforeMount");const me=PI(Ce,ot);me&&ot.beforeEnter(ze),s(ze,ne,pe),((De=ct&&ct.onVnodeMounted)||me||be)&&$s(()=>{De&&so(De,$e,ee),me&&ot.enter(ze),be&&fa(ee,null,$e,"mounted")},Ce)},P=(ee,ne,pe,$e,Ce)=>{if(pe&&f(ee,pe),$e)for(let Pe=0;Pe<$e.length;Pe++)f(ee,$e[Pe]);if(Ce){let Pe=Ce.subTree;if(ne===Pe||Xy(Pe.type)&&(Pe.ssContent===ne||Pe.ssFallback===ne)){const Ue=Ce.vnode;P(ee,Ue,Ue.scopeId,Ue.slotScopeIds,Ce.parent)}}},T=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze=0)=>{for(let De=ze;De<ee.length;De++){const ct=ee[De]=Fe?sc(ee[De]):io(ee[De]);m(null,ct,ne,pe,$e,Ce,Pe,Ue,Fe)}},L=(ee,ne,pe,$e,Ce,Pe,Ue)=>{const Fe=ne.el=ee.el;let{patchFlag:ze,dynamicChildren:De,dirs:ct}=ne;ze|=ee.patchFlag&16;const Qe=ee.props||un,ot=ne.props||un;let be;if(pe&&iu(pe,!1),(be=ot.onVnodeBeforeUpdate)&&so(be,pe,ne,ee),ct&&fa(ne,ee,pe,"beforeUpdate"),pe&&iu(pe,!0),(Qe.innerHTML&&ot.innerHTML==null||Qe.textContent&&ot.textContent==null)&&u(Fe,""),De?I(ee.dynamicChildren,De,Fe,pe,$e,aw(ne,Ce),Pe):Ue||X(ee,ne,Fe,null,pe,$e,aw(ne,Ce),Pe,!1),ze>0){if(ze&16)V(Fe,Qe,ot,pe,Ce);else if(ze&2&&Qe.class!==ot.class&&o(Fe,"class",null,ot.class,Ce),ze&4&&o(Fe,"style",Qe.style,ot.style,Ce),ze&8){const me=ne.dynamicProps;for(let Me=0;Me<me.length;Me++){const Te=me[Me],gt=Qe[Te],Tt=ot[Te];(Tt!==gt||Te==="value")&&o(Fe,Te,gt,Tt,Ce,pe)}}ze&1&&ee.children!==ne.children&&u(Fe,ne.children)}else!Ue&&De==null&&V(Fe,Qe,ot,pe,Ce);((be=ot.onVnodeUpdated)||ct)&&$s(()=>{be&&so(be,pe,ne,ee),ct&&fa(ne,ee,pe,"updated")},$e)},I=(ee,ne,pe,$e,Ce,Pe,Ue)=>{for(let Fe=0;Fe<ne.length;Fe++){const ze=ee[Fe],De=ne[Fe],ct=ze.el&&(ze.type===te||!$r(ze,De)||ze.shapeFlag&198)?d(ze.el):pe;m(ze,De,ct,null,$e,Ce,Pe,Ue,!0)}},V=(ee,ne,pe,$e,Ce)=>{if(ne!==pe){if(ne!==un)for(const Pe in ne)!al(Pe)&&!(Pe in pe)&&o(ee,Pe,ne[Pe],null,Ce,$e);for(const Pe in pe){if(al(Pe))continue;const Ue=pe[Pe],Fe=ne[Pe];Ue!==Fe&&Pe!=="value"&&o(ee,Pe,Fe,Ue,Ce,$e)}"value"in pe&&o(ee,"value",ne.value,pe.value,Ce)}},R=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze)=>{const De=ne.el=ee?ee.el:a(""),ct=ne.anchor=ee?ee.anchor:a("");let{patchFlag:Qe,dynamicChildren:ot,slotScopeIds:be}=ne;be&&(Fe=Fe?Fe.concat(be):be),ee==null?(s(De,pe,$e),s(ct,pe,$e),T(ne.children||[],pe,ct,Ce,Pe,Ue,Fe,ze)):Qe>0&&Qe&64&&ot&&ee.dynamicChildren&&ee.dynamicChildren.length===ot.length?(I(ee.dynamicChildren,ot,pe,Ce,Pe,Ue,Fe),(ne.key!=null||Ce&&ne===Ce.subTree)&&IC(ee,ne,!0)):X(ee,ne,pe,ct,Ce,Pe,Ue,Fe,ze)},N=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze)=>{ne.slotScopeIds=Fe,ee==null?ne.shapeFlag&512?Ce.ctx.activate(ne,pe,$e,Ue,ze):F(ne,pe,$e,Ce,Pe,Ue,ze):B(ee,ne,ze)},F=(ee,ne,pe,$e,Ce,Pe,Ue)=>{const Fe=ee.component=NI(ee,$e,Ce);if(x1(ee)&&(Fe.ctx.renderer=re),zI(Fe,!1,Ue),Fe.asyncDep){if(Ce&&Ce.registerDep(Fe,G,Ue),!ee.el){const ze=Fe.subTree=y(Xn);_(null,ze,ne,pe),ee.placeholder=ze.el}}else G(Fe,ee,ne,pe,Ce,Pe,Ue)},B=(ee,ne,pe)=>{const $e=ne.component=ee.component;if(Iq(ee,ne,pe))if($e.asyncDep&&!$e.asyncResolved){q($e,ne,pe);return}else $e.next=ne,$e.update();else ne.el=ee.el,$e.vnode=ne},G=(ee,ne,pe,$e,Ce,Pe,Ue)=>{const Fe=()=>{if(ee.isMounted){let{next:Qe,bu:ot,u:be,parent:me,vnode:Me}=ee;{const ut=II(ee);if(ut){Qe&&(Qe.el=Me.el,q(ee,Qe,Ue)),ut.asyncDep.then(()=>{ee.isUnmounted||Fe()});return}}let Te=Qe,gt;iu(ee,!1),Qe?(Qe.el=Me.el,q(ee,Qe,Ue)):Qe=Me,ot&&qh(ot),(gt=Qe.props&&Qe.props.onVnodeBeforeUpdate)&&so(gt,me,Qe,Me),iu(ee,!0);const Tt=k0(ee),Xe=ee.subTree;ee.subTree=Tt,m(Xe,Tt,d(Xe.el),oe(Xe),ee,Ce,Pe),Qe.el=Tt.el,Te===null&&k_(ee,Tt.el),be&&$s(be,Ce),(gt=Qe.props&&Qe.props.onVnodeUpdated)&&$s(()=>so(gt,me,Qe,Me),Ce)}else{let Qe;const{el:ot,props:be}=ne,{bm:me,m:Me,parent:Te,root:gt,type:Tt}=ee,Xe=ll(ne);if(iu(ee,!1),me&&qh(me),!Xe&&(Qe=be&&be.onVnodeBeforeMount)&&so(Qe,Te,ne),iu(ee,!0),ot&&je){const ut=()=>{ee.subTree=k0(ee),je(ot,ee.subTree,ee,Ce,null)};Xe&&Tt.__asyncHydrate?Tt.__asyncHydrate(ot,ee,ut):ut()}else{gt.ce&&gt.ce._def.shadowRoot!==!1&&gt.ce._injectChildStyle(Tt);const ut=ee.subTree=k0(ee);m(null,ut,pe,$e,ee,Ce,Pe),ne.el=ut.el}if(Me&&$s(Me,Ce),!Xe&&(Qe=be&&be.onVnodeMounted)){const ut=ne;$s(()=>so(Qe,Te,ut),Ce)}(ne.shapeFlag&256||Te&&ll(Te.vnode)&&Te.vnode.shapeFlag&256)&&ee.a&&$s(ee.a,Ce),ee.isMounted=!0,ne=pe=$e=null}};ee.scope.on();const ze=ee.effect=new _g(Fe);ee.scope.off();const De=ee.update=ze.run.bind(ze),ct=ee.job=ze.runIfDirty.bind(ze);ct.i=ee,ct.id=ee.uid,ze.scheduler=()=>_C(ct),iu(ee,!0),De()},q=(ee,ne,pe)=>{ne.component=ee;const $e=ee.vnode.props;ee.vnode=ne,ee.next=null,Oq(ee,ne.props,$e,pe),Fq(ee,ne.children,pe),fl(),a9(ee),pl()},X=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze=!1)=>{const De=ee&&ee.children,ct=ee?ee.shapeFlag:0,Qe=ne.children,{patchFlag:ot,shapeFlag:be}=ne;if(ot>0){if(ot&128){H(De,Qe,pe,$e,Ce,Pe,Ue,Fe,ze);return}else if(ot&256){K(De,Qe,pe,$e,Ce,Pe,Ue,Fe,ze);return}}be&8?(ct&16&&ke(De,Ce,Pe),Qe!==De&&u(pe,Qe)):ct&16?be&16?H(De,Qe,pe,$e,Ce,Pe,Ue,Fe,ze):ke(De,Ce,Pe,!0):(ct&8&&u(pe,""),be&16&&T(Qe,pe,$e,Ce,Pe,Ue,Fe,ze))},K=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze)=>{ee=ee||Wh,ne=ne||Wh;const De=ee.length,ct=ne.length,Qe=Math.min(De,ct);let ot;for(ot=0;ot<Qe;ot++){const be=ne[ot]=ze?sc(ne[ot]):io(ne[ot]);m(ee[ot],be,pe,null,Ce,Pe,Ue,Fe,ze)}De>ct?ke(ee,Ce,Pe,!0,!1,Qe):T(ne,pe,$e,Ce,Pe,Ue,Fe,ze,Qe)},H=(ee,ne,pe,$e,Ce,Pe,Ue,Fe,ze)=>{let De=0;const ct=ne.length;let Qe=ee.length-1,ot=ct-1;for(;De<=Qe&&De<=ot;){const be=ee[De],me=ne[De]=ze?sc(ne[De]):io(ne[De]);if($r(be,me))m(be,me,pe,null,Ce,Pe,Ue,Fe,ze);else break;De++}for(;De<=Qe&&De<=ot;){const be=ee[Qe],me=ne[ot]=ze?sc(ne[ot]):io(ne[ot]);if($r(be,me))m(be,me,pe,null,Ce,Pe,Ue,Fe,ze);else break;Qe--,ot--}if(De>Qe){if(De<=ot){const be=ot+1,me=be<ct?ne[be].el:$e;for(;De<=ot;)m(null,ne[De]=ze?sc(ne[De]):io(ne[De]),pe,me,Ce,Pe,Ue,Fe,ze),De++}}else if(De>ot)for(;De<=Qe;)se(ee[De],Ce,Pe,!0),De++;else{const be=De,me=De,Me=new Map;for(De=me;De<=ot;De++){const Ie=ne[De]=ze?sc(ne[De]):io(ne[De]);Ie.key!=null&&Me.set(Ie.key,De)}let Te,gt=0;const Tt=ot-me+1;let Xe=!1,ut=0;const ft=new Array(Tt);for(De=0;De<Tt;De++)ft[De]=0;for(De=be;De<=Qe;De++){const Ie=ee[De];if(gt>=Tt){se(Ie,Ce,Pe,!0);continue}let ce;if(Ie.key!=null)ce=Me.get(Ie.key);else for(Te=me;Te<=ot;Te++)if(ft[Te-me]===0&&$r(Ie,ne[Te])){ce=Te;break}ce===void 0?se(Ie,Ce,Pe,!0):(ft[ce-me]=De+1,ce>=ut?ut=ce:Xe=!0,m(Ie,ne[ce],pe,null,Ce,Pe,Ue,Fe,ze),gt++)}const ye=Xe?Nq(ft):Wh;for(Te=ye.length-1,De=Tt-1;De>=0;De--){const Ie=me+De,ce=ne[Ie],Le=ne[Ie+1],pt=Ie+1<ct?Le.el||LI(Le):$e;ft[De]===0?m(null,ce,pe,pt,Ce,Pe,Ue,Fe,ze):Xe&&(Te<0||De!==ye[Te]?Q(ce,pe,pt,2):Te--)}}},Q=(ee,ne,pe,$e,Ce=null)=>{const{el:Pe,type:Ue,transition:Fe,children:ze,shapeFlag:De}=ee;if(De&6){Q(ee.component.subTree,ne,pe,$e);return}if(De&128){ee.suspense.move(ne,pe,$e);return}if(De&64){Ue.move(ee,ne,pe,re);return}if(Ue===te){s(Pe,ne,pe);for(let Qe=0;Qe<ze.length;Qe++)Q(ze[Qe],ne,pe,$e);s(ee.anchor,ne,pe);return}if(Ue===Hu){k(ee,ne,pe);return}if($e!==2&&De&1&&Fe)if($e===0)Fe.beforeEnter(Pe),s(Pe,ne,pe),$s(()=>Fe.enter(Pe),Ce);else{const{leave:Qe,delayLeave:ot,afterLeave:be}=Fe,me=()=>{ee.ctx.isUnmounted?i(Pe):s(Pe,ne,pe)},Me=()=>{Pe._isLeaving&&Pe[Ka](!0),Qe(Pe,()=>{me(),be&&be()})};ot?ot(Pe,me,Me):Me()}else s(Pe,ne,pe)},se=(ee,ne,pe,$e=!1,Ce=!1)=>{const{type:Pe,props:Ue,ref:Fe,children:ze,dynamicChildren:De,shapeFlag:ct,patchFlag:Qe,dirs:ot,cacheIndex:be}=ee;if(Qe===-2&&(Ce=!1),Fe!=null&&(fl(),Kh(Fe,null,pe,ee,!0),pl()),be!=null&&(ne.renderCache[be]=void 0),ct&256){ne.ctx.deactivate(ee);return}const me=ct&1&&ot,Me=!ll(ee);let Te;if(Me&&(Te=Ue&&Ue.onVnodeBeforeUnmount)&&so(Te,ne,ee),ct&6)ve(ee.component,pe,$e);else{if(ct&128){ee.suspense.unmount(pe,$e);return}me&&fa(ee,null,ne,"beforeUnmount"),ct&64?ee.type.remove(ee,ne,pe,re,$e):De&&!De.hasOnce&&(Pe!==te||Qe>0&&Qe&64)?ke(De,ne,pe,!1,!0):(Pe===te&&Qe&384||!Ce&&ct&16)&&ke(ze,ne,pe),$e&&Z(ee)}(Me&&(Te=Ue&&Ue.onVnodeUnmounted)||me)&&$s(()=>{Te&&so(Te,ne,ee),me&&fa(ee,null,ne,"unmounted")},pe)},Z=ee=>{const{type:ne,el:pe,anchor:$e,transition:Ce}=ee;if(ne===te){ae(pe,$e);return}if(ne===Hu){C(ee);return}const Pe=()=>{i(pe),Ce&&!Ce.persisted&&Ce.afterLeave&&Ce.afterLeave()};if(ee.shapeFlag&1&&Ce&&!Ce.persisted){const{leave:Ue,delayLeave:Fe}=Ce,ze=()=>Ue(pe,Pe);Fe?Fe(ee.el,Pe,ze):ze()}else Pe()},ae=(ee,ne)=>{let pe;for(;ee!==ne;)pe=h(ee),i(ee),ee=pe;i(ne)},ve=(ee,ne,pe)=>{const{bum:$e,scope:Ce,job:Pe,subTree:Ue,um:Fe,m:ze,a:De}=ee;Gy(ze),Gy(De),$e&&qh($e),Ce.stop(),Pe&&(Pe.flags|=8,se(Ue,ee,ne,pe)),Fe&&$s(Fe,ne),$s(()=>{ee.isUnmounted=!0},ne)},ke=(ee,ne,pe,$e=!1,Ce=!1,Pe=0)=>{for(let Ue=Pe;Ue<ee.length;Ue++)se(ee[Ue],ne,pe,$e,Ce)},oe=ee=>{if(ee.shapeFlag&6)return oe(ee.component.subTree);if(ee.shapeFlag&128)return ee.suspense.next();const ne=h(ee.anchor||ee.el),pe=ne&&ne[eI];return pe?h(pe):ne};let fe=!1;const ie=(ee,ne,pe)=>{let $e;ee==null?ne._vnode&&(se(ne._vnode,null,null,!0),$e=ne._vnode.component):m(ne._vnode||null,ee,ne,null,null,null,pe),ne._vnode=ee,fe||(fe=!0,a9($e),Wy(),fe=!1)},re={p:m,um:se,m:Q,r:Z,mt:F,mc:T,pc:X,pbc:I,n:oe,o:t};let Se,je;return e&&([Se,je]=e(re)),{render:ie,hydrate:Se,createApp:Sq(ie,Se)}}function aw({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function iu({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function PI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function IC(t,e,n=!1){const s=t.children,i=e.children;if(Ae(s)&&Ae(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=sc(i[o]),a.el=r.el),!n&&a.patchFlag!==-2&&IC(r,a)),a.type===va&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===te?1:0)),a.type===Xn&&!a.el&&(a.el=r.el)}}function Nq(t){const e=t.slice(),n=[0];let s,i,o,r,a;const l=t.length;for(s=0;s<l;s++){const c=t[s];if(c!==0){if(i=n[n.length-1],t[i]<c){e[s]=i,n.push(s);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,t[n[a]]<c?o=a+1:r=a;c<t[n[o]]&&(o>0&&(e[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function II(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:II(e)}function Gy(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function LI(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?LI(e.subTree):null}const Xy=t=>t.__isSuspense;let mx=0;const Bq={name:"Suspense",__isSuspense:!0,process(t,e,n,s,i,o,r,a,l,c){if(t==null)Hq(e,n,s,i,o,r,a,l,c);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}Uq(t,e,n,s,i,r,a,l,c)}},hydrate:jq,normalize:Wq},zq=Bq;function Ag(t,e){const n=t.props&&t.props[e];Je(n)&&n()}function Hq(t,e,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=OI(t,i,s,e,d,n,o,r,a,l);c(null,h.pendingBranch=t.ssContent,d,null,s,h,o,r),h.deps>0?(Ag(t,"onPending"),Ag(t,"onFallback"),c(null,t.ssFallback,e,n,s,null,o,r),Zh(h,t.ssFallback)):h.resolve(!1,!0)}function Uq(t,e,n,s,i,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:b,isHydrating:_}=d;if(m)d.pendingBranch=h,$r(m,h)?(l(m,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():b&&(_||(l(p,f,n,s,i,null,o,r,a),Zh(d,f)))):(d.pendingId=mx++,_?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():(l(p,f,n,s,i,null,o,r,a),Zh(d,f))):p&&$r(p,h)?(l(p,h,n,s,i,d,o,r,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0&&d.resolve()));else if(p&&$r(p,h))l(p,h,n,s,i,d,o,r,a),Zh(d,h);else if(Ag(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=mx++,l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:x,pendingId:k}=d;x>0?setTimeout(()=>{d.pendingId===k&&d.fallback(f)},x):x===0&&d.fallback(f)}}function OI(t,e,n,s,i,o,r,a,l,c,u=!1){const{p:d,m:h,um:f,n:p,o:{parentNode:m,remove:b}}=c;let _;const x=Yq(t);x&&e&&e.pendingBranch&&(_=e.pendingId,e.deps++);const k=t.props?zy(t.props.timeout):void 0,C=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:mx++,timeout:typeof k=="number"?k:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(E=!1,P=!1){const{vnode:T,activeBranch:L,pendingBranch:I,pendingId:V,effects:R,parentComponent:N,container:F,isInFallback:B}=S;let G=!1;S.isHydrating?S.isHydrating=!1:E||(G=L&&I.transition&&I.transition.mode==="out-in",G&&(L.transition.afterLeave=()=>{V===S.pendingId&&(h(I,F,o===C?p(L):o,0),kg(R),B&&T.ssFallback&&(T.ssFallback.el=null))}),L&&(m(L.el)===F&&(o=p(L)),f(L,N,S,!0),!G&&B&&T.ssFallback&&$s(()=>T.ssFallback.el=null,S)),G||h(I,F,o,0)),Zh(S,I),S.pendingBranch=null,S.isInFallback=!1;let q=S.parent,X=!1;for(;q;){if(q.pendingBranch){q.effects.push(...R),X=!0;break}q=q.parent}!X&&!G&&kg(R),S.effects=[],x&&e&&e.pendingBranch&&_===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Ag(T,"onResolve")},fallback(E){if(!S.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:L,container:I,namespace:V}=S;Ag(P,"onFallback");const R=p(T),N=()=>{S.isInFallback&&(d(null,E,I,R,L,null,V,a,l),Zh(S,E))},F=E.transition&&E.transition.mode==="out-in";F&&(T.transition.afterLeave=N),S.isInFallback=!0,f(T,L,null,!0),F||N()},move(E,P,T){S.activeBranch&&h(S.activeBranch,E,P,T),S.container=E},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(E,P,T){const L=!!S.pendingBranch;L&&S.deps++;const I=E.vnode.el;E.asyncDep.catch(V=>{Cd(V,E,0)}).then(V=>{if(E.isUnmounted||S.isUnmounted||S.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:R}=E;yx(E,V,!1),I&&(R.el=I);const N=!I&&E.subTree.el;P(E,R,m(I||E.subTree.el),I?null:p(E.subTree),S,r,T),N&&(R.placeholder=null,b(N)),k_(E,R.el),L&&--S.deps===0&&S.resolve()})},unmount(E,P){S.isUnmounted=!0,S.activeBranch&&f(S.activeBranch,n,E,P),S.pendingBranch&&f(S.pendingBranch,n,E,P)}};return S}function jq(t,e,n,s,i,o,r,a,l){const c=e.suspense=OI(e,s,n,t.parentNode,document.createElement("div"),null,i,o,r,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function Wq(t){const{shapeFlag:e,children:n}=t,s=e&32;t.ssContent=w9(s?n.default:n),t.ssFallback=s?w9(n.fallback):y(Xn)}function w9(t){let e;if(Je(t)){const n=od&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=ki,RI())}return Ae(t)&&(t=Mq(t)),t=io(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function DI(t,e){e&&e.pendingBranch?Ae(t)?e.effects.push(...t):e.effects.push(t):kg(t)}function Zh(t,e){t.activeBranch=e;const{vnode:n,parentComponent:s}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,k_(s,i))}function Yq(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const te=Symbol.for("v-fgt"),va=Symbol.for("v-txt"),Xn=Symbol.for("v-cmt"),Hu=Symbol.for("v-stc"),Um=[];let ki=null;function v(t=!1){Um.push(ki=t?null:[])}function RI(){Um.pop(),ki=Um[Um.length-1]||null}let od=1;function Eg(t,e=!1){od+=t,t<0&&ki&&e&&(ki.hasOnce=!0)}function VI(t){return t.dynamicChildren=od>0?ki||Wh:null,RI(),od>0&&ki&&ki.push(t),t}function A(t,e,n,s,i,o){return VI(g(t,e,n,s,i,o,!0))}function D(t,e,n,s,i){return VI(y(t,e,n,s,i,!0))}function is(t){return t?t.__v_isVNode===!0:!1}function $r(t,e){return t.type===e.type&&t.key===e.key}function qq(t){}const FI=({key:t})=>t??null,C0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||hn(t)||Je(t)?{i:ri,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,s=0,i=null,o=t===te?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&FI(e),ref:e&&C0(e),scopeId:y_,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:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ri};return a?(LC(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),od>0&&!r&&ki&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&ki.push(l),l}const y=Gq;function Gq(t,e=null,n=null,s=0,i=null,o=!1){if((!t||t===fI)&&(t=Xn),is(t)){const a=pr(t,e,!0);return n&&LC(a,n),od>0&&!o&&ki&&(a.shapeFlag&6?ki[ki.indexOf(t)]=a:ki.push(a)),a.patchFlag=-2,a}if(eG(t)&&(t=t.__vccOpts),e){e=Jh(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=U(a)),yt(l)&&(_1(l)&&!Ae(l)&&(l=on({},l)),e.style=qe(l))}const r=Ke(t)?1:Xy(t)?128:tI(t)?64:yt(t)?4:Je(t)?2:0;return g(t,e,n,s,i,r,o,!0)}function Jh(t){return t?_1(t)||xI(t)?on({},t):t:null}function pr(t,e,n=!1,s=!1){const{props:i,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?Kt(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&FI(c),ref:e&&e.ref?n&&o?Ae(o)?o.concat(C0(e)):[o,C0(e)]:C0(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==te?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&pr(t.ssContent),ssFallback:t.ssFallback&&pr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&gl(u,l.clone(u)),u}function Y(t=" ",e=0){return y(va,null,t,e)}function Pa(t,e){const n=y(Hu,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),D(Xn,null,t)):y(Xn,null,t)}function io(t){return t==null||typeof t=="boolean"?y(Xn):Ae(t)?y(te,null,t.slice()):is(t)?sc(t):y(va,null,String(t))}function sc(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:pr(t)}function LC(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(Ae(e))n=16;else if(typeof e=="object")if(s&65){const i=e.default;i&&(i._c&&(i._d=!1),LC(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!xI(e)?e._ctx=ri:i===3&&ri&&(ri.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Je(e)?(e={default:e,_ctx:ri},n=32):(e=String(e),s&64?(n=16,e=[Y(e)]):n=8);t.children=e,t.shapeFlag|=n}function Kt(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const i in s)if(i==="class")e.class!==s.class&&(e.class=U([e.class,s.class]));else if(i==="style")e.style=qe([e.style,s.style]);else if(xd(i)){const o=e[i],r=s[i];r&&o!==r&&!(Ae(o)&&o.includes(r))&&(e[i]=o?[].concat(o,r):r)}else i!==""&&(e[i]=s[i])}return e}function so(t,e,n,s=null){fr(t,e,7,[n,s])}const Xq=vI();let Kq=0;function NI(t,e,n){const s=t.type,i=(e?e.appContext:t.appContext)||Xq,o={uid:Kq++,vnode:t,type:s,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new pC(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:CI(s,i),emitsOptions:bI(s,i),emit:null,emitted:null,propsDefaults:un,inheritAttrs:s.inheritAttrs,ctx:un,data:un,props:un,attrs:un,slots:un,refs:un,setupState:un,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=Aq.bind(null,o),t.ce&&t.ce(o),o}let ni=null;const ht=()=>ni||ri;let Ky,gx;{const t=c_(),e=(n,s)=>{let i;return(i=t[n])||(i=t[n]=[]),i.push(s),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};Ky=e("__VUE_INSTANCE_SETTERS__",n=>ni=n),gx=e("__VUE_SSR_SETTERS__",n=>bf=n)}const rd=t=>{const e=ni;return Ky(t),t.scope.on(),()=>{t.scope.off(),Ky(e)}},vx=()=>{ni&&ni.scope.off(),Ky(null)};function BI(t){return t.vnode.shapeFlag&4}let bf=!1;function zI(t,e=!1,n=!1){e&&gx(e);const{props:s,children:i}=t.vnode,o=BI(t);Lq(t,s,o,e),Vq(t,i,n||e);const r=o?Zq(t,e):void 0;return e&&gx(!1),r}function Zq(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,dx);const{setup:s}=n;if(s){fl();const i=t.setupContext=s.length>1?jI(t):null,o=rd(t),r=np(s,t,0,[t.props,i]),a=sd(r);if(pl(),o(),(a||t.sp)&&!ll(t)&&kC(t),a){if(r.then(vx,vx),e)return r.then(l=>{yx(t,l,e)}).catch(l=>{Cd(l,t,0)});t.asyncDep=r}else yx(t,r,e)}else UI(t,e)}function yx(t,e,n){Je(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=bC(e)),UI(t,n)}let Zy,bx;function HI(t){Zy=t,bx=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,aq))}}const Jq=()=>!Zy;function UI(t,e,n){const s=t.type;if(!t.render){if(!e&&Zy&&!s.render){const i=s.template||MC(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=s,c=on(on({isCustomElement:o,delimiters:a},r),l);s.render=Zy(i,c)}}t.render=s.render||Lt,bx&&bx(t)}{const i=rd(t);fl();try{bq(t)}finally{pl(),i()}}}const Qq={get(t,e){return xi(t,"get",""),t[e]}};function jI(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,Qq),slots:t.slots,emit:t.emit,expose:e}}function k1(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(bC(Ai(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Hm)return Hm[n](t)},has(e,n){return n in e||n in Hm}})):t.proxy}function _x(t,e=!0){return Je(t)?t.displayName||t.name:t.name||e&&t.__name}function eG(t){return Je(t)&&"__vccOpts"in t}const z=(t,e)=>kY(t,e,bf);function vt(t,e,n){try{Eg(-1);const s=arguments.length;return s===2?yt(e)&&!Ae(e)?is(e)?y(t,null,[e]):y(t,e):y(t,null,e):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&is(n)&&(n=[n]),y(t,e,n))}finally{Eg(1)}}function tG(){}function nG(t,e,n,s){const i=n[s];if(i&&WI(i,t))return i;const o=e();return o.memo=t.slice(),o.cacheIndex=s,n[s]=o}function WI(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let s=0;s<n.length;s++)if(Di(n[s],e[s]))return!1;return od>0&&ki&&ki.push(t),!0}const YI="3.5.27",qI=Lt,sG=IY,iG=bh,oG=GP,rG={createComponentInstance:NI,setupComponent:zI,renderComponentRoot:k0,setCurrentRenderingInstance:Sg,isVNode:is,normalizeVNode:io,getComponentPublicInstance:k1,ensureValidVNode:EC,pushWarningContext:EY,popWarningContext:MY},aG=rG,lG=null,cG=null,uG=null;/**
16 * @vue/runtime-dom v3.5.27
17 * (c) 2018-present Yuxi (Evan) You and Vue contributors
18 * @license MIT
19 **/let wx;const x9=typeof window<"u"&&window.trustedTypes;if(x9)try{wx=x9.createPolicy("vue",{createHTML:t=>t})}catch{}const GI=wx?t=>wx.createHTML(t):t=>t,dG="http://www.w3.org/2000/svg",hG="http://www.w3.org/1998/Math/MathML",Ga=typeof document<"u"?document:null,k9=Ga&&Ga.createElement("template"),XI={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,s)=>{const i=e==="svg"?Ga.createElementNS(dG,t):e==="mathml"?Ga.createElementNS(hG,t):n?Ga.createElement(t,{is:n}):Ga.createElement(t);return t==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:t=>Ga.createTextNode(t),createComment:t=>Ga.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ga.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,s,i,o){const r=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{k9.innerHTML=GI(s==="svg"?`<svg>${t}</svg>`:s==="mathml"?`<math>${t}</math>`:t);const a=k9.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Ll="transition",Bp="animation",_f=Symbol("_vtc"),KI={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},ZI=on({},xC,KI),fG=t=>(t.displayName="Transition",t.props=ZI,t),Vo=fG((t,{slots:e})=>vt(rI,JI(t),e)),ou=(t,e=[])=>{Ae(t)?t.forEach(n=>n(...e)):t&&t(...e)},C9=t=>t?Ae(t)?t.some(e=>e.length>1):t.length>1:!1;function JI(t){const e={};for(const R in t)R in KI||(e[R]=t[R]);if(t.css===!1)return e;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=pG(i),m=p&&p[0],b=p&&p[1],{onBeforeEnter:_,onEnter:x,onEnterCancelled:k,onLeave:C,onLeaveCancelled:S,onBeforeAppear:E=_,onAppear:P=x,onAppearCancelled:T=k}=e,L=(R,N,F,B)=>{R._enterCancelled=B,Nl(R,N?u:a),Nl(R,N?c:r),F&&F()},I=(R,N)=>{R._isLeaving=!1,Nl(R,d),Nl(R,f),Nl(R,h),N&&N()},V=R=>(N,F)=>{const B=R?P:x,G=()=>L(N,R,F);ou(B,[N,G]),S9(()=>{Nl(N,R?l:o),ia(N,R?u:a),C9(B)||$9(N,s,m,G)})};return on(e,{onBeforeEnter(R){ou(_,[R]),ia(R,o),ia(R,r)},onBeforeAppear(R){ou(E,[R]),ia(R,l),ia(R,c)},onEnter:V(!1),onAppear:V(!0),onLeave(R,N){R._isLeaving=!0;const F=()=>I(R,N);ia(R,d),R._enterCancelled?(ia(R,h),xx(R)):(xx(R),ia(R,h)),S9(()=>{R._isLeaving&&(Nl(R,d),ia(R,f),C9(C)||$9(R,s,b,F))}),ou(C,[R,F])},onEnterCancelled(R){L(R,!1,void 0,!0),ou(k,[R])},onAppearCancelled(R){L(R,!0,void 0,!0),ou(T,[R])},onLeaveCancelled(R){I(R),ou(S,[R])}})}function pG(t){if(t==null)return null;if(yt(t))return[lw(t.enter),lw(t.leave)];{const e=lw(t);return[e,e]}}function lw(t){return zy(t)}function ia(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[_f]||(t[_f]=new Set)).add(e)}function Nl(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[_f];n&&(n.delete(e),n.size||(t[_f]=void 0))}function S9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let mG=0;function $9(t,e,n,s){const i=t._endId=++mG,o=()=>{i===t._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=QI(t,e);if(!r)return s();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,h),o()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,h)}function QI(t,e){const n=window.getComputedStyle(t),s=p=>(n[p]||"").split(", "),i=s(`${Ll}Delay`),o=s(`${Ll}Duration`),r=A9(i,o),a=s(`${Bp}Delay`),l=s(`${Bp}Duration`),c=A9(a,l);let u=null,d=0,h=0;e===Ll?r>0&&(u=Ll,d=r,h=o.length):e===Bp?c>0&&(u=Bp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Ll:Bp:null,h=u?u===Ll?o.length:l.length:0);const f=u===Ll&&/\b(?:transform|all)(?:,|$)/.test(s(`${Ll}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function A9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,s)=>E9(n)+E9(t[s])))}function E9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function xx(t){return(t?t.ownerDocument:document).body.offsetHeight}function gG(t,e,n){const s=t[_f];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Jy=Symbol("_vod"),eL=Symbol("_vsh"),jt={name:"show",beforeMount(t,{value:e},{transition:n}){t[Jy]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):zp(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:s}){!e!=!n&&(s?e?(s.beforeEnter(t),zp(t,!0),s.enter(t)):s.leave(t,()=>{zp(t,!1)}):zp(t,e))},beforeUnmount(t,{value:e}){zp(t,e)}};function zp(t,e){t.style.display=e?t[Jy]:"none",t[eL]=!e}function vG(){jt.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const tL=Symbol("");function yG(t){const e=ht();if(!e)return;const n=e.ut=(i=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o=>Qy(o,i))},s=()=>{const i=t(e.proxy);e.ce?Qy(e.ce,i):kx(e.subTree,i),n(i)};w_(()=>{kg(s)}),Vt(()=>{Ee(s,Lt,{flush:"post"});const i=new MutationObserver(s);i.observe(e.subTree.el.parentNode,{childList:!0}),xl(()=>i.disconnect())})}function kx(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{kx(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Qy(t.el,e);else if(t.type===te)t.children.forEach(n=>kx(n,e));else if(t.type===Hu){let{el:n,anchor:s}=t;for(;n&&(Qy(n,e),n!==s);)n=n.nextSibling}}function Qy(t,e){if(t.nodeType===1){const n=t.style;let s="";for(const i in e){const o=GW(e[i]);n.setProperty(`--${i}`,o),s+=`--${i}: ${o};`}n[tL]=s}}const bG=/(?:^|;)\s*display\s*:/;function _G(t,e,n){const s=t.style,i=Ke(n);let o=!1;if(n&&!i){if(e)if(Ke(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&S0(s,a,"")}else for(const r in e)n[r]==null&&S0(s,r,"");for(const r in n)r==="display"&&(o=!0),S0(s,r,n[r])}else if(i){if(e!==n){const r=s[tL];r&&(n+=";"+r),s.cssText=n,o=bG.test(n)}}else e&&t.removeAttribute("style");Jy in t&&(t[Jy]=o?s.display:"",t[eL]&&(s.display="none"))}const M9=/\s*!important$/;function S0(t,e,n){if(Ae(n))n.forEach(s=>S0(t,e,s));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=wG(t,e);M9.test(n)?t.setProperty(Vi(s),n.replace(M9,""),"important"):t[s]=n}}const T9=["Webkit","Moz","ms"],cw={};function wG(t,e){const n=cw[e];if(n)return n;let s=Jn(e);if(s!=="filter"&&s in t)return cw[e]=s;s=Uc(s);for(let i=0;i<T9.length;i++){const o=T9[i]+s;if(o in t)return cw[e]=o}return e}const P9="http://www.w3.org/1999/xlink";function I9(t,e,n,s,i,o=YW(e)){s&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(P9,e.slice(6,e.length)):t.setAttributeNS(P9,e,n):n==null||o&&!xP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":fo(n)?String(n):n)}function L9(t,e,n,s,i){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?GI(n):n);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let r=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=xP(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{t[e]=n}catch{}r&&t.removeAttribute(i||e)}function tl(t,e,n,s){t.addEventListener(e,n,s)}function xG(t,e,n,s){t.removeEventListener(e,n,s)}const O9=Symbol("_vei");function kG(t,e,n,s,i=null){const o=t[O9]||(t[O9]={}),r=o[e];if(s&&r)r.value=s;else{const[a,l]=CG(e);if(s){const c=o[e]=AG(s,i);tl(t,a,c,l)}else r&&(xG(t,a,r,l),o[e]=void 0)}}const D9=/(?:Once|Passive|Capture)$/;function CG(t){let e;if(D9.test(t)){e={};let s;for(;s=t.match(D9);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Vi(t.slice(2)),e]}let uw=0;const SG=Promise.resolve(),$G=()=>uw||(SG.then(()=>uw=0),uw=Date.now());function AG(t,e){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;fr(EG(s,n.value),e,5,[s])};return n.value=t,n.attached=$G(),n}function EG(t,e){if(Ae(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(s=>i=>!i._stopped&&s&&s(i))}else return e}const R9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,nL=(t,e,n,s,i,o)=>{const r=i==="svg";e==="class"?gG(t,s,r):e==="style"?_G(t,n,s):xd(e)?hC(e)||kG(t,e,n,s,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):MG(t,e,s,r))?(L9(t,e,s),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&I9(t,e,s,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ke(s))?L9(t,Jn(e),s,o,e):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),I9(t,e,s,r))};function MG(t,e,n,s){if(s)return!!(e==="innerHTML"||e==="textContent"||e in t&&R9(e)&&Je(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return R9(e)&&Ke(n)?!1:e in t}const V9={};function sL(t,e,n){let s=he(t,e);id(s)&&(s=on({},s,e));class i extends C_{constructor(r){super(s,r,n)}}return i.def=s,i}const TG=(t,e)=>sL(t,e,pL),PG=typeof HTMLElement<"u"?HTMLElement:class{};class C_ extends PG{constructor(e,n={},s=Mg){super(),this._def=e,this._props=n,this._createApp=s,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&s!==Mg?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(on({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof C_){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,st(()=>{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,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const n of e)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(s,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=s;let a;if(o&&!Ae(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=zy(this._props[l])),(a||(a=Object.create(null)))[Jn(l)]=!0)}this._numberProps=a,this._resolveProps(s),this.shadowRoot&&this._applyStyles(r),this._mount(s)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(s=>{s.configureApp=this._def.configureApp,e(this._def=s,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const s in n)Ft(this,s)||Object.defineProperty(this,s,{get:()=>M(n[s])})}_resolveProps(e){const{props:n}=e,s=Ae(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&s.includes(i)&&this._setProp(i,this[i]);for(const i of s.map(Jn))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(o){this._setProp(i,o,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let s=n?this.getAttribute(e):V9;const i=Jn(e);n&&this._numberProps&&this._numberProps[i]&&(s=zy(s)),this._setProp(i,s,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,s=!0,i=!1){if(n!==this._props[e]&&(this._dirty=!0,n===V9?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),s)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(Vi(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Vi(e),n+""):n||this.removeAttribute(Vi(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),Lc(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=y(this._def,on(e,this._props));return this._instance||(n.ce=s=>{this._instance=s,s.ce=this,s.isCE=!0;const i=(o,r)=>{this.dispatchEvent(new CustomEvent(o,id(r[0])?on({detail:r},r[0]):{detail:r}))};s.emit=(o,...r)=>{i(o,r),Vi(o)!==o&&i(Vi(o),r)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce;for(let i=e.length-1;i>=0;i--){const o=document.createElement("style");s&&o.setAttribute("nonce",s),o.textContent=e[i],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const s=n.nodeType===1&&n.getAttribute("slot")||"default";(e[s]||(e[s]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=this._getSlots(),n=this._instance.type.__scopeId;for(let s=0;s<e.length;s++){const i=e[s],o=i.getAttribute("name")||"default",r=this._slots[o],a=i.parentNode;if(r)for(const l of r){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,i)}else for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const n=new Set;for(const s of e){const i=s.querySelectorAll("slot");for(let o=0;o<i.length;o++)n.add(i[o])}return Array.from(n)}_injectChildStyle(e){this._applyStyles(e.styles,e)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(e){}}function iL(t){const e=ht(),n=e&&e.ce;return n||null}function IG(){const t=iL();return t&&t.shadowRoot}function LG(t="$style"){{const e=ht();if(!e)return un;const n=e.type.__cssModules;if(!n)return un;const s=n[t];return s||un}}const oL=new WeakMap,rL=new WeakMap,eb=Symbol("_moveCb"),F9=Symbol("_enterCb"),OG=t=>(delete t.props.mode,t),DG=OG({name:"TransitionGroup",props:on({},ZI,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=ht(),s=wC();let i,o;return wl(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!NG(i[0].el,n.vnode.el,r)){i=[];return}i.forEach(RG),i.forEach(VG);const a=i.filter(FG);xx(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;ia(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[eb]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[eb]=null,Nl(c,r))};c.addEventListener("transitionend",d)}),i=[]}),()=>{const r=nn(t),a=JI(r);let l=r.tag||te;if(i=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(i.push(u),gl(u,yf(u,a,s,n)),oL.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?b_(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&gl(u,yf(u,a,s,n))}return y(l,null,o)}}}),S_=DG;function RG(t){const e=t.el;e[eb]&&e[eb](),e[F9]&&e[F9]()}function VG(t){rL.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function FG(t){const e=oL.get(t),n=rL.get(t),s=e.left-n.left,i=e.top-n.top;if(s||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${i}px)`,o.transitionDuration="0s",t}}function NG(t,e,n){const s=t.cloneNode(),i=t[_f];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(s);const{hasTransform:r}=QI(s);return o.removeChild(s),r}const Ic=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ae(e)?n=>qh(e,n):e};function BG(t){t.target.composing=!0}function N9(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const lr=Symbol("_assign");function B9(t,e,n){return e&&(t=t.trim()),n&&(t=l_(t)),t}const wf={created(t,{modifiers:{lazy:e,trim:n,number:s}},i){t[lr]=Ic(i);const o=s||i.props&&i.props.type==="number";tl(t,e?"change":"input",r=>{r.target.composing||t[lr](B9(t.value,n,o))}),(n||o)&&tl(t,"change",()=>{t.value=B9(t.value,n,o)}),e||(tl(t,"compositionstart",BG),tl(t,"compositionend",N9),tl(t,"change",N9))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(t[lr]=Ic(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?l_(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(s&&e===n||i&&t.value.trim()===l)||(t.value=l))}},C1={deep:!0,created(t,e,n){t[lr]=Ic(n),tl(t,"change",()=>{const s=t._modelValue,i=xf(t),o=t.checked,r=t[lr];if(Ae(s)){const a=u_(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const c=[...s];c.splice(a,1),r(c)}}else if(kd(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(lL(t,o))})},mounted:z9,beforeUpdate(t,e,n){t[lr]=Ic(n),z9(t,e,n)}};function z9(t,{value:e,oldValue:n},s){t._modelValue=e;let i;if(Ae(e))i=u_(e,s.props.value)>-1;else if(kd(e))i=e.has(s.props.value);else{if(e===n)return;i=Tc(e,lL(t,!0))}t.checked!==i&&(t.checked=i)}const S1={created(t,{value:e},n){t.checked=Tc(e,n.props.value),t[lr]=Ic(n),tl(t,"change",()=>{t[lr](xf(t))})},beforeUpdate(t,{value:e,oldValue:n},s){t[lr]=Ic(s),e!==n&&(t.checked=Tc(e,s.props.value))}},aL={deep:!0,created(t,{value:e,modifiers:{number:n}},s){const i=kd(e);tl(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?l_(xf(r)):xf(r));t[lr](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,st(()=>{t._assigning=!1})}),t[lr]=Ic(s)},mounted(t,{value:e}){H9(t,e)},beforeUpdate(t,e,n){t[lr]=Ic(n)},updated(t,{value:e}){t._assigning||H9(t,e)}};function H9(t,e){const n=t.multiple,s=Ae(e);if(!(n&&!s&&!kd(e))){for(let i=0,o=t.options.length;i<o;i++){const r=t.options[i],a=xf(r);if(n)if(s){const l=typeof a;l==="string"||l==="number"?r.selected=e.some(c=>String(c)===String(a)):r.selected=u_(e,a)>-1}else r.selected=e.has(a);else if(Tc(xf(r),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function xf(t){return"_value"in t?t._value:t.value}function lL(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const cL={created(t,e,n){Fv(t,e,n,null,"created")},mounted(t,e,n){Fv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,s){Fv(t,e,n,s,"beforeUpdate")},updated(t,e,n,s){Fv(t,e,n,s,"updated")}};function uL(t,e){switch(t){case"SELECT":return aL;case"TEXTAREA":return wf;default:switch(e){case"checkbox":return C1;case"radio":return S1;default:return wf}}}function Fv(t,e,n,s,i){const r=uL(t.tagName,n.props&&n.props.type)[i];r&&r(t,e,n,s)}function zG(){wf.getSSRProps=({value:t})=>({value:t}),S1.getSSRProps=({value:t},e)=>{if(e.props&&Tc(e.props.value,t))return{checked:!0}},C1.getSSRProps=({value:t},e)=>{if(Ae(t)){if(e.props&&u_(t,e.props.value)>-1)return{checked:!0}}else if(kd(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},cL.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=uL(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const HG=["ctrl","shift","alt","meta"],UG={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>HG.some(n=>t[`${n}Key`]&&!e.includes(n))},Be=(t,e)=>{const n=t._withMods||(t._withMods={}),s=e.join(".");return n[s]||(n[s]=(i,...o)=>{for(let r=0;r<e.length;r++){const a=UG[e[r]];if(a&&a(i,e))return}return t(i,...o)})},jG={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nt=(t,e)=>{const n=t._withKeys||(t._withKeys={}),s=e.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=Vi(i.key);if(e.some(r=>r===o||jG[r]===o))return t(i)})},dL=on({patchProp:nL},XI);let jm,U9=!1;function hL(){return jm||(jm=EI(dL))}function fL(){return jm=U9?jm:MI(dL),U9=!0,jm}const Lc=(...t)=>{hL().render(...t)},WG=(...t)=>{fL().hydrate(...t)},Mg=(...t)=>{const e=hL().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=gL(s);if(!i)return;const o=e._component;!Je(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,mL(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e},pL=(...t)=>{const e=fL().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=gL(s);if(i)return n(i,!0,mL(i))},e};function mL(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function gL(t){return Ke(t)?document.querySelector(t):t}let j9=!1;const YG=()=>{j9||(j9=!0,zG(),vG())},qG=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:rI,BaseTransitionPropsValidators:xC,Comment:Xn,DeprecationTypes:uG,EffectScope:pC,ErrorCodes:PY,ErrorTypeStrings:sG,Fragment:te,KeepAlive:iq,ReactiveEffect:_g,Static:Hu,Suspense:zq,Teleport:Ta,Text:va,TrackOpTypes:CY,Transition:Vo,TransitionGroup:S_,TriggerOpTypes:SY,VueElement:C_,assertNumber:TY,callWithAsyncErrorHandling:fr,callWithErrorHandling:np,camelize:Jn,capitalize:Uc,cloneVNode:pr,compatUtils:cG,computed:z,createApp:Mg,createBlock:D,createCommentVNode:O,createElementBlock:A,createElementVNode:g,createHydrationRenderer:MI,createPropsRestProxy:vq,createRenderer:EI,createSSRApp:pL,createSlots:ks,createStaticVNode:Pa,createTextVNode:Y,createVNode:y,customRef:zP,defineAsyncComponent:nq,defineComponent:he,defineCustomElement:sL,defineEmits:cq,defineExpose:uq,defineModel:fq,defineOptions:dq,defineProps:lq,defineSSRCustomElement:TG,defineSlots:hq,devtools:iG,effect:KW,effectScope:d_,getCurrentInstance:ht,getCurrentScope:h_,getCurrentWatcher:$Y,getTransitionRawChildren:b_,guardReactiveProps:Jh,h:vt,handleError:Cd,hasInjectionContext:XP,hydrate:WG,hydrateOnIdle:KY,hydrateOnInteraction:eq,hydrateOnMediaQuery:QY,hydrateOnVisible:JY,initCustomFormatter:tG,initDirectivesForSSR:YG,inject:He,isMemoSame:WI,isProxy:_1,isReactive:Ir,isReadonly:wa,isRef:hn,isRuntimeOnly:Jq,isShallow:lo,isVNode:is,markRaw:Ai,mergeDefaults:mq,mergeModels:gq,mergeProps:Kt,nextTick:st,nodeOps:XI,normalizeClass:U,normalizeProps:Gh,normalizeStyle:qe,onActivated:CC,onBeforeMount:Sd,onBeforeUnmount:_n,onBeforeUpdate:w_,onDeactivated:SC,onErrorCaptured:hI,onMounted:Vt,onRenderTracked:dI,onRenderTriggered:uI,onScopeDispose:f_,onServerPrefetch:cI,onUnmounted:xl,onUpdated:wl,onWatcherCleanup:UP,openBlock:v,patchProp:nL,popScopeId:RY,provide:Et,proxyRefs:bC,pushScopeId:DY,queuePostFlushCb:kg,reactive:Dn,readonly:Pc,ref:J,registerRuntimeCompiler:HI,render:Lc,renderList:we,renderSlot:le,resolveComponent:W,resolveDirective:xt,resolveDynamicComponent:kt,resolveFilter:lG,resolveTransitionHooks:yf,setBlockTracking:Eg,setDevtoolsHook:oG,setTransitionHooks:gl,shallowReactive:yC,shallowReadonly:gY,shallowRef:Zn,ssrContextKey:KP,ssrUtils:aG,stop:ZW,toDisplayString:$,toHandlerKey:Nu,toHandlers:pI,toRaw:nn,toRef:Cn,toRefs:po,toValue:lx,transformVNodeArgs:qq,triggerRef:Bm,unref:M,useAttrs:sp,useCssModule:LG,useCssVars:yG,useHost:iL,useId:HY,useModel:$q,useSSRContext:ZP,useShadowRoot:IG,useSlots:Gi,useTemplateRef:UY,useTransitionState:wC,vModelCheckbox:C1,vModelDynamic:cL,vModelRadio:S1,vModelSelect:aL,vModelText:wf,vShow:jt,version:YI,warn:qI,watch:Ee,watchEffect:ml,watchPostEffect:FY,watchSyncEffect:JP,withAsyncContext:yq,withCtx:w,withDefaults:pq,withDirectives:Oe,withKeys:Nt,withMemo:nG,withModifiers:Be,withScopeId:VY},Symbol.toStringTag,{value:"Module"}));/**
20 * @vue/compiler-core v3.5.27
21 * (c) 2018-present Yuxi (Evan) You and Vue contributors
22 * @license MIT
23 **/const Tg=Symbol(""),Wm=Symbol(""),OC=Symbol(""),tb=Symbol(""),vL=Symbol(""),ad=Symbol(""),yL=Symbol(""),bL=Symbol(""),DC=Symbol(""),RC=Symbol(""),$1=Symbol(""),VC=Symbol(""),_L=Symbol(""),FC=Symbol(""),NC=Symbol(""),BC=Symbol(""),zC=Symbol(""),HC=Symbol(""),UC=Symbol(""),wL=Symbol(""),xL=Symbol(""),$_=Symbol(""),nb=Symbol(""),jC=Symbol(""),WC=Symbol(""),Pg=Symbol(""),A1=Symbol(""),YC=Symbol(""),Cx=Symbol(""),GG=Symbol(""),Sx=Symbol(""),sb=Symbol(""),XG=Symbol(""),KG=Symbol(""),qC=Symbol(""),ZG=Symbol(""),JG=Symbol(""),GC=Symbol(""),kL=Symbol(""),kf={[Tg]:"Fragment",[Wm]:"Teleport",[OC]:"Suspense",[tb]:"KeepAlive",[vL]:"BaseTransition",[ad]:"openBlock",[yL]:"createBlock",[bL]:"createElementBlock",[DC]:"createVNode",[RC]:"createElementVNode",[$1]:"createCommentVNode",[VC]:"createTextVNode",[_L]:"createStaticVNode",[FC]:"resolveComponent",[NC]:"resolveDynamicComponent",[BC]:"resolveDirective",[zC]:"resolveFilter",[HC]:"withDirectives",[UC]:"renderList",[wL]:"renderSlot",[xL]:"createSlots",[$_]:"toDisplayString",[nb]:"mergeProps",[jC]:"normalizeClass",[WC]:"normalizeStyle",[Pg]:"normalizeProps",[A1]:"guardReactiveProps",[YC]:"toHandlers",[Cx]:"camelize",[GG]:"capitalize",[Sx]:"toHandlerKey",[sb]:"setBlockTracking",[XG]:"pushScopeId",[KG]:"popScopeId",[qC]:"withCtx",[ZG]:"unref",[JG]:"isRef",[GC]:"withMemo",[kL]:"isMemoSame"};function QG(t){Object.getOwnPropertySymbols(t).forEach(e=>{kf[e]=t[e]})}const Fo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function eX(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Fo}}function Ig(t,e,n,s,i,o,r,a=!1,l=!1,c=!1,u=Fo){return t&&(a?(t.helper(ad),t.helper($f(t.inSSR,c))):t.helper(Sf(t.inSSR,c)),r&&t.helper(HC)),{type:13,tag:e,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Uu(t,e=Fo){return{type:17,loc:e,elements:t}}function or(t,e=Fo){return{type:15,loc:e,properties:t}}function Es(t,e){return{type:16,loc:Fo,key:Ke(t)?Ut(t,!0):t,value:e}}function Ut(t,e=!1,n=Fo,s=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:s}}function Lr(t,e=Fo){return{type:8,loc:e,children:t}}function Os(t,e=[],n=Fo){return{type:14,loc:n,callee:t,arguments:e}}function Cf(t,e=void 0,n=!1,s=!1,i=Fo){return{type:18,params:t,returns:e,newline:n,isSlot:s,loc:i}}function $x(t,e,n,s=!0){return{type:19,test:t,consequent:e,alternate:n,newline:s,loc:Fo}}function tX(t,e,n=!1,s=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:s,needArraySpread:!1,loc:Fo}}function nX(t){return{type:21,body:t,loc:Fo}}function Sf(t,e){return t||e?DC:RC}function $f(t,e){return t||e?yL:bL}function XC(t,{helper:e,removeHelper:n,inSSR:s}){t.isBlock||(t.isBlock=!0,n(Sf(s,t.isComponent)),e(ad),e($f(s,t.isComponent)))}const W9=new Uint8Array([123,123]),Y9=new Uint8Array([125,125]);function q9(t){return t>=97&&t<=122||t>=65&&t<=90}function So(t){return t===32||t===10||t===9||t===12||t===13}function Ol(t){return t===47||t===62||So(t)}function ib(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const gi={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class sX{constructor(e,n){this.stack=e,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=W9,this.delimiterClose=Y9,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=W9,this.delimiterClose=Y9}getPos(e){let n=1,s=e+1;const i=this.newlines.length;let o=-1;if(i>100){let r=-1,a=i;for(;r+1<a;){const l=r+a>>>1;this.newlines[l]<e?r=l:a=l}o=r}else for(let r=i-1;r>=0;r--)if(e>this.newlines[r]){o=r;break}return o>=0&&(n=o+2,s=e-this.newlines[o]),{column:s,line:n,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){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}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){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Ol(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||So(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const s=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=s}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===gi.TitleEnd||this.currentSequence===gi.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===gi.Cdata[this.sequenceIndex]?++this.sequenceIndex===gi.Cdata.length&&(this.state=28,this.currentSequence=gi.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===gi.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):q9(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Ol(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Ol(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(ib("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){So(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=q9(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||So(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):So(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):So(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Ol(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Ol(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||Ol(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||Ol(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Ol(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):So(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):So(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){So(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=gi.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===gi.ScriptEnd[3]?this.startSpecial(gi.ScriptEnd,4):e===gi.StyleEnd[3]?this.startSpecial(gi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===gi.TitleEnd[3]?this.startSpecial(gi.TitleEnd,4):e===gi.TextareaEnd[3]?this.startSpecial(gi.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===gi.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,n){}}function G9(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function ju(t,e){const n=G9("MODE",e),s=G9(t,e);return n===3?s===!0:s!==!1}function Lg(t,e,n,...s){return ju(t,e)}function KC(t){throw t}function CL(t){}function ss(t,e,n,s){const i=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(i));return o.code=t,o.loc=e,o}const ro=t=>t.type===4&&t.isStatic;function SL(t){switch(t){case"Teleport":case"teleport":return Wm;case"Suspense":case"suspense":return OC;case"KeepAlive":case"keep-alive":return tb;case"BaseTransition":case"base-transition":return vL}}const iX=/^$|^\d|[^\$\w\xA0-\uFFFF]/,ZC=t=>!iX.test(t),$L=/[A-Za-z_$\xA0-\uFFFF]/,oX=/[\.\?\w$\xA0-\uFFFF]/,rX=/\s+[.[]\s*|\s*[.[]\s+/g,AL=t=>t.type===4?t.content:t.loc.source,aX=t=>{const e=AL(t).trim().replace(rX,a=>a.trim());let n=0,s=[],i=0,o=0,r=null;for(let a=0;a<e.length;a++){const l=e.charAt(a);switch(n){case 0:if(l==="[")s.push(n),n=1,i++;else if(l==="(")s.push(n),n=2,o++;else if(!(a===0?$L:oX).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(s.push(n),n=3,r=l):l==="["?i++:l==="]"&&(--i||(n=s.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")s.push(n),n=3,r=l;else if(l==="(")o++;else if(l===")"){if(a===e.length-1)return!1;--o||(n=s.pop())}break;case 3:l===r&&(n=s.pop(),r=null);break}}return!i&&!o},EL=aX,lX=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,cX=t=>lX.test(AL(t)),uX=cX;function er(t,e,n=!1){for(let s=0;s<t.props.length;s++){const i=t.props[s];if(i.type===7&&(n||i.exp)&&(Ke(e)?i.name===e:e.test(i.name)))return i}}function A_(t,e,n=!1,s=!1){for(let i=0;i<t.props.length;i++){const o=t.props[i];if(o.type===6){if(n)continue;if(o.name===e&&(o.value||s))return o}else if(o.name==="bind"&&(o.exp||s)&&Au(o.arg,e))return o}}function Au(t,e){return!!(t&&ro(t)&&t.content===e)}function dX(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function dw(t){return t.type===5||t.type===2}function X9(t){return t.type===7&&t.name==="pre"}function hX(t){return t.type===7&&t.name==="slot"}function ob(t){return t.type===1&&t.tagType===3}function rb(t){return t.type===1&&t.tagType===2}const fX=new Set([Pg,A1]);function ML(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&fX.has(n))return ML(t.arguments[0],e.concat(t))}return[t,e]}function ab(t,e,n){let s,i=t.type===13?t.props:t.arguments[2],o=[],r;if(i&&!Ke(i)&&i.type===14){const a=ML(i);i=a[0],o=a[1],r=o[o.length-1]}if(i==null||Ke(i))s=or([e]);else if(i.type===14){const a=i.arguments[0];!Ke(a)&&a.type===15?K9(e,a)||a.properties.unshift(e):i.callee===YC?s=Os(n.helper(nb),[or([e]),i]):i.arguments.unshift(or([e])),!s&&(s=i)}else i.type===15?(K9(e,i)||i.properties.unshift(e),s=i):(s=Os(n.helper(nb),[or([e]),i]),r&&r.callee===A1&&(r=o[o.length-2]));t.type===13?r?r.arguments[0]=s:t.props=s:r?r.arguments[0]=s:t.arguments[2]=s}function K9(t,e){let n=!1;if(t.key.type===4){const s=t.key.content;n=e.properties.some(i=>i.key.type===4&&i.key.content===s)}return n}function Og(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,s)=>n==="-"?"_":t.charCodeAt(s).toString())}`}function pX(t){return t.type===14&&t.callee===GC?t.arguments[1].returns:t}const mX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function TL(t){for(let e=0;e<t.length;e++)if(!So(t.charCodeAt(e)))return!1;return!0}function JC(t){return t.type===2&&TL(t.content)||t.type===12&&JC(t.content)}function PL(t){return t.type===3||JC(t)}const IL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:zh,isPreTag:zh,isIgnoreNewlineTag:zh,isCustomElement:zh,onError:KC,onWarn:CL,comments:!1,prefixIdentifiers:!1};let $n=IL,Dg=null,cl="",wi=null,cn=null,eo="",Wa=-1,du=-1,QC=0,ic=!1,Ax=null;const cs=[],vs=new sX(cs,{onerr:Ha,ontext(t,e){Nv(Xs(t,e),t,e)},ontextentity(t,e,n){Nv(t,e,n)},oninterpolation(t,e){if(ic)return Nv(Xs(t,e),t,e);let n=t+vs.delimiterOpen.length,s=e-vs.delimiterClose.length;for(;So(cl.charCodeAt(n));)n++;for(;So(cl.charCodeAt(s-1));)s--;let i=Xs(n,s);i.includes("&")&&(i=$n.decodeEntities(i,!1)),Ex({type:5,content:A0(i,!1,_s(n,s)),loc:_s(t,e)})},onopentagname(t,e){const n=Xs(t,e);wi={type:1,tag:n,ns:$n.getNamespace(n,cs[0],$n.ns),tagType:0,props:[],children:[],loc:_s(t-1,e),codegenNode:void 0}},onopentagend(t){J9(t)},onclosetag(t,e){const n=Xs(t,e);if(!$n.isVoidTag(n)){let s=!1;for(let i=0;i<cs.length;i++)if(cs[i].tag.toLowerCase()===n.toLowerCase()){s=!0,i>0&&Ha(24,cs[0].loc.start.offset);for(let r=0;r<=i;r++){const a=cs.shift();$0(a,e,r<i)}break}s||Ha(23,LL(t,60))}},onselfclosingtag(t){const e=wi.tag;wi.isSelfClosing=!0,J9(t),cs[0]&&cs[0].tag===e&&$0(cs.shift(),t)},onattribname(t,e){cn={type:6,name:Xs(t,e),nameLoc:_s(t,e),value:void 0,loc:_s(t)}},ondirname(t,e){const n=Xs(t,e),s=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!ic&&s===""&&Ha(26,t),ic||s==="")cn={type:6,name:n,nameLoc:_s(t,e),value:void 0,loc:_s(t)};else if(cn={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Ut("prop")]:[],loc:_s(t)},s==="pre"){ic=vs.inVPre=!0,Ax=wi;const i=wi.props;for(let o=0;o<i.length;o++)i[o].type===7&&(i[o]=SX(i[o]))}},ondirarg(t,e){if(t===e)return;const n=Xs(t,e);if(ic&&!X9(cn))cn.name+=n,Eu(cn.nameLoc,e);else{const s=n[0]!=="[";cn.arg=A0(s?n:n.slice(1,-1),s,_s(t,e),s?3:0)}},ondirmodifier(t,e){const n=Xs(t,e);if(ic&&!X9(cn))cn.name+="."+n,Eu(cn.nameLoc,e);else if(cn.name==="slot"){const s=cn.arg;s&&(s.content+="."+n,Eu(s.loc,e))}else{const s=Ut(n,!0,_s(t,e));cn.modifiers.push(s)}},onattribdata(t,e){eo+=Xs(t,e),Wa<0&&(Wa=t),du=e},onattribentity(t,e,n){eo+=t,Wa<0&&(Wa=e),du=n},onattribnameend(t){const e=cn.loc.start.offset,n=Xs(e,t);cn.type===7&&(cn.rawName=n),wi.props.some(s=>(s.type===7?s.rawName:s.name)===n)&&Ha(2,e)},onattribend(t,e){if(wi&&cn){if(Eu(cn.loc,e),t!==0)if(eo.includes("&")&&(eo=$n.decodeEntities(eo,!0)),cn.type===6)cn.name==="class"&&(eo=DL(eo).trim()),t===1&&!eo&&Ha(13,e),cn.value={type:2,content:eo,loc:t===1?_s(Wa,du):_s(Wa-1,du+1)},vs.inSFCRoot&&wi.tag==="template"&&cn.name==="lang"&&eo&&eo!=="html"&&vs.enterRCDATA(ib("</template"),0);else{let n=0;cn.exp=A0(eo,!1,_s(Wa,du),0,n),cn.name==="for"&&(cn.forParseResult=vX(cn.exp));let s=-1;cn.name==="bind"&&(s=cn.modifiers.findIndex(i=>i.content==="sync"))>-1&&Lg("COMPILER_V_BIND_SYNC",$n,cn.loc,cn.arg.loc.source)&&(cn.name="model",cn.modifiers.splice(s,1))}(cn.type!==7||cn.name!=="pre")&&wi.props.push(cn)}eo="",Wa=du=-1},oncomment(t,e){$n.comments&&Ex({type:3,content:Xs(t,e),loc:_s(t-4,e+3)})},onend(){const t=cl.length;for(let e=0;e<cs.length;e++)$0(cs[e],t-1),Ha(24,cs[e].loc.start.offset)},oncdata(t,e){cs[0].ns!==0?Nv(Xs(t,e),t,e):Ha(1,t-9)},onprocessinginstruction(t){(cs[0]?cs[0].ns:$n.ns)===0&&Ha(21,t-1)}}),Z9=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,gX=/^\(|\)$/g;function vX(t){const e=t.loc,n=t.content,s=n.match(mX);if(!s)return;const[,i,o]=s,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return A0(d,!1,_s(p,m),0,f?1:0)},a={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=i.trim().replace(gX,"").trim();const c=i.indexOf(l),u=l.match(Z9);if(u){l=l.replace(Z9,"").trim();const d=u[1].trim();let h;if(d&&(h=n.indexOf(d,c+l.length),a.key=r(d,h,!0)),u[2]){const f=u[2].trim();f&&(a.index=r(f,n.indexOf(f,a.key?h+d.length:c+l.length),!0))}}return l&&(a.value=r(l,c,!0)),a}function Xs(t,e){return cl.slice(t,e)}function J9(t){vs.inSFCRoot&&(wi.innerLoc=_s(t+1,t+1)),Ex(wi);const{tag:e,ns:n}=wi;n===0&&$n.isPreTag(e)&&QC++,$n.isVoidTag(e)?$0(wi,t):(cs.unshift(wi),(n===1||n===2)&&(vs.inXML=!0)),wi=null}function Nv(t,e,n){{const o=cs[0]&&cs[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=$n.decodeEntities(t,!1))}const s=cs[0]||Dg,i=s.children[s.children.length-1];i&&i.type===2?(i.content+=t,Eu(i.loc,n)):s.children.push({type:2,content:t,loc:_s(e,n)})}function $0(t,e,n=!1){n?Eu(t.loc,LL(e,60)):Eu(t.loc,yX(e,62)+1),vs.inSFCRoot&&(t.children.length?t.innerLoc.end=on({},t.children[t.children.length-1].loc.end):t.innerLoc.end=on({},t.innerLoc.start),t.innerLoc.source=Xs(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:i,children:o}=t;if(ic||(s==="slot"?t.tagType=2:Q9(t)?t.tagType=3:_X(t)&&(t.tagType=1)),vs.inRCDATA||(t.children=OL(o)),i===0&&$n.isIgnoreNewlineTag(s)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}i===0&&$n.isPreTag(s)&&QC--,Ax===t&&(ic=vs.inVPre=!1,Ax=null),vs.inXML&&(cs[0]?cs[0].ns:$n.ns)===0&&(vs.inXML=!1);{const r=t.props;if(!vs.inSFCRoot&&ju("COMPILER_NATIVE_TEMPLATE",$n)&&t.tag==="template"&&!Q9(t)){const l=cs[0]||Dg,c=l.children.indexOf(t);l.children.splice(c,1,...t.children)}const a=r.find(l=>l.type===6&&l.name==="inline-template");a&&Lg("COMPILER_INLINE_TEMPLATE",$n,a.loc)&&t.children.length&&(a.value={type:2,content:Xs(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function yX(t,e){let n=t;for(;cl.charCodeAt(n)!==e&&n<cl.length-1;)n++;return n}function LL(t,e){let n=t;for(;cl.charCodeAt(n)!==e&&n>=0;)n--;return n}const bX=new Set(["if","else","else-if","for","slot"]);function Q9({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&bX.has(e[n].name))return!0}return!1}function _X({tag:t,props:e}){if($n.isCustomElement(t))return!1;if(t==="component"||wX(t.charCodeAt(0))||SL(t)||$n.isBuiltInComponent&&$n.isBuiltInComponent(t)||$n.isNativeTag&&!$n.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const s=e[n];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Lg("COMPILER_IS_ON_ELEMENT",$n,s.loc))return!0}}else if(s.name==="bind"&&Au(s.arg,"is")&&Lg("COMPILER_IS_ON_ELEMENT",$n,s.loc))return!0}return!1}function wX(t){return t>64&&t<91}const xX=/\r\n/g;function OL(t){const e=$n.whitespace!=="preserve";let n=!1;for(let s=0;s<t.length;s++){const i=t[s];if(i.type===2)if(QC)i.content=i.content.replace(xX,`
24 `);else if(TL(i.content)){const o=t[s-1]&&t[s-1].type,r=t[s+1]&&t[s+1].type;!o||!r||e&&(o===3&&(r===3||r===1)||o===1&&(r===3||r===1&&kX(i.content)))?(n=!0,t[s]=null):i.content=" "}else e&&(i.content=DL(i.content))}return n?t.filter(Boolean):t}function kX(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function DL(t){let e="",n=!1;for(let s=0;s<t.length;s++)So(t.charCodeAt(s))?n||(e+=" ",n=!0):(e+=t[s],n=!1);return e}function Ex(t){(cs[0]||Dg).children.push(t)}function _s(t,e){return{start:vs.getPos(t),end:e==null?e:vs.getPos(e),source:e==null?e:Xs(t,e)}}function CX(t){return _s(t.start.offset,t.end.offset)}function Eu(t,e){t.end=vs.getPos(e),t.source=Xs(t.start.offset,e)}function SX(t){const e={type:6,name:t.rawName,nameLoc:_s(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function A0(t,e=!1,n,s=0,i=0){return Ut(t,e,n,s)}function Ha(t,e,n){$n.onError(ss(t,_s(e,e)))}function $X(){vs.reset(),wi=null,cn=null,eo="",Wa=-1,du=-1,cs.length=0}function AX(t,e){if($X(),cl=t,$n=on({},IL),e){let i;for(i in e)e[i]!=null&&($n[i]=e[i])}vs.mode=$n.parseMode==="html"?1:$n.parseMode==="sfc"?2:0,vs.inXML=$n.ns===1||$n.ns===2;const n=e&&e.delimiters;n&&(vs.delimiterOpen=ib(n[0]),vs.delimiterClose=ib(n[1]));const s=Dg=eX([],t);return vs.parse(cl),s.loc=_s(0,t.length),s.children=OL(s.children),Dg=null,s}function EX(t,e){E0(t,void 0,e,!!RL(t))}function RL(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!rb(e[0])?e[0]:null}function E0(t,e,n,s=!1,i=!1){const{children:o}=t,r=[];for(let u=0;u<o.length;u++){const d=o[u];if(d.type===1&&d.tagType===0){const h=s?0:Ao(d,n);if(h>0){if(h>=2){d.codegenNode.patchFlag=-1,r.push(d);continue}}else{const f=d.codegenNode;if(f.type===13){const p=f.patchFlag;if((p===void 0||p===512||p===1)&&FL(d,n)>=2){const m=NL(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(s?0:Ao(d,n))>=2){d.codegenNode.type===14&&d.codegenNode.arguments.length>0&&d.codegenNode.arguments.push("-1"),r.push(d);continue}if(d.type===1){const h=d.tagType===1;h&&n.scopes.vSlot++,E0(d,t,n,!1,i),h&&n.scopes.vSlot--}else if(d.type===11)E0(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)E0(d.branches[h],t,n,d.branches[h].children.length===1,i)}let a=!1;if(r.length===o.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Ae(t.codegenNode.children))t.codegenNode.children=l(Uu(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ae(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Uu(u.returns)),a=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Ae(e.codegenNode.children)&&e.codegenNode.children.type===15){const u=er(t,"slot",!0),d=u&&u.arg&&c(e.codegenNode,u.arg);d&&(d.returns=l(Uu(d.returns)),a=!0)}}if(!a)for(const u of r)u.codegenNode=n.cache(u.codegenNode);function l(u){const d=n.cache(u);return d.needArraySpread=!0,d}function c(u,d){if(u.children&&!Ae(u.children)&&u.children.type===15){const h=u.children.properties.find(f=>f.key===d||f.key.content===d);return h&&h.value}}r.length&&n.transformHoist&&n.transformHoist(o,n,t)}function Ao(t,e){const{constantCache:n}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=n.get(t);if(s!==void 0)return s;const i=t.codegenNode;if(i.type!==13||i.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(i.patchFlag===void 0){let r=3;const a=FL(t,e);if(a===0)return n.set(t,0),0;a<r&&(r=a);for(let l=0;l<t.children.length;l++){const c=Ao(t.children[l],e);if(c===0)return n.set(t,0),0;c<r&&(r=c)}if(r>1)for(let l=0;l<t.props.length;l++){const c=t.props[l];if(c.type===7&&c.name==="bind"&&c.exp){const u=Ao(c.exp,e);if(u===0)return n.set(t,0),0;u<r&&(r=u)}}if(i.isBlock){for(let l=0;l<t.props.length;l++)if(t.props[l].type===7)return n.set(t,0),0;e.removeHelper(ad),e.removeHelper($f(e.inSSR,i.isComponent)),i.isBlock=!1,e.helper(Sf(e.inSSR,i.isComponent))}return n.set(t,r),r}else return n.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ao(t.content,e);case 4:return t.constType;case 8:let o=3;for(let r=0;r<t.children.length;r++){const a=t.children[r];if(Ke(a)||fo(a))continue;const l=Ao(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const MX=new Set([jC,WC,Pg,A1]);function VL(t,e){if(t.type===14&&!Ke(t.callee)&&MX.has(t.callee)){const n=t.arguments[0];if(n.type===4)return Ao(n,e);if(n.type===14)return VL(n,e)}return 0}function FL(t,e){let n=3;const s=NL(t);if(s&&s.type===15){const{properties:i}=s;for(let o=0;o<i.length;o++){const{key:r,value:a}=i[o],l=Ao(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=Ao(a,e):a.type===14?c=VL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function NL(t){const e=t.codegenNode;if(e.type===13)return e.props}function TX(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:s=!1,hmr:i=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Lt,isCustomElement:u=Lt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:b="",bindingMetadata:_=un,inline:x=!1,isTS:k=!1,onError:C=KC,onWarn:S=CL,compatConfig:E}){const P=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),T={filename:e,selfName:P&&Uc(Jn(P[1])),prefixIdentifiers:n,hoistStatic:s,hmr:i,cacheHandlers:o,nodeTransforms:r,directiveTransforms:a,transformHoist:l,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:h,slotted:f,ssr:p,inSSR:m,ssrCssVars:b,bindingMetadata:_,inline:x,isTS:k,onError:C,onWarn:S,compatConfig:E,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(L){const I=T.helpers.get(L)||0;return T.helpers.set(L,I+1),L},removeHelper(L){const I=T.helpers.get(L);if(I){const V=I-1;V?T.helpers.set(L,V):T.helpers.delete(L)}},helperString(L){return`_${kf[T.helper(L)]}`},replaceNode(L){T.parent.children[T.childIndex]=T.currentNode=L},removeNode(L){const I=T.parent.children,V=L?I.indexOf(L):T.currentNode?T.childIndex:-1;!L||L===T.currentNode?(T.currentNode=null,T.onNodeRemoved()):T.childIndex>V&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(V,1)},onNodeRemoved:Lt,addIdentifiers(L){},removeIdentifiers(L){},hoist(L){Ke(L)&&(L=Ut(L)),T.hoists.push(L);const I=Ut(`_hoisted_${T.hoists.length}`,!1,L.loc,2);return I.hoisted=L,I},cache(L,I=!1,V=!1){const R=tX(T.cached.length,L,I,V);return T.cached.push(R),R}};return T.filters=new Set,T}function PX(t,e){const n=TX(t,e);E_(t,n),e.hoistStatic&&EX(t,n),e.ssr||IX(t,n),t.helpers=new Set([...n.helpers.keys()]),t.components=[...n.components],t.directives=[...n.directives],t.imports=n.imports,t.hoists=n.hoists,t.temps=n.temps,t.cached=n.cached,t.transformed=!0,t.filters=[...n.filters]}function IX(t,e){const{helper:n}=e,{children:s}=t;if(s.length===1){const i=RL(t);if(i&&i.codegenNode){const o=i.codegenNode;o.type===13&&XC(o,e),t.codegenNode=o}else t.codegenNode=s[0]}else if(s.length>1){let i=64;t.codegenNode=Ig(e,n(Tg),void 0,t.children,i,void 0,void 0,!0,void 0,!1)}}function LX(t,e){let n=0;const s=()=>{n--};for(;n<t.children.length;n++){const i=t.children[n];Ke(i)||(e.grandParent=e.parent,e.parent=t,e.childIndex=n,e.onNodeRemoved=s,E_(i,e))}}function E_(t,e){e.currentNode=t;const{nodeTransforms:n}=e,s=[];for(let o=0;o<n.length;o++){const r=n[o](t,e);if(r&&(Ae(r)?s.push(...r):s.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper($1);break;case 5:e.ssr||e.helper($_);break;case 9:for(let o=0;o<t.branches.length;o++)E_(t.branches[o],e);break;case 10:case 11:case 1:case 0:LX(t,e);break}e.currentNode=t;let i=s.length;for(;i--;)s[i]()}function BL(t,e){const n=Ke(t)?s=>s===t:s=>t.test(s);return(s,i)=>{if(s.type===1){const{props:o}=s;if(s.tagType===3&&o.some(hX))return;const r=[];for(let a=0;a<o.length;a++){const l=o[a];if(l.type===7&&n(l.name)){o.splice(a,1),a--;const c=e(s,l,i);c&&r.push(c)}}return r}}}const M_="/*@__PURE__*/",zL=t=>`${kf[t]}: _${kf[t]}`;function OX(t,{mode:e="function",prefixIdentifiers:n=e==="module",sourceMap:s=!1,filename:i="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:h=!1}){const f={mode:e,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${kf[m]}`},push(m,b=-2,_){f.code+=m},indent(){p(++f.indentLevel)},deindent(m=!1){m?--f.indentLevel:p(--f.indentLevel)},newline(){p(f.indentLevel)}};function p(m){f.push(`
25 `+" ".repeat(m),0)}return f}function DX(t,e={}){const n=OX(t,e);e.onContextCreated&&e.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:a,newline:l,scopeId:c,ssr:u}=n,d=Array.from(t.helpers),h=d.length>0,f=!o&&s!=="module";RX(t,n);const m=u?"ssrRender":"render",_=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${m}(${_}) {`),r(),f&&(i("with (_ctx) {"),r(),h&&(i(`const { ${d.map(zL).join(", ")} } = _Vue
26 `,-1),l())),t.components.length&&(hw(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(hw(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),hw(t.filters,"filter",n),l()),t.temps>0){i("let ");for(let x=0;x<t.temps;x++)i(`${x>0?", ":""}_temp${x}`)}return(t.components.length||t.directives.length||t.temps)&&(i(`
27 `,0),l()),u||i("return "),t.codegenNode?Si(t.codegenNode,n):i("null"),f&&(a(),i("}")),a(),i("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function RX(t,e){const{ssr:n,prefixIdentifiers:s,push:i,newline:o,runtimeModuleName:r,runtimeGlobalName:a,ssrRuntimeModuleName:l}=e,c=a,u=Array.from(t.helpers);if(u.length>0&&(i(`const _Vue = ${c}
28 `,-1),t.hoists.length)){const d=[DC,RC,$1,VC,_L].filter(h=>u.includes(h)).map(zL).join(", ");i(`const { ${d} } = _Vue
29 `,-1)}VX(t.hoists,e),o(),i("return ")}function hw(t,e,{helper:n,push:s,newline:i,isTS:o}){const r=n(e==="filter"?zC:e==="component"?FC:BC);for(let a=0;a<t.length;a++){let l=t[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),s(`const ${Og(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&i()}}function VX(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:s}=e;s();for(let i=0;i<t.length;i++){const o=t[i];o&&(n(`const _hoisted_${i+1} = `),Si(o,e),s())}e.pure=!1}function e4(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),E1(t,e,n),n&&e.deindent(),e.push("]")}function E1(t,e,n=!1,s=!0){const{push:i,newline:o}=e;for(let r=0;r<t.length;r++){const a=t[r];Ke(a)?i(a,-3):Ae(a)?e4(a,e):Si(a,e),r<t.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function Si(t,e){if(Ke(t)){e.push(t,-3);return}if(fo(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:Si(t.codegenNode,e);break;case 2:FX(t,e);break;case 4:HL(t,e);break;case 5:NX(t,e);break;case 12:Si(t.codegenNode,e);break;case 8:UL(t,e);break;case 3:zX(t,e);break;case 13:HX(t,e);break;case 14:jX(t,e);break;case 15:WX(t,e);break;case 17:YX(t,e);break;case 18:qX(t,e);break;case 19:GX(t,e);break;case 20:XX(t,e);break;case 21:E1(t.body,e,!0,!1);break}}function FX(t,e){e.push(JSON.stringify(t.content),-3,t)}function HL(t,e){const{content:n,isStatic:s}=t;e.push(s?JSON.stringify(n):n,-3,t)}function NX(t,e){const{push:n,helper:s,pure:i}=e;i&&n(M_),n(`${s($_)}(`),Si(t.content,e),n(")")}function UL(t,e){for(let n=0;n<t.children.length;n++){const s=t.children[n];Ke(s)?e.push(s,-3):Si(s,e)}}function BX(t,e){const{push:n}=e;if(t.type===8)n("["),UL(t,e),n("]");else if(t.isStatic){const s=ZC(t.content)?t.content:JSON.stringify(t.content);n(s,-2,t)}else n(`[${t.content}]`,-3,t)}function zX(t,e){const{push:n,helper:s,pure:i}=e;i&&n(M_),n(`${s($1)}(${JSON.stringify(t.content)})`,-3,t)}function HX(t,e){const{push:n,helper:s,pure:i}=e,{tag:o,props:r,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:d,disableTracking:h,isComponent:f}=t;let p;l&&(p=String(l)),u&&n(s(HC)+"("),d&&n(`(${s(ad)}(${h?"true":""}), `),i&&n(M_);const m=d?$f(e.inSSR,f):Sf(e.inSSR,f);n(s(m)+"(",-2,t),E1(UX([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),Si(u,e),n(")"))}function UX(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function jX(t,e){const{push:n,helper:s,pure:i}=e,o=Ke(t.callee)?t.callee:s(t.callee);i&&n(M_),n(o+"(",-2,t),E1(t.arguments,e),n(")")}function WX(t,e){const{push:n,indent:s,deindent:i,newline:o}=e,{properties:r}=t;if(!r.length){n("{}",-2,t);return}const a=r.length>1||!1;n(a?"{":"{ "),a&&s();for(let l=0;l<r.length;l++){const{key:c,value:u}=r[l];BX(c,e),n(": "),Si(u,e),l<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}function YX(t,e){e4(t.elements,e)}function qX(t,e){const{push:n,indent:s,deindent:i}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${kf[qC]}(`),n("(",-2,t),Ae(o)?E1(o,e):o&&Si(o,e),n(") => "),(l||a)&&(n("{"),s()),r?(l&&n("return "),Ae(r)?e4(r,e):Si(r,e)):a&&Si(a,e),(l||a)&&(i(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function GX(t,e){const{test:n,consequent:s,alternate:i,newline:o}=t,{push:r,indent:a,deindent:l,newline:c}=e;if(n.type===4){const d=!ZC(n.content);d&&r("("),HL(n,e),d&&r(")")}else r("("),Si(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),Si(s,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=i.type===19;u||e.indentLevel++,Si(i,e),u||e.indentLevel--,o&&l(!0)}function XX(t,e){const{push:n,helper:s,indent:i,deindent:o,newline:r}=e,{needPauseTracking:a,needArraySpread:l}=t;l&&n("[...("),n(`_cache[${t.index}] || (`),a&&(i(),n(`${s(sb)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),Si(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${s(sb)}(1),`),r(),n(`_cache[${t.index}]`),o()),n(")"),l&&n(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const KX=BL(/^(?:if|else|else-if)$/,(t,e,n)=>ZX(t,e,n,(s,i,o)=>{const r=n.parent.children;let a=r.indexOf(s),l=0;for(;a-->=0;){const c=r[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)s.codegenNode=t7(i,l,n);else{const c=JX(s.codegenNode);c.alternate=t7(i,l+s.branches.length-1,n)}}}));function ZX(t,e,n,s){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const i=e.exp?e.exp.loc:t.loc;n.onError(ss(28,e.loc)),e.exp=Ut("true",!1,i)}if(e.name==="if"){const i=e7(t,e),o={type:9,loc:CX(t.loc),branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(t);for(;o-->=-1;){const r=i[o];if(r&&PL(r)){n.removeNode(r);continue}if(r&&r.type===9){(e.name==="else-if"||e.name==="else")&&r.branches[r.branches.length-1].condition===void 0&&n.onError(ss(30,t.loc)),n.removeNode();const a=e7(t,e);r.branches.push(a);const l=s&&s(r,a,!1);E_(a,n),l&&l(),n.currentNode=null}else n.onError(ss(30,t.loc));break}}}function e7(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!er(t,"for")?t.children:[t],userKey:A_(t,"key"),isTemplateIf:n}}function t7(t,e,n){return t.condition?$x(t.condition,n7(t,e,n),Os(n.helper($1),['""',"true"])):n7(t,e,n)}function n7(t,e,n){const{helper:s}=n,i=Es("key",Ut(`${e}`,!1,Fo,2)),{children:o}=t,r=o[0];if(o.length!==1||r.type!==1)if(o.length===1&&r.type===11){const l=r.codegenNode;return ab(l,i,n),l}else{let l=64;return Ig(n,s(Tg),or([i]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=pX(l);return c.type===13&&XC(c,n),ab(c,i,n),l}}function JX(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const QX=BL("for",(t,e,n)=>{const{helper:s,removeHelper:i}=n;return eK(t,e,n,o=>{const r=Os(s(UC),[o.source]),a=ob(t),l=er(t,"memo"),c=A_(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Ut(c.value.content,!0):void 0:c.exp);const d=c&&u?Es("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=Ig(n,s(Tg),void 0,r,f,void 0,void 0,!0,!h,!1,t.loc),()=>{let p;const{children:m}=o,b=m.length!==1||m[0].type!==1,_=rb(t)?t:a&&t.children.length===1&&rb(t.children[0])?t.children[0]:null;if(_?(p=_.codegenNode,a&&d&&ab(p,d,n)):b?p=Ig(n,s(Tg),d?or([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&ab(p,d,n),p.isBlock!==!h&&(p.isBlock?(i(ad),i($f(n.inSSR,p.isComponent))):i(Sf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(s(ad),s($f(n.inSSR,p.isComponent))):s(Sf(n.inSSR,p.isComponent))),l){const x=Cf(Mx(o.parseResult,[Ut("_cached")]));x.body=nX([Lr(["const _memo = (",l.exp,")"]),Lr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(kL)}(_cached, _memo)) return _cached`]),Lr(["const _item = ",p]),Ut("_item.memo = _memo"),Ut("return _item")]),r.arguments.push(x,Ut("_cache"),Ut(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Cf(Mx(o.parseResult),p,!0))}})});function eK(t,e,n,s){if(!e.exp){n.onError(ss(31,e.loc));return}const i=e.forParseResult;if(!i){n.onError(ss(32,e.loc));return}jL(i);const{addIdentifiers:o,removeIdentifiers:r,scopes:a}=n,{source:l,value:c,key:u,index:d}=i,h={type:11,loc:e.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:ob(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=s&&s(h);return()=>{a.vFor--,f&&f()}}function jL(t,e){t.finalized||(t.finalized=!0)}function Mx({value:t,key:e,index:n},s=[]){return tK([t,e,n,...s])}function tK(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,s)=>n||Ut("_".repeat(s+1),!1))}const s7=Ut("undefined",!1),nK=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=er(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},sK=(t,e,n,s)=>Cf(t,n,!1,!0,n.length?n[0].loc:s);function iK(t,e,n=sK){e.helper(qC);const{children:s,loc:i}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=er(t,"slot",!0);if(l){const{arg:b,exp:_}=l;b&&!ro(b)&&(a=!0),o.push(Es(b||Ut("default",!0),n(_,void 0,s,i)))}let c=!1,u=!1;const d=[],h=new Set;let f=0;for(let b=0;b<s.length;b++){const _=s[b];let x;if(!ob(_)||!(x=er(_,"slot",!0))){_.type!==3&&d.push(_);continue}if(l){e.onError(ss(37,x.loc));break}c=!0;const{children:k,loc:C}=_,{arg:S=Ut("default",!0),exp:E,loc:P}=x;let T;ro(S)?T=S?S.content:"default":a=!0;const L=er(_,"for"),I=n(E,L,k,C);let V,R;if(V=er(_,"if"))a=!0,r.push($x(V.exp,Bv(S,I,f++),s7));else if(R=er(_,/^else(?:-if)?$/,!0)){let N=b,F;for(;N--&&(F=s[N],!!PL(F)););if(F&&ob(F)&&er(F,/^(?:else-)?if$/)){let B=r[r.length-1];for(;B.alternate.type===19;)B=B.alternate;B.alternate=R.exp?$x(R.exp,Bv(S,I,f++),s7):Bv(S,I,f++)}else e.onError(ss(30,R.loc))}else if(L){a=!0;const N=L.forParseResult;N?(jL(N),r.push(Os(e.helper(UC),[N.source,Cf(Mx(N),Bv(S,I),!0)]))):e.onError(ss(32,L.loc))}else{if(T){if(h.has(T)){e.onError(ss(38,P));continue}h.add(T),T==="default"&&(u=!0)}o.push(Es(S,I))}}if(!l){const b=(_,x)=>{const k=n(_,void 0,x,i);return e.compatConfig&&(k.isNonScopedSlot=!0),Es("default",k)};c?d.length&&!d.every(JC)&&(u?e.onError(ss(39,d[0].loc)):o.push(b(void 0,d))):o.push(b(void 0,s))}const p=a?2:M0(t.children)?3:1;let m=or(o.concat(Es("_",Ut(p+"",!1))),i);return r.length&&(m=Os(e.helper(xL),[m,Uu(r)])),{slots:m,hasDynamicSlots:a}}function Bv(t,e,n){const s=[Es("name",t),Es("fn",e)];return n!=null&&s.push(Es("key",Ut(String(n),!0))),or(s)}function M0(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||M0(n.children))return!0;break;case 9:if(M0(n.branches))return!0;break;case 10:case 11:if(M0(n.children))return!0;break}}return!1}const WL=new WeakMap,oK=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:i}=t,o=t.tagType===1;let r=o?rK(t,e):`"${s}"`;const a=yt(r)&&r.callee===NC;let l,c,u=0,d,h,f,p=a||r===Wm||r===OC||!o&&(s==="svg"||s==="foreignObject"||s==="math");if(i.length>0){const m=YL(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const b=m.directives;f=b&&b.length?Uu(b.map(_=>lK(_,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===tb&&(p=!0,u|=1024),o&&r!==Wm&&r!==tb){const{slots:b,hasDynamicSlots:_}=iK(t,e);c=b,_&&(u|=1024)}else if(t.children.length===1&&r!==Wm){const b=t.children[0],_=b.type,x=_===5||_===8;x&&Ao(b,e)===0&&(u|=1),x||_===2?c=b:c=t.children}else c=t.children;h&&h.length&&(d=cK(h)),t.codegenNode=Ig(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function rK(t,e,n=!1){let{tag:s}=t;const i=Tx(s),o=A_(t,"is",!1,!0);if(o)if(i||ju("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Ut(o.value.content,!0):(a=o.exp,a||(a=Ut("is",!1,o.arg.loc))),a)return Os(e.helper(NC),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(s=o.value.content.slice(4));const r=SL(s)||e.isBuiltInComponent(s);return r?(n||e.helper(r),r):(e.helper(FC),e.components.add(s),Og(s,"component"))}function YL(t,e,n=t.props,s,i,o=!1){const{tag:r,loc:a,children:l}=t;let c=[];const u=[],d=[],h=l.length>0;let f=!1,p=0,m=!1,b=!1,_=!1,x=!1,k=!1,C=!1;const S=[],E=I=>{c.length&&(u.push(or(i7(c),a)),c=[]),I&&u.push(I)},P=()=>{e.scopes.vFor>0&&c.push(Es(Ut("ref_for",!0),Ut("true")))},T=({key:I,value:V})=>{if(ro(I)){const R=I.content,N=xd(R);if(N&&(!s||i)&&R.toLowerCase()!=="onclick"&&R!=="onUpdate:modelValue"&&!al(R)&&(x=!0),N&&al(R)&&(C=!0),N&&V.type===14&&(V=V.arguments[0]),V.type===20||(V.type===4||V.type===8)&&Ao(V,e)>0)return;R==="ref"?m=!0:R==="class"?b=!0:R==="style"?_=!0:R!=="key"&&!S.includes(R)&&S.push(R),s&&(R==="class"||R==="style")&&!S.includes(R)&&S.push(R)}else k=!0};for(let I=0;I<n.length;I++){const V=n[I];if(V.type===6){const{loc:R,name:N,nameLoc:F,value:B}=V;let G=!0;if(N==="ref"&&(m=!0,P()),N==="is"&&(Tx(r)||B&&B.content.startsWith("vue:")||ju("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(Es(Ut(N,!0,F),Ut(B?B.content:"",G,B?B.loc:R)))}else{const{name:R,arg:N,exp:F,loc:B,modifiers:G}=V,q=R==="bind",X=R==="on";if(R==="slot"){s||e.onError(ss(40,B));continue}if(R==="once"||R==="memo"||R==="is"||q&&Au(N,"is")&&(Tx(r)||ju("COMPILER_IS_ON_ELEMENT",e))||X&&o)continue;if((q&&Au(N,"key")||X&&h&&Au(N,"vue:before-update"))&&(f=!0),q&&Au(N,"ref")&&P(),!N&&(q||X)){if(k=!0,F)if(q){if(E(),ju("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(F);continue}P(),E(),u.push(F)}else E({type:14,loc:B,callee:e.helper(YC),arguments:s?[F]:[F,"true"]});else e.onError(ss(q?34:35,B));continue}q&&G.some(H=>H.content==="prop")&&(p|=32);const K=e.directiveTransforms[R];if(K){const{props:H,needRuntime:Q}=K(V,t,e);!o&&H.forEach(T),X&&N&&!ro(N)?E(or(H,a)):c.push(...H),Q&&(d.push(V),fo(Q)&&WL.set(V,Q))}else EW(R)||(d.push(V),h&&(f=!0))}}let L;if(u.length?(E(),u.length>1?L=Os(e.helper(nb),u,a):L=u[0]):c.length&&(L=or(i7(c),a)),k?p|=16:(b&&!s&&(p|=2),_&&!s&&(p|=4),S.length&&(p|=8),x&&(p|=32)),!f&&(p===0||p===32)&&(m||C||d.length>0)&&(p|=512),!e.inSSR&&L)switch(L.type){case 15:let I=-1,V=-1,R=!1;for(let B=0;B<L.properties.length;B++){const G=L.properties[B].key;ro(G)?G.content==="class"?I=B:G.content==="style"&&(V=B):G.isHandlerKey||(R=!0)}const N=L.properties[I],F=L.properties[V];R?L=Os(e.helper(Pg),[L]):(N&&!ro(N.value)&&(N.value=Os(e.helper(jC),[N.value])),F&&(_||F.value.type===4&&F.value.content.trim()[0]==="["||F.value.type===17)&&(F.value=Os(e.helper(WC),[F.value])));break;case 14:break;default:L=Os(e.helper(Pg),[Os(e.helper(A1),[L])]);break}return{props:L,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function i7(t){const e=new Map,n=[];for(let s=0;s<t.length;s++){const i=t[s];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const o=i.key.content,r=e.get(o);r?(o==="style"||o==="class"||xd(o))&&aK(r,i):(e.set(o,i),n.push(i))}return n}function aK(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Uu([t.value,e.value],t.loc)}function lK(t,e){const n=[],s=WL.get(t);s?n.push(e.helperString(s)):(e.helper(BC),e.directives.add(t.name),n.push(Og(t.name,"directive")));const{loc:i}=t;if(t.exp&&n.push(t.exp),t.arg&&(t.exp||n.push("void 0"),n.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||n.push("void 0"),n.push("void 0"));const o=Ut("true",!1,i);n.push(or(t.modifiers.map(r=>Es(r,o)),i))}return Uu(n,t.loc)}function cK(t){let e="[";for(let n=0,s=t.length;n<s;n++)e+=JSON.stringify(t[n]),n<s-1&&(e+=", ");return e+"]"}function Tx(t){return t==="component"||t==="Component"}const uK=(t,e)=>{if(rb(t)){const{children:n,loc:s}=t,{slotName:i,slotProps:o}=dK(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Cf([],n,!1,!1,s),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=Os(e.helper(wL),r,s)}};function dK(t,e){let n='"default"',s;const i=[];for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===6)r.value&&(r.name==="name"?n=JSON.stringify(r.value.content):(r.name=Jn(r.name),i.push(r)));else if(r.name==="bind"&&Au(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=Jn(r.arg.content);n=r.exp=Ut(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&ro(r.arg)&&(r.arg.content=Jn(r.arg.content)),i.push(r)}if(i.length>0){const{props:o,directives:r}=YL(t,e,i,!1,!1);s=o,r.length&&e.onError(ss(36,r[0].loc))}return{slotName:n,slotProps:s}}const qL=(t,e,n,s)=>{const{loc:i,modifiers:o,arg:r}=t;!t.exp&&!o.length&&n.onError(ss(35,i));let a;if(r.type===4)if(r.isStatic){let d=r.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const h=e.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?Nu(Jn(d)):`on:${d}`;a=Ut(h,!0,r.loc)}else a=Lr([`${n.helperString(Sx)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(Sx)}(`),a.children.push(")");let l=t.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const d=EL(l),h=!(d||uX(l)),f=l.content.includes(";");(h||c&&d)&&(l=Lr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[Es(a,l||Ut("() => {}",!1,i))]};return s&&(u=s(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(d=>d.key.isHandlerKey=!0),u},hK=(t,e,n)=>{const{modifiers:s,loc:i}=t,o=t.arg;let{exp:r}=t;return r&&r.type===4&&!r.content.trim()&&(r=void 0),o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(o.type===4?o.isStatic?o.content=Jn(o.content):o.content=`${n.helperString(Cx)}(${o.content})`:(o.children.unshift(`${n.helperString(Cx)}(`),o.children.push(")"))),n.inSSR||(s.some(a=>a.content==="prop")&&o7(o,"."),s.some(a=>a.content==="attr")&&o7(o,"^")),{props:[Es(o,r)]}},o7=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},fK=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const n=t.children;let s,i=!1;for(let o=0;o<n.length;o++){const r=n[o];if(dw(r)){i=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(dw(l))s||(s=n[o]=Lr([r],r.loc)),s.children.push(" + ",l),n.splice(a,1),a--;else{s=void 0;break}}}}if(!(!i||n.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(o=>o.type===7&&!e.directiveTransforms[o.name])&&t.tag!=="template")))for(let o=0;o<n.length;o++){const r=n[o];if(dw(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&Ao(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Os(e.helper(VC),a)}}}}},r7=new WeakSet,pK=(t,e)=>{if(t.type===1&&er(t,"once",!0))return r7.has(t)||e.inVOnce||e.inSSR?void 0:(r7.add(t),e.inVOnce=!0,e.helper(sb),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},GL=(t,e,n)=>{const{exp:s,arg:i}=t;if(!s)return n.onError(ss(41,t.loc)),Hp();const o=s.loc.source.trim(),r=s.type===4?s.content:o,a=n.bindingMetadata[o];if(a==="props"||a==="props-aliased")return n.onError(ss(44,s.loc)),Hp();if(a==="literal-const"||a==="setup-const")return n.onError(ss(45,s.loc)),Hp();if(!r.trim()||!EL(s))return n.onError(ss(42,s.loc)),Hp();const l=i||Ut("modelValue",!0),c=i?ro(i)?`onUpdate:${Jn(i.content)}`:Lr(['"onUpdate:" + ',i]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=Lr([`${d} => ((`,s,") = $event)"]);const h=[Es(l,t.exp),Es(c,u)];if(t.modifiers.length&&e.tagType===1){const f=t.modifiers.map(m=>m.content).map(m=>(ZC(m)?m:JSON.stringify(m))+": true").join(", "),p=i?ro(i)?`${i.content}Modifiers`:Lr([i,' + "Modifiers"']):"modelModifiers";h.push(Es(p,Ut(`{ ${f} }`,!1,t.loc,2)))}return Hp(h)};function Hp(t=[]){return{props:t}}const mK=/[\w).+\-_$\]]/,gK=(t,e)=>{ju("COMPILER_FILTERS",e)&&(t.type===5?lb(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&lb(n.exp,e)}))};function lb(t,e){if(t.type===4)a7(t,e);else for(let n=0;n<t.children.length;n++){const s=t.children[n];typeof s=="object"&&(s.type===4?a7(s,e):s.type===8?lb(t,e):s.type===5&&lb(s.content,e))}}function a7(t,e){const n=t.content;let s=!1,i=!1,o=!1,r=!1,a=0,l=0,c=0,u=0,d,h,f,p,m=[];for(f=0;f<n.length;f++)if(h=d,d=n.charCodeAt(f),s)d===39&&h!==92&&(s=!1);else if(i)d===34&&h!==92&&(i=!1);else if(o)d===96&&h!==92&&(o=!1);else if(r)d===47&&h!==92&&(r=!1);else if(d===124&&n.charCodeAt(f+1)!==124&&n.charCodeAt(f-1)!==124&&!a&&!l&&!c)p===void 0?(u=f+1,p=n.slice(0,f).trim()):b();else{switch(d){case 34:i=!0;break;case 39:s=!0;break;case 96:o=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(d===47){let _=f-1,x;for(;_>=0&&(x=n.charAt(_),x===" ");_--);(!x||!mK.test(x))&&(r=!0)}}p===void 0?p=n.slice(0,f).trim():u!==0&&b();function b(){m.push(n.slice(u,f).trim()),u=f+1}if(m.length){for(f=0;f<m.length;f++)p=vK(p,m[f],e);t.content=p,t.ast=void 0}}function vK(t,e,n){n.helper(zC);const s=e.indexOf("(");if(s<0)return n.filters.add(e),`${Og(e,"filter")}(${t})`;{const i=e.slice(0,s),o=e.slice(s+1);return n.filters.add(i),`${Og(i,"filter")}(${t}${o!==")"?","+o:o}`}}const l7=new WeakSet,yK=(t,e)=>{if(t.type===1){const n=er(t,"memo");return!n||l7.has(t)||e.inSSR?void 0:(l7.add(t),()=>{const s=t.codegenNode||e.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&XC(s,e),t.codegenNode=Os(e.helper(GC),[n.exp,Cf(void 0,s),"_cache",String(e.cached.length)]),e.cached.push(null))})}},bK=(t,e)=>{if(t.type===1){for(const n of t.props)if(n.type===7&&n.name==="bind"&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){const s=n.arg;if(s.type!==4||!s.isStatic)e.onError(ss(53,s.loc)),n.exp=Ut("",!0,s.loc);else{const i=Jn(s.content);($L.test(i[0])||i[0]==="-")&&(n.exp=Ut(i,!1,s.loc))}}}};function _K(t){return[[bK,pK,KX,yK,QX,gK,uK,oK,nK,fK],{on:qL,bind:hK,model:GL}]}function wK(t,e={}){const n=e.onError||KC,s=e.mode==="module";e.prefixIdentifiers===!0?n(ss(48)):s&&n(ss(49));const i=!1;e.cacheHandlers&&n(ss(50)),e.scopeId&&!s&&n(ss(51));const o=on({},e,{prefixIdentifiers:i}),r=Ke(t)?AX(t,o):t,[a,l]=_K();return PX(r,on({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:on({},l,e.directiveTransforms||{})})),DX(r,o)}const xK=()=>({props:[]});/**
30 * @vue/compiler-dom v3.5.27
31 * (c) 2018-present Yuxi (Evan) You and Vue contributors
32 * @license MIT
33 **/const XL=Symbol(""),KL=Symbol(""),ZL=Symbol(""),JL=Symbol(""),Px=Symbol(""),QL=Symbol(""),eO=Symbol(""),tO=Symbol(""),nO=Symbol(""),sO=Symbol("");QG({[XL]:"vModelRadio",[KL]:"vModelCheckbox",[ZL]:"vModelText",[JL]:"vModelSelect",[Px]:"vModelDynamic",[QL]:"withModifiers",[eO]:"withKeys",[tO]:"vShow",[nO]:"Transition",[sO]:"TransitionGroup"});let Qd;function kK(t,e=!1){return Qd||(Qd=document.createElement("div")),e?(Qd.innerHTML=`<div foo="${t.replace(/"/g,"&quot;")}">`,Qd.children[0].getAttribute("foo")):(Qd.innerHTML=t,Qd.textContent)}const CK={parseMode:"html",isVoidTag:jW,isNativeTag:t=>zW(t)||HW(t)||UW(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:kK,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return nO;if(t==="TransitionGroup"||t==="transition-group")return sO},getNamespace(t,e,n){let s=e?e.ns:n;if(e&&s===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else e&&s===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},SK=t=>{t.type===1&&t.props.forEach((e,n)=>{e.type===6&&e.name==="style"&&e.value&&(t.props[n]={type:7,name:"bind",arg:Ut("style",!0,e.loc),exp:$K(e.value.content,e.loc),modifiers:[],loc:e.loc})})},$K=(t,e)=>{const n=wP(t);return Ut(JSON.stringify(n),!1,e,3)};function wc(t,e){return ss(t,e)}const AK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(wc(54,i)),e.children.length&&(n.onError(wc(55,i)),e.children.length=0),{props:[Es(Ut("innerHTML",!0,i),s||Ut("",!0))]}},EK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(wc(56,i)),e.children.length&&(n.onError(wc(57,i)),e.children.length=0),{props:[Es(Ut("textContent",!0),s?Ao(s,n)>0?s:Os(n.helperString($_),[s],i):Ut("",!0))]}},MK=(t,e,n)=>{const s=GL(t,e,n);if(!s.props.length||e.tagType===1)return s;t.arg&&n.onError(wc(59,t.arg.loc));const{tag:i}=e,o=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let r=ZL,a=!1;if(i==="input"||o){const l=A_(e,"type");if(l){if(l.type===7)r=Px;else if(l.value)switch(l.value.content){case"radio":r=XL;break;case"checkbox":r=KL;break;case"file":a=!0,n.onError(wc(60,t.loc));break}}else dX(e)&&(r=Px)}else i==="select"&&(r=JL);a||(s.needRuntime=n.helper(r))}else n.onError(wc(58,t.loc));return s.props=s.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),s},TK=Ro("passive,once,capture"),PK=Ro("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),IK=Ro("left,right"),iO=Ro("onkeyup,onkeydown,onkeypress"),LK=(t,e,n,s)=>{const i=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Lg("COMPILER_V_ON_NATIVE",n)||TK(l)?r.push(l):IK(l)?ro(t)?iO(t.content.toLowerCase())?i.push(l):o.push(l):(i.push(l),o.push(l)):PK(l)?o.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}},c7=(t,e)=>ro(t)&&t.content.toLowerCase()==="onclick"?Ut(e,!0):t.type!==4?Lr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,OK=(t,e,n)=>qL(t,e,n,s=>{const{modifiers:i}=t;if(!i.length)return s;let{key:o,value:r}=s.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=LK(o,i,n,t.loc);if(l.includes("right")&&(o=c7(o,"onContextmenu")),l.includes("middle")&&(o=c7(o,"onMouseup")),l.length&&(r=Os(n.helper(QL),[r,JSON.stringify(l)])),a.length&&(!ro(o)||iO(o.content.toLowerCase()))&&(r=Os(n.helper(eO),[r,JSON.stringify(a)])),c.length){const u=c.map(Uc).join("");o=ro(o)?Ut(`${o.content}${u}`,!0):Lr(["(",o,`) + "${u}"`])}return{props:[Es(o,r)]}}),DK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(wc(62,i)),{props:[],needRuntime:n.helper(tO)}},RK=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},VK=[SK],FK={cloak:xK,html:AK,text:EK,model:MK,on:OK,show:DK};function NK(t,e={}){return wK(t,on({},CK,e,{nodeTransforms:[RK,...VK,...e.nodeTransforms||[]],directiveTransforms:on({},FK,e.directiveTransforms||{}),transformHoist:null}))}/**
34 * vue v3.5.27
35 * (c) 2018-present Yuxi (Evan) You and Vue contributors
36 * @license MIT
37 **/const u7=Object.create(null);function BK(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Lt;const n=PW(t,e),s=u7[n];if(s)return s;if(t[0]==="#"){const a=document.querySelector(t);t=a?a.innerHTML:""}const i=on({hoistStatic:!0,onError:void 0,onWarn:Lt},e);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=a=>!!customElements.get(a));const{code:o}=NK(t,i),r=new Function("Vue",o)(qG);return r._rc=!0,u7[n]=r}HI(BK);/*!
38 * vue-router v4.4.4
39 * (c) 2024 Eduardo San Martin Morote
40 * @license MIT
41 */const _h=typeof document<"u";function oO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function zK(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&oO(t.default)}const Ln=Object.assign;function fw(t,e){const n={};for(const s in e){const i=e[s];n[s]=Ur(i)?i.map(t):t(i)}return n}const Ym=()=>{},Ur=Array.isArray,rO=/#/g,HK=/&/g,UK=/\//g,jK=/=/g,WK=/\?/g,aO=/\+/g,YK=/%5B/g,qK=/%5D/g,lO=/%5E/g,GK=/%60/g,cO=/%7B/g,XK=/%7C/g,uO=/%7D/g,KK=/%20/g;function t4(t){return encodeURI(""+t).replace(XK,"|").replace(YK,"[").replace(qK,"]")}function ZK(t){return t4(t).replace(cO,"{").replace(uO,"}").replace(lO,"^")}function Ix(t){return t4(t).replace(aO,"%2B").replace(KK,"+").replace(rO,"%23").replace(HK,"%26").replace(GK,"`").replace(cO,"{").replace(uO,"}").replace(lO,"^")}function JK(t){return Ix(t).replace(jK,"%3D")}function QK(t){return t4(t).replace(rO,"%23").replace(WK,"%3F")}function eZ(t){return t==null?"":QK(t).replace(UK,"%2F")}function Rg(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const tZ=/\/$/,nZ=t=>t.replace(tZ,"");function pw(t,e,n="/"){let s,i={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),i=t(o)),a>-1&&(s=s||e.slice(0,a),r=e.slice(a,e.length)),s=rZ(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:Rg(r)}}function sZ(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function d7(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function iZ(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Af(e.matched[s],n.matched[i])&&dO(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Af(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function dO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!oZ(t[n],e[n]))return!1;return!0}function oZ(t,e){return Ur(t)?h7(t,e):Ur(e)?h7(e,t):t===e}function h7(t,e){return Ur(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function rZ(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r<s.length;r++)if(a=s[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r).join("/")}const Dl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Vg;(function(t){t.pop="pop",t.push="push"})(Vg||(Vg={}));var qm;(function(t){t.back="back",t.forward="forward",t.unknown=""})(qm||(qm={}));function aZ(t){if(!t)if(_h){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),nZ(t)}const lZ=/^[^#]+#/;function cZ(t,e){return t.replace(lZ,"#")+e}function uZ(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const T_=()=>({left:window.scrollX,top:window.scrollY});function dZ(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=uZ(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function f7(t,e){return(history.state?history.state.position-e:-1)+t}const Lx=new Map;function hZ(t,e){Lx.set(t,e)}function fZ(t){const e=Lx.get(t);return Lx.delete(t),e}let pZ=()=>location.protocol+"//"+location.host;function hO(t,e){const{pathname:n,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){let a=i.includes(t.slice(o))?t.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),d7(l,"")}return d7(n,t)+s+i}function mZ(t,e,n,s){let i=[],o=[],r=null;const a=({state:h})=>{const f=hO(t,location),p=n.value,m=e.value;let b=0;if(h){if(n.value=f,e.value=h,r&&r===p){r=null;return}b=m?h.position-m.position:0}else s(f);i.forEach(_=>{_(n.value,p,{delta:b,type:Vg.pop,direction:b?b>0?qm.forward:qm.back:qm.unknown})})};function l(){r=n.value}function c(h){i.push(h);const f=()=>{const p=i.indexOf(h);p>-1&&i.splice(p,1)};return o.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(Ln({},h.state,{scroll:T_()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function p7(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?T_():null}}function gZ(t){const{history:e,location:n}=window,s={value:hO(t,n)},i={value:e.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:pZ()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),i.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function r(l,c){const u=Ln({},e.state,p7(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),s.value=l}function a(l,c){const u=Ln({},i.value,e.state,{forward:l,scroll:T_()});o(u.current,u,!0);const d=Ln({},p7(s.value,l,null),{position:u.position+1},c);o(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:r}}function fO(t){t=aZ(t);const e=gZ(t),n=mZ(t,e.state,e.location,e.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=Ln({location:"",base:t,go:s,createHref:cZ.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function vZ(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),fO(t)}function yZ(t){return typeof t=="string"||t&&typeof t=="object"}function pO(t){return typeof t=="string"||typeof t=="symbol"}const mO=Symbol("");var m7;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(m7||(m7={}));function Ef(t,e){return Ln(new Error,{type:t,[mO]:!0},e)}function Ua(t,e){return t instanceof Error&&mO in t&&(e==null||!!(t.type&e))}const g7="[^/]+?",bZ={sensitive:!1,strict:!1,start:!0,end:!0},_Z=/[.+*?^${}()[\]/\\]/g;function wZ(t,e){const n=Ln({},bZ,e),s=[];let i=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=40+(n.sensitive?.25:0);if(h.type===0)d||(i+="/"),i+=h.value.replace(_Z,"\\$&"),f+=40;else if(h.type===1){const{value:p,repeatable:m,optional:b,regexp:_}=h;o.push({name:p,repeatable:m,optional:b});const x=_||g7;if(x!==g7){f+=10;try{new RegExp(`(${x})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${p}" (${x}): `+C.message)}}let k=m?`((?:${x})(?:/(?:${x}))*)`:`(${x})`;d||(k=b&&c.length<2?`(?:/${k})`:"/"+k),b&&(k+="?"),i+=k,f+=20,b&&(f+=-8),m&&(f+=-20),x===".*"&&(f+=-50)}u.push(f)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const r=new RegExp(i,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",p=o[h-1];d[p.name]=f&&p.repeatable?f.split("/"):f}return d}function l(c){let u="",d=!1;for(const h of t){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:p,repeatable:m,optional:b}=f,_=p in c?c[p]:"";if(Ur(_)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const x=Ur(_)?_.join("/"):_;if(!x)if(b)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=x}}return u||"/"}return{re:r,score:s,keys:o,parse:a,stringify:l}}function xZ(t,e){let n=0;for(;n<t.length&&n<e.length;){const s=e[n]-t[n];if(s)return s;n++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function gO(t,e){let n=0;const s=t.score,i=e.score;for(;n<s.length&&n<i.length;){const o=xZ(s[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-s.length)===1){if(v7(s))return 1;if(v7(i))return-1}return i.length-s.length}function v7(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const kZ={type:0,value:""},CZ=/[a-zA-Z0-9_]/;function SZ(t){if(!t)return[[]];if(t==="/")return[[kZ]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,s=n;const i=[];let o;function r(){o&&i.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):h();break;case 4:h(),n=s;break;case 1:l==="("?n=2:CZ.test(l)?h():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),d(),r(),i}function $Z(t,e,n){const s=wZ(SZ(t.path),n),i=Ln(s,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function AZ(t,e){const n=[],s=new Map;e=_7({strict:!1,end:!0,sensitive:!1},e);function i(d){return s.get(d)}function o(d,h,f){const p=!f,m=EZ(d);m.aliasOf=f&&f.record;const b=_7(e,d),_=[m];if("alias"in d){const C=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of C)_.push(Ln({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let x,k;for(const C of _){const{path:S}=C;if(h&&S[0]!=="/"){const E=h.record.path,P=E[E.length-1]==="/"?"":"/";C.path=h.record.path+(S&&P+S)}if(x=$Z(C,h,b),f?f.alias.push(x):(k=k||x,k!==x&&k.alias.push(x),p&&d.name&&!b7(x)&&r(d.name)),vO(x)&&l(x),m.children){const E=m.children;for(let P=0;P<E.length;P++)o(E[P],x,f&&f.children[P])}f=f||x}return k?()=>{r(k)}:Ym}function r(d){if(pO(d)){const h=s.get(d);h&&(s.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(r),h.alias.forEach(r))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&s.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function a(){return n}function l(d){const h=PZ(d,n);n.splice(h,0,d),d.record.name&&!b7(d)&&s.set(d.record.name,d)}function c(d,h){let f,p={},m,b;if("name"in d&&d.name){if(f=s.get(d.name),!f)throw Ef(1,{location:d});b=f.record.name,p=Ln(y7(h.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),d.params&&y7(d.params,f.keys.map(k=>k.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(k=>k.re.test(m)),f&&(p=f.parse(m),b=f.record.name);else{if(f=h.name?s.get(h.name):n.find(k=>k.re.test(h.path)),!f)throw Ef(1,{location:d,currentLocation:h});b=f.record.name,p=Ln({},h.params,d.params),m=f.stringify(p)}const _=[];let x=f;for(;x;)_.unshift(x.record),x=x.parent;return{name:b,path:m,params:p,matched:_,meta:TZ(_)}}t.forEach(d=>o(d));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function y7(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function EZ(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:MZ(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},mods:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function MZ(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function b7(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function TZ(t){return t.reduce((e,n)=>Ln(e,n.meta),{})}function _7(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function PZ(t,e){let n=0,s=e.length;for(;n!==s;){const o=n+s>>1;gO(t,e[o])<0?s=o:n=o+1}const i=IZ(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function IZ(t){let e=t;for(;e=e.parent;)if(vO(e)&&gO(t,e)===0)return e}function vO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function LZ(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<s.length;++i){const o=s[i].replace(aO," "),r=o.indexOf("="),a=Rg(r<0?o:o.slice(0,r)),l=r<0?null:Rg(o.slice(r+1));if(a in e){let c=e[a];Ur(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function w7(t){let e="";for(let n in t){const s=t[n];if(n=JK(n),s==null){s!==void 0&&(e+=(e.length?"&":"")+n);continue}(Ur(s)?s.map(o=>o&&Ix(o)):[s&&Ix(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function OZ(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=Ur(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const DZ=Symbol(""),x7=Symbol(""),n4=Symbol(""),yO=Symbol(""),Ox=Symbol("");function Up(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function oc(t,e,n,s,i,o=r=>r()){const r=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Ef(4,{from:n,to:e})):h instanceof Error?l(h):yZ(h)?l(Ef(2,{from:e,to:h})):(r&&s.enterCallbacks[i]===r&&typeof h=="function"&&r.push(h),a())},u=o(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function mw(t,e,n,s,i=o=>o()){const o=[];for(const r of t)for(const a in r.components){let l=r.components[a];if(!(e!=="beforeRouteEnter"&&!r.instances[a]))if(oO(l)){const u=(l.__vccOpts||l)[e];u&&o.push(oc(u,n,s,r,a,i))}else{let c=l();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);const d=zK(u)?u.default:u;r.mods[a]=u,r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&oc(f,n,s,r,a,i)()}))}}return o}function k7(t){const e=He(n4),n=He(yO),s=z(()=>{const l=M(t.to);return e.resolve(l)}),i=z(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(Af.bind(null,u));if(h>-1)return h;const f=C7(l[c-2]);return c>1&&C7(u)===f&&d[d.length-1].path!==f?d.findIndex(Af.bind(null,l[c-2])):h}),o=z(()=>i.value>-1&&NZ(n.params,s.value.params)),r=z(()=>i.value>-1&&i.value===n.matched.length-1&&dO(n.params,s.value.params));function a(l={}){return FZ(l)?e[M(t.replace)?"replace":"push"](M(t.to)).catch(Ym):Promise.resolve()}return{route:s,href:z(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const RZ=he({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:k7,setup(t,{slots:e}){const n=Dn(k7(t)),{options:s}=He(n4),i=z(()=>({[S7(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[S7(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:vt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),VZ=RZ;function FZ(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function NZ(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!Ur(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function C7(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const S7=(t,e,n)=>t??e??n,BZ=he({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=He(Ox),i=z(()=>t.route||s.value),o=He(x7,0),r=z(()=>{let c=M(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=z(()=>i.value.matched[r.value]);Et(x7,z(()=>r.value+1)),Et(DZ,a),Et(Ox,i);const l=J();return Ee(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!Af(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return $7(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,b=vt(h,Ln({},p,e,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return $7(n.default,{Component:b,route:c})||b}}});function $7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const zZ=BZ;function A7(t){const e=AZ(t.routes,t),n=t.parseQuery||LZ,s=t.stringifyQuery||w7,i=t.history,o=Up(),r=Up(),a=Up(),l=Zn(Dl);let c=Dl;_h&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=fw.bind(null,oe=>""+oe),d=fw.bind(null,eZ),h=fw.bind(null,Rg);function f(oe,fe){let ie,re;return pO(oe)?(ie=e.getRecordMatcher(oe),re=fe):re=oe,e.addRoute(re,ie)}function p(oe){const fe=e.getRecordMatcher(oe);fe&&e.removeRoute(fe)}function m(){return e.getRoutes().map(oe=>oe.record)}function b(oe){return!!e.getRecordMatcher(oe)}function _(oe,fe){if(fe=Ln({},fe||l.value),typeof oe=="string"){const ne=pw(n,oe,fe.path),pe=e.resolve({path:ne.path},fe),$e=i.createHref(ne.fullPath);return Ln(ne,pe,{params:h(pe.params),hash:Rg(ne.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=Ln({},oe,{path:pw(n,oe.path,fe.path).path});else{const ne=Ln({},oe.params);for(const pe in ne)ne[pe]==null&&delete ne[pe];ie=Ln({},oe,{params:d(ne)}),fe.params=d(fe.params)}const re=e.resolve(ie,fe),Se=oe.hash||"";re.params=u(h(re.params));const je=sZ(s,Ln({},oe,{hash:ZK(Se),path:re.path})),ee=i.createHref(je);return Ln({fullPath:je,hash:Se,query:s===w7?OZ(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:ee})}function x(oe){return typeof oe=="string"?pw(n,oe,l.value.path):Ln({},oe)}function k(oe,fe){if(c!==oe)return Ef(8,{from:fe,to:oe})}function C(oe){return P(oe)}function S(oe){return C(Ln(x(oe),{replace:!0}))}function E(oe){const fe=oe.matched[oe.matched.length-1];if(fe&&fe.redirect){const{redirect:ie}=fe;let re=typeof ie=="function"?ie(oe):ie;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=x(re):{path:re},re.params={}),Ln({query:oe.query,hash:oe.hash,params:re.path!=null?{}:oe.params},re)}}function P(oe,fe){const ie=c=_(oe),re=l.value,Se=oe.state,je=oe.force,ee=oe.replace===!0,ne=E(ie);if(ne)return P(Ln(x(ne),{state:typeof ne=="object"?Ln({},Se,ne.state):Se,force:je,replace:ee}),fe||ie);const pe=ie;pe.redirectedFrom=fe;let $e;return!je&&iZ(s,re,ie)&&($e=Ef(16,{to:pe,from:re}),Q(re,re,!0,!1)),($e?Promise.resolve($e):I(pe,re)).catch(Ce=>Ua(Ce)?Ua(Ce,2)?Ce:H(Ce):X(Ce,pe,re)).then(Ce=>{if(Ce){if(Ua(Ce,2))return P(Ln({replace:ee},x(Ce.to),{state:typeof Ce.to=="object"?Ln({},Se,Ce.to.state):Se,force:je}),fe||pe)}else Ce=R(pe,re,!0,ee,Se);return V(pe,re,Ce),Ce})}function T(oe,fe){const ie=k(oe,fe);return ie?Promise.reject(ie):Promise.resolve()}function L(oe){const fe=ae.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(oe):oe()}function I(oe,fe){let ie;const[re,Se,je]=HZ(oe,fe);ie=mw(re.reverse(),"beforeRouteLeave",oe,fe);for(const ne of re)ne.leaveGuards.forEach(pe=>{ie.push(oc(pe,oe,fe))});const ee=T.bind(null,oe,fe);return ie.push(ee),ke(ie).then(()=>{ie=[];for(const ne of o.list())ie.push(oc(ne,oe,fe));return ie.push(ee),ke(ie)}).then(()=>{ie=mw(Se,"beforeRouteUpdate",oe,fe);for(const ne of Se)ne.updateGuards.forEach(pe=>{ie.push(oc(pe,oe,fe))});return ie.push(ee),ke(ie)}).then(()=>{ie=[];for(const ne of je)if(ne.beforeEnter)if(Ur(ne.beforeEnter))for(const pe of ne.beforeEnter)ie.push(oc(pe,oe,fe));else ie.push(oc(ne.beforeEnter,oe,fe));return ie.push(ee),ke(ie)}).then(()=>(oe.matched.forEach(ne=>ne.enterCallbacks={}),ie=mw(je,"beforeRouteEnter",oe,fe,L),ie.push(ee),ke(ie))).then(()=>{ie=[];for(const ne of r.list())ie.push(oc(ne,oe,fe));return ie.push(ee),ke(ie)}).catch(ne=>Ua(ne,8)?ne:Promise.reject(ne))}function V(oe,fe,ie){a.list().forEach(re=>L(()=>re(oe,fe,ie)))}function R(oe,fe,ie,re,Se){const je=k(oe,fe);if(je)return je;const ee=fe===Dl,ne=_h?history.state:{};ie&&(re||ee?i.replace(oe.fullPath,Ln({scroll:ee&&ne&&ne.scroll},Se)):i.push(oe.fullPath,Se)),l.value=oe,Q(oe,fe,ie,ee),H()}let N;function F(){N||(N=i.listen((oe,fe,ie)=>{if(!ve.listening)return;const re=_(oe),Se=E(re);if(Se){P(Ln(Se,{replace:!0}),re).catch(Ym);return}c=re;const je=l.value;_h&&hZ(f7(je.fullPath,ie.delta),T_()),I(re,je).catch(ee=>Ua(ee,12)?ee:Ua(ee,2)?(P(ee.to,re).then(ne=>{Ua(ne,20)&&!ie.delta&&ie.type===Vg.pop&&i.go(-1,!1)}).catch(Ym),Promise.reject()):(ie.delta&&i.go(-ie.delta,!1),X(ee,re,je))).then(ee=>{ee=ee||R(re,je,!1),ee&&(ie.delta&&!Ua(ee,8)?i.go(-ie.delta,!1):ie.type===Vg.pop&&Ua(ee,20)&&i.go(-1,!1)),V(re,je,ee)}).catch(Ym)}))}let B=Up(),G=Up(),q;function X(oe,fe,ie){H(oe);const re=G.list();return re.length?re.forEach(Se=>Se(oe,fe,ie)):console.error(oe),Promise.reject(oe)}function K(){return q&&l.value!==Dl?Promise.resolve():new Promise((oe,fe)=>{B.add([oe,fe])})}function H(oe){return q||(q=!oe,F(),B.list().forEach(([fe,ie])=>oe?ie(oe):fe()),B.reset()),oe}function Q(oe,fe,ie,re){const{scrollBehavior:Se}=t;if(!_h||!Se)return Promise.resolve();const je=!ie&&fZ(f7(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return st().then(()=>Se(oe,fe,je)).then(ee=>ee&&dZ(ee)).catch(ee=>X(ee,oe,fe))}const se=oe=>i.go(oe);let Z;const ae=new Set,ve={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:_,options:t,push:C,replace:S,go:se,back:()=>se(-1),forward:()=>se(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:G.add,isReady:K,install(oe){const fe=this;oe.component("RouterLink",VZ),oe.component("RouterView",zZ),oe.config.globalProperties.$router=fe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>M(l)}),_h&&!Z&&l.value===Dl&&(Z=!0,C(i.location).catch(Se=>{}));const ie={};for(const Se in Dl)Object.defineProperty(ie,Se,{get:()=>l.value[Se],enumerable:!0});oe.provide(n4,fe),oe.provide(yO,yC(ie)),oe.provide(Ox,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=Dl,N&&N(),N=null,l.value=Dl,Z=!1,q=!1),re()}}};function ke(oe){return oe.reduce((fe,ie)=>fe.then(()=>L(ie)),Promise.resolve())}return ve}function HZ(t,e){const n=[],s=[],i=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;r<o;r++){const a=e.matched[r];a&&(t.matched.find(c=>Af(c,a))?s.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>Af(c,l))||i.push(l))}return[n,s,i]}const Ye={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},UZ=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Rt="update:modelValue",En="change",ya="input",kl=["","default","small","large"],bO=11,jZ=2;var WZ=typeof global=="object"&&global&&global.Object===Object&&global;const _O=WZ;var YZ=typeof self=="object"&&self&&self.Object===Object&&self,qZ=_O||YZ||Function("return this")();const Gr=qZ;var GZ=Gr.Symbol;const mr=GZ;var wO=Object.prototype,XZ=wO.hasOwnProperty,KZ=wO.toString,jp=mr?mr.toStringTag:void 0;function ZZ(t){var e=XZ.call(t,jp),n=t[jp];try{t[jp]=void 0;var s=!0}catch{}var i=KZ.call(t);return s&&(e?t[jp]=n:delete t[jp]),i}var JZ=Object.prototype,QZ=JZ.toString;function eJ(t){return QZ.call(t)}var tJ="[object Null]",nJ="[object Undefined]",E7=mr?mr.toStringTag:void 0;function $d(t){return t==null?t===void 0?nJ:tJ:E7&&E7 in Object(t)?ZZ(t):eJ(t)}function xa(t){return t!=null&&typeof t=="object"}var sJ="[object Symbol]";function P_(t){return typeof t=="symbol"||xa(t)&&$d(t)==sJ}function s4(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var iJ=Array.isArray;const Hi=iJ;var oJ=1/0,M7=mr?mr.prototype:void 0,T7=M7?M7.toString:void 0;function xO(t){if(typeof t=="string")return t;if(Hi(t))return s4(t,xO)+"";if(P_(t))return T7?T7.call(t):"";var e=t+"";return e=="0"&&1/t==-oJ?"-0":e}var rJ=/\s/;function aJ(t){for(var e=t.length;e--&&rJ.test(t.charAt(e)););return e}var lJ=/^\s+/;function cJ(t){return t&&t.slice(0,aJ(t)+1).replace(lJ,"")}function Ui(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var P7=0/0,uJ=/^[-+]0x[0-9a-f]+$/i,dJ=/^0b[01]+$/i,hJ=/^0o[0-7]+$/i,fJ=parseInt;function Qh(t){if(typeof t=="number")return t;if(P_(t))return P7;if(Ui(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ui(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cJ(t);var n=dJ.test(t);return n||hJ.test(t)?fJ(t.slice(2),n?2:8):uJ.test(t)?P7:+t}var I7=1/0,pJ=17976931348623157e292;function mJ(t){if(!t)return t===0?t:0;if(t=Qh(t),t===I7||t===-I7){var e=t<0?-1:1;return e*pJ}return t===t?t:0}function gJ(t){var e=mJ(t),n=e%1;return e===e?n?e-n:e:0}function i4(t){return t}var vJ="[object AsyncFunction]",yJ="[object Function]",bJ="[object GeneratorFunction]",_J="[object Proxy]";function o4(t){if(!Ui(t))return!1;var e=$d(t);return e==yJ||e==bJ||e==vJ||e==_J}var wJ=Gr["__core-js_shared__"];const gw=wJ;var L7=function(){var t=/[^.]+$/.exec(gw&&gw.keys&&gw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function xJ(t){return!!L7&&L7 in t}var kJ=Function.prototype,CJ=kJ.toString;function Ad(t){if(t!=null){try{return CJ.call(t)}catch{}try{return t+""}catch{}}return""}var SJ=/[\\^$.*+?()[\]{}|]/g,$J=/^\[object .+?Constructor\]$/,AJ=Function.prototype,EJ=Object.prototype,MJ=AJ.toString,TJ=EJ.hasOwnProperty,PJ=RegExp("^"+MJ.call(TJ).replace(SJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IJ(t){if(!Ui(t)||xJ(t))return!1;var e=o4(t)?PJ:$J;return e.test(Ad(t))}function LJ(t,e){return t==null?void 0:t[e]}function Ed(t,e){var n=LJ(t,e);return IJ(n)?n:void 0}var OJ=Ed(Gr,"WeakMap");const Dx=OJ;var O7=Object.create,DJ=function(){function t(){}return function(e){if(!Ui(e))return{};if(O7)return O7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const RJ=DJ;function VJ(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function kO(t,e){var n=-1,s=t.length;for(e||(e=Array(s));++n<s;)e[n]=t[n];return e}var FJ=800,NJ=16,BJ=Date.now;function zJ(t){var e=0,n=0;return function(){var s=BJ(),i=NJ-(s-n);if(n=s,i>0){if(++e>=FJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function HJ(t){return function(){return t}}var UJ=function(){try{var t=Ed(Object,"defineProperty");return t({},"",{}),t}catch{}}();const cb=UJ;var jJ=cb?function(t,e){return cb(t,"toString",{configurable:!0,enumerable:!1,value:HJ(e),writable:!0})}:i4;const WJ=jJ;var YJ=zJ(WJ);const CO=YJ;function qJ(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}function GJ(t,e,n,s){for(var i=t.length,o=n+(s?1:-1);s?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var XJ=9007199254740991,KJ=/^(?:0|[1-9]\d*)$/;function I_(t,e){var n=typeof t;return e=e??XJ,!!e&&(n=="number"||n!="symbol"&&KJ.test(t))&&t>-1&&t%1==0&&t<e}function r4(t,e,n){e=="__proto__"&&cb?cb(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function M1(t,e){return t===e||t!==t&&e!==e}var ZJ=Object.prototype,JJ=ZJ.hasOwnProperty;function a4(t,e,n){var s=t[e];(!(JJ.call(t,e)&&M1(s,n))||n===void 0&&!(e in t))&&r4(t,e,n)}function ip(t,e,n,s){var i=!n;n||(n={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=s?s(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?r4(n,a,l):a4(n,a,l)}return n}var D7=Math.max;function SO(t,e,n){return e=D7(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,o=D7(s.length-e,0),r=Array(o);++i<o;)r[i]=s[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=s[i];return a[e]=n(r),VJ(t,this,a)}}function QJ(t,e){return CO(SO(t,e,i4),t+"")}var eQ=9007199254740991;function l4(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=eQ}function op(t){return t!=null&&l4(t.length)&&!o4(t)}function tQ(t,e,n){if(!Ui(n))return!1;var s=typeof e;return(s=="number"?op(n)&&I_(e,n.length):s=="string"&&e in n)?M1(n[e],t):!1}function nQ(t){return QJ(function(e,n){var s=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,r&&tQ(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),e=Object(e);++s<i;){var a=n[s];a&&t(e,a,s,o)}return e})}var sQ=Object.prototype;function c4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||sQ;return t===n}function iQ(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var oQ="[object Arguments]";function R7(t){return xa(t)&&$d(t)==oQ}var $O=Object.prototype,rQ=$O.hasOwnProperty,aQ=$O.propertyIsEnumerable,lQ=R7(function(){return arguments}())?R7:function(t){return xa(t)&&rQ.call(t,"callee")&&!aQ.call(t,"callee")};const Fg=lQ;function cQ(){return!1}var AO=typeof To=="object"&&To&&!To.nodeType&&To,V7=AO&&typeof Po=="object"&&Po&&!Po.nodeType&&Po,uQ=V7&&V7.exports===AO,F7=uQ?Gr.Buffer:void 0,dQ=F7?F7.isBuffer:void 0,hQ=dQ||cQ;const Ng=hQ;var fQ="[object Arguments]",pQ="[object Array]",mQ="[object Boolean]",gQ="[object Date]",vQ="[object Error]",yQ="[object Function]",bQ="[object Map]",_Q="[object Number]",wQ="[object Object]",xQ="[object RegExp]",kQ="[object Set]",CQ="[object String]",SQ="[object WeakMap]",$Q="[object ArrayBuffer]",AQ="[object DataView]",EQ="[object Float32Array]",MQ="[object Float64Array]",TQ="[object Int8Array]",PQ="[object Int16Array]",IQ="[object Int32Array]",LQ="[object Uint8Array]",OQ="[object Uint8ClampedArray]",DQ="[object Uint16Array]",RQ="[object Uint32Array]",es={};es[EQ]=es[MQ]=es[TQ]=es[PQ]=es[IQ]=es[LQ]=es[OQ]=es[DQ]=es[RQ]=!0;es[fQ]=es[pQ]=es[$Q]=es[mQ]=es[AQ]=es[gQ]=es[vQ]=es[yQ]=es[bQ]=es[_Q]=es[wQ]=es[xQ]=es[kQ]=es[CQ]=es[SQ]=!1;function VQ(t){return xa(t)&&l4(t.length)&&!!es[$d(t)]}function u4(t){return function(e){return t(e)}}var EO=typeof To=="object"&&To&&!To.nodeType&&To,Gm=EO&&typeof Po=="object"&&Po&&!Po.nodeType&&Po,FQ=Gm&&Gm.exports===EO,vw=FQ&&_O.process,NQ=function(){try{var t=Gm&&Gm.require&&Gm.require("util").types;return t||vw&&vw.binding&&vw.binding("util")}catch{}}();const Mf=NQ;var N7=Mf&&Mf.isTypedArray,BQ=N7?u4(N7):VQ;const d4=BQ;var zQ=Object.prototype,HQ=zQ.hasOwnProperty;function MO(t,e){var n=Hi(t),s=!n&&Fg(t),i=!n&&!s&&Ng(t),o=!n&&!s&&!i&&d4(t),r=n||s||i||o,a=r?iQ(t.length,String):[],l=a.length;for(var c in t)(e||HQ.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||I_(c,l)))&&a.push(c);return a}function TO(t,e){return function(n){return t(e(n))}}var UQ=TO(Object.keys,Object);const jQ=UQ;var WQ=Object.prototype,YQ=WQ.hasOwnProperty;function qQ(t){if(!c4(t))return jQ(t);var e=[];for(var n in Object(t))YQ.call(t,n)&&n!="constructor"&&e.push(n);return e}function T1(t){return op(t)?MO(t):qQ(t)}function GQ(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var XQ=Object.prototype,KQ=XQ.hasOwnProperty;function ZQ(t){if(!Ui(t))return GQ(t);var e=c4(t),n=[];for(var s in t)s=="constructor"&&(e||!KQ.call(t,s))||n.push(s);return n}function P1(t){return op(t)?MO(t,!0):ZQ(t)}var JQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QQ=/^\w*$/;function h4(t,e){if(Hi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||P_(t)?!0:QQ.test(t)||!JQ.test(t)||e!=null&&t in Object(e)}var eee=Ed(Object,"create");const Bg=eee;function tee(){this.__data__=Bg?Bg(null):{},this.size=0}function nee(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var see="__lodash_hash_undefined__",iee=Object.prototype,oee=iee.hasOwnProperty;function ree(t){var e=this.__data__;if(Bg){var n=e[t];return n===see?void 0:n}return oee.call(e,t)?e[t]:void 0}var aee=Object.prototype,lee=aee.hasOwnProperty;function cee(t){var e=this.__data__;return Bg?e[t]!==void 0:lee.call(e,t)}var uee="__lodash_hash_undefined__";function dee(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Bg&&e===void 0?uee:e,this}function ld(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}ld.prototype.clear=tee;ld.prototype.delete=nee;ld.prototype.get=ree;ld.prototype.has=cee;ld.prototype.set=dee;function hee(){this.__data__=[],this.size=0}function L_(t,e){for(var n=t.length;n--;)if(M1(t[n][0],e))return n;return-1}var fee=Array.prototype,pee=fee.splice;function mee(t){var e=this.__data__,n=L_(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():pee.call(e,n,1),--this.size,!0}function gee(t){var e=this.__data__,n=L_(e,t);return n<0?void 0:e[n][1]}function vee(t){return L_(this.__data__,t)>-1}function yee(t,e){var n=this.__data__,s=L_(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function Cl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Cl.prototype.clear=hee;Cl.prototype.delete=mee;Cl.prototype.get=gee;Cl.prototype.has=vee;Cl.prototype.set=yee;var bee=Ed(Gr,"Map");const zg=bee;function _ee(){this.size=0,this.__data__={hash:new ld,map:new(zg||Cl),string:new ld}}function wee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function O_(t,e){var n=t.__data__;return wee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xee(t){var e=O_(this,t).delete(t);return this.size-=e?1:0,e}function kee(t){return O_(this,t).get(t)}function Cee(t){return O_(this,t).has(t)}function See(t,e){var n=O_(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function Sl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Sl.prototype.clear=_ee;Sl.prototype.delete=xee;Sl.prototype.get=kee;Sl.prototype.has=Cee;Sl.prototype.set=See;var $ee="Expected a function";function f4(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError($ee);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],o=n.cache;if(o.has(i))return o.get(i);var r=t.apply(this,s);return n.cache=o.set(i,r)||o,r};return n.cache=new(f4.Cache||Sl),n}f4.Cache=Sl;var Aee=500;function Eee(t){var e=f4(t,function(s){return n.size===Aee&&n.clear(),s}),n=e.cache;return e}var Mee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tee=/\\(\\)?/g,Pee=Eee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Mee,function(n,s,i,o){e.push(i?o.replace(Tee,"$1"):s||n)}),e});const Iee=Pee;function Lee(t){return t==null?"":xO(t)}function rp(t,e){return Hi(t)?t:h4(t,e)?[t]:Iee(Lee(t))}var Oee=1/0;function ap(t){if(typeof t=="string"||P_(t))return t;var e=t+"";return e=="0"&&1/t==-Oee?"-0":e}function D_(t,e){e=rp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[ap(e[n++])];return n&&n==s?t:void 0}function Bi(t,e,n){var s=t==null?void 0:D_(t,e);return s===void 0?n:s}function p4(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var B7=mr?mr.isConcatSpreadable:void 0;function Dee(t){return Hi(t)||Fg(t)||!!(B7&&t&&t[B7])}function m4(t,e,n,s,i){var o=-1,r=t.length;for(n||(n=Dee),i||(i=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?m4(a,e-1,n,s,i):p4(i,a):s||(i[i.length]=a)}return i}function ub(t){var e=t==null?0:t.length;return e?m4(t,1):[]}function PO(t){return CO(SO(t,void 0,ub),t+"")}var Ree=TO(Object.getPrototypeOf,Object);const g4=Ree;var Vee="[object Object]",Fee=Function.prototype,Nee=Object.prototype,IO=Fee.toString,Bee=Nee.hasOwnProperty,zee=IO.call(Object);function v4(t){if(!xa(t)||$d(t)!=Vee)return!1;var e=g4(t);if(e===null)return!0;var n=Bee.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&IO.call(n)==zee}function Hee(t,e,n){var s=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++s<i;)o[s]=t[s+e];return o}function si(){if(!arguments.length)return[];var t=arguments[0];return Hi(t)?t:[t]}function Uee(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function LO(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Qh(n),n=n===n?n:0),e!==void 0&&(e=Qh(e),e=e===e?e:0),Uee(Qh(t),e,n)}function jee(){this.__data__=new Cl,this.size=0}function Wee(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Yee(t){return this.__data__.get(t)}function qee(t){return this.__data__.has(t)}var Gee=200;function Xee(t,e){var n=this.__data__;if(n instanceof Cl){var s=n.__data__;if(!zg||s.length<Gee-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new Sl(s)}return n.set(t,e),this.size=n.size,this}function Or(t){var e=this.__data__=new Cl(t);this.size=e.size}Or.prototype.clear=jee;Or.prototype.delete=Wee;Or.prototype.get=Yee;Or.prototype.has=qee;Or.prototype.set=Xee;function Kee(t,e){return t&&ip(e,T1(e),t)}function Zee(t,e){return t&&ip(e,P1(e),t)}var OO=typeof To=="object"&&To&&!To.nodeType&&To,z7=OO&&typeof Po=="object"&&Po&&!Po.nodeType&&Po,Jee=z7&&z7.exports===OO,H7=Jee?Gr.Buffer:void 0,U7=H7?H7.allocUnsafe:void 0;function DO(t,e){if(e)return t.slice();var n=t.length,s=U7?U7(n):new t.constructor(n);return t.copy(s),s}function Qee(t,e){for(var n=-1,s=t==null?0:t.length,i=0,o=[];++n<s;){var r=t[n];e(r,n,t)&&(o[i++]=r)}return o}function RO(){return[]}var ete=Object.prototype,tte=ete.propertyIsEnumerable,j7=Object.getOwnPropertySymbols,nte=j7?function(t){return t==null?[]:(t=Object(t),Qee(j7(t),function(e){return tte.call(t,e)}))}:RO;const y4=nte;function ste(t,e){return ip(t,y4(t),e)}var ite=Object.getOwnPropertySymbols,ote=ite?function(t){for(var e=[];t;)p4(e,y4(t)),t=g4(t);return e}:RO;const VO=ote;function rte(t,e){return ip(t,VO(t),e)}function FO(t,e,n){var s=e(t);return Hi(t)?s:p4(s,n(t))}function Rx(t){return FO(t,T1,y4)}function NO(t){return FO(t,P1,VO)}var ate=Ed(Gr,"DataView");const Vx=ate;var lte=Ed(Gr,"Promise");const Fx=lte;var cte=Ed(Gr,"Set");const Nx=cte;var W7="[object Map]",ute="[object Object]",Y7="[object Promise]",q7="[object Set]",G7="[object WeakMap]",X7="[object DataView]",dte=Ad(Vx),hte=Ad(zg),fte=Ad(Fx),pte=Ad(Nx),mte=Ad(Dx),hu=$d;(Vx&&hu(new Vx(new ArrayBuffer(1)))!=X7||zg&&hu(new zg)!=W7||Fx&&hu(Fx.resolve())!=Y7||Nx&&hu(new Nx)!=q7||Dx&&hu(new Dx)!=G7)&&(hu=function(t){var e=$d(t),n=e==ute?t.constructor:void 0,s=n?Ad(n):"";if(s)switch(s){case dte:return X7;case hte:return W7;case fte:return Y7;case pte:return q7;case mte:return G7}return e});const Hg=hu;var gte=Object.prototype,vte=gte.hasOwnProperty;function yte(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&vte.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var bte=Gr.Uint8Array;const db=bte;function b4(t){var e=new t.constructor(t.byteLength);return new db(e).set(new db(t)),e}function _te(t,e){var n=e?b4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var wte=/\w*$/;function xte(t){var e=new t.constructor(t.source,wte.exec(t));return e.lastIndex=t.lastIndex,e}var K7=mr?mr.prototype:void 0,Z7=K7?K7.valueOf:void 0;function kte(t){return Z7?Object(Z7.call(t)):{}}function BO(t,e){var n=e?b4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Cte="[object Boolean]",Ste="[object Date]",$te="[object Map]",Ate="[object Number]",Ete="[object RegExp]",Mte="[object Set]",Tte="[object String]",Pte="[object Symbol]",Ite="[object ArrayBuffer]",Lte="[object DataView]",Ote="[object Float32Array]",Dte="[object Float64Array]",Rte="[object Int8Array]",Vte="[object Int16Array]",Fte="[object Int32Array]",Nte="[object Uint8Array]",Bte="[object Uint8ClampedArray]",zte="[object Uint16Array]",Hte="[object Uint32Array]";function Ute(t,e,n){var s=t.constructor;switch(e){case Ite:return b4(t);case Cte:case Ste:return new s(+t);case Lte:return _te(t,n);case Ote:case Dte:case Rte:case Vte:case Fte:case Nte:case Bte:case zte:case Hte:return BO(t,n);case $te:return new s;case Ate:case Tte:return new s(t);case Ete:return xte(t);case Mte:return new s;case Pte:return kte(t)}}function zO(t){return typeof t.constructor=="function"&&!c4(t)?RJ(g4(t)):{}}var jte="[object Map]";function Wte(t){return xa(t)&&Hg(t)==jte}var J7=Mf&&Mf.isMap,Yte=J7?u4(J7):Wte;const qte=Yte;var Gte="[object Set]";function Xte(t){return xa(t)&&Hg(t)==Gte}var Q7=Mf&&Mf.isSet,Kte=Q7?u4(Q7):Xte;const Zte=Kte;var Jte=1,Qte=2,ene=4,HO="[object Arguments]",tne="[object Array]",nne="[object Boolean]",sne="[object Date]",ine="[object Error]",UO="[object Function]",one="[object GeneratorFunction]",rne="[object Map]",ane="[object Number]",jO="[object Object]",lne="[object RegExp]",cne="[object Set]",une="[object String]",dne="[object Symbol]",hne="[object WeakMap]",fne="[object ArrayBuffer]",pne="[object DataView]",mne="[object Float32Array]",gne="[object Float64Array]",vne="[object Int8Array]",yne="[object Int16Array]",bne="[object Int32Array]",_ne="[object Uint8Array]",wne="[object Uint8ClampedArray]",xne="[object Uint16Array]",kne="[object Uint32Array]",jn={};jn[HO]=jn[tne]=jn[fne]=jn[pne]=jn[nne]=jn[sne]=jn[mne]=jn[gne]=jn[vne]=jn[yne]=jn[bne]=jn[rne]=jn[ane]=jn[jO]=jn[lne]=jn[cne]=jn[une]=jn[dne]=jn[_ne]=jn[wne]=jn[xne]=jn[kne]=!0;jn[ine]=jn[UO]=jn[hne]=!1;function Xm(t,e,n,s,i,o){var r,a=e&Jte,l=e&Qte,c=e&ene;if(n&&(r=i?n(t,s,i,o):n(t)),r!==void 0)return r;if(!Ui(t))return t;var u=Hi(t);if(u){if(r=yte(t),!a)return kO(t,r)}else{var d=Hg(t),h=d==UO||d==one;if(Ng(t))return DO(t,a);if(d==jO||d==HO||h&&!i){if(r=l||h?{}:zO(t),!a)return l?rte(t,Zee(r,t)):ste(t,Kee(r,t))}else{if(!jn[d])return i?t:{};r=Ute(t,d,a)}}o||(o=new Or);var f=o.get(t);if(f)return f;o.set(t,r),Zte(t)?t.forEach(function(b){r.add(Xm(b,e,n,b,t,o))}):qte(t)&&t.forEach(function(b,_){r.set(_,Xm(b,e,n,_,t,o))});var p=c?l?NO:Rx:l?P1:T1,m=u?void 0:p(t);return qJ(m||t,function(b,_){m&&(_=b,b=t[_]),a4(r,_,Xm(b,e,n,_,t,o))}),r}var Cne=1,Sne=4;function Wu(t){return Xm(t,Cne|Sne)}var $ne="__lodash_hash_undefined__";function Ane(t){return this.__data__.set(t,$ne),this}function Ene(t){return this.__data__.has(t)}function hb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Sl;++e<n;)this.add(t[e])}hb.prototype.add=hb.prototype.push=Ane;hb.prototype.has=Ene;function Mne(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function Tne(t,e){return t.has(e)}var Pne=1,Ine=2;function WO(t,e,n,s,i,o){var r=n&Pne,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Ine?new hb:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(s)var b=r?s(m,p,d,e,t,o):s(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!Mne(e,function(_,x){if(!Tne(f,x)&&(p===_||i(p,_,n,s,o)))return f.push(x)})){h=!1;break}}else if(!(p===m||i(p,m,n,s,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function Lne(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function One(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var Dne=1,Rne=2,Vne="[object Boolean]",Fne="[object Date]",Nne="[object Error]",Bne="[object Map]",zne="[object Number]",Hne="[object RegExp]",Une="[object Set]",jne="[object String]",Wne="[object Symbol]",Yne="[object ArrayBuffer]",qne="[object DataView]",e$=mr?mr.prototype:void 0,yw=e$?e$.valueOf:void 0;function Gne(t,e,n,s,i,o,r){switch(n){case qne:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Yne:return!(t.byteLength!=e.byteLength||!o(new db(t),new db(e)));case Vne:case Fne:case zne:return M1(+t,+e);case Nne:return t.name==e.name&&t.message==e.message;case Hne:case jne:return t==e+"";case Bne:var a=Lne;case Une:var l=s&Dne;if(a||(a=One),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=Rne,r.set(t,e);var u=WO(a(t),a(e),s,i,o,r);return r.delete(t),u;case Wne:if(yw)return yw.call(t)==yw.call(e)}return!1}var Xne=1,Kne=Object.prototype,Zne=Kne.hasOwnProperty;function Jne(t,e,n,s,i,o){var r=n&Xne,a=Rx(t),l=a.length,c=Rx(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:Zne.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var b=r;++d<l;){h=a[d];var _=t[h],x=e[h];if(s)var k=r?s(x,_,h,e,t,o):s(_,x,h,t,e,o);if(!(k===void 0?_===x||i(_,x,n,s,o):k)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var C=t.constructor,S=e.constructor;C!=S&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var Qne=1,t$="[object Arguments]",n$="[object Array]",zv="[object Object]",ese=Object.prototype,s$=ese.hasOwnProperty;function tse(t,e,n,s,i,o){var r=Hi(t),a=Hi(e),l=r?n$:Hg(t),c=a?n$:Hg(e);l=l==t$?zv:l,c=c==t$?zv:c;var u=l==zv,d=c==zv,h=l==c;if(h&&Ng(t)){if(!Ng(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Or),r||d4(t)?WO(t,e,n,s,i,o):Gne(t,e,l,n,s,i,o);if(!(n&Qne)){var f=u&&s$.call(t,"__wrapped__"),p=d&&s$.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new Or),i(m,b,n,s,o)}}return h?(o||(o=new Or),Jne(t,e,n,s,i,o)):!1}function R_(t,e,n,s,i){return t===e?!0:t==null||e==null||!xa(t)&&!xa(e)?t!==t&&e!==e:tse(t,e,n,s,R_,i)}var nse=1,sse=2;function ise(t,e,n,s){var i=n.length,o=i,r=!s;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new Or;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?R_(u,c,nse|sse,s,d):h))return!1}}return!0}function YO(t){return t===t&&!Ui(t)}function ose(t){for(var e=T1(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,YO(i)]}return e}function qO(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function rse(t){var e=ose(t);return e.length==1&&e[0][2]?qO(e[0][0],e[0][1]):function(n){return n===t||ise(n,t,e)}}function ase(t,e){return t!=null&&e in Object(t)}function lse(t,e,n){e=rp(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=ap(e[s]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++s!=i?o:(i=t==null?0:t.length,!!i&&l4(i)&&I_(r,i)&&(Hi(t)||Fg(t)))}function GO(t,e){return t!=null&&lse(t,e,ase)}var cse=1,use=2;function dse(t,e){return h4(t)&&YO(e)?qO(ap(t),e):function(n){var s=Bi(n,t);return s===void 0&&s===e?GO(n,t):R_(e,s,cse|use)}}function hse(t){return function(e){return e==null?void 0:e[t]}}function fse(t){return function(e){return D_(e,t)}}function pse(t){return h4(t)?hse(ap(t)):fse(t)}function XO(t){return typeof t=="function"?t:t==null?i4:typeof t=="object"?Hi(t)?dse(t[0],t[1]):rse(t):pse(t)}function mse(t){return function(e,n,s){for(var i=-1,o=Object(e),r=s(e),a=r.length;a--;){var l=r[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var gse=mse();const KO=gse;function vse(t,e){return t&&KO(t,e,T1)}function yse(t,e){return function(n,s){if(n==null)return n;if(!op(n))return t(n,s);for(var i=n.length,o=e?i:-1,r=Object(n);(e?o--:++o<i)&&s(r[o],o,r)!==!1;);return n}}var bse=yse(vse);const _se=bse;var wse=function(){return Gr.Date.now()};const bw=wse;var xse="Expected a function",kse=Math.max,Cse=Math.min;function cd(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(xse);e=Qh(e)||0,Ui(n)&&(u=!!n.leading,d="maxWait"in n,o=d?kse(Qh(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var P=s,T=i;return s=i=void 0,c=E,r=t.apply(T,P),r}function p(E){return c=E,a=setTimeout(_,e),u?f(E):r}function m(E){var P=E-l,T=E-c,L=e-P;return d?Cse(L,o-T):L}function b(E){var P=E-l,T=E-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var E=bw();if(b(E))return x(E);a=setTimeout(_,m(E))}function x(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function C(){return a===void 0?r:x(bw())}function S(){var E=bw(),P=b(E);if(s=arguments,i=this,l=E,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),r}return S.cancel=k,S.flush=C,S}function Bx(t,e,n){(n!==void 0&&!M1(t[e],n)||n===void 0&&!(e in t))&&r4(t,e,n)}function Sse(t){return xa(t)&&op(t)}function zx(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function $se(t){return ip(t,P1(t))}function Ase(t,e,n,s,i,o,r){var a=zx(t,n),l=zx(e,n),c=r.get(l);if(c){Bx(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Hi(l),f=!h&&Ng(l),p=!h&&!f&&d4(l);u=l,h||f||p?Hi(a)?u=a:Sse(a)?u=kO(a):f?(d=!1,u=DO(l,!0)):p?(d=!1,u=BO(l,!0)):u=[]:v4(l)||Fg(l)?(u=a,Fg(a)?u=$se(a):(!Ui(a)||o4(a))&&(u=zO(l))):d=!1}d&&(r.set(l,u),i(u,l,s,o,r),r.delete(l)),Bx(t,n,u)}function ZO(t,e,n,s,i){t!==e&&KO(e,function(o,r){if(i||(i=new Or),Ui(o))Ase(t,e,r,n,ZO,s,i);else{var a=s?s(zx(t,r),o,r+"",t,e,i):void 0;a===void 0&&(a=o),Bx(t,r,a)}},P1)}function Ese(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Mse=Math.max,Tse=Math.min;function Pse(t,e,n){var s=t==null?0:t.length;if(!s)return-1;var i=s-1;return n!==void 0&&(i=gJ(n),i=n<0?Mse(s+i,0):Tse(i,s-1)),GJ(t,XO(e),i,!0)}function Ise(t,e){var n=-1,s=op(t)?Array(t.length):[];return _se(t,function(i,o,r){s[++n]=e(i,o,r)}),s}function Lse(t,e){var n=Hi(t)?s4:Ise;return n(t,XO(e))}function JO(t,e){return m4(Lse(t,e),1)}function Tf(t){for(var e=-1,n=t==null?0:t.length,s={};++e<n;){var i=t[e];s[i[0]]=i[1]}return s}function Ose(t,e){return e.length<2?t:D_(t,Hee(e,0,-1))}function zi(t,e){return R_(t,e)}function li(t){return t==null}function V_(t){return t===null}function Dse(t){return t===void 0}var Rse=nQ(function(t,e,n){ZO(t,e,n)});const QO=Rse;var Vse=Object.prototype,Fse=Vse.hasOwnProperty;function Nse(t,e){e=rp(e,t);var n=-1,s=e.length;if(!s)return!0;for(var i=t==null||typeof t!="object"&&typeof t!="function";++n<s;){var o=e[n];if(typeof o=="string"){if(o==="__proto__"&&!Fse.call(t,"__proto__"))return!1;if(o==="constructor"&&n+1<s&&typeof e[n+1]=="string"&&e[n+1]==="prototype"){if(i&&n===0)continue;return!1}}}var r=Ose(t,e);return r==null||delete r[ap(Ese(e))]}function Bse(t){return v4(t)?void 0:t}var zse=1,Hse=2,Use=4,jse=PO(function(t,e){var n={};if(t==null)return n;var s=!1;e=s4(e,function(o){return o=rp(o,t),s||(s=o.length>1),o}),ip(t,NO(t),n),s&&(n=Xm(n,zse|Hse|Use,Bse));for(var i=e.length;i--;)Nse(n,e[i]);return n});const F_=jse;function eD(t,e,n,s){if(!Ui(t))return t;e=rp(e,t);for(var i=-1,o=e.length,r=o-1,a=t;a!=null&&++i<o;){var l=ap(e[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=r){var u=a[l];c=s?s(u,l,a):void 0,c===void 0&&(c=Ui(u)?u:I_(e[i+1])?[]:{})}a4(a,l,c),a=a[l]}return t}function Wse(t,e,n){for(var s=-1,i=e.length,o={};++s<i;){var r=e[s],a=D_(t,r);n(a,r)&&eD(o,rp(r,t),a)}return o}function Yse(t,e){return Wse(t,e,function(n,s){return GO(t,s)})}var qse=PO(function(t,e){return t==null?{}:Yse(t,e)});const _4=qse;function Gse(t,e,n){return t==null?t:eD(t,e,n)}var Xse="Expected a function";function Hv(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(Xse);return Ui(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),cd(t,e,{leading:s,maxWait:e,trailing:i})}const bn=t=>t===void 0,Kn=t=>typeof t=="boolean",wt=t=>typeof t=="number",w4=t=>!t&&t!==0||Ae(t)&&t.length===0||yt(t)&&!Object.keys(t).length,Eo=t=>typeof Element>"u"?!1:t instanceof Element,ma=t=>li(t),Kse=t=>Ke(t)?!Number.isNaN(Number(t)):!1,Zse=t=>t===window,fb=t=>Object.keys(t),Jse=t=>Object.entries(t),xc=(t,e,n)=>({get value(){return Bi(t,e,n)},set value(s){Gse(t,e,s)}}),tD="__epPropKey",de=t=>t,Qse=t=>yt(t)&&!!t[tD],N_=(t,e)=>{if(!yt(t)||Qse(t))return t;const{values:n,required:s,default:i,type:o,validator:r}=t,a={type:o,required:!!s,validator:n||r?l=>{let c=!1,u=[];if(n&&(u=Array.from(n),Ft(t,"default")&&u.push(i),c||(c=u.includes(l))),r&&(c||(c=r(l))),!c&&u.length>0){const d=[...new Set(u)].map(h=>JSON.stringify(h)).join(", ");qI(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[tD]:!0};return Ft(t,"default")&&(a.default=i),a},We=t=>Tf(Object.entries(t).map(([e,n])=>[e,N_(n,e)])),x4=We({to:{type:de([String,Object]),required:!0},disabled:Boolean});var nD=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function mo(t,e){throw new nD(`[${t}] ${e}`)}function Pt(t,e){{const n=Ke(t)?new nD(`[${t}] ${e}`):t;console.warn(n)}}const eie=["class","style"],tie=/^on[A-Z]/,k4=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,s=z(()=>((n==null?void 0:n.value)||[]).concat(eie)),i=ht();return i?z(()=>{var o;return Tf(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([r])=>!s.value.includes(r)&&!(e&&tie.test(r))))}):(Pt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),z(()=>({})))};function sD(t,e){var n;const s=Zn();return ml(()=>{s.value=t()},{...e,flush:(n=e==null?void 0:e.flush)!=null?n:"sync"}),Pc(s)}function Md(t){return h_()?(f_(t),!0):!1}function Io(t){return typeof t=="function"?t():M(t)}function nie(t){if(!hn(t))return Dn(t);const e=new Proxy({},{get(n,s,i){return M(Reflect.get(t.value,s,i))},set(n,s,i){return hn(t.value[s])&&!hn(i)?t.value[s].value=i:t.value[s]=i,!0},deleteProperty(n,s){return Reflect.deleteProperty(t.value,s)},has(n,s){return Reflect.has(t.value,s)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Dn(e)}function sie(t){return nie(z(t))}const qt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const iie=t=>typeof t<"u",iD=t=>t!=null,oie=Object.prototype.toString,rie=t=>oie.call(t)==="[object Object]",oD=(t,e,n)=>Math.min(n,Math.max(e,t)),Dr=()=>{},Hx=aie();function aie(){var t,e;return qt&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function rD(t,e){function n(...s){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,s),{fn:e,thisArg:this,args:s})).then(i).catch(o)})}return n}function lie(t,e={}){let n,s,i=Dr;const o=a=>{clearTimeout(a),i(),i=Dr};return a=>{const l=Io(t),c=Io(e.maxWait);return n&&o(n),l<=0||c!==void 0&&c<=0?(s&&(o(s),s=null),Promise.resolve(a())):new Promise((u,d)=>{i=e.rejectOnCancel?d:u,c&&!s&&(s=setTimeout(()=>{n&&o(n),s=null,u(a())},c)),n=setTimeout(()=>{s&&o(s),s=null,u(a())},l)})}}function cie(...t){let e=0,n,s=!0,i=Dr,o,r,a,l,c;!hn(t[0])&&typeof t[0]=="object"?{delay:r,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[r,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,i(),i=Dr)};return h=>{const f=Io(r),p=Date.now()-e,m=()=>o=h();return u(),f<=0?(e=Date.now(),m()):(p>f&&(l||!s)?(e=Date.now(),m()):a&&(o=new Promise((b,_)=>{i=c?_:b,n=setTimeout(()=>{e=Date.now(),s=!0,b(m()),u()},Math.max(0,f-p))})),!l&&!n&&(n=setTimeout(()=>s=!0,f)),s=!1,o)}}function uie(t){return t||ht()}function aD(t,e=200,n={}){return rD(lie(e,n),t)}function die(t,e=200,n={}){const s=J(t.value),i=aD(()=>{s.value=t.value},e,n);return Ee(t,()=>i()),s}function hie(t,e=200,n=!1,s=!0,i=!1){return rD(cie(e,n,s,i),t)}function lD(t,e=!0,n){uie()?Vt(t,n):e?t():st(t)}function Ux(t,e,n={}){const{immediate:s=!0}=n,i=J(!1);let o=null;function r(){o&&(clearTimeout(o),o=null)}function a(){i.value=!1,r()}function l(...c){r(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...c)},Io(e))}return s&&(i.value=!0,qt&&l()),Md(a),{isPending:Pc(i),start:l,stop:a}}const $l=qt?window:void 0,fie=qt?window.document:void 0;function zs(t){var e;const n=Io(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Bn(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=$l):[e,n,s,i]=t,!e)return Dr;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Ee(()=>[zs(e),Io(i)],([u,d])=>{if(r(),!u)return;const h=rie(d)?{...d}:d;o.push(...n.flatMap(f=>s.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Md(c),c}let i$=!1;function cD(t,e,n={}){const{window:s=$l,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return Dr;Hx&&!i$&&(i$=!0,Array.from(s.document.body.children).forEach(m=>m.addEventListener("click",Dr)),s.document.documentElement.addEventListener("click",Dr));let a=!0;const l=m=>Io(i).some(b=>{if(typeof b=="string")return Array.from(s.document.querySelectorAll(b)).some(_=>_===m.target||m.composedPath().includes(_));{const _=zs(b);return _&&(m.target===_||m.composedPath().includes(_))}});function c(m){const b=Io(m);return b&&b.$.subTree.shapeFlag===16}function u(m,b){const _=Io(m),x=_.$.subTree&&_.$.subTree.children;return x==null||!Array.isArray(x)?!1:x.some(k=>k.el===b.target||b.composedPath().includes(k.el))}const d=m=>{const b=zs(t);if(m.target!=null&&!(!(b instanceof Element)&&c(t)&&u(t,m))&&!(!b||b===m.target||m.composedPath().includes(b))){if(m.detail===0&&(a=!l(m)),!a){a=!0;return}e(m)}};let h=!1;const f=[Bn(s,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),d(m))},{passive:!0,capture:o}),Bn(s,"pointerdown",m=>{const b=zs(t);a=!l(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),r&&Bn(s,"blur",m=>{setTimeout(()=>{var b;const _=zs(t);((b=s.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(_!=null&&_.contains(s.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>f.forEach(m=>m())}function pie(){const t=J(!1),e=ht();return e&&Vt(()=>{t.value=!0},e),t}function B_(t){const e=pie();return z(()=>(e.value,!!t()))}function mie(t,e,n={}){const{window:s=$l,...i}=n;let o;const r=B_(()=>s&&"MutationObserver"in s),a=()=>{o&&(o.disconnect(),o=void 0)},l=z(()=>{const h=Io(t),f=(Array.isArray(h)?h:[h]).map(zs).filter(iD);return new Set(f)}),c=Ee(()=>l.value,h=>{a(),r.value&&h.size&&(o=new MutationObserver(e),h.forEach(f=>o.observe(f,i)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),a()};return Md(d),{isSupported:r,stop:d,takeRecords:u}}function gie(t,e={}){const{window:n=$l}=e,s=B_(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let i;const o=J(!1),r=c=>{o.value=c.matches},a=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",r):i.removeListener(r))},l=ml(()=>{s.value&&(a(),i=n.matchMedia(Io(t)),"addEventListener"in i?i.addEventListener("change",r):i.addListener(r),o.value=i.matches)});return Md(()=>{l(),a(),i=void 0}),o}function vie(t){return JSON.parse(JSON.stringify(t))}function yie(t={}){const{document:e=fie}=t;if(!e)return J("visible");const n=J(e.visibilityState);return Bn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function Bs(t,e,n={}){const{window:s=$l,...i}=n;let o;const r=B_(()=>s&&"ResizeObserver"in s),a=()=>{o&&(o.disconnect(),o=void 0)},l=z(()=>{const d=Io(t);return Array.isArray(d)?d.map(h=>zs(h)):[zs(d)]}),c=Ee(l,d=>{if(a(),r.value&&s){o=new ResizeObserver(e);for(const h of d)h&&o.observe(h,i)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Md(u),{isSupported:r,stop:u}}function o$(t,e={width:0,height:0},n={}){const{window:s=$l,box:i="content-box"}=n,o=z(()=>{var d,h;return(h=(d=zs(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=J(e.width),a=J(e.height),{stop:l}=Bs(t,([d])=>{const h=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(s&&o.value){const f=zs(t);if(f){const p=f.getBoundingClientRect();r.value=p.width,a.value=p.height}}else if(h){const f=Array.isArray(h)?h:[h];r.value=f.reduce((p,{inlineSize:m})=>p+m,0),a.value=f.reduce((p,{blockSize:m})=>p+m,0)}else r.value=d.contentRect.width,a.value=d.contentRect.height},n);lD(()=>{const d=zs(t);d&&(r.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Ee(()=>zs(t),d=>{r.value=d?e.width:0,a.value=d?e.height:0});function u(){l(),c()}return{width:r,height:a,stop:u}}function bie(t,e,n={}){const{root:s,rootMargin:i="0px",threshold:o=0,window:r=$l,immediate:a=!0}=n,l=B_(()=>r&&"IntersectionObserver"in r),c=z(()=>{const p=Io(t);return(Array.isArray(p)?p:[p]).map(zs).filter(iD)});let u=Dr;const d=J(a),h=l.value?Ee(()=>[c.value,zs(s),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const b=new IntersectionObserver(e,{root:zs(m),rootMargin:i,threshold:o});p.forEach(_=>_&&b.observe(_)),u=()=>{b.disconnect(),u=Dr}},{immediate:a,flush:"post"}):Dr,f=()=>{u(),h(),d.value=!1};return Md(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function _ie(t,e,n,s={}){var i,o,r;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:h}=s,f=ht(),p=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((r=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:r.bind(f==null?void 0:f.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const b=k=>a?typeof a=="function"?a(k):vie(k):k,_=()=>iie(t[e])?b(t[e]):d,x=k=>{h?h(k)&&p(m,k):p(m,k)};if(l){const k=_(),C=J(k);let S=!1;return Ee(()=>t[e],E=>{S||(S=!0,C.value=b(E),st(()=>S=!1))}),Ee(C,E=>{!S&&(E!==t[e]||u)&&x(E)},{deep:u}),C}else return z({get(){return _()},set(k){x(k)}})}function wie(t={}){const{window:e=$l}=t;if(!e)return J(!1);const n=J(e.document.hasFocus());return Bn(e,"blur",()=>{n.value=!1}),Bn(e,"focus",()=>{n.value=!0}),n}function xie(t={}){const{window:e=$l,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:r="inner"}=t,a=J(n),l=J(s),c=()=>{e&&(r==="outer"?(a.value=e.outerWidth,l.value=e.outerHeight):o?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(c(),lD(c),Bn("resize",c,{passive:!0}),i){const u=gie("(orientation: portrait)");Ee(u,()=>c())}return{width:a,height:l}}function kie(){const t=Zn(),e=J(0),n=z(()=>({minWidth:`${Math.max(e.value,bO)}px`}));return Bs(t,()=>{var i;e.value=((i=t.value)==null?void 0:i.getBoundingClientRect().width)??0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const ul=({from:t,replacement:e,scope:n,version:s,ref:i,type:o="API"},r)=>{Ee(()=>M(r),a=>{a&&Pt(n,`[${o}] ${t} is about to be deprecated in version ${s}, please use ${e} instead.
42 For more detail, please visit: ${i}
43 `)},{immediate:!0})},Cie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',uD=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,r$=t=>typeof Element>"u"?!1:t instanceof Element,Sie=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,a$=t=>Array.from(t.querySelectorAll(Cie)).filter(e=>Ug(e)&&Sie(e)),Ug=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},C4=(t,e)=>{if(!t||!t.focus)return;let n=!1;r$(t)&&!Ug(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),r$(t)&&n&&t.removeAttribute("tabindex")},S4=()=>qt&&/firefox/i.test(window.navigator.userAgent),$ie=()=>qt&&/android/i.test(window.navigator.userAgent),Aie=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),_w=t=>Uc(t),Eie="utils/dom/style",dD=(t="")=>t.split(" ").filter(e=>!!e.trim()),dl=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},ud=(t,e)=>{!t||!e.trim()||t.classList.add(...dD(e))},ka=(t,e)=>{!t||!e.trim()||t.classList.remove(...dD(e))},cc=(t,e)=>{var s;if(!qt||!t||!e||uD(t))return"";let n=Jn(e);n==="float"&&(n="cssFloat");try{const i=t.style[n];if(i)return i;const o=(s=document.defaultView)==null?void 0:s.getComputedStyle(t,"");return o?o[n]:""}catch{return t.style[n]}};function ui(t,e="px"){if(!t&&t!==0)return"";if(wt(t)||Kse(t))return`${t}${e}`;if(Ke(t))return t;Pt(Eie,"binding value must be a string or number")}const hD=(t,e,n,s)=>{const i={offsetX:0,offsetY:0},o=J(!1),r=(h,f)=>{if(t.value){const{offsetX:p,offsetY:m}=i,b=t.value.getBoundingClientRect(),_=b.left,x=b.top,k=b.width,C=b.height,S=document.documentElement.clientWidth,E=document.documentElement.clientHeight,P=-_+p,T=-x+m,L=S-_-k+p,I=E-x-(C<E?C:0)+m;s!=null&&s.value||(h=Math.min(Math.max(h,P),L),f=Math.min(Math.max(f,T),I)),i.offsetX=h,i.offsetY=f,t.value.style.transform=`translate(${ui(h)}, ${ui(f)})`}},a=h=>{const f=h.clientX,p=h.clientY,{offsetX:m,offsetY:b}=i,_=k=>{o.value||(o.value=!0),r(m+k.clientX-f,b+k.clientY-p)},x=()=>{o.value=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)},l=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",d))},c=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",d))},u=()=>{i.offsetX=0,i.offsetY=0,t.value&&(t.value.style.transform="")},d=()=>{const{offsetX:h,offsetY:f}=i;r(h,f)};return Vt(()=>{ml(()=>{n.value?l():c()})}),_n(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var Mie={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Tie=t=>(e,n)=>Pie(e,n,M(t)),Pie=(t,e,n)=>Bi(n,t,t).replace(/\{(\w+)\}/g,(s,i)=>`${(e==null?void 0:e[i])??`{${i}}`}`),Iie=t=>({lang:z(()=>M(t).name),locale:hn(t)?t:J(t),t:Tie(t)}),fD=Symbol("localeContextKey"),Xt=t=>{const e=t||He(fD,J());return Iie(z(()=>e.value||Mie))},Km="el",Lie="is-",ru=(t,e,n,s,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),s&&(o+=`__${s}`),i&&(o+=`--${i}`),o},pD=Symbol("namespaceContextKey"),$4=t=>{const e=t||(ht()?He(pD,J(Km)):J(Km));return z(()=>M(e)||Km)},Ne=(t,e)=>{const n=$4(e);return{namespace:n,b:(m="")=>ru(n.value,t,m,"",""),e:m=>m?ru(n.value,t,"",m,""):"",m:m=>m?ru(n.value,t,"","",m):"",be:(m,b)=>m&&b?ru(n.value,t,m,b,""):"",em:(m,b)=>m&&b?ru(n.value,t,"",m,b):"",bm:(m,b)=>m&&b?ru(n.value,t,m,"",b):"",bem:(m,b,_)=>m&&b&&_?ru(n.value,t,m,b,_):"",is:(m,...b)=>{const _=b.length>=1?b[0]:!0;return m&&_?`${Lie}${m}`:""},cssVar:m=>{const b={};for(const _ in m)m[_]&&(b[`--${n.value}-${_}`]=m[_]);return b},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const b={};for(const _ in m)m[_]&&(b[`--${n.value}-${t}-${_}`]=m[_]);return b},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}},jg=t=>qt?window.requestAnimationFrame(t):setTimeout(t,16),Oie=t=>qt?window.cancelAnimationFrame(t):clearTimeout(t),Die=(t,e)=>{if(!qt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],s=cc(t,n);return["scroll","auto","overlay"].some(i=>s.includes(i))},Rie=(t,e)=>{if(!qt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Die(n,e))return n;uD(n)?n=n.host:n=n.parentNode}return n};let Uv;const Vie=t=>{var o;if(!qt)return 0;if(Uv!==void 0)return Uv;const e=document.createElement("div");e.className=`${t}-scrollbar__wrap`,e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const n=e.offsetWidth;e.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",e.appendChild(s);const i=s.offsetWidth;return(o=e.parentNode)==null||o.removeChild(e),Uv=n-i,Uv};function Fie(t,e){if(!qt)return;if(!e){t.scrollTop=0;return}const n=[];let s=e.offsetParent;for(;s!==null&&t!==s&&t.contains(s);)n.push(s),s=s.offsetParent;const i=e.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),o=i+e.offsetHeight,r=t.scrollTop,a=r+t.clientHeight;i<r?t.scrollTop=i:o>a&&(t.scrollTop=o-t.clientHeight)}const A4=(t,e={})=>{hn(t)||mo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Ne("popup"),s=z(()=>n.bm("parent","hidden"));let i=0,o=!1,r="0",a=!1;const l=()=>{a||(a=!0,setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=r,ka(document.body,s.value))},200))};Ee(t,c=>{if(!c){l();return}a=!1,o=!dl(document.body,s.value),o&&(r=document.body.style.width,ud(document.body,s.value)),i=Vie(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,d=cc(document.body,"overflowY");i>0&&(u||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`)}),f_(()=>l())},As=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=t==null?void 0:t(i);if(n===!1||!o)return e==null?void 0:e(i)},l$=t=>e=>e.pointerType==="mouse"?t(e):void 0,hs=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=mD(t);if(e){if(Object.values(Ye).includes(e))return e;switch(e){case" ":return Ye.space;default:return""}}return""},mD=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&$ie()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},Nie=N_({type:de(Boolean),default:null}),Bie=N_({type:de(Function)}),gD=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,s=[e],i={[t]:Nie,[n]:Bie};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=ht(),{emit:f}=h,p=h.props,m=z(()=>Je(p[n])),b=z(()=>p[t]===null),_=P=>{r.value!==!0&&(r.value=!0,a&&(a.value=P),Je(u)&&u(P))},x=P=>{r.value!==!1&&(r.value=!1,a&&(a.value=P),Je(d)&&d(P))},k=P=>{if(p.disabled===!0||Je(c)&&!c())return;const T=m.value&&qt;T&&f(e,!0),(b.value||!T)&&_(P)},C=P=>{if(p.disabled===!0||!qt)return;const T=m.value&&qt;T&&f(e,!1),(b.value||!T)&&x(P)},S=P=>{Kn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?_():x()))},E=()=>{r.value?C():k()};return Ee(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Ee(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&C()}),Vt(()=>{S(p[t])}),{hide:C,show:k,toggle:E,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:s}};gD("modelValue");const vD=t=>{const e=ht();return z(()=>{var n,s;return(s=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:s[t]})};var co="top",gr="bottom",vr="right",uo="left",E4="auto",I1=[co,gr,vr,uo],Pf="start",Wg="end",zie="clippingParents",yD="viewport",Wp="popper",Hie="reference",c$=I1.reduce(function(t,e){return t.concat([e+"-"+Pf,e+"-"+Wg])},[]),lp=[].concat(I1,[E4]).reduce(function(t,e){return t.concat([e,e+"-"+Pf,e+"-"+Wg])},[]),Uie="beforeRead",jie="read",Wie="afterRead",Yie="beforeMain",qie="main",Gie="afterMain",Xie="beforeWrite",Kie="write",Zie="afterWrite",Jie=[Uie,jie,Wie,Yie,qie,Gie,Xie,Kie,Zie];function Ca(t){return t?(t.nodeName||"").toLowerCase():null}function Xr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function If(t){var e=Xr(t).Element;return t instanceof e||t instanceof Element}function cr(t){var e=Xr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function M4(t){if(typeof ShadowRoot>"u")return!1;var e=Xr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Qie(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!cr(o)||!Ca(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function eoe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],o=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!cr(i)||!Ca(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var bD={name:"applyStyles",enabled:!0,phase:"write",fn:Qie,effect:eoe,requires:["computeStyles"]};function ba(t){return t.split("-")[0]}var Yu=Math.max,pb=Math.min,Lf=Math.round;function Of(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),s=1,i=1;if(cr(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(s=Lf(n.width)/r||1),o>0&&(i=Lf(n.height)/o||1)}return{width:n.width/s,height:n.height/i,top:n.top/i,right:n.right/s,bottom:n.bottom/i,left:n.left/s,x:n.left/s,y:n.top/i}}function T4(t){var e=Of(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function _D(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&M4(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function vl(t){return Xr(t).getComputedStyle(t)}function toe(t){return["table","td","th"].indexOf(Ca(t))>=0}function jc(t){return((If(t)?t.ownerDocument:t.document)||window.document).documentElement}function z_(t){return Ca(t)==="html"?t:t.assignedSlot||t.parentNode||(M4(t)?t.host:null)||jc(t)}function u$(t){return!cr(t)||vl(t).position==="fixed"?null:t.offsetParent}function noe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&cr(t)){var s=vl(t);if(s.position==="fixed")return null}var i=z_(t);for(M4(i)&&(i=i.host);cr(i)&&["html","body"].indexOf(Ca(i))<0;){var o=vl(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function L1(t){for(var e=Xr(t),n=u$(t);n&&toe(n)&&vl(n).position==="static";)n=u$(n);return n&&(Ca(n)==="html"||Ca(n)==="body"&&vl(n).position==="static")?e:n||noe(t)||e}function P4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Zm(t,e,n){return Yu(t,pb(e,n))}function soe(t,e,n){var s=Zm(t,e,n);return s>n?n:s}function wD(){return{top:0,right:0,bottom:0,left:0}}function xD(t){return Object.assign({},wD(),t)}function kD(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var ioe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,xD(typeof t!="number"?t:kD(t,I1))};function ooe(t){var e,n=t.state,s=t.name,i=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=ba(n.placement),l=P4(a),c=[uo,vr].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=ioe(i.padding,n),h=T4(o),f=l==="y"?co:uo,p=l==="y"?gr:vr,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],_=L1(o),x=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,k=m/2-b/2,C=d[f],S=x-h[u]-d[p],E=x/2-h[u]/2+k,P=Zm(C,E,S),T=l;n.modifiersData[s]=(e={},e[T]=P,e.centerOffset=P-E,e)}}function roe(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!_D(e.elements.popper,i)||(e.elements.arrow=i))}var aoe={name:"arrow",enabled:!0,phase:"main",fn:ooe,effect:roe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Df(t){return t.split("-")[1]}var loe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function coe(t){var e=t.x,n=t.y,s=window,i=s.devicePixelRatio||1;return{x:Lf(e*i)/i||0,y:Lf(n*i)/i||0}}function d$(t){var e,n=t.popper,s=t.popperRect,i=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=r.x,f=h===void 0?0:h,p=r.y,m=p===void 0?0:p,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var _=r.hasOwnProperty("x"),x=r.hasOwnProperty("y"),k=uo,C=co,S=window;if(c){var E=L1(n),P="clientHeight",T="clientWidth";if(E===Xr(n)&&(E=jc(n),vl(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),E=E,i===co||(i===uo||i===vr)&&o===Wg){C=gr;var L=d&&E===S&&S.visualViewport?S.visualViewport.height:E[P];m-=L-s.height,m*=l?1:-1}if(i===uo||(i===co||i===gr)&&o===Wg){k=vr;var I=d&&E===S&&S.visualViewport?S.visualViewport.width:E[T];f-=I-s.width,f*=l?1:-1}}var V=Object.assign({position:a},c&&loe),R=u===!0?coe({x:f,y:m}):{x:f,y:m};if(f=R.x,m=R.y,l){var N;return Object.assign({},V,(N={},N[C]=x?"0":"",N[k]=_?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",N))}return Object.assign({},V,(e={},e[C]=x?m+"px":"",e[k]=_?f+"px":"",e.transform="",e))}function uoe(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:ba(e.placement),variation:Df(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,d$(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,d$(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var CD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uoe,data:{}},jv={passive:!0};function doe(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,o=i===void 0?!0:i,r=s.resize,a=r===void 0?!0:r,l=Xr(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,jv)}),a&&l.addEventListener("resize",n.update,jv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,jv)}),a&&l.removeEventListener("resize",n.update,jv)}}var SD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:doe,data:{}},hoe={left:"right",right:"left",bottom:"top",top:"bottom"};function T0(t){return t.replace(/left|right|bottom|top/g,function(e){return hoe[e]})}var foe={start:"end",end:"start"};function h$(t){return t.replace(/start|end/g,function(e){return foe[e]})}function I4(t){var e=Xr(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function L4(t){return Of(jc(t)).left+I4(t).scrollLeft}function poe(t){var e=Xr(t),n=jc(t),s=e.visualViewport,i=n.clientWidth,o=n.clientHeight,r=0,a=0;return s&&(i=s.width,o=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=s.offsetLeft,a=s.offsetTop)),{width:i,height:o,x:r+L4(t),y:a}}function moe(t){var e,n=jc(t),s=I4(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Yu(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=Yu(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+L4(t),l=-s.scrollTop;return vl(i||n).direction==="rtl"&&(a+=Yu(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function O4(t){var e=vl(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function $D(t){return["html","body","#document"].indexOf(Ca(t))>=0?t.ownerDocument.body:cr(t)&&O4(t)?t:$D(z_(t))}function Jm(t,e){var n;e===void 0&&(e=[]);var s=$D(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Xr(s),r=i?[o].concat(o.visualViewport||[],O4(s)?s:[]):s,a=e.concat(r);return i?a:a.concat(Jm(z_(r)))}function jx(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function goe(t){var e=Of(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function f$(t,e){return e===yD?jx(poe(t)):If(e)?goe(e):jx(moe(jc(t)))}function voe(t){var e=Jm(z_(t)),n=["absolute","fixed"].indexOf(vl(t).position)>=0,s=n&&cr(t)?L1(t):t;return If(s)?e.filter(function(i){return If(i)&&_D(i,s)&&Ca(i)!=="body"}):[]}function yoe(t,e,n){var s=e==="clippingParents"?voe(t):[].concat(e),i=[].concat(s,[n]),o=i[0],r=i.reduce(function(a,l){var c=f$(t,l);return a.top=Yu(c.top,a.top),a.right=pb(c.right,a.right),a.bottom=pb(c.bottom,a.bottom),a.left=Yu(c.left,a.left),a},f$(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function AD(t){var e=t.reference,n=t.element,s=t.placement,i=s?ba(s):null,o=s?Df(s):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case co:l={x:r,y:e.y-n.height};break;case gr:l={x:r,y:e.y+e.height};break;case vr:l={x:e.x+e.width,y:a};break;case uo:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?P4(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Pf:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Wg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Yg(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,o=n.boundary,r=o===void 0?zie:o,a=n.rootBoundary,l=a===void 0?yD:a,c=n.elementContext,u=c===void 0?Wp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=xD(typeof p!="number"?p:kD(p,I1)),b=u===Wp?Hie:Wp,_=t.rects.popper,x=t.elements[h?b:u],k=yoe(If(x)?x:x.contextElement||jc(t.elements.popper),r,l),C=Of(t.elements.reference),S=AD({reference:C,element:_,strategy:"absolute",placement:i}),E=jx(Object.assign({},_,S)),P=u===Wp?E:C,T={top:k.top-P.top+m.top,bottom:P.bottom-k.bottom+m.bottom,left:k.left-P.left+m.left,right:P.right-k.right+m.right},L=t.modifiersData.offset;if(u===Wp&&L){var I=L[i];Object.keys(T).forEach(function(V){var R=[vr,gr].indexOf(V)>=0?1:-1,N=[co,gr].indexOf(V)>=0?"y":"x";T[V]+=I[N]*R})}return T}function boe(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?lp:l,u=Df(s),d=u?a?c$:c$.filter(function(p){return Df(p)===u}):I1,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=Yg(t,{placement:m,boundary:i,rootBoundary:o,padding:r})[ba(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function _oe(t){if(ba(t)===E4)return[];var e=T0(t);return[h$(t),e,h$(e)]}function woe(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,b=e.options.placement,_=ba(b),x=_===b,k=l||(x||!p?[T0(b)]:_oe(b)),C=[b].concat(k).reduce(function(ae,ve){return ae.concat(ba(ve)===E4?boe(e,{placement:ve,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ve)},[]),S=e.rects.reference,E=e.rects.popper,P=new Map,T=!0,L=C[0],I=0;I<C.length;I++){var V=C[I],R=ba(V),N=Df(V)===Pf,F=[co,gr].indexOf(R)>=0,B=F?"width":"height",G=Yg(e,{placement:V,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),q=F?N?vr:uo:N?gr:co;S[B]>E[B]&&(q=T0(q));var X=T0(q),K=[];if(o&&K.push(G[R]<=0),a&&K.push(G[q]<=0,G[X]<=0),K.every(function(ae){return ae})){L=V,T=!1;break}P.set(V,K)}if(T)for(var H=p?3:1,Q=function(ae){var ve=C.find(function(ke){var oe=P.get(ke);if(oe)return oe.slice(0,ae).every(function(fe){return fe})});if(ve)return L=ve,"break"},se=H;se>0;se--){var Z=Q(se);if(Z==="break")break}e.placement!==L&&(e.modifiersData[s]._skip=!0,e.placement=L,e.reset=!0)}}var xoe={name:"flip",enabled:!0,phase:"main",fn:woe,requiresIfExists:["offset"],data:{_skip:!1}};function p$(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function m$(t){return[co,vr,gr,uo].some(function(e){return t[e]>=0})}function koe(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=Yg(e,{elementContext:"reference"}),a=Yg(e,{altBoundary:!0}),l=p$(r,s),c=p$(a,i,o),u=m$(l),d=m$(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var Coe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:koe};function Soe(t,e,n){var s=ba(t),i=[uo,co].indexOf(s)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[uo,vr].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function $oe(t){var e=t.state,n=t.options,s=t.name,i=n.offset,o=i===void 0?[0,0]:i,r=lp.reduce(function(u,d){return u[d]=Soe(d,e.rects,o),u},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[s]=r}var Aoe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$oe};function Eoe(t){var e=t.state,n=t.name;e.modifiersData[n]=AD({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var ED={name:"popperOffsets",enabled:!0,phase:"read",fn:Eoe,data:{}};function Moe(t){return t==="x"?"y":"x"}function Toe(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,b=Yg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),_=ba(e.placement),x=Df(e.placement),k=!x,C=P4(_),S=Moe(C),E=e.modifiersData.popperOffsets,P=e.rects.reference,T=e.rects.popper,L=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,I=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(E){if(o){var N,F=C==="y"?co:uo,B=C==="y"?gr:vr,G=C==="y"?"height":"width",q=E[C],X=q+b[F],K=q-b[B],H=f?-T[G]/2:0,Q=x===Pf?P[G]:T[G],se=x===Pf?-T[G]:-P[G],Z=e.elements.arrow,ae=f&&Z?T4(Z):{width:0,height:0},ve=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:wD(),ke=ve[F],oe=ve[B],fe=Zm(0,P[G],ae[G]),ie=k?P[G]/2-H-fe-ke-I.mainAxis:Q-fe-ke-I.mainAxis,re=k?-P[G]/2+H+fe+oe+I.mainAxis:se+fe+oe+I.mainAxis,Se=e.elements.arrow&&L1(e.elements.arrow),je=Se?C==="y"?Se.clientTop||0:Se.clientLeft||0:0,ee=(N=V==null?void 0:V[C])!=null?N:0,ne=q+ie-ee-je,pe=q+re-ee,$e=Zm(f?pb(X,ne):X,q,f?Yu(K,pe):K);E[C]=$e,R[C]=$e-q}if(a){var Ce,Pe=C==="x"?co:uo,Ue=C==="x"?gr:vr,Fe=E[S],ze=S==="y"?"height":"width",De=Fe+b[Pe],ct=Fe-b[Ue],Qe=[co,uo].indexOf(_)!==-1,ot=(Ce=V==null?void 0:V[S])!=null?Ce:0,be=Qe?De:Fe-P[ze]-T[ze]-ot+I.altAxis,me=Qe?Fe+P[ze]+T[ze]-ot-I.altAxis:ct,Me=f&&Qe?soe(be,Fe,me):Zm(f?be:De,Fe,f?me:ct);E[S]=Me,R[S]=Me-Fe}e.modifiersData[s]=R}}var Poe={name:"preventOverflow",enabled:!0,phase:"main",fn:Toe,requiresIfExists:["offset"]};function Ioe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Loe(t){return t===Xr(t)||!cr(t)?I4(t):Ioe(t)}function Ooe(t){var e=t.getBoundingClientRect(),n=Lf(e.width)/t.offsetWidth||1,s=Lf(e.height)/t.offsetHeight||1;return n!==1||s!==1}function Doe(t,e,n){n===void 0&&(n=!1);var s=cr(e),i=cr(e)&&Ooe(e),o=jc(e),r=Of(t,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((Ca(e)!=="body"||O4(o))&&(a=Loe(e)),cr(e)?(l=Of(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=L4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Roe(t){var e=new Map,n=new Set,s=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),s.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),s}function Voe(t){var e=Roe(t);return Jie.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function Foe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Noe(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var g$={placement:"bottom",modifiers:[],strategy:"absolute"};function v$(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function D4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,s=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?g$:i;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},g$,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,h={state:c,setOptions:function(m){var b=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,b),c.scrollParents={reference:If(r)?Jm(r):r.contextElement?Jm(r.contextElement):[],popper:Jm(a)};var _=Voe(Noe([].concat(s,c.options.modifiers)));return c.orderedModifiers=_.filter(function(x){return x.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,b=m.reference,_=m.popper;if(v$(b,_)){c.rects={reference:Doe(b,L1(_),c.options.strategy==="fixed"),popper:T4(_)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(T){return c.modifiersData[T.name]=Object.assign({},T.data)});for(var x=0;x<c.orderedModifiers.length;x++){if(c.reset===!0){c.reset=!1,x=-1;continue}var k=c.orderedModifiers[x],C=k.fn,S=k.options,E=S===void 0?{}:S,P=k.name;typeof C=="function"&&(c=C({state:c,options:E,name:P,instance:h})||c)}}}},update:Foe(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!v$(r,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function f(){c.orderedModifiers.forEach(function(m){var b=m.name,_=m.options,x=_===void 0?{}:_,k=m.effect;if(typeof k=="function"){var C=k({state:c,name:b,instance:h,options:x}),S=function(){};u.push(C||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}D4();var Boe=[SD,ED,CD,bD];D4({defaultModifiers:Boe});var zoe=[SD,ED,CD,bD,Aoe,xoe,Poe,aoe,Coe],Hoe=D4({defaultModifiers:zoe});const Uoe=(t,e,n={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=joe(l);Object.assign(r.value,c)},requires:["computeStyles"]},i=z(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=M(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],s,{name:"applyStyles",enabled:!1}]}}),o=Zn(),r=J({styles:{popper:{position:M(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Ee(i,l=>{const c=M(o);c&&c.setOptions(l)},{deep:!0}),Ee([t,e],([l,c])=>{a(),!(!l||!c)&&(o.value=Hoe(l,c,M(i)))}),_n(()=>{a()}),{state:z(()=>{var l;return{...((l=M(o))==null?void 0:l.state)||{}}}),styles:z(()=>M(r).styles),attributes:z(()=>M(r).attributes),update:()=>{var l;return(l=M(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=M(o))==null?void 0:l.forceUpdate()},instanceRef:z(()=>M(o))}};function joe(t){const e=Object.keys(t.elements);return{styles:Tf(e.map(n=>[n,t.styles[n]||{}])),attributes:Tf(e.map(n=>[n,t.attributes[n]]))}}const R4=t=>{if(!t)return{onClick:Lt,onMousedown:Lt,onMouseup:Lt};let e=!1,n=!1;return{onClick:r=>{e&&n&&t(r),e=n=!1},onMousedown:r=>{e=r.target===r.currentTarget},onMouseup:r=>{n=r.target===r.currentTarget}}},Woe=(t,e=0)=>{if(e===0)return t;const n=J(yt(e)&&!!e.initVal);let s=null;const i=r=>{if(bn(r)){n.value=t.value;return}s&&clearTimeout(s),s=setTimeout(()=>{n.value=t.value},r)},o=r=>{r==="leading"?wt(e)?i(e):i(e.leading):yt(e)?i(e.trailing):n.value=!1};return Vt(()=>o("leading")),Ee(()=>t.value,r=>{o(r?"leading":"trailing")}),n};function y$(){let t;const e=(s,i)=>{n(),t=window.setTimeout(s,i)},n=()=>window.clearTimeout(t);return Md(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Wx={prefix:Math.floor(Math.random()*1e4),current:0},Yoe=Symbol("elIdInjection"),V4=()=>ht()?He(Yoe,Wx):Wx,yr=t=>{const e=V4();!qt&&e===Wx&&Pt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
44 usage: app.provide(ID_INJECTION_KEY, {
45 prefix: number,
46 current: number,
47 })`);const n=$4();return sD(()=>M(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let wh=[];const b$=t=>{hs(t)===Ye.esc&&wh.forEach(e=>e(t))},qoe=t=>{Vt(()=>{wh.length===0&&document.addEventListener("keydown",b$),qt&&wh.push(t)}),_n(()=>{wh=wh.filter(e=>e!==t),wh.length===0&&qt&&document.removeEventListener("keydown",b$)})},MD=()=>{const t=$4(),e=V4(),n=z(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:z(()=>`#${n.value}`)}},Goe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},Xoe=()=>{const{id:t,selector:e}=MD();return Sd(()=>{qt&&(document.body.querySelector(e.value)||Goe(t.value))}),{id:t,selector:e}},Koe=We({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),Zoe=({showAfter:t,hideAfter:e,autoClose:n,open:s,close:i})=>{const{registerTimeout:o}=y$(),{registerTimeout:r,cancelTimeout:a}=y$();return{onOpen:(u,d=M(t))=>{o(()=>{s(u);const h=M(n);wt(h)&&h>0&&r(()=>{i(u)},h)},d)},onClose:(u,d=M(e))=>{a(),o(()=>{i(u)},d)}}},TD=Symbol("elForwardRef"),Joe=t=>{Et(TD,{setForwardRef:n=>{t.value=n}})},Qoe=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),_$={current:0},w$=J(0),PD=2e3,x$=Symbol("elZIndexContextKey"),ID=Symbol("zIndexContextKey"),H_=t=>{const e=ht()?He(x$,_$):_$,n=t||(ht()?He(ID,void 0):void 0),s=z(()=>{const r=M(n);return wt(r)?r:PD}),i=z(()=>s.value+w$.value),o=()=>(e.current++,w$.value=e.current,i.value);return!qt&&!He(x$)&&Pt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
48 usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,currentZIndex:i,nextZIndex:o}},k$=Math.min,Qm=Math.max,mb=Math.round,Oc=t=>({x:t,y:t}),ere={left:"right",right:"left",bottom:"top",top:"bottom"},tre={start:"end",end:"start"};function F4(t,e){return typeof t=="function"?t(e):t}function Rf(t){return t.split("-")[0]}function U_(t){return t.split("-")[1]}function nre(t){return t==="x"?"y":"x"}function LD(t){return t==="y"?"height":"width"}function qg(t){return["top","bottom"].includes(Rf(t))?"y":"x"}function OD(t){return nre(qg(t))}function sre(t,e,n){n===void 0&&(n=!1);const s=U_(t),i=OD(t),o=LD(i);let r=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=gb(r)),[r,gb(r)]}function ire(t){const e=gb(t);return[Yx(t),e,Yx(e)]}function Yx(t){return t.replace(/start|end/g,e=>tre[e])}function ore(t,e,n){const s=["left","right"],i=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:s:e?s:i;case"left":case"right":return e?o:r;default:return[]}}function rre(t,e,n,s){const i=U_(t);let o=ore(Rf(t),n==="start",s);return i&&(o=o.map(r=>r+"-"+i),e&&(o=o.concat(o.map(Yx)))),o}function gb(t){return t.replace(/left|right|bottom|top/g,e=>ere[e])}function are(t){return{top:0,right:0,bottom:0,left:0,...t}}function lre(t){return typeof t!="number"?are(t):{top:t,right:t,bottom:t,left:t}}function vb(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}function C$(t,e,n){let{reference:s,floating:i}=t;const o=qg(e),r=OD(e),a=LD(r),l=Rf(e),c=o==="y",u=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:s.y-i.height};break;case"bottom":f={x:u,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:d};break;case"left":f={x:s.x-i.width,y:d};break;default:f={x:s.x,y:s.y}}switch(U_(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const cre=async(t,e,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=C$(c,s,l),h=s,f={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:_}=a[m],{x,y:k,data:C,reset:S}=await _({x:u,y:d,initialPlacement:s,placement:h,strategy:i,middlewareData:f,rects:c,platform:r,elements:{reference:t,floating:e}});u=x??u,d=k??d,f={...f,[b]:{...f[b],...C}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:u,y:d}=C$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:f}};async function ure(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=F4(e,t),p=lre(f),b=a[h?d==="floating"?"reference":"floating":d],_=vb(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},S=vb(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:k,strategy:l}):x);return{top:(_.top-S.top+p.top)/C.y,bottom:(S.bottom-_.bottom+p.bottom)/C.y,left:(_.left-S.left+p.left)/C.x,right:(S.right-_.right+p.right)/C.x}}const dre=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:i,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=F4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const _=Rf(i),x=qg(a),k=Rf(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(k||!m?[gb(a)]:ire(a)),E=p!=="none";!h&&E&&S.push(...rre(a,m,p,C));const P=[a,...S],T=await ure(e,b),L=[];let I=((s=o.flip)==null?void 0:s.overflows)||[];if(u&&L.push(T[_]),d){const F=sre(i,r,C);L.push(T[F[0]],T[F[1]])}if(I=[...I,{placement:i,overflows:L}],!L.every(F=>F<=0)){var V,R;const F=(((V=o.flip)==null?void 0:V.index)||0)+1,B=P[F];if(B)return{data:{index:F,overflows:I},reset:{placement:B}};let G=(R=I.filter(q=>q.overflows[0]<=0).sort((q,X)=>q.overflows[1]-X.overflows[1])[0])==null?void 0:R.placement;if(!G)switch(f){case"bestFit":{var N;const q=(N=I.filter(X=>{if(E){const K=qg(X.placement);return K===x||K==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(K=>K>0).reduce((K,H)=>K+H,0)]).sort((X,K)=>X[1]-K[1])[0])==null?void 0:N[0];q&&(G=q);break}case"initialPlacement":G=a;break}if(i!==G)return{reset:{placement:G}}}return{}}}};async function hre(t,e){const{placement:n,platform:s,elements:i}=t,o=await(s.isRTL==null?void 0:s.isRTL(i.floating)),r=Rf(n),a=U_(n),l=qg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=F4(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const fre=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:i,y:o,placement:r,middlewareData:a}=e,l=await hre(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:r}}}}};function cp(t){return DD(t)?(t.nodeName||"").toLowerCase():"#document"}function Lo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Wc(t){var e;return(e=(DD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function DD(t){return t instanceof Node||t instanceof Lo(t).Node}function jr(t){return t instanceof Element||t instanceof Lo(t).Element}function Sa(t){return t instanceof HTMLElement||t instanceof Lo(t).HTMLElement}function S$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Lo(t).ShadowRoot}function O1(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=Wr(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!["inline","contents"].includes(i)}function pre(t){return["table","td","th"].includes(cp(t))}function j_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function N4(t){const e=B4(),n=jr(t)?Wr(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function mre(t){let e=Dc(t);for(;Sa(e)&&!Vf(e);){if(N4(e))return e;if(j_(e))return null;e=Dc(e)}return null}function B4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vf(t){return["html","body","#document"].includes(cp(t))}function Wr(t){return Lo(t).getComputedStyle(t)}function W_(t){return jr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dc(t){if(cp(t)==="html")return t;const e=t.assignedSlot||t.parentNode||S$(t)&&t.host||Wc(t);return S$(e)?e.host:e}function RD(t){const e=Dc(t);return Vf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Sa(e)&&O1(e)?e:RD(e)}function qx(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=RD(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=Lo(i);if(o){const a=Gx(r);return e.concat(r,r.visualViewport||[],O1(i)?i:[],a&&n?qx(a):[])}return e.concat(i,qx(i,[],n))}function Gx(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function VD(t){const e=Wr(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=Sa(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=mb(n)!==o||mb(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function FD(t){return jr(t)?t:t.contextElement}function ef(t){const e=FD(t);if(!Sa(e))return Oc(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=VD(e);let r=(o?mb(n.width):n.width)/s,a=(o?mb(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const gre=Oc(0);function ND(t){const e=Lo(t);return!B4()||!e.visualViewport?gre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function vre(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Lo(t)?!1:e}function Gg(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=FD(t);let r=Oc(1);e&&(s?jr(s)&&(r=ef(s)):r=ef(t));const a=vre(o,n,s)?ND(o):Oc(0);let l=(i.left+a.x)/r.x,c=(i.top+a.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(o){const h=Lo(o),f=s&&jr(s)?Lo(s):s;let p=h,m=Gx(p);for(;m&&s&&f!==p;){const b=ef(m),_=m.getBoundingClientRect(),x=Wr(m),k=_.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,C=_.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=k,c+=C,p=Lo(m),m=Gx(p)}}return vb({width:u,height:d,x:l,y:c})}function yre(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=Wc(s),a=e?j_(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Oc(1);const u=Oc(0),d=Sa(s);if((d||!d&&!o)&&((cp(s)!=="body"||O1(r))&&(l=W_(s)),Sa(s))){const h=Gg(s);c=ef(s),u.x=h.x+s.clientLeft,u.y=h.y+s.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function bre(t){return Array.from(t.getClientRects())}function BD(t){return Gg(Wc(t)).left+W_(t).scrollLeft}function _re(t){const e=Wc(t),n=W_(t),s=t.ownerDocument.body,i=Qm(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Qm(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+BD(t);const a=-n.scrollTop;return Wr(s).direction==="rtl"&&(r+=Qm(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}function wre(t,e){const n=Lo(t),s=Wc(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=B4();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a,y:l}}function xre(t,e){const n=Gg(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=Sa(t)?ef(t):Oc(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=s*o.y;return{width:r,height:a,x:l,y:c}}function $$(t,e,n){let s;if(e==="viewport")s=wre(t,n);else if(e==="document")s=_re(Wc(t));else if(jr(e))s=xre(e,n);else{const i=ND(t);s={...e,x:e.x-i.x,y:e.y-i.y}}return vb(s)}function zD(t,e){const n=Dc(t);return n===e||!jr(n)||Vf(n)?!1:Wr(n).position==="fixed"||zD(n,e)}function kre(t,e){const n=e.get(t);if(n)return n;let s=qx(t,[],!1).filter(a=>jr(a)&&cp(a)!=="body"),i=null;const o=Wr(t).position==="fixed";let r=o?Dc(t):t;for(;jr(r)&&!Vf(r);){const a=Wr(r),l=N4(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||O1(r)&&!l&&zD(t,r))?s=s.filter(u=>u!==r):i=a,r=Dc(r)}return e.set(t,s),s}function Cre(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?j_(e)?[]:kre(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((c,u)=>{const d=$$(e,u,i);return c.top=Qm(d.top,c.top),c.right=k$(d.right,c.right),c.bottom=k$(d.bottom,c.bottom),c.left=Qm(d.left,c.left),c},$$(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sre(t){const{width:e,height:n}=VD(t);return{width:e,height:n}}function $re(t,e,n){const s=Sa(e),i=Wc(e),o=n==="fixed",r=Gg(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Oc(0);if(s||!s&&!o)if((cp(e)!=="body"||O1(i))&&(a=W_(e)),s){const d=Gg(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=BD(i));const c=r.left+a.scrollLeft-l.x,u=r.top+a.scrollTop-l.y;return{x:c,y:u,width:r.width,height:r.height}}function ww(t){return Wr(t).position==="static"}function A$(t,e){return!Sa(t)||Wr(t).position==="fixed"?null:e?e(t):t.offsetParent}function HD(t,e){const n=Lo(t);if(j_(t))return n;if(!Sa(t)){let i=Dc(t);for(;i&&!Vf(i);){if(jr(i)&&!ww(i))return i;i=Dc(i)}return n}let s=A$(t,e);for(;s&&pre(s)&&ww(s);)s=A$(s,e);return s&&Vf(s)&&ww(s)&&!N4(s)?n:s||mre(t)||n}const Are=async function(t){const e=this.getOffsetParent||HD,n=this.getDimensions,s=await n(t.floating);return{reference:$re(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ere(t){return Wr(t).direction==="rtl"}const Mre={convertOffsetParentRelativeRectToViewportRelativeRect:yre,getDocumentElement:Wc,getClippingRect:Cre,getOffsetParent:HD,getElementRects:Are,getClientRects:bre,getDimensions:Sre,getScale:ef,isElement:jr,isRTL:Ere},Xx=fre,Kx=dre,Zx=(t,e,n)=>{const s=new Map,i={platform:Mre,...n},o={...i.platform,_c:s};return cre(t,e,{...i,platform:o})};function Tre(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:o,value:r}=t.value;i==null||o==null||(e={selectionStart:i,selectionEnd:o,value:r,beforeTxt:r.slice(0,Math.max(0,i)),afterTxt:r.slice(Math.max(0,o))})}function s(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:o,afterTxt:r,selectionStart:a}=e;if(o==null||r==null||a==null)return;let l=i.length;if(i.endsWith(r))l=i.length-r.length;else if(i.startsWith(o))l=o.length;else{const c=o[a-1],u=i.indexOf(c,a-1);u!==-1&&(l=u+1)}t.value.setSelectionRange(l,l)}return[n,s]}let xw=function(t){return t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t}({});function Pre(t){return is(t)&&t.type===Xn}const vc=t=>{const e=Ae(t)?t:[t],n=[];return e.forEach(s=>{var i;Ae(s)?n.push(...vc(s)):is(s)&&((i=s.component)!=null&&i.subTree)?n.push(s,...vc(s.component.subTree)):is(s)&&Ae(s.children)?n.push(...vc(s.children)):is(s)&&s.shapeFlag===2?n.push(...vc(s.type())):n.push(s)}),n},Ire=(t,e,n)=>vc(t.subTree).filter(s=>{var i;return is(s)&&((i=s.type)==null?void 0:i.name)===e&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),Lre=(t,e)=>{const n=Zn({}),s=Zn([]),i=new WeakMap,o=c=>{n.value[c.uid]=c,Bm(n),Vt(()=>{const u=c.getVnode().el,d=u.parentNode;if(!i.has(d)){i.set(d,[]);const h=d.insertBefore.bind(d);d.insertBefore=(f,p)=>(i.get(d).some(m=>f===m||p===m)&&Bm(n),h(f,p))}i.get(d).push(u)})},r=c=>{delete n.value[c.uid],Bm(n);const u=c.getVnode().el,d=u.parentNode,h=i.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{s.value=Ire(t,e,n.value)},l=c=>c.render();return{children:s,addChild:o,removeChild:r,ChildrenSorter:he({setup(c,{slots:u}){return()=>(a(),u.default?vt(l,{render:u.default}):null)}})}},go=N_({type:String,values:kl,required:!1}),UD=Symbol("size"),jD=()=>{const t=He(UD,{});return z(()=>M(t.size)||"")};function D1(t,{disabled:e,beforeFocus:n,afterFocus:s,beforeBlur:i,afterBlur:o}={}){const{emit:r}=ht(),a=Zn(),l=J(!1),c=h=>{const f=Je(n)?n(h):!1;M(e)||l.value||f||(l.value=!0,r("focus",h),s==null||s())},u=h=>{var p;const f=Je(i)?i(h):!1;M(e)||h.relatedTarget&&((p=a.value)!=null&&p.contains(h.relatedTarget))||f||(l.value=!1,r("blur",h),o==null||o())},d=h=>{var f,p;M(e)||Ug(h.target)||(f=a.value)!=null&&f.contains(document.activeElement)&&a.value!==document.activeElement||(p=t.value)==null||p.focus()};return Ee([a,()=>M(e)],([h,f])=>{h&&(f?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),Bn(a,"focus",c,!0),Bn(a,"blur",u,!0),Bn(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function WD({afterComposition:t,emit:e}){const n=J(!1),s=a=>{e==null||e("compositionstart",a),n.value=!0},i=a=>{e==null||e("compositionupdate",a),n.value=!0},o=a=>{e==null||e("compositionend",a),n.value&&(n.value=!1,st(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):i(a)},handleCompositionStart:s,handleCompositionUpdate:i,handleCompositionEnd:o}}const YD=Symbol("emptyValuesContextKey"),Ore="use-empty-values",Dre=["",void 0,null],Rre=void 0,R1=We({emptyValues:Array,valueOnClear:{type:de([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=Je(t)?t():t,Ae(t)?t.every(e=>!e):!t)}}),z4=(t,e)=>{const n=ht()?He(YD,J({})):J({}),s=z(()=>t.emptyValues||n.value.emptyValues||Dre),i=z(()=>Je(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:Je(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:Rre),o=r=>{let a=!0;return Ae(r)?a=s.value.some(l=>zi(r,l)):a=s.value.includes(r),a};return o(i.value)||Pt(Ore,"value-on-clear should be a value of empty-values"),{emptyValues:s,valueOnClear:i,isEmptyValue:o}},Vre=We({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),wr=t=>_4(Vre,t),qD=t=>{const e=t.props,n=Ae(e)?Tf(e.map(s=>[s,{}])):e;t.setPropsDefaults=s=>{if(n){for(const[i,o]of Object.entries(s)){const r=n[i];if(Ft(n,i)){if(v4(r)){n[i]={...r,default:o};continue}n[i]={type:r,default:o}}}t.props=n}}},Wt=(t,e)=>{if(t.install=n=>{for(const s of[t,...Object.values(e??{})])n.component(s.name,s)},e)for(const[n,s]of Object.entries(e))t[n]=s;return qD(t),t},Fre=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Nre=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Ps=t=>(t.install=Lt,qD(t),t);var Bre=he({__name:"teleport",props:x4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(Ta,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),zre=Bre;const Y_=Wt(zre);/*! Element Plus Icons Vue v2.3.2 */var Hre=he({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496"})]))}}),Ure=Hre,jre=he({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Td=jre,Wre=he({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0"})]))}}),Yre=Wre,qre=he({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),dd=qre,Gre=he({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Rr=Gre,Xre=he({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),q_=Xre,Kre=he({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),Zre=Kre,Jre=he({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),g("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),GD=Jre,Qre=he({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),g("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),g("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),eae=Qre,tae=he({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),nae=tae,sae=he({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),iae=sae,oae=he({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),rae=oae,aae=he({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),lae=aae,cae=he({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),g("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),uae=cae,dae=he({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),g("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),hae=dae,fae=he({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),H4=fae,pae=he({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),g("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),U4=pae,mae=he({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),XD=mae,gae=he({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Pd=gae,vae=he({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),g("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),KD=vae,yae=he({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496"})]))}}),j4=yae,bae=he({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),br=bae,_ae=he({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),wae=_ae,xae=he({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),g("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),ZD=xae,kae=he({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),Rc=kae,Cae=he({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Vc=Cae,Sae=he({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),$ae=Sae,Aae=he({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),JD=Aae,Eae=he({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),V1=Eae,Mae=he({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Tae=Mae,Pae=he({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),Iae=Pae,Lae=he({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),g("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),QD=Lae,Oae=he({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),Dae=Oae,Rae=he({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),eR=Rae,Vae=he({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),g("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),Fae=Vae,Nae=he({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),g("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),tR=Nae,Bae=he({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),zae=Bae,Hae=he({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),Uae=Hae,jae=he({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),yl=jae,Wae=he({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),Yae=Wae,qae=he({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),nR=qae,Gae=he({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Ff=Gae,Xae=he({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),g("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),Kae=Xae,Zae=he({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),g("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),g("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),Jae=Zae,Qae=he({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),g("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224z"})]))}}),ele=Qae,tle=he({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),nle=tle,sle=he({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),g("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.06 29.06 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),g("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),ile=sle,ole=he({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),Jx=ole,rle=he({name:"More",__name:"more",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),ale=rle,lle=he({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),cle=lle,ule=he({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),dle=ule,hle=he({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),fle=hle,ple=he({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),mle=ple,gle=he({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),W4=gle,vle=he({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),g("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),yle=vle,ble=he({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36"}),g("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),_le=ble,wle=he({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),sR=wle,xle=he({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),kle=xle,Cle=he({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),Sle=Cle,$le=he({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),G_=$le,Ale=he({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Y4=Ale,Ele=he({name:"SwitchButton",__name:"switch-button",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128"}),g("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}}),Mle=Ele,Tle=he({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),Ple=Tle,Ile=he({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),g("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),Lle=Ile,Ole=he({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),Dle=Ole,Rle=he({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.81 239.81 0 0 1 512 192a239.87 239.87 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),q4=Rle,Vle=he({name:"View",__name:"view",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),iR=Vle,Fle=he({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),G4=Fle,Nle=he({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),oR=Nle,Ble=he({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),zle=Ble;const ds=de([String,Object,Function]),Hle={Close:br},rR={Close:br,SuccessFilled:Y4,InfoFilled:yl,WarningFilled:G4,CircleCloseFilled:XD},Nf={primary:yl,success:Y4,warning:G4,error:XD,info:yl},aR={validating:Ff,success:U4,error:Pd},Ule=["light","dark"],jle=We({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:fb(Nf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Ule,default:"light"}}),Wle={close:t=>t instanceof MouseEvent},Yle=We({size:{type:de([Number,String])},color:{type:String}});var qle=he({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Yle,setup(t){const e=t,n=Ne("icon"),s=z(()=>{const{size:i,color:o}=e,r=ui(i);return!r&&!o?{}:{fontSize:r,"--color":o}});return(i,o)=>(v(),A("i",Kt({class:M(n).b(),style:s.value},i.$attrs),[le(i.$slots,"default")],16))}}),Gle=qle;const _e=Wt(Gle);var Xle=he({name:"ElAlert",__name:"alert",props:jle,emits:Wle,setup(t,{emit:e}){const{Close:n}=rR,s=t,i=e,o=Gi(),r=Ne("alert"),a=J(!0),l=z(()=>Nf[s.type]),c=z(()=>{var h;if(s.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?vc(d).some(f=>!Pre(f)):!1}),u=d=>{a.value=!1,i("close",d)};return(d,h)=>(v(),D(Vo,{name:M(r).b("fade"),persisted:""},{default:w(()=>[Oe(g("div",{class:U([M(r).b(),M(r).m(t.type),M(r).is("center",t.center),M(r).is(t.effect)]),role:"alert"},[t.showIcon&&(d.$slots.icon||l.value)?(v(),D(M(_e),{key:0,class:U([M(r).e("icon"),M(r).is("big",c.value)])},{default:w(()=>[le(d.$slots,"icon",{},()=>[(v(),D(kt(l.value)))])]),_:3},8,["class"])):O("v-if",!0),g("div",{class:U(M(r).e("content"))},[t.title||d.$slots.title?(v(),A("span",{key:0,class:U([M(r).e("title"),{"with-description":c.value}])},[le(d.$slots,"title",{},()=>[Y($(t.title),1)])],2)):O("v-if",!0),c.value?(v(),A("p",{key:1,class:U(M(r).e("description"))},[le(d.$slots,"default",{},()=>[Y($(t.description),1)])],2)):O("v-if",!0),t.closable?(v(),A(te,{key:2},[t.closeText?(v(),A("div",{key:0,class:U([M(r).e("close-btn"),M(r).is("customed")]),onClick:u},$(t.closeText),3)):(v(),D(M(_e),{key:1,class:U(M(r).e("close-btn")),onClick:u},{default:w(()=>[y(M(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[jt,a.value]])]),_:3},8,["name"]))}}),Kle=Xle;const Yc=Wt(Kle),lR=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],cR=We({role:{type:String,values:lR,default:"tooltip"}}),X4=Symbol("popper"),uR=Symbol("popperContent");var Zle=he({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=Ne("popper"),{arrowRef:s,arrowStyle:i}=He(uR,void 0);return _n(()=>{s.value=void 0}),e({arrowRef:s}),(o,r)=>(v(),A("span",{ref_key:"arrowRef",ref:s,class:U(M(n).e("arrow")),style:qe(M(i)),"data-popper-arrow":""},null,6))}}),Jle=Zle;const dR=We({virtualRef:{type:de(Object)},virtualTriggering:Boolean,onMouseenter:{type:de(Function)},onMouseleave:{type:de(Function)},onClick:{type:de(Function)},onKeydown:{type:de(Function)},onFocus:{type:de(Function)},onBlur:{type:de(Function)},onContextmenu:{type:de(Function)},id:String,open:Boolean}),kw="ElOnlyChild",hR=he({name:kw,setup(t,{slots:e,attrs:n}){var i;const s=Qoe(((i=He(TD))==null?void 0:i.setForwardRef)??Lt);return()=>{var l;const o=(l=e.default)==null?void 0:l.call(e,n);if(!o)return null;const[r,a]=fR(o);return r?(a>1&&Pt(kw,"requires exact only one valid child."),Oe(pr(r,n),[[s]])):(Pt(kw,"no valid child node found"),null)}}});function fR(t){if(!t)return[null,0];const e=t,n=e.filter(s=>s.type!==Xn).length;for(const s of e){if(yt(s))switch(s.type){case Xn:continue;case va:case"svg":return[E$(s),n];case te:return fR(s.children);default:return[s,n]}return[E$(s),n]}return[null,0]}function E$(t){const e=Ne("only-child");return y("span",{class:e.e("content")},[t])}var Qle=he({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:dR,setup(t,{expose:e}){const n=t,{role:s,triggerRef:i}=He(X4,void 0);Joe(i);const o=z(()=>a.value?n.id:void 0),r=z(()=>{if(s&&s.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=z(()=>{if(s&&s.value!=="tooltip")return s.value}),l=z(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Vt(()=>{Ee(()=>n.virtualRef,d=>{d&&(i.value=zs(d))},{immediate:!0}),Ee(i,(d,h)=>{c==null||c(),c=void 0,Eo(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Eo(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Ug(d)&&(c=Ee([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{li(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),Eo(h)&&Ug(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),_n(()=>{if(c==null||c(),c=void 0,i.value&&Eo(i.value)){const d=i.value;u.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(h))}),i.value=void 0}}),e({triggerRef:i}),(d,h)=>t.virtualTriggering?O("v-if",!0):(v(),D(M(hR),Kt({key:0},d.$attrs,{"aria-controls":o.value,"aria-describedby":r.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:w(()=>[le(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}),ece=Qle;const pR=We({arrowOffset:{type:Number,default:5}}),tce=["fixed","absolute"],nce=We({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:de(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:lp,default:"bottom"},popperOptions:{type:de(Object),default:()=>({})},strategy:{type:String,values:tce,default:"absolute"}}),mR=We({...nce,...pR,id:String,style:{type:de([String,Array,Object])},className:{type:de([String,Array,Object])},effect:{type:de(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:de([String,Array,Object])},popperStyle:{type:de([String,Array,Object])},referenceEl:{type:de(Object)},triggerTargetEl:{type:de(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...wr(["ariaLabel"]),loop:Boolean}),sce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},ice=We({size:{type:String,values:kl},disabled:Boolean}),oce=We({...ice,model:Object,rules:{type:de(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:de([Object,Boolean]),default:!0}}),rce={validate:(t,e,n)=>(Ae(t)||Ke(t))&&Kn(e)&&Ke(n)},Id=Symbol("formContextKey"),hd=Symbol("formItemContextKey"),ji=(t,e={})=>{const n=J(void 0),s=e.prop?n:vD("size"),i=e.global?n:jD(),o=e.form?{size:void 0}:He(Id,void 0),r=e.formItem?{size:void 0}:He(hd,void 0);return z(()=>s.value||M(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||i.value||"")},Cs=t=>{const e=vD("disabled"),n=He(Id,void 0);return z(()=>e.value??M(t)??(n==null?void 0:n.disabled)??!1)},No=()=>({form:He(Id,void 0),formItem:He(hd,void 0)}),qc=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:s})=>{n||(n=J(!1)),s||(s=J(!1));const i=ht(),o=()=>{let c=i==null?void 0:i.parent;for(;c;){if(c.type.name==="ElFormItem")return!1;if(c.type.name==="ElLabelWrap")return!0;c=c.parent}return!1},r=J();let a;const l=z(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return Vt(()=>{a=Ee([Cn(t,"id"),n],([c,u])=>{const d=c??(u?void 0:yr().value);d!==r.value&&(e!=null&&e.removeInputId&&!o()&&(r.value&&e.removeInputId(r.value),!(s!=null&&s.value)&&!u&&d&&e.addInputId(d)),r.value=d)},{immediate:!0})}),xl(()=>{a&&a(),e!=null&&e.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:l,inputId:r}},ace=["","error","validating","success"],lce=We({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:de([String,Array])},required:{type:Boolean,default:void 0},rules:{type:de([Object,Array])},error:String,validateStatus:{type:String,values:ace},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:kl}}),Yp=t=>Ae(t)?t[0]:t,oo=t=>!t&&t!==0?[]:Ae(t)?t:[t],cce="ElForm";function uce(){const t=J([]),e=z(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const r=t.value.indexOf(o);return r===-1&&e.value==="0"&&Pt(cce,`unexpected width ${o}`),r}function s(o,r){if(o&&r){const a=n(r);t.value.splice(a,1,o)}else o&&t.value.push(o)}function i(o){const r=n(o);r>-1&&t.value.splice(r,1)}return{autoLabelWidth:e,registerLabelWidth:s,deregisterLabelWidth:i}}const Wv=(t,e)=>{const n=si(e).map(s=>Ae(s)?s.join("."):s);return n.length>0?t.filter(s=>s.propString&&n.includes(s.propString)):t},eh="ElForm";var dce=he({name:eh,__name:"form",props:oce,emits:rce,setup(t,{expose:e,emit:n}){const s=t,i=n,o=J(),r=Dn([]),a=new Map,l=ji(),c=Ne("form"),u=z(()=>{const{labelPosition:P,inline:T}=s;return[c.b(),c.m(l.value||"default"),{[c.m(`label-${P}`)]:P,[c.m("inline")]:T}]}),d=P=>Wv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,Wu(P.fieldValue)))},f=P=>{P.prop&&r.splice(r.indexOf(P),1)},p=P=>{if(!s.model){Pt(eh,"model is required for setInitialValues to work.");return}if(!P){Pt(eh,"initModel is required for setInitialValues to work.");return}for(const T of a.keys())a.set(T,Wu(xc(P,T).value));r.forEach(T=>{T.prop&&T.setInitialValue(xc(P,T.prop).value)})},m=(P=[])=>{if(!s.model){Pt(eh,"model is required for resetFields to work.");return}Wv(r,P).forEach(I=>I.resetField());const T=new Set(r.map(I=>I.propString).filter(Boolean)),L=P.length>0?si(P).map(I=>Ae(I)?I.join("."):I):[...a.keys()];for(const I of L)!T.has(I)&&a.has(I)&&(xc(s.model,I).value=Wu(a.get(I)))},b=(P=[])=>{Wv(r,P).forEach(T=>T.clearValidate())},_=z(()=>{const P=!!s.model;return P||Pt(eh,"model is required for validate to work."),P}),x=P=>{if(r.length===0)return[];const T=Wv(r,P);return T.length?T:(Pt(eh,"please pass correct props!"),[])},k=async P=>S(void 0,P),C=async(P=[])=>{if(!_.value)return!1;const T=x(P);if(T.length===0)return!0;let L={};for(const I of T)try{await I.validate(""),I.validateState==="error"&&!I.error&&I.resetField()}catch(V){L={...L,...V}}return Object.keys(L).length===0?!0:Promise.reject(L)},S=async(P=[],T)=>{var V;let L=!1;const I=!Je(T);try{return L=await C(P),L===!0&&await(T==null?void 0:T(L)),L}catch(R){if(R instanceof Error)throw R;const N=R;return s.scrollToError&&o.value&&((V=o.value.querySelector(`.${c.b()}-item.is-error`))==null||V.scrollIntoView(s.scrollIntoViewOptions)),!L&&await(T==null?void 0:T(!1,N)),I&&Promise.reject(N)}},E=P=>{var L;const T=d(P);T&&((L=T.$el)==null||L.scrollIntoView(s.scrollIntoViewOptions))};return Ee(()=>s.rules,()=>{s.validateOnRuleChange&&k().catch(P=>Pt(P))},{deep:!0,flush:"post"}),Et(Id,Dn({...po(s),emit:i,resetFields:m,clearValidate:b,validateField:S,getField:d,addField:h,removeField:f,setInitialValues:p,...uce()})),e({validate:k,validateField:S,resetFields:m,clearValidate:b,scrollToField:E,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),A("form",{ref_key:"formRef",ref:o,class:U(u.value)},[le(P.$slots,"default")],2))}}),hce=dce;const M$="ElLabelWrap";var fce=he({name:M$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=He(Id,void 0),s=He(hd);s||mo(M$,"usage: <el-form-item><label-wrap /></el-form-item>");const i=Ne("form"),o=J(),r=J(0),a=()=>{var u;if((u=o.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(u="update")=>{st(()=>{e.default&&t.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Vt(()=>{c()}),_n(()=>{l("remove")}),wl(()=>c()),Ee(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Bs(z(()=>{var u;return((u=o.value)==null?void 0:u.firstElementChild)??null}),c),()=>{var d,h;if(!e)return null;const{isAutoWidth:u}=t;if(u){const f=n==null?void 0:n.autoLabelWidth,p=s==null?void 0:s.hasLabel,m={};if(p&&f&&f!=="auto"){const b=Math.max(0,Number.parseInt(f,10)-r.value),_=(s.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";b&&(m[_]=`${b}px`)}return y("div",{ref:o,class:[i.be("item","label-wrap")],style:m},[(d=e.default)==null?void 0:d.call(e)])}else return y(te,{ref:o},[(h=e.default)==null?void 0:h.call(e)])}}});function Mu(){return Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Mu.apply(this,arguments)}function pce(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xg(t,e)}function Qx(t){return Qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qx(t)}function Xg(t,e){return Xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,i){return s.__proto__=i,s},Xg(t,e)}function mce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P0(t,e,n){return mce()?P0=Reflect.construct.bind():P0=function(i,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(i,a),c=new l;return r&&Xg(c,r.prototype),c},P0.apply(null,arguments)}function gce(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ek(t){var e=typeof Map=="function"?new Map:void 0;return ek=function(s){if(s===null||!gce(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(s))return e.get(s);e.set(s,i)}function i(){return P0(s,arguments,Qx(this).constructor)}return i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Xg(i,s)},ek(t)}var vce=/%[sdj%]/g,yce=function(){};typeof process<"u"&&process.env;function tk(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var s=n.field;e[s]=e[s]||[],e[s].push(n)}),e}function Mo(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var r=t.replace(vce,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return r}return t}function bce(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Vs(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||bce(e)&&typeof t=="string"&&!t)}function _ce(t,e,n){var s=[],i=0,o=t.length;function r(a){s.push.apply(s,a||[]),i++,i===o&&n(s)}t.forEach(function(a){e(a,r)})}function T$(t,e,n){var s=0,i=t.length;function o(r){if(r&&r.length){n(r);return}var a=s;s=s+1,a<i?e(t[a],o):n([])}o([])}function wce(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var P$=function(t){pce(e,t);function e(n,s){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=s,i}return e}(ek(Error));function xce(t,e,n,s,i){if(e.first){var o=new Promise(function(h,f){var p=function(_){return s(_),_.length?f(new P$(_,tk(_))):h(i)},m=wce(t);T$(m,n,p)});return o.catch(function(h){return h}),o}var r=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,c=0,u=[],d=new Promise(function(h,f){var p=function(b){if(u.push.apply(u,b),c++,c===l)return s(u),u.length?f(new P$(u,tk(u))):h(i)};a.length||(s(u),h(i)),a.forEach(function(m){var b=t[m];r.indexOf(m)!==-1?T$(b,n,p):_ce(b,n,p)})});return d.catch(function(h){return h}),d}function kce(t){return!!(t&&t.message!==void 0)}function Cce(t,e){for(var n=t,s=0;s<e.length;s++){if(n==null)return n;n=n[e[s]]}return n}function I$(t,e){return function(n){var s;return t.fullFields?s=Cce(e,t.fullFields):s=e[n.field||t.fullField],kce(n)?(n.field=n.field||t.fullField,n.fieldValue=s,n):{message:typeof n=="function"?n():n,fieldValue:s,field:n.field||t.fullField}}}function L$(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var s=e[n];typeof s=="object"&&typeof t[n]=="object"?t[n]=Mu({},t[n],s):t[n]=s}}return t}var gR=function(e,n,s,i,o,r){e.required&&(!s.hasOwnProperty(e.field)||Vs(n,r||e.type))&&i.push(Mo(o.messages.required,e.fullField))},Sce=function(e,n,s,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Mo(o.messages.whitespace,e.fullField))},Yv,$ce=function(){if(Yv)return Yv;var t="[a-fA-F\\d:]",e=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",s="[a-fA-F\\d]{1,4}",i=(`
49 (?:
50 (?:`+s+":){7}(?:"+s+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
51 (?:`+s+":){6}(?:"+n+"|:"+s+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
52 (?:`+s+":){5}(?::"+n+"|(?::"+s+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
53 (?:`+s+":){4}(?:(?::"+s+"){0,1}:"+n+"|(?::"+s+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
54 (?:`+s+":){3}(?:(?::"+s+"){0,2}:"+n+"|(?::"+s+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
55 (?:`+s+":){2}(?:(?::"+s+"){0,3}:"+n+"|(?::"+s+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
56 (?:`+s+":){1}(?:(?::"+s+"){0,4}:"+n+"|(?::"+s+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
57 (?::(?:(?::`+s+"){0,5}:"+n+"|(?::"+s+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
58 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
59 `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),l=function(C){return C&&C.exact?o:new RegExp("(?:"+e(C)+n+e(C)+")|(?:"+e(C)+i+e(C)+")","g")};l.v4=function(k){return k&&k.exact?r:new RegExp(""+e(k)+n+e(k),"g")},l.v6=function(k){return k&&k.exact?a:new RegExp(""+e(k)+i+e(k),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,h=l.v6().source,f="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",_='(?:[/?#][^\\s"]*)?',x="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+b+_;return Yv=new RegExp("(?:^"+x+"$)","i"),Yv},O$={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},em={integer:function(e){return em.number(e)&&parseInt(e,10)===e},float:function(e){return em.number(e)&&!em.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!em.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(O$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match($ce())},hex:function(e){return typeof e=="string"&&!!e.match(O$.hex)}},Ace=function(e,n,s,i,o){if(e.required&&n===void 0){gR(e,n,s,i,o);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;r.indexOf(a)>-1?em[a](n)||i.push(Mo(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&i.push(Mo(o.messages.types[a],e.fullField,e.type))},Ece=function(e,n,s,i,o){var r=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",f=typeof n=="string",p=Array.isArray(n);if(h?d="number":f?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),f&&(u=n.replace(c,"_").length),r?u!==e.len&&i.push(Mo(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?i.push(Mo(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?i.push(Mo(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&i.push(Mo(o.messages[d].range,e.fullField,e.min,e.max))},th="enum",Mce=function(e,n,s,i,o){e[th]=Array.isArray(e[th])?e[th]:[],e[th].indexOf(n)===-1&&i.push(Mo(o.messages[th],e.fullField,e[th].join(", ")))},Tce=function(e,n,s,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(Mo(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var r=new RegExp(e.pattern);r.test(n)||i.push(Mo(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},dn={required:gR,whitespace:Sce,type:Ace,range:Ece,enum:Mce,pattern:Tce},Pce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n,"string")&&!e.required)return s();dn.required(e,n,i,r,o,"string"),Vs(n,"string")||(dn.type(e,n,i,r,o),dn.range(e,n,i,r,o),dn.pattern(e,n,i,r,o),e.whitespace===!0&&dn.whitespace(e,n,i,r,o))}s(r)},Ice=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&dn.type(e,n,i,r,o)}s(r)},Lce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&(dn.type(e,n,i,r,o),dn.range(e,n,i,r,o))}s(r)},Oce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&dn.type(e,n,i,r,o)}s(r)},Dce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),Vs(n)||dn.type(e,n,i,r,o)}s(r)},Rce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&(dn.type(e,n,i,r,o),dn.range(e,n,i,r,o))}s(r)},Vce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&(dn.type(e,n,i,r,o),dn.range(e,n,i,r,o))}s(r)},Fce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return s();dn.required(e,n,i,r,o,"array"),n!=null&&(dn.type(e,n,i,r,o),dn.range(e,n,i,r,o))}s(r)},Nce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&dn.type(e,n,i,r,o)}s(r)},Bce="enum",zce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o),n!==void 0&&dn[Bce](e,n,i,r,o)}s(r)},Hce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n,"string")&&!e.required)return s();dn.required(e,n,i,r,o),Vs(n,"string")||dn.pattern(e,n,i,r,o)}s(r)},Uce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n,"date")&&!e.required)return s();if(dn.required(e,n,i,r,o),!Vs(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),dn.type(e,l,i,r,o),l&&dn.range(e,l.getTime(),i,r,o)}}s(r)},jce=function(e,n,s,i,o){var r=[],a=Array.isArray(n)?"array":typeof n;dn.required(e,n,i,r,o,a),s(r)},Cw=function(e,n,s,i,o){var r=e.type,a=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Vs(n,r)&&!e.required)return s();dn.required(e,n,i,a,o,r),Vs(n,r)||dn.type(e,n,i,a,o)}s(a)},Wce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Vs(n)&&!e.required)return s();dn.required(e,n,i,r,o)}s(r)},eg={string:Pce,method:Ice,number:Lce,boolean:Oce,regexp:Dce,integer:Rce,float:Vce,array:Fce,object:Nce,enum:zce,pattern:Hce,date:Uce,url:Cw,hex:Cw,email:Cw,required:jce,any:Wce};function nk(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var sk=nk(),F1=function(){function t(n){this.rules=null,this._messages=sk,this.define(n)}var e=t.prototype;return e.define=function(s){var i=this;if(!s)throw new Error("Cannot configure a schema with no rules");if(typeof s!="object"||Array.isArray(s))throw new Error("Rules must be an object");this.rules={},Object.keys(s).forEach(function(o){var r=s[o];i.rules[o]=Array.isArray(r)?r:[r]})},e.messages=function(s){return s&&(this._messages=L$(nk(),s)),this._messages},e.validate=function(s,i,o){var r=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var a=s,l=i,c=o;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(m){var b=[],_={};function x(C){if(Array.isArray(C)){var S;b=(S=b).concat.apply(S,C)}else b.push(C)}for(var k=0;k<m.length;k++)x(m[k]);b.length?(_=tk(b),c(b,_)):c(null,a)}if(l.messages){var d=this.messages();d===sk&&(d=nk()),L$(d,l.messages),l.messages=d}else l.messages=this.messages();var h={},f=l.keys||Object.keys(this.rules);f.forEach(function(m){var b=r.rules[m],_=a[m];b.forEach(function(x){var k=x;typeof k.transform=="function"&&(a===s&&(a=Mu({},a)),_=a[m]=k.transform(_)),typeof k=="function"?k={validator:k}:k=Mu({},k),k.validator=r.getValidationMethod(k),k.validator&&(k.field=m,k.fullField=k.fullField||m,k.type=r.getType(k),h[m]=h[m]||[],h[m].push({rule:k,value:_,source:a,field:m}))})});var p={};return xce(h,l,function(m,b){var _=m.rule,x=(_.type==="object"||_.type==="array")&&(typeof _.fields=="object"||typeof _.defaultField=="object");x=x&&(_.required||!_.required&&m.value),_.field=m.field;function k(E,P){return Mu({},P,{fullField:_.fullField+"."+E,fullFields:_.fullFields?[].concat(_.fullFields,[E]):[E]})}function C(E){E===void 0&&(E=[]);var P=Array.isArray(E)?E:[E];!l.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&_.message!==void 0&&(P=[].concat(_.message));var T=P.map(I$(_,a));if(l.first&&T.length)return p[_.field]=1,b(T);if(!x)b(T);else{if(_.required&&!m.value)return _.message!==void 0?T=[].concat(_.message).map(I$(_,a)):l.error&&(T=[l.error(_,Mo(l.messages.required,_.field))]),b(T);var L={};_.defaultField&&Object.keys(m.value).map(function(R){L[R]=_.defaultField}),L=Mu({},L,m.rule.fields);var I={};Object.keys(L).forEach(function(R){var N=L[R],F=Array.isArray(N)?N:[N];I[R]=F.map(k.bind(null,R))});var V=new t(I);V.messages(l.messages),m.rule.options&&(m.rule.options.messages=l.messages,m.rule.options.error=l.error),V.validate(m.value,m.rule.options||l,function(R){var N=[];T&&T.length&&N.push.apply(N,T),R&&R.length&&N.push.apply(N,R),b(N.length?N:null)})}}var S;if(_.asyncValidator)S=_.asyncValidator(_,m.value,C,m.source,l);else if(_.validator){try{S=_.validator(_,m.value,C,m.source,l)}catch(E){console.error==null||console.error(E),l.suppressValidatorError||setTimeout(function(){throw E},0),C(E.message)}S===!0?C():S===!1?C(typeof _.message=="function"?_.message(_.fullField||_.field):_.message||(_.fullField||_.field)+" fails"):S instanceof Array?C(S):S instanceof Error&&C(S.message)}S&&S.then&&S.then(function(){return C()},function(E){return C(E)})},function(m){u(m)},a)},e.getType=function(s){if(s.type===void 0&&s.pattern instanceof RegExp&&(s.type="pattern"),typeof s.validator!="function"&&s.type&&!eg.hasOwnProperty(s.type))throw new Error(Mo("Unknown rule type %s",s.type));return s.type||"string"},e.getValidationMethod=function(s){if(typeof s.validator=="function")return s.validator;var i=Object.keys(s),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?eg.required:eg[this.getType(s)]||void 0},t}();F1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");eg[e]=n};F1.warning=yce;F1.messages=sk;F1.validators=eg;const Yce=["role","aria-labelledby"];var qce=he({name:"ElFormItem",__name:"form-item",props:lce,setup(t,{expose:e}){const n=t,s=Gi(),i=He(Id,void 0),o=He(hd,void 0),r=ji(void 0,{formItem:!1}),a=Ne("form-item"),l=yr().value,c=J([]),u=J(""),d=die(u,100),h=J(""),f=J();let p,m=!1;const b=z(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),_=z(()=>b.value==="top"?{}:{width:ui(n.labelWidth??(i==null?void 0:i.labelWidth))}),x=z(()=>{if(b.value==="top"||i!=null&&i.inline)return{};if(!n.label&&!n.labelWidth&&I)return{};const ie=ui(n.labelWidth??(i==null?void 0:i.labelWidth));return!n.label&&!s.label?{marginLeft:ie}:{}}),k=z(()=>[a.b(),a.m(r.value),a.is("error",u.value==="error"),a.is("validating",u.value==="validating"),a.is("success",u.value==="success"),a.is("required",B.value||n.required),a.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:i==null?void 0:i.statusIcon,[a.m(`label-${b.value}`)]:b.value}]),C=z(()=>Kn(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),S=z(()=>[a.e("error"),{[a.em("error","inline")]:C.value}]),E=z(()=>n.prop?Ae(n.prop)?n.prop.join("."):n.prop:""),P=z(()=>!!(n.label||s.label)),T=z(()=>n.for??(c.value.length===1?c.value[0]:void 0)),L=z(()=>!T.value&&P.value),I=!!o,V=z(()=>{const ie=i==null?void 0:i.model;if(!(!ie||!n.prop))return xc(ie,n.prop).value}),R=z(()=>{const{required:ie}=n,re=[];n.rules&&re.push(...si(n.rules));const Se=i==null?void 0:i.rules;if(Se&&n.prop){const je=xc(Se,n.prop).value;je&&re.push(...si(je))}if(ie!==void 0){const je=re.map((ee,ne)=>[ee,ne]).filter(([ee])=>"required"in ee);if(je.length>0)for(const[ee,ne]of je)ee.required!==ie&&(re[ne]={...ee,required:ie});else re.push({required:ie})}return re}),N=z(()=>R.value.length>0),F=ie=>R.value.filter(re=>!re.trigger||!ie?!0:Ae(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...Se})=>Se),B=z(()=>R.value.some(ie=>ie.required)),G=z(()=>d.value==="error"&&n.showMessage&&((i==null?void 0:i.showMessage)??!0)),q=z(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),X=ie=>{u.value=ie},K=ie=>{var je;const{errors:re,fields:Se}=ie;(!re||!Se)&&console.error(ie),X("error"),h.value=re?((je=re==null?void 0:re[0])==null?void 0:je.message)??`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,h.value)},H=()=>{X("success"),i==null||i.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=E.value;return new F1({[re]:ie}).validate({[re]:V.value},{firstFields:!0}).then(()=>(H(),!0)).catch(Se=>(K(Se),Promise.reject(Se)))},se=async(ie,re)=>{if(m||!n.prop)return!1;const Se=Je(re);if(!N.value)return re==null||re(!1),!1;const je=F(ie);return je.length===0?(re==null||re(!0),!0):(X("validating"),Q(je).then(()=>(re==null||re(!0),!0)).catch(ee=>{const{fields:ne}=ee;return re==null||re(!1,ne),Se?!1:Promise.reject(ne)}))},Z=()=>{X(""),h.value="",m=!1},ae=async()=>{const ie=i==null?void 0:i.model;if(!ie||!n.prop)return;const re=xc(ie,n.prop);m=!0,re.value=Wu(p),await st(),Z(),m=!1},ve=ie=>{c.value.includes(ie)||c.value.push(ie)},ke=ie=>{c.value=c.value.filter(re=>re!==ie)},oe=ie=>{p=Wu(ie)};Ee(()=>n.error,ie=>{h.value=ie||"",X(ie?"error":"")},{immediate:!0}),Ee(()=>n.validateStatus,ie=>X(ie||""));const fe=Dn({...po(n),$el:f,size:r,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:L,hasLabel:P,fieldValue:V,addInputId:ve,removeInputId:ke,resetField:ae,clearValidate:Z,validate:se,propString:E,setInitialValue:oe});return Et(hd,fe),Vt(()=>{n.prop&&(oe(V.value),i==null||i.addField(fe))}),_n(()=>{i==null||i.removeField(fe)}),e({size:r,validateMessage:h,validateState:u,validate:se,clearValidate:Z,resetField:ae,setInitialValue:oe}),(ie,re)=>{var Se;return v(),A("div",{ref_key:"formItemRef",ref:f,class:U(k.value),role:L.value?"group":void 0,"aria-labelledby":L.value?M(l):void 0},[y(M(fce),{"is-auto-width":_.value.width==="auto","update-all":((Se=M(i))==null?void 0:Se.labelWidth)==="auto"},{default:w(()=>[t.label||ie.$slots.label?(v(),D(kt(T.value?"label":"div"),{key:0,id:M(l),for:T.value,class:U(M(a).e("label")),style:qe(_.value)},{default:w(()=>[le(ie.$slots,"label",{label:q.value},()=>[Y($(q.value),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:U(M(a).e("content")),style:qe(x.value)},[le(ie.$slots,"default"),y(S_,{name:`${M(a).namespace.value}-zoom-in-top`},{default:w(()=>[G.value?le(ie.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:U(S.value)},$(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,Yce)}}}),vR=qce;const fn=Wt(hce,{FormItem:vR}),an=Ps(vR),Sw="focus-trap.focus-after-trapped",$w="focus-trap.focus-after-released",Gce="focus-trap.focusout-prevented",D$={cancelable:!0,bubbles:!1},Xce={cancelable:!0,bubbles:!1},R$="focusAfterTrapped",V$="focusAfterReleased",yR=Symbol("elFocusTrap"),K4=J(),X_=J(0),Z4=J(0);let qv=0;const bR=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0||s===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},F$=(t,e)=>{for(const n of t)if(!Kce(n,e))return n},Kce=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},Zce=t=>{const e=bR(t);return[F$(e,t),F$(e.reverse(),t)]},Jce=t=>t instanceof HTMLInputElement&&"select"in t,Bl=(t,e)=>{if(t){const n=document.activeElement;C4(t,{preventScroll:!0}),Z4.value=window.performance.now(),t!==n&&Jce(t)&&e&&t.select()}};function N$(t,e){const n=[...t],s=t.indexOf(e);return s!==-1&&n.splice(s,1),n}const Qce=()=>{let t=[];return{push:s=>{const i=t[0];i&&s!==i&&i.pause(),t=N$(t,s),t.unshift(s)},remove:s=>{var i,o;t=N$(t,s),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},eue=(t,e=!1)=>{const n=document.activeElement;for(const s of t)if(Bl(s,e),document.activeElement!==n)return},B$=Qce(),tue=()=>X_.value>Z4.value,Gv=()=>{K4.value="pointer",X_.value=window.performance.now()},z$=()=>{K4.value="keyboard",X_.value=window.performance.now()},nue=()=>(Vt(()=>{qv===0&&(document.addEventListener("mousedown",Gv),document.addEventListener("touchstart",Gv),document.addEventListener("keydown",z$)),qv++}),_n(()=>{qv--,qv<=0&&(document.removeEventListener("mousedown",Gv),document.removeEventListener("touchstart",Gv),document.removeEventListener("keydown",z$))}),{focusReason:K4,lastUserFocusTimestamp:X_,lastAutomatedFocusTimestamp:Z4}),Xv=t=>new CustomEvent(Gce,{...Xce,detail:t});var sue=he({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[R$,V$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let s,i;const{focusReason:o}=nue();qoe(p=>{t.trapped&&!r.paused&&e("release-requested",p)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!t.loop&&!t.trapped||r.paused)return;const{altKey:m,ctrlKey:b,metaKey:_,currentTarget:x,shiftKey:k}=p,{loop:C}=t,S=hs(p)===Ye.tab&&!m&&!b&&!_,E=document.activeElement;if(S&&E){const P=x,[T,L]=Zce(P);if(T&&L){if(!k&&E===L){const I=Xv({focusReason:o.value});e("focusout-prevented",I),I.defaultPrevented||(p.preventDefault(),C&&Bl(T,!0))}else if(k&&[T,P].includes(E)){const I=Xv({focusReason:o.value});e("focusout-prevented",I),I.defaultPrevented||(p.preventDefault(),C&&Bl(L,!0))}}else if(E===P){const I=Xv({focusReason:o.value});e("focusout-prevented",I),I.defaultPrevented||p.preventDefault()}}};Et(yR,{focusTrapRef:n,onKeydown:a}),Ee(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),Ee([n],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",u),p.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",u),m.removeEventListener("focusout",d))});const l=p=>{e(R$,p)},c=p=>e(V$,p),u=p=>{const m=M(n);if(!m)return;const b=p.target,_=p.relatedTarget,x=b&&m.contains(b);t.trapped||_&&m.contains(_)||(s=_),x&&e("focusin",p),!r.paused&&t.trapped&&(x?i=b:Bl(i,!0))},d=p=>{const m=M(n);if(!(r.paused||!m))if(t.trapped){const b=p.relatedTarget;!li(b)&&!m.contains(b)&&setTimeout(()=>{if(!r.paused&&t.trapped){const _=Xv({focusReason:o.value});e("focusout-prevented",_),_.defaultPrevented||Bl(i,!0)}},0)}else{const b=p.target;b&&m.contains(b)||e("focusout",p)}};async function h(){await st();const p=M(n);if(p){B$.push(r);const m=p.contains(document.activeElement)?s:document.activeElement;if(s=m,!p.contains(m)){const b=new Event(Sw,D$);p.addEventListener(Sw,l),p.dispatchEvent(b),b.defaultPrevented||st(()=>{let _=t.focusStartEl;Ke(_)||(Bl(_),document.activeElement!==_&&(_="first")),_==="first"&&eue(bR(p),!0),(document.activeElement===m||_==="container")&&Bl(p)})}}}function f(){const p=M(n);if(p){p.removeEventListener(Sw,l);const m=new CustomEvent($w,{...D$,detail:{focusReason:o.value}});p.addEventListener($w,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!tue()||p.contains(document.activeElement))&&Bl(s??document.body),p.removeEventListener($w,c),B$.remove(r),s=null,i=null}}return Vt(()=>{t.trapped&&h(),Ee(()=>t.trapped,p=>{p?h():f()})}),_n(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",u),n.value.removeEventListener("focusout",d),n.value=void 0),s=null,i=null}),{onKeydown:a}}}),hi=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n};function iue(t,e,n,s,i,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var oue=hi(sue,[["render",iue]]),N1=oue;const rue=(t,e=[])=>{const{placement:n,strategy:s,popperOptions:i}=t,o={placement:n,strategy:s,...i,modifiers:[...lue(t),...e]};return cue(o,i==null?void 0:i.modifiers),o},aue=t=>{if(qt)return zs(t)};function lue(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:s}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:s}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function cue(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const uue=0,due=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:s,role:i}=He(X4,void 0),o=J(),r=z(()=>t.arrowOffset),a=z(()=>({name:"eventListeners",enabled:!!t.visible})),l=z(()=>{const x=M(o),k=M(r)??uue;return{name:"arrow",enabled:!Dse(x),options:{element:x,padding:k}}}),c=z(()=>({onFirstUpdate:()=>{p()},...rue(t,[M(l),M(a)])})),u=z(()=>aue(t.referenceEl)||M(s)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:b}=Uoe(u,n,c);Ee(b,x=>e.value=x,{flush:"sync"}),Vt(()=>{Ee(()=>{var x,k;return(k=(x=M(u))==null?void 0:x.getBoundingClientRect)==null?void 0:k.call(x)},()=>{p()})});let _;return Ee(()=>t.visible,x=>{_==null||_(),_=void 0,x&&(_=Bs(n,p).stop)}),_n(()=>{e.value=void 0,_==null||_(),_=void 0}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:b,state:h,styles:f,role:i,forceUpdate:m,update:p}},hue=(t,{attributes:e,styles:n,role:s})=>{const{nextZIndex:i}=H_(),o=Ne("popper"),r=z(()=>M(e).popper),a=J(wt(t.zIndex)?t.zIndex:i()),l=z(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=z(()=>[{zIndex:M(a)},M(n).popper,t.popperStyle||{}]),u=z(()=>s.value==="dialog"?"false":void 0),d=z(()=>M(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=wt(t.zIndex)?t.zIndex:i()}}},fue=(t,e)=>{const n=J(!1),s=J(),i=()=>{e("focus")},o=c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(s.value="first",e("blur"))},r=c=>{t.visible&&!n.value&&(c.target&&(s.value=c.target),n.value=!0)},a=c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},l=()=>{n.value=!1,e("close")};return _n(()=>{s.value=void 0}),{focusStartRef:s,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:i,onFocusInTrap:r,onFocusoutPrevented:a,onReleaseRequested:l}};var pue=he({name:"ElPopperContent",__name:"content",props:mR,emits:sce,setup(t,{expose:e,emit:n}){const s=n,i=t,{focusStartRef:o,trapped:r,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=fue(i,s),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:b,role:_,update:x}=due(i),{ariaModal:k,arrowStyle:C,contentAttrs:S,contentClass:E,contentStyle:P,updateZIndex:T}=hue(i,{styles:m,attributes:h,role:_}),L=He(hd,void 0);Et(uR,{arrowStyle:C,arrowRef:f}),L&&Et(hd,{...L,addInputId:Lt,removeInputId:Lt});let I;const V=(N=!0)=>{x(),N&&T()},R=()=>{V(!1),i.visible&&i.focusOnShow?r.value=!0:i.visible===!1&&(r.value=!1)};return Vt(()=>{Ee(()=>i.triggerTargetEl,(N,F)=>{I==null||I(),I=void 0;const B=M(N||p.value),G=M(F||p.value);Eo(B)&&(I=Ee([_,()=>i.ariaLabel,k,()=>i.id],q=>{["role","aria-label","aria-modal","id"].forEach((X,K)=>{li(q[K])?B.removeAttribute(X):B.setAttribute(X,q[K])})},{immediate:!0})),G!==B&&Eo(G)&&["role","aria-label","aria-modal","id"].forEach(q=>{G.removeAttribute(q)})},{immediate:!0}),Ee(()=>i.visible,R,{immediate:!0})}),_n(()=>{I==null||I(),I=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:b,updatePopper:V,contentStyle:P}),(N,F)=>(v(),A("div",Kt({ref_key:"contentRef",ref:p},M(S),{style:M(P),class:M(E),tabindex:"-1",onMouseenter:F[0]||(F[0]=B=>N.$emit("mouseenter",B)),onMouseleave:F[1]||(F[1]=B=>N.$emit("mouseleave",B))}),[y(M(N1),{loop:t.loop,trapped:M(r),"trap-on-focus-in":!0,"focus-trap-el":M(p),"focus-start-el":M(o),onFocusAfterTrapped:M(l),onFocusAfterReleased:M(a),onFocusin:M(c),onFocusoutPrevented:M(u),onReleaseRequested:M(d)},{default:w(()=>[le(N.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),mue=pue,gue=he({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:cR,setup(t,{expose:e}){const n=t,s={triggerRef:J(),popperInstanceRef:J(),contentRef:J(),referenceRef:J(),role:z(()=>n.role)};return e(s),Et(X4,s),(i,o)=>le(i.$slots,"default")}}),vue=gue;const yue=Wt(vue),Nn=We({...Koe,...mR,appendTo:{type:x4.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:de(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...wr(["ariaLabel"])}),kc=We({...dR,disabled:Boolean,trigger:{type:de([String,Array]),default:"hover"},triggerKeys:{type:de(Array),default:()=>[Ye.enter,Ye.numpadEnter,Ye.space]},focusOnTarget:Boolean}),{useModelToggleProps:bue,useModelToggleEmits:_ue,useModelToggle:wue}=gD("visible"),xue=We({...cR,...bue,...Nn,...kc,...pR,showArrow:{type:Boolean,default:!0}}),kue=[..._ue,"before-show","before-hide","show","hide","open","close"],J4=Symbol("elTooltip"),ik=(t,e)=>Ae(t)?t.includes(e):t===e,nh=(t,e,n)=>s=>{ik(M(t),e)&&n(s)};var Cue=he({name:"ElTooltipTrigger",__name:"trigger",props:kc,setup(t,{expose:e}){const n=t,s=Ne("tooltip"),{controlled:i,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=He(J4,void 0),u=J(null),d=()=>{if(M(i)||n.disabled)return!0},h=Cn(n,"trigger"),f=As(d,nh(h,"hover",C=>{a(C),n.focusOnTarget&&C.target&&st(()=>{C4(C.target,{preventScroll:!0})})})),p=As(d,nh(h,"hover",l)),m=As(d,nh(h,"click",C=>{C.button===0&&c(C)})),b=As(d,nh(h,"focus",a)),_=As(d,nh(h,"focus",l)),x=As(d,nh(h,"contextmenu",C=>{C.preventDefault(),c(C)})),k=As(d,C=>{const S=hs(C);n.triggerKeys.includes(S)&&(C.preventDefault(),c(C))});return e({triggerRef:u}),(C,S)=>(v(),D(M(ece),{id:M(o),"virtual-ref":t.virtualRef,open:M(r),"virtual-triggering":t.virtualTriggering,class:U(M(s).e("trigger")),onBlur:M(_),onClick:M(m),onContextmenu:M(x),onFocus:M(b),onMouseenter:M(f),onMouseleave:M(p),onKeydown:M(k)},{default:w(()=>[le(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),Sue=Cue,$ue=he({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:Nn,setup(t,{expose:e}){const n=t,{selector:s}=MD(),i=Ne("tooltip"),o=J(),r=sD(()=>{var X;return(X=o.value)==null?void 0:X.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:b,onBeforeHide:_}=He(J4,void 0),x=z(()=>n.transition||`${i.namespace.value}-fade-in-linear`),k=z(()=>n.persistent);_n(()=>{a==null||a()});const C=z(()=>M(k)?!0:M(u)),S=z(()=>n.disabled?!1:M(u)),E=z(()=>n.appendTo||s.value),P=z(()=>n.style??{}),T=J(!0),L=()=>{m(),q()&&C4(document.body,{preventScroll:!0}),T.value=!0},I=()=>{if(M(l))return!0},V=As(I,()=>{n.enterable&&ik(M(d),"hover")&&f()}),R=As(I,()=>{ik(M(d),"hover")&&h()}),N=()=>{var X,K;(K=(X=o.value)==null?void 0:X.updatePopper)==null||K.call(X),b==null||b()},F=()=>{_==null||_()},B=()=>{p()},G=()=>{n.virtualTriggering||h()},q=X=>{var Q;const K=(Q=o.value)==null?void 0:Q.popperContentRef,H=(X==null?void 0:X.relatedTarget)||document.activeElement;return K==null?void 0:K.contains(H)};return Ee(()=>M(u),X=>{X?(T.value=!1,a=cD(r,()=>{M(l)||oo(M(d)).every(K=>K!=="hover"&&K!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:q}),(X,K)=>(v(),D(M(Y_),{disabled:!t.teleported,to:E.value},{default:w(()=>[C.value||!T.value?(v(),D(Vo,{key:0,name:x.value,appear:!k.value,onAfterLeave:L,onBeforeEnter:N,onAfterEnter:B,onBeforeLeave:F,persisted:""},{default:w(()=>[Oe(y(M(mue),Kt({id:M(c),ref_key:"contentRef",ref:o},X.$attrs,{"aria-label":t.ariaLabel,"aria-hidden":T.value,"boundaries-padding":t.boundariesPadding,"fallback-placements":t.fallbackPlacements,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,strategy:t.strategy,effect:t.effect,enterable:t.enterable,pure:t.pure,"popper-class":t.popperClass,"popper-style":[t.popperStyle,P.value],"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,visible:S.value,"z-index":t.zIndex,loop:t.loop,onMouseenter:M(V),onMouseleave:M(R),onBlur:G,onClose:M(h)}),{default:w(()=>[le(X.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[jt,S.value]])]),_:3},8,["name","appear"])):O("v-if",!0)]),_:3},8,["disabled","to"]))}}),Aue=$ue;const Eue=["innerHTML"],Mue={key:1};var Tue=he({name:"ElTooltip",__name:"tooltip",props:xue,emits:kue,setup(t,{expose:e,emit:n}){const s=t,i=n;Xoe();const o=Ne("tooltip"),r=yr(),a=J(),l=J(),c=()=>{var S;const C=M(a);C&&((S=C.popperInstanceRef)==null||S.update())},u=J(!1),d=J(),{show:h,hide:f,hasUpdateHandler:p}=wue({indicator:u,toggleReason:d}),{onOpen:m,onClose:b}=Zoe({showAfter:Cn(s,"showAfter"),hideAfter:Cn(s,"hideAfter"),autoClose:Cn(s,"autoClose"),open:h,close:f}),_=z(()=>Kn(s.visible)&&!p.value),x=z(()=>[o.b(),s.popperClass]);Et(J4,{controlled:_,id:r,open:Pc(u),trigger:Cn(s,"trigger"),onOpen:m,onClose:b,onToggle:C=>{M(u)?b(C):m(C)},onShow:()=>{i("show",d.value)},onHide:()=>{i("hide",d.value)},onBeforeShow:()=>{i("before-show",d.value)},onBeforeHide:()=>{i("before-hide",d.value)},updatePopper:c}),Ee(()=>s.disabled,C=>{C&&u.value&&(u.value=!1),!C&&Kn(s.visible)&&(u.value=s.visible)});const k=C=>{var S;return(S=l.value)==null?void 0:S.isFocusInsideContent(C)};return SC(()=>u.value&&f()),_n(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:k,updatePopper:c,onOpen:m,onClose:b,hide:f}),(C,S)=>(v(),D(M(yue),{ref_key:"popperRef",ref:a,role:t.role},{default:w(()=>[y(Sue,{disabled:t.disabled,trigger:t.trigger,"trigger-keys":t.triggerKeys,"virtual-ref":t.virtualRef,"virtual-triggering":t.virtualTriggering,"focus-on-target":t.focusOnTarget},{default:w(()=>[C.$slots.default?le(C.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),y(Aue,{ref_key:"contentRef",ref:l,"aria-label":t.ariaLabel,"boundaries-padding":t.boundariesPadding,content:t.content,disabled:t.disabled,effect:t.effect,enterable:t.enterable,"fallback-placements":t.fallbackPlacements,"hide-after":t.hideAfter,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,persistent:t.persistent,"popper-class":x.value,"popper-style":t.popperStyle,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,pure:t.pure,"raw-content":t.rawContent,"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,"show-after":t.showAfter,strategy:t.strategy,teleported:t.teleported,transition:t.transition,"virtual-triggering":t.virtualTriggering,"z-index":t.zIndex,"append-to":t.appendTo,loop:t.loop},{default:w(()=>[le(C.$slots,"content",{},()=>[t.rawContent?(v(),A("span",{key:0,innerHTML:t.content},null,8,Eue)):(v(),A("span",Mue,$(t.content),1))]),t.showArrow?(v(),D(M(Jle),{key:0})):O("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}),Pue=Tue;const js=Wt(Pue),ii=t=>t,Iue=We({id:{type:String,default:void 0},size:go,disabled:{type:Boolean,default:void 0},modelValue:{type:de([String,Number,Object]),default:""},modelModifiers:{type:de(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:de(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:de([Boolean,Object]),default:!1},autocomplete:{type:de(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:ds,default:Pd},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:ds},prefixIcon:{type:ds},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:de([Object,Array,String]),default:()=>ii({})},autofocus:Boolean,rows:{type:Number,default:2},...wr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},name:String}),Lue={[Rt]:t=>Ke(t),input:t=>Ke(t),change:(t,e)=>Ke(t)&&(e instanceof Event||e===void 0),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:t=>t===void 0||t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent};Ai(Pd);let vi;const Oue={height:"0",visibility:"hidden",overflow:S4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Due=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],H$=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Rue(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),s=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Due.map(o=>[o,e.getPropertyValue(o)]),paddingSize:s,borderSize:i,boxSizing:n}}function U$(t,e=1,n){var u;if(!vi){vi=document.createElement("textarea");let d=document.body;!S4()&&t.parentNode&&(d=t.parentNode),d.appendChild(vi)}const{paddingSize:s,borderSize:i,boxSizing:o,contextStyle:r}=Rue(t);r.forEach(([d,h])=>vi==null?void 0:vi.style.setProperty(d,h)),Object.entries(Oue).forEach(([d,h])=>vi==null?void 0:vi.style.setProperty(d,h,"important")),vi.value=t.value||t.placeholder||"";let a=vi.scrollHeight;const l={};o==="border-box"?a=a+i:o==="content-box"&&(a=a-s),vi.value="";const c=vi.scrollHeight-s;if(wt(e)){let d=c*e;o==="border-box"&&(d=d+s+i),a=Math.max(d,a),l.minHeight=`${d}px`}if(wt(n)){let d=c*n;o==="border-box"&&(d=d+s+i),a=Math.min(d,a)}return l.height=`${a}px`,(u=vi.parentNode)==null||u.removeChild(vi),vi=void 0,l}const Vue=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Fue=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],j$="ElInput";var Nue=he({name:j$,inheritAttrs:!1,__name:"input",props:Iue,emits:Lue,setup(t,{expose:e,emit:n}){const s=t,i=n,o=sp(),r=k4(),a=Gi(),l=z(()=>[s.type==="textarea"?b.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",Z.value),{[m.b("group")]:a.prepend||a.append,[m.m("prefix")]:a.prefix||s.prefixIcon,[m.m("suffix")]:a.suffix||s.suffixIcon||s.clearable||s.showPassword,[m.bm("suffix","password-clear")]:K.value&&H.value,[m.b("hidden")]:s.type==="hidden"},o.class]),c=z(()=>[m.e("wrapper"),m.is("focus",L.value)]),{form:u,formItem:d}=No(),{inputId:h}=qc(s,{formItemContext:d}),f=ji(),p=Cs(),m=Ne("input"),b=Ne("textarea"),_=Zn(),x=Zn(),k=J(!1),C=J(!1),S=J(),E=Zn(s.inputStyle),P=z(()=>_.value||x.value),{wrapperRef:T,isFocused:L,handleFocus:I,handleBlur:V}=D1(P,{disabled:p,afterBlur(){var me;s.validateEvent&&((me=d==null?void 0:d.validate)==null||me.call(d,"blur").catch(Me=>Pt(Me)))}}),R=z(()=>(u==null?void 0:u.statusIcon)??!1),N=z(()=>(d==null?void 0:d.validateState)||""),F=z(()=>N.value&&aR[N.value]),B=z(()=>C.value?iR:tR),G=z(()=>[o.style]),q=z(()=>[s.inputStyle,E.value,{resize:s.resize}]),X=z(()=>li(s.modelValue)?"":String(s.modelValue)),K=z(()=>s.clearable&&!p.value&&!s.readonly&&!!X.value&&(L.value||k.value)),H=z(()=>s.showPassword&&!p.value&&!!X.value),Q=z(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!p.value&&!s.readonly&&!s.showPassword),se=z(()=>X.value.length),Z=z(()=>!!Q.value&&se.value>Number(s.maxlength)),ae=z(()=>!!a.suffix||!!s.suffixIcon||K.value||s.showPassword||Q.value||!!N.value&&R.value),ve=z(()=>!!Object.keys(s.modelModifiers).length),[ke,oe]=Tre(_);Bs(x,me=>{if(re(),!Q.value||s.resize!=="both"&&s.resize!=="horizontal")return;const{width:Me}=me[0].contentRect;S.value={right:`calc(100% - ${Me+22-10}px)`}});const fe=()=>{const{type:me,autosize:Me}=s;if(!(!qt||me!=="textarea"||!x.value))if(Me){const Te=yt(Me)?Me.minRows:void 0,gt=yt(Me)?Me.maxRows:void 0,Tt=U$(x.value,Te,gt);E.value={overflowY:"hidden",...Tt},st(()=>{x.value.offsetHeight,E.value=Tt})}else E.value={minHeight:U$(x.value).minHeight}},re=(me=>{let Me=!1;return()=>{var Te;Me||!s.autosize||((Te=x.value)==null?void 0:Te.offsetParent)!==null&&(setTimeout(me),Me=!0)}})(fe),Se=()=>{const me=P.value,Me=s.formatter?s.formatter(X.value):X.value;!me||me.value===Me||s.type==="file"||(me.value=Me)},je=me=>{const{trim:Me,number:Te}=s.modelModifiers;return Me&&(me=me.trim()),Te&&(me=`${H$(me)}`),s.formatter&&s.parser&&(me=s.parser(me)),me},ee=async me=>{if(pe.value)return;const{lazy:Me}=s.modelModifiers;let{value:Te}=me.target;if(Me){i(ya,Te);return}if(Te=je(Te),String(Te)===X.value){s.formatter&&Se();return}ke(),i(Rt,Te),i(ya,Te),await st(),(s.formatter&&s.parser||!ve.value)&&Se(),oe()},ne=async me=>{let{value:Me}=me.target;Me=je(Me),s.modelModifiers.lazy&&i(Rt,Me),i(En,Me,me),await st(),Se()},{isComposing:pe,handleCompositionStart:$e,handleCompositionUpdate:Ce,handleCompositionEnd:Pe}=WD({emit:i,afterComposition:ee}),Ue=()=>{C.value=!C.value},Fe=()=>{var me;return(me=P.value)==null?void 0:me.focus()},ze=()=>{var me;return(me=P.value)==null?void 0:me.blur()},De=me=>{k.value=!1,i("mouseleave",me)},ct=me=>{k.value=!0,i("mouseenter",me)},Qe=me=>{i("keydown",me)},ot=()=>{var me;(me=P.value)==null||me.select()},be=me=>{i(Rt,""),i(En,""),i("clear",me),i(ya,"")};return Ee(()=>s.modelValue,()=>{var me;st(()=>fe()),s.validateEvent&&((me=d==null?void 0:d.validate)==null||me.call(d,"change").catch(Me=>Pt(Me)))}),Ee(X,me=>{if(!P.value)return;const{trim:Me,number:Te}=s.modelModifiers,gt=P.value.value,Tt=(Te||s.type==="number")&&!/^0\d/.test(gt)?`${H$(gt)}`:gt;Tt!==me&&(document.activeElement===P.value&&P.value.type!=="range"&&Me&&Tt.trim()===me||Se())}),Ee(()=>s.type,async()=>{await st(),Se(),fe()}),Vt(()=>{!s.formatter&&s.parser&&Pt(j$,"If you set the parser, you also need to set the formatter."),Se(),st(fe)}),e({input:_,textarea:x,ref:P,textareaStyle:q,autosize:Cn(s,"autosize"),isComposing:pe,focus:Fe,blur:ze,select:ot,clear:be,resizeTextarea:fe}),(me,Me)=>(v(),A("div",{class:U([l.value,{[M(m).bm("group","append")]:me.$slots.append,[M(m).bm("group","prepend")]:me.$slots.prepend}]),style:qe(G.value),onMouseenter:ct,onMouseleave:De},[O(" input "),t.type!=="textarea"?(v(),A(te,{key:0},[O(" prepend slot "),me.$slots.prepend?(v(),A("div",{key:0,class:U(M(m).be("group","prepend"))},[le(me.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:T,class:U(c.value)},[O(" prefix slot "),me.$slots.prefix||t.prefixIcon?(v(),A("span",{key:0,class:U(M(m).e("prefix"))},[g("span",{class:U(M(m).e("prefix-inner"))},[le(me.$slots,"prefix"),t.prefixIcon?(v(),D(M(_e),{key:0,class:U(M(m).e("icon"))},{default:w(()=>[(v(),D(kt(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Kt({id:M(h),ref_key:"input",ref:_,class:M(m).e("inner")},M(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?C.value?"text":"password":t.type,disabled:M(p),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Me[0]||(Me[0]=(...Te)=>M($e)&&M($e)(...Te)),onCompositionupdate:Me[1]||(Me[1]=(...Te)=>M(Ce)&&M(Ce)(...Te)),onCompositionend:Me[2]||(Me[2]=(...Te)=>M(Pe)&&M(Pe)(...Te)),onInput:ee,onChange:ne,onKeydown:Qe}),null,16,Vue),O(" suffix slot "),ae.value?(v(),A("span",{key:1,class:U(M(m).e("suffix"))},[g("span",{class:U(M(m).e("suffix-inner"))},[!K.value||!H.value||!Q.value?(v(),A(te,{key:0},[le(me.$slots,"suffix"),t.suffixIcon?(v(),D(M(_e),{key:0,class:U(M(m).e("icon"))},{default:w(()=>[(v(),D(kt(t.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),K.value?(v(),D(M(_e),{key:1,class:U([M(m).e("icon"),M(m).e("clear")]),onMousedown:Be(M(Lt),["prevent"]),onClick:be},{default:w(()=>[(v(),D(kt(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),H.value?(v(),D(M(_e),{key:2,class:U([M(m).e("icon"),M(m).e("password")]),onClick:Ue,onMousedown:Be(M(Lt),["prevent"]),onMouseup:Be(M(Lt),["prevent"])},{default:w(()=>[le(me.$slots,"password-icon",{visible:C.value},()=>[(v(),D(kt(B.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):O("v-if",!0),Q.value?(v(),A("span",{key:3,class:U([M(m).e("count"),M(m).is("outside",t.wordLimitPosition==="outside")])},[g("span",{class:U(M(m).e("count-inner"))},$(se.value)+" / "+$(t.maxlength),3)],2)):O("v-if",!0),N.value&&F.value&&R.value?(v(),D(M(_e),{key:4,class:U([M(m).e("icon"),M(m).e("validateIcon"),M(m).is("loading",N.value==="validating")])},{default:w(()=>[(v(),D(kt(F.value)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),me.$slots.append?(v(),A("div",{key:1,class:U(M(m).be("group","append"))},[le(me.$slots,"append")],2)):O("v-if",!0)],64)):(v(),A(te,{key:1},[O(" textarea "),g("textarea",Kt({id:M(h),ref_key:"textarea",ref:x,class:[M(b).e("inner"),M(m).is("focus",M(L)),M(b).is("clearable",t.clearable)]},M(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:M(p),readonly:t.readonly,autocomplete:t.autocomplete,style:q.value,"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Me[3]||(Me[3]=(...Te)=>M($e)&&M($e)(...Te)),onCompositionupdate:Me[4]||(Me[4]=(...Te)=>M(Ce)&&M(Ce)(...Te)),onCompositionend:Me[5]||(Me[5]=(...Te)=>M(Pe)&&M(Pe)(...Te)),onInput:ee,onFocus:Me[6]||(Me[6]=(...Te)=>M(I)&&M(I)(...Te)),onBlur:Me[7]||(Me[7]=(...Te)=>M(V)&&M(V)(...Te)),onChange:ne,onKeydown:Qe}),null,16,Fue),K.value?(v(),D(M(_e),{key:0,class:U([M(b).e("icon"),M(b).e("clear")]),onMousedown:Be(M(Lt),["prevent"]),onClick:be},{default:w(()=>[(v(),D(kt(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),Q.value?(v(),A("span",{key:1,style:qe(S.value),class:U([M(m).e("count"),M(m).is("outside",t.wordLimitPosition==="outside")])},$(se.value)+" / "+$(t.maxlength),7)):O("v-if",!0)],64))],38))}}),Bue=Nue;const _t=Wt(Bue),zue=We({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:de([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...wr(["ariaLabel","ariaOrientation"])}),_R={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(wt)},sh=4,Hue={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Uue=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),jue=We({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Q4=Symbol("scrollbarContextKey"),Wue=We({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Yue="Thumb";var que=he({__name:"thumb",props:jue,setup(t){const e=t,n=He(Q4),s=Ne("scrollbar");n||mo(Yue,"can not inject scrollbar context");const i=J(),o=J(),r=J({}),a=J(!1);let l=!1,c=!1,u=0,d=0,h=qt?document.onselectstart:null;const f=z(()=>Hue[e.vertical?"vertical":"horizontal"]),p=z(()=>Uue({size:e.size,move:e.move,bar:f.value})),m=z(()=>i.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/o.value[f.value.offset]),b=T=>{var I;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(I=window.getSelection())==null||I.removeAllRanges(),x(T);const L=T.currentTarget;L&&(r.value[f.value.axis]=L[f.value.offset]-(T[f.value.client]-L.getBoundingClientRect()[f.value.direction]))},_=T=>{if(!o.value||!i.value||!n.wrapElement)return;const L=(Math.abs(T.target.getBoundingClientRect()[f.value.direction]-T[f.value.client])-o.value[f.value.offset]/2)*100*m.value/i.value[f.value.offset];n.wrapElement[f.value.scroll]=L*n.wrapElement[f.value.scrollSize]/100},x=T=>{T.stopImmediatePropagation(),l=!0,u=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",k),document.addEventListener("mouseup",C),h=document.onselectstart,document.onselectstart=()=>!1},k=T=>{if(!i.value||!o.value||l===!1)return;const L=r.value[f.value.axis];if(!L)return;const I=((i.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1-(o.value[f.value.offset]-L))*100*m.value/i.value[f.value.offset];f.value.scroll==="scrollLeft"?n.wrapElement[f.value.scroll]=I*d/100:n.wrapElement[f.value.scroll]=I*u/100},C=()=>{l=!1,r.value[f.value.axis]=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",C),P(),c&&(a.value=!1)},S=()=>{c=!1,a.value=!!e.size},E=()=>{c=!0,a.value=l};_n(()=>{P(),document.removeEventListener("mouseup",C)});const P=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return Bn(Cn(n,"scrollbarElement"),"mousemove",S),Bn(Cn(n,"scrollbarElement"),"mouseleave",E),(T,L)=>(v(),D(Vo,{name:M(s).b("fade"),persisted:""},{default:w(()=>[Oe(g("div",{ref_key:"instance",ref:i,class:U([M(s).e("bar"),M(s).is(f.value.key)]),onMousedown:_,onClick:L[0]||(L[0]=Be(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:U(M(s).e("thumb")),style:qe(p.value),onMousedown:b},null,38)],34),[[jt,t.always||a.value]])]),_:1},8,["name"]))}}),W$=que,Gue=he({__name:"bar",props:Wue,setup(t,{expose:e}){const n=t,s=He(Q4),i=J(0),o=J(0),r=J(""),a=J(""),l=J(1),c=J(1);return e({handleScroll:h=>{if(h){const f=h.offsetHeight-sh,p=h.offsetWidth-sh;o.value=h.scrollTop*100/f*l.value,i.value=h.scrollLeft*100/p*c.value}},update:()=>{const h=s==null?void 0:s.wrapElement;if(!h)return;const f=h.offsetHeight-sh,p=h.offsetWidth-sh,m=f**2/h.scrollHeight,b=p**2/h.scrollWidth,_=Math.max(m,n.minSize),x=Math.max(b,n.minSize);l.value=m/(f-m)/(_/(f-_)),c.value=b/(p-b)/(x/(p-x)),a.value=_+sh<f?`${_}px`:"",r.value=x+sh<p?`${x}px`:""}}),(h,f)=>(v(),A(te,null,[y(W$,{move:i.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),y(W$,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),Xue=Gue;const Kue=["tabindex"],Aw="ElScrollbar";var Zue=he({name:Aw,__name:"scrollbar",props:zue,emits:_R,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ne("scrollbar");let r,a,l,c=0,u=0,d="";const h={bottom:!1,top:!1,right:!1,left:!1},f=J(),p=J(),m=J(),b=J(),_=z(()=>{const R={},N=ui(s.height),F=ui(s.maxHeight);return N&&(R.height=N),F&&(R.maxHeight=F),[s.wrapStyle,R]}),x=z(()=>[s.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!s.native}]),k=z(()=>[o.e("view"),s.viewClass]),C=R=>h[R]??!1,S={top:"bottom",bottom:"top",left:"right",right:"left"},E=R=>{const N=S[d];if(!N)return;const F=R[d],B=R[N];F&&!h[d]&&(h[d]=!0),!B&&h[N]&&(h[N]=!1)},P=()=>{var R;if(p.value){(R=b.value)==null||R.handleScroll(p.value);const N=c,F=u;c=p.value.scrollTop,u=p.value.scrollLeft;const B={bottom:c+p.value.clientHeight>=p.value.scrollHeight-s.distance,top:c<=s.distance&&N!==0,right:u+p.value.clientWidth>=p.value.scrollWidth-s.distance&&F!==u,left:u<=s.distance&&F!==0};if(i("scroll",{scrollTop:c,scrollLeft:u}),N!==c&&(d=c>N?"bottom":"top"),F!==u&&(d=u>F?"right":"left"),s.distance>0){if(C(d))return;E(B)}B[d]&&i("end-reached",d)}};function T(R,N){yt(R)?p.value.scrollTo(R):wt(R)&&wt(N)&&p.value.scrollTo(R,N)}const L=R=>{if(!wt(R)){Pt(Aw,"value must be a number");return}p.value.scrollTop=R},I=R=>{if(!wt(R)){Pt(Aw,"value must be a number");return}p.value.scrollLeft=R},V=()=>{var R;(R=b.value)==null||R.update(),h[d]=!1};return Ee(()=>s.noresize,R=>{R?(r==null||r(),a==null||a(),l==null||l()):({stop:r}=Bs(m,V),{stop:a}=Bs(p,V),l=Bn("resize",V))},{immediate:!0}),Ee(()=>[s.maxHeight,s.height],()=>{s.native||st(()=>{var R;V(),p.value&&((R=b.value)==null||R.handleScroll(p.value))})}),Et(Q4,Dn({scrollbarElement:f,wrapElement:p})),CC(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Vt(()=>{s.native||st(()=>{V()})}),wl(()=>V()),e({wrapRef:p,update:V,scrollTo:T,setScrollTop:L,setScrollLeft:I,handleScroll:P}),(R,N)=>(v(),A("div",{ref_key:"scrollbarRef",ref:f,class:U(M(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:U(x.value),style:qe(_.value),tabindex:t.tabindex,onScroll:P},[(v(),D(kt(t.tag),{id:t.id,ref_key:"resizeRef",ref:m,class:U(k.value),style:qe(t.viewStyle),role:t.role,"aria-label":t.ariaLabel,"aria-orientation":t.ariaOrientation},{default:w(()=>[le(R.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,Kue),t.native?O("v-if",!0):(v(),D(Xue,{key:0,ref_key:"barRef",ref:b,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),Jue=Zue;const Ei=Wt(Jue),Que=We({size:{type:[Number,String],values:kl,validator:t=>wt(t)},shape:{type:String,values:["circle","square"]},icon:{type:ds},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:de(String),default:"cover"}}),ede={error:t=>t instanceof Event},wR=Symbol("avatarGroupContextKey"),tde={size:{type:de([Number,String]),values:kl,validator:t=>wt(t)},shape:{type:de(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:de(String),default:"light"},placement:{type:de(String),values:lp,default:"top"},popperClass:Nn.popperClass,popperStyle:Nn.popperStyle,collapseClass:String,collapseStyle:{type:de([String,Array,Object])}},nde=["src","alt","srcset"];var sde=he({name:"ElAvatar",__name:"avatar",props:Que,emits:ede,setup(t,{emit:e}){const n=t,s=e,i=He(wR,void 0),o=Ne("avatar"),r=J(!1),a=z(()=>n.size??(i==null?void 0:i.size)),l=z(()=>n.shape??(i==null?void 0:i.shape)??"circle"),c=z(()=>{const{icon:f}=n,p=[o.b()];return Ke(a.value)&&p.push(o.m(a.value)),f&&p.push(o.m("icon")),l.value&&p.push(o.m(l.value)),p}),u=z(()=>wt(a.value)?o.cssVarBlock({size:ui(a.value)}):void 0),d=z(()=>({objectFit:n.fit}));Ee(()=>[n.src,n.srcSet],()=>r.value=!1);function h(f){r.value=!0,s("error",f)}return(f,p)=>(v(),A("span",{class:U(c.value),style:qe(u.value)},[(t.src||t.srcSet)&&!r.value?(v(),A("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:qe(d.value),onError:h},null,44,nde)):t.icon?(v(),D(M(_e),{key:1},{default:w(()=>[(v(),D(kt(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),xR=sde,kR=he({name:"ElAvatarGroup",props:tde,setup(t,{slots:e}){const n=Ne("avatar-group");return Et(wR,Dn({size:Cn(t,"size"),shape:Cn(t,"shape")})),()=>{var o;const s=vc(((o=e.default)==null?void 0:o.call(e))??[]);let i=s;if(t.collapseAvatars&&s.length>t.maxCollapseAvatars){i=s.slice(0,t.maxCollapseAvatars);const r=s.slice(t.maxCollapseAvatars);i.push(y(js,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>y(xR,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[Y("+ "),r.length]}),content:()=>y("div",{class:n.e("collapse-avatars")},[r.map((a,l)=>is(a)?pr(a,{key:a.key??l}):a)])}))}return y("div",{class:n.b()},[i])}}});const e5=Wt(xR,{AvatarGroup:kR});Ps(kR);const ide=We({separator:{type:String,default:"/"},separatorIcon:{type:ds}}),CR=Symbol("breadcrumbKey"),ode=We({to:{type:de([String,Object]),default:""},replace:Boolean}),rde=["aria-label"];var ade=he({name:"ElBreadcrumb",__name:"breadcrumb",props:ide,setup(t){const{t:e}=Xt(),n=t,s=Ne("breadcrumb"),i=J();return Et(CR,n),Vt(()=>{const o=i.value.querySelectorAll(`.${s.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),A("div",{ref_key:"breadcrumb",ref:i,class:U(M(s).b()),"aria-label":M(e)("el.breadcrumb.label"),role:"navigation"},[le(o.$slots,"default")],10,rde))}}),lde=ade,cde=he({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:ode,setup(t){const e=t,n=ht(),s=He(CR,void 0),i=Ne("breadcrumb"),o=n.appContext.config.globalProperties.$router,r=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(a,l)=>{var c,u;return v(),A("span",{class:U(M(i).e("item"))},[g("span",{class:U([M(i).e("inner"),M(i).is("link",!!t.to)]),role:"link",onClick:r},[le(a.$slots,"default")],2),(c=M(s))!=null&&c.separatorIcon?(v(),D(M(_e),{key:0,class:U(M(i).e("separator"))},{default:w(()=>[(v(),D(kt(M(s).separatorIcon)))]),_:1},8,["class"])):(v(),A("span",{key:1,class:U(M(i).e("separator")),role:"presentation"},$((u=M(s))==null?void 0:u.separator),3))],2)}}}),SR=cde;const ude=Wt(lde,{BreadcrumbItem:SR}),dde=Ps(SR),hde=["default","primary","success","warning","info","danger","text",""],fde=["button","submit","reset"],ok=We({size:go,disabled:{type:Boolean,default:void 0},type:{type:String,values:hde,default:""},icon:{type:ds},nativeType:{type:String,values:fde,default:"button"},loading:Boolean,loadingIcon:{type:ds,default:()=>Ff},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:de([String,Object]),default:"button"}}),pde={click:t=>t instanceof MouseEvent},$R=Symbol(),yb=J();function Gc(t,e=void 0){const n=ht()?He($R,yb):yb;return t?z(()=>{var s;return((s=n.value)==null?void 0:s[t])??e}):n}function t5(t,e){const n=Gc(),s=Ne(t,z(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Km})),i=Xt(z(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=H_(z(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||PD})),r=z(()=>{var a;return M(e)||((a=n.value)==null?void 0:a.size)||""});return AR(z(()=>M(n)||{})),{ns:s,locale:i,zIndex:o,size:r}}const AR=(t,e,n=!1)=>{const s=!!ht(),i=s?Gc():void 0,o=(e==null?void 0:e.provide)??(s?Et:void 0);if(!o){Pt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const r=z(()=>{const a=M(t);return i!=null&&i.value?mde(i.value,a):a});return o($R,r),o(fD,z(()=>r.value.locale)),o(pD,z(()=>r.value.namespace)),o(ID,z(()=>r.value.zIndex)),o(UD,{size:z(()=>r.value.size||"")}),o(YD,z(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!yb.value)&&(yb.value=r.value),r},mde=(t,e)=>{const n=[...new Set([...fb(t),...fb(e)])],s={};for(const i of n)s[i]=e[i]!==void 0?e[i]:t[i];return s},gde=We({a11y:{type:Boolean,default:!0},locale:{type:de(Object)},size:go,button:{type:de(Object)},card:{type:de(Object)},dialog:{type:de(Object)},link:{type:de(Object)},experimentalFeatures:{type:de(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:de(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:de(Object)},...R1}),vde={placement:"top"},yde=he({name:"ElConfigProvider",props:gde,setup(t,{slots:e}){const n=AR(t);return Ee(()=>t.message,s=>{var i;Object.assign(vde,((i=n==null?void 0:n.value)==null?void 0:i.message)??{},s??{})},{immediate:!0,deep:!0}),()=>le(e,"default",{config:n==null?void 0:n.value})}}),bde=Wt(yde),ER=Symbol("buttonGroupContextKey"),_de=(t,e)=>{ul({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},z(()=>t.type==="text"));const n=He(ER,void 0),s=Gc("button"),{form:i}=No(),o=ji(z(()=>n==null?void 0:n.size)),r=Cs(),a=J(),l=Gi(),c=z(()=>{var x;return t.type||(n==null?void 0:n.type)||((x=s.value)==null?void 0:x.type)||""}),u=z(()=>{var x;return t.autoInsertSpace??((x=s.value)==null?void 0:x.autoInsertSpace)??!1}),d=z(()=>{var x;return t.plain??((x=s.value)==null?void 0:x.plain)??!1}),h=z(()=>{var x;return t.round??((x=s.value)==null?void 0:x.round)??!1}),f=z(()=>{var x;return t.text??((x=s.value)==null?void 0:x.text)??!1}),p=z(()=>{var x;return t.dashed??((x=s.value)==null?void 0:x.dashed)??!1}),m=z(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),b=z(()=>{var k;const x=(k=l.default)==null?void 0:k.call(l);if(u.value&&(x==null?void 0:x.length)===1){const C=x[0];if((C==null?void 0:C.type)===va){const S=C.children;return/^\p{Unified_Ideograph}{2}$/u.test(S.trim())}}return!1});return{_disabled:r,_size:o,_type:c,_ref:a,_props:m,_plain:d,_round:h,_text:f,_dashed:p,shouldAddSpace:b,handleClick:x=>{if(r.value||t.loading){x.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",x)}}};function ci(t,e){wde(t)&&(t="100%");const n=xde(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function Kv(t){return Math.min(1,Math.max(0,t))}function wde(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function xde(t){return typeof t=="string"&&t.indexOf("%")!==-1}function MR(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Zv(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Tu(t){return t.length===1?"0"+t:String(t)}function kde(t,e,n){return{r:ci(t,255)*255,g:ci(e,255)*255,b:ci(n,255)*255}}function Y$(t,e,n){t=ci(t,255),e=ci(e,255),n=ci(n,255);const s=Math.max(t,e,n),i=Math.min(t,e,n);let o=0,r=0;const a=(s+i)/2;if(s===i)r=0,o=0;else{const l=s-i;switch(r=a>.5?l/(2-s-i):l/(s+i),s){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s:r,l:a}}function Ew(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Cde(t,e,n){let s,i,o;if(t=ci(t,360),e=ci(e,100),n=ci(n,100),e===0)i=n,o=n,s=n;else{const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;s=Ew(a,r,t+1/3),i=Ew(a,r,t),o=Ew(a,r,t-1/3)}return{r:s*255,g:i*255,b:o*255}}function q$(t,e,n){t=ci(t,255),e=ci(e,255),n=ci(n,255);const s=Math.max(t,e,n),i=Math.min(t,e,n);let o=0;const r=s,a=s-i,l=s===0?0:a/s;if(s===i)o=0;else{switch(s){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s:l,v:r}}function Sde(t,e,n){t=ci(t,360)*6,e=ci(e,100),n=ci(n,100);const s=Math.floor(t),i=t-s,o=n*(1-e),r=n*(1-i*e),a=n*(1-(1-i)*e),l=s%6,c=[n,r,o,o,a,n][l],u=[a,n,n,r,o,o][l],d=[o,o,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function G$(t,e,n,s){const i=[Tu(Math.round(t).toString(16)),Tu(Math.round(e).toString(16)),Tu(Math.round(n).toString(16))];return s&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function $de(t,e,n,s,i){const o=[Tu(Math.round(t).toString(16)),Tu(Math.round(e).toString(16)),Tu(Math.round(n).toString(16)),Tu(Ede(s))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Ade(t,e,n,s){const i=t/100,o=e/100,r=n/100,a=s/100,l=255*(1-i)*(1-a),c=255*(1-o)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function X$(t,e,n){let s=1-t/255,i=1-e/255,o=1-n/255,r=Math.min(s,i,o);return r===1?(s=0,i=0,o=0):(s=(s-r)/(1-r)*100,i=(i-r)/(1-r)*100,o=(o-r)/(1-r)*100),r*=100,{c:Math.round(s),m:Math.round(i),y:Math.round(o),k:Math.round(r)}}function Ede(t){return Math.round(parseFloat(t)*255).toString(16)}function K$(t){return xo(t)/255}function xo(t){return parseInt(t,16)}function Mde(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const rk={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Tde(t){let e={r:0,g:0,b:0},n=1,s=null,i=null,o=null,r=!1,a=!1;return typeof t=="string"&&(t=Lde(t)),typeof t=="object"&&(wo(t.r)&&wo(t.g)&&wo(t.b)?(e=kde(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):wo(t.h)&&wo(t.s)&&wo(t.v)?(s=Zv(t.s),i=Zv(t.v),e=Sde(t.h,s,i),r=!0,a="hsv"):wo(t.h)&&wo(t.s)&&wo(t.l)?(s=Zv(t.s),o=Zv(t.l),e=Cde(t.h,s,o),r=!0,a="hsl"):wo(t.c)&&wo(t.m)&&wo(t.y)&&wo(t.k)&&(e=Ade(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=MR(n),{ok:r,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}const Pde="[-\\+]?\\d+%?",Ide="[-\\+]?\\d*\\.\\d+%?",yc="(?:"+Ide+")|(?:"+Pde+")",Mw="[\\s|\\(]+("+yc+")[,|\\s]+("+yc+")[,|\\s]+("+yc+")\\s*\\)?",Jv="[\\s|\\(]+("+yc+")[,|\\s]+("+yc+")[,|\\s]+("+yc+")[,|\\s]+("+yc+")\\s*\\)?",Xo={CSS_UNIT:new RegExp(yc),rgb:new RegExp("rgb"+Mw),rgba:new RegExp("rgba"+Jv),hsl:new RegExp("hsl"+Mw),hsla:new RegExp("hsla"+Jv),hsv:new RegExp("hsv"+Mw),hsva:new RegExp("hsva"+Jv),cmyk:new RegExp("cmyk"+Jv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Lde(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(rk[t])t=rk[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Xo.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Xo.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Xo.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Xo.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Xo.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Xo.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Xo.cmyk.exec(t),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Xo.hex8.exec(t),n?{r:xo(n[1]),g:xo(n[2]),b:xo(n[3]),a:K$(n[4]),format:e?"name":"hex8"}:(n=Xo.hex6.exec(t),n?{r:xo(n[1]),g:xo(n[2]),b:xo(n[3]),format:e?"name":"hex"}:(n=Xo.hex4.exec(t),n?{r:xo(n[1]+n[1]),g:xo(n[2]+n[2]),b:xo(n[3]+n[3]),a:K$(n[4]+n[4]),format:e?"name":"hex8"}:(n=Xo.hex3.exec(t),n?{r:xo(n[1]+n[1]),g:xo(n[2]+n[2]),b:xo(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function wo(t){return typeof t=="number"?!Number.isNaN(t):Xo.CSS_UNIT.test(t)}class Qn{constructor(e="",n={}){if(e instanceof Qn)return e;typeof e=="number"&&(e=Mde(e)),this.originalInput=e;const s=Tde(e);this.originalInput=e,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??s.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){const e=this.toRgb();let n,s,i;const o=e.r/255,r=e.g/255,a=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*s+.0722*i}getAlpha(){return this.a}setAlpha(e){return this.a=MR(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=q$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=q$(this.r,this.g,this.b),n=Math.round(e.h*360),s=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?`hsv(${n}, ${s}%, ${i}%)`:`hsva(${n}, ${s}%, ${i}%, ${this.roundA})`}toHsl(){const e=Y$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=Y$(this.r,this.g,this.b),n=Math.round(e.h*360),s=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?`hsl(${n}, ${s}%, ${i}%)`:`hsla(${n}, ${s}%, ${i}%, ${this.roundA})`}toHex(e=!1){return G$(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return $de(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),n=Math.round(this.g),s=Math.round(this.b);return this.a===1?`rgb(${e}, ${n}, ${s})`:`rgba(${e}, ${n}, ${s}, ${this.roundA})`}toPercentageRgb(){const e=n=>`${Math.round(ci(n,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=n=>Math.round(ci(n,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...X$(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:s,k:i}=X$(this.r,this.g,this.b);return`cmyk(${e}, ${n}, ${s}, ${i})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const e="#"+G$(this.r,this.g,this.b,!1);for(const[n,s]of Object.entries(rk))if(e===s)return n;return!1}toString(e){const n=!!e;e=e??this.format;let s=!1;const i=this.a<1&&this.a>=0;return!n&&i&&(e.startsWith("hex")||e==="name")?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(s=this.toRgbString()),e==="prgb"&&(s=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(s=this.toHexString()),e==="hex3"&&(s=this.toHexString(!0)),e==="hex4"&&(s=this.toHex8String(!0)),e==="hex8"&&(s=this.toHex8String()),e==="name"&&(s=this.toName()),e==="hsl"&&(s=this.toHslString()),e==="hsv"&&(s=this.toHsvString()),e==="cmyk"&&(s=this.toCmykString()),s||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Qn(this.toString())}lighten(e=10){const n=this.toHsl();return n.l+=e/100,n.l=Kv(n.l),new Qn(n)}brighten(e=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new Qn(n)}darken(e=10){const n=this.toHsl();return n.l-=e/100,n.l=Kv(n.l),new Qn(n)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const n=this.toHsl();return n.s-=e/100,n.s=Kv(n.s),new Qn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=Kv(n.s),new Qn(n)}greyscale(){return this.desaturate(100)}spin(e){const n=this.toHsl(),s=(n.h+e)%360;return n.h=s<0?360+s:s,new Qn(n)}mix(e,n=50){const s=this.toRgb(),i=new Qn(e).toRgb(),o=n/100,r={r:(i.r-s.r)*o+s.r,g:(i.g-s.g)*o+s.g,b:(i.b-s.b)*o+s.b,a:(i.a-s.a)*o+s.a};return new Qn(r)}analogous(e=6,n=30){const s=this.toHsl(),i=360/n,o=[this];for(s.h=(s.h-(i*e>>1)+720)%360;--e;)s.h=(s.h+i)%360,o.push(new Qn(s));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new Qn(e)}monochromatic(e=6){const n=this.toHsv(),{h:s}=n,{s:i}=n;let{v:o}=n;const r=[],a=1/e;for(;e--;)r.push(new Qn({h:s,s:i,v:o})),o=(o+a)%1;return r}splitcomplement(){const e=this.toHsl(),{h:n}=e;return[this,new Qn({h:(n+72)%360,s:e.s,l:e.l}),new Qn({h:(n+216)%360,s:e.s,l:e.l})]}onBackground(e){const n=this.toRgb(),s=new Qn(e).toRgb(),i=n.a+s.a*(1-n.a);return new Qn({r:(n.r*n.a+s.r*s.a*(1-n.a))/i,g:(n.g*n.a+s.g*s.a*(1-n.a))/i,b:(n.b*n.a+s.b*s.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const n=this.toHsl(),{h:s}=n,i=[this],o=360/e;for(let r=1;r<e;r++)i.push(new Qn({h:(s+r*o)%360,s:n.s,l:n.l}));return i}equals(e){const n=new Qn(e);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Rl(t,e=20){return t.mix("#141414",e).toString()}function Ode(t){const e=Cs(),n=Ne("button");return z(()=>{let s={},i=t.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const r=new Qn(i),a=t.dark?r.tint(20).toString():Rl(r,20);if(t.plain)s=n.cssVarBlock({"bg-color":t.dark?Rl(r,90):r.tint(90).toString(),"text-color":i,"border-color":t.dark?Rl(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(s[n.cssVarBlockName("disabled-bg-color")]=t.dark?Rl(r,90):r.tint(90).toString(),s[n.cssVarBlockName("disabled-text-color")]=t.dark?Rl(r,50):r.tint(50).toString(),s[n.cssVarBlockName("disabled-border-color")]=t.dark?Rl(r,80):r.tint(80).toString());else{const l=t.dark?Rl(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(s=n.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const u=t.dark?Rl(r,50):r.tint(50).toString();s[n.cssVarBlockName("disabled-bg-color")]=u,s[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,s[n.cssVarBlockName("disabled-border-color")]=u}}}return s})}var Dde=he({name:"ElButton",__name:"button",props:ok,emits:pde,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ode(s),r=Ne("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,_dashed:m,shouldAddSpace:b,handleClick:_}=_de(s,i),x=z(()=>[r.b(),r.m(c.value),r.m(l.value),r.is("disabled",u.value),r.is("loading",s.loading),r.is("plain",h.value),r.is("round",f.value),r.is("circle",s.circle),r.is("text",p.value),r.is("dashed",m.value),r.is("link",s.link),r.is("has-bg",s.bg)]);return e({ref:a,size:l,type:c,disabled:u,shouldAddSpace:b}),(k,C)=>(v(),D(kt(t.tag),Kt({ref_key:"_ref",ref:a},M(d),{class:x.value,style:M(o),onClick:M(_)}),{default:w(()=>[t.loading?(v(),A(te,{key:0},[k.$slots.loading?le(k.$slots,"loading",{key:0}):(v(),D(M(_e),{key:1,class:U(M(r).is("loading"))},{default:w(()=>[(v(),D(kt(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||k.$slots.icon?(v(),D(M(_e),{key:1},{default:w(()=>[t.icon?(v(),D(kt(t.icon),{key:0})):le(k.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),k.$slots.default?(v(),A("span",{key:2,class:U({[M(r).em("text","expand")]:M(b)})},[le(k.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Rde=Dde;const Vde={size:ok.size,type:ok.type,direction:{type:de(String),values:["horizontal","vertical"],default:"horizontal"}};var Fde=he({name:"ElButtonGroup",__name:"button-group",props:Vde,setup(t){const e=t;Et(ER,Dn({size:Cn(e,"size"),type:Cn(e,"type")}));const n=Ne("button");return(s,i)=>(v(),A("div",{class:U([M(n).b("group"),M(n).bm("group",e.direction)])},[le(s.$slots,"default")],2))}}),TR=Fde;const Ge=Wt(Rde,{ButtonGroup:TR});Ps(TR);const Z$=["hours","minutes","seconds"],$a="EP_PICKER_BASE",PR="ElPopperOptions",IR=Symbol("commonPickerContextKey"),Kg="HH:mm:ss",uc="YYYY-MM-DD",Nde={date:uc,dates:uc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${uc} ${Kg}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:uc,datetimerange:`${uc} ${Kg}`};var xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var LR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){var n=1e3,s=6e4,i=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var B=["th","st","nd","rd"],G=F%100;return"["+F+(B[(G-20)%10]||B[G]||B[0])+"]"}},k=function(F,B,G){var q=String(F);return!q||q.length>=B?F:""+Array(B+1-q.length).join(G)+F},C={s:k,z:function(F){var B=-F.utcOffset(),G=Math.abs(B),q=Math.floor(G/60),X=G%60;return(B<=0?"+":"-")+k(q,2,"0")+":"+k(X,2,"0")},m:function F(B,G){if(B.date()<G.date())return-F(G,B);var q=12*(G.year()-B.year())+(G.month()-B.month()),X=B.clone().add(q,d),K=G-X<0,H=B.clone().add(q+(K?-1:1),d);return+(-(q+(G-X)/(K?X-H:H-X))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s:r,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",E={};E[S]=x;var P="$isDayjsObject",T=function(F){return F instanceof R||!(!F||!F[P])},L=function F(B,G,q){var X;if(!B)return S;if(typeof B=="string"){var K=B.toLowerCase();E[K]&&(X=K),G&&(E[K]=G,X=K);var H=B.split("-");if(!X&&H.length>1)return F(H[0])}else{var Q=B.name;E[Q]=B,X=Q}return!q&&X&&(S=X),X||!q&&S},I=function(F,B){if(T(F))return F.clone();var G=typeof B=="object"?B:{};return G.date=F,G.args=arguments,new R(G)},V=C;V.l=L,V.i=T,V.w=function(F,B){return I(F,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var R=function(){function F(G){this.$L=L(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[P]=!0}var B=F.prototype;return B.parse=function(G){this.$d=function(q){var X=q.date,K=q.utc;if(X===null)return new Date(NaN);if(V.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(b);if(H){var Q=H[2]-1||0,se=(H[7]||"0").substring(0,3);return K?new Date(Date.UTC(H[1],Q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,se)):new Date(H[1],Q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,se)}}return new Date(X)}(G),this.init()},B.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},B.$utils=function(){return V},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(G,q){var X=I(G);return this.startOf(q)<=X&&X<=this.endOf(q)},B.isAfter=function(G,q){return I(G)<this.startOf(q)},B.isBefore=function(G,q){return this.endOf(q)<I(G)},B.$g=function(G,q,X){return V.u(G)?this[q]:this.set(X,G)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(G,q){var X=this,K=!!V.u(q)||q,H=V.p(G),Q=function(ie,re){var Se=V.w(X.$u?Date.UTC(X.$y,re,ie):new Date(X.$y,re,ie),X);return K?Se:Se.endOf(c)},se=function(ie,re){return V.w(X.toDate()[ie].apply(X.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(re)),X)},Z=this.$W,ae=this.$M,ve=this.$D,ke="set"+(this.$u?"UTC":"");switch(H){case f:return K?Q(1,0):Q(31,11);case d:return K?Q(1,ae):Q(0,ae+1);case u:var oe=this.$locale().weekStart||0,fe=(Z<oe?Z+7:Z)-oe;return Q(K?ve-fe:ve+(6-fe),ae);case c:case p:return se(ke+"Hours",0);case l:return se(ke+"Minutes",1);case a:return se(ke+"Seconds",2);case r:return se(ke+"Milliseconds",3);default:return this.clone()}},B.endOf=function(G){return this.startOf(G,!1)},B.$set=function(G,q){var X,K=V.p(G),H="set"+(this.$u?"UTC":""),Q=(X={},X[c]=H+"Date",X[p]=H+"Date",X[d]=H+"Month",X[f]=H+"FullYear",X[l]=H+"Hours",X[a]=H+"Minutes",X[r]=H+"Seconds",X[o]=H+"Milliseconds",X)[K],se=K===c?this.$D+(q-this.$W):q;if(K===d||K===f){var Z=this.clone().set(p,1);Z.$d[Q](se),Z.init(),this.$d=Z.set(p,Math.min(this.$D,Z.daysInMonth())).$d}else Q&&this.$d[Q](se);return this.init(),this},B.set=function(G,q){return this.clone().$set(G,q)},B.get=function(G){return this[V.p(G)]()},B.add=function(G,q){var X,K=this;G=Number(G);var H=V.p(q),Q=function(ae){var ve=I(K);return V.w(ve.date(ve.date()+Math.round(ae*G)),K)};if(H===d)return this.set(d,this.$M+G);if(H===f)return this.set(f,this.$y+G);if(H===c)return Q(1);if(H===u)return Q(7);var se=(X={},X[a]=s,X[l]=i,X[r]=n,X)[H]||1,Z=this.$d.getTime()+G*se;return V.w(Z,this)},B.subtract=function(G,q){return this.add(-1*G,q)},B.format=function(G){var q=this,X=this.$locale();if(!this.isValid())return X.invalidDate||m;var K=G||"YYYY-MM-DDTHH:mm:ssZ",H=V.z(this),Q=this.$H,se=this.$m,Z=this.$M,ae=X.weekdays,ve=X.months,ke=X.meridiem,oe=function(re,Se,je,ee){return re&&(re[Se]||re(q,K))||je[Se].slice(0,ee)},fe=function(re){return V.s(Q%12||12,re,"0")},ie=ke||function(re,Se,je){var ee=re<12?"AM":"PM";return je?ee.toLowerCase():ee};return K.replace(_,function(re,Se){return Se||function(je){switch(je){case"YY":return String(q.$y).slice(-2);case"YYYY":return V.s(q.$y,4,"0");case"M":return Z+1;case"MM":return V.s(Z+1,2,"0");case"MMM":return oe(X.monthsShort,Z,ve,3);case"MMMM":return oe(ve,Z);case"D":return q.$D;case"DD":return V.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return oe(X.weekdaysMin,q.$W,ae,2);case"ddd":return oe(X.weekdaysShort,q.$W,ae,3);case"dddd":return ae[q.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ie(Q,se,!0);case"A":return ie(Q,se,!1);case"m":return String(se);case"mm":return V.s(se,2,"0");case"s":return String(q.$s);case"ss":return V.s(q.$s,2,"0");case"SSS":return V.s(q.$ms,3,"0");case"Z":return H}return null}(re)||H.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(G,q,X){var K,H=this,Q=V.p(q),se=I(G),Z=(se.utcOffset()-this.utcOffset())*s,ae=this-se,ve=function(){return V.m(H,se)};switch(Q){case f:K=ve()/12;break;case d:K=ve();break;case h:K=ve()/3;break;case u:K=(ae-Z)/6048e5;break;case c:K=(ae-Z)/864e5;break;case l:K=ae/i;break;case a:K=ae/s;break;case r:K=ae/n;break;default:K=ae}return X?K:V.a(K)},B.daysInMonth=function(){return this.endOf(d).$D},B.$locale=function(){return E[this.$L]},B.locale=function(G,q){if(!G)return this.$L;var X=this.clone(),K=L(G,q,!0);return K&&(X.$L=K),X},B.clone=function(){return V.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},F}(),N=R.prototype;return I.prototype=N,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(F){N[F[1]]=function(B){return this.$g(B,F[0],F[1])}}),I.extend=function(F,B){return F.$i||(F(B,R,I),F.$i=!0),I},I.locale=L,I.isDayjs=T,I.unix=function(F){return I(1e3*F)},I.en=E[S],I.Ls=E,I.p={},I})})(LR);var Bde=LR.exports;const dt=fi(Bde),Tw=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],OR=t=>Array.from(Array.from({length:t}).keys()),DR=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),RR=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),J$=function(t,e){const n=By(t),s=By(e);return n&&s?t.getTime()===e.getTime():!n&&!s?t===e:!1},VR=function(t,e){const n=Ae(t),s=Ae(e);return n&&s?t.length!==e.length?!1:t.every((i,o)=>J$(i,e[o])):!n&&!s?J$(t,e):!1},Q$=function(t,e,n){const s=w4(e)||e==="x"?dt(t).locale(n):dt(t,e).locale(n);return s.isValid()?s:void 0},eA=function(t,e,n){return w4(e)?t:e==="x"?+t:dt(t).locale(n).format(e)},Pw=(t,e)=>{const n=[],s=e==null?void 0:e();for(let i=0;i<t;i++)n.push((s==null?void 0:s.includes(i))??!1);return n},I0=t=>Ae(t)?t.map(e=>e.toDate()):t.toDate(),n5=We({disabledHours:{type:de(Function)},disabledMinutes:{type:de(Function)},disabledSeconds:{type:de(Function)}}),zde=We({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),FR=We({automaticDropdown:{type:Boolean,default:!0},id:{type:de([Array,String])},name:{type:de([Array,String])},popperClass:Nn.popperClass,popperStyle:Nn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:de([String,Object]),default:Pd},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:de([String,Object]),default:""},size:go,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:de(Object),default:()=>({})},modelValue:{type:de([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...n5,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:de([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:de(String),values:lp,default:"bottom"},fallbackPlacements:{type:de(Array),default:["bottom","top","right","left"]},...R1,...wr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),Hde=We({id:{type:de(Array)},name:{type:de(Array)},modelValue:{type:de([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),NR=(t,e)=>{const{lang:n}=Xt(),s=J(!1),i=J(!1),o=J(null),r=z(()=>{const{modelValue:p}=t;return!p||Ae(p)&&!p.filter(Boolean).length}),a=p=>{if(!VR(t.modelValue,p)){let m;Ae(p)?m=p.map(b=>eA(b,t.valueFormat,n.value)):p&&(m=eA(p,t.valueFormat,n.value)),e(Rt,p&&m,n.value)}},l=z(()=>{let p;if(r.value?c.value.getDefaultValue&&(p=c.value.getDefaultValue()):Ae(t.modelValue)?p=t.modelValue.map(m=>Q$(m,t.valueFormat,n.value)):p=Q$(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);zi(m,p)||(p=m,r.value||a(I0(p)))}return Ae(p)&&p.some(m=>!m)&&(p=[]),p}),c=J({});return{parsedValue:l,pickerActualVisible:i,pickerOptions:c,pickerVisible:s,userInput:o,valueIsEmpty:r,emitInput:a,onCalendarChange:p=>{e("calendar-change",p)},onPanelChange:(p,m,b)=>{e("panel-change",p,m,b)},onPick:(p="",m=!1)=>{s.value=m;let b;Ae(p)?b=p.map(_=>_.toDate()):b=p&&p.toDate(),o.value=null,a(b)},onSetPickerOption:p=>{c.value[p[0]]=p[1],c.value.panelReady=!0}}},Ude=["id","name","placeholder","value","disabled"],jde=["id","name","placeholder","value","disabled"];var Wde=he({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:Hde,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const s=t,i=n,{formItem:o}=No(),{inputId:r}=qc(Dn({id:z(()=>{var T;return(T=s.id)==null?void 0:T[0]})}),{formItemContext:o}),a=k4(),l=Ne("date"),c=Ne("range"),u=J(),d=J(),{wrapperRef:h,isFocused:f}=D1(u,{disabled:z(()=>s.disabled)}),p=T=>{i("click",T)},m=T=>{i("mouseenter",T)},b=T=>{i("mouseleave",T)},_=T=>{i("touchstart",T)},x=T=>{i("startInput",T)},k=T=>{i("endInput",T)},C=T=>{i("startChange",T)},S=T=>{i("endChange",T)};return e({focus:()=>{var T;(T=u.value)==null||T.focus()},blur:()=>{var T,L;(T=u.value)==null||T.blur(),(L=d.value)==null||L.blur()}}),(T,L)=>(v(),A("div",{ref_key:"wrapperRef",ref:h,class:U([M(l).is("active",M(f)),T.$attrs.class]),style:qe(T.$attrs.style),onClick:p,onMouseenter:m,onMouseleave:b,onTouchstartPassive:_},[le(T.$slots,"prefix"),g("input",Kt(M(a),{id:M(r),ref_key:"inputRef",ref:u,name:T.name&&T.name[0],placeholder:T.startPlaceholder,value:T.modelValue&&T.modelValue[0],class:M(c).b("input"),disabled:T.disabled,onInput:x,onChange:C}),null,16,Ude),le(T.$slots,"range-separator"),g("input",Kt(M(a),{id:T.id&&T.id[1],ref_key:"endInputRef",ref:d,name:T.name&&T.name[1],placeholder:T.endPlaceholder,value:T.modelValue&&T.modelValue[1],class:M(c).b("input"),disabled:T.disabled,onInput:k,onChange:S}),null,16,jde),le(T.$slots,"suffix")],38))}}),Yde=Wde,qde=he({name:"Picker",__name:"picker",props:FR,emits:[Rt,En,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const s=t,i=n,o=sp(),r=Ne("date"),a=Ne("input"),l=Ne("range"),{formItem:c}=No(),u=He(PR,{}),d=z4(s,null),h=J(),f=J(),p=J(null);let m=!1;const b=Cs(),_=NR(s,i),{parsedValue:x,pickerActualVisible:k,userInput:C,pickerVisible:S,pickerOptions:E,valueIsEmpty:P,emitInput:T,onPick:L,onSetPickerOption:I,onCalendarChange:V,onPanelChange:R}=_,{isFocused:N,handleFocus:F,handleBlur:B}=D1(f,{disabled:b,beforeFocus(){return s.readonly},afterFocus(){s.automaticDropdown&&(S.value=!0)},beforeBlur(ce){var Le;return!m&&((Le=h.value)==null?void 0:Le.isFocusInsideContent(ce))},afterBlur(){var ce,Le;re.value&&!s.saveOnBlur?P.value||(Le=(ce=E.value).handleCancel)==null||Le.call(ce):ot(),S.value=!1,m=!1,s.validateEvent&&(c==null||c.validate("blur").catch(pt=>Pt(pt)))}}),G=J(!1),q=z(()=>[r.b("editor"),r.bm("editor",s.type),a.e("wrapper"),r.is("disabled",b.value),r.is("active",S.value),l.b("editor"),De?l.bm("editor",De.value):"",o.class]),X=z(()=>[a.e("icon"),l.e("close-icon"),pe.value?"":l.em("close-icon","hidden")]);Ee(S,ce=>{ce?st(()=>{ce&&(p.value=s.modelValue)}):(C.value=null,st(()=>{K(s.modelValue)}))});const K=(ce,Le)=>{(Le||!VR(ce,p.value))&&(i(En,ce),Le&&(p.value=ce),s.validateEvent&&(c==null||c.validate("change").catch(pt=>Pt(pt))))},H=ce=>{i("keydown",ce)},Q=z(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),se=(ce,Le,pt)=>{const yn=Q.value;yn.length&&(!pt||pt==="min"?(yn[0].setSelectionRange(ce,Le),yn[0].focus()):pt==="max"&&(yn[1].setSelectionRange(ce,Le),yn[1].focus()))},Z=()=>{k.value=!0},ae=()=>{i("visible-change",!0)},ve=()=>{k.value=!1,S.value=!1,i("visible-change",!1)},ke=()=>{S.value=!0},oe=()=>{S.value=!1},fe=z(()=>{const ce=me(x.value);return Ae(C.value)?[C.value[0]||ce&&ce[0]||"",C.value[1]||ce&&ce[1]||""]:C.value!==null?C.value:re.value&&P.value&&!s.saveOnBlur||!re.value&&P.value||!S.value&&P.value?"":ce?Se.value||je.value||ee.value?ce.join(", "):ce:""}),ie=z(()=>s.type.includes("time")),re=z(()=>s.type.startsWith("time")),Se=z(()=>s.type==="dates"),je=z(()=>s.type==="months"),ee=z(()=>s.type==="years"),ne=z(()=>s.prefixIcon||(ie.value?KD:iae)),pe=z(()=>s.clearable&&!b.value&&!s.readonly&&!P.value&&(G.value||N.value)),$e=ce=>{s.readonly||b.value||(pe.value&&(ce==null||ce.stopPropagation(),E.value.handleClear?E.value.handleClear():T(d.valueOnClear.value),K(d.valueOnClear.value,!0),ve()),i("clear"))},Ce=async ce=>{var Le;s.readonly||b.value||(((Le=ce.target)==null?void 0:Le.tagName)!=="INPUT"||N.value||!s.automaticDropdown)&&(S.value=!0)},Pe=()=>{s.readonly||b.value||!P.value&&s.clearable&&(G.value=!0)},Ue=()=>{G.value=!1},Fe=ce=>{var Le;s.readonly||b.value||(((Le=ce.touches[0].target)==null?void 0:Le.tagName)!=="INPUT"||N.value||!s.automaticDropdown)&&(S.value=!0)},ze=z(()=>s.type.includes("range")),De=ji(),ct=z(()=>{var ce,Le;return(Le=(ce=M(h))==null?void 0:ce.popperRef)==null?void 0:Le.contentRef}),Qe=cD(f,ce=>{const Le=M(ct),pt=zs(f);Le&&(ce.target===Le||ce.composedPath().includes(Le))||ce.target===pt||pt&&ce.composedPath().includes(pt)||(S.value=!1)});_n(()=>{Qe==null||Qe()});const ot=()=>{if(!(re.value&&!s.saveOnBlur)){if(C.value){const ce=be(fe.value);ce&&(Me(ce)&&T(I0(ce)),C.value=null)}C.value===""&&(T(d.valueOnClear.value),K(d.valueOnClear.value,!0),C.value=null)}},be=ce=>ce?E.value.parseUserInput(ce):null,me=ce=>ce?Ae(ce)?ce.map(Le=>Le.format(s.format)):ce.format(s.format):null,Me=ce=>E.value.isValidValue(ce),Te=async ce=>{if(s.readonly||b.value)return;const Le=hs(ce);if(H(ce),Le===Ye.esc){S.value===!0&&(S.value=!1,ce.preventDefault(),ce.stopPropagation());return}if(Le===Ye.down&&(E.value.handleFocusPicker&&(ce.preventDefault(),ce.stopPropagation()),S.value===!1&&(S.value=!0,await st()),E.value.handleFocusPicker)){E.value.handleFocusPicker();return}if(Le===Ye.tab){m=!0;return}if(Le===Ye.enter||Le===Ye.numpadEnter){S.value?(C.value===null||C.value===""||Me(be(fe.value)))&&(ot(),S.value=!1):S.value=!0,ce.preventDefault(),ce.stopPropagation();return}if(C.value){ce.stopPropagation();return}E.value.handleKeydownInput&&E.value.handleKeydownInput(ce)},gt=ce=>{C.value=ce,S.value||(S.value=!0)},Tt=ce=>{const Le=ce.target;C.value?C.value=[Le.value,C.value[1]]:C.value=[Le.value,null]},Xe=ce=>{const Le=ce.target;C.value?C.value=[C.value[0],Le.value]:C.value=[null,Le.value]},ut=()=>{var yn;const ce=C.value,Le=be(ce&&ce[0]),pt=M(x);if(Le&&Le.isValid()){C.value=[me(Le),((yn=fe.value)==null?void 0:yn[1])||null];const ms=[Le,pt&&(pt[1]||null)];Me(ms)&&(T(I0(ms)),C.value=null)}},ft=()=>{var yn;const ce=M(C),Le=be(ce&&ce[1]),pt=M(x);if(Le&&Le.isValid()){C.value=[((yn=M(fe))==null?void 0:yn[0])||null,me(Le)];const ms=[pt&&pt[0],Le];Me(ms)&&(T(I0(ms)),C.value=null)}},ye=()=>{var ce;(ce=f.value)==null||ce.focus()},Ie=()=>{var ce;(ce=f.value)==null||ce.blur()};return Et($a,{props:s,emptyValues:d}),Et(IR,_),e({focus:ye,blur:Ie,handleOpen:ke,handleClose:oe,onPick:L}),(ce,Le)=>(v(),D(M(js),Kt({ref_key:"refPopper",ref:h,visible:M(S),effect:"light",pure:"",trigger:"click"},ce.$attrs,{role:"dialog",teleported:"",transition:`${M(r).namespace.value}-zoom-in-top`,"popper-class":[`${M(r).namespace.value}-picker__popper`,ce.popperClass],"popper-style":ce.popperStyle,"popper-options":M(u),"fallback-placements":ce.fallbackPlacements,"gpu-acceleration":!1,placement:ce.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Z,onShow:ae,onHide:ve}),{default:w(()=>[ze.value?(v(),D(Yde,{key:1,id:ce.id,ref_key:"inputRef",ref:f,"model-value":fe.value,name:ce.name,disabled:M(b),readonly:!ce.editable||ce.readonly,"start-placeholder":ce.startPlaceholder,"end-placeholder":ce.endPlaceholder,class:U(q.value),style:qe(ce.$attrs.style),"aria-label":ce.ariaLabel,tabindex:ce.tabindex,autocomplete:"off",role:"combobox",onClick:Ce,onFocus:M(F),onBlur:M(B),onStartInput:Tt,onStartChange:ut,onEndInput:Xe,onEndChange:ft,onMousedown:Ce,onMouseenter:Pe,onMouseleave:Ue,onTouchstartPassive:Fe,onKeydown:Te},{prefix:w(()=>[ne.value?(v(),D(M(_e),{key:0,class:U([M(a).e("icon"),M(l).e("icon")])},{default:w(()=>[(v(),D(kt(ne.value)))]),_:1},8,["class"])):O("v-if",!0)]),"range-separator":w(()=>[le(ce.$slots,"range-separator",{},()=>[g("span",{class:U(M(l).b("separator"))},$(ce.rangeSeparator),3)])]),suffix:w(()=>[ce.clearIcon?(v(),D(M(_e),{key:0,class:U(X.value),onMousedown:Be(M(Lt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(kt(ce.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(v(),D(M(_t),{key:0,id:ce.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":fe.value,name:ce.name,size:M(De),disabled:M(b),placeholder:ce.placeholder,class:U([M(r).b("editor"),M(r).bm("editor",ce.type),M(r).is("focus",M(S)),ce.$attrs.class]),style:qe(ce.$attrs.style),readonly:!ce.editable||ce.readonly||Se.value||je.value||ee.value||ce.type==="week","aria-label":ce.ariaLabel,tabindex:ce.tabindex,"validate-event":!1,onInput:gt,onFocus:M(F),onBlur:M(B),onKeydown:Te,onChange:ot,onMousedown:Ce,onMouseenter:Pe,onMouseleave:Ue,onTouchstartPassive:Fe,onClick:Le[0]||(Le[0]=Be(()=>{},["stop"]))},{prefix:w(()=>[ne.value?(v(),D(M(_e),{key:0,class:U(M(a).e("icon")),onMousedown:Be(Ce,["prevent"]),onTouchstartPassive:Fe},{default:w(()=>[(v(),D(kt(ne.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:w(()=>[pe.value&&ce.clearIcon?(v(),D(M(_e),{key:0,class:U(`${M(a).e("icon")} clear-icon`),onMousedown:Be(M(Lt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(kt(ce.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:w(()=>[le(ce.$slots,"default",{visible:M(S),actualVisible:M(k),parsedValue:M(x),format:ce.format,dateFormat:ce.dateFormat,timeFormat:ce.timeFormat,unlinkPanels:ce.unlinkPanels,type:ce.type,defaultValue:ce.defaultValue,showNow:ce.showNow,showConfirm:ce.showConfirm,showFooter:ce.showFooter,showWeekNumber:ce.showWeekNumber,onPick:Le[1]||(Le[1]=(...pt)=>M(L)&&M(L)(...pt)),onSelectRange:se,onSetPickerOption:Le[2]||(Le[2]=(...pt)=>M(I)&&M(I)(...pt)),onCalendarChange:Le[3]||(Le[3]=(...pt)=>M(V)&&M(V)(...pt)),onClear:$e,onPanelChange:Le[4]||(Le[4]=(...pt)=>M(R)&&M(R)(...pt)),onMousedown:Le[5]||(Le[5]=Be(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),Gde=qde;const zl=new Map;if(qt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of zl.values())for(const{documentHandler:s}of n)s(e,t);t=void 0}})}function tA(t,e){let n=[];return Ae(e.arg)?n=e.arg:Eo(e.arg)&&n.push(e.arg),function(s,i){const o=e.instance.popperRef,r=s.target,a=i==null?void 0:i.target,l=!e||!e.instance,c=!r||!a,u=t.contains(r)||t.contains(a),d=t===r,h=n.length&&n.some(p=>p==null?void 0:p.contains(r))||n.length&&n.includes(a),f=o&&(o.contains(r)||o.contains(a));l||c||u||d||h||f||e.value(s,i)}}const Zg={beforeMount(t,e){zl.has(t)||zl.set(t,[]),zl.get(t).push({documentHandler:tA(t,e),bindingFn:e.value})},updated(t,e){zl.has(t)||zl.set(t,[]);const n=zl.get(t),s=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:tA(t,e),bindingFn:e.value};s>=0?n.splice(s,1,i):n.push(i)},unmounted(t){zl.delete(t)}},Xde=100,Kde=600,Qv="_RepeatClick",bb={beforeMount(t,e){const n=e.value,{interval:s=Xde,delay:i=Kde}=Je(n)?{}:n;let o,r;const a=()=>Je(n)?n():n.handler(),l=()=>{r&&(clearTimeout(r),r=void 0),o&&(clearInterval(o),o=void 0)},c=u=>{u.button===0&&(l(),a(),document.addEventListener("mouseup",l,{once:!0}),r=setTimeout(()=>{o=setInterval(()=>{a()},s)},i))};t[Qv]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[Qv])return;const{start:e,clear:n}=t[Qv];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[Qv]=null}},ak="_trap-focus-children",Pu=[],nA=t=>{if(Pu.length===0)return;const e=hs(t),n=Pu[Pu.length-1][ak];if(n.length>0&&e===Ye.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const s=t.shiftKey,i=t.target===n[0],o=t.target===n[n.length-1];i&&s&&(t.preventDefault(),n[n.length-1].focus()),o&&!s&&(t.preventDefault(),n[0].focus())}},Zde={beforeMount(t){t[ak]=a$(t),Pu.push(t),Pu.length<=1&&document.addEventListener("keydown",nA)},updated(t){st(()=>{t[ak]=a$(t)})},unmounted(){Pu.shift(),Pu.length===0&&document.removeEventListener("keydown",nA)}};var sA=!1,Cu,lk,ck,L0,O0,BR,D0,uk,dk,hk,zR,fk,pk,HR,UR;function Ji(){if(!sA){sA=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(fk=/\b(iPhone|iP[ao]d)/.exec(t),pk=/\b(iP[ao]d)/.exec(t),hk=/Android/i.exec(t),HR=/FBAN\/\w+;/i.exec(t),UR=/Mobile/i.exec(t),zR=!!/Win64/.exec(t),e){Cu=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Cu&&document&&document.documentMode&&(Cu=document.documentMode);var s=/(?:Trident\/(\d+.\d+))/.exec(t);BR=s?parseFloat(s[1])+4:Cu,lk=e[2]?parseFloat(e[2]):NaN,ck=e[3]?parseFloat(e[3]):NaN,L0=e[4]?parseFloat(e[4]):NaN,L0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),O0=e&&e[1]?parseFloat(e[1]):NaN):O0=NaN}else Cu=lk=ck=O0=L0=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);D0=i?parseFloat(i[1].replace("_",".")):!0}else D0=!1;uk=!!n[2],dk=!!n[3]}else D0=uk=dk=!1}}var mk={ie:function(){return Ji()||Cu},ieCompatibilityMode:function(){return Ji()||BR>Cu},ie64:function(){return mk.ie()&&zR},firefox:function(){return Ji()||lk},opera:function(){return Ji()||ck},webkit:function(){return Ji()||L0},safari:function(){return mk.webkit()},chrome:function(){return Ji()||O0},windows:function(){return Ji()||uk},osx:function(){return Ji()||D0},linux:function(){return Ji()||dk},iphone:function(){return Ji()||fk},mobile:function(){return Ji()||fk||pk||hk||UR},nativeApp:function(){return Ji()||HR},android:function(){return Ji()||hk},ipad:function(){return Ji()||pk}},Jde=mk,e0=!!(typeof window<"u"&&window.document&&window.document.createElement),Qde={canUseDOM:e0,canUseWorkers:typeof Worker<"u",canUseEventListeners:e0&&!!(window.addEventListener||window.attachEvent),canUseViewport:e0&&!!window.screen,isInWorker:!e0},jR=Qde,WR;jR.canUseDOM&&(WR=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function ehe(t,e){if(!jR.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,s=n in document;if(!s){var i=document.createElement("div");i.setAttribute(n,"return;"),s=typeof i[n]=="function"}return!s&&WR&&t==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var the=ehe,iA=10,oA=40,rA=800;function YR(t){var e=0,n=0,s=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),s=e*iA,i=n*iA,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||i)&&t.deltaMode&&(t.deltaMode==1?(s*=oA,i*=oA):(s*=rA,i*=rA)),s&&!e&&(e=s<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:s,pixelY:i}}YR.getEventType=function(){return Jde.firefox()?"DOMMouseScroll":the("wheel")?"wheel":"mousewheel"};var nhe=YR;/**
60 * Checks if an event is supported in the current execution environment.
61 *
62 * NOTE: This will not work correctly for non-generic events such as `change`,
63 * `reset`, `load`, `error`, and `select`.
64 *
65 * Borrows from Modernizr.
66 *
67 * @param {string} eventNameSuffix Event name, e.g. "click".
68 * @param {?boolean} capture Check if the capture phase is supported.
69 * @return {boolean} True if the event is supported.
70 * @internal
71 * @license Modernizr 3.0.0pre (Custom Build) | MIT
72 */const R0="_Mousewheel",aA=function(t,e){if(t&&t.addEventListener){qR(t);const n=function(s){const i=nhe(s);e&&Reflect.apply(e,this,[s,i])};t[R0]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},qR=t=>{var e;(e=t[R0])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[R0].wheelHandler),t[R0]=null)},she={beforeMount(t,e){aA(t,e.value)},unmounted(t){qR(t)},updated(t,e){e.value!==e.oldValue&&aA(t,e.value)}},ihe=We({...zde,datetimeRole:String,parsedValue:{type:de(Object)}}),ohe=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const s=(r,a,l,c)=>{const u={hour:t,minute:e,second:n};let d=r;return["hour","minute","second"].forEach(h=>{if(u[h]){let f;const p=u[h];switch(h){case"minute":f=p(d.hour(),a,c);break;case"second":f=p(d.hour(),d.minute(),a,c);break;default:f=p(a,c);break}if(f!=null&&f.length&&!f.includes(d[h]())){const m=l?0:f.length-1;d=d[h](f[m])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:s,onSetOption:([r,a])=>{i[r]=a}}},Iw=t=>{const e=(s,i)=>s||i,n=s=>s!==!0;return t.map(e).filter(n)},GR=(t,e,n)=>({getHoursList:(r,a)=>Pw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>Pw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>Pw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),rhe=(t,e,n)=>{const{getHoursList:s,getMinutesList:i,getSecondsList:o}=GR(t,e,n);return{getAvailableHours:(c,u)=>Iw(s(c,u)),getAvailableMinutes:(c,u,d)=>Iw(i(c,u,d)),getAvailableSeconds:(c,u,d,h)=>Iw(o(c,u,d,h))}},ahe=(t,e)=>{const n=J(t.parsedValue);return Ee(()=>t.visible,s=>{const i=lx(e.modelValue),o=lx(e.valueOnClear);if(s&&i===o){n.value=o;return}s||(n.value=t.parsedValue)}),n},lhe=We({role:{type:String,required:!0},spinnerDate:{type:de(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:de(String),default:""},...n5}),che=["onClick"],uhe=["onMouseenter"];var dhe=he({__name:"basic-time-spinner",props:lhe,emits:[En,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:s,format:i,saveOnBlur:o}=He($a).props,r=e,a=Ne("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=GR(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const h={hours:!1,minutes:!1,seconds:!1},f=J(),p={hours:J(),minutes:J(),seconds:J()},m=z(()=>n.showSeconds?Z$:Z$.slice(0,2)),b=z(()=>{const{spinnerDate:Q}=n;return{hours:Q.hour(),minutes:Q.minute(),seconds:Q.second()}}),_=z(()=>{const{hours:Q,minutes:se}=M(b),{role:Z,spinnerDate:ae}=n,ve=s?void 0:ae;return{hours:l(Z,ve),minutes:c(Q,Z,ve),seconds:u(Q,se,Z,ve)}}),x=z(()=>{const{hours:Q,minutes:se,seconds:Z}=M(b);return{hours:Tw(Q,23),minutes:Tw(se,59),seconds:Tw(Z,59)}}),k=cd(Q=>{d=!1,E(Q)},200),C=Q=>{if(!n.amPmMode)return"";const se=n.amPmMode==="A";let Z=Q<12?" am":" pm";return se&&(Z=Z.toUpperCase()),Z},S=Q=>{let se=[0,0];const Z=i||Kg,ae=Z.indexOf("HH"),ve=Z.indexOf("mm"),ke=Z.indexOf("ss");switch(Q){case"hours":ae!==-1&&(se=[ae,ae+2]);break;case"minutes":ve!==-1&&(se=[ve,ve+2]);break;case"seconds":ke!==-1&&(se=[ke,ke+2]);break}const[oe,fe]=se;r("select-range",oe,fe),f.value=Q},E=Q=>{L(Q,M(b)[Q])},P=()=>{E("hours"),E("minutes"),E("seconds")},T=Q=>Q.querySelector(`.${a.namespace.value}-scrollbar__wrap`),L=(Q,se)=>{if(n.arrowControl)return;const Z=M(p[Q]);Z&&Z.$el&&(o||(h[Q]=!0,jg(()=>{h[Q]=!1})),T(Z.$el).scrollTop=Math.max(0,se*I(Q)))},I=Q=>{var Z;const se=(Z=M(p[Q]))==null?void 0:Z.$el.querySelector("li");return se&&Number.parseFloat(cc(se,"height"))||0},V=()=>{N(1)},R=()=>{N(-1)},N=Q=>{f.value||S("hours");const se=f.value,Z=M(b)[se],ae=F(se,Z,Q,f.value==="hours"?24:60);B(se,ae),L(se,ae),st(()=>S(se))},F=(Q,se,Z,ae)=>{let ve=(se+Z+ae)%ae;const ke=M(_)[Q];for(;ke[ve]&&ve!==se;)ve=(ve+Z+ae)%ae;return ve},B=(Q,se)=>{if(M(_)[Q][se])return;const{hours:Z,minutes:ae,seconds:ve}=M(b);let ke;switch(Q){case"hours":ke=n.spinnerDate.hour(se).minute(ae).second(ve);break;case"minutes":ke=n.spinnerDate.hour(Z).minute(se).second(ve);break;case"seconds":ke=n.spinnerDate.hour(Z).minute(ae).second(se);break}r(En,ke)},G=(Q,{value:se,disabled:Z})=>{Z||(B(Q,se),S(Q),L(Q,se))},q=Q=>{if(!o&&h[Q])return;const se=M(p[Q]);se&&(d=!0,k(Q),B(Q,Math.min(Math.round((T(se.$el).scrollTop-(X(Q)*.5-10)/I(Q)+3)/I(Q)),Q==="hours"?23:59)))},X=Q=>M(p[Q]).$el.offsetHeight,K=()=>{const Q=se=>{const Z=M(p[se]);Z&&Z.$el&&(T(Z.$el).onscroll=()=>{q(se)})};Q("hours"),Q("minutes"),Q("seconds")};Vt(()=>{st(()=>{!n.arrowControl&&K(),P(),n.role==="start"&&S("hours")})});const H=(Q,se)=>{p[se].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,N]),r("set-option",[`${n.role}_emitSelectRange`,S]),Ee(()=>n.spinnerDate,()=>{d||P()}),(Q,se)=>(v(),A("div",{class:U([M(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),A(te,{key:0},we(m.value,Z=>(v(),D(M(Ei),{key:Z,ref_for:!0,ref:ae=>H(ae,Z),class:U(M(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":M(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ae=>S(Z),onMousemove:ae=>E(Z)},{default:w(()=>[(v(!0),A(te,null,we(_.value[Z],(ae,ve)=>(v(),A("li",{key:ve,class:U([M(a).be("spinner","item"),M(a).is("active",ve===b.value[Z]),M(a).is("disabled",ae)]),onClick:ke=>G(Z,{value:ve,disabled:ae})},[Z==="hours"?(v(),A(te,{key:0},[Y($(("0"+(Q.amPmMode?ve%12||12:ve)).slice(-2))+$(C(ve)),1)],64)):(v(),A(te,{key:1},[Y($(("0"+ve).slice(-2)),1)],64))],10,che))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),A(te,{key:1},we(m.value,Z=>(v(),A("div",{key:Z,class:U([M(a).be("spinner","wrapper"),M(a).is("arrow")]),onMouseenter:ae=>S(Z)},[Oe((v(),D(M(_e),{class:U(["arrow-up",M(a).be("spinner","arrow")])},{default:w(()=>[y(M(q_))]),_:1},8,["class"])),[[M(bb),R]]),Oe((v(),D(M(_e),{class:U(["arrow-down",M(a).be("spinner","arrow")])},{default:w(()=>[y(M(Td))]),_:1},8,["class"])),[[M(bb),V]]),g("ul",{class:U(M(a).be("spinner","list"))},[(v(!0),A(te,null,we(x.value[Z],(ae,ve)=>(v(),A("li",{key:ve,class:U([M(a).be("spinner","item"),M(a).is("active",ae===b.value[Z]),M(a).is("disabled",_.value[Z][ae])])},[M(wt)(ae)?(v(),A(te,{key:0},[Z==="hours"?(v(),A(te,{key:0},[Y($(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+$(C(ae)),1)],64)):(v(),A(te,{key:1},[Y($(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,uhe))),128)):O("v-if",!0)],2))}}),hhe=dhe,fhe=he({__name:"panel-time-pick",props:ihe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,s=e,i=He($a),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=i.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=rhe(r,a,l),f=Ne("time"),{t:p,lang:m}=Xt(),b=J([0,2]),_=ahe(n,{modelValue:z(()=>i.props.modelValue),valueOnClear:z(()=>i!=null&&i.emptyValues?i.emptyValues.valueOnClear.value:null)}),x=z(()=>bn(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),k=z(()=>n.format.includes("ss")),C=z(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=X=>{const K=dt(X).locale(m.value),H=B(K);return K.isSame(H)},E=()=>{const X=_.value;s("pick",X,!1),st(()=>{_.value=X})},P=(X=!1,K=!1)=>{K||s("pick",n.parsedValue,X)},T=X=>{n.visible&&s("pick",B(X).millisecond(0),!0)},L=(X,K)=>{s("select-range",X,K),b.value=[X,K]},I=X=>{const K=n.format,H=K.indexOf("HH"),Q=K.indexOf("mm"),se=K.indexOf("ss"),Z=[],ae=[];H!==-1&&(Z.push(H),ae.push("hours")),Q!==-1&&(Z.push(Q),ae.push("minutes")),se!==-1&&k.value&&(Z.push(se),ae.push("seconds"));const ve=(Z.indexOf(b.value[0])+X+Z.length)%Z.length;R.start_emitSelectRange(ae[ve])},V=X=>{const K=hs(X),{left:H,right:Q,up:se,down:Z}=Ye;if([H,Q].includes(K)){I(K===H?-1:1),X.preventDefault();return}if([se,Z].includes(K)){const ae=K===se?-1:1;R.start_scrollDown(ae),X.preventDefault();return}},{timePickerOptions:R,onSetOption:N,getAvailableTime:F}=ohe({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),B=X=>F(X,n.datetimeRole||"",!0),G=X=>X?dt(X,n.format).locale(m.value):null,q=()=>dt(c).locale(m.value);return s("set-picker-option",["isValidValue",S]),s("set-picker-option",["parseUserInput",G]),s("set-picker-option",["handleKeydownInput",V]),s("set-picker-option",["getRangeAvailableTime",B]),s("set-picker-option",["getDefaultValue",q]),s("set-picker-option",["handleCancel",E]),(X,K)=>(v(),D(Vo,{name:x.value},{default:w(()=>[X.actualVisible||X.visible?(v(),A("div",{key:0,class:U(M(f).b("panel"))},[g("div",{class:U([M(f).be("panel","content"),{"has-seconds":k.value}])},[y(hhe,{ref:"spinner",role:X.datetimeRole||"start","arrow-control":M(o),"show-seconds":k.value,"am-pm-mode":C.value,"spinner-date":X.parsedValue,"disabled-hours":M(r),"disabled-minutes":M(a),"disabled-seconds":M(l),onChange:T,onSetOption:M(N),onSelectRange:L},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),g("div",{class:U(M(f).be("panel","footer"))},[g("button",{type:"button",class:U([M(f).be("panel","btn"),"cancel"]),onClick:E},$(M(p)("el.datepicker.cancel")),3),g("button",{type:"button",class:U([M(f).be("panel","btn"),"confirm"]),onClick:K[0]||(K[0]=H=>P())},$(M(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),gk=fhe,XR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},s=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,r=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(_){this[b]=+_}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(_){if(!_||_==="Z")return 0;var x=_.match(/([+-]|\d\d)/g),k=60*x[1]+(+x[2]||0);return k===0?0:x[0]==="+"?-k:k}(b)}],h=function(b){var _=l[b];return _&&(_.indexOf?_:_.s.concat(_.f))},f=function(b,_){var x,k=l.meridiem;if(k){for(var C=1;C<=24;C+=1)if(b.indexOf(k(C,0,_))>-1){x=C>12;break}}else x=b===(_?"pm":"PM");return x},p={A:[a,function(b){this.afternoon=f(b,!1)}],a:[a,function(b){this.afternoon=f(b,!0)}],Q:[i,function(b){this.month=3*(b-1)+1}],S:[i,function(b){this.milliseconds=100*+b}],SS:[o,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[a,function(b){var _=l.ordinal,x=b.match(/\d+/);if(this.day=x[0],_)for(var k=1;k<=31;k+=1)_(k).replace(/\[|\]/g,"")===b&&(this.day=k)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(b){var _=h("months"),x=(h("monthsShort")||_.map(function(k){return k.slice(0,3)})).indexOf(b)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[a,function(b){var _=h("months").indexOf(b)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(b){var _,x;_=b,x=l&&l.formats;for(var k=(b=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,V,R){var N=R&&R.toUpperCase();return V||x[R]||n[R]||x[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,B,G){return B||G.slice(1)})})).match(s),C=k.length,S=0;S<C;S+=1){var E=k[S],P=p[E],T=P&&P[0],L=P&&P[1];k[S]=L?{regex:T,parser:L}:E.replace(/^\[|\]$/g,"")}return function(I){for(var V={},R=0,N=0;R<C;R+=1){var F=k[R];if(typeof F=="string")N+=F.length;else{var B=F.regex,G=F.parser,q=I.slice(N),X=B.exec(q)[0];G.call(V,X),I=I.replace(X,"")}}return function(K){var H=K.afternoon;if(H!==void 0){var Q=K.hours;H?Q<12&&(K.hours+=12):Q===12&&(K.hours=0),delete K.afternoon}}(V),V}}return function(b,_,x){x.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var k=_.prototype,C=k.parse;k.parse=function(S){var E=S.date,P=S.utc,T=S.args;this.$u=P;var L=T[1];if(typeof L=="string"){var I=T[2]===!0,V=T[3]===!0,R=I||V,N=T[2];V&&(N=T[2]),l=this.$locale(),!I&&N&&(l=x.Ls[N]),this.$d=function(q,X,K,H){try{if(["x","X"].indexOf(X)>-1)return new Date((X==="X"?1e3:1)*q);var Q=m(X)(q),se=Q.year,Z=Q.month,ae=Q.day,ve=Q.hours,ke=Q.minutes,oe=Q.seconds,fe=Q.milliseconds,ie=Q.zone,re=Q.week,Se=new Date,je=ae||(se||Z?1:Se.getDate()),ee=se||Se.getFullYear(),ne=0;se&&!Z||(ne=Z>0?Z-1:Se.getMonth());var pe,$e=ve||0,Ce=ke||0,Pe=oe||0,Ue=fe||0;return ie?new Date(Date.UTC(ee,ne,je,$e,Ce,Pe,Ue+60*ie.offset*1e3)):K?new Date(Date.UTC(ee,ne,je,$e,Ce,Pe,Ue)):(pe=new Date(ee,ne,je,$e,Ce,Pe,Ue),re&&(pe=H(pe).week(re).toDate()),pe)}catch{return new Date("")}}(E,L,P,x),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),R&&E!=this.format(L)&&(this.$d=new Date("")),l={}}else if(L instanceof Array)for(var F=L.length,B=1;B<=F;B+=1){T[1]=L[B-1];var G=x.apply(this,T);if(G.isValid()){this.$d=G.$d,this.$L=G.$L,this.init();break}B===F&&(this.$d=new Date(""))}else C.call(this,S)}}})})(XR);var phe=XR.exports;const KR=fi(phe),vk=We({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:kl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),mhe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},ghe=["aria-label"],vhe=["aria-label"];var yhe=he({name:"ElTag",__name:"tag",props:vk,emits:mhe,setup(t,{emit:e}){const n=t,s=e,i=ji(),{t:o}=Xt(),r=Ne("tag"),a=z(()=>{const{type:d,hit:h,effect:f,closable:p,round:m}=n;return[r.b(),r.is("closable",p),r.m(d||"primary"),r.m(i.value),r.m(f),r.is("hit",h),r.is("round",m)]}),l=d=>{s("close",d)},c=d=>{s("click",d)},u=d=>{var h,f,p;(p=(f=(h=d==null?void 0:d.component)==null?void 0:h.subTree)==null?void 0:f.component)!=null&&p.bum&&(d.component.subTree.component.bum=null)};return(d,h)=>t.disableTransitions?(v(),A("span",{key:0,class:U(a.value),style:qe({backgroundColor:t.color}),onClick:c},[g("span",{class:U(M(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":M(o)("el.tag.close"),class:U(M(r).e("close")),type:"button",onClick:Be(l,["stop"])},[y(M(_e),null,{default:w(()=>[y(M(br))]),_:1})],10,ghe)):O("v-if",!0)],6)):(v(),D(Vo,{key:1,name:`${M(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:w(()=>[g("span",{class:U(a.value),style:qe({backgroundColor:t.color}),onClick:c},[g("span",{class:U(M(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":M(o)("el.tag.close"),class:U(M(r).e("close")),type:"button",onClick:Be(l,["stop"])},[y(M(_e),null,{default:w(()=>[y(M(br))]),_:1})],10,vhe)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),bhe=yhe;const Bo=Wt(bhe),ZR=Symbol("ElSelectGroup"),K_=Symbol("ElSelect"),yk={label:"label",value:"value",disabled:"disabled",options:"options"};function _he(t){const e=J({...yk,...t.props});let n={...t.props};return Ee(()=>t.props,a=>{zi(a,n)||(e.value={...yk,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>Bi(a,e.value.label),getValue:a=>Bi(a,e.value.value),getDisabled:a=>Bi(a,e.value.disabled),getOptions:a=>Bi(a,e.value.options)}}const whe=We({name:String,id:String,modelValue:{type:de([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:go,effect:{type:de(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},popperOptions:{type:de(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:de(Function)},filterMethod:{type:de(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:de(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:Nn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ds,default:Pd},fitInputWidth:Boolean,suffixIcon:{type:ds,default:Td},tagType:{...vk.type,default:"info"},tagEffect:{...vk.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:de(String),values:lp,default:"bottom-start"},fallbackPlacements:{type:de(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Nn.appendTo,options:{type:de(Array)},props:{type:de(Object),default:()=>yk},...R1,...wr(["ariaLabel"])});Rt+"",En+"",_R.scroll;const bk="ElOption",xhe=We({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function khe(t,e){const n=He(K_);n||mo(bk,"usage: <el-select><el-option /></el-select/>");const s=He(ZR,{disabled:!1}),i=z(()=>u(si(n.props.modelValue),t.value)),o=z(()=>{if(n.props.multiple){const f=si(n.props.modelValue??[]);return!i.value&&f.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=z(()=>t.label??(yt(t.value)?"":t.value)),a=z(()=>t.value||t.label||""),l=z(()=>t.disabled||e.groupDisabled||o.value),c=ht(),u=(f=[],p)=>{if(yt(t.value)){const m=n.props.valueKey;return f&&f.some(b=>nn(Bi(b,m))===Bi(p,m))}else return f&&f.includes(p)},d=()=>{l.value||(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},h=f=>{e.visible=new RegExp(Aie(f),"i").test(String(r.value))||t.created};return Ee(()=>r.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Ee(()=>t.value,(f,p)=>{const{remote:m,valueKey:b}=n.props;if((m?f!==p:!zi(f,p))&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(b&&yt(f)&&yt(p)&&f[b]===p[b])return;n.setSelected()}}),Ee(()=>s.disabled,()=>{e.groupDisabled=s.disabled},{immediate:!0}),{select:n,currentLabel:r,currentValue:a,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:h}}var Che=he({name:bk,componentName:bk,props:xhe,setup(t){const e=Ne("select"),n=yr(),s=z(()=>[e.be("dropdown","item"),e.is("disabled",M(a)),e.is("selected",M(r)),e.is("hovering",M(h))]),i=Dn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u}=khe(t,i),{visible:d,hover:h}=po(i),f=ht().proxy;l.onOptionCreate(f),_n(()=>{const m=f.value;st(()=>{const{selected:b}=l.states,_=b.some(x=>x.value===f.value);l.states.cachedOptions.get(m)===f&&!_&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:s,currentLabel:o,itemSelected:r,isDisabled:a,select:l,visible:d,hover:h,states:i,hoverItem:c,updateOption:u,selectOptionClick:p}}});const She=["id","aria-disabled","aria-selected"];function $he(t,e,n,s,i,o){return Oe((v(),A("li",{id:t.id,class:U(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:e[0]||(e[0]=(...r)=>t.hoverItem&&t.hoverItem(...r)),onClick:e[1]||(e[1]=Be((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,$(t.currentLabel),1)])],42,She)),[[jt,t.visible]])}var s5=hi(Che,[["render",$he]]),Ahe=he({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Ne("select"),n=J(),s=ht(),i=J([]);Et(ZR,Dn({...po(t)}));const o=z(()=>i.value.some(c=>c.visible===!0)),r=c=>{var u;return c.type.name==="ElOption"&&!!((u=c.component)!=null&&u.proxy)},a=c=>{const u=si(c),d=[];return u.forEach(h=>{var f;is(h)&&(r(h)?d.push(h.component.proxy):Ae(h.children)&&h.children.length?d.push(...a(h.children)):(f=h.component)!=null&&f.subTree&&d.push(...a(h.component.subTree)))}),d},l=()=>{i.value=a(s.subTree)};return Vt(()=>{l()}),mie(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function Ehe(t,e,n,s,i,o){return Oe((v(),A("ul",{ref:"groupRef",class:U(t.ns.be("group","wrap"))},[g("li",{class:U(t.ns.be("group","title"))},$(t.label),3),g("li",null,[g("ul",{class:U(t.ns.b("group"))},[le(t.$slots,"default")],2)])],2)),[[jt,t.visible]])}var i5=hi(Ahe,[["render",Ehe]]),Mhe=he({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=He(K_),e=Ne("select"),n=z(()=>t.props.popperClass),s=z(()=>t.props.multiple),i=z(()=>t.props.fitInputWidth),o=J("");function r(){var l;const a=(l=t.selectRef)==null?void 0:l.offsetWidth;a?o.value=`${a-jZ}px`:o.value=""}return Vt(()=>{r(),Bs(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:s,isFitInputWidth:i}}});function The(t,e,n,s,i,o){return v(),A("div",{class:U([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:qe({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(v(),A("div",{key:0,class:U(t.ns.be("dropdown","header"))},[le(t.$slots,"header")],2)):O("v-if",!0),le(t.$slots,"default"),t.$slots.footer?(v(),A("div",{key:1,class:U(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Phe=hi(Mhe,[["render",The]]);const Ihe=(t,e)=>{const{t:n}=Xt(),s=Gi(),i=yr(),o=Ne("select"),r=Ne("input"),a=Dn({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=J(),c=J(),u=J(),d=J(),h=J(),f=J(),p=J(),m=J(),b=J(),_=J(),x=J(),k=J(!1),C=J(),S=J(!1),{form:E,formItem:P}=No(),{inputId:T}=qc(t,{formItemContext:P}),{valueOnClear:L,isEmptyValue:I}=z4(t),{isComposing:V,handleCompositionStart:R,handleCompositionUpdate:N,handleCompositionEnd:F}=WD({afterComposition:xe=>gt(xe)}),B=Cs(),{wrapperRef:G,isFocused:q,handleBlur:X}=D1(h,{disabled:B,afterFocus(){t.automaticDropdown&&!k.value&&(k.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(xe){var Ze,St;return((Ze=u.value)==null?void 0:Ze.isFocusInsideContent(xe))||((St=d.value)==null?void 0:St.isFocusInsideContent(xe))},afterBlur(){var xe;k.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((xe=P==null?void 0:P.validate)==null||xe.call(P,"blur").catch(Ze=>Pt(Ze)))}}),K=z(()=>Ae(t.modelValue)?t.modelValue.length>0:!I(t.modelValue)),H=z(()=>(E==null?void 0:E.statusIcon)??!1),Q=z(()=>t.clearable&&!B.value&&K.value&&(q.value||a.inputHovering)),se=z(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),Z=z(()=>o.is("reverse",!!(se.value&&k.value))),ae=z(()=>(P==null?void 0:P.validateState)||""),ve=z(()=>ae.value&&aR[ae.value]),ke=z(()=>t.remote?t.debounce:0),oe=z(()=>t.remote&&!a.inputValue&&a.options.size===0),fe=z(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&a.inputValue&&a.options.size>0&&ie.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),ie=z(()=>re.value.filter(xe=>xe.visible).length),re=z(()=>{const xe=Array.from(a.options.values()),Ze=[];return a.optionValues.forEach(St=>{const Mn=xe.findIndex(bs=>bs.value===St);Mn>-1&&Ze.push(xe[Mn])}),Ze.length>=xe.length?Ze:xe}),Se=z(()=>Array.from(a.cachedOptions.values())),je=z(()=>{const xe=re.value.filter(Ze=>!Ze.created).some(Ze=>Ze.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!xe}),ee=()=>{t.filterable&&Je(t.filterMethod)||t.filterable&&t.remote&&Je(t.remoteMethod)||re.value.forEach(xe=>{var Ze;(Ze=xe.updateOption)==null||Ze.call(xe,a.inputValue)})},ne=ji(),pe=z(()=>["small"].includes(ne.value)?"small":"default"),$e=z({get(){return k.value&&(t.loading||!oe.value||t.remote&&!!s.empty)&&(!S.value||!w4(a.previousQuery)||a.options.size>0)},set(xe){k.value=xe}}),Ce=z(()=>{if(t.multiple&&!bn(t.modelValue))return si(t.modelValue).length===0&&!a.inputValue;const xe=Ae(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||bn(xe)?!a.inputValue:!0}),Pe=z(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!K.value?xe:a.selectedLabel}),Ue=z(()=>Hx?null:"mouseenter");Ee(()=>t.modelValue,(xe,Ze)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Fe("")),De(),!zi(xe,Ze)&&t.validateEvent&&(P==null||P.validate("change").catch(St=>Pt(St)))},{flush:"post",deep:!0}),Ee(()=>k.value,xe=>{xe?Fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Ee(()=>a.options.entries(),()=>{qt&&(De(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&ze())},{flush:"post"}),Ee([()=>a.hoveringIndex,re],([xe])=>{wt(xe)&&xe>-1?C.value=re.value[xe]||{}:C.value={},re.value.forEach(Ze=>{Ze.hover=C.value===Ze})}),ml(()=>{a.isBeforeHide||ee()});const Fe=xe=>{a.previousQuery===xe||V.value||(a.previousQuery=xe,t.filterable&&Je(t.filterMethod)?t.filterMethod(xe):t.filterable&&t.remote&&Je(t.remoteMethod)&&t.remoteMethod(xe),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value?st(ze):st(Qe))},ze=()=>{const xe=re.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Ze=xe.find(Mn=>Mn.created),St=xe[0];a.hoveringIndex=Le(re.value.map(Mn=>Mn.value),Ze||St)},De=()=>{if(t.multiple)a.selectedLabel="";else{const Ze=ct(Ae(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Ze.currentLabel,a.selected=[Ze];return}const xe=[];bn(t.modelValue)||si(t.modelValue).forEach(Ze=>{xe.push(ct(Ze))}),a.selected=xe},ct=xe=>{let Ze;const St=id(xe);for(let Mn=a.cachedOptions.size-1;Mn>=0;Mn--){const bs=Se.value[Mn];if(St?Bi(bs.value,t.valueKey)===Bi(xe,t.valueKey):bs.value===xe){Ze={index:re.value.filter(Ys=>!Ys.created).indexOf(bs),value:xe,currentLabel:bs.currentLabel,get isDisabled(){return bs.isDisabled}};break}}return Ze||{index:-1,value:xe,currentLabel:St?xe.label:xe??""}},Qe=()=>{const xe=a.selected.length;if(xe>0){const Ze=a.selected[xe-1];a.hoveringIndex=re.value.findIndex(St=>Wo(Ze)===Wo(St))}else a.hoveringIndex=-1},ot=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},be=()=>{a.collapseItemWidth=_.value.getBoundingClientRect().width},me=()=>{var xe,Ze;(Ze=(xe=u.value)==null?void 0:xe.updatePopper)==null||Ze.call(xe)},Me=()=>{var xe,Ze;(Ze=(xe=d.value)==null?void 0:xe.updatePopper)==null||Ze.call(xe)},Te=()=>{a.inputValue.length>0&&!k.value&&(k.value=!0),Fe(a.inputValue)},gt=xe=>{if(a.inputValue=xe.target.value,t.remote)S.value=!0,Tt();else return Te()},Tt=aD(()=>{Te(),S.value=!1},ke),Xe=xe=>{zi(t.modelValue,xe)||e(En,xe)},ut=xe=>Pse(xe,Ze=>{const St=a.cachedOptions.get(Ze);return!(St!=null&&St.disabled)&&!(St!=null&&St.states.groupDisabled)}),ft=xe=>{const Ze=hs(xe);if(t.multiple&&Ze!==Ye.delete&&xe.target.value.length<=0){const St=si(t.modelValue).slice(),Mn=ut(St);if(Mn<0)return;const bs=St[Mn];St.splice(Mn,1),e(Rt,St),Xe(St),e("remove-tag",bs)}},ye=(xe,Ze)=>{const St=a.selected.indexOf(Ze);if(St>-1&&!B.value){const Mn=si(t.modelValue).slice();Mn.splice(St,1),e(Rt,Mn),Xe(Mn),e("remove-tag",Ze.value)}xe.stopPropagation(),Pl()},Ie=xe=>{xe.stopPropagation();const Ze=t.multiple?[]:L.value;if(t.multiple)for(const St of a.selected)St.isDisabled&&Ze.push(St.value);e(Rt,Ze),Xe(Ze),a.hoveringIndex=-1,k.value=!1,e("clear"),Pl()},ce=xe=>{if(t.multiple){const Ze=si(t.modelValue??[]).slice(),St=Le(Ze,xe);St>-1?Ze.splice(St,1):(t.multipleLimit<=0||Ze.length<t.multipleLimit)&&Ze.push(xe.value),e(Rt,Ze),Xe(Ze),xe.created&&Fe(""),t.filterable&&(xe.created||!t.reserveKeyword)&&(a.inputValue="")}else!zi(t.modelValue,xe.value)&&e(Rt,xe.value),Xe(xe.value),k.value=!1;Pl(),!k.value&&st(()=>{pt(xe)})},Le=(xe,Ze)=>bn(Ze)?-1:yt(Ze.value)?xe.findIndex(St=>zi(Bi(St,t.valueKey),Wo(Ze))):xe.indexOf(Ze.value),pt=xe=>{var Mn,bs,Ys,Vp,t9;const Ze=Ae(xe)?xe[xe.length-1]:xe;let St=null;if(!li(Ze==null?void 0:Ze.value)){const Fp=re.value.filter(wW=>wW.value===Ze.value);Fp.length>0&&(St=Fp[0].$el)}if(u.value&&St){const Fp=(Vp=(Ys=(bs=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:bs.contentRef)==null?void 0:Ys.querySelector)==null?void 0:Vp.call(Ys,`.${o.be("dropdown","wrap")}`);Fp&&Fie(Fp,St)}(t9=x.value)==null||t9.handleScroll()},yn=xe=>{a.options.set(xe.value,xe),a.cachedOptions.set(xe.value,xe)},ms=(xe,Ze)=>{a.options.get(xe)===Ze&&a.options.delete(xe)},nu=z(()=>{var xe,Ze;return(Ze=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Ze.contentRef}),Dp=()=>{a.isBeforeHide=!1,st(()=>{var xe;(xe=x.value)==null||xe.update(),pt(a.selected)})},Pl=()=>{var xe;(xe=h.value)==null||xe.focus()},na=()=>{var xe;if(k.value){k.value=!1,st(()=>{var Ze;return(Ze=h.value)==null?void 0:Ze.blur()});return}(xe=h.value)==null||xe.blur()},Sn=xe=>{Ie(xe)},Ti=xe=>{if(k.value=!1,q.value){const Ze=new FocusEvent("blur",xe);st(()=>X(Ze))}},tt=()=>{a.inputValue.length>0?a.inputValue="":k.value=!1},rt=xe=>{var Ze;B.value||t.filterable&&k.value&&xe&&!((Ze=p.value)!=null&&Ze.contains(xe.target))||(Hx&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:k.value=!k.value)},mt=()=>{if(!k.value)rt();else{const xe=re.value[a.hoveringIndex];xe&&!xe.isDisabled&&ce(xe)}},Wo=xe=>yt(xe.value)?Bi(xe.value,t.valueKey):xe.value,Il=z(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),su=z(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),mW=z(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),$v=xe=>{if(!k.value){k.value=!0;return}if(!(a.options.size===0||ie.value===0||V.value)&&!Il.value){xe==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):xe==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Ze=re.value[a.hoveringIndex];(Ze.isDisabled||!Ze.visible)&&$v(xe),st(()=>pt(C.value))}},e9=(xe,Ze,St,Mn)=>{for(let bs=Ze;bs>=0&&bs<Mn;bs+=St){const Ys=xe[bs];if(!(Ys!=null&&Ys.isDisabled)&&(Ys!=null&&Ys.visible))return bs}return null},Av=(xe,Ze)=>{const St=a.options.size;if(St===0)return;const Mn=LO(xe,0,St-1),bs=re.value,Ys=Ze==="up"?-1:1,Vp=e9(bs,Mn,Ys,St)??e9(bs,Mn-Ys,-Ys,St);Vp!=null&&(a.hoveringIndex=Vp,st(()=>pt(C.value)))},gW=xe=>{const Ze=hs(xe);let St=!0;switch(Ze){case Ye.up:$v("prev");break;case Ye.down:$v("next");break;case Ye.enter:case Ye.numpadEnter:V.value||mt();break;case Ye.esc:tt();break;case Ye.backspace:St=!1,ft(xe);return;case Ye.home:if(!k.value)return;Av(0,"down");break;case Ye.end:if(!k.value)return;Av(a.options.size-1,"up");break;case Ye.pageUp:if(!k.value)return;Av(a.hoveringIndex-10,"up");break;case Ye.pageDown:if(!k.value)return;Av(a.hoveringIndex+10,"down");break;default:St=!1;break}St&&(xe.preventDefault(),xe.stopPropagation())},vW=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},yW=z(()=>{const xe=vW(),Ze=t.filterable?xe+bO:0;return{maxWidth:`${_.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Ze:a.selectionWidth-Ze}px`}}),bW=z(()=>({maxWidth:`${a.selectionWidth}px`})),_W=xe=>{e("popup-scroll",xe)};Bs(c,ot),Bs(G,me),Bs(b,Me),Bs(_,be);let Rp;return Ee(()=>$e.value,xe=>{xe?Rp=Bs(m,me).stop:(Rp==null||Rp(),Rp=void 0),e("visible-change",xe)}),Vt(()=>{De()}),{inputId:T,contentId:i,nsSelect:o,nsInput:r,states:a,isFocused:q,expanded:k,optionsArray:re,hoverOption:C,selectSize:ne,filteredOptionsCount:ie,updateTooltip:me,updateTagTooltip:Me,debouncedOnInputChange:Tt,onInput:gt,deletePrevTag:ft,deleteTag:ye,deleteSelected:Ie,handleOptionSelect:ce,scrollToOption:pt,hasModelValue:K,shouldShowPlaceholder:Ce,currentPlaceholder:Pe,mouseEnterEventName:Ue,needStatusIcon:H,showClearBtn:Q,iconComponent:se,iconReverse:Z,validateState:ae,validateIcon:ve,showNewOption:je,updateOptions:ee,collapseTagSize:pe,setSelected:De,selectDisabled:B,emptyText:fe,handleCompositionStart:R,handleCompositionUpdate:N,handleCompositionEnd:F,handleKeydown:gW,onOptionCreate:yn,onOptionDestroy:ms,handleMenuEnter:Dp,focus:Pl,blur:na,handleClearClick:Sn,handleClickOutside:Ti,handleEsc:tt,toggleMenu:rt,selectOption:mt,getValueKey:Wo,navigateOptions:$v,dropdownMenuVisible:$e,showTagList:su,collapseTagList:mW,popupScroll:_W,getOption:ct,tagStyle:yW,collapseTagStyle:bW,popperRef:nu,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:G,selectionRef:c,scrollbarRef:x,menuRef:m,tagMenuRef:b,collapseItemRef:_}};var Lhe=he({name:"ElOptions",setup(t,{slots:e}){const n=He(K_);let s=[];return()=>{var a,l;const i=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Ae(c)&&c.forEach(u=>{var h,f,p,m;const d=(h=(u==null?void 0:u.type)||{})==null?void 0:h.name;d==="ElOptionGroup"?r(!Ke(u.children)&&!Ae(u.children)&&Je((f=u.children)==null?void 0:f.default)?(p=u.children)==null?void 0:p.default():u.children):d==="ElOption"?o.push((m=u.props)==null?void 0:m.value):Ae(u.children)&&r(u.children)})}return i.length&&r((l=i[0])==null?void 0:l.children),zi(o,s)||(s=o,n&&(n.states.optionValues=o)),i}}});const lA="ElSelect",Jg=new WeakMap,Ohe=t=>(...e)=>{var i,o;const n=e[0];if(!n||n.includes('Slot "default" invoked outside of the render function')&&((i=e[2])!=null&&i.includes("ElTreeSelect")))return;const s=(o=Jg.get(t))==null?void 0:o.originalWarnHandler;if(s){s(...e);return}console.warn(...e)},Dhe=t=>{let e=Jg.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:Ohe(t),count:0},Jg.set(t,e)),e};var Rhe=he({name:lA,componentName:lA,components:{ElSelectMenu:Phe,ElOption:s5,ElOptions:Lhe,ElOptionGroup:i5,ElTag:Bo,ElScrollbar:Ei,ElTooltip:js,ElIcon:_e},directives:{ClickOutside:Zg},props:whe,emits:[Rt,En,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const s=ht(),i=Dhe(s.appContext);i.count+=1,s.appContext.config.warnHandler=i.handler;const o=z(()=>{const{modelValue:x,multiple:k}=t,C=k?[]:void 0;return Ae(x)?k?x:C:k?C:x}),r=Dn({...po(t),modelValue:o}),a=Ihe(r,e),{calculatorRef:l,inputStyle:c}=kie(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=_he(t),p=x=>({label:u(x),value:d(x),disabled:f(x)}),m=x=>x.reduce((k,C)=>(k.push(C),C.children&&C.children.length>0&&k.push(...m(C.children)),k),[]),b=x=>{vc(x||[]).forEach(k=>{var C;if(yt(k)&&(k.type.name==="ElOption"||k.type.name==="ElTree")){const S=k.type.name;if(S==="ElTree")m(((C=k.props)==null?void 0:C.data)||[]).forEach(E=>{E.currentLabel=E.label??(yt(E.value)?"":E.value),a.onOptionCreate(E)});else if(S==="ElOption"){const E={...k.props};E.currentLabel=E.label??(yt(E.value)?"":E.value),a.onOptionCreate(E)}}})};Ee(()=>{var x;return[t.persistent||a.expanded.value||!n.default||(x=n.default)==null?void 0:x.call(n),o.value]},()=>{var x;t.persistent||a.expanded.value||n.default&&(a.states.options.clear(),b((x=n.default)==null?void 0:x.call(n)))},{immediate:!0}),Et(K_,Dn({props:r,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const _=z(()=>t.multiple?a.states.selected.map(x=>x.currentLabel):a.states.selectedLabel);return _n(()=>{const x=Jg.get(s.appContext);x&&(x.count-=1,x.count<=0&&(s.appContext.config.warnHandler=x.originalWarnHandler,Jg.delete(s.appContext)))}),{...a,modelValue:o,selectedLabel:_,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const Vhe=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Fhe=["textContent"],Nhe={key:1};function Bhe(t,e,n,s,i,o){const r=W("el-tag"),a=W("el-tooltip"),l=W("el-icon"),c=W("el-option"),u=W("el-option-group"),d=W("el-options"),h=W("el-scrollbar"),f=W("el-select-menu"),p=xt("click-outside");return Oe((v(),A("div",Kt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[Nu(t.mouseEnterEventName)]:e[11]||(e[11]=m=>t.states.inputHovering=!0)},{onMouseleave:e[12]||(e[12]=m=>t.states.inputHovering=!1)}),[y(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[10]||(e[10]=m=>t.states.isBeforeHide=!1)},{default:w(()=>{var m;return[g("div",{ref:"wrapperRef",class:U([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:e[7]||(e[7]=Be((...b)=>t.toggleMenu&&t.toggleMenu(...b),["prevent"]))},[t.$slots.prefix?(v(),A("div",{key:0,ref:"prefixRef",class:U(t.nsSelect.e("prefix"))},[le(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:U([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?le(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>{var b,_,x,k,C,S,E,P,T,L,I,V,R;return[(v(!0),A(te,null,we(t.showTagList,N=>(v(),A("div",{key:t.getValueKey(N),class:U(t.nsSelect.e("selected-item"))},[y(r,{closable:!t.selectDisabled&&!N.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:qe(t.tagStyle),onClose:F=>t.deleteTag(F,N)},{default:w(()=>[g("span",{class:U(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:N.index,label:N.currentLabel,value:N.value},()=>[Y($(N.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(v(),D(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":((b=t.tagTooltip)==null?void 0:b.fallbackPlacements)??["bottom","top","right","left"],effect:((_=t.tagTooltip)==null?void 0:_.effect)??t.effect,placement:((x=t.tagTooltip)==null?void 0:x.placement)??"bottom","popper-class":((k=t.tagTooltip)==null?void 0:k.popperClass)??t.popperClass,"popper-style":((C=t.tagTooltip)==null?void 0:C.popperStyle)??t.popperStyle,teleported:((S=t.tagTooltip)==null?void 0:S.teleported)??t.teleported,"append-to":((E=t.tagTooltip)==null?void 0:E.appendTo)??t.appendTo,"popper-options":((P=t.tagTooltip)==null?void 0:P.popperOptions)??t.popperOptions,transition:(T=t.tagTooltip)==null?void 0:T.transition,"show-after":(L=t.tagTooltip)==null?void 0:L.showAfter,"hide-after":(I=t.tagTooltip)==null?void 0:I.hideAfter,"auto-close":(V=t.tagTooltip)==null?void 0:V.autoClose,offset:(R=t.tagTooltip)==null?void 0:R.offset},{default:w(()=>[g("div",{ref:"collapseItemRef",class:U(t.nsSelect.e("selected-item"))},[y(r,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:qe(t.collapseTagStyle)},{default:w(()=>[g("span",{class:U(t.nsSelect.e("tags-text"))}," + "+$(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:w(()=>[g("div",{ref:"tagMenuRef",class:U(t.nsSelect.e("selection"))},[(v(!0),A(te,null,we(t.collapseTagList,N=>(v(),A("div",{key:t.getValueKey(N),class:U(t.nsSelect.e("selected-item"))},[y(r,{class:"in-tooltip",closable:!t.selectDisabled&&!N.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:F=>t.deleteTag(F,N)},{default:w(()=>[g("span",{class:U(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:N.index,label:N.currentLabel,value:N.value},()=>[Y($(N.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):O("v-if",!0)]}):O("v-if",!0),g("div",{class:U([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled||!t.states.inputValue&&!t.isFocused)])},[g("input",{id:t.inputId,ref:"inputRef",value:t.states.inputValue,type:"text",name:t.name,class:U([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:qe(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((m=t.hoverOption)==null?void 0:m.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:e[0]||(e[0]=(...b)=>t.handleKeydown&&t.handleKeydown(...b)),onCompositionstart:e[1]||(e[1]=(...b)=>t.handleCompositionStart&&t.handleCompositionStart(...b)),onCompositionupdate:e[2]||(e[2]=(...b)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...b)),onCompositionend:e[3]||(e[3]=(...b)=>t.handleCompositionEnd&&t.handleCompositionEnd(...b)),onInput:e[4]||(e[4]=(...b)=>t.onInput&&t.onInput(...b)),onChange:e[5]||(e[5]=Be(()=>{},["stop"])),onClick:e[6]||(e[6]=Be((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,Vhe),t.filterable?(v(),A("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:U(t.nsSelect.e("input-calculator")),textContent:$(t.states.inputValue)},null,10,Fhe)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),A("div",{key:1,class:U([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?le(t.$slots,"label",{key:0,index:t.getOption(t.modelValue).index,label:t.currentPlaceholder,value:t.modelValue},()=>[g("span",null,$(t.currentPlaceholder),1)]):(v(),A("span",Nhe,$(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:U(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(v(),D(l,{key:0,class:U([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:w(()=>[(v(),D(kt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.showClearBtn&&t.clearIcon?(v(),D(l,{key:1,class:U([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:w(()=>[(v(),D(kt(t.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(v(),D(l,{key:2,class:U([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:w(()=>[(v(),D(kt(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:w(()=>[y(f,{ref:"menuRef"},{default:w(()=>[t.$slots.header?(v(),A("div",{key:0,class:U(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Be(()=>{},["stop"]))},[le(t.$slots,"header")],2)):O("v-if",!0),Oe(y(h,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:U([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical",onScroll:t.popupScroll},{default:w(()=>[t.showNewOption?(v(),D(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),y(d,null,{default:w(()=>[le(t.$slots,"default",{},()=>[(v(!0),A(te,null,we(t.options,(m,b)=>{var _;return v(),A(te,{key:b},[(_=t.getOptions(m))!=null&&_.length?(v(),D(u,{key:0,label:t.getLabel(m),disabled:t.getDisabled(m)},{default:w(()=>[(v(!0),A(te,null,we(t.getOptions(m),x=>(v(),D(c,Kt({key:t.getValue(x)},{ref_for:!0},t.getOptionProps(x)),null,16))),128))]),_:2},1032,["label","disabled"])):(v(),D(c,Kt({key:1,ref_for:!0},t.getOptionProps(m)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[jt,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),A("div",{key:1,class:U(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),A("div",{key:2,class:U(t.nsSelect.be("dropdown","empty"))},[le(t.$slots,"empty",{},()=>[g("span",null,$(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),A("div",{key:3,class:U(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Be(()=>{},["stop"]))},[le(t.$slots,"footer")],2)):O("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[p,t.handleClickOutside,t.popperRef]])}var zhe=hi(Rhe,[["render",Bhe]]);const Qt=Wt(zhe,{Option:s5,OptionGroup:i5}),ln=Ps(s5),Z_=Ps(i5);var JR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s,i){var o=s.prototype,r=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,m){var b=d.name?d:d.$locale(),_=r(b[h]),x=r(b[f]),k=_||x.map(function(S){return S.slice(0,p)});if(!m)return k;var C=b.weekStart;return k.map(function(S,E){return k[(E+(C||0))%7]})},l=function(){return i.Ls[i.locale()]},c=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,b){return m||b.slice(1)})}(d.formats[h.toUpperCase()])},u=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return a(l(),"months")},i.monthsShort=function(){return a(l(),"monthsShort","months",3)},i.weekdays=function(d){return a(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(JR);var Hhe=JR.exports;const Uhe=fi(Hhe),QR={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:go,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...wr(["ariaControls"])},eV={[Rt]:t=>Ke(t)||wt(t)||Kn(t),change:t=>Ke(t)||wt(t)||Kn(t)},up=Symbol("checkboxGroupContextKey"),jhe=We({modelValue:{type:de(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:go,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:de(Array)},props:{type:de(Object),default:()=>tV},type:{type:String,values:["checkbox","button"],default:"checkbox"},...wr(["ariaLabel"])}),Whe={[Rt]:t=>Ae(t),change:t=>Ae(t)},tV={label:"label",value:"value",disabled:"disabled"},Yhe=({model:t,isChecked:e})=>{const n=He(up,void 0),s=He(Id,void 0),i=z(()=>{var a,l;const o=(a=n==null?void 0:n.max)==null?void 0:a.value,r=(l=n==null?void 0:n.min)==null?void 0:l.value;return!bn(o)&&t.value.length>=o&&!e.value||!bn(r)&&t.value.length<=r&&e.value});return{isDisabled:Cs(z(()=>{var o;return n===void 0?(s==null?void 0:s.disabled)??i.value:((o=n.disabled)==null?void 0:o.value)||i.value})),isLimitDisabled:i}},qhe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:s,isDisabled:i,isLabeledByFormItem:o})=>{const r=He(up,void 0),{formItem:a}=No(),{emit:l}=ht();function c(p){return[!0,t.trueValue,t.trueLabel].includes(p)?t.trueValue??t.trueLabel??!0:t.falseValue??t.falseLabel??!1}function u(p,m){l(En,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(En,c(m.checked),p)}async function h(p){n.value||!s.value&&!i.value&&o.value&&(p.composedPath().some(m=>m.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await st(),u(e.value,p)))}const f=z(()=>(r==null?void 0:r.validateEvent)||t.validateEvent);return Ee(()=>t.modelValue,()=>{f.value&&(a==null||a.validate("change").catch(p=>Pt(p)))}),{handleChange:d,onClickRoot:h}},Ghe=t=>{const e=J(!1),{emit:n}=ht(),s=He(up,void 0),i=z(()=>bn(s)===!1),o=J(!1),r=z({get(){var a;return i.value?(a=s==null?void 0:s.modelValue)==null?void 0:a.value:t.modelValue??e.value},set(a){var l,c;i.value&&Ae(a)?(o.value=((l=s==null?void 0:s.max)==null?void 0:l.value)!==void 0&&a.length>(s==null?void 0:s.max.value)&&a.length>r.value.length,o.value===!1&&((c=s==null?void 0:s.changeEvent)==null||c.call(s,a))):(n(Rt,a),e.value=a)}});return{model:r,isGroup:i,isLimitExceeded:o}},Xhe=(t,e,{model:n})=>{const s=He(up,void 0),i=J(!1),o=z(()=>ma(t.value)?t.label:t.value),r=z(()=>{const a=n.value;return Kn(a)?a:Ae(a)?yt(o.value)?a.map(nn).some(l=>zi(l,o.value)):a.map(nn).includes(o.value):a!=null?a===t.trueValue||a===t.trueLabel:!!a});return{checkboxButtonSize:ji(z(()=>{var a;return(a=s==null?void 0:s.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:i,checkboxSize:ji(z(()=>{var a;return(a=s==null?void 0:s.size)==null?void 0:a.value})),hasOwnLabel:z(()=>!!e.default||!ma(o.value)),actualValue:o}},nV=(t,e)=>{const{formItem:n}=No(),{model:s,isGroup:i,isLimitExceeded:o}=Ghe(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=Xhe(t,e,{model:s}),{isDisabled:h}=Yhe({model:s,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=qc(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:i}),{handleChange:m,onClickRoot:b}=qhe(t,{model:s,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function x(){Ae(s.value)&&!s.value.includes(d.value)?s.value.push(d.value):s.value=t.trueValue??t.trueLabel??!0}t.checked&&x()})(),ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},z(()=>i.value&&ma(t.value))),ul({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},z(()=>!!t.trueLabel)),ul({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},z(()=>!!t.falseLabel)),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:h,isFocused:r,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:s,actualValue:d,handleChange:m,onClickRoot:b}},Khe=["id","indeterminate","name","tabindex","disabled"];var Zhe=he({name:"ElCheckbox",__name:"checkbox",props:QR,emits:eV,setup(t){const e=t,{inputId:n,isLabeledByFormItem:s,isChecked:i,isDisabled:o,isFocused:r,checkboxSize:a,hasOwnLabel:l,model:c,actualValue:u,handleChange:d,onClickRoot:h}=nV(e,Gi()),f=z(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:u.value}),p=Ne("checkbox"),m=z(()=>[p.b(),p.m(a.value),p.is("disabled",o.value),p.is("bordered",e.border),p.is("checked",i.value)]),b=z(()=>[p.e("input"),p.is("disabled",o.value),p.is("checked",i.value),p.is("indeterminate",e.indeterminate),p.is("focus",r.value)]);return(_,x)=>(v(),D(kt(!M(l)&&M(s)?"span":"label"),{for:!M(l)&&M(s)?null:M(n),class:U(m.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:M(h)},{default:w(()=>[g("span",{class:U(b.value)},[Oe(g("input",Kt({id:M(n),"onUpdate:modelValue":x[0]||(x[0]=k=>hn(c)?c.value=k:null),class:M(p).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:M(o)},f.value,{onChange:x[1]||(x[1]=(...k)=>M(d)&&M(d)(...k)),onFocus:x[2]||(x[2]=k=>r.value=!0),onBlur:x[3]||(x[3]=k=>r.value=!1),onClick:x[4]||(x[4]=Be(()=>{},["stop"]))}),null,16,Khe),[[C1,M(c)]]),g("span",{class:U(M(p).e("inner"))},null,2)],2),M(l)?(v(),A("span",{key:0,class:U(M(p).e("label"))},[le(_.$slots,"default"),_.$slots.default?O("v-if",!0):(v(),A(te,{key:0},[Y($(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),sV=Zhe;const Jhe=["name","tabindex","disabled"];var Qhe=he({name:"ElCheckboxButton",__name:"checkbox-button",props:QR,emits:eV,setup(t){const e=t,{isFocused:n,isChecked:s,isDisabled:i,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=nV(e,Gi()),c=z(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:a.value}),u=He(up,void 0),d=Ne("checkbox"),h=z(()=>{var m,b;const p=((m=u==null?void 0:u.fill)==null?void 0:m.value)??"";return{backgroundColor:p,borderColor:p,color:((b=u==null?void 0:u.textColor)==null?void 0:b.value)??"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),f=z(()=>[d.b("button"),d.bm("button",o.value),d.is("disabled",i.value),d.is("checked",s.value),d.is("focus",n.value)]);return(p,m)=>(v(),A("label",{class:U(f.value)},[Oe(g("input",Kt({"onUpdate:modelValue":m[0]||(m[0]=b=>hn(r)?r.value=b:null),class:M(d).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:M(i)},c.value,{onChange:m[1]||(m[1]=(...b)=>M(l)&&M(l)(...b)),onFocus:m[2]||(m[2]=b=>n.value=!0),onBlur:m[3]||(m[3]=b=>n.value=!1),onClick:m[4]||(m[4]=Be(()=>{},["stop"]))}),null,16,Jhe),[[C1,M(r)]]),p.$slots.default||t.label?(v(),A("span",{key:0,class:U(M(d).be("button","inner")),style:qe(M(s)?h.value:void 0)},[le(p.$slots,"default",{},()=>[Y($(t.label),1)])],6)):O("v-if",!0)],2))}}),o5=Qhe,efe=he({name:"ElCheckboxGroup",__name:"checkbox-group",props:jhe,emits:Whe,setup(t,{emit:e}){const n=t,s=e,i=Ne("checkbox"),o=Cs(),{formItem:r}=No(),{inputId:a,isLabeledByFormItem:l}=qc(n,{formItemContext:r}),c=async p=>{s(Rt,p),await st(),s(En,p)},u=z({get(){return n.modelValue},set(p){c(p)}}),d=z(()=>({...tV,...n.props})),h=p=>{const{label:m,value:b,disabled:_}=d.value,x={label:p[m],value:p[b],disabled:p[_]};return{...F_(p,[m,b,_]),...x}},f=z(()=>n.type==="button"?o5:sV);return Et(up,{..._4(po(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:u,changeEvent:c}),Ee(()=>n.modelValue,(p,m)=>{n.validateEvent&&!zi(p,m)&&(r==null||r.validate("change").catch(b=>Pt(b)))}),(p,m)=>{var b;return v(),D(kt(t.tag),{id:M(a),class:U(M(i).b("group")),role:"group","aria-label":M(l)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":M(l)?(b=M(r))==null?void 0:b.labelId:void 0},{default:w(()=>[le(p.$slots,"default",{},()=>[(v(!0),A(te,null,we(t.options,(_,x)=>(v(),D(kt(f.value),Kt({key:x},{ref_for:!0},h(_)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),iV=efe;const Zt=Wt(sV,{CheckboxButton:o5,CheckboxGroup:iV});Ps(o5);const r5=Ps(iV),oV=We({modelValue:{type:[String,Number,Boolean],default:void 0},size:go,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),tfe=We({...oV,border:Boolean}),rV={[Rt]:t=>Ke(t)||wt(t)||Kn(t),[En]:t=>Ke(t)||wt(t)||Kn(t)},aV=Symbol("radioGroupKey"),nfe=We({...oV}),lV={label:"label",value:"value",disabled:"disabled"},sfe=We({id:{type:String,default:void 0},size:go,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:de(Array)},props:{type:de(Object),default:()=>lV},type:{type:String,values:["radio","button"],default:"radio"},...wr(["ariaLabel"])}),ife=rV,cV=(t,e)=>{const n=J(),s=He(aV,void 0),i=z(()=>!!s),o=z(()=>ma(t.value)?t.label:t.value),r=z({get(){return i.value?s.modelValue:t.modelValue},set(d){i.value?s.changeEvent(d):e&&e(Rt,d),n.value.checked=t.modelValue===o.value}}),a=ji(z(()=>s==null?void 0:s.size)),l=Cs(z(()=>s==null?void 0:s.disabled)),c=J(!1),u=z(()=>l.value||i.value&&r.value!==o.value?-1:0);return ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},z(()=>i.value&&ma(t.value))),{radioRef:n,isGroup:i,radioGroup:s,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},ofe=["value","name","disabled","checked"];var rfe=he({name:"ElRadio",__name:"radio",props:tfe,emits:rV,setup(t,{emit:e}){const n=t,s=e,i=Ne("radio"),{radioRef:o,radioGroup:r,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=cV(n,s);function h(){st(()=>s(En,u.value))}return(f,p)=>{var m;return v(),A("label",{class:U([M(i).b(),M(i).is("disabled",M(c)),M(i).is("focus",M(a)),M(i).is("bordered",t.border),M(i).is("checked",M(u)===M(d)),M(i).m(M(l))])},[g("span",{class:U([M(i).e("input"),M(i).is("disabled",M(c)),M(i).is("checked",M(u)===M(d))])},[Oe(g("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=b=>hn(u)?u.value=b:null),class:U(M(i).e("original")),value:M(d),name:t.name||((m=M(r))==null?void 0:m.name),disabled:M(c),checked:M(u)===M(d),type:"radio",onFocus:p[1]||(p[1]=b=>a.value=!0),onBlur:p[2]||(p[2]=b=>a.value=!1),onChange:h,onClick:p[3]||(p[3]=Be(()=>{},["stop"]))},null,42,ofe),[[S1,M(u)]]),g("span",{class:U(M(i).e("inner"))},null,2)],2),g("span",{class:U(M(i).e("label")),onKeydown:p[4]||(p[4]=Be(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[Y($(t.label),1)])],34)],2)}}}),uV=rfe;const afe=["value","name","disabled"];var lfe=he({name:"ElRadioButton",__name:"radio-button",props:nfe,setup(t){const e=t,n=Ne("radio"),{radioRef:s,focus:i,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=cV(e),u=z(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,h)=>{var f;return v(),A("label",{class:U([M(n).b("button"),M(n).is("active",M(a)===M(c)),M(n).is("disabled",M(r)),M(n).is("focus",M(i)),M(n).bm("button",M(o))])},[Oe(g("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":h[0]||(h[0]=p=>hn(a)?a.value=p:null),class:U(M(n).be("button","original-radio")),value:M(c),type:"radio",name:t.name||((f=M(l))==null?void 0:f.name),disabled:M(r),onFocus:h[1]||(h[1]=p=>i.value=!0),onBlur:h[2]||(h[2]=p=>i.value=!1),onClick:h[3]||(h[3]=Be(()=>{},["stop"]))},null,42,afe),[[S1,M(a)]]),g("span",{class:U(M(n).be("button","inner")),style:qe(M(a)===M(c)?u.value:{}),onKeydown:h[4]||(h[4]=Be(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[Y($(t.label),1)])],38)],2)}}}),a5=lfe;const cfe=["id","aria-label","aria-labelledby"];var ufe=he({name:"ElRadioGroup",__name:"radio-group",props:sfe,emits:ife,setup(t,{emit:e}){const n=t,s=e,i=Ne("radio"),o=yr(),r=J(),{formItem:a}=No(),{inputId:l,isLabeledByFormItem:c}=qc(n,{formItemContext:a}),u=m=>{s(Rt,m),st(()=>s(En,m))};Vt(()=>{const m=r.value.querySelectorAll("[type=radio]"),b=m[0];!Array.from(m).some(_=>_.checked)&&b&&(b.tabIndex=0)});const d=z(()=>n.name||o.value),h=z(()=>({...lV,...n.props})),f=m=>{const{label:b,value:_,disabled:x}=h.value,k={label:m[b],value:m[_],disabled:m[x]};return{...F_(m,[b,_,x]),...k}},p=z(()=>n.type==="button"?a5:uV);return Et(aV,Dn({...po(n),changeEvent:u,name:d})),Ee(()=>n.modelValue,(m,b)=>{n.validateEvent&&!zi(m,b)&&(a==null||a.validate("change").catch(_=>Pt(_)))}),(m,b)=>(v(),A("div",{id:M(l),ref_key:"radioGroupRef",ref:r,class:U(M(i).b("group")),role:"radiogroup","aria-label":M(c)?void 0:t.ariaLabel||"radio-group","aria-labelledby":M(c)?M(a).labelId:void 0},[le(m.$slots,"default",{},()=>[(v(!0),A(te,null,we(t.options,(_,x)=>(v(),D(kt(p.value),Kt({key:x},{ref_for:!0},f(_)),null,16))),128))])],10,cfe))}}),dV=ufe;const zo=Wt(uV,{RadioButton:a5,RadioGroup:dV}),Ws=Ps(dV),dp=Ps(a5),dfe=We({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:de([Number,Object]),default:()=>ii({})},sm:{type:de([Number,Object]),default:()=>ii({})},md:{type:de([Number,Object]),default:()=>ii({})},lg:{type:de([Number,Object]),default:()=>ii({})},xl:{type:de([Number,Object]),default:()=>ii({})}}),hfe=["start","center","end","space-around","space-between","space-evenly"],ffe=["top","middle","bottom"],pfe=We({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:hfe,default:"start"},align:{type:String,values:ffe}}),hV=Symbol("rowContextKey");var mfe=he({name:"ElRow",__name:"row",props:pfe,setup(t){const e=t,n=Ne("row");Et(hV,{gutter:z(()=>e.gutter)});const s=z(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),i=z(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(o,r)=>(v(),D(kt(t.tag),{class:U(i.value),style:qe(s.value)},{default:w(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),gfe=mfe;const Ld=Wt(gfe);var vfe=he({name:"ElCol",__name:"col",props:dfe,setup(t){const e=t,{gutter:n}=He(hV,{gutter:z(()=>0)}),s=Ne("col"),i=z(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=z(()=>{const r=[];return["span","offset","pull","push"].forEach(a=>{const l=e[a];wt(l)&&(a==="span"?r.push(s.b(`${e[a]}`)):l>0&&r.push(s.b(`${a}-${e[a]}`)))}),["xs","sm","md","lg","xl"].forEach(a=>{wt(e[a])?r.push(s.b(`${a}-${e[a]}`)):yt(e[a])&&Object.entries(e[a]).forEach(([l,c])=>{r.push(l!=="span"?s.b(`${a}-${l}-${c}`):s.b(`${a}-${c}`))})}),n.value&&r.push(s.is("guttered")),[s.b(),r]});return(r,a)=>(v(),D(kt(t.tag),{class:U(o.value),style:qe(i.value)},{default:w(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),yfe=vfe;const Od=Wt(yfe),cA=t=>wt(t)||Ke(t)||Ae(t),bfe=We({accordion:Boolean,modelValue:{type:de([Array,String,Number]),default:()=>ii([])},expandIconPosition:{type:de([String]),default:"right"},beforeCollapse:{type:de(Function)}}),_fe={[Rt]:cA,[En]:cA},fV=Symbol("collapseContextKey"),wfe=We({title:{type:String,default:""},name:{type:de([String,Number]),default:void 0},icon:{type:ds,default:Rr},disabled:Boolean});var xfe=he({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=Ne("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},s={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,o)=>(v(),D(Vo,Kt({name:M(e).b()},pI(s)),{default:w(()=>[le(i.$slots,"default")]),_:3},16,["name"]))}}),kfe=xfe;const Cfe=Wt(kfe),uA="ElCollapse",Sfe=(t,e)=>{const n=J(si(t.modelValue)),s=r=>{n.value=r;const a=t.accordion?n.value[0]:n.value;e(Rt,a),e(En,a)},i=r=>{if(t.accordion)s([n.value[0]===r?"":r]);else{const a=[...n.value],l=a.indexOf(r);l>-1?a.splice(l,1):a.push(r),s(a)}},o=async r=>{const{beforeCollapse:a}=t;if(!a){i(r);return}const l=a(r);[sd(l),Kn(l)].includes(!0)||mo(uA,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),sd(l)?l.then(c=>{c!==!1&&i(r)}).catch(c=>{Pt(uA,`some error occurred: ${c}`)}):l&&i(r)};return Ee(()=>t.modelValue,()=>n.value=si(t.modelValue),{deep:!0}),Et(fV,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:s}},$fe=t=>{const e=Ne("collapse");return{rootKls:z(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Afe=he({name:"ElCollapse",__name:"collapse",props:bfe,emits:_fe,setup(t,{expose:e,emit:n}){const s=t,{activeNames:i,setActiveNames:o}=Sfe(s,n),{rootKls:r}=$fe(s);return e({activeNames:i,setActiveNames:o}),(a,l)=>(v(),A("div",{class:U(M(r))},[le(a.$slots,"default")],2))}}),Efe=Afe;const Mfe=t=>{const e=He(fV),{namespace:n}=Ne("collapse"),s=J(!1),i=J(!1),o=V4(),r=z(()=>o.current++),a=z(()=>t.name??`${n.value}-id-${o.prefix}-${M(r)}`),l=z(()=>e==null?void 0:e.activeNames.value.includes(M(a)));return{focusing:s,id:r,isActive:l,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:s.value=!0},50)},handleHeaderClick:h=>{var f;t.disabled||(f=h.target)!=null&&f.closest("input, textarea, select")||(e==null||e.handleItemClick(M(a)),s.value=!1,i.value=!0)},handleEnterClick:h=>{var f;(f=h.target)!=null&&f.closest("input, textarea, select")||(h.preventDefault(),e==null||e.handleItemClick(M(a)))}}},Tfe=(t,{focusing:e,isActive:n,id:s})=>{const i=Ne("collapse"),o=z(()=>[i.b("item"),i.is("active",M(n)),i.is("disabled",t.disabled)]),r=z(()=>[i.be("item","header"),i.is("active",M(n)),{focusing:M(e)&&!t.disabled}]),a=z(()=>[i.be("item","arrow"),i.is("active",M(n))]);return{itemTitleKls:z(()=>[i.be("item","title")]),arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:z(()=>i.be("item","wrap")),itemContentKls:z(()=>i.be("item","content")),scopedContentId:z(()=>i.b(`content-${M(s)}`)),scopedHeadId:z(()=>i.b(`head-${M(s)}`))}},Pfe=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Ife=["id","aria-hidden","aria-labelledby"];var Lfe=he({name:"ElCollapseItem",__name:"collapse-item",props:wfe,setup(t,{expose:e}){const n=t,{focusing:s,id:i,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Mfe(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:b}=Tfe(n,{focusing:s,isActive:o,id:i});return e({isActive:o}),(_,x)=>(v(),A("div",{class:U(M(d))},[g("div",{id:M(b),class:U(M(u)),"aria-expanded":M(o),"aria-controls":M(m),"aria-describedby":M(m),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"button",onClick:x[0]||(x[0]=(...k)=>M(a)&&M(a)(...k)),onKeydown:x[1]||(x[1]=Nt(Be((...k)=>M(l)&&M(l)(...k),["stop"]),["space","enter"])),onFocus:x[2]||(x[2]=(...k)=>M(r)&&M(r)(...k)),onBlur:x[3]||(x[3]=k=>s.value=!1)},[g("span",{class:U(M(h))},[le(_.$slots,"title",{isActive:M(o)},()=>[Y($(t.title),1)])],2),le(_.$slots,"icon",{isActive:M(o)},()=>[y(M(_e),{class:U(M(c))},{default:w(()=>[(v(),D(kt(t.icon)))]),_:1},8,["class"])])],42,Pfe),y(M(Cfe),null,{default:w(()=>[Oe(g("div",{id:M(m),role:"region",class:U(M(f)),"aria-hidden":!M(o),"aria-labelledby":M(b)},[g("div",{class:U(M(p))},[le(_.$slots,"default")],2)],10,Ife),[[jt,M(o)]])]),_:3})],2))}}),pV=Lfe;const Ofe=Wt(Efe,{CollapseItem:pV}),Dfe=Ps(pV),mV=We({modelValue:{type:de(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:de(String)},disabled:Boolean,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:de([String,Array,Object])},hueSliderStyle:{type:de([String,Array,Object])}}),Rfe={[Rt]:t=>Ke(t)||li(t)},gV=Symbol("colorCommonPickerKey"),vV=Symbol("colorPickerPanelContextKey"),yV=We({color:{type:de(Object),required:!0},vertical:Boolean,disabled:Boolean}),Vfe=yV,bV=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}};let Lw=!1;function _k(t,e){if(!qt)return;const n=function(o){var r;(r=e.drag)==null||r.call(e,o)},s=function(o){var r;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",s),document.onselectstart=null,document.ondragstart=null,Lw=!1,(r=e.end)==null||r.call(e,o)},i=function(o){var r;Lw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",s),document.addEventListener("touchmove",n),document.addEventListener("touchend",s),Lw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const _V=(t,{key:e,minValue:n,maxValue:s})=>{const i=ht(),o=Zn(),r=Zn(),a=z(()=>t.color.get(e));function l(h){var f;t.disabled||(h.target!==o.value&&c(h),(f=o.value)==null||f.focus())}function c(h){if(!r.value||!o.value||t.disabled)return;const f=i.vnode.el.getBoundingClientRect(),{clientX:p,clientY:m}=bV(h);let b;if(t.vertical){let _=m-f.top;_=Math.max(o.value.offsetHeight/2,_),_=Math.min(_,f.height-o.value.offsetHeight/2),b=Math.round((_-o.value.offsetHeight/2)/(f.height-o.value.offsetHeight)*s)}else{let _=p-f.left;_=Math.max(o.value.offsetWidth/2,_),_=Math.min(_,f.width-o.value.offsetWidth/2),b=Math.round((_-o.value.offsetWidth/2)/(f.width-o.value.offsetWidth)*s)}t.color.set(e,b)}function u(h){if(t.disabled)return;const{shiftKey:f}=h,p=hs(h),m=f?10:1,b=e==="hue"?-1:1;let _=!0;switch(p){case Ye.left:case Ye.down:d(-m*b);break;case Ye.right:case Ye.up:d(m*b);break;case Ye.home:t.color.set(e,e==="hue"?s:n);break;case Ye.end:t.color.set(e,e==="hue"?n:s);break;case Ye.pageDown:d(-4*b);break;case Ye.pageUp:d(4*b);break;default:_=!1;break}_&&h.preventDefault()}function d(h){let f=a.value+h;f=f<n?n:f>s?s:f,t.color.set(e,f)}return{thumb:o,bar:r,currentValue:a,handleDrag:c,handleClick:l,handleKeydown:u}},wV=(t,{namespace:e,maxValue:n,bar:s,thumb:i,currentValue:o,handleDrag:r,getBackground:a})=>{const l=ht(),c=Ne(e),u=J(0),d=J(0),h=J();function f(){if(!i.value||t.vertical)return 0;const k=l.vnode.el,C=o.value;return k?Math.round(C*(k.offsetWidth-i.value.offsetWidth/2)/n):0}function p(){if(!i.value)return 0;const k=l.vnode.el;if(!t.vertical)return 0;const C=o.value;return k?Math.round(C*(k.offsetHeight-i.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a==null?void 0:a()}Vt(()=>{if(!s.value||!i.value)return;const k={drag:C=>{r(C)},end:C=>{r(C)}};_k(s.value,k),_k(i.value,k),m()}),Ee(o,()=>m()),Ee(()=>t.color.value,()=>m());const b=z(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),_=z(()=>c.e("bar")),x=z(()=>c.e("thumb"));return{rootKls:b,barKls:_,barStyle:z(()=>({background:h.value})),thumbKls:x,thumbStyle:z(()=>({left:ui(u.value),top:ui(d.value)})),thumbLeft:u,thumbTop:d,update:m}},Ffe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],dA=0,Ow=100;var Nfe=he({name:"ElColorAlphaSlider",__name:"alpha-slider",props:yV,setup(t,{expose:e}){const n=t,{currentValue:s,bar:i,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=_V(n,{key:"alpha",minValue:dA,maxValue:Ow}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=wV(n,{namespace:"color-alpha-slider",maxValue:Ow,currentValue:s,bar:i,thumb:o,handleDrag:r,getBackground:x}),{t:m}=Xt(),b=z(()=>m("el.colorpicker.alphaLabel")),_=z(()=>m("el.colorpicker.alphaDescription",{alpha:s.value,color:n.color.value}));function x(){if(n.color&&n.color.value){const{r:k,g:C,b:S}=n.color.toRgb();return`linear-gradient(to right, rgba(${k}, ${C}, ${S}, 0) 0%, rgba(${k}, ${C}, ${S}, 1) 100%)`}return""}return e({update:p,bar:i,thumb:o}),(k,C)=>(v(),A("div",{class:U(M(c))},[g("div",{ref_key:"bar",ref:i,class:U(M(u)),style:qe(M(d)),onClick:C[0]||(C[0]=(...S)=>M(a)&&M(a)(...S))},null,6),g("div",{ref_key:"thumb",ref:o,class:U(M(h)),style:qe(M(f)),"aria-label":b.value,"aria-valuenow":M(s),"aria-valuetext":_.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":dA,"aria-valuemax":Ow,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...S)=>M(l)&&M(l)(...S))},null,46,Ffe)],2))}}),Bfe=Nfe;const zfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],hA=0,Dw=360;var Hfe=he({name:"ElColorHueSlider",__name:"hue-slider",props:Vfe,setup(t,{expose:e}){const n=t,{currentValue:s,bar:i,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=_V(n,{key:"hue",minValue:hA,maxValue:Dw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=wV(n,{namespace:"color-hue-slider",maxValue:Dw,currentValue:s,bar:i,thumb:o,handleDrag:r}),{t:m}=Xt(),b=z(()=>m("el.colorpicker.hueLabel")),_=z(()=>m("el.colorpicker.hueDescription",{hue:s.value,color:n.color.value}));return e({bar:i,thumb:o,thumbTop:f,update:p}),(x,k)=>(v(),A("div",{class:U(M(c))},[g("div",{ref_key:"bar",ref:i,class:U(M(u)),onClick:k[0]||(k[0]=(...C)=>M(a)&&M(a)(...C))},null,2),g("div",{ref_key:"thumb",ref:o,class:U(M(d)),style:qe(M(h)),"aria-label":b.value,"aria-valuenow":M(s),"aria-valuetext":_.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":hA,"aria-valuemax":Dw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:k[1]||(k[1]=(...C)=>M(l)&&M(l)(...C))},null,46,zfe)],2))}}),Ufe=Hfe;const jfe=We({colors:{type:de(Array),required:!0},color:{type:de(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var _b=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Qn,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const e in t)Ft(t,e)&&(this[e]=t[e]);t.value?this.fromString(t.value):this.doOnChange()}set(t,e){if(arguments.length===1&&typeof t=="object"){for(const n in t)Ft(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=e,this._isValid=!0,this.doOnChange()}get(t){return["hue","saturation","value","alpha"].includes(t)?Math.round(this[`_${t}`]):this[`_${t}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(t){const e=new Qn(t);if(this._isValid=e.isValid,e.isValid){const{h:n,s,v:i,a:o}=e.toHsv();this._hue=n,this._saturation=s*100,this._value=i*100,this._alpha=o*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(t){const e=new Qn({h:t._hue,s:t._saturation/100,v:t._value/100,a:t._alpha/100});return this._tiny.equals(e)}doOnChange(){const{_hue:t,_saturation:e,_value:n,_alpha:s,format:i,enableAlpha:o}=this;let r=i||(o?"rgb":"hex");i==="hex"&&o&&(r="hex8"),this._tiny=new Qn({h:t,s:e/100,v:n/100,a:s/100}),this.value=this._isValid?this._tiny.toString(r):""}};const Wfe=t=>{const{currentColor:e}=He(vV),n=J(i(t.colors,t.color));Ee(()=>e.value,o=>{const r=new _b({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=r.compare(a)})}),ml(()=>{n.value=i(t.colors,t.color)});function s(o){t.color.fromString(t.colors[o])}function i(o,r){return o.map(a=>{const l=new _b({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:s}},Yfe=t=>{const e=Ne("color-predefine"),n=z(()=>[e.b(),e.is("disabled",t.disabled)]),s=z(()=>e.e("colors"));function i(o){return[e.e("color-selector"),e.is("alpha",o.get("alpha")<100),{selected:o.selected}]}return{rootKls:n,colorsKls:s,colorSelectorKls:i}},qfe=["disabled","aria-label","onClick"];var Gfe=he({name:"ElColorPredefine",__name:"predefine",props:jfe,setup(t){const e=t,{rgbaColors:n,handleSelect:s}=Wfe(e),{rootKls:i,colorsKls:o,colorSelectorKls:r}=Yfe(e),{t:a}=Xt(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),A("div",{class:U(M(i))},[g("div",{class:U(M(o))},[(v(!0),A(te,null,we(M(n),(d,h)=>(v(),A("button",{key:t.colors[h],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:U(M(r)(d)),onClick:f=>M(s)(h)},[g("div",{style:qe({backgroundColor:d.value})},null,4)],10,qfe))),128))],2)],2))}}),Xfe=Gfe;const Kfe=We({color:{type:de(Object),required:!0},disabled:Boolean}),Zfe=t=>{const e=ht(),n=J(),s=J(0),i=J(0),o=J("hsl(0, 100%, 50%)"),r=z(()=>t.color.get("saturation")),a=z(()=>t.color.get("value")),l=z(()=>t.color.get("hue"));function c(p){var m;t.disabled||(p.target!==n.value&&u(p),(m=n.value)==null||m.focus({preventScroll:!0}))}function u(p){if(t.disabled)return;const m=e.vnode.el.getBoundingClientRect(),{clientX:b,clientY:_}=bV(p);let x=b-m.left,k=_-m.top;x=Math.max(0,x),x=Math.min(x,m.width),k=Math.max(0,k),k=Math.min(k,m.height),i.value=x,s.value=k,t.color.set({saturation:x/m.width*100,value:100-k/m.height*100})}function d(p){if(t.disabled)return;const{shiftKey:m}=p,b=hs(p),_=m?10:1;let x=!0;switch(b){case Ye.left:h(-_);break;case Ye.right:h(_);break;case Ye.up:f(_);break;case Ye.down:f(-_);break;default:x=!1;break}x&&p.preventDefault()}function h(p){let m=r.value+p;m=m<0?0:m>100?100:m,t.color.set("saturation",m)}function f(p){let m=a.value+p;m=m<0?0:m>100?100:m,t.color.set("value",m)}return{cursorRef:n,cursorTop:s,cursorLeft:i,background:o,saturation:r,brightness:a,hue:l,handleClick:c,handleDrag:u,handleKeydown:d}},Jfe=(t,{cursorTop:e,cursorLeft:n,background:s,handleDrag:i})=>{const o=ht(),r=Ne("color-svpanel");function a(){const l=t.color.get("saturation"),c=t.color.get("value"),{clientWidth:u,clientHeight:d}=o.vnode.el;n.value=l*u/100,e.value=(100-c)*d/100,s.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}return Vt(()=>{_k(o.vnode.el,{drag:l=>{i(l)},end:l=>{i(l)}}),a()}),Ee([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a()),{rootKls:z(()=>r.b()),cursorKls:z(()=>r.e("cursor")),rootStyle:z(()=>({backgroundColor:s.value})),cursorStyle:z(()=>({top:ui(e.value),left:ui(n.value)})),update:a}},Qfe=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var epe=he({name:"ElSvPanel",__name:"sv-panel",props:Kfe,setup(t,{expose:e}){const n=t,{cursorRef:s,cursorTop:i,cursorLeft:o,background:r,saturation:a,brightness:l,handleClick:c,handleDrag:u,handleKeydown:d}=Zfe(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:b}=Jfe(n,{cursorTop:i,cursorLeft:o,background:r,handleDrag:u}),{t:_}=Xt(),x=z(()=>_("el.colorpicker.svLabel")),k=z(()=>_("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:b}),(C,S)=>(v(),A("div",{class:U(M(h)),style:qe(M(p)),onClick:S[1]||(S[1]=(...E)=>M(c)&&M(c)(...E))},[g("div",{ref_key:"cursorRef",ref:s,class:U(M(f)),style:qe(M(m)),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":x.value,"aria-valuenow":`${M(a)},${M(l)}`,"aria-valuetext":k.value,onKeydown:S[0]||(S[0]=(...E)=>M(d)&&M(d)(...E))},null,46,Qfe)],6))}}),tpe=epe;const xV=(t,e)=>{const n=Dn(new _b({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return Ee(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(Rt,n.value)}),{color:n}};var npe=he({name:"ElColorPickerPanel",__name:"color-picker-panel",props:mV,emits:Rfe,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ne("color-picker-panel"),{formItem:r}=No(),a=Cs(),l=J(),c=J(),u=J(),d=J(),h=J(""),{color:f}=He(gV,()=>xV(s,i),!0);function p(){f.fromString(h.value),f.value!==h.value&&(h.value=f.value)}function m(){var _;s.validateEvent&&((_=r==null?void 0:r.validate)==null||_.call(r,"blur").catch(x=>Pt(x)))}function b(){var _,x,k;(_=l.value)==null||_.update(),(x=c.value)==null||x.update(),(k=u.value)==null||k.update()}return Vt(()=>{s.modelValue&&(h.value=f.value),st(b)}),Ee(()=>s.modelValue,_=>{_!==f.value&&(_?f.fromString(_):f.clear())}),Ee(()=>f.value,_=>{i(Rt,_),h.value=_,s.validateEvent&&(r==null||r.validate("change").catch(x=>Pt(x)))}),Et(vV,{currentColor:z(()=>f.value)}),e({color:f,inputRef:d,update:b}),(_,x)=>(v(),A("div",{class:U([M(o).b(),M(o).is("disabled",M(a)),M(o).is("border",t.border)]),onFocusout:m},[g("div",{class:U(M(o).e("wrapper"))},[y(Ufe,{ref_key:"hueRef",ref:l,color:M(f),vertical:"",disabled:M(a),class:U(["hue-slider",t.hueSliderClass]),style:qe(t.hueSliderStyle)},null,8,["color","disabled","class","style"]),y(tpe,{ref_key:"svRef",ref:c,color:M(f),disabled:M(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(Bfe,{key:0,ref_key:"alphaRef",ref:u,color:M(f),disabled:M(a)},null,8,["color","disabled"])):O("v-if",!0),t.predefine?(v(),D(Xfe,{key:1,ref:"predefine","enable-alpha":t.showAlpha,color:M(f),colors:t.predefine,disabled:M(a)},null,8,["enable-alpha","color","colors","disabled"])):O("v-if",!0),g("div",{class:U(M(o).e("footer"))},[y(M(_t),{ref_key:"inputRef",ref:d,modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=k=>h.value=k),"validate-event":!1,size:"small",disabled:M(a),onChange:p},null,8,["modelValue","disabled"]),le(_.$slots,"footer")],2)],34))}}),spe=npe;const ipe=Wt(spe),ope=We({persistent:{type:Boolean,default:!0},modelValue:{type:de(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:de(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:go,popperClass:Nn.popperClass,popperStyle:Nn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:Nn.teleported,appendTo:Nn.appendTo,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},...R1,...wr(["ariaLabel"])}),rpe={[Rt]:t=>Ke(t)||li(t),[En]:t=>Ke(t)||li(t),activeChange:t=>Ke(t)||li(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},ape=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var lpe=he({name:"ElColorPicker",__name:"color-picker",props:ope,emits:rpe,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Xt(),r=Ne("color"),{formItem:a}=No(),l=ji(),c=Cs(),{valueOnClear:u,isEmptyValue:d}=z4(s,null),h=xV(s,i),{inputId:f,isLabeledByFormItem:p}=qc(s,{formItemContext:a}),m=J(),b=J(),_=J(),x=J(!1),k=J(!1);let C=!0;const{isFocused:S,handleFocus:E,handleBlur:P}=D1(b,{disabled:c,beforeBlur(re){var Se;return(Se=m.value)==null?void 0:Se.isFocusInsideContent(re)},afterBlur(){var re;G(!1),H(),s.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(Se=>Pt(Se)))}}),T=sie(()=>{var re;return((re=_.value)==null?void 0:re.color)??h.color}),L=z(()=>_4(s,Object.keys(mV))),I=z(()=>!s.modelValue&&!k.value?"transparent":B(T,s.showAlpha)),V=z(()=>!s.modelValue&&!k.value?"":T.value),R=z(()=>p.value?void 0:s.ariaLabel||o("el.colorpicker.defaultLabel")),N=z(()=>p.value?a==null?void 0:a.labelId:void 0),F=z(()=>[r.b("picker"),r.is("disabled",c.value),r.bm("picker",l.value),r.is("focused",S.value)]);function B(re,Se){const{r:je,g:ee,b:ne,a:pe}=re.toRgb();return Se?`rgba(${je}, ${ee}, ${ne}, ${pe})`:`rgb(${je}, ${ee}, ${ne})`}function G(re){x.value=re}const q=cd(G,100,{leading:!0});function X(){c.value||G(!0)}function K(){q(!1),H()}function H(){st(()=>{s.modelValue?T.fromString(s.modelValue):(T.value="",st(()=>{k.value=!1}))})}function Q(){c.value||(x.value&&H(),q(!x.value))}function se(){const re=d(T.value)?u.value:T.value;i(Rt,re),i(En,re),s.validateEvent&&(a==null||a.validate("change").catch(Se=>Pt(Se))),q(!1),st(()=>{const Se=new _b({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue});T.compare(Se)||H()})}function Z(){q(!1),i(Rt,u.value),i(En,u.value),s.modelValue!==u.value&&s.validateEvent&&(a==null||a.validate("change").catch(re=>Pt(re))),H(),i("clear")}function ae(){var re,Se;(Se=(re=_==null?void 0:_.value)==null?void 0:re.inputRef)==null||Se.focus()}function ve(){x.value&&(K(),S.value&&fe())}function ke(re){re.preventDefault(),re.stopPropagation(),G(!1),H()}function oe(re){switch(hs(re)){case Ye.enter:case Ye.numpadEnter:case Ye.space:re.preventDefault(),re.stopPropagation(),X();break;case Ye.esc:ke(re);break}}function fe(){b.value.focus()}function ie(){b.value.blur()}return Ee(()=>V.value,re=>{C&&i("activeChange",re),C=!0}),Ee(()=>T.value,()=>{!s.modelValue&&!k.value&&(k.value=!0)}),Ee(()=>s.modelValue,re=>{re?re&&re!==T.value&&(C=!1,T.fromString(re)):k.value=!1}),Ee(()=>x.value,()=>{_.value&&st(_.value.update)}),Et(gV,h),e({color:T,show:X,hide:K,focus:fe,blur:ie}),(re,Se)=>(v(),D(M(js),{ref_key:"popper",ref:m,visible:x.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[M(r).be("picker","panel"),t.popperClass],"popper-style":t.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:t.teleported,transition:`${M(r).namespace.value}-zoom-in-top`,persistent:t.persistent,"append-to":t.appendTo,onShow:ae,onHide:Se[2]||(Se[2]=je=>G(!1))},{content:w(()=>[Oe((v(),D(M(ipe),Kt({ref_key:"pickerPanelRef",ref:_},L.value,{border:!1,"validate-event":!1,onKeydown:Nt(ke,["esc"])}),{footer:w(()=>[g("div",null,[t.clearable?(v(),D(M(Ge),{key:0,class:U(M(r).be("footer","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[Y($(M(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),y(M(Ge),{plain:"",size:"small",class:U(M(r).be("footer","btn")),onClick:se},{default:w(()=>[Y($(M(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[M(Zg),ve,b.value]])]),default:w(()=>[g("div",Kt({id:M(f),ref_key:"triggerRef",ref:b},re.$attrs,{class:F.value,role:"button","aria-label":R.value,"aria-labelledby":N.value,"aria-description":M(o)("el.colorpicker.description",{color:t.modelValue||""}),"aria-disabled":M(c),tabindex:M(c)?void 0:t.tabindex,onKeydown:oe,onFocus:Se[0]||(Se[0]=(...je)=>M(E)&&M(E)(...je)),onBlur:Se[1]||(Se[1]=(...je)=>M(P)&&M(P)(...je))}),[g("div",{class:U(M(r).be("picker","trigger")),onClick:Q},[g("span",{class:U([M(r).be("picker","color"),M(r).is("alpha",t.showAlpha)])},[g("span",{class:U(M(r).be("picker","color-inner")),style:qe({backgroundColor:I.value})},[Oe(y(M(_e),{class:U([M(r).be("picker","icon"),M(r).is("icon-arrow-down")])},{default:w(()=>[y(M(Td))]),_:1},8,["class"]),[[jt,t.modelValue||k.value]]),Oe(y(M(_e),{class:U([M(r).be("picker","empty"),M(r).is("icon-close")])},{default:w(()=>[y(M(br))]),_:1},8,["class"]),[[jt,!t.modelValue&&!k.value]])],6)],2)],2)],16,ape)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),cpe=lpe;const Dd=Wt(cpe);var upe=he({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=Gi(),s=Ne("container"),i=z(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(o=>{const r=o.type.name;return r==="ElHeader"||r==="ElFooter"}):!1);return(o,r)=>(v(),A("section",{class:U([M(s).b(),M(s).is("vertical",i.value)])},[le(o.$slots,"default")],2))}}),dpe=upe,hpe=he({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Ne("aside"),s=z(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(v(),A("aside",{class:U(M(n).b()),style:qe(s.value)},[le(i.$slots,"default")],6))}}),kV=hpe,fpe=he({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Ne("footer"),s=z(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),A("footer",{class:U(M(n).b()),style:qe(s.value)},[le(i.$slots,"default")],6))}}),CV=fpe,ppe=he({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Ne("header"),s=z(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),A("header",{class:U(M(n).b()),style:qe(s.value)},[le(i.$slots,"default")],6))}}),SV=ppe,mpe=he({name:"ElMain",__name:"main",setup(t){const e=Ne("main");return(n,s)=>(v(),A("main",{class:U(M(e).b())},[le(n.$slots,"default")],2))}}),$V=mpe;const B1=Wt(dpe,{Aside:kV,Footer:CV,Header:SV,Main:$V}),z1=Ps(kV);Ps(CV);const H1=Ps(SV),Ia=Ps($V),gpe=We({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:de([Date,Array,String,Number]),default:""},defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...n5,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:de(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),l5=Symbol("rootPickerContextKey"),U1="ElIsDefaultFormat",vpe=["date","dates","year","years","month","months","week","range"],c5=We({cellClassName:{type:de(Function)},disabledDate:{type:de(Function)},date:{type:de(Object),required:!0},minDate:{type:de(Object)},maxDate:{type:de(Object)},parsedValue:{type:de([Object,Array])},rangeState:{type:de(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),AV=We({type:{type:de(String),required:!0,values:UZ},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),u5=We({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:de(Array)}}),d5=t=>({type:String,values:vpe,default:t}),ype=We({...AV,parsedValue:{type:de([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),Qg=t=>{if(!Ae(t))return!1;const[e,n]=t;return dt.isDayjs(e)&&dt.isDayjs(n)&&dt(e).isValid()&&dt(n).isValid()&&e.isSameOrBefore(n)},J_=(t,{lang:e,step:n=1,unit:s,unlinkPanels:i})=>{let o;if(Ae(t)){let[r,a]=t.map(l=>dt(l).locale(e));return i||(a=r.add(n,s)),[r,a]}else t?o=dt(t):o=dt();return o=o.locale(e),[o,o.add(n,s)]},bpe=(t,e,{columnIndexOffset:n,startDate:s,nextEndDate:i,now:o,unit:r,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:c})=>{for(let u=0;u<t.row;u++){const d=e[u];for(let h=0;h<t.column;h++){let f=d[h+n];f||(f={row:u,column:h,type:"normal",inRange:!1,start:!1,end:!1});const p=a(u*t.column+h);f.dayjs=p,f.date=p.toDate(),f.timestamp=p.valueOf(),f.type="normal",f.inRange=!!(s&&p.isSameOrAfter(s,r)&&i&&p.isSameOrBefore(i,r))||!!(s&&p.isSameOrBefore(s,r)&&i&&p.isSameOrAfter(i,r)),s!=null&&s.isSameOrAfter(i)?(f.start=!!i&&p.isSame(i,r),f.end=s&&p.isSame(s,r)):(f.start=!!s&&p.isSame(s,r),f.end=!!i&&p.isSame(i,r)),p.isSame(o,r)&&(f.type="today"),l==null||l(f,{rowIndex:u,columnIndex:h}),d[h+n]=f}c==null||c(d)}},wb=(t,e,n,s)=>{const i=dt().locale(s).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second());return OR(i.daysInMonth()).map(o=>i.add(o,"day").toDate())},Bf=(t,e,n,s,i)=>{const o=dt().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=wb(t,e,n,s).find(a=>!(i!=null&&i(a)));return r?dt(r).locale(s):o.locale(s)},xb=(t,e,n)=>{const s=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!wb(t,s,i,e).every(n))return Bf(t,s,i,e,n);for(let o=0;o<12;o++)if(!wb(t,s,o,e).every(n))return Bf(t,s,o,e,n);return t},zf=(t,e,n,s)=>{if(Ae(t))return t.map(i=>zf(i,e,n,s));if(Ke(t)){const i=s!=null&&s.value?dt(t):dt(t,e);if(!i.isValid())return i}return dt(t,e).locale(n)},_pe=We({...c5,showWeekNumber:Boolean,selectionMode:d5("date")}),wpe=["changerange","pick","select"],kb=(t="")=>["normal","today"].includes(t),xpe=(t,e)=>{const{lang:n}=Xt(),s=J(),i=J(),o=J(),r=J(),a=J([[],[],[],[],[],[]]);let l=!1;const c=t.date.$locale().weekStart||7,u=t.date.locale("en").localeData().weekdaysShort().map(K=>K.toLowerCase()),d=z(()=>c>3?7-c:-c),h=z(()=>{const K=t.date.startOf("month");return K.subtract(K.day()||7,"day")}),f=z(()=>u.concat(u).slice(c,c+7)),p=z(()=>ub(M(C)).some(K=>K.isCurrent)),m=z(()=>{const K=t.date.startOf("month");return{startOfMonthDay:K.day()||7,dateCountOfMonth:K.daysInMonth(),dateCountOfLastMonth:K.subtract(1,"month").daysInMonth()}}),b=z(()=>t.selectionMode==="dates"?oo(t.parsedValue):[]),_=(K,{count:H,rowIndex:Q,columnIndex:se})=>{const{startOfMonthDay:Z,dateCountOfMonth:ae,dateCountOfLastMonth:ve}=M(m),ke=M(d);if(Q>=0&&Q<=1){const oe=Z+ke<0?7+Z+ke:Z+ke;if(se+Q*7>=oe)return K.text=H,!0;K.text=ve-(oe-se%7)+1+Q*7,K.type="prev-month"}else return H<=ae?K.text=H:(K.text=H-ae,K.type="next-month"),!0;return!1},x=(K,{columnIndex:H,rowIndex:Q},se)=>{const{disabledDate:Z,cellClassName:ae}=t,ve=M(b),ke=_(K,{count:se,rowIndex:Q,columnIndex:H}),oe=K.dayjs.toDate();return K.selected=ve.find(fe=>fe.isSame(K.dayjs,"day")),K.isSelected=!!K.selected,K.isCurrent=E(K),K.disabled=Z==null?void 0:Z(oe),K.customClass=ae==null?void 0:ae(oe),ke},k=K=>{if(t.selectionMode==="week"){const[H,Q]=t.showWeekNumber?[1,7]:[0,6],se=X(K[H+1]);K[H].inRange=se,K[H].start=se,K[Q].inRange=se,K[Q].end=se}},C=z(()=>{const{minDate:K,maxDate:H,rangeState:Q,showWeekNumber:se}=t,Z=M(d),ae=M(a),ve="day";let ke=1;if(bpe({row:6,column:7},ae,{startDate:K,columnIndexOffset:se?1:0,nextEndDate:Q.endDate||H||Q.selecting&&K||null,now:dt().locale(M(n)).startOf(ve),unit:ve,relativeDateGetter:oe=>M(h).add(oe-Z,ve),setCellMetadata:(...oe)=>{x(...oe,ke)&&(ke+=1)},setRowMetadata:k}),se)for(let oe=0;oe<6;oe++)ae[oe][1].dayjs&&(ae[oe][0]={type:"week",text:ae[oe][1].dayjs.week()});return ae});Ee(()=>t.date,async()=>{var K;(K=M(s))!=null&&K.contains(document.activeElement)&&(await st(),await S())});const S=async()=>{var K;return(K=M(i))==null?void 0:K.focus()},E=K=>t.selectionMode==="date"&&kb(K.type)&&P(K,t.parsedValue),P=(K,H)=>H?dt(H).locale(M(n)).isSame(t.date.date(Number(K.text)),"day"):!1,T=(K,H)=>{const Q=M(m).startOfMonthDay,se=M(d),Z=Q+se<0?7+Q+se:Q+se,ae=K*7+(H-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(Z,"day").add(ae,"day")},L=K=>{var Z;if(!t.rangeState.selecting)return;let H=K.target;if(H.tagName==="SPAN"&&(H=(Z=H.parentNode)==null?void 0:Z.parentNode),H.tagName==="DIV"&&(H=H.parentNode),H.tagName!=="TD")return;const Q=H.parentNode.rowIndex-1,se=H.cellIndex;M(C)[Q][se].disabled||(Q!==M(o)||se!==M(r))&&(o.value=Q,r.value=se,e("changerange",{selecting:!0,endDate:T(Q,se)}))},I=K=>!M(p)&&(K==null?void 0:K.text)===1&&kb(K.type)||K.isCurrent,V=K=>{l||M(p)||t.selectionMode!=="date"||q(K,!0)},R=K=>{K.target.closest("td")&&(l=!0)},N=K=>{K.target.closest("td")&&(l=!1)},F=K=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:K,maxDate:null}),e("select",!0)):(K>=t.minDate?e("pick",{minDate:t.minDate,maxDate:K}):e("pick",{minDate:K,maxDate:t.minDate}),e("select",!1))},B=K=>{const H=K.week(),Q=`${K.year()}w${H}`;e("pick",{year:K.year(),week:H,value:Q,date:K.startOf("week")})},G=(K,H)=>{e("pick",H?oo(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==K.valueOf()):oo(t.parsedValue).concat([K]))},q=(K,H=!1)=>{if(t.disabled)return;const Q=K.target.closest("td");if(!Q)return;const se=Q.parentNode.rowIndex-1,Z=Q.cellIndex,ae=M(C)[se][Z];if(ae.disabled||ae.type==="week")return;const ve=T(se,Z);switch(t.selectionMode){case"range":F(ve);break;case"date":e("pick",ve,H);break;case"week":B(ve);break;case"dates":G(ve,!!ae.selected);break}},X=K=>{if(t.selectionMode!=="week")return!1;let H=t.date.startOf("day");if(K.type==="prev-month"&&(H=H.subtract(1,"month")),K.type==="next-month"&&(H=H.add(1,"month")),H=H.date(Number.parseInt(K.text,10)),t.parsedValue&&!Ae(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(H,"day")}return!1};return{WEEKS:f,rows:C,tbodyRef:s,currentCellRef:i,focus:S,isCurrent:E,isWeekActive:X,isSelectedCell:I,handlePickDate:q,handleMouseUp:N,handleMouseDown:R,handleMouseMove:L,handleFocus:V}},kpe=(t,{isCurrent:e,isWeekActive:n})=>{const s=Ne("date-table"),{t:i}=Xt(),o=z(()=>[s.b(),s.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),r=z(()=>i("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return kb(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(kb(c.type)||t.selectionMode==="week")&&(u.push("in-range"),c.start&&u.push("start-date"),c.end&&u.push("end-date")),(c.disabled||t.disabled)&&u.push("disabled"),c.selected&&u.push("selected"),c.customClass&&u.push(c.customClass),u.join(" ")},l=c=>[s.e("row"),{current:n(c)}];return{tableKls:o,tableLabel:r,weekHeaderClass:s.e("week-header"),getCellClasses:a,getRowKls:l,t:i}},Cpe=We({cell:{type:de(Object)}});var h5=he({name:"ElDatePickerCell",props:Cpe,setup(t){const e=Ne("date-table-cell"),{slots:n}=He(l5);return()=>{const{cell:s}=t;return le(n,"default",{...s},()=>[y("div",{class:e.b()},[y("span",{class:e.e("text")},[(s==null?void 0:s.renderText)??(s==null?void 0:s.text)])])])}}});const Spe=["aria-label"],$pe=["aria-label"],Ape=["aria-current","aria-selected","tabindex","aria-disabled"];var Epe=he({__name:"basic-date-table",props:_pe,emits:wpe,setup(t,{expose:e,emit:n}){const s=t,{WEEKS:i,rows:o,tbodyRef:r,currentCellRef:a,focus:l,isCurrent:c,isWeekActive:u,isSelectedCell:d,handlePickDate:h,handleMouseUp:f,handleMouseDown:p,handleMouseMove:m,handleFocus:b}=xpe(s,n),{tableLabel:_,tableKls:x,getCellClasses:k,getRowKls:C,weekHeaderClass:S,t:E}=kpe(s,{isCurrent:c,isWeekActive:u});let P=!1;return _n(()=>{P=!0}),e({focus:l}),(T,L)=>(v(),A("table",{"aria-label":M(_),class:U(M(x)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:L[1]||(L[1]=(...I)=>M(h)&&M(h)(...I)),onMousemove:L[2]||(L[2]=(...I)=>M(m)&&M(m)(...I)),onMousedown:L[3]||(L[3]=(...I)=>M(p)&&M(p)(...I)),onMouseup:L[4]||(L[4]=(...I)=>M(f)&&M(f)(...I))},[g("tbody",{ref_key:"tbodyRef",ref:r},[g("tr",null,[T.showWeekNumber?(v(),A("th",{key:0,scope:"col",class:U(M(S))},null,2)):O("v-if",!0),(v(!0),A(te,null,we(M(i),(I,V)=>(v(),A("th",{key:V,"aria-label":M(E)("el.datepicker.weeksFull."+I),scope:"col"},$(M(E)("el.datepicker.weeks."+I)),9,$pe))),128))]),(v(!0),A(te,null,we(M(o),(I,V)=>(v(),A("tr",{key:V,class:U(M(C)(T.showWeekNumber?I[2]:I[1]))},[(v(!0),A(te,null,we(I,(R,N)=>(v(),A("td",{key:`${V}.${N}`,ref_for:!0,ref:F=>!M(P)&&M(d)(R)&&(a.value=F),class:U(M(k)(R)),"aria-current":R.isCurrent?"date":void 0,"aria-selected":R.isCurrent,tabindex:T.disabled?void 0:M(d)(R)?0:-1,"aria-disabled":T.disabled,onFocus:L[0]||(L[0]=(...F)=>M(b)&&M(b)(...F))},[y(M(h5),{cell:R},null,8,["cell"])],42,Ape))),128))],2))),128))],512)],42,Spe))}}),wk=Epe;const Mpe=We({...c5,selectionMode:d5("month")}),Tpe=["aria-label"],Ppe=["aria-selected","aria-label","tabindex","onKeydown"];var Ipe=he({__name:"basic-month-table",props:Mpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ne("month-table"),{t:r,lang:a}=Xt(),l=J(),c=J(),u=J(s.date.locale("en").localeData().monthsShort().map(C=>C.toLowerCase())),d=J([[],[],[]]),h=J(),f=J(),p=z(()=>{var E,P,T;const C=d.value,S=dt().locale(a.value).startOf("month");for(let L=0;L<3;L++){const I=C[L];for(let V=0;V<4;V++){const R=I[V]||(I[V]={row:L,column:V,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});R.type="normal";const N=L*4+V,F=s.date.startOf("year").month(N),B=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;R.inRange=!!(s.minDate&&F.isSameOrAfter(s.minDate,"month")&&B&&F.isSameOrBefore(B,"month"))||!!(s.minDate&&F.isSameOrBefore(s.minDate,"month")&&B&&F.isSameOrAfter(B,"month")),(E=s.minDate)!=null&&E.isSameOrAfter(B)?(R.start=!!(B&&F.isSame(B,"month")),R.end=s.minDate&&F.isSame(s.minDate,"month")):(R.start=!!(s.minDate&&F.isSame(s.minDate,"month")),R.end=!!(B&&F.isSame(B,"month"))),S.isSame(F)&&(R.type="today");const G=F.toDate();R.text=N,R.disabled=((P=s.disabledDate)==null?void 0:P.call(s,G))||!1,R.date=G,R.customClass=(T=s.cellClassName)==null?void 0:T.call(s,G),R.dayjs=F,R.timestamp=F.valueOf(),R.isSelected=_(R)}}return C}),m=()=>{var C;(C=c.value)==null||C.focus()},b=C=>{const S={},E=s.date.year(),P=new Date,T=C.text;return S.disabled=s.disabled||(s.disabledDate?wb(s.date,E,T,a.value).every(s.disabledDate):!1),S.current=oo(s.parsedValue).some(L=>dt.isDayjs(L)&&L.year()===E&&L.month()===T),S.today=P.getFullYear()===E&&P.getMonth()===T,C.customClass&&(S[C.customClass]=!0),C.inRange&&(S["in-range"]=!0,C.start&&(S["start-date"]=!0),C.end&&(S["end-date"]=!0)),S},_=C=>{const S=s.date.year(),E=C.text;return oo(s.date).some(P=>P.year()===S&&P.month()===E)},x=C=>{var T;if(!s.rangeState.selecting)return;let S=C.target;if(S.tagName==="SPAN"&&(S=(T=S.parentNode)==null?void 0:T.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const E=S.parentNode.rowIndex,P=S.cellIndex;p.value[E][P].disabled||(E!==h.value||P!==f.value)&&(h.value=E,f.value=P,i("changerange",{selecting:!0,endDate:s.date.startOf("year").month(E*4+P)}))},k=C=>{var L;if(s.disabled)return;const S=(L=C.target)==null?void 0:L.closest("td");if((S==null?void 0:S.tagName)!=="TD"||dl(S,"disabled"))return;const E=S.cellIndex,P=S.parentNode.rowIndex*4+E,T=s.date.startOf("year").month(P);if(s.selectionMode==="months"){if(C.type==="keydown"){i("pick",oo(s.parsedValue),!1);return}const I=Bf(s.date,s.date.year(),P,a.value,s.disabledDate);i("pick",dl(S,"current")?oo(s.parsedValue).filter(V=>(V==null?void 0:V.year())!==I.year()||(V==null?void 0:V.month())!==I.month()):oo(s.parsedValue).concat([dt(I)]))}else s.selectionMode==="range"?s.rangeState.selecting?(s.minDate&&T>=s.minDate?i("pick",{minDate:s.minDate,maxDate:T}):i("pick",{minDate:T,maxDate:s.minDate}),i("select",!1)):(i("pick",{minDate:T,maxDate:null}),i("select",!0)):i("pick",P)};return Ee(()=>s.date,async()=>{var C,S;(C=l.value)!=null&&C.contains(document.activeElement)&&(await st(),(S=c.value)==null||S.focus())}),e({focus:m}),(C,S)=>(v(),A("table",{role:"grid","aria-label":M(r)("el.datepicker.monthTablePrompt"),class:U(M(o).b()),onClick:k,onMousemove:x},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),A(te,null,we(p.value,(E,P)=>(v(),A("tr",{key:P},[(v(!0),A(te,null,we(E,(T,L)=>(v(),A("td",{key:L,ref_for:!0,ref:I=>T.isSelected&&(c.value=I),class:U(b(T)),"aria-selected":!!T.isSelected,"aria-label":M(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[Nt(Be(k,["prevent","stop"]),["space"]),Nt(Be(k,["prevent","stop"]),["enter"])]},[y(M(h5),{cell:{...T,renderText:M(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Ppe))),128))]))),128))],512)],42,Tpe))}}),e1=Ipe;const Lpe=We({...c5,selectionMode:d5("year")}),Ope=["aria-label"],Dpe=["aria-selected","aria-label","tabindex","onKeydown"];var Rpe=he({__name:"basic-year-table",props:Lpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=(S,E)=>{const P=dt(String(S)).locale(E).startOf("year");return OR(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},i=t,o=n,r=Ne("year-table"),{t:a,lang:l}=Xt(),c=J(),u=J(),d=z(()=>Math.floor(i.date.year()/10)*10),h=J([[],[],[]]),f=J(),p=J(),m=z(()=>{var P,T,L;const S=h.value,E=dt().locale(l.value).startOf("year");for(let I=0;I<3;I++){const V=S[I];for(let R=0;R<4&&!(I*4+R>=10);R++){let N=V[R];N||(N={row:I,column:R,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),N.type="normal";const F=I*4+R+d.value,B=dt().year(F),G=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;N.inRange=!!(i.minDate&&B.isSameOrAfter(i.minDate,"year")&&G&&B.isSameOrBefore(G,"year"))||!!(i.minDate&&B.isSameOrBefore(i.minDate,"year")&&G&&B.isSameOrAfter(G,"year")),(P=i.minDate)!=null&&P.isSameOrAfter(G)?(N.start=!!(G&&B.isSame(G,"year")),N.end=!!(i.minDate&&B.isSame(i.minDate,"year"))):(N.start=!!(i.minDate&&B.isSame(i.minDate,"year")),N.end=!!(G&&B.isSame(G,"year"))),E.isSame(B)&&(N.type="today"),N.text=F;const q=B.toDate();N.disabled=((T=i.disabledDate)==null?void 0:T.call(i,q))||!1,N.date=q,N.customClass=(L=i.cellClassName)==null?void 0:L.call(i,q),N.dayjs=B,N.timestamp=B.valueOf(),N.isSelected=x(N),V[R]=N}}return S}),b=()=>{var S;(S=u.value)==null||S.focus()},_=S=>{const E={},P=dt().locale(l.value),T=S.text;return E.disabled=i.disabled||(i.disabledDate?s(T,l.value).every(i.disabledDate):!1),E.today=P.year()===T,E.current=oo(i.parsedValue).some(L=>L.year()===T),S.customClass&&(E[S.customClass]=!0),S.inRange&&(E["in-range"]=!0,S.start&&(E["start-date"]=!0),S.end&&(E["end-date"]=!0)),E},x=S=>{const E=S.text;return oo(i.date).some(P=>P.year()===E)},k=S=>{var I;if(i.disabled)return;const E=(I=S.target)==null?void 0:I.closest("td");if(!E||!E.textContent||dl(E,"disabled"))return;const P=E.cellIndex,T=E.parentNode.rowIndex*4+P+d.value,L=dt().year(T);if(i.selectionMode==="range")i.rangeState.selecting?(i.minDate&&L>=i.minDate?o("pick",{minDate:i.minDate,maxDate:L}):o("pick",{minDate:L,maxDate:i.minDate}),o("select",!1)):(o("pick",{minDate:L,maxDate:null}),o("select",!0));else if(i.selectionMode==="years"){if(S.type==="keydown"){o("pick",oo(i.parsedValue),!1);return}const V=xb(L.startOf("year"),l.value,i.disabledDate);o("pick",dl(E,"current")?oo(i.parsedValue).filter(R=>(R==null?void 0:R.year())!==T):oo(i.parsedValue).concat([V]))}else o("pick",T)},C=S=>{var L;if(!i.rangeState.selecting)return;const E=(L=S.target)==null?void 0:L.closest("td");if(!E)return;const P=E.parentNode.rowIndex,T=E.cellIndex;m.value[P][T].disabled||(P!==f.value||T!==p.value)&&(f.value=P,p.value=T,o("changerange",{selecting:!0,endDate:dt().year(d.value).add(P*4+T,"year")}))};return Ee(()=>i.date,async()=>{var S,E;(S=c.value)!=null&&S.contains(document.activeElement)&&(await st(),(E=u.value)==null||E.focus())}),e({focus:b}),(S,E)=>(v(),A("table",{role:"grid","aria-label":M(a)("el.datepicker.yearTablePrompt"),class:U(M(r).b()),onClick:k,onMousemove:C},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),A(te,null,we(m.value,(P,T)=>(v(),A("tr",{key:T},[(v(!0),A(te,null,we(P,(L,I)=>(v(),A("td",{key:`${T}_${I}`,ref_for:!0,ref:V=>L.isSelected&&(u.value=V),class:U(["available",_(L)]),"aria-selected":L.isSelected,"aria-label":String(L.text),tabindex:L.isSelected?0:-1,onKeydown:[Nt(Be(k,["prevent","stop"]),["space"]),Nt(Be(k,["prevent","stop"]),["enter"])]},[y(M(h5),{cell:L},null,8,["cell"])],42,Dpe))),128))]))),128))],512)],42,Ope))}}),t1=Rpe;const Vpe=["disabled","onClick"],Fpe=["aria-label","disabled"],Npe=["aria-label","disabled"],Bpe=["tabindex","aria-disabled"],zpe=["tabindex","aria-disabled"],Hpe=["aria-label","disabled"],Upe=["aria-label","disabled"];var jpe=he({__name:"panel-date-pick",props:ype,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(ye,Ie,ce)=>!0,s=t,i=e,o=Ne("picker-panel"),r=Ne("date-picker"),a=sp(),l=Gi(),{t:c,lang:u}=Xt(),d=He($a),h=He(U1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:b}=d.props,_=Cn(d.props,"defaultValue"),x=J(),k=J(dt().locale(u.value)),C=J(!1);let S=!1;const E=z(()=>dt(b).locale(u.value)),P=z(()=>k.value.month()),T=z(()=>k.value.year()),L=J([]),I=J(null),V=J(null),R=ye=>L.value.length>0?n(ye,L.value,s.format||"HH:mm:ss"):!0,N=ye=>b&&!Pe.value&&!C.value&&!S?E.value.year(ye.year()).month(ye.month()).date(ye.date()):ie.value?ye.millisecond(0):ye.startOf("day"),F=(ye,...Ie)=>{ye?Ae(ye)?i("pick",ye.map(N),...Ie):i("pick",N(ye),...Ie):i("pick",ye,...Ie),I.value=null,V.value=null,C.value=!1,S=!1},B=async(ye,Ie)=>{if(Q.value==="date"&&dt.isDayjs(ye)){const ce=Yp(s.parsedValue);let Le=ce?ce.year(ye.year()).month(ye.month()).date(ye.date()):ye;R(Le)||(Le=L.value[0][0].year(ye.year()).month(ye.month()).date(ye.date())),k.value=Le,F(Le,ie.value||Ie)}else Q.value==="week"?F(ye.date):Q.value==="dates"&&F(ye,!0)},G=ye=>{const Ie=ye?"add":"subtract";k.value=k.value[Ie](1,"month"),ft("month")},q=ye=>{const Ie=k.value,ce=ye?"add":"subtract";k.value=X.value==="year"?Ie[ce](10,"year"):Ie[ce](1,"year"),ft("year")},X=J("date"),K=z(()=>{const ye=c("el.datepicker.year");if(X.value==="year"){const Ie=Math.floor(T.value/10)*10;return ye?`${Ie} ${ye} - ${Ie+9} ${ye}`:`${Ie} - ${Ie+9}`}return`${T.value} ${ye}`}),H=ye=>{const Ie=Je(ye.value)?ye.value():ye.value;if(Ie){S=!0,F(dt(Ie).locale(u.value));return}ye.onClick&&ye.onClick({attrs:a,slots:l,emit:i})},Q=z(()=>{const{type:ye}=s;return["week","month","months","year","years","dates"].includes(ye)?ye:"date"}),se=z(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),Z=z(()=>Q.value==="date"?X.value:Q.value),ae=z(()=>!!f.length),ve=async(ye,Ie)=>{Q.value==="month"?(k.value=Bf(k.value,k.value.year(),ye,u.value,p),F(k.value,!1)):Q.value==="months"?F(ye,Ie??!0):(k.value=Bf(k.value,k.value.year(),ye,u.value,p),X.value="date",["month","year","date","week"].includes(Q.value)&&(F(k.value,!0),await st(),gt())),ft("month")},ke=async(ye,Ie)=>{Q.value==="year"?(k.value=xb(k.value.startOf("year").year(ye),u.value,p),F(k.value,!1)):Q.value==="years"?F(ye,Ie??!0):(k.value=xb(k.value.year(ye),u.value,p),X.value="month",["month","year","date","week"].includes(Q.value)&&(F(k.value,!0),await st(),gt())),ft("year")},oe=Cs(),fe=async ye=>{oe.value||(X.value=ye,await st(),gt())},ie=z(()=>s.type==="datetime"||s.type==="datetimerange"),re=z(()=>{const ye=ie.value||Q.value==="dates",Ie=Q.value==="years",ce=Q.value==="months",Le=X.value==="date",pt=X.value==="year",yn=X.value==="month";return ye&&Le||Ie&&pt||ce&&yn}),Se=z(()=>!se.value&&s.showNow||s.showConfirm),je=z(()=>p?s.parsedValue?Ae(s.parsedValue)?p(s.parsedValue[0].toDate()):p(s.parsedValue.toDate()):!0:!1),ee=()=>{if(se.value)F(s.parsedValue);else{let ye=Yp(s.parsedValue);if(!ye){const Ie=dt(b).locale(u.value),ce=Te();ye=Ie.year(ce.year()).month(ce.month()).date(ce.date())}k.value=ye,F(ye)}},ne=z(()=>p?p(dt().locale(u.value).toDate()):!1),pe=()=>{const ye=dt().locale(u.value).toDate();C.value=!0,(!p||!p(ye))&&R(ye)&&(k.value=dt().locale(u.value),F(k.value))},$e=z(()=>s.timeFormat||RR(s.format)||Kg),Ce=z(()=>s.dateFormat||DR(s.format)||uc),Pe=z(()=>{if(V.value)return V.value;if(!(!s.parsedValue&&!_.value))return(Yp(s.parsedValue)||k.value).format($e.value)}),Ue=z(()=>{if(I.value)return I.value;if(!(!s.parsedValue&&!_.value))return(Yp(s.parsedValue)||k.value).format(Ce.value)}),Fe=J(!1),ze=()=>{Fe.value=!0},De=()=>{Fe.value=!1},ct=ye=>({hour:ye.hour(),minute:ye.minute(),second:ye.second(),year:ye.year(),month:ye.month(),date:ye.date()}),Qe=(ye,Ie,ce)=>{const{hour:Le,minute:pt,second:yn}=ct(ye),ms=Yp(s.parsedValue);k.value=ms?ms.hour(Le).minute(pt).second(yn):ye,F(k.value,!0),ce||(Fe.value=Ie)},ot=ye=>{const Ie=dt(ye,$e.value).locale(u.value);if(Ie.isValid()&&R(Ie)){const{year:ce,month:Le,date:pt}=ct(k.value);k.value=Ie.year(ce).month(Le).date(pt),V.value=null,Fe.value=!1,F(k.value,!0)}},be=ye=>{const Ie=zf(ye,Ce.value,u.value,h);if(Ie.isValid()){if(p&&p(Ie.toDate()))return;const{hour:ce,minute:Le,second:pt}=ct(k.value);k.value=Ie.hour(ce).minute(Le).second(pt),I.value=null,F(k.value,!0)}},me=ye=>dt.isDayjs(ye)&&ye.isValid()&&(p?!p(ye.toDate()):!0),Me=ye=>zf(ye,s.format,u.value,h),Te=()=>{const ye=dt(_.value).locale(u.value);if(!_.value){const Ie=E.value;return dt().hour(Ie.hour()).minute(Ie.minute()).second(Ie.second()).locale(u.value)}return ye},gt=()=>{var ye;["week","month","year","date"].includes(Q.value)&&((ye=x.value)==null||ye.focus())},Tt=()=>{gt(),Q.value==="week"&&ut(Ye.down)},Xe=ye=>{const Ie=hs(ye);[Ye.up,Ye.down,Ye.left,Ye.right,Ye.home,Ye.end,Ye.pageUp,Ye.pageDown].includes(Ie)&&(ut(Ie),ye.stopPropagation(),ye.preventDefault()),[Ye.enter,Ye.space,Ye.numpadEnter].includes(Ie)&&I.value===null&&V.value===null&&(ye.preventDefault(),F(k.value,!1))},ut=ye=>{const{up:Ie,down:ce,left:Le,right:pt,home:yn,end:ms,pageUp:nu,pageDown:Dp}=Ye,Pl={year:{[Ie]:-4,[ce]:4,[Le]:-1,[pt]:1,offset:(Sn,Ti)=>Sn.setFullYear(Sn.getFullYear()+Ti)},month:{[Ie]:-4,[ce]:4,[Le]:-1,[pt]:1,offset:(Sn,Ti)=>Sn.setMonth(Sn.getMonth()+Ti)},week:{[Ie]:-1,[ce]:1,[Le]:-1,[pt]:1,offset:(Sn,Ti)=>Sn.setDate(Sn.getDate()+Ti*7)},date:{[Ie]:-7,[ce]:7,[Le]:-1,[pt]:1,[yn]:Sn=>-Sn.getDay(),[ms]:Sn=>-Sn.getDay()+6,[nu]:Sn=>-new Date(Sn.getFullYear(),Sn.getMonth(),0).getDate(),[Dp]:Sn=>new Date(Sn.getFullYear(),Sn.getMonth()+1,0).getDate(),offset:(Sn,Ti)=>Sn.setDate(Sn.getDate()+Ti)}},na=k.value.toDate();for(;Math.abs(k.value.diff(na,"year",!0))<1;){const Sn=Pl[Z.value];if(!Sn)return;if(Sn.offset(na,Je(Sn[ye])?Sn[ye](na):Sn[ye]??0),p&&p(na))break;const Ti=dt(na).locale(u.value);k.value=Ti,i("pick",Ti,!0);break}},ft=ye=>{i("panel-change",k.value.toDate(),ye,X.value)};return Ee(()=>Q.value,ye=>{if(["month","year"].includes(ye)){X.value=ye;return}else if(ye==="years"){X.value="year";return}else if(ye==="months"){X.value="month";return}X.value="date"},{immediate:!0}),Ee(()=>_.value,ye=>{ye&&(k.value=Te())},{immediate:!0}),Ee(()=>s.parsedValue,ye=>{if(ye){if(se.value||Ae(ye))return;k.value=ye}else k.value=Te()},{immediate:!0}),i("set-picker-option",["isValidValue",me]),i("set-picker-option",["parseUserInput",Me]),i("set-picker-option",["handleFocusPicker",Tt]),(ye,Ie)=>(v(),A("div",{class:U([M(o).b(),M(r).b(),M(o).is("border",ye.border),M(o).is("disabled",M(oe)),{"has-sidebar":ye.$slots.sidebar||ae.value,"has-time":ie.value}])},[g("div",{class:U(M(o).e("body-wrapper"))},[le(ye.$slots,"sidebar",{class:U(M(o).e("sidebar"))}),ae.value?(v(),A("div",{key:0,class:U(M(o).e("sidebar"))},[(v(!0),A(te,null,we(M(f),(ce,Le)=>(v(),A("button",{key:Le,type:"button",disabled:M(oe),class:U(M(o).e("shortcut")),onClick:pt=>H(ce)},$(ce.text),11,Vpe))),128))],2)):O("v-if",!0),g("div",{class:U(M(o).e("body"))},[ie.value?(v(),A("div",{key:0,class:U(M(r).e("time-header"))},[g("span",{class:U(M(r).e("editor-wrap"))},[y(M(_t),{placeholder:M(c)("el.datepicker.selectDate"),"model-value":Ue.value,size:"small","validate-event":!1,disabled:M(oe),readonly:!ye.editable,onInput:Ie[0]||(Ie[0]=ce=>I.value=ce),onChange:be},null,8,["placeholder","model-value","disabled","readonly"])],2),Oe((v(),A("span",{class:U(M(r).e("editor-wrap"))},[y(M(_t),{placeholder:M(c)("el.datepicker.selectTime"),"model-value":Pe.value,size:"small","validate-event":!1,disabled:M(oe),readonly:!ye.editable,onFocus:ze,onInput:Ie[1]||(Ie[1]=ce=>V.value=ce),onChange:ot},null,8,["placeholder","model-value","disabled","readonly"]),y(M(gk),{visible:Fe.value,format:$e.value,"parsed-value":k.value,onPick:Qe},null,8,["visible","format","parsed-value"])],2)),[[M(Zg),De]])],2)):O("v-if",!0),Oe(g("div",{class:U([M(r).e("header"),(X.value==="year"||X.value==="month")&&M(r).em("header","bordered")])},[g("span",{class:U(M(r).e("prev-btn"))},[g("button",{type:"button","aria-label":M(c)("el.datepicker.prevYear"),class:U(["d-arrow-left",M(o).e("icon-btn")]),disabled:M(oe),onClick:Ie[2]||(Ie[2]=ce=>q(!1))},[le(ye.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,Fpe),Oe(g("button",{type:"button","aria-label":M(c)("el.datepicker.prevMonth"),class:U([M(o).e("icon-btn"),"arrow-left"]),disabled:M(oe),onClick:Ie[3]||(Ie[3]=ce=>G(!1))},[le(ye.$slots,"prev-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(dd))]),_:1})])],10,Npe),[[jt,X.value==="date"]])],2),g("span",{role:"button",class:U(M(r).e("header-label")),"aria-live":"polite",tabindex:ye.disabled?void 0:0,"aria-disabled":ye.disabled,onKeydown:Ie[4]||(Ie[4]=Nt(ce=>fe("year"),["enter"])),onClick:Ie[5]||(Ie[5]=ce=>fe("year"))},$(K.value),43,Bpe),Oe(g("span",{role:"button","aria-live":"polite",tabindex:ye.disabled?void 0:0,"aria-disabled":ye.disabled,class:U([M(r).e("header-label"),{active:X.value==="month"}]),onKeydown:Ie[6]||(Ie[6]=Nt(ce=>fe("month"),["enter"])),onClick:Ie[7]||(Ie[7]=ce=>fe("month"))},$(M(c)(`el.datepicker.month${P.value+1}`)),43,zpe),[[jt,X.value==="date"]]),g("span",{class:U(M(r).e("next-btn"))},[Oe(g("button",{type:"button","aria-label":M(c)("el.datepicker.nextMonth"),class:U([M(o).e("icon-btn"),"arrow-right"]),disabled:M(oe),onClick:Ie[8]||(Ie[8]=ce=>G(!0))},[le(ye.$slots,"next-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rr))]),_:1})])],10,Hpe),[[jt,X.value==="date"]]),g("button",{type:"button","aria-label":M(c)("el.datepicker.nextYear"),class:U([M(o).e("icon-btn"),"d-arrow-right"]),disabled:M(oe),onClick:Ie[9]||(Ie[9]=ce=>q(!0))},[le(ye.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,Upe)],2)],2),[[jt,X.value!=="time"]]),g("div",{class:U(M(o).e("content")),onKeydown:Xe},[X.value==="date"?(v(),D(wk,{key:0,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:k.value,"parsed-value":ye.parsedValue,"disabled-date":M(p),disabled:M(oe),"cell-class-name":M(m),"show-week-number":ye.showWeekNumber,onPick:B},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):O("v-if",!0),X.value==="year"?(v(),D(t1,{key:1,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:k.value,"disabled-date":M(p),disabled:M(oe),"parsed-value":ye.parsedValue,"cell-class-name":M(m),onPick:ke},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):O("v-if",!0),X.value==="month"?(v(),D(e1,{key:2,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:k.value,"parsed-value":ye.parsedValue,"disabled-date":M(p),disabled:M(oe),"cell-class-name":M(m),onPick:ve},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):O("v-if",!0)],34)],2)],2),ye.showFooter&&re.value&&Se.value?(v(),A("div",{key:0,class:U(M(o).e("footer"))},[Oe(y(M(Ge),{text:"",size:"small",class:U(M(o).e("link-btn")),disabled:ne.value,onClick:pe},{default:w(()=>[Y($(M(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[jt,!se.value&&ye.showNow]]),ye.showConfirm?(v(),D(M(Ge),{key:0,plain:"",size:"small",class:U(M(o).e("link-btn")),disabled:je.value,onClick:ee},{default:w(()=>[Y($(M(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),Wpe=jpe;const Ype=We({...AV,...u5}),qpe=t=>{const{emit:e}=ht(),n=sp(),s=Gi();return o=>{const r=Je(o.value)?o.value():o.value;if(r){e("pick",[dt(r[0]).locale(t.value),dt(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:s,emit:e})}},f5=(t,{defaultValue:e,defaultTime:n,leftDate:s,rightDate:i,step:o,unit:r,sortDates:a})=>{const{emit:l}=ht(),{pickerNs:c}=He(l5),u=Ne("date-range-picker"),{t:d,lang:h}=Xt(),f=qpe(h),p=J(),m=J(),b=J({endDate:null,selecting:!1}),_=E=>{b.value=E},x=(E=!1)=>{const P=M(p),T=M(m);Qg([P,T])&&l("pick",[P,T],E)},k=E=>{b.value.selecting=E,E||(b.value.endDate=null)},C=E=>{if(Ae(E)&&E.length===2){const[P,T]=E;p.value=P,s.value=P,m.value=T,a(M(p),M(m))}else S()},S=()=>{let[E,P]=J_(M(e),{lang:M(h),step:o,unit:r,unlinkPanels:t.unlinkPanels});const T=I=>I.diff(I.startOf("d"),"ms"),L=M(n);if(L){let I=0,V=0;if(Ae(L)){const[R,N]=L.map(dt);I=T(R),V=T(N)}else{const R=T(dt(L));I=R,V=R}E=E.startOf("d").add(I,"ms"),P=P.startOf("d").add(V,"ms")}p.value=void 0,m.value=void 0,s.value=E,i.value=P};return Ee(e,E=>{E&&S()},{immediate:!0}),Ee(()=>t.parsedValue,E=>{(!(E!=null&&E.length)||!zi(E,[p.value,m.value]))&&C(E)},{immediate:!0}),Ee(()=>t.visible,()=>{t.visible&&C(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:b,lang:h,ppNs:c,drpNs:u,handleChangeRange:_,handleRangeConfirm:x,handleShortcutClick:f,onSelect:k,parseValue:C,t:d}},Gpe=(t,e,n,s)=>{const i=J("date"),o=J(),r=J("date"),a=J(),{disabledDate:l}=He($a).props,{t:c,lang:u}=Xt(),d=z(()=>n.value.year()),h=z(()=>n.value.month()),f=z(()=>s.value.year()),p=z(()=>s.value.month());function m(S,E){const P=c("el.datepicker.year");if(S.value==="year"){const T=Math.floor(E.value/10)*10;return P?`${T} ${P} - ${T+9} ${P}`:`${T} - ${T+9}`}return`${E.value} ${P}`}function b(S){S==null||S.focus()}async function _(S,E){if(t.disabled)return;const P=S==="left"?i:r,T=S==="left"?o:a;P.value=E,await st(),b(T.value)}async function x(S,E,P){if(t.disabled)return;const T=E==="left",L=T?n:s,I=T?s:n,V=T?i:r,R=T?o:a;S==="year"&&(L.value=xb(L.value.year(P),u.value,l)),S==="month"&&(L.value=Bf(L.value,L.value.year(),P,u.value,l)),t.unlinkPanels||(I.value=E==="left"?L.value.add(1,"month"):L.value.subtract(1,"month")),V.value=S==="year"?"month":"date",await st(),b(R.value),k(S)}function k(S){e("panel-change",[n.value.toDate(),s.value.toDate()],S)}function C(S,E,P){const T=P?"add":"subtract";return S==="year"?E[T](10,"year"):E[T](1,"year")}return{leftCurrentView:i,rightCurrentView:r,leftCurrentViewRef:o,rightCurrentViewRef:a,leftYear:d,rightYear:f,leftMonth:h,rightMonth:p,leftYearLabel:z(()=>m(i,d)),rightYearLabel:z(()=>m(r,f)),showLeftPicker:S=>_("left",S),showRightPicker:S=>_("right",S),handleLeftYearPick:S=>x("year","left",S),handleRightYearPick:S=>x("year","right",S),handleLeftMonthPick:S=>x("month","left",S),handleRightMonthPick:S=>x("month","right",S),handlePanelChange:k,adjustDateByView:C}},Xpe=["disabled","onClick"],Kpe=["aria-label","disabled"],Zpe=["aria-label","disabled"],Jpe=["disabled","aria-label"],Qpe=["disabled","aria-label"],eme=["tabindex","aria-disabled"],tme=["tabindex","aria-disabled"],nme=["disabled","aria-label"],sme=["disabled","aria-label"],ime=["aria-label","disabled"],ome=["disabled","aria-label"],rme=["tabindex","aria-disabled"],ame=["tabindex","aria-disabled"],t0="month";var lme=he({__name:"panel-date-range",props:Ype,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,s=e,i=He($a),o=He(U1,void 0),{disabledDate:r,cellClassName:a,defaultTime:l,clearable:c}=i.props,u=Cn(i.props,"format"),d=Cn(i.props,"shortcuts"),h=Cn(i.props,"defaultValue"),{lang:f}=Xt(),p=J(dt().locale(f.value)),m=J(dt().locale(f.value).add(1,t0)),{minDate:b,maxDate:_,rangeState:x,ppNs:k,drpNs:C,handleChangeRange:S,handleRangeConfirm:E,handleShortcutClick:P,onSelect:T,parseValue:L,t:I}=f5(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:t0,sortDates:Ti});Ee(()=>n.visible,tt=>{!tt&&x.value.selecting&&(L(n.parsedValue),T(!1))});const V=J({min:null,max:null}),R=J({min:null,max:null}),{leftCurrentView:N,rightCurrentView:F,leftCurrentViewRef:B,rightCurrentViewRef:G,leftYear:q,rightYear:X,leftMonth:K,rightMonth:H,leftYearLabel:Q,rightYearLabel:se,showLeftPicker:Z,showRightPicker:ae,handleLeftYearPick:ve,handleRightYearPick:ke,handleLeftMonthPick:oe,handleRightMonthPick:fe,handlePanelChange:ie,adjustDateByView:re}=Gpe(n,s,p,m),Se=z(()=>!!d.value.length),je=z(()=>V.value.min!==null?V.value.min:b.value?b.value.format(Ce.value):""),ee=z(()=>V.value.max!==null?V.value.max:_.value||b.value?(_.value||b.value).format(Ce.value):""),ne=z(()=>R.value.min!==null?R.value.min:b.value?b.value.format($e.value):""),pe=z(()=>R.value.max!==null?R.value.max:_.value||b.value?(_.value||b.value).format($e.value):""),$e=z(()=>n.timeFormat||RR(u.value||"")||Kg),Ce=z(()=>n.dateFormat||DR(u.value||"")||uc),Pe=tt=>Qg(tt)&&(r?!r(tt[0].toDate())&&!r(tt[1].toDate()):!0),Ue=()=>{p.value=re(N.value,p.value,!1),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("year")},Fe=()=>{p.value=p.value.subtract(1,"month"),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("month")},ze=()=>{n.unlinkPanels?m.value=re(F.value,m.value,!0):(p.value=re(F.value,p.value,!0),m.value=p.value.add(1,"month")),ie("year")},De=()=>{n.unlinkPanels?m.value=m.value.add(1,"month"):(p.value=p.value.add(1,"month"),m.value=p.value.add(1,"month")),ie("month")},ct=()=>{p.value=re(N.value,p.value,!0),ie("year")},Qe=()=>{p.value=p.value.add(1,"month"),ie("month")},ot=()=>{m.value=re(F.value,m.value,!1),ie("year")},be=()=>{m.value=m.value.subtract(1,"month"),ie("month")},me=z(()=>{const tt=(K.value+1)%12,rt=K.value+1>=12?1:0;return n.unlinkPanels&&new Date(q.value+rt,tt)<new Date(X.value,H.value)}),Me=z(()=>n.unlinkPanels&&X.value*12+H.value-(q.value*12+K.value+1)>=12),Te=Cs(),gt=z(()=>!(b.value&&_.value&&!x.value.selecting&&Qg([b.value,_.value])&&!Te.value)),Tt=z(()=>n.type==="datetime"||n.type==="datetimerange"),Xe=(tt,rt)=>{if(tt)return l?dt(l[rt]||l).locale(f.value).year(tt.year()).month(tt.month()).date(tt.date()):tt},ut=(tt,rt=!0)=>{const mt=tt.minDate,Wo=tt.maxDate,Il=Xe(mt,0),su=Xe(Wo,1);_.value===su&&b.value===Il||(s("calendar-change",[mt.toDate(),Wo&&Wo.toDate()]),_.value=su,b.value=Il,!Tt.value&&rt&&(rt=!Il||!su),E(rt))},ft=J(!1),ye=J(!1),Ie=()=>{ft.value=!1},ce=()=>{ye.value=!1},Le=(tt,rt)=>{V.value[rt]=tt;const mt=dt(tt,Ce.value).locale(f.value);if(mt.isValid()){if(r&&r(mt.toDate()))return;rt==="min"?(p.value=mt,b.value=(b.value||p.value).year(mt.year()).month(mt.month()).date(mt.date()),!n.unlinkPanels&&(!_.value||_.value.isBefore(b.value))&&(m.value=mt.add(1,"month"),_.value=b.value.add(1,"month"))):(m.value=mt,_.value=(_.value||m.value).year(mt.year()).month(mt.month()).date(mt.date()),!n.unlinkPanels&&(!b.value||b.value.isAfter(_.value))&&(p.value=mt.subtract(1,"month"),b.value=_.value.subtract(1,"month"))),Ti(b.value,_.value),E(!0)}},pt=(tt,rt)=>{V.value[rt]=null},yn=(tt,rt)=>{R.value[rt]=tt;const mt=dt(tt,$e.value).locale(f.value);mt.isValid()&&(rt==="min"?(ft.value=!0,b.value=(b.value||p.value).hour(mt.hour()).minute(mt.minute()).second(mt.second()),p.value=b.value):(ye.value=!0,_.value=(_.value||m.value).hour(mt.hour()).minute(mt.minute()).second(mt.second()),m.value=_.value))},ms=(tt,rt)=>{R.value[rt]=null,rt==="min"?(p.value=b.value,ft.value=!1,(!_.value||_.value.isBefore(b.value))&&(_.value=b.value)):(m.value=_.value,ye.value=!1,_.value&&_.value.isBefore(b.value)&&(b.value=_.value)),E(!0)},nu=(tt,rt,mt)=>{R.value.min||(tt&&(b.value=(b.value||p.value).hour(tt.hour()).minute(tt.minute()).second(tt.second())),mt||(ft.value=rt),(!_.value||_.value.isBefore(b.value))&&(_.value=b.value,m.value=tt,st(()=>{L(n.parsedValue)})),E(!0))},Dp=(tt,rt,mt)=>{R.value.max||(tt&&(_.value=(_.value||m.value).hour(tt.hour()).minute(tt.minute()).second(tt.second())),mt||(ye.value=rt),_.value&&_.value.isBefore(b.value)&&(b.value=_.value),E(!0))},Pl=()=>{na(),s("clear")},na=()=>{let tt=null;i!=null&&i.emptyValues&&(tt=i.emptyValues.valueOnClear.value),p.value=J_(M(h),{lang:M(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),_.value=void 0,b.value=void 0,E(!0),s("pick",tt)},Sn=tt=>zf(tt,u.value||"",f.value,o);function Ti(tt,rt){if(n.unlinkPanels&&rt){const mt=(tt==null?void 0:tt.year())||0,Wo=(tt==null?void 0:tt.month())||0,Il=rt.year(),su=rt.month();m.value=mt===Il&&Wo===su?rt.add(1,t0):rt}else m.value=p.value.add(1,t0),rt&&(m.value=m.value.hour(rt.hour()).minute(rt.minute()).second(rt.second()))}return s("set-picker-option",["isValidValue",Pe]),s("set-picker-option",["parseUserInput",Sn]),s("set-picker-option",["handleClear",na]),(tt,rt)=>(v(),A("div",{class:U([M(k).b(),M(C).b(),M(k).is("border",tt.border),M(k).is("disabled",M(Te)),{"has-sidebar":tt.$slots.sidebar||Se.value,"has-time":Tt.value}])},[g("div",{class:U(M(k).e("body-wrapper"))},[le(tt.$slots,"sidebar",{class:U(M(k).e("sidebar"))}),Se.value?(v(),A("div",{key:0,class:U(M(k).e("sidebar"))},[(v(!0),A(te,null,we(d.value,(mt,Wo)=>(v(),A("button",{key:Wo,type:"button",disabled:M(Te),class:U(M(k).e("shortcut")),onClick:Il=>M(P)(mt)},$(mt.text),11,Xpe))),128))],2)):O("v-if",!0),g("div",{class:U(M(k).e("body"))},[Tt.value?(v(),A("div",{key:0,class:U(M(C).e("time-header"))},[g("span",{class:U(M(C).e("editors-wrap"))},[g("span",{class:U(M(C).e("time-picker-wrap"))},[y(M(_t),{size:"small",disabled:M(x).selecting||M(Te),placeholder:M(I)("el.datepicker.startDate"),class:U(M(C).e("editor")),"model-value":je.value,"validate-event":!1,readonly:!tt.editable,onInput:rt[0]||(rt[0]=mt=>Le(mt,"min")),onChange:rt[1]||(rt[1]=mt=>pt(mt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),Oe((v(),A("span",{class:U(M(C).e("time-picker-wrap"))},[y(M(_t),{size:"small",class:U(M(C).e("editor")),disabled:M(x).selecting||M(Te),placeholder:M(I)("el.datepicker.startTime"),"model-value":ne.value,"validate-event":!1,readonly:!tt.editable,onFocus:rt[2]||(rt[2]=mt=>ft.value=!0),onInput:rt[3]||(rt[3]=mt=>yn(mt,"min")),onChange:rt[4]||(rt[4]=mt=>ms(mt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),y(M(gk),{visible:ft.value,format:$e.value,"datetime-role":"start","parsed-value":M(b)||p.value,onPick:nu},null,8,["visible","format","parsed-value"])],2)),[[M(Zg),Ie]])],2),g("span",null,[y(M(_e),null,{default:w(()=>[y(M(Rr))]),_:1})]),g("span",{class:U([M(C).e("editors-wrap"),"is-right"])},[g("span",{class:U(M(C).e("time-picker-wrap"))},[y(M(_t),{size:"small",class:U(M(C).e("editor")),disabled:M(x).selecting||M(Te),placeholder:M(I)("el.datepicker.endDate"),"model-value":ee.value,readonly:!M(b)||!tt.editable,"validate-event":!1,onInput:rt[5]||(rt[5]=mt=>Le(mt,"max")),onChange:rt[6]||(rt[6]=mt=>pt(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Oe((v(),A("span",{class:U(M(C).e("time-picker-wrap"))},[y(M(_t),{size:"small",class:U(M(C).e("editor")),disabled:M(x).selecting||M(Te),placeholder:M(I)("el.datepicker.endTime"),"model-value":pe.value,readonly:!M(b)||!tt.editable,"validate-event":!1,onFocus:rt[7]||(rt[7]=mt=>M(b)&&(ye.value=!0)),onInput:rt[8]||(rt[8]=mt=>yn(mt,"max")),onChange:rt[9]||(rt[9]=mt=>ms(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),y(M(gk),{"datetime-role":"end",visible:ye.value,format:$e.value,"parsed-value":M(_)||m.value,onPick:Dp},null,8,["visible","format","parsed-value"])],2)),[[M(Zg),ce]])],2)],2)):O("v-if",!0),g("div",{class:U([[M(k).e("content"),M(C).e("content")],"is-left"])},[g("div",{class:U(M(C).e("header"))},[g("button",{type:"button",class:U([M(k).e("icon-btn"),"d-arrow-left"]),"aria-label":M(I)("el.datepicker.prevYear"),disabled:M(Te),onClick:Ue},[le(tt.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,Kpe),Oe(g("button",{type:"button",class:U([M(k).e("icon-btn"),"arrow-left"]),"aria-label":M(I)("el.datepicker.prevMonth"),disabled:M(Te),onClick:Fe},[le(tt.$slots,"prev-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(dd))]),_:1})])],10,Zpe),[[jt,M(N)==="date"]]),tt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Me.value||M(Te),class:U([[M(k).e("icon-btn"),M(k).is("disabled",!Me.value||M(Te))],"d-arrow-right"]),"aria-label":M(I)("el.datepicker.nextYear"),onClick:ct},[le(tt.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,Jpe)):O("v-if",!0),tt.unlinkPanels&&M(N)==="date"?(v(),A("button",{key:1,type:"button",disabled:!me.value||M(Te),class:U([[M(k).e("icon-btn"),M(k).is("disabled",!me.value||M(Te))],"arrow-right"]),"aria-label":M(I)("el.datepicker.nextMonth"),onClick:Qe},[le(tt.$slots,"next-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rr))]),_:1})])],10,Qpe)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:U(M(C).e("header-label")),"aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,onKeydown:rt[10]||(rt[10]=Nt(mt=>M(Z)("year"),["enter"])),onClick:rt[11]||(rt[11]=mt=>M(Z)("year"))},$(M(Q)),43,eme),Oe(g("span",{role:"button","aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,class:U([M(C).e("header-label"),{active:M(N)==="month"}]),onKeydown:rt[12]||(rt[12]=Nt(mt=>M(Z)("month"),["enter"])),onClick:rt[13]||(rt[13]=mt=>M(Z)("month"))},$(M(I)(`el.datepicker.month${p.value.month()+1}`)),43,tme),[[jt,M(N)==="date"]])])],2),M(N)==="date"?(v(),D(wk,{key:0,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"range",date:p.value,"min-date":M(b),"max-date":M(_),"range-state":M(x),"disabled-date":M(r),"cell-class-name":M(a),"show-week-number":tt.showWeekNumber,disabled:M(Te),onChangerange:M(S),onPick:ut,onSelect:M(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),M(N)==="year"?(v(),D(t1,{key:1,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"year",date:p.value,"disabled-date":M(r),"parsed-value":tt.parsedValue,disabled:M(Te),onPick:M(ve)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),M(N)==="month"?(v(),D(e1,{key:2,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"month",date:p.value,"parsed-value":tt.parsedValue,"disabled-date":M(r),disabled:M(Te),onPick:M(oe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2),g("div",{class:U([[M(k).e("content"),M(C).e("content")],"is-right"])},[g("div",{class:U(M(C).e("header"))},[tt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Me.value||M(Te),class:U([[M(k).e("icon-btn"),M(k).is("disabled",!Me.value||M(Te))],"d-arrow-left"]),"aria-label":M(I)("el.datepicker.prevYear"),onClick:ot},[le(tt.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,nme)):O("v-if",!0),tt.unlinkPanels&&M(F)==="date"?(v(),A("button",{key:1,type:"button",disabled:!me.value||M(Te),class:U([[M(k).e("icon-btn"),M(k).is("disabled",!me.value||M(Te))],"arrow-left"]),"aria-label":M(I)("el.datepicker.prevMonth"),onClick:be},[le(tt.$slots,"prev-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(dd))]),_:1})])],10,sme)):O("v-if",!0),g("button",{type:"button","aria-label":M(I)("el.datepicker.nextYear"),class:U([M(k).e("icon-btn"),"d-arrow-right"]),disabled:M(Te),onClick:ze},[le(tt.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,ime),Oe(g("button",{type:"button",class:U([M(k).e("icon-btn"),"arrow-right"]),disabled:M(Te),"aria-label":M(I)("el.datepicker.nextMonth"),onClick:De},[le(tt.$slots,"next-month",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rr))]),_:1})])],10,ome),[[jt,M(F)==="date"]]),g("div",null,[g("span",{role:"button",class:U(M(C).e("header-label")),"aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,onKeydown:rt[14]||(rt[14]=Nt(mt=>M(ae)("year"),["enter"])),onClick:rt[15]||(rt[15]=mt=>M(ae)("year"))},$(M(se)),43,rme),Oe(g("span",{role:"button","aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,class:U([M(C).e("header-label"),{active:M(F)==="month"}]),onKeydown:rt[16]||(rt[16]=Nt(mt=>M(ae)("month"),["enter"])),onClick:rt[17]||(rt[17]=mt=>M(ae)("month"))},$(M(I)(`el.datepicker.month${m.value.month()+1}`)),43,ame),[[jt,M(F)==="date"]])])],2),M(F)==="date"?(v(),D(wk,{key:0,ref_key:"rightCurrentViewRef",ref:G,"selection-mode":"range",date:m.value,"min-date":M(b),"max-date":M(_),"range-state":M(x),"disabled-date":M(r),"cell-class-name":M(a),"show-week-number":tt.showWeekNumber,disabled:M(Te),onChangerange:M(S),onPick:ut,onSelect:M(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),M(F)==="year"?(v(),D(t1,{key:1,ref_key:"rightCurrentViewRef",ref:G,"selection-mode":"year",date:m.value,"disabled-date":M(r),"parsed-value":tt.parsedValue,disabled:M(Te),onPick:M(ke)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),M(F)==="month"?(v(),D(e1,{key:2,ref_key:"rightCurrentViewRef",ref:G,"selection-mode":"month",date:m.value,"parsed-value":tt.parsedValue,"disabled-date":M(r),disabled:M(Te),onPick:M(fe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2)],2)],2),tt.showFooter&&Tt.value&&(tt.showConfirm||M(c))?(v(),A("div",{key:0,class:U(M(k).e("footer"))},[M(c)?(v(),D(M(Ge),{key:0,text:"",size:"small",class:U(M(k).e("link-btn")),onClick:Pl},{default:w(()=>[Y($(M(I)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),tt.showConfirm?(v(),D(M(Ge),{key:1,plain:"",size:"small",class:U(M(k).e("link-btn")),disabled:gt.value,onClick:rt[18]||(rt[18]=mt=>M(E)(!1))},{default:w(()=>[Y($(M(I)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),cme=lme;const ume=We({...u5}),dme=["pick","set-picker-option","calendar-change"],hme=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:s}=Xt();return{leftPrevYear:()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},leftNextYear:()=>{e.value=e.value.add(1,"year")},rightPrevYear:()=>{n.value=n.value.subtract(1,"year")},leftLabel:z(()=>`${e.value.year()} ${s("el.datepicker.year")}`),rightLabel:z(()=>`${n.value.year()} ${s("el.datepicker.year")}`),leftYear:z(()=>e.value.year()),rightYear:z(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year())}},fme=["disabled","onClick"],pme=["disabled"],mme=["disabled"],gme=["disabled"],vme=["disabled"],n0="year";var yme=he({name:"DatePickerMonthRange",__name:"panel-month-range",props:ume,emits:dme,setup(t,{emit:e}){const n=t,s=e,{lang:i}=Xt(),o=He($a),r=He(U1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Cn(o.props,"format"),d=Cn(o.props,"defaultValue"),h=J(dt().locale(i.value)),f=J(dt().locale(i.value).add(1,n0)),{minDate:p,maxDate:m,rangeState:b,ppNs:_,drpNs:x,handleChangeRange:k,handleRangeConfirm:C,handleShortcutClick:S,onSelect:E,parseValue:P}=f5(n,{defaultValue:d,leftDate:h,rightDate:f,unit:n0,sortDates:Q}),T=z(()=>!!a.length),{leftPrevYear:L,rightNextYear:I,leftNextYear:V,rightPrevYear:R,leftLabel:N,rightLabel:F,leftYear:B,rightYear:G}=hme({unlinkPanels:Cn(n,"unlinkPanels"),leftDate:h,rightDate:f}),q=z(()=>n.unlinkPanels&&G.value>B.value+1),X=(Z,ae=!0)=>{const ve=Z.minDate,ke=Z.maxDate;m.value===ke&&p.value===ve||(s("calendar-change",[ve.toDate(),ke&&ke.toDate()]),m.value=ke,p.value=ve,ae&&C())},K=()=>{let Z=null;o!=null&&o.emptyValues&&(Z=o.emptyValues.valueOnClear.value),h.value=J_(M(d),{lang:M(i),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),s("pick",Z)},H=Z=>zf(Z,u.value,i.value,r);function Q(Z,ae){n.unlinkPanels&&ae?f.value=((Z==null?void 0:Z.year())||0)===ae.year()?ae.add(1,n0):ae:f.value=h.value.add(1,n0)}const se=Cs();return Ee(()=>n.visible,Z=>{!Z&&b.value.selecting&&(P(n.parsedValue),E(!1))}),s("set-picker-option",["isValidValue",Qg]),s("set-picker-option",["parseUserInput",H]),s("set-picker-option",["handleClear",K]),(Z,ae)=>(v(),A("div",{class:U([M(_).b(),M(x).b(),M(_).is("border",Z.border),M(_).is("disabled",M(se)),{"has-sidebar":!!Z.$slots.sidebar||T.value}])},[g("div",{class:U(M(_).e("body-wrapper"))},[le(Z.$slots,"sidebar",{class:U(M(_).e("sidebar"))}),T.value?(v(),A("div",{key:0,class:U(M(_).e("sidebar"))},[(v(!0),A(te,null,we(M(a),(ve,ke)=>(v(),A("button",{key:ke,type:"button",class:U(M(_).e("shortcut")),disabled:M(se),onClick:oe=>M(S)(ve)},$(ve.text),11,fme))),128))],2)):O("v-if",!0),g("div",{class:U(M(_).e("body"))},[g("div",{class:U([[M(_).e("content"),M(x).e("content")],"is-left"])},[g("div",{class:U(M(x).e("header"))},[g("button",{type:"button",class:U([M(_).e("icon-btn"),"d-arrow-left"]),disabled:M(se),onClick:ae[0]||(ae[0]=(...ve)=>M(L)&&M(L)(...ve))},[le(Z.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,pme),Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!q.value||M(se),class:U([[M(_).e("icon-btn"),M(_).is("disabled",!q.value||M(se))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...ve)=>M(V)&&M(V)(...ve))},[le(Z.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,mme)):O("v-if",!0),g("div",null,$(M(N)),1)],2),y(e1,{"selection-mode":"range",date:h.value,"min-date":M(p),"max-date":M(m),"range-state":M(b),"disabled-date":M(l),disabled:M(se),"cell-class-name":M(c),onChangerange:M(k),onPick:X,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:U([[M(_).e("content"),M(x).e("content")],"is-right"])},[g("div",{class:U(M(x).e("header"))},[Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!q.value||M(se),class:U([[M(_).e("icon-btn"),M(_).is("disabled",!q.value||M(se))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...ve)=>M(R)&&M(R)(...ve))},[le(Z.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,gme)):O("v-if",!0),g("button",{type:"button",class:U([M(_).e("icon-btn"),"d-arrow-right"]),disabled:M(se),onClick:ae[3]||(ae[3]=(...ve)=>M(I)&&M(I)(...ve))},[le(Z.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,vme),g("div",null,$(M(F)),1)],2),y(e1,{"selection-mode":"range",date:f.value,"min-date":M(p),"max-date":M(m),"range-state":M(b),"disabled-date":M(l),disabled:M(se),"cell-class-name":M(c),onChangerange:M(k),onPick:X,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),bme=yme;const _me=We({...u5}),wme=["pick","set-picker-option","calendar-change"],xme=({unlinkPanels:t,leftDate:e,rightDate:n})=>({leftPrevYear:()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},leftNextYear:()=>{e.value=e.value.add(10,"year")},rightPrevYear:()=>{n.value=n.value.subtract(10,"year")},leftLabel:z(()=>{const a=Math.floor(e.value.year()/10)*10;return`${a}-${a+9}`}),rightLabel:z(()=>{const a=Math.floor(n.value.year()/10)*10;return`${a}-${a+9}`}),leftYear:z(()=>Math.floor(e.value.year()/10)*10+9),rightYear:z(()=>Math.floor(n.value.year()/10)*10)}),kme=["disabled","onClick"],Cme=["disabled"],Sme=["disabled"],$me=["disabled"],Ame=["disabled"],ih=10,qp="year";var Eme=he({name:"DatePickerYearRange",__name:"panel-year-range",props:_me,emits:wme,setup(t,{emit:e}){const n=t,s=e,{lang:i}=Xt(),o=J(dt().locale(i.value)),r=J(dt().locale(i.value).add(ih,qp)),a=He(U1,void 0),l=He($a),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Cn(l.props,"format"),f=Cn(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:b,ppNs:_,drpNs:x,handleChangeRange:k,handleRangeConfirm:C,handleShortcutClick:S,onSelect:E,parseValue:P}=f5(n,{defaultValue:f,leftDate:o,rightDate:r,step:ih,unit:qp,sortDates:ke}),{leftPrevYear:T,rightNextYear:L,leftNextYear:I,rightPrevYear:V,leftLabel:R,rightLabel:N,leftYear:F,rightYear:B}=xme({unlinkPanels:Cn(n,"unlinkPanels"),leftDate:o,rightDate:r}),G=Cs(),q=z(()=>!!c.length),X=z(()=>[_.b(),x.b(),_.is("border",n.border),_.is("disabled",G.value),{"has-sidebar":!!Gi().sidebar||q.value}]),K=z(()=>({content:[_.e("content"),x.e("content"),"is-left"],arrowLeftBtn:[_.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[_.e("icon-btn"),_.is("disabled",!Q.value||G.value),"d-arrow-right"]})),H=z(()=>({content:[_.e("content"),x.e("content"),"is-right"],arrowLeftBtn:[_.e("icon-btn"),_.is("disabled",!Q.value||G.value),"d-arrow-left"],arrowRightBtn:[_.e("icon-btn"),"d-arrow-right"]})),Q=z(()=>n.unlinkPanels&&B.value>F.value+1),se=(oe,fe=!0)=>{const ie=oe.minDate,re=oe.maxDate;m.value===re&&p.value===ie||(s("calendar-change",[ie.toDate(),re&&re.toDate()]),m.value=re,p.value=ie,fe&&C())},Z=oe=>zf(oe,h.value,i.value,a),ae=oe=>Qg(oe)&&(u?!u(oe[0].toDate())&&!u(oe[1].toDate()):!0),ve=()=>{let oe=null;l!=null&&l.emptyValues&&(oe=l.emptyValues.valueOnClear.value);const fe=J_(M(f),{lang:M(i),step:ih,unit:qp,unlinkPanels:n.unlinkPanels});o.value=fe[0],r.value=fe[1],s("pick",oe)};function ke(oe,fe){if(n.unlinkPanels&&fe){const ie=(oe==null?void 0:oe.year())||0,re=fe.year();r.value=ie+ih>re?fe.add(ih,qp):fe}else r.value=o.value.add(ih,qp)}return Ee(()=>n.visible,oe=>{!oe&&b.value.selecting&&(P(n.parsedValue),E(!1))}),s("set-picker-option",["isValidValue",ae]),s("set-picker-option",["parseUserInput",Z]),s("set-picker-option",["handleClear",ve]),(oe,fe)=>(v(),A("div",{class:U(X.value)},[g("div",{class:U(M(_).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:U(M(_).e("sidebar"))}),q.value?(v(),A("div",{key:0,class:U(M(_).e("sidebar"))},[(v(!0),A(te,null,we(M(c),(ie,re)=>(v(),A("button",{key:re,type:"button",class:U(M(_).e("shortcut")),disabled:M(G),onClick:Se=>M(S)(ie)},$(ie.text),11,kme))),128))],2)):O("v-if",!0),g("div",{class:U(M(_).e("body"))},[g("div",{class:U(K.value.content)},[g("div",{class:U(M(x).e("header"))},[g("button",{type:"button",class:U(K.value.arrowLeftBtn),disabled:M(G),onClick:fe[0]||(fe[0]=(...ie)=>M(T)&&M(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,Cme),oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||M(G),class:U(K.value.arrowRightBtn),onClick:fe[1]||(fe[1]=(...ie)=>M(I)&&M(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,Sme)):O("v-if",!0),g("div",null,$(M(R)),1)],2),y(t1,{"selection-mode":"range",date:o.value,"min-date":M(p),"max-date":M(m),"range-state":M(b),"disabled-date":M(u),disabled:M(G),"cell-class-name":M(d),onChangerange:M(k),onPick:se,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:U(H.value.content)},[g("div",{class:U(M(x).e("header"))},[oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||M(G),class:U(H.value.arrowLeftBtn),onClick:fe[2]||(fe[2]=(...ie)=>M(V)&&M(V)(...ie))},[le(oe.$slots,"prev-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Rc))]),_:1})])],10,$me)):O("v-if",!0),g("button",{type:"button",class:U(H.value.arrowRightBtn),disabled:M(G),onClick:fe[3]||(fe[3]=(...ie)=>M(L)&&M(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[y(M(_e),null,{default:w(()=>[y(M(Vc))]),_:1})])],10,Ame),g("div",null,$(M(N)),1)],2),y(t1,{"selection-mode":"range",date:r.value,"min-date":M(p),"max-date":M(m),"range-state":M(b),"disabled-date":M(u),disabled:M(G),"cell-class-name":M(d),onChangerange:M(k),onPick:se,onSelect:M(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Mme=Eme;const Tme=function(t){switch(t){case"daterange":case"datetimerange":return cme;case"monthrange":return bme;case"yearrange":return Mme;default:return Wpe}};var EV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s){var i=s.prototype,o=i.format;i.format=function(r){var a=this,l=this.$locale();if(!this.isValid())return o.bind(this)(r);var c=this.$utils(),u=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return o.bind(this)(u)}}})})(EV);var Pme=EV.exports;const Ime=fi(Pme);var MV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){var n="week",s="year";return function(i,o,r){var a=o.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(s).add(1,s).date(c),d=r(this).endOf(n);if(u.isBefore(d))return 1}var h=r(this).startOf(s).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?r(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(MV);var Lme=MV.exports;const Ome=fi(Lme);var TV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s){s.prototype.weekYear=function(){var i=this.month(),o=this.week(),r=this.year();return o===1&&i===11?r+1:i===0&&o>=52?r-1:r}}})})(TV);var Dme=TV.exports;const Rme=fi(Dme);var PV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s,i){s.prototype.dayOfYear=function(o){var r=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"day")}}})})(PV);var Vme=PV.exports;const Fme=fi(Vme);var IV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s){s.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(IV);var Nme=IV.exports;const Bme=fi(Nme);var LV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(xs,function(){return function(n,s){s.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(LV);var zme=LV.exports;const Hme=fi(zme);function Ume(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}dt.extend(Uhe);dt.extend(Ime);dt.extend(KR);dt.extend(Ome);dt.extend(Rme);dt.extend(Fme);dt.extend(Bme);dt.extend(Hme);var jme=he({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:gpe,emits:[Rt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:s}){const i=Ne("picker-panel");bn(He($a,void 0))&&Et($a,{props:Dn({...po(t)})}),Et(l5,{slots:e,pickerNs:i});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=He(IR,()=>NR(t,n),!0);return()=>y(Tme(t.type),Kt(F_(s,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),Ume(e)?e:{default:()=>[e]})}});const Wme=Wt(jme),Yme=We({...FR,type:{type:de(String),default:"date"}});function qme(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}var Gme=he({name:"ElDatePicker",install:null,props:Yme,emits:[Rt],setup(t,{expose:e,emit:n,slots:s}){Et(U1,z(()=>!t.format)),Et(PR,Dn(Cn(t,"popperOptions")));const i=J();e({focus:()=>{var r;(r=i.value)==null||r.focus()},blur:()=>{var r;(r=i.value)==null||r.blur()},handleOpen:()=>{var r;(r=i.value)==null||r.handleOpen()},handleClose:()=>{var r;(r=i.value)==null||r.handleClose()}});const o=r=>{n(Rt,r)};return()=>{const r=t.format??(Nde[t.type]||uc);return y(Gde,Kt(t,{format:r,type:t.type,ref:i,"onUpdate:modelValue":o}),{default:a=>y(Wme,Kt({disabled:t.disabled,editable:t.editable,border:!1},a),qme(s)?s:{default:()=>[s]}),"range-separator":s["range-separator"]})}}});const Rd=Wt(Gme),OV=We({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:ds},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Xme={close:()=>!0},DV=We({...OV,appendToBody:Boolean,appendTo:{type:x4.to.type,default:"body"},beforeClose:{type:de(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:de([String,Object]),default:void 0}}),RV={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Rt]:t=>Kn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Kme=We({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:de([String,Array,Object])},zIndex:{type:de([String,Number])}}),Zme={click:t=>t instanceof MouseEvent},Jme="overlay";var Qme=he({name:"ElOverlay",props:Kme,emits:Zme,setup(t,{slots:e,emit:n}){const s=Ne(Jme),i=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=R4(t.customMaskEvent?void 0:i);return()=>t.mask?y("div",{class:[s.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:r,onMouseup:a},[le(e,"default")],xw.STYLE|xw.CLASS|xw.PROPS,["onClick","onMouseup","onMousedown"]):vt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(e,"default")])}});const p5=Qme,VV=Symbol("dialogInjectionKey"),Rw="dialog-fade",ege="ElDialog",FV=(t,e)=>{const n=ht().emit,{nextZIndex:s}=H_();let i="";const o=yr(),r=yr(),a=J(!1),l=J(!1),c=J(!1),u=J(t.zIndex??s()),d=J(!1);let h,f;const p=Gc(),m=z(()=>{var H;return((H=p.value)==null?void 0:H.namespace)??Km}),b=z(()=>{var H;return(H=p.value)==null?void 0:H.dialog}),_=z(()=>{const H={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(H[`${Q}-margin-top`]=t.top);const se=ui(t.width);se&&(H[`${Q}-width`]=se)}return H}),x=z(()=>{var H;return(t.draggable??((H=b.value)==null?void 0:H.draggable)??!1)&&!t.fullscreen}),k=z(()=>{var H;return t.alignCenter??((H=b.value)==null?void 0:H.alignCenter)??!1}),C=z(()=>{var H;return t.overflow??((H=b.value)==null?void 0:H.overflow)??!1}),S=z(()=>k.value?{display:"flex"}:{}),E=z(()=>{var se;const H=t.transition??((se=b.value)==null?void 0:se.transition)??Rw,Q={name:H,onAfterEnter:P,onBeforeLeave:L,onAfterLeave:T};if(yt(H)){const Z={...H},ae=(ve,ke)=>oe=>{Ae(ve)?ve.forEach(fe=>{Je(fe)&&fe(oe)}):Je(ve)&&ve(oe),ke()};return Z.onAfterEnter=ae(Z.onAfterEnter,P),Z.onBeforeLeave=ae(Z.onBeforeLeave,L),Z.onAfterLeave=ae(Z.onAfterLeave,T),Z.name||(Z.name=Rw,Pt(ege,`transition.name is missing when using object syntax, fallback to '${Rw}'`)),Z}return Q});function P(){n("opened")}function T(){n("closed"),n(Rt,!1),t.destroyOnClose&&(c.value=!1),d.value=!1}function L(){d.value=!0,n("close")}function I(){f==null||f(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=Ux(()=>F(),t.openDelay):F()}function V(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=Ux(()=>B(),t.closeDelay):B()}function R(){function H(Q){Q||(l.value=!0,a.value=!1)}t.beforeClose?t.beforeClose(H):V()}function N(){t.closeOnClickModal&&R()}function F(){qt&&(a.value=!0)}function B(){a.value=!1}function G(){n("openAutoFocus")}function q(){n("closeAutoFocus")}function X(H){var Q;((Q=H.detail)==null?void 0:Q.focusReason)==="pointer"&&H.preventDefault()}t.lockScroll&&A4(a);function K(){t.closeOnPressEscape&&R()}return Ee(()=>t.zIndex,()=>{u.value=t.zIndex??s()}),Ee(()=>t.modelValue,H=>{H?(l.value=!1,d.value=!1,I(),c.value=!0,u.value=t.zIndex??s(),st(()=>{n("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):a.value&&V()}),Ee(()=>t.fullscreen,H=>{e.value&&(H?(i=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=i)}),Vt(()=>{t.modelValue&&(a.value=!0,c.value=!0,I())}),{afterEnter:P,afterLeave:T,beforeLeave:L,handleClose:R,onModalClick:N,close:V,doClose:B,onOpenAutoFocus:G,onCloseAutoFocus:q,onCloseRequested:K,onFocusoutPrevented:X,titleId:o,bodyId:r,closed:l,style:_,overlayDialogStyle:S,rendered:c,visible:a,zIndex:u,transitionConfig:E,_draggable:x,_alignCenter:k,_overflow:C,closing:d}},m5=(...t)=>e=>{t.forEach(n=>{n.value=e})},tge=["aria-level"],nge=["aria-label"],sge=["id"];var ige=he({name:"ElDialogContent",__name:"dialog-content",props:OV,emits:Xme,setup(t,{expose:e}){const{t:n}=Xt(),{Close:s}=Hle,i=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=He(VV),{focusTrapRef:u}=He(yR),d=m5(u,o),h=z(()=>!!i.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=hD(o,r,h,z(()=>!!i.overflow)),b=z(()=>[l.b(),l.is("fullscreen",i.fullscreen),l.is("draggable",h.value),l.is("dragging",m.value),l.is("align-center",!!i.alignCenter),{[l.m("center")]:i.center}]);return e({resetPosition:f,updatePosition:p}),(_,x)=>(v(),A("div",{ref:M(d),class:U(b.value),style:qe(M(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:U([M(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[le(_.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:U(M(l).e("title"))},$(t.title),11,tge)]),t.showClose?(v(),A("button",{key:0,"aria-label":M(n)("el.dialog.close"),class:U(M(l).e("headerbtn")),type:"button",onClick:x[0]||(x[0]=k=>_.$emit("close"))},[y(M(_e),{class:U(M(l).e("close"))},{default:w(()=>[(v(),D(kt(t.closeIcon||M(s))))]),_:1},8,["class"])],10,nge)):O("v-if",!0)],2),g("div",{id:M(a),class:U([M(l).e("body"),t.bodyClass])},[le(_.$slots,"default")],10,sge),_.$slots.footer?(v(),A("footer",{key:0,class:U([M(l).e("footer"),t.footerClass])},[le(_.$slots,"footer")],2)):O("v-if",!0)],6))}}),oge=ige;const rge=["aria-label","aria-labelledby","aria-describedby"];var age=he({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:DV,emits:RV,setup(t,{expose:e}){const n=t,s=Gi();ul({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},z(()=>!!s.title));const i=Ne("dialog"),o=J(),r=J(),a=J(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,transitionConfig:p,zIndex:m,_draggable:b,_alignCenter:_,_overflow:x,handleClose:k,onModalClick:C,onOpenAutoFocus:S,onCloseAutoFocus:E,onCloseRequested:P,onFocusoutPrevented:T,closing:L}=FV(n,o);Et(VV,{dialogRef:o,headerRef:r,bodyId:u,ns:i,rendered:f,style:d});const I=R4(C),V=z(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var N;(N=a.value)==null||N.resetPosition()},handleClose:k}),(N,F)=>(v(),D(M(Y_),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[y(Vo,Kt(M(p),{persisted:""}),{default:w(()=>[Oe(y(M(p5),{"custom-mask-event":"",mask:t.modal,"overlay-class":[t.modalClass??"",`${M(i).namespace.value}-modal-dialog`,M(i).is("penetrable",V.value)],"z-index":M(m)},{default:w(()=>[g("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:M(c),"aria-describedby":M(u),class:U([`${M(i).namespace.value}-overlay-dialog`,M(i).is("closing",M(L))]),style:qe(M(h)),onClick:F[0]||(F[0]=(...B)=>M(I).onClick&&M(I).onClick(...B)),onMousedown:F[1]||(F[1]=(...B)=>M(I).onMousedown&&M(I).onMousedown(...B)),onMouseup:F[2]||(F[2]=(...B)=>M(I).onMouseup&&M(I).onMouseup(...B))},[y(M(N1),{loop:"",trapped:M(l),"focus-start-el":"container",onFocusAfterTrapped:M(S),onFocusAfterReleased:M(E),onFocusoutPrevented:M(T),onReleaseRequested:M(P)},{default:w(()=>[M(f)?(v(),D(oge,Kt({key:0,ref_key:"dialogContentRef",ref:a},N.$attrs,{center:t.center,"align-center":M(_),"close-icon":t.closeIcon,draggable:M(b),overflow:M(x),fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:M(k)}),ks({header:w(()=>[N.$slots.title?le(N.$slots,"title",{key:1}):le(N.$slots,"header",{key:0,close:M(k),titleId:M(c),titleClass:M(i).e("title")})]),default:w(()=>[le(N.$slots,"default")]),_:2},[N.$slots.footer?{name:"footer",fn:w(()=>[le(N.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):O("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,rge)]),_:3},8,["mask","overlay-class","z-index"]),[[jt,M(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),lge=age;const Fs=Wt(lge),cge=We({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:de(String),default:"solid"}});var uge=he({name:"ElDivider",__name:"divider",props:cge,setup(t){const e=t,n=Ne("divider"),s=z(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(v(),A("div",{class:U([M(n).b(),M(n).m(t.direction)]),style:qe(s.value),role:"separator"},[i.$slots.default&&t.direction!=="vertical"?(v(),A("div",{key:0,class:U([M(n).e("text"),M(n).is(t.contentPosition)])},[le(i.$slots,"default")],2)):O("v-if",!0)],6))}}),dge=uge;const NV=Wt(dge),hge=We({...DV,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),fge={...RV,"resize-start":(t,e)=>t instanceof MouseEvent&&typeof e=="number",resize:(t,e)=>t instanceof MouseEvent&&typeof e=="number","resize-end":(t,e)=>t instanceof MouseEvent&&typeof e=="number"};function pge(t,e,n){const{width:s,height:i}=xie(),o=z(()=>["ltr","rtl"].includes(t.direction)),r=z(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=z(()=>o.value?s.value:i.value),l=z(()=>oD(c.value+r.value*u.value,4,a.value)),c=J(0),u=J(0),d=J(!1),h=J(!1);let f=[],p=[];const m=()=>{var S;const C=(S=e.value)==null?void 0:S.closest('[aria-modal="true"]');return C?o.value?C.offsetWidth:C.offsetHeight:100};Ee(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,x()});const b=C=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[C.pageX,C.pageY],d.value=!0,n("resize-start",C,c.value),p.push(Bn(window,"mouseup",x),Bn(window,"mousemove",_)))},_=C=>{const{pageX:S,pageY:E}=C,P=S-f[0],T=E-f[1];u.value=o.value?P:T,n("resize",C,l.value)},x=C=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(S=>S==null?void 0:S()),p=[],C&&n("resize-end",C,c.value))},k=Bn(e,"mousedown",b);return _n(()=>{k(),x()}),{size:z(()=>h.value?`${l.value}px`:ui(t.size)),isResizing:d,isHorizontal:o}}const mge=["aria-label","aria-labelledby","aria-describedby"],gge=["id","aria-level"],vge=["aria-label"],yge=["id"];var bge=he({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:hge,emits:fge,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Gi();ul({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},z(()=>!!o.title));const r=J(),a=J(),l=J(),c=Ne("drawer"),{t:u}=Xt(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:b,bodyId:_,zIndex:x,onModalClick:k,onOpenAutoFocus:C,onCloseAutoFocus:S,onFocusoutPrevented:E,onCloseRequested:P,handleClose:T}=FV(s,r),{isHorizontal:L,size:I,isResizing:V}=pge(s,l,i),R=z(()=>s.modalPenetrable&&!s.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(N,F)=>(v(),D(M(Y_),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[y(Vo,{name:M(c).b("fade"),onAfterEnter:M(d),onAfterLeave:M(h),onBeforeLeave:M(f),persisted:""},{default:w(()=>[Oe(y(M(p5),{mask:t.modal,"overlay-class":[M(c).is("drawer"),t.modalClass??"",`${M(c).namespace.value}-modal-drawer`,M(c).is("penetrable",R.value)],"z-index":M(x),onClick:M(k)},{default:w(()=>[y(M(N1),{loop:"",trapped:M(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:M(C),onFocusAfterReleased:M(S),onFocusoutPrevented:M(E),onReleaseRequested:M(P)},{default:w(()=>[g("div",Kt({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:M(b),"aria-describedby":M(_)},N.$attrs,{class:[M(c).b(),t.direction,M(p)&&"open",M(c).is("dragging",M(V))],style:{[M(L)?"width":"height"]:M(I)},role:"dialog",onClick:F[1]||(F[1]=Be(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:U(M(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),A("header",{key:0,class:U([M(c).e("header"),t.headerClass])},[N.$slots.title?le(N.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(N.$slots,"header",{key:0,close:M(T),titleId:M(b),titleClass:M(c).e("title")},()=>[g("span",{id:M(b),role:"heading","aria-level":t.headerAriaLevel,class:U(M(c).e("title"))},$(t.title),11,gge)]),t.showClose?(v(),A("button",{key:2,"aria-label":M(u)("el.drawer.close"),class:U(M(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...B)=>M(T)&&M(T)(...B))},[y(M(_e),{class:U(M(c).e("close"))},{default:w(()=>[y(M(br))]),_:1},8,["class"])],10,vge)):O("v-if",!0)],2)):O("v-if",!0),M(m)?(v(),A("div",{key:1,id:M(_),class:U([M(c).e("body"),t.bodyClass])},[le(N.$slots,"default")],10,yge)):O("v-if",!0),N.$slots.footer?(v(),A("div",{key:2,class:U([M(c).e("footer"),t.footerClass])},[le(N.$slots,"footer")],2)):O("v-if",!0),t.resizable?(v(),A("div",{key:3,ref_key:"draggerRef",ref:l,style:qe({zIndex:M(x)}),class:U(M(c).e("dragger"))},null,6)):O("v-if",!0)],16,mge)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[jt,M(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),_ge=bge;const Al=Wt(_ge),V0=We({trigger:{...kc.trigger,type:de([String,Array])},triggerKeys:{type:de(Array),default:()=>[Ye.enter,Ye.numpadEnter,Ye.space,Ye.down]},virtualTriggering:kc.virtualTriggering,virtualRef:kc.virtualRef,effect:{...Nn.effect,default:"light"},type:{type:de(String)},placement:{type:de(String),default:"bottom"},popperOptions:{type:de(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:de([Number,String]),default:0},maxHeight:{type:de([Number,String]),default:""},popperClass:Nn.popperClass,popperStyle:Nn.popperStyle,disabled:Boolean,role:{type:String,values:lR,default:"menu"},buttonProps:{type:de(Object)},teleported:Nn.teleported,appendTo:Nn.appendTo,persistent:{type:Boolean,default:!0}}),BV=We({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ds}}),wge=We({onKeydown:{type:de(Function)}}),Q_=Symbol("elDropdown"),zV="elDropdown";var xge=he({inheritAttrs:!1});function kge(t,e,n,s,i,o){return le(t.$slots,"default")}var Cge=hi(xge,[["render",kge]]),Sge=he({name:"ElCollectionItem",inheritAttrs:!1});function $ge(t,e,n,s,i,o){return le(t.$slots,"default")}var Age=hi(Sge,[["render",$ge]]);const HV="data-el-collection-item",Ege=t=>{const e=`El${t}Collection`,n=`${e}Item`,s=Symbol(e),i=Symbol(n);return{COLLECTION_INJECTION_KEY:s,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:Object.assign({},Cge,{name:e,setup(){const o=J(),r=new Map;Et(s,{itemMap:r,getItems:()=>{const l=M(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${HV}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},Age,{name:n,setup(o,{attrs:r}){const a=J(),l=He(s,void 0);Et(i,{collectionItemRef:a}),Vt(()=>{const c=M(a);c&&l.itemMap.set(c,{ref:c,...r})}),_n(()=>{const c=M(a);l.itemMap.delete(c)})}})}},Mge=We({style:{type:de([String,Array,Object])},currentTabId:{type:de(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:de(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Tge,ElCollectionItem:Pge,COLLECTION_INJECTION_KEY:UV,COLLECTION_ITEM_INJECTION_KEY:Ige}=Ege("RovingFocusGroup"),g5=Symbol("elRovingFocusGroup"),jV=Symbol("elRovingFocusGroupItem"),Lge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Oge=(t,e)=>{if(e!=="rtl")return t;switch(t){case Ye.right:return Ye.left;case Ye.left:return Ye.right;default:return t}},Dge=(t,e,n)=>{const s=Oge(hs(t),n);if(!(e==="vertical"&&[Ye.left,Ye.right].includes(s))&&!(e==="horizontal"&&[Ye.up,Ye.down].includes(s)))return Lge[s]},Rge=(t,e)=>t.map((n,s)=>t[(s+e)%t.length]),fA=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},pA="currentTabIdChange",mA="rovingFocusGroup.entryFocus",Vge={bubbles:!1,cancelable:!0};var Fge=he({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Mge,emits:[pA,"entryFocus"],setup(t,{emit:e}){const n=J((t.currentTabId||t.defaultCurrentTabId)??null),s=J(!1),i=J(!1),o=J(),{getItems:r}=He(UV,void 0),a=z(()=>[{outline:"none"},t.style]),l=m=>{e(pA,m)},c=()=>{s.value=!0},u=As(m=>{var b;(b=t.onMousedown)==null||b.call(t,m)},()=>{i.value=!0}),d=As(m=>{var b;(b=t.onFocus)==null||b.call(t,m)},m=>{const b=!M(i),{target:_,currentTarget:x}=m;if(_===x&&b&&!M(s)){const k=new Event(mA,Vge);if(x==null||x.dispatchEvent(k),!k.defaultPrevented){const C=r().filter(S=>S.focusable);fA([C.find(S=>S.active),C.find(S=>S.id===M(n)),...C].filter(Boolean).map(S=>S.ref))}}i.value=!1}),h=As(m=>{var b;(b=t.onBlur)==null||b.call(t,m)},()=>{s.value=!1}),f=(...m)=>{e("entryFocus",...m)},p=m=>{const b=Dge(m);if(b){m.preventDefault();let _=r().filter(x=>x.focusable).map(x=>x.ref);switch(b){case"last":_.reverse();break;case"prev":case"next":{b==="prev"&&_.reverse();const x=_.indexOf(m.currentTarget);_=t.loop?Rge(_,x+1):_.slice(x+1);break}}st(()=>{fA(_)})}};Et(g5,{currentTabbedId:Pc(n),loop:Cn(t,"loop"),tabIndex:z(()=>M(s)?-1:0),rovingFocusGroupRef:o,rovingFocusGroupRootStyle:a,orientation:Cn(t,"orientation"),dir:Cn(t,"dir"),onItemFocus:l,onItemShiftTab:c,onBlur:h,onFocus:d,onMousedown:u,onKeydown:p}),Ee(()=>t.currentTabId,m=>{n.value=m??null}),Bn(o,mA,f)}});function Nge(t,e,n,s,i,o){return le(t.$slots,"default")}var Bge=hi(Fge,[["render",Nge]]),zge=he({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Tge,ElRovingFocusGroupImpl:Bge}});function Hge(t,e,n,s,i,o){const r=W("el-roving-focus-group-impl"),a=W("el-focus-group-collection");return v(),D(a,null,{default:w(()=>[y(r,Gh(Jh(t.$attrs)),{default:w(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var Uge=hi(zge,[["render",Hge]]),jge=he({components:{ElRovingFocusCollectionItem:Pge},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,onItemFocus:s,onItemShiftTab:i,onKeydown:o}=He(g5,void 0),r=yr(),a=J(),l=As(h=>{e("mousedown",h)},h=>{t.focusable?s(M(r)):h.preventDefault()}),c=As(h=>{e("focus",h)},()=>{s(M(r))}),u=As(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(hs(h)===Ye.tab&&f){i();return}p===m&&o(h)}),d=z(()=>n.value===M(r));return Et(jV,{rovingFocusGroupItemRef:a,tabIndex:z(()=>M(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function Wge(t,e,n,s,i,o){const r=W("el-roving-focus-collection-item");return v(),D(r,{id:t.id,focusable:t.focusable,active:t.active},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var Yge=hi(jge,[["render",Wge]]),qge=Uge;const{ButtonGroup:Gge}=Ge;var Xge=he({name:"ElDropdown",components:{ElButton:Ge,ElButtonGroup:Gge,ElScrollbar:Ei,ElTooltip:js,ElRovingFocusGroup:qge,ElOnlyChild:hR,ElIcon:_e,ArrowDown:Td},props:V0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=ht(),s=Ne("dropdown"),{t:i}=Xt(),o=J(),r=J(),a=J(),l=J(),c=J(null),u=J(null),d=J(!1),h=z(()=>({maxHeight:ui(t.maxHeight)})),f=z(()=>[s.m(C.value)]),p=z(()=>si(t.trigger)),m=yr().value,b=z(()=>t.id||m);function _(){var N;(N=a.value)==null||N.onClose(void 0,0)}function x(){var N;(N=a.value)==null||N.onClose()}function k(){var N;(N=a.value)==null||N.onOpen()}const C=ji();function S(...N){e("command",...N)}function E(){}function P(){const N=M(l);p.value.includes("hover")&&(N==null||N.focus({preventScroll:!0})),u.value=null}function T(N){u.value=N}function L(){e("visible-change",!0)}function I(N){var F;d.value=(N==null?void 0:N.type)==="keydown",(F=l.value)==null||F.focus()}function V(){e("visible-change",!1)}return Et(Q_,{contentRef:l,role:z(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:E,onItemLeave:P,handleClose:x}),Et(zV,{instance:n,dropdownSize:C,handleClick:_,commandHandler:S,trigger:Cn(t,"trigger"),hideOnClick:Cn(t,"hideOnClick")}),{t:i,ns:s,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:C,triggerId:b,currentTabId:u,handleCurrentTabIdChange:T,handlerMainButtonClick:N=>{e("click",N)},handleClose:x,handleOpen:k,handleBeforeShowTooltip:L,handleShowTooltip:I,handleBeforeHideTooltip:V,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function Kge(t,e,n,s,i,o){const r=W("el-roving-focus-group"),a=W("el-scrollbar"),l=W("el-only-child"),c=W("el-tooltip"),u=W("el-button"),d=W("arrow-down"),h=W("el-icon"),f=W("el-button-group");return v(),A("div",{class:U([t.ns.b(),t.ns.is("disabled",t.disabled)])},[y(c,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"popper-style":t.popperStyle,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-arrow":t.showArrow,"show-after":t.trigger==="hover"?t.showTimeout:0,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"virtual-ref":t.virtualRef??t.triggeringElementRef,"virtual-triggering":t.virtualTriggering||t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,"append-to":t.appendTo,pure:"","focus-on-target":"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},ks({content:w(()=>[y(a,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:w(()=>[y(r,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:w(()=>[le(t.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:w(()=>[y(l,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(v(),D(f,{key:0},{default:w(()=>[y(u,Kt({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:w(()=>[le(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),y(u,Kt({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:w(()=>[y(h,{class:U(t.ns.e("icon"))},{default:w(()=>[y(d)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var Zge=hi(Xge,[["render",Kge]]),Jge=he({name:"DropdownItemImpl",components:{ElIcon:_e},props:BV,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Ne("dropdown"),{role:s}=He(Q_,void 0),{collectionItemRef:i}=He(Ige,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=He(jV,void 0),u=m5(i,o),d=z(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),h=As(f=>{const p=hs(f);if([Ye.enter,Ye.numpadEnter,Ye.space].includes(p))return f.preventDefault(),f.stopImmediatePropagation(),e("clickimpl",f),!0},l);return{ns:n,itemRef:u,dataset:{[HV]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const Qge=["aria-disabled","tabindex","role"];function e1e(t,e,n,s,i,o){const r=W("el-icon");return v(),A(te,null,[t.divided?(v(),A("li",{key:0,role:"separator",class:U(t.ns.bem("menu","item","divided"))},null,2)):O("v-if",!0),g("li",Kt({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:e[0]||(e[0]=a=>t.$emit("clickimpl",a)),onFocus:e[1]||(e[1]=(...a)=>t.handleFocus&&t.handleFocus(...a)),onKeydown:e[2]||(e[2]=Be((...a)=>t.handleKeydown&&t.handleKeydown(...a),["self"])),onMousedown:e[3]||(e[3]=(...a)=>t.handleMousedown&&t.handleMousedown(...a)),onPointermove:e[4]||(e[4]=a=>t.$emit("pointermove",a)),onPointerleave:e[5]||(e[5]=a=>t.$emit("pointerleave",a))}),[t.icon||t.$slots.icon?(v(),D(r,{key:0},{default:w(()=>[le(t.$slots,"icon",{},()=>[(v(),D(kt(t.icon)))])]),_:3})):O("v-if",!0),le(t.$slots,"default")],16,Qge)],64)}var t1e=hi(Jge,[["render",e1e]]);const WV=()=>{const t=He(zV,{});return{elDropdown:t,_elDropdownSize:z(()=>t==null?void 0:t.dropdownSize)}};var n1e=he({name:"ElDropdownItem",components:{ElRovingFocusItem:Yge,ElDropdownItemImpl:t1e},inheritAttrs:!1,props:BV,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:s}=WV(),i=ht(),{onItemEnter:o,onItemLeave:r}=He(Q_,void 0),a=As(c=>(e("pointermove",c),c.defaultPrevented),l$(c=>{if(t.disabled){r(c);return}const u=c.currentTarget;u===document.activeElement||u.contains(document.activeElement)||(o(c),c.defaultPrevented||u==null||u.focus({preventScroll:!0}))})),l=As(c=>(e("pointerleave",c),c.defaultPrevented),l$(r));return{handleClick:As(c=>{if(!t.disabled)return e("click",c),c.type!=="keydown"&&c.defaultPrevented},c=>{var u,d,h;if(t.disabled){c.stopImmediatePropagation();return}(u=s==null?void 0:s.hideOnClick)!=null&&u.value&&((d=s.handleClick)==null||d.call(s)),(h=s.commandHandler)==null||h.call(s,t.command,i,c)}),handlePointerMove:a,handlePointerLeave:l,propsAndAttrs:z(()=>({...t,...n}))}}});function s1e(t,e,n,s,i,o){const r=W("el-dropdown-item-impl"),a=W("el-roving-focus-item");return v(),D(a,{focusable:!t.disabled},{default:w(()=>[y(r,Kt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),ks({default:w(()=>[le(t.$slots,"default")]),_:2},[t.$slots.icon?{name:"icon",fn:w(()=>[le(t.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var YV=hi(n1e,[["render",s1e]]),i1e=he({name:"ElDropdownMenu",props:wge,setup(t){const e=Ne("dropdown"),{_elDropdownSize:n}=WV(),s=n.value,{contentRef:i,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=He(Q_,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=He(g5,void 0),{collectionRef:m}=He(UV,void 0),b=z(()=>[e.b("menu"),e.bm("menu",s==null?void 0:s.value)]),_=m5(i,c,m),x=As(C=>{var S;(S=t.onKeydown)==null||S.call(t,C)},C=>{const{currentTarget:S,target:E}=C,P=hs(C);if(S.contains(E),Ye.tab===P)return l();f(C)});function k(C){a.value&&h(C)}return{size:s,rovingFocusGroupRootStyle:u,dropdownKls:b,role:o,triggerId:r,dropdownListWrapperRef:_,handleKeydown:x,onBlur:d,handleFocus:k,onMousedown:p}}});const o1e=["role","aria-labelledby"];function r1e(t,e,n,s,i,o){return v(),A("ul",{ref:t.dropdownListWrapperRef,class:U(t.dropdownKls),style:qe(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onFocusin:e[0]||(e[0]=(...r)=>t.handleFocus&&t.handleFocus(...r)),onFocusout:e[1]||(e[1]=(...r)=>t.onBlur&&t.onBlur(...r)),onKeydown:e[2]||(e[2]=Be((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Be((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,o1e)}var qV=hi(i1e,[["render",r1e]]);const La=Wt(Zge,{DropdownItem:YV,DropdownMenu:qV}),Oa=Ps(YV),Da=Ps(qV),a1e=We({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:de([String,Object])},previewSrcList:{type:de(Array),default:()=>ii([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:de(String)}}),l1e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>wt(t),close:()=>!0,show:()=>!0},c1e=We({urlList:{type:de(Array),default:()=>ii([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:de(String)}}),u1e={close:()=>!0,error:t=>t instanceof Event,switch:t=>wt(t),rotate:t=>wt(t)},d1e=["src","crossorigin"];var h1e=he({name:"ElImageViewer",__name:"image-viewer",props:c1e,emits:u1e,setup(t,{expose:e,emit:n}){const s={CONTAIN:{name:"contain",icon:Ai(eR)},ORIGINAL:{name:"original",icon:Ai(Sle)}},i=t,o=n;let r;const{t:a}=Xt(),l=Ne("image-viewer"),{nextZIndex:c}=H_(),u=J(),d=J(),h=d_(),f=z(()=>{const{scale:ie,minScale:re,maxScale:Se}=i;return oD(ie,re,Se)}),p=J(!0),m=J(!1),b=J(!1),_=J(i.initialIndex),x=Zn(s.CONTAIN),k=J({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),C=J(i.zIndex??c());A4(b,{ns:l});const S=z(()=>{const{urlList:ie}=i;return ie.length<=1}),E=z(()=>_.value===0),P=z(()=>_.value===i.urlList.length-1),T=z(()=>i.urlList[_.value]),L=z(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!i.infinite&&E.value)]),I=z(()=>[l.e("btn"),l.e("next"),l.is("disabled",!i.infinite&&P.value)]),V=z(()=>{const{scale:ie,deg:re,offsetX:Se,offsetY:je,enableTransition:ee}=k.value;let ne=Se/ie,pe=je/ie;const $e=re*Math.PI/180,Ce=Math.cos($e),Pe=Math.sin($e);ne=ne*Ce+pe*Pe,pe=pe*Ce-Se/ie*Pe;const Ue={transform:`scale(${ie}) rotate(${re}deg) translate(${ne}px, ${pe}px)`,transition:ee?"transform .3s":""};return x.value.name===s.CONTAIN.name&&(Ue.maxWidth=Ue.maxHeight="100%"),Ue}),R=z(()=>`${_.value+1} / ${i.urlList.length}`);function N(){B(),r==null||r(),b.value=!1,o("close")}function F(){const ie=Hv(Se=>{switch(hs(Se)){case Ye.esc:i.closeOnPressEscape&&N();break;case Ye.space:Q();break;case Ye.left:Z();break;case Ye.up:ve("zoomIn");break;case Ye.right:ae();break;case Ye.down:ve("zoomOut");break}}),re=Hv(Se=>{ve((Se.deltaY||Se.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});h.run(()=>{Bn(document,"keydown",ie),Bn(u,"wheel",re)})}function B(){h.stop()}function G(){p.value=!1}function q(ie){m.value=!0,p.value=!1,o("error",ie),ie.target.alt=a("el.image.error")}function X(ie){if(p.value||ie.button!==0||!u.value)return;k.value.enableTransition=!1;const{offsetX:re,offsetY:Se}=k.value,je=ie.pageX,ee=ie.pageY,ne=Hv(Ce=>{k.value={...k.value,offsetX:re+Ce.pageX-je,offsetY:Se+Ce.pageY-ee}}),pe=Bn(document,"mousemove",ne),$e=Bn(document,"mouseup",()=>{pe(),$e()});ie.preventDefault()}function K(ie){if(p.value||!u.value||ie.touches.length!==1)return;k.value.enableTransition=!1;const{offsetX:re,offsetY:Se}=k.value,{pageX:je,pageY:ee}=ie.touches[0],ne=Hv(Ce=>{const Pe=Ce.touches[0];k.value={...k.value,offsetX:re+Pe.pageX-je,offsetY:Se+Pe.pageY-ee}}),pe=Bn(document,"touchmove",ne),$e=Bn(document,"touchend",()=>{pe(),$e()});ie.preventDefault()}function H(){k.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=fb(s),re=Object.values(s),Se=x.value.name;x.value=s[ie[(re.findIndex(je=>je.name===Se)+1)%ie.length]],H()}function se(ie){m.value=!1;const re=i.urlList.length;_.value=(ie+re)%re}function Z(){E.value&&!i.infinite||se(_.value-1)}function ae(){P.value&&!i.infinite||se(_.value+1)}function ve(ie,re={}){if(p.value||m.value)return;const{minScale:Se,maxScale:je}=i,{zoomRate:ee,rotateDeg:ne,enableTransition:pe}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...re};switch(ie){case"zoomOut":k.value.scale>Se&&(k.value.scale=Number.parseFloat((k.value.scale/ee).toFixed(3)));break;case"zoomIn":k.value.scale<je&&(k.value.scale=Number.parseFloat((k.value.scale*ee).toFixed(3)));break;case"clockwise":k.value.deg+=ne,o("rotate",k.value.deg);break;case"anticlockwise":k.value.deg-=ne,o("rotate",k.value.deg);break}k.value.enableTransition=pe}function ke(ie){var re;((re=ie.detail)==null?void 0:re.focusReason)==="pointer"&&ie.preventDefault()}function oe(){i.closeOnPressEscape&&N()}function fe(ie){if(ie.ctrlKey){if(ie.deltaY<0)return ie.preventDefault(),!1;if(ie.deltaY>0)return ie.preventDefault(),!1}}return Ee(()=>f.value,ie=>{k.value.scale=ie}),Ee(T,()=>{st(()=>{var ie;(ie=d.value)!=null&&ie.complete||(p.value=!0)})}),Ee(_,ie=>{H(),o("switch",ie)}),Vt(()=>{b.value=!0,F(),r=Bn("wheel",fe,{passive:!1})}),e({setActiveItem:se}),(ie,re)=>(v(),D(M(Y_),{to:"body",disabled:!t.teleported},{default:w(()=>[y(Vo,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:U(M(l).e("wrapper")),style:qe({zIndex:C.value})},[y(M(N1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:ke,onReleaseRequested:oe},{default:w(()=>[g("div",{class:U(M(l).e("mask")),onClick:re[0]||(re[0]=Be(Se=>t.hideOnClickModal&&N(),["self"]))},null,2),O(" CLOSE "),g("span",{class:U([M(l).e("btn"),M(l).e("close")]),onClick:N},[y(M(_e),null,{default:w(()=>[y(M(br))]),_:1})],2),O(" ARROW "),S.value?O("v-if",!0):(v(),A(te,{key:0},[g("span",{class:U(L.value),onClick:Z},[y(M(_e),null,{default:w(()=>[y(M(dd))]),_:1})],2),g("span",{class:U(I.value),onClick:ae},[y(M(_e),null,{default:w(()=>[y(M(Rr))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),A("div",{key:1,class:U([M(l).e("btn"),M(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:_.value,total:t.urlList.length},()=>[Y($(R.value),1)])],2)):O("v-if",!0),O(" ACTIONS "),g("div",{class:U([M(l).e("btn"),M(l).e("actions")])},[g("div",{class:U(M(l).e("actions__inner"))},[le(ie.$slots,"toolbar",{actions:ve,prev:Z,next:ae,reset:Q,activeIndex:_.value,setActiveItem:se},()=>[y(M(_e),{onClick:re[1]||(re[1]=Se=>ve("zoomOut"))},{default:w(()=>[y(M(zle))]),_:1}),y(M(_e),{onClick:re[2]||(re[2]=Se=>ve("zoomIn"))},{default:w(()=>[y(M(oR))]),_:1}),g("i",{class:U(M(l).e("actions__divider"))},null,2),y(M(_e),{onClick:Q},{default:w(()=>[(v(),D(kt(x.value.icon)))]),_:1}),g("i",{class:U(M(l).e("actions__divider"))},null,2),y(M(_e),{onClick:re[3]||(re[3]=Se=>ve("anticlockwise"))},{default:w(()=>[y(M(sR))]),_:1}),y(M(_e),{onClick:re[4]||(re[4]=Se=>ve("clockwise"))},{default:w(()=>[y(M(kle))]),_:1})])],2)],2),O(" CANVAS "),g("div",{class:U(M(l).e("canvas"))},[m.value&&ie.$slots["viewer-error"]?le(ie.$slots,"viewer-error",{key:0,activeIndex:_.value,src:T.value}):(v(),A("img",{ref_key:"imgRef",ref:d,key:T.value,src:T.value,style:qe(V.value),class:U(M(l).e("img")),crossorigin:t.crossorigin,onLoad:G,onError:q,onMousedown:X,onTouchstart:K},null,46,d1e))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),f1e=h1e;const GV=Wt(f1e),p1e=["src","loading","crossorigin"],m1e={key:0};var g1e=he({name:"ElImage",inheritAttrs:!1,__name:"image",props:a1e,emits:l1e,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Xt(),r=Ne("image"),a=sp(),l=z(()=>Tf(Object.entries(a).filter(([q])=>/^(data-|on[A-Z])/i.test(q)||["id","style"].includes(q)))),c=k4({excludeListeners:!0,excludeKeys:z(()=>Object.keys(l.value))}),u=J(),d=J(!1),h=J(!0),f=J(!1),p=J(),m=J(),b=qt&&"loading"in HTMLImageElement.prototype;let _;const x=z(()=>[r.e("inner"),C.value&&r.e("preview"),h.value&&r.is("loading")]),k=z(()=>{const{fit:q}=s;return qt&&q?{objectFit:q}:{}}),C=z(()=>{const{previewSrcList:q}=s;return Ae(q)&&q.length>0}),S=z(()=>{const{previewSrcList:q,initialIndex:X}=s;let K=X;return X>q.length-1&&(K=0),K}),E=z(()=>s.loading==="eager"?!1:!b&&s.loading==="lazy"||s.lazy),P=()=>{qt&&(h.value=!0,d.value=!1,u.value=s.src)};function T(q){h.value=!1,d.value=!1,i("load",q)}function L(q){h.value=!1,d.value=!0,i("error",q)}function I(q){q&&(P(),N())}const V=hie(I,200,!0);async function R(){if(!qt)return;await st();const{scrollContainer:q}=s;if(Eo(q))m.value=q;else if(Ke(q)&&q!=="")m.value=document.querySelector(q)??void 0;else if(p.value){const K=Rie(p.value);m.value=Zse(K)?void 0:K}const{stop:X}=bie(p,([K])=>{V(K.isIntersecting)},{root:m});_=X}function N(){!qt||!V||(_==null||_(),m.value=void 0,_=void 0)}function F(){C.value&&(f.value=!0,i("show"))}function B(){f.value=!1,i("close")}function G(q){i("switch",q)}return Ee(()=>s.src,()=>{E.value?(h.value=!0,d.value=!1,N(),R()):P()}),Vt(()=>{E.value?R():P()}),e({showPreview:F}),(q,X)=>(v(),A("div",Kt({ref_key:"container",ref:p},l.value,{class:[M(r).b(),q.$attrs.class]}),[d.value?le(q.$slots,"error",{key:0},()=>[g("div",{class:U(M(r).e("error"))},$(M(o)("el.image.error")),3)]):(v(),A(te,{key:1},[u.value!==void 0?(v(),A("img",Kt({key:0},M(c),{src:u.value,loading:t.loading,style:k.value,class:x.value,crossorigin:t.crossorigin,onClick:F,onLoad:T,onError:L}),null,16,p1e)):O("v-if",!0),h.value?(v(),A("div",{key:1,class:U(M(r).e("wrapper"))},[le(q.$slots,"placeholder",{},()=>[g("div",{class:U(M(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),C.value?(v(),A(te,{key:2},[f.value?(v(),D(M(GV),{key:0,"z-index":t.zIndex,"initial-index":S.value,infinite:t.infinite,"zoom-rate":t.zoomRate,"min-scale":t.minScale,"max-scale":t.maxScale,"show-progress":t.showProgress,"url-list":t.previewSrcList,scale:t.scale,crossorigin:t.crossorigin,"hide-on-click-modal":t.hideOnClickModal,teleported:t.previewTeleported,"close-on-press-escape":t.closeOnPressEscape,onClose:B,onSwitch:G},ks({toolbar:w(K=>[le(q.$slots,"toolbar",Gh(Jh(K)))]),default:w(()=>[q.$slots.viewer?(v(),A("div",m1e,[le(q.$slots,"viewer")])):O("v-if",!0)]),_:2},[q.$slots.progress?{name:"progress",fn:w(K=>[le(q.$slots,"progress",Gh(Jh(K)))]),key:"0"}:void 0,q.$slots["viewer-error"]?{name:"viewer-error",fn:w(K=>[le(q.$slots,"viewer-error",Gh(Jh(K)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):O("v-if",!0)],64)):O("v-if",!0)],16))}}),v1e=g1e;const Ra=Wt(v1e),y1e=We({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:go,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:de([String,Number,null]),validator:t=>t===null||wt(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...wr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},align:{type:de(String),default:"center"},disabledScientific:Boolean}),b1e={[En]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[ya]:t=>wt(t)||li(t),[Rt]:t=>wt(t)||li(t)},_1e=["aria-label"],w1e=["aria-label"];var x1e=he({name:"ElInputNumber",__name:"input-number",props:y1e,emits:b1e,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Xt(),r=Ne("input-number"),a=J(),l=Dn({currentValue:s.modelValue,userInput:null}),{formItem:c}=No(),u=z(()=>wt(s.modelValue)&&s.modelValue<=s.min),d=z(()=>wt(s.modelValue)&&s.modelValue>=s.max),h=z(()=>{const q=x(s.step);return bn(s.precision)?Math.max(x(s.modelValue),q):(q>s.precision&&Pt("InputNumber","precision should not be less than the decimal places of step"),s.precision)}),f=z(()=>s.controls&&s.controlsPosition==="right"),p=ji(),m=Cs(),b=z(()=>{if(l.userInput!==null)return l.userInput;let q=l.currentValue;if(li(q))return"";if(wt(q)){if(Number.isNaN(q))return"";bn(s.precision)||(q=q.toFixed(s.precision))}return q}),_=(q,X)=>{if(bn(X)&&(X=h.value),X===0)return Math.round(q);let K=String(q);const H=K.indexOf(".");if(H===-1||!K.replace(".","").split("")[H+X])return q;const Q=K.length;return K.charAt(Q-1)==="5"&&(K=`${K.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(K).toFixed(X))},x=q=>{if(li(q))return 0;const X=q.toString(),K=X.indexOf(".");let H=0;return K!==-1&&(H=X.length-K-1),H},k=(q,X=1)=>wt(q)?q>=Number.MAX_SAFE_INTEGER&&X===1?(Pt("InputNumber","The value has reached the maximum safe integer limit."),q):q<=Number.MIN_SAFE_INTEGER&&X===-1?(Pt("InputNumber","The value has reached the minimum safe integer limit."),q):_(q+s.step*X):l.currentValue,C=q=>{const X=hs(q),K=mD(q);if(s.disabledScientific&&["e","E"].includes(K)){q.preventDefault();return}switch(X){case Ye.up:q.preventDefault(),S();break;case Ye.down:q.preventDefault(),E();break}},S=()=>{s.readonly||m.value||d.value||(T(k(Number(b.value)||0)),i(ya,l.currentValue),B())},E=()=>{s.readonly||m.value||u.value||(T(k(Number(b.value)||0,-1)),i(ya,l.currentValue),B())},P=(q,X)=>{const{max:K,min:H,step:Q,precision:se,stepStrictly:Z,valueOnClear:ae}=s;K<H&&mo("InputNumber","min should not be greater than max.");let ve=Number(q);if(li(q)||Number.isNaN(ve))return null;if(q===""){if(ae===null)return null;ve=Ke(ae)?{min:H,max:K}[ae]:ae}return Z&&(ve=_(Math.round(_(ve/Q))*Q,se),ve!==q&&X&&i(Rt,ve)),bn(se)||(ve=_(ve,se)),(ve>K||ve<H)&&(ve=ve>K?K:H,X&&i(Rt,ve)),ve},T=(q,X=!0)=>{var Q;const K=l.currentValue,H=P(q);if(!X){i(Rt,H);return}l.userInput=null,!(K===H&&q)&&(i(Rt,H),K!==H&&i(En,H,K),s.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(se=>Pt(se))),l.currentValue=H)},L=q=>{l.userInput=q;const X=q===""?null:Number(q);i(ya,X),T(X,!1)},I=q=>{const X=q!==""?Number(q):"";(wt(X)&&!Number.isNaN(X)||q==="")&&T(X),B(),l.userInput=null},V=()=>{var q,X;(X=(q=a.value)==null?void 0:q.focus)==null||X.call(q)},R=()=>{var q,X;(X=(q=a.value)==null?void 0:q.blur)==null||X.call(q)},N=q=>{i("focus",q)},F=q=>{var X,K;l.userInput=null,l.currentValue===null&&((X=a.value)!=null&&X.input)&&(a.value.input.value=""),i("blur",q),s.validateEvent&&((K=c==null?void 0:c.validate)==null||K.call(c,"blur").catch(H=>Pt(H)))},B=()=>{l.currentValue!==s.modelValue&&(l.currentValue=s.modelValue)},G=q=>{document.activeElement===q.target&&q.preventDefault()};return Ee(()=>s.modelValue,(q,X)=>{const K=P(q,!0);l.userInput===null&&K!==X&&(l.currentValue=K)},{immediate:!0}),Ee(()=>s.precision,()=>{l.currentValue=P(s.modelValue)}),Vt(()=>{var Q;const{min:q,max:X,modelValue:K}=s,H=(Q=a.value)==null?void 0:Q.input;if(H.setAttribute("role","spinbutton"),Number.isFinite(X)?H.setAttribute("aria-valuemax",String(X)):H.removeAttribute("aria-valuemax"),Number.isFinite(q)?H.setAttribute("aria-valuemin",String(q)):H.removeAttribute("aria-valuemin"),H.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),H.setAttribute("aria-disabled",String(m.value)),!wt(K)&&K!=null){let se=Number(K);Number.isNaN(se)&&(se=null),i(Rt,se)}H.addEventListener("wheel",G,{passive:!1})}),wl(()=>{var q,X;(X=(q=a.value)==null?void 0:q.input)==null||X.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:V,blur:R}),(q,X)=>(v(),A("div",{class:U([M(r).b(),M(r).m(M(p)),M(r).is("disabled",M(m)),M(r).is("without-controls",!t.controls),M(r).is("controls-right",f.value),M(r).is(t.align,!!t.align)]),onDragstart:X[0]||(X[0]=Be(()=>{},["prevent"]))},[t.controls?Oe((v(),A("span",{key:0,role:"button","aria-label":M(o)("el.inputNumber.decrease"),class:U([M(r).e("decrease"),M(r).is("disabled",u.value)]),onKeydown:Nt(E,["enter"])},[le(q.$slots,"decrease-icon",{},()=>[y(M(_e),null,{default:w(()=>[f.value?(v(),D(M(Td),{key:0})):(v(),D(M(nle),{key:1}))]),_:1})])],42,_1e)),[[M(bb),E]]):O("v-if",!0),t.controls?Oe((v(),A("span",{key:1,role:"button","aria-label":M(o)("el.inputNumber.increase"),class:U([M(r).e("increase"),M(r).is("disabled",d.value)]),onKeydown:Nt(S,["enter"])},[le(q.$slots,"increase-icon",{},()=>[y(M(_e),null,{default:w(()=>[f.value?(v(),D(M(q_),{key:0})):(v(),D(M(W4),{key:1}))]),_:1})])],42,w1e)),[[M(bb),S]]):O("v-if",!0),y(M(_t),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":b.value,placeholder:t.placeholder,readonly:t.readonly,disabled:M(m),size:M(p),max:t.max,min:t.min,name:t.name,"aria-label":t.ariaLabel,"validate-event":!1,inputmode:t.inputmode,onKeydown:C,onBlur:F,onFocus:N,onInput:L,onChange:I},ks({_:2},[q.$slots.prefix?{name:"prefix",fn:w(()=>[le(q.$slots,"prefix")]),key:"0"}:void 0,q.$slots.suffix?{name:"suffix",fn:w(()=>[le(q.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),k1e=x1e;const e2=Wt(k1e),C1e=We({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:ds}}),S1e={click:t=>t instanceof MouseEvent},$1e=["href","target"];var A1e=he({name:"ElLink",__name:"link",props:C1e,emits:S1e,setup(t,{emit:e}){const n=t,s=e,i=Gc("link");ul({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},z(()=>Kn(n.underline)));const o=Ne("link"),r=z(()=>{var c;return[o.b(),o.m(n.type??((c=i.value)==null?void 0:c.type)??"default"),o.is("disabled",n.disabled),o.is("underline",a.value==="always"),o.is("hover-underline",a.value==="hover"&&!n.disabled)]}),a=z(()=>{var c;return Kn(n.underline)?n.underline?"hover":"never":n.underline??((c=i.value)==null?void 0:c.underline)??"hover"});function l(c){n.disabled||s("click",c)}return(c,u)=>(v(),A("a",{class:U(r.value),href:t.disabled||!t.href?void 0:t.href,target:t.disabled||!t.href?void 0:t.target,onClick:l},[t.icon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.icon)))]),_:1})):O("v-if",!0),c.$slots.default?(v(),A("span",{key:1,class:U(M(o).e("inner"))},[le(c.$slots,"default")],2)):O("v-if",!0),c.$slots.icon?le(c.$slots,"icon",{key:2}):O("v-if",!0)],10,$1e))}}),E1e=A1e;const XV=Wt(E1e),KV=Symbol("elPaginationKey"),M1e=We({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ds}}),T1e={click:t=>t instanceof MouseEvent},P1e=["disabled","aria-label","aria-disabled"],I1e={key:0};var L1e=he({name:"ElPaginationPrev",__name:"prev",props:M1e,emits:T1e,setup(t){const e=t,{t:n}=Xt(),s=z(()=>e.disabled||e.currentPage<=1);return(i,o)=>(v(),A("button",{type:"button",class:"btn-prev",disabled:s.value,"aria-label":i.prevText||M(n)("el.pagination.prev"),"aria-disabled":s.value,onClick:o[0]||(o[0]=r=>i.$emit("click",r))},[i.prevText?(v(),A("span",I1e,$(i.prevText),1)):(v(),D(M(_e),{key:1},{default:w(()=>[(v(),D(kt(i.prevIcon)))]),_:1}))],8,P1e))}}),O1e=L1e;const D1e=We({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ds}}),R1e=["disabled","aria-label","aria-disabled"],V1e={key:0};var F1e=he({name:"ElPaginationNext",__name:"next",props:D1e,emits:["click"],setup(t){const e=t,{t:n}=Xt(),s=z(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(v(),A("button",{type:"button",class:"btn-next",disabled:s.value,"aria-label":i.nextText||M(n)("el.pagination.next"),"aria-disabled":s.value,onClick:o[0]||(o[0]=r=>i.$emit("click",r))},[i.nextText?(v(),A("span",V1e,$(i.nextText),1)):(v(),D(M(_e),{key:1},{default:w(()=>[(v(),D(kt(i.nextIcon)))]),_:1}))],8,R1e))}}),N1e=F1e;const v5=()=>He(KV,{}),B1e=We({pageSize:{type:Number,required:!0},pageSizes:{type:de(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:de([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:kl},appendSizeTo:String});var z1e=he({name:"ElPaginationSizes",__name:"sizes",props:B1e,emits:["page-size-change"],setup(t,{emit:e}){const n=t,s=e,{t:i}=Xt(),o=Ne("pagination"),r=v5(),a=J(n.pageSize);Ee(()=>n.pageSizes,(u,d)=>{zi(u,d)||Ae(u)&&s("page-size-change",u.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),Ee(()=>n.pageSize,u=>{a.value=u});const l=z(()=>n.pageSizes);function c(u){var d;u!==a.value&&(a.value=u,(d=r.handleSizeChange)==null||d.call(r,Number(u)))}return(u,d)=>(v(),A("span",{class:U(M(o).e("sizes"))},[y(M(Qt),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,"popper-style":u.popperStyle,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:c},{default:w(()=>[(v(!0),A(te,null,we(l.value,h=>(v(),D(M(ln),{key:h,value:h,label:h+M(i)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}}),H1e=z1e;const U1e=We({size:{type:String,values:kl}}),j1e=["disabled"];var W1e=he({name:"ElPaginationJumper",__name:"jumper",props:U1e,setup(t){const{t:e}=Xt(),n=Ne("pagination"),{pageCount:s,disabled:i,currentPage:o,changeEvent:r}=v5(),a=J(),l=z(()=>a.value??(o==null?void 0:o.value));function c(d){a.value=d?+d:""}function u(d){d=Math.trunc(+d),r==null||r(d),a.value=void 0}return(d,h)=>(v(),A("span",{class:U(M(n).e("jump")),disabled:M(i)},[g("span",{class:U([M(n).e("goto")])},$(M(e)("el.pagination.goto")),3),y(M(_t),{size:d.size,class:U([M(n).e("editor"),M(n).is("in-pagination")]),min:1,max:M(s),disabled:M(i),"model-value":l.value,"validate-event":!1,"aria-label":M(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),g("span",{class:U([M(n).e("classifier")])},$(M(e)("el.pagination.pageClassifier")),3)],10,j1e))}}),Y1e=W1e;const q1e=We({total:{type:Number,default:1e3}}),G1e=["disabled"];var X1e=he({name:"ElPaginationTotal",__name:"total",props:q1e,setup(t){const{t:e}=Xt(),n=Ne("pagination"),{disabled:s}=v5();return(i,o)=>(v(),A("span",{class:U(M(n).e("total")),disabled:M(s)},$(M(e)("el.pagination.total",{total:i.total})),11,G1e))}}),K1e=X1e;const Z1e=We({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),J1e=["aria-current","aria-label","tabindex"],Q1e=["tabindex","aria-label"],eve=["aria-current","aria-label","tabindex"],tve=["tabindex","aria-label"],nve=["aria-current","aria-label","tabindex"];var sve=he({name:"ElPaginationPager",__name:"pager",props:Z1e,emits:[En],setup(t,{emit:e}){const n=t,s=e,i=Ne("pager"),o=Ne("icon"),{t:r}=Xt(),a=J(!1),l=J(!1),c=J(!1),u=J(!1),d=J(!1),h=J(!1),f=z(()=>{const S=n.pagerCount,E=(S-1)/2,P=Number(n.currentPage),T=Number(n.pageCount);let L=!1,I=!1;T>S&&(P>S-E&&(L=!0),P<T-E&&(I=!0));const V=[];if(L&&!I){const R=T-(S-2);for(let N=R;N<T;N++)V.push(N)}else if(!L&&I)for(let R=2;R<S;R++)V.push(R);else if(L&&I){const R=Math.floor(S/2)-1;for(let N=P-R;N<=P+R;N++)V.push(N)}else for(let R=2;R<T;R++)V.push(R);return V}),p=z(()=>["more","btn-quickprev",o.b(),i.is("disabled",n.disabled)]),m=z(()=>["more","btn-quicknext",o.b(),i.is("disabled",n.disabled)]),b=z(()=>n.disabled?-1:0);Ee(()=>[n.pageCount,n.pagerCount,n.currentPage],([S,E,P])=>{const T=(E-1)/2;let L=!1,I=!1;S>E&&(L=P>E-T,I=P<S-T),c.value&&(c.value=L),u.value&&(u.value=I),a.value=L,l.value=I},{immediate:!0});function _(S=!1){n.disabled||(S?c.value=!0:u.value=!0)}function x(S=!1){S?d.value=!0:h.value=!0}function k(S){const E=S.target;if(E.tagName.toLowerCase()==="li"&&Array.from(E.classList).includes("number")){const P=Number(E.textContent);P!==n.currentPage&&s(En,P)}else E.tagName.toLowerCase()==="li"&&Array.from(E.classList).includes("more")&&C(S)}function C(S){const E=S.target;if(E.tagName.toLowerCase()==="ul"||n.disabled)return;let P=Number(E.textContent);const T=n.pageCount,L=n.currentPage,I=n.pagerCount-2;E.className.includes("more")&&(E.className.includes("quickprev")?P=L-I:E.className.includes("quicknext")&&(P=L+I)),Number.isNaN(+P)||(P<1&&(P=1),P>T&&(P=T)),P!==L&&s(En,P)}return(S,E)=>(v(),A("ul",{class:U(M(i).b()),onClick:C,onKeyup:Nt(k,["enter"])},[S.pageCount>0?(v(),A("li",{key:0,class:U([[M(i).is("active",S.currentPage===1),M(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":M(r)("el.pagination.currentPage",{pager:1}),tabindex:b.value}," 1 ",10,J1e)):O("v-if",!0),a.value?(v(),A("li",{key:1,class:U(p.value),tabindex:b.value,"aria-label":M(r)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:E[0]||(E[0]=P=>_(!0)),onMouseleave:E[1]||(E[1]=P=>c.value=!1),onFocus:E[2]||(E[2]=P=>x(!0)),onBlur:E[3]||(E[3]=P=>d.value=!1)},[(c.value||d.value)&&!S.disabled?(v(),D(M(Rc),{key:0})):(v(),D(M(Jx),{key:1}))],42,Q1e)):O("v-if",!0),(v(!0),A(te,null,we(f.value,P=>(v(),A("li",{key:P,class:U([[M(i).is("active",S.currentPage===P),M(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===P,"aria-label":M(r)("el.pagination.currentPage",{pager:P}),tabindex:b.value},$(P),11,eve))),128)),l.value?(v(),A("li",{key:2,class:U(m.value),tabindex:b.value,"aria-label":M(r)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:E[4]||(E[4]=P=>_()),onMouseleave:E[5]||(E[5]=P=>u.value=!1),onFocus:E[6]||(E[6]=P=>x()),onBlur:E[7]||(E[7]=P=>h.value=!1)},[(u.value||h.value)&&!S.disabled?(v(),D(M(Vc),{key:0})):(v(),D(M(Jx),{key:1}))],42,tve)):O("v-if",!0),S.pageCount>1?(v(),A("li",{key:3,class:U([[M(i).is("active",S.currentPage===S.pageCount),M(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":M(r)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:b.value},$(S.pageCount),11,nve)):O("v-if",!0)],34))}}),ive=sve;const Pi=t=>typeof t!="number",ove=We({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>wt(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:de(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ds,default:()=>dd},nextText:{type:String,default:""},nextIcon:{type:ds,default:()=>Rr},teleported:{type:Boolean,default:!0},small:Boolean,size:go,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),rve={"update:current-page":t=>wt(t),"update:page-size":t=>wt(t),"size-change":t=>wt(t),change:(t,e)=>wt(t)&&wt(e),"current-change":t=>wt(t),"prev-click":t=>wt(t),"next-click":t=>wt(t)},gA="ElPagination";var ave=he({name:gA,props:ove,emits:rve,setup(t,{emit:e,slots:n}){const{t:s}=Xt(),i=Ne("pagination"),o=ht().vnode.props||{},r=jD(),a=z(()=>t.small?"small":t.size??r.value);ul({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},z(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,c="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,u=z(()=>{if(Pi(t.total)&&Pi(t.pageCount)||!Pi(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Pi(t.pageCount)){if(!Pi(t.total)&&!Pi(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=J(Pi(t.defaultPageSize)?10:t.defaultPageSize),h=J(Pi(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=z({get(){return Pi(t.pageSize)?d.value:t.pageSize},set(S){Pi(t.pageSize)&&(d.value=S),c&&(e("update:page-size",S),e("size-change",S))}}),p=z(()=>{let S=0;return Pi(t.pageCount)?Pi(t.total)||(S=Math.max(1,Math.ceil(t.total/f.value))):S=t.pageCount,S}),m=z({get(){return Pi(t.currentPage)?h.value:t.currentPage},set(S){let E=S;S<1?E=1:S>p.value&&(E=p.value),Pi(t.currentPage)&&(h.value=E),l&&(e("update:current-page",E),e("current-change",E))}});Ee(p,S=>{m.value>S&&(m.value=S)}),Ee([m,f],S=>{e(En,...S)},{flush:"post"});function b(S){m.value=S}function _(S){f.value=S;const E=p.value;m.value>E&&(m.value=E)}function x(){t.disabled||(m.value-=1,e("prev-click",m.value))}function k(){t.disabled||(m.value+=1,e("next-click",m.value))}function C(S,E){S&&(S.props||(S.props={}),S.props.class=[S.props.class,E].join(" "))}return Et(KV,{pageCount:p,disabled:z(()=>t.disabled),currentPage:m,changeEvent:b,handleSizeChange:_}),()=>{var V;if(!u.value)return Pt(gA,s("el.pagination.deprecationWarning")),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const S=[],E=[],P=vt("div",{class:i.e("rightwrapper")},E),T={prev:vt(O1e,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:x}),jumper:vt(Y1e,{size:a.value}),pager:vt(ive,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:b,disabled:t.disabled}),next:vt(N1e,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:k}),sizes:vt(H1e,{pageSize:f.value,pageSizes:t.pageSizes,popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:t.disabled,teleported:t.teleported,size:a.value,appendSizeTo:t.appendSizeTo}),slot:((V=n==null?void 0:n.default)==null?void 0:V.call(n))??null,total:vt(K1e,{total:Pi(t.total)?0:t.total})},L=t.layout.split(",").map(R=>R.trim());let I=!1;return L.forEach(R=>{if(R==="->"){I=!0;return}I?E.push(T[R]):S.push(T[R])}),C(S[0],i.is("first")),C(S[S.length-1],i.is("last")),I&&E.length>0&&(C(E[0],i.is("first")),C(E[E.length-1],i.is("last")),S.push(P)),vt("div",{class:[i.b(),i.is("background",t.background),i.m(a.value)]},S)}}});const lve=Wt(ave),cve=We({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:de(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:de([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:de(Function),default:t=>`${t}%`}}),uve=["aria-valuenow"],dve={viewBox:"0 0 100 100"},hve=["d","stroke","stroke-linecap","stroke-width"],fve=["d","stroke","opacity","stroke-linecap","stroke-width"],pve={key:0};var mve=he({name:"ElProgress",__name:"progress",props:cve,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,s=Ne("progress"),i=z(()=>{const k={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},C=x(n.percentage);return C.includes("gradient")?k.background=C:k.backgroundColor=C,k}),o=z(()=>(n.strokeWidth/n.width*100).toFixed(1)),r=z(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=z(()=>{const k=r.value,C=n.type==="dashboard";return`
73 M 50 50
74 m 0 ${C?"":"-"}${k}
75 a ${k} ${k} 0 1 1 0 ${C?"-":""}${k*2}
76 a ${k} ${k} 0 1 1 0 ${C?"":"-"}${k*2}
77 `}),l=z(()=>2*Math.PI*r.value),c=z(()=>n.type==="dashboard"?.75:1),u=z(()=>`${-1*l.value*(1-c.value)/2}px`),d=z(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=z(()=>({strokeDasharray:`${l.value*c.value*(n.percentage/100)}px, ${l.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),f=z(()=>{let k;return n.color?k=x(n.percentage):k=e[n.status]||e.default,k}),p=z(()=>n.status==="warning"?G4:n.type==="line"?n.status==="success"?U4:Pd:n.status==="success"?H4:br),m=z(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),b=z(()=>n.format(n.percentage));function _(k){const C=100/k.length;return k.map((S,E)=>Ke(S)?{color:S,percentage:(E+1)*C}:S).sort((S,E)=>S.percentage-E.percentage)}const x=k=>{var S;const{color:C}=n;if(Je(C))return C(k);if(Ke(C))return C;{const E=_(C);for(const P of E)if(P.percentage>k)return P.color;return(S=E[E.length-1])==null?void 0:S.color}};return(k,C)=>(v(),A("div",{class:U([M(s).b(),M(s).m(t.type),M(s).is(t.status),{[M(s).m("without-text")]:!t.showText,[M(s).m("text-inside")]:t.textInside}]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(v(),A("div",{key:0,class:U(M(s).b("bar"))},[g("div",{class:U(M(s).be("bar","outer")),style:qe({height:`${t.strokeWidth}px`})},[g("div",{class:U([M(s).be("bar","inner"),{[M(s).bem("bar","inner","indeterminate")]:t.indeterminate},{[M(s).bem("bar","inner","striped")]:t.striped},{[M(s).bem("bar","inner","striped-flow")]:t.stripedFlow}]),style:qe(i.value)},[(t.showText||k.$slots.default)&&t.textInside?(v(),A("div",{key:0,class:U(M(s).be("bar","innerText"))},[le(k.$slots,"default",{percentage:t.percentage},()=>[g("span",null,$(b.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),A("div",{key:1,class:U(M(s).b("circle")),style:qe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),A("svg",dve,[g("path",{class:U(M(s).be("circle","track")),d:a.value,stroke:`var(${M(s).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,fill:"none",style:qe(d.value)},null,14,hve),g("path",{class:U(M(s).be("circle","path")),d:a.value,stroke:f.value,fill:"none",opacity:t.percentage?1:0,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,style:qe(h.value)},null,14,fve)]))],6)),(t.showText||k.$slots.default)&&!t.textInside?(v(),A("div",{key:2,class:U(M(s).e("text")),style:qe({fontSize:`${m.value}px`})},[le(k.$slots,"default",{percentage:t.percentage},()=>[t.status?(v(),D(M(_e),{key:1},{default:w(()=>[(v(),D(kt(p.value)))]),_:1})):(v(),A("span",pve,$(b.value),1))])],6)):O("v-if",!0)],10,uve))}}),gve=mve;const t2=Wt(gve),vve="horizontal",yve=({atEndEdge:t,atStartEdge:e,layout:n},s)=>{let i,o=0;const r=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:r,onWheel:l=>{Oie(i);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===vve?c:u;r(d)||(o+=d,!S4()&&d!==0&&l.preventDefault(),i=jg(()=>{s(o),o=0}))}}},bve=We({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:de([Number,Object])}}),_ve=We({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var wve=he({name:"ElSkeletonItem",__name:"skeleton-item",props:_ve,setup(t){const e=Ne("skeleton");return(n,s)=>(v(),A("div",{class:U([M(e).e("item"),M(e).e(t.variant)])},[t.variant==="image"?(v(),D(M(fle),{key:0})):O("v-if",!0)],2))}}),Cb=wve,xve=he({name:"ElSkeleton",__name:"skeleton",props:bve,setup(t,{expose:e}){const n=t,s=Ne("skeleton"),i=Woe(Cn(n,"loading"),n.throttle);return e({uiLoading:i}),(o,r)=>M(i)?(v(),A("div",Kt({key:0,class:[M(s).b(),M(s).is("animated",t.animated)]},o.$attrs),[(v(!0),A(te,null,we(t.count,a=>(v(),A(te,{key:a},[M(i)?le(o.$slots,"template",{key:a},()=>[y(Cb,{class:U(M(s).is("first")),variant:"p"},null,8,["class"]),(v(!0),A(te,null,we(t.rows,l=>(v(),D(Cb,{key:l,class:U([M(s).e("paragraph"),M(s).is("last",l===t.rows&&t.rows>1)]),variant:"p"},null,8,["class"]))),128))]):O("v-if",!0)],64))),128))],16)):le(o.$slots,"default",Gh(Kt({key:1},o.$attrs)))}}),kve=xve;const Jt=Wt(kve,{SkeletonItem:Cb});Ps(Cb);const ZV=t=>["",...kl].includes(t),Cve=We({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:ZV},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:ds},activeActionIcon:{type:ds},activeIcon:{type:ds},inactiveIcon:{type:ds},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:de(Function)},id:String,tabindex:{type:[String,Number]},...wr(["ariaLabel"])}),Sve={[Rt]:t=>Kn(t)||Ke(t)||wt(t),[En]:t=>Kn(t)||Ke(t)||wt(t),[ya]:t=>Kn(t)||Ke(t)||wt(t)},$ve=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Ave=["aria-hidden"],Eve={key:1},Mve={key:1},Tve=["aria-hidden"],Vw="ElSwitch";var Pve=he({name:Vw,__name:"switch",props:Cve,emits:Sve,setup(t,{expose:e,emit:n}){const s=t,i=n,{formItem:o}=No(),r=ji(),a=Ne("switch"),{inputId:l}=qc(s,{formItemContext:o}),c=Cs(z(()=>{if(s.loading)return!0})),u=J(s.modelValue!==!1),d=Zn(),h=z(()=>[a.b(),a.m(r.value),a.is("disabled",c.value),a.is("checked",_.value)]),f=z(()=>[a.e("label"),a.em("label","left"),a.is("active",!_.value)]),p=z(()=>[a.e("label"),a.em("label","right"),a.is("active",_.value)]),m=z(()=>({width:ui(s.width)}));Ee(()=>s.modelValue,()=>{u.value=!0});const b=z(()=>u.value?s.modelValue:!1),_=z(()=>b.value===s.activeValue);[s.activeValue,s.inactiveValue].includes(b.value)||(i(Rt,s.inactiveValue),i(En,s.inactiveValue),i(ya,s.inactiveValue)),Ee(_,S=>{var E;d.value.checked=S,s.validateEvent&&((E=o==null?void 0:o.validate)==null||E.call(o,"change").catch(P=>Pt(P)))});const x=()=>{const S=_.value?s.inactiveValue:s.activeValue;i(Rt,S),i(En,S),i(ya,S),st(()=>{d.value.checked=_.value})},k=()=>{if(c.value)return;const{beforeChange:S}=s;if(!S){x();return}const E=S();[sd(E),Kn(E)].includes(!0)||mo(Vw,"beforeChange must return type `Promise<boolean>` or `boolean`"),sd(E)?E.then(P=>{P&&x()}).catch(P=>{Pt(Vw,`some error occurred: ${P}`)}):E&&x()},C=()=>{var S,E;(E=(S=d.value)==null?void 0:S.focus)==null||E.call(S)};return Vt(()=>{d.value.checked=_.value}),e({focus:C,checked:_}),(S,E)=>(v(),A("div",{class:U(h.value),onClick:Be(k,["prevent"])},[g("input",{id:M(l),ref_key:"input",ref:d,class:U(M(a).e("input")),type:"checkbox",role:"switch","aria-checked":_.value,"aria-disabled":M(c),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:M(c),tabindex:t.tabindex,onChange:x,onKeydown:Nt(k,["enter"])},null,42,$ve),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||S.$slots.inactive)?(v(),A("span",{key:0,class:U(f.value)},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",{key:1,"aria-hidden":_.value},$(t.inactiveText),9,Ave)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:U(M(a).e("core")),style:qe(m.value)},[t.inlinePrompt?(v(),A("div",{key:0,class:U(M(a).e("inner"))},[_.value?(v(),A("div",{key:1,class:U(M(a).e("inner-wrapper"))},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",Mve,$(t.activeText),1)):O("v-if",!0)])],2)):(v(),A("div",{key:0,class:U(M(a).e("inner-wrapper"))},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",Eve,$(t.inactiveText),1)):O("v-if",!0)])],2))],2)):O("v-if",!0),g("div",{class:U(M(a).e("action"))},[t.loading?(v(),D(M(_e),{key:0,class:U(M(a).is("loading"))},{default:w(()=>[y(M(Ff))]),_:1},8,["class"])):_.value?le(S.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.activeActionIcon)))]),_:1})):O("v-if",!0)]):_.value?O("v-if",!0):le(S.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||S.$slots.active)?(v(),A("span",{key:1,class:U(p.value)},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(M(_e),{key:0},{default:w(()=>[(v(),D(kt(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",{key:1,"aria-hidden":!_.value},$(t.activeText),9,Tve)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),Ive=Pve;const Vd=Wt(Ive),Fw=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Lve=function(t,e,n,s,i){if(!e&&!s&&(!i||Ae(i)&&!i.length))return t;Ke(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=s?null:function(a,l){return i?JO(si(i),c=>Ke(c)?Bi(a,c):c(a,l,t)):(e!=="$key"&&yt(a)&&"$value"in a&&(a=a.$value),[yt(a)?e?Bi(a,e):null:a])},r=function(a,l){var c,u,d,h,f;if(s)return s(a.value,l.value);for(let p=0,m=((c=a.key)==null?void 0:c.length)??0;p<m;p++){if(((u=a.key)==null?void 0:u[p])<((d=l.key)==null?void 0:d[p]))return-1;if(((h=a.key)==null?void 0:h[p])>((f=l.key)==null?void 0:f[p]))return 1}return 0};return t.map((a,l)=>({value:a,index:l,key:o?o(a,l):null})).sort((a,l)=>{let c=r(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},JV=function(t,e){let n=null;return t.columns.forEach(s=>{s.id===e&&(n=s)}),n},Ove=function(t,e){let n=null;for(let s=0;s<t.columns.length;s++){const i=t.columns[s];if(i.columnKey===e){n=i;break}}return n||mo("ElTable",`No column matching with column-key: ${e}`),n},vA=function(t,e,n){const s=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return s?JV(t,s[0]):null},oi=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(Ke(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let s=t;for(const i of n)s=s[i];return`${s}`}else if(Je(e))return e.call(null,t);return""},tf=function(t,e,n=!1,s="children"){const i=t||[],o={};return i.forEach((r,a)=>{if(o[oi(r,e)]={row:r,index:a},n){const l=r[s];Ae(l)&&Object.assign(o,tf(l,e,!0,s))}}),o};function Dve(t,e){const n={};let s;for(s in t)n[s]=t[s];for(s in e)if(Ft(e,s)){const i=e[s];bn(i)||(n[s]=i)}return n}function y5(t){return t===""||bn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function QV(t){return t===""||bn(t)||(t=y5(t),Number.isNaN(t)&&(t=80)),t}function Rve(t){return wt(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function Vve(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...s)=>e(n(...s)))}function Sb(t,e,n,s,i,o,r){let a=o??0,l=!1;const u=(()=>{if(!r)return t.indexOf(e);const m=oi(e,r);return t.findIndex(b=>oi(b,r)===m)})(),d=u!==-1,h=i==null?void 0:i.call(null,e,a),f=m=>{m==="add"?t.push(e):t.splice(u,1),l=!0},p=m=>{let b=0;const _=(s==null?void 0:s.children)&&m[s.children];return _&&Ae(_)&&(b+=_.length,_.forEach(x=>{b+=p(x)})),b};return(!i||h)&&(Kn(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!(s!=null&&s.checkStrictly)&&(s!=null&&s.children)&&Ae(e[s.children])&&e[s.children].forEach(m=>{const b=Sb(t,m,n??!d,s,i,a+1,r);a+=p(m)+1,b&&(l=b)}),l}function Fve(t,e,n="children",s="hasChildren",i=!1){const o=a=>!(Ae(a)&&a.length);function r(a,l,c){e(a,l,c),l.forEach(u=>{if(u[s]&&i){e(u,null,c+1);return}const d=u[n];o(d)||r(u,d,c+1)})}t.forEach(a=>{if(a[s]&&i){e(a,null,0);return}const l=a[n];o(l)||r(a,l,0)})}const Nve=(t,e,n,s)=>{const i={strategy:"fixed",...t.popperOptions},o=Je(s==null?void 0:s.tooltipFormatter)?s.tooltipFormatter({row:n,column:s,cellValue:xc(n,s.property).value}):void 0;return is(o)?{slotContent:o,content:null,...t,popperOptions:i}:{slotContent:null,content:o??e,...t,popperOptions:i}};let Rn=null;function Bve(t,e,n,s,i,o){var f;const r=Nve(t,e,n,s),a={...r,slotContent:void 0};if((Rn==null?void 0:Rn.trigger)===i){const p=(f=Rn.vm)==null?void 0:f.component;QO(p==null?void 0:p.props,a),p&&r.slotContent&&(p.slots.content=()=>[r.slotContent]);return}Rn==null||Rn();const l=o==null?void 0:o.refs.tableWrapper,c=l==null?void 0:l.dataset.prefix,u=y(js,{virtualTriggering:!0,virtualRef:i,appendTo:l,placement:"top",transition:"none",offset:0,hideAfter:0,...a},r.slotContent?{content:()=>r.slotContent}:void 0);u.appContext={...o.appContext,...o};const d=document.createElement("div");Lc(u,d),u.component.exposed.onOpen();const h=l==null?void 0:l.querySelector(`.${c}-scrollbar__wrap`);Rn=()=>{var m,b;(b=(m=u.component)==null?void 0:m.exposed)!=null&&b.onClose&&u.component.exposed.onClose(),Lc(null,d);const p=Rn;h==null||h.removeEventListener("scroll",p),p.trigger=void 0,p.vm=void 0,Rn=null},Rn.trigger=i??void 0,Rn.vm=u,h==null||h.addEventListener("scroll",Rn)}function eF(t){return t.children?JO(t.children,eF):[t]}function yA(t,e){return t+e.colSpan}const tF=(t,e,n,s)=>{let i=0,o=t;const r=n.states.columns.value;if(s){const l=eF(s[t]);i=r.slice(0,r.indexOf(l[0])).reduce(yA,0),o=i+l.reduce(yA,0)-1}else i=t;let a;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":i>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:o<n.states.fixedLeafColumnsLength.value?a="left":i>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:i,after:o}:{}},b5=(t,e,n,s,i,o=0)=>{const r=[],{direction:a,start:l,after:c}=tF(e,n,s,i);if(a){const u=a==="left";r.push(`${t}-fixed-column--${a}`),u&&c+o===s.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!u&&l-o===s.states.columns.value.length-s.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function bA(t,e){return t+(V_(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const _5=(t,e,n,s)=>{const{direction:i,start:o=0,after:r=0}=tF(t,e,n,s);if(!i)return;const a={},l=i==="left",c=n.states.columns.value;return l?a.left=c.slice(0,o).reduce(bA,0):a.right=c.slice(r+1).reverse().reduce(bA,0),a},Hf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function nF(t){return t.some(e=>is(e)?!(e.type===Xn||e.type===te&&!nF(e.children)):!0)?t:null}function zve(t){const e=ht(),n=J(!1),s=J([]),i=(c,u)=>{const d=e.store.states.rowExpandable.value;return(d==null?void 0:d(c,u))??!0};return{updateExpandRows:()=>{const c=t.data.value||[],u=t.rowKey.value;if(n.value)s.value=e.store.states.rowExpandable.value?c.filter(i):c.slice();else if(u){const d=tf(s.value,u);s.value=c.filter((h,f)=>!!d[oi(h,u)]&&i(h,f))}else s.value=[]},toggleRowExpansion:(c,u)=>{const d=(t.data.value||[]).indexOf(c);d>-1&&!i(c,d)||Sb(s.value,c,u,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",c,s.value.slice())},setExpandRowKeys:c=>{e.store.assertRowKey();const u=t.data.value||[],d=t.rowKey.value,h=tf(u,d);s.value=c.reduce((f,p)=>{const m=h[p];return m&&i(m.row,m.index)&&f.push(m.row),f},[])},isRowExpanded:c=>{const u=t.rowKey.value;return u?!!tf(s.value,u)[oi(c,u)]:s.value.includes(c)},states:{expandRows:s,defaultExpandAll:n}}}function Hve(t){const e=ht(),n=J(null),s=J(null),i=c=>{e.store.assertRowKey(),n.value=c,r(c)},o=()=>{n.value=null},r=c=>{const{data:u,rowKey:d}=t,h=s.value;let f=null;d.value&&(f=(M(u)||[]).find(p=>oi(p,d.value)===c)??null),s.value=f??null,e.emit("current-change",s.value,h)};return{setCurrentRowKey:i,restoreCurrentRowKey:o,setCurrentRowByKey:r,updateCurrentRow:c=>{const u=s.value;if(c&&c!==u){s.value=c,e.emit("current-change",s.value,u);return}!c&&u&&(s.value=null,e.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=t.rowKey.value,u=t.data.value||[],d=s.value;d&&!u.includes(d)?c?r(oi(d,c)):(s.value=null,e.emit("current-change",null,d)):n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:s}}}function Uve(t){const e=J([]),n=J({}),s=J(16),i=J(!1),o=J({}),r=J("hasChildren"),a=J("children"),l=J(!1),c=ht(),u=z(()=>t.rowKey.value?h(t.data.value||[]):{}),d=z(()=>{const C=t.rowKey.value,S=Object.keys(o.value),E={};return S.length&&S.forEach(P=>{if(o.value[P].length){const T={children:[]};o.value[P].forEach(L=>{const I=oi(L,C);T.children.push(I),L[r.value]&&!E[I]&&(E[I]={children:[]})}),E[P]=T}}),E}),h=C=>{const S=t.rowKey.value,E={};return Fve(C,(P,T,L)=>{const I=oi(P,S);Ae(T)?E[I]={children:T.map(V=>oi(V,S)),level:L}:i.value&&(E[I]={children:[],lazy:!0,level:L})},a.value,r.value,i.value),E},f=(C=!1,S)=>{var I,V;S||(S=(I=c.store)==null?void 0:I.states.defaultExpandAll.value);const E=u.value,P=d.value,T=Object.keys(E),L={};if(T.length){const R=M(n),N=[],F=(G,q)=>{if(C)return e.value?S||e.value.includes(q):!!(S||G!=null&&G.expanded);{const X=S||e.value&&e.value.includes(q);return!!(G!=null&&G.expanded||X)}};T.forEach(G=>{const q=R[G],X={...E[G]};if(X.expanded=F(q,G),X.lazy){const{loaded:K=!1,loading:H=!1}=q||{};X.loaded=!!K,X.loading=!!H,N.push(G)}L[G]=X});const B=Object.keys(P);i.value&&B.length&&N.length&&B.forEach(G=>{var K;const q=R[G],X=P[G].children;if(N.includes(G)){if(((K=L[G].children)==null?void 0:K.length)!==0)throw new Error("[ElTable]children must be an empty array.");L[G].children=X}else{const{loaded:H=!1,loading:Q=!1}=q||{};L[G]={lazy:!0,loaded:!!H,loading:!!Q,expanded:F(q,G),children:X,level:void 0}}})}n.value=L,(V=c.store)==null||V.updateTableScrollY()};Ee(()=>e.value,()=>{f(!0)},{deep:!0}),Ee(()=>u.value,()=>{f()}),Ee(()=>d.value,()=>{f()});const p=C=>{e.value=C,f()},m=C=>i.value&&C&&"loaded"in C&&!C.loaded,b=(C,S)=>{c.store.assertRowKey();const E=t.rowKey.value,P=oi(C,E),T=P&&n.value[P];if(P&&T&&"expanded"in T){const L=T.expanded;S=bn(S)?!T.expanded:S,n.value[P].expanded=S,L!==S&&c.emit("expand-change",C,S),S&&m(T)&&x(C,P,T),c.store.updateTableScrollY()}},_=C=>{c.store.assertRowKey();const S=t.rowKey.value,E=oi(C,S),P=n.value[E];m(P)?x(C,E,P):b(C,void 0)},x=(C,S,E)=>{const{load:P}=c.props;P&&!n.value[S].loaded&&(n.value[S].loading=!0,P(C,E,T=>{if(!Ae(T))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,T.length&&(o.value[S]=T),c.emit("expand-change",C,!0)}))};return{loadData:x,loadOrToggle:_,toggleTreeExpansion:b,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:(C,S)=>{const{lazy:E,rowKey:P}=c.props;if(E){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[C]&&(o.value[C]=S)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:s,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const jve=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:Lve(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},F0=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,F0(n.children)):e.push(n)}),e};function Wve(){var Tt;const t=ht(),{size:e}=po((Tt=t.proxy)==null?void 0:Tt.$props),n=J(null),s=J([]),i=J([]),o=J(!1),r=J([]),a=J([]),l=J([]),c=J([]),u=J([]),d=J([]),h=J([]),f=J([]),p=[],m=J(0),b=J(0),_=J(0),x=J(!1),k=J([]),C=J(!1),S=J(!1),E=J(null),P=J(null),T=J({}),L=J(null),I=J(null),V=J(null),R=J(null),N=J(null),F=z(()=>n.value?tf(k.value,n.value):void 0);Ee(s,()=>{var Xe;t.state&&(X(!1),t.props.tableLayout==="auto"&&((Xe=t.refs.tableHeaderRef)==null||Xe.updateFixedColumnStyle()))},{deep:!0});const B=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},G=Xe=>{var ut;(ut=Xe.children)==null||ut.forEach(ft=>{ft.fixed=Xe.fixed,G(ft)})},q=()=>{r.value.forEach(Le=>{G(Le)}),c.value=r.value.filter(Le=>[!0,"left"].includes(Le.fixed));const Xe=r.value.find(Le=>Le.type==="selection");let ut;Xe&&Xe.fixed!=="right"&&!c.value.includes(Xe)&&r.value.indexOf(Xe)===0&&c.value.length&&(c.value.unshift(Xe),ut=!0),u.value=r.value.filter(Le=>Le.fixed==="right");const ft=r.value.filter(Le=>(ut?Le.type!=="selection":!0)&&!Le.fixed);a.value=Array.from(c.value).concat(ft).concat(u.value);const ye=F0(ft),Ie=F0(c.value),ce=F0(u.value);m.value=ye.length,b.value=Ie.length,_.value=ce.length,l.value=Array.from(Ie).concat(ye).concat(ce),o.value=c.value.length>0||u.value.length>0},X=(Xe,ut=!1)=>{Xe&&q(),ut?t.state.doLayout():t.state.debouncedUpdateLayout()},K=Xe=>F.value?!!F.value[oi(Xe,n.value)]:k.value.includes(Xe),H=()=>{x.value=!1;const Xe=k.value;k.value=[],Xe.length&&t.emit("selection-change",[])},Q=()=>{var ut,ft;let Xe;if(n.value){Xe=[];const ye=(ft=(ut=t==null?void 0:t.store)==null?void 0:ut.states)==null?void 0:ft.childrenColumnName.value,Ie=tf(s.value,n.value,!0,ye);for(const ce in F.value)Ft(F.value,ce)&&!Ie[ce]&&Xe.push(F.value[ce].row)}else Xe=k.value.filter(ye=>!s.value.includes(ye));if(Xe.length){const ye=k.value.filter(Ie=>!Xe.includes(Ie));k.value=ye,t.emit("selection-change",ye.slice())}},se=()=>(k.value||[]).slice(),Z=(Xe,ut,ft=!0,ye=!1)=>{var ce,Le,pt,yn;const Ie={children:(Le=(ce=t==null?void 0:t.store)==null?void 0:ce.states)==null?void 0:Le.childrenColumnName.value,checkStrictly:(yn=(pt=t==null?void 0:t.store)==null?void 0:pt.states)==null?void 0:yn.checkStrictly.value};if(Sb(k.value,Xe,ut,Ie,ye?void 0:E.value,s.value.indexOf(Xe),n.value)){const ms=(k.value||[]).slice();ft&&t.emit("select",ms,Xe),t.emit("selection-change",ms)}},ae=()=>{var Le,pt;const Xe=S.value?!x.value:!(x.value||k.value.length);x.value=Xe;let ut=!1,ft=0;const ye=(pt=(Le=t==null?void 0:t.store)==null?void 0:Le.states)==null?void 0:pt.rowKey.value,{childrenColumnName:Ie}=t.store.states,ce={children:Ie.value,checkStrictly:!1};s.value.forEach((yn,ms)=>{const nu=ms+ft;Sb(k.value,yn,Xe,ce,E.value,nu,ye)&&(ut=!0),ft+=ke(oi(yn,ye))}),ut&&t.emit("selection-change",k.value?k.value.slice():[]),t.emit("select-all",(k.value||[]).slice())},ve=()=>{var ce;if(((ce=s.value)==null?void 0:ce.length)===0){x.value=!1;return}const{childrenColumnName:Xe}=t.store.states;let ut=0,ft=0;const ye=Le=>{var pt;for(const yn of Le){const ms=E.value&&E.value.call(null,yn,ut);if(K(yn))ft++;else if(!E.value||ms)return!1;if(ut++,(pt=yn[Xe.value])!=null&&pt.length&&!ye(yn[Xe.value]))return!1}return!0},Ie=ye(s.value||[]);x.value=ft===0?!1:Ie},ke=Xe=>{var Ie;if(!t||!t.store)return 0;const{treeData:ut}=t.store.states;let ft=0;const ye=(Ie=ut.value[Xe])==null?void 0:Ie.children;return ye&&(ft+=ye.length,ye.forEach(ce=>{ft+=ke(ce)})),ft},oe=(Xe,ut)=>{const ft={};return si(Xe).forEach(ye=>{T.value[ye.id]=ut,ft[ye.columnKey||ye.id]=ut}),ft},fe=(Xe,ut,ft)=>{I.value&&I.value!==Xe&&(I.value.order=null),I.value=Xe,V.value=ut,R.value=ft},ie=()=>{let Xe=M(i);Object.keys(T.value).forEach(ut=>{const ft=T.value[ut];if(!ft||ft.length===0)return;const ye=JV({columns:l.value},ut);ye&&ye.filterMethod&&(Xe=Xe.filter(Ie=>ft.some(ce=>ye.filterMethod.call(null,ce,Ie,ye))))}),L.value=Xe},re=()=>{s.value=jve(L.value??[],{sortingColumn:I.value,sortProp:V.value,sortOrder:R.value})},Se=(Xe=void 0)=>{Xe!=null&&Xe.filter||ie(),re()},je=Xe=>{const{tableHeaderRef:ut}=t.refs;if(!ut)return;const ft=Object.assign({},ut.filterPanels),ye=Object.keys(ft);if(ye.length)if(Ke(Xe)&&(Xe=[Xe]),Ae(Xe)){const Ie=Xe.map(ce=>Ove({columns:l.value},ce));ye.forEach(ce=>{const Le=Ie.find(pt=>pt.id===ce);Le&&(Le.filteredValue=[])}),t.store.commit("filterChange",{column:Ie,values:[],silent:!0,multi:!0})}else ye.forEach(Ie=>{const ce=l.value.find(Le=>Le.id===Ie);ce&&(ce.filteredValue=[])}),T.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},ee=()=>{I.value&&(fe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ne,toggleRowExpansion:pe,updateExpandRows:$e,states:Ce,isRowExpanded:Pe}=zve({data:s,rowKey:n}),{updateTreeExpandKeys:Ue,toggleTreeExpansion:Fe,updateTreeData:ze,updateKeyChildren:De,loadOrToggle:ct,states:Qe}=Uve({data:s,rowKey:n}),{updateCurrentRowData:ot,updateCurrentRow:be,setCurrentRowKey:me,states:Me}=Hve({data:s,rowKey:n});return{assertRowKey:B,updateColumns:q,scheduleLayout:X,isSelected:K,clearSelection:H,cleanSelection:Q,getSelectionRows:se,toggleRowSelection:Z,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:ve,updateFilters:oe,updateCurrentRow:be,updateSort:fe,execFilter:ie,execSort:re,execQuery:Se,clearFilter:je,clearSort:ee,toggleRowExpansion:pe,setExpandRowKeysAdapter:Xe=>{ne(Xe),Ue(Xe)},setCurrentRowKey:me,toggleRowExpansionAdapter:(Xe,ut)=>{l.value.some(({type:ft})=>ft==="expand")?pe(Xe,ut):Fe(Xe,ut)},isRowExpanded:Pe,updateExpandRows:$e,updateCurrentRowData:ot,loadOrToggle:ct,updateTreeData:ze,updateKeyChildren:De,states:{tableSize:e,rowKey:n,data:s,_data:i,isComplex:o,_columns:r,originColumns:a,columns:l,fixedColumns:c,rightFixedColumns:u,leafColumns:d,fixedLeafColumns:h,rightFixedLeafColumns:f,updateOrderFns:p,leafColumnsLength:m,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:_,isAllSelected:x,selection:k,reserveSelection:C,selectOnIndeterminate:S,selectable:E,rowExpandable:P,filters:T,filteredData:L,sortingColumn:I,sortProp:V,sortOrder:R,hoverRow:N,...Ce,...Qe,...Me}}}function xk(t,e){return t.map(n=>{var s;return n.id===e.id?e:((s=n.children)!=null&&s.length&&(n.children=xk(n.children,e)),n)})}function kk(t){t.forEach(e=>{var n,s;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(s=e.children)!=null&&s.length&&kk(e.children)}),t.sort((e,n)=>e.no-n.no)}function Yve(){const t=ht(),e=Wve(),n=Ne("table"),{t:s}=Xt();return{ns:n,t:s,...e,mutations:{setData(a,l){const c=M(a._data)!==l;a.data.value=l,a._data.value=l,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),M(a.reserveSelection)?t.store.assertRowKey():c?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,l,c,u){var f;const d=M(a._columns);let h=[];c?(c&&!c.children&&(c.children=[]),(f=c.children)==null||f.push(l),h=xk(d,c)):(d.push(l),h=d),kk(h),a._columns.value=h,a.updateOrderFns.push(u),l.type==="selection"&&(a.selectable.value=l.selectable,a.reserveSelection.value=l.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,l){var c;((c=l.getColumnIndex)==null?void 0:c.call(l))!==l.no&&(kk(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,c,u){var f;const d=M(a._columns)||[];if(c)(f=c.children)==null||f.splice(c.children.findIndex(p=>p.id===l.id),1),st(()=>{var p;((p=c.children)==null?void 0:p.length)===0&&delete c.children}),a._columns.value=xk(d,c);else{const p=d.indexOf(l);p>-1&&(d.splice(p,1),a._columns.value=d)}const h=a.updateOrderFns.indexOf(u);h>-1&&a.updateOrderFns.splice(h,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,l){const{prop:c,order:u,init:d}=l;if(c){const h=M(a.columns).find(f=>f.property===c);h&&(h.order=u,t.store.updateSort(h,c,u),t.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(a,l){const{sortingColumn:c,sortProp:u,sortOrder:d}=a,h=M(c),f=M(u),p=M(d);V_(p)&&(a.sortingColumn.value=null,a.sortProp.value=null),t.store.execQuery({filter:!0}),(!l||!(l.silent||l.init))&&t.emit("sort-change",{column:h,prop:f,order:p}),t.store.updateTableScrollY()},filterChange(a,l){const{column:c,values:u,silent:d}=l,h=t.store.updateFilters(c,u);t.store.execQuery(),d||t.emit("filter-change",h),t.store.updateTableScrollY()},toggleAllSelection(){var a,l;(l=(a=t.store).toggleAllSelection)==null||l.call(a)},rowSelectedChanged(a,l){t.store.toggleRowSelection(l),t.store.updateAllSelected()},setHoverRow(a,l){a.hoverRow.value=l},setCurrentRow(a,l){t.store.updateCurrentRow(l)}},commit:function(a,...l){const c=t.store.mutations;if(c[a])c[a].apply(t,[t.store.states,...l]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){st(()=>t.layout.updateScrollY.apply(t.layout))}}}const w5={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function qve(t,e){if(!t)throw new Error("Table is required.");const n=Yve();return n.toggleAllSelection=cd(n._toggleAllSelection,10),Object.keys(w5).forEach(s=>{sF(iF(e,s),s,n)}),Gve(n,e),n}function Gve(t,e){Object.keys(w5).forEach(n=>{Ee(()=>iF(e,n),s=>{sF(s,n,t)})})}function sF(t,e,n){let s=t,i=w5[e];yt(i)&&(s=s||i.default,i=i.key),n.states[i].value=s}function iF(t,e){if(e.includes(".")){const n=e.split(".");let s=t;return n.forEach(i=>{s=s[i]}),s}else return t[e]}var Xve=class{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=J(null),this.scrollX=J(!1),this.scrollY=J(!1),this.bodyWidth=J(null),this.fixedWidth=J(null),this.rightFixedWidth=J(null),this.gutterWidth=0;for(const e in t)Ft(t,e)&&(hn(this[e])?this[e].value=t[e]:this[e]=t[e]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const t=this.height.value;if(V_(t))return!1;const e=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(e!=null&&e.wrapRef)){let n=!0;const s=this.scrollY.value;return n=e.wrapRef.scrollHeight>e.wrapRef.clientHeight,this.scrollY.value=n,s!==n}return!1}setHeight(t,e="height"){if(!qt)return;const n=this.table.vnode.el;if(t=Rve(t),this.height.value=Number(t),!n&&(t||t===0)){st(()=>this.setHeight(t,e));return}n&&wt(t)?(n.style[e]=`${t}px`,this.updateElsHeight()):n&&Ke(t)&&(n.style[e]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(e=>{e.isColumnGroup?t.push.apply(t,e.columns):t.push(e)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let e=t;for(;e.tagName!=="DIV";){if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}updateColumnsWidth(){var a;if(!qt)return;const t=this.fit,e=(a=this.table.vnode.el)==null?void 0:a.clientWidth;let n=0;const s=this.getFlattenColumns(),i=s.filter(l=>!wt(l.width));if(s.forEach(l=>{wt(l.width)&&l.realWidth&&(l.realWidth=null)}),i.length>0&&t){if(s.forEach(l=>{n+=Number(l.width||l.minWidth||80)}),n<=e){this.scrollX.value=!1;const l=e-n;if(i.length===1)i[0].realWidth=Number(i[0].minWidth||80)+l;else{const c=l/i.reduce((d,h)=>d+Number(h.minWidth||80),0);let u=0;i.forEach((d,h)=>{if(h===0)return;const f=Math.floor(Number(d.minWidth||80)*c);u+=f,d.realWidth=Number(d.minWidth||80)+f}),i[0].realWidth=Number(i[0].minWidth||80)+l-u}}else this.scrollX.value=!0,i.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(n,e),this.table.state.resizeState.value.width=this.bodyWidth.value}else s.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),n+=l.realWidth}),this.scrollX.value=n>e,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let l=0;o.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.fixedWidth.value=l}const r=this.store.states.rightFixedColumns.value;if(r.length>0){let l=0;r.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&this.observers.splice(e,1)}notifyObservers(t){this.observers.forEach(e=>{var n,s;switch(t){case"columns":(n=e.state)==null||n.onColumnsChange(this);break;case"scrollable":(s=e.state)==null||s.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}};const Kr=Symbol("ElTable"),oF=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,oF(n.children))):e.push(n)}),e},rF=t=>{let e=1;const n=(i,o)=>{if(o&&(i.level=o.level+1,e<i.level&&(e=i.level)),i.children){let r=0;i.children.forEach(a=>{n(a,i),r+=a.colSpan}),i.colSpan=r}else i.colSpan=1};t.forEach(i=>{i.level=1,n(i,void 0)});const s=[];for(let i=0;i<e;i++)s.push([]);return oF(t).forEach(i=>{i.children?(i.rowSpan=1,i.children.forEach(o=>o.isSubColumn=!0)):i.rowSpan=e-i.level+1,s[i.level-1].push(i)}),s};function Kve(t){const e=He(Kr),n=z(()=>rF(t.store.states.originColumns.value));return{isGroup:z(()=>{const o=n.value.length>1;return o&&e&&(e.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),e==null||e.store.commit("toggleAllSelection")},columnRows:n}}var Zve=he({name:"ElTableFilterPanel",components:{ElCheckbox:Zt,ElCheckboxGroup:r5,ElScrollbar:Ei,ElTooltip:js,ElIcon:_e,ArrowDown:Td,ArrowUp:q_},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:Nn.appendTo},setup(t){const e=ht(),{t:n}=Xt(),s=Ne("table-filter"),i=e==null?void 0:e.parent;t.column&&!i.filterPanels.value[t.column.id]&&(i.filterPanels.value[t.column.id]=e);const o=J(null),r=J(null),a=J(0),l=z(()=>t.column&&t.column.filters),c=z(()=>t.column&&t.column.filterClassName?`${s.b()} ${t.column.filterClassName}`:s.b()),u=z({get:()=>{var P;return(((P=t.column)==null?void 0:P.filteredValue)||[])[0]},set:P=>{d.value&&(ma(P)?d.value.splice(0,1):d.value.splice(0,1,P))}}),d=z({get(){return t.column?t.column.filteredValue||[]:[]},set(P){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",P))}}),h=z(()=>t.column?t.column.filterMultiple:!0),f=P=>P.value===u.value,p=()=>{var P;(P=o.value)==null||P.onClose()},m=()=>{x(d.value),p()},b=()=>{d.value=[],x(d.value),p()},_=(P,T)=>{u.value=P,a.value=T,ma(P)?x([]):x(d.value),p()},x=P=>{var T,L;(T=t.store)==null||T.commit("filterChange",{column:t.column,values:P}),(L=t.store)==null||L.updateAllSelected()},k=()=>{var P,T;(P=r.value)==null||P.focus(),!h.value&&S(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},C=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},S=()=>{if(ma(u)){a.value=0;return}const P=(l.value||[]).findIndex(T=>T.value===u.value);a.value=P>=0?P+1:0};return{multiple:h,filterClassName:c,filteredValue:d,filterValue:u,filters:l,handleConfirm:m,handleReset:b,handleSelect:_,isPropAbsent:ma,isActive:f,t:n,ns:s,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:k,handleHideTooltip:C,handleKeydown:P=>{var R,N;const T=hs(P),L=(l.value?l.value.length:0)+1;let I=a.value,V=!0;switch(T){case Ye.down:case Ye.right:I=(I+1)%L;break;case Ye.up:case Ye.left:I=(I-1+L)%L;break;case Ye.tab:p(),V=!1;break;case Ye.enter:case Ye.space:if(I===0)_(null,0);else{const F=(l.value||[])[I-1];F.value&&_(F.value,I)}break;default:V=!1;break}V&&P.preventDefault(),a.value=I,(N=(R=r.value)==null?void 0:R.querySelector(`.${s.e("list-item")}:nth-child(${I+1})`))==null||N.focus()}}}});const Jve=["disabled"],Qve=["tabindex","aria-checked"],e0e=["tabindex","aria-checked","onClick"],t0e=["aria-label"];function n0e(t,e,n,s,i,o){const r=W("el-checkbox"),a=W("el-checkbox-group"),l=W("el-scrollbar"),c=W("arrow-up"),u=W("arrow-down"),d=W("el-icon"),h=W("el-tooltip");return v(),D(h,{ref:"tooltipRef",offset:0,placement:t.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo,onShow:t.handleShowTooltip,onHide:t.handleHideTooltip},{content:w(()=>[t.multiple?(v(),A("div",{key:0,ref:"rootRef",tabindex:"-1",class:U(t.ns.e("multiple"))},[g("div",{class:U(t.ns.e("content"))},[y(l,{"wrap-class":t.ns.e("wrap")},{default:w(()=>[y(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=f=>t.filteredValue=f),class:U(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),A(te,null,we(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:w(()=>[Y($(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:U(t.ns.e("bottom"))},[g("button",{class:U(t.ns.is("disabled",t.filteredValue.length===0)),disabled:t.filteredValue.length===0,type:"button",onClick:e[1]||(e[1]=(...f)=>t.handleConfirm&&t.handleConfirm(...f))},$(t.t("el.table.confirmFilter")),11,Jve),g("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},$(t.t("el.table.resetFilter")),1)],2)],2)):(v(),A("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:U(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[g("li",{role:"radio",class:U([t.ns.e("list-item"),t.ns.is("active",t.isPropAbsent(t.filterValue))]),tabindex:t.checkedIndex===0?0:-1,"aria-checked":t.isPropAbsent(t.filterValue),onClick:e[3]||(e[3]=f=>t.handleSelect(null,0))},$(t.t("el.table.clearFilter")),11,Qve),(v(!0),A(te,null,we(t.filters,(f,p)=>(v(),A("li",{key:f.value,role:"radio",class:U([t.ns.e("list-item"),t.ns.is("active",t.isActive(f))]),tabindex:t.checkedIndex===p+1?0:-1,"aria-checked":t.isActive(f),onClick:m=>t.handleSelect(f.value,p+1)},$(f.text),11,e0e))),128))],34))]),default:w(()=>{var f;return[g("button",{type:"button",class:U(`${t.ns.namespace.value}-table__column-filter-trigger`),"aria-label":t.t("el.table.filterLabel",{column:((f=t.column)==null?void 0:f.label)||""})},[y(d,null,{default:w(()=>[le(t.$slots,"filter-icon",{},()=>{var p;return[(p=t.column)!=null&&p.filterOpened?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]})]),_:3})],10,t0e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var s0e=hi(Zve,[["render",n0e]]);function x5(t){const e=ht();Sd(()=>{n.value.addObserver(e)}),Vt(()=>{s(n.value),i(n.value)}),wl(()=>{s(n.value),i(n.value)}),xl(()=>{n.value.removeObserver(e)});const n=z(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),s=o=>{var c;const r=((c=t.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!r.length)return;const a=o.getFlattenColumns(),l={};a.forEach(u=>{l[u.id]=u});for(let u=0,d=r.length;u<d;u++){const h=r[u],f=l[h.getAttribute("name")];f&&h.setAttribute("width",f.realWidth||f.width)}},i=o=>{var l,c;const r=((l=t.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=r.length;u<d;u++)r[u].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const a=((c=t.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let u=0,d=a.length;u<d;u++){const h=a[u];h.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",h.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:s,onScrollableChange:i}}function i0e(t,e){const n=ht(),s=He(Kr),i=m=>{m.stopPropagation()},o=(m,b)=>{!b.filters&&b.sortable?p(m,b,!1):b.filterable&&!b.sortable&&i(m),s==null||s.emit("header-click",b,m)},r=(m,b)=>{s==null||s.emit("header-contextmenu",b,m)},a=J(null),l=J(!1),c=J(),u=(m,b)=>{var _,x,k;if(qt&&!(b.children&&b.children.length>0)&&a.value&&t.border&&a.value.id===b.id){l.value=!0;const C=s;e("set-drag-visible",!0);const S=(_=C==null?void 0:C.vnode.el)==null?void 0:_.getBoundingClientRect().left,E=(k=(x=n==null?void 0:n.vnode)==null?void 0:x.el)==null?void 0:k.querySelector(`th.${b.id}`),P=E.getBoundingClientRect(),T=P.left-S+30;ud(E,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-S,startColumnLeft:P.left-S,tableLeft:S};const L=C==null?void 0:C.refs.resizeProxy;L.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const I=R=>{const N=R.clientX-c.value.startMouseLeft,F=c.value.startLeft+N;L.style.left=`${Math.max(T,F)}px`},V=()=>{if(l.value){const{startColumnLeft:R,startLeft:N}=c.value;b.width=b.realWidth=Number.parseInt(L.style.left,10)-R,C==null||C.emit("header-dragend",b.width,N-R,b,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ka(E,"noclick")},0)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",V)}},d=(m,b)=>{var L;if(!t.border||b.children&&b.children.length>0)return;const _=m.target,x=Eo(_)?_.closest("th"):null;if(!x)return;const k=dl(x,"is-sortable");if(k){const I=l.value?"col-resize":"";x.style.cursor=I;const V=x.querySelector(".caret-wrapper");V&&(V.style.cursor=I)}if(!b.resizable||l.value){a.value=null;return}const C=x.getBoundingClientRect(),S=((L=x.parentNode)==null?void 0:L.lastElementChild)===x,E=t.allowDragLastColumn||!S,P=C.width>12&&C.right-m.clientX<8&&E,T=P?"col-resize":"";document.body.style.cursor=T,a.value=P?b:null,k&&(x.style.cursor=T)},h=()=>{!qt||l.value||(document.body.style.cursor="")},f=({order:m,sortOrders:b})=>{if(m==="")return b[0];const _=b.indexOf(m||null);return b[_>b.length-2?0:_+1]},p=(m,b,_)=>{var L;m.stopPropagation();const x=b.order===_?null:_||f(b),k=(L=m.target)==null?void 0:L.closest("th");if(k&&dl(k,"noclick")){ka(k,"noclick");return}if(!b.sortable)return;const C=m.currentTarget;if(["ascending","descending"].some(I=>dl(C,I)&&!b.sortOrders.includes(I)))return;const S=t.store.states;let E=S.sortProp.value,P;const T=S.sortingColumn.value;(T!==b||T===b&&V_(T.order))&&(T&&(T.order=null),S.sortingColumn.value=b,E=b.property),x?P=b.order=x:P=b.order=null,S.sortProp.value=E,S.sortOrder.value=P,s==null||s.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:r,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:p,handleFilterClick:i}}function o0e(t){const e=He(Kr),n=Ne("table");return{getHeaderRowStyle:a=>{const l=e==null?void 0:e.props.headerRowStyle;return Je(l)?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=e==null?void 0:e.props.headerRowClassName;return Ke(c)?l.push(c):Je(c)&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{let d=(e==null?void 0:e.props.headerCellStyle)??{};Je(d)&&(d=d.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const h=_5(l,u.fixed,t.store,c);return Hf(h,"left"),Hf(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=b5(n.b(),l,u.fixed,t.store,c),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const f=e==null?void 0:e.props.headerCellClassName;return Ke(f)?h.push(f):Je(f)&&h.push(f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),h.push(n.e("cell")),h.filter(p=>!!p).join(" ")}}}var r0e=he({name:"ElTableHeader",components:{ElCheckbox:Zt},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=ht(),s=He(Kr),i=Ne("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=x5(s),l=(s==null?void 0:s.props.tableLayout)==="auto",c=Dn(new Map),u=J();let d;const h=()=>{d=setTimeout(()=>{c.size>0&&(c.forEach((R,N)=>{const F=u.value.querySelector(`.${N.replace(/\s/g,".")}`);F&&(R.width=F.getBoundingClientRect().width||R.width)}),c.clear())})};Ee(c,h),_n(()=>{d&&(clearTimeout(d),d=void 0)}),Vt(async()=>{await st(),await st();const{prop:R,order:N}=t.defaultSort;s==null||s.store.commit("sort",{prop:R,order:N,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:_,handleSortClick:x,handleFilterClick:k}=i0e(t,e),{getHeaderRowStyle:C,getHeaderRowClass:S,getHeaderCellStyle:E,getHeaderCellClass:P}=o0e(t),{isGroup:T,toggleAllSelection:L,columnRows:I}=Kve(t),{t:V}=Xt();return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=o,{ns:i,t:V,filterPanels:o,onColumnsChange:r,onScrollableChange:a,columnRows:I,getHeaderRowClass:S,getHeaderRowStyle:C,getHeaderCellClass:P,getHeaderCellStyle:E,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:_,handleSortClick:x,handleFilterClick:k,isGroup:T,toggleAllSelection:L,saveIndexSelection:c,isTableLayoutAuto:l,theadRef:u,updateFixedColumnStyle:h}},render(){const{ns:t,t:e,isGroup:n,columnRows:s,getHeaderCellStyle:i,getHeaderCellClass:o,getHeaderRowClass:r,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleSortClick:h,handleMouseOut:f,store:p,$parent:m,saveIndexSelection:b,isTableLayoutAuto:_}=this;let x=1;return vt("thead",{ref:"theadRef",class:t.is("group",n)},s.map((k,C)=>vt("tr",{class:r(C),key:C,style:a(C)},k.map((S,E)=>{S.rowSpan>x&&(x=S.rowSpan);const P=o(C,E,k,S);return _&&S.fixed&&b.set(P,S),vt("th",{class:P,colspan:S.colSpan,key:`${S.id}-thead`,rowspan:S.rowSpan,scope:S.colSpan>1?"colgroup":"col",ariaSort:S.sortable?S.order:void 0,style:i(C,E,k,S),onClick:T=>{var L;(L=T.currentTarget)!=null&&L.classList.contains("noclick")||l(T,S)},onContextmenu:T=>c(T,S),onMousedown:T=>u(T,S),onMousemove:T=>d(T,S),onMouseout:f},[vt("div",{class:["cell",S.filteredValue&&S.filteredValue.length>0?"highlight":""]},[S.renderHeader?S.renderHeader({column:S,$index:E,store:p,_self:m}):S.label,S.sortable&&vt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:S.label||""}),onClick:T=>h(T,S)},[vt("i",{onClick:T=>h(T,S,"ascending"),class:"sort-caret ascending"}),vt("i",{onClick:T=>h(T,S,"descending"),class:"sort-caret descending"})]),S.filterable&&vt(s0e,{store:p,placement:S.filterPlacement||"bottom-start",appendTo:m==null?void 0:m.appendFilterPanelTo,column:S,upDataColumn:(T,L)=>{S[T]=L}},{"filter-icon":()=>S.renderFilterIcon?S.renderFilterIcon({filterOpened:S.filterOpened}):null})])])}))))}});function nf(t,e,n=.03){return t-e>n}function a0e(t){const e=He(Kr),n=J(""),s=J(vt("div")),i=(p,m,b)=>{var S,E;const _=e,x=Fw(p);let k=null;const C=(S=_==null?void 0:_.vnode.el)==null?void 0:S.dataset.prefix;x&&(k=vA({columns:((E=t.store)==null?void 0:E.states.columns.value)??[]},x,C),k&&(_==null||_.emit(`cell-${b}`,m,k,x,p))),_==null||_.emit(`row-${b}`,m,k,p)},o=(p,m)=>{i(p,m,"dblclick")},r=(p,m)=>{var b;(b=t.store)==null||b.commit("setCurrentRow",m),i(p,m,"click")},a=(p,m)=>{i(p,m,"contextmenu")},l=cd(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=cd(()=>{var p;(p=t.store)==null||p.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null);return{left:Number.parseInt(m.paddingLeft,10)||0,right:Number.parseInt(m.paddingRight,10)||0,top:Number.parseInt(m.paddingTop,10)||0,bottom:Number.parseInt(m.paddingBottom,10)||0}},d=(p,m,b)=>{var x;let _=(x=m==null?void 0:m.target)==null?void 0:x.parentNode;for(;p>1&&(_=_==null?void 0:_.nextSibling,!(!_||_.nodeName!=="TR"));)b(_,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:o,handleClick:r,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,b)=>{var q,X,K;if(!e)return;const _=e,x=Fw(p),k=(q=_==null?void 0:_.vnode.el)==null?void 0:q.dataset.prefix;let C=null;if(x){if(C=vA({columns:((X=t.store)==null?void 0:X.states.columns.value)??[]},x,k),!C)return;x.rowSpan>1&&d(x.rowSpan,p,ud);const H=_.hoverState={cell:x,column:C,row:m};_==null||_.emit("cell-mouse-enter",H.row,H.column,H.cell,p)}if(!b){(Rn==null?void 0:Rn.trigger)===x&&(Rn==null||Rn());return}const S=p.target.querySelector(".cell");if(!(dl(S,`${k}-tooltip`)&&S.childNodes.length&&((K=S.textContent)!=null&&K.trim())))return;const E=document.createRange();E.setStart(S,0),E.setEnd(S,S.childNodes.length);const{width:P,height:T}=E.getBoundingClientRect(),{width:L,height:I}=S.getBoundingClientRect(),{top:V,left:R,right:N,bottom:F}=u(S),B=R+N,G=V+F;nf(P+B,L)||nf(T+G,I)||nf(S.scrollWidth,L)?Bve(b,((x==null?void 0:x.innerText)||(x==null?void 0:x.textContent))??"",m,C,x,_):(Rn==null?void 0:Rn.trigger)===x&&(Rn==null||Rn())},handleCellMouseLeave:p=>{const m=Fw(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,ka);const b=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",b==null?void 0:b.row,b==null?void 0:b.column,b==null?void 0:b.cell,p)},tooltipContent:n,tooltipTrigger:s}}function l0e(t){const e=He(Kr),n=Ne("table");return{getRowStyle:(c,u)=>{const d=e==null?void 0:e.props.rowStyle;return Je(d)?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u,d)=>{var p;const h=[n.e("row")];e!=null&&e.props.highlightCurrentRow&&c===((p=t.store)==null?void 0:p.states.currentRow.value)&&h.push("current-row"),t.stripe&&d%2===1&&h.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return Ke(f)?h.push(f):Je(f)&&h.push(f.call(null,{row:c,rowIndex:u})),h},getCellStyle:(c,u,d,h)=>{const f=e==null?void 0:e.props.cellStyle;let p=f??{};Je(f)&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=_5(u,t==null?void 0:t.fixed,t.store);return Hf(m,"left"),Hf(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=b5(n.b(),u,t==null?void 0:t.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],b=e==null?void 0:e.props.cellClassName;return Ke(b)?m.push(b):Je(b)&&m.push(b.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(_=>!!_).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e==null?void 0:e.props.spanMethod;if(Je(m)){const b=m({row:c,column:u,rowIndex:d,columnIndex:h});Ae(b)?(f=b[0],p=b[1]):yt(b)&&(f=b.rowspan,p=b.colspan)}return{rowspan:f,colspan:p}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const h=c.map(({realWidth:f,width:p})=>f||p).slice(d,d+u);return Number(h.reduce((f,p)=>Number(f)+Number(p),-1))}}}const c0e=["colspan","rowspan"];var u0e=he({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(v(),A("td",{colspan:t.colspan,rowspan:t.rowspan},[le(e.$slots,"default")],8,c0e))}}),d0e=u0e;function h0e(t){const e=He(Kr),n=Ne("table"),{handleDoubleClick:s,handleClick:i,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=a0e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:b,getColspanRealWidth:_}=l0e(t);let x=-1;const k=z(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:L})=>L==="default")}),C=(T,L)=>{var V;const I=(V=e==null?void 0:e.props)==null?void 0:V.rowKey;return I?oi(T,I):L},S=(T,L,I,V=!1)=>{const{tooltipEffect:R,tooltipOptions:N,store:F}=t,{indent:B,columns:G}=F.states,q=[];let X=!0;return I&&(q.push(n.em("row",`level-${I.level}`)),X=!!I.display),L===0&&(x=-1),t.stripe&&X&&x++,q.push(...f(T,L,x)),vt("tr",{style:[X?null:{display:"none"},h(T,L)],class:q,key:C(T,L),onDblclick:K=>s(K,T),onClick:K=>i(K,T),onContextmenu:K=>o(K,T),onMouseenter:()=>r(L),onMouseleave:a},G.value.map((K,H)=>{const{rowspan:Q,colspan:se}=b(T,K,L,H);if(!Q||!se)return null;const Z=Object.assign({},K);Z.realWidth=_(G.value,se,H);const ae={store:F,_self:t.context||e,column:Z,row:T,$index:L,cellIndex:H,expanded:V};H===k.value&&I&&(ae.treeNode={indent:I.level&&I.level*B.value,level:I.level},Kn(I.expanded)&&(ae.treeNode.expanded=I.expanded,"loading"in I&&(ae.treeNode.loading=I.loading),"noLazyChildren"in I&&(ae.treeNode.noLazyChildren=I.noLazyChildren)));const ve=`${C(T,L)},${H}`,ke=Z.columnKey||Z.rawColumnKey||"",oe=K.showOverflowTooltip&&QO({effect:R},N,K.showOverflowTooltip);return vt(d0e,{style:p(L,H,T,K),class:m(L,H,T,K,se-1),key:`${ke}${ve}`,rowspan:Q,colspan:se,onMouseenter:fe=>l(fe,T,oe),onMouseleave:c},{default:()=>E(H,K,ae)})}))},E=(T,L,I)=>L.renderCell(I);return{wrappedRowRender:(T,L)=>{const I=t.store,{isRowExpanded:V,assertRowKey:R}=I,{treeData:N,lazyTreeNodeMap:F,childrenColumnName:B,rowKey:G}=I.states,q=I.states.columns.value;if(q.some(({type:X})=>X==="expand")){const X=V(T),K=S(T,L,void 0,X),H=e==null?void 0:e.renderExpanded;if(!H)return console.error("[Element Error]renderExpanded is required."),K;const Q=[[K]];return(e.props.preserveExpandedContent||X)&&Q[0].push(vt("tr",{key:`expanded-row__${K.key}`,style:{display:X?"":"none"}},[vt("td",{colspan:q.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[H({row:T,$index:L,store:I,expanded:X})])])),Q}else if(Object.keys(N.value).length){R();const X=oi(T,G.value);let K=N.value[X],H=null;K&&(H={expanded:K.expanded,level:K.level,display:!0,noLazyChildren:void 0,loading:void 0},Kn(K.lazy)&&(H&&Kn(K.loaded)&&K.loaded&&(H.noLazyChildren=!(K.children&&K.children.length)),H.loading=K.loading));const Q=[S(T,L,H??void 0)];if(K){let se=0;const Z=(ae,ve)=>{ae&&ae.length&&ve&&ae.forEach(ke=>{const oe={display:ve.display&&ve.expanded,level:ve.level+1,expanded:!1,noLazyChildren:!1,loading:!1},fe=oi(ke,G.value);if(ma(fe))throw new Error("For nested data item, row-key is required.");K={...N.value[fe]},K&&(oe.expanded=K.expanded,K.level=K.level||oe.level,K.display=!!(K.expanded&&oe.display),Kn(K.lazy)&&(Kn(K.loaded)&&K.loaded&&(oe.noLazyChildren=!(K.children&&K.children.length)),oe.loading=K.loading)),se++,Q.push(S(ke,L+se,oe)),K&&Z(F.value[fe]||ke[B.value],K)})};K.display=!0,Z(F.value[X]||T[B.value],K)}return Q}else return S(T,L,void 0)},tooltipContent:u,tooltipTrigger:d}}const f0e={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var p0e=he({name:"ElTableBody",props:f0e,setup(t){var u;const e=ht(),n=He(Kr),s=Ne("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}=h0e(t),{onColumnsChange:a,onScrollableChange:l}=x5(n),c=[];return Ee((u=t.store)==null?void 0:u.states.hoverRow,(d,h)=>{var _,x;const f=e==null?void 0:e.vnode.el,p=Array.from((f==null?void 0:f.children)||[]).filter(k=>k==null?void 0:k.classList.contains(`${s.e("row")}`));let m=d;const b=(_=p[m])==null?void 0:_.childNodes;if(b!=null&&b.length){let k=0;Array.from(b).reduce((C,S,E)=>{var P,T;return((P=b[E])==null?void 0:P.colSpan)>1&&(k=(T=b[E])==null?void 0:T.colSpan),S.nodeName!=="TD"&&k===0&&C.push(E),k>0&&k--,C},[]).forEach(C=>{var S;for(m=d;m>0;){const E=(S=p[m-1])==null?void 0:S.childNodes;if(E[C]&&E[C].nodeName==="TD"&&E[C].rowSpan>1){ud(E[C],"hover-cell"),c.push(E[C]);break}m--}})}else c.forEach(k=>ka(k,"hover-cell")),c.length=0;!((x=t.store)!=null&&x.states.isComplex.value)||!qt||jg(()=>{const k=p[h],C=p[d];k&&!k.classList.contains("hover-fixed-row")&&ka(k,"hover-row"),C&&ud(C,"hover-row")})}),xl(()=>{Rn==null||Rn()}),{ns:s,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this;return vt("tbody",{tabIndex:-1},[((e==null?void 0:e.states.data.value)||[]).reduce((n,s)=>n.concat(t(s,n.length)),[])])}});function m0e(){var e;const t=(e=He(Kr))==null?void 0:e.store;return{leftFixedLeafCount:z(()=>(t==null?void 0:t.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:z(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columnsCount:z(()=>(t==null?void 0:t.states.columns.value.length)??0),leftFixedCount:z(()=>(t==null?void 0:t.states.fixedColumns.value.length)??0),rightFixedCount:z(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columns:z(()=>(t==null?void 0:t.states.columns.value)??[])}}function g0e(t){const{columns:e}=m0e(),n=Ne("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...b5(n.b(),r,a.fixed,t.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(o,r)=>{const a=_5(r,o.fixed,t.store);return Hf(a,"left"),Hf(a,"right"),a},columns:e}}var v0e=he({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const e=He(Kr),n=Ne("table"),{getCellClasses:s,getCellStyles:i,columns:o}=g0e(t),{onScrollableChange:r,onColumnsChange:a}=x5(e);return{ns:n,onScrollableChange:r,onColumnsChange:a,getCellClasses:s,getCellStyles:i,columns:o}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:s,sumText:i}=this,o=this.store.states.data.value;let r=[];return s?r=s({columns:t,data:o}):t.forEach((a,l)=>{if(l===0){r[l]=i;return}const c=o.map(f=>Number(f[a.property])),u=[];let d=!0;c.forEach(f=>{if(!Number.isNaN(+f)){d=!1;const p=`${f}`.split(".")[1];u.push(p?p.length:0)}});const h=Math.max.apply(null,u);d?r[l]="":r[l]=c.reduce((f,p)=>{const m=Number(p);return Number.isNaN(+m)?f:Number.parseFloat((f+p).toFixed(Math.min(h,20)))},0)}),vt(vt("tfoot",[vt("tr",{},[...t.map((a,l)=>vt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[vt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function y0e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,h,f=!0)=>{t.toggleRowSelection(d,h,!1,f),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,h)=>{t.toggleRowExpansionAdapter(d,h)},clearSort:()=>{t.clearSort()},sort:(d,h)=>{t.commit("sort",{prop:d,order:h})},updateKeyChildren:(d,h)=>{t.updateKeyChildren(d,h)}}}function b0e(t,e,n,s){const i=J(!1),o=J(null),r=J(!1),a=B=>{r.value=B},l=J({width:null,height:null,headerHeight:null}),c=J(!1),u={display:"inline-block",verticalAlign:"middle"},d=J(),h=J(0),f=J(0),p=J(0),m=J(0),b=J(0);Ee(()=>t.height,B=>{e.setHeight(B??null)},{immediate:!0}),Ee(()=>t.maxHeight,B=>{e.setMaxHeight(B??null)},{immediate:!0}),Ee(()=>[t.currentRowKey,n.states.rowKey],([B,G])=>{!M(G)||!M(B)||n.setCurrentRowKey(`${B}`)},{immediate:!0}),Ee(()=>t.data,B=>{s.store.commit("setData",B)},{immediate:!0,deep:!0}),ml(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const _=()=>{s.store.commit("setHoverRow",null),s.hoverState&&(s.hoverState=null)},x=(B,G)=>{const{pixelX:q,pixelY:X}=G;Math.abs(q)>=Math.abs(X)&&(s.refs.bodyWrapper.scrollLeft+=G.pixelX/5)},k=z(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),C=z(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{k.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(L)};Vt(async()=>{await st(),n.updateColumns(),I(),requestAnimationFrame(S);const B=s.vnode.el,G=s.refs.headerWrapper;t.flexible&&B&&B.parentElement&&(B.parentElement.style.minWidth="0"),l.value={width:d.value=B.offsetWidth,height:B.offsetHeight,headerHeight:t.showHeader&&G?G.offsetHeight:null},n.states.columns.value.forEach(q=>{q.filteredValue&&q.filteredValue.length&&s.store.commit("filterChange",{column:q,values:q.filteredValue,silent:!0})}),s.$ready=!0});const E=(B,G)=>{if(!B)return;const q=Array.from(B.classList).filter(X=>!X.startsWith("is-scrolling-"));q.push(e.scrollX.value?G:"is-scrolling-none"),B.className=q.join(" ")},P=B=>{const{tableWrapper:G}=s.refs;E(G,B)},T=B=>{const{tableWrapper:G}=s.refs;return!!(G&&G.classList.contains(B))},L=function(){if(!s.refs.scrollBarRef)return;if(!e.scrollX.value){const Q="is-scrolling-none";T(Q)||P(Q);return}const B=s.refs.scrollBarRef.wrapRef;if(!B)return;const{scrollLeft:G,offsetWidth:q,scrollWidth:X}=B,{headerWrapper:K,footerWrapper:H}=s.refs;K&&(K.scrollLeft=G),H&&(H.scrollLeft=G),G>=X-q-1?P("is-scrolling-right"):P(G===0?"is-scrolling-left":"is-scrolling-middle")},I=()=>{s.refs.scrollBarRef&&(s.refs.scrollBarRef.wrapRef&&Bn(s.refs.scrollBarRef.wrapRef,"scroll",L,{passive:!0}),t.fit?Bs(s.vnode.el,V):Bn(window,"resize",V),Bs(s.refs.tableInnerWrapper,()=>{var B,G;V(),(G=(B=s.refs)==null?void 0:B.scrollBarRef)==null||G.update()}))},V=()=>{var Z,ae,ve,ke;const B=s.vnode.el;if(!s.$ready||!B)return;let G=!1;const{width:q,height:X,headerHeight:K}=l.value,H=d.value=B.offsetWidth;q!==H&&(G=!0);const Q=B.offsetHeight;(t.height||k.value)&&X!==Q&&(G=!0);const se=t.tableLayout==="fixed"?s.refs.headerWrapper:(Z=s.refs.tableHeaderRef)==null?void 0:Z.$el;t.showHeader&&(se==null?void 0:se.offsetHeight)!==K&&(G=!0),h.value=((ae=s.refs.tableWrapper)==null?void 0:ae.scrollHeight)||0,p.value=(se==null?void 0:se.scrollHeight)||0,m.value=((ve=s.refs.footerWrapper)==null?void 0:ve.offsetHeight)||0,b.value=((ke=s.refs.appendWrapper)==null?void 0:ke.offsetHeight)||0,f.value=h.value-p.value-m.value-b.value,G&&(l.value={width:H,height:Q,headerHeight:t.showHeader&&(se==null?void 0:se.offsetHeight)||0},S())},R=ji(),N=z(()=>{const{bodyWidth:B,scrollY:G,gutterWidth:q}=e;return B.value?`${B.value-(G.value?q:0)}px`:""}),F=z(()=>t.maxHeight?"fixed":t.tableLayout);return{isHidden:i,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:_,handleHeaderFooterMousewheel:x,tableSize:R,emptyBlockStyle:z(()=>{if(t.data&&t.data.length)return;let B="100%";t.height&&f.value&&(B=`${f.value}px`);const G=d.value;return{width:G?`${G}px`:"",height:B}}),resizeProxyVisible:r,bodyWidth:N,resizeState:l,doLayout:S,tableBodyStyles:C,tableLayout:F,scrollbarViewStyle:u,scrollbarStyle:z(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${p.value+m.value}px)`}:{maxHeight:`${+t.maxHeight-p.value-m.value}px`}:{})}}function _0e(t){let e;const n=()=>{const s=t.vnode.el.querySelector(".hidden-columns"),i={childList:!0,subtree:!0},o=t.store.states.updateOrderFns;e=new MutationObserver(()=>{o.forEach(r=>r())}),e.observe(s,i)};Vt(()=>{n()}),xl(()=>{e==null||e.disconnect()})}var w0e={data:{type:Array,default:()=>[]},size:go,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function aF(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:i})=>bn(i))&&(n=[]);const s=i=>{const o={key:`${t.tableLayout}_${i.id}`,style:{},name:void 0};return e?o.style={width:`${i.width}px`}:o.name=i.id,o};return vt("colgroup",{},n.map(i=>vt("col",s(i))))}aF.props=["columns","tableLayout"];const x0e=()=>{const t=J(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&wt(r)&&["Top","Left"].includes(o)&&a[`setScroll${o}`](r)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};let k0e=1;var C0e=he({name:"ElTable",directives:{Mousewheel:she},components:{TableHeader:r0e,TableBody:p0e,TableFooter:v0e,ElScrollbar:Ei,hColgroup:aF},props:w0e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=Xt(),n=Ne("table"),s=Gc("table"),i=ht();Et(Kr,i);const o=qve(i,t);i.store=o;const r=new Xve({store:i.store,table:i,fit:t.fit,showHeader:t.showHeader});i.layout=r;const a=z(()=>(o.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,sort:b,updateKeyChildren:_}=y0e(o),{isHidden:x,renderExpanded:k,setDragVisible:C,isGroup:S,handleMouseLeave:E,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:L,resizeProxyVisible:I,bodyWidth:V,resizeState:R,doLayout:N,tableBodyStyles:F,tableLayout:B,scrollbarViewStyle:G,scrollbarStyle:q}=b0e(t,r,o,i),{scrollBarRef:X,scrollTo:K,setScrollLeft:H,setScrollTop:Q}=x0e(),se=cd(N,50),Z=`${n.namespace.value}-table_${k0e++}`;i.tableId=Z,i.state={isGroup:S,resizeState:R,doLayout:N,debouncedUpdateLayout:se};const ae=z(()=>t.sumText??e("el.table.sumText")),ve=z(()=>t.emptyText??e("el.table.emptyText")),ke=z(()=>{var ie;return t.tooltipEffect??((ie=s.value)==null?void 0:ie.tooltipEffect)}),oe=z(()=>{var ie;return t.tooltipOptions??((ie=s.value)==null?void 0:ie.tooltipOptions)}),fe=z(()=>rF(o.states.originColumns.value)[0]);return _0e(i),_n(()=>{se.cancel()}),{ns:n,layout:r,store:o,columns:fe,handleHeaderFooterMousewheel:P,handleMouseLeave:E,tableId:Z,tableSize:T,isHidden:x,isEmpty:a,renderExpanded:k,resizeProxyVisible:I,resizeState:R,isGroup:S,bodyWidth:V,tableBodyStyles:F,emptyBlockStyle:L,debouncedUpdateLayout:se,setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,doLayout:N,sort:b,updateKeyChildren:_,t:e,setDragVisible:C,context:i,computedSumText:ae,computedEmptyText:ve,computedTooltipEffect:ke,computedTooltipOptions:oe,tableLayout:B,scrollbarViewStyle:G,scrollbarStyle:q,scrollBarRef:X,scrollTo:K,setScrollLeft:H,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const S0e=["data-prefix"],$0e={ref:"hiddenColumns",class:"hidden-columns"};function A0e(t,e,n,s,i,o){const r=W("hColgroup"),a=W("table-header"),l=W("table-body"),c=W("table-footer"),u=W("el-scrollbar"),d=xt("mousewheel");return v(),A("div",{ref:"tableWrapper",class:U([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:qe(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...h)=>t.handleMouseLeave&&t.handleMouseLeave(...h))},[g("div",{ref:"tableInnerWrapper",class:U(t.ns.e("inner-wrapper"))},[g("div",$0e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Oe((v(),A("div",{key:0,ref:"headerWrapper",class:U(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:U(t.ns.e("header")),style:qe(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[y(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),y(a,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),g("div",{ref:"bodyWrapper",class:U(t.ns.e("body-wrapper"))},[y(u,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:e[0]||(e[0]=h=>t.$emit("scroll",h))},{default:w(()=>[g("table",{ref:"tableBody",class:U(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:qe({width:t.bodyWidth,tableLayout:t.tableLayout})},[y(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(v(),D(a,{key:0,ref:"tableHeaderRef",class:U(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):O("v-if",!0),y(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.computedTooltipEffect,"tooltip-options":t.computedTooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(v(),D(c,{key:1,class:U(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):O("v-if",!0)],6),t.isEmpty?(v(),A("div",{key:0,ref:"emptyBlock",style:qe(t.emptyBlockStyle),class:U(t.ns.e("empty-block"))},[g("span",{class:U(t.ns.e("empty-text"))},[le(t.$slots,"empty",{},()=>[Y($(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),A("div",{key:1,ref:"appendWrapper",class:U(t.ns.e("append-wrapper"))},[le(t.$slots,"append")],2)):O("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),t.showSummary&&t.tableLayout==="fixed"?Oe((v(),A("div",{key:1,ref:"footerWrapper",class:U(t.ns.e("footer-wrapper"))},[g("table",{class:U(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:qe(t.tableBodyStyles)},[y(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),y(c,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[jt,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),A("div",{key:2,class:U(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],2),Oe(g("div",{ref:"resizeProxy",class:U(t.ns.e("column-resize-proxy"))},null,2),[[jt,t.resizeProxyVisible]])],46,S0e)}var E0e=hi(C0e,[["render",A0e]]);const M0e={selection:"table-column--selection",expand:"table__expand-column"},T0e={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},P0e=t=>M0e[t]||"",I0e={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return vt(Zt,{disabled:e(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection??void 0,modelValue:t.states.isAllSelected.value,ariaLabel:t.t("el.table.selectAllLabel")})},renderCell({row:t,column:e,store:n,$index:s}){return vt(Zt,{disabled:e.selectable?!e.selectable.call(null,t,s):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const s=t.index;return wt(s)?n=e+s:Je(s)&&(n=s(e)),vt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:s,$index:i}){var c,u;const{ns:o}=n,r=[o.e("expand-icon")];!t.renderExpand&&s&&r.push(o.em("expand-icon","expanded"));const a=function(d){d.stopPropagation(),n.toggleRowExpansion(e)},l=((u=(c=n.states.rowExpandable).value)==null?void 0:u.call(c,e,i))??!0;return l||r.push(o.is("disabled")),vt("button",{type:"button",disabled:!l,"aria-label":n.t(s?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":s,class:r,onClick:a},{default:()=>t.renderExpand?[t.renderExpand({expanded:s,expandable:l})]:[vt(_e,null,{default:()=>[vt(Rr)]})]})},sortable:!1,resizable:!1}};function L0e({row:t,column:e,$index:n}){var o;const s=e.property,i=s&&xc(t,s).value;return e&&e.formatter?e.formatter(t,e,i,n):((o=i==null?void 0:i.toString)==null?void 0:o.call(i))||""}function O0e({row:t,treeNode:e,store:n},s=!1){const{ns:i}=n;if(!e)return s?[vt("span",{class:i.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(vt("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),Kn(e.expanded)&&!e.noLazyChildren){const a=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=Rr;e.loading&&(l=Ff),o.push(vt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:r},{default:()=>[vt(_e,{class:i.is("loading",e.loading)},{default:()=>[vt(l)]})]}))}else o.push(vt("span",{class:i.e("placeholder")}));return o}function _A(t,e){return t.reduce((n,s)=>(n[s]=s,n),e)}function D0e(t,e){const n=ht();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=_A(o,r);Object.keys(a).forEach(l=>{const c=r[l];Ft(e,c)&&Ee(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=y5(u)),c==="minWidth"&&l==="realMinWidth"&&(d=QV(u)),n.columnConfig.value[c]=d,n.columnConfig.value[l]=d;const h=c==="fixed";t.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],r=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=_A(o,a);Object.keys(l).forEach(u=>{const d=a[u];Ft(e,d)&&Ee(()=>e[d],h=>{n.columnConfig.value[u]=h,(u==="filters"||u==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),r.forEach(u=>{Ft(t.value.props,u)&&Ee(()=>t.value.props[u],d=>{n.columnConfig.value.type!=="selection"&&bn(e[u])&&(n.columnConfig.value[u]=d)})});const c=Gc("table");c.value&&Ft(c.value,"showOverflowTooltip")&&Ee(()=>{var u;return(u=c.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!bn(e.showOverflowTooltip)||!bn(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function R0e(t,e,n){const s=ht(),i=J(""),o=J(!1),r=J(),a=J(),l=Ne("table");ml(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),ml(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:r.value,a.value});const c=z(()=>{let C=s.vnode.vParent||s.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),u=z(()=>{const{store:C}=s.parent;if(!C)return!1;const{treeData:S}=C.states,E=S.value;return E&&Object.keys(E).length>0}),d=J(y5(t.width)),h=J(QV(t.minWidth)),f=C=>(d.value&&(C.width=d.value),h.value&&(C.minWidth=h.value),!d.value&&h.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(bn(C.width)?C.minWidth:C.width),C),p=C=>{const S=C.type,E=I0e[S]||{};Object.keys(E).forEach(T=>{const L=E[T];T!=="className"&&!bn(L)&&(C[T]=L)});const P=P0e(S);if(P){const T=`${M(l.namespace)}-${P}`;C.className=C.className?`${C.className} ${T}`:T}return C},m=C=>{Ae(C)?C.forEach(E=>S(E)):S(C);function S(E){var P;((P=E==null?void 0:E.type)==null?void 0:P.name)==="ElTableColumn"&&(E.vParent=s)}};return{columnId:i,realAlign:r,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:C=>{t.renderHeader?Pt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):C.type!=="selection"&&(C.renderHeader=E=>{if(s.columnConfig.value.label,e.header){const P=e.header(E);if(nF(P))return vt(te,P)}return Y(C.label)}),e["filter-icon"]&&(C.renderFilterIcon=E=>le(e,"filter-icon",E)),e.expand&&(C.renderExpand=E=>le(e,"expand",E));let S=C.renderCell;return C.type==="expand"?(C.renderCell=E=>vt("div",{class:"cell"},[S(E)]),n.value.renderExpanded=E=>e.default?e.default(E):e.default):(S=S||L0e,C.renderCell=E=>{let P=null;if(e.default){const R=e.default(E);P=R.some(N=>N.type!==Xn)?R:S(E)}else P=S(E);const{columns:T}=n.value.store.states,L=T.value.findIndex(R=>R.type==="default"),I=O0e(E,u.value&&E.cellIndex===L),V={class:"cell",style:{}};return C.showOverflowTooltip&&(V.class=`${V.class} ${M(l.namespace)}-tooltip`,V.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),m(P),vt("div",V,[I,P])}),C},getPropsData:(...C)=>C.reduce((S,E)=>(Ae(E)&&E.forEach(P=>{S[P]=t[P]}),S),{}),getColumnElIndex:(C,S)=>Array.prototype.indexOf.call(C,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",s.columnConfig.value)}}}var V0e={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let F0e=1;var N0e=he({name:"ElTableColumn",components:{ElCheckbox:Zt},props:V0e,setup(t,{slots:e}){const n=ht(),s=Gc("table"),i=J({}),o=z(()=>{let C=n.parent;for(;C&&!C.tableId;)C=C.parent;return C}),{registerNormalWatchers:r,registerComplexWatchers:a}=D0e(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:b,realAlign:_,updateColumnOrder:x}=R0e(t,e,o),k=d.value;l.value=`${"tableId"in k&&k.tableId||"columnId"in k&&k.columnId}_column_${F0e++}`,Sd(()=>{var I,V;c.value=o.value!==k;const C=t.type||"default",S=t.sortable===""?!0:t.sortable,E=C==="selection"?!1:bn(t.showOverflowTooltip)?k.props.showOverflowTooltip??((I=s.value)==null?void 0:I.showOverflowTooltip):t.showOverflowTooltip,P=bn(t.tooltipFormatter)?k.props.tooltipFormatter??((V=s.value)==null?void 0:V.tooltipFormatter):t.tooltipFormatter,T={...T0e[C],id:l.value,type:C,property:t.prop||t.property,align:_,headerAlign:u,showOverflowTooltip:E,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:t.index,rawColumnKey:n.vnode.key};let L=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);L=Dve(T,L),L=Vve(p,h,f)(L),i.value=L,r(),a()}),Vt(()=>{var P,T;const C=d.value,S=c.value?(P=C.vnode.el)==null?void 0:P.children:(T=C.refs.hiddenColumns)==null?void 0:T.children,E=()=>b(S||[],n.vnode.el);i.value.getColumnIndex=E,E()>-1&&o.value.store.commit("insertColumn",i.value,c.value?"columnConfig"in C&&C.columnConfig.value:null,x)}),_n(()=>{const C=i.value.getColumnIndex;(C?C():-1)>-1&&o.value.store.commit("removeColumn",i.value,c.value?"columnConfig"in k&&k.columnConfig.value:null,x)}),n.columnId=l.value,n.columnConfig=i},render(){var t,e,n;try{const s=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),i=[];if(Ae(s))for(const o of s)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?i.push(o):o.type===te&&Ae(o.children)&&o.children.forEach(r=>{(r==null?void 0:r.patchFlag)!==1024&&!Ke(r==null?void 0:r.children)&&i.push(r)});return vt("div",i)}catch{return vt("div",[])}}}),lF=N0e;const Zr=Wt(E0e,{TableColumn:lF}),Jr=Ps(lF),n2=Symbol("tabsRootContextKey"),B0e=We({tabs:{type:de(Array),default:()=>ii([])},tabRefs:{type:de(Object),default:()=>ii({})}}),wA="ElTabBar";var z0e=he({name:wA,__name:"tab-bar",props:B0e,setup(t,{expose:e}){const n=t,s=He(n2);s||mo(wA,"<el-tabs><el-tab-bar /></el-tabs>");const i=Ne("tabs"),o=J(),r=J(),a=z(()=>{var f;return bn(s.props.defaultValue)||!!((f=r.value)!=null&&f.transform)}),l=()=>{let f=0,p=0;const m=["top","bottom"].includes(s.props.tabPosition)?"width":"height",b=m==="width"?"x":"y",_=b==="x"?"left":"top";return n.tabs.every(x=>{if(bn(x.paneName))return!1;const k=n.tabRefs[x.paneName];if(!k)return!1;if(!x.active)return!0;f=k[`offset${_w(_)}`],p=k[`client${_w(m)}`];const C=window.getComputedStyle(k);return m==="width"&&(p-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),f+=Number.parseFloat(C.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${_w(b)}(${f}px)`}},c=()=>r.value=l(),u=[],d=()=>{u.forEach(f=>f.stop()),u.length=0,Object.values(n.tabRefs).forEach(f=>{u.push(Bs(f,c))})};Ee(()=>n.tabs,async()=>{await st(),c(),d()},{immediate:!0});const h=Bs(o,()=>c());return _n(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:o,update:c}),(f,p)=>a.value?(v(),A("div",{key:0,ref_key:"barRef",ref:o,class:U([M(i).e("active-bar"),M(i).is(M(s).props.tabPosition)]),style:qe(r.value)},null,6)):O("v-if",!0)}}),H0e=z0e;const U0e=We({panes:{type:de(Array),default:()=>ii([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),j0e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},xA="ElTabNav",W0e=he({name:xA,props:U0e,emits:j0e,setup(t,{expose:e,emit:n}){const s=He(n2);s||mo(xA,"<el-tabs><tab-nav /></el-tabs>");const i=Ne("tabs"),o=yie(),r=wie(),a=J(),l=J(),c=J(),u=J({}),d=J(),h=J(!1),f=J(0),p=J(!1),m=J(!0),b=J(!1),_=Zn(),x=z(()=>["top","bottom"].includes(s.props.tabPosition)),k=z(()=>x.value?"width":"height"),C=z(()=>{const se=k.value==="width"?"X":"Y";return{transition:b.value?"none":void 0,transform:`translate${se}(-${f.value}px)`}}),{width:S,height:E}=o$(a),{width:P,height:T}=o$(l,{width:0,height:0},{box:"border-box"}),L=z(()=>x.value?S.value:E.value),I=z(()=>x.value?P.value:T.value),{onWheel:V}=yve({atStartEdge:z(()=>f.value<=0),atEndEdge:z(()=>I.value-f.value<=L.value),layout:z(()=>x.value?"horizontal":"vertical")},se=>{f.value=LO(f.value+se,0,I.value-L.value)}),R=se=>{b.value=!0,V(se),jg(()=>{b.value=!1})},N=()=>{if(!a.value)return;const se=a.value.getBoundingClientRect()[k.value],Z=f.value;Z&&(f.value=Z>se?Z-se:0)},F=()=>{if(!a.value||!l.value)return;const se=l.value.getBoundingClientRect()[k.value],Z=a.value.getBoundingClientRect()[k.value],ae=f.value;nf(se-ae,Z)&&(f.value=se-ae>Z*2?ae+Z:se-Z)},B=async()=>{const se=l.value;if(!h.value||!c.value||!a.value||!se)return;await st();const Z=u.value[t.currentName];if(!Z)return;const ae=a.value,ve=Z.getBoundingClientRect(),ke=ae.getBoundingClientRect(),oe=ke.left+1,fe=ke.right-1,ie=se.getBoundingClientRect(),re=x.value?ie.width-ke.width:ie.height-ke.height,Se=f.value;let je=Se;x.value?(ve.left<oe&&(je=Se-(oe-ve.left)),ve.right>fe&&(je=Se+ve.right-fe)):(ve.top<ke.top&&(je=Se-(ke.top-ve.top)),ve.bottom>ke.bottom&&(je=Se+(ve.bottom-ke.bottom))),je=Math.max(je,0),f.value=Math.min(je,re)},G=()=>{var ve;if(!l.value||!a.value)return;t.stretch&&((ve=d.value)==null||ve.update());const se=l.value.getBoundingClientRect()[k.value],Z=a.value.getBoundingClientRect()[k.value],ae=f.value;Z<se?(h.value=h.value||{},h.value.prev=ae,h.value.next=nf(se,ae+Z),nf(Z,se-ae)&&(f.value=se-Z)):(h.value=!1,ae>0&&(f.value=0))},q=se=>{const Z=hs(se);let ae=0;switch(Z){case Ye.left:case Ye.up:ae=-1;break;case Ye.right:case Ye.down:ae=1;break;default:return}const ve=Array.from(se.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let ke=ve.indexOf(se.target)+ae;ke<0?ke=ve.length-1:ke>=ve.length&&(ke=0),ve[ke].focus({preventScroll:!0}),ve[ke].click(),X()},X=()=>{m.value&&(p.value=!0)},K=()=>p.value=!1,H=(se,Z)=>{u.value[Z]=se},Q=async()=>{var se;await st(),(se=u.value[t.currentName])==null||se.focus({preventScroll:!0})};return Ee(o,se=>{se==="hidden"?m.value=!1:se==="visible"&&setTimeout(()=>m.value=!0,50)}),Ee(r,se=>{se?setTimeout(()=>m.value=!0,50):m.value=!1}),Bs(c,()=>{jg(G)}),Vt(()=>setTimeout(()=>B(),0)),wl(()=>G()),e({scrollToActiveTab:B,removeFocus:K,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Bm(_)}),()=>{const se=h.value?[y("span",{class:[i.e("nav-prev"),i.is("disabled",!h.value.prev)],onClick:N},[y(_e,null,{default:()=>[y(dd,null,null)]})]),y("span",{class:[i.e("nav-next"),i.is("disabled",!h.value.next)],onClick:F},[y(_e,null,{default:()=>[y(Rr,null,null)]})])]:null,Z=t.panes.map((ae,ve)=>{var ee,ne;const ke=ae.uid,oe=ae.props.disabled,fe=ae.props.name??ae.index??`${ve}`,ie=!oe&&(ae.isClosable||ae.props.closable!==!1&&t.editable);ae.index=`${ve}`;const re=ie?y(_e,{class:"is-icon-close",onClick:pe=>n("tabRemove",ae,pe)},{default:()=>[y(br,null,null)]}):null,Se=((ne=(ee=ae.slots).label)==null?void 0:ne.call(ee))||ae.props.label,je=!oe&&ae.active?t.tabindex??s.props.tabindex:-1;return y("div",{ref:pe=>H(pe,fe),class:[i.e("item"),i.is(s.props.tabPosition),i.is("active",ae.active),i.is("disabled",oe),i.is("closable",ie),i.is("focus",p.value)],id:`tab-${fe}`,key:`tab-${ke}`,"aria-controls":`pane-${fe}`,role:"tab","aria-selected":ae.active,tabindex:je,onFocus:()=>X(),onBlur:()=>K(),onClick:pe=>{K(),n("tabClick",ae,fe,pe)},onKeydown:pe=>{const $e=hs(pe);ie&&($e===Ye.delete||$e===Ye.backspace)&&n("tabRemove",ae,pe)}},[Se,re])});return _.value,y("div",{ref:c,class:[i.e("nav-wrap"),i.is("scrollable",!!h.value),i.is(s.props.tabPosition)]},[se,y("div",{class:i.e("nav-scroll"),ref:a},[t.panes.length>0?y("div",{class:[i.e("nav"),i.is(s.props.tabPosition),i.is("stretch",t.stretch&&["top","bottom"].includes(s.props.tabPosition))],ref:l,style:C.value,role:"tablist",onKeydown:q,onWheel:R},[t.type?null:y(H0e,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Z]):null])])}}}),Y0e=We({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:de(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Nw=t=>Ke(t)||wt(t),q0e={[Rt]:t=>Nw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Nw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Nw(t),tabAdd:()=>!0},G0e=he({name:"ElTabs",props:Y0e,emits:q0e,setup(t,{emit:e,slots:n,expose:s}){const i=Ne("tabs"),o=z(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Lre(ht(),"ElTabPane"),u=J(),d=J((bn(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(x,k=!1)=>{var C,S,E,P;if(!(d.value===x||bn(x)))try{let T;if(t.beforeLeave){const L=t.beforeLeave(x,d.value);T=L instanceof Promise?await L:L}else T=!0;if(T!==!1){const L=(C=r.value.find(I=>I.paneName===d.value))==null?void 0:C.isFocusInsidePane();d.value=x,k&&(e(Rt,x),e("tabChange",x)),(E=(S=u.value)==null?void 0:S.removeFocus)==null||E.call(S),L&&((P=u.value)==null||P.focusActiveTab())}}catch{}},f=(x,k,C)=>{x.props.disabled||(e("tabClick",x,C),h(k,!0))},p=(x,k)=>{x.props.disabled||bn(x.props.name)||(k.stopPropagation(),e("edit",x.props.name,"remove"),e("tabRemove",x.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},b=x=>{const k=hs(x);[Ye.enter,Ye.numpadEnter].includes(k)&&m()},_=x=>{const k=x.el.firstChild,C=["bottom","right"].includes(t.tabPosition)?x.children[0].el:x.children[1].el;k!==C&&k.before(C)};return Ee(()=>t.modelValue,x=>h(x)),Ee(d,async()=>{var x;await st(),(x=u.value)==null||x.scrollToActiveTab()}),Et(n2,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),s({currentName:d,get tabNavRef(){return F_(u.value,["scheduleRender"])}}),()=>{const x=n["add-icon"],k=t.editable||t.addable?y("div",{class:[i.e("new-tab"),o.value&&i.e("new-tab-vertical")],tabindex:t.tabindex,onClick:m,onKeydown:b},[x?le(n,"add-icon"):y(_e,{class:i.is("icon-plus")},{default:()=>[y(W4,null,null)]})]):null,C=()=>y(W0e,{ref:u,currentName:d.value,editable:t.editable,type:t.type,panes:r.value,stretch:t.stretch,onTabClick:f,onTabRemove:p},null),S=y("div",{class:[i.e("header"),o.value&&i.e("header-vertical"),i.is(t.tabPosition)]},[y(c,null,{default:C,$stable:!0}),k]),E=y("div",{class:i.e("content")},[le(n,"default")]);return y("div",{class:[i.b(),i.m(t.tabPosition),{[i.m("card")]:t.type==="card",[i.m("border-card")]:t.type==="border-card"}],onVnodeMounted:_,onVnodeUpdated:_},[E,S])}}}),X0e=We({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),K0e=["id","aria-hidden","aria-labelledby"],kA="ElTabPane";var Z0e=he({name:kA,__name:"tab-pane",props:X0e,setup(t){const e=t,n=ht(),s=Gi(),i=He(n2);i||mo(kA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Ne("tab-pane"),r=J(),a=J(),l=z(()=>e.closable??i.props.closable),c=z(()=>i.currentName.value===(e.name??a.value)),u=J(c.value),d=z(()=>e.name??a.value),h=z(()=>!e.lazy||u.value||c.value),f=()=>{var m;return(m=r.value)==null?void 0:m.contains(document.activeElement)};Ee(c,m=>{m&&(u.value=!0)});const p=Dn({uid:n.uid,getVnode:()=>n.vnode,slots:s,props:e,paneName:d,active:c,index:a,isClosable:l,isFocusInsidePane:f});return i.registerPane(p),_n(()=>{i.unregisterPane(p)}),w_(()=>{var m;s.label&&((m=i.nav$.value)==null||m.scheduleRender())}),(m,b)=>h.value?Oe((v(),A("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:r,class:U(M(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[le(m.$slots,"default")],10,K0e)),[[jt,c.value]]):O("v-if",!0)}}),cF=Z0e;const s2=Wt(G0e,{TabPane:cF}),i2=Ps(cF),Ck="00:30",J0e=We({format:{type:String,default:"HH:mm"},modelValue:{type:de(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:de(String),default:"light"},clearable:{type:Boolean,default:!0},size:go,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:Ck},minTime:{type:de(String)},maxTime:{type:de(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:de([String,Object]),default:()=>KD},clearIcon:{type:de([String,Object]),default:()=>Pd},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},...R1}),nl=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const s=Number.parseInt(e[1],10),i=t.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:s}}return null},Bw=(t,e)=>{const n=nl(t);if(!n)return-1;const s=nl(e);if(!s)return-1;const i=n.minutes+n.hours*60,o=s.minutes+s.hours*60;return i===o?0:i>o?1:-1},CA=t=>`${t}`.padStart(2,"0"),xh=t=>`${CA(t.hours)}:${CA(t.minutes)}`,Q0e=(t,e)=>{const n=nl(t);if(!n)return"";const s=nl(e);if(!s)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=s.minutes,i.hours+=s.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,xh(i)};var eye=he({name:"ElTimeSelect",__name:"time-select",props:J0e,emits:[En,"blur","focus","clear",Rt],setup(t,{expose:e}){dt.extend(KR);const{Option:n}=Qt,s=t,i=Ne("input"),o=J(),r=Cs(),{lang:a}=Xt(),l=z(()=>s.modelValue),c=z(()=>{const _=nl(s.start);return _?xh(_):null}),u=z(()=>{const _=nl(s.end);return _?xh(_):null}),d=z(()=>{const _=nl(s.minTime||"");return _?xh(_):null}),h=z(()=>{const _=nl(s.maxTime||"");return _?xh(_):null}),f=z(()=>{const _=nl(s.step),x=!_||_.hours<0||_.minutes<0||Number.isNaN(_.hours)||Number.isNaN(_.minutes)||_.hours===0&&_.minutes===0;return x&&Pt("ElTimeSelect",`invalid step, fallback to default step (${Ck}).`),x?Ck:xh(_)}),p=z(()=>{var k;const _=[],x=(C,S)=>{_.push({value:C,rawValue:S,disabled:Bw(S,d.value||"-1:-1")<=0||Bw(S,h.value||"100:100")>=0})};if(s.start&&s.end&&s.step){let C=c.value,S;for(;C&&u.value&&Bw(C,u.value)<=0;)S=dt(C,"HH:mm").locale(a.value).format(s.format),x(S,C),C=Q0e(C,f.value);s.includeEndTime&&u.value&&((k=_[_.length-1])==null?void 0:k.rawValue)!==u.value&&x(dt(u.value,"HH:mm").locale(a.value).format(s.format),u.value)}return _});return e({blur:()=>{var _,x;(x=(_=o.value)==null?void 0:_.blur)==null||x.call(_)},focus:()=>{var _,x;(x=(_=o.value)==null?void 0:_.focus)==null||x.call(_)}}),(_,x)=>(v(),D(M(Qt),{ref_key:"select",ref:o,name:t.name,"model-value":l.value,disabled:M(r),clearable:t.clearable,"clear-icon":t.clearIcon,size:t.size,effect:t.effect,placeholder:t.placeholder,"default-first-option":"",filterable:t.editable,"empty-values":t.emptyValues,"value-on-clear":t.valueOnClear,"popper-class":t.popperClass,"popper-style":t.popperStyle,"onUpdate:modelValue":x[0]||(x[0]=k=>_.$emit(M(Rt),k)),onChange:x[1]||(x[1]=k=>_.$emit(M(En),k)),onBlur:x[2]||(x[2]=k=>_.$emit("blur",k)),onFocus:x[3]||(x[3]=k=>_.$emit("focus",k)),onClear:x[4]||(x[4]=()=>_.$emit("clear"))},{prefix:w(()=>[t.prefixIcon?(v(),D(M(_e),{key:0,class:U(M(i).e("prefix-icon"))},{default:w(()=>[(v(),D(kt(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:w(()=>[(v(!0),A(te,null,we(p.value,k=>(v(),D(M(n),{key:k.value,label:k.value,value:k.value,disabled:k.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),tye=eye;const k5=Wt(tye),nye="ElUpload";var sye=class extends Error{constructor(t,e,n,s){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=s}};function SA(t,e,n){let s;return n.response?s=`${n.response.error||n.response}`:n.responseText?s=`${n.responseText}`:s=`fail to ${e.method} ${t} ${n.status}`,new sye(s,n.status,e.method,t)}function iye(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const oye=t=>{typeof XMLHttpRequest>"u"&&mo(nye,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const r=o;r.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(r)});const s=new FormData;if(t.data)for(const[o,r]of Object.entries(t.data))Ae(r)?r.length===2&&r[0]instanceof Blob&&Ke(r[1])?s.append(o,r[0],r[1]):r.forEach(a=>{s.append(o,a)}):s.append(o,r);s.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(SA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(SA(n,t,e));t.onSuccess(iye(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};if(i instanceof Headers)i.forEach((o,r)=>e.setRequestHeader(r,o));else for(const[o,r]of Object.entries(i))li(r)||e.setRequestHeader(o,String(r));return e.send(s),e},uF=["text","picture","picture-card"];let rye=1;const Sk=()=>Date.now()+rye++,dF=We({action:{type:String,default:"#"},headers:{type:de(Object)},method:{type:String,default:"post"},data:{type:de([Object,Function,Promise]),default:()=>ii({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:de(Array),default:()=>ii([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:uF,default:"text"},httpRequest:{type:de(Function),default:oye},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),aye=We({...dF,beforeUpload:{type:de(Function),default:Lt},beforeRemove:{type:de(Function)},onRemove:{type:de(Function),default:Lt},onChange:{type:de(Function),default:Lt},onPreview:{type:de(Function),default:Lt},onSuccess:{type:de(Function),default:Lt},onProgress:{type:de(Function),default:Lt},onError:{type:de(Function),default:Lt},onExceed:{type:de(Function),default:Lt},crossorigin:{type:de(String)}}),hF=Symbol("uploadContextKey"),lye=We({files:{type:de(Array),default:()=>ii([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:de(Function),default:Lt},listType:{type:String,values:uF,default:"text"},crossorigin:{type:de(String)}}),cye={remove:t=>!!t},uye=We({...dF,beforeUpload:{type:de(Function),default:Lt},onRemove:{type:de(Function),default:Lt},onStart:{type:de(Function),default:Lt},onSuccess:{type:de(Function),default:Lt},onProgress:{type:de(Function),default:Lt},onError:{type:de(Function),default:Lt},onExceed:{type:de(Function),default:Lt}}),dye=We({disabled:{type:Boolean,default:void 0},directory:Boolean}),hye={file:t=>Ae(t)},fye=["tabindex","aria-disabled","onKeydown"],pye=["src","crossorigin"],mye=["onClick"],gye=["title"],vye=["onClick"],yye=["onClick"];var bye=he({name:"ElUploadList",__name:"upload-list",props:lye,emits:cye,setup(t,{emit:e}){const n=t,s=e,{t:i}=Xt(),o=Ne("upload"),r=Ne("icon"),a=Ne("list"),l=Cs(),c=J(!1),u=z(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=h=>{s("remove",h)};return(h,f)=>(v(),D(S_,{tag:"ul",class:U(u.value),name:M(a).b()},{default:w(()=>[(v(!0),A(te,null,we(t.files,(p,m)=>(v(),A("li",{key:p.uid||p.name,class:U([M(o).be("list","item"),M(o).is(p.status),{focusing:c.value}]),tabindex:M(l)?void 0:0,"aria-disabled":M(l),role:"button",onKeydown:Nt(b=>!M(l)&&d(p),["delete"]),onFocus:f[0]||(f[0]=b=>c.value=!0),onBlur:f[1]||(f[1]=b=>c.value=!1),onClick:f[2]||(f[2]=b=>c.value=!1)},[le(h.$slots,"default",{file:p,index:m},()=>[t.listType==="picture"||p.status!=="uploading"&&t.listType==="picture-card"?(v(),A("img",{key:0,class:U(M(o).be("list","item-thumbnail")),src:p.url,crossorigin:t.crossorigin,alt:""},null,10,pye)):O("v-if",!0),p.status==="uploading"||t.listType!=="picture-card"?(v(),A("div",{key:1,class:U(M(o).be("list","item-info"))},[g("a",{class:U(M(o).be("list","item-name")),onClick:Be(b=>t.handlePreview(p),["prevent"])},[y(M(_e),{class:U(M(r).m("document"))},{default:w(()=>[y(M(V1))]),_:1},8,["class"]),g("span",{class:U(M(o).be("list","item-file-name")),title:p.name},$(p.name),11,gye)],10,mye),p.status==="uploading"?(v(),D(M(t2),{key:0,type:t.listType==="picture-card"?"circle":"line","stroke-width":t.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:qe(t.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):O("v-if",!0)],2)):O("v-if",!0),g("label",{class:U(M(o).be("list","item-status-label"))},[t.listType==="text"?(v(),D(M(_e),{key:0,class:U([M(r).m("upload-success"),M(r).m("circle-check")])},{default:w(()=>[y(M(U4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(M(_e),{key:1,class:U([M(r).m("upload-success"),M(r).m("check")])},{default:w(()=>[y(M(H4))]),_:1},8,["class"])):O("v-if",!0)],2),M(l)?O("v-if",!0):(v(),D(M(_e),{key:2,class:U(M(r).m("close")),"aria-label":M(i)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>d(p),onKeydown:Nt(Be(b=>d(p),["prevent"]),["enter","space"])},{default:w(()=>[y(M(br))]),_:1},8,["class","aria-label","onClick","onKeydown"])),M(l)?O("v-if",!0):(v(),A("i",{key:3,class:U(M(r).m("close-tip"))},$(M(i)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),A("span",{key:4,class:U(M(o).be("list","item-actions"))},[g("span",{class:U(M(o).be("list","item-preview")),onClick:b=>t.handlePreview(p)},[y(M(_e),{class:U(M(r).m("zoom-in"))},{default:w(()=>[y(M(oR))]),_:1},8,["class"])],10,vye),M(l)?O("v-if",!0):(v(),A("span",{key:0,class:U(M(o).be("list","item-delete")),onClick:b=>d(p)},[y(M(_e),{class:U(M(r).m("delete"))},{default:w(()=>[y(M(JD))]),_:1},8,["class"])],10,yye))],2)):O("v-if",!0)])],42,fye))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),$A=bye;const AA="ElUploadDrag";var _ye=he({name:AA,__name:"upload-dragger",props:dye,emits:hye,setup(t,{emit:e}){const n=t,s=e;He(hF)||mo(AA,"usage: <el-upload><el-upload-dragger /></el-upload>");const i=Ne("upload"),o=J(!1),r=Cs(),a=h=>new Promise((f,p)=>h.file(f,p)),l=async h=>{try{if(h.isFile){const f=await a(h);return f.isDirectory=!1,[f]}if(h.isDirectory){const f=h.createReader(),p=()=>new Promise((x,k)=>f.readEntries(x,k)),m=[];let b=await p();for(;b.length>0;)m.push(...b),b=await p();const _=m.map(x=>l(x).catch(()=>[]));return ub(await Promise.all(_))}}catch{return[]}return[]},c=async h=>{if(r.value)return;o.value=!1,h.stopPropagation();const f=Array.from(h.dataTransfer.files),p=h.dataTransfer.items||[];if(n.directory){const m=Array.from(p).map(b=>{var _;return(_=b==null?void 0:b.webkitGetAsEntry)==null?void 0:_.call(b)}).filter(b=>b);s("file",ub(await Promise.all(m.map(l))));return}f.forEach((m,b)=>{var x,k;const _=(k=(x=p[b])==null?void 0:x.webkitGetAsEntry)==null?void 0:k.call(x);_&&(m.isDirectory=_.isDirectory)}),s("file",f)},u=()=>{r.value||(o.value=!0)},d=h=>{h.currentTarget.contains(h.relatedTarget)||(o.value=!1)};return(h,f)=>(v(),A("div",{class:U([M(i).b("dragger"),M(i).is("dragover",o.value)]),onDrop:Be(c,["prevent"]),onDragover:Be(u,["prevent"]),onDragleave:Be(d,["prevent"])},[le(h.$slots,"default")],34))}}),wye=_ye;const xye=["tabindex","aria-disabled","onKeydown"],kye=["name","disabled","multiple","accept","webkitdirectory"];var Cye=he({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:uye,setup(t,{expose:e}){const n=t,s=Ne("upload"),i=Cs(),o=Zn({}),r=Zn(),a=m=>{if(m.length===0)return;const{autoUpload:b,limit:_,fileList:x,multiple:k,onStart:C,onExceed:S}=n;if(_&&x.length+m.length>_){S(m,x);return}k||(m=m.slice(0,1));for(const E of m){const P=E;P.uid=Sk(),C(P),b&&l(P)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let b,_={};try{const k=n.data,C=n.beforeUpload(m);_=id(n.data)?Wu(n.data):n.data,b=await C,id(n.data)&&zi(k,_)&&(_=Wu(n.data))}catch{b=!1}if(b===!1){n.onRemove(m);return}let x=m;b instanceof Blob&&(b instanceof File?x=b:x=new File([b],m.name,{type:m.type})),u(Object.assign(x,{uid:m.uid}),_)},c=async(m,b)=>Je(m)?m(b):m,u=async(m,b)=>{const{headers:_,data:x,method:k,withCredentials:C,name:S,action:E,onProgress:P,onSuccess:T,onError:L,httpRequest:I}=n;try{b=await c(b??x,m)}catch{n.onRemove(m);return}const{uid:V}=m,R={headers:_||{},withCredentials:C,file:m,data:b,method:k,filename:S,action:E,onProgress:F=>{P(F,m)},onSuccess:F=>{T(F,m),delete o.value[V]},onError:F=>{L(F,m),delete o.value[V]}},N=I(R);o.value[V]=N,N instanceof Promise&&N.then(R.onSuccess,R.onError)},d=m=>{const b=m.target.files;b&&a(Array.from(b))},h=()=>{i.value||(r.value.value="",r.value.click())},f=()=>{h()};return e({abort:m=>{Jse(o.value).filter(m?([b])=>String(m.uid)===b:()=>!0).forEach(([b,_])=>{_ instanceof XMLHttpRequest&&_.abort(),delete o.value[b]})},upload:l}),(m,b)=>(v(),A("div",{class:U([M(s).b(),M(s).m(t.listType),M(s).is("drag",t.drag),M(s).is("disabled",M(i))]),tabindex:M(i)?void 0:0,"aria-disabled":M(i),role:"button",onClick:h,onKeydown:Nt(Be(f,["self"]),["enter","space"])},[t.drag?(v(),D(wye,{key:0,disabled:M(i),directory:t.directory,onFile:a},{default:w(()=>[le(m.$slots,"default")]),_:3},8,["disabled","directory"])):le(m.$slots,"default",{key:1}),g("input",{ref_key:"inputRef",ref:r,class:U(M(s).e("input")),name:t.name,disabled:M(i),multiple:t.multiple,accept:t.accept,webkitdirectory:t.directory||void 0,type:"file",onChange:d,onClick:b[0]||(b[0]=Be(()=>{},["stop"]))},null,42,kye)],42,xye))}}),EA=Cye;const MA="ElUpload",TA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},Sye=(t,e)=>{const n=_ie(t,"fileList",void 0,{passive:!0}),s=p=>n.value.find(m=>m.uid===p.uid);function i(p){var m;(m=e.value)==null||m.abort(p)}function o(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}function r(p){n.value=n.value.filter(m=>m.uid!==p.uid)}const a=p=>{st(()=>t.onChange(p,n.value))},l=(p,m)=>{const b=s(m);b&&(console.error(p),b.status="fail",r(b),t.onError(p,b,n.value),a(b))},c=(p,m)=>{const b=s(m);b&&(t.onProgress(p,b,n.value),b.status="uploading",b.percentage=Math.round(p.percent))},u=(p,m)=>{const b=s(m);b&&(b.status="success",b.response=p,t.onSuccess(p,b,n.value),a(b))},d=p=>{li(p.uid)&&(p.uid=Sk());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(b){Pt(MA,b.message),t.onError(b,m,n.value)}n.value=[...n.value,m],a(m)},h=async p=>{const m=p instanceof File?s(p):p;m||mo(MA,"file to be removed not found");const b=_=>{i(_),r(_),t.onRemove(_,n.value),TA(_)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&b(m):b(m)};function f(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=e.value)==null?void 0:m.upload(p))})}return Ee(()=>t.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:b,url:_}=m;if(!_&&b)try{m.url=URL.createObjectURL(b)}catch(x){t.onError(x,m,n.value)}return m}))}),Ee(n,p=>{for(const m of p)m.uid||(m.uid=Sk()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:o,handleError:l,handleProgress:c,handleStart:d,handleSuccess:u,handleRemove:h,submit:f,revokeFileObjectURL:TA}};var $ye=he({name:"ElUpload",__name:"upload",props:aye,setup(t,{expose:e}){const n=t,s=Cs(),i=Zn(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=Sye(n,i),m=z(()=>n.listType==="picture-card"),b=z(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return _n(()=>{l.value.forEach(p)}),Et(hF,{accept:Cn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(_,x)=>(v(),A("div",null,[m.value&&t.showFileList?(v(),D($A,{key:0,disabled:M(s),"list-type":t.listType,files:M(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:M(d)},ks({append:w(()=>[y(EA,Kt({ref_key:"uploadRef",ref:i},b.value),{default:w(()=>[_.$slots.trigger?le(_.$slots,"trigger",{key:0}):O("v-if",!0),!_.$slots.trigger&&_.$slots.default?le(_.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[_.$slots.file?{name:"default",fn:w(({file:k,index:C})=>[le(_.$slots,"file",{file:k,index:C})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0),!m.value||m.value&&!t.showFileList?(v(),D(EA,Kt({key:1,ref_key:"uploadRef",ref:i},b.value),{default:w(()=>[_.$slots.trigger?le(_.$slots,"trigger",{key:0}):O("v-if",!0),!_.$slots.trigger&&_.$slots.default?le(_.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),_.$slots.trigger?le(_.$slots,"default",{key:2}):O("v-if",!0),le(_.$slots,"tip"),!m.value&&t.showFileList?(v(),D($A,{key:3,disabled:M(s),"list-type":t.listType,files:M(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:M(d)},ks({_:2},[_.$slots.file?{name:"default",fn:w(({file:k,index:C})=>[le(_.$slots,"file",{file:k,index:C})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}}),Aye=$ye;const j1=Wt(Aye);function Eye(t,e){let n;const s=J(!1),i=Dn({...t,originalPosition:"",originalOverflow:"",visible:!1});function o(h){i.text=h}function r(){const h=i.parent,f=d.ns;if(!h.vLoadingAddClassList){let p=h.getAttribute("loading-number");p=Number.parseInt(p)-1,p?h.setAttribute("loading-number",p.toString()):(ka(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),ka(h,f.bm("parent","hidden"))}a(),u.unmount()}function a(){var h,f;(f=(h=d.$el)==null?void 0:h.parentNode)==null||f.removeChild(d.$el)}function l(){var h;t.beforeClose&&!t.beforeClose()||(s.value=!0,clearTimeout(n),n=setTimeout(c,400),i.visible=!1,(h=t.closed)==null||h.call(t))}function c(){if(!s.value)return;const h=i.parent;s.value=!1,h.vLoadingAddClassList=void 0,r()}const u=Mg(he({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=t5("loading");return f({ns:p,zIndex:m}),()=>{const b=i.spinner||i.svg,_=vt("svg",{class:"circular",viewBox:i.svgViewBox?i.svgViewBox:"0 0 50 50",...b?{innerHTML:b}:{}},[vt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),x=i.text?vt("p",{class:p.b("text")},[i.text]):void 0;return vt(Vo,{name:p.b("fade"),onAfterLeave:c},{default:w(()=>[Oe(y("div",{style:{backgroundColor:i.background||""},class:[p.b("mask"),i.customClass,p.is("fullscreen",i.fullscreen)]},[vt("div",{class:p.b("spinner")},[_,x])]),[[jt,i.visible]])])})}}}));Object.assign(u._context,e??{});const d=u.mount(document.createElement("div"));return{...po(i),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:d,get $el(){return d.$el}}}let s0;const sf=function(t={},e){if(!qt)return;const n=Mye(t);if(n.fullscreen&&s0)return s0;const s=Eye({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(s0=void 0)}},e??sf._context);Tye(n,n.parent,s),PA(n,n.parent,s),n.parent.vLoadingAddClassList=()=>PA(n,n.parent,s);let i=n.parent.getAttribute("loading-number");return i?i=`${Number.parseInt(i)+1}`:i="1",n.parent.setAttribute("loading-number",i),n.parent.appendChild(s.$el),st(()=>s.visible.value=n.visible),n.fullscreen&&(s0=s),s},Mye=t=>{let e;return Ke(t.target)?e=document.querySelector(t.target)??document.body:e=t.target||document.body,{parent:e===document.body||t.body?document.body:e,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:e===document.body&&(t.fullscreen??!0),lock:t.lock??!1,customClass:t.customClass||"",visible:t.visible??!0,beforeClose:t.beforeClose,closed:t.closed,target:e}},Tye=async(t,e,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=cc(document.body,"position"),n.originalOverflow.value=cc(document.body,"overflow"),i.zIndex=s();else if(t.parent===document.body){n.originalPosition.value=cc(document.body,"position"),await st();for(const o of["top","left"]){const r=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[r]+document.documentElement[r]-Number.parseInt(cc(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=cc(e,"position");for(const[o,r]of Object.entries(i))n.$el.style[o]=r},PA=(t,e,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?ka(e,s.bm("parent","relative")):ud(e,s.bm("parent","relative")),t.fullscreen&&t.lock?ud(e,s.bm("parent","hidden")):ka(e,s.bm("parent","hidden"))};sf._context=null;const tm=Symbol("ElLoading"),fu=t=>`element-loading-${Vi(t)}`,IA=(t,e)=>{const n=e.instance,s=c=>yt(e.value)?e.value[c]:void 0,i=c=>J(Ke(c)&&(n==null?void 0:n[c])||c),o=c=>i(s(c)||t.getAttribute(fu(c))),r=s("fullscreen")??e.modifiers.fullscreen,a={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:r,target:s("target")??(r?void 0:t),body:s("body")??e.modifiers.body,lock:s("lock")??e.modifiers.lock},l=sf(a);l._context=tg._context,t[tm]={options:a,instance:l}},Pye=(t,e)=>{for(const n of Object.keys(t))hn(t[n])&&(t[n].value=e[n])},tg={mounted(t,e){e.value&&IA(t,e)},updated(t,e){const n=t[tm];if(!e.value){n==null||n.instance.close(),t[tm]=null;return}n?Pye(n.options,yt(e.value)?e.value:{text:t.getAttribute(fu("text")),svg:t.getAttribute(fu("svg")),svgViewBox:t.getAttribute(fu("svgViewBox")),spinner:t.getAttribute(fu("spinner")),background:t.getAttribute(fu("background")),customClass:t.getAttribute(fu("customClass"))}):IA(t,e)},unmounted(t){var e;(e=t[tm])==null||e.instance.close(),t[tm]=null}};tg._context=null;const Iye={install(t){sf._context=t._context,tg._context=t._context,t.directive("loading",tg),t.config.globalProperties.$loading=sf},directive:tg,service:sf};var Lye=he({name:"ElMessageBox",directives:{TrapFocus:Zde},components:{ElButton:Ge,ElFocusTrap:N1,ElInput:_t,ElOverlay:p5,ElIcon:_e,...rR},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ZV},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:s,ns:i,size:o}=t5("message-box",z(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=s,l=J(!1),c=Dn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Ai(Ff),cancelButtonLoadingIcon:Ai(Ff),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=z(()=>{const B=c.type;return{[i.bm("icon",B)]:B&&Nf[B]}}),d=yr(),h=yr(),f=z(()=>{const B=c.type;return c.icon||B&&Nf[B]||""}),p=z(()=>!!c.message),m=J(),b=J(),_=J(),x=J(),k=J(),C=z(()=>c.confirmButtonClass);Ee(()=>c.inputValue,async B=>{await st(),t.boxType==="prompt"&&B&&V()},{immediate:!0}),Ee(()=>l.value,B=>{var G;B&&(t.boxType!=="prompt"&&(c.autofocus?_.value=((G=k.value)==null?void 0:G.$el)??m.value:_.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(B?st().then(()=>{x.value&&x.value.$el&&(c.autofocus?_.value=R()??m.value:_.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:S}=hD(m,b,z(()=>t.draggable),z(()=>t.overflow));Vt(async()=>{await st(),t.closeOnHashChange&&window.addEventListener("hashchange",E)}),_n(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){l.value&&(l.value=!1,st(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&I(c.distinguishCancelAndClose?"close":"cancel")},T=R4(P),L=B=>{var G;if(c.inputType!=="textarea"&&!((G=x.value)!=null&&G.isComposing))return B.preventDefault(),I("confirm")},I=B=>{var G;t.boxType==="prompt"&&B==="confirm"&&!V()||(c.action=B,c.beforeClose?(G=c.beforeClose)==null||G.call(c,B,c,E):E())},V=()=>{if(t.boxType==="prompt"){const B=c.inputPattern;if(B&&!B.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const G=c.inputValidator;if(Je(G)){const q=G(c.inputValue);if(q===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(q))return c.editorErrorMessage=q,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},R=()=>{var G;const B=(G=x.value)==null?void 0:G.$refs;return(B==null?void 0:B.input)??(B==null?void 0:B.textarea)},N=()=>{I("close")},F=()=>{t.closeOnPressEscape&&N()};return t.lockScroll&&A4(l,{ns:i}),{...po(c),ns:i,overlayEvent:T,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:C,rootRef:m,focusStartRef:_,headerRef:b,inputRef:x,isDragging:S,confirmRef:k,doClose:E,handleClose:N,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:L,handleAction:I,t:r}}});const Oye=["aria-label","aria-describedby"],Dye=["aria-label"],Rye=["id"];function Vye(t,e,n,s,i,o){const r=W("el-icon"),a=W("el-input"),l=W("el-button"),c=W("el-focus-trap"),u=W("el-overlay");return v(),D(Vo,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:w(()=>[Oe(y(u,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:w(()=>[g("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:U(`${t.ns.namespace.value}-overlay-message-box`),onClick:e[8]||(e[8]=(...d)=>t.overlayEvent.onClick&&t.overlayEvent.onClick(...d)),onMousedown:e[9]||(e[9]=(...d)=>t.overlayEvent.onMousedown&&t.overlayEvent.onMousedown(...d)),onMouseup:e[10]||(e[10]=(...d)=>t.overlayEvent.onMouseup&&t.overlayEvent.onMouseup(...d))},[y(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:w(()=>[g("div",{ref:"rootRef",class:U([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:qe(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=Be(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),A("div",{key:0,ref:"headerRef",class:U([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:U(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),D(r,{key:0,class:U([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(kt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,$(t.title),1)],2),t.showClose?(v(),A("button",{key:0,type:"button",class:U(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:e[0]||(e[0]=d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel")),onKeydown:e[1]||(e[1]=Nt(Be(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[y(r,{class:U(t.ns.e("close"))},{default:w(()=>[(v(),D(kt(t.closeIcon||"close")))]),_:1},8,["class"])],42,Dye)):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:U(t.ns.e("content"))},[g("div",{class:U(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),D(r,{key:0,class:U([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(kt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),A("div",{key:1,class:U(t.ns.e("message"))},[le(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),D(kt(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(v(),D(kt(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:$(t.message)},null,8,["for","textContent"]))])],2)):O("v-if",!0)],2),Oe(g("div",{class:U(t.ns.e("input"))},[y(a,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":e[2]||(e[2]=d=>t.inputValue=d),type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:U({invalid:t.validateError}),onKeydown:Nt(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:U(t.ns.e("errormsg")),style:qe({visibility:t.editorErrorMessage?"visible":"hidden"})},$(t.editorErrorMessage),7)],2),[[jt,t.showInput]])],10,Rye),g("div",{class:U(t.ns.e("btns"))},[t.showCancelButton?(v(),D(l,{key:0,type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:U([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=Nt(Be(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:w(()=>[Y($(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):O("v-if",!0),Oe(y(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:U([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:e[5]||(e[5]=d=>t.handleAction("confirm")),onKeydown:e[6]||(e[6]=Nt(Be(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:w(()=>[Y($(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[jt,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Oye)]),_:3},8,["z-index","overlay-class","mask"]),[[jt,t.visible]])]),_:3})}var Fye=hi(Lye,[["render",Vye]]);const n1=new Map,Nye=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),Eo(t.appendTo)&&(e=t.appendTo),Eo(e)||(Pt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},Bye=(t,e,n=null)=>{const s=y(Fye,t,Je(t.message)||is(t.message)?{default:Je(t.message)?t.message:()=>t.message}:null);return s.appContext=n,Lc(s,e),Nye(t).appendChild(e.firstElementChild),s.component},zye=()=>document.createElement("div"),Hye=(t,e)=>{const n=zye();t.onVanish=()=>{Lc(null,n),n1.delete(i)},t.onAction=o=>{const r=n1.get(i);let a;t.showInput?a={value:i.inputValue,action:o}:a=o,t.callback?t.callback(a,s.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(a)};const s=Bye(t,n,e),i=s.proxy;for(const o in t)Ft(t,o)&&!Ft(i.$props,o)&&(o==="closeIcon"&&yt(t[o])?i[o]=Ai(t[o]):i[o]=t[o]);return i.visible=!0,i};function hp(t,e=null){if(!qt)return Promise.reject();let n;return Ke(t)||is(t)?t={message:t}:n=t.callback,new Promise((s,i)=>{const o=Hye(t,e??hp._context);n1.set(o,{options:t,callback:n,resolve:s,reject:i})})}const Uye=["alert","confirm","prompt"],jye={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Uye.forEach(t=>{hp[t]=Wye(t)});function Wye(t){return(e,n,s,i)=>{let o="";return yt(n)?(s=n,o=""):bn(n)?o="":o=n,hp(Object.assign({title:o,message:e,type:"",...jye[t]},s,{boxType:t}),i)}}hp.close=()=>{n1.forEach((t,e)=>{e.doClose()}),n1.clear()};hp._context=null;const Hl=hp;Hl.install=t=>{Hl._context=t._context,t.config.globalProperties.$msgbox=Hl,t.config.globalProperties.$messageBox=Hl,t.config.globalProperties.$alert=Hl.alert,t.config.globalProperties.$confirm=Hl.confirm,t.config.globalProperties.$prompt=Hl.prompt};const zw=Hl,fF=["primary","success","info","warning","error"],Yye=We({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ds},id:{type:String,default:""},message:{type:de([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:de(Function),default:()=>{}},onClose:{type:de(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...fF,""],default:""},zIndex:Number,closeIcon:{type:ds,default:br}}),qye={destroy:()=>!0},Gye=["id"],Xye=["textContent"],Kye={key:0},Zye=["innerHTML"];var Jye=he({name:"ElNotification",__name:"notification",props:Yye,emits:qye,setup(t,{expose:e}){const n=t,{ns:s,zIndex:i}=t5("notification"),{nextZIndex:o,currentZIndex:r}=i,a=J(!1);let l;const c=z(()=>{const x=n.type;return x&&Nf[n.type]?s.m(x):""}),u=z(()=>n.type&&Nf[n.type]||n.icon),d=z(()=>n.position.endsWith("right")?"right":"left"),h=z(()=>n.position.startsWith("top")?"top":"bottom"),f=z(()=>({[h.value]:`${n.offset}px`,zIndex:n.zIndex??r.value}));function p(){n.duration>0&&({stop:l}=Ux(()=>{a.value&&b()},n.duration))}function m(){l==null||l()}function b(){a.value=!1}function _(x){switch(hs(x)){case Ye.delete:case Ye.backspace:m();break;case Ye.esc:a.value&&b();break;default:p();break}}return Vt(()=>{p(),o(),a.value=!0}),Bn(document,"keydown",_),e({visible:a,close:b}),(x,k)=>(v(),D(Vo,{name:M(s).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:k[1]||(k[1]=C=>x.$emit("destroy")),persisted:""},{default:w(()=>[Oe(g("div",{id:t.id,class:U([M(s).b(),t.customClass,d.value]),style:qe(f.value),role:"alert",onMouseenter:m,onMouseleave:p,onClick:k[0]||(k[0]=(...C)=>t.onClick&&t.onClick(...C))},[u.value?(v(),D(M(_e),{key:0,class:U([M(s).e("icon"),c.value])},{default:w(()=>[(v(),D(kt(u.value)))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:U(M(s).e("group"))},[g("h2",{class:U(M(s).e("title")),textContent:$(t.title)},null,10,Xye),Oe(g("div",{class:U(M(s).e("content")),style:qe(t.title?void 0:{margin:0})},[le(x.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),A(te,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),g("p",{innerHTML:t.message},null,8,Zye)],2112)):(v(),A("p",Kye,$(t.message),1))])],6),[[jt,t.message]]),t.showClose?(v(),D(M(_e),{key:0,class:U(M(s).e("closeBtn")),onClick:Be(b,["stop"])},{default:w(()=>[(v(),D(kt(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,Gye),[[jt,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),Qye=Jye;const Uf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},$b=16;let ebe=1;const fd=function(t={},e){if(!qt)return{close:()=>{}};(Ke(t)||is(t))&&(t={message:t});const n=t.position||"top-right";let s=t.offset||0;Uf[n].forEach(({vm:u})=>{var d;s+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+$b}),s+=$b;const i=`notification_${ebe++}`,o=t.onClose,r={...t,offset:s,id:i,onClose:()=>{tbe(i,n,o)}};let a=document.body;Eo(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),Eo(a)||(Pt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=y(Qye,r,Je(r.message)?r.message:is(r.message)?()=>r.message:null);return c.appContext=bn(e)?fd._context:e,c.props.onDestroy=()=>{Lc(null,l)},Lc(c,l),Uf[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};fF.forEach(t=>{fd[t]=(e={},n)=>((Ke(e)||is(e))&&(e={message:e}),fd({...e,type:t},n))});function tbe(t,e,n){const s=Uf[e],i=s.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.props.id)===t});if(i===-1)return;const{vm:o}=s[i];if(!o)return;n==null||n(o);const r=o.el.offsetHeight,a=e.split("-")[0];s.splice(i,1);const l=s.length;if(!(l<1))for(let c=i;c<l;c++){const{el:u,component:d}=s[c].vm,h=Number.parseInt(u.style[a],10)-r-$b;d.props.offset=h}}function nbe(){for(const t of Object.values(Uf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function sbe(t="top-right"){var n,s,i,o;let e=((i=(s=(n=Uf[t][0])==null?void 0:n.vm.component)==null?void 0:s.props)==null?void 0:i.offset)||0;for(const{vm:r}of Uf[t])r.component.props.offset=e,e+=(((o=r.el)==null?void 0:o.offsetHeight)||0)+$b}fd.closeAll=nbe;fd.updateOffsets=sbe;fd._context=null;const ibe=Fre(fd,"$notify"),obe=We({trigger:kc.trigger,triggerKeys:kc.triggerKeys,placement:V0.placement,disabled:kc.disabled,visible:Nn.visible,transition:Nn.transition,popperOptions:V0.popperOptions,tabindex:V0.tabindex,content:Nn.content,popperStyle:Nn.popperStyle,popperClass:Nn.popperClass,enterable:{...Nn.enterable,default:!0},effect:{...Nn.effect,default:"light"},teleported:Nn.teleported,appendTo:Nn.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),rbe={"update:visible":t=>Kn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},abe="onUpdate:visible";var lbe=he({name:"ElPopover",__name:"popover",props:obe,emits:rbe,setup(t,{expose:e,emit:n}){const s=t,i=n,o=z(()=>s[abe]),r=Ne("popover"),a=J(),l=z(()=>{var _;return(_=M(a))==null?void 0:_.popperRef}),c=z(()=>[{width:ui(s.width)},s.popperStyle]),u=z(()=>[r.b(),s.popperClass,{[r.m("plain")]:!!s.content}]),d=z(()=>s.transition===`${r.namespace.value}-fade-in-linear`),h=()=>{var _;(_=a.value)==null||_.hide()},f=()=>{i("before-enter")},p=()=>{i("before-leave")},m=()=>{i("after-enter")},b=()=>{i("update:visible",!1),i("after-leave")};return e({popperRef:l,hide:h}),(_,x)=>(v(),D(M(js),Kt({ref_key:"tooltipRef",ref:a},_.$attrs,{trigger:t.trigger,"trigger-keys":t.triggerKeys,placement:t.placement,disabled:t.disabled,visible:t.visible,transition:t.transition,"popper-options":t.popperOptions,tabindex:t.tabindex,content:t.content,offset:t.offset,"show-after":t.showAfter,"hide-after":t.hideAfter,"auto-close":t.autoClose,"show-arrow":t.showArrow,"aria-label":t.title,effect:t.effect,enterable:t.enterable,"popper-class":u.value,"popper-style":c.value,teleported:t.teleported,"append-to":t.appendTo,persistent:t.persistent,"gpu-acceleration":d.value,"onUpdate:visible":o.value,onBeforeShow:f,onBeforeHide:p,onShow:m,onHide:b}),{content:w(()=>[t.title?(v(),A("div",{key:0,class:U(M(r).e("title")),role:"title"},$(t.title),3)):O("v-if",!0),le(_.$slots,"default",{hide:h},()=>[Y($(t.content),1)])]),default:w(()=>[_.$slots.reference?le(_.$slots,"reference",{key:0}):O("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}}),cbe=lbe;const LA=(t,e)=>{var s;const n=(s=e.arg||e.value)==null?void 0:s.popperRef;n&&(n.triggerRef=t)};var ube={mounted(t,e){LA(t,e)},updated(t,e){LA(t,e)}};const dbe="popover",hbe=Nre(ube,dbe),Xi=Wt(cbe,{directive:hbe});var fbe=!1;/*!
78 * pinia v2.3.1
79 * (c) 2025 Eduardo San Martin Morote
80 * @license MIT
81 */let pF;const o2=t=>pF=t,mF=Symbol();function $k(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ng;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ng||(ng={}));function pbe(){const t=d_(!0),e=t.run(()=>J({}));let n=[],s=[];const i=Ai({install(o){o2(i),i._a=o,o.provide(mF,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!fbe?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const gF=()=>{};function OA(t,e,n,s=gF){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&h_()&&f_(i),i}function oh(t,...e){t.slice().forEach(n=>{n(...e)})}const mbe=t=>t(),DA=Symbol(),Hw=Symbol();function Ak(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,s)=>t.set(s,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],i=t[n];$k(i)&&$k(s)&&t.hasOwnProperty(n)&&!hn(s)&&!Ir(s)?t[n]=Ak(i,s):t[n]=s}return t}const gbe=Symbol();function vbe(t){return!$k(t)||!t.hasOwnProperty(gbe)}const{assign:Ul}=Object;function ybe(t){return!!(hn(t)&&t.effect)}function bbe(t,e,n,s){const{state:i,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=po(n.state.value[t]);return Ul(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Ai(z(()=>{o2(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=vF(t,c,e,n,s,!0),l}function vF(t,e,n={},s,i,o){let r;const a=Ul({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=s.state.value[t];!o&&!p&&(s.state.value[t]={});let m;function b(T){let L;c=u=!1,typeof T=="function"?(T(s.state.value[t]),L={type:ng.patchFunction,storeId:t,events:f}):(Ak(s.state.value[t],T),L={type:ng.patchObject,payload:T,storeId:t,events:f});const I=m=Symbol();st().then(()=>{m===I&&(c=!0)}),u=!0,oh(d,L,s.state.value[t])}const _=o?function(){const{state:L}=n,I=L?L():{};this.$patch(V=>{Ul(V,I)})}:gF;function x(){r.stop(),d=[],h=[],s._s.delete(t)}const k=(T,L="")=>{if(DA in T)return T[Hw]=L,T;const I=function(){o2(s);const V=Array.from(arguments),R=[],N=[];function F(q){R.push(q)}function B(q){N.push(q)}oh(h,{args:V,name:I[Hw],store:S,after:F,onError:B});let G;try{G=T.apply(this&&this.$id===t?this:S,V)}catch(q){throw oh(N,q),q}return G instanceof Promise?G.then(q=>(oh(R,q),q)).catch(q=>(oh(N,q),Promise.reject(q))):(oh(R,G),G)};return I[DA]=!0,I[Hw]=L,I},C={_p:s,$id:t,$onAction:OA.bind(null,h),$patch:b,$reset:_,$subscribe(T,L={}){const I=OA(d,T,L.detached,()=>V()),V=r.run(()=>Ee(()=>s.state.value[t],R=>{(L.flush==="sync"?u:c)&&T({storeId:t,type:ng.direct,events:f},R)},Ul({},l,L)));return I},$dispose:x},S=Dn(C);s._s.set(t,S);const P=(s._a&&s._a.runWithContext||mbe)(()=>s._e.run(()=>(r=d_()).run(()=>e({action:k}))));for(const T in P){const L=P[T];if(hn(L)&&!ybe(L)||Ir(L))o||(p&&vbe(L)&&(hn(L)?L.value=p[T]:Ak(L,p[T])),s.state.value[t][T]=L);else if(typeof L=="function"){const I=k(L,T);P[T]=I,a.actions[T]=L}}return Ul(S,P),Ul(nn(S),P),Object.defineProperty(S,"$state",{get:()=>s.state.value[t],set:T=>{b(L=>{Ul(L,T)})}}),s._p.forEach(T=>{Ul(S,r.run(()=>T({store:S,app:s._a,pinia:s,options:a})))}),p&&o&&n.hydrate&&n.hydrate(S.$state,p),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function r2(t,e,n){let s,i;const o=typeof e=="function";typeof t=="string"?(s=t,i=o?n:e):(i=t,s=t.id);function r(a,l){const c=XP();return a=a||(c?He(mF,null):null),a&&o2(a),a=pF,a._s.has(s)||(o?vF(s,e,i,a):bbe(s,i,a)),a._s.get(s)}return r.$id=s,r}function _be(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(){return t(this.$pinia)[s]},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(){const i=t(this.$pinia),o=e[s];return typeof o=="function"?o.call(this,i):i[o]},n),{})}function wbe(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(...i){return t(this.$pinia)[s](...i)},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(...i){return t(this.$pinia)[e[s]](...i)},n),{})}function xbe(t){return typeof t=="object"&&t!==null}function RA(t,e){return t=xbe(t)?t:Object.create(null),new Proxy(t,{get(n,s,i){return s==="key"?Reflect.get(n,s,i):Reflect.get(n,s,i)||Reflect.get(e,s,i)}})}function kbe(t,e){return e.reduce((n,s)=>n==null?void 0:n[s],t)}function Cbe(t,e,n){return e.slice(0,-1).reduce((s,i)=>/^(__proto__)$/.test(i)?{}:s[i]=s[i]||{},t)[e[e.length-1]]=n,t}function Sbe(t,e){return e.reduce((n,s)=>{const i=s.split(".");return Cbe(n,i,kbe(t,i))},{})}function $be(t,e){return n=>{var s;try{const{storage:i=localStorage,beforeRestore:o=void 0,afterRestore:r=void 0,serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},key:l=e.$id,paths:c=null,debug:u=!1}=n;return{storage:i,beforeRestore:o,afterRestore:r,serializer:a,key:((s=t.key)!=null?s:d=>d)(typeof l=="string"?l:l(e.$id)),paths:c,debug:u}}catch(i){return n.debug&&console.error("[pinia-plugin-persistedstate]",i),null}}}function VA(t,{storage:e,serializer:n,key:s,debug:i}){try{const o=e==null?void 0:e.getItem(s);o&&t.$patch(n==null?void 0:n.deserialize(o))}catch(o){i&&console.error("[pinia-plugin-persistedstate]",o)}}function FA(t,{storage:e,serializer:n,key:s,paths:i,debug:o}){try{const r=Array.isArray(i)?Sbe(t,i):t;e.setItem(s,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function Abe(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:s=n},store:i,pinia:o}=e;if(!s)return;if(!(i.$id in o.state.value)){const a=o._s.get(i.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const r=(Array.isArray(s)?s.map(a=>RA(a,t)):[RA(s,t)]).map($be(t,i)).filter(Boolean);i.$persist=()=>{r.forEach(a=>{FA(i.$state,a)})},i.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),VA(i,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),VA(i,a),c==null||c(e),i.$subscribe((u,d)=>{FA(d,a)},{detached:!0})})}}var Ebe=Abe();const ge=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},Mbe={name:"Drawer",emits:["update:modelValue"],props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""},size:{type:String,default:"40%"},direction:{type:String,default:"right",validator:t=>["left","right","top","bottom"].includes(t)},closeOnClickModal:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},withHeader:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},zIndex:{type:Number,default:null},id:{type:String,default:""},modalClass:{type:String,default:"fcom_common_dialog"},drawerClass:{type:String,default:"fcom_high_drawer"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},hasCloseConfirmation:{type:Boolean,default:!1},closeConfirmationMessage:{type:String,default:""},confirmLeaveAction:{type:Function,default:null},cancelLeaveAction:{type:Function,default:null},beforeClose:{type:Function,default:null}},computed:{elDirection(){return{left:"ltr",right:"rtl",top:"ttb",bottom:"btt"}[this.direction]||"rtl"}},methods:{handleBeforeClose(t){const e=()=>{this.beforeClose?this.beforeClose(t):t()};if(this.hasCloseConfirmation){const n=this.closeConfirmationMessage||this.$t("Are you sure you want to close this?");this.$confirm(n,this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.confirmLeaveAction&&this.confirmLeaveAction(),e()}).catch(()=>{this.cancelLeaveAction&&this.cancelLeaveAction()})}else e()}}},Tbe=["id"];function Pbe(t,e,n,s,i,o){const r=Al;return v(),D(r,Kt({"model-value":n.modelValue,"onUpdate:modelValue":e[0]||(e[0]=a=>t.$emit("update:modelValue",a)),direction:o.elDirection,size:n.size,modal:n.modal,"modal-class":n.modalClass,class:n.drawerClass,"close-on-click-modal":n.closeOnClickModal,"append-to-body":n.appendToBody,"destroy-on-close":n.destroyOnClose,"show-close":n.showClose,"with-header":n.withHeader,"lock-scroll":n.lockScroll,"open-delay":n.openDelay,"close-delay":n.closeDelay},n.zIndex!==null?{"z-index":n.zIndex}:{},{id:n.id,"before-close":o.handleBeforeClose}),ks({default:w(()=>[g("div",{class:U(n.bodyClass)},[le(t.$slots,"default")],2)]),_:2},[n.withHeader?{name:"header",fn:w(({close:a,titleId:l,titleClass:c})=>[le(t.$slots,"header",{close:a,titleId:l,titleClass:c},()=>[n.title?(v(),A("h4",{key:0,id:l,class:U([c,n.headerClass]),style:{margin:"0"}},$(n.title),11,Tbe)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[g("div",{class:U(n.footerClass)},[le(t.$slots,"footer")],2)]),key:"1"}:void 0]),1040,["model-value","direction","size","modal","modal-class","class","close-on-click-modal","append-to-body","destroy-on-close","show-close","with-header","lock-scroll","open-delay","close-delay","id","before-close"])}const fp=ge(Mbe,[["render",Pbe]]);function Ibe(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}var Lbe=Ibe;function Obe(t){return function(e,n,s){for(var i=-1,o=Object(e),r=s(e),a=r.length;a--;){var l=r[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var Dbe=Obe,Rbe=Dbe,Vbe=Rbe(),Fbe=Vbe;function Nbe(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var Bbe=Nbe,zbe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,yF=zbe,Hbe=yF,Ube=typeof self=="object"&&self&&self.Object===Object&&self,jbe=Hbe||Ube||Function("return this")(),Va=jbe,Wbe=Va,Ybe=Wbe.Symbol,a2=Ybe,NA=a2,bF=Object.prototype,qbe=bF.hasOwnProperty,Gbe=bF.toString,Gp=NA?NA.toStringTag:void 0;function Xbe(t){var e=qbe.call(t,Gp),n=t[Gp];try{t[Gp]=void 0;var s=!0}catch{}var i=Gbe.call(t);return s&&(e?t[Gp]=n:delete t[Gp]),i}var Kbe=Xbe,Zbe=Object.prototype,Jbe=Zbe.toString;function Qbe(t){return Jbe.call(t)}var e_e=Qbe,BA=a2,t_e=Kbe,n_e=e_e,s_e="[object Null]",i_e="[object Undefined]",zA=BA?BA.toStringTag:void 0;function o_e(t){return t==null?t===void 0?i_e:s_e:zA&&zA in Object(t)?t_e(t):n_e(t)}var W1=o_e;function r_e(t){return t!=null&&typeof t=="object"}var Y1=r_e,a_e=W1,l_e=Y1,c_e="[object Arguments]";function u_e(t){return l_e(t)&&a_e(t)==c_e}var d_e=u_e,HA=d_e,h_e=Y1,_F=Object.prototype,f_e=_F.hasOwnProperty,p_e=_F.propertyIsEnumerable,m_e=HA(function(){return arguments}())?HA:function(t){return h_e(t)&&f_e.call(t,"callee")&&!p_e.call(t,"callee")},C5=m_e,g_e=Array.isArray,Fa=g_e,Ab={exports:{}};function v_e(){return!1}var y_e=v_e;Ab.exports;(function(t,e){var n=Va,s=y_e,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,r=o&&o.exports===i,a=r?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||s;t.exports=c})(Ab,Ab.exports);var S5=Ab.exports,b_e=9007199254740991,__e=/^(?:0|[1-9]\d*)$/;function w_e(t,e){var n=typeof t;return e=e??b_e,!!e&&(n=="number"||n!="symbol"&&__e.test(t))&&t>-1&&t%1==0&&t<e}var wF=w_e,x_e=9007199254740991;function k_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=x_e}var $5=k_e,C_e=W1,S_e=$5,$_e=Y1,A_e="[object Arguments]",E_e="[object Array]",M_e="[object Boolean]",T_e="[object Date]",P_e="[object Error]",I_e="[object Function]",L_e="[object Map]",O_e="[object Number]",D_e="[object Object]",R_e="[object RegExp]",V_e="[object Set]",F_e="[object String]",N_e="[object WeakMap]",B_e="[object ArrayBuffer]",z_e="[object DataView]",H_e="[object Float32Array]",U_e="[object Float64Array]",j_e="[object Int8Array]",W_e="[object Int16Array]",Y_e="[object Int32Array]",q_e="[object Uint8Array]",G_e="[object Uint8ClampedArray]",X_e="[object Uint16Array]",K_e="[object Uint32Array]",ts={};ts[H_e]=ts[U_e]=ts[j_e]=ts[W_e]=ts[Y_e]=ts[q_e]=ts[G_e]=ts[X_e]=ts[K_e]=!0;ts[A_e]=ts[E_e]=ts[B_e]=ts[M_e]=ts[z_e]=ts[T_e]=ts[P_e]=ts[I_e]=ts[L_e]=ts[O_e]=ts[D_e]=ts[R_e]=ts[V_e]=ts[F_e]=ts[N_e]=!1;function Z_e(t){return $_e(t)&&S_e(t.length)&&!!ts[C_e(t)]}var J_e=Z_e;function Q_e(t){return function(e){return t(e)}}var e2e=Q_e,Eb={exports:{}};Eb.exports;(function(t,e){var n=yF,s=e&&!e.nodeType&&e,i=s&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===s,r=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||r&&r.binding&&r.binding("util")}catch{}}();t.exports=a})(Eb,Eb.exports);var t2e=Eb.exports,n2e=J_e,s2e=e2e,UA=t2e,jA=UA&&UA.isTypedArray,i2e=jA?s2e(jA):n2e,A5=i2e,o2e=Bbe,r2e=C5,a2e=Fa,l2e=S5,c2e=wF,u2e=A5,d2e=Object.prototype,h2e=d2e.hasOwnProperty;function f2e(t,e){var n=a2e(t),s=!n&&r2e(t),i=!n&&!s&&l2e(t),o=!n&&!s&&!i&&u2e(t),r=n||s||i||o,a=r?o2e(t.length,String):[],l=a.length;for(var c in t)(e||h2e.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||c2e(c,l)))&&a.push(c);return a}var p2e=f2e,m2e=Object.prototype;function g2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||m2e;return t===n}var xF=g2e;function v2e(t,e){return function(n){return t(e(n))}}var y2e=v2e,b2e=y2e,_2e=b2e(Object.keys,Object),w2e=_2e,x2e=xF,k2e=w2e,C2e=Object.prototype,S2e=C2e.hasOwnProperty;function $2e(t){if(!x2e(t))return k2e(t);var e=[];for(var n in Object(t))S2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var kF=$2e;function A2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var q1=A2e,E2e=W1,M2e=q1,T2e="[object AsyncFunction]",P2e="[object Function]",I2e="[object GeneratorFunction]",L2e="[object Proxy]";function O2e(t){if(!M2e(t))return!1;var e=E2e(t);return e==P2e||e==I2e||e==T2e||e==L2e}var CF=O2e,D2e=CF,R2e=$5;function V2e(t){return t!=null&&R2e(t.length)&&!D2e(t)}var E5=V2e,F2e=p2e,N2e=kF,B2e=E5;function z2e(t){return B2e(t)?F2e(t):N2e(t)}var M5=z2e,H2e=Fbe,U2e=M5;function j2e(t,e){return t&&H2e(t,e,U2e)}var W2e=j2e,Y2e=E5;function q2e(t,e){return function(n,s){if(n==null)return n;if(!Y2e(n))return t(n,s);for(var i=n.length,o=e?i:-1,r=Object(n);(e?o--:++o<i)&&s(r[o],o,r)!==!1;);return n}}var G2e=q2e,X2e=W2e,K2e=G2e,Z2e=K2e(X2e),J2e=Z2e;function Q2e(t){return t}var SF=Q2e,ewe=SF;function twe(t){return typeof t=="function"?t:ewe}var nwe=twe,swe=Lbe,iwe=J2e,owe=nwe,rwe=Fa;function awe(t,e){var n=rwe(t)?swe:iwe;return n(t,owe(e))}var lwe=awe,cwe=lwe;const Cc=fi(cwe);function Yt(t){return window.fluentComAdmin.i18n[t]||t}const uwe={public:{label:Yt("Public"),description:Yt("__PUBLIC_SPACE_DESC"),space_description:Yt("__PIBLIC_SPACE_DESC_2")},private:{label:Yt("Private"),description:Yt("__PRIVATE_SPACE_DESC"),space_description:Yt("__PRIVATE_SPACE_DESC_2")},secret:{label:Yt("Secret"),description:Yt("Only invited members can view and post."),space_description:Yt("__SECRET_SPACE_DESC_2")}},dwe={public:{label:Yt("Public"),description:Yt("Anyone can view and enroll the course for free")},private:{label:Yt("Private"),description:Yt("__PRIVATE_COURSE_DESC")},secret:{label:Yt("Secret"),description:Yt("Only invited students can view and enroll the course content.")}},hwe={self_paced:{label:Yt("Self Paced"),description:Yt("__SELF_PAED_COURSE_DESC")},structured:{label:Yt("Structured"),description:Yt("__STRUCTURED_COURSE_DESC")},scheduled:{label:Yt("Scheduled"),description:Yt("Course starts on a specific date. Sections are dripped relative to that date.")}},fwe={leader_board_module:{headerTitle:Yt("Leaderboard Settings"),headerDescription:Yt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Yt("Get Leaderboard & Gamification Module"),bodyDescription:Yt("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module")},emoji_module:{headerTitle:Yt("Emoji Module"),headerDescription:Yt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Yt("Get Emoji & Reaction Module"),bodyDescription:Yt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Yt("Giphy Module"),headerDescription:Yt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Yt("Get Giphy Module"),bodyDescription:Yt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:Yt("User Badge Module"),headerDescription:Yt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Yt("Get User Badge Module"),bodyDescription:Yt("Show a customized badge on user profiles beside their names to easily recognize your admins or moderators, or to give appreciation to your power users.")},media_module:{headerTitle:Yt("Media Module"),headerDescription:Yt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Yt("Get Media Module"),bodyDescription:Yt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")}},kh=t=>{t=parseInt(t);const e=Object.values(window.fluentComAdmin.leaderboard_levels);if(!t)return e[0];for(let n=0;n<e.length;n++)if(t>=e[n].min_points&&t<=e[n].max_points)return e[n];return e[e-1]},pwe={name:"ImageUploader",emits:["uploaded","completed","uploading"],data(){return{loading:!1}},props:{button_text:{type:String,default:""},additionalData:{type:Object,default:()=>({})},isMultiple:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},confirm_remove:{type:Boolean,default:!1},isTextBtn:{type:Boolean,default:!0},removeIcon:{type:Boolean,default:!0},className:{type:String,default:"image-uploader"}},methods:{handleRemove(){if(!this.confirm_remove){this.$emit("uploaded","");return}this.$confirm(this.$t("Are you sure you want to remove this image?"),this.$t("Remove Image?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$emit("uploaded","")})},handleSuccess(t){this.$emit("uploaded",t.media.url),this.$emit("completed",t),this.loading=!1},handleError(t){this.$handleError(JSON.parse(t.message)),this.$emit("completed",t),this.loading=!1},inProgress(t){this.$emit("uploading"),this.loading=!0}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}}};function mwe(t,e,n,s,i,o){const r=Ge,a=j1,l=W("CloseBold"),c=_e,u=xt("loading");return v(),A(te,null,[y(a,{class:U(n.className),multiple:n.isMultiple,action:o.action_url,headers:o.headers,accept:"image/*",data:n.additionalData,"on-success":o.handleSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1},{default:w(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[Oe((v(),D(r,{disabled:i.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:w(()=>[Y($(n.button_text||t.$t("Upload Photo")),1)]),_:1},8,["disabled","text"])),[[u,i.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(v(),D(r,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:o.handleRemove,text:n.isTextBtn},{default:w(()=>[le(t.$slots,"remove",{},()=>[n.removeIcon?(v(),D(c,{key:0},{default:w(()=>[y(l)]),_:1})):O("",!0),g("span",null,$(t.$t("Remove")),1)])]),_:3},8,["onClick","text"])):O("",!0)],64)}const Fd=ge(pwe,[["render",mwe]]),gwe={name:"SvgShapeGenerator",emits:["update"],data(){return{currentColor:"",selectedShape:"circle"}},computed:{svgShapes(){return{circle:`<svg class="fcom_shape fcom_shape_circle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="12"/></svg>`,square:`<svg class="fcom_shape fcom_shape_square" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><rect x="0" y="0" width="24" height="24"/></svg>`,triangle:`<svg class="fcom_shape fcom_shape_triangle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 12L2 2v20z"/></svg>`,star:`<svg class="fcom_shape fcom_shape_star" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2.4 14.6,8.4 21.6,8.4 15.6,13.2 18,19.6 12,15.6 6,19.6 8.4,13.2 2.4,8.4 9.4,8.4" fill="${this.currentColor}"/></svg>`,heart:`<svg class="fcom_shape fcom_shape_heart" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" fill="${this.currentColor}"/></svg>`,diamond:`<svg class="fcom_shape fcom_shape_diamond" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2 22,12 12,22 2,12" fill="${this.currentColor}"/></svg>`}}},methods:{selectShape(t){this.selectedShape=t,this.$emit("update",this.svgShapes[t])},colorChanged(t){this.currentColor=t,this.$emit("update",this.svgShapes[this.selectedShape])}}},vwe={class:"fcom_svg_generator"},ywe={class:"fcom_form_item"},bwe={class:"fcom_form_item"},_we=["innerHTML"];function wwe(t,e,n,s,i,o){const r=Dd,a=dp,l=Ws;return v(),A("div",vwe,[g("div",ywe,[g("label",null,$(t.$t("Select Shape Color:")),1),y(r,{predefine:t.appVars.suggestedColors,modelValue:i.currentColor,"onUpdate:modelValue":e[0]||(e[0]=c=>i.currentColor=c),onActiveChange:o.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),g("div",bwe,[g("label",null,$(t.$t("Select Shape:")),1),y(l,{onChange:e[1]||(e[1]=c=>o.selectShape(i.selectedShape)),modelValue:i.selectedShape,"onUpdate:modelValue":e[2]||(e[2]=c=>i.selectedShape=c)},{default:w(()=>[(v(!0),A(te,null,we(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,_we)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const xwe=ge(gwe,[["render",wwe]]);var T5="emoji-mart";const kwe=JSON;var $F=typeof window<"u"&&"localStorage"in window;let Ek,Mk;function Cwe(t){t||(t={}),Ek=t.getter,Mk=t.setter}function Swe(t){T5=t}function $we(t){for(let e in t){let n=t[e];AF(e,n)}}function AF(t,e){if(Mk)Mk(t,e);else{if(!$F)return;try{window.localStorage[`${T5}.${t}`]=kwe.stringify(e)}catch{}}}function Awe(t){if(Ek)return Ek(t);if(!$F)return;try{var e=window.localStorage[`${T5}.${t}`]}catch{return}if(e)return JSON.parse(e)}const jf={update:$we,set:AF,get:Awe,setNamespace:Swe,setHandlers:Cwe},Uw={name:"a",unified:"b",non_qualified:"c",has_img_apple:"d",has_img_google:"e",has_img_twitter:"f",has_img_facebook:"h",keywords:"j",sheet:"k",emoticons:"l",text:"m",short_names:"n",added_in:"o"},EF=t=>{const e=[];var n=(s,i)=>{s&&(Array.isArray(s)?s:[s]).forEach(o=>{(i?o.split(/[-|_|\s]+/):[o]).forEach(r=>{r=r.toLowerCase(),e.indexOf(r)==-1&&e.push(r)})})};return n(t.short_names,!0),n(t.name,!0),n(t.keywords,!1),n(t.emoticons,!1),e.join(",")};function MF(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let s=t[n];t[n]=s&&typeof s=="object"?MF(s):s}return Object.freeze(t)}const Ewe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let s in Uw)n[s]=n[Uw[s]],delete n[Uw[s]];n.short_names||(n.short_names=[]),n.short_names.unshift(e),n.sheet_x=n.sheet[0],n.sheet_y=n.sheet[1],delete n.sheet,n.text||(n.text=""),n.added_in||(n.added_in=6),n.added_in=n.added_in.toFixed(1),n.search=EF(n)}return t=MF(t),t},jw=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let tr,P5,Tk={};function TF(){P5=!0,tr=jf.get("frequently")}function Mwe(t){P5||TF();var{id:e}=t;tr||(tr=Tk),tr[e]||(tr[e]=0),tr[e]+=1,jf.set("last",e),jf.set("frequently",tr)}function Twe(t){if(P5||TF(),!tr){Tk={};const r=[];let a=Math.min(t,jw.length);for(let l=0;l<a;l++)Tk[jw[l]]=parseInt((a-l)/4,10)+1,r.push(jw[l]);return r}const e=t,n=[];for(let r in tr)tr.hasOwnProperty(r)&&n.push(r);const i=n.sort((r,a)=>tr[r]-tr[a]).reverse().slice(0,e),o=jf.get("last");return o&&i.indexOf(o)==-1&&(i.pop(),i.push(o)),i}const Pk={add:Mwe,get:Twe},Pwe={activity:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"/></svg>',custom:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><g transform="translate(2.000000, 1.000000)"><rect id="Rectangle" x="8" y="0" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(-60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect></g></svg>',flags:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"/></svg>',foods:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"/></svg>',nature:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"/><path d="M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"/></svg>',objects:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"/><path d="M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"/></svg>',smileys:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/><path d="M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"/></svg>',people:'<svg xmlns:svg="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"> <path id="path3814" d="m 3.3591089,21.17726 c 0.172036,0.09385 4.265994,2.29837 8.8144451,2.29837 4.927767,0 8.670894,-2.211883 8.82782,-2.306019 0.113079,-0.06785 0.182268,-0.190051 0.182267,-0.321923 0,-3.03119 -0.929494,-5.804936 -2.617196,-7.810712 -1.180603,-1.403134 -2.661918,-2.359516 -4.295699,-2.799791 4.699118,-2.236258 3.102306,-9.28617162 -2.097191,-9.28617162 -5.1994978,0 -6.7963103,7.04991362 -2.097192,9.28617162 -1.6337821,0.440275 -3.1150971,1.396798 -4.2956991,2.799791 -1.687703,2.005776 -2.617196,4.779522 -2.617196,7.810712 1.2e-6,0.137378 0.075039,0.263785 0.195641,0.329572 z M 8.0439319,5.8308783 C 8.0439309,2.151521 12.492107,0.30955811 15.093491,2.9109411 17.694874,5.5123241 15.852911,9.9605006 12.173554,9.9605 9.8938991,9.9579135 8.0465186,8.1105332 8.0439319,5.8308783 Z m -1.688782,7.6894977 c 1.524535,-1.811449 3.5906601,-2.809035 5.8184041,-2.809035 2.227744,0 4.293869,0.997586 5.818404,2.809035 1.533639,1.822571 2.395932,4.339858 2.439152,7.108301 -0.803352,0.434877 -4.141636,2.096112 -8.257556,2.096112 -3.8062921,0 -7.3910861,-1.671043 -8.2573681,-2.104981 0.04505,-2.765017 0.906968,-5.278785 2.438964,-7.099432 z" /> <path id="path3816" d="M 12.173828 0.38867188 C 9.3198513 0.38867187 7.3770988 2.3672285 6.8652344 4.6308594 C 6.4218608 6.5916015 7.1153562 8.7676117 8.9648438 10.126953 C 7.6141249 10.677376 6.3550511 11.480944 5.3496094 12.675781 C 3.5629317 14.799185 2.6015625 17.701475 2.6015625 20.847656 C 2.6015654 21.189861 2.7894276 21.508002 3.0898438 21.671875 C 3.3044068 21.788925 7.4436239 24.039062 12.173828 24.039062 C 17.269918 24.039062 21.083568 21.776786 21.291016 21.652344 C 21.57281 21.483266 21.746097 21.176282 21.746094 20.847656 C 21.746094 17.701475 20.78277 14.799185 18.996094 12.675781 C 17.990455 11.480591 16.733818 10.675362 15.382812 10.125 C 17.231132 8.7655552 17.925675 6.5910701 17.482422 4.6308594 C 16.970557 2.3672285 15.027805 0.38867188 12.173828 0.38867188 z M 12.792969 2.3007812 C 13.466253 2.4161792 14.125113 2.7383941 14.695312 3.3085938 C 15.835712 4.4489931 15.985604 5.9473549 15.46875 7.1953125 C 14.951896 8.4432701 13.786828 9.3984378 12.173828 9.3984375 C 10.197719 9.3961954 8.607711 7.806187 8.6054688 5.8300781 C 8.6054683 4.2170785 9.5606362 3.0520102 10.808594 2.5351562 C 11.432573 2.2767293 12.119685 2.1853833 12.792969 2.3007812 z M 12.173828 11.273438 C 14.233647 11.273438 16.133674 12.185084 17.5625 13.882812 C 18.93069 15.508765 19.698347 17.776969 19.808594 20.283203 C 18.807395 20.800235 15.886157 22.162109 12.173828 22.162109 C 8.7614632 22.162109 5.6245754 20.787069 4.5390625 20.265625 C 4.6525896 17.766717 5.4203315 15.504791 6.7851562 13.882812 C 8.2139827 12.185084 10.11401 11.273438 12.173828 11.273438 z " /> </svg>',places:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"/><path d="M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"/></svg>',recent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"/><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/></svg>',symbols:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"/></svg>'},Iwe={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=Pwe}},Lwe={role:"tablist",class:"emoji-mart-anchors"},Owe=["aria-label","aria-selected","data-title","onClick"],Dwe=["innerHTML"];function Rwe(t,e,n,s,i,o){return v(),A("div",Lwe,[(v(!0),A(te,null,we(n.categories,r=>(v(),A("button",{role:"tab",type:"button","aria-label":r.name,"aria-selected":r.id==n.activeCategory.id,key:r.id,class:U({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":r.id==n.activeCategory.id}),style:qe({color:r.id==n.activeCategory.id?n.color:""}),"data-title":n.i18n.categories[r.id],onClick:a=>t.$emit("click",r)},[g("div",{"aria-hidden":"true",innerHTML:t.svgs[r.id]},null,8,Dwe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:qe({backgroundColor:n.color})},null,4)],14,Owe))),128))])}const Vwe=ge(Iwe,[["render",Rwe]]),Fwe=String,Nwe=Fwe.fromCodePoint||function(){var e=16384,n=[],s,i,o=-1,r=arguments.length;if(!r)return"";for(var a="";++o<r;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||Math.floor(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?n.push(l):(l-=65536,s=(l>>10)+55296,i=l%1024+56320,n.push(s,i)),(o+1===r||n.length>e)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a};function Bwe(t){var e=t.split("-"),n=e.map(s=>`0x${s}`);return Nwe.apply(null,n)}function WA(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function zwe(t,e){const n=WA(t),s=WA(e);return n.filter(i=>s.indexOf(i)>=0)}function PF(t,e){var n={};for(let s in t){let i=t[s],o=i;e.hasOwnProperty(s)&&(o=e[s]),typeof o=="object"&&(o=PF(i,o)),n[s]=o}return n}function Hwe(){if(typeof document>"u")return 0;const t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}const Uwe=61,jwe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,YA=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class Wwe{constructor(e,{emojisToShowFilter:n,include:s,exclude:i,custom:o,recent:r,recentLength:a=20}={}){this._data=Ewe(e),this._emojisFilter=n||null,this._include=s||null,this._exclude=i||null,this._custom=o||[],this._recent=r||Pk.get(a),this._emojis={},this._nativeEmojis={},this._emoticons={},this._categories=[],this._recentCategory={id:"recent",name:"Recent",emojis:[]},this._customCategory={id:"custom",name:"Custom",emojis:[]},this._searchIndex={},this.buildIndex(),Object.freeze(this)}buildIndex(){let e=this._data.categories;if(this._include&&(e=e.filter(n=>this._include.includes(n.id)),e=e.sort((n,s)=>{const i=this._include.indexOf(n.id),o=this._include.indexOf(s.id);return i<o?-1:i>o?1:0})),e.forEach(n=>{if(!this.isCategoryNeeded(n.id))return;let s={id:n.id,name:n.name,emojis:[]};n.emojis.forEach(i=>{let o=this.addEmoji(i);o&&s.emojis.push(o)}),s.emojis.length&&this._categories.push(s)}),this.isCategoryNeeded("custom")){if(this._custom.length>0)for(let n of this._custom)this.addCustomEmoji(n);this._customCategory.emojis.length&&this._categories.push(this._customCategory)}this.isCategoryNeeded("recent")&&(this._recent.length&&this._recent.map(n=>{for(let s of this._customCategory.emojis)if(s.id===n){this._recentCategory.emojis.push(s);return}this.hasEmoji(n)&&this._recentCategory.emojis.push(this.emoji(n))}),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}findEmoji(e,n){let s=e.match(jwe);if(s&&(e=s[1],s[2]&&(n=parseInt(s[2],10))),this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),this._emojis.hasOwnProperty(e)){let i=this._emojis[e];return n?i.getSkin(n):i}return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}categories(){return this._categories}emoji(e){this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]);let n=this._emojis[e];if(!n)throw new Error("Can not find emoji by id: "+e);return n}firstEmoji(){let e=this._emojis[Object.keys(this._emojis)[0]];if(!e)throw new Error("Can not get first emoji");return e}hasEmoji(e){return this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),!!this._emojis[e]}nativeEmoji(e){return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}search(e,n){if(n||(n=75),!e.length)return null;if(e=="-"||e=="-1")return[this.emoji("-1")];let s=e.toLowerCase().split(/[\s|,|\-|_]+/),i=[];s.length>2&&(s=[s[0],s[1]]),i=s.map(r=>{let a=this._emojis,l=this._searchIndex,c=0;for(let u=0;u<r.length;u++){const d=r[u];if(c++,l[d]||(l[d]={}),l=l[d],!l.results){let h={};l.results=[],l.emojis={};for(let f in a){let p=a[f],m=p._data.search,b=r.substr(0,c),_=m.indexOf(b);if(_!=-1){let x=_+1;b==f&&(x=0),l.results.push(p),l.emojis[f]=p,h[f]=x}}l.results.sort((f,p)=>{var m=h[f.id],b=h[p.id];return m-b})}a=l.emojis}return l.results}).filter(r=>r);var o=null;return i.length>1?o=zwe.apply(null,i):i.length?o=i[0]:o=[],o&&o.length>n&&(o=o.slice(0,n)),o}addCustomEmoji(e){let n=Object.assign({},e,{id:e.short_names[0],custom:!0});n.search||(n.search=EF(n));let s=new Mb(n);return this._emojis[s.id]=s,this._customCategory.emojis.push(s),s}addEmoji(e){let n=this._data.emojis[e];if(!this.isEmojiNeeded(n))return!1;let s=new Mb(n);if(this._emojis[e]=s,s.native&&(this._nativeEmojis[s.native]=s),s._skins)for(let i in s._skins){let o=s._skins[i];o.native&&(this._nativeEmojis[o.native]=o)}return s.emoticons&&s.emoticons.forEach(i=>{this._emoticons[i]||(this._emoticons[i]=e)}),s}isCategoryNeeded(e){let n=this._include&&this._include.length?this._include.indexOf(e)>-1:!0,s=this._exclude&&this._exclude.length?this._exclude.indexOf(e)>-1:!1;return!(!n||s)}isEmojiNeeded(e){return this._emojisFilter?this._emojisFilter(e):!0}}class Mb{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in YA){let s=YA[n],i=this._data.skin_variations[s],o=Object.assign({},e);for(let r in i)o[r]=i[r];delete o.skin_variations,o.skin_tone=parseInt(n)+1,this._skins.push(new Mb(o))}}this._sanitized=Ywe(this._data);for(let s in this._sanitized)this[s]=this._sanitized[s];this.short_names=this._data.short_names,this.short_name=this._data.short_names[0],Object.freeze(this)}getSkin(e){return e&&e!="native"&&this._skins?this._skins[e-1]:this}getPosition(){let e=Uwe-1,n=+(100/e*this._data.sheet_x).toFixed(2),s=+(100/e*this._data.sheet_y).toFixed(2);return`${n}% ${s}%`}ariaLabel(){return[this.native].concat(this.short_names).filter(Boolean).join(", ")}}class IF{constructor(e,n,s,i,o,r,a){this._emoji=e,this._native=i,this._skin=n,this._set=s,this._fallback=o,this.canRender=this._canRender(),this.cssClass=this._cssClass(),this.cssStyle=this._cssStyle(a),this.content=this._content(),this.title=r===!0?e.short_name:null,this.ariaLabel=e.ariaLabel(),Object.freeze(this)}getEmoji(){return this._emoji.getSkin(this._skin)}_canRender(){return this._isCustom()||this._isNative()||this._hasEmoji()||this._fallback}_cssClass(){return["emoji-set-"+this._set,"emoji-type-"+this._emojiType()]}_cssStyle(e){let n={};return this._isCustom()?n={backgroundImage:"url("+this.getEmoji()._data.imageUrl+")",backgroundSize:"100%",width:e+"px",height:e+"px"}:this._hasEmoji()&&!this._isNative()&&(n={backgroundPosition:this.getEmoji().getPosition()}),e&&(this._isNative()?n=Object.assign(n,{fontSize:Math.round(e*.95*10)/10+"px"}):n=Object.assign(n,{width:e+"px",height:e+"px"})),n}_content(){return this._isCustom()?"":this._isNative()?this.getEmoji().native:this._hasEmoji()?"":this._fallback?this._fallback(this.getEmoji()):null}_isNative(){return this._native}_isCustom(){return this.getEmoji().custom}_hasEmoji(){if(!this.getEmoji()._data)return!1;const e=this.getEmoji()._data["has_img_"+this._set];return e===void 0?!0:e}_emojiType(){return this._isCustom()?"custom":this._isNative()?"native":this._hasEmoji()?"image":"fallback"}}function Ywe(t){var{name:e,short_names:n,skin_tone:s,skin_variations:i,emoticons:o,unified:r,custom:a,imageUrl:l}=t,c=t.id||n[0],u=`:${c}:`;return a?{id:c,name:e,colons:u,emoticons:o,custom:a,imageUrl:l}:(s&&(u+=`:skin-tone-${s}:`),{id:c,name:e,colons:u,emoticons:o,unified:r.toLowerCase(),skin:s||(i?1:null),native:Bwe(r)})}const qwe={native:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},fallback:{type:Function},skin:{type:Number,default:1},set:{type:String,default:"apple"},emoji:{type:[String,Object],required:!0},size:{type:Number,default:null},tag:{type:String,default:"span"}},Gwe={perLine:{type:Number,default:9},maxSearchResults:{type:Number,default:75},emojiSize:{type:Number,default:24},title:{type:String,default:"Emoji Mart™"},emoji:{type:String,default:"department_store"},color:{type:String,default:"#ae65c5"},set:{type:String,default:"apple"},skin:{type:Number,default:null},defaultSkin:{type:Number,default:1},native:{type:Boolean,default:!1},emojiTooltip:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},i18n:{type:Object,default(){return{}}},showPreview:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showCategories:{type:Boolean,default:!0},showSkinTones:{type:Boolean,default:!0},infiniteScroll:{type:Boolean,default:!0},pickerStyles:{type:Object,default(){return{}}}},Xwe={props:{...qwe,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new IF(this.emojiObject,this.skin,this.set,this.native,this.fallback,this.tooltip,this.size)},sanitizedData(){return this.emojiObject._sanitized},title(){return this.tooltip?this.emojiObject.short_name:null},emojiObject(){return typeof this.emoji=="string"?this.data.findEmoji(this.emoji):this.emoji}},created(){},methods:{onClick(){this.$emit("click",this.emojiObject)},onMouseEnter(){this.$emit("mouseenter",this.emojiObject)},onMouseLeave(){this.$emit("mouseleave",this.emojiObject)}}};function Kwe(t,e,n,s,i,o){return o.view.canRender?(v(),D(kt(t.tag),{key:0,title:o.view.title,"aria-label":o.view.ariaLabel,"data-title":o.title,class:"emoji-mart-emoji",onMouseenter:o.onMouseEnter,onMouseleave:o.onMouseLeave,onClick:o.onClick},{default:w(()=>[g("span",{class:U(o.view.cssClass),style:qe(o.view.cssStyle)},$(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const LF=ge(Xwe,[["render",Kwe]]),Zwe={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},id:{type:String,required:!0},name:{type:String,required:!0},emojis:{type:Array},emojiProps:{type:Object,required:!0}},methods:{activeClass:function(t){return!this.emojiProps.selectedEmoji||!this.emojiProps.selectedEmojiCategory?"":this.emojiProps.selectedEmoji.id==t.id&&this.emojiProps.selectedEmojiCategory.id==this.id?"emoji-mart-emoji-selected":""}},computed:{isVisible(){return!!this.emojis},isSearch(){return this.name=="Search"},hasResults(){return this.emojis.length>0},emojiObjects(){return this.emojis.map(t=>{let e=t,n=new IF(t,this.emojiProps.skin,this.emojiProps.set,this.emojiProps.native,this.emojiProps.fallback,this.emojiProps.emojiTooltip,this.emojiProps.emojiSize);return{emojiObject:e,emojiView:n}})}},components:{Emoji:LF}},Jwe=["aria-label"],Qwe={class:"emoji-mart-category-label"},e3e={class:"emoji-mart-category-label"},t3e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],n3e={key:0},s3e={class:"emoji-mart-no-results-label"};function i3e(t,e,n,s,i,o){const r=W("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),A("section",{key:0,class:U({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",Qwe,[g("h3",e3e,$(n.i18n.categories[n.id]),1)]),(v(!0),A(te,null,we(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),A(te,null,[l.canRender?(v(),A("button",{"aria-label":l.ariaLabel,role:"option","aria-selected":"false","aria-posinset":"1","aria-setsize":"1812",type:"button","data-title":a.short_name,key:a.id,title:l.title,class:U(["emoji-mart-emoji",o.activeClass(a)]),onMouseenter:c=>n.emojiProps.onEnter(l.getEmoji()),onMouseleave:c=>n.emojiProps.onLeave(l.getEmoji()),onClick:c=>n.emojiProps.onClick(l.getEmoji())},[g("span",{class:U(l.cssClass),style:qe(l.cssStyle)},$(l.content),7)],42,t3e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),A("div",n3e,[y(r,{data:n.data,emoji:"sleuth_or_spy",native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","native","skin","set"]),g("div",s3e,$(n.i18n.notfound),1)]))],10,Jwe)):O("",!0)}const o3e=ge(Zwe,[["render",i3e]]),r3e={props:{skin:{type:Number,required:!0}},emits:["change"],data(){return{opened:!1}},methods:{onClick(t){this.opened&&t!=this.skin&&this.$emit("change",t),this.opened=!this.opened}}},a3e=["onClick"];function l3e(t,e,n,s,i,o){return v(),A("div",{class:U({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":i.opened})},[(v(),A(te,null,we(6,r=>g("span",{key:r,class:U({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:U("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,a3e)],2)),64))],2)}const c3e=ge(r3e,[["render",l3e]]),u3e={props:{data:{type:Object,required:!0},title:{type:String,required:!0},emoji:{type:[String,Object]},idleEmoji:{type:[String,Object],required:!0},showSkinTones:{type:Boolean,default:!0},emojiProps:{type:Object,required:!0},skinProps:{type:Object,required:!0},onSkinChange:{type:Function,required:!0}},computed:{emojiData(){return this.emoji?this.emoji:{}},emojiShortNames(){return this.emojiData.short_names},emojiEmoticons(){return this.emojiData.emoticons}},components:{Emoji:LF,Skins:c3e}},d3e={class:"emoji-mart-preview"},h3e={class:"emoji-mart-preview-emoji"},f3e={class:"emoji-mart-preview-data"},p3e={class:"emoji-mart-preview-name"},m3e={class:"emoji-mart-preview-shortnames"},g3e={class:"emoji-mart-preview-emoticons"},v3e={class:"emoji-mart-preview-emoji"},y3e={class:"emoji-mart-preview-data"},b3e={class:"emoji-mart-title-label"},_3e={key:0,class:"emoji-mart-preview-skins"};function w3e(t,e,n,s,i,o){const r=W("emoji"),a=W("skins");return v(),A("div",d3e,[n.emoji?(v(),A(te,{key:0},[g("div",h3e,[y(r,{data:n.data,emoji:n.emoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),g("div",f3e,[g("div",p3e,$(n.emoji.name),1),g("div",m3e,[(v(!0),A(te,null,we(o.emojiShortNames,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-shortname"},":"+$(l)+":",1))),128))]),g("div",g3e,[(v(!0),A(te,null,we(o.emojiEmoticons,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-emoticon"},$(l),1))),128))])])],64)):(v(),A(te,{key:1},[g("div",v3e,[y(r,{data:n.data,emoji:n.idleEmoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),g("div",y3e,[g("span",b3e,$(n.title),1)]),n.showSkinTones?(v(),A("div",_3e,[y(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const x3e=ge(u3e,[["render",w3e]]),k3e={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},autoFocus:{type:Boolean,default:!1},onSearch:{type:Function,required:!0},onArrowLeft:{type:Function,required:!1},onArrowRight:{type:Function,required:!1},onArrowDown:{type:Function,required:!1},onArrowUp:{type:Function,required:!1},onEnter:{type:Function,required:!1}},emits:["search","enter","arrowUp","arrowDown","arrowRight","arrowLeft"],data(){return{value:""}},computed:{emojiIndex(){return this.data}},watch:{value(){this.$emit("search",this.value)}},methods:{clear(){this.value=""}},mounted(){let t=this.$el.querySelector("input");this.autoFocus&&t.focus()}},C3e={class:"emoji-mart-search"},S3e=["placeholder"];function $3e(t,e,n,s,i,o){return v(),A("div",C3e,[Oe(g("input",{type:"text",placeholder:n.i18n.search,role:"textbox","aria-autocomplete":"list","aria-owns":"emoji-mart-list","aria-label":"Search for an emoji","aria-describedby":"emoji-mart-search-description",onKeydown:[e[0]||(e[0]=Nt(r=>t.$emit("arrowLeft",r),["left"])),e[1]||(e[1]=Nt(()=>t.$emit("arrowRight"),["right"])),e[2]||(e[2]=Nt(()=>t.$emit("arrowDown"),["down"])),e[3]||(e[3]=Nt(r=>t.$emit("arrowUp",r),["up"])),e[4]||(e[4]=Nt(()=>t.$emit("enter"),["enter"]))],"onUpdate:modelValue":e[5]||(e[5]=r=>i.value=r)},null,40,S3e),[[wf,i.value]]),e[6]||(e[6]=g("span",{class:"hidden",id:"emoji-picker-search-description"},"Use the left, right, up and down arrow keys to navigate the emoji search results.",-1))])}const A3e=ge(k3e,[["render",$3e]]);var E3e=typeof window<"u";E3e&&function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(s,i){var o=new Date().getTime(),r=Math.max(0,16-(o-t)),a=window.setTimeout(function(){s(o+r)},r);return t=o+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})}();class M3e{constructor(e){this._vm=e,this._data=e.data,this._perLine=e.perLine,this._categories=[],this._categories.push(...this._data.categories()),this._categories=this._categories.filter(n=>n.emojis.length>0),this._categories[0].first=!0,Object.freeze(this._categories),this.activeCategory=this._categories[0],this.searchEmojis=null,this.previewEmoji=null,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=-1}onScroll(){const n=this._vm.$refs.scroll.scrollTop;let s=this.filteredCategories[0];for(let i=0,o=this.filteredCategories.length;i<o;i++){let r=this.filteredCategories[i],a=this._vm.getCategoryComponent(i);if(a&&a.$el.offsetTop-50>n)break;s=r}this.activeCategory=s}get allCategories(){return this._categories}get filteredCategories(){return this.searchEmojis?[{id:"search",name:"Search",emojis:this.searchEmojis}]:this._categories.filter(e=>e.emojis.length>0)}get previewEmojiCategory(){return this.previewEmojiCategoryIdx>=0?this.filteredCategories[this.previewEmojiCategoryIdx]:null}onAnchorClick(e){if(this.searchEmojis)return;let n=this.filteredCategories.indexOf(e),s=this._vm.getCategoryComponent(n),i=()=>{if(s){let o=s.$el.offsetTop;e.first&&(o=0),this._vm.$refs.scroll.scrollTop=o}};this._vm.infiniteScroll?i():this.activeCategory=this.filteredCategories[n]}onSearch(e){let n=this._data.search(e,this.maxSearchResults);this.searchEmojis=n,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=0,this.updatePreviewEmoji()}onEmojiEnter(e){this.previewEmoji=e,this.previewEmojiIdx=-1,this.previewEmojiCategoryIdx=-1}onEmojiLeave(e){this.previewEmoji=null}onArrowLeft(){this.previewEmojiIdx>0?this.previewEmojiIdx-=1:(this.previewEmojiCategoryIdx-=1,this.previewEmojiCategoryIdx<0?this.previewEmojiCategoryIdx=0:this.previewEmojiIdx=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length-1),this.updatePreviewEmoji()}onArrowRight(){this.previewEmojiIdx<this.emojisLength(this.previewEmojiCategoryIdx)-1?this.previewEmojiIdx+=1:(this.previewEmojiCategoryIdx+=1,this.previewEmojiCategoryIdx>=this.filteredCategories.length?this.previewEmojiCategoryIdx=this.filteredCategories.length-1:this.previewEmojiIdx=0),this.updatePreviewEmoji()}onArrowDown(){if(this.previewEmojiIdx==-1)return this.onArrowRight();const e=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length;let n=this._perLine;this.previewEmojiIdx+n>e&&(n=e%this._perLine);for(let s=0;s<n;s++)this.onArrowRight();this.updatePreviewEmoji()}onArrowUp(){let e=this._perLine;this.previewEmojiIdx-e<0&&(this.previewEmojiCategoryIdx>0?e=this.filteredCategories[this.previewEmojiCategoryIdx-1].emojis.length%this._perLine:e=0);for(let n=0;n<e;n++)this.onArrowLeft();this.updatePreviewEmoji()}updatePreviewEmoji(){this.previewEmoji=this.filteredCategories[this.previewEmojiCategoryIdx].emojis[this.previewEmojiIdx],this._vm.$nextTick(()=>{const e=this._vm.$refs.scroll,n=e.querySelector(".emoji-mart-emoji-selected"),s=e.offsetTop-e.offsetHeight;n&&n.offsetTop+n.offsetHeight>s+e.scrollTop&&(e.scrollTop+=n.offsetHeight),n&&n.offsetTop<e.scrollTop&&(e.scrollTop-=n.offsetHeight)})}emojisLength(e){return e==-1?0:this.filteredCategories[e].emojis.length}}const T3e={search:"Search",notfound:"No Emoji Found",categories:{search:"Search Results",recent:"Frequently Used",smileys:"Smileys & Emotion",people:"People & Body",nature:"Animals & Nature",foods:"Food & Drink",activity:"Activity",places:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags",custom:"Custom"}},P3e={props:{...Gwe,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||jf.get("skin")||this.defaultSkin,view:new M3e(this)}},computed:{customStyles(){return{width:this.calculateWidth+"px",...this.pickerStyles}},emojiProps(){return{native:this.native,skin:this.activeSkin,set:this.set,emojiTooltip:this.emojiTooltip,emojiSize:this.emojiSize,selectedEmoji:this.view.previewEmoji,selectedEmojiCategory:this.view.previewEmojiCategory,onEnter:this.onEmojiEnter.bind(this),onLeave:this.onEmojiLeave.bind(this),onClick:this.onEmojiClick.bind(this)}},skinProps(){return{skin:this.activeSkin}},calculateWidth(){return this.perLine*(this.emojiSize+12)+12+2+Hwe()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(PF(T3e,this.i18n))},idleEmoji(){try{return this.data.emoji(this.emoji)}catch(t){return console.error("Default preview emoji `"+this.emoji+"` is not available, check the Picker `emoji` property"),console.error(t),this.data.firstEmoji()}}},watch:{skin(){this.onSkinChange(this.skin)}},methods:{onScroll(){this.infiniteScroll&&!this.waitingForPaint&&(this.waitingForPaint=!0,window.requestAnimationFrame(this.onScrollPaint.bind(this)))},onScrollPaint(){this.waitingForPaint=!1,this.view.onScroll()},onAnchorClick(t){this.view.onAnchorClick(t)},onSearch(t){this.view.onSearch(t)},onEmojiEnter(t){this.view.onEmojiEnter(t)},onEmojiLeave(t){this.view.onEmojiLeave(t)},onArrowLeft(t){const e=this.view.previewEmojiIdx;this.view.onArrowLeft(),t&&this.view.previewEmojiIdx!==e&&t.preventDefault()},onArrowRight(){this.view.onArrowRight()},onArrowDown(){this.view.onArrowDown()},onArrowUp(t){this.view.onArrowUp(),t.preventDefault()},onEnter(){this.view.previewEmoji&&(this.$emit("select",this.view.previewEmoji),Pk.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),Pk.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,jf.update({skin:t}),this.$emit("skin-change",t)},getCategoryComponent(t){let e=this.$refs["categories_"+t];return e&&"0"in e?e[0]:e}},components:{Anchors:Vwe,Category:o3e,Preview:x3e,Search:A3e}},I3e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},L3e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},O3e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function D3e(t,e,n,s,i,o){const r=W("anchors"),a=W("search"),l=W("category"),c=W("preview");return v(),A("section",{class:"emoji-mart emoji-mart-static",style:qe(o.customStyles)},[t.showCategories?(v(),A("div",I3e,[y(r,{data:n.data,i18n:o.mergedI18n,color:t.color,categories:i.view.allCategories,"active-category":i.view.activeCategory,onClick:o.onAnchorClick},null,8,["data","i18n","color","categories","active-category","onClick"])])):O("",!0),le(t.$slots,"searchTemplate",{data:n.data,i18n:t.i18n,autoFocus:t.autoFocus,onSearch:o.onSearch},()=>[t.showSearch?(v(),D(a,{key:0,ref:"search",data:n.data,i18n:o.mergedI18n,"auto-focus":t.autoFocus,"on-search":o.onSearch,onSearch:o.onSearch,onArrowLeft:o.onArrowLeft,onArrowRight:o.onArrowRight,onArrowDown:o.onArrowDown,onArrowUp:o.onArrowUp,onEnter:o.onEnter,onSelect:o.onTextSelect},null,8,["data","i18n","auto-focus","on-search","onSearch","onArrowLeft","onArrowRight","onArrowDown","onArrowUp","onEnter","onSelect"])):O("",!0)]),g("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:e[0]||(e[0]=(...u)=>o.onScroll&&o.onScroll(...u))},[g("div",L3e,[le(t.$slots,"customCategory"),(v(!0),A(te,null,we(i.view.filteredCategories,(u,d)=>Oe((v(),D(l,{ref_for:!0,ref:"categories_"+d,key:u.id,data:n.data,i18n:o.mergedI18n,id:u.id,name:u.name,emojis:u.emojis,"emoji-props":o.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[jt,t.infiniteScroll||u==i.view.activeCategory]])),128))],512)],544),le(t.$slots,"previewTemplate",{data:n.data,title:t.title,emoji:i.view.previewEmoji,idleEmoji:o.idleEmoji,showSkinTones:t.showSkinTones,emojiProps:o.emojiProps,skinProps:o.skinProps,onSkinChange:o.onSkinChange},()=>[t.showPreview?(v(),A("div",O3e,[y(c,{data:n.data,title:t.title,emoji:i.view.previewEmoji,"idle-emoji":o.idleEmoji,"show-skin-tones":t.showSkinTones,"emoji-props":o.emojiProps,"skin-props":o.skinProps,"on-skin-change":o.onSkinChange},null,8,["data","title","emoji","idle-emoji","show-skin-tones","emoji-props","skin-props","on-skin-change"])])):O("",!0)])],4)}const R3e=ge(P3e,[["render",D3e]]),V3e={name:"ActionPopover",emits:["show","hide"],props:{items:{type:Array,default:()=>[]},width:{type:[Number,String],default:150},placement:{type:String,default:"bottom",validator:t=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(t)},persistent:{type:Boolean,default:!1}},data(){return{visible:!1}},watch:{visible(t){this.$emit(t?"show":"hide"),document[t?"addEventListener":"removeEventListener"]("click",this.onClickOutside,!0)}},methods:{toggle(){this.visible=!this.visible},hide(){this.visible=!1},onClickOutside(t){var n,s,i,o,r;const e=(s=(n=this.$refs.popoverRef)==null?void 0:n.popperRef)==null?void 0:s.contentRef;e!=null&&e.contains(t.target)||(i=this.$refs.triggerRef)!=null&&i.contains(t.target)||(r=(o=t.target).closest)!=null&&r.call(o,".el-popper")||this.hide()},handleAction(t){this.hide(),t.action&&t.action()}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside,!0)}},F3e={class:"actions_items",role:"menu"},N3e=["onClick"];function B3e(t,e,n,s,i,o){const r=W("MoreFilled"),a=_e,l=Ge,c=Xi;return v(),D(c,{trigger:"manual",placement:n.placement,persistent:n.persistent,width:n.width,visible:i.visible,ref:"popoverRef"},{reference:w(()=>[g("span",{ref:"triggerRef",class:"fcom_action_popover_trigger",onClick:e[0]||(e[0]=(...u)=>o.toggle&&o.toggle(...u))},[le(t.$slots,"trigger",{},()=>[y(l,{"aria-label":t.$t("View actions"),class:"fcom_action_popover_default_trigger_button",size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1},8,["aria-label"])])],512)]),default:w(()=>[le(t.$slots,"default",{hide:o.hide},()=>[g("ul",F3e,[(v(!0),A(te,null,we(n.items,(u,d)=>(v(),A("li",{key:d,class:U(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",onClick:h=>o.handleAction(u)},$(u.label),11,N3e))),128))])])]),_:3},8,["placement","persistent","width","visible"])}const pp=ge(V3e,[["render",B3e]]),z3e={name:"SmilyIcon"},H3e={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U3e(t,e,n,s,i,o){return v(),A("svg",H3e,[...e[0]||(e[0]=[Pa('<g><circle cx="9.99996" cy="10.0013" r="8.33333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></circle><path d="M6.66663 12.5C7.42673 13.512 8.6369 14.1667 9.99996 14.1667C11.363 14.1667 12.5732 13.512 13.3333 12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.6741 7.5L6.66663 7.5Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3333 7.5L13.3258 7.5Z" fill="currentColor"></path><path d="M6.6741 7.5L6.66663 7.5M13.3333 7.5L13.3258 7.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>',1)])])}const j3e=ge(z3e,[["render",U3e]]),W3e={name:"EmojiPicker",components:{Picker:R3e,ActionPopover:pp,SmilyIcon:j3e},emits:["emoji-selected"],props:{close_on_select:{type:Boolean,default:!1}},data(){return{emojiIndex:null,emojiLoading:!1,errorMessage:"",isLoading:!1}},methods:{onEmojiSelect(t,e){this.$emit("emoji-selected",t.native),this.close_on_select&&e&&e()},loadEmojiAssets(){if(this.isLoading)return;if(window.fcomEmojiIndex){this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1;return}this.isLoading=!0;let t=this.appVars.assets_url+"libs/static/tw_emojis.json";this.emojiLoading=!0,fetch(t).then(e=>e.json()).then(e=>{e?(window.fcomEmojiIndex=new Wwe(e),this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1):this.errorMessage=this.$t("Emoji loading failed")}).catch(()=>{this.errorMessage=this.$t("Emoji loading failed")}).finally(()=>{this.isLoading=!1})}}},Y3e={class:"ffcom_emoji"},q3e={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},G3e={key:0},X3e={style:{"text-align":"center","margin-bottom":"20px"}},K3e={key:1,class:"fcom_emoji_holder"};function Z3e(t,e,n,s,i,o){const r=W("SmilyIcon"),a=_e,l=Ge,c=Jt,u=W("Picker"),d=W("action-popover");return v(),D(d,{ref:"fcom_emoji_popover","close-on-click-outside":!0,placement:"bottom",persistent:!1,"trigger-interactive":!0,width:350,onShow:o.loadEmojiAssets},{trigger:w(()=>[y(l,{"aria-label":"Pick Imoji",text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1})]),default:w(({hide:h})=>[g("div",Y3e,[i.emojiLoading?(v(),A("div",q3e,[i.errorMessage?(v(),A("div",G3e,$(i.errorMessage),1)):(v(),A(te,{key:1},[g("div",X3e,$(t.$t("Loading.....")),1),y(c,{animated:!0,rows:3})],64))])):i.emojiIndex?(v(),A("div",K3e,[y(u,{title:t.$t("Pick Emoji"),i18n:{search:t.$t("Search"),notfound:t.$t("No Emoji Found"),categories:{search:t.$t("Search Results"),recent:t.$t("Frequently Used"),smileys:t.$t("Smileys & Emotion"),people:t.$t("People & Body"),nature:t.$t("Animals & Nature"),foods:t.$t("Food & Drink"),activity:t.$t("Activity"),places:t.$t("Travel & Places"),objects:t.$t("Objects"),symbols:t.$t("Symbols"),flags:t.$t("Flags"),custom:t.$t("Custom")}},color:"#66b1ff",showPreview:!1,ref:"picker",data:i.emojiIndex,set:"twitter",onSelect:f=>o.onEmojiSelect(f,h),emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","i18n","data","onSelect"])])):O("",!0)])]),_:1},8,["onShow"])}const OF=ge(W3e,[["render",Z3e]]),J3e={name:"LogoEmojiSelector",components:{EmojiPicker:OF,ImageUploader:Fd,SvgShapeGenerator:xwe,ActionPopover:pp},props:{config:{type:Object,required:!0,default:()=>({emoji:"",logo:"",shape_svg:""})},fallback_mark:{type:String,default:'<span class="fcom_no_avatar"></span>'},custom_svg:{type:Boolean,default:!1}},data(){return{emoji:this.config.emoji||"",logo:this.config.logo||"",shape_svg:this.config.shape_svg||"",selectedTab:"emoji"}},methods:{setData(t){t=="emoji"?(this.logo="",this.shape_svg=""):t=="shape_svg"?(this.emoji="",this.logo=""):(this.emoji="",this.shape_svg=""),this.$emit("update",{logo:this.logo,emoji:this.emoji,shape_svg:this.shape_svg})},handleLogoPhotoUpload(t){this.logo=t,this.setData("logo")},handleShapeChanged(t){this.shape_svg=t,this.setData("shape_svg")}},computed:{currentMark(){return this.logo?`<img alt="" src="${this.logo}" style="width: 20px; height: 20px; aspect-ratio: 1/1;">`:this.emoji.trim()?`<span style="font-size: 20px">${this.emoji.trim()}</span>`:this.shape_svg?'<i class="fcom_shape el-icon">'+this.shape_svg+"</i>":this.fallback_mark}},mounted(){if(this.logo)this.selectedTab="logo";else if(this.emoji)this.selectedTab="emoji";else if(this.shape_svg){if(this.custom_svg&&!/fcom_shape/.test(this.shape_svg)){this.selectedTab="shape_svg";return}this.selectedTab="shape"}}},Q3e=["innerHTML"];function exe(t,e,n,s,i,o){const r=Ge,a=W("EmojiPicker"),l=_t,c=i2,u=W("SvgShapeGenerator"),d=Ra,h=W("ImageUploader"),f=s2,p=W("action-popover");return v(),D(p,{ref:"iconPicker","close-on-click-outside":!0,"trigger-interactive":!0,width:t.modalWidth},{trigger:w(()=>[y(r,{"aria-label":"Pick Emoji",style:{padding:"4px 16px",display:"flex","justify-content":"center","align-items":"center"}},{default:w(()=>[g("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:o.currentMark||""},null,8,Q3e)]),_:1})]),default:w(({hide:m})=>[g("div",null,[y(f,{modelValue:i.selectedTab,"onUpdate:modelValue":e[5]||(e[5]=b=>i.selectedTab=b),type:"border-card"},{default:w(()=>[y(c,{name:"emoji",label:t.$t("Emoji")},{default:w(()=>[y(l,{onChange:e[1]||(e[1]=b=>o.setData("emoji")),modelValue:i.emoji,"onUpdate:modelValue":e[2]||(e[2]=b=>i.emoji=b),placeholder:t.$t("Select or paste your emoji here"),style:{width:"100%"}},ks({_:2},[t.has_pro?{name:"append",fn:w(()=>[y(a,{close_on_select:!0,onEmojiSelected:e[0]||(e[0]=b=>{i.emoji=b,o.setData("emoji")})})]),key:"0"}:void 0]),1032,["modelValue","placeholder"])]),_:1},8,["label"]),y(c,{name:"shape",label:t.$t("Shape")},{default:w(()=>[y(u,{onUpdate:o.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(v(),D(c,{key:0,name:"shape_svg",label:t.$t("Custom SVG")},{default:w(()=>[y(l,{rows:4,type:"textarea",onChange:e[3]||(e[3]=b=>o.setData("shape_svg")),modelValue:i.shape_svg,"onUpdate:modelValue":e[4]||(e[4]=b=>i.shape_svg=b),placeholder:t.$t("Paste your SVG here"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),y(c,{name:"logo",label:t.$t("Custom Image")},{default:w(()=>[i.logo?(v(),D(d,{key:0,alt:t.$t("Logo"),src:i.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),y(h,{can_remove:!!i.logo,additionalData:{resize:!0,max_width:400},onUploaded:o.handleLogoPhotoUpload},null,8,["can_remove","onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),y(r,{onClick:b=>m(),type:"success",plain:"",class:"fcom_mt_20"},{default:w(()=>[Y($(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const G1=ge(J3e,[["render",exe]]),txe={name:"SlugInput",emits:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},is_inital_inactive:{type:Boolean,default:!1},edit_notice:{type:String,default:""},popMessage:{type:String,default:""},description:{type:String,default:""},prefix:{type:String,default:""}},watch:{modelValue(t){this.model=t}},data(){return{model:this.modelValue,showEdit:this.is_inital_inactive}},methods:{updateSlug(){this.model=this.model.replace(/\s/g,"-"),this.model=this.model.replace(/[^a-zA-Z0-9-_]/g,""),this.$emit("update:modelValue",this.model)},confirmEditInit(){this.$confirm(this.popMessage||this.$t("Are you sure you want to change the slug?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showEdit=!1})}}},nxe={key:0,class:"fcom_slug_input_info"},sxe=["innerHTML"],ixe={key:1,class:"fcom_help_text"};function oxe(t,e,n,s,i,o){const r=Ge,a=_t;return v(),A(te,null,[y(a,{class:"fcom_slug_input",disabled:n.disabled,readonly:i.showEdit,modelValue:i.model,"onUpdate:modelValue":e[1]||(e[1]=l=>i.model=l),ref:"input",placeholder:n.placeholder,onInput:o.updateSlug},ks({_:2},[n.prefix?{name:"prepend",fn:w(()=>[g("span",null,$(n.prefix),1)]),key:"0"}:void 0,i.showEdit?{name:"append",fn:w(()=>[y(r,{onClick:e[0]||(e[0]=l=>o.confirmEditInit()),text:"",type:"info"},{default:w(()=>[Y($(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!i.showEdit&&n.edit_notice?(v(),A("div",nxe,[g("p",{innerHTML:n.edit_notice},null,8,sxe)])):O("",!0),n.description?(v(),A("div",ixe,[g("p",null,$(n.description),1)])):O("",!0)],64)}const Nd=ge(txe,[["render",oxe]]),rxe={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},axe={class:"fcom_errors_alert_list"};function lxe(t,e,n,s,i,o){const r=Yc;return n.errors.length&&!i.dismissed?(v(),D(r,{key:0,type:"warning",closable:n.dismissable,"show-icon":"",onClose:e[0]||(e[0]=a=>i.dismissed=!0)},{title:w(()=>[g("ul",axe,[(v(!0),A(te,null,we(n.errors,(a,l)=>(v(),A("li",{key:l},[g("strong",null,$(a.title)+":",1),Y(" "+$(a.description),1)]))),128))])]),_:1},8,["closable"])):O("",!0)}const X1=ge(rxe,[["render",lxe]]),Oi=t=>{var e,n;return((n=(e=window.fluentComAdmin)==null?void 0:e.i18n)==null?void 0:n[t])||t},cxe=t=>{const e=[];return!t||!t.trim()?(e.push(Oi("Path cannot be empty.")),{valid:!1,type:"path",errors:e}):(t=t.trim(),t.startsWith("/")||e.push(Oi("Path must start with /")),/\s/.test(t)&&e.push(Oi("Path cannot contain spaces.")),/[<>{}|\\^`"']/.test(t)&&e.push(Oi("Path contains invalid characters: < > { } | \\ ^ ` \" '")),t.includes("..")&&e.push(Oi('Path cannot contain ".." (directory traversal).')),/#.*#/.test(t)&&e.push(Oi("Path cannot contain multiple hash fragments.")),{valid:e.length===0,type:"path",errors:e})},DF=t=>{const e=[];if(!t||!t.trim())return e.push(Oi("URL cannot be empty.")),{valid:!1,type:"url",errors:e};if(t=t.trim(),!/^https?:\/\//i.test(t))return e.push(Oi("URL must start with http:// or https://")),{valid:!1,type:"url",errors:e};/\s/.test(t)&&e.push(Oi("URL cannot contain spaces."));const n=t.replace(/^https?:\/\//i,"");(!n||n==="/")&&e.push(Oi("URL must have a domain name (e.g. example.com)."));const s=n.split("/")[0].split("?")[0].split("#")[0],i=s.split(":")[0];if(!(i==="localhost"||i.startsWith("localhost."))&&!/^[a-zA-Z0-9][a-zA-Z0-9\-]*(\.[a-zA-Z0-9\-]+)*\.[a-zA-Z]{2,}$/.test(i)&&e.push(Oi("Domain must include a valid TLD (e.g. .com, .org).")),/[^a-zA-Z0-9.\-:]/.test(s)&&e.push(Oi("Domain contains invalid characters. Only letters, numbers, dots, hyphens, and port are allowed.")),s.includes(":")){const r=s.split(":")[1];r&&!/^\d+$/.test(r)&&e.push(Oi("Port must be a number (e.g. :8080)."))}return(/javascript:/i.test(t)||/data:/i.test(t)||/vbscript:/i.test(t))&&e.push(Oi("URL contains a blocked protocol (javascript:, data:, vbscript:).")),{valid:e.length===0,type:"url",errors:e}},K1=t=>!t||!t.trim()?{valid:!1,type:null,errors:[Oi("URL or path cannot be empty.")]}:(t=t.trim(),t.startsWith("/")?cxe(t):DF(t)),uxe={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Nd,ActionPopover:pp,ErrorAlerts:X1},data(){return{topics:[],selected:this.modelValue,loading:!1,creatingTopic:!1,newTopicErrors:[],newTopic:{title:"OK"}}},computed:{maxTopicsPerSpace(){var t;return((t=this.appVars.topicsConfig)==null?void 0:t.max_topics_per_space)||20},isTopicLimitReached(){var t;return((t=this.selected)==null?void 0:t.length)>=this.maxTopicsPerSpace}},methods:{getTopicsPlaceholder(){return this.$_n("Choose a topic","Choose up to %s topics",this.maxTopicsPerSpace)},initCreatetopic(){this.newTopicErrors=[],this.newTopic={title:"",description:"",slug:""}},validateForm(){if(this.newTopicErrors=[],(!this.newTopic.title||!this.newTopic.title.trim())&&this.newTopicErrors.push({title:this.$t("Title"),description:this.$t("Topic title is required.")}),this.newTopic.slug&&this.newTopic.slug.trim()){const t=K1("/"+this.newTopic.slug);t.valid||t.errors.forEach(e=>{this.newTopicErrors.push({title:this.$t("Slug"),description:this.$t(e)})})}return this.newTopicErrors.length===0},fetchTopics(){this.loading=!0,this.$get("admin/topics",{optionsOnly:!0,space_id:this.space_id}).then(t=>{this.topics=t.topics}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},createTopic(t){if(!this.validateForm())return;this.creatingTopic=!0;let e={title:this.newTopic.title,description:this.newTopic.description,slug:this.newTopic.slug,is_inline:!0};this.$post("admin/topics",e).then(n=>{this.$notify.success(n.message),this.fetchTopics(),this.selected.push(n.topic.id),t()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingTopic=!1})}},watch:{selected(){this.$emit("update:modelValue",this.selected)}},mounted(){this.fetchTopics()}},dxe={class:"fcom_topic_selector"},hxe={key:0,class:"fcom_meta_text"};function fxe(t,e,n,s,i,o){const r=ln,a=Qt,l=W("Plus"),c=_e,u=Ge,d=_t,h=an,f=W("slug-input"),p=W("error-alerts"),m=fn,b=W("action-popover"),_=xt("loading");return v(),A("div",dxe,[Oe((v(),D(a,{modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=x=>i.selected=x),"popper-class":"fcom_topics_from_settings",style:{width:"100%"},filterable:!0,multiple:!0,clearable:"","multiple-limit":o.maxTopicsPerSpace,placeholder:o.getTopicsPlaceholder()},{default:w(()=>[(v(!0),A(te,null,we(i.topics,x=>(v(),D(r,{key:x.slug,label:x.title,value:x.id},{default:w(()=>[g("span",null,$(x.title),1),x.description?(v(),A("span",hxe,$(x.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","multiple-limit","placeholder"])),[[_,i.loading]]),t.isAdmin()&&n.creatable?(v(),D(b,{key:0,placement:"left",width:400,onShow:o.initCreatetopic},{trigger:w(()=>[y(u,{disabled:o.isTopicLimitReached,class:"fcom_secondary_button"},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1}),g("span",null,$(t.$t("New")),1)]),_:1},8,["disabled"])]),default:w(({hide:x})=>[y(m,{modelValue:i.newTopic,"onUpdate:modelValue":e[4]||(e[4]=k=>i.newTopic=k),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[y(h,{label:t.$t("Title"),required:""},{default:w(()=>[y(d,{modelValue:i.newTopic.title,"onUpdate:modelValue":e[1]||(e[1]=k=>i.newTopic.title=k),placeholder:t.$t("Title of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(h,{label:t.$t("Slug (optional)")},{default:w(()=>[y(f,{modelValue:i.newTopic.slug,"onUpdate:modelValue":e[2]||(e[2]=k=>i.newTopic.slug=k),placeholder:t.$t("Slug of the topic"),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores.")},null,8,["modelValue","placeholder","description"])]),_:1},8,["label"]),y(h,{label:t.$t("Description (optional)")},{default:w(()=>[y(d,{modelValue:i.newTopic.description,"onUpdate:modelValue":e[3]||(e[3]=k=>i.newTopic.description=k),type:"textarea",rows:3,placeholder:t.$t("Description of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,{errors:i.newTopicErrors,style:{"margin-bottom":"16px"}},null,8,["errors"]),y(h,null,{default:w(()=>[y(u,{class:"fcom_primary_button",onClick:k=>o.createTopic(x),loading:i.creatingTopic},{default:w(()=>[Y($(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const RF=ge(uxe,[["render",fxe]]),pxe={name:"ListViewIcon"},mxe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gxe(t,e,n,s,i,o){return v(),A("svg",mxe,[...e[0]||(e[0]=[Pa('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 26C20 21.5817 23.5817 18 28 18C32.4183 18 36 21.5817 36 26C36 30.4183 32.4183 34 28 34C23.5817 34 20 30.4183 20 26Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59265)"><ellipse cx="27.9996" cy="33.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="24.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 26C44 24.3431 45.3431 23 47 23H137C138.657 23 140 24.3431 140 26C140 27.6569 138.657 29 137 29H47C45.3431 29 44 27.6569 44 26Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 62C20 57.5817 23.5817 54 28 54C32.4183 54 36 57.5817 36 62C36 66.4183 32.4183 70 28 70C23.5817 70 20 66.4183 20 62Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59265)"><ellipse cx="27.9996" cy="69.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="60.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 62C44 60.3431 45.3431 59 47 59H137C138.657 59 140 60.3431 140 62C140 63.6569 138.657 65 137 65H47C45.3431 65 44 63.6569 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 98C20 93.5817 23.5817 90 28 90C32.4183 90 36 93.5817 36 98C36 102.418 32.4183 106 28 106C23.5817 106 20 102.418 20 98Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip2_3601_59265)"><ellipse cx="27.9996" cy="105.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="96.3999" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 98C44 96.3431 45.3431 95 47 95H137C138.657 95 140 96.3431 140 98C140 99.6569 138.657 101 137 101H47C45.3431 101 44 99.6569 44 98Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 134C20 129.582 23.5817 126 28 126C32.4183 126 36 129.582 36 134C36 138.418 32.4183 142 28 142C23.5817 142 20 138.418 20 134Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip3_3601_59265)"><ellipse cx="27.9996" cy="141.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="132.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 134C44 132.343 45.3431 131 47 131H137C138.657 131 140 132.343 140 134C140 135.657 138.657 137 137 137H47C45.3431 137 44 135.657 44 134Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59265"><rect x="20" y="18" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59265"><rect x="20" y="54" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip2_3601_59265"><rect x="20" y="90" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip3_3601_59265"><rect x="20" y="126" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',23)])])}const vxe=ge(pxe,[["render",gxe]]),yxe={name:"TimelineViewIcon"},bxe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _xe(t,e,n,s,i,o){return v(),A("svg",bxe,[...e[0]||(e[0]=[Pa('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24C20 21.7909 21.7909 20 24 20H136C138.209 20 140 21.7909 140 24C140 26.2091 138.209 28 136 28H24C21.7909 28 20 26.2091 20 24Z" fill="var(--fcom-secondary-border)"></path><path d="M20 37C20 34.7909 21.7909 33 24 33H130.286C132.495 33 134.286 34.7909 134.286 37C134.286 39.2091 132.495 41 130.286 41H24C21.7909 41 20 39.2091 20 37Z" fill="var(--fcom-secondary-border)"></path><path d="M20 57C20 52.5817 23.5817 49 28 49C32.4183 49 36 52.5817 36 57C36 61.4183 32.4183 65 28 65C23.5817 65 20 61.4183 20 57Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59186)"><ellipse cx="27.9996" cy="64.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="55.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 53C44 51.3431 45.3431 50 47 50H81C82.6569 50 84 51.3431 84 53C84 54.6569 82.6569 56 81 56H47C45.3431 56 44 54.6569 44 53Z" fill="var(--fcom-secondary-border)"></path><path d="M44 62C44 60.8954 44.8954 60 46 60H66C67.1046 60 68 60.8954 68 62C68 63.1046 67.1046 64 66 64H46C44.8954 64 44 63.1046 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 97C20 94.7909 21.7909 93 24 93H136C138.209 93 140 94.7909 140 97C140 99.2091 138.209 101 136 101H24C21.7909 101 20 99.2091 20 97Z" fill="var(--fcom-secondary-border)"></path><path d="M20 110C20 107.791 21.7909 106 24 106H130.286C132.495 106 134.286 107.791 134.286 110C134.286 112.209 132.495 114 130.286 114H24C21.7909 114 20 112.209 20 110Z" fill="var(--fcom-secondary-border)"></path><path d="M20 130C20 125.582 23.5817 122 28 122C32.4183 122 36 125.582 36 130C36 134.418 32.4183 138 28 138C23.5817 138 20 134.418 20 130Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59186)"><ellipse cx="27.9996" cy="137.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="128.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 126C44 124.343 45.3431 123 47 123H81C82.6569 123 84 124.343 84 126C84 127.657 82.6569 129 81 129H47C45.3431 129 44 127.657 44 126Z" fill="var(--fcom-secondary-border)"></path><path d="M44 135C44 133.895 44.8954 133 46 133H66C67.1046 133 68 133.895 68 135C68 136.105 67.1046 137 66 137H46C44.8954 137 44 136.105 44 135Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59186"><rect x="20" y="49" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59186"><rect x="20" y="122" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',19)])])}const wxe=ge(yxe,[["render",_xe]]),xxe={name:"SpaceGroupSelector",props:["modelValue","space_id"],emits:["update:modelValue"],data(){return{loading:!1,selected:this.modelValue,groups:[]}},watch:{selected(t){this.$emit("update:modelValue",t)}},methods:{getGroups(){this.loading=!0,this.$get("spaces/space_groups",{options_only:"yes",space_id:this.space_id}).then(t=>{this.groups=t.groups}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getGroups()}};function kxe(t,e,n,s,i,o){const r=ln,a=Qt,l=xt("loading");return Oe((v(),D(a,{placeholder:t.$t("Select Menu Group"),clearable:"",modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selected=c)},{default:w(()=>[(v(!0),A(te,null,we(i.groups,c=>(v(),D(r,{key:c.id,value:c.id.toString(),label:c.title},null,8,["value","label"]))),128))]),_:1},8,["placeholder","modelValue"])),[[l,i.loading]])}const I5=ge(xxe,[["render",kxe]]),Cxe={name:"global_form_builder",props:{formData:{type:Object,required:!1,default(){return{}}},submitButtonText:{type:String,required:!1,default:"Save"},formFields:{type:Array,required:!0,default(){return[]}},disableSubmit:{type:Boolean,required:!1,default:!1}},methods:{handleSubmit(){this.$emit("submit",this.formData)}}},Sxe={class:"fcom_form_builder"},$xe=["innerHTML"],Axe={key:8},Exe={key:9,class:"fcom_help_text"},Mxe=["innerHTML"];function Txe(t,e,n,s,i,o){const r=_t,a=zo,l=Ws,c=ln,u=Qt,d=Zt,h=r5,f=Rd,p=Dd,m=an,b=Ge,_=fn;return v(),A("div",Sxe,[y(_,{"label-position":"top",model:n.formData,onSubmit:Be(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),A(te,null,we(n.formFields,(x,k)=>(v(),D(m,{key:t.index,label:x.label},ks({default:w(()=>[x.type=="text"?(v(),D(r,{key:0,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C,placeholder:x.placeholder,type:x.data_type||"text"},null,8,["modelValue","onUpdate:modelValue","placeholder","type"])):x.type=="radio"?(v(),D(l,{key:1,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C},{default:w(()=>[(v(!0),A(te,null,we(x.options,(C,S)=>(v(),D(a,{key:S,value:C.value,label:C.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):x.type=="select"?(v(),D(u,{key:2,class:"fcom_select",multiple:x.is_multiple,clearable:"",filterable:"",modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C,placeholder:x.placeholder},{default:w(()=>[(v(!0),A(te,null,we(x.options,(C,S)=>(v(),D(c,{key:S,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:2},1032,["multiple","modelValue","onUpdate:modelValue","placeholder"])):x.type=="checkbox"?(v(),D(h,{key:3,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C},{default:w(()=>[(v(!0),A(te,null,we(x.options,(C,S)=>(v(),D(d,{key:S,value:C.value,label:C.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):x.type=="inline_checkbox"?(v(),D(d,{key:4,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C,"true-value":x.true_value||"yes","false-value":x.false_value||"no"},{default:w(()=>[Y($(x.checkbox_label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value","false-value"])):x.type=="date"?(v(),D(f,{key:5,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C,type:x.data_type||"date","value-format":x.value_format||"YYYY-MM-DD",format:x.value_format||"YYYY-MM-DD",placeholder:x.placeholder},null,8,["modelValue","onUpdate:modelValue","type","value-format","format","placeholder"])):x.type=="color_picker"?(v(),D(p,{key:6,modelValue:n.formData[k],"onUpdate:modelValue":C=>n.formData[k]=C},null,8,["modelValue","onUpdate:modelValue"])):x.type=="raw_html"?(v(),A("div",{key:7,innerHTML:x.content},null,8,$xe)):(v(),A("div",Axe,[g("pre",null,$(x),1)])),x.help_text?(v(),A("div",Exe,[g("p",{innerHTML:x.help_text},null,8,Mxe)])):O("",!0)]),_:2},[x.label?{name:"label",fn:w(()=>[Y($(x.label),1)]),key:"0"}:void 0]),1032,["label"]))),128)),n.disableSubmit?O("",!0):(v(),D(m,{key:0},{default:w(()=>[y(b,{class:"fcom_primary_button",onClick:Be(o.handleSubmit,["prevent"])},{default:w(()=>[Y($(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const VF=ge(Cxe,[["render",Txe]]),Pxe={name:"CardViewIcon"},Ixe={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function Lxe(t,e,n,s,i,o){return v(),A("svg",Ixe,[...e[0]||(e[0]=[Pa('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24.5714C20 22.0467 22.0467 20 24.5714 20H63.4286C65.9533 20 68 22.0467 68 24.5714V42.4286C68 44.9533 65.9533 47 63.4286 47H24.5714C22.0467 47 20 44.9533 20 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 56C20 54.3431 21.3431 53 23 53H65C66.6569 53 68 54.3431 68 56C68 57.6569 66.6569 59 65 59H23C21.3431 59 20 57.6569 20 56Z" fill="var(--fcom-secondary-border)"></path><path d="M20 66C20 64.3431 21.3431 63 23 63H41C42.6569 63 44 64.3431 44 66C44 67.6569 42.6569 69 41 69H23C21.3431 69 20 67.6569 20 66Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 24.5714C92 22.0467 94.0467 20 96.5714 20H135.429C137.953 20 140 22.0467 140 24.5714V42.4286C140 44.9533 137.953 47 135.429 47H96.5714C94.0467 47 92 44.9533 92 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 56C92 54.3431 93.3431 53 95 53H137C138.657 53 140 54.3431 140 56C140 57.6569 138.657 59 137 59H95C93.3431 59 92 57.6569 92 56Z" fill="var(--fcom-secondary-border)"></path><path d="M92 66C92 64.3431 93.3431 63 95 63H113C114.657 63 116 64.3431 116 66C116 67.6569 114.657 69 113 69H95C93.3431 69 92 67.6569 92 66Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 95.5714C20 93.0467 22.0467 91 24.5714 91H63.4286C65.9533 91 68 93.0467 68 95.5714V113.429C68 115.953 65.9533 118 63.4286 118H24.5714C22.0467 118 20 115.953 20 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 127C20 125.343 21.3431 124 23 124H65C66.6569 124 68 125.343 68 127C68 128.657 66.6569 130 65 130H23C21.3431 130 20 128.657 20 127Z" fill="var(--fcom-secondary-border)"></path><path d="M20 137C20 135.343 21.3431 134 23 134H41C42.6569 134 44 135.343 44 137C44 138.657 42.6569 140 41 140H23C21.3431 140 20 138.657 20 137Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 95.5714C92 93.0467 94.0467 91 96.5714 91H135.429C137.953 91 140 93.0467 140 95.5714V113.429C140 115.953 137.953 118 135.429 118H96.5714C94.0467 118 92 115.953 92 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 127C92 125.343 93.3431 124 95 124H137C138.657 124 140 125.343 140 127C140 128.657 138.657 130 137 130H95C93.3431 130 92 128.657 92 127Z" fill="var(--fcom-secondary-border)"></path><path d="M92 137C92 135.343 93.3431 134 95 134H113C114.657 134 116 135.343 116 137C116 138.657 114.657 140 113 140H95C93.3431 140 92 138.657 92 137Z" fill="var(--fcom-secondary-border)"></path>',22)])])}const Oxe=ge(Pxe,[["render",Lxe]]),Dxe={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:I5,SlugInput:Nd,ImageUploader:Fd,LogoEmojiSelector:G1,TopicSelector:RF,ListViewIcon:vxe,TimelineViewIcon:wxe,FormBuilder:VF,ErrorAlerts:X1,CardViewIcon:Oxe},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:uwe,formErrors:[],form:{title:"",slug:"",privacy:"private",parent_id:"",description:"",settings:{custom_lock_screen:"no",restricted_post_only:"no",emoji:"🚀",shape_svg:"",can_request_join:"yes",layout_style:"timeline",disable_layout_style:"no",show_sidebar:"yes",members_page_status:"members_only",document_library:"no",document_access:"members_only",document_upload:"admin_only"},topic_ids:[]},dataLoaded:!1,showingSections:["basic"],postOrderOptions:this.appVars.post_order_by_options,commentOrderOptions:this.appVars.comment_order_by_options,metaSettings:null,fetchingMetaBoxes:!1}},watch:{savingCount(){this.submit()}},computed:{isDefaultLockscreen(){return this.form.settings.custom_lock_screen=="no"&&this.form.privacy=="private"}},methods:{goToCustomization(){this.validateForm()&&(this.showingSections=["customization"])},validateForm(){if(this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Space Title"),description:this.$t("Space title is required.")}),this.form.slug&&this.form.slug.trim()){const t=K1("/"+this.form.slug);t.valid||t.errors.forEach(e=>{this.formErrors.push({title:this.$t("Slug"),description:this.$t(e)})})}return this.formErrors.length===0},submit(){if(!this.validateForm())return;this.saving=!0;let t="spaces",e={space:this.form},n=this.$post;if(this.form.id&&(t+="/"+this.form.id+"/by-id",e={space_id:this.form.id,data:{slug:this.form.slug,title:this.form.title,privacy:this.form.privacy,description:this.form.description,group_chat_support:this.form.group_chat_support,settings:this.form.settings,logo:this.form.logo,parent_id:this.form.parent_id??"",cover_photo:this.form.cover_photo,topic_ids:this.form.topic_ids}},n=this.$put,this.metaSettings)){let s={};this.each(this.metaSettings,(i,o)=>{s[o]=i.settings}),e.meta_settings=s}n(t,e).then(s=>{if(this.$eventBus.emit("reloadMenu"),!this.form.id&&!this.disable_redirect){let i=this.$router.resolve({name:"space_feeds",params:{space:s.space.slug}}).href;window.location.href=i;return}this.$notify.success(s.message),this.$emit("completed",s.space),s.redirect_url&&!this.disable_redirect&&(window.location.href=s.redirect_url)}).catch(s=>{this.form.id||(this.showingSections=["basic"]),this.$handleError(s)}).finally(()=>{this.saving=!1})},handleCoverPhotoUpload(t){this.form.cover_photo=t},handleLogoPhotoUpload(t){this.form.logo=t},fetchMetaBoxes(){this.community.id&&(this.fetchingMetaBoxes=!0,this.$get("spaces/"+this.community.slug+"/meta-settings",{space_id:this.community.id}).then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))}},mounted(){if(this.community&&this.community.id){this.community.chat_thread_id&&(this.community.group_chat_support="yes"),this.form=this.community;let t=[];this.community.topics&&this.each(this.community.topics,e=>{t.push(e.id)}),this.form.topic_ids=t,this.fetchMetaBoxes(this.community.id)}else this.parent_id?this.form.parent_id=this.parent_id:this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id);this.form.id&&(this.showingSections=["basic","customization"]),this.dataLoaded=!0}},Rxe={key:0},Vxe={class:"fcom_form_section"},Fxe={class:"fcom_help_text"},Nxe={class:"fcom_form_section"},Bxe={style:{"font-weight":"bold"}},zxe=["innerHTML"],Hxe={key:0},Uxe={class:"fcom_help_text"},jxe={key:0},Wxe={key:1,class:"fcom_form_section"},Yxe={class:"fcom_lined_checkboxes"},qxe={key:0,class:"fcom_pro_feature"},Gxe={key:0,style:{background:"var(--fcom-active-bg, #f0f3f5)",padding:"10px 15px","margin-bottom":"10px","border-radius":"8px"}},Xxe={class:"fcom_form_section"},Kxe={class:"fcom_svg_radio_item"},Zxe={class:"svg_radio_label"},Jxe={class:"fcom_svg_radio_item"},Qxe={class:"svg_radio_label"},eke={class:"fcom_svg_radio_item"},tke={class:"svg_radio_label"},nke={class:"fcom_help_text"},ske={key:0},ike={key:1},oke={class:"fcom_form_section"},rke={class:"fcom_help_text"},ake=["href"],lke={class:"fcom_image_uploader_wrapper"},cke={class:"fcom_help_text"},uke={class:"fcom_image_uploader_wrapper"},dke={class:"fcom_help_text"},hke={class:"fcom_space_form_bottom"},fke={class:"fcom_space_form_bottom"},pke={key:0},mke={class:"fcom_form_section fcom_mt_20"};function gke(t,e,n,s,i,o){const r=W("logo-emoji-selector"),a=_t,l=an,c=W("SlugInput"),u=W("space-group-selector"),d=ln,h=Qt,f=zo,p=Ws,m=Zt,b=W("TimelineViewIcon"),_=W("ListViewIcon"),x=W("CardViewIcon"),k=W("topic-selector"),C=Ra,S=W("EditPen"),E=_e,P=Ge,T=W("Delete"),L=W("ImageUploader"),I=W("error-alerts"),V=fn,R=W("form-builder"),N=xt("loading");return v(),A("div",null,[y(V,{onSubmit:e[29]||(e[29]=Be(F=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[30]||(e[30]=F=>i.form=F),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[i.showingSections.indexOf("basic")!==-1?(v(),A(te,{key:0},[i.form.id?O("",!0):(v(),A("h4",Rxe,$(t.$t("Basic Info")),1)),g("div",Vxe,[g("h4",null,$(t.$t("General")),1),y(l,{label:t.$t("Space Title"),required:""},{default:w(()=>[y(a,{type:"text",placeholder:t.$t("Your Space Title"),modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>i.form.title=F)},{prepend:w(()=>{var F,B;return[i.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=G=>{i.form.settings.emoji=G.emoji,i.form.logo=G.logo,i.form.settings.shape_svg=G.shape_svg}),config:{logo:i.form.logo,emoji:((F=i.form.settings)==null?void 0:F.emoji)||"",shape_svg:((B=i.form.settings)==null?void 0:B.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),i.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:w(()=>[y(c,{popMessage:t.$t("The URLs of this space posts will be changed to the new slug. If you have lots of contents in this space, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!i.form.id,modelValue:i.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>i.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Space Slug (no space or special chars)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),y(l,{label:t.$t("Description")},{default:w(()=>[y(a,{type:"textarea",rows:3,placeholder:t.$t("Space Description"),modelValue:i.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>i.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),y(l,{label:t.$t("Menu Group")},{default:w(()=>[i.dataLoaded?(v(),D(u,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=F=>i.form.parent_id=F),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",Fxe,[g("p",null,$(t.$t("Select a menu group to where this space will be added to the sidebar. If you do not select a menu group, it will be available on the all spaces page.")),1)])]),_:1},8,["label"])]),g("div",Nxe,[g("h4",null,$(t.$t("Access Control")),1),y(l,{label:t.$t("Privacy")},{default:w(()=>[y(h,{"popper-class":"rich_select",modelValue:i.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=F=>i.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),A(te,null,we(i.privacies,(F,B)=>(v(),D(d,{key:B,label:F.label,value:B},{default:w(()=>[g("span",Bxe,$(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,zxe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i.form.privacy=="private"?(v(),A(te,{key:0},[y(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[y(p,{modelValue:i.form.settings.custom_lock_screen,"onUpdate:modelValue":e[6]||(e[6]=F=>i.form.settings.custom_lock_screen=F),class:""},{default:w(()=>[y(f,{value:"yes"},{default:w(()=>[Y($(t.$t("Custom Lock Screen")),1)]),_:1}),y(f,{value:"no"},{default:w(()=>[Y($(t.$t("Default Lock Screen")),1)]),_:1}),y(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[Y($(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Hxe,$(t.$t("Require Pro")),1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[y(a,{modelValue:i.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[7]||(e[7]=F=>i.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",Uxe,[g("p",null,$(t.$t("This link will be used to redirect the non-members. This may be your sales page for this space")),1)])]),_:1},8,["label"])):O("",!0)],64)):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:1,style:{"margin-bottom":"0"}},{default:w(()=>[y(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.can_request_join,"onUpdate:modelValue":e[8]||(e[8]=F=>i.form.settings.can_request_join=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:2},{default:w(()=>[y(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_paywalls,"onUpdate:modelValue":e[9]||(e[9]=F=>i.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Paywalls in Default Lock Screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),y(l,{label:t.$t("Who can view space members")},{default:w(()=>[y(h,{modelValue:i.form.settings.members_page_status,"onUpdate:modelValue":e[10]||(e[10]=F=>i.form.settings.members_page_status=F)},{default:w(()=>[y(d,{value:"members_only",label:t.$t("Members Only")},null,8,["label"]),y(d,{value:"admin_only",label:t.$t("Admin/Moderators Only")},null,8,["label"]),y(d,{value:"logged_in",label:t.$t("Any Logged in users")},null,8,["label"]),y(d,{value:"everybody",label:t.$t("Anyone")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])])],64)):O("",!0),i.showingSections.indexOf("customization")!==-1?(v(),A(te,{key:1},[i.form.id?O("",!0):(v(),A("h4",jxe,$(t.$t("Customization")),1)),i.form.settings?(v(),A("div",Wxe,[g("h4",null,$(t.$t("Features Customizations")),1),y(l,null,{default:w(()=>[g("div",Yxe,[y(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.restricted_post_only,"onUpdate:modelValue":e[11]||(e[11]=F=>i.form.settings.restricted_post_only=F)},{default:w(()=>[Y($(t.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),y(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.show_sidebar,"onUpdate:modelValue":e[12]||(e[12]=F=>i.form.settings.show_sidebar=F)},{default:w(()=>[Y($(t.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"]),y(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_members_count,"onUpdate:modelValue":e[13]||(e[13]=F=>i.form.settings.hide_members_count=F)},{default:w(()=>[Y($(t.$t("Hide Members count from spaces page (when members page access unavailable)")),1)]),_:1},8,["modelValue"]),y(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.form.settings.document_library,"onUpdate:modelValue":e[14]||(e[14]=F=>i.form.settings.document_library=F)},{default:w(()=>[Y($(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",qxe," ("+$(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"])])]),_:1}),i.form.settings.document_library=="yes"?(v(),A("div",Gxe,[y(l,{label:t.$t("Document Library Access (View & Download)")},{default:w(()=>[y(p,{modelValue:i.form.settings.document_access,"onUpdate:modelValue":e[15]||(e[15]=F=>i.form.settings.document_access=F),class:"fcom_radio_group_inline"},{default:w(()=>[y(f,{value:"members_only"},{default:w(()=>[Y($(t.$t("Members of this space")),1)]),_:1}),y(f,{value:"logged_in"},{default:w(()=>[Y($(t.$t("Any Logged in users")),1)]),_:1}),y(f,{value:"everybody"},{default:w(()=>[Y($(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(l,{label:t.$t("Who can upload the documents?")},{default:w(()=>[y(p,{style:{"margin-bottom":"0"},modelValue:i.form.settings.document_upload,"onUpdate:modelValue":e[16]||(e[16]=F=>i.form.settings.document_upload=F),class:"fcom_radio_group_inline"},{default:w(()=>[y(f,{value:"members_only"},{default:w(()=>[Y($(t.$t("Any Members")),1)]),_:1}),y(f,{value:"admin_only"},{default:w(()=>[Y($(t.$t("Admin/Moderators Only")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0),y(l,{label:t.$t("Default Post Sort By")},{default:w(()=>[y(h,{modelValue:i.form.settings.default_post_sort_by,"onUpdate:modelValue":e[17]||(e[17]=F=>i.form.settings.default_post_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),A(te,null,we(i.postOrderOptions,(F,B)=>(v(),D(d,{key:B,value:B,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.disable_post_sort_by,"onUpdate:modelValue":e[18]||(e[18]=F=>i.form.settings.disable_post_sort_by=F)},{default:w(()=>[Y($(t.$t("Disable Post Sort By Options")),1)]),_:1},8,["modelValue"]),y(l,{label:t.$t("Default Comment Sort By")},{default:w(()=>[y(h,{modelValue:i.form.settings.default_comment_sort_by,"onUpdate:modelValue":e[19]||(e[19]=F=>i.form.settings.default_comment_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Comments Sort")},{default:w(()=>[(v(!0),A(te,null,we(i.commentOrderOptions,(F,B)=>(v(),D(d,{key:B,value:B,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])])):O("",!0),g("div",Xxe,[g("h4",null,$(t.$t("Layout")),1),y(l,{label:t.$t("Default Layout Styles"),class:"fcom_mb_10"},{default:w(()=>[y(p,{modelValue:i.form.settings.layout_style,"onUpdate:modelValue":e[20]||(e[20]=F=>i.form.settings.layout_style=F),class:"fcom_svg_radio_group"},{default:w(()=>[g("div",Kxe,[y(f,{value:"timeline"},{default:w(()=>[y(b,{style:{width:"100px",height:"auto"}}),g("p",Zxe,$(t.$t("Timeline")),1)]),_:1})]),g("div",Jxe,[y(f,{value:"list"},{default:w(()=>[y(_,{style:{width:"100px",height:"auto"}}),g("p",Qxe,$(t.$t("List")),1)]),_:1})]),g("div",eke,[y(f,{value:"card"},{default:w(()=>[y(x,{style:{width:"100px",height:"auto"}}),g("p",tke,$(t.$t("Card")),1)]),_:1})])]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(l,{style:{"margin-top":"0"}},{default:w(()=>[y(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.disable_layout_style,"onUpdate:modelValue":e[21]||(e[21]=F=>i.form.settings.disable_layout_style=F)},{default:w(()=>[Y($(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",nke,[i.form.settings.disable_layout_style==="yes"?(v(),A("p",ske,$(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",ike,$(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",oke,[g("h4",null,$(t.$t("Others")),1),t.has_pro&&i.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[y(k,{creatable:!0,space_id:i.form.id,modelValue:i.form.topic_ids,"onUpdate:modelValue":e[22]||(e[22]=F=>i.form.topic_ids=F)},null,8,["space_id","modelValue"]),g("div",rke,[g("p",null,[Y($(t.$t("Categorize your posts and allow members to filter spaces with the topic navigation bar. You can define up to 20 topics per space."))+" ",1),t.isAdmin()?(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},$(t.$t("Manage all topics.")),9,ake)):O("",!0)])]),y(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.topic_required,"onUpdate:modelValue":e[23]||(e[23]=F=>i.form.settings.topic_required=F)},{default:w(()=>[Y($(t.$t("Make members select a topic")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),t.appVars.has_chat?(v(),D(l,{key:1,label:t.$t("Group Chat?")},{default:w(()=>[y(m,{"true-value":"yes","false-value":"no",modelValue:i.form.group_chat_support,"onUpdate:modelValue":e[24]||(e[24]=F=>i.form.group_chat_support=F)},{default:w(()=>[Y($(t.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),y(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[i.form.settings.og_image?(v(),D(C,{key:0,alt:t.$t("Thumbnail / Open Graph Image"),src:i.form.settings.og_image,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",lke,[y(L,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.form.settings.og_image,confirm_remove:!0,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:e[25]||(e[25]=F=>{i.form.settings.og_image=F})},ks({remove:w(()=>[y(E,null,{default:w(()=>[y(T)]),_:1})]),_:2},[i.form.settings.og_image?{name:"trigger",fn:w(()=>[y(P,{class:"fcom_plain_button"},{default:w(()=>[y(E,null,{default:w(()=>[y(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",cke,[g("p",null,$(t.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),y(l,{label:t.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:w(()=>[i.form.cover_photo?(v(),D(C,{key:0,src:i.form.cover_photo,alt:t.$t("Featured Image Preview"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",uke,[y(L,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.form.cover_photo,confirm_remove:!0,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},ks({remove:w(()=>[y(E,null,{default:w(()=>[y(T)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[y(P,{class:"fcom_plain_button"},{default:w(()=>[y(E,null,{default:w(()=>[y(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",dke,[g("p",null,$(t.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),i.form.id?O("",!0):(v(),D(l,{key:2,style:{"margin-top":"45px"}},{default:w(()=>[g("div",hke,[i.showingSections.indexOf("basic")===-1?(v(),D(P,{key:0,class:"plain_button",text:"",onClick:e[26]||(e[26]=()=>{i.showingSections=["basic"]})},{default:w(()=>[g("span",null,$(t.$t("Go Back")),1)]),_:1})):O("",!0),Oe((v(),D(P,{class:"fcom_primary_button",disabled:i.saving,onClick:e[27]||(e[27]=F=>o.submit())},{default:w(()=>[g("span",null,$(t.$t("Create")),1)]),_:1},8,["disabled"])),[[N,i.saving]])])]),_:1}))])],64)):(v(),A(te,{key:2},[y(I,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),y(l,null,{default:w(()=>[g("div",fke,[e[31]||(e[31]=g("span",null,null,-1)),y(P,{onClick:e[28]||(e[28]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,$(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Oe((v(),A("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),A("div",pke,[(v(!0),A(te,null,we(i.metaSettings,F=>(v(),A("div",mke,[g("h4",null,$(F.section_title),1),y(R,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[N,i.fetchingMetaBoxes]])])}const L5=ge(Dxe,[["render",gke]]);var vo=(t=>(t.docTypeError="docTypeError",t.contextNotFound="contextNotFound",t.timerNotFound="timerNotFound",t.ctxCallOutOfScope="ctxCallOutOfScope",t.createNodeInParserFail="createNodeInParserFail",t.stackOverFlow="stackOverFlow",t.parserMatchError="parserMatchError",t.serializerMatchError="serializerMatchError",t.getAtomFromSchemaFail="getAtomFromSchemaFail",t.expectDomTypeError="expectDomTypeError",t.callCommandBeforeEditorView="callCommandBeforeEditorView",t.missingRootElement="missingRootElement",t.missingNodeInSchema="missingNodeInSchema",t.missingMarkInSchema="missingMarkInSchema",t.ctxNotBind="ctxNotBind",t.missingYjsDoc="missingYjsDoc",t))(vo||{});let Ho=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const vke=(t,e)=>typeof e=="function"?"[Function]":e,Wf=t=>JSON.stringify(t,vke);function yke(t){return new Ho(vo.docTypeError,`Doc type error, unsupported type: ${Wf(t)}`)}function bke(t){return new Ho(vo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function _ke(t){return new Ho(vo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function O5(){return new Ho(vo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function wke(...t){const e=t.reduce((n,s)=>{if(!s)return n;const i=o=>Array.isArray(o)?o.map(r=>i(r)).join(", "):o.toJSON?Wf(o.toJSON()):o.spec?Wf(o.spec):o.toString();return`${n}, ${i(s)}`},"Create prosemirror node from remark failed in parser");return new Ho(vo.createNodeInParserFail,e)}function FF(){return new Ho(vo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function xke(t){return new Ho(vo.parserMatchError,`Cannot match target parser for node: ${Wf(t)}.`)}function kke(t){return new Ho(vo.serializerMatchError,`Cannot match target serializer for node: ${Wf(t)}.`)}function Cke(t,e){return new Ho(vo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function Qr(t){return new Ho(vo.expectDomTypeError,`Expect to be a dom, but get: ${Wf(t)}.`)}function Ske(){return new Ho(vo.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function NF(t){return new Ho(vo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function $ke(t){return new Ho(vo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var BF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},bt=(t,e,n)=>(BF(t,e,"read from private field"),n?n.call(t):e.get(t)),gs=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},kn=(t,e,n,s)=>(BF(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let zF=class{constructor(){this.sliceMap=new Map,this.get=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(s=>s.type.name===e):this.sliceMap.get(e.id);if(!n){const s=typeof e=="string"?e:e.name;throw bke(s)}return n},this.remove=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(s=>s.type.name===e):this.sliceMap.get(e.id);n&&this.sliceMap.delete(n.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(n=>n.type.name===e):this.sliceMap.has(e.id)}};var oa,jl,nm;let Ake=class{constructor(e,n,s){gs(this,oa,void 0),gs(this,jl,void 0),gs(this,nm,void 0),kn(this,oa,[]),kn(this,nm,()=>{bt(this,oa).forEach(i=>i(bt(this,jl)))}),this.set=i=>{kn(this,jl,i),bt(this,nm).call(this)},this.get=()=>bt(this,jl),this.update=i=>{kn(this,jl,i(bt(this,jl))),bt(this,nm).call(this)},this.type=s,kn(this,jl,n),e.set(s.id,this)}on(e){return bt(this,oa).push(e),()=>{kn(this,oa,bt(this,oa).filter(n=>n!==e))}}once(e){const n=this.on(s=>{e(s),n()});return n}off(e){kn(this,oa,bt(this,oa).filter(n=>n!==e))}offAll(){kn(this,oa,[])}};oa=new WeakMap,jl=new WeakMap,nm=new WeakMap;let Eke=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw O5()}}create(e,n=this._defaultValue){return new Ake(e,n,this)}};const wn=(t,e)=>new Eke(t,e);var N0,B0,z0,Ch,sm,pu,im,om,rm;let Mke=class{constructor(e,n,s){gs(this,N0,void 0),gs(this,B0,void 0),gs(this,z0,void 0),gs(this,Ch,void 0),gs(this,sm,void 0),gs(this,pu,void 0),gs(this,im,void 0),gs(this,om,void 0),gs(this,rm,void 0),kn(this,Ch,new Set),kn(this,sm,new Set),kn(this,pu,new Map),kn(this,im,new Map),this.read=()=>({metadata:bt(this,N0),injectedSlices:[...bt(this,Ch)].map(i=>({name:typeof i=="string"?i:i.name,value:bt(this,om).call(this,i)})),consumedSlices:[...bt(this,sm)].map(i=>({name:typeof i=="string"?i:i.name,value:bt(this,om).call(this,i)})),recordedTimers:[...bt(this,pu)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:bt(this,rm).call(this,i)})),waitTimers:[...bt(this,im)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:bt(this,rm).call(this,i)}))}),this.onRecord=i=>{bt(this,pu).set(i,{start:Date.now(),duration:0})},this.onClear=i=>{bt(this,pu).delete(i)},this.onDone=i=>{const o=bt(this,pu).get(i);o&&(o.duration=Date.now()-o.start)},this.onWait=(i,o)=>{const r=Date.now();o.finally(()=>{bt(this,im).set(i,{duration:Date.now()-r})})},this.onInject=i=>{bt(this,Ch).add(i)},this.onRemove=i=>{bt(this,Ch).delete(i)},this.onUse=i=>{bt(this,sm).add(i)},kn(this,om,i=>bt(this,B0).get(i).get()),kn(this,rm,i=>bt(this,z0).get(i).status),kn(this,B0,e),kn(this,z0,n),kn(this,N0,s)}};N0=new WeakMap,B0=new WeakMap,z0=new WeakMap,Ch=new WeakMap,sm=new WeakMap,pu=new WeakMap,im=new WeakMap,om=new WeakMap,rm=new WeakMap;var Wl,Yl,H0,kr;const Tke=class HF{constructor(e,n,s){gs(this,Wl,void 0),gs(this,Yl,void 0),gs(this,H0,void 0),gs(this,kr,void 0),this.produce=i=>i&&Object.keys(i).length?new HF(bt(this,Wl),bt(this,Yl),{...i}):this,this.inject=(i,o)=>{var r;const a=i.create(bt(this,Wl).sliceMap);return o!=null&&a.set(o),(r=bt(this,kr))==null||r.onInject(i),this},this.remove=i=>{var o;return bt(this,Wl).remove(i),(o=bt(this,kr))==null||o.onRemove(i),this},this.record=i=>{var o;return i.create(bt(this,Yl).store),(o=bt(this,kr))==null||o.onRecord(i),this},this.clearTimer=i=>{var o;return bt(this,Yl).remove(i),(o=bt(this,kr))==null||o.onClear(i),this},this.isInjected=i=>bt(this,Wl).has(i),this.isRecorded=i=>bt(this,Yl).has(i),this.use=i=>{var o;return(o=bt(this,kr))==null||o.onUse(i),bt(this,Wl).get(i)},this.get=i=>this.use(i).get(),this.set=(i,o)=>this.use(i).set(o),this.update=(i,o)=>this.use(i).update(o),this.timer=i=>bt(this,Yl).get(i),this.done=i=>{var o;this.timer(i).done(),(o=bt(this,kr))==null||o.onDone(i)},this.wait=i=>{var o;const r=this.timer(i).start();return(o=bt(this,kr))==null||o.onWait(i,r),r},this.waitTimers=async i=>{await Promise.all(this.get(i).map(o=>this.wait(o)))},kn(this,Wl,e),kn(this,Yl,n),kn(this,H0,s),s&&kn(this,kr,new Mke(e,n,s))}get meta(){return bt(this,H0)}get inspector(){return bt(this,kr)}};Wl=new WeakMap,Yl=new WeakMap,H0=new WeakMap,kr=new WeakMap;let Pke=Tke,Ike=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw _ke(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var Sh,mu,am,ql,lm,U0;let Lke=class{constructor(e,n){gs(this,Sh,void 0),gs(this,mu,void 0),gs(this,am,void 0),gs(this,ql,void 0),gs(this,lm,void 0),gs(this,U0,void 0),kn(this,Sh,null),kn(this,mu,null),kn(this,ql,"pending"),this.start=()=>(bt(this,Sh)??kn(this,Sh,new Promise((s,i)=>{kn(this,mu,o=>{o instanceof CustomEvent&&o.detail.id===bt(this,am)&&(kn(this,ql,"resolved"),bt(this,lm).call(this),o.stopImmediatePropagation(),s())}),bt(this,U0).call(this,()=>{bt(this,ql)==="pending"&&kn(this,ql,"rejected"),bt(this,lm).call(this),i(new Error(`Timing ${this.type.name} timeout.`))}),kn(this,ql,"pending"),addEventListener(this.type.name,bt(this,mu))})),bt(this,Sh)),this.done=()=>{const s=new CustomEvent(this.type.name,{detail:{id:bt(this,am)}});dispatchEvent(s)},kn(this,lm,()=>{bt(this,mu)&&removeEventListener(this.type.name,bt(this,mu))}),kn(this,U0,s=>{setTimeout(()=>{s()},this.type.timeout)}),kn(this,am,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return bt(this,ql)}};Sh=new WeakMap,mu=new WeakMap,am=new WeakMap,ql=new WeakMap,lm=new WeakMap,U0=new WeakMap;let Oke=class{constructor(e,n=3e3){this.create=s=>new Lke(s,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const Xc=(t,e=3e3)=>new Oke(t,e);function Ks(t){this.content=t}Ks.prototype={constructor:Ks,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var s=n&&n!=t?this.remove(n):this,i=s.find(t),o=s.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ks(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ks(n)},addToStart:function(t,e){return new Ks([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ks(n)},addBefore:function(t,e,n){var s=this.remove(e),i=s.content.slice(),o=s.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Ks(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Ks.from(t),t.size?new Ks(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ks.from(t),t.size?new Ks(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ks.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Ks.from=function(t){if(t instanceof Ks)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ks(e)};function UF(t,e,n){for(let s=0;;s++){if(s==t.childCount||s==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(s),o=e.child(s);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let r=0;i.text[r]==o.text[r];r++)n++;return n}if(i.content.size||o.content.size){let r=UF(i.content,o.content,n+1);if(r!=null)return r}n+=i.nodeSize}}function jF(t,e,n,s){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:s};let r=t.child(--i),a=e.child(--o),l=r.nodeSize;if(r==a){n-=l,s-=l;continue}if(!r.sameMarkup(a))return{a:n,b:s};if(r.isText&&r.text!=a.text){let c=0,u=Math.min(r.text.length,a.text.length);for(;c<u&&r.text[r.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,s--;return{a:n,b:s}}if(r.content.size||a.content.size){let c=jF(r.content,a.content,n-1,s-1);if(c)return c}n-=l,s-=l}}let nt=class Li{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let s=0;s<e.length;s++)this.size+=e[s].nodeSize}nodesBetween(e,n,s,i=0,o){for(let r=0,a=0;a<n;r++){let l=this.content[r],c=a+l.nodeSize;if(c>e&&s(l,i+a,o||null,r)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),s,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,s,i){let o="",r=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&s&&(r?r=!1:o+=s),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,s=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(s)&&(i[i.length-1]=n.withText(n.text+s.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new Li(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let s=[],i=0;if(n>e)for(let o=0,r=0;r<n;o++){let a=this.content[o],l=r+a.nodeSize;l>e&&((r<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-r),Math.min(a.text.length,n-r)):a=a.cut(Math.max(0,e-r-1),Math.min(a.content.size,n-r-1))),s.push(a),i+=a.nodeSize),r=l}return new Li(s,i)}cutByIndex(e,n){return e==n?Li.empty:e==0&&n==this.content.length?this:new Li(this.content.slice(e,n))}replaceChild(e,n){let s=this.content[e];if(s==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-s.nodeSize;return i[e]=n,new Li(i,o)}addToStart(e){return new Li([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Li(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,s=0;n<this.content.length;n++){let i=this.content[n];e(i,s,n),s+=i.nodeSize}}findDiffStart(e,n=0){return UF(this,e,n)}findDiffEnd(e,n=this.size,s=e.size){return jF(this,e,n,s)}findIndex(e,n=-1){if(e==0)return i0(0,e);if(e==this.size)return i0(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let s=0,i=0;;s++){let o=this.child(s),r=i+o.nodeSize;if(r>=e)return r==e||n>0?i0(s+1,r):i0(s,i);i=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Li.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Li(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Li.empty;let n,s=0;for(let i=0;i<e.length;i++){let o=e[i];s+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Li(n||e,s)}static from(e){if(!e)return Li.empty;if(e instanceof Li)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Li([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};nt.empty=new nt([],0);const Ww={index:0,offset:0};function i0(t,e){return Ww.index=t,Ww.offset=e,Ww}function Tb(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let s=0;s<t.length;s++)if(!Tb(t[s],e[s]))return!1}else{for(let s in t)if(!(s in e)||!Tb(t[s],e[s]))return!1;for(let s in e)if(!(s in t))return!1}return!0}let An=class Ik{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,s=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!s&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),s=!0),n&&n.push(o)}}return n||(n=e.slice()),s||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Tb(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let s=e.marks[n.type];if(!s)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=s.create(n.attrs);return s.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let s=0;s<e.length;s++)if(!e[s].eq(n[s]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ik.none;if(e instanceof Ik)return[e];let n=e.slice();return n.sort((s,i)=>s.type.rank-i.type.rank),n}};An.none=[];class Pb extends Error{}class it{constructor(e,n,s){this.content=e,this.openStart=n,this.openEnd=s}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let s=YF(this.content,e+this.openStart,n);return s&&new it(s,this.openStart,this.openEnd)}removeBetween(e,n){return new it(WF(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return it.empty;let s=n.openStart||0,i=n.openEnd||0;if(typeof s!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new it(nt.fromJSON(e,n.content),s,i)}static maxOpen(e,n=!0){let s=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)s++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new it(e,s,i)}}it.empty=new it(nt.empty,0,0);function WF(t,e,n){let{index:s,offset:i}=t.findIndex(e),o=t.maybeChild(s),{index:r,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(r).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(s!=r)throw new RangeError("Removing non-flat range");return t.replaceChild(s,o.copy(WF(o.content,e-i-1,n-i-1)))}function YF(t,e,n,s){let{index:i,offset:o}=t.findIndex(e),r=t.maybeChild(i);if(o==e||r.isText)return s&&!s.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=YF(r.content,e-o-1,n);return a&&t.replaceChild(i,r.copy(a))}function Dke(t,e,n){if(n.openStart>t.depth)throw new Pb("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Pb("Inconsistent open depths");return qF(t,e,n,0)}function qF(t,e,n,s){let i=t.index(s),o=t.node(s);if(i==e.index(s)&&s<t.depth-n.openStart){let r=qF(t,e,n,s+1);return o.copy(o.content.replaceChild(i,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==s&&e.depth==s){let r=t.parent,a=r.content;return Gu(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=Rke(n,t);return Gu(o,XF(t,r,a,e,s))}else return Gu(o,Ib(t,e,s))}function GF(t,e){if(!e.type.compatibleContent(t.type))throw new Pb("Cannot join "+e.type.name+" onto "+t.type.name)}function Lk(t,e,n){let s=t.node(n);return GF(s,e.node(n)),s}function qu(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function sg(t,e,n,s){let i=(e||t).node(n),o=0,r=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(qu(t.nodeAfter,s),o++));for(let a=o;a<r;a++)qu(i.child(a),s);e&&e.depth==n&&e.textOffset&&qu(e.nodeBefore,s)}function Gu(t,e){return t.type.checkContent(e),t.copy(e)}function XF(t,e,n,s,i){let o=t.depth>i&&Lk(t,e,i+1),r=s.depth>i&&Lk(n,s,i+1),a=[];return sg(null,t,i,a),o&&r&&e.index(i)==n.index(i)?(GF(o,r),qu(Gu(o,XF(t,e,n,s,i+1)),a)):(o&&qu(Gu(o,Ib(t,e,i+1)),a),sg(e,n,i,a),r&&qu(Gu(r,Ib(n,s,i+1)),a)),sg(s,null,i,a),new nt(a)}function Ib(t,e,n){let s=[];if(sg(null,t,n,s),t.depth>n){let i=Lk(t,e,n+1);qu(Gu(i,Ib(t,e,n+1)),s)}return sg(e,null,n,s),new nt(s)}function Rke(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(nt.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class s1{constructor(e,n,s){this.pos=e,this.path=n,this.parentOffset=s,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let s=this.pos-this.path[this.path.length-1],i=e.child(n);return s?e.child(n).cut(s):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let s=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=s.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return An.none;if(this.textOffset)return e.child(n).marks;let s=e.maybeChild(n-1),i=e.maybeChild(n);if(!s){let a=s;s=i,i=a}let o=s.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!i||!o[r].isInSet(i.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let s=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let s=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);s>=0;s--)if(e.pos<=this.end(s)&&(!n||n(this.node(s))))return new KF(this,e,s);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let s=[],i=0,o=n;for(let r=e;;){let{index:a,offset:l}=r.content.findIndex(o),c=o-l;if(s.push(r,a,i+l),!c||(r=r.child(a),r.isText))break;o=c-1,i+=l+1}return new s1(n,s,o)}static resolveCached(e,n){let s=qA.get(e);if(s)for(let o=0;o<s.elts.length;o++){let r=s.elts[o];if(r.pos==n)return r}else qA.set(e,s=new Vke);let i=s.elts[s.i]=s1.resolve(e,n);return s.i=(s.i+1)%Fke,i}}class Vke{constructor(){this.elts=[],this.i=0}}const Fke=12,qA=new WeakMap;class KF{constructor(e,n,s){this.$from=e,this.$to=n,this.depth=s}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Nke=Object.create(null);let Sc=class Ok{constructor(e,n,s,i=An.none){this.type=e,this.attrs=n,this.marks=i,this.content=s||nt.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,s,i=0){this.content.nodesBetween(e,n,s,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,s,i){return this.content.textBetween(e,n,s,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,s){return this.type==e&&Tb(this.attrs,n||e.defaultAttrs||Nke)&&An.sameSet(this.marks,s||An.none)}copy(e=null){return e==this.content?this:new Ok(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ok(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,s=!1){if(e==n)return it.empty;let i=this.resolve(e),o=this.resolve(n),r=s?0:i.sharedDepth(n),a=i.start(r),c=i.node(r).content.cut(i.pos-a,o.pos-a);return new it(c,i.depth-r,o.depth-r)}replace(e,n,s){return Dke(this.resolve(e),this.resolve(n),s)}nodeAt(e){for(let n=this;;){let{index:s,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(s),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:s}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:s}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:s}=this.content.findIndex(e);if(s<e)return{node:this.content.child(n),index:n,offset:s};let i=this.content.child(n-1);return{node:i,index:n-1,offset:s-i.nodeSize}}resolve(e){return s1.resolveCached(this,e)}resolveNoCache(e){return s1.resolve(this,e)}rangeHasMark(e,n,s){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(s.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ZF(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,s=nt.empty,i=0,o=s.childCount){let r=this.contentMatchAt(e).matchFragment(s,i,o),a=r&&r.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(s.child(l).marks))return!1;return!0}canReplaceWith(e,n,s,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(s),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=An.none;for(let n=0;n<this.marks.length;n++){let s=this.marks[n];s.type.checkAttrs(s.attrs),e=s.addToSet(e)}if(!An.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let s;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");s=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,s)}let i=nt.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,s);return o.type.checkAttrs(o.attrs),o}};Sc.prototype.text=void 0;class Lb extends Sc{constructor(e,n,s,i){if(super(e,n,null,i),!s)throw new RangeError("Empty text nodes are not allowed");this.text=s}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ZF(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Lb(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Lb(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ZF(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class pd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let s=new Bke(e,n);if(s.next==null)return pd.empty;let i=JF(s);s.next&&s.err("Unexpected trailing text");let o=qke(Yke(i));return Gke(o,s),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,s=e.childCount){let i=this;for(let o=n;i&&o<s;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let s=0;s<e.next.length;s++)if(this.next[n].type==e.next[s].type)return!0;return!1}fillBefore(e,n=!1,s=0){let i=[this];function o(r,a){let l=r.matchFragment(e,s);if(l&&(!n||l.validEnd))return nt.from(a.map(c=>c.createAndFill()));for(let c=0;c<r.next.length;c++){let{type:u,next:d}=r.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let s=0;s<this.wrapCache.length;s+=2)if(this.wrapCache[s]==e)return this.wrapCache[s+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),s=[{match:this,type:null,via:null}];for(;s.length;){let i=s.shift(),o=i.match;if(o.matchType(e)){let r=[];for(let a=i;a.type;a=a.via)r.push(a.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:a,next:l}=o.next[r];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(s.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(s){e.push(s);for(let i=0;i<s.next.length;i++)e.indexOf(s.next[i].next)==-1&&n(s.next[i].next)}return n(this),e.map((s,i)=>{let o=i+(s.validEnd?"*":" ")+" ";for(let r=0;r<s.next.length;r++)o+=(r?", ":"")+s.next[r].type.name+"->"+e.indexOf(s.next[r].next);return o}).join(`
82 `)}}pd.empty=new pd(!0);class Bke{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function JF(t){let e=[];do e.push(zke(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function zke(t){let e=[];do e.push(Hke(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Hke(t){let e=Wke(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Uke(t,e);else break;return e}function GA(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Uke(t,e){let n=GA(t),s=n;return t.eat(",")&&(t.next!="}"?s=GA(t):s=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:s,expr:e}}function jke(t,e){let n=t.nodeTypes,s=n[e];if(s)return[s];let i=[];for(let o in n){let r=n[o];r.groups.indexOf(e)>-1&&i.push(r)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Wke(t){if(t.eat("(")){let e=JF(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=jke(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Yke(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function s(r,a,l){let c={term:l,to:a};return e[r].push(c),c}function i(r,a){r.forEach(l=>l.to=a)}function o(r,a){if(r.type=="choice")return r.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(r.type=="seq")for(let l=0;;l++){let c=o(r.exprs[l],a);if(l==r.exprs.length-1)return c;i(c,a=n())}else if(r.type=="star"){let l=n();return s(a,l),i(o(r.expr,l),l),[s(l)]}else if(r.type=="plus"){let l=n();return i(o(r.expr,a),l),i(o(r.expr,l),l),[s(l)]}else{if(r.type=="opt")return[s(a)].concat(o(r.expr,a));if(r.type=="range"){let l=a;for(let c=0;c<r.min;c++){let u=n();i(o(r.expr,l),u),l=u}if(r.max==-1)i(o(r.expr,l),l);else for(let c=r.min;c<r.max;c++){let u=n();s(l,u),i(o(r.expr,l),u),l=u}return[s(l)]}else{if(r.type=="name")return[s(a,void 0,r.value)];throw new Error("Unknown expr type")}}}}function QF(t,e){return e-t}function XA(t,e){let n=[];return s(e),n.sort(QF);function s(i){let o=t[i];if(o.length==1&&!o[0].term)return s(o[0].to);n.push(i);for(let r=0;r<o.length;r++){let{term:a,to:l}=o[r];!a&&n.indexOf(l)==-1&&s(l)}}}function qke(t){let e=Object.create(null);return n(XA(t,0));function n(s){let i=[];s.forEach(r=>{t[r].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);XA(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[s.join(",")]=new pd(s.indexOf(t.length-1)>-1);for(let r=0;r<i.length;r++){let a=i[r][1].sort(QF);o.next.push({type:i[r][0],next:e[a.join(",")]||n(a)})}return o}}function Gke(t,e){for(let n=0,s=[t];n<s.length;n++){let i=s[n],o=!i.validEnd,r=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];r.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),s.indexOf(c)==-1&&s.push(c)}o&&e.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function eN(t){let e=Object.create(null);for(let n in t){let s=t[n];if(!s.hasDefault)return null;e[n]=s.default}return e}function tN(t,e){let n=Object.create(null);for(let s in t){let i=e&&e[s];if(i===void 0){let o=t[s];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+s)}n[s]=i}return n}function nN(t,e,n,s){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function sN(t,e){let n=Object.create(null);if(e)for(let s in e)n[s]=new Kke(t,s,e[s]);return n}let Ob=class iN{constructor(e,n,s){this.name=e,this.schema=n,this.spec=s,this.markSet=null,this.groups=s.group?s.group.split(" "):[],this.attrs=sN(e,s.attrs),this.defaultAttrs=eN(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(s.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:tN(this.attrs,e)}create(e=null,n,s){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Sc(this,this.computeAttrs(e),nt.from(n),An.setFrom(s))}createChecked(e=null,n,s){return n=nt.from(n),this.checkContent(n),new Sc(this,this.computeAttrs(e),n,An.setFrom(s))}createAndFill(e=null,n,s){if(e=this.computeAttrs(e),n=nt.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(nt.empty,!0);return o?new Sc(this,e,n.append(o),An.setFrom(s)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let s=0;s<e.childCount;s++)if(!this.allowsMarks(e.child(s).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){nN(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let s=0;s<e.length;s++)this.allowsMarkType(e[s].type)?n&&n.push(e[s]):n||(n=e.slice(0,s));return n?n.length?n:An.none:e}static compile(e,n){let s=Object.create(null);e.forEach((o,r)=>s[o]=new iN(o,n,r));let i=n.spec.topNode||"doc";if(!s[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!s.text)throw new RangeError("Every schema needs a 'text' type");for(let o in s.text.attrs)throw new RangeError("The text node type should not have attributes");return s}};function Xke(t,e,n){let s=n.split("|");return i=>{let o=i===null?"null":typeof i;if(s.indexOf(o)<0)throw new RangeError(`Expected value of type ${s} for attribute ${e} on type ${t}, got ${o}`)}}class Kke{constructor(e,n,s){this.hasDefault=Object.prototype.hasOwnProperty.call(s,"default"),this.default=s.default,this.validate=typeof s.validate=="string"?Xke(e,n,s.validate):s.validate}get isRequired(){return!this.hasDefault}}class l2{constructor(e,n,s,i){this.name=e,this.rank=n,this.schema=s,this.spec=i,this.attrs=sN(e,i.attrs),this.excluded=null;let o=eN(this.attrs);this.instance=o?new An(this,o):null}create(e=null){return!e&&this.instance?this.instance:new An(this,tN(this.attrs,e))}static compile(e,n){let s=Object.create(null),i=0;return e.forEach((o,r)=>s[o]=new l2(o,i++,n,r)),s}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){nN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Zke{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Ks.from(e.nodes),n.marks=Ks.from(e.marks||{}),this.nodes=Ob.compile(this.spec.nodes,this),this.marks=l2.compile(this.spec.marks,this);let s=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],r=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=s[r]||(s[r]=pd.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?KA(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:KA(this,r.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,s,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ob){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,s,i)}text(e,n){let s=this.nodes.text;return new Lb(s,s.defaultAttrs,e,An.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Sc.fromJSON(this,e)}markFromJSON(e){return An.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function KA(t,e){let n=[];for(let s=0;s<e.length;s++){let i=e[s],o=t.marks[i],r=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(r=l)}if(!r)throw new SyntaxError("Unknown mark type: '"+e[s]+"'")}return n}function Jke(t){return t.tag!=null}function Qke(t){return t.style!=null}let c2=class Dk{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let s=this.matchedStyles=[];n.forEach(i=>{if(Jke(i))this.tags.push(i);else if(Qke(i)){let o=/[^=]*/.exec(i.style)[0];s.indexOf(o)<0&&s.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let s=new JA(this,n,!1);return s.addAll(e,An.none,n.from,n.to),s.finish()}parseSlice(e,n={}){let s=new JA(this,n,!0);return s.addAll(e,An.none,n.from,n.to),it.maxOpen(s.finish())}matchTag(e,n,s){for(let i=s?this.tags.indexOf(s)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(n6e(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let r=o.getAttrs(e);if(r===!1)continue;o.attrs=r||void 0}return o}}}matchStyle(e,n,s,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!s.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(r.getAttrs){let l=r.getAttrs(n);if(l===!1)continue;r.attrs=l||void 0}return r}}}static schemaRules(e){let n=[];function s(i){let o=i.priority==null?50:i.priority,r=0;for(;r<n.length;r++){let a=n[r];if((a.priority==null?50:a.priority)<o)break}n.splice(r,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(r=>{s(r=QA(r)),r.mark||r.ignore||r.clearMark||(r.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(r=>{s(r=QA(r)),r.node||r.ignore||r.mark||(r.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Dk(e,Dk.schemaRules(e)))}};const oN={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},e6e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},rN={ol:!0,ul:!0},Db=1,Rb=2,ig=4;function ZA(t,e,n){return e!=null?(e?Db:0)|(e==="full"?Rb:0):t&&t.whitespace=="pre"?Db|Rb:n&~ig}class o0{constructor(e,n,s,i,o,r){this.type=e,this.attrs=n,this.marks=s,this.solid=i,this.options=r,this.content=[],this.activeMarks=An.none,this.match=o||(r&ig?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(nt.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let s=this.type.contentMatch,i;return(i=s.findWrapping(e.type))?(this.match=s,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Db)){let s=this.content[this.content.length-1],i;if(s&&s.isText&&(i=/[ \t\r\n\u000c]+$/.exec(s.text))){let o=s;s.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=nt.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(nt.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!oN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class JA{constructor(e,n,s){this.parser=e,this.options=n,this.isOpen=s,this.open=0;let i=n.topNode,o,r=ZA(null,n.preserveWhitespace,0)|(s?ig:0);i?o=new o0(i.type,i.attrs,An.none,!0,n.topMatch||i.type.contentMatch,r):s?o=new o0(null,null,An.none,!0,null,r):o=new o0(e.schema.topNodeType,null,An.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let s=e.nodeValue,i=this.top;if(i.options&Rb||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(s)){if(i.options&Db)i.options&Rb?s=s.replace(/\r\n?/g,`
83 `):s=s.replace(/\r?\n|\r/g," ");else if(s=s.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(s)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],r=e.previousSibling;(!o||r&&r.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(s=s.slice(1))}s&&this.insertNode(this.parser.schema.text(s),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,s){let i=e.nodeName.toLowerCase(),o;rN.hasOwnProperty(i)&&this.parser.normalizeLists&&t6e(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,s));if(r?r.ignore:e6e.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!r||r.skip||r.closeParent){r&&r.closeParent?this.open=Math.max(0,this.open-1):r&&r.skip.nodeType&&(e=r.skip);let a,l=this.top,c=this.needsBlock;if(oN.hasOwnProperty(i))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),a=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);return}let u=r&&r.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),a&&this.sync(l),this.needsBlock=c}else{let a=this.readStyles(e,n);a&&this.addElementByRule(e,r,a,r.consuming===!1?o:void 0)}}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
84 `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let s=e.style;if(s&&s.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],r=s.getPropertyValue(o);if(r)for(let a=void 0;;){let l=this.parser.matchStyle(o,r,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,s,i){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),s)||this.leafFallback(e,s);else{let l=this.enter(r,n.attrs||null,s,n.preserveWhitespace);l&&(o=!0,s=l)}else{let l=this.parser.schema.marks[n.mark];s=s.concat(l.create(n.attrs))}let a=this.top;if(r&&r.isLeaf)this.findInside(e);else if(i)this.addElement(e,s,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,s));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,s)}o&&this.sync(a)&&this.open--}addAll(e,n,s,i){let o=s||0;for(let r=s?e.childNodes[s]:e.firstChild,a=i==null?null:e.childNodes[i];r!=a;r=r.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(r,n);this.findAtPoint(e,o)}findPlace(e,n){let s,i;for(let o=this.open;o>=0;o--){let r=this.nodes[o],a=r.findWrapping(e);if(a&&(!s||s.length>a.length)&&(s=a,i=r,!a.length)||r.solid)break}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=An.none;for(let r of s.concat(e.marks))(i.type?i.type.allowsMarkType(r.type):eE(r.type,e.type))&&(o=r.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,s,i){let o=this.findPlace(e.create(n),s);return o&&(o=this.enterInner(e,n,s,!0,i)),o}enterInner(e,n,s,i=!1,o){this.closeExtra();let r=this.top;r.match=r.match&&r.match.matchType(e);let a=ZA(e,o,r.options);r.options&ig&&r.content.length==0&&(a|=ig);let l=An.none;return s=s.filter(c=>(r.type?r.type.allowsMarkType(c.type):eE(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new o0(e,n,l,i,null,a)),this.open++,s}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let s=this.nodes[n].content;for(let i=s.length-1;i>=0;i--)e+=s[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let s=0;s<this.find.length;s++)this.find[s].node==e&&this.find[s].offset==n&&(this.find[s].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,s){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(s?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),s=this.options.context,i=!this.isOpen&&(!s||s.parent.type==this.nodes[0].type),o=-(s?s.depth+1:0)+(i?0:1),r=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(r(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:s&&l>=o?s.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(s&&s.isTextblock&&s.defaultAttrs)return s}for(let n in this.parser.schema.nodes){let s=this.parser.schema.nodes[n];if(s.isTextblock&&s.defaultAttrs)return s}}}function t6e(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let s=e.nodeType==1?e.nodeName.toLowerCase():null;s&&rN.hasOwnProperty(s)&&n?(n.appendChild(e),e=n):s=="li"?n=e:s&&(n=null)}}function n6e(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function QA(t){let e={};for(let n in t)e[n]=t[n];return e}function eE(t,e){let n=e.schema.nodes;for(let s in n){let i=n[s];if(!i.allowsMarkType(t))continue;let o=[],r=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&r(u))return!0}};if(r(i.contentMatch))return!0}}class Kc{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},s){s||(s=Yw(n).createDocumentFragment());let i=s,o=[];return e.forEach(r=>{if(o.length||r.marks.length){let a=0,l=0;for(;a<o.length&&l<r.marks.length;){let c=r.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<r.marks.length;){let c=r.marks[l++],u=this.serializeMark(c,r.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(r,n))}),s}serializeNodeInner(e,n){let{dom:s,contentDOM:i}=j0(Yw(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return s}serializeNode(e,n={}){let s=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(s),s=o.dom)}return s}serializeMark(e,n,s={}){let i=this.marks[e.type.name];return i&&j0(Yw(s),i(e,n),null,e.attrs)}static renderSpec(e,n,s=null,i){return j0(e,n,s,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Kc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=tE(e.nodes);return n.text||(n.text=s=>s.text),n}static marksFromSchema(e){return tE(e.marks)}}function tE(t){let e={};for(let n in t){let s=t[n].spec.toDOM;s&&(e[n]=s)}return e}function Yw(t){return t.document||window.document}const nE=new WeakMap;function s6e(t){let e=nE.get(t);return e===void 0&&nE.set(t,e=i6e(t)),e}function i6e(t){let e=null;function n(s){if(s&&typeof s=="object")if(Array.isArray(s))if(typeof s[0]=="string")e||(e=[]),e.push(s);else for(let i=0;i<s.length;i++)n(s[i]);else for(let i in s)n(s[i])}return n(t),e}function j0(t,e,n,s){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(s&&(o=s6e(s))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=i.indexOf(" ");r>0&&(n=i.slice(0,r),i=i.slice(r+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=j0(t,h,n,s);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const o6e={};function D5(t,e){const n=e||o6e,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aN(t,s,i)}function aN(t,e,n){if(r6e(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return sE(t.children,e,n)}return Array.isArray(t)?sE(t,e,n):""}function sE(t,e,n){const s=[];let i=-1;for(;++i<t.length;)s[i]=aN(t[i],e,n);return s.join("")}function r6e(t){return!!(t&&typeof t=="object")}const iE=document.createElement("i");function R5(t){const e="&"+t+";";iE.innerHTML=e;const n=iE.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function ur(t,e,n,s){const i=t.length;let o=0,r;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,s.length<1e4)r=Array.from(s),r.unshift(e,n),t.splice(...r);else for(n&&t.splice(e,n);o<s.length;)r=s.slice(o,o+1e4),r.unshift(e,0),t.splice(...r),o+=1e4,e+=1e4}function nr(t,e){return t.length>0?(ur(t,t.length,0,e),t):e}const oE={}.hasOwnProperty;function lN(t){const e={};let n=-1;for(;++n<t.length;)a6e(e,t[n]);return e}function a6e(t,e){let n;for(n in e){const i=(oE.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){oE.call(i,r)||(i[r]=[]);const a=o[r];l6e(i[r],Array.isArray(a)?a:a?[a]:[])}}}function l6e(t,e){let n=-1;const s=[];for(;++n<e.length;)(e[n].add==="after"?t:s).push(e[n]);ur(t,0,0,s)}function cN(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Vr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fi=Zc(/[A-Za-z]/),ao=Zc(/[\dA-Za-z]/),c6e=Zc(/[#-'*+\--9=?A-Z^-~]/);function Vb(t){return t!==null&&(t<32||t===127)}const Rk=Zc(/\d/),u6e=Zc(/[\dA-Fa-f]/),d6e=Zc(/[!-/:-@[-`{-~]/);function At(t){return t!==null&&t<-2}function zn(t){return t!==null&&(t<0||t===32)}function rn(t){return t===-2||t===-1||t===32}const u2=Zc(/\p{P}|\p{S}/u),md=Zc(/\s/);function Zc(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function gn(t,e,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return rn(l)?(t.enter(n),a(l)):e(l)}function a(l){return rn(l)&&o++<i?(t.consume(l),a):(t.exit(n),e(l))}}const h6e={tokenize:f6e};function f6e(t){const e=t.attempt(this.parser.constructs.contentInitial,s,i);let n;return e;function s(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),gn(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,r(a)}function r(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return At(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),r)}}const p6e={tokenize:m6e},rE={tokenize:g6e};function m6e(t){const e=this,n=[];let s=0,i,o,r;return a;function a(k){if(s<n.length){const C=n[s];return e.containerState=C[1],t.attempt(C[0].continuation,l,c)(k)}return c(k)}function l(k){if(s++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&x();const C=e.events.length;let S=C,E;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){E=e.events[S][1].end;break}_(s);let P=C;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},E),P++;return ur(e.events,S+1,0,e.events.slice(C)),e.events.length=P,c(k)}return a(k)}function c(k){if(s===n.length){if(!i)return h(k);if(i.currentConstruct&&i.currentConstruct.concrete)return p(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(rE,u,d)(k)}function u(k){return i&&x(),_(s),h(k)}function d(k){return e.parser.lazy[e.now().line]=s!==n.length,r=e.now().offset,p(k)}function h(k){return e.containerState={},t.attempt(rE,f,p)(k)}function f(k){return s++,n.push([e.currentConstruct,e.containerState]),h(k)}function p(k){if(k===null){i&&x(),_(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(k)}function m(k){if(k===null){b(t.exit("chunkFlow"),!0),_(0),t.consume(k);return}return At(k)?(t.consume(k),b(t.exit("chunkFlow")),s=0,e.interrupt=void 0,a):(t.consume(k),m)}function b(k,C){const S=e.sliceStream(k);if(C&&S.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(S),e.parser.lazy[k.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<r&&(!i.events[E][1].end||i.events[E][1].end.offset>r))return;const P=e.events.length;let T=P,L,I;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(L){I=e.events[T][1].end;break}L=!0}for(_(s),E=P;E<e.events.length;)e.events[E][1].end=Object.assign({},I),E++;ur(e.events,T+1,0,e.events.slice(P)),e.events.length=E}}function _(k){let C=n.length;for(;C-- >k;){const S=n[C];e.containerState=S[1],S[0].exit.call(e,t)}n.length=k}function x(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function g6e(t,e,n){return gn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fb(t){if(t===null||zn(t)||md(t))return 1;if(u2(t))return 2}function d2(t,e,n){const s=[];let i=-1;for(;++i<t.length;){const o=t[i].resolveAll;o&&!s.includes(o)&&(e=o(e,n),s.push(o))}return e}const Vk={name:"attention",tokenize:y6e,resolveAll:v6e};function v6e(t,e){let n=-1,s,i,o,r,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(s=n;s--;)if(t[s][0]==="exit"&&t[s][1].type==="attentionSequence"&&t[s][1]._open&&e.sliceSerialize(t[s][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[s][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[s][1].end.offset-t[s][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[s][1].end.offset-t[s][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[s][1].end),h=Object.assign({},t[n][1].start);aE(d,-l),aE(h,l),r={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[s][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[s][1].end),end:Object.assign({},t[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},r.start),end:Object.assign({},a.end)},t[s][1].end=Object.assign({},r.start),t[n][1].start=Object.assign({},a.end),c=[],t[s][1].end.offset-t[s][1].start.offset&&(c=nr(c,[["enter",t[s][1],e],["exit",t[s][1],e]])),c=nr(c,[["enter",i,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=nr(c,d2(e.parser.constructs.insideSpan.null,t.slice(s+1,n),e)),c=nr(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=nr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,ur(t,s-1,n-s+3,c),n=s+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function y6e(t,e){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=Fb(s);let o;return r;function r(l){return o=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===o)return t.consume(l),a;const c=t.exit("attentionSequence"),u=Fb(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(s);return c._open=!!(o===42?d:d&&(i||!h)),c._close=!!(o===42?h:h&&(u||!d)),e(l)}}function aE(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const b6e={name:"autolink",tokenize:_6e};function _6e(t,e,n){let s=0;return i;function i(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(f){return Fi(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||ao(f)?(s=1,a(f)):c(f)}function a(f){return f===58?(t.consume(f),s=0,l):(f===43||f===45||f===46||ao(f))&&s++<32?(t.consume(f),a):(s=0,c(f))}function l(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):f===null||f===32||f===60||Vb(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):c6e(f)?(t.consume(f),c):n(f)}function u(f){return ao(f)?d(f):n(f)}function d(f){return f===46?(t.consume(f),s=0,u):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):h(f)}function h(f){if((f===45||ao(f))&&s++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const Z1={tokenize:w6e,partial:!0};function w6e(t,e,n){return s;function s(o){return rn(o)?gn(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||At(o)?e(o):n(o)}}const uN={name:"blockQuote",tokenize:x6e,continuation:{tokenize:k6e},exit:C6e};function x6e(t,e,n){const s=this;return i;function i(r){if(r===62){const a=s.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(r),t.exit("blockQuoteMarker"),o}return n(r)}function o(r){return rn(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function k6e(t,e,n){const s=this;return i;function i(r){return rn(r)?gn(t,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(uN,e,n)(r)}}function C6e(t){t.exit("blockQuote")}const dN={name:"characterEscape",tokenize:S6e};function S6e(t,e,n){return s;function s(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return d6e(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const hN={name:"characterReference",tokenize:$6e};function $6e(t,e,n){const s=this;let i=0,o,r;return a;function a(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),l}function l(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),o=31,r=ao,u(d))}function c(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,r=u6e,u):(t.enter("characterReferenceValue"),o=7,r=Rk,u(d))}function u(d){if(d===59&&i){const h=t.exit("characterReferenceValue");return r===ao&&!R5(s.sliceSerialize(h))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return r(d)&&i++<o?(t.consume(d),u):n(d)}}const lE={tokenize:E6e,partial:!0},cE={name:"codeFenced",tokenize:A6e,concrete:!0};function A6e(t,e,n){const s=this,i={tokenize:S,partial:!0};let o=0,r=0,a;return l;function l(E){return c(E)}function c(E){const P=s.events[s.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=E,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===a?(r++,t.consume(E),u):r<3?n(E):(t.exit("codeFencedFenceSequence"),rn(E)?gn(t,d,"whitespace")(E):d(E))}function d(E){return E===null||At(E)?(t.exit("codeFencedFence"),s.interrupt?e(E):t.check(lE,m,C)(E)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||At(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(E)):rn(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),gn(t,f,"whitespace")(E)):E===96&&E===a?n(E):(t.consume(E),h)}function f(E){return E===null||At(E)?d(E):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||At(E)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(E)):E===96&&E===a?n(E):(t.consume(E),p)}function m(E){return t.attempt(i,C,b)(E)}function b(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),_}function _(E){return o>0&&rn(E)?gn(t,x,"linePrefix",o+1)(E):x(E)}function x(E){return E===null||At(E)?t.check(lE,m,C)(E):(t.enter("codeFlowValue"),k(E))}function k(E){return E===null||At(E)?(t.exit("codeFlowValue"),x(E)):(t.consume(E),k)}function C(E){return t.exit("codeFenced"),e(E)}function S(E,P,T){let L=0;return I;function I(B){return E.enter("lineEnding"),E.consume(B),E.exit("lineEnding"),V}function V(B){return E.enter("codeFencedFence"),rn(B)?gn(E,R,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===a?(E.enter("codeFencedFenceSequence"),N(B)):T(B)}function N(B){return B===a?(L++,E.consume(B),N):L>=r?(E.exit("codeFencedFenceSequence"),rn(B)?gn(E,F,"whitespace")(B):F(B)):T(B)}function F(B){return B===null||At(B)?(E.exit("codeFencedFence"),P(B)):T(B)}}}function E6e(t,e,n){const s=this;return i;function i(r){return r===null?n(r):(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o)}function o(r){return s.parser.lazy[s.now().line]?n(r):e(r)}}const qw={name:"codeIndented",tokenize:T6e},M6e={tokenize:P6e,partial:!0};function T6e(t,e,n){const s=this;return i;function i(c){return t.enter("codeIndented"),gn(t,o,"linePrefix",4+1)(c)}function o(c){const u=s.events[s.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?l(c):At(c)?t.attempt(M6e,r,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||At(c)?(t.exit("codeFlowValue"),r(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function P6e(t,e,n){const s=this;return i;function i(r){return s.parser.lazy[s.now().line]?n(r):At(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),i):gn(t,o,"linePrefix",4+1)(r)}function o(r){const a=s.events[s.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):At(r)?i(r):n(r)}}const I6e={name:"codeText",tokenize:D6e,resolve:L6e,previous:O6e};function L6e(t){let e=t.length-4,n=3,s,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(s=n;++s<e;)if(t[s][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(s=n-1,e++;++s<=e;)i===void 0?s!==e&&t[s][1].type!=="lineEnding"&&(i=s):(s===e||t[s][1].type==="lineEnding")&&(t[i][1].type="codeTextData",s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),e-=s-i-2,s=i+2),i=void 0);return t}function O6e(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function D6e(t,e,n){let s=0,i,o;return r;function r(d){return t.enter("codeText"),t.enter("codeTextSequence"),a(d)}function a(d){return d===96?(t.consume(d),s++,a):(t.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),l):d===96?(o=t.enter("codeTextSequence"),i=0,u(d)):At(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||At(d)?(t.exit("codeTextData"),l(d)):(t.consume(d),c)}function u(d){return d===96?(t.consume(d),i++,u):i===s?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(o.type="codeTextData",c(d))}}class R6e{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(e,s):e>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(e,n,s){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return s&&Xp(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xp(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Xp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xp(this.left,n.reverse())}}}function Xp(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function fN(t){const e={};let n=-1,s,i,o,r,a,l,c;const u=new R6e(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(s=u.get(n),n&&s[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=s[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(e,V6e(u,n)),n=e[n],c=!0);else if(s[1]._container){for(o=n,i=void 0;o--&&(r=u.get(o),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank");)r[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),r[1].type="lineEnding",i=o);i&&(s[1].end=Object.assign({},u.get(i)[1].start),a=u.slice(i,n),a.unshift(s),u.splice(i,n-i+1,a))}}return ur(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function V6e(t,e){const n=t.get(e)[1],s=t.get(e)[2];let i=e-1;const o=[],r=n._tokenizer||s.parser[n.contentType](n.start),a=r.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;t.get(++i)[1]!==f;);o.push(i),f._tokenizer||(u=s.sliceStream(f),f.next||u.push(null),d&&r.defineSkip(f.start),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(u),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(r.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const _=a.slice(b[h],b[h+1]),x=o.pop();l.push([x,x+_.length-1]),t.splice(x,2,_)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const F6e={tokenize:z6e,resolve:B6e},N6e={tokenize:H6e,partial:!0};function B6e(t){return fN(t),t}function z6e(t,e){let n;return s;function s(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):At(a)?t.check(N6e,r,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function r(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function H6e(t,e,n){const s=this;return i;function i(r){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),gn(t,o,"linePrefix")}function o(r){if(r===null||At(r))return n(r);const a=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):t.interrupt(s.parser.constructs.flow,n,e)(r)}}function pN(t,e,n,s,i,o,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(_){return _===60?(t.enter(s),t.enter(i),t.enter(o),t.consume(_),t.exit(o),h):_===null||_===32||_===41||Vb(_)?n(_):(t.enter(s),t.enter(r),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(_))}function h(_){return _===62?(t.enter(o),t.consume(_),t.exit(o),t.exit(i),t.exit(s),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(t.exit("chunkString"),t.exit(a),h(_)):_===null||_===60||At(_)?n(_):(t.consume(_),_===92?p:f)}function p(_){return _===60||_===62||_===92?(t.consume(_),f):f(_)}function m(_){return!u&&(_===null||_===41||zn(_))?(t.exit("chunkString"),t.exit(a),t.exit(r),t.exit(s),e(_)):u<c&&_===40?(t.consume(_),u++,m):_===41?(t.consume(_),u--,m):_===null||_===32||_===40||Vb(_)?n(_):(t.consume(_),_===92?b:m)}function b(_){return _===40||_===41||_===92?(t.consume(_),m):m(_)}}function mN(t,e,n,s,i,o){const r=this;let a=0,l;return c;function c(f){return t.enter(s),t.enter(i),t.consume(f),t.exit(i),t.enter(o),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):f===93?(t.exit(o),t.enter(i),t.consume(f),t.exit(i),t.exit(s),e):At(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||At(f)||a++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!rn(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function gN(t,e,n,s,i,o){let r;return a;function a(h){return h===34||h===39||h===40?(t.enter(s),t.enter(i),t.consume(h),t.exit(i),r=h===40?41:h,l):n(h)}function l(h){return h===r?(t.enter(i),t.consume(h),t.exit(i),t.exit(s),e):(t.enter(o),c(h))}function c(h){return h===r?(t.exit(o),l(r)):h===null?n(h):At(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),gn(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===r||h===null||At(h)?(t.exit("chunkString"),c(h)):(t.consume(h),h===92?d:u)}function d(h){return h===r||h===92?(t.consume(h),u):u(h)}}function og(t,e){let n;return s;function s(i){return At(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,s):rn(i)?gn(t,s,n?"linePrefix":"lineSuffix")(i):e(i)}}const U6e={name:"definition",tokenize:W6e},j6e={tokenize:Y6e,partial:!0};function W6e(t,e,n){const s=this;let i;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return mN.call(s,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Vr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):n(f)}function l(f){return zn(f)?og(t,c)(f):c(f)}function c(f){return pN(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(j6e,d,d)(f)}function d(f){return rn(f)?gn(t,h,"whitespace")(f):h(f)}function h(f){return f===null||At(f)?(t.exit("definition"),s.parser.defined.push(i),e(f)):n(f)}}function Y6e(t,e,n){return s;function s(a){return zn(a)?og(t,i)(a):n(a)}function i(a){return gN(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return rn(a)?gn(t,r,"whitespace")(a):r(a)}function r(a){return a===null||At(a)?e(a):n(a)}}const q6e={name:"hardBreakEscape",tokenize:G6e};function G6e(t,e,n){return s;function s(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return At(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const X6e={name:"headingAtx",tokenize:Z6e,resolve:K6e};function K6e(t,e){let n=t.length-2,s=3,i,o;return t[s][1].type==="whitespace"&&(s+=2),n-2>s&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&t[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(i={type:"atxHeadingText",start:t[s][1].start,end:t[n][1].end},o={type:"chunkText",start:t[s][1].start,end:t[n][1].end,contentType:"text"},ur(t,s,n-s+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function Z6e(t,e,n){let s=0;return i;function i(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),r(u)}function r(u){return u===35&&s++<6?(t.consume(u),r):u===null||zn(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||At(u)?(t.exit("atxHeading"),e(u)):rn(u)?gn(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||zn(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const J6e=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],uE=["pre","script","style","textarea"],Q6e={name:"htmlFlow",tokenize:sCe,resolveTo:nCe,concrete:!0},eCe={tokenize:oCe,partial:!0},tCe={tokenize:iCe,partial:!0};function nCe(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function sCe(t,e,n){const s=this;let i,o,r,a,l;return c;function c(Z){return u(Z)}function u(Z){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(Z),d}function d(Z){return Z===33?(t.consume(Z),h):Z===47?(t.consume(Z),o=!0,m):Z===63?(t.consume(Z),i=3,s.interrupt?e:H):Fi(Z)?(t.consume(Z),r=String.fromCharCode(Z),b):n(Z)}function h(Z){return Z===45?(t.consume(Z),i=2,f):Z===91?(t.consume(Z),i=5,a=0,p):Fi(Z)?(t.consume(Z),i=4,s.interrupt?e:H):n(Z)}function f(Z){return Z===45?(t.consume(Z),s.interrupt?e:H):n(Z)}function p(Z){const ae="CDATA[";return Z===ae.charCodeAt(a++)?(t.consume(Z),a===ae.length?s.interrupt?e:R:p):n(Z)}function m(Z){return Fi(Z)?(t.consume(Z),r=String.fromCharCode(Z),b):n(Z)}function b(Z){if(Z===null||Z===47||Z===62||zn(Z)){const ae=Z===47,ve=r.toLowerCase();return!ae&&!o&&uE.includes(ve)?(i=1,s.interrupt?e(Z):R(Z)):J6e.includes(r.toLowerCase())?(i=6,ae?(t.consume(Z),_):s.interrupt?e(Z):R(Z)):(i=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(Z):o?x(Z):k(Z))}return Z===45||ao(Z)?(t.consume(Z),r+=String.fromCharCode(Z),b):n(Z)}function _(Z){return Z===62?(t.consume(Z),s.interrupt?e:R):n(Z)}function x(Z){return rn(Z)?(t.consume(Z),x):I(Z)}function k(Z){return Z===47?(t.consume(Z),I):Z===58||Z===95||Fi(Z)?(t.consume(Z),C):rn(Z)?(t.consume(Z),k):I(Z)}function C(Z){return Z===45||Z===46||Z===58||Z===95||ao(Z)?(t.consume(Z),C):S(Z)}function S(Z){return Z===61?(t.consume(Z),E):rn(Z)?(t.consume(Z),S):k(Z)}function E(Z){return Z===null||Z===60||Z===61||Z===62||Z===96?n(Z):Z===34||Z===39?(t.consume(Z),l=Z,P):rn(Z)?(t.consume(Z),E):T(Z)}function P(Z){return Z===l?(t.consume(Z),l=null,L):Z===null||At(Z)?n(Z):(t.consume(Z),P)}function T(Z){return Z===null||Z===34||Z===39||Z===47||Z===60||Z===61||Z===62||Z===96||zn(Z)?S(Z):(t.consume(Z),T)}function L(Z){return Z===47||Z===62||rn(Z)?k(Z):n(Z)}function I(Z){return Z===62?(t.consume(Z),V):n(Z)}function V(Z){return Z===null||At(Z)?R(Z):rn(Z)?(t.consume(Z),V):n(Z)}function R(Z){return Z===45&&i===2?(t.consume(Z),G):Z===60&&i===1?(t.consume(Z),q):Z===62&&i===4?(t.consume(Z),Q):Z===63&&i===3?(t.consume(Z),H):Z===93&&i===5?(t.consume(Z),K):At(Z)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(eCe,se,N)(Z)):Z===null||At(Z)?(t.exit("htmlFlowData"),N(Z)):(t.consume(Z),R)}function N(Z){return t.check(tCe,F,se)(Z)}function F(Z){return t.enter("lineEnding"),t.consume(Z),t.exit("lineEnding"),B}function B(Z){return Z===null||At(Z)?N(Z):(t.enter("htmlFlowData"),R(Z))}function G(Z){return Z===45?(t.consume(Z),H):R(Z)}function q(Z){return Z===47?(t.consume(Z),r="",X):R(Z)}function X(Z){if(Z===62){const ae=r.toLowerCase();return uE.includes(ae)?(t.consume(Z),Q):R(Z)}return Fi(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),X):R(Z)}function K(Z){return Z===93?(t.consume(Z),H):R(Z)}function H(Z){return Z===62?(t.consume(Z),Q):Z===45&&i===2?(t.consume(Z),H):R(Z)}function Q(Z){return Z===null||At(Z)?(t.exit("htmlFlowData"),se(Z)):(t.consume(Z),Q)}function se(Z){return t.exit("htmlFlow"),e(Z)}}function iCe(t,e,n){const s=this;return i;function i(r){return At(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o):n(r)}function o(r){return s.parser.lazy[s.now().line]?n(r):e(r)}}function oCe(t,e,n){return s;function s(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Z1,e,n)}}const rCe={name:"htmlText",tokenize:aCe};function aCe(t,e,n){const s=this;let i,o,r;return a;function a(H){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(H),l}function l(H){return H===33?(t.consume(H),c):H===47?(t.consume(H),S):H===63?(t.consume(H),k):Fi(H)?(t.consume(H),T):n(H)}function c(H){return H===45?(t.consume(H),u):H===91?(t.consume(H),o=0,p):Fi(H)?(t.consume(H),x):n(H)}function u(H){return H===45?(t.consume(H),f):n(H)}function d(H){return H===null?n(H):H===45?(t.consume(H),h):At(H)?(r=d,q(H)):(t.consume(H),d)}function h(H){return H===45?(t.consume(H),f):d(H)}function f(H){return H===62?G(H):H===45?h(H):d(H)}function p(H){const Q="CDATA[";return H===Q.charCodeAt(o++)?(t.consume(H),o===Q.length?m:p):n(H)}function m(H){return H===null?n(H):H===93?(t.consume(H),b):At(H)?(r=m,q(H)):(t.consume(H),m)}function b(H){return H===93?(t.consume(H),_):m(H)}function _(H){return H===62?G(H):H===93?(t.consume(H),_):m(H)}function x(H){return H===null||H===62?G(H):At(H)?(r=x,q(H)):(t.consume(H),x)}function k(H){return H===null?n(H):H===63?(t.consume(H),C):At(H)?(r=k,q(H)):(t.consume(H),k)}function C(H){return H===62?G(H):k(H)}function S(H){return Fi(H)?(t.consume(H),E):n(H)}function E(H){return H===45||ao(H)?(t.consume(H),E):P(H)}function P(H){return At(H)?(r=P,q(H)):rn(H)?(t.consume(H),P):G(H)}function T(H){return H===45||ao(H)?(t.consume(H),T):H===47||H===62||zn(H)?L(H):n(H)}function L(H){return H===47?(t.consume(H),G):H===58||H===95||Fi(H)?(t.consume(H),I):At(H)?(r=L,q(H)):rn(H)?(t.consume(H),L):G(H)}function I(H){return H===45||H===46||H===58||H===95||ao(H)?(t.consume(H),I):V(H)}function V(H){return H===61?(t.consume(H),R):At(H)?(r=V,q(H)):rn(H)?(t.consume(H),V):L(H)}function R(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(t.consume(H),i=H,N):At(H)?(r=R,q(H)):rn(H)?(t.consume(H),R):(t.consume(H),F)}function N(H){return H===i?(t.consume(H),i=void 0,B):H===null?n(H):At(H)?(r=N,q(H)):(t.consume(H),N)}function F(H){return H===null||H===34||H===39||H===60||H===61||H===96?n(H):H===47||H===62||zn(H)?L(H):(t.consume(H),F)}function B(H){return H===47||H===62||zn(H)?L(H):n(H)}function G(H){return H===62?(t.consume(H),t.exit("htmlTextData"),t.exit("htmlText"),e):n(H)}function q(H){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),X}function X(H){return rn(H)?gn(t,K,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):K(H)}function K(H){return t.enter("htmlTextData"),r(H)}}const V5={name:"labelEnd",tokenize:fCe,resolveTo:hCe,resolveAll:dCe},lCe={tokenize:pCe},cCe={tokenize:mCe},uCe={tokenize:gCe};function dCe(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function hCe(t,e){let n=t.length,s=0,i,o,r,a;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(r){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){s=2;break}}else i.type==="labelEnd"&&(r=n);const l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[r][1].end)},u={type:"labelText",start:Object.assign({},t[o+s+2][1].end),end:Object.assign({},t[r-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=nr(a,t.slice(o+1,o+s+3)),a=nr(a,[["enter",u,e]]),a=nr(a,d2(e.parser.constructs.insideSpan.null,t.slice(o+s+4,r-3),e)),a=nr(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=nr(a,t.slice(r+1)),a=nr(a,[["exit",l,e]]),ur(t,o,t.length,a),t}function fCe(t,e,n){const s=this;let i=s.events.length,o,r;for(;i--;)if((s.events[i][1].type==="labelImage"||s.events[i][1].type==="labelLink")&&!s.events[i][1]._balanced){o=s.events[i][1];break}return a;function a(h){return o?o._inactive?d(h):(r=s.parser.defined.includes(Vr(s.sliceSerialize({start:o.end,end:s.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),l):n(h)}function l(h){return h===40?t.attempt(lCe,u,r?u:d)(h):h===91?t.attempt(cCe,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(uCe,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function pCe(t,e,n){return s;function s(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),i}function i(d){return zn(d)?og(t,o)(d):o(d)}function o(d){return d===41?u(d):pN(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return zn(d)?og(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?gN(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return zn(d)?og(t,u)(d):u(d)}function u(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function mCe(t,e,n){const s=this;return i;function i(a){return mN.call(s,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return s.parser.defined.includes(Vr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function gCe(t,e,n){return s;function s(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const vCe={name:"labelStartImage",tokenize:yCe,resolveAll:V5.resolveAll};function yCe(t,e,n){const s=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),r):n(a)}function r(a){return a===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(a):e(a)}}const bCe={name:"labelStartLink",tokenize:_Ce,resolveAll:V5.resolveAll};function _Ce(t,e,n){const s=this;return i;function i(r){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(r),t.exit("labelMarker"),t.exit("labelLink"),o}function o(r){return r===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(r):e(r)}}const Gw={name:"lineEnding",tokenize:wCe};function wCe(t,e){return n;function n(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),gn(t,e,"linePrefix")}}const W0={name:"thematicBreak",tokenize:xCe};function xCe(t,e,n){let s=0,i;return o;function o(c){return t.enter("thematicBreak"),r(c)}function r(c){return i=c,a(c)}function a(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):s>=3&&(c===null||At(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),s++,l):(t.exit("thematicBreakSequence"),rn(c)?gn(t,a,"whitespace")(c):a(c))}}const to={name:"list",tokenize:SCe,continuation:{tokenize:$Ce},exit:ECe},kCe={tokenize:MCe,partial:!0},CCe={tokenize:ACe,partial:!0};function SCe(t,e,n){const s=this,i=s.events[s.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,r=0;return a;function a(f){const p=s.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!s.containerState.marker||f===s.containerState.marker:Rk(f)){if(s.containerState.type||(s.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(W0,n,c)(f):c(f);if(!s.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return n(f)}function l(f){return Rk(f)&&++r<10?(t.consume(f),l):(!s.interrupt||r<2)&&(s.containerState.marker?f===s.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),c(f)):n(f)}function c(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||f,t.check(Z1,s.interrupt?n:u,t.attempt(kCe,h,d))}function u(f){return s.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return rn(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return s.containerState.size=o+s.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function $Ce(t,e,n){const s=this;return s.containerState._closeFlow=void 0,t.check(Z1,i,o);function i(a){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,gn(t,e,"listItemIndent",s.containerState.size+1)(a)}function o(a){return s.containerState.furtherBlankLines||!rn(a)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,r(a)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,t.attempt(CCe,e,r)(a))}function r(a){return s.containerState._closeFlow=!0,s.interrupt=void 0,gn(t,t.attempt(to,e,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ACe(t,e,n){const s=this;return gn(t,i,"listItemIndent",s.containerState.size+1);function i(o){const r=s.events[s.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===s.containerState.size?e(o):n(o)}}function ECe(t){t.exit(this.containerState.type)}function MCe(t,e,n){const s=this;return gn(t,i,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const r=s.events[s.events.length-1];return!rn(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const dE={name:"setextUnderline",tokenize:PCe,resolveTo:TCe};function TCe(t,e){let n=t.length,s,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){s=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",r,e]),t.splice(o+1,0,["exit",t[s][1],e]),t[s][1].end=Object.assign({},t[o][1].end)):t[s][1]=r,t.push(["exit",r,e]),t}function PCe(t,e,n){const s=this;let i;return o;function o(c){let u=s.events.length,d;for(;u--;)if(s.events[u][1].type!=="lineEnding"&&s.events[u][1].type!=="linePrefix"&&s.events[u][1].type!=="content"){d=s.events[u][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||d)?(t.enter("setextHeadingLine"),i=c,r(c)):n(c)}function r(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),rn(c)?gn(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||At(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const ICe={tokenize:LCe};function LCe(t){const e=this,n=t.attempt(Z1,s,t.attempt(this.parser.constructs.flowInitial,i,gn(t,t.attempt(this.parser.constructs.flow,i,t.attempt(F6e,i)),"linePrefix")));return n;function s(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const OCe={resolveAll:yN()},DCe=vN("string"),RCe=vN("text");function vN(t){return{tokenize:e,resolveAll:yN(t==="text"?VCe:void 0)};function e(n){const s=this,i=this.parser.constructs[t],o=n.attempt(i,r,a);return r;function r(u){return c(u)?o(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(s,s.previous))return!0}return!1}}}function yN(t){return e;function e(n,s){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,s):n}}function VCe(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const s=t[n-1][1],i=e.sliceStream(s);let o=i.length,r=-1,a=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(r=c.length;c.charCodeAt(r-1)===32;)a++,r--;if(r)break;r=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){const c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:s.end.line,column:s.end.column-a,offset:s.end.offset-a,_index:s.start._index+o,_bufferIndex:o?r:s.start._bufferIndex+r},end:Object.assign({},s.end)};s.end=Object.assign({},c.start),s.start.offset===s.end.offset?Object.assign(s,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function FCe(t,e,n){let s=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let r=[],a=[];const l={consume:x,enter:k,exit:C,attempt:P(S),check:P(E),interrupt:P(E,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:f,sliceSerialize:h,now:p,defineSkip:m,write:d};let u=e.tokenize.call(c,l);return e.resolveAll&&o.push(e),c;function d(V){return r=nr(r,V),b(),r[r.length-1]!==null?[]:(T(e,0),c.events=d2(o,c.events,c),c.events)}function h(V,R){return BCe(f(V),R)}function f(V){return NCe(r,V)}function p(){const{line:V,column:R,offset:N,_index:F,_bufferIndex:B}=s;return{line:V,column:R,offset:N,_index:F,_bufferIndex:B}}function m(V){i[V.line]=V.column,I()}function b(){let V;for(;s._index<r.length;){const R=r[s._index];if(typeof R=="string")for(V=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===V&&s._bufferIndex<R.length;)_(R.charCodeAt(s._bufferIndex));else _(R)}}function _(V){u=u(V)}function x(V){At(V)?(s.line++,s.column=1,s.offset+=V===-3?2:1,I()):V!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===r[s._index].length&&(s._bufferIndex=-1,s._index++)),c.previous=V}function k(V,R){const N=R||{};return N.type=V,N.start=p(),c.events.push(["enter",N,c]),a.push(N),N}function C(V){const R=a.pop();return R.end=p(),c.events.push(["exit",R,c]),R}function S(V,R){T(V,R.from)}function E(V,R){R.restore()}function P(V,R){return N;function N(F,B,G){let q,X,K,H;return Array.isArray(F)?se(F):"tokenize"in F?se([F]):Q(F);function Q(ke){return oe;function oe(fe){const ie=fe!==null&&ke[fe],re=fe!==null&&ke.null,Se=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return se(Se)(fe)}}function se(ke){return q=ke,X=0,ke.length===0?G:Z(ke[X])}function Z(ke){return oe;function oe(fe){return H=L(),K=ke,ke.partial||(c.currentConstruct=ke),ke.name&&c.parser.constructs.disable.null.includes(ke.name)?ve():ke.tokenize.call(R?Object.assign(Object.create(c),R):c,l,ae,ve)(fe)}}function ae(ke){return V(K,H),B}function ve(ke){return H.restore(),++X<q.length?Z(q[X]):G}}}function T(V,R){V.resolveAll&&!o.includes(V)&&o.push(V),V.resolve&&ur(c.events,R,c.events.length-R,V.resolve(c.events.slice(R),c)),V.resolveTo&&(c.events=V.resolveTo(c.events,c))}function L(){const V=p(),R=c.previous,N=c.currentConstruct,F=c.events.length,B=Array.from(a);return{restore:G,from:F};function G(){s=V,c.previous=R,c.currentConstruct=N,c.events.length=F,a=B,I()}}function I(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function NCe(t,e){const n=e.start._index,s=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let r;if(n===i)r=[t[n].slice(s,o)];else{if(r=t.slice(n,i),s>-1){const a=r[0];typeof a=="string"?r[0]=a.slice(s):r.shift()}o>0&&r.push(t[i].slice(0,o))}return r}function BCe(t,e){let n=-1;const s=[];let i;for(;++n<t.length;){const o=t[n];let r;if(typeof o=="string")r=o;else switch(o){case-5:{r="\r";break}case-4:{r=`
85 `;break}case-3:{r=`\r
86 `;break}case-2:{r=e?" ":" ";break}case-1:{if(!e&&i)continue;r=" ";break}default:r=String.fromCharCode(o)}i=o===-2,s.push(r)}return s.join("")}const zCe={42:to,43:to,45:to,48:to,49:to,50:to,51:to,52:to,53:to,54:to,55:to,56:to,57:to,62:uN},HCe={91:U6e},UCe={[-2]:qw,[-1]:qw,32:qw},jCe={35:X6e,42:W0,45:[dE,W0],60:Q6e,61:dE,95:W0,96:cE,126:cE},WCe={38:hN,92:dN},YCe={[-5]:Gw,[-4]:Gw,[-3]:Gw,33:vCe,38:hN,42:Vk,60:[b6e,rCe],91:bCe,92:[q6e,dN],93:V5,95:Vk,96:I6e},qCe={null:[Vk,OCe]},GCe={null:[42,95]},XCe={null:[]},KCe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:GCe,contentInitial:HCe,disable:XCe,document:zCe,flow:jCe,flowInitial:UCe,insideSpan:qCe,string:WCe,text:YCe},Symbol.toStringTag,{value:"Module"}));function ZCe(t){const n=lN([KCe,...(t||{}).extensions||[]]),s={defined:[],lazy:{},constructs:n,content:i(h6e),document:i(p6e),flow:i(ICe),string:i(DCe),text:i(RCe)};return s;function i(o){return r;function r(a){return FCe(s,o,a)}}}function JCe(t){for(;!fN(t););return t}const hE=/[\0\t\n\r]/g;function QCe(){let t=1,e="",n=!0,s;return i;function i(o,r,a){const l=[];let c,u,d,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(r||void 0).decode(o)),d=0,e="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(hE.lastIndex=d,c=hE.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(d);break}if(f===10&&d===h&&s)l.push(-3),s=void 0;else switch(s&&(l.push(-5),s=void 0),d<h&&(l.push(o.slice(d,h)),t+=h-d),f){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:s=!0,t=1}d=h+1}return a&&(s&&l.push(-5),e&&l.push(e),l.push(null)),l}}const e4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bN(t){return t.replace(e4e,t4e)}function t4e(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return cN(n.slice(o?2:1),o?16:10)}return R5(n)||t}function rg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?fE(t.position):"start"in t||"end"in t?fE(t):"line"in t||"column"in t?Fk(t):""}function Fk(t){return pE(t&&t.line)+":"+pE(t&&t.column)}function fE(t){return Fk(t&&t.start)+"-"+Fk(t&&t.end)}function pE(t){return t&&typeof t=="number"?t:1}const _N={}.hasOwnProperty;function n4e(t,e,n){return typeof e!="string"&&(n=e,e=void 0),s4e(n)(JCe(ZCe(n).document().write(QCe()(t,e,!0))))}function s4e(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ue),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(pe),blockQuote:o(re),characterEscape:L,characterReference:L,codeFenced:o(Se),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:o(Se,r),codeText:o(je,r),codeTextData:L,data:L,codeFlowValue:L,definition:o(ee),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:o(ne),hardBreakEscape:o($e),hardBreakTrailing:o($e),htmlFlow:o(Ce,r),htmlFlowData:L,htmlText:o(Ce,r),htmlTextData:L,image:o(Pe),label:r,link:o(Ue),listItem:o(ze),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(De),reference:Z,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(pe),strong:o(ct),thematicBreak:o(ot)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ie,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ke,characterReference:oe,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:I,codeIndented:l(_),codeText:l(B),codeTextData:I,data:I,definition:l(),definitionDestinationString:C,definitionLabelString:x,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(N),htmlFlowData:I,htmlText:l(F),htmlTextData:I,image:l(q),label:K,labelText:X,lineEnding:V,link:l(G),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:H,resourceTitleString:Q,resource:se,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:E,strong:l(),thematicBreak:l()}};wN(e,(t||{}).mdastExtensions||[]);const n={};return s;function s(be){let me={type:"root",children:[]};const Me={stack:[me],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},Te=[];let gt=-1;for(;++gt<be.length;)if(be[gt][1].type==="listOrdered"||be[gt][1].type==="listUnordered")if(be[gt][0]==="enter")Te.push(gt);else{const Tt=Te.pop();gt=i(be,Tt,gt)}for(gt=-1;++gt<be.length;){const Tt=e[be[gt][0]];_N.call(Tt,be[gt][1].type)&&Tt[be[gt][1].type].call(Object.assign({sliceSerialize:be[gt][2].sliceSerialize},Me),be[gt][1])}if(Me.tokenStack.length>0){const Tt=Me.tokenStack[Me.tokenStack.length-1];(Tt[1]||mE).call(Me,void 0,Tt[0])}for(me.position={start:Vl(be.length>0?be[0][1].start:{line:1,column:1,offset:0}),end:Vl(be.length>0?be[be.length-2][1].end:{line:1,column:1,offset:0})},gt=-1;++gt<e.transforms.length;)me=e.transforms[gt](me)||me;return me}function i(be,me,Me){let Te=me-1,gt=-1,Tt=!1,Xe,ut,ft,ye;for(;++Te<=Me;){const Ie=be[Te];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?gt++:gt--,ye=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(Xe&&!ye&&!gt&&!ft&&(ft=Te),ye=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ye=void 0}if(!gt&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||gt===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(Xe){let ce=Te;for(ut=void 0;ce--;){const Le=be[ce];if(Le[1].type==="lineEnding"||Le[1].type==="lineEndingBlank"){if(Le[0]==="exit")continue;ut&&(be[ut][1].type="lineEndingBlank",Tt=!0),Le[1].type="lineEnding",ut=ce}else if(!(Le[1].type==="linePrefix"||Le[1].type==="blockQuotePrefix"||Le[1].type==="blockQuotePrefixWhitespace"||Le[1].type==="blockQuoteMarker"||Le[1].type==="listItemIndent"))break}ft&&(!ut||ft<ut)&&(Xe._spread=!0),Xe.end=Object.assign({},ut?be[ut][1].start:Ie[1].end),be.splice(ut||Te,0,["exit",Xe,Ie[2]]),Te++,Me++}if(Ie[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};Xe=ce,be.splice(Te,0,["enter",ce,Ie[2]]),Te++,Me++,ft=void 0,ye=!0}}}return be[me][1]._spread=Tt,Me}function o(be,me){return Me;function Me(Te){a.call(this,be(Te),Te),me&&me.call(this,Te)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(be,me,Me){this.stack[this.stack.length-1].children.push(be),this.stack.push(be),this.tokenStack.push([me,Me]),be.position={start:Vl(me.start),end:void 0}}function l(be){return me;function me(Me){be&&be.call(this,Me),c.call(this,Me)}}function c(be,me){const Me=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==be.type&&(me?me.call(this,be,Te[0]):(Te[1]||mE).call(this,be,Te[0]));else throw new Error("Cannot close `"+be.type+"` ("+rg({start:be.start,end:be.end})+"): it’s not open");Me.position.end=Vl(be.end)}function u(){return D5(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(be){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(be),10),this.data.expectingFirstListItemValue=void 0}}function f(){const be=this.resume(),me=this.stack[this.stack.length-1];me.lang=be}function p(){const be=this.resume(),me=this.stack[this.stack.length-1];me.meta=be}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const be=this.resume(),me=this.stack[this.stack.length-1];me.value=be.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const be=this.resume(),me=this.stack[this.stack.length-1];me.value=be.replace(/(\r?\n|\r)$/g,"")}function x(be){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Vr(this.sliceSerialize(be)).toLowerCase()}function k(){const be=this.resume(),me=this.stack[this.stack.length-1];me.title=be}function C(){const be=this.resume(),me=this.stack[this.stack.length-1];me.url=be}function S(be){const me=this.stack[this.stack.length-1];if(!me.depth){const Me=this.sliceSerialize(be).length;me.depth=Me}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function P(be){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(be).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function L(be){const Me=this.stack[this.stack.length-1].children;let Te=Me[Me.length-1];(!Te||Te.type!=="text")&&(Te=Qe(),Te.position={start:Vl(be.start),end:void 0},Me.push(Te)),this.stack.push(Te)}function I(be){const me=this.stack.pop();me.value+=this.sliceSerialize(be),me.position.end=Vl(be.end)}function V(be){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=me.children[me.children.length-1];Me.position.end=Vl(be.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(me.type)&&(L.call(this,be),I.call(this,be))}function R(){this.data.atHardBreak=!0}function N(){const be=this.resume(),me=this.stack[this.stack.length-1];me.value=be}function F(){const be=this.resume(),me=this.stack[this.stack.length-1];me.value=be}function B(){const be=this.resume(),me=this.stack[this.stack.length-1];me.value=be}function G(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=me,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function q(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=me,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function X(be){const me=this.sliceSerialize(be),Me=this.stack[this.stack.length-2];Me.label=bN(me),Me.identifier=Vr(me).toLowerCase()}function K(){const be=this.stack[this.stack.length-1],me=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Te=be.children;Me.children=Te}else Me.alt=me}function H(){const be=this.resume(),me=this.stack[this.stack.length-1];me.url=be}function Q(){const be=this.resume(),me=this.stack[this.stack.length-1];me.title=be}function se(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function ae(be){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Vr(this.sliceSerialize(be)).toLowerCase(),this.data.referenceType="full"}function ve(be){this.data.characterReferenceType=be.type}function ke(be){const me=this.sliceSerialize(be),Me=this.data.characterReferenceType;let Te;Me?(Te=cN(me,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=R5(me);const gt=this.stack[this.stack.length-1];gt.value+=Te}function oe(be){const me=this.stack.pop();me.position.end=Vl(be.end)}function fe(be){I.call(this,be);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(be)}function ie(be){I.call(this,be);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(be)}function re(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function pe(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function Pe(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Fe(be){return{type:"list",ordered:be.type==="listOrdered",start:null,spread:be._spread,children:[]}}function ze(be){return{type:"listItem",spread:be._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function Qe(){return{type:"text",value:""}}function ot(){return{type:"thematicBreak"}}}function Vl(t){return{line:t.line,column:t.column,offset:t.offset}}function wN(t,e){let n=-1;for(;++n<e.length;){const s=e[n];Array.isArray(s)?wN(t,s):i4e(t,s)}}function i4e(t,e){let n;for(n in e)if(_N.call(e,n))switch(n){case"canContainEols":{const s=e[n];s&&t[n].push(...s);break}case"transforms":{const s=e[n];s&&t[n].push(...s);break}case"enter":case"exit":{const s=e[n];s&&Object.assign(t[n],s);break}}}function mE(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+rg({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+rg({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+rg({start:e.start,end:e.end})+") is still open")}function Nk(t){const e=this;e.parser=n;function n(s){return n4e(s,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const gE={}.hasOwnProperty;function o4e(t,e){const n=e||{};function s(i,...o){let r=s.invalid;const a=s.handlers;if(i&&gE.call(i,t)){const l=String(i[t]);r=gE.call(a,l)?a[l]:s.unknown}if(r)return r.call(this,i,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const r4e={}.hasOwnProperty;function xN(t,e){let n=-1,s;if(e.extensions)for(;++n<e.extensions.length;)xN(t,e.extensions[n]);for(s in e)if(r4e.call(e,s))switch(s){case"extensions":break;case"unsafe":{vE(t[s],e[s]);break}case"join":{vE(t[s],e[s]);break}case"handlers":{a4e(t[s],e[s]);break}default:t.options[s]=e[s]}return t}function vE(t,e){e&&t.push(...e)}function a4e(t,e){e&&Object.assign(t,e)}function l4e(t,e,n,s){const i=n.enter("blockquote"),o=n.createTracker(s);o.move("> "),o.shift(2);const r=n.indentLines(n.containerFlow(t,o.current()),c4e);return i(),r}function c4e(t,e,n){return">"+(n?"":" ")+t}function kN(t,e){return yE(t,e.inConstruct,!0)&&!yE(t,e.notInConstruct,!1)}function yE(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let s=-1;for(;++s<e.length;)if(t.includes(e[s]))return!0;return!1}function bE(t,e,n,s){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
87 `&&kN(n.stack,n.unsafe[i]))return/[ \t]/.test(s.before)?"":" ";return`\\
88 `}function u4e(t,e){const n=String(t);let s=n.indexOf(e),i=s,o=0,r=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===i?++o>r&&(r=o):o=1,i=s+e.length,s=n.indexOf(e,i);return r}function Bk(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function d4e(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function h4e(t,e,n,s){const i=d4e(n),o=t.value||"",r=i==="`"?"GraveAccent":"Tilde";if(Bk(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,f4e);return d(),h}const a=n.createTracker(s),l=i.repeat(Math.max(u4e(o,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${r}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${r}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
89 `,encode:["`"],...a.current()})),d()}return u+=a.move(`
90 `),o&&(u+=a.move(o+`
91 `)),u+=a.move(l),c(),u}function f4e(t,e,n){return(n?"":" ")+t}function F5(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function p4e(t,e,n,s){const i=F5(n),o=i==='"'?"Quote":"Apostrophe",r=n.enter("definition");let a=n.enter("label");const l=n.createTracker(s);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
92 `,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),r(),c}function m4e(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}CN.peek=g4e;function CN(t,e,n,s){const i=m4e(n),o=n.enter("emphasis"),r=n.createTracker(s);let a=r.move(i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i),o(),a}function g4e(t,e,n){return n.options.emphasis||"*"}const h2=function(t){if(t==null)return _4e;if(typeof t=="function")return f2(t);if(typeof t=="object")return Array.isArray(t)?v4e(t):y4e(t);if(typeof t=="string")return b4e(t);throw new Error("Expected function, string, or object as test")};function v4e(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=h2(t[n]);return f2(s);function s(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function y4e(t){const e=t;return f2(n);function n(s){const i=s;let o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function b4e(t){return f2(e);function e(n){return n&&n.type===t}}function f2(t){return e;function e(n,s,i){return!!(w4e(n)&&t.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function _4e(){return!0}function w4e(t){return t!==null&&typeof t=="object"&&"type"in t}const SN=[],x4e=!0,zk=!1,Hk="skip";function $N(t,e,n,s){let i;typeof e=="function"&&typeof n!="function"?(s=n,n=e):i=e;const o=h2(i),r=s?-1:1;a(t,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=SN,p,m,b;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=k4e(n(l,u)),f[0]===zk))return f;if("children"in l&&l.children){const _=l;if(_.children&&f[0]!==Hk)for(m=(s?_.children.length:-1)+r,b=u.concat(_);m>-1&&m<_.children.length;){const x=_.children[m];if(p=a(x,m,b)(),p[0]===zk)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function k4e(t){return Array.isArray(t)?t:typeof t=="number"?[x4e,t]:t==null?SN:[t]}function Bd(t,e,n,s){let i,o,r;typeof e=="function"&&typeof n!="function"?(o=void 0,r=e,i=n):(o=e,r=n,i=s),$N(t,o,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return r(l,d,u)}}function AN(t,e){let n=!1;return Bd(t,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,zk}),!!((!t.depth||t.depth<3)&&D5(t)&&(e.options.setext||n))}function C4e(t,e,n,s){const i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(s);if(AN(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:`
93 `,after:`
94 `});return d(),u(),h+`
95 `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
96 `))+1))}const r="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(r+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
97 `,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),l(),a(),c}EN.peek=S4e;function EN(t){return t.value||""}function S4e(){return"<"}MN.peek=$4e;function MN(t,e,n,s){const i=F5(n),o=i==='"'?"Quote":"Apostrophe",r=n.enter("image");let a=n.enter("label");const l=n.createTracker(s);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),r(),c}function $4e(){return"!"}TN.peek=A4e;function TN(t,e,n,s){const i=t.referenceType,o=n.enter("imageReference");let r=n.enter("label");const a=n.createTracker(s);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function A4e(){return"!"}PN.peek=E4e;function PN(t,e,n){let s=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(s);)i+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<n.unsafe.length;){const r=n.unsafe[o],a=n.compilePattern(r);let l;if(r.atBreak)for(;l=a.exec(s);){let c=l.index;s.charCodeAt(c)===10&&s.charCodeAt(c-1)===13&&c--,s=s.slice(0,c)+" "+s.slice(l.index+1)}}return i+s+i}function E4e(){return"`"}function IN(t,e){const n=D5(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}LN.peek=M4e;function LN(t,e,n,s){const i=F5(n),o=i==='"'?"Quote":"Apostrophe",r=n.createTracker(s);let a,l;if(IN(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=r.move("<");return d+=r.move(n.containerPhrasing(t,{before:d,after:">",...r.current()})),d+=r.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=r.move("[");return c+=r.move(n.containerPhrasing(t,{before:c,after:"](",...r.current()})),c+=r.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=r.move("<"),c+=r.move(n.safe(t.url,{before:c,after:">",...r.current()})),c+=r.move(">")):(l=n.enter("destinationRaw"),c+=r.move(n.safe(t.url,{before:c,after:t.title?" ":")",...r.current()}))),l(),t.title&&(l=n.enter(`title${o}`),c+=r.move(" "+i),c+=r.move(n.safe(t.title,{before:c,after:i,...r.current()})),c+=r.move(i),l()),c+=r.move(")"),a(),c}function M4e(t,e,n){return IN(t,n)?"<":"["}ON.peek=T4e;function ON(t,e,n,s){const i=t.referenceType,o=n.enter("linkReference");let r=n.enter("label");const a=n.createTracker(s);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function T4e(){return"["}function N5(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function P4e(t){const e=N5(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function I4e(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function DN(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function L4e(t,e,n,s){const i=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?I4e(n):N5(n);const a=t.ordered?r==="."?")":".":P4e(n);let l=e&&n.bulletLastUsed?r===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((r==="*"||r==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),DN(n)===r&&u){let d=-1;for(;++d<t.children.length;){const h=t.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(r=a),n.bulletCurrent=r;const c=n.containerFlow(t,s);return n.bulletLastUsed=r,n.bulletCurrent=o,i(),c}function O4e(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function D4e(t,e,n,s){const i=O4e(n);let o=n.bulletCurrent||N5(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let r=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(r=Math.ceil(r/4)*4);const a=n.createTracker(s);a.move(o+" ".repeat(r-o.length)),a.shift(r);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(r))+d:(f?o:o+" ".repeat(r-o.length))+d}}function R4e(t,e,n,s){const i=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,s);return o(),i(),r}const V4e=h2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function F4e(t,e,n,s){return(t.children.some(function(r){return V4e(r)})?n.containerPhrasing:n.containerFlow).call(n,t,s)}function N4e(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}RN.peek=B4e;function RN(t,e,n,s){const i=N4e(n),o=n.enter("strong"),r=n.createTracker(s);let a=r.move(i+i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i+i),o(),a}function B4e(t,e,n){return n.options.strong||"*"}function z4e(t,e,n,s){return n.safe(t.value,s)}function H4e(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function U4e(t,e,n){const s=(DN(n)+(n.options.ruleSpaces?" ":"")).repeat(H4e(n));return n.options.ruleSpaces?s.slice(0,-1):s}const B5={blockquote:l4e,break:bE,code:h4e,definition:p4e,emphasis:CN,hardBreak:bE,heading:C4e,html:EN,image:MN,imageReference:TN,inlineCode:PN,link:LN,linkReference:ON,list:L4e,listItem:D4e,paragraph:R4e,root:F4e,strong:RN,text:z4e,thematicBreak:U4e},j4e=[W4e];function W4e(t,e,n,s){if(e.type==="code"&&Bk(e,s)&&(t.type==="list"||t.type===e.type&&Bk(t,s)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&AN(e,s))?void 0:n.spread?1:0}const au=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Y4e=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
98 `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:au},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
99 ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:au},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
100 *])`},{character:"*",inConstruct:"phrasing",notInConstruct:au},{atBreak:!0,character:"+",after:`(?:[ \r
101 ])`},{atBreak:!0,character:"-",after:`(?:[ \r
102 -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
103 ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:au},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:au},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:au},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:au},{atBreak:!0,character:"~"}];function q4e(t){return t.label||!t.identifier?t.label||"":bN(t.identifier)}function G4e(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function X4e(t,e,n){const s=e.indexStack,i=t.children||[],o=[];let r=-1,a=n.before;s.push(-1);let l=e.createTracker(n);for(;++r<i.length;){const c=i[r];let u;if(s[s.length-1]=r,r+1<i.length){let d=e.handle.handlers[i[r+1].type];d&&d.peek&&(d=d.peek),u=d?d(i[r+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;o.length>0&&(a==="\r"||a===`
104 `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(n),l.move(o.join(""))),o.push(l.move(e.handle(c,t,e,{...l.current(),before:a,after:u}))),a=o[o.length-1].slice(-1)}return s.pop(),o.join("")}function K4e(t,e,n){const s=e.indexStack,i=t.children||[],o=e.createTracker(n),r=[];let a=-1;for(s.push(-1);++a<i.length;){const l=i[a];s[s.length-1]=a,r.push(o.move(e.handle(l,t,e,{before:`
105 `,after:`
106 `,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&r.push(o.move(Z4e(l,i[a+1],t,e)))}return s.pop(),r.join("")}function Z4e(t,e,n,s){let i=s.join.length;for(;i--;){const o=s.join[i](t,e,n,s);if(o===!0||o===1)break;if(typeof o=="number")return`
107 `.repeat(1+o);if(o===!1)return`
108
109 <!---->
110
111 `}return`
112
113 `}const J4e=/\r?\n|\r/g;function Q4e(t,e){const n=[];let s=0,i=0,o;for(;o=J4e.exec(t);)r(t.slice(s,o.index)),n.push(o[0]),s=o.index+o[0].length,i++;return r(t.slice(s)),n.join("");function r(a){n.push(e(a,i,!a))}}function e5e(t,e,n){const s=(n.before||"")+(e||"")+(n.after||""),i=[],o=[],r={};let a=-1;for(;++a<t.unsafe.length;){const u=t.unsafe[a];if(!kN(t.stack,u))continue;const d=t.compilePattern(u);let h;for(;h=d.exec(s);){const f="before"in u||!!u.atBreak,p="after"in u,m=h.index+(f?h[1].length:0);i.includes(m)?(r[m].before&&!f&&(r[m].before=!1),r[m].after&&!p&&(r[m].after=!1)):(i.push(m),r[m]={before:f,after:p})}}i.sort(t5e);let l=n.before?n.before.length:0;const c=s.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const u=i[a];u<l||u>=c||u+1<c&&i[a+1]===u+1&&r[u].after&&!r[u+1].before&&!r[u+1].after||i[a-1]===u-1&&r[u].before&&!r[u-1].before&&!r[u-1].after||(l!==u&&o.push(_E(s.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(s.charAt(u))&&(!n.encode||!n.encode.includes(s.charAt(u)))?o.push("\\"):(o.push("&#x"+s.charCodeAt(u).toString(16).toUpperCase()+";"),l++))}return o.push(_E(s.slice(l,c),n.after)),o.join("")}function t5e(t,e){return t-e}function _E(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,s=[],i=[],o=t+e;let r=-1,a=0,l;for(;l=n.exec(o);)s.push(l.index);for(;++r<s.length;)a!==s[r]&&i.push(t.slice(a,s[r])),i.push("\\"),a=s[r];return i.push(t.slice(a)),i.join("")}function n5e(t){const e=t||{},n=e.now||{};let s=e.lineShift||0,i=n.line||1,o=n.column||1;return{move:l,current:r,shift:a};function r(){return{now:{line:i,column:o},lineShift:s}}function a(c){s+=c}function l(c){const u=c||"",d=u.split(/\r?\n|\r/g),h=d[d.length-1];return i+=d.length-1,o=d.length===1?o+h.length:1+h.length+s,u}}function s5e(t,e={}){const n={enter:i,indentLines:Q4e,associationId:q4e,containerPhrasing:a5e,containerFlow:l5e,createTracker:n5e,compilePattern:G4e,safe:c5e,stack:[],unsafe:[...Y4e],join:[...j4e],handlers:{...B5},options:{},indexStack:[],handle:void 0};xN(n,e),n.options.tightDefinitions&&n.join.push(r5e),n.handle=o4e("type",{invalid:i5e,unknown:o5e,handlers:n.handlers});let s=n.handle(t,void 0,n,{before:`
114 `,after:`
115 `,now:{line:1,column:1},lineShift:0});return s&&s.charCodeAt(s.length-1)!==10&&s.charCodeAt(s.length-1)!==13&&(s+=`
116 `),s;function i(o){return n.stack.push(o),r;function r(){n.stack.pop()}}}function i5e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function o5e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function r5e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function a5e(t,e){return X4e(t,this,e)}function l5e(t,e){return K4e(t,this,e)}function c5e(t,e){return e5e(this,t,e)}function Uk(t){const e=this;e.compiler=n;function n(s){return s5e(s,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function wE(t){if(t)throw t}var Y0=Object.prototype.hasOwnProperty,VN=Object.prototype.toString,xE=Object.defineProperty,kE=Object.getOwnPropertyDescriptor,CE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):VN.call(e)==="[object Array]"},SE=function(e){if(!e||VN.call(e)!=="[object Object]")return!1;var n=Y0.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&Y0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!s)return!1;var i;for(i in e);return typeof i>"u"||Y0.call(e,i)},$E=function(e,n){xE&&n.name==="__proto__"?xE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},AE=function(e,n){if(n==="__proto__")if(Y0.call(e,n)){if(kE)return kE(e,n).value}else return;return e[n]},u5e=function t(){var e,n,s,i,o,r,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)s=AE(a,n),i=AE(e,n),a!==i&&(u&&i&&(SE(i)||(o=CE(i)))?(o?(o=!1,r=s&&CE(s)?s:[]):r=s&&SE(s)?s:{},$E(a,{name:n,newValue:t(u,r,i)})):typeof i<"u"&&$E(a,{name:n,newValue:i}));return a};const Xw=fi(u5e);function jk(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function d5e(){const t=[],e={run:n,use:s};return e;function n(...i){let o=-1;const r=i.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);a(null,...i);function a(l,...c){const u=t[++o];let d=-1;if(l){r(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?h5e(u,a)(...c):r(null,...c)}}function s(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function h5e(t,e){let n;return s;function s(...r){const a=t.length>r.length;let l;a&&r.push(i);try{l=t.apply(this,r)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(r,...a){n||(n=!0,e(r,...a))}function o(r){i(null,r)}}class yo extends Error{constructor(e,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let i="",o={},r=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(r=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof s=="string"){const l=s.indexOf(":");l===-1?o.ruleId=s:(o.source=s.slice(0,l),o.ruleId=s.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=rg(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=r&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}yo.prototype.file="";yo.prototype.name="";yo.prototype.reason="";yo.prototype.message="";yo.prototype.stack="";yo.prototype.column=void 0;yo.prototype.line=void 0;yo.prototype.ancestors=void 0;yo.prototype.cause=void 0;yo.prototype.fatal=void 0;yo.prototype.place=void 0;yo.prototype.ruleId=void 0;yo.prototype.source=void 0;const da={basename:f5e,dirname:p5e,extname:m5e,join:g5e,sep:"/"};function f5e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');J1(t);let n=0,s=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1);return s<0?"":t.slice(n,s)}if(e===t)return"";let r=-1,a=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1),a>-1&&(t.codePointAt(i)===e.codePointAt(a--)?a<0&&(s=i):(a=-1,s=r));return n===s?s=r:s<0&&(s=t.length),t.slice(n,s)}function p5e(t){if(J1(t),t.length===0)return".";let e=-1,n=t.length,s;for(;--n;)if(t.codePointAt(n)===47){if(s){e=n;break}}else s||(s=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function m5e(t){J1(t);let e=t.length,n=-1,s=0,i=-1,o=0,r;for(;e--;){const a=t.codePointAt(e);if(a===47){if(r){s=e+1;break}continue}n<0&&(r=!0,n=e+1),a===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===s+1?"":t.slice(i,n)}function g5e(...t){let e=-1,n;for(;++e<t.length;)J1(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":v5e(n)}function v5e(t){J1(t);const e=t.codePointAt(0)===47;let n=y5e(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function y5e(t,e){let n="",s=0,i=-1,o=0,r=-1,a,l;for(;++r<=t.length;){if(r<t.length)a=t.codePointAt(r);else{if(a===47)break;a=47}if(a===47){if(!(i===r-1||o===1))if(i!==r-1&&o===2){if(n.length<2||s!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",s=0):(n=n.slice(0,l),s=n.length-1-n.lastIndexOf("/")),i=r,o=0;continue}}else if(n.length>0){n="",s=0,i=r,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+t.slice(i+1,r):n=t.slice(i+1,r),s=r-i-1;i=r,o=0}else a===46&&o>-1?o++:o=-1}return n}function J1(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const b5e={cwd:_5e};function _5e(){return"/"}function Wk(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function w5e(t){if(typeof t=="string")t=new URL(t);else if(!Wk(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return x5e(t)}function x5e(t){if(t.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const s=e.codePointAt(n+2);if(s===70||s===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Kw=["history","path","basename","stem","extname","dirname"];class k5e{constructor(e){let n;e?Wk(e)?n={path:e}:typeof e=="string"||C5e(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":b5e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Kw.length;){const o=Kw[s];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Kw.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?da.basename(this.path):void 0}set basename(e){Jw(e,"basename"),Zw(e,"basename"),this.path=da.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?da.dirname(this.path):void 0}set dirname(e){EE(this.basename,"dirname"),this.path=da.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?da.extname(this.path):void 0}set extname(e){if(Zw(e,"extname"),EE(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=da.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Wk(e)&&(e=w5e(e)),Jw(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?da.basename(this.path,this.extname):void 0}set stem(e){Jw(e,"stem"),Zw(e,"stem"),this.path=da.join(this.dirname||"",e+(this.extname||""))}fail(e,n,s){const i=this.message(e,n,s);throw i.fatal=!0,i}info(e,n,s){const i=this.message(e,n,s);return i.fatal=void 0,i}message(e,n,s){const i=new yo(e,n,s);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Zw(t,e){if(t&&t.includes(da.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+da.sep+"`")}function Jw(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function EE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function C5e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const S5e=function(t){const s=this.constructor.prototype,i=s[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,s),o},$5e={}.hasOwnProperty;class z5 extends S5e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=d5e()}copy(){const e=new z5;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];e.use(...s)}return e.data(Xw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(t3("data",this.frozen),this.namespace[e]=n,this):$5e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(t3("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const i=n.call(e,...s);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=r0(e),s=this.parser||this.Parser;return Qw("parse",s),s(String(n),n)}process(e,n){const s=this;return this.freeze(),Qw("process",this.parser||this.Parser),e3("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,r){const a=r0(e),l=s.parse(a);s.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=s.stringify(f,h);E5e(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?r(u):o?o(d):n(void 0,d)}}}processSync(e){let n=!1,s;return this.freeze(),Qw("processSync",this.parser||this.Parser),e3("processSync",this.compiler||this.Compiler),this.process(e,i),TE("processSync","process",n),s;function i(o,r){n=!0,wE(o),s=r}}run(e,n,s){ME(e),this.freeze();const i=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?o(void 0,s):new Promise(o);function o(r,a){const l=r0(n);i.run(e,l,c);function c(u,d,h){const f=d||e;u?a(u):r?r(f):s(void 0,f,h)}}}runSync(e,n){let s=!1,i;return this.run(e,n,o),TE("runSync","run",s),i;function o(r,a){wE(r),i=a,s=!0}}stringify(e,n){this.freeze();const s=r0(n),i=this.compiler||this.Compiler;return e3("stringify",i),ME(e),i(e,s)}use(e,...n){const s=this.attachers,i=this.namespace;if(t3("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):r(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else r(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function r(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=Xw(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<s.length;)if(s[d][0]===c){h=d;break}if(h===-1)s.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=s[h][1];jk(m)&&jk(f)&&(f=Xw(!0,m,f)),s[h]=[c,f,...p]}}}}const Yk=new z5().freeze();function Qw(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function e3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function t3(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ME(t){if(!jk(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function TE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function r0(t){return A5e(t)?t:new k5e(t)}function A5e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function E5e(t){return typeof t=="string"||M5e(t)}function M5e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var FN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},tn=(t,e,n)=>(FN(t,e,"read from private field"),n?n.call(t):e.get(t)),Ss=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ns=(t,e,n,s)=>(FN(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let NN=class{},BN=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{var n;(n=this.top())==null||n.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw FF();return e}}},T5e=class zN extends NN{constructor(e,n,s){super(),this.type=e,this.content=n,this.attrs=s}push(e,...n){this.content.push(e,...n)}pop(){return this.content.pop()}static create(e,n,s){return new zN(e,n,s)}};var ra,cm,q0,G0,X0,um,dm;const qk=class extends BN{constructor(e){super(),Ss(this,ra,void 0),Ss(this,cm,void 0),Ss(this,q0,void 0),Ss(this,G0,void 0),Ss(this,X0,void 0),Ss(this,um,void 0),Ss(this,dm,void 0),ns(this,ra,An.none),ns(this,cm,n=>n.isText),ns(this,q0,(n,s)=>{if(tn(this,cm).call(this,n)&&tn(this,cm).call(this,s)&&An.sameSet(n.marks,s.marks))return this.schema.text(n.text+s.text,n.marks)}),ns(this,G0,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!s)throw xke(n);return s}),ns(this,X0,n=>{const s=tn(this,G0).call(this,n);s.spec.parseMarkdown.runner(this,n,s)}),this.injectRoot=(n,s,i)=>(this.openNode(s,i),this.next(n.children),this),this.openNode=(n,s)=>(this.open(T5e.create(n,[],s)),this),ns(this,um,()=>{ns(this,ra,An.none);const n=this.close();return tn(this,dm).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(tn(this,um).call(this),this),ns(this,dm,(n,s,i)=>{const o=n.createAndFill(s,i,tn(this,ra));if(!o)throw wke(n,s,i);return this.push(o),o}),this.addNode=(n,s,i)=>(tn(this,dm).call(this,n,s,i),this),this.openMark=(n,s)=>{const i=n.create(s);return ns(this,ra,i.addToSet(tn(this,ra))),this},this.closeMark=n=>(ns(this,ra,n.removeFromSet(tn(this,ra))),this),this.addText=n=>{const s=this.top();if(!s)throw FF();const i=s.pop(),o=this.schema.text(n,tn(this,ra));if(!i)return s.push(o),this;const r=tn(this,q0).call(this,i,o);return r?(s.push(r),this):(s.push(i,o),this)},this.build=()=>{let n;do n=tn(this,um).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(s=>tn(this,X0).call(this,s)),this),this.toDoc=()=>this.build(),this.run=(n,s)=>{const i=n.runSync(n.parse(s),s);return this.next(i),this},this.schema=e}};ra=new WeakMap,cm=new WeakMap,q0=new WeakMap,G0=new WeakMap,X0=new WeakMap,um=new WeakMap,dm=new WeakMap,qk.create=(t,e)=>{const n=new qk(t);return s=>(n.run(e,s),n.toDoc())};let P5e=qk;const Gk=class extends NN{constructor(e,n,s,i={}){super(),this.type=e,this.children=n,this.value=s,this.props=i,this.push=(o,...r)=>{this.children||(this.children=[]),this.children.push(o,...r)},this.pop=()=>{var o;return(o=this.children)==null?void 0:o.pop()}}};Gk.create=(t,e,n,s={})=>new Gk(t,e,n,s);let PE=Gk;const I5e=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ya,hm,K0,Z0,fm,J0,pm,Q0,ey,$h,gu,ty,mm;const Xk=class extends BN{constructor(e){super(),Ss(this,Ya,void 0),Ss(this,hm,void 0),Ss(this,K0,void 0),Ss(this,Z0,void 0),Ss(this,fm,void 0),Ss(this,J0,void 0),Ss(this,pm,void 0),Ss(this,Q0,void 0),Ss(this,ey,void 0),Ss(this,$h,void 0),Ss(this,gu,void 0),Ss(this,ty,void 0),Ss(this,mm,void 0),ns(this,Ya,An.none),ns(this,hm,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!s)throw kke(n.type);return s}),ns(this,K0,n=>tn(this,hm).call(this,n).spec.toMarkdown.runner(this,n)),ns(this,Z0,(n,s)=>tn(this,hm).call(this,n).spec.toMarkdown.runner(this,n,s)),ns(this,fm,n=>{const{marks:s}=n,i=o=>o.type.spec.priority??50;[...s].sort((o,r)=>i(o)-i(r)).every(o=>!tn(this,Z0).call(this,o,n))&&tn(this,K0).call(this,n),s.forEach(o=>tn(this,mm).call(this,o))}),ns(this,J0,(n,s)=>{var i;if(n.type===s||((i=n.children)==null?void 0:i.length)!==1)return n;const o=c=>{var u;if(c.type===s)return c;if(((u=c.children)==null?void 0:u.length)!==1)return null;const[d]=c.children;return d?o(d):null},r=o(n);if(!r)return n;const a=r.children?[...r.children]:void 0,l={...n,children:a};return l.children=a,r.children=[l],r}),ns(this,pm,n=>{const{children:s}=n;return s&&(n.children=s.reduce((i,o,r)=>{if(r===0)return[o];const a=i.at(-1);if(a&&a.isMark&&o.isMark){o=tn(this,J0).call(this,o,a.type);const{children:l,...c}=o,{children:u,...d}=a;if(o.type===a.type&&l&&u&&JSON.stringify(c)===JSON.stringify(d)){const h={...d,children:[...u,...l]};return i.slice(0,-1).concat(tn(this,pm).call(this,h))}}return i.concat(o)},[])),n}),ns(this,Q0,n=>{const s={...n.props,type:n.type};return n.children&&(s.children=n.children),n.value&&(s.value=n.value),s}),this.openNode=(n,s,i)=>(this.open(PE.create(n,void 0,s,i)),this),ns(this,ey,(n,s)=>{let i="",o="";const r=n.children;let a=-1,l=-1;const c=d=>{d&&d.forEach((h,f)=>{h.type==="text"&&h.value&&(a<0&&(a=f),l=f)})};if(r){c(r);const d=r==null?void 0:r[l],h=r==null?void 0:r[a];d&&d.value.endsWith(" ")&&(o=d.value.match(/ +$/)[0],d.value=d.value.trimEnd()),h&&h.value.startsWith(" ")&&(i=h.value.match(/^ +/)[0],h.value=h.value.trimStart())}i.length&&tn(this,gu).call(this,"text",void 0,i);const u=s();return o.length&&tn(this,gu).call(this,"text",void 0,o),u}),ns(this,$h,(n=!1)=>{const s=this.close(),i=()=>tn(this,gu).call(this,s.type,s.children,s.value,s.props);return n?tn(this,ey).call(this,s,i):i()}),this.closeNode=()=>(tn(this,$h).call(this),this),ns(this,gu,(n,s,i,o)=>{const r=PE.create(n,s,i,o),a=tn(this,pm).call(this,tn(this,Q0).call(this,r));return this.push(a),a}),this.addNode=(n,s,i,o)=>(tn(this,gu).call(this,n,s,i,o),this),ns(this,ty,(n,s,i,o)=>n.isInSet(tn(this,Ya))?this:(ns(this,Ya,n.addToSet(tn(this,Ya))),this.openNode(s,i,{...o,isMark:!0}))),ns(this,mm,n=>{n.isInSet(tn(this,Ya))&&(ns(this,Ya,n.type.removeFromSet(tn(this,Ya))),tn(this,$h).call(this,!0))}),this.withMark=(n,s,i,o)=>(tn(this,ty).call(this,n,s,i,o),this),this.closeMark=n=>(tn(this,mm).call(this,n),this),this.build=()=>{let n=null;do n=tn(this,$h).call(this);while(this.size());return n},this.next=n=>I5e(n)?(n.forEach(s=>{tn(this,fm).call(this,s)}),this):(tn(this,fm).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ya=new WeakMap,hm=new WeakMap,K0=new WeakMap,Z0=new WeakMap,fm=new WeakMap,J0=new WeakMap,pm=new WeakMap,Q0=new WeakMap,ey=new WeakMap,$h=new WeakMap,gu=new WeakMap,ty=new WeakMap,mm=new WeakMap,Xk.create=(t,e)=>{const n=new Xk(t);return s=>(n.run(s),n.toString(e))};let L5e=Xk;const HN=65535,UN=Math.pow(2,16);function O5e(t,e){return t+e*UN}function IE(t){return t&HN}function D5e(t){return(t-(t&HN))/UN}const jN=1,WN=2,ny=4,YN=8;class Kk{constructor(e,n,s){this.pos=e,this.delInfo=n,this.recover=s}get deleted(){return(this.delInfo&YN)>0}get deletedBefore(){return(this.delInfo&(jN|ny))>0}get deletedAfter(){return(this.delInfo&(WN|ny))>0}get deletedAcross(){return(this.delInfo&ny)>0}}class $o{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&$o.empty)return $o.empty}recover(e){let n=0,s=IE(e);if(!this.inverted)for(let i=0;i<s;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[s*3]+n+D5e(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,s){let i=0,o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+r],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:n:n,f=l+i+(h<0?0:u);if(s)return f;let p=e==(n<0?l:d)?null:O5e(a/3,e-l),m=e==l?WN:e==d?jN:ny;return(n<0?e!=l:e!=d)&&(m|=YN),new Kk(f,m,p)}i+=u-c}return s?e+i:new Kk(e+i,0,null)}touches(e,n){let s=0,i=IE(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;s+=this.ranges[a+r]-c}return!1}forEach(e){let n=this.inverted?2:1,s=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let r=this.ranges[i],a=r-(this.inverted?o:0),l=r+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+s];e(a,a+c,l,l+u),o+=u-c}}invert(){return new $o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?$o.empty:new $o(e<0?[0,-e,0]:[0,0,e])}}$o.empty=new $o([]);class of{constructor(e=[],n,s=0,i=e.length){this.maps=e,this.mirror=n,this.from=s,this.to=i}slice(e=0,n=this.maps.length){return new of(this.maps,this.mirror,e,n)}copy(){return new of(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,s=this.maps.length;n<e.maps.length;n++){let i=e.getMirror(n);this.appendMap(e.maps[n],i!=null&&i<n?s+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,s=this.maps.length+e.maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e.maps[n].invert(),i!=null&&i>n?s-i-1:void 0)}}invert(){let e=new of;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let s=this.from;s<this.to;s++)e=this.maps[s].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,s){let i=0;for(let o=this.from;o<this.to;o++){let r=this.maps[o],a=r.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return s?e:new Kk(e,i,null)}}const n3=Object.create(null);class Mi{getMap(){return $o.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let s=n3[n.stepType];if(!s)throw new RangeError(`No step type ${n.stepType} defined`);return s.fromJSON(e,n)}static jsonID(e,n){if(e in n3)throw new RangeError("Duplicate use of step JSON ID "+e);return n3[e]=n,n.prototype.jsonID=e,n}}class Ms{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ms(e,null)}static fail(e){return new Ms(null,e)}static fromReplace(e,n,s,i){try{return Ms.ok(e.replace(n,s,i))}catch(o){if(o instanceof Pb)return Ms.fail(o.message);throw o}}}function H5(t,e,n){let s=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(H5(o.content,e,o))),o.isInline&&(o=e(o,n,i)),s.push(o)}return nt.fromArray(s)}class il extends Mi{constructor(e,n,s){super(),this.from=e,this.to=n,this.mark=s}apply(e){let n=e.slice(this.from,this.to),s=e.resolve(this.from),i=s.node(s.sharedDepth(this.to)),o=new it(H5(n.content,(r,a)=>!r.isAtom||!a.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),i),n.openStart,n.openEnd);return Ms.fromReplace(e,this.from,this.to,o)}invert(){return new ga(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deleted&&s.deleted||n.pos>=s.pos?null:new il(n.pos,s.pos,this.mark)}merge(e){return e instanceof il&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new il(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new il(n.from,n.to,e.markFromJSON(n.mark))}}Mi.jsonID("addMark",il);class ga extends Mi{constructor(e,n,s){super(),this.from=e,this.to=n,this.mark=s}apply(e){let n=e.slice(this.from,this.to),s=new it(H5(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ms.fromReplace(e,this.from,this.to,s)}invert(){return new il(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deleted&&s.deleted||n.pos>=s.pos?null:new ga(n.pos,s.pos,this.mark)}merge(e){return e instanceof ga&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ga(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ga(n.from,n.to,e.markFromJSON(n.mark))}}Mi.jsonID("removeMark",ga);class bc extends Mi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ms.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ms.fromReplace(e,this.pos,this.pos+1,new it(nt.from(s),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let s=this.mark.addToSet(n.marks);if(s.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(s))return new bc(this.pos,n.marks[i]);return new bc(this.pos,this.mark)}}return new Yf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new bc(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new bc(n.pos,e.markFromJSON(n.mark))}}Mi.jsonID("addNodeMark",bc);class Yf extends Mi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ms.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ms.fromReplace(e,this.pos,this.pos+1,new it(nt.from(s),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new bc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Yf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Yf(n.pos,e.markFromJSON(n.mark))}}Mi.jsonID("removeNodeMark",Yf);class Js extends Mi{constructor(e,n,s,i=!1){super(),this.from=e,this.to=n,this.slice=s,this.structure=i}apply(e){return this.structure&&Zk(e,this.from,this.to)?Ms.fail("Structure replace would overwrite content"):Ms.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new $o([this.from,this.to-this.from,this.slice.size])}invert(e){return new Js(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deletedAcross&&s.deletedAcross?null:new Js(n.pos,Math.max(n.pos,s.pos),this.slice)}merge(e){if(!(e instanceof Js)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?it.empty:new it(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Js(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?it.empty:new it(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Js(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Js(n.from,n.to,it.fromJSON(e,n.slice),!!n.structure)}}Mi.jsonID("replace",Js);class $i extends Mi{constructor(e,n,s,i,o,r,a=!1){super(),this.from=e,this.to=n,this.gapFrom=s,this.gapTo=i,this.slice=o,this.insert=r,this.structure=a}apply(e){if(this.structure&&(Zk(e,this.from,this.gapFrom)||Zk(e,this.gapTo,this.to)))return Ms.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ms.fail("Gap is not a flat range");let s=this.slice.insertAt(this.insert,n.content);return s?Ms.fromReplace(e,this.from,this.to,s):Ms.fail("Content does not fit in gap")}getMap(){return new $o([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new $i(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?s.pos:e.map(this.gapTo,1);return n.deletedAcross&&s.deletedAcross||i<n.pos||o>s.pos?null:new $i(n.pos,s.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new $i(n.from,n.to,n.gapFrom,n.gapTo,it.fromJSON(e,n.slice),n.insert,!!n.structure)}}Mi.jsonID("replaceAround",$i);function Zk(t,e,n){let s=t.resolve(e),i=n-e,o=s.depth;for(;i>0&&o>0&&s.indexAfter(o)==s.node(o).childCount;)o--,i--;if(i>0){let r=s.node(o).maybeChild(s.indexAfter(o));for(;i>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,i--}}return!1}function R5e(t,e,n,s){let i=[],o=[],r,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!s.isInSet(d)&&u.type.allowsMarkType(s.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,n),p=s.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(r&&r.to==h&&r.mark.eq(d[m])?r.to=f:i.push(r=new ga(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new il(h,f,s))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function V5e(t,e,n,s){let i=[],o=0;t.doc.nodesBetween(e,n,(r,a)=>{if(!r.isInline)return;o++;let l=null;if(s instanceof l2){let c=r.marks,u;for(;u=s.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else s?s.isInSet(r.marks)&&(l=[s]):l=r.marks;if(l&&l.length){let c=Math.min(a+r.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<i.length;f++){let p=i[f];p.step==o-1&&d.eq(i[f].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(r=>t.step(new ga(r.from,r.to,r.style)))}function qN(t,e,n,s=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),r=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=s.matchType(c.type);if(!d)r.push(new Js(a,u,it.empty));else{s=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new ga(a,u,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new it(nt.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new Js(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!s.validEnd){let l=s.fillBefore(nt.empty,!0);t.replace(a,a,new it(l,0,0))}for(let l=r.length-1;l>=0;l--)t.step(r[l])}function F5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function p2(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let s=t.depth;;--s){let i=t.$from.node(s),o=t.$from.index(s),r=t.$to.indexAfter(s);if(s<t.depth&&i.canReplace(o,r,n))return s;if(s==0||i.type.spec.isolating||!F5e(i,o,r))break}return null}function N5e(t,e,n){let{$from:s,$to:i,depth:o}=e,r=s.before(o+1),a=i.after(o+1),l=r,c=a,u=nt.empty,d=0;for(let p=o,m=!1;p>n;p--)m||s.index(p)>0?(m=!0,u=nt.from(s.node(p).copy(u)),d++):l--;let h=nt.empty,f=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,h=nt.from(i.node(p).copy(h)),f++):c++;t.step(new $i(l,c,r,a,new it(u.append(h),d,f),u.size-d,!0))}function U5(t,e,n=null,s=t){let i=B5e(t,e),o=i&&z5e(s,e);return o?i.map(LE).concat({type:e,attrs:n}).concat(o.map(LE)):null}function LE(t){return{type:t,attrs:null}}function B5e(t,e){let{parent:n,startIndex:s,endIndex:i}=t,o=n.contentMatchAt(s).findWrapping(e);if(!o)return null;let r=o.length?o[0]:e;return n.canReplaceWith(s,i,r)?o:null}function z5e(t,e){let{parent:n,startIndex:s,endIndex:i}=t,o=n.child(s),r=e.contentMatch.findWrapping(o.type);if(!r)return null;let l=(r.length?r[r.length-1]:e).contentMatch;for(let c=s;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:r}function H5e(t,e,n){let s=nt.empty;for(let r=n.length-1;r>=0;r--){if(s.size){let a=n[r].type.contentMatch.matchFragment(s);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=nt.from(n[r].type.create(n[r].attrs,s))}let i=e.start,o=e.end;t.step(new $i(i,o,i,o,new it(s,0,0),n.length,!0))}function U5e(t,e,n,s,i){if(!s.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(r,a)=>{let l=typeof i=="function"?i(r):i;if(r.isTextblock&&!r.hasMarkup(s,l)&&Y5e(t.doc,t.mapping.slice(o).map(a),s)){let c=null;if(s.schema.linebreakReplacement){let f=s.whitespace=="pre",p=!!s.contentMatch.matchType(s.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&W5e(t,r,a,o),qN(t,t.mapping.slice(o).map(a,1),s,void 0,c===null);let u=t.mapping.slice(o),d=u.map(a,1),h=u.map(a+r.nodeSize,1);return t.step(new $i(d,h,d+1,h-1,new it(nt.from(s.create(l,null,r.marks)),0,0),1,!0)),c===!0&&j5e(t,r,a,o),!1}})}function j5e(t,e,n,s){e.forEach((i,o)=>{if(i.isText){let r,a=/\r?\n|\r/g;for(;r=a.exec(i.text);){let l=t.mapping.slice(s).map(n+1+o+r.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function W5e(t,e,n,s){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let r=t.mapping.slice(s).map(n+1+o);t.replaceWith(r,r+1,e.type.schema.text(`
117 `))}})}function Y5e(t,e,n){let s=t.resolve(e),i=s.index();return s.parent.canReplaceWith(i,i+1,n)}function q5e(t,e,n,s,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let r=n.create(s,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,r);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new $i(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new it(nt.from(r),0,0),1,!0))}function ag(t,e,n=1,s){let i=t.resolve(e),o=i.depth-n,r=s&&s[s.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!r.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let d=i.node(c),h=i.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=s&&s[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=s&&s[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(o),l=s&&s[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function G5e(t,e,n=1,s){let i=t.doc.resolve(e),o=nt.empty,r=nt.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=nt.from(i.node(a).copy(o));let u=s&&s[c];r=nt.from(u?u.type.create(u.attrs,r):i.node(a).copy(r))}t.step(new Js(e,e,new it(o.append(r),n,n),!0))}function m2(t,e){let n=t.resolve(e),s=n.index();return X5e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(s,s+1)}function X5e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function K5e(t,e,n){let s=new Js(e-n,e+n,it.empty,!0);t.step(s)}function Z5e(t,e,n){let s=t.resolve(e);if(s.parent.canReplaceWith(s.index(),s.index(),n))return e;if(s.parentOffset==0)for(let i=s.depth-1;i>=0;i--){let o=s.index(i);if(s.node(i).canReplaceWith(o,o,n))return s.before(i+1);if(o>0)return null}if(s.parentOffset==s.parent.content.size)for(let i=s.depth-1;i>=0;i--){let o=s.indexAfter(i);if(s.node(i).canReplaceWith(o,o,n))return s.after(i+1);if(o<s.node(i).childCount)return null}return null}function J5e(t,e,n){let s=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let r=s.depth;r>=0;r--){let a=r==s.depth?0:s.pos<=(s.start(r+1)+s.end(r+1))/2?-1:1,l=s.index(r)+(a>0?1:0),c=s.node(r),u=!1;if(o==1)u=c.canReplace(l,l,i);else{let d=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?s.pos:a<0?s.before(r+1):s.after(r+1)}return null}function j5(t,e,n=e,s=it.empty){if(e==n&&!s.size)return null;let i=t.resolve(e),o=t.resolve(n);return GN(i,o,s)?new Js(e,n,s):new Q5e(i,o,s).fit()}function GN(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Q5e{constructor(e,n,s){this.$from=e,this.$to=n,this.unplaced=s,this.frontier=[],this.placed=nt.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=nt.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,s=this.$from,i=this.close(e<0?this.$to:s.doc.resolve(e));if(!i)return null;let o=this.placed,r=s.depth,a=i.depth;for(;r&&a&&o.childCount==1;)o=o.firstChild.content,r--,a--;let l=new it(o,r,a);return e>-1?new $i(s.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||s.pos!=this.$to.pos?new Js(s.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,s=0,i=this.unplaced.openEnd;s<e;s++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=s){e=s;break}n=o.content}for(let n=1;n<=2;n++)for(let s=n==1?e:this.unplaced.openStart;s>=0;s--){let i,o=null;s?(o=s3(this.unplaced.content,s-1).firstChild,i=o.content):i=this.unplaced.content;let r=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(r?c.matchType(r.type)||(d=c.fillBefore(nt.from(r),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:s,frontierDepth:a,parent:o,inject:d};if(n==2&&r&&(u=c.findWrapping(r.type)))return{sliceDepth:s,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:s}=this.unplaced,i=s3(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new it(e,n+1,Math.max(s,i.size+n>=e.size-s?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:s}=this.unplaced,i=s3(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new it(gm(e,n-1,1),n-1,o?n-1:s)}else this.unplaced=new it(gm(e,n,1),n,s)}placeNodes({sliceDepth:e,frontierDepth:n,parent:s,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let r=this.unplaced,a=s?s.content:r.content,l=r.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));d=d.matchFragment(i)}let f=a.size+e-(r.content.size-r.openEnd);for(;c<a.childCount;){let m=a.child(c),b=d.matchType(m.type);if(!b)break;c++,(c>1||l==0||m.content.size)&&(d=b,u.push(XN(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=vm(this.placed,n,nt.from(u)),this.frontier[n].match=d,p&&f<0&&s&&s.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m<f;m++){let _=b.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),b=_.content}this.unplaced=p?e==0?it.empty:new it(gm(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new it(gm(r.content,e,c),r.openStart,r.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!i3(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:s}=this.$to,i=this.$to.after(s);for(;s>1&&i==this.$to.end(--s);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:s,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),r=i3(e,n,i,s,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=i3(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:r,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=vm(this.placed,n.depth,n.fit)),e=n.move;for(let s=n.depth+1;s<=e.depth;s++){let i=e.node(s),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(s));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,s){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=vm(this.placed,this.depth,nt.from(e.create(n,s))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(nt.empty,!0);n.childCount&&(this.placed=vm(this.placed,this.frontier.length,n))}}function gm(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(gm(t.firstChild.content,e-1,n)))}function vm(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(vm(t.lastChild.content,e-1,n)))}function s3(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function XN(t,e,n){if(e<=0)return t;let s=t.content;return e>1&&(s=s.replaceChild(0,XN(s.firstChild,e-1,s.childCount==1?n-1:0))),e>0&&(s=t.type.contentMatch.fillBefore(s).append(s),n<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(nt.empty,!0)))),t.copy(s)}function i3(t,e,n,s,i){let o=t.node(e),r=i?t.indexAfter(e):t.index(e);if(r==o.childCount&&!n.compatibleContent(o.type))return null;let a=s.fillBefore(o.content,!0,r);return a&&!e8e(n,o.content,r)?a:null}function e8e(t,e,n){for(let s=n;s<e.childCount;s++)if(!t.allowsMarks(e.child(s).marks))return!0;return!1}function t8e(t){return t.spec.defining||t.spec.definingForContent}function n8e(t,e,n,s){if(!s.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(GN(i,o,s))return t.step(new Js(e,n,s));let r=ZN(i,t.doc.resolve(n));r[r.length-1]==0&&r.pop();let a=-(i.depth+1);r.unshift(a);for(let h=i.depth,f=i.pos-1;h>0;h--,f--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;r.indexOf(h)>-1?a=h:i.before(h)==f&&r.splice(1,0,-h)}let l=r.indexOf(a),c=[],u=s.openStart;for(let h=s.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==s.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h],p=t8e(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))u=h;else if(p||!f.type.isTextblock)break}for(let h=s.openStart;h>=0;h--){let f=(h+u+1)%(s.openStart+1),p=c[f];if(p)for(let m=0;m<r.length;m++){let b=r[(m+l)%r.length],_=!0;b<0&&(_=!1,b=-b);let x=i.node(b-1),k=i.index(b-1);if(x.canReplaceWith(k,k,p.type,p.marks))return t.replace(i.before(b),_?o.after(b):n,new it(KN(s.content,0,s.openStart,f),f,s.openEnd))}}let d=t.steps.length;for(let h=r.length-1;h>=0&&(t.replace(e,n,s),!(t.steps.length>d));h--){let f=r[h];f<0||(e=i.before(f),n=o.after(f))}}function KN(t,e,n,s,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(KN(o.content,e+1,n,s,o)))}if(e>s){let o=i.contentMatchAt(0),r=o.fillBefore(t).append(t);t=r.append(o.matchFragment(r).fillBefore(nt.empty,!0))}return t}function s8e(t,e,n,s){if(!s.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=Z5e(t.doc,e,s.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new it(nt.from(s),0,0))}function i8e(t,e,n){let s=t.doc.resolve(e),i=t.doc.resolve(n),o=ZN(s,i);for(let r=0;r<o.length;r++){let a=o[r],l=r==o.length-1;if(l&&a==0||s.node(a).type.contentMatch.validEnd)return t.delete(s.start(a),i.end(a));if(a>0&&(l||s.node(a-1).canReplace(s.index(a-1),i.indexAfter(a-1))))return t.delete(s.before(a),i.after(a))}for(let r=1;r<=s.depth&&r<=i.depth;r++)if(e-s.start(r)==s.depth-r&&n>s.end(r)&&i.end(r)-n!=i.depth-r)return t.delete(s.before(r),n);t.delete(e,n)}function ZN(t,e){let n=[],s=Math.min(t.depth,e.depth);for(let i=s;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class rf extends Mi{constructor(e,n,s){super(),this.pos=e,this.attr=n,this.value=s}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ms.fail("No node at attribute step's position");let s=Object.create(null);for(let o in n.attrs)s[o]=n.attrs[o];s[this.attr]=this.value;let i=n.type.create(s,null,n.marks);return Ms.fromReplace(e,this.pos,this.pos+1,new it(nt.from(i),0,n.isLeaf?0:1))}getMap(){return $o.empty}invert(e){return new rf(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new rf(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new rf(n.pos,n.attr,n.value)}}Mi.jsonID("attr",rf);class i1 extends Mi{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let s=e.type.create(n,e.content,e.marks);return Ms.ok(s)}getMap(){return $o.empty}invert(e){return new i1(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new i1(n.attr,n.value)}}Mi.jsonID("docAttr",i1);let qf=class extends Error{};qf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};qf.prototype=Object.create(Error.prototype);qf.prototype.constructor=qf;qf.prototype.name="TransformError";class JN{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new of}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new qf(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,s=it.empty){let i=j5(this.doc,e,n,s);return i&&this.step(i),this}replaceWith(e,n,s){return this.replace(e,n,new it(nt.from(s),0,0))}delete(e,n){return this.replace(e,n,it.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,s){return n8e(this,e,n,s),this}replaceRangeWith(e,n,s){return s8e(this,e,n,s),this}deleteRange(e,n){return i8e(this,e,n),this}lift(e,n){return N5e(this,e,n),this}join(e,n=1){return K5e(this,e,n),this}wrap(e,n){return H5e(this,e,n),this}setBlockType(e,n=e,s,i=null){return U5e(this,e,n,s,i),this}setNodeMarkup(e,n,s=null,i){return q5e(this,e,n,s,i),this}setNodeAttribute(e,n,s){return this.step(new rf(e,n,s)),this}setDocAttribute(e,n){return this.step(new i1(e,n)),this}addNodeMark(e,n){return this.step(new bc(e,n)),this}removeNodeMark(e,n){if(!(n instanceof An)){let s=this.doc.nodeAt(e);if(!s)throw new RangeError("No node at position "+e);if(n=n.isInSet(s.marks),!n)return this}return this.step(new Yf(e,n)),this}split(e,n=1,s){return G5e(this,e,n,s),this}addMark(e,n,s){return R5e(this,e,n,s),this}removeMark(e,n,s){return V5e(this,e,n,s),this}clearIncompatible(e,n,s){return qN(this,e,n,s),this}}const o3=Object.create(null);class zt{constructor(e,n,s){this.$anchor=e,this.$head=n,this.ranges=s||[new Nb(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=it.empty){let s=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=s,s=s.lastChild;let o=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){let{$from:l,$to:c}=r[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?it.empty:n),a==0&&RE(e,o,(s?s.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let s=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:r,$to:a}=i[o],l=e.mapping.slice(s),c=l.map(r.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),RE(e,s,n.isInline?-1:1))}}static findFrom(e,n,s=!1){let i=e.parent.inlineContent?new It(e):Ah(e.node(0),e.parent,e.pos,e.index(),n,s);if(i)return i;for(let o=e.depth-1;o>=0;o--){let r=n<0?Ah(e.node(0),e.node(o),e.before(o+1),e.index(o),n,s):Ah(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,s);if(r)return r}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Oo(e.node(0))}static atStart(e){return Ah(e,e,0,0,1)||new Oo(e)}static atEnd(e){return Ah(e,e,e.content.size,e.childCount,-1)||new Oo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let s=o3[n.type];if(!s)throw new RangeError(`No selection type ${n.type} defined`);return s.fromJSON(e,n)}static jsonID(e,n){if(e in o3)throw new RangeError("Duplicate use of selection JSON ID "+e);return o3[e]=n,n.prototype.jsonID=e,n}getBookmark(){return It.between(this.$anchor,this.$head).getBookmark()}}zt.prototype.visible=!0;class Nb{constructor(e,n){this.$from=e,this.$to=n}}let OE=!1;function DE(t){!OE&&!t.parent.inlineContent&&(OE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class It extends zt{constructor(e,n=e){DE(e),DE(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let s=e.resolve(n.map(this.head));if(!s.parent.inlineContent)return zt.near(s);let i=e.resolve(n.map(this.anchor));return new It(i.parent.inlineContent?i:s,s)}replace(e,n=it.empty){if(super.replace(e,n),n==it.empty){let s=this.$from.marksAcross(this.$to);s&&e.ensureMarks(s)}}eq(e){return e instanceof It&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new g2(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new It(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,s=n){let i=e.resolve(n);return new this(i,s==n?i:e.resolve(s))}static between(e,n,s){let i=e.pos-n.pos;if((!s||i)&&(s=i>=0?1:-1),!n.parent.inlineContent){let o=zt.findFrom(n,s,!0)||zt.findFrom(n,-s,!0);if(o)n=o.$head;else return zt.near(n,s)}return e.parent.inlineContent||(i==0?e=n:(e=(zt.findFrom(e,-s,!0)||zt.findFrom(e,s,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new It(e,n)}}zt.jsonID("text",It);class g2{constructor(e,n){this.anchor=e,this.head=n}map(e){return new g2(e.map(this.anchor),e.map(this.head))}resolve(e){return It.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ot extends zt{constructor(e){let n=e.nodeAfter,s=e.node(0).resolve(e.pos+n.nodeSize);super(e,s),this.node=n}map(e,n){let{deleted:s,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return s?zt.near(o):new Ot(o)}content(){return new it(nt.from(this.node),0,0)}eq(e){return e instanceof Ot&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new W5(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ot(e.resolve(n.anchor))}static create(e,n){return new Ot(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ot.prototype.visible=!1;zt.jsonID("node",Ot);class W5{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:s}=e.mapResult(this.anchor);return n?new g2(s,s):new W5(s)}resolve(e){let n=e.resolve(this.anchor),s=n.nodeAfter;return s&&Ot.isSelectable(s)?new Ot(n):zt.near(n)}}class Oo extends zt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=it.empty){if(n==it.empty){e.delete(0,e.doc.content.size);let s=zt.atStart(e.doc);s.eq(e.selection)||e.setSelection(s)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Oo(e)}map(e){return new Oo(e)}eq(e){return e instanceof Oo}getBookmark(){return o8e}}zt.jsonID("all",Oo);const o8e={map(){return this},resolve(t){return new Oo(t)}};function Ah(t,e,n,s,i,o=!1){if(e.inlineContent)return It.create(t,n);for(let r=s-(i>0?0:1);i>0?r<e.childCount:r>=0;r+=i){let a=e.child(r);if(a.isAtom){if(!o&&Ot.isSelectable(a))return Ot.create(t,n-(i<0?a.nodeSize:0))}else{let l=Ah(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function RE(t,e,n){let s=t.steps.length-1;if(s<e)return;let i=t.steps[s];if(!(i instanceof Js||i instanceof $i))return;let o=t.mapping.maps[s],r;o.forEach((a,l,c,u)=>{r==null&&(r=u)}),t.setSelection(zt.near(t.doc.resolve(r),n))}const VE=1,a0=2,FE=4;class r8e extends JN{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|VE)&~a0,this.storedMarks=null,this}get selectionSet(){return(this.updated&VE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=a0,this}ensureMarks(e){return An.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&a0)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~a0,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let s=this.selection;return n&&(e=e.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||An.none))),s.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,s){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(s==null&&(s=n),s=s??n,!e)return this.deleteRange(n,s);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=s==n?r.marks():r.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(n,s,i.text(e,o)),this.selection.empty||this.setSelection(zt.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=FE,this}get scrolledIntoView(){return(this.updated&FE)>0}}function NE(t,e){return!e||!t?t:t.bind(e)}class ym{constructor(e,n,s){this.name=e,this.init=NE(n.init,s),this.apply=NE(n.apply,s)}}const a8e=[new ym("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ym("selection",{init(t,e){return t.selection||zt.atStart(e.doc)},apply(t){return t.selection}}),new ym("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,s){return s.selection.$cursor?t.storedMarks:null}}),new ym("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class r3{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=a8e.slice(),n&&n.forEach(s=>{if(this.pluginsByKey[s.key])throw new RangeError("Adding different instances of a keyed plugin ("+s.key+")");this.plugins.push(s),this.pluginsByKey[s.key]=s,s.spec.state&&this.fields.push(new ym(s.key,s.spec.state,s))})}}class Iu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let s=0;s<this.config.plugins.length;s++)if(s!=n){let i=this.config.plugins[s];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],s=this.applyInner(e),i=null;for(;;){let o=!1;for(let r=0;r<this.config.plugins.length;r++){let a=this.config.plugins[r];if(a.spec.appendTransaction){let l=i?i[r].n:0,c=i?i[r].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,s);if(u&&s.filterTransaction(u,r)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<r?{state:s,n:n.length}:{state:this,n:0})}n.push(u),s=s.applyInner(u),o=!0}i&&(i[r]={state:s,n:n.length})}}if(!o)return{state:s,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Iu(this.config),s=this.config.fields;for(let i=0;i<s.length;i++){let o=s[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new r8e(this)}static create(e){let n=new r3(e.doc?e.doc.type.schema:e.schema,e.plugins),s=new Iu(n);for(let i=0;i<n.fields.length;i++)s[n.fields[i].name]=n.fields[i].init(e,s);return s}reconfigure(e){let n=new r3(this.schema,e.plugins),s=n.fields,i=new Iu(n);for(let o=0;o<s.length;o++){let r=s[o].name;i[r]=this.hasOwnProperty(r)?this[r]:s[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(s=>s.toJSON())),e&&typeof e=="object")for(let s in e){if(s=="doc"||s=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[s],o=i.spec.state;o&&o.toJSON&&(n[s]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,s){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new r3(e.schema,e.plugins),o=new Iu(i);return i.fields.forEach(r=>{if(r.name=="doc")o.doc=Sc.fromJSON(e.schema,n.doc);else if(r.name=="selection")o.selection=zt.fromJSON(o.doc,n.selection);else if(r.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(s)for(let a in s){let l=s[a],c=l.spec.state;if(l.key==r.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[r.name]=c.fromJSON.call(l,e,n[a],o);return}}o[r.name]=r.init(e,o)}}),o}}function QN(t,e,n){for(let s in t){let i=t[s];i instanceof Function?i=i.bind(e):s=="handleDOMEvents"&&(i=QN(i,e,{})),n[s]=i}return n}class rs{constructor(e){this.spec=e,this.props={},e.props&&QN(e.props,this,this.props),this.key=e.key?e.key.key:eB("plugin")}getState(e){return e[this.key]}}const a3=Object.create(null);function eB(t){return t in a3?t+"$"+ ++a3[t]:(a3[t]=0,t+"$")}class fs{constructor(e="key"){this.key=eB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class Uo{constructor(e,n,s={}){this.match=e,this.match=e,this.handler=typeof n=="string"?l8e(n):n,this.undoable=s.undoable!==!1,this.inCode=s.inCode||!1}}function l8e(t){return function(e,n,s,i){let o=t;if(n[1]){let r=n[0].lastIndexOf(n[1]);o+=n[0].slice(r+n[1].length),s+=r;let a=s-i;a>0&&(o=n[0].slice(r-a,r)+o,s=i)}return e.tr.insertText(o,s,i)}}const c8e=(t,e)=>{let n=t.plugins;for(let s=0;s<n.length;s++){let i=n[s],o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){let r=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l--)r.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=r.doc.resolve(o.from).marks();r.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else r.delete(o.from,o.to);e(r)}return!0}}return!1};new Uo(/--$/,"—");new Uo(/\.\.\.$/,"…");new Uo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Uo(/"$/,"”");new Uo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Uo(/'$/,"’");function Y5(t,e,n=null,s){return new Uo(t,(i,o,r,a)=>{let l=n instanceof Function?n(o):n,c=i.tr.delete(r,a),u=c.doc.resolve(r),d=u.blockRange(),h=d&&U5(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&m2(c.doc,r-1)&&(!s||s(o,f))&&c.join(r-1),c})}function tB(t,e,n=null){return new Uo(t,(s,i,o,r)=>{let a=s.doc.resolve(o),l=n instanceof Function?n(i):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?s.tr.delete(o,r).setBlockType(o,o,e,l):null})}const Fc=typeof navigator<"u"?navigator:null,BE=typeof document<"u"?document:null,Jc=Fc&&Fc.userAgent||"",Jk=/Edge\/(\d+)/.exec(Jc),nB=/MSIE \d/.exec(Jc),Qk=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jc),v2=!!(nB||Qk||Jk),u8e=nB?document.documentMode:Qk?+Qk[1]:Jk?+Jk[1]:0,sB=!v2&&/gecko\/(\d+)/i.test(Jc),d8e=sB&&+(/Firefox\/(\d+)/.exec(Jc)||[0,0])[1],e6=!v2&&/Chrome\/(\d+)/.exec(Jc),h8e=!!e6,f8e=e6?+e6[1]:0,iB=!v2&&!!Fc&&/Apple Computer/.test(Fc.vendor),oB=iB&&(/Mobile\/\w+/.test(Jc)||!!Fc&&Fc.maxTouchPoints>2),p8e=oB||(Fc?/Mac/.test(Fc.platform):!1),m8e=/Android \d/.test(Jc),rB=!!BE&&"webkitFontSmoothing"in BE.documentElement.style,g8e=rB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var l0=Object.freeze({__proto__:null,android:m8e,chrome:h8e,chrome_version:f8e,gecko:sB,gecko_version:d8e,ie:v2,ie_version:u8e,ios:oB,mac:p8e,safari:iB,webkit:rB,webkit_version:g8e});function l3(t,e,n,s,i,o){if(t.composing)return!1;const r=t.state,a=r.doc.resolve(e);if(a.parent.type.spec.code)return!1;const l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+s;for(let c=0;c<i.length;c++){const u=i[c].match.exec(l),d=u&&u[0]&&i[c].handler(r,u,e-(u[0].length-s.length),n);if(d)return t.dispatch(d.setMeta(o,{transform:d,from:e,to:n,text:s})),!0}return!1}const v8e=new fs("MILKDOWN_CUSTOM_INPUTRULES");function y8e({rules:t}){const e=new rs({key:v8e,isInputRules:!0,state:{init(){return null},apply(n,s){const i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:s)}},props:{handleTextInput(n,s,i,o){return l3(n,s,i,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:s}=n.state.selection;s&&l3(n,s.pos,s.pos,"",t,e)}),!1)},handleKeyDown(n,s){if(s.key!=="Enter")return!1;const{$cursor:i}=n.state.selection;return i?l3(n,i.pos,i.pos,`
118 `,t,e):!1}}});return e}function Q1(t,e,n={}){return new Uo(t,(s,i,o,r)=>{var a,l,c,u;const{tr:d}=s,h=i.length;let f=i[h-1],p=i[0],m=[],b=r;const _={group:f,fullMatch:p,start:o,end:r},x=(a=n.updateCaptured)==null?void 0:a.call(n,_);if(Object.assign(_,x),{group:f,fullMatch:p,start:o,end:r}=_,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const k=p.search(/\S/),C=o+p.indexOf(f),S=C+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,r),C>o&&d.delete(o+k,C),b=o+k+f.length;const E=(c=n.getAttr)==null?void 0:c.call(n,i);d.addMark(o,b,e.create(E)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:i,start:o,end:r,tr:d})}return d})}var b8e=Object.defineProperty,_8e=Object.defineProperties,w8e=Object.getOwnPropertyDescriptors,zE=Object.getOwnPropertySymbols,x8e=Object.prototype.hasOwnProperty,k8e=Object.prototype.propertyIsEnumerable,HE=(t,e,n)=>e in t?b8e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C8e=(t,e)=>{for(var n in e||(e={}))x8e.call(e,n)&&HE(t,n,e[n]);if(zE)for(var n of zE(e))k8e.call(e,n)&&HE(t,n,e[n]);return t},S8e=(t,e)=>_8e(t,w8e(e));function UE(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function y2(t,e,n){const i=t.state.doc.content.size,o=UE(e,0,i),r=UE(n,0,i),a=t.coordsAtPos(o),l=t.coordsAtPos(r,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),f=h-d,p=u-c,_={top:c,bottom:u,left:d,right:h,width:f,height:p,x:d,y:c};return S8e(C8e({},_),{toJSON:()=>_})}function b2(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function $8e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function q5(t){return e=>{for(let n=e.depth;n>0;n-=1){const s=e.node(n);if(t(s)){const i=e.before(n),o=e.after(n);return{from:i,to:o,node:s}}}}}function A8e(t,e){return q5(n=>n.type===e)(t)}function E8e(t,e){const n=e.nodes[t];if(!n)throw Cke("node",t);return n}function G5(t){return e=>{for(let n=e.depth;n>0;n--){const s=e.node(n);if(t(s))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:s}}}}function M8e(t){return e=>G5(t)(e.$from)}function T8e(t,e){if(!(t instanceof Ot))return;const{node:n,$from:s}=t;if($8e(e,n))return{node:n,pos:s.pos,start:s.start(s.depth),depth:s.depth}}const X5=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function P8e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const aB=(t,e,n)=>{let s=P8e(t,n);if(!s)return!1;let i=cB(s);if(!i){let r=s.blockRange(),a=r&&p2(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(dB(t,i,e,-1))return!0;if(s.parent.content.size==0&&(Gf(o,"end")||Ot.isSelectable(o)))for(let r=s.depth;;r--){let a=j5(t.doc,s.before(r),s.after(r),it.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Gf(o,"end")?zt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Ot.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(r==1||s.node(r-1).childCount>1)break}return o.isAtom&&i.depth==s.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function Gf(t,e,n=!1){for(let s=t;s;s=e=="start"?s.firstChild:s.lastChild){if(s.isTextblock)return!0;if(n&&s.childCount!=1)return!1}return!1}const lB=(t,e,n)=>{let{$head:s,empty:i}=t.selection,o=s;if(!i)return!1;if(s.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):s.parentOffset>0)return!1;o=cB(s)}let r=o&&o.nodeBefore;return!r||!Ot.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Ot.create(t.doc,o.pos-r.nodeSize)).scrollIntoView()),!0)};function cB(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function I8e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const L8e=(t,e,n)=>{let s=I8e(t,n);if(!s)return!1;let i=uB(s);if(!i)return!1;let o=i.nodeAfter;if(dB(t,i,e,1))return!0;if(s.parent.content.size==0&&(Gf(o,"start")||Ot.isSelectable(o))){let r=j5(t.doc,s.before(),s.after(),it.empty);if(r&&r.slice.size<r.to-r.from){if(e){let a=t.tr.step(r);a.setSelection(Gf(o,"start")?zt.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Ot.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==s.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},O8e=(t,e,n)=>{let{$head:s,empty:i}=t.selection,o=s;if(!i)return!1;if(s.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):s.parentOffset<s.parent.content.size)return!1;o=uB(s)}let r=o&&o.nodeAfter;return!r||!Ot.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Ot.create(t.doc,o.pos)).scrollIntoView()),!0)};function uB(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const D8e=(t,e)=>{let{$head:n,$anchor:s}=t.selection;return!n.parent.type.spec.code||!n.sameParent(s)?!1:(e&&e(t.tr.insertText(`
119 `).scrollIntoView()),!0)};function K5(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const R8e=(t,e)=>{let{$head:n,$anchor:s}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(s))return!1;let i=n.node(-1),o=n.indexAfter(-1),r=K5(i.contentMatchAt(o));if(!r||!i.canReplaceWith(o,o,r))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,r.createAndFill());l.setSelection(zt.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},V8e=(t,e)=>{let n=t.selection,{$from:s,$to:i}=n;if(n instanceof Oo||s.parent.inlineContent||i.parent.inlineContent)return!1;let o=K5(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let r=(!s.parentOffset&&i.index()<i.parent.childCount?s:i).pos,a=t.tr.insert(r,o.createAndFill());a.setSelection(It.create(a.doc,r+1)),e(a.scrollIntoView())}return!0},F8e=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(ag(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let s=n.blockRange(),i=s&&p2(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)};function N8e(t){return(e,n)=>{let{$from:s,$to:i}=e.selection;if(e.selection instanceof Ot&&e.selection.node.isBlock)return!s.parentOffset||!ag(e.doc,s.pos)?!1:(n&&n(e.tr.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,r=e.tr;(e.selection instanceof It||e.selection instanceof Oo)&&r.deleteSelection();let a=s.depth==0?null:K5(s.node(-1).contentMatchAt(s.indexAfter(-1))),l=t&&t(i.parent,o,s),c=l?[l]:o&&a?[{type:a}]:void 0,u=ag(r.doc,r.mapping.map(s.pos),1,c);if(!c&&!u&&ag(r.doc,r.mapping.map(s.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(r.split(r.mapping.map(s.pos),1,c),!o&&!s.parentOffset&&s.parent.type!=a)){let d=r.mapping.map(s.before()),h=r.doc.resolve(d);a&&s.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&r.setNodeMarkup(r.mapping.map(s.before()),a)}n(r.scrollIntoView())}return!0}}const B8e=N8e(),z8e=(t,e)=>(e&&e(t.tr.setSelection(new Oo(t.doc))),!0);function H8e(t,e,n){let s=e.nodeBefore,i=e.nodeAfter,o=e.index();return!s||!i||!s.type.compatibleContent(i.type)?!1:!s.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-s.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||m2(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,s.type,s.contentMatchAt(s.childCount)).join(e.pos).scrollIntoView()),!0)}function dB(t,e,n,s){let i=e.nodeBefore,o=e.nodeAfter,r,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&H8e(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(r=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(r[0]||o.type).validEnd){if(n){let f=e.pos+o.nodeSize,p=nt.empty;for(let _=r.length-1;_>=0;_--)p=nt.from(r[_].create(null,p));p=nt.from(i.copy(p));let m=t.tr.step(new $i(e.pos-1,f,e.pos,f,new it(p,1,0),r.length,!0)),b=f+2*r.length;m2(m.doc,b)&&m.join(b),n(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||s>0&&l?null:zt.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),h=d&&p2(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&Gf(o,"start",!0)&&Gf(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=o,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let _=nt.empty;for(let k=p.length-1;k>=0;k--)_=nt.from(p[k].copy(_));let x=t.tr.step(new $i(e.pos-p.length,e.pos+o.nodeSize,e.pos+b,e.pos+o.nodeSize-b,new it(_,p.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function hB(t){return function(e,n){let s=e.selection,i=t<0?s.$from:s.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(It.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const U8e=hB(-1),j8e=hB(1);function Z5(t,e=null){return function(n,s){let{$from:i,$to:o}=n.selection,r=i.blockRange(o),a=r&&U5(r,t,e);return a?(s&&s(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function o1(t,e=null){return function(n,s){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:r},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(r,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let u=n.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(s){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[r];o.setBlockType(a,l,t,e)}s(o.scrollIntoView())}return!0}}function W8e(t,e,n,s){for(let i=0;i<e.length;i++){let{$from:o,$to:r}=e[i],a=o.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(o.pos,r.pos,(l,c)=>{if(a||!s&&l.isAtom&&l.isInline&&c>=o.pos&&c+l.nodeSize<=r.pos)return!1;a=l.inlineContent&&l.type.allowsMarkType(n)}),a)return!0}return!1}function Y8e(t){let e=[];for(let n=0;n<t.length;n++){let{$from:s,$to:i}=t[n];s.doc.nodesBetween(s.pos,i.pos,(o,r)=>{if(o.isAtom&&o.content.size&&o.isInline&&r>=s.pos&&r+o.nodeSize<=i.pos)return r+1>s.pos&&e.push(new Nb(s,s.doc.resolve(r+1))),s=s.doc.resolve(r+1+o.content.size),!1}),s.pos<i.pos&&e.push(new Nb(s,i))}return e}function _2(t,e=null,n){let s=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1;return function(o,r){let{empty:a,$cursor:l,ranges:c}=o.selection;if(a&&!l||!W8e(o.doc,c,t,i))return!1;if(r)if(l)t.isInSet(o.storedMarks||l.marks())?r(o.tr.removeStoredMark(t)):r(o.tr.addStoredMark(t.create(e)));else{let u,d=o.tr;i||(c=Y8e(c)),s?u=!c.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,t)):u=!c.every(h=>{let f=!1;return d.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m,b)=>{if(f)return!1;f=!t.isInSet(p.marks)&&!!b&&b.type.allowsMarkType(t)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,h.$from.pos-m),Math.min(p.nodeSize,h.$to.pos-m))))}),!f});for(let h=0;h<c.length;h++){let{$from:f,$to:p}=c[h];if(!u)d.removeMark(f.pos,p.pos,t);else{let m=f.pos,b=p.pos,_=f.nodeAfter,x=p.nodeBefore,k=_&&_.isText?/^\s*/.exec(_.text)[0].length:0,C=x&&x.isText?/\s*$/.exec(x.text)[0].length:0;m+k<b&&(m+=k,b-=C),d.addMark(m,b,t.create(e))}}r(d.scrollIntoView())}return!0}}function w2(...t){return function(e,n,s){for(let i=0;i<t.length;i++)if(t[i](e,n,s))return!0;return!1}}let c3=w2(X5,aB,lB),jE=w2(X5,L8e,O8e);const Za={Enter:w2(D8e,V8e,F8e,B8e),"Mod-Enter":R8e,Backspace:c3,"Mod-Backspace":c3,"Shift-Backspace":c3,Delete:jE,"Mod-Delete":jE,"Mod-a":z8e},fB={"Ctrl-h":Za.Backspace,"Alt-Backspace":Za["Mod-Backspace"],"Ctrl-d":Za.Delete,"Ctrl-Alt-Backspace":Za["Mod-Delete"],"Alt-Delete":Za["Mod-Delete"],"Alt-d":Za["Mod-Delete"],"Ctrl-a":U8e,"Ctrl-e":j8e};for(let t in Za)fB[t]=Za[t];const q8e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,G8e=q8e?fB:Za;var Nc={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Bb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},X8e=typeof navigator<"u"&&/Mac/.test(navigator.platform),K8e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Qs=0;Qs<10;Qs++)Nc[48+Qs]=Nc[96+Qs]=String(Qs);for(var Qs=1;Qs<=24;Qs++)Nc[Qs+111]="F"+Qs;for(var Qs=65;Qs<=90;Qs++)Nc[Qs]=String.fromCharCode(Qs+32),Bb[Qs]=String.fromCharCode(Qs);for(var u3 in Nc)Bb.hasOwnProperty(u3)||(Bb[u3]=Nc[u3]);function Z8e(t){var e=X8e&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||K8e&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Bb:Nc)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const J8e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Q8e(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let s,i,o,r;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))s=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))J8e?r=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return s&&(n="Alt-"+n),i&&(n="Ctrl-"+n),r&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function eSe(t){let e=Object.create(null);for(let n in t)e[Q8e(n)]=t[n];return e}function d3(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function pB(t){return new rs({props:{handleKeyDown:mB(t)}})}function mB(t){let e=eSe(t);return function(n,s){let i=Z8e(s),o,r=e[d3(i,s)];if(r&&r(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(s.shiftKey){let a=e[d3(i,s,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((s.shiftKey||s.altKey||s.metaKey||i.charCodeAt(0)>127)&&(o=Nc[s.keyCode])&&o!=i){let a=e[d3(o,s)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const ei=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},r1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let t6=null;const Xa=function(t,e,n){let s=t6||(t6=document.createRange());return s.setEnd(t,n??t.nodeValue.length),s.setStart(t,e||0),s},tSe=function(){t6=null},gd=function(t,e,n,s){return n&&(WE(t,e,n,s,-1)||WE(t,e,n,s,1))},nSe=/^(img|br|input|textarea|hr)$/i;function WE(t,e,n,s,i){for(;;){if(t==n&&e==s)return!0;if(e==(i<0?0:sr(t))){let o=t.parentNode;if(!o||o.nodeType!=1||ev(t)||nSe.test(t.nodeName)||t.contentEditable=="false")return!1;e=ei(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?sr(t):0}else return!1}}function sr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function sSe(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=sr(t)}else if(t.parentNode&&!ev(t))e=ei(t),t=t.parentNode;else return null}}function iSe(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ev(t))e=ei(t)+1,t=t.parentNode;else return null}}function oSe(t,e,n){for(let s=e==0,i=e==sr(t);s||i;){if(t==n)return!0;let o=ei(t);if(t=t.parentNode,!t)return!1;s=s&&o==0,i=i&&o==sr(t)}}function ev(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const x2=function(t){return t.focusNode&&gd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Su(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function rSe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function aSe(t,e,n){if(t.caretPositionFromPoint)try{let s=t.caretPositionFromPoint(e,n);if(s)return{node:s.offsetNode,offset:Math.min(sr(s.offsetNode),s.offset)}}catch{}if(t.caretRangeFromPoint){let s=t.caretRangeFromPoint(e,n);if(s)return{node:s.startContainer,offset:Math.min(sr(s.startContainer),s.startOffset)}}}const Aa=typeof navigator<"u"?navigator:null,YE=typeof document<"u"?document:null,Qc=Aa&&Aa.userAgent||"",n6=/Edge\/(\d+)/.exec(Qc),gB=/MSIE \d/.exec(Qc),s6=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qc),ho=!!(gB||s6||n6),$c=gB?document.documentMode:s6?+s6[1]:n6?+n6[1]:0,Yr=!ho&&/gecko\/(\d+)/i.test(Qc);Yr&&+(/Firefox\/(\d+)/.exec(Qc)||[0,0])[1];const i6=!ho&&/Chrome\/(\d+)/.exec(Qc),Ci=!!i6,vB=i6?+i6[1]:0,Wi=!ho&&!!Aa&&/Apple Computer/.test(Aa.vendor),Xf=Wi&&(/Mobile\/\w+/.test(Qc)||!!Aa&&Aa.maxTouchPoints>2),Jo=Xf||(Aa?/Mac/.test(Aa.platform):!1),lSe=Aa?/Win/.test(Aa.platform):!1,Sr=/Android \d/.test(Qc),tv=!!YE&&"webkitFontSmoothing"in YE.documentElement.style,cSe=tv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function uSe(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ja(t,e){return typeof t=="number"?t:t[e]}function dSe(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,s=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*s}}function qE(t,e,n){let s=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let r=n||t.dom;r;r=r1(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?uSe(o):dSe(a),u=0,d=0;if(e.top<c.top+ja(s,"top")?d=-(c.top-e.top+ja(i,"top")):e.bottom>c.bottom-ja(s,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+ja(i,"top")-c.top:e.bottom-c.bottom+ja(i,"bottom")),e.left<c.left+ja(s,"left")?u=-(c.left-e.left+ja(i,"left")):e.right>c.right-ja(s,"right")&&(u=e.right-c.right+ja(i,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(r).position))break}}function hSe(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),s,i;for(let o=(e.left+e.right)/2,r=n+1;r<Math.min(innerHeight,e.bottom);r+=5){let a=t.root.elementFromPoint(o,r);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){s=a,i=l.top;break}}return{refDOM:s,refTop:i,stack:yB(t.dom)}}function yB(t){let e=[],n=t.ownerDocument;for(let s=t;s&&(e.push({dom:s,top:s.scrollTop,left:s.scrollLeft}),t!=n);s=r1(s));return e}function fSe({refDOM:t,refTop:e,stack:n}){let s=t?t.getBoundingClientRect().top:0;bB(n,s==0?0:s-e)}function bB(t,e){for(let n=0;n<t.length;n++){let{dom:s,top:i,left:o}=t[n];s.scrollTop!=i+e&&(s.scrollTop=i+e),s.scrollLeft!=o&&(s.scrollLeft=o)}}let rh=null;function pSe(t){if(t.setActive)return t.setActive();if(rh)return t.focus(rh);let e=yB(t);t.focus(rh==null?{get preventScroll(){return rh={preventScroll:!0},!0}}:void 0),rh||(rh=!1,bB(e,0))}function _B(t,e){let n,s=2e8,i,o=0,r=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=Xa(u).getClientRects();else continue;for(let f=0;f<h.length;f++){let p=h[f];if(p.top<=r&&p.bottom>=a){r=Math.max(p.bottom,r),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<s){n=u,s=m,i=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!n&&l&&(n=l,i=c,s=0),n&&n.nodeType==3?mSe(n,i):!n||s&&n.nodeType==1?{node:t,offset:o}:_B(n,i)}function mSe(t,e){let n=t.nodeValue.length,s=document.createRange();for(let i=0;i<n;i++){s.setEnd(t,i+1),s.setStart(t,i);let o=Gl(s,1);if(o.top!=o.bottom&&J5(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function J5(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function gSe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function vSe(t,e,n){let{node:s,offset:i}=_B(e,n),o=-1;if(s.nodeType==1&&!s.firstChild){let r=s.getBoundingClientRect();o=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(s,i,o)}function ySe(t,e,n,s){let i=-1;for(let o=e,r=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!r&&l.left>s.left||l.top>s.top?i=a.posBefore:(!r&&l.right<s.left||l.bottom<s.top)&&(i=a.posAfter),r=!0),!a.contentDOM&&i<0&&!a.node.isText)return(a.node.isBlock?s.top<(l.top+l.bottom)/2:s.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function wB(t,e,n){let s=t.childNodes.length;if(s&&n.top<n.bottom)for(let i=Math.max(0,Math.min(s-1,Math.floor(s*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let r=t.childNodes[o];if(r.nodeType==1){let a=r.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(J5(e,c))return wB(r,e,c)}}if((o=(o+1)%s)==i)break}return t}function bSe(t,e){let n=t.dom.ownerDocument,s,i=0,o=aSe(n,e.left,e.top);o&&({node:s,offset:i}=o);let r=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!r||!t.dom.contains(r.nodeType!=1?r.parentNode:r)){let c=t.dom.getBoundingClientRect();if(!J5(e,c)||(r=wB(t.dom,e,c),!r))return null}if(Wi)for(let c=r;s&&c;c=r1(c))c.draggable&&(s=void 0);if(r=gSe(r,e),s){if(Yr&&s.nodeType==1&&(i=Math.min(i,s.childNodes.length),i<s.childNodes.length)){let u=s.childNodes[i],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let c;tv&&i&&s.nodeType==1&&(c=s.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,s==t.dom&&i==s.childNodes.length-1&&s.lastChild.nodeType==1&&e.top>s.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||s.nodeType!=1||s.childNodes[i-1].nodeName!="BR")&&(a=ySe(t,s,i,e))}a==null&&(a=vSe(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function GE(t){return t.top<t.bottom||t.left<t.right}function Gl(t,e){let n=t.getClientRects();if(n.length){let s=n[e<0?0:n.length-1];if(GE(s))return s}return Array.prototype.find.call(n,GE)||t.getBoundingClientRect()}const _Se=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function xB(t,e,n){let{node:s,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=tv||Yr;if(s.nodeType==3)if(r&&(_Se.test(s.nodeValue)||(n<0?!i:i==s.nodeValue.length))){let l=Gl(Xa(s,i,i),n);if(Yr&&i&&/\s/.test(s.nodeValue[i-1])&&i<s.nodeValue.length){let c=Gl(Xa(s,i-1,i-1),-1);if(c.top==l.top){let u=Gl(Xa(s,i,i+1),-1);if(u.top!=l.top)return Kp(u,u.left<c.left)}}return l}else{let l=i,c=i,u=n<0?1:-1;return n<0&&!i?(c++,u=-1):n>=0&&i==s.nodeValue.length?(l--,u=1):n<0?l--:c++,Kp(Gl(Xa(s,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==sr(s))){let l=s.childNodes[i-1];if(l.nodeType==1)return h3(l.getBoundingClientRect(),!1)}if(o==null&&i<sr(s)){let l=s.childNodes[i];if(l.nodeType==1)return h3(l.getBoundingClientRect(),!0)}return h3(s.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==sr(s))){let l=s.childNodes[i-1],c=l.nodeType==3?Xa(l,sr(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Kp(Gl(c,1),!1)}if(o==null&&i<sr(s)){let l=s.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Xa(l,0,r?0:1):l.nodeType==1?l:null:null;if(c)return Kp(Gl(c,-1),!0)}return Kp(Gl(s.nodeType==3?Xa(s):s,-n),n>=0)}function Kp(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function h3(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function kB(t,e,n){let s=t.state,i=t.root.activeElement;s!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{s!=e&&t.updateState(s),i!=t.dom&&i&&i.focus()}}function wSe(t,e,n){let s=e.selection,i=n=="up"?s.$from:s.$to;return kB(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let r=xB(t,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Xa(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?r.top-u.top>(u.bottom-r.top)*2:u.bottom-r.bottom>(r.bottom-u.top)*2))return!1}}return!0})}const xSe=/[\u0590-\u08ac]/;function kSe(t,e,n){let{$head:s}=e.selection;if(!s.parent.isTextblock)return!1;let i=s.parentOffset,o=!i,r=i==s.parent.content.size,a=t.domSelection();return a?!xSe.test(s.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:kB(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let f=s.depth?t.docView.domAfterPos(s.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),b=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):s.pos==s.start()||s.pos==s.end()}let XE=null,KE=null,ZE=!1;function CSe(t,e,n){return XE==e&&KE==n?ZE:(XE=e,KE=n,ZE=n=="up"||n=="down"?wSe(t,e,n):kSe(t,e,n))}const dr=0,JE=1,Lu=2,Ea=3;class nv{constructor(e,n,s,i){this.parent=e,this.children=n,this.dom=s,this.contentDOM=i,this.dirty=dr,s.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,s){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,s=this.posAtStart;;n++){let i=this.children[n];if(i==e)return s;s+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,s){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(s<0){let o,r;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(r)+r.size:this.posAtStart}else{let o,r;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(r):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>ei(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??s>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let s=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),r;if(o&&(!n||o.node))if(s&&(r=o.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))s=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let s=n;s;s=s.parent)if(s==this)return n}posFromDOM(e,n,s){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,s)}return-1}descAt(e){for(let n=0,s=0;n<this.children.length;n++){let i=this.children[n],o=s+i.size;if(s==e&&o!=s){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-s-i.border);s=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let s=0,i=0;for(let o=0;s<this.children.length;s++){let r=this.children[s],a=o+r.size;if(a>e||r instanceof SB){i=e-o;break}o=a}if(i)return this.children[s].domFromPos(i-this.children[s].border,n);for(let o;s&&!(o=this.children[s-1]).size&&o instanceof CB&&o.side>=0;s--);if(n<=0){let o,r=!0;for(;o=s?this.children[s-1]:null,!(!o||o.dom.parentNode==this.contentDOM);s--,r=!1);return o&&n&&r&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?ei(o.dom)+1:0}}else{let o,r=!0;for(;o=s<this.children.length?this.children[s]:null,!(!o||o.dom.parentNode==this.contentDOM);s++,r=!1);return o&&r&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?ei(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,s=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let r=s,a=0;;a++){let l=this.children[a],c=r+l.size;if(i==-1&&e<=c){let u=r+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=r;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=ei(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=ei(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}r=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:s}=this.domFromPos(e,0);if(n.nodeType!=1||s==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[s]}setSelection(e,n,s,i=!1){let o=Math.min(e,n),r=Math.max(e,n);for(let h=0,f=0;h<this.children.length;h++){let p=this.children[h],m=f+p.size;if(o>f&&r<m)return p.setSelection(e-f-p.border,n-f-p.border,s,i);f=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=s.getSelection(),u=!1;if((Yr||Wi)&&e==n){let{node:h,offset:f}=a;if(h.nodeType==3){if(u=!!(f&&h.nodeValue[f-1]==`
120 `),u&&f==h.nodeValue.length)for(let p=h,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:ei(m)+1});break}let b=p.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let p=h.childNodes[f-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Yr&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||u&&Wi)&&gd(a.node,a.offset,c.anchorNode,c.anchorOffset)&&gd(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==n)&&!u){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>n){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let s=0,i=0;i<this.children.length;i++){let o=this.children[i],r=s+o.size;if(s==r?e<=r&&n>=s:e<r&&n>s){let a=s+o.border,l=r-o.border;if(e>=a&&n<=l){this.dirty=e==s||n==r?Lu:JE,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ea:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Lu:Ea}s=r}this.dirty=Lu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let s=e==1?Lu:JE;n.dirty<s&&(n.dirty=s)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class CB extends nv{constructor(e,n,s,i){let o,r=n.type.toDOM;if(typeof r=="function"&&(r=r(s,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(r.nodeType!=1){let a=document.createElement("span");a.appendChild(r),r=a}r.contentEditable="false",r.classList.add("ProseMirror-widget")}super(e,[],r,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==dr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class SSe extends nv{constructor(e,n,s,i){super(e,[],n,null),this.textDOM=s,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class vd extends nv{constructor(e,n,s,i){super(e,[],s,i),this.mark=n}static create(e,n,s,i){let o=i.nodeViews[n.type.name],r=o&&o(n,i,s);return(!r||!r.dom)&&(r=Kc.renderSpec(document,n.type.spec.toDOM(n,s),null,n.attrs)),new vd(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Ea||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ea&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=dr){let s=this.parent;for(;!s.node;)s=s.parent;s.dirty<this.dirty&&(s.dirty=this.dirty),this.dirty=dr}}slice(e,n,s){let i=vd.create(this.parent,this.mark,!0,s),o=this.children,r=this.size;n<r&&(o=a6(o,n,r,s)),e>0&&(o=a6(o,0,e,s));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class Ac extends nv{constructor(e,n,s,i,o,r,a,l,c){super(e,[],o,r),this.node=n,this.outerDeco=s,this.innerDeco=i,this.nodeDOM=a}static create(e,n,s,i,o,r){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return r;if(l.parent)return l.parent.posBeforeChild(l)},s,i),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Kc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=EB(u,s,n),c?l=new $Se(e,n,s,i,u,d||null,h,c,o,r+1):n.isText?new k2(e,n,s,i,u,h,o):new Ac(e,n,s,i,u,d||null,h,o,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let s=this.children[n];if(this.dom.contains(s.dom.parentNode)){e.contentElement=s.dom.parentNode;break}}e.contentElement||(e.getContent=()=>nt.empty)}return e}matchesNode(e,n,s){return this.dirty==dr&&e.eq(this.node)&&r6(n,this.outerDeco)&&s.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let s=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,r=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new ESe(this,r&&r.node,e);PSe(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,s,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?An.none:this.node.child(u).marks,s,e),l.placeWidget(c,e,i)},(c,u,d,h)=>{l.syncToMarks(c.marks,s,e);let f;l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,i)||l.addNode(c,u,d,e,i),i+=c.nodeSize}),l.syncToMarks([],s,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Lu)&&(r&&this.protectLocalComposition(e,r),$B(this.contentDOM,this.children,e),Xf&&ISe(this.dom))}localCompositionInfo(e,n){let{from:s,to:i}=e.state.selection;if(!(e.state.selection instanceof It)||s<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let r=o.nodeValue,a=LSe(this.node.content,r,s-n,i-n);return a<0?null:{node:o,pos:a,text:r}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:s,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let r=new SSe(this,o,n,i);e.input.compositionNodes.push(r),this.children=a6(this.children,s,s+i.length,e,r)}update(e,n,s,i){return this.dirty==Ea||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,s,i),!0)}updateInner(e,n,s,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=s,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=dr}updateOuterDeco(e){if(r6(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,s=this.dom;this.dom=AB(this.dom,this.nodeDOM,o6(this.outerDeco,this.node,n),o6(e,this.node,n)),this.dom!=s&&(s.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function QE(t,e,n,s,i){EB(s,e,t);let o=new Ac(void 0,t,e,n,s,s,s,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class k2 extends Ac{constructor(e,n,s,i,o,r,a){super(e,n,s,i,o,null,r,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,s,i){return this.dirty==Ea||this.dirty!=dr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=dr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=dr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,s){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,s)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,s){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new k2(this.parent,i,this.outerDeco,this.innerDeco,o,o,s)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ea)}get domAtom(){return!1}isText(e){return this.node.text==e}}class SB extends nv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==dr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class $Se extends Ac{constructor(e,n,s,i,o,r,a,l,c,u){super(e,n,s,i,o,r,a,c,u),this.spec=l}update(e,n,s,i){if(this.dirty==Ea)return!1;if(this.spec.update){let o=this.spec.update(e,n,s);return o&&this.updateInner(e,n,s,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,s,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,s,i){this.spec.setSelection?this.spec.setSelection(e,n,s):super.setSelection(e,n,s,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function $B(t,e,n){let s=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let r=e[o],a=r.dom;if(a.parentNode==t){for(;a!=s;)s=eM(s),i=!0;s=s.nextSibling}else i=!0,t.insertBefore(a,s);if(r instanceof vd){let l=s?s.previousSibling:t.lastChild;$B(r.contentDOM,r.children,n),s=l?l.nextSibling:t.firstChild}}for(;s;)s=eM(s),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const lg=function(t){t&&(this.nodeName=t)};lg.prototype=Object.create(null);const Ou=[new lg];function o6(t,e,n){if(t.length==0)return Ou;let s=n?Ou[0]:new lg,i=[s];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&i.push(s=new lg(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&i.length==1&&i.push(s=new lg(e.isInline?"span":"div")),a=="class"?s.class=(s.class?s.class+" ":"")+l:a=="style"?s.style=(s.style?s.style+";":"")+l:a!="nodeName"&&(s[a]=l))}}}return i}function AB(t,e,n,s){if(n==Ou&&s==Ou)return e;let i=e;for(let o=0;o<s.length;o++){let r=s[o],a=n[o];if(o){let l;a&&a.nodeName==r.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==r.nodeName||(l=document.createElement(r.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Ou[0]),i=l}ASe(i,a||Ou[0],r)}return i}function ASe(t,e,n){for(let s in e)s!="class"&&s!="style"&&s!="nodeName"&&!(s in n)&&t.removeAttribute(s);for(let s in n)s!="class"&&s!="style"&&s!="nodeName"&&n[s]!=e[s]&&t.setAttribute(s,n[s]);if(e.class!=n.class){let s=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<s.length;o++)i.indexOf(s[o])==-1&&t.classList.remove(s[o]);for(let o=0;o<i.length;o++)s.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let s=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=s.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function EB(t,e,n){return AB(t,t,Ou,o6(e,n,t.nodeType!=1))}function r6(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function eM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ESe{constructor(e,n,s){this.lock=n,this.view=s,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=MSe(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let s=e;s<n;s++)this.top.children[s].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,s){let i=0,o=this.stack.length>>1,r=Math.min(o,e.length);for(;i<r&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=dr,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=vd.create(this.top,e[o],n,s);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,s,i){let o=-1,r;if(i>=this.preMatch.index&&(r=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,s))o=this.top.children.indexOf(r,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,s)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,s,i,o){let r=this.top.children[i];return r.dirty==Ea&&r.dom==r.contentDOM&&(r.dirty=Lu),r.update(e,n,s,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let s=e.pmViewDesc;if(s){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==s)return i}return-1}e=n}}updateNextNode(e,n,s,i,o,r){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Ac){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u=l.dom,d,h=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ea&&r6(n,l.outerDeco));if(!h&&l.update(e,n,s,i))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(d=this.recreateWrapper(l,e,n,s,i,r)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Lu,d.updateChildren(i,r+1),d.dirty=dr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,s,i,o,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=Ac.create(this.top,n,s,i,o,r);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,s,i,o){let r=Ac.create(this.top,e,n,s,i,o);r.contentDOM&&r.updateChildren(i,o+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,s){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new CB(this.top,e,n,s);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof vd;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof k2)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Wi||Ci)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let s=document.createElement(e);e=="IMG"&&(s.className="ProseMirror-separator",s.alt=""),e=="BR"&&(s.className="ProseMirror-trailingBreak");let i=new SB(this.top,[],s,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function MSe(t,e){let n=e,s=n.children.length,i=t.childCount,o=new Map,r=[];e:for(;i>0;){let a;for(;;)if(s){let c=n.children[s-1];if(c instanceof vd)n=c,s=c.children.length;else{a=c,s--;break}}else{if(n==e)break e;s=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),r.push(a)}}return{index:i,matched:o,matches:r.reverse()}}function TSe(t,e){return t.type.side-e.type.side}function PSe(t,e,n,s){let i=e.locals(t),o=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);s(u,i,e.forChild(o,u),c),o+=u.nodeSize}return}let r=0,a=[],l=null;for(let c=0;;){let u,d;for(;r<i.length&&i[r].to==o;){let b=i[r++];b.widget&&(u?(d||(d=[u])).push(b):u=b)}if(u)if(d){d.sort(TSe);for(let b=0;b<d.length;b++)n(d[b],c,!!l)}else n(u,c,!!l);let h,f;if(l)f=-1,h=l,l=null;else if(c<t.childCount)f=c,h=t.child(c++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;r<i.length&&i[r].from<=o&&i[r].to>o;)a.push(i[r++]);let p=o+h.nodeSize;if(h.isText){let b=p;r<i.length&&i[r].from<b&&(b=i[r].from);for(let _=0;_<a.length;_++)a[_].to<b&&(b=a[_].to);b<p&&(l=h.cut(b-o),h=h.cut(0,b-o),p=b,f=-1)}else for(;r<i.length&&i[r].to<p;)r++;let m=h.isInline&&!h.isLeaf?a.filter(b=>!b.inline):a.slice();s(h,m,e.forChild(o,h),f),o=p}}function ISe(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function LSe(t,e,n,s){for(let i=0,o=0;i<t.childCount&&o<=s;){let r=t.child(i++),a=o;if(o+=r.nodeSize,!r.isText)continue;let l=r.text;for(;i<t.childCount;){let c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=s&&l.slice(s-e.length-a,s-a)==e)return s-e.length;let c=a<s?l.lastIndexOf(e,s-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==s&&l.length>=s+e.length-a&&l.slice(s-a,s-a+e.length)==e)return s}}return-1}function a6(t,e,n,s,i){let o=[];for(let r=0,a=0;r<t.length;r++){let l=t[r],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,s)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,s)))}return o}function Q5(t,e=null){let n=t.domSelectionRange(),s=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let a=s.resolve(r),l,c;if(x2(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&Ot.isSelectable(u)&&i.parent&&!(u.isInline&&oSe(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new Ot(r==d?a:s.resolve(d))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=s.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=e8(t,l,a,u)}return c}function MB(t){return t.editable?t.hasFocus():PB(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function hl(t,e=!1){let n=t.state.selection;if(TB(t,n),!!MB(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Ci){let s=t.domSelectionRange(),i=t.domObserver.currentSelection;if(s.anchorNode&&i.anchorNode&&gd(s.anchorNode,s.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)DSe(t);else{let{anchor:s,head:i}=n,o,r;tM&&!(n instanceof It)&&(n.$from.parent.inlineContent||(o=nM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=nM(t,n.to))),t.docView.setSelection(s,i,t.root,e),tM&&(o&&sM(o),r&&sM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&OSe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const tM=Wi||Ci&&vB<63;function nM(t,e){let{node:n,offset:s}=t.docView.domFromPos(e,0),i=s<n.childNodes.length?n.childNodes[s]:null,o=s?n.childNodes[s-1]:null;if(Wi&&i&&i.contentEditable=="false")return f3(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return f3(i);if(o)return f3(o)}}function f3(t){return t.contentEditable="true",Wi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function sM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function OSe(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),s=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=s||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!MB(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function DSe(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let s=t.cursorWrapper.dom,i=s.nodeName=="IMG";i?n.setStart(s.parentNode,ei(s)+1):n.setStart(s,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&ho&&$c<=11&&(s.disabled=!0,s.disabled=!1)}function TB(t,e){if(e instanceof Ot){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(iM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else iM(t)}function iM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function e8(t,e,n,s){return t.someProp("createSelectionBetween",i=>i(t,e,n))||It.between(e,n,s)}function oM(t){return t.editable&&!t.hasFocus()?!1:PB(t)}function PB(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function RSe(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return gd(e.node,e.offset,n.anchorNode,n.anchorOffset)}function l6(t,e){let{$anchor:n,$head:s}=t.selection,i=e>0?n.max(s):n.min(s),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&zt.findFrom(o,e)}function rc(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function rM(t,e,n){let s=t.state.selection;if(s instanceof It)if(n.indexOf("s")>-1){let{$head:i}=s,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return rc(t,new It(s.$anchor,r))}else if(s.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=l6(t.state,e);return i&&i instanceof Ot?rc(t,i):!1}else if(!(Jo&&n.indexOf("m")>-1)){let i=s.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,r;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(r=t.docView.descAt(a))&&!r.contentDOM?Ot.isSelectable(o)?rc(t,new Ot(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):tv?rc(t,new It(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(s instanceof Ot&&s.node.isInline)return rc(t,new It(e>0?s.$to:s.$from));{let i=l6(t.state,e);return i?rc(t,i):!1}}}function zb(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function cg(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ah(t,e){return e<0?VSe(t):FSe(t)}function VSe(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i,o,r=!1;for(Yr&&n.nodeType==1&&s<zb(n)&&cg(n.childNodes[s],-1)&&(r=!0);;)if(s>0){if(n.nodeType!=1)break;{let a=n.childNodes[s-1];if(cg(a,-1))i=n,o=--s;else if(a.nodeType==3)n=a,s=n.nodeValue.length;else break}}else{if(IB(n))break;{let a=n.previousSibling;for(;a&&cg(a,-1);)i=n.parentNode,o=ei(a),a=a.previousSibling;if(a)n=a,s=zb(n);else{if(n=n.parentNode,n==t.dom)break;s=0}}}r?c6(t,n,s):i&&c6(t,i,o)}function FSe(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i=zb(n),o,r;for(;;)if(s<i){if(n.nodeType!=1)break;let a=n.childNodes[s];if(cg(a,1))o=n,r=++s;else break}else{if(IB(n))break;{let a=n.nextSibling;for(;a&&cg(a,1);)o=a.parentNode,r=ei(a)+1,a=a.nextSibling;if(a)n=a,s=0,i=zb(n);else{if(n=n.parentNode,n==t.dom)break;s=i=0}}}o&&c6(t,o,r)}function IB(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function NSe(t,e){for(;t&&e==t.childNodes.length&&!ev(t);)e=ei(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function BSe(t,e){for(;t&&!e&&!ev(t);)e=ei(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function c6(t,e,n){if(e.nodeType!=3){let o,r;(r=NSe(e,n))?(e=r,n=0):(o=BSe(e,n))&&(e=o,n=o.nodeValue.length)}let s=t.domSelection();if(!s)return;if(x2(s)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),s.removeAllRanges(),s.addRange(o)}else s.extend&&s.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&hl(t)},50)}function aM(t,e){let n=t.state.doc.resolve(e);if(!(Ci||lSe)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),r=(o.top+o.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),r=(o.top+o.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function lM(t,e,n){let s=t.state.selection;if(s instanceof It&&!s.empty||n.indexOf("s")>-1||Jo&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=s;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=l6(t.state,e);if(r&&r instanceof Ot)return rc(t,r)}if(!i.parent.inlineContent){let r=e<0?i:o,a=s instanceof Oo?zt.near(r,e):zt.findFrom(r,e);return a?rc(t,a):!1}return!1}function cM(t,e){if(!(t.state.selection instanceof It))return!0;let{$head:n,$anchor:s,empty:i}=t.state.selection;if(!n.sameParent(s))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=t.state.tr;return e<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),t.dispatch(r),!0}return!1}function uM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function zSe(t){if(!Wi||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let s=e.firstChild;uM(t,s,"true"),setTimeout(()=>uM(t,s,"false"),20)}return!1}function HSe(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function USe(t,e){let n=e.keyCode,s=HSe(e);if(n==8||Jo&&n==72&&s=="c")return cM(t,-1)||ah(t,-1);if(n==46&&!e.shiftKey||Jo&&n==68&&s=="c")return cM(t,1)||ah(t,1);if(n==13||n==27)return!0;if(n==37||Jo&&n==66&&s=="c"){let i=n==37?aM(t,t.state.selection.from)=="ltr"?-1:1:-1;return rM(t,i,s)||ah(t,i)}else if(n==39||Jo&&n==70&&s=="c"){let i=n==39?aM(t,t.state.selection.from)=="ltr"?1:-1:1;return rM(t,i,s)||ah(t,i)}else{if(n==38||Jo&&n==80&&s=="c")return lM(t,-1,s)||ah(t,-1);if(n==40||Jo&&n==78&&s=="c")return zSe(t)||lM(t,1,s)||ah(t,1);if(s==(Jo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function LB(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:s,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&s.childCount==1&&s.firstChild.childCount==1;){i--,o--;let f=s.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),s=f.content}let r=t.someProp("clipboardSerializer")||Kc.fromSchema(t.state.schema),a=NB(),l=a.createElement("div");l.appendChild(r.serializeFragment(s,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=FB[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
121
122 `);return{dom:l,text:h,slice:e}}function OB(t,e,n,s,i){let o=i.parent.type.spec.code,r,a;if(!n&&!e)return null;let l=e&&(s||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||s,t)}),o)return e?new it(nt.from(t.state.schema.text(e.replace(/\r\n?/g,`
123 `))),0,0):it.empty;let d=t.someProp("clipboardTextParser",h=>h(e,i,s,t));if(d)a=d;else{let h=i.marks(),{schema:f}=t.state,p=Kc.fromSchema(f);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=r.appendChild(document.createElement("p"));m&&b.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),r=qSe(n),tv&&GSe(r);let c=r&&r.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let h=r.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;r=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||c2.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!jSe.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=XSe(dM(a,+u[1],+u[2]),u[4]);else if(a=it.maxOpen(WSe(a.content,i),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d<a.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=a.content.lastChild;h<a.openEnd&&!f.type.spec.isolating;h++,f=f.lastChild);a=dM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const jSe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function WSe(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,r=[];if(t.forEach(a=>{if(!r)return;let l=i.findWrapping(a.type),c;if(!l)return r=null;if(c=r.length&&o.length&&RB(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=VB(r[r.length-1],o.length));let u=DB(a,l);r.push(u),i=i.matchType(u.type),o=l}}),r)return nt.from(r)}return t}function DB(t,e,n=0){for(let s=e.length-1;s>=n;s--)t=e[s].create(null,nt.from(t));return t}function RB(t,e,n,s,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=RB(t,e,n,s.lastChild,i+1);if(o)return s.copy(s.content.replaceChild(s.childCount-1,o));if(s.contentMatchAt(s.childCount).matchType(i==t.length-1?n.type:t[i+1]))return s.copy(s.content.append(nt.from(DB(n,t,i+1))))}}function VB(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,VB(t.lastChild,e-1)),s=t.contentMatchAt(t.childCount).fillBefore(nt.empty,!0);return t.copy(n.append(s))}function u6(t,e,n,s,i,o){let r=e<0?t.firstChild:t.lastChild,a=r.content;return t.childCount>1&&(o=0),i<s-1&&(a=u6(a,e,n,s,i+1,o)),i>=n&&(a=e<0?r.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(r.contentMatchAt(r.childCount).fillBefore(nt.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function dM(t,e,n){return e<t.openStart&&(t=new it(u6(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new it(u6(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const FB={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let hM=null;function NB(){return hM||(hM=document.implementation.createHTMLDocument("title"))}function YSe(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function qSe(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=NB().createElement("div"),s=/<([a-z][^>\s]+)/i.exec(t),i;if((i=s&&FB[s[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=YSe(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function GSe(t){let e=t.querySelectorAll(Ci?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let s=e[n];s.childNodes.length==1&&s.textContent==" "&&s.parentNode&&s.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),s)}}function XSe(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,s;try{s=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:r}=t;for(let a=s.length-2;a>=0;a-=2){let l=n.nodes[s[a]];if(!l||l.hasRequiredAttrs())break;i=nt.from(l.create(s[a+1],i)),o++,r++}return new it(i,o,r)}const Yi={},qi={},KSe={touchstart:!0,touchmove:!0};class ZSe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function JSe(t){for(let e in Yi){let n=Yi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=s=>{e9e(t,s)&&!t8(t,s)&&(t.editable||!(s.type in qi))&&n(t,s)},KSe[e]?{passive:!0}:void 0)}Wi&&t.dom.addEventListener("input",()=>null),d6(t)}function _c(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function QSe(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function d6(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=s=>t8(t,s))})}function t8(t,e){return t.someProp("handleDOMEvents",n=>{let s=n[e.type];return s?s(t,e)||e.defaultPrevented:!1})}function e9e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function t9e(t,e){!t8(t,e)&&Yi[e.type]&&(t.editable||!(e.type in qi))&&Yi[e.type](t,e)}qi.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!zB(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Sr&&Ci&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),Xf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let s=Date.now();t.input.lastIOSEnter=s,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==s&&(t.someProp("handleKeyDown",i=>i(t,Su(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",s=>s(t,n))||USe(t,n)?n.preventDefault():_c(t,"key")};qi.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};qi.keypress=(t,e)=>{let n=e;if(zB(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Jo&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let s=t.state.selection;if(!(s instanceof It)||!s.$from.sameParent(s.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,s.$from.pos,s.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function C2(t){return{left:t.clientX,top:t.clientY}}function n9e(t,e){let n=e.x-t.clientX,s=e.y-t.clientY;return n*n+s*s<100}function n8(t,e,n,s,i){if(s==-1)return!1;let o=t.state.doc.resolve(s);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,a=>r>o.depth?a(t,n,o.nodeAfter,o.before(r),i,!0):a(t,n,o.node(r),o.before(r),i,!1)))return!0;return!1}function af(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let s=t.state.tr.setSelection(e);n=="pointer"&&s.setMeta("pointer",!0),t.dispatch(s)}function s9e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),s=n.nodeAfter;return s&&s.isAtom&&Ot.isSelectable(s)?(af(t,new Ot(n),"pointer"),!0):!1}function i9e(t,e){if(e==-1)return!1;let n=t.state.selection,s,i;n instanceof Ot&&(s=n.node);let o=t.state.doc.resolve(e);for(let r=o.depth+1;r>0;r--){let a=r>o.depth?o.nodeAfter:o.node(r);if(Ot.isSelectable(a)){s&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(r);break}}return i!=null?(af(t,Ot.create(t.state.doc,i),"pointer"),!0):!1}function o9e(t,e,n,s,i){return n8(t,"handleClickOn",e,n,s)||t.someProp("handleClick",o=>o(t,e,s))||(i?i9e(t,n):s9e(t,n))}function r9e(t,e,n,s){return n8(t,"handleDoubleClickOn",e,n,s)||t.someProp("handleDoubleClick",i=>i(t,e,s))}function a9e(t,e,n,s){return n8(t,"handleTripleClickOn",e,n,s)||t.someProp("handleTripleClick",i=>i(t,e,s))||l9e(t,n,s)}function l9e(t,e,n){if(n.button!=0)return!1;let s=t.state.doc;if(e==-1)return s.inlineContent?(af(t,It.create(s,0,s.content.size),"pointer"),!0):!1;let i=s.resolve(e);for(let o=i.depth+1;o>0;o--){let r=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(r.inlineContent)af(t,It.create(s,a+1,a+1+r.content.size),"pointer");else if(Ot.isSelectable(r))af(t,Ot.create(s,a),"pointer");else continue;return!0}}function s8(t){return Hb(t)}const BB=Jo?"metaKey":"ctrlKey";Yi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let s=s8(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&n9e(n,t.input.lastClick)&&!n[BB]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let r=t.posAtCoords(C2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new c9e(t,r,n,!!s)):(o=="doubleClick"?r9e:a9e)(t,r.pos,r.inside,n)?n.preventDefault():_c(t,"pointer"))};class c9e{constructor(e,n,s,i){this.view=e,this.pos=n,this.event=s,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!s[BB],this.allowDefault=s.shiftKey;let o,r;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),r=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,r=u.depth?u.before():0}const a=i?null:s.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(s.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Ot&&c.from<=r&&c.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Yr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),_c(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>hl(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(C2(e))),this.updateAllowDefault(e),this.allowDefault||!n?_c(this.view,"pointer"):o9e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Wi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ci&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(af(this.view,zt.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):_c(this.view,"pointer")}move(e){this.updateAllowDefault(e),_c(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Yi.touchstart=t=>{t.input.lastTouch=Date.now(),s8(t),_c(t,"pointer")};Yi.touchmove=t=>{t.input.lastTouch=Date.now(),_c(t,"pointer")};Yi.contextmenu=t=>s8(t);function zB(t,e){return t.composing?!0:Wi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const u9e=Sr?5e3:-1;qi.compositionstart=qi.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof It&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(s=>s.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Hb(t,!0),t.markCursor=null;else if(Hb(t,!e.selection.empty),Yr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let s=t.domSelectionRange();for(let i=s.focusNode,o=s.focusOffset;i&&i.nodeType==1&&o!=0;){let r=o<0?i.lastChild:i.childNodes[o-1];if(!r)break;if(r.nodeType==3){let a=t.domSelection();a&&a.collapse(r,r.nodeValue.length);break}else i=r,o=-1}}t.input.composing=!0}HB(t,u9e)};qi.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,HB(t,20))};function HB(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Hb(t),e))}function UB(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=h9e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function d9e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=sSe(e.focusNode,e.focusOffset),s=iSe(e.focusNode,e.focusOffset);if(n&&s&&n!=s){let i=s.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||s==o)return o;if(!i||!i.isText(s.nodeValue))return s;if(t.input.compositionNode==s){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return s}}return n||s}function h9e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Hb(t,e=!1){if(!(Sr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),UB(t),e||t.docView&&t.docView.dirty){let n=Q5(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function f9e(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let s=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),s.removeAllRanges(),s.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const a1=ho&&$c<15||Xf&&cSe<604;Yi.copy=qi.cut=(t,e)=>{let n=e,s=t.state.selection,i=n.type=="cut";if(s.empty)return;let o=a1?null:n.clipboardData,r=s.content(),{dom:a,text:l}=LB(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):f9e(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function p9e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function m9e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,s=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(s.contentEditable="true"),s.style.cssText="position: fixed; left: -10000px; top: 10px",s.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),s.parentNode&&s.parentNode.removeChild(s),n?l1(t,s.value,null,i,e):l1(t,s.textContent,s.innerHTML,i,e)},50)}function l1(t,e,n,s,i){let o=OB(t,e,n,s,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||it.empty)))return!0;if(!o)return!1;let r=p9e(o),a=r?t.state.tr.replaceSelectionWith(r,s):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function jB(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}qi.paste=(t,e)=>{let n=e;if(t.composing&&!Sr)return;let s=a1?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;s&&l1(t,jB(s),s.getData("text/html"),i,n)?n.preventDefault():m9e(t,n)};class WB{constructor(e,n,s){this.slice=e,this.move=n,this.node=s}}const YB=Jo?"altKey":"ctrlKey";Yi.dragstart=(t,e)=>{let n=e,s=t.input.mouseDown;if(s&&s.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(C2(n)),r;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof Ot?i.to-1:i.to))){if(s&&s.mightDrag)r=Ot.create(t.state.doc,s.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(r=Ot.create(t.state.doc,d.posBefore))}}let a=(r||t.state.selection).content(),{dom:l,text:c,slice:u}=LB(t,a);(!n.dataTransfer.files.length||!Ci||vB>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(a1?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",a1||n.dataTransfer.setData("text/plain",c),t.dragging=new WB(u,!n[YB],r)};Yi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};qi.dragover=qi.dragenter=(t,e)=>e.preventDefault();qi.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(C2(n));if(!i)return;let o=t.state.doc.resolve(i.pos),r=s&&s.slice;r?t.someProp("transformPasted",p=>{r=p(r,t)}):r=OB(t,jB(n.dataTransfer),a1?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(s&&!n[YB]);if(t.someProp("handleDrop",p=>p(t,n,r||it.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?J5e(t.state.doc,o.pos,r):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:p}=s;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=r.openStart==0&&r.openEnd==0&&r.content.childCount==1,h=c.doc;if(d?c.replaceRangeWith(u,u,r.content.firstChild):c.replaceRange(u,u,r),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Ot.isSelectable(r.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new Ot(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,_,x)=>p=x),c.setSelection(e8(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Yi.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&hl(t)},20))};Yi.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Yi.beforeinput=(t,e)=>{if(Ci&&Sr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:s}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=s||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Su(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in qi)Yi[t]=qi[t];function c1(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Ub{constructor(e,n){this.toDOM=e,this.spec=n||Xu,this.side=this.spec.side||0}map(e,n,s,i){let{pos:o,deleted:r}=e.mapResult(n.from+i,this.side<0?-1:1);return r?null:new Ds(o-s,o-s,this)}valid(){return!0}eq(e){return this==e||e instanceof Ub&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&c1(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ec{constructor(e,n){this.attrs=e,this.spec=n||Xu}map(e,n,s,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-s,r=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-s;return o>=r?null:new Ds(o,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Ec&&c1(this.attrs,e.attrs)&&c1(this.spec,e.spec)}static is(e){return e.type instanceof Ec}destroy(){}}class i8{constructor(e,n){this.attrs=e,this.spec=n||Xu}map(e,n,s,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let r=e.mapResult(n.to+i,-1);return r.deleted||r.pos<=o.pos?null:new Ds(o.pos-s,r.pos-s,this)}valid(e,n){let{index:s,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(s)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof i8&&c1(this.attrs,e.attrs)&&c1(this.spec,e.spec)}destroy(){}}class Ds{constructor(e,n,s){this.from=e,this.to=n,this.type=s}copy(e,n){return new Ds(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,s){return this.type.map(e,this,n,s)}static widget(e,n,s){return new Ds(e,e,new Ub(n,s))}static inline(e,n,s,i){return new Ds(e,n,new Ec(s,i))}static node(e,n,s,i){return new Ds(e,n,new i8(s,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ec}get widget(){return this.type instanceof Ub}}const Eh=[],Xu={};class Gn{constructor(e,n){this.local=e.length?e:Eh,this.children=n.length?n:Eh}static create(e,n){return n.length?jb(n,e,0,Xu):_i}find(e,n,s){let i=[];return this.findInner(e??0,n??1e9,i,0,s),i}findInner(e,n,s,i,o){for(let r=0;r<this.local.length;r++){let a=this.local[r];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&s.push(a.copy(a.from+i,a.to+i))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>e){let a=this.children[r]+1;this.children[r+2].findInner(e-a,n-a,s,i+a,o)}}map(e,n,s){return this==_i||e.maps.length==0?this:this.mapInner(e,n,0,0,s||Xu)}mapInner(e,n,s,i,o){let r;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,s,i);l&&l.type.valid(n,l)?(r||(r=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?g9e(this.children,r||[],e,n,s,i,o):r?new Gn(r.sort(Ku),Eh):_i}add(e,n){return n.length?this==_i?Gn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,s){let i,o=0;e.forEach((a,l)=>{let c=l+s,u;if(u=GB(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,jb(u,a,c+1,Xu)),o+=3}});let r=qB(o?XB(n):n,-s);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Gn(r.length?this.local.concat(r).sort(Ku):this.local,i||this.children)}remove(e){return e.length==0||this==_i?this:this.removeInner(e,0)}removeInner(e,n){let s=this.children,i=this.local;for(let o=0;o<s.length;o+=3){let r,a=s[o]+n,l=s[o+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(r||(r=[])).push(d));if(!r)continue;s==this.children&&(s=this.children.slice());let c=s[o+2].removeInner(r,a+1);c!=_i?s[o+2]=c:(s.splice(o,3),o-=3)}if(i.length){for(let o=0,r;o<e.length;o++)if(r=e[o])for(let a=0;a<i.length;a++)i[a].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return s==this.children&&i==this.local?this:i.length||s.length?new Gn(i,s):_i}forChild(e,n){if(this==_i)return this;if(n.isLeaf)return Gn.empty;let s,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(s=this.children[a+2]);break}let o=e+1,r=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<r&&l.to>o&&l.type instanceof Ec){let c=Math.max(o,l.from)-o,u=Math.min(r,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new Gn(i.sort(Ku),Eh);return s?new dc([a,s]):a}return s||_i}eq(e){if(this==e)return!0;if(!(e instanceof Gn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return o8(this.localsInner(e))}localsInner(e){if(this==_i)return Eh;if(e.inlineContent||!this.local.some(Ec.is))return this.local;let n=[];for(let s=0;s<this.local.length;s++)this.local[s].type instanceof Ec||n.push(this.local[s]);return n}forEachSet(e){e(this)}}Gn.empty=new Gn([],[]);Gn.removeOverlap=o8;const _i=Gn.empty;class dc{constructor(e){this.members=e}map(e,n){const s=this.members.map(i=>i.map(e,n,Xu));return dc.from(s)}forChild(e,n){if(n.isLeaf)return Gn.empty;let s=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=_i&&(o instanceof dc?s=s.concat(o.members):s.push(o))}return dc.from(s)}eq(e){if(!(e instanceof dc)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,s=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{s&&(n=n.slice(),s=!1);for(let r=0;r<o.length;r++)n.push(o[r])}}return n?o8(s?n:n.sort(Ku)):Eh}static from(e){switch(e.length){case 0:return _i;case 1:return e[0];default:return new dc(e.every(n=>n instanceof Gn)?e:e.reduce((n,s)=>n.concat(s instanceof Gn?s:s.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function g9e(t,e,n,s,i,o,r){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let d=0;n.maps[c].forEach((h,f,p,m)=>{let b=m-p-(f-h);for(let _=0;_<a.length;_+=3){let x=a[_+1];if(x<0||h>x+u-d)continue;let k=a[_]+u-d;f>=k?a[_+1]=h<=k?-2:-1:h>=u&&b&&(a[_]+=b,a[_+1]+=b)}d+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+o),d=u-i;if(d<0||d>=s.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),f=h-i,{index:p,offset:m}=s.content.findIndex(d),b=s.maybeChild(p);if(b&&m==d&&m+b.nodeSize==f){let _=a[c+2].mapInner(n,b,u+1,t[c]+o+1,r);_!=_i?(a[c]=d,a[c+1]=f,a[c+2]=_):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=v9e(a,t,e,n,i,o,r),u=jb(c,s,0,r);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,h=0;d<u.children.length;d+=3){let f=u.children[d];for(;h<a.length&&a[h]<f;)h+=3;a.splice(h,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Gn(e.sort(Ku),a)}function qB(t,e){if(!e||!t.length)return t;let n=[];for(let s=0;s<t.length;s++){let i=t[s];n.push(new Ds(i.from+e,i.to+e,i.type))}return n}function v9e(t,e,n,s,i,o,r){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(s,i,c);d?n.push(d):r.onRemove&&r.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function GB(t,e,n){if(e.isLeaf)return null;let s=n+e.nodeSize,i=null;for(let o=0,r;o<t.length;o++)(r=t[o])&&r.from>n&&r.to<s&&((i||(i=[])).push(r),t[o]=null);return i}function XB(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function jb(t,e,n,s){let i=[],o=!1;e.forEach((a,l)=>{let c=GB(t,a,l+n);if(c){o=!0;let u=jb(c,a,n+l+1,s);u!=_i&&i.push(l,l+a.nodeSize,u)}});let r=qB(o?XB(t):t,-n).sort(Ku);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||(s.onRemove&&s.onRemove(r[a].spec),r.splice(a--,1));return r.length||i.length?new Gn(r,i):_i}function Ku(t,e){return t.from-e.from||t.to-e.to}function o8(t){let e=t;for(let n=0;n<e.length-1;n++){let s=e[n];if(s.from!=s.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==s.from){o.to!=s.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,s.to),fM(e,i+1,o.copy(s.to,o.to)));continue}else{o.from<s.to&&(e==t&&(e=t.slice()),e[n]=s.copy(s.from,o.from),fM(e,i,s.copy(o.from,s.to)));break}}}return e}function fM(t,e,n){for(;e<t.length&&Ku(n,t[e])>0;)e++;t.splice(e,0,n)}function p3(t){let e=[];return t.someProp("decorations",n=>{let s=n(t.state);s&&s!=_i&&e.push(s)}),t.cursorWrapper&&e.push(Gn.create(t.state.doc,[t.cursorWrapper.deco])),dc.from(e)}const y9e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},b9e=ho&&$c<=11;class _9e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class w9e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _9e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(s=>{for(let i=0;i<s.length;i++)this.queue.push(s[i]);ho&&$c<=11&&s.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),b9e&&(this.onCharData=s=>{this.queue.push({target:s.target,type:"characterData",oldValue:s.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,y9e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(oM(this.view)){if(this.suppressingSelectionUpdates)return hl(this.view);if(ho&&$c<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&gd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,s;for(let o=e.focusNode;o;o=r1(o))n.add(o);for(let o=e.anchorNode;o;o=r1(o))if(n.has(o)){s=o;break}let i=s&&this.view.docView.nearestDesc(s);if(i&&i.ignoreMutation({type:"selection",target:s.nodeType==3?s.parentNode:s}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&oM(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let s=e.domSelectionRange(),i=this.selectionChanged(s),o=-1,r=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(o=o<0?d.from:Math.min(d.from,o),r=r<0?d.to:Math.max(d.to,r),d.typeOver&&(a=!0))}if(Yr&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,h]=u;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of u){let f=h.parentNode;f&&f.nodeName=="LI"&&(!d||C9e(e,d)!=f)&&h.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&x2(s)&&(c=Q5(e))&&c.eq(zt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,hl(e),this.currentSelection.set(s),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,r),x9e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(s)||hl(e),this.currentSelection.set(s))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let s=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(s==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!s||s.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(s.contentDOM&&s.contentDOM!=s.dom&&!s.contentDOM.contains(e.target))return{from:s.posBefore,to:s.posAfter};let i=e.previousSibling,o=e.nextSibling;if(ho&&$c<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:h}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(i=d),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let r=i&&i.parentNode==e.target?ei(i)+1:0,a=s.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?ei(o):e.target.childNodes.length,c=s.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:s.posAtStart-s.border,to:s.posAtEnd+s.border}:(this.lastChangedTextNode=e.target,{from:s.posAtStart,to:s.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let pM=new WeakMap,mM=!1;function x9e(t){if(!pM.has(t)&&(pM.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Yr,mM)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),mM=!0}}function gM(t,e){let n=e.startContainer,s=e.startOffset,i=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return gd(r.node,r.offset,i,o)&&([n,s,i,o]=[i,o,n,s]),{anchorNode:n,anchorOffset:s,focusNode:i,focusOffset:o}}function k9e(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return gM(t,i)}let n;function s(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",s,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",s,!0),n?gM(t,n):null}function C9e(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let s=t.docView.nearestDesc(n,!0);if(s&&s.node.isBlock)return n}return null}function S9e(t,e,n){let{node:s,fromOffset:i,toOffset:o,from:r,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],x2(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Ci&&t.input.lastKeyCode===8)for(let b=o;b>i;b--){let _=s.childNodes[b-1],x=_.pmViewDesc;if(_.nodeName=="BR"&&!x){o=b;break}if(!x||x.size)break}let d=t.state.doc,h=t.someProp("domParser")||c2.fromSchema(t.state.schema),f=d.resolve(r),p=null,m=h.parse(s,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:o,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:$9e,context:f});if(c&&c[0].pos!=null){let b=c[0].pos,_=c[1]&&c[1].pos;_==null&&(_=b),p={anchor:b+r,head:_+r}}return{doc:m,sel:p,from:r,to:a}}function $9e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Wi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Wi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const A9e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function E9e(t,e,n,s,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let L=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=Q5(t,L);if(I&&!t.state.selection.eq(I)){if(Ci&&Sr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",R=>R(t,Su(13,"Enter"))))return;let V=t.state.tr.setSelection(I);L=="pointer"?V.setMeta("pointer",!0):L=="key"&&V.scrollIntoView(),o&&V.setMeta("composition",o),t.dispatch(V)}return}let r=t.state.doc.resolve(e),a=r.sharedDepth(n);e=r.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=S9e(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),h,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,f="end"):(h=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let p=P9e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(Xf&&t.input.lastIOSEnter>Date.now()-225||Sr)&&i.some(L=>L.nodeType==1&&!A9e.test(L.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",L=>L(t,Su(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(s&&l instanceof It&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let L=vM(t,t.state.doc,c.sel);if(L&&!L.eq(t.state.selection)){let I=t.state.tr.setSelection(L);o&&I.setMeta("composition",o),t.dispatch(I)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof It&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),ho&&$c<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),b=c.doc.resolveNoCache(p.endB-c.from),_=u.resolve(p.start),x=m.sameParent(b)&&m.parent.inlineContent&&_.end()>=p.endA,k;if((Xf&&t.input.lastIOSEnter>Date.now()-225&&(!x||i.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!x&&m.pos<c.doc.content.size&&!m.sameParent(b)&&(k=zt.findFrom(c.doc.resolve(m.pos+1),1,!0))&&k.head==b.pos)&&t.someProp("handleKeyDown",L=>L(t,Su(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&T9e(u,p.start,p.endA,m,b)&&t.someProp("handleKeyDown",L=>L(t,Su(8,"Backspace")))){Sr&&Ci&&t.domObserver.suppressSelectionUpdates();return}Ci&&Sr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Sr&&!x&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,b=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(L){return L(t,Su(13,"Enter"))})},20));let C=p.start,S=p.endA,E,P,T;if(x){if(m.pos==b.pos)ho&&$c<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>hl(t),20)),E=t.state.tr.delete(C,S),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=M9e(m.parent.content.cut(m.parentOffset,b.parentOffset),_.parent.content.cut(_.parentOffset,p.endA-_.start()))))E=t.state.tr,T.type=="add"?E.addMark(C,S,T.mark):E.removeMark(C,S,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let L=m.parent.textBetween(m.parentOffset,b.parentOffset);if(t.someProp("handleTextInput",I=>I(t,C,S,L)))return;E=t.state.tr.insertText(L,C,S)}}if(E||(E=t.state.tr.replace(C,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let L=vM(t,E.doc,c.sel);L&&!(Ci&&Sr&&t.composing&&L.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(L.head==C||L.head==E.mapping.map(S)-1)||ho&&L.empty&&L.head==C)&&E.setSelection(L)}P&&E.ensureMarks(P),o&&E.setMeta("composition",o),t.dispatch(E.scrollIntoView())}function vM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:e8(t,e.resolve(n.anchor),e.resolve(n.head))}function M9e(t,e){let n=t.firstChild.marks,s=e.firstChild.marks,i=n,o=s,r,a,l;for(let u=0;u<s.length;u++)i=s[u].removeFromSet(i);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],r="add",l=u=>u.mark(a.addToSet(u.marks));else if(i.length==0&&o.length==1)a=o[0],r="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(nt.from(c).eq(t))return{mark:a,type:r}}function T9e(t,e,n,s,i){if(n-e<=i.pos-s.pos||m3(s,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!s.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let r=t.resolve(m3(o,!0,!0));return!r.parent.isTextblock||r.pos>n||m3(r,!0,!1)<n?!1:s.parent.content.cut(s.parentOffset).eq(r.parent.content)}function m3(t,e,n){let s=t.depth,i=e?t.end():t.pos;for(;s>0&&(e||t.indexAfter(s)==t.node(s).childCount);)s--,i++,e=!1;if(n){let o=t.node(s).maybeChild(t.indexAfter(s));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function P9e(t,e,n,s,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:r,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let l=Math.max(0,o-Math.min(r,a));s-=r+l-o}if(r<o&&t.size<e.size){let l=s<=o&&s>=r?o-s:0;o-=l,o&&o<e.size&&yM(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-r),r=o}else if(a<o){let l=s<=o&&s>=a?o-s:0;o-=l,o&&o<t.size&&yM(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function yM(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class I9e{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ZSe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(kM),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=wM(this),_M(this),this.nodeViews=xM(this),this.docView=QE(this.state.doc,bM(this),p3(this),this.dom,this),this.domObserver=new w9e(this,(s,i,o,r)=>E9e(this,s,i,o,r)),this.domObserver.start(),JSe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&d6(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(kM),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let s in this._props)n[s]=this._props[s];n.state=this.state;for(let s in e)n[s]=e[s];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var s;let i=this.state,o=!1,r=!1;e.storedMarks&&this.composing&&(UB(this),r=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=xM(this);O9e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&d6(this),this.editable=wM(this),_M(this);let l=p3(this),c=bM(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(i.selection))&&(r=!0);let h=u=="preserve"&&r&&this.dom.style.overflowAnchor==null&&hSe(this);if(r){this.domObserver.stop();let f=d&&(ho||Ci)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&L9e(i.selection,e.selection);if(d){let p=Ci?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=d9e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=QE(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&RSe(this))?hl(this,f):(TB(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((s=this.dragging)===null||s===void 0)&&s.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&fSe(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Ot){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&qE(this,n.getBoundingClientRect(),e)}else qE(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let s=this.directPlugins[n];s.spec.view&&this.pluginViews.push(s.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let s=this.state.plugins[n];s.spec.view&&this.pluginViews.push(s.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let s=this.pluginViews[n];s.update&&s.update(this,e)}}updateDraggedNode(e,n){let s=e.node,i=-1;if(this.state.doc.nodeAt(s.from)==s.node)i=s.from;else{let o=s.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==s.node&&(i=o)}this.dragging=new WB(e.slice,e.move,i<0?void 0:Ot.create(this.state.doc,i))}someProp(e,n){let s=this._props&&this._props[e],i;if(s!=null&&(i=n?n(s):s))return i;for(let r=0;r<this.directPlugins.length;r++){let a=this.directPlugins[r].props[e];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let a=o[r].props[e];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(ho){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&pSe(this.dom),hl(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return bSe(this,e)}coordsAtPos(e,n=1){return xB(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,s=-1){let i=this.docView.posFromDOM(e,n,s);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return CSe(this,n||this.state,e)}pasteHTML(e,n){return l1(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return l1(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(QSe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],p3(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,tSe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return t9e(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Wi&&this.root.nodeType===11&&rSe(this.dom.ownerDocument)==this.dom&&k9e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function bM(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let s in n)s=="class"?e.class+=" "+n[s]:s=="style"?e.style=(e.style?e.style+";":"")+n[s]:!e[s]&&s!="contenteditable"&&s!="nodeName"&&(e[s]=String(n[s]))}),e.translate||(e.translate="no"),[Ds.node(0,t.state.doc.content.size,e)]}function _M(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ds.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function wM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function L9e(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function xM(t){let e=Object.create(null);function n(s){for(let i in s)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=s[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function O9e(t,e){let n=0,s=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)s++;return n!=s}function kM(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var KB=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ct=(t,e,n)=>(KB(t,e,"read from private field"),n?n.call(t):e.get(t)),qs=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},us=(t,e,n,s)=>(KB(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function eu(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const ZB={strong:(t,e,n,s)=>{const i=t.marker||n.options.strong||"*",o=n.enter("strong"),r=n.createTracker(s);let a=r.move(i+i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i+i),o(),a},emphasis:(t,e,n,s)=>{const i=t.marker||n.options.emphasis||"*",o=n.enter("emphasis"),r=n.createTracker(s);let a=r.move(i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i),o(),a}},Yn=wn({},"editorView"),bm=wn({},"editorState"),g3=wn([],"initTimer"),CM=wn({},"editor"),u1=wn([],"inputRules"),qr=wn([],"prosePlugins"),d1=wn([],"remarkPlugins"),h1=wn([],"nodeView"),f1=wn([],"markView"),Zu=wn(Yk().use(Nk).use(Uk),"remark"),ug=wn({handlers:ZB},"remarkStringifyOptions"),sy=Xc("ConfigReady");function D9e(t){const e=n=>(n.record(sy),async()=>(await t(n),n.done(sy),()=>{n.clearTimer(sy)}));return eu(e,{displayName:"Config"}),e}const Ju=Xc("InitReady");function R9e(t){const e=n=>(n.inject(CM,t).inject(qr,[]).inject(d1,[]).inject(u1,[]).inject(h1,[]).inject(f1,[]).inject(ug,{handlers:ZB}).inject(Zu,Yk().use(Nk).use(Uk)).inject(g3,[sy]).record(Ju),async()=>{await n.waitTimers(g3);const s=n.get(ug);return n.set(Zu,Yk().use(Nk).use(Uk,s)),n.done(Ju),()=>{n.remove(CM).remove(qr).remove(d1).remove(u1).remove(h1).remove(f1).remove(ug).remove(Zu).remove(g3).clearTimer(Ju)}});return eu(e,{displayName:"Init"}),e}const Fr=Xc("SchemaReady"),v3=wn([],"schemaTimer"),Nr=wn({},"schema"),lf=wn([],"nodes"),cf=wn([],"marks");function SM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const JB=t=>(t.inject(Nr,{}).inject(lf,[]).inject(cf,[]).inject(v3,[Ju]).record(Fr),async()=>{await t.waitTimers(v3);const e=t.get(Zu),n=t.get(d1).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(Zu,n);const s=Object.fromEntries(t.get(lf).map(([r,a])=>[r,SM(a)])),i=Object.fromEntries(t.get(cf).map(([r,a])=>[r,SM(a)])),o=new Zke({nodes:s,marks:i});return t.set(Nr,o),t.done(Fr),()=>{t.remove(Nr).remove(lf).remove(cf).remove(v3).clearTimer(Fr)}});eu(JB,{displayName:"Schema"});var Mh,vu;let QB=class{constructor(){qs(this,Mh,void 0),qs(this,vu,void 0),us(this,Mh,new zF),us(this,vu,null),this.setCtx=e=>{us(this,vu,e)}}get ctx(){return Ct(this,vu)}create(e,n){const s=e.create(Ct(this,Mh).sliceMap);return s.set(n),s}get(e){return Ct(this,Mh).get(e).get()}remove(e){return Ct(this,Mh).remove(e)}call(e,n){if(Ct(this,vu)==null)throw Ske();const s=this.get(e)(n),i=Ct(this,vu).get(Yn);return s(i.state,i.dispatch,i)}};Mh=new WeakMap,vu=new WeakMap;function V9e(t="cmdKey"){return wn(()=>()=>!1,t)}const pn=wn(new QB,"commands"),y3=wn([Fr],"commandsTimer"),dg=Xc("CommandsReady"),ez=t=>{const e=new QB;return e.setCtx(t),t.inject(pn,e).inject(y3,[Fr]).record(dg),async()=>(await t.waitTimers(y3),t.done(dg),()=>{t.remove(pn).remove(y3).clearTimer(dg)})};eu(ez,{displayName:"Commands"});const iy=Xc("ParserReady"),tz=()=>{throw O5()},uf=wn(tz,"parser"),b3=wn([],"parserTimer"),nz=t=>(t.inject(uf,tz).inject(b3,[Fr]).record(iy),async()=>{await t.waitTimers(b3);const e=t.get(Zu),n=t.get(Nr);return t.set(uf,P5e.create(n,e)),t.done(iy),()=>{t.remove(uf).remove(b3).clearTimer(iy)}});eu(nz,{displayName:"Parser"});const hg=Xc("SerializerReady"),_3=wn([],"serializerTimer"),sz=()=>{throw O5()},df=wn(sz,"serializer"),iz=t=>(t.inject(df,sz).inject(_3,[Fr]).record(hg),async()=>{await t.waitTimers(_3);const e=t.get(Zu),n=t.get(Nr);return t.set(df,L5e.create(n,e)),t.done(hg),()=>{t.remove(df).remove(_3).clearTimer(hg)}});eu(iz,{displayName:"Serializer"});const oy=wn("","defaultValue"),ry=wn(t=>t,"stateOptions"),w3=wn([],"editorStateTimer"),ay=Xc("EditorStateReady");function F9e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return c2.fromSchema(n).parse(t.dom);if(t.type==="json")return Sc.fromJSON(n,t.value);throw yke(t)}const N9e=new fs("MILKDOWN_STATE_TRACKER");function B9e(t){const e=w2(c8e,X5,aB,lB);return t.Backspace=e,t}const oz=t=>(t.inject(oy,"").inject(bm,{}).inject(ry,e=>e).inject(w3,[iy,hg,dg]).record(ay),async()=>{await t.waitTimers(w3);const e=t.get(Nr),n=t.get(uf),s=t.get(u1),i=t.get(ry),o=t.get(qr),r=t.get(oy),a=F9e(r,n,e),l=[...o,new rs({key:N9e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(bm,p)}}}),y8e({rules:s}),pB(B9e(G8e))];t.set(qr,l);const c=i({schema:e,doc:a,plugins:l}),u=Iu.create(c);return t.set(bm,u),t.done(ay),()=>{t.remove(oy).remove(bm).remove(ry).remove(w3).clearTimer(ay)}});eu(oz,{displayName:"EditorState"});const ly=Xc("EditorViewReady"),x3=wn([],"editorViewTimer"),fg=wn({},"editorViewOptions"),cy=wn(null,"root"),h6=wn(null,"rootDOM"),f6=wn({},"rootAttrs");function z9e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(h6,n);const s=e.get(f6);return Object.entries(s).forEach(([i,o])=>n.setAttribute(i,o)),n}function H9e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const U9e=new fs("MILKDOWN_VIEW_CLEAR"),rz=t=>(t.inject(cy,document.body).inject(Yn,{}).inject(fg,{}).inject(h6,null).inject(f6,{}).inject(x3,[ay]).record(ly),async()=>{await t.wait(Ju);const e=t.get(cy)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(qr,l=>[new rs({key:U9e,view:c=>{const u=n?z9e(n,t):void 0;return(()=>{if(u&&n){const d=c.dom;n.replaceChild(u,d),u.appendChild(d)}})(),{destroy:()=>{u!=null&&u.parentNode&&(u==null||u.parentNode.replaceChild(c.dom,u)),u==null||u.remove()}}}}),...l]),await t.waitTimers(x3);const s=t.get(bm),i=t.get(fg),o=Object.fromEntries(t.get(h1)),r=Object.fromEntries(t.get(f1)),a=new I9e(n,{state:s,nodeViews:o,markViews:r,...i});return H9e(a.dom),t.set(Yn,a),t.done(ly),()=>{a==null||a.destroy(),t.remove(cy).remove(Yn).remove(fg).remove(h6).remove(f6).remove(x3).clearTimer(ly)}});eu(rz,{displayName:"EditorView"});var Th,Ko,Xl,_m,uy,dy,ko,Kl,Ph,hy,Ih,wm,fy,yu,xm;const j9e=class az{constructor(){qs(this,Th,void 0),qs(this,Ko,void 0),qs(this,Xl,void 0),qs(this,_m,void 0),qs(this,uy,void 0),qs(this,dy,void 0),qs(this,ko,void 0),qs(this,Kl,void 0),qs(this,Ph,void 0),qs(this,hy,void 0),qs(this,Ih,void 0),qs(this,wm,void 0),qs(this,fy,void 0),qs(this,yu,void 0),qs(this,xm,void 0),us(this,Th,!1),us(this,Ko,"Idle"),us(this,Xl,[]),us(this,_m,()=>{}),us(this,uy,new zF),us(this,dy,new Ike),us(this,ko,new Map),us(this,Kl,new Map),us(this,Ph,new Pke(Ct(this,uy),Ct(this,dy))),us(this,hy,()=>{const e=D9e(async s=>{await Promise.all(Ct(this,Xl).map(i=>i(s)))}),n=[JB,nz,iz,ez,oz,rz,R9e(this),e];Ct(this,Ih).call(this,n,Ct(this,Kl))}),us(this,Ih,(e,n)=>{e.forEach(s=>{const i=Ct(this,Ph).produce(Ct(this,Th)?s.meta:void 0),o=s(i);n.set(s,{ctx:i,handler:o,cleanup:void 0})})}),us(this,wm,(e,n=!1)=>Promise.all([e].flat().map(s=>{const i=Ct(this,ko).get(s),o=i==null?void 0:i.cleanup;return n?Ct(this,ko).delete(s):Ct(this,ko).set(s,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),us(this,fy,async()=>{await Promise.all([...Ct(this,Kl).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),Ct(this,Kl).clear()}),us(this,yu,e=>{us(this,Ko,e),Ct(this,_m).call(this,e)}),us(this,xm,e=>[...e.entries()].map(async([n,s])=>{const{ctx:i,handler:o}=s;if(!o)return;const r=await o();e.set(n,{ctx:i,handler:o,cleanup:r})})),this.enableInspector=(e=!0)=>(us(this,Th,e),this),this.onStatusChange=e=>(us(this,_m,e),this),this.config=e=>(Ct(this,Xl).push(e),this),this.removeConfig=e=>(us(this,Xl,Ct(this,Xl).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(s=>{Ct(this,ko).set(s,{ctx:void 0,handler:void 0,cleanup:void 0})}),Ct(this,Ko)==="Created"&&Ct(this,Ih).call(this,n,Ct(this,ko)),this},this.remove=async e=>Ct(this,Ko)==="OnCreate"?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(e))},50)})):(await Ct(this,wm).call(this,[e].flat(),!0),this),this.create=async()=>Ct(this,Ko)==="OnCreate"?this:(Ct(this,Ko)==="Created"&&await this.destroy(),Ct(this,yu).call(this,"OnCreate"),Ct(this,hy).call(this),Ct(this,Ih).call(this,[...Ct(this,ko).keys()],Ct(this,ko)),await Promise.all([Ct(this,xm).call(this,Ct(this,Kl)),Ct(this,xm).call(this,Ct(this,ko))].flat()),Ct(this,yu).call(this,"Created"),this),this.destroy=async(e=!1)=>Ct(this,Ko)==="Destroyed"||Ct(this,Ko)==="OnDestroy"?this:Ct(this,Ko)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&us(this,Xl,[]),Ct(this,yu).call(this,"OnDestroy"),await Ct(this,wm).call(this,[...Ct(this,ko).keys()],e),await Ct(this,fy).call(this),Ct(this,yu).call(this,"Destroyed"),this),this.action=e=>e(Ct(this,Ph)),this.inspect=()=>Ct(this,Th)?[...Ct(this,Kl).values(),...Ct(this,ko).values()].map(({ctx:e})=>{var n;return(n=e==null?void 0:e.inspector)==null?void 0:n.read()}).filter(e=>!!e):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new az}get ctx(){return Ct(this,Ph)}get status(){return Ct(this,Ko)}};Th=new WeakMap,Ko=new WeakMap,Xl=new WeakMap,_m=new WeakMap,uy=new WeakMap,dy=new WeakMap,ko=new WeakMap,Kl=new WeakMap,Ph=new WeakMap,hy=new WeakMap,Ih=new WeakMap,wm=new WeakMap,fy=new WeakMap,yu=new WeakMap,xm=new WeakMap;let W9e=j9e,Y9e=t=>crypto.getRandomValues(new Uint8Array(t)),q9e=(t,e,n)=>{let s=(2<<Math.log2(t.length-1))-1,i=-~(1.6*s*e/t.length);return(o=e)=>{let r="";for(;;){let a=n(i),l=i|0;for(;l--;)if(r+=t[a[l]&s]||"",r.length>=o)return r}}},G9e=(t,e=21)=>q9e(t,e|0,Y9e);G9e("abcedfghicklmn",10);function en(t,e){const n=V9e(t),s=i=>async()=>{s.key=n,await i.wait(dg);const o=e(i);return i.get(pn).create(n,o),s.run=r=>i.get(pn).call(t,r),()=>{i.get(pn).remove(n)}};return s}function bo(t){const e=n=>async()=>{await n.wait(Fr);const s=t(n);return n.update(u1,i=>[...i,s]),e.inputRule=s,()=>{n.update(u1,i=>i.filter(o=>o!==s))}};return e}function X9e(t,e){const n=s=>async()=>{const i=e(s);return s.update(cf,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(cf,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get(Nr).marks[t];if(!i)throw $ke(t);return i},n}function r8(t,e){const n=s=>async()=>{const i=e(s);return s.update(lf,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(lf,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get(Nr).nodes[t];if(!i)throw NF(t);return i},n}function Ts(t){let e;const n=s=>async()=>(await s.wait(Fr),e=t(s),s.update(qr,i=>[...i,e]),()=>{s.update(qr,i=>i.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function K9e(t){const e=n=>async()=>{await n.wait(Fr);const s=t(n),i=pB(s);return n.update(qr,o=>[...o,i]),e.keymap=s,()=>{n.update(qr,o=>o.filter(r=>r!==i))}};return e}function lz(t,e){const n=s=>async()=>{await s.wait(Fr);const i=e(s);return t.type(s)instanceof Ob?s.update(h1,o=>[...o,[t.id,i]]):s.update(f1,o=>[...o,[t.id,i]]),n.view=i,n.type=t,()=>{t.type(s)instanceof Ob?s.update(h1,o=>o.filter(r=>r[0]!==t.id)):s.update(f1,o=>o.filter(r=>r[0]!==t.id))}};return n}function ps(t,e){const n=wn(t,e),s=i=>(i.inject(n),()=>()=>{i.remove(n)});return s.key=n,s}function Ns(t,e){const n=ps(e,t),s=r8(t,o=>o.get(n.key)(o)),i=[n,s];return i.id=s.id,i.node=s,i.type=o=>s.type(o),i.schema=s.schema,i.ctx=n,i.key=n.key,i.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(lf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function sv(t,e){const n=ps(e,t),s=X9e(t,o=>o.get(n.key)(o)),i=[n,s];return i.id=s.id,i.mark=s,i.type=s.type,i.schema=s.schema,i.ctx=n,i.key=n.key,i.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(cf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function _o(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),s=ps(n,`${t}Keymap`),i=K9e(r=>{const a=r.get(s.key),l=Object.entries(e).flatMap(([c,{command:u}])=>[a[c]].flat().map(d=>[d,u(r)]));return Object.fromEntries(l)}),o=[s,i];return o.ctx=s,o.shortcuts=i,o.key=s.key,o.keymap=i.keymap,o}const ea=(t,e=()=>({}))=>ps(e,`${t}Attr`),iv=(t,e=()=>({}))=>ps(e,`${t}Attr`);function zd(t,e,n){const s=ps(n??{},t),i=r=>async()=>{await r.wait(Ju);const a={plugin:e(r),options:r.get(s.key)};return r.update(d1,l=>[...l,a]),()=>{r.update(d1,l=>l.filter(c=>c!==a))}},o=[s,i];return o.id=t,o.plugin=i,o.options=s,o}function Z9e(){return t=>{const e=t.get(Yn);return t.get(df)(e.state.doc)}}function J9e(t,e=!1){return n=>{const s=n.get(Yn),i=n.get(uf)(t);if(!i)return;if(!e){const{state:c}=s;return s.dispatch(c.tr.replace(0,c.doc.content.size,new it(i.content,0,0)))}const o=n.get(Nr),r=n.get(ry),a=n.get(qr),l=Iu.create({schema:o,doc:i,plugins:a,...r});s.updateState(l)}}function S2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Q9e=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],e7e=(t,e)=>{for(const[n,s]of e)t=t.replace(new RegExp(S2(n),"g"),s);return t};function t7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...Q9e,...e.customReplacements]);return t=t.normalize(),t=e7e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const n7e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],s7e=t=>t.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),i7e=(t,e)=>{const n=S2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},o7e=t=>{let e="a-z\\d";if(e+=t.lowercase?"":"A-Z",t.preserveCharacters.length>0)for(const n of t.preserveCharacters){if(n===t.separator)throw new Error(`The separator character \`${t.separator}\` cannot be included in preserved characters: ${t.preserveCharacters}`);e+=S2(n)}return new RegExp(`[^${e}]+`,"g")};function r7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const n=e.preserveLeadingUnderscore&&t.startsWith("_"),s=e.preserveTrailingDash&&t.endsWith("-"),i=new Map([...n7e,...e.customReplacements]);t=t7e(t,{customReplacements:i}),e.decamelize&&(t=s7e(t));const o=o7e(e);return e.lowercase&&(t=t.toLowerCase()),t=t.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),t=t.replace(o,e.separator),t=t.replace(/\\/g,""),e.separator&&(t=i7e(t,e.separator)),n&&(t=`_${t}`),s&&(t=`${t}-`),t}function a7e(t,e){return function(n,s){let{$from:i,$to:o,node:r}=n.selection;if(r&&r.isBlock||i.depth<2||!i.sameParent(o))return!1;let a=i.node(-1);if(a.type!=t)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=t||i.index(-2)!=i.node(-2).childCount-1)return!1;if(s){let d=nt.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let _=i.depth-h;_>=i.depth-3;_--)d=nt.from(i.node(_).copy(d));let f=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(nt.from(t.createAndFill()));let p=i.before(i.depth-(h-1)),m=n.tr.replace(p,i.after(-f),new it(d,4-h,0)),b=-1;m.doc.nodesBetween(p,m.doc.content.size,(_,x)=>{if(b>-1)return!1;_.isTextblock&&_.content.size==0&&(b=x+1)}),b>-1&&m.setSelection(zt.near(m.doc.resolve(b))),s(m.scrollIntoView())}return!0}let l=o.pos==i.end()?a.contentMatchAt(0).defaultType:null,c=n.tr.delete(i.pos,o.pos),u=l?[e?{type:t,attrs:e}:null,{type:l}]:void 0;return ag(c.doc,i.pos,2,u)?(s&&s(c.split(i.pos,2,u).scrollIntoView()),!0):!1}}function cz(t){return function(e,n){let{$from:s,$to:i}=e.selection,o=s.blockRange(i,r=>r.childCount>0&&r.firstChild.type==t);return o?n?s.node(o.depth-1).type==t?l7e(e,n,t,o):c7e(e,n,o):!0:!1}}function l7e(t,e,n,s){let i=t.tr,o=s.end,r=s.$to.end(s.depth);o<r&&(i.step(new $i(o-1,r,o,r,new it(nt.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new KF(i.doc.resolve(s.$from.pos),i.doc.resolve(r),s.depth));const a=p2(s);if(a==null)return!1;i.lift(s,a);let l=i.mapping.map(o,-1)-1;return m2(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function c7e(t,e,n){let s=t.tr,i=n.parent;for(let f=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)f-=i.child(p).nodeSize,s.delete(f-1,f+1);let o=s.doc.resolve(n.start),r=o.nodeAfter;if(s.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,r.content.append(l?nt.empty:nt.from(i))))return!1;let d=o.pos,h=d+r.nodeSize;return s.step(new $i(d-(a?1:0),h+(l?1:0),d+1,h-1,new it((a?nt.empty:nt.from(i.copy(nt.empty))).append(l?nt.empty:nt.from(i.copy(nt.empty))),a?0:1,l?0:1),a?0:1)),e(s.scrollIntoView()),!0}function u7e(t){return function(e,n){let{$from:s,$to:i}=e.selection,o=s.blockRange(i,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let r=o.startIndex;if(r==0)return!1;let a=o.parent,l=a.child(r-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=nt.from(c?t.create():null),d=new it(nt.from(t.create(null,nt.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new $i(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function d7e(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Bd(t,"definition",function(s){const i=$M(s.identifier);i&&!e.get(i)&&e.set(i,s)}),n;function n(s){const i=$M(s);return e.get(i)}}function $M(t){return String(t||"").toUpperCase()}function h7e(){return function(t){const e=d7e(t);Bd(t,function(n,s,i){if(n.type==="definition"&&i!==void 0&&typeof s=="number")return i.children.splice(s,1),[Hk,s];if(n.type==="imageReference"||n.type==="linkReference"){const o=e(n.identifier);if(o&&i&&typeof s=="number")return i.children[s]=n.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:n.alt}:{type:"link",url:o.url,title:o.title,children:n.children},[Hk,s]}})}}function uz(t,e){var n;if(!(e.childCount>=1&&((n=e.lastChild)==null?void 0:n.type.name)==="hardbreak")){t.next(e.content);return}const s=[];e.content.forEach((i,o,r)=>{r!==e.childCount-1&&s.push(i)}),t.next(nt.fromArray(s))}function Re(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const a8=iv("emphasis");Re(a8,{displayName:"Attr<emphasis>",group:"Emphasis"});const Hd=sv("emphasis",t=>({attrs:{marker:{default:t.get(ug).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(a8.key)(e)],parseMarkdown:{match:e=>e.type==="emphasis",runner:(e,n,s)=>{e.openMark(s,{marker:n.marker}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="emphasis",runner:(e,n)=>{e.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));Re(Hd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});Re(Hd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const $2=en("ToggleEmphasis",t=>()=>_2(Hd.type(t)));Re($2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const dz=bo(t=>Q1(/(?:^|[^*])\*([^*]+)\*$/,Hd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Re(dz,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const hz=bo(t=>Q1(/(?:^|[^_])_([^_]+)_$/,Hd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Re(hz,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const l8=_o("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(pn);return()=>e.call($2.key)}}});Re(l8.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Re(l8.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const c8=iv("strong");Re(c8,{displayName:"Attr<strong>",group:"Strong"});const mp=sv("strong",t=>({attrs:{marker:{default:t.get(ug).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(c8.key)(e)],parseMarkdown:{match:e=>e.type==="strong",runner:(e,n,s)=>{e.openMark(s,{marker:n.marker}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="strong",runner:(e,n)=>{e.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));Re(mp.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Re(mp.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const A2=en("ToggleStrong",t=>()=>_2(mp.type(t)));Re(A2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const fz=bo(t=>Q1(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,mp.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Re(fz,{displayName:"InputRule<strong>",group:"Strong"});const u8=_o("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(pn);return()=>e.call(A2.key)}}});Re(u8.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Re(u8.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const d8=iv("inlineCode");Re(d8,{displayName:"Attr<inlineCode>",group:"InlineCode"});const ol=sv("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(d8.key)(e)],parseMarkdown:{match:e=>e.type==="inlineCode",runner:(e,n,s)=>{e.openMark(s),e.addText(n.value),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="inlineCode",runner:(e,n,s)=>{e.withMark(n,"inlineCode",s.text||"")}}}));Re(ol.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});Re(ol.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const E2=en("ToggleInlineCode",t=>()=>(e,n)=>{const{selection:s,tr:i}=e;if(s.empty)return!1;const{from:o,to:r}=s;return e.doc.rangeHasMark(o,r,ol.type(t))?(n==null||n(i.removeMark(o,r,ol.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==ol.type.name).map(a=>e.schema.marks[a]).forEach(a=>{i.removeMark(o,r,a)}),n==null||n(i.addMark(o,r,ol.type(t).create())),!0)});Re(E2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const pz=bo(t=>Q1(/(?:\`)([^\`]+)(?:\`)$/,ol.type(t)));Re(pz,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const h8=_o("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(pn);return()=>e.call(E2.key)}}});Re(h8.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Re(h8.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const f8=iv("link");Re(f8,{displayName:"Attr<link>",group:"Link"});const Br=sv("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(f8.key)(e),...e.attrs}],parseMarkdown:{match:e=>e.type==="link",runner:(e,n,s)=>{const i=n.url,o=n.title;e.openMark(s,{href:i,title:o}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="link",runner:(e,n)=>{e.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));Re(Br.mark,{displayName:"MarkSchema<link>",group:"Link"});const mz=en("ToggleLink",t=>(e={})=>_2(Br.type(t),e));Re(mz,{displayName:"Command<toggleLinkCommand>",group:"Link"});const gz=en("UpdateLink",t=>(e={})=>(n,s)=>{if(!s)return!1;let i,o=-1;const{selection:r}=n,{from:a,to:l}=r;if(n.doc.nodesBetween(a,a===l?l+1:l,(p,m)=>{if(Br.type(t).isInSet(p.marks))return i=p,o=m,!1}),!i)return!1;const c=i.marks.find(({type:p})=>p===Br.type(t));if(!c)return!1;const u=o,d=o+i.nodeSize,{tr:h}=n,f=Br.type(t).create({...c.attrs,...e});return f?(s(h.removeMark(u,d,c).addMark(u,d,f).setSelection(new It(h.selection.$anchor)).scrollIntoView()),!0):!1});Re(gz,{displayName:"Command<updateLinkCommand>",group:"Link"});const vz=r8("doc",()=>({content:"block+",parseMarkdown:{match:({type:t})=>t==="root",runner:(t,e,n)=>{t.injectRoot(e,n)}},toMarkdown:{match:t=>t.type.name==="doc",runner:(t,e)=>{t.openNode("root"),t.next(e.content)}}}));Re(vz,{displayName:"NodeSchema<doc>",group:"Doc"});const p8=ea("paragraph");Re(p8,{displayName:"Attr<paragraph>",group:"Paragraph"});const El=Ns("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(p8.key)(e),0],parseMarkdown:{match:e=>e.type==="paragraph",runner:(e,n,s)=>{e.openNode(s),n.children?e.next(n.children):e.addText(n.value||""),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="paragraph",runner:(e,n)=>{e.openNode("paragraph"),uz(e,n),e.closeNode()}}}));Re(El.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Re(El.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const m8=en("TurnIntoText",t=>()=>o1(El.type(t)));Re(m8,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const g8=_o("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(pn);return()=>e.call(m8.key)}}});Re(g8.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Re(g8.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const f7e=Array(6).fill(0).map((t,e)=>e+1);function p7e(t){return r7e(t.textContent)}const M2=ps(p7e,"headingIdGenerator");Re(M2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const v8=ea("heading");Re(v8,{displayName:"Attr<heading>",group:"Heading"});const _a=Ns("heading",t=>{const e=t.get(M2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:f7e.map(n=>({tag:`h${n}`,getAttrs:s=>{if(!(s instanceof HTMLElement))throw Qr(s);return{level:n,id:s.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(v8.key)(n),id:n.attrs.id||e(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,s,i)=>{const o=s.depth;n.openNode(i,{level:o}),n.next(s.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,s)=>{n.openNode("heading",void 0,{depth:s.attrs.level}),uz(n,s),n.closeNode()}}}});Re(_a.node,{displayName:"NodeSchema<heading>",group:"Heading"});Re(_a.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const yz=bo(t=>tB(/^(?<hashes>#+)\s$/,_a.type(t),e=>{var n,s;const i=((s=(n=e.groups)==null?void 0:n.hashes)==null?void 0:s.length)||0,o=t.get(Yn),{$from:r}=o.state.selection,a=r.node();if(a.type.name==="heading"){let l=Number(a.attrs.level)+Number(i);return l>6&&(l=6),{level:l}}return{level:i}}));Re(yz,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const ac=en("WrapInHeading",t=>e=>(e??(e=1),e<1?o1(El.type(t)):o1(_a.type(t),{level:e})));Re(ac,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const y8=en("DowngradeHeading",t=>()=>(e,n,s)=>{const{$from:i}=e.selection,o=i.node();if(o.type!==_a.type(t)||!e.selection.empty||i.parentOffset!==0)return!1;const r=o.attrs.level-1;return r?(n==null||n(e.tr.setNodeMarkup(e.selection.$from.before(),void 0,{...o.attrs,level:r})),!0):o1(El.type(t))(e,n,s)});Re(y8,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const b8=_o("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(pn);return()=>e.call(ac.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(pn);return()=>e.call(y8.key)}}});Re(b8.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Re(b8.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const _8=ea("blockquote");Re(_8,{displayName:"Attr<blockquote>",group:"Blockquote"});const gp=Ns("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get(_8.key)(e),0],parseMarkdown:{match:({type:e})=>e==="blockquote",runner:(e,n,s)=>{e.openNode(s).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="blockquote",runner:(e,n)=>{e.openNode("blockquote").next(n.content).closeNode()}}}));Re(gp.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Re(gp.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const bz=bo(t=>Y5(/^\s*>\s$/,gp.type(t)));Re(bz,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const w8=en("WrapInBlockquote",t=>()=>Z5(gp.type(t)));Re(w8,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const x8=_o("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(pn);return()=>e.call(w8.key)}}});Re(x8.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Re(x8.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const k8=ea("codeBlock",()=>({pre:{},code:{}}));Re(k8,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const vp=Ns("code_block",t=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(k8.key)(e);return["pre",{...n.pre,"data-language":e.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>e==="code",runner:(e,n,s)=>{const i=n.lang,o=n.value;e.openNode(s,{language:i}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="code_block",runner:(e,n)=>{var s;e.addNode("code",void 0,((s=n.content.firstChild)==null?void 0:s.text)||"",{lang:n.attrs.language})}}}));Re(vp.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Re(vp.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const _z=bo(t=>tB(/^```(?<language>[a-z]*)?[\s\n]$/,vp.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Re(_z,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const C8=en("CreateCodeBlock",t=>(e="")=>o1(vp.type(t),{language:e}));Re(C8,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const m7e=en("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,s)=>t>=0?(s==null||s(n.tr.setNodeAttribute(t,"language",e)),!0):!1);Re(m7e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const S8=_o("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(pn);return()=>e.call(C8.key)}}});Re(S8.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Re(S8.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const $8=ea("image");Re($8,{displayName:"Attr<image>",group:"Image"});const Ud=Ns("image",t=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:""},title:{default:""}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get($8.key)(e),...e.attrs}],parseMarkdown:{match:({type:e})=>e==="image",runner:(e,n,s)=>{const i=n.url,o=n.alt,r=n.title;e.addNode(s,{src:i,alt:o,title:r})}},toMarkdown:{match:e=>e.type.name==="image",runner:(e,n)=>{e.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));Re(Ud.node,{displayName:"NodeSchema<image>",group:"Image"});Re(Ud.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const wz=en("InsertImage",t=>(e={})=>(n,s)=>{if(!s)return!0;const{src:i="",alt:o="",title:r=""}=e,a=Ud.type(t).create({src:i,alt:o,title:r});return a&&s(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});Re(wz,{displayName:"Command<insertImageCommand>",group:"Image"});const xz=en("UpdateImage",t=>(e={})=>(n,s)=>{const i=T8e(n.selection,Ud.type(t));if(!i)return!1;const{node:o,pos:r}=i,a={...o.attrs},{src:l,alt:c,title:u}=e;return l!==void 0&&(a.src=l),c!==void 0&&(a.alt=c),u!==void 0&&(a.title=u),s==null||s(n.tr.setNodeMarkup(r,void 0,a).scrollIntoView()),!0});Re(xz,{displayName:"Command<updateImageCommand>",group:"Image"});const g7e=bo(t=>new Uo(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,s,i)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(s,i,Ud.type(t).create({src:a,alt:r,title:l})):null}));Re(g7e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const Wb=ea("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Re(Wb,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const Qu=Ns("hardbreak",t=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:e=>e.attrs.isInline?["span",t.get(Wb.key)(e)," "]:["br",t.get(Wb.key)(e)],parseMarkdown:{match:({type:e})=>e==="break",runner:(e,n,s)=>{var i;e.addNode(s,{isInline:!!((i=n.data)!=null&&i.isInline)})}},leafText:()=>`
124 `,toMarkdown:{match:e=>e.type.name==="hardbreak",runner:(e,n)=>{n.attrs.isInline?e.addNode("text",void 0,`
125 `):e.addNode("break")}}}));Re(Qu.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Re(Qu.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const A8=en("InsertHardbreak",t=>()=>(e,n)=>{var s;const{selection:i,tr:o}=e;if(!(i instanceof It))return!1;if(i.empty){const r=i.$from.node();if(r.childCount>0&&((s=r.lastChild)==null?void 0:s.type.name)==="hardbreak")return n==null||n(o.replaceRangeWith(i.to-1,i.to,e.schema.node("paragraph")).setSelection(zt.near(o.doc.resolve(i.to))).scrollIntoView()),!0}return n==null||n(o.setMeta("hardbreak",!0).replaceSelectionWith(Qu.type(t).create()).scrollIntoView()),!0});Re(A8,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const E8=_o("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(pn);return()=>e.call(A8.key)}}});Re(E8.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Re(E8.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const M8=ea("hr");Re(M8,{displayName:"Attr<hr>",group:"Hr"});const ov=Ns("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(M8.key)(e)],parseMarkdown:{match:({type:e})=>e==="thematicBreak",runner:(e,n,s)=>{e.addNode(s)}},toMarkdown:{match:e=>e.type.name==="hr",runner:e=>{e.addNode("thematicBreak")}}}));Re(ov.node,{displayName:"NodeSchema<hr>",group:"Hr"});Re(ov.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const kz=bo(t=>new Uo(/^(?:---|___\s|\*\*\*\s)$/,(e,n,s,i)=>{const{tr:o}=e;return n[0]&&o.replaceWith(s-1,i,ov.type(t).create()),o}));Re(kz,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Cz=en("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const s=El.node.type(t).create(),{tr:i,selection:o}=e,{from:r}=o,a=ov.type(t).create();if(!a)return!0;const l=i.replaceSelectionWith(a).insert(r,s),c=zt.findFrom(l.doc.resolve(r),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0});Re(Cz,{displayName:"Command<insertHrCommand>",group:"Hr"});const T8=ea("bulletList");Re(T8,{displayName:"Attr<bulletList>",group:"BulletList"});const jd=Ns("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(T8.key)(e),"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!n,runner:(e,n,s)=>{const i=n.spread!=null?`${n.spread}`:"false";e.openNode(s,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="bullet_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread==="true"}).next(n.content).closeNode()}}}));Re(jd.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});Re(jd.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const Sz=bo(t=>Y5(/^\s*([-+*])\s$/,jd.type(t)));Re(Sz,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const P8=en("WrapInBulletList",t=>()=>Z5(jd.type(t)));Re(P8,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const I8=_o("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(pn);return()=>e.call(P8.key)}}});Re(I8.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Re(I8.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const L8=ea("orderedList");Re(L8,{displayName:"Attr<orderedList>",group:"OrderedList"});const Wd=Ns("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(L8.key)(e),...e.attrs.order===1?{}:e.attrs.order,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!!n,runner:(e,n,s)=>{const i=n.spread!=null?`${n.spread}`:"true";e.openNode(s,{spread:i}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="ordered_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!0,start:1,spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Re(Wd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});Re(Wd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const $z=bo(t=>Y5(/^\s*(\d+)\.\s$/,Wd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Re($z,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const O8=en("WrapInOrderedList",t=>()=>Z5(Wd.type(t)));Re(O8,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const D8=_o("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(pn);return()=>e.call(O8.key)}}});Re(D8.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Re(D8.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const R8=ea("listItem");Re(R8,{displayName:"Attr<listItem>",group:"ListItem"});const Ma=Ns("list_item",t=>({group:"listItem",content:"(paragraph|blockquote) block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Qr(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(R8.key)(e),"data-label":e.attrs.label,"data-list-type":e.attrs.listType,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e})=>e==="listItem",runner:(e,n,s)=>{const i=n.label!=null?`${n.label}.`:"•",o=n.label!=null?"ordered":"bullet",r=n.spread!=null?`${n.spread}`:"true";e.openNode(s,{label:i,listType:o,spread:r}),e.next(n.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="list_item",runner:(e,n)=>{e.openNode("listItem",void 0,{spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Re(Ma.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Re(Ma.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const V8=en("SinkListItem",t=>()=>u7e(Ma.type(t)));Re(V8,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const F8=en("LiftListItem",t=>()=>cz(Ma.type(t)));Re(F8,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const N8=en("SplitListItem",t=>()=>a7e(Ma.type(t)));Re(N8,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function v7e(t){return(e,n,s)=>{const{selection:i}=e;if(!(i instanceof It))return!1;const{empty:o,$from:r}=i;if(!o||r.parentOffset!==0)return!1;const a=r.node(-1);return a.type!==Ma.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:cz(Ma.type(t))(e,n,s)}}const B8=en("LiftFirstListItem",t=>()=>v7e(t));Re(B8,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const z8=_o("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(pn);return()=>e.call(N8.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(pn);return()=>e.call(V8.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(pn);return()=>e.call(F8.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(pn);return()=>e.call(B8.key)}}});Re(z8.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Re(z8.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const Az=r8("text",()=>({group:"inline",parseMarkdown:{match:({type:t})=>t==="text",runner:(t,e)=>{t.addText(e.value)}},toMarkdown:{match:t=>t.type.name==="text",runner:(t,e)=>{t.addNode("text",void 0,e.text)}}}));Re(Az,{displayName:"NodeSchema<text>",group:"Text"});const H8=ea("html");Re(H8,{displayName:"Attr<html>",group:"Html"});const U8=Ns("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),s={...t.get(H8.key)(e),"data-value":e.attrs.value,"data-type":"html"};return n.textContent=e.attrs.value,["span",s,e.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>e==="html",runner:(e,n,s)=>{e.addNode(s,{value:n.value})}},toMarkdown:{match:e=>e.type.name==="html",runner:(e,n)=>{e.addNode("html",void 0,n.attrs.value)}}}));Re(U8.node,{displayName:"NodeSchema<html>",group:"Html"});Re(U8.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const y7e=[vz,p8,El,M2,v8,_a,Wb,Qu,_8,gp,k8,vp,M8,ov,$8,Ud,T8,jd,L8,Wd,R8,Ma,a8,Hd,c8,mp,d8,ol,f8,Br,H8,U8,Az].flat(),b7e=[bz,Sz,$z,_z,kz,yz].flat(),_7e=[dz,hz,pz,fz],w7e=[m8,w8,ac,y8,C8,A8,Cz,wz,xz,O8,P8,V8,N8,F8,B8,$2,E2,A2,mz,gz],x7e=[x8,S8,E8,b8,z8,D8,I8,g8,l8,h8,u8].flat(),j8=zd("remarkAddOrderInList",()=>()=>t=>{Bd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((s,i)=>{s.label=i+n})}})});Re(j8.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Re(j8.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const W8=zd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;Bd(t,"text",(n,s,i)=>{if(!n.value||typeof n.value!="string")return;const o=[];let r=0;e.lastIndex=0;let a=e.exec(n.value);for(;a;){const l=a.index;r!==l&&o.push({type:"text",value:n.value.slice(r,l)}),o.push({type:"break",data:{isInline:!0}}),r=l+a[0].length,a=e.exec(n.value)}if(o.length>0&&i&&typeof s=="number")return r<n.value.length&&o.push({type:"text",value:n.value.slice(r)}),i.children.splice(s,1,...o),s+o.length})});Re(W8.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Re(W8.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const Y8=zd("remarkInlineLink",()=>h7e);Re(Y8.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Re(Y8.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const k7e=t=>!!t.children,C7e=t=>t.type==="html";function S7e(t,e){return n(t,0,null)[0];function n(s,i,o){if(k7e(s)){const r=[];for(let a=0,l=s.children.length;a<l;a++){const c=s.children[a];if(c){const u=n(c,a,s);if(u)for(let d=0,h=u.length;d<h;d++){const f=u[d];f&&r.push(f)}}}s.children=r}return e(s,i,o)}}const q8=zd("remarkHTMLTransformer",()=>()=>t=>{S7e(t,(e,n,s)=>C7e(e)?((s==null?void 0:s.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Re(q8.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Re(q8.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const G8=zd("remarkMarker",()=>()=>(t,e)=>{const n=s=>e.value.charAt(s.position.start.offset);Bd(t,s=>["strong","emphasis"].includes(s.type),s=>{s.marker=n(s)})});Re(G8.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Re(G8.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const Ez=Ts(()=>{let t=!1;const e=new fs("MILKDOWN_INLINE_NODES_CURSOR"),n=new rs({key:e,state:{init(){return!1},apply(s){if(!s.selection.empty)return!1;const i=s.selection.$from,o=i.nodeBefore,r=i.nodeAfter;return!!(o&&r&&o.isInline&&!o.isText&&r.isInline&&!r.isText)}},props:{handleDOMEvents:{compositionend:(s,i)=>t?(t=!1,requestAnimationFrame(()=>{if(n.getState(s.state)){const o=s.state.selection.from;i.preventDefault(),s.dispatch(s.state.tr.insertText(i.data||"",o))}}),!0):!1,compositionstart:s=>(n.getState(s.state)&&(t=!0),!1),beforeinput:(s,i)=>{if(n.getState(s.state)&&i instanceof InputEvent&&i.data&&!t){const o=s.state.selection.from;return i.preventDefault(),s.dispatch(s.state.tr.insertText(i.data||"",o)),!0}return!1}},decorations(s){if(n.getState(s)){const i=s.selection.$from.pos,o=document.createElement("span"),r=Ds.widget(i,o,{side:-1}),a=document.createElement("span"),l=Ds.widget(i,a);return setTimeout(()=>{o.contentEditable="true",a.contentEditable="true"}),Gn.create(s.doc,[r,l])}return Gn.empty}}});return n});Re(Ez,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const Mz=Ts(t=>new rs({key:new fs("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(e,n,s)=>{if(!e.length)return;const[i]=e;if(!i)return;const[o]=i.steps;if(i.getMeta("hardbreak")){if(!(o instanceof Js))return;const{from:r}=o;return s.tr.setNodeMarkup(r,Qu.type(t),void 0,[])}if(o instanceof il){let r=s.tr;const{from:a,to:l}=o;return s.doc.nodesBetween(a,l,(c,u)=>{c.type===Qu.type(t)&&(r=r.setNodeMarkup(u,Qu.type(t),void 0,[]))}),r}}}));Re(Mz,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const X8=ps(["table","code_block"],"hardbreakFilterNodes");Re(X8,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const Tz=Ts(t=>{const e=t.get(X8.key);return new rs({key:new fs("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,s)=>{const i=n.getMeta("hardbreak"),[o]=n.steps;if(i&&o){const{from:r}=o,a=s.doc.resolve(r);let l=a.depth,c=!0;for(;l>0;)e.includes(a.node(l).type.name)&&(c=!1),l--;return c}return!0}})});Re(Tz,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const Pz=Ts(t=>{const e=new fs("MILKDOWN_HEADING_ID"),n=s=>{if(s.composing)return;const i=t.get(M2.key),o=s.state.tr.setMeta("addToHistory",!1);let r=!1;s.state.doc.descendants((a,l)=>{if(a.type===_a.type(t)){if(a.textContent.trim().length===0)return;const c=a.attrs,u=i(a);c.id!==u&&(r=!0,o.setMeta(e,!0).setNodeMarkup(l,void 0,{...c,id:u}))}}),r&&s.dispatch(o)};return new rs({key:e,view:s=>(n(s),{update:(i,o)=>{i.state.doc.eq(o.doc)||n(i)}})})});Re(Pz,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const Iz=Ts(t=>{const e=n=>{if(n.composing||!n.editable)return;const s=Wd.type(t),i=jd.type(t),o=Ma.type(t),r=n.state,a=(u,d)=>{let h=!1;const f=`${d+1}.`;return u.label!==f&&(u.label=f,h=!0),h};let l=r.tr,c=!1;r.doc.descendants((u,d,h,f)=>{if(u.type===i){const p=u.maybeChild(0);(p==null?void 0:p.type)===o&&p.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(d,s,{spread:"true"}),u.descendants((m,b,_,x)=>{if(m.type===o){const k={...m.attrs};a(k,x)&&(l=l.setNodeMarkup(b,void 0,k))}return!1}))}else if(u.type===o&&(h==null?void 0:h.type)===s){const p={...u.attrs};let m=!1;p.listType!=="ordered"&&(p.listType="ordered",m=!0),h!=null&&h.maybeChild(0)&&(m=a(p,f)),m&&(l=l.setNodeMarkup(d,void 0,p),c=!0)}}),c&&n.dispatch(l.setMeta("addToHistory",!1))};return new rs({key:new fs("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:s=>{e(s)}})})});Re(Iz,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const $7e=[Mz,X8,Tz,Ez,j8,Y8,W8,q8,G8,Pz,Iz].flat(),A7e=[y7e,b7e,_7e,w7e,x7e,$7e].flat();var p6,m6;if(typeof WeakMap<"u"){let t=new WeakMap;p6=e=>t.get(e),m6=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;p6=s=>{for(let i=0;i<t.length;i+=2)if(t[i]==s)return t[i+1]},m6=(s,i)=>(n==10&&(n=0),t[n++]=s,t[n++]=i)}var Pn=class{constructor(t,e,n,s){this.width=t,this.height=e,this.map=n,this.problems=s}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const s=e%this.width,i=e/this.width|0;let o=s+1,r=i+1;for(let a=1;o<this.width&&this.map[e+a]==n;a++)o++;for(let a=1;r<this.height&&this.map[e+this.width*a]==n;a++)r++;return{left:s,top:i,right:o,bottom:r}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:s,right:i,top:o,bottom:r}=this.findCell(t);return e=="horiz"?(n<0?s==0:i==this.width)?null:this.map[o*this.width+(n<0?s-1:i)]:(n<0?o==0:r==this.height)?null:this.map[s+this.width*(n<0?o-1:r)]}rectBetween(t,e){const{left:n,right:s,top:i,bottom:o}=this.findCell(t),{left:r,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,r),top:Math.min(i,l),right:Math.max(s,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],n={};for(let s=t.top;s<t.bottom;s++)for(let i=t.left;i<t.right;i++){const o=s*this.width+i,r=this.map[o];n[r]||(n[r]=!0,!(i==t.left&&i&&this.map[o-1]==r||s==t.top&&s&&this.map[o-this.width]==r)&&e.push(r))}return e}positionAt(t,e,n){for(let s=0,i=0;;s++){const o=i+n.child(s).nodeSize;if(s==t){let r=e+t*this.width;const a=(t+1)*this.width;for(;r<a&&this.map[r]<i;)r++;return r==a?o-1:this.map[r]}i=o}}static get(t){return p6(t)||m6(t,E7e(t))}};function E7e(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=M7e(t),n=t.childCount,s=[];let i=0,o=null;const r=[];for(let c=0,u=e*n;c<u;c++)s[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let p=0;;p++){for(;i<s.length&&s[i]!=0;)i++;if(p==d.childCount)break;const m=d.child(p),{colspan:b,rowspan:_,colwidth:x}=m.attrs;for(let k=0;k<_;k++){if(k+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:_-k});break}const C=i+k*e;for(let S=0;S<b;S++){s[C+S]==0?s[C+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-S});const E=x&&x[S];if(E){const P=(C+S)%e*2,T=r[P];T==null||T!=E&&r[P+1]==1?(r[P]=E,r[P+1]=1):T==E&&r[P+1]++}}}i+=b,u+=m.nodeSize}const h=(c+1)*e;let f=0;for(;i<h;)s[i++]==0&&f++;f&&(o||(o=[])).push({type:"missing",row:c,n:f}),u++}const a=new Pn(e,n,s,o);let l=!1;for(let c=0;!l&&c<r.length;c+=2)r[c]!=null&&r[c+1]<n&&(l=!0);return l&&T7e(a,r,t),a}function M7e(t){let e=-1,n=!1;for(let s=0;s<t.childCount;s++){const i=t.child(s);let o=0;if(n)for(let r=0;r<s;r++){const a=t.child(r);for(let l=0;l<a.childCount;l++){const c=a.child(l);r+c.attrs.rowspan>s&&(o+=c.attrs.colspan)}}for(let r=0;r<i.childCount;r++){const a=i.child(r);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function T7e(t,e,n){t.problems||(t.problems=[]);const s={};for(let i=0;i<t.map.length;i++){const o=t.map[i];if(s[o])continue;s[o]=!0;const r=n.nodeAt(o);if(!r)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=r.attrs;for(let c=0;c<l.colspan;c++){const u=(i+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((a||(a=P7e(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function P7e(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function AM(t,e){if(typeof t=="string")return{};const n=t.getAttribute("data-colwidth"),s=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(r=>Number(r)):null,i=Number(t.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:s&&s.length==i?s:null};for(const r in e){const a=e[r].getFromDOM,l=a&&a(t);l!=null&&(o[r]=l)}return o}function EM(t,e){const n={};t.attrs.colspan!=1&&(n.colspan=t.attrs.colspan),t.attrs.rowspan!=1&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(","));for(const s in e){const i=e[s].setDOMAttr;i&&i(t.attrs[s],n)}return n}function I7e(t){const e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const s in e)n[s]={default:e[s].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:s=>AM(s,e)}],toDOM(s){return["td",EM(s,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:s=>AM(s,e)}],toDOM(s){return["th",EM(s,e),0]}}}}function _r(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const s=t.nodes[n],i=s.spec.tableRole;i&&(e[i]=s)}}return e}var hc=new fs("selectingCells");function rv(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function xr(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function T2(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=rv(e.$head)||L7e(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function L7e(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const s=e.type.spec.tableRole;if(s=="cell"||s=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const s=e.type.spec.tableRole;if(s=="cell"||s=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function g6(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function O7e(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function K8(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Lz(t,e,n){const s=t.node(-1),i=Pn.get(s),o=t.start(-1),r=i.nextCell(t.pos-o,e,n);return r==null?null:t.node(0).resolve(o+r)}function yd(t,e,n=1){const s={...t,colspan:t.colspan-n};return s.colwidth&&(s.colwidth=s.colwidth.slice(),s.colwidth.splice(e,n),s.colwidth.some(i=>i>0)||(s.colwidth=null)),s}function D7e(t,e,n=1){const s={...t,colspan:t.colspan+n};if(s.colwidth){s.colwidth=s.colwidth.slice();for(let i=0;i<n;i++)s.colwidth.splice(e,0,0)}return s}function R7e(t,e,n){const s=_r(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=s)return!1;return!0}var as=class qa extends zt{constructor(e,n=e){const s=e.node(-1),i=Pn.get(s),o=e.start(-1),r=i.rectBetween(e.pos-o,n.pos-o),a=e.node(0),l=i.cellsInRect(r).filter(u=>u!=n.pos-o);l.unshift(n.pos-o);const c=l.map(u=>{const d=s.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new Nb(a.resolve(h),a.resolve(h+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const s=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(g6(s)&&g6(i)&&K8(s,i)){const o=this.$anchorCell.node(-1)!=s.node(-1);return o&&this.isRowSelection()?qa.rowSelection(s,i):o&&this.isColSelection()?qa.colSelection(s,i):new qa(s,i)}return It.between(s,i)}content(){const e=this.$anchorCell.node(-1),n=Pn.get(e),s=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s),o={},r=[];for(let l=i.top;l<i.bottom;l++){const c=[];for(let u=l*n.width+i.left,d=i.left;d<i.right;d++,u++){const h=n.map[u];if(o[h])continue;o[h]=!0;const f=n.findCell(h);let p=e.nodeAt(h);if(!p)throw RangeError(`No cell with offset ${h} found`);const m=i.left-f.left,b=f.right-i.right;if(m>0||b>0){let _=p.attrs;if(m>0&&(_=yd(_,0,m)),b>0&&(_=yd(_,_.colspan-b,b)),f.left<i.left){if(p=p.type.createAndFill(_),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(_)}`)}else p=p.type.create(_,p.content)}if(f.top<i.top||f.bottom>i.bottom){const _={...p.attrs,rowspan:Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top)};f.top<i.top?p=p.type.createAndFill(_):p=p.type.create(_,p.content)}c.push(p)}r.push(e.child(l).copy(nt.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new it(nt.from(a),1,1)}replace(e,n=it.empty){const s=e.steps.length,i=this.ranges;for(let r=0;r<i.length;r++){const{$from:a,$to:l}=i[r],c=e.mapping.slice(s);e.replace(c.map(a.pos),c.map(l.pos),r?it.empty:n)}const o=zt.findFrom(e.doc.resolve(e.mapping.slice(s).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new it(nt.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),s=Pn.get(n),i=this.$anchorCell.start(-1),o=s.cellsInRect(s.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let r=0;r<o.length;r++)e(n.nodeAt(o[r]),i+o[r])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const s=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(s,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const s=e.node(-1),i=Pn.get(s),o=e.start(-1),r=i.findCell(e.pos-o),a=i.findCell(n.pos-o),l=e.node(0);return r.top<=a.top?(r.top>0&&(e=l.resolve(o+i.map[r.left])),a.bottom<i.height&&(n=l.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+i.map[a.left])),r.bottom<i.height&&(e=l.resolve(o+i.map[i.width*(i.height-1)+r.right-1]))),new qa(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Pn.get(e),s=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-s),o=n.colCount(this.$headCell.pos-s);if(Math.min(i,o)>0)return!1;const r=i+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,a)==n.width}eq(e){return e instanceof qa&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const s=e.node(-1),i=Pn.get(s),o=e.start(-1),r=i.findCell(e.pos-o),a=i.findCell(n.pos-o),l=e.node(0);return r.left<=a.left?(r.left>0&&(e=l.resolve(o+i.map[r.top*i.width])),a.right<i.width&&(n=l.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+i.map[a.top*i.width])),r.right<i.width&&(e=l.resolve(o+i.map[i.width*(r.top+1)-1]))),new qa(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new qa(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,s=n){return new qa(e.resolve(n),e.resolve(s))}getBookmark(){return new V7e(this.$anchorCell.pos,this.$headCell.pos)}};as.prototype.visible=!1;zt.jsonID("cell",as);var V7e=class Oz{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Oz(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),s=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&s.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&s.index()<s.parent.childCount&&K8(n,s)?new as(n,s):zt.near(s,1)}};function F7e(t){if(!(t.selection instanceof as))return null;const e=[];return t.selection.forEachCell((n,s)=>{e.push(Ds.node(s,s+n.nodeSize,{class:"selectedCell"}))}),Gn.create(t.doc,e)}function N7e({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,s=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,s--);return n==s&&/row|table/.test(t.node(i).type.spec.tableRole)}function B7e({$from:t,$to:e}){let n,s;for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){s=o;break}}return n!==s&&e.parentOffset===0}function z7e(t,e,n){const s=(e||t).selection,i=(e||t).doc;let o,r;if(s instanceof Ot&&(r=s.node.type.spec.tableRole)){if(r=="cell"||r=="header_cell")o=as.create(i,s.from);else if(r=="row"){const a=i.resolve(s.from+1);o=as.rowSelection(a,a)}else if(!n){const a=Pn.get(s.node),l=s.from+1,c=l+a.map[a.width*a.height-1];o=as.create(i,l+1,c)}}else s instanceof It&&N7e(s)?o=It.create(i,s.from):s instanceof It&&B7e(s)&&(o=It.create(i,s.$from.start(),s.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var H7e=new fs("fix-tables");function Dz(t,e,n,s){const i=t.childCount,o=e.childCount;e:for(let r=0,a=0;r<o;r++){const l=e.child(r);for(let c=a,u=Math.min(i,r+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}s(l,n),a<i&&t.child(a).sameMarkup(l)?Dz(t.child(a),l,n+1,s):l.nodesBetween(0,l.content.size,s,n+1),n+=l.nodeSize}}function U7e(t,e){let n;const s=(i,o)=>{i.type.spec.tableRole=="table"&&(n=j7e(t,i,o,n))};return e?e.doc!=t.doc&&Dz(e.doc,t.doc,0,s):t.doc.descendants(s),n}function j7e(t,e,n,s){const i=Pn.get(e);if(!i.problems)return s;s||(s=t.tr);const o=[];for(let l=0;l<i.height;l++)o.push(0);for(let l=0;l<i.problems.length;l++){const c=i.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let h=0;h<d.rowspan;h++)o[c.row+h]+=c.n;s.setNodeMarkup(s.mapping.map(n+1+c.pos),null,yd(d,d.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;s.setNodeMarkup(s.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;s.setNodeMarkup(s.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}}let r,a;for(let l=0;l<o.length;l++)o[l]&&(r==null&&(r=l),a=l);for(let l=0,c=n+1;l<i.height;l++){const u=e.child(l),d=c+u.nodeSize,h=o[l];if(h>0){let f="cell";u.firstChild&&(f=u.firstChild.type.spec.tableRole);const p=[];for(let b=0;b<h;b++){const _=_r(t.schema)[f].createAndFill();_&&p.push(_)}const m=(l==0||r==l-1)&&a==l?c+1:d-1;s.insert(s.mapping.map(m),p)}c=d}return s.setMeta(H7e,{fixTables:!0})}function tu(t){const e=t.selection,n=T2(t),s=n.node(-1),i=n.start(-1),o=Pn.get(s);return{...e instanceof as?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:s}}function Rz(t,{map:e,tableStart:n,table:s},i){let o=i>0?-1:0;R7e(e,s,i+o)&&(o=i==0||i==e.width?null:0);for(let r=0;r<e.height;r++){const a=r*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=s.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,D7e(c.attrs,i-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?_r(s.type.schema).cell:s.nodeAt(e.map[a+o]).type,c=e.positionAt(r,i,s);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function W7e(t,e){if(!xr(t))return!1;if(e){const n=tu(t);e(Rz(t.tr,n,n.left))}return!0}function Y7e(t,e){if(!xr(t))return!1;if(e){const n=tu(t);e(Rz(t.tr,n,n.right))}return!0}function q7e(t,{map:e,table:n,tableStart:s},i){const o=t.mapping.maps.length;for(let r=0;r<e.height;){const a=r*e.width+i,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(s+l),null,yd(u,i-e.colCount(l)));else{const d=t.mapping.slice(o).map(s+l);t.delete(d,d+c.nodeSize)}r+=u.rowspan}}function G7e(t,e){if(!xr(t))return!1;if(e){const n=tu(t),s=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;q7e(s,n,i),i!=n.left;i--){const o=n.tableStart?s.doc.nodeAt(n.tableStart-1):s.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(o)}e(s)}return!0}function X7e(t,{map:e,table:n,tableStart:s},i){let o=0;for(let c=0;c<i;c++)o+=n.child(c).nodeSize;const r=o+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(o+s,r+s);const l=new Set;for(let c=0,u=i*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),i>0&&d==e.map[u-e.width]){const h=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+s),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(i<e.height&&d==e.map[u+e.width]){const h=n.nodeAt(d),f=h.attrs,p=h.type.create({...f,rowspan:h.attrs.rowspan-1},h.content),m=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(a).map(s+m),p),c+=f.colspan-1}}}}function K7e(t,e){if(!xr(t))return!1;if(e){const n=tu(t),s=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;X7e(s,n,i),i!=n.top;i--){const o=n.tableStart?s.doc.nodeAt(n.tableStart-1):s.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(n.table)}e(s)}return!0}function Z7e(t,e){return function(n,s){if(!xr(n))return!1;const i=T2(n);if(i.nodeAfter.attrs[t]===e)return!1;if(s){const o=n.tr;n.selection instanceof as?n.selection.forEachCell((r,a)=>{r.attrs[t]!==e&&o.setNodeMarkup(a,null,{...r.attrs,[t]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),s(o)}return!0}}function J7e(t){return function(e,n){if(!xr(e))return!1;if(n){const s=_r(e.schema),i=tu(e),o=e.tr,r=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=r.map(l=>i.table.nodeAt(l));for(let l=0;l<r.length;l++)a[l].type==s.header_cell&&o.setNodeMarkup(i.tableStart+r[l],s.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<r.length;l++)o.setNodeMarkup(i.tableStart+r[l],s.header_cell,a[l].attrs);n(o)}return!0}}function MM(t,e,n){const s=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<s.length;i++){const o=e.table.nodeAt(s[i]);if(o&&o.type!==n.header_cell)return!1}return!0}function Z8(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?J7e(t):function(n,s){if(!xr(n))return!1;if(s){const i=_r(n.schema),o=tu(n),r=n.tr,a=MM("row",o,i),l=MM("column",o,i),u=(t==="column"?a:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:o.map.height}:t=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,h=t=="column"?l?i.cell:i.header_cell:t=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(d).forEach(f=>{const p=f+o.tableStart,m=r.doc.nodeAt(p);m&&r.setNodeMarkup(p,h,m.attrs)}),s(r)}return!0}}Z8("row",{useDeprecatedLogic:!0});Z8("column",{useDeprecatedLogic:!0});Z8("cell",{useDeprecatedLogic:!0});function Q7e(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let s=t.index(-1)-1,i=t.before();s>=0;s--){const o=t.node(-1).child(s),r=o.lastChild;if(r)return i-1-r.nodeSize;i-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let s=t.indexAfter(-1),i=t.after();s<n.childCount;s++){const o=n.child(s);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function Vz(t){return function(e,n){if(!xr(e))return!1;const s=Q7e(T2(e),t);if(s==null)return!1;if(n){const i=e.doc.resolve(s);n(e.tr.setSelection(It.between(i,O7e(i))).scrollIntoView())}return!0}}function e$e(t,e){const n=t.selection.$anchor;for(let s=n.depth;s>0;s--)if(n.node(s).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(s),n.after(s)).scrollIntoView()),!0;return!1}function c0(t,e){const n=t.selection;if(!(n instanceof as))return!1;if(e){const s=t.tr,i=_r(t.schema).cell.createAndFill().content;n.forEachCell((o,r)=>{o.content.eq(i)||s.replace(s.mapping.map(r+1),s.mapping.map(r+o.nodeSize-1),new it(i,0,0))}),s.docChanged&&e(s)}return!0}function t$e(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:s}=t;for(;e.childCount==1&&(n>0&&s>0||e.child(0).type.spec.tableRole=="table");)n--,s--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,r=i.type.schema,a=[];if(o=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,s-1);(u||d)&&(c=v6(_r(r).row,new it(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||s?v6(_r(r).row,new it(e,n,s)).content:e);else return null;return n$e(r,a)}function n$e(t,e){const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(let r=o.childCount-1;r>=0;r--){const{rowspan:a,colspan:l}=o.child(r).attrs;for(let c=i;c<i+a;c++)n[c]=(n[c]||0)+l}}let s=0;for(let i=0;i<n.length;i++)s=Math.max(s,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(nt.empty),n[i]<s){const o=_r(t).cell.createAndFill(),r=[];for(let a=n[i];a<s;a++)r.push(o);e[i]=e[i].append(nt.from(r))}return{height:e.length,width:s,rows:e}}function v6(t,e){const n=t.createAndFill();return new JN(n).replace(0,n.content.size,e).doc}function s$e({width:t,height:e,rows:n},s,i){if(t!=s){const o=[],r=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=o[a]||0,d=0;u<s;d++){let h=l.child(d%l.childCount);u+h.attrs.colspan>s&&(h=h.type.createChecked(yd(h.attrs,h.attrs.colspan,u+h.attrs.colspan-s),h.content)),c.push(h),u+=h.attrs.colspan;for(let f=1;f<h.attrs.rowspan;f++)o[a+f]=(o[a+f]||0)+h.attrs.colspan}r.push(nt.from(c))}n=r,t=s}if(e!=i){const o=[];for(let r=0,a=0;r<i;r++,a++){const l=[],c=n[a%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);r+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}o.push(nt.from(l))}n=o,e=i}return{width:t,height:e,rows:n}}function i$e(t,e,n,s,i,o,r){const a=t.doc.type.schema,l=_r(a);let c,u;if(i>e.width)for(let d=0,h=0;d<e.height;d++){const f=n.child(d);h+=f.nodeSize;const p=[];let m;f.lastChild==null||f.lastChild.type==l.cell?m=c||(c=l.cell.createAndFill()):m=u||(u=l.header_cell.createAndFill());for(let b=e.width;b<i;b++)p.push(m);t.insert(t.mapping.slice(r).map(h-1+s),p)}if(o>e.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const b=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,nt.from(d)),f=[];for(let p=e.height;p<o;p++)f.push(h);t.insert(t.mapping.slice(r).map(s+n.nodeSize-2),f)}return!!(c||u)}function TM(t,e,n,s,i,o,r,a){if(r==0||r==e.height)return!1;let l=!1;for(let c=i;c<o;c++){const u=r*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const h=n.nodeAt(d),{top:f,left:p}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(a).map(d+s),null,{...h.attrs,rowspan:r-f}),t.insert(t.mapping.slice(a).map(e.positionAt(r,p,n)),h.type.createAndFill({...h.attrs,rowspan:f+h.attrs.rowspan-r})),c+=h.attrs.colspan-1}}return l}function PM(t,e,n,s,i,o,r,a){if(r==0||r==e.width)return!1;let l=!1;for(let c=i;c<o;c++){const u=c*e.width+r,d=e.map[u];if(e.map[u-1]==d){l=!0;const h=n.nodeAt(d),f=e.colCount(d),p=t.mapping.slice(a).map(d+s);t.setNodeMarkup(p,null,yd(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(yd(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function IM(t,e,n,s,i){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let r=Pn.get(o);const{top:a,left:l}=s,c=l+i.width,u=a+i.height,d=t.tr;let h=0;function f(){if(o=n?d.doc.nodeAt(n-1):d.doc,!o)throw new Error("No table found");r=Pn.get(o),h=d.mapping.maps.length}i$e(d,r,o,n,c,u,h)&&f(),TM(d,r,o,n,l,c,a,h)&&f(),TM(d,r,o,n,l,c,u,h)&&f(),PM(d,r,o,n,a,u,l,h)&&f(),PM(d,r,o,n,a,u,c,h)&&f();for(let p=a;p<u;p++){const m=r.positionAt(p,l,o),b=r.positionAt(p,c,o);d.replace(d.mapping.slice(h).map(m+n),d.mapping.slice(h).map(b+n),new it(i.rows[p-a],0,0))}f(),d.setSelection(new as(d.doc.resolve(n+r.positionAt(a,l,o)),d.doc.resolve(n+r.positionAt(u-1,c-1,o)))),e(d)}var o$e=mB({ArrowLeft:u0("horiz",-1),ArrowRight:u0("horiz",1),ArrowUp:u0("vert",-1),ArrowDown:u0("vert",1),"Shift-ArrowLeft":d0("horiz",-1),"Shift-ArrowRight":d0("horiz",1),"Shift-ArrowUp":d0("vert",-1),"Shift-ArrowDown":d0("vert",1),Backspace:c0,"Mod-Backspace":c0,Delete:c0,"Mod-Delete":c0});function py(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function u0(t,e){return(n,s,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof as)return py(n,s,zt.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=Fz(i,t,e);if(r==null)return!1;if(t=="horiz")return py(n,s,zt.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=Lz(a,t,e);let c;return l?c=zt.near(l,1):e<0?c=zt.near(n.doc.resolve(a.before(-1)),-1):c=zt.near(n.doc.resolve(a.after(-1)),1),py(n,s,c)}}}function d0(t,e){return(n,s,i)=>{if(!i)return!1;const o=n.selection;let r;if(o instanceof as)r=o;else{const l=Fz(i,t,e);if(l==null)return!1;r=new as(n.doc.resolve(l))}const a=Lz(r.$headCell,t,e);return a?py(n,s,new as(r.$anchorCell,a)):!1}}function r$e(t,e){const n=t.state.doc,s=rv(n.resolve(e));return s?(t.dispatch(t.state.tr.setSelection(new as(s))),!0):!1}function a$e(t,e,n){if(!xr(t.state))return!1;let s=t$e(n);const i=t.state.selection;if(i instanceof as){s||(s={width:1,height:1,rows:[nt.from(v6(_r(t.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),r=i.$anchorCell.start(-1),a=Pn.get(o).rectBetween(i.$anchorCell.pos-r,i.$headCell.pos-r);return s=s$e(s,a.right-a.left,a.bottom-a.top),IM(t.state,t.dispatch,r,a,s),!0}else if(s){const o=T2(t.state),r=o.start(-1);return IM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),s),!0}else return!1}function l$e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const s=LM(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof as)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&s&&(i=rv(t.state.selection.$anchor))!=null&&((n=k3(t,e))==null?void 0:n.pos)!=i.pos)o(i,e),e.preventDefault();else if(!s)return;function o(l,c){let u=k3(t,c);const d=hc.getState(t.state)==null;if(!u||!K8(l,u))if(d)u=l;else return;const h=new as(l,u);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(hc,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),hc.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(hc,-1))}function a(l){const c=l,u=hc.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(LM(t,c.target)!=s&&(d=k3(t,e),!d))return r();d&&o(d,c)}t.root.addEventListener("mouseup",r),t.root.addEventListener("dragstart",r),t.root.addEventListener("mousemove",a)}function Fz(t,e,n){if(!(t.state.selection instanceof It))return null;const{$head:s}=t.state.selection;for(let i=s.depth-1;i>=0;i--){const o=s.node(i);if((n<0?s.index(i):s.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=s.before(i),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function LM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function k3(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?rv(t.state.doc.resolve(n.pos)):null}var c$e=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),y6(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,y6(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function y6(t,e,n,s,i,o){var r;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,h=0;d<u.childCount;d++){const{colspan:f,colwidth:p}=u.child(d).attrs;for(let m=0;m<f;m++,h++){const b=i==h?o:p&&p[m],_=b?b+"px":"";a+=b||s,b||(l=!1),c?(c.style.width!=_&&(c.style.width=_),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=_}}for(;c;){const d=c.nextSibling;(r=c.parentNode)==null||r.removeChild(c),c=d}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var ir=new fs("tableColumnResizing");function u$e({handleWidth:t=5,cellMinWidth:e=25,View:n=c$e,lastColumnResizable:s=!0}={}){const i=new rs({key:ir,state:{init(o,r){var a,l;const c=(l=(a=i.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=_r(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new d$e(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=ir.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{h$e(o,r,t,e,s)},mouseleave:o=>{f$e(o)},mousedown:(o,r)=>{p$e(o,r,e)}},decorations:o=>{const r=ir.getState(o);if(r&&r.activeHandle>-1)return _$e(o,r.activeHandle)},nodeViews:{}}});return i}var d$e=class my{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,s=e.getMeta(ir);if(s&&s.setHandle!=null)return new my(s.setHandle,!1);if(s&&s.setDragging!==void 0)return new my(n.activeHandle,s.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return g6(e.doc.resolve(i))||(i=-1),new my(i,n.dragging)}return n}};function h$e(t,e,n,s,i){const o=ir.getState(t.state);if(o&&!o.dragging){const r=g$e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=OM(t,e,"left",n):c-e.clientX<=n&&(a=OM(t,e,"right",n))}if(a!=o.activeHandle){if(!i&&a!==-1){const l=t.state.doc.resolve(a),c=l.node(-1),u=Pn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Nz(t,a)}}}function f$e(t){const e=ir.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Nz(t,-1)}function p$e(t,e,n){var s;const i=(s=t.dom.ownerDocument.defaultView)!=null?s:window,o=ir.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=m$e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(ir,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){i.removeEventListener("mouseup",l),i.removeEventListener("mousemove",c);const d=ir.getState(t.state);d!=null&&d.dragging&&(v$e(t,d.activeHandle,DM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(ir,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=ir.getState(t.state);if(d&&d.dragging){const h=DM(d.dragging,u,n);y$e(t,d.activeHandle,h,n)}}return i.addEventListener("mouseup",l),i.addEventListener("mousemove",c),e.preventDefault(),!0}function m$e(t,e,{colspan:n,colwidth:s}){const i=s&&s[s.length-1];if(i)return i;const o=t.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(s)for(let c=0;c<n;c++)s[c]&&(a-=s[c],l--);return a/l}function g$e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function OM(t,e,n,s){const i=n=="right"?-s:s,o=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:r}=o,a=rv(t.state.doc.resolve(r));if(!a)return-1;if(n=="right")return a.pos;const l=Pn.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function DM(t,e,n){const s=e.clientX-t.startX;return Math.max(n,t.startWidth+s)}function Nz(t,e){t.dispatch(t.state.tr.setMeta(ir,{setHandle:e}))}function v$e(t,e,n){const s=t.state.doc.resolve(e),i=s.node(-1),o=Pn.get(i),r=s.start(-1),a=o.colCount(s.pos-r)+s.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+a;if(c&&o.map[u]==o.map[u-o.width])continue;const d=o.map[u],h=i.nodeAt(d).attrs,f=h.colspan==1?0:a-o.colCount(d);if(h.colwidth&&h.colwidth[f]==n)continue;const p=h.colwidth?h.colwidth.slice():b$e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function y$e(t,e,n,s){const i=t.state.doc.resolve(e),o=i.node(-1),r=i.start(-1),a=Pn.get(o).colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1;let l=t.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&y6(o,l.firstChild,l,s,a,n)}function b$e(t){return Array(t).fill(0)}function _$e(t,e){const n=[],s=t.doc.resolve(e),i=s.node(-1);if(!i)return Gn.empty;const o=Pn.get(i),r=s.start(-1),a=o.colCount(s.pos-r)+s.nodeAfter.attrs.colspan-1;for(let l=0;l<o.height;l++){const c=a+l*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(l==0||o.map[c]!=o.map[c-o.width])){const u=o.map[c],d=r+u+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(Ds.widget(d,h))}}return Gn.create(t.doc,n)}function w$e({allowTableNodeSelection:t=!1}={}){return new rs({key:hc,state:{init(){return null},apply(e,n){const s=e.getMeta(hc);if(s!=null)return s==-1?null:s;if(n==null||!e.docChanged)return n;const{deleted:i,pos:o}=e.mapping.mapResult(n);return i?null:o}},props:{decorations:F7e,handleDOMEvents:{mousedown:l$e},createSelectionBetween(e){return hc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:r$e,handleKeyDown:o$e,handlePaste:a$e},appendTransaction(e,n,s){return z7e(s,U7e(s,n),t)}})}var Yb=typeof navigator<"u"?navigator:null,J8=Yb&&Yb.userAgent||"",x$e=/Edge\/(\d+)/.exec(J8),k$e=/MSIE \d/.exec(J8),C$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(J8),S$e=!!(k$e||C$e||x$e),$$e=!S$e&&!!Yb&&/Apple Computer/.test(Yb.vendor),Bz=new fs("safari-ime-span"),b6=!1,A$e={key:Bz,props:{decorations:E$e,handleDOMEvents:{compositionstart:()=>{b6=!0},compositionend:()=>{b6=!1}}}};function E$e(t){const{$from:e,$to:n,to:s}=t.selection;if(b6&&e.sameParent(n)){const i=Ds.widget(s,M$e,{ignoreSelection:!0,key:"safari-ime-span"});return Gn.create(t.doc,[i])}}function M$e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var T$e=new rs($$e?A$e:{key:Bz});function RM(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let s=0,i=n.indexOf(e);for(;i!==-1;)s++,i=n.indexOf(e,i+e.length);return s}function P$e(t,e,n){const i=h2((n||{}).ignore||[]),o=I$e(e);let r=-1;for(;++r<o.length;)$N(t,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=o[r][0],f=o[r][1];let p=0;const b=d.children.indexOf(c);let _=!1,x=[];h.lastIndex=0;let k=h.exec(c.value);for(;k;){const C=k.index,S={index:k.index,input:k.input,stack:[...u,c]};let E=f(...k,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?h.lastIndex=C+1:(p!==C&&x.push({type:"text",value:c.value.slice(p,C)}),Array.isArray(E)?x.push(...E):E&&x.push(E),p=C+k[0].length,_=!0),!h.global)break;k=h.exec(c.value)}return _?(p<c.value.length&&x.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...x)):x=[c],b+x.length}}function I$e(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let s=-1;for(;++s<n.length;){const i=n[s];e.push([L$e(i[0]),O$e(i[1])])}return e}function L$e(t){return typeof t=="string"?new RegExp(S2(t),"g"):t}function O$e(t){return typeof t=="function"?t:function(){return t}}const C3="phrasing",S3=["autolink","link","image","label"];function D$e(){return{transforms:[H$e],enter:{literalAutolink:V$e,literalAutolinkEmail:$3,literalAutolinkHttp:$3,literalAutolinkWww:$3},exit:{literalAutolink:z$e,literalAutolinkEmail:B$e,literalAutolinkHttp:F$e,literalAutolinkWww:N$e}}}function R$e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:C3,notInConstruct:S3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:C3,notInConstruct:S3},{character:":",before:"[ps]",after:"\\/",inConstruct:C3,notInConstruct:S3}]}}function V$e(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function $3(t){this.config.enter.autolinkProtocol.call(this,t)}function F$e(t){this.config.exit.autolinkProtocol.call(this,t)}function N$e(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function B$e(t){this.config.exit.autolinkEmail.call(this,t)}function z$e(t){this.exit(t)}function H$e(t){P$e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U$e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),j$e]],{ignore:["link","linkReference"]})}function U$e(t,e,n,s,i){let o="";if(!zz(i)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!W$e(n)))return!1;const r=Y$e(n+s);if(!r[0])return!1;const a={type:"link",title:null,url:o+e+r[0],children:[{type:"text",value:e+r[0]}]};return r[1]?[a,{type:"text",value:r[1]}]:a}function j$e(t,e,n,s){return!zz(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function W$e(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Y$e(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],s=n.indexOf(")");const i=RM(t,"(");let o=RM(t,")");for(;s!==-1&&i>o;)t+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),o++;return[t,n]}function zz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||md(n)||u2(n))&&(!e||n!==47)}Hz.peek=sAe;function q$e(){return{enter:{gfmFootnoteDefinition:X$e,gfmFootnoteDefinitionLabelString:K$e,gfmFootnoteCall:Q$e,gfmFootnoteCallString:eAe},exit:{gfmFootnoteDefinition:J$e,gfmFootnoteDefinitionLabelString:Z$e,gfmFootnoteCall:nAe,gfmFootnoteCallString:tAe}}}function G$e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:iAe,footnoteReference:Hz}}}function X$e(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function K$e(){this.buffer()}function Z$e(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Vr(this.sliceSerialize(t)).toLowerCase()}function J$e(t){this.exit(t)}function Q$e(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function eAe(){this.buffer()}function tAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Vr(this.sliceSerialize(t)).toLowerCase()}function nAe(t){this.exit(t)}function Hz(t,e,n,s){const i=n.createTracker(s);let o=i.move("[^");const r=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),a(),r(),o+=i.move("]"),o}function sAe(){return"["}function iAe(t,e,n,s){const i=n.createTracker(s);let o=i.move("[^");const r=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(t,i.current()),oAe)),r(),o}function oAe(t,e,n){return e===0?t:(n?"":" ")+t}const rAe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Uz.peek=dAe;function aAe(){return{canContainEols:["delete"],enter:{strikethrough:cAe},exit:{strikethrough:uAe}}}function lAe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rAe}],handlers:{delete:Uz}}}function cAe(t){this.enter({type:"delete",children:[]},t)}function uAe(t){this.exit(t)}function Uz(t,e,n,s){const i=n.createTracker(s),o=n.enter("strikethrough");let r=i.move("~~");return r+=n.containerPhrasing(t,{...i.current(),before:r,after:"~"}),r+=i.move("~~"),o(),r}function dAe(){return"~"}function hAe(t,e={}){const n=(e.align||[]).concat(),s=e.stringLength||pAe,i=[],o=[],r=[],a=[];let l=0,c=-1;for(;++c<t.length;){const p=[],m=[];let b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){const _=fAe(t[c][b]);if(e.alignDelimiters!==!1){const x=s(_);m[b]=x,(a[b]===void 0||x>a[b])&&(a[b]=x)}p.push(_)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)i[u]=VM(n[u]);else{const p=VM(n);for(;++u<l;)i[u]=p}u=-1;const d=[],h=[];for(;++u<l;){const p=i[u];let m="",b="";p===99?(m=":",b=":"):p===108?m=":":p===114&&(b=":");let _=e.alignDelimiters===!1?1:Math.max(1,a[u]-m.length-b.length);const x=m+"-".repeat(_)+b;e.alignDelimiters!==!1&&(_=m.length+_+b.length,_>a[u]&&(a[u]=_),h[u]=_),d[u]=x}o.splice(1,0,d),r.splice(1,0,h),c=-1;const f=[];for(;++c<o.length;){const p=o[c],m=r[c];u=-1;const b=[];for(;++u<l;){const _=p[u]||"";let x="",k="";if(e.alignDelimiters!==!1){const C=a[u]-(m[u]||0),S=i[u];S===114?x=" ".repeat(C):S===99?C%2?(x=" ".repeat(C/2+.5),k=" ".repeat(C/2-.5)):(x=" ".repeat(C/2),k=x):k=" ".repeat(C)}e.delimiterStart!==!1&&!u&&b.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&_==="")&&(e.delimiterStart!==!1||u)&&b.push(" "),e.alignDelimiters!==!1&&b.push(x),b.push(_),e.alignDelimiters!==!1&&b.push(k),e.padding!==!1&&b.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&b.push("|")}f.push(e.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return f.join(`
126 `)}function fAe(t){return t==null?"":String(t)}function pAe(t){return t.length}function VM(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function mAe(){return{enter:{table:gAe,tableData:FM,tableHeader:FM,tableRow:yAe},exit:{codeText:bAe,table:vAe,tableData:A3,tableHeader:A3,tableRow:A3}}}function gAe(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function vAe(t){this.exit(t),this.data.inTable=void 0}function yAe(t){this.enter({type:"tableRow",children:[]},t)}function A3(t){this.exit(t)}function FM(t){this.enter({type:"tableCell",children:[]},t)}function bAe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,_Ae));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function _Ae(t,e){return e==="|"?e:t}function wAe(t){const e=t||{},n=e.tableCellPadding,s=e.tablePipeAlign,i=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
127 `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:r,tableCell:l,tableRow:a}};function r(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const _=d(f,m,b),x=c([_]);return x.slice(0,x.indexOf(`
128 `))}function l(f,p,m,b){const _=m.enter("tableCell"),x=m.enter("phrasing"),k=m.containerPhrasing(f,{...b,before:o,after:o});return x(),_(),k}function c(f,p){return hAe(f,{align:p,alignDelimiters:s,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let _=-1;const x=[],k=p.enter("table");for(;++_<b.length;)x[_]=d(b[_],p,m);return k(),x}function d(f,p,m){const b=f.children;let _=-1;const x=[],k=p.enter("tableRow");for(;++_<b.length;)x[_]=l(b[_],f,p,m);return k(),x}function h(f,p,m){let b=B5.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function xAe(){return{exit:{taskListCheckValueChecked:NM,taskListCheckValueUnchecked:NM,paragraph:CAe}}}function kAe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:SAe}}}function NM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function CAe(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const s=n.children[0];if(s&&s.type==="text"){const i=e.children;let o=-1,r;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){r=a;break}}r===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(t)}function SAe(t,e,n,s){const i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",r="["+(t.checked?"x":" ")+"] ",a=n.createTracker(s);o&&a.move(r);let l=B5.listItem(t,e,n,{...s,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+r}}function $Ae(){return[D$e(),q$e(),aAe(),mAe(),xAe()]}function AAe(t){return{extensions:[R$e(),G$e(),lAe(),wAe(t),kAe()]}}const EAe={tokenize:OAe,partial:!0},jz={tokenize:DAe,partial:!0},Wz={tokenize:RAe,partial:!0},Yz={tokenize:VAe,partial:!0},MAe={tokenize:FAe,partial:!0},qz={name:"wwwAutolink",tokenize:IAe,previous:Xz},Gz={name:"protocolAutolink",tokenize:LAe,previous:Kz},Ml={name:"emailAutolink",tokenize:PAe,previous:Zz},Na={};function TAe(){return{text:Na}}let lu=48;for(;lu<123;)Na[lu]=Ml,lu++,lu===58?lu=65:lu===91&&(lu=97);Na[43]=Ml;Na[45]=Ml;Na[46]=Ml;Na[95]=Ml;Na[72]=[Ml,Gz];Na[104]=[Ml,Gz];Na[87]=[Ml,qz];Na[119]=[Ml,qz];function PAe(t,e,n){const s=this;let i,o;return r;function r(d){return!_6(d)||!Zz.call(s,s.previous)||Q8(s.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return _6(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(MAe,u,c)(d):d===45||d===95||ao(d)?(o=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),i=!0,l}function u(d){return o&&i&&Fi(s.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function IAe(t,e,n){const s=this;return i;function i(r){return r!==87&&r!==119||!Xz.call(s,s.previous)||Q8(s.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(EAe,t.attempt(jz,t.attempt(Wz,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function LAe(t,e,n){const s=this;let i="",o=!1;return r;function r(d){return(d===72||d===104)&&Kz.call(s,s.previous)&&!Q8(s.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(Fi(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===47?(t.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||Vb(d)||zn(d)||md(d)||u2(d)?n(d):t.attempt(jz,t.attempt(Wz,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function OAe(t,e,n){let s=0;return i;function i(r){return(r===87||r===119)&&s<3?(s++,t.consume(r),i):r===46&&s===3?(t.consume(r),o):n(r)}function o(r){return r===null?n(r):e(r)}}function DAe(t,e,n){let s,i,o;return r;function r(c){return c===46||c===95?t.check(Yz,l,a)(c):c===null||zn(c)||md(c)||c!==45&&u2(c)?l(c):(o=!0,t.consume(c),r)}function a(c){return c===95?s=!0:(i=s,s=void 0),t.consume(c),r}function l(c){return i||s||!o?n(c):e(c)}}function RAe(t,e){let n=0,s=0;return i;function i(r){return r===40?(n++,t.consume(r),i):r===41&&s<n?o(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?t.check(Yz,e,o)(r):r===null||zn(r)||md(r)?e(r):(t.consume(r),i)}function o(r){return r===41&&s++,t.consume(r),i}}function VAe(t,e,n){return s;function s(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),s):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||zn(a)||md(a)?e(a):n(a)}function i(a){return a===null||a===40||a===91||zn(a)||md(a)?e(a):s(a)}function o(a){return Fi(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),s):Fi(a)?(t.consume(a),r):n(a)}}function FAe(t,e,n){return s;function s(o){return t.consume(o),i}function i(o){return ao(o)?n(o):e(o)}}function Xz(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||zn(t)}function Kz(t){return!Fi(t)}function Zz(t){return!(t===47||_6(t))}function _6(t){return t===43||t===45||t===46||t===95||ao(t)}function Q8(t){let e=t.length,n=!1;for(;e--;){const s=t[e][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const NAe={tokenize:qAe,partial:!0};function BAe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jAe,continuation:{tokenize:WAe},exit:YAe}},text:{91:{name:"gfmFootnoteCall",tokenize:UAe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zAe,resolveTo:HAe}}}}function zAe(t,e,n){const s=this;let i=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let r;for(;i--;){const l=s.events[i][1];if(l.type==="labelImage"){r=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!r||!r._balanced)return n(l);const c=Vr(s.sliceSerialize({start:r.end,end:s.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function HAe(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[t[n+1],t[n+2],["enter",s,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",r,e],["exit",r,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",s,e]];return t.splice(n,t.length-n+1,...a),t}function UAe(t,e,n){const s=this,i=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,r;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!r||d===null||d===91||zn(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Vr(s.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return zn(d)||(r=!0),o++,t.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(t.consume(d),o++,c):c(d)}}function jAe(t,e,n){const s=this,i=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,r=0,a;return l;function l(p){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(p)}function u(p){if(r>999||p===93&&!a||p===null||p===91||zn(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=Vr(s.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return zn(p)||(a=!0),r++,t.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(t.consume(p),r++,u):u(p)}function h(p){return p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),i.includes(o)||i.push(o),gn(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function WAe(t,e,n){return t.check(Z1,e,t.attempt(NAe,e,n))}function YAe(t){t.exit("gfmFootnoteDefinition")}function qAe(t,e,n){const s=this;return gn(t,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const r=s.events[s.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?e(o):n(o)}}function GAe(t){let n=(t||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function i(r,a){let l=-1;for(;++l<r.length;)if(r[l][0]==="enter"&&r[l][1].type==="strikethroughSequenceTemporary"&&r[l][1]._close){let c=l;for(;c--;)if(r[c][0]==="exit"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._open&&r[l][1].end.offset-r[l][1].start.offset===r[c][1].end.offset-r[c][1].start.offset){r[l][1].type="strikethroughSequence",r[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},r[c][1].start),end:Object.assign({},r[l][1].end)},d={type:"strikethroughText",start:Object.assign({},r[c][1].end),end:Object.assign({},r[l][1].start)},h=[["enter",u,a],["enter",r[c][1],a],["exit",r[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&ur(h,h.length,0,d2(f,r.slice(c+1,l),a)),ur(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),ur(r,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<r.length;)r[l][1].type==="strikethroughSequenceTemporary"&&(r[l][1].type="data");return r}function o(r,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(r.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Fb(c);if(p===126)return d>1?l(p):(r.consume(p),d++,f);if(d<2&&!n)return l(p);const b=r.exit("strikethroughSequenceTemporary"),_=Fb(p);return b._open=!_||_===2&&!!m,b._close=!m||m===2&&!!_,a(p)}}}class XAe{constructor(){this.map=[]}add(e,n,s){KAe(this,e,n,s)}consume(e){if(this.map.sort(function(o,r){return o[0]-r[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];s.push([...e]),e.length=0;let i=s.pop();for(;i;)e.push(...i),i=s.pop();this.map.length=0}}function KAe(t,e,n,s){let i=0;if(!(n===0&&s.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...s);return}i+=1}t.map.push([e,n,s])}}function ZAe(t,e){let n=!1;const s=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&s.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return s}function JAe(){return{flow:{null:{name:"table",tokenize:QAe,resolveAll:eEe}}}}function QAe(t,e,n){const s=this;let i=0,o=0,r;return a;function a(I){let V=s.events.length-1;for(;V>-1;){const F=s.events[V][1].type;if(F==="lineEnding"||F==="linePrefix")V--;else break}const R=V>-1?s.events[V][1].type:null,N=R==="tableHead"||R==="tableRow"?E:l;return N===E&&s.parser.lazy[s.now().line]?n(I):N(I)}function l(I){return t.enter("tableHead"),t.enter("tableRow"),c(I)}function c(I){return I===124||(r=!0,o+=1),u(I)}function u(I){return I===null?n(I):At(I)?o>1?(o=0,s.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),f):n(I):rn(I)?gn(t,u,"whitespace")(I):(o+=1,r&&(r=!1,i+=1),I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),r=!0,u):(t.enter("data"),d(I)))}function d(I){return I===null||I===124||zn(I)?(t.exit("data"),u(I)):(t.consume(I),I===92?h:d)}function h(I){return I===92||I===124?(t.consume(I),d):d(I)}function f(I){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(I):(t.enter("tableDelimiterRow"),r=!1,rn(I)?gn(t,p,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):p(I))}function p(I){return I===45||I===58?b(I):I===124?(r=!0,t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),m):S(I)}function m(I){return rn(I)?gn(t,b,"whitespace")(I):b(I)}function b(I){return I===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),_):I===45?(o+=1,_(I)):I===null||At(I)?C(I):S(I)}function _(I){return I===45?(t.enter("tableDelimiterFiller"),x(I)):S(I)}function x(I){return I===45?(t.consume(I),x):I===58?(r=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(I),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(I))}function k(I){return rn(I)?gn(t,C,"whitespace")(I):C(I)}function C(I){return I===124?p(I):I===null||At(I)?!r||i!==o?S(I):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(I)):S(I)}function S(I){return n(I)}function E(I){return t.enter("tableRow"),P(I)}function P(I){return I===124?(t.enter("tableCellDivider"),t.consume(I),t.exit("tableCellDivider"),P):I===null||At(I)?(t.exit("tableRow"),e(I)):rn(I)?gn(t,P,"whitespace")(I):(t.enter("data"),T(I))}function T(I){return I===null||I===124||zn(I)?(t.exit("data"),P(I)):(t.consume(I),I===92?L:T)}function L(I){return I===92||I===124?(t.consume(I),T):T(I)}}function eEe(t,e){let n=-1,s=!0,i=0,o=[0,0,0,0],r=[0,0,0,0],a=!1,l=0,c,u,d;const h=new XAe;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(BM(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(s=!0,d=void 0,o=[0,0,0,0],r=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,e]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(s=!1,r[2]===0&&(o[1]!==0&&(r[0]=r[1],d=h0(h,e,o,i,void 0,d),o=[0,0,0,0]),r[2]=n)):p.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(r[0]=r[1],d=h0(h,e,o,i,void 0,d)),o=r,r=[o[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,o[1]!==0?(r[0]=r[1],d=h0(h,e,o,i,n,d)):r[1]!==0&&(d=h0(h,e,r,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&BM(h,e,l,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const f=e.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=ZAe(e.events,n))}return t}function h0(t,e,n,s,i,o){const r=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Lh(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=Lh(e.events,n[1]);if(o={type:r,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",o,e]]),n[2]!==0){const c=Lh(e.events,n[2]),u=Lh(e.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),s!==2){const h=e.events[n[2]],f=e.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;t.add(p,m,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return i!==void 0&&(o.end=Object.assign({},Lh(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function BM(t,e,n,s,i){const o=[],r=Lh(e.events,n);i&&(i.end=Object.assign({},r),o.push(["exit",i,e])),s.end=Object.assign({},r),o.push(["exit",s,e]),t.add(n+1,0,o)}function Lh(t,e){const n=t[e],s=n[0]==="enter"?"start":"end";return n[1][s]}const tEe={name:"tasklistCheck",tokenize:sEe};function nEe(){return{text:{91:tEe}}}function sEe(t,e,n){const s=this;return i;function i(l){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return zn(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),r):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),r):n(l)}function r(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return At(l)?e(l):rn(l)?t.check({tokenize:iEe},e,n)(l):n(l)}}function iEe(t,e,n){return gn(t,s,"whitespace");function s(i){return i===null?n(i):e(i)}}function oEe(t){return lN([TAe(),BAe(),GAe(t),JAe(),nEe()])}const rEe={};function aEe(t){const e=this,n=t||rEe,s=e.data(),i=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),r=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);i.push(oEe(n)),o.push($Ae()),r.push(AAe(n))}function Dt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const eS=iv("strike_through");Dt(eS,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const yp=sv("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(eS.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,s)=>{e.openMark(s),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Dt(yp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Dt(yp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const P2=en("ToggleStrikeThrough",t=>()=>_2(yp.type(t)));Dt(P2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const Jz=bo(t=>Q1(/~([^~]+)~$/,yp.type(t)));Dt(Jz,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const tS=_o("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(pn);return()=>e.call(P2.key)}}});Dt(tS.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Dt(tS.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const av=I7e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),bp=Ns("table",()=>({...av.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const s=e.align,i=e.children.map((o,r)=>({...o,align:s,isHeader:r===0}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{var n;const s=(n=e.content.firstChild)==null?void 0:n.content;if(!s)return;const i=[];s.forEach(o=>{i.push(o.attrs.alignment)}),t.openNode("table",void 0,{align:i}),t.next(e.content),t.closeNode()}}}));Dt(bp.node,{displayName:"NodeSchema<table>",group:"Table"});Dt(bp.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const I2=Ns("table_header_row",()=>({...av.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:t=>!!(t.type==="tableRow"&&t.isHeader),runner:(t,e,n)=>{const s=e.align,i=e.children.map((o,r)=>({...o,align:s[r],isHeader:e.isHeader}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header_row",runner:(t,e)=>{t.openNode("tableRow",void 0,{isHeader:!0}),t.next(e.content),t.closeNode()}}}));Dt(I2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Dt(I2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const lv=Ns("table_row",()=>({...av.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const s=e.align,i=e.children.map((o,r)=>({...o,align:s[r]}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{t.openNode("tableRow"),t.next(e.content),t.closeNode()}}}));Dt(lv.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Dt(lv.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const cv=Ns("table_cell",()=>({...av.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const s=e.align;t.openNode(n,{alignment:s}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:t=>t.type.name==="table_cell",runner:(t,e)=>{t.openNode("tableCell").next(e.content).closeNode()}}}));Dt(cv.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Dt(cv.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const L2=Ns("table_header",()=>({...av.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const s=e.align;t.openNode(n,{alignment:s}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header",runner:(t,e)=>{t.openNode("tableCell"),t.next(e.content),t.closeNode()}}}));Dt(L2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Dt(L2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function Qz(t,e=3,n=3){const s=Array(n).fill(0).map(()=>cv.type(t).createAndFill()),i=Array(n).fill(0).map(()=>L2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?I2.type(t).create(null,i):lv.type(t).create(null,s));return bp.type(t).create(null,o)}function uv(t){return G5(e=>e.type.spec.tableRole==="table")(t)}function Oh(t,e){const n=uv(e.$from);if(!n)return;const s=Pn.get(n.node);if(!(t<0||t>=s.width))return s.cellsInRect({left:t,right:t+1,top:0,bottom:s.height}).map(i=>{const o=n.node.nodeAt(i);if(!o)return;const r=i+n.start;return{pos:r,start:r+1,node:o}}).filter(i=>i!=null)}function Dh(t,e){const n=uv(e.$from);if(!n)return;const s=Pn.get(n.node);if(!(t<0||t>=s.height))return s.cellsInRect({left:0,right:s.width,top:t,bottom:t+1}).map(i=>{const o=n.node.nodeAt(i);if(!o)return;const r=i+n.start;return{pos:r,start:r+1,node:o}}).filter(i=>i!=null)}function lEe(t){const e=uv(t.$from);if(!e)return;const n=Pn.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(s=>{const i=e.node.nodeAt(s),o=s+e.start;return{pos:o,start:o+1,node:i}})}function cEe(t){const e=lEe(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),s=e[e.length-1];if(s){const i=t.doc.resolve(s.pos);return b2(t.setSelection(new as(i,n)))}}return t}function eH(t,e,{map:n,tableStart:s,table:i},o){const r=Array(o).fill(0).reduce((l,c,u)=>l+i.child(u).nodeSize,s),a=Array(n.width).fill(0).map((l,c)=>{const u=i.nodeAt(n.map[c]);return cv.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,lv.type(t).create(null,a)),e}function tH(t){return(e,n)=>s=>{n=n??s.selection.from;const i=s.doc.resolve(n),o=G5(l=>l.type.name==="table")(i),r=o?{node:o.node,from:o.start}:void 0,a=t==="row";if(r){const l=Pn.get(r.node);if(e>=0&&e<(a?l.height:l.width)){const c=l.positionAt(a?e:l.height-1,a?l.width-1:e,r.node),u=s.doc.resolve(r.from+c),d=a?as.rowSelection:as.colSelection,h=l.positionAt(a?e:0,a?0:e,r.node),f=s.doc.resolve(r.from+h);return b2(s.setSelection(d(u,f)))}}return s}}const uEe=tH("row"),dEe=tH("col");function zM(t){return t[0].map((e,n)=>t.map(s=>s[n]))}function nH(t,e){const n=[],s=Pn.get(t);for(let i=0;i<s.height;i++){const o=t.child(i),r=[];for(let a=0;a<s.width;a++){if(!e[i][a])continue;const l=s.map[i*s.width+a],c=e[i][a],u=t.nodeAt(l).type.createChecked(Object.assign({},c.attrs),c.content,c.marks);r.push(u)}n.push(o.type.createChecked(o.attrs,r,o.marks))}return t.type.createChecked(t.attrs,n,t.marks)}function sH(t){const e=Pn.get(t),n=[];for(let s=0;s<e.height;s++){const i=[],o={};for(let r=0;r<e.width;r++){const a=e.map[s*e.width+r],l=t.nodeAt(a),c=e.findCell(a);if(o[a]||c.top!==s){i.push(null);continue}o[a]=!0,i.push(l)}n.push(i)}return n}function iH(t,e,n,s){const i=e[0]>n[0]?-1:1,o=t.splice(e[0],e.length),r=o.length%2===0?1:0;let a;return s===-1&&i===1?a=n[0]-1:s===1&&i===-1?a=n[n.length-1]-r+1:a=i===-1?n[0]:n[n.length-1]-r,t.splice(a,0,...o),t}function hEe(t,e,n,s){let i=zM(sH(t.node));return i=iH(i,e,n,s),i=zM(i),nH(t.node,i)}function fEe(t,e,n,s){let i=sH(t.node);return i=iH(i,e,n,s),nH(t.node,i)}function HM(t,e){let n=t,s=t;for(let u=t;u>=0;u--){const d=Oh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;f>=n&&(n=u),f>s&&(s=f)})}for(let u=t;u<=s;u++){const d=Oh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;h.node.attrs.colspan>1&&f>s&&(s=f)})}const i=[];for(let u=n;u<=s;u++){const d=Oh(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=Oh(n,e.selection),r=Dh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=Oh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:i}}function UM(t,e){let n=t,s=t;for(let u=t;u>=0;u--)Dh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;h>=n&&(n=u),h>s&&(s=h)});for(let u=t;u<=s;u++)Dh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;d.node.attrs.rowspan>1&&h>s&&(s=h)});const i=[];for(let u=n;u<=s;u++){const d=Dh(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=Dh(n,e.selection),r=Oh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=Dh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:i}}function pEe(t){const{tr:e,origin:n,target:s,select:i=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=uv(r);if(!a)return e;const{indexes:l}=HM(n,e),{indexes:c}=HM(s,e);if(l.includes(s))return e;const u=hEe(a,l,c,0),d=b2(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!i)return d;const h=Pn.get(u),f=a.start,p=s,m=h.positionAt(h.height-1,p,u),b=d.doc.resolve(f+m),_=as.colSelection,x=h.positionAt(0,p,u),k=d.doc.resolve(f+x);return d.setSelection(_(b,k))}function mEe(t){const{tr:e,origin:n,target:s,select:i=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=uv(r);if(!a)return e;const{indexes:l}=UM(n,e),{indexes:c}=UM(s,e);if(l.includes(s))return e;const u=fEe(a,l,c,0),d=b2(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!i)return d;const h=Pn.get(u),f=a.start,p=s,m=h.positionAt(p,h.width-1,u),b=d.doc.resolve(f+m),_=as.rowSelection,x=h.positionAt(p,0,u),k=d.doc.resolve(f+x);return d.setSelection(_(b,k))}const nS=en("GoToPrevTableCell",()=>()=>Vz(-1));Dt(nS,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const sS=en("GoToNextTableCell",()=>()=>Vz(1));Dt(sS,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const iS=en("ExitTable",t=>()=>(e,n)=>{if(!xr(e))return!1;const{$head:s}=e.selection,i=A8e(s,bp.type(t));if(!i)return!1;const{to:o}=i,r=e.tr.replaceWith(o,o,El.type(t).createAndFill());return r.setSelection(zt.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Dt(iS,{displayName:"Command<breakTableCommand>",group:"Table"});const oH=en("InsertTable",t=>({row:e,col:n}={})=>(s,i)=>{const{selection:o,tr:r}=s,{from:a}=o,l=Qz(t,e,n),c=r.replaceSelectionWith(l),u=zt.findFrom(c.doc.resolve(a),1,!0);return u&&c.setSelection(u),i==null||i(c),!0});Dt(oH,{displayName:"Command<insertTableCommand>",group:"Table"});const rH=en("MoveRow",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(mEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Dt(rH,{displayName:"Command<moveRowCommand>",group:"Table"});const aH=en("MoveCol",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(pEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Dt(aH,{displayName:"Command<moveColCommand>",group:"Table"});const lH=en("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(uEe(t.index,t.pos)(s)))});Dt(lH,{displayName:"Command<selectRowCommand>",group:"Table"});const cH=en("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(dEe(t.index,t.pos)(s)))});Dt(cH,{displayName:"Command<selectColCommand>",group:"Table"});const uH=en("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e(cEe(n)))});Dt(uH,{displayName:"Command<selectTableCommand>",group:"Table"});const dH=en("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof as))return!1;const s=n.isRowSelection(),i=n.isColSelection();return s&&i?e$e(t,e):i?G7e(t,e):K7e(t,e)});Dt(dH,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const hH=en("AddColBefore",()=>()=>W7e);Dt(hH,{displayName:"Command<addColBeforeCommand>",group:"Table"});const fH=en("AddColAfter",()=>()=>Y7e);Dt(fH,{displayName:"Command<addColAfterCommand>",group:"Table"});const pH=en("AddRowBefore",t=>()=>(e,n)=>{if(!xr(e))return!1;if(n){const s=tu(e);n(eH(t,e.tr,s,s.top))}return!0});Dt(pH,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const mH=en("AddRowAfter",t=>()=>(e,n)=>{if(!xr(e))return!1;if(n){const s=tu(e);n(eH(t,e.tr,s,s.bottom))}return!0});Dt(mH,{displayName:"Command<addRowAfterCommand>",group:"Table"});const gH=en("SetAlign",()=>(t="left")=>Z7e("alignment",t));Dt(gH,{displayName:"Command<setAlignCommand>",group:"Table"});const vH=bo(t=>new Uo(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,s,i)=>{var o,r;const a=e.doc.resolve(s);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),bp.type(t)))return null;const l=Qz(t,Number((o=n.groups)==null?void 0:o.row),Number((r=n.groups)==null?void 0:r.col)),c=e.tr.replaceRangeWith(s,i,l);return c.setSelection(It.create(c.doc,s+3)).scrollIntoView()}));Dt(vH,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const oS=_o("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(pn);return()=>e.call(sS.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(pn);return()=>e.call(nS.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(pn);return()=>e.call(iS.key)}}});Dt(oS.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Dt(oS.shortcuts,{displayName:"Keymap<table>",group:"Table"});const E3="footnote_definition",jM="footnoteDefinition",rS=Ns("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${E3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Qr(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":E3},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===jM,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===E3,runner:(t,e)=>{t.openNode(jM,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Dt(rS.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Dt(rS.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const M3="footnote_reference",aS=Ns("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${M3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Qr(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":M3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===M3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Dt(aS.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Dt(aS.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const yH=Ma.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:s=>{if(!(s instanceof HTMLElement))throw Qr(s);return{label:s.dataset.label,listType:s.dataset.listType,spread:s.dataset.spread,checked:s.dataset.checked?s.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:s=>n.toDOM&&s.attrs.checked==null?n.toDOM(s):["li",{"data-item-type":"task","data-label":s.attrs.label,"data-list-type":s.attrs.listType,"data-spread":s.attrs.spread,"data-checked":s.attrs.checked},0],parseMarkdown:{match:({type:s})=>s==="listItem",runner:(s,i,o)=>{if(i.checked==null){n.parseMarkdown.runner(s,i,o);return}const r=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,l=i.label!=null?"ordered":"bullet",c=i.spread!=null?`${i.spread}`:"true";s.openNode(o,{label:r,listType:l,spread:c,checked:a}),s.next(i.children),s.closeNode()}},toMarkdown:{match:s=>s.type.name==="list_item",runner:(s,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(s,i);return}const o=i.attrs.label,r=i.attrs.listType,a=i.attrs.spread==="true",l=i.attrs.checked;s.openNode("listItem",void 0,{label:o,listType:r,spread:a,checked:l}),s.next(i.content),s.closeNode()}}}});Dt(yH,{displayName:"NodeSchema<listItem>",group:"ListItem"});const bH=bo(()=>new Uo(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,s)=>{var i;const o=t.doc.resolve(n);let r=0,a=o.node(r);for(;a&&a.type.name!=="list_item";)r--,a=o.node(r);if(!a||a.attrs.checked!=null)return null;const l=((i=e.groups)==null?void 0:i.checked)==="x",c=o.before(r),u=t.tr;return u.deleteRange(n,s).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}));Dt(bH,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const gEe=[tS,oS].flat(),vEe=[vH,bH],yEe=[Jz],_H=Ts(()=>T$e);Dt(_H,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const bEe=Ts(()=>u$e({}));Dt(bEe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const wH=Ts(()=>w$e({allowTableNodeSelection:!0}));Dt(wH,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const lS=zd("remarkGFM",()=>aEe);Dt(lS.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Dt(lS.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const _Ee=new fs("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function wEe(t,e){let n=0;return e.forEach((s,i,o)=>{s===t&&(n=o)}),n}const xH=Ts(()=>new rs({key:_Ee,appendTransaction:(t,e,n)=>{let s;const i=(o,r)=>{if(s||(s=n.tr),o.type.name!=="table_cell")return;const a=n.doc.resolve(r),l=a.node(a.depth),c=a.node(a.depth-1).firstChild;if(!c)return;const u=wEe(o,l),d=c.maybeChild(u);if(!d)return;const h=d.attrs.alignment,f=o.attrs.alignment;h!==f&&s.setNodeMarkup(r,void 0,{...o.attrs,alignment:h})};return e.doc!==n.doc&&n.doc.descendants(i),s}}));Dt(xH,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const xEe=[xH,_H,lS,wH].flat(),kEe=[yH,bp,I2,lv,L2,cv,rS,aS,eS,yp].flat(),CEe=[sS,nS,iS,oH,rH,aH,lH,cH,uH,dH,pH,mH,hH,fH,gH,P2],SEe=[kEe,vEe,yEe,gEe,CEe,xEe].flat();var qb=200,Us=function(){};Us.prototype.append=function(e){return e.length?(e=Us.from(e),!this.length&&e||e.length<qb&&this.leafAppend(e)||this.length<qb&&e.leafPrepend(this)||this.appendInner(e)):this};Us.prototype.prepend=function(e){return e.length?Us.from(e).append(this):this};Us.prototype.appendInner=function(e){return new $Ee(this,e)};Us.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Us.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Us.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Us.prototype.forEach=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length),n<=s?this.forEachInner(e,n,s,0):this.forEachInvertedInner(e,n,s,0)};Us.prototype.map=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length);var i=[];return this.forEach(function(o,r){return i.push(e(o,r))},n,s),i};Us.from=function(e){return e instanceof Us?e:e&&e.length?new kH(e):Us.empty};var kH=function(t){function e(s){t.call(this),this.values=s}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,r,a){for(var l=o;l<r;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,r,a){for(var l=o-1;l>=r;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=qb)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=qb)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Us);Us.empty=new kH([]);var $Ee=function(t){function e(n,s){t.call(this),this.left=n,this.right=s,this.length=n.length+s.length,this.depth=Math.max(n.depth,s.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(s){return s<this.left.length?this.left.get(s):this.right.get(s-this.left.length)},e.prototype.forEachInner=function(s,i,o,r){var a=this.left.length;if(i<a&&this.left.forEachInner(s,i,Math.min(o,a),r)===!1||o>a&&this.right.forEachInner(s,Math.max(i-a,0),Math.min(this.length,o)-a,r+a)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,r){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(s,i-a,Math.max(o,a)-a,r+a)===!1||o<a&&this.left.forEachInvertedInner(s,Math.min(i,a),o,r)===!1)return!1},e.prototype.sliceInner=function(s,i){if(s==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(s,i):s>=o?this.right.slice(s-o,i-o):this.left.slice(s,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(s){var i=this.right.leafAppend(s);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(s){var i=this.left.leafPrepend(s);if(i)return new e(i,this.right)},e.prototype.appendInner=function(s){return this.left.depth>=Math.max(this.right.depth,s.depth)+1?new e(this.left,new e(this.right,s)):new e(this,s)},e}(Us);const AEe=500;class Ar{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}let i,o;n&&(i=this.remapping(s,this.items.length),o=i.maps.length);let r=e.tr,a,l,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(s,h+1),o=i.maps.length),o--,u.push(d);return}if(i){u.push(new ha(d.map));let f=d.step.map(i.slice(o)),p;f&&r.maybeStep(f).doc&&(p=r.mapping.maps[r.mapping.maps.length-1],c.push(new ha(p,void 0,void 0,c.length+u.length))),o--,p&&i.appendMap(p,o)}else r.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(o)):d.selection,l=new Ar(this.items.slice(0,s).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:r,selection:a}}addTransform(e,n,s,i){let o=[],r=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),h=new ha(e.mapping.maps[u],d,n),f;(f=l&&l.merge(h))&&(h=f,u?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(r++,n=void 0),i||(l=h)}let c=r-s.depth;return c>MEe&&(a=EEe(a,c),r-=c),new Ar(a.append(o),r)}remapping(e,n){let s=new of;return this.items.forEach((i,o)=>{let r=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?s.maps.length-i.mirrorOffset:void 0;s.appendMap(i.map,r)},e,n),s}addMaps(e){return this.eventCount==0?this:new Ar(this.items.append(e.map(n=>new ha(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let s=[],i=Math.max(0,this.items.length-n),o=e.mapping,r=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;r=Math.min(r,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),b=h.selection&&h.selection.map(o.slice(l+1,f));b&&a++,s.push(new ha(p,m,b))}else s.push(new ha(p))},i);let c=[];for(let h=n;h<r;h++)c.push(new ha(o.maps[h]));let u=this.items.slice(0,i).append(c).append(s),d=new Ar(u,a);return d.emptyItemCount()>AEe&&(d=d.compress(this.items.length-s.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),s=n.maps.length,i=[],o=0;return this.items.forEach((r,a)=>{if(a>=e)i.push(r),r.selection&&o++;else if(r.step){let l=r.step.map(n.slice(s)),c=l&&l.getMap();if(s--,c&&n.appendMap(c,s),l){let u=r.selection&&r.selection.map(n.slice(s));u&&o++;let d=new ha(c.invert(),l,u),h,f=i.length-1;(h=i.length&&i[f].merge(d))?i[f]=h:i.push(d)}}else r.map&&s--},this.items.length,0),new Ar(Us.from(i.reverse()),o)}}Ar.empty=new Ar(Us.empty,0);function EEe(t,e){let n;return t.forEach((s,i)=>{if(s.selection&&e--==0)return n=i,!1}),t.slice(n)}class ha{constructor(e,n,s,i){this.map=e,this.step=n,this.selection=s,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new ha(n.getMap().invert(),n,this.selection)}}}class lc{constructor(e,n,s,i,o){this.done=e,this.undone=n,this.prevRanges=s,this.prevTime=i,this.prevComposition=o}}const MEe=20;function TEe(t,e,n,s){let i=n.getMeta(ed),o;if(i)return i.historyState;n.getMeta(LEe)&&(t=new lc(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(ed))return r.getMeta(ed).redo?new lc(t.done.addTransform(n,void 0,s,gy(e)),t.undone,WM(n.mapping.maps),t.prevTime,t.prevComposition):new lc(t.done,t.undone.addTransform(n,void 0,s,gy(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(r&&r.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!r&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-s.newGroupDelay||!PEe(n,t.prevRanges)),c=r?T3(t.prevRanges,n.mapping):WM(n.mapping.maps);return new lc(t.done.addTransform(n,l?e.selection.getBookmark():void 0,s,gy(e)),Ar.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new lc(t.done.rebased(n,o),t.undone.rebased(n,o),T3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new lc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),T3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function PEe(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((s,i)=>{for(let o=0;o<e.length;o+=2)s<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function WM(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((s,i,o,r)=>e.push(o,r));return e}function T3(t,e){if(!t)return null;let n=[];for(let s=0;s<t.length;s+=2){let i=e.map(t[s],1),o=e.map(t[s+1],-1);i<=o&&n.push(i,o)}return n}function IEe(t,e,n){let s=gy(e),i=ed.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,s);if(!o)return null;let r=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,s),l=new lc(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(ed,{redo:n,historyState:l})}let P3=!1,YM=null;function gy(t){let e=t.plugins;if(YM!=e){P3=!1,YM=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){P3=!0;break}}return P3}const ed=new fs("history"),LEe=new fs("closeHistory");function OEe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rs({key:ed,state:{init(){return new lc(Ar.empty,Ar.empty,null,0,-1)},apply(e,n,s){return TEe(n,s,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let s=n.inputType,i=s=="historyUndo"?SH:s=="historyRedo"?$H:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function CH(t,e){return(n,s)=>{let i=ed.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(s){let o=IEe(i,n,t);o&&s(e?o.scrollIntoView():o)}return!0}}const SH=CH(!1,!0),$H=CH(!0,!0);function _p(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const cS=en("Undo",()=>()=>SH);_p(cS,{displayName:"Command<undo>"});const uS=en("Redo",()=>()=>$H);_p(uS,{displayName:"Command<redo>"});const dS=ps({},"historyProviderConfig");_p(dS,{displayName:"Ctx<historyProviderConfig>"});const AH=Ts(t=>OEe(t.get(dS.key)));_p(AH,{displayName:"Ctx<historyProviderPlugin>"});const hS=_o("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(pn);return()=>e.call(cS.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(pn);return()=>e.call(uS.key)}}});_p(hS.ctx,{displayName:"KeymapCtx<history>"});_p(hS.shortcuts,{displayName:"Keymap<history>"});const DEe=[dS,AH,hS,cS,uS].flat();function w6(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:w6(t[0]);const e=t.content;return e?w6(e):t.type==="text"}function REe(t){if(t.content.childCount===1){const e=t.content.firstChild;if((e==null?void 0:e.type.name)==="text"&&e.marks.length===0)return e;if((e==null?void 0:e.type.name)==="paragraph"&&e.childCount===1){const n=e.firstChild;if((n==null?void 0:n.type.name)==="text"&&n.marks.length===0)return n}}return!1}const EH=Ts(t=>{const e=t.get(Nr);t.update(fg,s=>({...s,editable:s.editable??(()=>!0)}));const n=new fs("MILKDOWN_CLIPBOARD");return new rs({key:n,props:{handlePaste:(s,i)=>{var o,r;const a=t.get(uf),l=(r=(o=s.props).editable)==null?void 0:r.call(o,s.state),{clipboardData:c}=i;if(!l||!c||s.state.selection.$from.node().type.spec.code)return!1;const u=c.getData("text/plain"),d=c.getData("vscode-editor-data");if(d){const _=JSON.parse(d),x=_==null?void 0:_.mode;if(u&&x){const{tr:k}=s.state,C=E8e("code_block",e);return k.replaceSelectionWith(C.create({language:x})).setSelection(It.near(k.doc.resolve(Math.max(0,k.selection.from-2)))).insertText(u.replace(/\r\n?/g,`
129 `)),s.dispatch(k),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=c2.fromSchema(e);let p;if(h.length===0){const _=a(u);if(!_||typeof _=="string")return!1;p=Kc.fromSchema(e).serializeFragment(_.content)}else{const _=document.createElement("template");_.innerHTML=h,p=_.content.cloneNode(!0),_.remove()}const m=f.parseSlice(p),b=REe(m);return b?(s.dispatch(s.state.tr.replaceSelectionWith(b,!0)),!0):(s.dispatch(s.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:s=>{const i=t.get(df);if(w6(s.content.toJSON()))return s.content.textBetween(0,s.content.size,`
130
131 `);const o=e.topNodeType.createAndFill(void 0,s.content);return o?i(o):""}}})});EH.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const fS=ps({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");fS.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const MH=Ts(t=>{const e=new fs("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:s}=t.get(fS.key),i=new rs({key:e,state:{init:(o,r)=>{const a=r.tr.doc.lastChild;return n(a,r)},apply:(o,r,a,l)=>{if(!o.docChanged)return r;const c=o.doc.lastChild;return n(c,l)}},appendTransaction:(o,r,a)=>{const{doc:l,tr:c}=a,u=s==null?void 0:s(a),d=i.getState(a),h=l.content.size;if(!(!d||!u))return c.insert(h,u)}});return i});MH.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const VEe=[fS,MH];var TH=(t=>(t.CodeMirror="code-mirror",t.LinkTooltip="link-tooltip",t.Cursor="cursor",t.BlockEdit="block-edit",t.Toolbar="toolbar",t.Placeholder="placeholder",t.ImageBlock="image-block",t))(TH||{});const FEe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function NEe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:s}=await ku(()=>Promise.resolve().then(()=>vwt),void 0);return s(e,n)}case"block-edit":{const{defineFeature:s}=await ku(()=>Promise.resolve().then(()=>m3t),void 0);return s(e,n)}case"placeholder":{const{defineFeature:s}=await ku(()=>Promise.resolve().then(()=>b3t),void 0);return s(e,n)}case"toolbar":{const{defineFeature:s}=await ku(()=>Promise.resolve().then(()=>x3t),void 0);return s(e,n)}case"image-block":{const{defineFeature:s}=await ku(()=>Promise.resolve().then(()=>L3t),void 0);return s(e,n)}}}const BEe=wn([],"FeaturesCtx");function zEe(t){return e=>{e.inject(BEe,t)}}var HEe="Expected a function",qM=0/0,UEe="[object Symbol]",jEe=/^\s+|\s+$/g,WEe=/^[-+]0x[0-9a-f]+$/i,YEe=/^0b[01]+$/i,qEe=/^0o[0-7]+$/i,GEe=parseInt,XEe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,KEe=typeof self=="object"&&self&&self.Object===Object&&self,ZEe=XEe||KEe||Function("return this")(),JEe=Object.prototype,QEe=JEe.toString,eMe=Math.max,tMe=Math.min,I3=function(){return ZEe.Date.now()};function nMe(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(HEe);e=GM(e)||0,x6(n)&&(u=!!n.leading,d="maxWait"in n,o=d?eMe(GM(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var P=s,T=i;return s=i=void 0,c=E,r=t.apply(T,P),r}function p(E){return c=E,a=setTimeout(_,e),u?f(E):r}function m(E){var P=E-l,T=E-c,L=e-P;return d?tMe(L,o-T):L}function b(E){var P=E-l,T=E-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var E=I3();if(b(E))return x(E);a=setTimeout(_,m(E))}function x(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function C(){return a===void 0?r:x(I3())}function S(){var E=I3(),P=b(E);if(s=arguments,i=this,l=E,P){if(a===void 0)return p(l);if(d)return a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),r}return S.cancel=k,S.flush=C,S}function x6(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function sMe(t){return!!t&&typeof t=="object"}function iMe(t){return typeof t=="symbol"||sMe(t)&&QEe.call(t)==UEe}function GM(t){if(typeof t=="number")return t;if(iMe(t))return qM;if(x6(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=x6(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(jEe,"");var n=YEe.test(t);return n||qEe.test(t)?GEe(t.slice(2),n?2:8):WEe.test(t)?qM:+t}var oMe=nMe;const O2=fi(oMe);let PH=class{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=e=>(this.beforeMountedListeners.push(e),this),this.mounted=e=>(this.mountedListeners.push(e),this),this.updated=e=>(this.updatedListeners.push(e),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners}}markdownUpdated(e){return this.markdownUpdatedListeners.push(e),this}blur(e){return this.blurListeners.push(e),this}focus(e){return this.focusListeners.push(e),this}destroy(e){return this.destroyListeners.push(e),this}};const k6=wn(new PH,"listener"),rMe=new fs("MILKDOWN_LISTENER"),IH=t=>(t.inject(k6,new PH),async()=>{await t.wait(Ju);const e=t.get(k6),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(hg);const s=t.get(df);let i=null,o=null;const r=new rs({key:rMe,view:()=>({destroy:()=>{n.destroy.forEach(a=>a(t))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(a=>a(t)),!1),blur:()=>(n.blur.forEach(a=>a(t)),!1)}},state:{init:(a,l)=>{i=l.doc,o=s(l.doc)},apply:a=>!a.docChanged||a.getMeta("addToHistory")===!1?void 0:O2(()=>{const{doc:l}=a;if(n.updated.length>0&&i&&!i.eq(l)&&n.updated.forEach(c=>{c(t,l,i)}),n.markdownUpdated.length>0&&i&&!i.eq(l)){const c=s(l);n.markdownUpdated.forEach(u=>{u(t,c,o)}),o=c}i=l},200)()}});t.update(qr,a=>a.concat(r)),await t.wait(ly),n.mounted.forEach(a=>a(t))});IH.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function aMe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const lMe=async(t,e)=>{const n=[];for(let i=0;i<t.length;i++){const o=t.item(i);o&&o.type.includes("image")&&n.push(o)}const{image:s}=e.nodes;if(!s)throw NF("image");return(await Promise.all(n.map(i=>aMe(i)))).map(({alt:i,src:o})=>s.createAndFill({src:o,alt:i}))},hf=ps({uploader:lMe,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Ds.widget(t,n,e)}},"uploadConfig");hf.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const LH=Ts(t=>{const e=new fs("MILKDOWN_UPLOAD"),n=(i,o)=>{var r;const a=e.getState(i);if(!a)return-1;const l=a.find(void 0,void 0,c=>c.id===o);return l.length?((r=l[0])==null?void 0:r.from)??-1:-1},s=(i,o,r)=>{var a;if(!r||r.length<=0)return!1;const l=Symbol("upload symbol"),c=t.get(Nr),{tr:u}=i.state,d=o instanceof DragEvent?((a=i.posAtCoords({left:o.clientX,top:o.clientY}))==null?void 0:a.pos)??u.selection.from:u.selection.from;i.dispatch(u.setMeta(e,{add:{id:l,pos:d}}));const{uploader:h}=t.get(hf.key);return h(r,c).then(f=>{const p=n(i.state,l);p<0||i.dispatch(i.state.tr.replaceWith(p,p,f).setMeta(e,{remove:{id:l}}))}).catch(f=>{console.error(f)}),!0};return new rs({key:e,state:{init(){return Gn.empty},apply(i,o){const r=o.map(i.mapping,i.doc),a=i.getMeta(this);if(!a)return r;if(a.add){const{uploadWidgetFactory:l}=t.get(hf.key),c=l(a.add.pos,{id:a.add.id});return r.add(i.doc,[c])}if(a.remove){const l=r.find(void 0,void 0,c=>c.id===a.remove.id);return r.remove(l)}return r}},props:{decorations(i){return this.getState(i)},handlePaste:(i,o)=>{var r,a;const{enableHtmlFileUploader:l}=t.get(hf.key);return!(o instanceof ClipboardEvent)||!l&&(r=o.clipboardData)!=null&&r.getData("text/html")?!1:s(i,o,(a=o.clipboardData)==null?void 0:a.files)},handleDrop:(i,o)=>{var r;return o instanceof DragEvent?s(i,o,(r=o.dataTransfer)==null?void 0:r.files):!1}}})});LH.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const cMe=[hf,LH];var pS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Gs=(t,e,n)=>(pS(t,e,"read from private field"),n?n.call(t):e.get(t)),lh=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},km=(t,e,n,s)=>(pS(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),uMe=(t,e,n)=>(pS(t,e,"access private method"),n),Zo,Cm,pg,vy,ff,C6,OH;class DH{constructor({root:e,features:n={},featureConfigs:s={},defaultValue:i="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;lh(this,C6),lh(this,Zo,void 0),lh(this,Cm,void 0),lh(this,pg,void 0),lh(this,vy,!0),lh(this,ff,null);const a=Object.entries({...FEe,...n}).filter(([,d])=>d).map(([d])=>d);km(this,pg,(typeof e=="string"?document.querySelector(e):e)??document.body),km(this,Zo,W9e.make().config(zEe(a)).config(d=>{d.set(cy,Gs(this,pg)),d.set(oy,i),d.set(fg,{editable:()=>Gs(this,vy)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(hf.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(k6);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(A7e).use(DEe).use(VEe).use(EH).use(IH).use(cMe).use(SEe));const l=(u=s==null?void 0:s["block-edit"])==null?void 0:u.canAddImage;l&&Gs(this,Zo).use(Ts(()=>new rs({filterTransaction:d=>d.docChanged?!d.steps.some(f=>{var m,b;let p=!1;return(b=(m=f.slice)==null?void 0:m.content)==null||b.forEach(_=>{var x;_.type.name.includes("image")&&(p=!0),(x=_.content)==null||x.forEach(k=>{k.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Gs(this,Zo).use(Ts(()=>new rs({props:{handleTextInput(d,h,f,p){const m=d.state.schema.marks.link;if(p!==" "||!m)return!1;const b=d.state.doc.resolve(h),_=/(?:^|\s)((?:https?:\/\/|www\.)\S+)$/.exec(b.parent.textBetween(0,b.parentOffset,void 0,""));if(!_)return!1;const x=_[1].replace(/[.,)]+$/,""),k=h-_[1].length,C=k+x.length;if(d.state.doc.rangeHasMark(k,C,m))return!1;const S=(x.startsWith("http")?"":"https://")+x,E=d.state.tr.insertText(p,h).addMark(k,C,m.create({href:S})).removeStoredMark(m);return d.dispatch(E),!0}},appendTransaction:(d,h,f)=>{const p=f.schema.marks.link,m=f.selection.$cursor;if(!p||!m||!d.some(E=>E.docChanged))return null;const b=E=>E==null?void 0:E.marks.find(P=>P.type===p);if((f.storedMarks??m.marks()).some(E=>E.type===p)&&!b(m.nodeBefore)&&!b(m.nodeAfter))return f.tr.removeStoredMark(p);const k=m.pos;if(k<1||f.doc.textBetween(k-1,k)!==" "||!f.doc.rangeHasMark(k-1,k,p))return null;const C=b(f.doc.resolve(k-1).nodeBefore),S=b(f.doc.resolve(k).nodeAfter);return S&&(C==null?void 0:C.attrs.href)===S.attrs.href?null:f.tr.removeMark(k-1,k,p).removeStoredMark(p)}}))),Gs(this,Zo).use(Ts(()=>{let d=!1,h=!1;return new rs({view:f=>({update(){var C;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,b=S=>S.type===p,_=!!p&&!!(m!=null&&m.marks().some(b)),x=document.querySelector("milkdown-link-preview"),k=(x==null?void 0:x.style.display)==="none"&&!h;if(_&&!k){x&&h&&(x.style.display=""),h=!1;const S=f.coordsAtPos((C=m.nodeBefore)!=null&&C.marks.some(b)?m.pos-1:m.pos);f.dom.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,clientX:S.left+1,clientY:(S.top+S.bottom)/2}))}else!_&&d&&(f.dom.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0})),x&&(x.style.display="none"),h=!0);d=_}})})}));const c=[];a.forEach(d=>{const h=s[d];c.push(NEe(d,Gs(this,Zo),h))}),km(this,Cm,Promise.all(c))}async create(){await Gs(this,Cm);const e=await Gs(this,Zo).create();return uMe(this,C6,OH).call(this),e}async destroy(){var e;return(e=Gs(this,ff))==null||e.disconnect(),await Gs(this,Cm),Gs(this,Zo).destroy()}get editor(){return Gs(this,Zo)}setReadonly(e){return km(this,vy,!e),this}getMarkdown(){return Gs(this,Zo).action(Z9e())}getEditor(){return Gs(this,Zo)}destroyEditor(){this.destroy()}}Zo=new WeakMap;Cm=new WeakMap;pg=new WeakMap;vy=new WeakMap;ff=new WeakMap;C6=new WeakSet;OH=function(){const t=Gs(this,pg),e=s=>{parseFloat(s.style.left)<0&&(s.style.left="0px")},n=s=>{const i=t.querySelector(s);i&&(Gs(this,ff).observe(i,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(i),0))};km(this,ff,new MutationObserver(s=>{const i=s[0];i.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(i.target)})),Gs(this,ff).observe(t,{childList:!0,subtree:!0})};DH.Feature=TH;const dMe=Symbol("editorInfoCtxKey"),hMe=he({name:"MilkdownProvider",setup:(t,{slots:e})=>(Et(dMe,{loading:J(!0),dom:J(null),editor:J(void 0),editorFactory:J(void 0)}),()=>{var r;return y(te,null,[(r=e.default)==null?void 0:r.call(e)])})});var fMe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},RH=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},S6=(t,e,n)=>(fMe(t,e,"access private method"),n),yy,$6;let pMe=class{constructor({node:e,view:n,getPos:s,decorations:i,innerDecorations:o,options:r}){RH(this,yy),this.selected=!1,this.selectNode=()=>{var a,l;this.selected=!0,(l=(a=this.options).selectNode)==null||l.call(a)},this.deselectNode=()=>{var a,l;this.selected=!1,(l=(a=this.options).deselectNode)==null||l.call(a)},this.shouldUpdate=a=>!(a.type!==this.node.type||a.sameMarkup(this.node)&&a.content.eq(this.node.content)),this.update=(a,l,c)=>{var u,d;const h=this.options.update;let f;return h&&(f=h(a,l,c)),typeof f!="boolean"&&(f=this.shouldUpdate(a)),this.node=a,this.decorations=l,this.innerDecorations=c,f&&((d=(u=this.options).onUpdate)==null||d.call(u)),f},this.shouldIgnoreMutation=a=>!this.dom||!this.contentDOM||this.node.isLeaf||this.node.isAtom?!0:a.type==="selection"?!1:this.contentDOM===a.target&&a.type==="attributes"?!0:!this.contentDOM.contains(a.target),this.ignoreMutation=a=>{if(!this.dom||!this.contentDOM)return!0;let l;const c=this.options.ignoreMutation;return c&&(l=c(a)),typeof l!="boolean"&&(l=this.shouldIgnoreMutation(a)),l},this.destroy=()=>{var a,l,c;(l=(a=this.options).destroy)==null||l.call(a),this.dom.remove(),(c=this.contentDOM)==null||c.remove()},this.setAttrs=a=>{const{dispatch:l,state:c}=this.view,u=this.getPos();if(typeof u=="number")return l(c.tr.setNodeMarkup(u,void 0,{...this.node.attrs,...a}))},this.node=e,this.view=n,this.getPos=s,this.decorations=i,this.innerDecorations=o,this.options=r,this.dom=this.createDOM(r.as),this.contentDOM=e.isLeaf?null:this.createContentDOM(r.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=r.setSelection,this.stopEvent=r.stopEvent}createDOM(e){return S6(this,yy,$6).call(this,e)}createContentDOM(e){return S6(this,yy,$6).call(this,e)}get component(){return this.options.component}};yy=new WeakSet,$6=function(t){const{node:e}=this;return t==null?document.createElement(e.isInline?"span":"div"):t instanceof HTMLElement?t:t instanceof Function?t(e):document.createElement(t)};let mMe=class{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,n;let s=(n=(e=this.options).root)==null?void 0:n.call(e,this.view.dom);return s||(s=this.view.dom.parentElement??document.body),s}update(e,n){var s,i;this.view=e,this.prevState=n,(i=(s=this.options).update)==null||i.call(s,e,n)}destroy(){var e,n;(n=(e=this.options).destroy)==null||n.call(e)}};var A6,VH;let gMe=class{constructor({pos:e,spec:n,options:s}){RH(this,A6),this.pos=e,this.options=s,this.spec=n,this.dom=S6(this,A6,VH).call(this,s.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,n){this.view=e,this.getPos=n}get component(){return this.options.component}};A6=new WeakSet,VH=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let mS=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var vMe=Object.defineProperty,yMe=(t,e,n)=>e in t?vMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rr=(t,e,n)=>(yMe(t,typeof e!="symbol"?e+"":e,n),n);const bMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),_Me=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let wMe=class extends pMe{constructor(){super(...arguments),rr(this,"key",mS()),rr(this,"context",{contentRef:e=>{e&&e instanceof HTMLElement&&this.contentDOM&&e.firstChild!==this.contentDOM&&e.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:Zn(this.node),selected:Zn(this.selected),decorations:Zn(this.decorations),innerDecorations:Zn(this.innerDecorations)}),rr(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([e,n])=>{const s=this.context[e];s.value!==n&&(s.value=n)})}),rr(this,"render",()=>{const e=this.component;return Ai(he({name:"ProsemirrorNodeView",setup:()=>(Et(bMe,this.context),()=>y(Ta,{key:this.key,to:this.dom},{default:()=>[y(e,null,null)]}))}))})}};const xMe=(t,e)=>n=>(s,i,o,r,a)=>{const l=new wMe({node:s,view:i,getPos:o,decorations:r,innerDecorations:a,options:{...n,onUpdate(){var c;(c=n.onUpdate)==null||c.call(n),l.updateContext()},selectNode(){var c;(c=n.selectNode)==null||c.call(n),l.updateContext()},deselectNode(){var c;(c=n.deselectNode)==null||c.call(n),l.updateContext()},destroy(){var c;(c=n.destroy)==null||c.call(n),e(l)}}});return t(l),l},kMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),CMe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let SMe=class extends mMe{constructor(){super(...arguments),rr(this,"key",mS()),rr(this,"context",{view:Zn(this.view),prevState:Zn(this.prevState)}),rr(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([e,n])=>{const s=this.context[e];if(e==="view"){const i=Object.assign(Object.create(Object.getPrototypeOf(n)),n);s.value=i;return}s.value=n})}),rr(this,"render",()=>{const e=this.component;return Ai(he({name:"ProsemirrorNodeView",setup:()=>(Et(kMe,this.context),()=>y(Ta,{key:this.key,to:this.root},{default:()=>[y(e,null,null)]}))}))})}};const $Me=(t,e)=>n=>s=>{const i=new SMe({view:s,options:{...n,update:(o,r)=>{var a;(a=n.update)==null||a.call(n,o,r),i.updateContext()},destroy:()=>{var o;(o=n.destroy)==null||o.call(n),e(i)}}});return t(i),i},AMe=()=>{const t=J({}),e=ht(),n=Ai({});return Sd(()=>{n.updater=()=>{e==null||e.update()}}),xl(()=>{n.updater=void 0}),{portals:t,renderVueRenderer:s=>{var i;t.value[s.key]=s.render(),(i=n.updater)==null||i.call(n)},removeVueRenderer:s=>{delete t.value[s.key]}}},EMe=Symbol("[ProsemirrorAdapter]widgetViewContext"),MMe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let TMe=class extends gMe{constructor(){super(...arguments),rr(this,"key",mS()),rr(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),rr(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),rr(this,"render",()=>{const e=this.component;return Ai(he({name:"ProsemirrorWidgetView",setup:()=>(Et(EMe,this.context),()=>y(Ta,{key:this.key,to:this.dom},{default:()=>[y(e,null,null)]}))}))})}};const PMe=(t,e)=>n=>(s,i={})=>{const o=new TMe({pos:s,options:n}),r={...i,destroy:a=>{var l;(l=i.destroy)==null||l.call(i,a),e(o)}};return o.spec=r,Ds.widget(s,(a,l)=>(o.bind(a,l),o.updateContext(),t(o),o.dom),r)},IMe=he({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:s,removeVueRenderer:i}=AMe(),o=xMe(s,i),r=$Me(s,i),a=PMe(s,i);return Et(_Me,o),Et(CMe,r),Et(MMe,a),()=>{var l;return y(te,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>vt(c))])}}}),LMe={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},mentionQuery:{type:Object,default:()=>({})},autofocus_changed:{type:[Boolean,Number],default:!1},disable_mention:{type:Boolean,default:!1},disable_media:{type:Boolean,default:!1},defaultMentions:{type:Array,default:()=>[]},context:{type:String,default:""},is_modal:{type:Boolean,default:!1},onInlineUpload:{type:Function,default:null},canAddImage:{type:Function,default:null}},components:{MilkdownProvider:hMe,ProsemirrorAdapterProvider:IMe},data(){return{editor:null,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1,hasUnsavedChanges:!1,pendingNavigation:null,activeUploadBlock:null}},watch:{autofocus_changed(t){t&&this.focusOnEditor()},currentContent(){var e;const t=this.context==="feed"||this.context==="comment";this.hasUnsavedChanges=t&&!!((e=this.currentContent)!=null&&e.replace(/&#x20;|\u00A0/gi,"").trim()),this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=this.hasUnsavedChanges)}},methods:{updateContent(t){this.editor.action(e=>{const n=e.get(Yn),{state:s}=n,{from:i}=s.selection,o=t,r=s.tr.insertText(o,i),a=i+o.length,l=r.setSelection(It.create(r.doc,a));n.dispatch(l),n.focus()})},initEditor(){const t=this,e=new DH({root:this.$refs.crepe_editor_vue,defaultValue:this.modelValue,featureConfigs:{placeholder:{text:this.placeholder||this.$t("Type your message here!"),mode:"doc"},"block-edit":{hasImageBlock:!this.disable_media&&!!this.onInlineUpload,canAddImage:this.canAddImage},"image-block":{onUpload:async n=>{if(!this.onInlineUpload)return null;this.activeUploadBlock&&this.activeUploadBlock.classList.add("uploading");try{return await this.onInlineUpload(n)}finally{this.activeUploadBlock&&(this.activeUploadBlock.classList.remove("uploading"),this.activeUploadBlock=null)}},blockUploadButton:()=>this.$t("Upload image"),blockConfirmButton:()=>this.$t("Confirm"),blockUploadPlaceholderText:this.$t("or paste link")}},onUpdate(n){n=n.replace(/!\[[^\]]*\]\(\s*\)/g,""),t.$emit("update:modelValue",n),t.currentContent=n},async handleCommonActions(n,s){if(n==="editor_updated"){if(t.disable_mention)return!1;t.checkforMention(s)}else if(n==="handleFileUpload")return t.disable_media?[]:await t.handleFileUpload(s)}});e.create().then(()=>{this.editor=e.getEditor(),this.focusOnEditor(),this.$emit("editorCreated")})},focusOnEditor(t=null){!t&&!this.autofocus||!this.editor||this.editor.action(e=>{const n=e.get(Yn),{state:s}=n;let i=null;t&&s.doc.descendants((r,a)=>{if(r.isText&&r.text){const l=r.text.lastIndexOf(t);l!==-1&&(i=a+l+t.length+1)}});const o=i!==null?Math.min(i,s.doc.content.size-1):Math.max(1,s.doc.content.size-1);n.dispatch(s.tr.setSelection(It.create(s.doc,o))),n.focus()})},checkforMention(t){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=t.get(Yn),{state:s}=n,{selection:i}=s;if(!i)return;const r=s.doc.textBetween(0,i.to," ").match(/@([\p{L}\p{M}\p{N}_.-]+)$/u);if(!r){this.showMentionPop=!1,this.currentMentionSearch="";return}let a=r[1];if(!a||a.length<3){if(this.defaultMentions&&this.defaultMentions.length){let l=a.toLowerCase(),c=this.defaultMentions.filter(u=>u.username.toLowerCase().includes(l)||u.display_name.toLowerCase().includes(l));c.length&&(this.currentMentionSearch=a,this.mentionResults=c,this.showMentionPop=!0)}return}if(this.currentMentionSearch&&(this.currentMentionSearch=a,this.searchingMention))return!1;this.searchingMention=!0,this.currentMentionSearch=a,this.$get("members",{mention:this.currentMentionSearch,...this.mentionQuery}).then(l=>{this.mentionResults=l.members.data,this.showMentionPop=!0}).finally(()=>{this.searchingMention=!1})},addMention(t){if(this.disable_mention)return;const e=new RegExp(`@${this.currentMentionSearch}(?!.*@${this.currentMentionSearch})`);this.currentContent=this.currentContent.replace(e,t+" "),this.editor.action(J9e(this.currentContent)),this.focusOnEditor(t),this.showMentionPop=!1,this.currentMentionSearch="",this.justReplaced=!0,setTimeout(()=>{this.justReplaced=!1},2e3)},async handleFileUpload(t){const e=t.files;for(let n=0;n<e.length;n++){const s=e.item(n);if(s&&s.type.includes("image"))if(this.onInlineUpload){if(this.canAddImage&&!this.canAddImage())continue;await this.insertInlineImage(s)}else this.$emit("handleMediaUpload",s)}return[]},async insertInlineImage(t){try{const e=await this.onInlineUpload(t);if(!e)return;this.editor.action(n=>{const s=n.get(Yn),{state:i}=s,o=i.schema.nodes["image-block"];if(!o)return;const r=o.create({src:e,caption:"",ratio:1}),{$from:a}=i.selection,l=a.after(1),c=i.tr.insert(l,r);s.dispatch(c),s.focus()})}catch{}},handleBeforeUnload(t){this.hasUnsavedChanges&&(t.preventDefault(),t.returnValue="")},handleLinkClick(t){const e=t.target.closest("a");if(!e||!this.hasUnsavedChanges||t.metaKey||t.ctrlKey)return;const n=e.getAttribute("href"),s=this.appVars.portal_url;if(!n)return;const i=n.startsWith(s)||n.startsWith("/"),o=n===window.location.href;i&&!o&&(t.preventDefault(),t.stopPropagation(),this.pendingNavigation=e,this.$eventBus.emit("showUnsavedChangesModal",this.context))},handleImageBlockClick(t){const e=t.target.closest("milkdown-image-block");e&&(this.activeUploadBlock=e,t.target.closest(".confirm")&&!this.canAddImage()&&(t.preventDefault(),t.stopPropagation()))}},mounted(){this.initEditor(),window.addEventListener("beforeunload",this.handleBeforeUnload),document.addEventListener("click",this.handleLinkClick,!0),this.onInlineUpload&&this.$refs.crepe_editor_vue.addEventListener("click",this.handleImageBlockClick,!0),this.$eventBus.on("unsavedChangesProceeded",()=>{if(this.pendingNavigation){this.hasUnsavedChanges=!1,this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=!1);const t=this.pendingNavigation;this.pendingNavigation=null,setTimeout(()=>t.click(),0)}})},beforeUnmount(){var t;this.editor&&this.editor.destroy(),this.context==="comment"&&this.is_modal&&this.hasUnsavedChanges&&(window.fcom_modal_comment_unsaved=!1),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("click",this.handleLinkClick,!0),this.onInlineUpload&&((t=this.$refs.crepe_editor_vue)==null||t.removeEventListener("click",this.handleImageBlockClick,!0))}},OMe={style:{position:"relative"},class:"fcom_md_editor"},DMe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},RMe={class:"fcom_mention_pop_wrap"},VMe={key:0},FMe={key:0},NMe=["onClick"],BMe=["src"],zMe={key:1};function HMe(t,e,n,s,i,o){const r=W("ProsemirrorAdapterProvider"),a=W("MilkdownProvider"),l=Xi;return v(),A(te,null,[y(a,null,{default:w(()=>[y(r,null,{default:w(()=>[g("div",OMe,[g("div",DMe,null,512)])]),_:1})]),_:1}),g("div",RMe,[y(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:i.showMentionPop,width:300,persistent:!1},{reference:w(()=>[...e[0]||(e[0]=[g("span",{style:{}},null,-1)])]),default:w(()=>[i.justReplaced?O("",!0):(v(),A("div",VMe,[i.mentionResults.length?(v(),A("ul",FMe,[(v(!0),A(te,null,we(i.mentionResults,c=>(v(),A("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),A("img",{key:0,alt:"",src:c.avatar},null,8,BMe)):O("",!0),g("span",null,$(c.display_name)+" (@"+$(c.username)+")",1)],8,NMe))),128))])):i.searchingMention?O("",!0):(v(),A("div",zMe,[g("p",null,$(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const Yd=ge(LMe,[["render",HMe]]),UMe={name:"CreateCorseForm",components:{FormBuilder:VF,SpaceGroupSelector:I5,TopicSelector:RF,SlugInput:Nd,ImageUploader:Fd,LogoEmojiSelector:G1,ErrorAlerts:X1,CrepeEditor:Yd},emits:["completed","close"],props:{course:{required:!1,default:{title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:"",disable_comments:"no",hide_members_count:"no"}}},savingCount:{required:!1,default:0},parent_id:{required:!1,default:null},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:dwe,formErrors:[],form:{slug:"",title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:"",course_details:"",course_layout:"classic"}},courseTypes:hwe,dataLoaded:!1,metaSettings:null,fetchingMetaBoxes:!1,appReady:!1,courseInstructors:[],fetchingInstructors:!1}},watch:{savingCount(){this.submit(!0)}},methods:{validateForm(){var t;if(this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Course Title"),description:this.$t("Course title is required.")}),(!this.form.description||!this.form.description.trim())&&this.formErrors.push({title:this.$t("Short Description"),description:this.$t("Short description is required.")}),(t=this.form.slug)!=null&&t.trim()){const e=K1("/"+this.form.slug);e.valid||e.errors.forEach(n=>{this.formErrors.push({title:this.$t("Slug"),description:this.$t(n)})})}return this.formErrors.length===0},submit(t=!1){if(!this.form.id&&!this.validateForm())return;this.saving=!0;let e="admin/courses",n=this.form,s=this.$post;if(this.form.id&&(e+="/"+this.form.id,n={title:this.form.title,privacy:this.form.privacy,course_type:this.form.course_type,description:this.form.description,status:this.form.status,slug:this.form.slug,logo:this.form.logo,cover_photo:this.form.cover_photo,space_id:this.form.id,parent_id:this.form.parent_id,settings:this.form.settings,category_ids:this.form.category_ids},s=this.$put,this.form.created_by&&this.isAdmin()&&(n.created_by=this.form.created_by),this.metaSettings)){let i={};this.each(this.metaSettings,(o,r)=>{i[r]=o.settings}),n.meta_settings=i}s(e,n).then(i=>{if(!this.form.id&&!this.disable_redirect){let o=this.$getRouteLink("admin/manage-courses/edit/"+i.course.id+"/lessons");window.location.href=o,this.form={};return}this.$eventBus.emit("reloadMenu"),this.$notify.success(i.message||this.$t("Course has been created successfully")),this.$emit("completed",i.course),t&&this.$emit("close")}).catch(i=>{this.$handleError(i)}).finally(()=>{this.saving=!1})},searchUsers(t=""){t&&t.length<3||this.fetchCourseInstructors(t)},handlePhotoUpload(t){this.form.cover_photo=t},fetchMetaBoxes(){this.course.id&&(this.fetchingMetaBoxes=!0,this.$get("admin/courses/"+this.course.id+"/meta-settings").then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))},fetchCourseInstructors(t=""){this.fetchingInstructors=!0,this.$get("admin/courses/"+this.course.id+"/instructors/search",{search:t}).then(e=>{this.courseInstructors=e.instructors}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingInstructors=!1})}},mounted(){var e,n,s,i,o;this.course.id?(this.form=this.course,this.form.created_by=parseInt(this.form.created_by),this.fetchMetaBoxes(),this.fetchCourseInstructors()):this.parent_id&&(this.form.parent_id=this.parent_id);const t=(n=(e=this.course)==null?void 0:e.settings)==null?void 0:n.course_type;t&&!((s=this.form)!=null&&s.course_type)&&(this.form.course_type=t),(!((o=(i=this.form)==null?void 0:i.settings)!=null&&o.course_layout)||!this.has_pro)&&(this.form.settings.course_layout="classic"),this.dataLoaded=!0,this.$nextTick(()=>{this.appReady=!0})}},jMe={key:0},WMe={class:"fcom_form_section"},YMe={class:"fcom_help_text"},qMe={class:"fcom_help_text"},GMe={class:"fcom_form_section"},XMe={style:{"font-weight":"bold"}},KMe={key:0},ZMe={class:"fcom_help_text"},JMe={style:{"font-weight":"bold"}},QMe={class:"fcom_form_section"},eTe={class:"fcom_lined_checkboxes"},tTe={class:"fcom_checkbox_with_tooltip"},nTe={key:0},sTe={key:0},iTe={class:"fcom_help_text"},oTe={key:0,class:"fcom_form_section"},rTe={class:"fcom_select_photo",style:{float:"left"}},aTe=["src","alt"],lTe={style:{float:"right",color:"#8492a6","font-size":"13px"}},cTe={class:"fcom_lined_checkboxes"},uTe={class:"fcom_form_section"},dTe={class:"fcom_help_text"},hTe=["href"],fTe={class:"fcom_image_uploader_wrapper"},pTe={class:"fcom_help_text"},mTe={class:"fcom_space_form_bottom"},gTe={key:0},vTe={class:"fcom_form_section fcom_mt_20"},yTe={key:1},bTe=["href"];function _Te(t,e,n,s,i,o){const r=W("logo-emoji-selector"),a=_t,l=an,c=W("SlugInput"),u=W("crepe-editor"),d=W("space-group-selector"),h=zo,f=Ws,p=ln,m=Qt,b=Zt,_=W("InfoFilled"),x=_e,k=js,C=W("topic-selector"),S=Ra,E=W("EditPen"),P=Ge,T=W("Delete"),L=W("ImageUploader"),I=W("error-alerts"),V=fn,R=W("form-builder"),N=xt("loading");return t.hasFeature("has_course")?(v(),A("div",jMe,[y(V,{onSubmit:e[22]||(e[22]=Be(F=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[23]||(e[23]=F=>i.form=F),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[g("div",WMe,[g("h4",null,$(t.$t("General")),1),y(l,{label:t.$t("Course Title"),required:""},{default:w(()=>[y(a,{type:"text",ref:"titleInput",placeholder:t.$t("Your Course Title"),modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>i.form.title=F)},{prepend:w(()=>{var F,B;return[i.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,config:{logo:i.form.logo,emoji:(F=i.form.settings)==null?void 0:F.emoji,shape_svg:((B=i.form.settings)==null?void 0:B.shape_svg)||""},onUpdate:e[0]||(e[0]=G=>{i.form.settings.emoji=G.emoji,i.form.logo=G.logo,i.form.settings.shape_svg=G.shape_svg})},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),i.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:w(()=>[y(c,{popMessage:t.$t("The URLs of this course lessons will be changed to the new slug. If you have lots of lessons and sections in this course, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!i.form.id,modelValue:i.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>i.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Course Slug (no spaces or special characters)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),y(l,{label:t.$t("Short Description"),required:""},{default:w(()=>[y(a,{type:"textarea",placeholder:t.$t("Course Description"),modelValue:i.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>i.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),y(l,{class:"form_label_with_tooltip",label:t.$t("Course Details")},{default:w(()=>[i.appReady?(v(),D(u,{key:0,modelValue:i.form.settings.course_details,"onUpdate:modelValue":e[4]||(e[4]=F=>i.form.settings.course_details=F),autofocus:!1,placeholder:t.$t("Add any additional information or notes about this course here"),disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),g("div",YMe,[g("p",null,$(t.$t("This section will be displayed on the course landing page. Add extra details, notes, or instructions to help learners understand the course better.")),1)])]),_:1},8,["label"]),y(l,{label:t.$t("Menu Group")},{default:w(()=>[i.dataLoaded?(v(),D(d,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[5]||(e[5]=F=>i.form.parent_id=F),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",qMe,[g("p",null,$(t.$t("Select a menu group to where this course will be added to the sidebar. If you do not select a menu group, it will be available on the all courses page.")),1)])]),_:1},8,["label"]),y(l,{label:t.$t("Status")},{default:w(()=>[y(f,{modelValue:i.form.status,"onUpdate:modelValue":e[6]||(e[6]=F=>i.form.status=F),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"published"},{default:w(()=>[Y($(t.$t("Published")),1)]),_:1}),y(h,{value:"draft"},{default:w(()=>[Y($(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",GMe,[g("h4",null,$(t.$t("Access Control")),1),y(l,{label:t.$t("Privacy")},{default:w(()=>[y(m,{"popper-class":"rich_select",modelValue:i.form.privacy,"onUpdate:modelValue":e[7]||(e[7]=F=>i.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),A(te,null,we(i.privacies,(F,B)=>(v(),D(p,{key:B,label:F.label,value:B},{default:w(()=>[g("span",XMe,$(F.label),1),g("p",null,$(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i.form.privacy=="private"?(v(),A(te,{key:0},[y(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[y(f,{modelValue:i.form.settings.custom_lock_screen,"onUpdate:modelValue":e[8]||(e[8]=F=>i.form.settings.custom_lock_screen=F),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"yes"},{default:w(()=>[Y($(t.$t("Custom")),1)]),_:1}),y(h,{value:"no"},{default:w(()=>[Y($(t.$t("Default")),1)]),_:1}),y(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[Y($(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",KMe,"("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[y(a,{modelValue:i.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[9]||(e[9]=F=>i.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",ZMe,[g("p",null,$(t.$t("This link will be used to redirect the unenrolled or public users. This may be your sales page for this course")),1)])]),_:1},8,["label"])):O("",!0),i.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:1},{default:w(()=>[y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_paywalls,"onUpdate:modelValue":e[10]||(e[10]=F=>i.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Paywalls in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)],64)):O("",!0),y(l,{label:t.$t("Enrollment Type")},{default:w(()=>[y(m,{"popper-class":"rich_select",modelValue:i.form.course_type,"onUpdate:modelValue":e[11]||(e[11]=F=>i.form.course_type=F),placeholder:t.$t("Select Type")},{default:w(()=>[(v(!0),A(te,null,we(i.courseTypes,(F,B)=>(v(),D(p,{key:B,label:F.label,value:B},{default:w(()=>[g("span",JMe,$(F.label),1),g("p",null,$(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",QMe,[g("h4",null,$(t.$t("Features Customizations")),1),y(l,null,{default:w(()=>[g("div",eTe,[i.form.privacy=="public"&&i.form.course_type=="self_paced"?(v(),D(b,{key:0,"true-value":"yes","false-value":"no",modelValue:i.form.settings.public_lesson_view,"onUpdate:modelValue":e[12]||(e[12]=F=>i.form.settings.public_lesson_view=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Public users can view the lessons without enrolling in the course")),1)]),_:1},8,["modelValue"])):O("",!0),y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.disable_comments,"onUpdate:modelValue":e[13]||(e[13]=F=>i.form.settings.disable_comments=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Disable comments for all the lessons for this course")),1)]),_:1},8,["modelValue"]),y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_members_count,"onUpdate:modelValue":e[14]||(e[14]=F=>i.form.settings.hide_members_count=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",tTe,[y(b,{disabled:!t.has_pro,"true-value":"yes","false-value":"no","model-value":t.has_pro?i.form.settings.sequential_lesson_order:"no","onUpdate:modelValue":e[15]||(e[15]=F=>{i.form.settings.sequential_lesson_order=F}),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),A("span",nTe,"("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),y(k,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:w(()=>[Y($(t.$t("Your members will have to complete each lesson")),1),e[24]||(e[24]=g("br",null,null,-1)),Y(" "+$(t.$t("in order before moving onto the next one.")),1)]),default:w(()=>[y(x,null,{default:w(()=>[y(_)]),_:1})]),_:1})])])]),_:1}),y(l,{label:t.$t("Course Layout")},{default:w(()=>[y(f,{modelValue:i.form.settings.course_layout,"onUpdate:modelValue":e[16]||(e[16]=F=>i.form.settings.course_layout=F),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"classic"},{default:w(()=>[Y($(t.$t("Classic")),1)]),_:1}),y(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[Y($(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sTe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",iTe,[g("p",null,$(t.$t("Classic is the default layout. For a more visual and engaging experience, the Modern layout displays the featured image or embedded video thumbnail.")),1)])]),_:1},8,["label"])]),i.form.id?(v(),A("div",oTe,[g("h4",null,$(t.$t("Course Instructor")),1),y(l,{label:t.$t("Instructor")},{default:w(()=>[y(m,{disabled:!t.isAdmin(),class:"rich_select",filterable:"",remote:"",loading:i.fetchingInstructors,"remote-method":o.searchUsers,placeholder:t.$t("Select User"),modelValue:i.form.created_by,"onUpdate:modelValue":e[17]||(e[17]=F=>i.form.created_by=F)},{default:w(()=>[(v(!0),A(te,null,we(i.courseInstructors,F=>(v(),D(p,{class:"fcom_with_photo_option",key:F.ID,label:F.display_name+" ("+(F.user_email||F.ID)+")",value:F.ID},{default:w(()=>[g("span",rTe,[g("img",{src:F.photo,alt:F.display_name},null,8,aTe),g("span",null,$(F.display_name),1)]),g("span",lTe,$(F.user_email||F.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["disabled","loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),y(l,null,{default:w(()=>[g("div",cTe,[y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_instructor_view,"onUpdate:modelValue":e[18]||(e[18]=F=>i.form.settings.hide_instructor_view=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Hide course instructor view from course overview page")),1)]),_:1},8,["modelValue"]),i.form.settings.hide_instructor_view!="yes"?(v(),D(b,{key:0,"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_instructor_students_count,"onUpdate:modelValue":e[19]||(e[19]=F=>i.form.settings.show_instructor_students_count=F),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",uTe,[g("h4",null,$(t.$t("Others")),1),t.has_pro&&i.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[y(C,{modelValue:i.form.category_ids,"onUpdate:modelValue":e[20]||(e[20]=F=>i.form.category_ids=F),creatable:!0},null,8,["modelValue"]),g("div",dTe,[g("p",null,$(t.$t("Categorize your course and allow members to filter courses with the topic navigation bar in the courses directory. You can define up to 20 topics per course.")),1),g("p",null,[t.isAdmin()?(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},$(t.$t("Manage all topics")),9,hTe)):O("",!0)])])]),_:1},8,["label"])):O("",!0),y(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[i.form.cover_photo?(v(),D(S,{key:0,alt:t.$t("Cover Photo"),src:i.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",fTe,[y(L,{isTextBtn:!1,can_remove:!!i.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},ks({remove:w(()=>[y(x,null,{default:w(()=>[y(T)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[y(P,{class:"fcom_plain_button"},{default:w(()=>[y(x,null,{default:w(()=>[y(E)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",pTe,[g("p",null,$(t.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),y(I,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),i.form.id?O("",!0):(v(),D(l,{key:1,style:{"margin-top":"45px"}},{default:w(()=>[g("div",mTe,[e[25]||(e[25]=g("span",null,null,-1)),y(P,{class:"fcom_primary_button",disabled:i.saving,onClick:e[21]||(e[21]=F=>o.submit()),loading:i.saving},{default:w(()=>[g("span",null,$(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Oe((v(),A("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),A("div",gTe,[(v(!0),A(te,null,we(i.metaSettings,F=>(v(),A("div",vTe,[g("h4",null,$(F.section_title),1),y(R,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[N,i.fetchingMetaBoxes]])])):(v(),A("div",yTe,[g("p",null,$(t.$t("Course Module is disabled. Please enable the course module first")),1),g("a",{class:"el-button el-button--default fcom_primary_button fcom_mt_10",href:t.$getRouteLink("admin/settings/features")},$(t.$t("Go to features settings")),9,bTe)]))}const gS=ge(UMe,[["render",_Te]]),wTe={name:"SpaceIcon",props:["space_profile"]},xTe=["alt","src"],kTe={key:1,class:"fcom_emoji"},CTe={key:2,class:"fcom_shape"},STe={key:3,class:"fcom_no_avatar"};function $Te(t,e,n,s,i,o){var a,l,c,u;const r=_e;return n.space_profile.logo?(v(),A("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,xTe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),A("span",kTe,$((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),A("span",CTe,[y(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),A("span",STe))}const wp=ge(wTe,[["render",$Te]]),ATe={name:"SpaceCourseSelector",components:{SpaceIcon:wp},emits:["update:modelValue","selectedType","selectedSlug"],props:{modelValue:{type:[String,Number,Array],default:""},placeholder_text:{type:String,default:""},is_multiple:{type:Boolean,default:!1},memberships:{type:Array,default:[]}},data(){return{all_spaces:[],selected_spaces:"",loading:!1,formattedSpaceGroups:[],app_ready:!1}},watch:{selected_spaces(t){this.is_multiple?this.$emit("update:modelValue",Array.isArray(t)?t:[]):this.$emit("update:modelValue",t||"")}},methods:{isMemberOfSpace(t){return this.memberships&&this.memberships.includes(t.toString())},fetch(){this.loading=!0,this.$get("admin/all_space_courses").then(t=>{this.all_spaces=t.all_spaces,this.formatSpaceGroups()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},emitChanges(){this.$emit("update:modelValue",this.selected_spaces||"");const t=Array.isArray(this.selected_spaces)&&this.selected_spaces.length?this.selected_spaces[0]:this.selected_spaces,e=this.all_spaces.find(n=>n.id==t);this.$emit("selectedSlug",(e==null?void 0:e.slug)||""),this.$emit("selectedType",(e==null?void 0:e.type)=="course"?"course":"space")},formatSpaceGroups(){if(this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],s=[];this.each(e,o=>{let r=t.filter(a=>{let l=a.parent_id==o.id;return l&&s.push(a.slug),l});r.length&&n.push({label:o.title,spaces:r})});let i=t.filter(o=>o.parent_id===null);i&&i.length&&n.push({label:this.$t("Uncategorized"),spaces:i}),this.formattedSpaceGroups=n}},mounted(){this.is_multiple?this.selected_spaces=Array.isArray(this.modelValue)?this.modelValue:[]:this.selected_spaces=this.modelValue||"",this.fetch(),this.app_ready=!0}},ETe={key:0,class:"fcom_space_title"},MTe={key:0},TTe={key:1};function PTe(t,e,n,s,i,o){const r=W("SpaceIcon"),a=ln,l=Z_,c=Qt,u=xt("loading");return i.app_ready?(v(),D(c,{key:0,onChange:o.emitChanges,modelValue:i.selected_spaces,"onUpdate:modelValue":e[0]||(e[0]=d=>i.selected_spaces=d),filterable:"",multiple:n.is_multiple,placeholder:n.placeholder_text,style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(i.formattedSpaceGroups,d=>Oe((v(),D(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),A(te,null,we(d.spaces,h=>(v(),D(a,{key:h.slug,label:h.title,disabled:o.isMemberOfSpace(h.id),value:h.id.toString()},{default:w(()=>[h.id?(v(),A("span",ETe,[y(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[Y($(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),A("span",MTe," ("+$(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",TTe,$(t.getExcerpt(h.title,50)),1))]),_:2},1032,["label","disabled","value"]))),128))]),_:2},1032,["label"])),[[u,i.loading]])),128))]),_:1},8,["onChange","modelValue","multiple","placeholder"])):O("",!0)}const vS=ge(ATe,[["render",PTe]]),ITe={name:"SidebarLinkForm",components:{SpaceGroupSelector:I5,LogoEmojiSelector:G1,SpaceCourseSelector:vS,ErrorAlerts:X1},emits:["completed"],data(){return{saving:!1,formErrors:[],form:{title:"",privacy:"public",parent_id:"",settings:{permalink:"",new_tab:"yes",emoji:"🔗",shape_svg:"",memberships:[]}},dataLoaded:!1}},props:{link:{type:Object,default:()=>({})},parent_id:{type:[Number,String],default:null}},methods:{validateForm(){this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Title"),description:this.$t("Link title is required.")});const t=DF(this.form.settings.permalink);return t.valid||t.errors.forEach(e=>{this.formErrors.push({title:this.$t("Permalink"),description:this.$t(e)})}),this.formErrors.length===0},saveSettings(){this.validateForm()&&(this.saving=!0,this.$post("admin/links",{link:this.form}).then(t=>{this.$eventBus.emit("reloadMenu"),this.$emit("completed",t.link),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.link&&this.link.id?this.form=this.link:this.parent_id?this.form.parent_id=this.parent_id:this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id),this.dataLoaded=!0}},LTe={class:"fcom_form_section"},OTe={class:"fcom_help_text"},DTe={class:"fcom_help_text"},RTe={class:"fcom_help_text"},VTe={key:0},FTe={key:1};function NTe(t,e,n,s,i,o){const r=W("logo-emoji-selector"),a=_t,l=an,c=Zt,u=W("space-group-selector"),d=zo,h=Ws,f=W("SpaceCourseSelector"),p=W("error-alerts"),m=Ge,b=fn,_=xt("loading");return v(),D(b,{onSubmit:e[8]||(e[8]=Be(x=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=x=>i.form=x),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[g("div",LTe,[y(l,{label:t.$t("Link Title"),required:""},{default:w(()=>[y(a,{type:"text",placeholder:t.$t("Your Link Title"),modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=x=>i.form.title=x)},{prepend:w(()=>{var x,k;return[i.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=C=>{i.form.settings.emoji=C.emoji,i.form.logo=C.logo,i.form.settings.shape_svg=C.shape_svg}),config:{logo:i.form.logo,emoji:((x=i.form.settings)==null?void 0:x.emoji)||"",shape_svg:((k=i.form.settings)==null?void 0:k.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),y(l,{label:t.$t("Permalink"),required:""},{default:w(()=>[y(a,{placeholder:t.$t("URL of the link"),modelValue:i.form.settings.permalink,"onUpdate:modelValue":e[2]||(e[2]=x=>i.form.settings.permalink=x)},null,8,["placeholder","modelValue"]),g("div",OTe,[y(c,{modelValue:i.form.settings.new_tab,"onUpdate:modelValue":e[3]||(e[3]=x=>i.form.settings.new_tab=x),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Open this link in new tab")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"]),y(l,{label:t.$t("Menu Group")},{default:w(()=>[i.dataLoaded?(v(),D(u,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=x=>i.form.parent_id=x),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",DTe,[g("p",null,$(t.$t("Select a menu group to where this link will be added to the sidebar.")),1)])]),_:1},8,["label"]),y(l,{label:t.$t("Visibility")},{default:w(()=>[y(h,{modelValue:i.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=x=>i.form.privacy=x)},{default:w(()=>[y(d,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),y(d,{label:t.$t("Logged-in users only"),value:"logged_in"},null,8,["label"]),y(d,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["modelValue"]),g("div",RTe,[g("p",null,$(t.$t("Select who can see this link.")),1)])]),_:1},8,["label"]),i.form.privacy=="members_only"?(v(),D(l,{key:0,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[y(f,{modelValue:i.form.settings.membership_ids,"onUpdate:modelValue":e[6]||(e[6]=x=>i.form.settings.membership_ids=x),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),y(p,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),y(l,{style:{"margin-top":"45px"}},{default:w(()=>[Oe((v(),D(m,{class:"fcom_primary_button",disabled:i.saving,onClick:e[7]||(e[7]=x=>o.saveSettings())},{default:w(()=>[i.form.id?(v(),A("span",VTe,$(t.$t("Update")),1)):(v(),A("span",FTe,$(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[_,i.saving]])]),_:1})])]),_:1},8,["modelValue"])}const FH=ge(ITe,[["render",NTe]]),BTe={name:"SpaceIcon"},zTe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function HTe(t,e,n,s,i,o){return v(),A("svg",zTe,[...e[0]||(e[0]=[Pa('<g><path d="M64,42c-13.2,0-24,10.8-24,24s10.8,24,24,24s24-10.8,24-24S77.2,42,64,42z M64,82c-8.8,0-16-7.2-16-16s7.2-16,16-16 s16,7.2,16,16S72.8,82,64,82z"></path><path d="M64,100.8c-14.9,0-29.2,6.2-39.4,17.1l-2.7,2.9l5.8,5.5l2.7-2.9c8.8-9.4,20.7-14.6,33.6-14.6s24.8,5.2,33.6,14.6l2.7,2.9 l5.8-5.5l-2.7-2.9C93.2,107.1,78.9,100.8,64,100.8z"></path><path d="M97,47.9v8c9.4,0,18.1,3.8,24.6,10.7l5.8-5.5C119.6,52.7,108.5,47.9,97,47.9z"></path><path d="M116.1,20c0-10.5-8.6-19.1-19.1-19.1S77.9,9.5,77.9,20S86.5,39.1,97,39.1S116.1,30.5,116.1,20z M85.9,20 c0-6.1,5-11.1,11.1-11.1s11.1,5,11.1,11.1s-5,11.1-11.1,11.1S85.9,26.1,85.9,20z"></path><path d="M31,47.9c-11.5,0-22.6,4.8-30.4,13.2l5.8,5.5c6.4-6.9,15.2-10.7,24.6-10.7V47.9z"></path><path d="M50.1,20C50.1,9.5,41.5,0.9,31,0.9S11.9,9.5,11.9,20S20.5,39.1,31,39.1S50.1,30.5,50.1,20z M31,31.1 c-6.1,0-11.1-5-11.1-11.1S24.9,8.9,31,8.9s11.1,5,11.1,11.1S37.1,31.1,31,31.1z"></path></g>',1)])])}const UTe=ge(BTe,[["render",HTe]]),jTe={name:"CourseIcon"},WTe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function YTe(t,e,n,s,i,o){return v(),A("svg",WTe,[...e[0]||(e[0]=[g("path",{d:"M10.734 5.84746L14.7114 6.9072M9.88139 9.01146L11.8701 9.54132M9.98031 14.9723L10.7758 15.1843C13.0258 15.7838 14.1508 16.0835 15.037 15.5747C15.9233 15.0659 16.2247 13.9473 16.8276 11.71L17.6802 8.54599C18.2831 6.3087 18.5845 5.19006 18.0728 4.30879C17.5611 3.42752 16.4362 3.12778 14.1862 2.52831L13.3907 2.31636C11.1407 1.71688 10.0157 1.41714 9.12948 1.92594C8.24322 2.43474 7.94178 3.55338 7.3389 5.79067L6.4863 8.95466C5.88342 11.1919 5.58198 12.3106 6.09367 13.1919C6.60536 14.0731 7.73034 14.3729 9.98031 14.9723Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),g("path",{d:"M9.99996 17.4559L9.20634 17.672C6.96165 18.2832 5.83931 18.5889 4.95512 18.0701C4.07093 17.5513 3.7702 16.4107 3.16874 14.1295L2.31814 10.9035C1.71668 8.62232 1.41595 7.48174 1.92643 6.58318C2.36802 5.80591 3.33329 5.83421 4.58329 5.83411",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const NH=ge(jTe,[["render",YTe]]),qTe={name:"SpaceCreateModal",components:{Drawer:fp,CreateSpaceForm:L5,CreateCourseForm:gS,SidebarLinkForm:FH,ArrowLeftBold:Yre,SpaceIcon:UTe,CourseIcon:NH,Link:nR},data(){return{step:"choose_type",parent_id:null,showCreateSpaceModal:!1,select_type:"space_form",disable_redirect:!1,enteredForm:!1}},computed:{currentTitle(){return this.step==="choose_type"?this.$t("Choose a Space Type"):this.step==="space_form"?this.$t("Create a Discussion Space"):this.step==="course_form"?this.$t("Create a Course"):this.step==="link_form"?this.$t("Create a Link"):""},leaveMessage(){return this.enteredForm?this.$t("Some settings have been changed. Are you sure to leave this page?"):this.$t("Closing will discard your changes. Are you sure?")}},watch:{showCreateSpaceModal(t){t||(this._resetState(),this._clearUrlQuery())}},methods:{handleNextStep(){this.enteredForm=!0,this.step=this.select_type},_resetState(){this.step="choose_type",this.select_type="space_form",this.enteredForm=!1},_clearUrlQuery(){const{create_space:t,parent_id:e,...n}=this.$route.query;t===void 0&&e===void 0||this.$router.replace({query:n})},handleCompleted(t){this.enteredForm=!1,this.parent_id=null,this.showCreateSpaceModal=!1,this.$eventBus.emit("spaceCreated",t)}},beforeUnmount(){this.$eventBus.off("createSpaceModal")},created(){this.$eventBus.on("createSpaceModal",t=>{const e=this.$route.query.parent_id||null;this._resetState(),this.showCreateSpaceModal=!0,this.parent_id=t&&t.parent_id||e||null,t&&(this.disable_redirect=!!t.disable_redirect,t.spaceConfig?(this.step="space_form",this.select_type="space_form",this.enteredForm=!0):t.course_config&&(this.select_type="course_form",this.step="course_form",this.enteredForm=!0))})},mounted(){this.$router.isReady().then(()=>{const{create_space:t,parent_id:e}=this.$route.query;t==="yes"&&e&&this.$eventBus.emit("createSpaceModal",{parent_id:e})})}},GTe={class:"dialog_header"},XTe={class:"dialog_left"},KTe={class:"dialog_body"},ZTe={key:0,class:"space-type-selector"},JTe={class:"space-cards"},QTe={class:"space-card-label"},ePe={class:"space-card-label"},tPe={key:0,class:"space-card-note"},nPe={class:"space-card-label"},sPe={key:0,class:"space-card-note"},iPe={class:"dialog_footer"};function oPe(t,e,n,s,i,o){const r=W("ArrowLeftBold"),a=_e,l=Ge,c=W("SpaceIcon"),u=W("CourseIcon"),d=W("Link"),h=W("create-space-form"),f=W("create-course-form"),p=W("sidebar-link-form"),m=W("Drawer");return v(),D(m,{modelValue:i.showCreateSpaceModal,"onUpdate:modelValue":e[5]||(e[5]=b=>i.showCreateSpaceModal=b),size:t.drawerWidth,"close-on-click-modal":!0,"has-close-confirmation":i.enteredForm,"close-confirmation-message":o.leaveMessage,drawerClass:"fcom_space_create_drawer"},ks({header:w(()=>[g("div",GTe,[g("div",XTe,[i.step!="choose_type"?(v(),D(l,{key:0,onClick:e[0]||(e[0]=b=>i.step="choose_type"),text:"",size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1})):O("",!0),g("h4",null,$(o.currentTitle),1)])])]),default:w(()=>[g("div",KTe,[i.step=="choose_type"?(v(),A("div",ZTe,[g("div",JTe,[g("div",{onClick:e[1]||(e[1]=b=>i.select_type="space_form"),class:U([{"is-active":i.select_type==="space_form"},"space-card"])},[y(a,{class:"space-card-icon"},{default:w(()=>[y(c)]),_:1}),g("span",QTe,$(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=b=>!!t.hasFeature("has_course")&&(i.select_type="course_form")),class:U([{"is-active":i.select_type==="course_form","is-disabled":!t.hasFeature("has_course")},"space-card"])},[y(a,{class:"space-card-icon"},{default:w(()=>[y(u)]),_:1}),g("span",ePe,$(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),A("span",tPe,$(t.$t("Course Module is disabled")),1))],2),g("div",{onClick:e[3]||(e[3]=b=>!!t.appVars.pro&&(i.select_type="link_form")),class:U([{"is-active":i.select_type==="link_form","is-disabled":!t.appVars.pro},"space-card"])},[y(a,{class:"space-card-icon"},{default:w(()=>[y(d)]),_:1}),g("span",nPe,$(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),A("span",sPe,$(t.$t("Pro Required")),1))],2)])])):i.step=="space_form"?(v(),D(h,{key:1,disable_redirect:i.disable_redirect,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):i.step=="course_form"?(v(),D(f,{key:2,disable_redirect:i.disable_redirect,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):i.step=="link_form"?(v(),D(p,{key:3,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["parent_id","onCompleted"])):O("",!0)])]),_:2},[i.step=="choose_type"?{name:"footer",fn:w(()=>[g("div",iPe,[y(l,{disabled:!i.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=b=>o.handleNextStep())},{default:w(()=>[Y($(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const rPe=ge(qTe,[["render",oPe]]),ws=r2("cache",{state:()=>({cache:{},stats:{hits:0,misses:0,size:0,totalSaved:0},maxSize:500,maxMemorySize:50*1024*1024}),getters:{getCacheHitRate:t=>{const e=t.stats.hits+t.stats.misses;return e>0?(t.stats.hits/e*100).toFixed(2):0},getCacheSize:t=>Object.keys(t.cache).length,getMemoryUsage:t=>{try{return(new Blob([JSON.stringify(t.cache)]).size/1024/1024).toFixed(2)+" MB"}catch{return"Unknown"}},getCacheKeys:t=>Object.keys(t.cache),getCacheEntry:t=>e=>t.cache[e]||null},actions:{get(t,e=null){const n=this.cache[t];if(!n)return this.stats.misses++,null;const s=Date.now()-n.timestamp,i=n.ttl||e||5*60*1e3;return s>i?(delete this.cache[t],this.stats.misses++,this.stats.size=Object.keys(this.cache).length,null):(this.stats.hits++,n.hits=(n.hits||0)+1,n.lastAccessed=Date.now(),n.data)},set(t,e,n=5*60*1e3){Object.keys(this.cache).length>=this.maxSize&&this.pruneLRU(50),this.cache[t]={data:e,timestamp:Date.now(),lastAccessed:Date.now(),hits:0,ttl:n},this.stats.size=Object.keys(this.cache).length,this.stats.totalSaved++},invalidate(t){this.cache[t]&&(delete this.cache[t],this.stats.size=Object.keys(this.cache).length)},invalidatePattern(t){let e=0;return Object.keys(this.cache).forEach(n=>{n.includes(t)&&(delete this.cache[n],e++)}),this.stats.size=Object.keys(this.cache).length,e},pruneLRU(t){const e=Object.entries(this.cache).map(([n,s])=>({key:n,lastAccessed:s.lastAccessed||s.timestamp})).sort((n,s)=>n.lastAccessed-s.lastAccessed).slice(0,t);return e.forEach(({key:n})=>{delete this.cache[n]}),this.stats.size=Object.keys(this.cache).length,e.length},pruneExpired(t=15*60*1e3){let e=0;const n=Date.now();return Object.entries(this.cache).forEach(([s,i])=>{n-i.timestamp>t&&(delete this.cache[s],e++)}),this.stats.size=Object.keys(this.cache).length,e},clear(){this.cache={},this.stats.hits=0,this.stats.misses=0,this.stats.size=0},getStats(){return{...this.stats,hitRate:this.getCacheHitRate,memoryUsage:this.getMemoryUsage,cacheSize:this.getCacheSize}},has(t){return t in this.cache},getKeysMatching(t){return Object.keys(this.cache).filter(e=>e.includes(t))},warmCache(t){Object.entries(t).forEach(([e,n])=>{this.set(e,n)})}}}),yS=r2("user",{state:()=>({currentUser:null,profilesByUsername:{},follows:{},followers:[],loading:{},lastFetched:{}}),getters:{getProfile:t=>e=>t.profilesByUsername[e]||null,isFollowing:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&["1","2"].includes(String(n))},isBlocked:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&String(n)==="0"},getFollowLevel:t=>e=>t.follows[String(e)],getCurrentUser:t=>t.currentUser,isLoading:t=>e=>t.loading[e]||!1,followingCount:t=>Object.values(t.follows).filter(e=>["1","2"].includes(String(e))).length,followersCount:t=>t.followers.length},actions:{initializeCurrentUser(){var t;(t=window.fluentComAdmin)!=null&&t.auth&&(this.currentUser=window.fluentComAdmin.auth)},setFollows(t){if(!(!t||typeof t!="object"))for(const[e,n]of Object.entries(t)){const s=String(e);n==null?delete this.follows[s]:this.follows[s]=String(n)}},removeFollow(t){delete this.follows[String(t)]},async fetchProfile(t,e=!1){const n=ws(),s=`user-profile:${t}`;if(!e){const i=n.get(s);if(i)return this.profilesByUsername[t]=i,i.follow!==void 0&&i.user_id&&this.setFollows({[i.user_id]:i.follow}),i}this.loading[t]=!0;try{const i=await this.$api.get(`profile/${t}`),o=i.profile;return o.follow!==void 0&&o.user_id&&this.setFollows({[o.user_id]:o.follow}),i.current_user_follows&&this.setFollows(i.current_user_follows),this.profilesByUsername[t]=o,this.lastFetched[t]=Date.now(),n.set(s,o,5*60*1e3),this.loading[t]=!1,o}catch(i){throw this.loading[t]=!1,console.error("Failed to fetch user profile:",i),i}},async updateProfile(t,e=null,n=null){var i;const s=ws();try{const o=n?await this.$api.put(`profile/${n}`,{data:t}):await this.$api.put("profile",t),r=o.profile||o.user||o;return this.currentUser={...this.currentUser,...r},e&&e!==r.username&&(delete this.profilesByUsername[e],s.invalidate(`user-profile:${e}`)),r.username&&(this.profilesByUsername[r.username]=r,s.invalidate(`user-profile:${r.username}`)),(i=window.fluentComAdmin)!=null&&i.auth&&(window.fluentComAdmin.auth={...window.fluentComAdmin.auth,...r}),r}catch(o){throw console.error("Failed to update profile:",o),o}},async toggleFollow(t,e=null){var a,l,c;const n=ws(),s=String(t),i=this.follows[s],o=i!==void 0&&["1","2"].includes(String(i)),r=i;o?(delete this.follows[s],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)):(this.follows[s]="1",e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow="1"));try{const u=o?`profile/${e}/unfollow`:`profile/${e}/follow`,d=await this.$api.post(u);return o?delete this.follows[s]:((a=d.follow)==null?void 0:a.level)!==void 0&&this.setFollows({[s]:d.follow.level}),e&&this.profilesByUsername[e]&&(((l=d.xprofile)==null?void 0:l.followers_count)!==void 0&&(this.profilesByUsername[e].followers_count=d.xprofile.followers_count),n.invalidate(`user-profile:${e}`)),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("user_follow_toggled",{userId:t,isFollowing:!o}),d}catch(u){throw o?(this.follows[s]=r,e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow=r)):(delete this.follows[s],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)),console.error("Failed to toggle follow:",u),u}},async fetchFollowing(){const t=ws(),e="user-following",n=t.get(e);if(n)return n;try{const s=await this.$api.get("profile/following"),i=s.following||s;return s.current_user_follows&&this.setFollows(s.current_user_follows),t.set(e,i,5*60*1e3),i}catch(s){throw console.error("Failed to fetch following:",s),s}},invalidateProfile(t){ws().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=ws();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var aPe=Va,lPe=aPe["__core-js_shared__"],cPe=lPe,L3=cPe,XM=function(){var t=/[^.]+$/.exec(L3&&L3.keys&&L3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function uPe(t){return!!XM&&XM in t}var dPe=uPe,hPe=Function.prototype,fPe=hPe.toString;function pPe(t){if(t!=null){try{return fPe.call(t)}catch{}try{return t+""}catch{}}return""}var BH=pPe,mPe=CF,gPe=dPe,vPe=q1,yPe=BH,bPe=/[\\^$.*+?()[\]{}|]/g,_Pe=/^\[object .+?Constructor\]$/,wPe=Function.prototype,xPe=Object.prototype,kPe=wPe.toString,CPe=xPe.hasOwnProperty,SPe=RegExp("^"+kPe.call(CPe).replace(bPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $Pe(t){if(!vPe(t)||gPe(t))return!1;var e=mPe(t)?SPe:_Pe;return e.test(yPe(t))}var APe=$Pe;function EPe(t,e){return t==null?void 0:t[e]}var MPe=EPe,TPe=APe,PPe=MPe;function IPe(t,e){var n=PPe(t,e);return TPe(n)?n:void 0}var xp=IPe,LPe=xp,OPe=Va,DPe=LPe(OPe,"DataView"),RPe=DPe,VPe=xp,FPe=Va,NPe=VPe(FPe,"Map"),bS=NPe,BPe=xp,zPe=Va,HPe=BPe(zPe,"Promise"),UPe=HPe,jPe=xp,WPe=Va,YPe=jPe(WPe,"Set"),zH=YPe,qPe=xp,GPe=Va,XPe=qPe(GPe,"WeakMap"),KPe=XPe,E6=RPe,M6=bS,T6=UPe,P6=zH,I6=KPe,HH=W1,kp=BH,KM="[object Map]",ZPe="[object Object]",ZM="[object Promise]",JM="[object Set]",QM="[object WeakMap]",eT="[object DataView]",JPe=kp(E6),QPe=kp(M6),eIe=kp(T6),tIe=kp(P6),nIe=kp(I6),bu=HH;(E6&&bu(new E6(new ArrayBuffer(1)))!=eT||M6&&bu(new M6)!=KM||T6&&bu(T6.resolve())!=ZM||P6&&bu(new P6)!=JM||I6&&bu(new I6)!=QM)&&(bu=function(t){var e=HH(t),n=e==ZPe?t.constructor:void 0,s=n?kp(n):"";if(s)switch(s){case JPe:return eT;case QPe:return KM;case eIe:return ZM;case tIe:return JM;case nIe:return QM}return e});var UH=bu,sIe=kF,iIe=UH,oIe=C5,rIe=Fa,aIe=E5,lIe=S5,cIe=xF,uIe=A5,dIe="[object Map]",hIe="[object Set]",fIe=Object.prototype,pIe=fIe.hasOwnProperty;function mIe(t){if(t==null)return!0;if(aIe(t)&&(rIe(t)||typeof t=="string"||typeof t.splice=="function"||lIe(t)||uIe(t)||oIe(t)))return!t.length;var e=iIe(t);if(e==dIe||e==hIe)return!t.size;if(cIe(t))return!sIe(t).length;for(var n in t)if(pIe.call(t,n))return!1;return!0}var gIe=mIe;const jH=fi(gIe),vIe={name:"SocialLinks",props:["xprofile","isOwn"],computed:{hasSocialLinks(){return this.socialLinks.length>0},socialLinks(){var s;if(!this.xprofile)return[];const t=[];this.xprofile.website&&t.push({title:this.$t("Website"),icon:'<svg viewBox="0 0 40 20" fill="currentColor"><path d="M3.8 10C3.8 6.58 6.58 3.8 10 3.8H18V0H10C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20H18V16.2H10C6.58 16.2 3.8 13.42 3.8 10ZM12 12H28V8H12V12ZM30 0H22V3.8H30C33.42 3.8 36.2 6.58 36.2 10C36.2 13.42 33.42 16.2 30 16.2H22V20H30C35.52 20 40 15.52 40 10C40 4.48 35.52 0 30 0Z"></path></svg>',url:this.xprofile.website});let e=this.xprofile.social_links;if(e||(e=(s=this.xprofile.meta)==null?void 0:s.social_links),jH(e))return t;const n=this.appVars.socialLinkProviders;return n&&this.each(n,(i,o)=>{e[o]&&t.push({title:i.title,icon:i.icon_svg,url:i.domain+e[o]})}),t}}},yIe={key:0,class:"fcom_social_links"},bIe=["href","title"];function _Ie(t,e,n,s,i,o){const r=_e,a=W("router-link");return o.hasSocialLinks?(v(),A("div",yIe,[(v(!0),A(te,null,we(o.socialLinks,l=>(v(),A("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[y(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,bIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[Y($("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const wIe=ge(vIe,[["render",_Ie]]),tT=r2("feed",{state:()=>({feedsByContext:{},feedsById:{},stickyFeeds:{},loading:{},pagination:{},filters:{},tickerIntervals:{},tickerEnabled:{},lastTickerCheck:{},tickerPending:{},newPostsCount:{},ticker:{count:0,lastFetched:0},executionTimes:{},_pendingRequests:{}}),getters:{getFeedsByContext:t=>e=>{const n=t.feedsByContext[e];return n?n.data||[]:[]},getFeedById:t=>e=>t.feedsById[e]||null,getStickyFeed:t=>e=>t.stickyFeeds[e]||null,getPagination:t=>e=>t.pagination[e]||{page:1,per_page:10,total:0,last_page:1,has_more:!1},isLoading:t=>e=>t.loading[e]||!1,getExecutionTime:t=>e=>t.executionTimes[e]||"",totalFeedsInMemory:t=>{let e=Object.keys(t.feedsById).length;return Object.values(t.feedsByContext).forEach(n=>{var s;e+=((s=n.data)==null?void 0:s.length)||0}),e},disableAutoLoad:t=>e=>{const n=t.loading[e]||!1,s=t.pagination[e];return s?n||s.has_more===!1:!0},getTickerCount:t=>t.ticker.count||0,getTickerLastFetched:t=>t.ticker.lastFetched||0,isTickerActive:t=>e=>t.tickerEnabled[e]&&t.tickerIntervals[e]!==null,getNewPostsCount:t=>e=>t.newPostsCount[e]||0,getMemoryStats:t=>{let e=0,n={};Object.keys(t.feedsByContext).forEach(o=>{var a,l;const r=((l=(a=t.feedsByContext[o])==null?void 0:a.data)==null?void 0:l.length)||0;n[o]=r,e+=r});const s=Object.keys(t.feedsById).length,i=(e*5/1024).toFixed(2);return{totalFeeds:e,feedsByContextCount:n,feedsByIdCount:s,estimatedMemoryMB:i,contexts:Object.keys(t.feedsByContext).length}}},actions:{async fetchFeeds(t,e={},n=!1){var l,c,u;if(console.log("[Feed Store] fetchFeeds called:",{context:t,loadMore:n,paramsPage:e.page,currentLoading:this.loading[t],currentPage:(l=this.pagination[t])==null?void 0:l.page}),this.loading[t]){console.log("[Feed Store] Already loading for context:",t,"- ignoring duplicate request");return}const s=n?(((c=this.pagination[t])==null?void 0:c.page)||0)+1:e.page||1,i={...e,page:s,per_page:e.per_page||10},o=`feeds:${t}:${JSON.stringify(i)}`,r=ws();if(!n&&s===1){const d=r.get(o,3e5);if(d)return this.feedsByContext[t]=d.feedsByContext,this.pagination[t]=d.pagination,this.executionTimes[t]=d.executionTime,d.stickyFeed&&!window["viewed_sticky_posts_"+d.stickyFeed.id]?this.stickyFeeds[t]=d.stickyFeed:(this.stickyFeeds[t]=null,d.stickyFeed&&((u=this.feedsByContext[t])!=null&&u.data)&&(this.feedsByContext[t].data.some(h=>h.id===d.stickyFeed.id)||this.feedsByContext[t].data.unshift(d.stickyFeed))),d.feedsByContext.data.forEach(h=>{this.feedsById[h.id]=h}),this.loading[t]=!1,d}return this.loading[t]=!0,this.$api.get(e.feed_base_url||"feeds",i).then(d=>{var h,f,p,m;if(d.sticky){const b="viewed_sticky_posts_"+d.sticky.id;window[b]?(d.feeds.data.some(_=>_.id===d.sticky.id)||d.feeds.data.unshift(d.sticky),this.stickyFeeds[t]=null):this.stickyFeeds[t]=d.sticky}else s===1&&(this.stickyFeeds[t]=null);if(n){const b=((h=this.feedsByContext[t])==null?void 0:h.data)||[];this.feedsByContext[t]={data:[...b,...d.feeds.data],timestamp:Date.now()}}else this.feedsByContext[t]={data:d.feeds.data,timestamp:Date.now()};if(this.pagination[t]={page:s,per_page:i.per_page,total:d.feeds.total,last_page:d.feeds.last_page,has_more:d.feeds.has_more},console.log("[Feed Store] Updated pagination:",{context:t,page:s,has_more:d.feeds.has_more,total:d.feeds.total}),d.execution_time&&(this.executionTimes[t]=d.execution_time),d.feeds.data.forEach(b=>{this.feedsById[b.id]={...b,timestamp:Date.now()}}),n){const b=((p=(f=this.feedsByContext[t])==null?void 0:f.data)==null?void 0:p.length)||0;b>500&&(console.log("[Feed Store] Pruning feeds, count:",b),this.pruneOldFeeds(t))}return d.last_fetched_timestamp&&(this.ticker.lastFetched=d.last_fetched_timestamp,(m=window.fluentFrameworkApp)!=null&&m.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:d.last_fetched_timestamp})),d.current_user_follows&&yS().setFollows(d.current_user_follows),!n&&s===1&&r.set(o,{feedsByContext:this.feedsByContext[t],pagination:this.pagination[t],stickyFeed:this.stickyFeeds[t],executionTime:this.executionTimes[t]}),console.log("[Feed Store] Fetch SUCCESS, stored feeds for context:",t,{feedCount:this.feedsByContext[t].data.length,pagination:this.pagination[t],hasSticky:!!this.stickyFeeds[t]}),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after success for context:",t),{feeds:this.feedsByContext[t].data,pagination:this.pagination[t],sticky:this.stickyFeeds[t]}}).catch(d=>{throw console.error("[Feed Store] Failed to fetch feeds:",d),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after error for context:",t),d})},async fetchFeedBySlug(t){const e=`feed:slug:${t}`,n=ws(),s=n.get(e,10*60*1e3);if(s)return this.feedsById[s.id]=s,s;try{const o=(await this.$api.get(`feeds/${t}/by-slug`)).feed;return this.feedsById[o.id]={...o,timestamp:Date.now()},n.set(e,o),window.appVars&&(window.appVars.last_feed_id=o.id),o}catch(i){throw console.error("Failed to fetch feed:",i),i}},async createFeed(t,e){var n,s,i;try{const o=await this.$api.post("feeds",e),r=o.feed;if(this.feedsById[r.id]={...r,timestamp:Date.now()},!o.scheduled_at){const l=u=>{this.feedsByContext[u]||(this.feedsByContext[u]={data:[],timestamp:Date.now()}),this.stickyFeeds[u]&&(this.feedsByContext[u].data.some(h=>h.id===this.stickyFeeds[u].id)||this.feedsByContext[u].data.unshift(this.stickyFeeds[u]),this.stickyFeeds[u]=null);const d=this.feedsByContext[u].data.findIndex(h=>h.id===r.id);d===-1&&this.feedsByContext[u].data.unshift(r),this.pagination[u]?d===-1&&this.pagination[u].total++:this.pagination[u]={page:1,per_page:10,total:1,last_page:1,has_more:!1}};l(t),r.space_id&&t!=="global"&&(l("global"),ws().invalidatePattern("feeds:global"));const c=`user-${r.user_id}`;this.feedsByContext[c]&&t!==c&&l(c)}return o.last_fetched_timestamp&&(this.ticker.lastFetched=o.last_fetched_timestamp,(n=window.FluentCommunityUtil)!=null&&n.eventBus&&((i=(s=window.fluentFrameworkApp)==null?void 0:s.$eventBus)==null||i.emit("newest_feed_fetched",{last_fetched_timestamp:o.last_fetched_timestamp}))),ws().invalidatePattern(`feeds:${t}`),o}catch(o){throw console.error("Failed to create feed:",o),o}},async updateFeed(t,e){const n=this.feedsById[t]?{...this.feedsById[t]}:null;this.feedsById[t]&&(this.feedsById[t]={...this.feedsById[t],...e,timestamp:Date.now()}),Object.keys(this.feedsByContext).forEach(s=>{const i=this.feedsByContext[s].data.findIndex(o=>o.id===t);i!==-1&&(this.feedsByContext[s].data[i]={...this.feedsByContext[s].data[i],...e})});try{const i=(await this.$api.patch(`feeds/${t}`,e)).feed;return this.feedsById[t]={...this.feedsById[t],...i,timestamp:Date.now()},Object.keys(this.feedsByContext).forEach(r=>{const a=this.feedsByContext[r].data.findIndex(l=>l.id===t);a!==-1&&(this.feedsByContext[r].data[a]={...this.feedsByContext[r].data[a],...i})}),ws().invalidatePattern("feed:"),i}catch(s){throw n&&(this.feedsById[t]=n,Object.keys(this.feedsByContext).forEach(i=>{const o=this.feedsByContext[i].data.findIndex(r=>r.id===t);o!==-1&&(this.feedsByContext[i].data[o]=n)})),console.error("Failed to update feed:",s),s}},async deleteFeed(t,e,n=null){try{return await this.$api.delete(`feeds/${e}`),delete this.feedsById[e],n!==null&&this.feedsByContext[t]?this.feedsByContext[t].data.splice(n,1):Object.keys(this.feedsByContext).forEach(i=>{var o;(o=this.feedsByContext[i])!=null&&o.data&&(this.feedsByContext[i].data=this.feedsByContext[i].data.filter(r=>r.id!==e))}),this.pagination[t]&&this.pagination[t].total--,ws().invalidatePattern("feed:"),!0}catch(s){throw console.error("Failed to delete feed:",s),s}},async toggleBookmark(t){const e=this.feedsById[t];if(!e)return;const n=e.is_bookmarked;e.is_bookmarked=!n,Object.keys(this.feedsByContext).forEach(s=>{var o;const i=(o=this.feedsByContext[s].data)==null?void 0:o.findIndex(r=>r.id===t);i!==-1&&(this.feedsByContext[s].data[i].is_bookmarked=!n)});try{const s=await this.$api.post(`feeds/${t}/toggle-bookmark`);return e.is_bookmarked=s.is_bookmarked,Object.keys(this.feedsByContext).forEach(i=>{var r;const o=(r=this.feedsByContext[i].data)==null?void 0:r.findIndex(a=>a.id===t);o!==-1&&(this.feedsByContext[i].data[o].is_bookmarked=s.is_bookmarked)}),s}catch(s){throw e.is_bookmarked=n,Object.keys(this.feedsByContext).forEach(i=>{var r;const o=(r=this.feedsByContext[i].data)==null?void 0:r.findIndex(a=>a.id===t);o!==-1&&(this.feedsByContext[i].data[o].is_bookmarked=n)}),s}},async fetchTicker(t){var e,n,s;try{const i=t||this.ticker.lastFetched;console.log("[Legacy Ticker] Fetching ticker with timestamp:",i);const o=await this.$api.get("feeds/ticker",{last_fetched_timestamp:i});if(console.log("[Legacy Ticker] Response:",{has_changes:o.has_changes,feeds:((e=o.feeds)==null?void 0:e.length)||0,new_items_count:o.new_items_count}),this.ticker={count:o.new_items_count||0,lastFetched:o.last_fetched_timestamp||Date.now()},console.log("[Legacy Ticker] Checking if we should process feeds:",{has_changes:o.has_changes,feeds_exists:!!o.feeds,feeds_length:((n=o.feeds)==null?void 0:n.length)||0,feeds_data:o.feeds}),o.has_changes&&o.feeds&&o.feeds.length>0){console.log(`[Legacy Ticker] ✅ Processing ${o.feeds.length} feed updates`);const r={};o.feeds.forEach(a=>{console.log("[Legacy Ticker] Processing feed update:",a);const l=a.context||"global";r[l]||(r[l]=[]),r[l].push(a)}),console.log("[Legacy Ticker] Updates grouped by context:",r);for(const a in r){console.log(`[Legacy Ticker] 📥 Processing context: ${a} (${r[a].length} updates)`);try{await this.processTickerUpdates(a,r[a]),console.log(`[Legacy Ticker] ✅ Successfully processed context: ${a}`)}catch(l){console.error(`[Legacy Ticker] ❌ Failed to process context: ${a}`,l)}}}else console.log("[Legacy Ticker] ⏭️ Skipping feed processing - no changes or no feeds in response");return(s=window.fluentFrameworkApp)!=null&&s.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("ticker_updated",o),this.ticker}catch(i){throw console.error("[Legacy Ticker] Failed to fetch ticker:",i),i}},resetTicker(){this.ticker.count=0},markStickyAsViewed(t,e){const n=this.stickyFeeds[t];n&&n.id===e&&(window["viewed_sticky_posts_"+e]=!0,this.feedsByContext[t]&&(this.feedsByContext[t].data.some(s=>s.id===n.id)||this.feedsByContext[t].data.unshift(n)),this.stickyFeeds[t]=null)},pruneOldFeeds(t=null){(t?[t]:Object.keys(this.feedsByContext)).forEach(s=>{var o;const i=((o=this.feedsByContext[s])==null?void 0:o.data)||[];if(i.length>500){const r=i.slice(0,i.length-500);this.feedsByContext[s].data=i.slice(i.length-500),console.log(`[Feed Store] Pruned ${r.length} old feeds from ${s}, kept ${this.feedsByContext[s].data.length}`),r.forEach(a=>{Object.values(this.feedsByContext).some(c=>{var u;return(u=c.data)==null?void 0:u.some(d=>d.id===a.id)})||delete this.feedsById[a.id]})}})},resetContext(t){this.feedsByContext[t]={data:[],timestamp:0},this.pagination[t]={page:1,per_page:10,total:0,last_page:1,has_more:!1},this.stickyFeeds[t]=null,this.loading[t]=!1,this.executionTimes[t]="",ws().invalidatePattern(`feeds:${t}`)},startTicker(t="global",e=3e4){this.lastTickerCheck[t]||(this.lastTickerCheck[t]=new Date().toISOString()),this.stopTicker(t),this.tickerEnabled[t]=!0,this.newPostsCount[t]=0,this.tickerIntervals[t]=setInterval(()=>{this.checkForUpdates(t)},e),console.log(`[Feed Store] Ticker started for ${t} (interval: ${e}ms)`),this.checkForUpdates(t)},stopTicker(t){this.tickerIntervals[t]&&(clearInterval(this.tickerIntervals[t]),this.tickerIntervals[t]=null,this.tickerEnabled[t]=!1,console.log(`[Feed Store] Ticker stopped for ${t}`))},stopAllTickers(){Object.keys(this.tickerIntervals).forEach(t=>{this.stopTicker(t)})},async checkForUpdates(t="global"){if(!this.tickerPending[t]){this.tickerPending[t]=!0;try{const e=await this.$api.get("feeds/ticker-updates",{context:t,since:this.lastTickerCheck[t]||new Date().toISOString()});this.lastTickerCheck[t]=e.timestamp,e.has_changes&&e.updates.length>0&&(console.log(`[Feed Store] Ticker found ${e.updates.length} changes for ${t}`),await this.processTickerUpdates(t,e.updates))}catch(e){e.xhr_status!==404&&console.error("[Feed Store] Ticker check failed:",e)}finally{this.tickerPending[t]=!1}}},async processTickerUpdates(t,e){var i;console.log(`[processTickerUpdates] Called for context: ${t} with ${e.length} updates`),console.log("[processTickerUpdates] Updates:",e);const n=[],s=[];if(e.forEach(o=>{console.log("[processTickerUpdates] Processing update:",{id:o.id,action:o.action,updated_at:o.updated_at});const r=this.feedsById[o.id];console.log("[processTickerUpdates] Existing feed in store:",r?{id:r.id,updated_at:r.updated_at}:"NOT IN STORE"),o.action==="deleted"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for DELETION`),s.push(o.id)):o.action==="created"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (CREATED)`),n.push(o.id)):o.action==="updated"&&(!r||new Date(r.updated_at)<new Date(o.updated_at)?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (UPDATED - ${r?"outdated":"not in store"})`),n.push(o.id)):console.log(`[processTickerUpdates] ⏭️ Skipping feed ${o.id} - already have latest version`))}),console.log("[processTickerUpdates] Summary:",{toFetch:n.length,toDelete:s.length,fetchIds:n,deleteIds:s}),s.length>0&&(console.log(`[processTickerUpdates] 🗑️ Deleting ${s.length} feeds from ${t}`),this.deleteFeedsFromStore(t,s)),n.length>0){console.log(`[processTickerUpdates] 📥 Fetching ${n.length} feeds for ${t}`),await this.fetchFeedsByIds(t,n);const o=e.filter(r=>r.action==="created").length;o>0&&(this.newPostsCount[t]=(this.newPostsCount[t]||0)+o)}(i=window.fluentFrameworkApp)!=null&&i.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("feeds_updated",{context:t,added:n.filter(o=>!this.feedsById[o]).length,updated:n.filter(o=>this.feedsById[o]).length,removed:s.length})},async fetchFeedsByIds(t,e){if(e.length===0)return;console.log("[Feed Store] fetchFeedsByIds called:",{context:t,count:e.length,ids:e});const n=20;try{if(e.length>n){console.log(`[Feed Store] Batching ${e.length} feeds into chunks of ${n}`);for(let s=0;s<e.length;s+=n){const i=e.slice(s,s+n);await this.fetchFeedBatch(t,i)}}else await this.fetchFeedBatch(t,e);console.log(`[Feed Store] Successfully fetched ${e.length} feeds for ${t}`)}catch(s){console.error("[Feed Store] Failed to fetch feeds by IDs:",{context:t,feedIds:e,error:s})}},async fetchFeedBatch(t,e){try{console.log("[Feed Store] Fetching feeds:",{context:t,feedIds:e});const n=await this.$api.post("feeds/batch",{feed_ids:e,context:t});if(console.log("[Feed Store] API response:",n),!n||!Array.isArray(n.feeds)){console.error("[Feed Store] Invalid response from /feeds/batch:",n);return}console.log(`[Feed Store] Received ${n.feeds.length} feeds for context: ${t}`),n.feeds.forEach(s=>{this.feedsById[s.id]=s,this.feedsByContext[t]||(this.feedsByContext[t]={data:[],timestamp:Date.now()});const i=this.feedsByContext[t].data,o=i.findIndex(r=>r.id===s.id);o===-1?i.unshift(s):i[o]=s})}catch(n){throw console.error("[Feed Store] Failed to fetch batch for context:",t,n),n}},deleteFeedsFromStore(t,e){e.forEach(n=>{var i;delete this.feedsById[n],(i=this.feedsByContext[t])!=null&&i.data&&(this.feedsByContext[t].data=this.feedsByContext[t].data.filter(o=>o.id!==n)),ws().invalidate(`feed:${n}`)}),console.log(`[Feed Store] Deleted ${e.length} feeds from ${t}`)},clearNewPostsCount(t){this.newPostsCount[t]=0},clearAll(){this.stopAllTickers(),this.feedsByContext={},this.feedsById={},this.stickyFeeds={},this.loading={},this.pagination={},this.filters={},this.ticker={count:0,lastFetched:0},this.executionTimes={},this._pendingRequests={},this.tickerIntervals={},this.tickerEnabled={},this.lastTickerCheck={},this.tickerPending={},this.newPostsCount={}}}}),xIe=r2("space",{state:()=>({spacesBySlug:{},currentSpace:null,mySpaces:[],topicsBySpace:{},loading:{},mySpacesLoading:!1,lastFetched:{}}),getters:{getSpaceBySlug:t=>e=>t.spacesBySlug[e]||null,getCurrentSpace:t=>t.currentSpace,getSpaceTopics:t=>e=>t.topicsBySpace[e]||[],isJoinedSpace:t=>e=>t.mySpaces.some(n=>n.slug===e),getMySpaces:t=>[...t.mySpaces].sort((e,n)=>e.title.localeCompare(n.title)),isLoading:t=>e=>t.loading[e]||!1,joinedSpacesCount:t=>t.mySpaces.length},actions:{async fetchSpace(t,e=!1){const n=ws(),s=`space:${t}`;if(!e){const i=n.get(s);if(i)return this.spacesBySlug[t]=i,this.currentSpace=i,i}this.loading[t]=!0;try{const i=await this.$api.get(`spaces/${t}/by-slug`),o=i.space||i;return this.spacesBySlug[t]=o,this.currentSpace=o,this.lastFetched[t]=Date.now(),i.topics&&(this.topicsBySpace[t]=i.topics),i.pending_count!==void 0&&(o.pending_count=i.pending_count),n.set(s,o,15*60*1e3),typeof window<"u"&&(window.fcom_current_community=o),this.loading[t]=!1,o}catch(i){throw this.loading[t]=!1,console.error("Failed to fetch space:",i),i}},async fetchMySpaces(t=!1){const e=ws(),n="my-spaces";if(!t){const s=e.get(n);if(s)return this.mySpaces=s,s}this.mySpacesLoading=!0;try{const s=await this.$api.get("spaces/my-spaces"),i=s.spaces||s;return this.mySpaces=i,i.forEach(o=>{this.spacesBySlug[o.slug]=o}),e.set(n,i,10*60*1e3),this.mySpacesLoading=!1,i}catch(s){throw this.mySpacesLoading=!1,console.error("Failed to fetch my spaces:",s),s}},async joinSpace(t,e=null){var o,r,a;const n=ws(),s=e||this.spacesBySlug[t];if(!s)throw new Error("Space not found");const i=((o=s.user_status)==null?void 0:o.status)==="active";i||(s.user_status||(s.user_status={}),s.user_status.status="active",s.members_count=(s.members_count||0)+1,this.mySpaces.find(l=>l.slug===t)||this.mySpaces.push(s));try{const l=await this.$api.post(`spaces/${t}/join`),c=(r=l.membership)==null?void 0:r.status;if(c&&(s.user_status.status=c),c&&c!=="active"&&!i){s.members_count=Math.max(0,(s.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}return n.invalidate(`space:${t}`),n.invalidate("my-spaces"),(a=window.fluentFrameworkApp)!=null&&a.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_joined",s),l}catch(l){if(!i){s.user_status.status=null,s.members_count=Math.max(0,(s.members_count||1)-1);const c=this.mySpaces.findIndex(u=>u.slug===t);c!==-1&&this.mySpaces.splice(c,1)}throw console.error("Failed to join space:",l),l}},async leaveSpace(t){var r,a,l,c;const e=ws(),n=this.spacesBySlug[t];if(!n)throw new Error("Space not found");const s=((r=n.user_status)==null?void 0:r.status)==="active",i=(a=n.user_status)==null?void 0:a.status,o=n.members_count;if(s){n.user_status.status=null,n.members_count=Math.max(0,(n.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}try{const u=await this.$api.post(`spaces/${t}/leave`),d=u.space||u;return this.spacesBySlug[t]=d,((l=this.currentSpace)==null?void 0:l.slug)===t&&(this.currentSpace=d),e.invalidate(`space:${t}`),e.invalidate("my-spaces"),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_left",d),d}catch(u){throw s&&(n.user_status.status=i,n.members_count=o,this.mySpaces.push(n)),console.error("Failed to leave space:",u),u}},async fetchSpaceTopics(t,e=!1){const n=ws(),s=`space-topics:${t}`;if(!e){const i=n.get(s);if(i)return this.topicsBySpace[t]=i,i}try{const i=await this.$api.get(`spaces/${t}/topics`),o=i.topics||i;return this.topicsBySpace[t]=o,n.set(s,o,30*60*1e3),o}catch(i){throw console.error("Failed to fetch space topics:",i),i}},setCurrentSpace(t){const e=this.spacesBySlug[t];e&&(this.currentSpace=e,typeof window<"u"&&(window.fcom_current_community=e))},clearCurrentSpace(){this.currentSpace=null,typeof window<"u"&&(window.fcom_current_community=null)},invalidateSpace(t){const e=ws();e.invalidate(`space:${t}`),e.invalidate(`space-topics:${t}`),delete this.lastFetched[t]},clearAll(){this.spacesBySlug={},this.currentSpace=null,this.mySpaces=[],this.topicsBySpace={},this.loading={},this.mySpacesLoading=!1,this.lastFetched={};const t=ws();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),kIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:yS()}},data(){return{loading:!1,hovering:!1}},watch:{profile:{immediate:!0,handler(t){t!=null&&t.user_id&&(t==null?void 0:t.follow)!==void 0&&this.userStore.setFollows({[t.user_id]:t.follow})}}},computed:{isFollowing(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isFollowing(this.profile.user_id):!1},showFollowAction(){var n;const t=(n=this.profile)==null?void 0:n.user_id,e=this.auth.user_id;return this.hasFeature("followers_module")&&t&&e&&t!=e},isBlocked(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isBlocked(this.profile.user_id):!1},followBtnText(){var t;return this.followButtonText?this.followButtonText:(t=this.profile)!=null&&t.is_follower?this.$t("Follow Back"):this.$t("Follow")}},methods:{confirmUnfollow(){this.unfollowUser()},async followUser(){this.loading=!0;try{await this.userStore.toggleFollow(this.profile.user_id,this.profile.username),this.$notify.success(this.$t("Successfully followed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},async unfollowUser(){this.loading=!0;try{await this.userStore.toggleFollow(this.profile.user_id,this.profile.username),this.$notify.success(this.$t("Successfully unfollowed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},unblockUser(){this.loading=!0,this.$post("profile/"+this.profile.username+"/unblock").then(t=>{this.userStore.removeFollow(this.profile.user_id),this.$notify.success(t.message)}).finally(()=>{this.loading=!1})}}},CIe={key:0},SIe={key:1},$Ie={key:0},AIe={key:1};function EIe(t,e,n,s,i,o){const r=Ge;return o.showFollowAction?(v(),A(te,{key:0},[o.isBlocked?(v(),D(r,{key:0,class:"fcom_secondary_button danger_button",loading:i.loading,disabled:i.loading,style:{"min-width":"90px","max-height":"30px"},onClick:o.unblockUser,onMouseenter:e[0]||(e[0]=a=>i.hovering=!0),onMouseleave:e[1]||(e[1]=a=>i.hovering=!1)},{default:w(()=>[i.hovering?(v(),A("span",SIe,$(t.$t("Unblock")),1)):(v(),A("span",CIe,$(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),D(r,{key:1,onClick:o.confirmUnfollow,class:U(["fcom_secondary_button",{danger_button:i.hovering}]),style:{"min-width":"95px","max-height":"30px"},loading:i.loading,disabled:i.loading,onMouseenter:e[2]||(e[2]=a=>i.hovering=!0),onMouseleave:e[3]||(e[3]=a=>i.hovering=!1)},{default:w(()=>[i.hovering?(v(),A("span",AIe,$(t.$t("Unfollow")),1)):(v(),A("span",$Ie,$(t.$t("Following")),1))]),_:1},8,["onClick","class","loading","disabled"])):(v(),D(r,{key:2,onClick:o.followUser,class:"fcom_color_button",style:{"max-height":"30px"},loading:i.loading,disabled:i.loading},{default:w(()=>[g("span",null,$(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const MIe=ge(kIe,[["render",EIe]]),TIe={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default:!0},show_badge:{type:Boolean,default:!1},show_verified:{type:Boolean,default:!0},show_follow:{type:Boolean,default:!1},virtualRef:{default:null}},emits:["popover-mouseenter","popover-mouseleave"],components:{SocialLinks:wIe,FollowAction:MIe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?kh(this.xprofile.total_points):null}},methods:{initShow(){document.addEventListener("scroll",this.onScroll,!0)},onHide(){document.removeEventListener("scroll",this.onScroll,!0)},onScroll(){var t,e;(e=(t=this.$refs.popoverRef)==null?void 0:t.hide)==null||e.call(t),this.virtualRef&&this.$eventBus.emit("hide_mention_popover")}},beforeUnmount(){document.removeEventListener("scroll",this.onScroll,!0)}},PIe=["href"],IIe={class:"fcom_user_display_name"},LIe={key:1,class:"user_route"},OIe=["href"],DIe={class:"fcom_user_display_name"},RIe={class:"fcom_profile_pop_avatar"},VIe={key:0,class:"fcom_prfile_tagline"},FIe={class:"fcom_level_name"},NIe={style:{display:"block"},class:"fcoml_level_sub meta_line"},BIe={class:"fcom_profile_pop_info"},zIe={class:"pop_info_header"},HIe={class:"header_name"},UIe=["href"],jIe={class:"fcom_user_display_name"},WIe={class:"fcom_user_name"},YIe={key:0,class:"header_actions"},qIe={key:0,class:"fcom_profile_pop_bio"},GIe=["title"],XIe=["title"],KIe={class:"pop_info_btns"},ZIe=["href"],JIe=["href"];function QIe(t,e,n,s,i,o){const r=W("verified-sign"),a=W("UserBadge"),l=W("UserAvatar"),c=Od,u=W("follow-action"),d=W("SocialLinks"),h=Ld,f=Xi;return n.show_pop?(v(),A("span",LIe,[y(f,{ref:"popoverRef",visible:n.virtualRef?!0:null,"virtual-ref":n.virtualRef,"virtual-triggering":!!n.virtualRef,width:500,"show-after":n.virtualRef?0:500,trigger:n.virtualRef?null:"hover",onShow:o.initShow,onHide:o.onHide,persistent:!1,"popper-class":"fcom_profile_popper",placement:"top","popper-style":"padding: 0;"},{reference:w(()=>[le(t.$slots,"default",{},()=>[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",DIe,$(n.xprofile.display_name),1)],8,OIe)])]),default:w(()=>[g("div",{class:"fcom_profile_pop",onMouseenter:e[0]||(e[0]=p=>n.virtualRef&&t.$emit("popover-mouseenter")),onMouseleave:e[1]||(e[1]=p=>n.virtualRef&&t.$emit("popover-mouseleave"))},[n.xprofile&&n.xprofile.username?(v(),D(h,{key:0,gutter:20},{default:w(()=>[y(c,{sm:24,md:8},{default:w(()=>[g("div",RIe,[y(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),A("div",VIe,[g("div",FIe,$(o.userLevel.title),1),g("div",NIe,$(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),y(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",BIe,[g("div",zIe,[g("div",HIe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",jIe,$(n.xprofile.display_name),1),n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,UIe),g("span",WIe," @"+$(n.xprofile.username),1)]),n.show_follow?(v(),A("div",YIe,[y(u,{profile:n.xprofile},null,8,["profile"])])):O("",!0)]),(p=n.xprofile.meta)!=null&&p.short_description_rendered||n.xprofile.short_description_rendered?(v(),A("div",qIe,$(t.getExcerpt(((m=n.xprofile.meta)==null?void 0:m.short_description_rendered)||n.xprofile.short_description_rendered,160)),1)):O("",!0),n.xprofile.created_at?(v(),A("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},$(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,GIe)):O("",!0),n.xprofile.last_activity?(v(),A("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},$(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,XIe)):O("",!0),g("div",KIe,[g("a",{class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("u/:username",{username:n.xprofile.username})},$(t.$t("View Profile")),9,ZIe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),A("a",{key:0,class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("chat/?user_id=:user_id",{user_id:n.xprofile.user_id})},$(t.$t("Message")),9,JIe)):O("",!0)]),y(d,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]}),_:1})]),_:1})):O("",!0)],32)]),_:3},8,["visible","virtual-ref","virtual-triggering","show-after","trigger","onShow","onHide"]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)])):(v(),A("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(t.$slots,"default",{},()=>[g("p",IIe,$(n.xprofile.display_name),1)]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,PIe))}const ta=ge(TIe,[["render",QIe]]),eLe={name:"MentionPopover",components:{UserRouteLink:ta},setup(){return{userStore:yS()}},data(){return{xprofile:null,virtualRef:null,hideTimeout:null,cache:{},cacheTTL:5*60*1e3,requestId:0}},methods:{getCached(t){const e=this.cache[t];return e?Date.now()-e.timestamp>this.cacheTTL?(delete this.cache[t],null):e.data:null},setCache(t,e){this.cache[t]={data:e,timestamp:Date.now()}},async showPopover({username:t,triggerElement:e}){this.cancelHide();const n=++this.requestId;let s=this.getCached(t);if(!s){try{s=await this.userStore.fetchProfile(t)}catch{return}this.setCache(t,s)}n===this.requestId&&(this.xprofile=s,this.virtualRef=e)},cancelHide(){clearTimeout(this.hideTimeout)},startHideTimeout(){this.cancelHide(),this.hideTimeout=setTimeout(()=>{this.virtualRef=null},200)}},mounted(){this.$eventBus.on("show_mention_popover",this.showPopover),this.$eventBus.on("hide_mention_popover",this.startHideTimeout)},beforeUnmount(){this.$eventBus.off("show_mention_popover",this.showPopover),this.$eventBus.off("hide_mention_popover",this.startHideTimeout),clearTimeout(this.hideTimeout)}};function tLe(t,e,n,s,i,o){const r=W("UserRouteLink");return i.virtualRef&&i.xprofile?(v(),D(r,{key:0,xprofile:i.xprofile,virtualRef:i.virtualRef,show_badge:!0,show_follow:!0,onPopoverMouseenter:o.cancelHide,onPopoverMouseleave:o.startHideTimeout},null,8,["xprofile","virtualRef","onPopoverMouseenter","onPopoverMouseleave"])):O("",!0)}const nLe=ge(eLe,[["render",tLe]]),sLe={name:"UnfinishedChangesModal",emits:["proceed"],data(){return{isVisible:!1,message:""}},methods:{handleCancel(){this.isVisible=!1,window.fcom_pending_modal_close=!1},handleProceed(){this.isVisible=!1,window.fcom_pending_modal_close?(this.$emit("proceed"),window.fcom_pending_modal_close=!1,window.fcom_modal_comment_unsaved=!1):this.$eventBus.emit("unsavedChangesProceeded")},showModal(t){t==="feed"?this.message=this.$t("You haven't finished your post yet. Do you want to leave without finishing?"):t==="comment"&&(this.message=this.$t("You haven't finished your comment yet. Do you want to leave without finishing?")),this.isVisible=!0}},mounted(){this.$eventBus.on("showUnsavedChangesModal",this.showModal)},beforeUnmount(){this.$eventBus.off("showUnsavedChangesModal",this.showModal)}},iLe={class:"dialog_header"},oLe={class:"dialog_left"},rLe={class:"dialog_body"},aLe={class:"dialog_footer"};function lLe(t,e,n,s,i,o){const r=Ge,a=Fs;return v(),D(a,{"modal-class":"fcom_common_dialog fcom_editor_unfinished_dialog",modelValue:i.isVisible,"onUpdate:modelValue":e[0]||(e[0]=l=>i.isVisible=l),width:t.modalWidth,"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":!0,"show-close":!1},{header:w(()=>[g("div",iLe,[g("div",oLe,[g("h4",null,$(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",aLe,[y(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),y(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[Y($(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",rLe,[g("span",null,$(i.message),1)])]),_:1},8,["modelValue","width"])}const cLe=ge(sLe,[["render",lLe]]);/*! Element Plus v2.13.6 */var WH={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};let uLe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(uLe))WH.el[t]=e;const dLe={name:"PortalApplication",components:{Back:GD,SpaceCreateModal:rPe,CourseIcon:NH,AnalyticsIcon:zae,MentionPopover:nLe,UnfinishedChangesModal:cLe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:WH}},created(){this.isSmallScreen=window.innerWidth<=1024}},hLe={class:"fcom_general_menu"},fLe=["href"],pLe={class:"el-icon fcom_arrow_icon"},mLe={class:"fcom_communities_menu fcom_admin_menu"},gLe={class:"fcom_general_menu"},vLe={class:"community_avatar"},yLe={class:"fcom_shape"},bLe={class:"community_name"},_Le={class:"fcom_general_menu"},wLe={class:"community_avatar"},xLe={class:"fcom_shape"},kLe={class:"community_name"},CLe={class:"fcom_general_menu"},SLe={class:"community_avatar"},$Le={class:"fcom_shape"},ALe={class:"community_name"};function ELe(t,e,n,s,i,o){const r=W("router-view"),a=W("Back"),l=_e,c=W("router-link"),u=W("CourseIcon"),d=W("AnalyticsIcon"),h=W("space-create-modal"),f=W("mention-popover"),p=W("unfinished-changes-modal"),m=bde;return v(),D(m,{locale:i.enLang},{default:w(()=>[y(r),(v(),D(Ta,{to:"#fcom_menu_sidebar"},[g("ul",hLe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",pLe,[y(a)]),g("span",null,$(t.$t("Back to home")),1)],8,fLe)])]),g("div",mLe,[Object.keys(i.menuItems).length>0?(v(),A(te,{key:0},[g("h4",null,$(t.$t("Portal Settings")),1),g("ul",gLe,[(v(!0),A(te,null,we(i.menuItems,b=>(v(),A("li",{key:b.route,class:U("settings_inner_menu_"+b.route)},[y(c,{to:{name:b.route}},{default:w(()=>[g("div",vLe,[g("span",yLe,[y(l,{innerHTML:b.icon_svg},null,8,["innerHTML"])])]),g("span",bLe,$(b.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),A(te,{key:1},[g("h4",null,$(t.$t("Course Management")),1),g("ul",_Le,[g("li",null,[y(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",wLe,[g("span",xLe,[y(l,null,{default:w(()=>[y(u)]),_:1})])]),g("span",kLe,$(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),A(te,{key:2},[g("h4",null,$(t.$t("Reports")),1),g("ul",CLe,[g("li",null,[y(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",SLe,[g("span",$Le,[y(l,null,{default:w(()=>[y(d)]),_:1})])]),g("span",ALe,$(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),y(h),y(f),y(p)]),_:1},8,["locale"])}const MLe=ge(dLe,[["render",ELe]]),TLe={name:"Pagination",emits:["fetch","per_page_change"],props:{pagination:{required:!0,type:Object},extra_sizes:{required:!1,type:Array,default(){return[]}},hide_on_single:{required:!1,type:Boolean,default(){return!0}}},computed:{page_sizes(){const t=[];this.pagination.per_page<10&&t.push(this.pagination.per_page);const e=[10,20,50,80,100,120,150];return[...t,...e,...this.extra_sizes]},pager_layout(){return this.isMobile?"total, sizes, jumper, prev, next":"total, sizes, jumper , prev, pager, next"}},methods:{changePage(t){this.pagination.page=t,this.$emit("fetch")},changeSize(t){this.pagination.per_page=t,this.$emit("per_page_change",t),this.$emit("fetch")}}},PLe={class:"fcom_pagination_wrap"};function ILe(t,e,n,s,i,o){const r=lve;return v(),A("div",PLe,[y(r,{background:!1,size:"small","pager-count":5,layout:o.pager_layout,onCurrentChange:o.changePage,onSizeChange:o.changeSize,"hide-on-single-page":n.hide_on_single,"current-page":n.pagination.page,"page-sizes":o.page_sizes,"page-size":n.pagination.per_page,total:n.pagination.total},null,8,["layout","onCurrentChange","onSizeChange","hide-on-single-page","current-page","page-sizes","page-size","total"])])}const qd=ge(TLe,[["render",ILe]]),LLe={name:"AddMembersForm",components:{SpaceCourseSelector:vS},props:{context:{type:String,required:!0},target:{type:Object,required:!0}},emits:["completed","membersAdded"],data(){return{sourceMode:"wp_users",wpUsers:[],wpLoading:!1,currentSearch:"",inviting:!1,selectedUserIds:[],role:"member",saving:!1,selectedSourceId:"",selectedSourceType:"",selectedSourceSlug:"",csvRows:[],csvFileName:"",createMissingUsers:!1,sendWelcomeEmailCsv:!1,sendWelcomeEmailCrm:!1,wpUsersLoaded:!1,crmTags:[],crmTagsLoading:!1,crmTagsLoaded:!1,selectedTagId:null,createMissingCrmUsers:!1,batchRunning:!1,batchProgress:0,batchProcessed:0,batchTotal:0,importDone:null}},computed:{isEmail(){return/^\S+@\S+\.\S+$/.test(this.currentSearch)}},watch:{sourceMode(t){t==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers(),t==="crm_tag"&&this.appVars.pro&&!this.crmTagsLoaded&&this.fetchCrmTags()},createMissingUsers(t){t||(this.sendWelcomeEmailCsv=!1)},createMissingCrmUsers(t){t||(this.sendWelcomeEmailCrm=!1)}},methods:{invitingLabel(t){return t?this.$t("Send Invitation to %s",t):this.$t("Send Invitation")},searchWpUsers(t=""){this.currentSearch=(t||"").trim(),!(t&&t.length<2)&&this.fetchWpUsers(t)},fetchWpUsers(t=""){this.wpLoading=!0;const e=this.context==="course",n=e?`admin/courses/${this.target.id}/users/search`:"spaces/users/search",s=e?{search:t}:{context:"add_member",search:t,space_id:this.target.id};this.$get(n,s).then(i=>{this.wpUsers=i.users.data,this.wpUsersLoaded=!0}).catch(i=>{this.$handleError(i)}).finally(()=>{this.wpLoading=!1})},addWpUsers(){if(!this.selectedUserIds.length)return;const t=this.context==="course";if(this.selectedUserIds.length===1){this.saving=!0;const s=t?"admin/courses/"+this.target.id+"/students":"spaces/"+this.target.slug+"/members",i=t?{user_id:this.selectedUserIds[0]}:{user_id:this.selectedUserIds[0],role:this.role};this.$post(s,i).then(o=>{this.$notify.success(o.message),this.$emit("completed")}).catch(o=>{this.$handleError(o)}).finally(()=>{this.saving=!1});return}const e=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",n=t?{}:{role:this.role};this.runChunkedImport(this.selectedUserIds,s=>({url:e,data:{user_ids:s,...n}}))},inviteToSpace(){if(this.context!=="space")return;const t=this.currentSearch;this.inviting=!0,this.$post("invitations",{email:t,space_id:this.target.id}).then(e=>{this.$notify.success(e.message||this.$t("Invitation sent.")),this.currentSearch="",this.fetchWpUsers("")}).catch(e=>{this.$handleError(e)}).finally(()=>this.inviting=!1)},importFromSource(){if(!this.selectedSourceId){this.$notify.error(this.$t("Please select a source space or course."));return}const t=this.context==="course",e=this.selectedSourceType==="course";if(e&&!parseInt(this.selectedSourceId,10)){this.$notify.error(this.$t("Invalid source course."));return}if(!e&&!this.selectedSourceSlug){this.$notify.error(this.$t("Invalid source space."));return}const n=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",s=e?{from_course_id:parseInt(this.selectedSourceId,10)}:{from_space_slug:this.selectedSourceSlug};this.runOffsetImport(n,s)},downloadSampleCsv(){this.$exportToCsv([{Name:"John Doe",Email:"john@example.com",Username:"johndoe"},{Name:"Jane Smith",Email:"jane@example.com",Username:"janesmith"},{Name:"Bob Lee",Email:"bob@example.com",Username:"boblee"}],"fcom-bulk-import-sample-"+this.context+".csv")},onCsvFileChange(t){if(t&&t.status&&t.status!=="ready")return;const e=t.raw||t;if(!e)return;this.csvFileName=e.name||"import.csv";const n=new FileReader;n.onload=s=>{this.csvRows=this.parseCsvText(s.target.result.trim()),this.csvRows.length||this.$notify.error(this.$t("No valid rows found. Ensure columns are Name, Email, Username."))},n.readAsText(e)},resetCsvImport(){this.csvRows=[],this.csvFileName=""},splitCsvLine(t){return t.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(e=>e.trim().replace(/^"|"$/g,"").replace(/""/g,'"'))},parseCsvText(t){const e=t.split(/\r?\n/).map(d=>d.trim()).filter(Boolean);if(!e.length)return[];const n=this.splitCsvLine(e[0]).map(d=>d.toLowerCase()),s=["name","email","username"],i=n.some(d=>s.includes(d));let o=0,r=1,a=2,l=0;i&&(l=1,o=n.indexOf("name"),r=n.indexOf("email"),a=n.indexOf("username"));const c=new Set,u=[];for(let d=l;d<e.length;d++){const h=this.splitCsvLine(e[d]),f=o>=0&&h[o]||"",p=r>=0?(h[r]||"").toLowerCase():"",m=a>=0&&h[a]||"";!p.includes("@")||c.has(p)||(c.add(p),u.push({name:f,email:p,username:m}))}return u},importCsv(){if(!this.csvRows.length)return;let t=`spaces/${this.target.slug}/members/bulk-import`;this.context==="course"&&(t=`admin/courses/${this.target.id}/students/bulk-import`);const e=100,n=this.csvRows.length,s={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=n,this.batchProcessed=0,this.batchProgress=0;const i=o=>{if(o>=n){this.batchRunning=!1,this.importDone={...s,total:n},this.$emit("membersAdded");return}const r=this.csvRows.slice(o,o+e);this.$post(t,{rows:r,create_missing:this.createMissingUsers,notify_new_users:this.sendWelcomeEmailCsv}).then(a=>{s.added+=a.added||0,s.skipped+=a.skipped||0,s.failed+=a.failed||0;const l=a.processed&&a.processed>0?a.processed:r.length,c=o+l;this.batchProcessed=Math.min(n,c),this.batchProgress=Math.round(this.batchProcessed/n*100),i(c)}).catch(a=>{this.$handleError(a),this.batchRunning=!1,this.importDone={...s,total:n},this.$emit("membersAdded")})};i(0)},fetchCrmTags(){this.crmTagsLoading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.crmTags=t.crm_tags||[],this.crmTagsLoaded=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.crmTagsLoading=!1})},addFromCrmTag(){if(!this.selectedTagId)return;const t=this.context==="course",e=t?`admin/courses/${this.target.id}/students/resolve-crm-tag`:`spaces/${this.target.slug}/members/resolve-crm-tag`,n=t?`admin/courses/${this.target.id}/students/bulk-add`:`spaces/${this.target.slug}/members/bulk-add`,s=[];let i=0;this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const o=()=>{this.batchRunning=!1;const a=s.length+i;this.importDone={added:0,skipped:0,failed:i,total:a},this.$emit("membersAdded")},r=a=>{this.$post(e,{tag_id:this.selectedTagId,create_missing:this.createMissingCrmUsers,notify_new_users:this.sendWelcomeEmailCrm,offset:a,per_page:200}).then(l=>{if(l.user_ids&&l.user_ids.length&&s.push(...l.user_ids),i+=l.failed||0,l.has_more){r(l.next_offset);return}if(!s.length){o();return}this.runChunkedImport(s,c=>({url:n,data:{user_ids:c}}),i)}).catch(l=>{this.$handleError(l),this.batchRunning=!1;const c=s.length+i;this.importDone={added:0,skipped:0,failed:i,total:c},this.$emit("membersAdded")})};r(0)},runChunkedImport(t,e,n=0){const i=t.length,o={added:0,skipped:0,failed:n},r=i+n;this.batchRunning=!0,this.batchTotal=i,this.batchProcessed=0,this.batchProgress=0;const a=l=>{if(l>=i){this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded");return}const c=t.slice(l,l+500),{url:u,data:d}=e(c);this.$post(u,d).then(h=>{o.added+=h.added||0,o.skipped+=h.skipped||0,o.failed+=h.failed||0;const f=h.processed&&h.processed>0?h.processed:c.length,p=l+f;this.batchProcessed=Math.min(i,p),this.batchProgress=Math.round(this.batchProcessed/i*100),a(p)}).catch(h=>{this.$handleError(h),this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded")})};a(0)},runOffsetImport(t,e){const n={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const s=i=>{this.$post(t,{...e,offset:i,per_page:500}).then(o=>{n.added+=o.added||0,n.skipped+=o.skipped||0,n.failed+=o.failed||0,o.total&&!this.batchTotal&&(this.batchTotal=o.total),this.batchProcessed=o.next_offset||i+(o.processed||0),this.batchProgress=this.batchTotal?Math.min(99,Math.round(this.batchProcessed/this.batchTotal*100)):50,o.has_more?s(o.next_offset||this.batchProcessed):(this.batchProgress=100,this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded"))}).catch(o=>{this.$handleError(o),this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded")})};s(0)}},mounted(){this.sourceMode==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers()}},OLe={class:"fcom_add_members_form"},DLe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},RLe={key:1,class:"fcom_import_done"},VLe={class:"fcom_done_title"},FLe={class:"fcom_done_subtitle"},NLe={class:"fcom_import_summary"},BLe={class:"fcom_import_summary_title"},zLe={class:"fcom_import_summary_row"},HLe={class:"fcom_import_summary_row"},ULe={key:0,class:"fcom_import_summary_row"},jLe={key:1,class:"fcom_import_summary_row"},WLe={key:2,class:"fcom_import_progress_wrap"},YLe={class:"fcom_help_text fcom_mb_15"},qLe={key:0,class:"fcom_muted_text fcom_mt_10"},GLe={class:"fcom_select_photo",style:{float:"left"}},XLe=["src","alt"],KLe={style:{float:"right",color:"#8492a6","font-size":"13px"}},ZLe={style:{padding:"4px","text-align":"center"}},JLe={style:{margin:"0 0 8px"}},QLe={key:0},eOe={key:1},tOe={key:2},nOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},sOe={key:0,class:"fcom_help_text fcom_mb_10"},iOe=["href"],oOe={class:"fcom_help_text fcom_mb_15"},rOe={key:0},aOe={key:2},lOe={class:"fcom_spaced_flex fcom_mb_10"},cOe={class:"fcom_csv_drop_inner"},uOe={class:"el-upload__text fcom_mt_10"},dOe={key:0},hOe={class:"el-upload__tip"},fOe={class:"fcom_spaced_flex fcom_mb_10"},pOe={class:"fcom_muted_text",style:{"margin-left":"8px"}},mOe={key:0,class:"fcom_muted_text fcom_mb_10"},gOe=["aria-label"],vOe={class:"fcom_help_text fcom_mb_15"},yOe=["aria-label"],bOe={class:"fcom_help_text fcom_mb_15"},_Oe={key:0};function wOe(t,e,n,s,i,o){const r=dp,a=Ws,l=t2,c=ln,u=Ge,d=Qt,h=an,f=fn,p=W("SpaceCourseSelector"),m=j1,b=Jr,_=Zr,x=Zt,k=xt("loading");return v(),A("div",OLe,[!i.batchRunning&&!i.importDone?(v(),A("div",DLe,[y(a,{modelValue:i.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=C=>i.sourceMode=C),size:"small"},{default:w(()=>[y(r,{value:"wp_users"},{default:w(()=>[Y($(t.$t("WP Users")),1)]),_:1}),y(r,{value:"from_source"},{default:w(()=>[Y($(t.$t("From Space/Course")),1)]),_:1}),y(r,{value:"csv"},{default:w(()=>[Y($(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:w(()=>[Y($(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),i.importDone?(v(),A("div",RLe,[e[19]||(e[19]=g("div",{class:"fcom_done_icon_wrap"},[g("div",{class:"fcom_done_circle"},[g("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M4 10l4.5 4.5L16 6",stroke:"white","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"})])])],-1)),g("h3",VLe,$(t.$t("All Done!")),1),g("p",FLe,$(t.$t("Import has been completed. You may close this now.")),1),g("div",NLe,[g("strong",BLe,$(t.$t("Import Summary")),1),g("p",zLe,$(t.$t("Total Records:"))+" "+$(i.importDone.total),1),g("p",HLe,$(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+$(i.importDone.added),1),i.importDone.skipped?(v(),A("p",ULe,$(t.$t("Skipped:"))+" "+$(i.importDone.skipped),1)):O("",!0),i.importDone.failed?(v(),A("p",jLe,$(t.$t("Failed:"))+" "+$(i.importDone.failed),1)):O("",!0)])])):i.batchRunning?(v(),A("div",WLe,[g("div",YLe,[g("p",null,$(t.$t("Importing… Please do not close this window.")),1)]),y(l,{percentage:i.batchProgress,"stroke-width":12},null,8,["percentage"]),i.batchTotal?(v(),A("p",qLe,$(i.batchProcessed)+" / "+$(i.batchTotal)+" "+$(t.$t("processed")),1)):O("",!0)])):(v(),A(te,{key:3},[i.sourceMode==="wp_users"?(v(),D(f,{key:0,onSubmit:e[5]||(e[5]=Be(()=>{},["prevent"])),"label-position":"top"},{default:w(()=>[y(h,{label:t.$t("Users")},{default:w(()=>[y(d,{class:"rich_select",multiple:"",filterable:"",remote:"","default-first-option":"","reserve-keyword":!1,loading:i.wpLoading,"remote-method":o.searchWpUsers,placeholder:t.$t("Search and select users"),modelValue:i.selectedUserIds,"onUpdate:modelValue":e[2]||(e[2]=C=>i.selectedUserIds=C)},{empty:w(()=>[g("div",ZLe,[g("p",JLe,[o.isEmail?(v(),A("span",QLe,[Y($(t.$t("User not registered:"))+" ",1),g("strong",null,$(i.currentSearch),1)])):i.currentSearch?(v(),A("span",eOe,$(t.$t("No matching user found.")),1)):(v(),A("span",tOe,$(t.$t("No data")),1))]),n.context==="space"?(v(),A(te,{key:0},[o.isEmail?(v(),D(u,{key:0,size:"small",class:"fcom_primary_button",loading:i.inviting,disabled:i.inviting,"aria-label":o.invitingLabel(i.currentSearch),onClick:e[1]||(e[1]=C=>o.inviteToSpace())},{default:w(()=>[Y($(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):i.currentSearch?(v(),A("p",nOe,$(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:w(()=>[(v(!0),A(te,null,we(i.wpUsers,C=>(v(),D(c,{class:"fcom_with_photo_option",key:C.ID,label:`${C.display_name} (${C.user_email||C.ID})`,value:C.ID},{default:w(()=>[g("span",GLe,[g("img",{src:C.photo,alt:C.display_name},null,8,XLe),g("span",null,$(C.display_name),1)]),g("span",KLe,$(C.user_email||C.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),n.context==="space"?(v(),D(h,{key:0,label:t.$t("Membership Role")},{default:w(()=>[y(d,{modelValue:i.role,"onUpdate:modelValue":e[3]||(e[3]=C=>i.role=C),placeholder:t.$t("Select Role")},{default:w(()=>[y(c,{label:t.$t("Member"),value:"member"},null,8,["label"]),y(c,{label:t.$t("Moderator"),value:"moderator"},null,8,["label"]),y(c,{label:t.$t("Admin"),value:"admin"},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),y(h,null,{default:w(()=>[i.selectedUserIds.length>1&&!t.appVars.pro?(v(),A("div",sOe,[g("p",null,[Y($(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),A("a",{key:0,href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade")),9,iOe)):O("",!0)])])):O("",!0),Oe((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=C=>o.addWpUsers())},{default:w(()=>[Y($(n.context==="course"?t.$t("Add Students"):t.$t("Add as %s",i.role)),1)]),_:1})),[[k,i.saving]])]),_:1})]),_:1})):i.sourceMode==="from_source"?(v(),D(f,{key:1,"label-position":"top"},{default:w(()=>[y(h,{label:t.$t("Select Source Space or Course")},{default:w(()=>[y(p,{modelValue:i.selectedSourceId,"onUpdate:modelValue":e[6]||(e[6]=C=>i.selectedSourceId=C),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[7]||(e[7]=C=>i.selectedSourceType=C),onSelectedSlug:e[8]||(e[8]=C=>i.selectedSourceSlug=C)},null,8,["modelValue","placeholder_text","memberships"])]),_:1},8,["label"]),g("div",oOe,[g("p",null,$(n.context==="course"?t.$t("All users will be enrolled as Student."):t.$t("All users will be added as Member.")),1)]),y(u,{class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.importFromSource())},{default:w(()=>[Y($(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),A("span",rOe,"  ("+$(t.$t("Pro"))+")",1))]),_:1})]),_:1})):i.sourceMode==="csv"?(v(),A("div",aOe,[i.csvRows.length?(v(),A(te,{key:1},[g("div",fOe,[g("div",null,[g("strong",null,$(i.csvFileName),1),g("span",pOe,$(i.csvRows.length)+" "+$(t.$t("contacts")),1)]),y(u,{link:"",size:"small",onClick:e[11]||(e[11]=C=>o.resetCsvImport())},{default:w(()=>[Y($(t.$t("Change")),1)]),_:1})]),y(_,{data:i.csvRows.slice(0,5),size:"small",class:"fcom_mb_10"},{default:w(()=>[y(b,{prop:"name",label:t.$t("Name"),"min-width":"120"},null,8,["label"]),y(b,{prop:"email",label:t.$t("Email"),"min-width":"160"},null,8,["label"]),y(b,{prop:"username",label:t.$t("Username"),"min-width":"110"},null,8,["label"])]),_:1},8,["data"]),i.csvRows.length>5?(v(),A("p",mOe," + "+$(i.csvRows.length-5)+" "+$(t.$t("more rows")),1)):O("",!0),y(f,{"label-position":"top"},{default:w(()=>[y(h,null,{default:w(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for new email addresses")},[g("div",null,[y(x,{modelValue:i.createMissingUsers,"onUpdate:modelValue":e[12]||(e[12]=C=>i.createMissingUsers=C)},{default:w(()=>[Y($(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),g("div",null,[Oe(y(x,{modelValue:i.sendWelcomeEmailCsv,"onUpdate:modelValue":e[13]||(e[13]=C=>i.sendWelcomeEmailCsv=C)},{default:w(()=>[Y($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,i.createMissingUsers]])])],8,gOe)]),_:1}),g("div",vOe,[g("p",null,$(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),y(h,null,{default:w(()=>[y(u,{class:"fcom_primary_button",onClick:e[14]||(e[14]=C=>o.importCsv())},{default:w(()=>[Y($(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),A(te,{key:0},[g("div",lOe,[e[20]||(e[20]=g("span",null,null,-1)),t.appVars.pro?(v(),D(u,{key:0,link:"",size:"small",onClick:e[10]||(e[10]=C=>o.downloadSampleCsv())},{default:w(()=>[Y("↓ "+$(t.$t("Sample CSV")),1)]),_:1})):O("",!0)]),y(m,{drag:"",accept:".csv,.txt","auto-upload":!1,"show-file-list":!1,"on-change":o.onCsvFileChange,disabled:!t.appVars.pro},{tip:w(()=>[g("div",hOe,$(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",cOe,[e[22]||(e[22]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",uOe,[Y($(t.$t("Drop CSV here or"))+" ",1),g("em",null,$(t.$t("click to browse")),1),e[21]||(e[21]=Y()),t.appVars.pro?O("",!0):(v(),A("span",dOe,"  ("+$(t.$t("Pro"))+")",1))])])]),_:1},8,["on-change","disabled"])],64))])):i.sourceMode==="crm_tag"?(v(),D(f,{key:3,"label-position":"top"},{default:w(()=>[y(h,{label:t.$t("FluentCRM Tag")},{default:w(()=>[y(d,{modelValue:i.selectedTagId,"onUpdate:modelValue":e[15]||(e[15]=C=>i.selectedTagId=C),loading:i.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(i.crmTags,C=>(v(),D(c,{key:C.id,label:C.title,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"])]),_:1},8,["label"]),y(h,null,{default:w(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for contacts without an existing account")},[g("div",null,[y(x,{modelValue:i.createMissingCrmUsers,"onUpdate:modelValue":e[16]||(e[16]=C=>i.createMissingCrmUsers=C)},{default:w(()=>[Y($(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),g("div",null,[Oe(y(x,{modelValue:i.sendWelcomeEmailCrm,"onUpdate:modelValue":e[17]||(e[17]=C=>i.sendWelcomeEmailCrm=C)},{default:w(()=>[Y($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,i.createMissingCrmUsers]])])],8,yOe)]),_:1}),g("div",bOe,[g("p",null,$(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),y(u,{class:"fcom_primary_button",onClick:e[18]||(e[18]=C=>o.addFromCrmTag())},{default:w(()=>[Y($(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),A("span",_Oe,"  ("+$(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const xOe=ge(LLe,[["render",wOe]]),kOe={name:"ExportIcon"},COe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SOe(t,e,n,s,i,o){return v(),A("svg",COe,[...e[0]||(e[0]=[g("path",{d:"M8.00001 9.66667L8.00001 3M8.00001 9.66667C7.53319 9.66667 6.66103 8.33713 6.33334 8M8.00001 9.66667C8.46683 9.66667 9.33899 8.33713 9.66668 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M13.3333 11C13.3333 12.6547 12.988 13 11.3333 13H4.66666C3.01199 13 2.66666 12.6547 2.66666 11",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const YH=ge(kOe,[["render",SOe]]),$Oe={name:"CourseMembers",props:["course"],components:{Search:G_,UserRouteLink:ta,Pagination:qd,AddMembersForm:xOe,ExportIcon:YH},data(){return{students:[],search:"",loading:!0,exporting:!1,isAddStdOpen:!1,pagination:{page:1,per_page:20,total:0}}},methods:{exportStudents(){if(!this.has_pro){this.$handleError(this.$t("Please upgrade to Pro to use this feature"));return}this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/students",{search:this.search}).then(t=>{this.$exportToCsv(t.students,"course-students-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})},updateStudents(t){this.students=this.students.filter(e=>e.user_id!==t.user_id)},studentAdded(){this.isAddStdOpen=!1,this.fetchStudents()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchStudents()},removeStudentPrompt(t){this.$confirm(this.$t("Are you sure you want to remove this student from this course?"),this.$t("Remove Student?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"error"}).then(()=>{this.removeStudent(t)})},removeStudent(t){this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id).then(e=>{this.$notify.success(e.message),this.updateStudents(t)}).catch(e=>{this.$handleError(e)})},fetchStudents(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/students",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search}).then(t=>{this.students=t.students.data,this.pagination.total=t.students.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchStudents()}},AOe={class:"fcom_course_members"},EOe={class:"fcom_course_member_header"},MOe={class:"fcom_course_member_actions"},TOe={key:0},POe={key:1},IOe={class:"search_member fcom_mb_20"},LOe={class:"table_user_card"},OOe={class:"card_avatar"},DOe={class:"card_info"},ROe={class:"card_name"},VOe={key:0,class:"meta_line"},FOe={class:"progress_wrap"},NOe=["title"],BOe=["title"];function zOe(t,e,n,s,i,o){const r=W("ExportIcon"),a=_e,l=Ge,c=W("Search"),u=_t,d=W("UserAvatar"),h=W("UserRouteLink"),f=Jr,p=t2,m=W("MoreFilled"),b=Oa,_=Da,x=La,k=Zr,C=W("pagination"),S=W("add-members-form"),E=Al,P=xt("loading");return v(),A("div",AOe,[g("div",EOe,[g("h3",null,$(t.$t("Course Students")),1),g("div",MOe,[t.hasCourseCreatorAccess()?(v(),D(l,{key:0,class:"fcom_secondary_button",loading:i.exporting,onClick:e[0]||(e[0]=T=>o.exportStudents())},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),t.has_pro?(v(),A("span",TOe,$(t.$t("Export")),1)):(v(),A("span",POe,$(t.$t("Export (Pro)")),1))]),_:1},8,["loading"])):O("",!0),t.hasCourseCreatorAccess()?(v(),D(l,{key:1,class:"fcom_primary_button",onClick:e[1]||(e[1]=T=>i.isAddStdOpen=!0)},{default:w(()=>[Y($(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",IOe,[y(u,{onKeydown:Nt(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[2]||(e[2]=T=>i.search=T),clearable:"",onClear:o.toSearch,placeholder:t.$t("Search Members...")},{prefix:w(()=>[y(a,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["onKeydown","onInput","modelValue","onClear","placeholder"])]),Oe((v(),D(k,{data:i.students,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Students Found")},{default:w(()=>[y(f,{prop:"ID",label:t.$t("Name"),"min-width":"200"},{default:w(T=>{var L;return[g("div",LOe,[g("div",OOe,[y(d,{xprofile:T.row},null,8,["xprofile"])]),g("div",DOe,[g("div",ROe,[y(h,{show_badge:!0,xprofile:T.row},null,8,["xprofile"])]),T.row.short_description?(v(),A("div",VOe,$(t.getExcerpt(((L=T.row.meta)==null?void 0:L.short_description_rendered)||T.row.short_description,160)),1)):O("",!0)])])]}),_:1},8,["label"]),y(f,{width:"160",prop:"progress",label:t.$t("Progress")},{default:w(T=>[g("div",FOe,[y(p,{class:"fcom_progress",percentage:parseInt(T.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),y(f,{width:"160",label:t.$t("Start Date")},{default:w(T=>[g("div",{title:T.row.space_pivot.created_at},$(t.smartDate(T.row.space_pivot.created_at,!0)),9,NOe)]),_:1},8,["label"]),y(f,{width:"150",label:t.$t("Last Seen")},{default:w(T=>[g("div",{title:T.row.last_activity},$(t.humanDateDiff(T.row.last_activity)),9,BOe)]),_:1},8,["label"]),y(f,{width:"60"},{default:w(T=>[t.hasCourseCreatorAccess()?(v(),D(x,{key:0,trigger:"click"},{dropdown:w(()=>[y(_,null,{default:w(()=>[y(b,{onClick:L=>o.removeStudentPrompt(T.row)},{default:w(()=>[Y($(t.$t("Remove")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[y(l,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(m)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)):O("",!0)]),_:1})]),_:1},8,["data","empty-text"])),[[P,i.loading]]),y(C,{hide_on_single:!0,onFetch:o.fetchStudents,pagination:i.pagination},null,8,["onFetch","pagination"]),y(E,{modelValue:i.isAddStdOpen,"onUpdate:modelValue":e[4]||(e[4]=T=>i.isAddStdOpen=T),"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,direction:"rtl"},{header:w(()=>[g("h4",null,$(t.$t("Add Student")),1)]),default:w(()=>[i.isAddStdOpen?(v(),D(S,{key:0,context:"course",target:n.course,onCompleted:o.studentAdded,onMembersAdded:e[3]||(e[3]=T=>o.fetchStudents())},null,8,["target","onCompleted"])):O("",!0)]),_:1},8,["modelValue","size"])])}const HOe=ge($Oe,[["render",zOe]]),UOe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:H4},data(){return{openModal:!0,lesson:this.result.lesson,xprofile:this.result.xprofile,userAnswers:this.result.message,currentStatus:["passed","failed"].includes(this.result.status)?this.result.status:"",statuses:{passed:this.$t("Passed"),failed:this.$t("Failed")}}},watch:{openModal(){this.$emit("close")}},computed:{questions(){var t,e;return((e=(t=this.lesson)==null?void 0:t.meta)==null?void 0:e.quiz_questions)||[]}},methods:{closeModal(){this.openModal=!1,this.$emit("close")},showQuestion(t){return!!this.userAnswers[t.slug]},showQuestionImage(t){return t.image_enabled&&t.image_url},isQuestionCorrect(t){var e;return(e=this.userAnswers[t.slug])==null?void 0:e.is_correct},isOptionSelected(t,e){var n;return((n=this.userAnswers[t.slug])==null?void 0:n.user_answer)===e.label},isSingleChoice(t){return t.type==="single_choice"},handleOptionChange(){},updateResult(){this.$post("admin/courses/"+this.course.id+"/quiz-results/"+this.result.id,{status:this.currentStatus}).then(t=>{this.$notify.success(t.message),this.closeModal(),this.$emit("updateResult")})}}},jOe={class:"dialog_header"},WOe={class:"dialog_left"},YOe={class:"fcom_view_quiz_result"},qOe={class:"fcom_result_details"},GOe={class:"fcom_questions_wrap"},XOe={key:0,class:"fcom_question"},KOe={key:0,class:"fcom_question_image"},ZOe={class:"fcom_question_header"},JOe=["innerHTML"],QOe={class:"fcom_question_body"},eDe={key:0,class:"correct_text"},tDe={key:1,class:"correct_text"},nDe={class:"fcom_question_options"},sDe={key:0,class:"question_help_text"},iDe={class:"fcom_result_info"},oDe={class:"result_info_item"},rDe={class:"left_side"},aDe={class:"sub_title"},lDe={class:"right_side"},cDe={class:"result_info_item"},uDe={class:"left_side"},dDe={class:"title"},hDe={class:"sub_title"},fDe={class:"result_info_item"},pDe={class:"left_side"},mDe={class:"title"},gDe={class:"sub_title"},vDe={class:"result_info_item"},yDe={class:"left_side"},bDe={class:"title"},_De={class:"score"},wDe={class:"right_side"},xDe={class:"title"},kDe={class:"score"},CDe={class:"result_info_item"},SDe={class:"left_side"},$De={class:"title"},ADe={class:"dialog_footer"};function EDe(t,e,n,s,i,o){const r=Ra,a=W("Check"),l=_e,c=W("Close"),u=Zt,d=W("UserRouteLink"),h=W("UserAvatar"),f=ln,p=Qt,m=Ge,b=Fs;return v(),D(b,{modelValue:i.openModal,"onUpdate:modelValue":e[1]||(e[1]=_=>i.openModal=_),"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"modal-class":"fcom_common_dialog result_dialog",onClose:o.closeModal},{header:w(()=>[g("div",jOe,[g("div",WOe,[g("h4",null,$(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",ADe,[y(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),y(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[Y($(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var _;return[g("div",YOe,[g("div",qOe,[g("div",GOe,[(v(!0),A(te,null,we(o.questions,x=>(v(),A(te,{key:x.slug},[o.showQuestion(x)?(v(),A("div",XOe,[o.showQuestionImage(x)?(v(),A("div",KOe,[y(r,{src:x.image_url},null,8,["src"])])):O("",!0),g("div",ZOe,[g("div",{innerHTML:x.label_rendered,class:"fcom_question_label"},null,8,JOe)]),g("div",QOe,[g("div",{class:U(["fcom_is_correct",o.isQuestionCorrect(x)?"correct":"incorrect"])},[o.isQuestionCorrect(x)?(v(),A("p",eDe,[y(l,null,{default:w(()=>[y(a)]),_:1}),Y(" "+$(t.$t("Correct")),1)])):(v(),A("p",tDe,[y(l,null,{default:w(()=>[y(c)]),_:1}),Y(" "+$(t.$t("Incorrect")),1)]))],2),g("div",nDe,[(v(!0),A(te,null,we(x.options,k=>(v(),A("div",{key:k.label,class:"fcom_question_option"},[y(u,{class:U({single_choice:o.isSingleChoice(x)}),"model-value":o.isOptionSelected(x,k),onChange:C=>o.handleOptionChange(x,k)},{default:w(()=>[Y($(k.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))]),x.help_text?(v(),A("div",sDe,$(x.help_text),1)):O("",!0)])])):O("",!0)],64))),128))])]),g("div",iDe,[g("div",oDe,[g("div",rDe,[y(d,{show_badge:!0,xprofile:i.xprofile},null,8,["xprofile"]),g("div",aDe,$(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",lDe,[y(h,{xprofile:i.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",cDe,[g("div",uDe,[g("div",dDe,$(n.result.lesson.title),1),g("div",hDe,$((_=n.course)==null?void 0:_.title),1)])]),g("div",fDe,[g("div",pDe,[g("div",mDe,$(t.$t("Submitted")),1),g("div",gDe,$(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",vDe,[g("div",yDe,[g("div",bDe,$(t.$t("Score")),1),g("div",_De,$(n.result.score+"%"),1)]),g("div",wDe,[g("div",xDe,$(t.$t("Correct")),1),g("div",kDe,$(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",CDe,[g("div",SDe,[g("div",$De,$(t.$t("Did the student pass or fail?")),1),y(p,{modelValue:i.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=x=>i.currentStatus=x),placeholder:t.$t("-- Select --")},{default:w(()=>[(v(!0),A(te,null,we(Object.keys(i.statuses),x=>(v(),D(f,{key:x,label:i.statuses[x],value:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const MDe=ge(UOe,[["render",EDe]]),TDe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:ta,Pagination:qd,ViewQuizResult:MDe,Search:G_,ExportIcon:YH},data(){return{results:[],search:"",loading:!1,working:!1,exporting:!1,openResult:!1,result:null,pagination:{page:1,per_page:20,total:0},filter_by:"all"}},methods:{isOpenResult(t){this.result=t,this.openResult=!0},closeResult(){this.openResult=!1,this.result=null},getTagType(t){return["passed","failed"].includes(t)?t==="passed"?"success":"danger":"info"},getResultText(t){return["passed","failed"].includes(t)?this.$t(t):this.$t("n/a")},toSearch(){this.pagination.page=1,this.fetchResults()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},fetchResults(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/quiz-results",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,filter_by:this.filter_by}).then(t=>{this.results=t.results.data,this.pagination.total=t.results.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},exportResults(){this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/quiz-results",{search:this.search,filter_by:this.filter_by}).then(t=>{this.$exportToCsv(t.results,"quiz-results-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})}},mounted(){this.has_pro&&this.fetchResults()}},PDe={class:"fcom_course_members"},IDe={class:"fcom_course_member_header"},LDe={key:0,class:"fcom_course_member_actions"},ODe={class:"search_member"},DDe={class:"feed_filters"},RDe={id:"feed_short_by",class:"fcom_feed_filter_label"},VDe={class:"table_user_card"},FDe={class:"card_avatar"},NDe={class:"card_info"},BDe={class:"card_name"},zDe={class:"meta_line"};function HDe(t,e,n,s,i,o){const r=W("ExportIcon"),a=_e,l=Ge,c=W("Search"),u=_t,d=ln,h=Qt,f=W("UserAvatar"),p=W("UserRouteLink"),m=Jr,b=Bo,_=Zr,x=W("pagination"),k=W("ViewQuizResult"),C=xt("loading");return v(),A("div",PDe,[g("div",IDe,[g("h3",null,$(t.$t("Quiz Results")),1),t.has_pro?(v(),A("div",LDe,[y(l,{class:"fcom_secondary_button",loading:i.exporting,onClick:e[0]||(e[0]=S=>o.exportResults())},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",ODe,[y(u,{clearable:"",onClear:o.toSearch,onKeydown:Nt(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=S=>i.search=S),placeholder:t.$t("Search by Name or Quiz")},{prefix:w(()=>[y(a,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",DDe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",RDe,$(t.$t("Filter by:")),1),y(h,{"aria-label":t.$t("Sort members by"),modelValue:i.filter_by,"onUpdate:modelValue":e[2]||(e[2]=S=>i.filter_by=S),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("All"),onChange:e[3]||(e[3]=S=>o.fetchResults())},{default:w(()=>[y(d,{value:"all",label:t.$t("All")},null,8,["label"]),y(d,{value:"passed",label:t.$t("Passed")},null,8,["label"]),y(d,{value:"failed",label:t.$t("Failed")},null,8,["label"]),y(d,{value:"n/a",label:t.$t("Not Set")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])]),Oe((v(),D(_,{data:i.results,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Results Found")},{default:w(()=>[y(m,{prop:"ID",label:t.$t("Name & Quiz"),"min-width":"260"},{default:w(S=>{var E;return[g("div",VDe,[g("div",FDe,[y(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",NDe,[g("div",BDe,[y(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",zDe,$(t.getExcerpt((E=S.row.lesson)==null?void 0:E.title,160)),1)])])]}),_:1},8,["label"]),y(m,{width:"260",label:t.$t("Submitted Date")},{default:w(S=>[Y($(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),y(m,{width:"120",label:t.$t("Score")},{default:w(S=>[Y($(S.row.score)+"% ",1)]),_:1},8,["label"]),y(m,{width:"120",label:t.$t("Result")},{default:w(S=>[y(b,{type:o.getTagType(S.row.status),size:"small"},{default:w(()=>[Y($(o.getResultText(S.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),y(m,{width:"160",label:t.$t("Actions")},{default:w(S=>[y(l,{class:"fcom_secondary_button",onClick:E=>o.isOpenResult(S.row)},{default:w(()=>[Y($(t.$t("View")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,i.loading]]),y(x,{hide_on_single:!0,onFetch:o.fetchResults,pagination:i.pagination},null,8,["onFetch","pagination"]),i.openResult?(v(),D(k,{key:0,open:i.openResult,result:i.result,course:n.course,onClose:o.closeResult,onUpdateResult:o.fetchResults},null,8,["open","result","course","onClose","onUpdateResult"])):O("",!0)])}const UDe=ge(TDe,[["render",HDe]]),jDe={name:"ChatIcon"},WDe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function YDe(t,e,n,s,i,o){return v(),A("svg",WDe,[...e[0]||(e[0]=[g("path",{d:"M6.66732 11.25H13.334M6.66732 7.08333H10.0007",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M5.08267 15.833C3.99924 15.7264 3.18762 15.401 2.6433 14.8567C1.66699 13.8804 1.66699 12.309 1.66699 9.16634V8.74967C1.66699 5.60698 1.66699 4.03563 2.6433 3.05932C3.61961 2.08301 5.19096 2.08301 8.33366 2.08301H11.667C14.8097 2.08301 16.381 2.08301 17.3573 3.05932C18.3337 4.03563 18.3337 5.60698 18.3337 8.74967V9.16634C18.3337 12.309 18.3337 13.8804 17.3573 14.8567C16.381 15.833 14.8097 15.833 11.667 15.833C11.1999 15.8434 10.8279 15.879 10.4625 15.9622C9.46385 16.1921 8.5391 16.7031 7.62522 17.1487C6.32307 17.7837 5.67199 18.1012 5.2634 17.8039C4.48174 17.2218 5.24577 15.4179 5.41699 14.583",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const qH=ge(jDe,[["render",YDe]]),qDe={name:"HeartIcon",props:{filled:{default:!1}}},GDe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},XDe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function KDe(t,e,n,s,i,o){return n.filled?(v(),A("svg",GDe,[...e[0]||(e[0]=[g("g",null,[g("path",{d:"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1)])])):(v(),A("svg",XDe,[...e[1]||(e[1]=[g("g",null,[g("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1)])]))}const D2=ge(qDe,[["render",KDe]]),ZDe={name:"ImageIcon"},JDe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function QDe(t,e,n,s,i,o){return v(),A("svg",JDe,[...e[0]||(e[0]=[g("path",{d:"M7.49996 18.3327H12.5C16.6666 18.3327 18.3333 16.666 18.3333 12.4993V7.49935C18.3333 3.33268 16.6666 1.66602 12.5 1.66602H7.49996C3.33329 1.66602 1.66663 3.33268 1.66663 7.49935V12.4993C1.66663 16.666 3.33329 18.3327 7.49996 18.3327Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M7.50004 8.33333C8.42052 8.33333 9.16671 7.58714 9.16671 6.66667C9.16671 5.74619 8.42052 5 7.50004 5C6.57957 5 5.83337 5.74619 5.83337 6.66667C5.83337 7.58714 6.57957 8.33333 7.50004 8.33333Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M2.22498 15.7918L6.33331 13.0335C6.99164 12.5918 7.94164 12.6418 8.53331 13.1501L8.80831 13.3918C9.45831 13.9501 10.5083 13.9501 11.1583 13.3918L14.625 10.4168C15.275 9.85846 16.325 9.85846 16.975 10.4168L18.3333 11.5835",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const GH=ge(ZDe,[["render",QDe]]),eRe={name:"PollIcon"},tRe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function nRe(t,e,n,s,i,o){return v(),A("svg",tRe,[...e[0]||(e[0]=[g("path",{d:"M1.66663 18.334H18.3333",stroke:"currentColor","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M8.125 3.33268V18.3327H11.875V3.33268C11.875 2.41602 11.5 1.66602 10.375 1.66602H9.625C8.5 1.66602 8.125 2.41602 8.125 3.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M2.5 8.33268V18.3327H5.83333V8.33268C5.83333 7.41602 5.5 6.66602 4.5 6.66602H3.83333C2.83333 6.66602 2.5 7.41602 2.5 8.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M14.1666 12.5007V18.334H17.5V12.5007C17.5 11.584 17.1666 10.834 16.1666 10.834H15.5C14.5 10.834 14.1666 11.584 14.1666 12.5007Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const sRe=ge(eRe,[["render",nRe]]),iRe={name:"SurveyEditForm",props:{form:{type:Object,required:!0},is_editing:{type:Boolean,default:!1}},emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(t){this.form.options.splice(t,1)}}},oRe={class:"fcom_compose_app_form"},rRe={class:"fcom_app_header"},aRe={class:"fcom_app_options"},lRe={class:"fcom_app_pref"},cRe={class:"fcom_app_footer"},uRe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function dRe(t,e,n,s,i,o){const r=Ge,a=_t,l=W("Plus"),c=_e,u=Zt,d=Rd;return v(),A("div",oRe,[g("div",rRe,[g("h5",null,$(t.$t("Poll Options")),1),g("div",null,[y(r,{onClick:e[0]||(e[0]=h=>t.$emit("cancel")),size:"small",text:""},{default:w(()=>[Y($(t.$t("cancel")),1)]),_:1})])]),g("div",aRe,[(v(!0),A(te,null,we(n.form.options,(h,f)=>(v(),A("div",{class:"fcom_app_option",key:"option_"+f},[y(a,{modelValue:h.label,"onUpdate:modelValue":p=>h.label=p,type:"text",placeholder:t.$t("Your option text")},ks({_:2},[!h.slug&&f!==0?{name:"suffix",fn:w(()=>[y(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:w(()=>[...e[3]||(e[3]=[Y("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",lRe,[y(r,{onClick:o.addOption,text:"",size:"small"},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1}),g("span",null,$(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",cRe,[g("h5",null,$(t.$t("Poll Settings")),1),n.is_editing?O("",!0):(v(),D(u,{key:0,modelValue:n.form.type,"onUpdate:modelValue":e[1]||(e[1]=h=>n.form.type=h),"true-value":"multi_choice","false-value":"single_choice",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",uRe,$(t.$t("End Date:")),1),g("div",null,[y(d,{style:{"min-width":"50%"},placeholder:t.$t("Leave blank for not end"),clearable:!0,type:"datetime",modelValue:n.form.end_date,"onUpdate:modelValue":e[2]||(e[2]=h=>n.form.end_date=h),"value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["placeholder","modelValue"])])])])}const hRe=ge(iRe,[["render",dRe]]),fRe={name:"GiphyIcon"},pRe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function mRe(t,e,n,s,i,o){return v(),A("svg",pRe,[...e[0]||(e[0]=[Pa('<path d="M12.9287 10.09H14.7095" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.0781 8.20333H12.9277V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.3458 8.19998V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.74961 8.2H6.48961C5.44549 8.2 4.59961 9.04588 4.59961 10.09V10.09C4.59961 11.1341 5.44549 11.98 6.48961 11.98H7.74961V10.09H6.69961" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.5 19C2.567 19 1 17.433 1 15.5L1 4.49999C1 2.567 2.567 0.999992 4.5 0.999992H15.5C17.433 0.999992 19 2.567 19 4.49999V15.5C19 17.433 17.433 19 15.5 19H4.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>',5)])])}const gRe=ge(fRe,[["render",mRe]]);var vRe=Va,yRe=function(){return vRe.Date.now()},bRe=yRe,_Re=/\s/;function wRe(t){for(var e=t.length;e--&&_Re.test(t.charAt(e)););return e}var xRe=wRe,kRe=xRe,CRe=/^\s+/;function SRe(t){return t&&t.slice(0,kRe(t)+1).replace(CRe,"")}var $Re=SRe,ARe=W1,ERe=Y1,MRe="[object Symbol]";function TRe(t){return typeof t=="symbol"||ERe(t)&&ARe(t)==MRe}var R2=TRe,PRe=$Re,nT=q1,IRe=R2,sT=0/0,LRe=/^[-+]0x[0-9a-f]+$/i,ORe=/^0b[01]+$/i,DRe=/^0o[0-7]+$/i,RRe=parseInt;function VRe(t){if(typeof t=="number")return t;if(IRe(t))return sT;if(nT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=nT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=PRe(t);var n=ORe.test(t);return n||DRe.test(t)?RRe(t.slice(2),n?2:8):LRe.test(t)?sT:+t}var FRe=VRe,NRe=q1,O3=bRe,iT=FRe,BRe="Expected a function",zRe=Math.max,HRe=Math.min;function URe(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(BRe);e=iT(e)||0,NRe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?zRe(iT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var P=s,T=i;return s=i=void 0,c=E,r=t.apply(T,P),r}function p(E){return c=E,a=setTimeout(_,e),u?f(E):r}function m(E){var P=E-l,T=E-c,L=e-P;return d?HRe(L,o-T):L}function b(E){var P=E-l,T=E-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var E=O3();if(b(E))return x(E);a=setTimeout(_,m(E))}function x(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function C(){return a===void 0?r:x(O3())}function S(){var E=O3(),P=b(E);if(s=arguments,i=this,l=E,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),r}return S.cancel=k,S.flush=C,S}var jRe=URe;const WRe=fi(jRe),YRe={name:"Giphy",components:{GiphyIcon:gRe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var e,n;if(((n=(e=this.$gloablStorage)==null?void 0:e.gifs)==null?void 0:n.length)>0&&!this.searchQuery){this.gifs=this.$gloablStorage.gifs;return}this.loading=!0;const t={limit:this.limit,offset:this.offset,q:this.searchQuery.trim()};this.$get("giphy",t).then(s=>{this.gifs=this.offset===0?s.gifs:this.gifs.concat(s.gifs),!this.searchQuery&&this.offset===0&&(this.$gloablStorage.gifs=this.gifs),this.offset+=this.limit}).catch(s=>{this.$handleError(s)}).finally(()=>{this.loading=!1})},handleGiphyClick(){this.offset=0,this.searchQuery="",this.loadGifs()},handleSearch:WRe(function(){this.offset=0,this.loadGifs()},300),handleScroll(t){t.target.scrollHeight-t.target.scrollTop===t.target.clientHeight&&!this.loading&&this.loadGifs()},selectGiphy(t){this.$emit("selected-giphy",t),this.$refs.popover.hide()}}},qRe={class:"fcom_giphy_composer"},GRe={class:"search-container"},XRe=["onLoad","src","alt","onClick"],KRe={key:0,class:"img_loading"},ZRe={key:1,class:"no_result"};function JRe(t,e,n,s,i,o){const r=_t,a=Od,l=Ld,c=W("GiphyIcon"),u=_e,d=Ge,h=Xi,f=xt("loading");return v(),A("div",qRe,[y(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click","popper-class":"fcom_giphy_popover",ref:"popover"},{reference:w(()=>[y(d,{"aria-label":"Pick GIF",text:"",onClick:o.handleGiphyClick},{default:w(()=>[y(u,{class:U(["fcom_apps_icon"])},{default:w(()=>[y(c)]),_:1})]),_:1},8,["onClick"])]),default:w(()=>[Oe((v(),A("div",GRe,[y(r,{modelValue:i.searchQuery,"onUpdate:modelValue":e[0]||(e[0]=p=>i.searchQuery=p),placeholder:t.$t("Search Gifs"),onInput:o.handleSearch},null,8,["modelValue","placeholder","onInput"]),g("div",{class:"gif_container",onScroll:e[1]||(e[1]=(...p)=>o.handleScroll&&o.handleScroll(...p))},[i.gifs.length>0?(v(),D(l,{key:0,gutter:5},{default:w(()=>[(v(!0),A(te,null,we(i.gifs,p=>(v(),D(a,{span:12,key:p.id,class:"gif_item"},{default:w(()=>[g("img",{alt:"",onLoad:m=>p.loaded=!0,src:p.images.preview_gif.url,onClick:m=>o.selectGiphy(p)},null,40,XRe),p.loaded?O("",!0):(v(),A("p",KRe))]),_:2},1024))),128))]),_:1})):(v(),A("p",ZRe,$(t.$t("No results")),1))],32),e[2]||(e[2]=g("div",{class:"fcom_giphy_powered_by"},[g("span",{class:"powered_by"},"POWERED BY "),g("span",null,"GIPHY")],-1))])),[[f,i.loading]])]),_:1},512)])}const QRe=ge(YRe,[["render",JRe]]),eVe={name:"VideoIcon"},tVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function nVe(t,e,n,s,i,o){return v(),A("svg",tVe,[...e[0]||(e[0]=[g("rect",{x:"1",y:"1",width:"18",height:"18",rx:"3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M8.90484 7.14604L12.663 9.3589C13.1383 9.6384 13.1383 10.3237 12.663 10.6032L8.90484 12.816C8.4208 13.1013 7.80896 12.7534 7.80896 12.1934V7.76865C7.80896 7.20869 8.4208 6.86076 8.90484 7.14604Z",fill:"currentColor"},null,-1)])])}const sVe=ge(eVe,[["render",nVe]]),iVe={name:"FluentPlayerPreview",emits:["load-failed"],props:{media:{type:Object,required:!0}},data(){return{html:"",loading:!1,playerInstanceKey:""}},watch:{"media.url"(){this.loadFluentPlayerContent()}},async mounted(){await this.loadFluentPlayerContent()},methods:{getPlayerInstanceKey(){if(!this.playerInstanceKey){const t=Number.parseInt(this._uid,10);this.playerInstanceKey=Number.isSafeInteger(t)&&t>0?`i${t}`:`i${Math.random().toString(36).slice(2,8)}`}return this.playerInstanceKey},getStableMediaId(){var s,i,o,r,a,l,c,u,d,h,f,p;const t=Number.parseInt((s=this.media)==null?void 0:s.media_id,10);if(Number.isSafeInteger(t)&&t>0)return t;const e=[(i=this.media)==null?void 0:i.media_key,(o=this.media)==null?void 0:o.feed_id,(r=this.media)==null?void 0:r.share_url,(l=(a=this.media)==null?void 0:a.settings)==null?void 0:l.src,(c=this.media)==null?void 0:c.url,(u=this.media)==null?void 0:u.html,(d=this.media)==null?void 0:d.title,(h=this.media)==null?void 0:h.player,(f=this.media)==null?void 0:f.type,(p=this.media)==null?void 0:p.provider].filter(Boolean).join("|");if(!e)return 1;let n=5381;for(let m=0;m<e.length;m++)n=(n<<5)+n+e.charCodeAt(m)>>>0;return n||1},async loadFluentPlayerContent(){this.loading=!0;try{if(!this.appVars.features.has_fluent_player||this.appVars.features.enable_fluent_player!=="yes"){this.$emit("load-failed");return}const t=this.getStableMediaId(),e=await this.$get("fluent-player/video-content/"+t,{...this.media,media_id:t,player_instance_key:this.getPlayerInstanceKey()});e.html?(this.html=e.html,this.$nextTick(()=>{const n=this.$el.querySelector(".fluent-player");document.dispatchEvent(new CustomEvent("InitSingleFluentPlayer",{detail:{container:n,playerData:{media:e.media}}}))})):this.$emit("load-failed")}catch(t){console.warn("Failed to load fluent-player assets:",t),this.$emit("load-failed")}finally{this.loading=!1}}}},oVe={class:"fluent-player-preview"},rVe={key:0,class:"player-container"},aVe=["innerHTML"];function lVe(t,e,n,s,i,o){const r=Jt;return v(),A("div",oVe,[i.html?(v(),A("div",rVe,[g("div",{innerHTML:i.html},null,8,aVe)])):O("",!0),i.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const cVe=ge(iVe,[["render",lVe],["__scopeId","data-v-53b0e6e6"]]),uVe={name:"MediaPreview",components:{Postcard:yle,FluentPlayerPreview:cVe},props:["feed","media_item","is_single"],data(){return{is_error:!1,isPlaying:!1,fluentPlayerFailed:!1}},watch:{"media.url"(){this.fluentPlayerFailed=!1}},computed:{media(){var t;return this.feed?(t=this.feed.meta)==null?void 0:t.media_preview:this.media_item},playerMedia(){var t,e,n,s;return{...this.media,feed_id:((t=this.feed)==null?void 0:t.id)||((e=this.media)==null?void 0:e.feed_id)||"",share_url:((n=this.feed)==null?void 0:n.permalink)||((s=this.media)==null?void 0:s.share_url)||""}},isVideoMedia(){return["oembed","iframe_html","video","fluent_player"].includes(this.media.type)},hasFluentPlayer(){var t;return this.appVars.features.has_fluent_player&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos}},methods:{getDomainName(t){return t?t.split("/")[2].replace("www.",""):""},isSupportedByFluentPlayer(){var n,s;const t=((s=(n=this.media)==null?void 0:n.settings)==null?void 0:s.src)||this.media.url;return!t||!this.playEmbeddedVideos&&this.media.provider!=="upload"?!1:[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov)(\?.*)?$/i}].some(i=>i.regex.test(t))},getAspectRatio(t,e){if(t&&e){let n=t/e;return n<1?16/9:n}return 16/9},handleImageError(){this.is_error=!0},getVideoType(t){const e={mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg"},n=t.split(".").pop().toLowerCase();return e[n]||"video/mp4"},playVideo(){this.$refs.nativeVideo&&this.$refs.nativeVideo.play()},onVideoPause(){this.$refs.nativeVideo&&this.$refs.nativeVideo.currentTime>0&&(this.isPlaying=!0)}}},dVe={key:0},hVe={key:1},fVe=["innerHTML"],pVe=["controls","preload","poster"],mVe=["src","type"],gVe=["href"],vVe={key:0,class:"feed_media_image"},yVe={key:1,class:"feed_media_content"},bVe={class:"media_domain"},_Ve={class:"feed_media_title"},wVe={key:0,class:"feed_media_description"},xVe={class:"feed_meta_desc"};function kVe(t,e,n,s,i,o){const r=W("fluent-player-preview"),a=Jt,l=Ra;return v(),A("div",{class:U(["feed_media","feed_media_"+o.media.type])},[o.isVideoMedia?(v(),A(te,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!i.fluentPlayerFailed?(v(),A("div",dVe,[y(r,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=c=>i.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),A("div",hVe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,fVe)])):o.media.url?(v(),A("div",{key:2,class:U(["native_video_wrapper",{video_playing:i.isPlaying}])},[g("video",{ref:"nativeVideo",class:"native_video_player",controls:i.isPlaying,preload:n.is_single?"metadata":"none",poster:o.media.thumbnail,onPlay:e[1]||(e[1]=c=>i.isPlaying=!0),onPause:e[2]||(e[2]=(...c)=>o.onVideoPause&&o.onVideoPause(...c)),onEnded:e[3]||(e[3]=c=>i.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url)},null,8,mVe)],40,pVe),i.isPlaying?O("",!0):(v(),A("div",{key:0,class:"native_video_overlay",onClick:e[4]||(e[4]=(...c)=>o.playVideo&&o.playVideo(...c))},[...e[6]||(e[6]=[g("div",{class:"native_play_button"},[g("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[g("path",{d:"M8 5v14l11-7z"})])],-1)])]))],2)):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),A("div",{key:1,class:U(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!i.is_error?(v(),D(l,{key:0,alt:"",style:qe({width:"100%",aspectRatio:o.getAspectRatio(o.media.width,o.media.height)}),src:o.media.image,lazy:!0,previewSrcList:[o.media.image],loading:"lazy",onError:o.handleImageError,"zoom-rate":1.2,"max-scale":7,"hide-on-click-modal":!0,"preview-teleported":!0,"min-scale":.2,"initial-index":1,class:U("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:w(()=>[y(a,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),A("a",{key:2,href:o.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!i.is_error?(v(),A("div",vVe,[y(l,{onError:e[5]||(e[5]=c=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:w(()=>[...e[7]||(e[7]=[g("span",null,null,-1)])]),_:1},8,["src"])])):O("",!0),o.media.title?(v(),A("div",yVe,[g("div",bVe,$(o.getDomainName(o.media.url)),1),g("div",_Ve,$(t.getExcerpt(o.media.title,88)),1),o.media.description?(v(),A("div",wVe,[g("div",xVe,$(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,gVe))],2)}const Cp=ge(uVe,[["render",kVe],["__scopeId","data-v-c28b0c69"]]),CVe=[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov)(\?.*)?$/i}],SVe={name:"FluentPlayerUploader",components:{UploadFilled:q4},emits:["video-added","completed","uploading"],props:{className:{type:String,default:"video-uploader"},type:{type:String,default:"url"}},data(){return{videoUrl:"",processing:!1}},computed:{uploadData(){return{context:"fluent_player"}},action_url(){return this.appVars.rest.url+"/fluent-player/video-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{async handleUrlSubmit(){if(!this.videoUrl)return;const t=CVe.some(n=>n.regex.test(this.videoUrl));let e={};t?e={type:"oembed",url:this.videoUrl,html:"",content_type:"video",player:"fluent_player",media_id:new Date().getTime()}:e={type:"oembed",url:this.videoUrl,html:"",content_type:"video"},this.$emit("video-added",e)},handleVideoUploadSuccess(t){var e;try{if(!t||!t.media||!t.media.url)throw new Error("Invalid response: missing media.url");const{media:n}=t,s={type:"upload",url:n.url,player:"fluent_player",provider:"upload",content_type:"video",html:"",title:((e=n.settings)==null?void 0:e.title)||"",media_id:n.media_id};this.$emit("video-added",s)}catch(n){console.error("[FluentPlayerUploader] handleVideoUploadSuccess error:",n,t)}finally{this.$emit("completed",t),this.processing=!1}},handleError(t){try{const e=(t==null?void 0:t.message)||t;this.$handleError(e)}catch(e){console.error("[FluentPlayerUploader] handleError failed:",e,t)}finally{this.$emit("completed",t),this.processing=!1}},inProgress(t){this.$emit("uploading"),this.processing=!0}}},$Ve=["element-loading-text"],AVe={key:0,class:"upload-options"},EVe={class:"uploader-content"},MVe={key:1,class:"url-input-section"};function TVe(t,e,n,s,i,o){const r=W("upload-filled"),a=_e,l=Ge,c=j1,u=_t,d=xt("loading");return Oe((v(),A("div",{class:"fluent-player-uploader","element-loading-text":t.$t("Uploading video..."),"element-loading-background":"rgba(255, 255, 255, 0.85)"},[n.type==="upload"?(v(),A("div",AVe,[y(c,{drag:"",class:U([n.className,"video-drag-uploader"]),multiple:!1,action:o.action_url,headers:o.headers,accept:"video/*",data:o.uploadData,"on-success":o.handleVideoUploadSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1,disabled:i.processing},{default:w(()=>[g("div",EVe,[y(a,{class:"el-icon--upload"},{default:w(()=>[y(r)]),_:1}),e[1]||(e[1]=g("div",{class:"el-upload__text"},[Y(" Drop file here or "),g("em",null,"upload by clicking")],-1)),y(l,{type:"primary",class:"upload-button",loading:i.processing,disabled:i.processing},{default:w(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[Y($(i.processing?t.$t("Uploading..."):t.$t("Upload Video")),1)])])]),_:3},8,["loading","disabled"])])]),_:3},8,["class","action","headers","data","on-success","on-progress","on-error","disabled"])])):(v(),A("div",MVe,[y(u,{modelValue:i.videoUrl,"onUpdate:modelValue":e[0]||(e[0]=h=>i.videoUrl=h),type:"url",placeholder:t.$t("Enter video URL"),size:"large"},{append:w(()=>[y(l,{onClick:o.handleUrlSubmit,loading:i.processing},{default:w(()=>[Y($(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,$Ve)),[[d,i.processing]])}const PVe=ge(SVe,[["render",TVe]]),IVe={name:"MediaEmbeder",emits:["embeded"],props:{media:{type:Object,default:()=>({type:"oembed",url:"",inner_html:"",content_type:"video",html:"",provider:"",title:"",author_name:"",image:""})},box_title:{type:String,default:""},box_description:{type:String,default:""},has_iframe:{type:Boolean,default:!0},space:{type:String,default:""},is_feed:{type:Boolean,default:!1}},components:{MediaPreview:Cp,FluentPlayerUploader:PVe},computed:{showPreview(){return this.media.html&&!this.showInput},hasFluentPlayer(){var t;return this.hasFluentPlayerInstalled&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},hasFluentPlayerInstalled(){return this.appVars.features.has_fluent_player},hasUploadEnabled(){var t;return this.is_feed&&this.hasFluentPlayer&&((t=this.appVars.features.fluent_player)==null?void 0:t.has_video_upload)},uploadRole(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.video_upload_role)||"admin"},getSpace(){return this.space||""},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos},hasUpload(){return this.hasUploadEnabled&&(this.uploadRole==="everyone"||this.uploadRole==="admin_moderator"&&(this.isModerator(this.getSpace)||this.isAdmin())||this.uploadRole==="admin"&&this.isAdmin())}},data(){return{appReady:!1,showInput:!1,fetching:!1}},methods:{fetchData(){this.media.url&&(this.fetching=!0,this.$get("feeds/oembed",{url:this.media.url}).then(t=>{this.media.html=t.oembed.html,this.media.provider=t.oembed.provider,this.media.title=t.oembed.title,this.media.author_name=t.oembed.author_name,this.media.type=t.oembed.type,this.media.image=t.oembed.image,this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1}))},handleAddCustomHtml(){this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1},handleFluentPlayerVideo(t){if(Object.assign(this.media,t),this.media.player==="fluent_player"&&this.media.type==="upload"){this.media.type="oembed",this.$emit("embeded",this.media);return}this.fetchData()}},mounted(){typeof this.media!="object"&&(this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}),this.appReady=!0,this.media.html||this.fetchData()}},LVe={key:0},OVe={key:0,class:"fcom_media_editor_actions"},DVe={key:1,class:"fcom_media_editor fcom_media_embeder"},RVe={key:0},VVe={key:1},FVe={key:2,class:"fcom_course_media"};function NVe(t,e,n,s,i,o){var f;const r=Ge,a=dp,l=Ws,c=_t,u=W("fluent-player-uploader"),d=W("media-preview"),h=xt("loading");return i.appReady?Oe((v(),A("div",LVe,[n.has_iframe||o.hasUpload?(v(),A("div",OVe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>i.showInput=!0),type:"danger",size:"small",text:""},{default:w(()=>[Y($(t.$t("Edit media")),1)]),_:1})):(v(),D(l,{key:1,onChange:e[1]||(e[1]=p=>{n.media.html="",n.media.url="",i.showInput=!0}),size:"small",modelValue:n.media.type,"onUpdate:modelValue":e[2]||(e[2]=p=>n.media.type=p)},{default:w(()=>[y(a,{label:t.$t("Oembed"),value:"oembed"},null,8,["label"]),n.has_iframe?(v(),D(a,{key:0,label:t.$t("HTML Code"),value:"iframe_html"},null,8,["label"])):O("",!0),o.hasUpload?(v(),D(a,{key:1,label:t.$t("Upload Video"),value:"upload"},null,8,["label"])):O("",!0)]),_:1},8,["modelValue"]))])):O("",!0),o.showPreview?(v(),A("div",FVe,[y(d,{media_item:n.media},null,8,["media_item"])])):(v(),A("div",DVe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),A(te,{key:0},[g("h3",null,$(t.$t("Add Video from custom HTML Code")),1),y(c,{rows:5,modelValue:n.media.html,"onUpdate:modelValue":e[3]||(e[3]=p=>n.media.html=p),type:"textarea",placeholder:t.$t("Paste an iframe code")},null,8,["modelValue","placeholder"]),y(r,{class:"fcom_secondary_button fcom_mt_20",onClick:e[4]||(e[4]=p=>o.handleAddCustomHtml())},{default:w(()=>[Y($(t.$t("Embed")),1)]),_:1})],64)):(v(),A(te,{key:1},[g("h3",null,$(n.box_title||t.$t("Featured media")),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),A("p",RVe,$(t.$t("The file must be a valid video type (MP4, M3U8, MPD, WebM, MOV)")),1)):(v(),A("p",VVe,$(n.box_description||t.$t("Embed from Vimeo, YouTube, Wistia and more")),1)),o.hasFluentPlayer&&(n.media.type==="upload"||o.playEmbeddedVideos)?(v(),D(u,{key:2,type:((f=n.media)==null?void 0:f.type)==="upload"?"upload":"url",onVideoAdded:o.handleFluentPlayerVideo},null,8,["type","onVideoAdded"])):(v(),D(c,{key:3,onKeydown:Nt(o.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":e[5]||(e[5]=p=>n.media.url=p),type:"url",placeholder:t.$t("Paste a URL to embed")},{append:w(()=>[y(r,{onClick:o.fetchData,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,i.fetching]]):O("",!0)}const V2=ge(IVe,[["render",NVe]]),BVe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:V2,VideoIcon:sVe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},methods:{show(){this.showVideoPop=!0},embeded(t){this.$emit("embeded",t),this.showVideoPop=!1,this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}}}},zVe={class:"fcom_video_embeder"};function HVe(t,e,n,s,i,o){const r=W("VideoIcon"),a=_e,l=Ge,c=W("media-embeder"),u=Fs;return v(),A("div",zVe,[y(l,{"aria-label":"Add Video",text:"",onClick:o.show},{default:w(()=>[y(a,{class:U(["fcom_apps_icon"])},{default:w(()=>[y(r)]),_:1})]),_:1},8,["onClick"]),i.showVideoPop?(v(),D(u,{key:0,title:t.$t("Attach Video"),modelValue:i.showVideoPop,"onUpdate:modelValue":e[0]||(e[0]=d=>i.showVideoPop=d),width:t.dialogWidth,style:{"max-width":"600px"},"append-to-body":!0},{default:w(()=>[y(c,{box_title:t.$t("Add Featured Video for this post"),has_iframe:n.is_admin,is_feed:!0,onEmbeded:o.embeded,space:n.space,media:i.media},null,8,["box_title","has_iframe","onEmbeded","space","media"])]),_:1},8,["title","modelValue","width"])):O("",!0)])}const UVe=ge(BVe,[["render",HVe]]),jVe={name:"DocumentsUploader",components:{UploadFilled:q4,Document:V1},emits:["filesChanged","fileAdded"],props:{is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})},showLists:{type:Boolean,default:!0},prevFiles:{type:Array,default:()=>[]}},computed:{action_url(){return this.appVars.rest.url+"/documents/upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}},uploadingFiles(){return this.fileList.filter(t=>t.status==="uploading")}},data(){return{fileList:[]}},methods:{handleSuccess(t){var e;console.log(t),(e=t==null?void 0:t.file)!=null&&e.media_key&&this.$emit("fileAdded",t==null?void 0:t.file)},handleChange(){let t=[];this.fileList.forEach(e=>{var n,s;(s=(n=e==null?void 0:e.response)==null?void 0:n.file)!=null&&s.media_key&&t.push({id:e.response.file.id,media_key:e.response.file.media_key,title:e.response.file.title,type:e.response.file.type})}),this.$emit("filesChanged",t)},handleError(t){this.$handleError(JSON.parse(t.message))}}},WVe={class:"fcom_documents_uploader"},YVe={class:"el-upload__text"},qVe={key:0},GVe={class:"fcom_document_lists"},XVe={class:"fcom_each_document"},KVe={class:"fcom_document_info"},ZVe={class:"fcom_document_icon"},JVe={class:"fcom_document_title"},QVe={class:"fcom_document_actions"};function eFe(t,e,n,s,i,o){const r=W("UploadFilled"),a=_e,l=j1,c=W("Document"),u=Ge;return v(),A("div",WVe,[y(l,{action:o.action_url,headers:o.headers,"file-list":i.fileList,"onUpdate:fileList":e[0]||(e[0]=d=>i.fileList=d),accept:"*/*",drag:"",class:"fcom_document_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":n.showLists,"on-change":o.handleChange,"on-success":o.handleSuccess,"on-error":o.handleError,"on-remove":o.handleChange},{default:w(()=>[y(a,{class:"el-icon--upload"},{default:w(()=>[y(r)]),_:1}),g("div",YVe,$(t.$t("Drop file here or click to upload")),1)]),_:1},8,["action","headers","file-list","multiple","data","show-file-list","on-change","on-success","on-error","on-remove"]),!n.showLists&&o.uploadingFiles.length?(v(),A("div",qVe,[g("div",GVe,[(v(!0),A(te,null,we(o.uploadingFiles,d=>(v(),A("div",XVe,[g("div",KVe,[g("div",ZVe,[y(a,null,{default:w(()=>[y(c)]),_:1})]),g("span",JVe,$(d.name),1)]),g("div",QVe,[y(u,{text:"",size:"small",loading:!0},{default:w(()=>[Y($(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const XH=ge(jVe,[["render",eFe]]),tFe={name:"PdfIcon"},nFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function sFe(t,e,n,s,i,o){return v(),A("svg",nFe,[...e[0]||(e[0]=[g("path",{opacity:"0.4",d:"M19 11C19 10.1825 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H19M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M21 14H19C18.4477 14 18 14.4477 18 15V16.5M18 16.5V19M18 16.5H20.5M7 19V17M7 17V14H8.5C9.32843 14 10 14.6716 10 15.5C10 16.3284 9.32843 17 8.5 17H7ZM12.5 14H13.7857C14.7325 14 15.5 14.7462 15.5 15.6667V17.3333C15.5 18.2538 14.7325 19 13.7857 19H12.5V14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const iFe=ge(tFe,[["render",sFe]]),oFe={name:"ZipIcon"},rFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function aFe(t,e,n,s,i,o){return v(),A("svg",rFe,[...e[0]||(e[0]=[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.24643 13.7697C8.9545 13.7507 8.55839 13.75 8.00407 13.75H7.00391C6.58969 13.75 6.25391 13.4142 6.25391 13C6.25391 12.5858 6.58969 12.25 7.00391 12.25H8.00407C8.01907 12.25 8.03402 12.25 8.04892 12.25C8.66199 12.25 9.18423 12.25 9.57881 12.2929C9.93962 12.3322 10.469 12.4271 10.7888 12.8672C10.9627 13.1066 11.0272 13.3876 10.9857 13.67C10.9495 13.9166 10.8383 14.1258 10.7382 14.2819C10.5513 14.5734 10.2447 14.912 9.91903 15.2718C9.90537 15.2868 9.89169 15.3019 9.87798 15.3171L8.63592 16.6895C8.43153 16.9153 8.27429 17.0901 8.15532 17.2303C8.44726 17.2493 8.84336 17.25 9.39768 17.25H10.3978C10.8121 17.25 11.1478 17.5858 11.1478 18C11.1478 18.4142 10.8121 18.75 10.3978 18.75L9.35284 18.75C8.73977 18.75 8.21752 18.7501 7.82294 18.7071C7.46213 18.6678 6.93277 18.5729 6.61299 18.1328C6.43908 17.8934 6.37458 17.6124 6.41604 17.33C6.45224 17.0835 6.5634 16.8742 6.66351 16.7181C6.85041 16.4266 7.15703 16.088 7.48273 15.7283C7.49638 15.7132 7.51006 15.6981 7.52377 15.6829L8.76583 14.3105C8.97022 14.0847 9.12746 13.9099 9.24643 13.7697Z",fill:"currentColor"},null,-1),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.1914 13C12.1914 12.5858 12.5272 12.25 12.9414 12.25H15.4869C15.9011 12.25 16.2369 12.5858 16.2369 13C16.2369 13.4142 15.9011 13.75 15.4869 13.75H14.9641V17.25H15.4869C15.9011 17.25 16.2369 17.5858 16.2369 18C16.2369 18.4142 15.9011 18.75 15.4869 18.75H12.9414C12.5272 18.75 12.1914 18.4142 12.1914 18C12.1914 17.5858 12.5272 17.25 12.9414 17.25H13.4641V13.75H12.9414C12.5272 13.75 12.1914 13.4142 12.1914 13Z",fill:"currentColor"},null,-1),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.0189 12.25C19.0305 12.25 19.0419 12.25 19.0534 12.25H19.7321C20.8365 12.25 21.7549 13.1328 21.7549 14.25C21.7549 15.3673 20.8365 16.25 19.7321 16.25H18.7852V18C18.7852 18.4142 18.4494 18.75 18.0352 18.75C17.621 18.75 17.2852 18.4142 17.2852 18V14C17.2852 13.9885 17.2852 13.9769 17.2852 13.9653C17.2851 13.7605 17.285 13.5378 17.3107 13.3497C17.3411 13.1278 17.4193 12.8466 17.6588 12.6114C17.8964 12.378 18.1772 12.3037 18.3966 12.2748C18.5853 12.2499 18.8094 12.2499 19.0189 12.25ZM18.7852 14.75H19.7321C20.0336 14.75 20.2549 14.5135 20.2549 14.25C20.2549 13.9866 20.0336 13.75 19.7321 13.75H19.0534C18.9463 13.75 18.8604 13.7501 18.7863 13.7514C18.7852 13.8207 18.7852 13.9009 18.7852 14V14.75Z",fill:"currentColor"},null,-1),g("path",{opacity:"0.4",d:"M7.13841 20.7033C8.00786 20.7942 9.13899 20.7955 10.7476 20.7955H14.9079C15.4456 20.7955 15.8816 21.233 15.8816 21.7727C15.8816 22.3125 15.4456 22.75 14.9079 22.75H10.6927C9.15159 22.75 7.91879 22.75 6.93654 22.6473C5.92712 22.5417 5.0659 22.3186 4.32113 21.7919C3.93077 21.5159 3.58222 21.1871 3.28704 20.8146C2.71721 20.0956 2.47396 19.2577 2.35985 18.2843C2.24996 17.3469 2.24998 16.1743 2.25 14.7262V12.1428V12.1427C2.25 10.7244 2.24999 9.61179 2.30919 8.71107C2.36944 7.79422 2.49398 7.02952 2.77509 6.31755C3.61848 4.1815 5.39221 2.51875 7.61221 1.73658C8.99465 1.2495 10.6813 1.24971 13.5209 1.25007L13.7572 1.25009L13.9605 1.25004L13.9606 1.25004C15.5156 1.2495 16.548 1.24914 17.4068 1.55172C18.7834 2.03673 19.8918 3.071 20.4206 4.41031C20.6039 4.87447 20.6795 5.36014 20.7153 5.90477C20.75 6.43335 20.75 7.08083 20.75 7.87999V7.88006V10.0455C20.75 10.5852 20.3141 11.0228 19.7763 11.0228C19.2386 11.0228 18.8026 10.5852 18.8026 10.0455V7.91329C18.8026 7.07303 18.8021 6.49008 18.7721 6.03341C18.7427 5.58546 18.6879 5.32704 18.6102 5.1304C18.3001 4.34503 17.6344 3.70339 16.7618 3.39593C16.2584 3.21858 15.5913 3.20463 13.7572 3.20463C13.4591 3.20463 13.1023 3.2058 12.7641 3.20732C12.426 3.20885 11.8726 3.21134 11.4104 3.48025C11.1057 3.65756 10.8849 3.85945 10.7582 4.08004C10.5409 4.45845 10.4166 4.89711 10.4166 5.3648C10.4166 5.51193 10.4262 5.70446 10.4344 5.88206L10.4344 5.88212C10.4417 6.03696 10.4496 6.20566 10.4531 6.3737C10.461 6.75379 10.449 7.19733 10.3343 7.62548C10.1108 8.45945 9.4594 9.11086 8.62543 9.33432C8.19728 9.44904 7.75374 9.46105 7.37365 9.45315C7.20551 9.44966 7.03693 9.44174 6.88201 9.43446C6.70441 9.42622 6.48041 9.41667 6.33328 9.41667C5.88661 9.41667 5.46642 9.53003 5.09991 9.72955C4.87246 9.85337 4.65104 10.0965 4.47811 10.3875C4.19749 10.8596 4.19732 11.4982 4.19734 11.7652L4.19737 14.6653C4.19737 16.1888 4.19894 17.2461 4.29387 18.0559C4.38611 18.8427 4.55555 19.2754 4.81111 19.5979C4.9889 19.8223 5.20128 20.0234 5.44274 20.1941C5.80057 20.4472 6.28449 20.6139 7.13841 20.7033Z",fill:"currentColor"},null,-1)])])}const lFe=ge(oFe,[["render",aFe]]),cFe={name:"AudioIcon"},uFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function dFe(t,e,n,s,i,o){return v(),A("svg",uFe,[...e[0]||(e[0]=[g("path",{d:"M5.5 21.5H18.5C20.1569 21.5 21.5 20.1569 21.5 18.5V5.5C21.5 3.84315 20.1569 2.5 18.5 2.5H5.5C3.84315 2.5 2.5 3.84315 2.5 5.5V18.5C2.5 20.1569 3.84315 21.5 5.5 21.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),g("path",{d:"M10 15.5C10 16.3284 9.32843 17 8.5 17C7.67157 17 7 16.3284 7 15.5C7 14.6716 7.67157 14 8.5 14C9.32843 14 10 14.6716 10 15.5ZM10 15.5V8.5L16 7V13.5M16 13.5C16 14.3284 15.3284 15 14.5 15C13.6716 15 13 14.3284 13 13.5C13 12.6716 13.6716 12 14.5 12C15.3284 12 16 12.6716 16 13.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const hFe=ge(cFe,[["render",dFe]]),fFe={name:"DocIcon"},pFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function mFe(t,e,n,s,i,o){return v(),A("svg",pFe,[...e[0]||(e[0]=[g("path",{d:"M21 15C21 14.4477 20.5523 14 20 14H19C18.4477 14 18 14.4477 18 15V18C18 18.5523 18.4477 19 19 19H20C20.5523 19 21 18.5523 21 18M7 14H8C9.10457 14 10 14.8954 10 16V17C10 18.1046 9.10457 19 8 19H7V14ZM13.5 14H14.5C15.0523 14 15.5 14.4477 15.5 15V18C15.5 18.5523 15.0523 19 14.5 19H13.5C12.9477 19 12.5 18.5523 12.5 18V15C12.5 14.4477 12.9477 14 13.5 14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M19 22H5C3.89543 22 3 21.1046 3 20L3 4C3 2.89543 3.89543 2 5 2H12L19 9V11M18.5 9H13.998C12.8935 9 11.998 8.10457 11.998 7V2.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const gFe=ge(fFe,[["render",mFe]]),vFe={name:"VideoFileIcon"},yFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function bFe(t,e,n,s,i,o){return v(),A("svg",yFe,[...e[0]||(e[0]=[g("path",{d:"M19 13V9L12 2H5C3.89543 2 3 2.89543 3 4V20C3 21.1046 3.89543 22 5 22H9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M12 2V7C12 8.10457 12.8954 9 14 9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),g("path",{d:"M18 19.5L21 21V17L18 18.5M18 19.5V18.5M18 19.5V21C18 21.5523 17.5523 22 17 22H13C12.4477 22 12 21.5523 12 21V17C12 16.4477 12.4477 16 13 16H17C17.5523 16 18 16.4477 18 17V18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1)])])}const _Fe=ge(vFe,[["render",bFe]]),wFe={name:"DocumentLists",components:{Document:V1,Download:Tae,PdfIcon:iFe,ImageIcon:GH,ZipIcon:lFe,AudioIcon:hFe,DocIcon:gFe,VideoFileIcon:_Fe},props:["document_lists","additional_data","is_editable"],emits:["fileRemoved","documentsUpdated"],data(){return{editingIndex:null,isSaving:!1}},methods:{removeDocument(t,e){if(!this.is_editable){this.$emit("fileRemoved",t);return}this.$confirm(this.$t("Are you sure you want to delete this document?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.deleteDocument(t,e)})},deleteDocument(t,e){this.isSaving=!0,this.$post("documents/delete",{id:e.id}).then(n=>{this.$notify.success(n.message),this.document_lists.splice(t,1),this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})},getIcon(t){return t=="application/pdf"?"pdf-icon":t.includes("image")?"image-icon":t=="application/zip"?"zip-icon":t.includes("audio")?"audio-icon":t.includes("video")?"video-file-icon":t.includes("openxmlformats")?"doc-icon":"document"},saveDoc(t){this.isSaving=!0,this.$post("documents/update",{id:t.id,title:t.title,...this.additional_data}).then(e=>{this.$notify.success(e.message),this.isSaving=!1,this.editingIndex=null,this.$emit("documentsUpdated",this.document_lists)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.isSaving=!1})}}},xFe={class:"fcom_document_lists"},kFe={class:"fcom_each_document"},CFe={class:"fcom_document_info"},SFe={class:"fcom_document_icon"},$Fe=["href"],AFe=["onClick"],EFe={class:"fcom_document_actions"},MFe=["href"];function TFe(t,e,n,s,i,o){const r=_e,a=W("EditPen"),l=Ge,c=_t,u=W("Download"),d=W("DeleteFilled"),h=xt("loading");return v(),A("div",xFe,[(v(!0),A(te,null,we(n.document_lists,(f,p)=>(v(),A("div",kFe,[g("div",CFe,[g("div",SFe,[y(r,null,{default:w(()=>[(v(),D(kt(o.getIcon(f.type))))]),_:2},1024)]),n.is_editable?(v(),A(te,{key:1},[i.editingIndex!=p?(v(),A("span",{key:0,style:{cursor:"pointer"},onClick:m=>i.editingIndex=p,class:"fcom_document_title"},[g("span",null,$(f.title),1),y(r,{style:{"margin-left":"10px","font-size":"80%"}},{default:w(()=>[y(a)]),_:1})],8,AFe)):(v(),D(c,{key:1,readonly:i.isSaving,size:"small",style:{width:"80%"},modelValue:f.title,"onUpdate:modelValue":m=>f.title=m},{append:w(()=>[y(l,{disabled:i.isSaving,loading:i.isSaving,onClick:m=>o.saveDoc(f)},{default:w(()=>[g("span",null,$(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"])]),_:2},1032,["readonly","modelValue","onUpdate:modelValue"]))],64)):(v(),A("a",{key:0,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},$(f.title),9,$Fe))]),Oe((v(),A("div",EFe,[!n.is_editable&&f.url?(v(),A("a",{key:0,href:f.url+"&force_download=1",target:"_blank",class:"el-button el-button--text"},[y(r,null,{default:w(()=>[y(u)]),_:1})],8,MFe)):O("",!0),n.is_editable?(v(),D(l,{key:1,onClick:m=>o.removeDocument(p,f),plain:"",text:"",size:"small"},{default:w(()=>[y(r,null,{default:w(()=>[y(d)]),_:1})]),_:1},8,["onClick"])):O("",!0)])),[[h,i.isSaving]])]))),256))])}const dv=ge(wFe,[["render",TFe]]),PFe={name:"DocumentUploaderPop",components:{DocumentLists:dv,DocumentsUploader:XH,Document:V1},props:["feed","space_id","is_inline"],methods:{reset(){delete this.feed.document_ids,this.feed.content_type=""},fileAdded(t){this.feed.document_ids||(this.feed.document_ids=[]),this.feed.document_ids.push(t),this.feed.content_type="document"},removeDocument(t){this.feed.document_ids.splice(t,1),(!this.feed.document_ids||this.feed.document_ids.length===0)&&(this.feed.content_type="")}}},IFe={class:"fcom_inline_docs_form"},LFe={class:"fcom_doc_upload_modal"};function OFe(t,e,n,s,i,o){var c;const r=Ge,a=W("documents-uploader"),l=W("document-lists");return v(),A("div",IFe,[g("div",LFe,[y(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),y(a,{style:{"margin-bottom":"20px"},showLists:!1,additional_data:{space_id:n.space_id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),y(l,{class:"fcom_boxed_documents",additional_data:{space_id:n.space_id,feed_id:n.feed.id},is_editable:!0,document_lists:(c=n.feed)==null?void 0:c.document_ids,onFileRemoved:o.removeDocument},null,8,["additional_data","document_lists","onFileRemoved"])])])}const DFe=ge(PFe,[["render",OFe]]),RFe={name:"PaperClipIcon"},VFe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function FFe(t,e,n,s,i,o){return v(),A("svg",VFe,[...e[0]||(e[0]=[g("path",{d:"M18.1188 9.2622L11.431 16.6897C9.50497 18.8288 6.13081 18.9109 3.86828 16.8737C1.60575 14.8365 1.33471 11.4723 3.26079 9.33317L9.14601 2.79697C10.4836 1.31147 12.8106 1.25484 14.3818 2.66956C15.953 4.08428 16.1399 6.40445 14.8023 7.88995L9.45214 13.832C8.70311 14.6638 7.42326 14.695 6.54338 13.9027C5.66351 13.1105 5.5607 11.8344 6.30973 11.0025L10.8574 5.95182",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const NFe=ge(RFe,[["render",FFe]]),BFe=window.fluentComAdmin.auth,zFe={name:"FeedTextComposer",components:{PaperClipIcon:NFe,DocumentLists:dv,DocumentUploaderPop:DFe,Document:V1,MediaPreview:Cp,Giphy:QRe,ImageUploader:Fd,SurveyEditForm:hRe,MarkdownEditor:Yd,EmojiPicker:OF,VideoEmbeder:UVe,ImageIcon:GH,PollIcon:sRe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+BFe.first_name}},config:{type:Object,default(){return{multipleMedia:!1,surveyApp:!1,videoApp:!1,disableUpload:!1,documentsApp:!1,space_id:null,spaceSlug:null,isAdmin:!1}}},disabled:{type:Boolean,default(){return!1}},autofocus:{type:Boolean,default(){return!0}},content:{type:Object,default(){return{message:"",media_images:[]}}},mentionQuery:{type:Object,default(){return{}}},autofocus_changed:{type:[Boolean,Number],default(){return!1}},defaultMentions:{type:Array,default(){return[]}},context:{type:String,default(){return""}},is_editing:{type:Boolean,default(){return!1}},is_modal:{type:Boolean,default(){return!1}}},computed:{hasActiveApp(){return this.content.content_type=="document"},hasInlineImageUpload(){return this.appVars.features.has_inline_image_upload==="yes"}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1,maxMediaPerPost:this.appVars.features.max_media_per_post}},methods:{cencelSurvey(){this.content.survey=null},insertEmoji(t){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(t)},checkHasImageForCommentsEdit(t){return t.media&&t.media.media_url},removeImageFromComments(){this.content.media=null},checkForImage(t){for(let e=0;e<t.clipboardData.items.length;++e){let n=t.clipboardData.items[e];if(n.kind=="file"&&n.type.startsWith("image/")){const s=n.getAsFile(),i=t.clipboardData.getData("text")||"clipboard-image.png";this.uploadImage(new File([s],i,{type:s.type}))}}},uploadImage(t,e=!0){if(this.config.disableUpload)return this.$notify.error(this.$t("You are not allowed to upload media here.")),!1;if(!this.canAddImage())return!1;e&&(this.uploading=!0);const n=new FormData;return n.append("file",t),n.append("max_width",1400),n.append("context",this.context),n.append("resize",!0),this.$uploadFile("feeds/media-upload",n).then(s=>(e&&this.handleMediaUpload(s.media.url),s.media.url)).catch(s=>{this.$handleError(s)}).finally(()=>{this.uploading=!1})},handleMediaUpload(t,e="uploader"){var n,s;if(this.content.media_images||(this.content.media_images=[]),(s=(n=this.content)==null?void 0:n.meta)!=null&&s.media_preview&&(this.content.meta.media_preview=null),this.config.multipleMedia||(this.content.media_images=[]),!this.canAddImage())return!1;this.content.media=null,this.content.meta=null,this.content.media_images.push({url:t,provider:e,type:"image",height:0,width:0})},initSurveyForm(){this.content.survey||(this.content.survey={type:"single_choice",options:[{slug:"",label:this.$t("First choice")},{slug:"",label:""}]})},selectedGiphy(t){var n,s;this.content.meta||(this.content.meta=[]),(n=this.content)!=null&&n.media_images&&(this.content.media_images=[]),(s=this.content)!=null&&s.media&&(this.content.media=null);const e={image:t.images.downsized_medium.url,height:t.images.downsized_medium.height,width:t.images.downsized_medium.width,type:"image",provider:"giphy"};this.content.meta={media_preview:e}},handleVideoAttachment(t){this.content.media_images=[],this.content.meta=[],this.content.media=t},getInlineImageCount(){var e,n;const t=(n=(e=this.$refs.markdownEditor)==null?void 0:e.$refs)==null?void 0:n.crepe_editor_vue;return t?t.querySelectorAll('img[src^="http"]').length:0},canAddImage(){var n;return(((n=this.content.media_images)==null?void 0:n.length)||0)+this.getInlineImageCount()>=this.maxMediaPerPost?(this.$notify.error(this.$t("You can upload a maximum of %s images per post.",this.maxMediaPerPost)),!1):!0}},mounted(){this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},HFe={class:"fcom_text_composer"},UFe={class:"fcom_editor status_text_input"},jFe={key:1,style:{position:"relative","text-align":"center"}},WFe={key:2,class:"fcom_media_items"},YFe={key:0,class:"fcom_media_images"},qFe=["src","alt"],GFe={key:1,class:"fcrom_media_images"},XFe={class:"fcrom_media_image"},KFe=["src","alt"],ZFe={key:3,class:"fcrom_media_images"},JFe=["src","alt"],QFe={key:4,class:"fcrom_media_images"},eNe={class:"fcrom_media_image"},tNe=["src","alt"],nNe={class:"fcom_composer_footer"},sNe={class:"fcom_composer_apps"},iNe={key:0},oNe={class:"fcom_composer_actions"};function rNe(t,e,n,s,i,o){var S,E,P,T,L,I,V,R,N;const r=W("MarkdownEditor"),a=W("DocumentUploaderPop"),l=W("SurveyEditForm"),c=Ge,u=W("media-preview"),d=W("CloseBold"),h=_e,f=W("ImageIcon"),p=W("image-uploader"),m=W("video-embeder"),b=W("PaperClipIcon"),_=W("PollIcon"),x=W("EmojiPicker"),k=W("Giphy"),C=xt("loading");return v(),A(te,null,[g("div",HFe,[g("div",UFe,[le(t.$slots,"before_input"),y(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=F=>n.content.message=F),context:n.context,is_modal:n.is_modal,autofocus:n.autofocus,placeholder:n.placeholder,mentionQuery:n.mentionQuery,defaultMentions:n.defaultMentions,autofocus_changed:n.autofocus_changed,onInlineUpload:o.hasInlineImageUpload?F=>o.uploadImage(F,!1):null,canAddImage:o.canAddImage,onHandleMediaUpload:o.uploadImage,onEditorCreated:e[1]||(e[1]=()=>{t.$emit("editorCreated")})},null,8,["modelValue","context","is_modal","autofocus","placeholder","mentionQuery","defaultMentions","autofocus_changed","onInlineUpload","canAddImage","onHandleMediaUpload"]),le(t.$slots,"after_input")]),n.content.content_type=="document"?(v(),A(te,{key:0},[n.config.documentsApp&&n.config.space_id?(v(),D(a,{key:0,is_inline:!0,feed:n.content,space_id:n.config.space_id},null,8,["feed","space_id"])):O("",!0)],64)):(v(),A(te,{key:1},[n.content.survey?(v(),D(l,{key:0,onCancel:o.cencelSurvey,form:n.content.survey,is_editing:n.is_editing},null,8,["onCancel","form","is_editing"])):O("",!0),(E=(S=n.content)==null?void 0:S.media)!=null&&E.type?(v(),A("div",jFe,[y(c,{onClick:e[2]||(e[2]=F=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[Y($(t.$t("Remove Media")),1)]),_:1}),y(u,{media_item:n.content.media},null,8,["media_item"])])):(P=n.content)!=null&&P.meta?(v(),A("div",WFe,[(L=(T=n.content.meta)==null?void 0:T.media_items)!=null&&L.length?(v(!0),A(te,{key:0},we(n.content.meta.media_items,(F,B)=>(v(),A("div",{key:B},[F.type=="image"?(v(),A("div",YFe,[g("img",{class:"fcom_media_image",src:F.url,alt:t.$t("Media image")},null,8,qFe),y(c,{class:"fcom_media_images_cross_button",link:"",onClick:G=>n.content.meta.media_items.splice(B,1)},{default:w(()=>[y(h,null,{default:w(()=>[y(d)]),_:1})]),_:1},8,["onClick"])])):O("",!0)]))),128)):((V=(I=n.content.meta)==null?void 0:I.media_preview)==null?void 0:V.type)=="image"||(N=(R=n.content.meta)==null?void 0:R.media_preview)!=null&&N.image?(v(),A("div",GFe,[g("div",XFe,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,KFe),y(c,{link:"",onClick:e[3]||(e[3]=F=>n.content.meta.media_preview=null)},{default:w(()=>[y(h,null,{default:w(()=>[y(d)]),_:1})]),_:1})])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),A("div",ZFe,[(v(!0),A(te,null,we(n.content.media_images,(F,B)=>(v(),A("div",{class:"fcrom_media_image",key:B},[g("img",{src:F.url,alt:t.$t("Media image")},null,8,JFe),y(c,{link:"",onClick:G=>n.content.media_images.splice(B,1)},{default:w(()=>[y(h,null,{default:w(()=>[y(d)]),_:1})]),_:1},8,["onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),A("div",QFe,[g("div",eNe,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,tNe),y(c,{link:"",onClick:e[4]||(e[4]=F=>o.removeImageFromComments())},{default:w(()=>[y(h,null,{default:w(()=>[y(d)]),_:1})]),_:1})])])):O("",!0)],64))]),le(t.$slots,"before_composer_footer"),Oe((v(),A("div",nNe,[g("div",sNe,[o.hasActiveApp?O("",!0):(v(),A(te,{key:0},[i.maxMediaPerPost?(v(),D(p,{key:0,additionalData:{resize:!0,context:n.context,max_width:1400},isMultiple:n.config.multipleMedia,onUploading:e[5]||(e[5]=()=>{i.uploading=!0}),onCompleted:e[6]||(e[6]=()=>{i.uploading=!1}),onUploaded:o.handleMediaUpload},{default:w(()=>[y(c,{"aria-label":"Upload Media",loading:i.uploading,text:""},{default:w(()=>[y(h,{class:"fcom_status_img_icon"},{default:w(()=>[y(f)]),_:1}),i.uploading?(v(),A("span",iNe,$(t.$t("Uploading...")),1)):O("",!0)]),_:1},8,["loading"])]),_:1},8,["additionalData","isMultiple","onUploaded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),D(m,{key:1,space:n.config.spaceSlug,is_admin:n.config.is_admin,onEmbeded:o.handleVideoAttachment},null,8,["space","is_admin","onEmbeded"])):O("",!0),n.config.documentsApp&&n.config.space_id?(v(),D(c,{key:2,"aria-label":t.$t("Add Documents"),title:t.$t("Upload Documents"),text:"",onClick:e[7]||(e[7]=F=>n.content.content_type="document")},{default:w(()=>[y(h,{class:U(["fcom_apps_icon"])},{default:w(()=>[y(b)]),_:1})]),_:1},8,["aria-label","title"])):O("",!0),n.config.surveyApp&&t.hasFeature("has_survey_poll")?(v(),D(c,{key:3,"aria-label":"Create Poll",onClick:o.initSurveyForm,text:""},{default:w(()=>[y(h,{class:"fcom_apps_icon"},{default:w(()=>[y(_)]),_:1})]),_:1},8,["onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),D(x,{key:4,onEmojiSelected:o.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),t.hasFeature("giphy_app")?(v(),D(k,{key:5,onSelectedGiphy:o.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),g("div",oNe,[le(t.$slots,"default")])])),[[C,i.uploading]]),le(t.$slots,"after_composer_footer")],64)}const hv=ge(zFe,[["render",rNe]]),aNe={name:"FeedMdContent",props:["content","class_name"],data(){return{hoverTimeout:null,lightboxImages:[],lightboxIndex:0}},watch:{content(){this.$nextTick(()=>{this.cleanupListeners(),this.setupListeners()})}},methods:{setupListeners(){const t=this.$refs.content;if(!t)return;const e=/\/u\/([^\/]+)\/?$/;t.querySelectorAll("a").forEach(n=>{const s=n.getAttribute("href"),i=(s==null?void 0:s.startsWith(this.appVars.portal_url))&&s.match(e);if(!i)return;const o=i[1];n._mentionEnter=()=>{clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.$eventBus.emit("show_mention_popover",{username:o,triggerElement:n})},500)},n._mentionLeave=()=>{clearTimeout(this.hoverTimeout),this.$eventBus.emit("hide_mention_popover")},n.addEventListener("mouseenter",n._mentionEnter),n.addEventListener("mouseleave",n._mentionLeave)}),this._clickHandler=n=>{var r;const s=n.target.closest('img[src^="http"]');if(s){n.preventDefault();const a=Array.from(t.querySelectorAll('img[src^="http"]')).map(l=>l.src);this.lightboxImages=a,this.lightboxIndex=Math.max(0,a.indexOf(s.src));return}const i=n.target.closest(".fcom_copy_code_btn");if(!i)return;n.stopPropagation();const o=(r=i.parentElement)==null?void 0:r.querySelector("pre");o&&this.$toClipboard((o.querySelector("code")||o).innerText,"Code copied")},t.addEventListener("click",this._clickHandler),t.querySelectorAll("pre").forEach(n=>{var i;if((i=n.parentElement)!=null&&i.classList.contains("fcom_code_wrap"))return;const s=document.createElement("div");s.className="fcom_code_wrap",s.innerHTML='<button class="fcom_copy_code_btn" title="Copy code"></button>',n.replaceWith(s),s.prepend(n)})},cleanupListeners(){const t=this.$refs.content;t&&(t.querySelectorAll("a").forEach(e=>{e._mentionEnter&&(e.removeEventListener("mouseenter",e._mentionEnter),e.removeEventListener("mouseleave",e._mentionLeave))}),this.$eventBus.emit("hide_mention_popover"),clearTimeout(this.hoverTimeout),this._clickHandler&&(t.removeEventListener("click",this._clickHandler),this._clickHandler=null),t.querySelectorAll(".fcom_copy_code_btn").forEach(e=>e.remove()))}},mounted(){this.$nextTick(()=>this.setupListeners())},beforeUnmount(){this.cleanupListeners()}},lNe=["innerHTML"];function cNe(t,e,n,s,i,o){const r=GV;return v(),A(te,null,[g("div",{ref:"content",class:U(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,lNe),i.lightboxImages.length?(v(),D(r,{key:0,"url-list":i.lightboxImages,"initial-index":i.lightboxIndex,"hide-on-click-modal":!0,onClose:e[0]||(e[0]=a=>i.lightboxImages=[])},null,8,["url-list","initial-index"])):O("",!0)],64)}const fv=ge(aNe,[["render",cNe]]),uNe={name:"CommentReacts",components:{UserRouteLink:ta},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{comment:{required:!0,default:null}},methods:{getReactions(){this.reactions&&this.reactions.length===this.comment.reactions_count||(this.loading=!0,this.$get("comments/"+this.comment.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},dNe={style:{"margin-left":"5px"}},hNe={key:0},fNe={key:1},pNe={class:"fcom_user_lists"},mNe={key:2};function gNe(t,e,n,s,i,o){const r=Jt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ei,u=Xi;return v(),D(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",onShow:o.getReactions},{reference:w(()=>[g("span",dNe,$(n.comment.reactions_count),1)]),default:w(()=>[i.loading?(v(),A("div",hNe,[y(r,{animated:!0,rows:1})])):i.reactions?(v(),A("div",fNe,[y(c,{"max-height":"300px"},{default:w(()=>[g("ul",pNe,[(v(!0),A(te,null,we(i.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(te,{key:0},[y(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),y(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),A("div",mNe,[g("p",null,$(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const KH=ge(uNe,[["render",gNe]]),vNe={name:"ImageCarousel",props:["feed","is_single"],computed:{srcList(){return this.feed.meta.media_items.map(t=>t.url)},visibleMedia(){return this.feed.meta.media_items.map((t,e)=>({url:t.url,type:t.type,index:e})).slice(0,4)},overflowCount(){return this.srcList.length>4?this.srcList.length-4:0},carouselClass(){const t=this.srcList.length;return t===1?"fcom_image_carousel_num_1":t===3?"fcom_image_carousel_num_3":t===2||t===4||t>4?"fcom_image_carousel_num_2_or_4":""}},methods:{getVideoType(t){switch(t.split(".").pop().toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";default:return"video/mp4"}},isOverflowSlot(t){return t===3&&this.feed.meta.media_items.length>4}}},yNe={class:"fcom_image_carousel"},bNe={key:0},_Ne=["preload","poster"],wNe=["src","type"],xNe={key:1,class:"fcom_image_wrap"},kNe={key:0,class:"fcom_image_overlay"};function CNe(t,e,n,s,i,o){const r=Ra;return v(),A("div",yNe,[g("div",{class:U([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),A(te,null,we(o.visibleMedia,(a,l)=>(v(),A("div",{class:U(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),A("div",bNe,[g("video",{style:{width:"100%","aspect-ratio":"16/9"},controls:"",preload:n.is_single?"":"none",poster:a.thumbnail},[g("source",{src:a.url,type:o.getVideoType(a.url)},null,8,wNe)],8,_Ne)])):(v(),A("div",xNe,[y(r,{lazy:"",alt:"",src:a.url,"zoom-rate":1.2,"max-scale":7,"min-scale":.5,"hide-on-click-modal":!0,"preview-teleported":!0,"initial-index":a.index,"preview-src-list":o.srcList,fit:"cover"},null,8,["src","initial-index","preview-src-list"]),o.isOverflowSlot(l)?(v(),A("div",kNe,"+"+$(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const _S=ge(vNe,[["render",CNe]]),SNe={name:"ErrorIcon"},$Ne={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(245 166 7)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-3 w-3 ltr:mr-2 rtl:ml-2"};function ANe(t,e,n,s,i,o){return v(),A("svg",$Ne,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10"},null,-1),g("line",{x1:"12",x2:"12",y1:"16",y2:"12"},null,-1),g("line",{x1:"12",x2:"12.01",y1:"8",y2:"8"},null,-1)])])}const ENe=ge(SNe,[["render",ANe]]),MNe={name:"ReportReview",components:{ErrorIcon:ENe},props:{feed:{type:Object,required:!0},type:{type:String,default:"post"}},emits:["updated"],methods:{openReportDetails(){this.$eventBus.emit("showReportReviewModal",{content:this.feed,type:this.type})},handleReportUpdate(t){var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&this.$emit("updated",t.content)}},mounted(){this.$eventBus.on("updateModerationReport",this.handleReportUpdate)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.handleReportUpdate)}},TNe={class:"fcom_feed_report_wrap"},PNe={class:"fcom_feed_report_content"},INe={key:0},LNe={key:1},ONe={key:2},DNe={class:"fcom_feed_report_action"};function RNe(t,e,n,s,i,o){const r=W("ErrorIcon"),a=Ge;return v(),A("div",TNe,[g("div",PNe,[y(r),n.feed.meta.auto_flagged=="yes"?(v(),A("span",INe,$(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),A("span",LNe,$(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),A("span",ONe,$(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",DNe,[y(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[Y($(t.$t("Review")),1)]),_:1})])])}const ZH=ge(MNe,[["render",RNe]]),VNe={name:"StickyIcon"},FNe={viewBox:"0 0 24 24","aria-hidden":"true",class:"r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-14j79pv r-10ptun7 r-1janqcz"};function NNe(t,e,n,s,i,o){return v(),A("svg",FNe,[...e[0]||(e[0]=[g("g",null,[g("path",{d:"M7 4.5C7 3.12 8.12 2 9.5 2h5C15.88 2 17 3.12 17 4.5v5.26L20.12 16H13v5l-1 2-1-2v-5H3.88L7 9.76V4.5z"})],-1)])])}const JH=ge(VNe,[["render",NNe]]),BNe={name:"SingleComment",components:{ImageCarousel:_S,FeedTextComposer:hv,MediaPreview:Cp,ReportReview:ZH,StickyIcon:JH,FeedMdContent:fv},props:{comment:{type:Object,required:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},space_id:{type:String,default:null}},emits:["deleted","updated","reload","copyLink"],watch:{isEdit(t){t||(this.expanded=!1,this.canExpand=!1,this.$nextTick(()=>{this.checkOverflow(),this.canExpand&&(this.expanded=!0)}))}},mounted(){this.$nextTick(()=>this.checkOverflow())},data(){return{working:!1,isEdit:!1,editingComment:null,focusTrigger:0,expanded:!1,canExpand:!1}},computed:{contentClass(){return"comment_text_body"+(this.expanded?"":" clamped")},isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess()&&this.isReportEnabled&&this.show_report&&((t=this.comment.meta)==null?void 0:t.reports_count)},showReportOption(){return!(this.comment.user_id==this.auth.user_id)&&this.auth.user_id&&this.isReportEnabled},showStickyOption(){return!this.comment.parent_id&&this.hasSpaceModeratorAccess()},getReportComment(){return{...this.comment,space_id:this.space_id}}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.updateComment()},deleteComment(){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.comment.post_id+"/comments/"+this.comment.id).then(t=>{this.$emit("deleted"),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})})},editComment(){this.working=!0,this.$get(`comments/${this.comment.id}`,{context:"edit"}).then(t=>{this.editingComment=t.comment,this.isEdit=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1,this.$refs.comment_actions.hide()})},updateComment(){var e,n,s,i;const t=((e=this.editingComment.media_images)==null?void 0:e.length)>0||((s=(n=this.editingComment.meta)==null?void 0:n.media_preview)==null?void 0:s.image);if(!((i=this.editingComment.message)!=null&&i.replace(/&#x20;|\u00A0/gi,"").trim())&&!t){this.$notify.error(this.$t("Comment cannot be empty")),this.focusTrigger++;return}this.working=!0,this.isEdit=!0,this.$post(`feeds/${this.comment.post_id}/comments/${this.comment.id}`,{comment:this.editingComment.message,media_images:this.editingComment.media_images,meta:this.editingComment.meta}).then(o=>{this.$notify.success((o==null?void 0:o.message)||this.$t("Comment updated successfully")),Object.assign(this.comment,o.comment),this.comment.media_images=[]}).catch(o=>{this.$handleError(o),this.focusTrigger++}).finally(()=>{this.isEdit=!1,this.working=!1})},toggleSticky(){this.hasSpaceModeratorAccess()&&(this.working=!0,this.comment.is_sticky=!this.comment.is_sticky,this.$patch("feeds/"+this.comment.post_id+"/comments/"+this.comment.id,{is_sticky:this.comment.is_sticky?1:0}).then(t=>{this.$notify.success(t.message),this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},renderedComment(t){const n=/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/.exec(t);if(n&&n[1]){let o=n[1];if(o){let r=`<div class="feed_media_ext_video"><iframe src="https://www.youtube.com/embed/${o}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`;t+=r}}let s=window.location.origin,i=new RegExp(s,"g");return t=t.replace(/<a(.*?)href="(.*?)"(.*?)>/g,(o,r,a,l)=>a.match(i)?`<a${r}href="${a}"${l}>`:`<a${r}href="${a}" target="_blank"${l}>`),t},copyCommentLink(t){this.$emit("copyLink",t),this.$refs.comment_actions.hide()},reportComment(t){this.$refs.comment_actions.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:t,type:"comment"})},checkOverflow(){var e,n;if(this.expanded)return;const t=(n=(e=this.$refs.commentBody)==null?void 0:e.$refs)==null?void 0:n.content;t&&(this.canExpand=t.scrollHeight>t.clientHeight+1)},toggleExpand(){this.expanded=!this.expanded},reportUpdated(t){var e;t.status=="unpublished"?this.$emit("deleted"):(this.comment.status=t.status,this.comment.meta&&(this.comment.meta.reports_count=((e=t.meta)==null?void 0:e.reports_count)||0),this.$emit("updated"))}}},zNe={key:1,class:"person_avatar"},HNe={class:"comment_wrap"},UNe={key:0,class:"comment_text"},jNe={key:0,class:"comment_text_head"},WNe={class:"comment_text_head_name"},YNe=["title"],qNe={key:0,class:"comment_text_head_status"},GNe={class:"comment_actions"},XNe={class:"actions_items"},KNe={key:2,class:"comment_text_media"},ZNe={key:3,class:"comment_text_media"};function JNe(t,e,n,s,i,o){const r=W("ReportReview"),a=W("UserAvatar"),l=W("UserRouteLink"),c=Bo,u=W("StickyIcon"),d=_e,h=Ge,f=W("MoreFilled"),p=Xi,m=W("FeedMdContent"),b=W("MediaPreview"),_=W("ImageCarousel"),x=W("feed-text-composer"),k=xt("loading");return v(),A(te,null,[o.showReport?(v(),D(r,{key:0,feed:o.getReportComment,type:"comment",onUpdated:o.reportUpdated},null,8,["feed","onUpdated"])):O("",!0),n.show_header&&n.comment.xprofile?(v(),A("div",zNe,[y(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Oe((v(),A("div",HNe,[i.isEdit?(v(),A("div",{key:1,onKeydown:e[10]||(e[10]=Nt((...C)=>o.maybeSave&&o.maybeSave(...C),["enter"])),class:"comment_text"},[y(x,{context:"comment",config:{multipleMedia:!0},placeholder:t.$t("Write a comment"),content:i.editingComment,autofocus:!0,autofocus_changed:i.focusTrigger},{default:w(()=>[g("div",null,[y(h,{onClick:e[8]||(e[8]=C=>i.isEdit=!1),class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),y(h,{class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.updateComment(i.editingComment))},{default:w(()=>[Y($(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),A("div",UNe,[n.show_header?(v(),A("div",jNe,[g("div",WNe,[y(l,{show_badge:!0,xprofile:n.comment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:n.comment.created_at,class:"comment_text_head_time"},$(t.humanDateDiff(n.comment.created_at)),9,YNe),n.comment.status=="pending"?(v(),A("div",qNe,[y(c,{type:"warning"},{default:w(()=>[Y($(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",GNe,[n.comment.is_sticky?(v(),D(h,{key:0,onClick:e[0]||(e[0]=C=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[y(d,{title:t.$t("Unpin from Top"),class:"fcom_sticky"},{default:w(()=>[y(u)]),_:1},8,["title"])]),_:1},8,["aria-label"])):O("",!0),y(p,{persistent:!1,placement:"bottom",ref:"comment_actions",width:200,trigger:"click"},{reference:w(()=>[y(h,{"aria-label":t.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(d,null,{default:w(()=>[y(f)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>[g("ul",XNe,[g("li",{onClick:e[1]||(e[1]=C=>o.copyCommentLink(n.comment))},$(t.$t("Copy Link")),1),o.showStickyOption?(v(),A(te,{key:0},[n.comment.is_sticky?(v(),A("li",{key:0,onClick:e[2]||(e[2]=C=>o.toggleSticky())},$(t.$t("Unpin from Top")),1)):(v(),A("li",{key:1,onClick:e[3]||(e[3]=C=>o.toggleSticky())},$(t.$t("Pin to Top")),1))],64)):O("",!0),o.showReportOption?(v(),A("li",{key:1,onClick:e[4]||(e[4]=C=>o.reportComment(n.comment))},$(t.$t("Report Comment")),1)):O("",!0),t.canEditComment(n.comment)?(v(),A("li",{key:2,onClick:e[5]||(e[5]=C=>o.editComment())},$(t.$t("Edit")),1)):O("",!0),t.canDeleteComment(n.comment)?(v(),A("li",{key:3,onClick:e[6]||(e[6]=C=>o.deleteComment())},$(t.$t("Delete")),1)):O("",!0)])]),_:1},512)])])):O("",!0),y(m,{ref:"commentBody",class_name:o.contentClass,content:o.renderedComment(n.comment.message_rendered)},null,8,["class_name","content"]),i.canExpand?(v(),A("button",{key:1,type:"button",class:"fcom_see_more_btn",onClick:e[7]||(e[7]=(...C)=>o.toggleExpand&&o.toggleExpand(...C))},$(i.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),A("div",KNe,[y(b,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),A("div",ZNe,[n.comment.meta.media_items?(v(),D(_,{key:0,feed:n.comment},null,8,["feed"])):O("",!0)])):O("",!0)])),le(t.$slots,"after_comment_text")])),[[k,i.working]])],64)}const F2=ge(BNe,[["render",JNe]]),QNe={name:"IndividualCommentReply",components:{FeedTextComposer:hv,FeedMdContent:fv,HeartIcon:D2,SingleComment:F2,CommentReactions:KH},props:["comment","comments"],data(){return{commenting:!0,replyingComment:{},newComment:{message:"",media_images:[]},saving:!1}},watch:{comment:{handler(){this.updateReplyingComment()},immediate:!0}},methods:{toggleCommentBox(){this.commenting=!this.commenting},toggleLike(t){this.$emit("toggleLike",t)},postComment(){if(!this.newComment.message){this.$notify({title:this.$t("Error"),message:this.$t("Please write a reply first"),type:"error"});return}this.saving=!0,this.$post("feeds/"+this.comment.post_id+"/comments",{comment:this.newComment.message,parent_id:this.comment.id,media_images:this.newComment.media_images}).then(t=>{this.replyingComment.comments||(this.replyingComment.comments=[]),this.replyingComment.comments.push(t.comment),this.newComment={message:"",media_images:[]}}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},updateReplyingComment(){this.comment.parent_id&&this.comments?(this.replyingComment=this.comments.find(t=>t.id===parseInt(this.comment.parent_id))||this.comment,this.replyingComment.comments=this.comments.filter(t=>parseInt(t.parent_id)===this.replyingComment.id)):this.replyingComment=this.comment}},mounted(){this.updateReplyingComment()}},eBe={class:"fcom_course_comment each_comment"},tBe={key:0,class:"person_avatar"},nBe=["src","alt"],sBe={class:"comment_wrap"},iBe={class:"comment_text"},oBe={class:"comment_text_head"},rBe={class:"comment_text_head_name"},aBe=["title"],lBe={class:"reply_box"},cBe={class:"fcom_comments_react"},uBe={class:"child_comments"},dBe=["id"],hBe={class:"reply_box"},fBe=["onClick"],pBe={class:"fcom_comments_react fcom_reaction_list"},mBe={key:0,class:"child_reply_wrap"},gBe={class:"feed_commenting"},vBe={class:"person_avatar"},yBe=["src"],bBe={class:"feed_comment_input comment_text"};function _Be(t,e,n,s,i,o){const r=W("UserRouteLink"),a=W("FeedMdContent"),l=W("HeartIcon"),c=_e,u=W("CommentReactions"),d=W("single-comment"),h=Ge,f=W("FeedTextComposer"),p=xt("loading");return v(),A("div",eBe,[i.replyingComment.xprofile?(v(),A("div",tBe,[g("img",{src:i.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,nBe)])):O("",!0),g("div",sBe,[g("div",iBe,[g("div",oBe,[g("div",rBe,[y(r,{xprofile:i.replyingComment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:i.replyingComment.created_at,class:"comment_text_head_time"},$(t.humanDateDiff(i.replyingComment.created_at)),9,aBe)])]),y(a,{content:i.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",lBe,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},$(t.$t("Post Comment")),1),g("span",{class:U([{fcom_is_liked:i.replyingComment.liked},"reply_btn"])},[g("div",cBe,[y(c,{class:U({user_reacted:i.replyingComment.liked}),onClick:e[1]||(e[1]=m=>o.toggleLike(n.comment))},{default:w(()=>[y(l,{filled:i.replyingComment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(i.replyingComment.reactions_count)?(v(),D(u,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2)]),g("div",uBe,[(v(!0),A(te,null,we(i.replyingComment.comments,(m,b)=>(v(),A("div",{id:"comment_"+m.id,class:"each_comment"},[y(d,{onDeleted:_=>t.handleCommentDelete(b),comment:m},{after_comment_text:w(()=>[g("div",hBe,[g("span",{onClick:_=>o.toggleCommentBox(m),class:"reply_btn"},$(t.$t("Reply")),9,fBe),g("span",{class:U([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",pBe,[y(c,{class:U({user_reacted:m.liked}),onClick:_=>o.toggleLike(m)},{default:w(()=>[y(l,{filled:m.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(m.reactions_count)?(v(),D(u,{key:0,comment:m},null,8,["comment"])):O("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,dBe))),256))]),i.commenting?(v(),A("div",mBe,[g("div",gBe,[g("div",vBe,[g("img",{alt:"",src:t.auth.avatar},null,8,yBe)]),g("div",bBe,[y(f,{context:"comment",mentionQuery:{space_id:i.replyingComment.space_id},autofocus_changed:i.commenting,autofocus:i.commenting,disabled:i.saving,placeholder:t.$t("Write a reply"),content:i.newComment},{default:w(()=>[Oe((v(),D(h,{disabled:i.saving,class:"fcom_primary_button",onClick:e[2]||(e[2]=m=>o.postComment())},{default:w(()=>[Y($(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,i.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const wBe=ge(QNe,[["render",_Be]]),xBe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:wBe,Pagination:qd,ChatIcon:qH,HeartIcon:D2,FeedMdContent:fv},data(){return{comments:[],loading:!0,pagination:{page:1,per_page:10,total:0},working:!1,replyingComemnt:null,isReplying:!1}},methods:{fetchComments(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/comments",{page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.comments=t.comments.data,this.pagination.total=t.comments.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},toggleLike(t){const e=!t.liked;this.$post("feeds/"+t.post_id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},deleteComment(t,e){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+t.post_id+"/comments/"+t.id).then(n=>{this.comments.splice(e,1),this.$notify.success(n.message)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})})},initCommentReply(t){this.replyingComemnt=t,this.$nextTick(()=>{this.isReplying=!0})}},mounted(){this.fetchComments()}},kBe={key:0,class:"white_loaded"},CBe={key:0,class:"fcom_course_comments_header"},SBe={class:"course_comments feed_comments overview_comments"},$Be={key:0,class:"person_avatar"},ABe={class:"comment_wrap"},EBe={class:"comment_text"},MBe={class:"comment_text_head"},TBe={class:"comment_text_head_name"},PBe=["title"],IBe={class:"comment_actions"},LBe={class:"actions_items"},OBe=["onClick"],DBe={class:"comment_text_details"},RBe=["href"],VBe={class:"comment_text_actions"},FBe={key:0},NBe={key:1};function BBe(t,e,n,s,i,o){const r=Jt,a=W("UserAvatar"),l=W("UserRouteLink"),c=W("MoreFilled"),u=_e,d=Ge,h=Xi,f=W("FeedMdContent"),p=W("ChatIcon"),m=W("HeartIcon"),b=W("pagination"),_=W("IndividualCommentReply"),x=Al,k=xt("loading");return i.loading?(v(),A("div",kBe,[y(r,{row:5})])):(v(),A(te,{key:1},[i.pagination.total?(v(),A("div",CBe,[g("h5",null,$(t.$t("Comments (%s)",i.pagination.total)),1)])):O("",!0),g("div",SBe,[(v(!0),A(te,null,we(i.comments,(C,S)=>(v(),A("div",{key:C.id,class:"fcom_course_comment each_comment"},[C.xprofile?(v(),A("div",$Be,[y(a,{with_level:!1,xprofile:C.xprofile},null,8,["xprofile"])])):O("",!0),g("div",ABe,[g("div",EBe,[g("div",MBe,[g("div",TBe,[y(l,{xprofile:C.xprofile},null,8,["xprofile"]),g("div",{title:C.created_at,class:"comment_text_head_time"},$(t.humanDateDiff(C.created_at)),9,PBe)]),Oe((v(),A("div",IBe,[t.canDeleteComment(C)?(v(),D(h,{key:0,persistent:!1,placement:"bottom",width:200,trigger:"click"},{reference:w(()=>[y(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>[g("ul",LBe,[g("li",{onClick:E=>o.deleteComment(C,S)},"Delete",8,OBe)])]),_:2},1024)):O("",!0)])),[[k,i.working]])]),g("div",DBe,[g("a",{href:t.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?comment_id=:comment_id&show_comments=true",{course_slug:n.course.slug,lesson_slug:C.post.slug,comment_id:C.id})},[Y($(t.$t("Commented in"))+" ",1),g("b",null,$(t.getExcerpt(C.post.title,60)),1)],8,RBe)]),y(f,{content:C.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",VBe,[y(d,{onClick:E=>o.initCommentReply(C),text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(p)]),_:1}),g("span",null,$(t.$t("Reply")),1)]),_:1},8,["onClick"]),y(d,{text:""},{default:w(()=>[y(u,{class:U({user_reacted:C.liked}),onClick:E=>o.toggleLike(C)},{default:w(()=>[y(m,{filled:C.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,$(C.reactions_count||""),1)]),_:2},1024)])])])]))),128)),i.pagination.total?O("",!0):(v(),A("div",FBe,[g("h5",null,$(t.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),y(b,{pagination:i.pagination,onFetch:o.fetchComments},null,8,["pagination","onFetch"]),y(x,{"append-to-body":!0,modelValue:i.isReplying,"onUpdate:modelValue":e[0]||(e[0]=C=>i.isReplying=C),size:t.dialogWidth},{header:w(()=>{var C;return[g("p",null,[Y($(t.$t("Replying to"))+" ",1),g("b",null,$((C=i.replyingComemnt)==null?void 0:C.post.title),1)])]}),default:w(()=>[i.replyingComemnt?(v(),D(_,{key:0,comment:i.replyingComemnt,comments:i.comments,onToggleLike:o.toggleLike},null,8,["comment","comments","onToggleLike"])):(v(),A("h3",NBe,$(t.$t("Replying to Let's check this out! Let's do it Replying to Let's check this out! Let's do it")),1))]),_:1},8,["modelValue","size"])],64))}const zBe=ge(xBe,[["render",BBe]]),HBe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:zBe}},UBe={class:"fcom_cards fcom_cards_2"},jBe={class:"fcom_card"},WBe={class:"fcom_card_body"},YBe={class:"fcom_card"},qBe={class:"fcom_card_body"};function GBe(t,e,n,s,i,o){const r=W("course-comments");return v(),A(te,null,[g("div",UBe,[g("div",jBe,[g("div",WBe,[g("p",null,$(t.$t("Students")),1),g("h3",null,$(n.course.students_count),1)])]),g("div",YBe,[g("div",qBe,[g("p",null,$(t.$t("Average Completion Rate")),1),g("h3",null,$(n.course.overAllProgress)+"%",1)])])]),y(r,{course:n.course},null,8,["course"])],64)}const XBe=ge(HBe,[["render",GBe]]),KBe={name:"ContentLayout",props:["title","content_class","wrapper_class"]},ZBe={key:0,class:"fhr_content_layout_header"},JBe={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function QBe(t,e,n,s,i,o){return v(),A("div",{class:U([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),A("div",ZBe,[le(t.$slots,"title",{},()=>[g("h1",{role:"region","aria-label":"Page Title",style:{cursor:"pointer"},onClick:e[0]||(e[0]=r=>t.$eventBus.emit("toTop")),class:"fhr_page_title"},$(n.title),1)]),g("div",JBe,[le(t.$slots,"actions")])])):O("",!0)]),le(t.$slots,"sub_header"),g("div",{class:U([n.content_class,"fhr_content_layout_body"])},[le(t.$slots,"default")],2)],2)}const pi=ge(KBe,[["render",QBe]]),eze={name:"AppLayout",props:["wrapper_class"]},tze={class:"feeds_main"};function nze(t,e,n,s,i,o){const r=W("router-view");return v(),A("div",{class:U([n.wrapper_class,"feeds"])},[g("div",tze,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[y(r)]),le(t.$slots,"after_route_view")])],2)}const mi=ge(eze,[["render",nze]]),sze={name:"BgImageUpload",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1},button_text:{type:String,default(){return""}},can_remove:{type:Boolean,default:!1},is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})}},data(){return{imageUrl:this.modelValue}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{handleSuccess(t){this.imageUrl=t.media.url,this.$emit("update:modelValue",this.imageUrl)},handleError(t){this.$handleError(JSON.parse(t.message))},removeImage(){this.imageUrl="",this.$emit("update:modelValue","")}}};function ize(t,e,n,s,i,o){const r=Ra,a=Ge,l=j1,c=W("CloseBold"),u=_e;return v(),A(te,null,[y(l,{action:o.action_url,headers:o.headers,accept:"image/*",class:"fcom_bg_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":!1,"on-success":o.handleSuccess,"on-error":o.handleError},{default:w(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[i.imageUrl?(v(),D(r,{key:0,alt:t.$t("Image Preview"),src:i.imageUrl},null,8,["alt","src"])):(v(),D(a,{key:1,class:"fcom_btn_upload",text:""},{default:w(()=>[Y($(n.button_text||t.$t("Upload Image")),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),i.imageUrl&&n.can_remove?(v(),D(a,{key:0,class:"fcom_bg_remove",text:"",size:"small",onClick:o.removeImage},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["onClick"])):O("",!0)],64)}const N2=ge(sze,[["render",ize]]),oze={name:"ImagePlaceholder"},rze={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function aze(t,e,n,s,i,o){return v(),A("svg",rze,[...e[0]||(e[0]=[g("rect",{width:"240",height:"240",fill:"#F5F6F7"},null,-1),g("path",{d:"M133.125 121.65L129.33 116.7C129 116.26 128.56 116.04 128.01 116.04C127.46 116.04 127.02 116.26 126.69 116.7L121.163 123.96C120.723 124.51 120.654 125.088 120.956 125.693C121.259 126.298 121.768 126.6 122.483 126.6H148.718C149.433 126.6 149.941 126.298 150.244 125.693C150.546 125.088 150.478 124.51 150.038 123.96L142.035 113.483C141.705 113.043 141.265 112.823 140.715 112.823C140.165 112.823 139.725 113.043 139.395 113.483L133.125 121.65ZM115.8 139.8C113.985 139.8 112.431 139.154 111.139 137.861C109.846 136.569 109.2 135.015 109.2 133.2V93.6C109.2 91.785 109.846 90.2313 111.139 88.9388C112.431 87.6462 113.985 87 115.8 87H155.4C157.215 87 158.769 87.6462 160.061 88.9388C161.354 90.2313 162 91.785 162 93.6V133.2C162 135.015 161.354 136.569 160.061 137.861C158.769 139.154 157.215 139.8 155.4 139.8H115.8ZM115.8 133.2H155.4V93.6H115.8V133.2ZM102.6 153C100.785 153 99.2313 152.354 97.9388 151.061C96.6462 149.769 96 148.215 96 146.4V103.5C96 102.565 96.3163 101.781 96.9488 101.149C97.5813 100.516 98.365 100.2 99.3 100.2C100.235 100.2 101.019 100.516 101.651 101.149C102.284 101.781 102.6 102.565 102.6 103.5V146.4H145.5C146.435 146.4 147.219 146.716 147.851 147.349C148.484 147.981 148.8 148.765 148.8 149.7C148.8 150.635 148.484 151.419 147.851 152.051C147.219 152.684 146.435 153 145.5 153H102.6Z",fill:"#98A2B3"},null,-1)])])}const wS=ge(oze,[["render",aze]]),lze={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:wS},props:{field:{type:Object,required:!0},space_id:{type:[String,Number],required:!0}},data(){return{loading:!1,editTab:"paywall",availablePaywalls:[]}},methods:{initAddPaywall(){this.field.paywalls=this.field.paywalls||[],this.field.paywalls.push("")},removePaywall(t){const e=this.field.paywalls||[];e.splice(e.indexOf(t),1),this.field.paywalls=e},isPaywallAdded(t){var e;return(e=this.field.paywalls)==null?void 0:e.includes(t.toString())},getAvailablePaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",{space_id:this.space_id}).then(t=>{this.availablePaywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getAvailablePaywalls()}},cze={key:0,class:"fcom_paywalls"},uze={class:"fcom_paywall"},dze={class:"fcom_select_photo",style:{float:"left"}},hze=["src"],fze={key:0,class:"fcom_description"},pze={class:"fcom_paywall_actions"},mze={class:"fcom_color_input_wrap"},gze={class:"fcom_color_input_wrap"},vze={class:"fcom_color_input_wrap"},yze={class:"fcom_color_input_wrap"};function bze(t,e,n,s,i,o){const r=W("image-placeholder"),a=ln,l=Z_,c=Qt,u=W("Delete"),d=_e,h=Ge,f=Jt,p=i2,m=_t,b=an,_=Zt,x=fn,k=Dd,C=s2;return v(),D(C,{modelValue:i.editTab,"onUpdate:modelValue":e[12]||(e[12]=S=>i.editTab=S)},{default:w(()=>[y(p,{label:t.$t("Paywalls"),name:"paywall"},{default:w(()=>[i.loading?(v(),D(f,{key:1,rows:2,animated:""})):(v(),A("div",cze,[(v(!0),A(te,null,we(n.field.paywalls,(S,E)=>(v(),A("div",uze,[y(c,{modelValue:n.field.paywalls[E],"onUpdate:modelValue":P=>n.field.paywalls[E]=P,placeholder:t.$t("Select Paywall")},{default:w(()=>[(v(!0),A(te,null,we(i.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:w(()=>[(v(!0),A(te,null,we(P.variants,T=>(v(),D(a,{key:T.id,value:T.id.toString(),label:T.variation_title,disabled:o.isPaywallAdded(T.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",dze,[T.photo?(v(),A("img",{key:0,src:T.photo},null,8,hze)):(v(),D(r,{key:1})),g("span",null,$(T.variation_title),1)])]),_:2},1032,["value","label","disabled"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]),y(d,{onClick:P=>o.removePaywall(S)},{default:w(()=>[y(u)]),_:1},8,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),A("div",fze,[g("p",null,$(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",pze,[y(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:w(()=>[g("span",null,$("+ "+t.$t("Add Paywall")),1)]),_:1},8,["onClick"])])]))]),_:1},8,["label"]),y(p,{label:t.$t("Content"),name:"content"},{default:w(()=>[y(x,{onSubmit:e[2]||(e[2]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(b,{label:t.$t("Button Label")},{default:w(()=>[y(m,{modelValue:n.field.button_text,"onUpdate:modelValue":e[0]||(e[0]=S=>n.field.button_text=S),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(b,null,{default:w(()=>[y(_,{modelValue:n.field.show_description,"onUpdate:modelValue":e[1]||(e[1]=S=>n.field.show_description=S),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Show Paywall Description")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["label"]),y(p,{label:t.$t("Design"),name:"design"},{default:w(()=>[y(x,{onSubmit:e[11]||(e[11]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(b,{label:t.$t("Background Color")},{default:w(()=>[g("div",mze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.background_color,"onUpdate:modelValue":e[3]||(e[3]=S=>n.field.background_color=S)},null,8,["predefine","modelValue"]),y(m,{modelValue:n.field.background_color,"onUpdate:modelValue":e[4]||(e[4]=S=>n.field.background_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),y(b,{label:t.$t("Text Color")},{default:w(()=>[g("div",gze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.text_color,"onUpdate:modelValue":e[5]||(e[5]=S=>n.field.text_color=S)},null,8,["predefine","modelValue"]),y(m,{modelValue:n.field.text_color,"onUpdate:modelValue":e[6]||(e[6]=S=>n.field.text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),y(b,{label:t.$t("Button Label")},{default:w(()=>[g("div",vze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_text_color,"onUpdate:modelValue":e[7]||(e[7]=S=>n.field.button_text_color=S)},null,8,["predefine","modelValue"]),y(m,{modelValue:n.field.button_text_color,"onUpdate:modelValue":e[8]||(e[8]=S=>n.field.button_text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),y(b,{label:t.$t("Button Background")},{default:w(()=>[g("div",yze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_color,"onUpdate:modelValue":e[9]||(e[9]=S=>n.field.button_color=S),"show-alpha":""},null,8,["predefine","modelValue"]),y(m,{modelValue:n.field.button_color,"onUpdate:modelValue":e[10]||(e[10]=S=>n.field.button_color=S)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])}const _ze=ge(lze,[["render",bze]]),wze={name:"LockscreenMeta",components:{BgImageUpload:N2,LockscreenPaywallMeta:_ze},props:["lockscreen","space_id"],emits:["editField","updatePaywalls"],data(){return{loading:!1,editing:!1,editTab:"content",editingField:null,availablePaywalls:[]}},computed:{lockscreenFields(){return this.lockscreen},getFieldIcon(){return t=>{const e={image:"Picture",block:"Tickets",lesson:"Memo",paywall:"Money"};return t.name=="action"?"Iphone":e[t.type]}}},methods:{toggleHidden(t){t.hidden=!t.hidden,t.type=="paywall"&&!t.hidden&&this.updateField(t)},updateField(t){this.editing=!0,this.editingField=t;const e=t.type=="block"?t:null;this.$emit("editField",e)},backToFields(){this.editing=!1,this.editingField=null,this.$emit("editField",null)},moveUp(t){if(t==0)return;const e=this.lockscreen[t],n=this.lockscreen[t-1];this.lockscreen.splice(t-1,2,e,n)},moveDown(t){if(t==this.lockscreen.length-1)return;const e=this.lockscreen[t],n=this.lockscreen[t+1];this.lockscreen.splice(t,2,n,e)}}},xze={key:0,class:"fcom_lockscreen_meta"},kze={class:"fcom_meta_section lockscreen_meta"},Cze={class:"fcom_description"},Sze={class:"fcom_meta_section lockscreen_meta"},$ze={class:"fcom_meta_label"},Aze={class:"fcom_meta_content"},Eze={class:"fcom_meta_block"},Mze={class:"fcom_block_label"},Tze={class:"fcom_meta_sorting"},Pze={class:"fcom_block_action"},Ize={key:1,class:"fcom_lockscreen_meta"},Lze={class:"fcom_edit_title"},Oze={class:"fcom_edit_content"},Dze={class:"fcom_color_input_wrap"},Rze={class:"fcom_color_input_wrap"},Vze={class:"fcom_color_input_wrap"},Fze={class:"fcom_color_input_wrap"},Nze={class:"fcom_color_input_wrap"},Bze={key:1,class:"fcom_description"},zze={key:2,class:"fcom_description"};function Hze(t,e,n,s,i,o){const r=_e,a=W("Top"),l=W("Bottom"),c=W("EditPen"),u=W("Hide"),d=W("View"),h=W("Back"),f=_t,p=an,m=Zt,b=fn,_=i2,x=W("BgImageUpload"),k=Dd,C=s2,S=W("lockscreen-paywall-meta");return i.editing?(v(),A("div",Ize,[g("div",Lze,[y(r,{onClick:o.backToFields},{default:w(()=>[y(h)]),_:1},8,["onClick"]),g("p",null,$(t.$labelize(i.editingField.label)),1)]),g("div",Oze,[i.editingField.type=="image"?(v(),D(C,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=E=>i.editTab=E)},{default:w(()=>[y(_,{label:t.$t("Content"),name:"content"},{default:w(()=>[y(b,{onSubmit:e[5]||(e[5]=Be(E=>t.doNothing(),["prevent"])),model:i.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(p,{label:t.$t("Heading")},{default:w(()=>[y(f,{modelValue:i.editingField.heading,"onUpdate:modelValue":e[0]||(e[0]=E=>i.editingField.heading=E),placeholder:t.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,{label:t.$t("Description")},{default:w(()=>[y(f,{modelValue:i.editingField.description,"onUpdate:modelValue":e[1]||(e[1]=E=>i.editingField.description=E),type:"textarea",placeholder:t.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,{label:t.$t("Button Label")},{default:w(()=>[y(f,{modelValue:i.editingField.button_text,"onUpdate:modelValue":e[2]||(e[2]=E=>i.editingField.button_text=E),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,{label:t.$t("Button Link")},{default:w(()=>[y(f,{modelValue:i.editingField.button_link,"onUpdate:modelValue":e[3]||(e[3]=E=>i.editingField.button_link=E)},null,8,["modelValue"])]),_:1},8,["label"]),i.editingField.type=="image"?(v(),D(p,{key:0},{default:w(()=>[y(m,{modelValue:i.editingField.new_tab,"onUpdate:modelValue":e[4]||(e[4]=E=>i.editingField.new_tab=E),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Open in New Tab")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1},8,["model"])]),_:1},8,["label"]),y(_,{label:t.$t("Design"),name:"design"},{default:w(()=>[y(b,{onSubmit:e[17]||(e[17]=Be(E=>t.doNothing(),["prevent"])),model:i.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[y(x,{modelValue:i.editingField.background_image,"onUpdate:modelValue":e[6]||(e[6]=E=>i.editingField.background_image=E),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),y(p,{label:t.$t("Overlay Color")},{default:w(()=>[g("div",Dze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[7]||(e[7]=E=>i.editingField.overlay_color=E)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[8]||(e[8]=E=>i.editingField.overlay_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Heading Color")},{default:w(()=>[g("div",Rze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[9]||(e[9]=E=>i.editingField.heading_color=E)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[10]||(e[10]=E=>i.editingField.heading_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Text Color")},{default:w(()=>[g("div",Vze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.text_color,"onUpdate:modelValue":e[11]||(e[11]=E=>i.editingField.text_color=E)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.text_color,"onUpdate:modelValue":e[12]||(e[12]=E=>i.editingField.text_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Button Label")},{default:w(()=>[g("div",Fze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[13]||(e[13]=E=>i.editingField.button_text_color=E)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[14]||(e[14]=E=>i.editingField.button_text_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Button Background")},{default:w(()=>[g("div",Nze,[y(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_color,"onUpdate:modelValue":e[15]||(e[15]=E=>i.editingField.button_color=E),"show-alpha":""},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.button_color,"onUpdate:modelValue":e[16]||(e[16]=E=>i.editingField.button_color=E)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):i.editingField.type=="block"?(v(),A("div",Bze,$(t.$t("Edit the field from block editor ")),1)):i.editingField.type=="lesson"?(v(),A("div",zze,$(t.$t("Edit lessons from lesson editor ")),1)):i.editingField.type=="paywall"?(v(),D(S,{key:3,field:i.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),A("div",xze,[g("div",kze,[g("div",Cze,[g("p",null,$(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",Sze,[g("div",$ze,$(t.$t("Page Blocks")),1),g("div",Aze,[g("ul",Eze,[(v(!0),A(te,null,we(o.lockscreenFields,(E,P)=>(v(),A("li",{class:U(["fcom_block_list",{block_hidden:E.hidden}])},[g("div",Mze,[y(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(kt(o.getFieldIcon(E))))]),_:2},1024),g("p",null,$(t.$labelize(E.label)),1)]),g("div",Tze,[y(r,{onClick:T=>o.moveUp(P)},{default:w(()=>[y(a)]),_:1},8,["onClick"]),y(r,{onClick:T=>o.moveDown(P)},{default:w(()=>[y(l)]),_:1},8,["onClick"])]),g("div",Pze,[y(r,{onClick:T=>o.updateField(E)},{default:w(()=>[y(c)]),_:1},8,["onClick"]),E.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(E)},{default:w(()=>[y(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(E)},{default:w(()=>[y(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const Uze=ge(wze,[["render",Hze]]),jze={name:"BlockEditor",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1}},data(){return{loading:!0,has_error:!1,all_loaded:!1,html:this.modelValue}},methods:{attach(){const t=this.$refs.block_editor;this.loading=!1,this.all_loaded=!0,window.wp.attachEditor(t,{iso:{toolbar:{undo:!0,navigation:!0,documentInspector:null},blocks:{allowBlocks:["core/button","core/buttons","core/code","core/column","core/columns","core/embed","core/group","core/heading","core/image","core/list","core/list-item","core/missing","core/paragraph","core/preformatted","core/pullquote","core/quote","core/separator","core/spacer","core/table","core/verse","core/html"]},__experimentalOnChange:function(e){console.log(e)},sidebar:{inserter:!1,inspector:!0}},editor:{__experimentalOnChange:function(e){console.log(e)},__experimentalOnInput(e){console.log(e)},__experimentalOnSelection(e){console.log(e)},onSaveContent:function(e){console.log(e)}}}),t.addEventListener("change",e=>{this.html=e.target.value,this.$emit("update:modelValue",e.target.value)})},loadScript(t){return new Promise((e,n)=>{const s=document.createElement("script");s.src=t,s.onload=e,s.onerror=n,document.head.append(s)})},async loadScripts(){const t=this.appVars.block_editor_assets.scripts;for(const e in t)try{await this.loadScript(t[e]),console.log(`${e} JS loaded`)}catch(n){this.has_error=!0,console.error(`Failed to load js ${e}:`,n)}this.attach()},loadCSSFile(t){return new Promise((e,n)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.onload=e,s.onerror=n,document.head.append(s)})},async loadCSSFiles(){const e=this.appVars.block_editor_assets.styles.map(this.loadCSSFile);try{await Promise.all(e),console.log("All CSS files loaded")}catch(n){console.error("Failed to load some CSS files:",n)}}},mounted(){window.fl_block_editor_loaded?this.attach():(this.loadCSSFiles(),this.loadScripts(),window.fl_block_editor_loaded=!0)},beforeUnmount(){window.wp.detachEditor(this.$refs.block_editor)}},Wze={class:"fcom_block_editor"};function Yze(t,e,n,s,i,o){const r=Jt;return v(),A("div",Wze,[Oe(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"}," "+$(i.html)+`
132 `,513)],512),[[jt,i.all_loaded]]),i.all_loaded?O("",!0):(v(),D(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const QH=ge(jze,[["render",Yze]]),qze={name:"FullEditorFrame",emits:["update:modelValue","titleUpdated","featuredMediaUpdated","metaUpdated","manageDocuments","useAlternateEditor"],props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""},featured_image_id:{type:[String,Number],default:""},metaSettings:{type:Object,default:()=>null}},data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,lastUpdate:"No updates yet",dataSent:!1,isFailing:!1}},computed:{notLoading(){return!this.dataSent&&this.isFailing}},mounted(){setTimeout(()=>{this.isFailing=!0},1e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.editorData.featured_image_id=this.featured_image_id,this.metaSettings&&(this.editorData.metaSettings=this.metaSettings),this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){window.removeEventListener("message",this.handleEditorMessage),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{createEditorIframe(){const t=new URL(this.editorPath,window.location.origin);this.editorOrigin=t.origin,this.editorFrame=document.createElement("iframe");let e=this.appVars.wp_lesson_editor_frame;if(this.editorParams){const n=new URLSearchParams(this.editorParams);e+="&"+n.toString()}this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.$refs.iframeContainer.appendChild(this.editorFrame)},editorFailed(){this.$emit("useAlternateEditor")},sendDataToEditor(){if(this.editorFrame&&this.editorFrame.contentWindow){const t=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({type:"UPDATE_EDITOR",data:t},"*"),this.dataSent=!0}else alert("Editor frame is not loaded or contentWindow is not accessible.")},syncMetaToEditor(t){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({type:"SYNC_META",data:JSON.parse(JSON.stringify(t))},"*")},handleEditorMessage(t){const{action:e,content:n}=t.data;e==="EDITOR_UPDATED"?this.dataSent&&(this.editorData.content=n,this.$emit("update:modelValue",n)):e==="TITLE_UPDATED"?(this.editorData.title=n,this.$emit("titleUpdated",n)):e==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",n):e==="META_UPDATED"?this.$emit("metaUpdated",n):e==="MANAGE_DOCUMENTS"?this.$emit("manageDocuments"):e==="EDITOR_READY"&&(console.log("EDITOR_READY"),this.sendDataToEditor())}}},Gze={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},Xze=["element-loading-text"],Kze={ref:"iframeContainer",class:"iframe-container"};function Zze(t,e,n,s,i,o){const r=Ge,a=Jt,l=xt("loading");return v(),A(te,null,[o.notLoading?(v(),A("div",Gze,[e[2]||(e[2]=g("p",null,"Problem with loading the editor?",-1)),y(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[...e[1]||(e[1]=[Y("Use Alternative Editor",-1)])]),_:1})])):O("",!0),Oe((v(),A("div",{"element-loading-text":t.$t("Loading editor. Please wait...."),class:"editor-container"},[i.dataSent?O("",!0):(v(),D(a,{key:0,style:{margin:"50px"},animated:!0,rows:2})),g("div",Kze,null,512)],8,Xze)),[[l,!i.dataSent]])],64)}const eU=ge(qze,[["render",Zze],["__scopeId","data-v-03a63740"]]),Jze={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},Qze=["fill"];function eHe(t,e,n,s,i,o){return v(),A("svg",{fill:n.fill,width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...e[0]||(e[0]=[g("path",{d:"M10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5Z",fill:"none",stroke:"currentColor"},null,-1)])],8,Qze)}const tHe=ge(Jze,[["render",eHe]]),nHe={name:"LessonIcon"},sHe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function iHe(t,e,n,s,i,o){return v(),A("svg",sHe,[...e[0]||(e[0]=[g("rect",{width:"60",height:"48",rx:"4",fill:"#F2F5F8"},null,-1),g("path",{d:"M30 16.5L21 21.75L30 27L37.5 22.625V28.125H39V21.75L30 16.5ZM23.9993 25.1179V28.5001C25.3676 30.3217 27.5461 31.5001 29.9998 31.5001C32.4535 31.5001 34.6321 30.3217 36.0004 28.5001L36.0001 25.1185L30.0002 28.6184L23.9993 25.1179Z",fill:"#525866"},null,-1)])])}const oHe=ge(nHe,[["render",iHe]]),rHe={name:"PlayIcon"},aHe={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lHe(t,e,n,s,i,o){return v(),A("svg",aHe,[...e[0]||(e[0]=[Pa('<g filter="url(#filter0_d_6543_69201)"><path d="M10 16.5C5.85775 16.5 2.5 13.1422 2.5 9C2.5 4.85775 5.85775 1.5 10 1.5C14.1422 1.5 17.5 4.85775 17.5 9C17.5 13.1422 14.1422 16.5 10 16.5ZM8.9665 6.31125C8.92136 6.28113 8.8689 6.26383 8.8147 6.26117C8.76051 6.25851 8.7066 6.27059 8.65873 6.29615C8.61086 6.3217 8.57082 6.35975 8.54287 6.40626C8.51492 6.45277 8.5001 6.50599 8.5 6.56025V11.4398C8.5001 11.494 8.51492 11.5472 8.54287 11.5937C8.57082 11.6402 8.61086 11.6783 8.65873 11.7039C8.7066 11.7294 8.76051 11.7415 8.8147 11.7388C8.8689 11.7362 8.92136 11.7189 8.9665 11.6888L12.6258 9.24975C12.6669 9.22236 12.7006 9.18524 12.724 9.14166C12.7473 9.09809 12.7595 9.04943 12.7595 9C12.7595 8.95057 12.7473 8.90191 12.724 8.85834C12.7006 8.81476 12.6669 8.77764 12.6258 8.75025L8.96575 6.31125H8.9665Z" fill="white"></path></g><defs><filter id="filter0_d_6543_69201" x="0.5" y="0.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6543_69201"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6543_69201" result="shape"></feBlend></filter></defs>',2)])])}const cHe=ge(rHe,[["render",lHe]]),uHe={name:"PlayPlaceholderIcon"},dHe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hHe(t,e,n,s,i,o){return v(),A("svg",dHe,[...e[0]||(e[0]=[Pa('<rect width="60" height="48" rx="4" fill="#F2F5F8"></rect><g clip-path="url(#clip0_6463_70077)"><g filter="url(#filter0_d_6463_70077)"><path d="M30 31.5C25.8578 31.5 22.5 28.1423 22.5 24C22.5 19.8578 25.8578 16.5 30 16.5C34.1423 16.5 37.5 19.8578 37.5 24C37.5 28.1423 34.1423 31.5 30 31.5ZM28.9665 21.3112C28.9214 21.2811 28.8689 21.2638 28.8147 21.2612C28.7605 21.2585 28.7066 21.2706 28.6587 21.2961C28.6109 21.3217 28.5708 21.3598 28.5429 21.4063C28.5149 21.4528 28.5001 21.506 28.5 21.5602V26.4398C28.5001 26.494 28.5149 26.5472 28.5429 26.5937C28.5708 26.6402 28.6109 26.6783 28.6587 26.7039C28.7066 26.7294 28.7605 26.7415 28.8147 26.7388C28.8689 26.7362 28.9214 26.7189 28.9665 26.6888L32.6258 24.2498C32.6669 24.2224 32.7006 24.1852 32.724 24.1417C32.7473 24.0981 32.7595 24.0494 32.7595 24C32.7595 23.9506 32.7473 23.9019 32.724 23.8583C32.7006 23.8148 32.6669 23.7776 32.6258 23.7502L28.9658 21.3112H28.9665Z" fill="#525866"></path></g></g><defs><filter id="filter0_d_6463_70077" x="20.5" y="15.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6463_70077"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6463_70077" result="shape"></feBlend></filter><clipPath id="clip0_6463_70077"><rect width="20" height="20" fill="white" transform="translate(20 14)"></rect></clipPath></defs>',3)])])}const fHe=ge(uHe,[["render",hHe]]),pHe={name:"_LockscreenLessonEditor",components:{CircleIcon:tHe,LessonIcon:oHe,PlayIcon:cHe,PlayPlaceholderIcon:fHe},props:{sections:{type:Array,required:!0},is_editor:{type:Boolean,default:!1},settings:{type:Object,required:!1}},computed:{lessonsCount(){return this.sections.reduce((t,e)=>t+e.lessons.length,0)},sectionsCount(){return this.sections.reduce((t,e)=>t+(e.lessons.length?1:0),0)},lessonDuration(){return t=>{const e=t.lessons.reduce((n,s)=>n+(s.meta.video_length||0),0);return this.formatSeconds(e)||null}}},methods:{isEnabledMedia(t){var e;return((e=t.meta)==null?void 0:e.enable_media)=="yes"},hasMediaVideo(t){var n;const e=(n=t.meta)==null?void 0:n.media;return this.isEnabledMedia(t)&&(e==null?void 0:e.content_type)=="video"&&(e==null?void 0:e.html)},showPlayIcon(t){return this.hasMediaVideo(t)&&(this.hasMediaImage(t)||t.featured_image)},hasMediaImage(t){var e,n;return this.isEnabledMedia(t)&&((n=(e=t.meta)==null?void 0:e.media)==null?void 0:n.image)},isModernLayout(){var t;return this.has_pro&&((t=this.settings)==null?void 0:t.course_layout)==="modern"},isFreePreview(t){var e;return this.has_pro&&((e=t==null?void 0:t.meta)==null?void 0:e.free_preview_lesson)=="yes"},maybeGotoLesson(t,e){if(!this.is_editor){if(this.isFreePreview(t)){this.gotoLesson(t);return}e.is_locked&&e.unlock_date&&this.$notify.info({message:this.$t("This lesson will be unlocked on %s",e.unlock_date),type:"info"})}},gotoLesson(t){this.$router.push({name:"view_lesson",params:{lesson_slug:t.slug}}),setTimeout(()=>{window.location.reload()},100)},formatSeconds(t){if(t<1)return null;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),s=t%60,i="";return e>0&&(i+=`${e}h `),n>0&&(i+=`${n}m `),s>0&&(i+=`${s}s`),i.trim()||null}}},mHe={class:"fcom_course_sections"},gHe={class:"fcom_course_intro"},vHe={class:"fcom_course_labels"},yHe={class:"fcom_course_info"},bHe={class:"fcom_card_sections"},_He={class:"fcom_section_items"},wHe=["onClick"],xHe={class:"fcom_section_primary_item_title"},kHe={class:"title_line_container"},CHe={class:"title_line"},SHe={class:"fcom_meta_text"},$He={key:0,class:"fcom_meta_text"},AHe={class:"fcom_section_primary_item_actions"},EHe=["onClick"],MHe={class:"fcom_heading_item clickable"},THe={class:"lesson_feature_media"},PHe=["src","alt"],IHe=["src","alt"],LHe={class:"lesson_title"},OHe=["innerHTML"],DHe={class:"lesson_duration"},RHe={key:0},VHe={key:1},FHe=["innerHTML"];function NHe(t,e,n,s,i,o){const r=W("ArrowRight"),a=W("ArrowDown"),l=_e,c=W("CircleIcon"),u=W("Lock"),d=W("PlayPlaceholderIcon"),h=W("LessonIcon"),f=W("PlayIcon");return v(),A("div",mHe,[g("div",gHe,[g("div",vHe,[g("h3",null,$(t.$t("Course Content")),1),g("p",yHe,[Y($(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),e[0]||(e[0]=g("span",null," • ",-1)),Y(" "+$(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",bHe,[g("div",_He,[(v(!0),A(te,null,we(n.sections,p=>(v(),A("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),A("div",{key:0,onClick:m=>p.is_closed=!p.is_closed,class:U(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",xHe,[g("div",kHe,[g("div",CHe,[g("h4",null,$(p.title),1)]),g("span",SHe,$(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),A("span",$He," • "+$(o.lessonDuration(p)),1)):O("",!0)])]),g("div",AHe,[y(l,{class:"clickable"},{default:w(()=>[p.is_closed?(v(),D(r,{key:0,class:"fcom_arrow_icon"})):(v(),D(a,{key:1}))]),_:2},1024)])],10,wHe)):O("",!0),p.is_closed?O("",!0):(v(!0),A(te,{key:1},we(p.lessons,m=>(v(),A("div",{key:m.id,class:U(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:b=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",MHe,[y(l,null,{default:w(()=>[o.isFreePreview(m)?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),A(te,{key:0},[g("span",THe,[m.featured_image?(v(),A("img",{key:0,src:m.featured_image,alt:m.title},null,8,PHe)):o.hasMediaImage(m)?(v(),A("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,IHe)):o.hasMediaVideo(m)?(v(),D(d,{key:2})):(v(),D(h,{key:3})),o.showPlayIcon(m)?(v(),D(f,{key:4,class:"play_icon"})):O("",!0)]),g("span",LHe,[g("span",{innerHTML:m.title},null,8,OHe),g("span",DHe,[m.meta.video_length?(v(),A("span",RHe,$(o.formatSeconds(m.meta.video_length)),1)):(v(),A("span",VHe,$("---")))])])],64)):(v(),A("span",{key:1,innerHTML:m.title},null,8,FHe))])],8,EHe)],2))),128))]))),128))])])])}const BHe=ge(pHe,[["render",NHe]]),zHe={name:"LockscreenPaywallView",components:{ImagePlaceholder:wS},props:{space_id:{type:[String,Number],required:!0},field:{type:Object,required:!0},editable:{type:Boolean,default:!1}},data(){return{loading:!1,availablePaywalls:[]}},computed:{buttonStyles(){return{backgroundColor:this.field.button_color,borderColor:this.field.button_color,color:this.field.button_text_color}},cardStyles(){return{backgroundColor:this.field.background_color||"transparent",color:this.field.text_color||"var(--fcom-primary-text, #2B2E33)"}},filteredPaywalls(){return!Array.isArray(this.field.paywalls)||!Array.isArray(this.availablePaywalls)?[]:this.field.paywalls.map(t=>{for(const e of this.availablePaywalls)if(Array.isArray(e.variants)){const n=e.variants.find(s=>String(s.id)===String(t));if(n)return{...n,description:e.post_excerpt}}return null}).filter(Boolean)}},methods:{isSubscriptionPaywall(t){var e;return((e=t.other_info)==null?void 0:e.payment_type)=="subscription"},getRepeatInterval(t){var s;const e=(s=t.other_info)==null?void 0:s.repeat_interval;return e&&{daily:this.$t("day"),weekly:this.$t("week"),monthly:this.$t("month"),quarterly:this.$t("quarter"),half_yearly:this.$t("half year"),yearly:this.$t("year")}[e]||""},fetchAvailablePaywalls(){if(!this.space_id){this.availablePaywalls=[];return}const t={space_id:this.space_id};this.editable||(t.paywall_ids=this.field.paywalls),this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",t).then(e=>{this.availablePaywalls=e.paywalls||[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.hasFeature("has_fluentcart")&&this.fetchAvailablePaywalls()}},HHe={class:"fcom_paywall_cards"},UHe={class:"paywall_header"},jHe={class:"paywall_body"},WHe=["innerHTML"],YHe={key:0,class:"subscription"},qHe={class:"paywall_footer"},GHe={key:0,class:"fcom_mb_10"},XHe=["href"];function KHe(t,e,n,s,i,o){const r=Jt,a=e5,l=W("ImagePlaceholder");return v(),A("div",HHe,[i.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),A(te,{key:1},we(o.filteredPaywalls,c=>(v(),A("div",{key:c.id,class:"fcom_paywall",style:qe(o.cardStyles)},[g("div",UHe,[c.photo?(v(),D(a,{key:0,src:c.photo},null,8,["src"])):(v(),D(a,{key:1},{default:w(()=>[y(l)]),_:1})),g("span",null,$(c.variation_title),1)]),g("div",jHe,[g("span",{innerHTML:c.total_price},null,8,WHe),o.isSubscriptionPaywall(c)?(v(),A("span",YHe," / "+$(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",qHe,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),A("span",GHe,$(c.description),1)):O("",!0),n.editable?Oe((v(),A("input",{key:1,class:"el-button fcom_primary_button link_button",style:qe(o.buttonStyles),type:"text","onUpdate:modelValue":e[0]||(e[0]=u=>n.field.button_text=u)},null,4)),[[wf,n.field.button_text]]):(v(),A("a",{key:2,class:"el-button fcom_primary_button link_button",style:qe(o.buttonStyles),href:c.checkout_url},$(n.field.button_text),13,XHe))])],4))),128))])}const ZHe=ge(zHe,[["render",KHe]]),JHe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:BHe,MediaEmbeder:V2,BlockEditor:QH,LockscreenMeta:Uze,LockscreenPaywallView:ZHe,FullEditorFrame:eU},data(){return{editingField:null,useClassic:!1}},computed:{lockscreenFields(){return this.lockscreen.filter(t=>!t.hidden)},imageStyles(){return t=>({backgroundImage:`url(${t.background_image})`,backgroundColor:t.overlay_color})},headingStyles(){return t=>({color:t.heading_color})},descriptionStyles(){return t=>({color:t.text_color})},buttonStyles(){return t=>({backgroundColor:t.button_color,color:t.button_text_color})}},methods:{updateHeading(t,e){e.heading=t.target.innerText},updateDescription(t,e){e.description=t.target.innerText},updateButtonLabel(t,e){e.button_text=t.target.innerText},visibleBlock(t){this.editingField=t},updateEditField(t){this.editingField=t,(t==null?void 0:t.type)==="block"&&setTimeout(()=>{const e=document.getElementById("fcomBlockContent");e&&e.scrollIntoView({behavior:"smooth"})},300)},saveChanges(){this.editingField=null,this.$emit("save")},switchToClassic(){this.useClassic=!0}}},QHe={class:"fcom_editor_topbar"},eUe={class:"fcom_editor_content"},tUe={class:"fcom_item"},nUe={class:"fcom_content"},sUe=["onBlur"],iUe=["onBlur"],oUe=["onBlur"],rUe={key:1,class:"fcom_content_wrap"},aUe={id:"fcomBlockContent"},lUe={key:2,class:"fcom_content_wrap"},cUe={key:3,class:"fcom_paywall_wrap"};function uUe(t,e,n,s,i,o){const r=W("lockscreen-meta"),a=z1,l=W("Lock"),c=_e,u=W("block-editor"),d=W("FullEditorFrame"),h=W("lockscreen-lesson-editor"),f=Jt,p=W("lockscreen-paywall-view"),m=Ei,b=Ia;return v(),A(te,null,[y(a,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:w(()=>[le(t.$slots,"before_meta"),y(r,{lockscreen:n.lockscreen,space_id:n.space_id,onEditField:o.updateEditField},null,8,["lockscreen","space_id","onEditField"])]),_:3}),y(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(m,null,{default:w(()=>[g("div",QHe,[y(c,null,{default:w(()=>[y(l)]),_:1}),g("h3",null,$(n.title),1)]),g("div",eUe,[(v(!0),A(te,null,we(o.lockscreenFields,_=>{var x;return v(),A("div",tUe,[_.type=="image"?(v(),A("div",{key:0,class:"fcom_image_wrap",style:qe(o.imageStyles(_))},[g("div",nUe,[g("h2",{style:qe(o.headingStyles(_)),contenteditable:"true",onBlur:k=>o.updateHeading(k,_)},$(_.heading),45,sUe),_.description?(v(),A("p",{key:0,style:qe(o.descriptionStyles(_)),contenteditable:"true",onBlur:k=>o.updateDescription(k,_)},$(_.description),45,iUe)):O("",!0),_.button_text?(v(),A("button",{key:1,class:"fcom_btn",style:qe(o.buttonStyles(_)),contenteditable:"true",onBlur:k=>o.updateButtonLabel(k,_)},$(_.button_text),45,oUe)):O("",!0)])],4)):O("",!0),_.type=="block"?(v(),A("div",rUe,[g("div",aUe,[i.useClassic?(v(),D(u,{key:0,modelValue:_.content,"onUpdate:modelValue":k=>_.content=k},null,8,["modelValue","onUpdate:modelValue"])):(v(),D(d,{key:1,ref_for:!0,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"lockscreen",space_id:n.space_id},frameHeight:"calc(100vh - 160px)",documentTitle:"",modelValue:_.content,"onUpdate:modelValue":k=>_.content=k},null,8,["onUseAlternateEditor","editorParams","modelValue","onUpdate:modelValue"]))])])):O("",!0),_.type=="lesson"?(v(),A("div",lUe,[n.loading?(v(),D(f,{key:1,rows:5,animated:!0})):(v(),D(h,{key:0,sections:n.sections,is_editor:!0,settings:n.settings},null,8,["sections","settings"]))])):O("",!0),_.type=="paywall"&&((x=_.paywalls)==null?void 0:x.length)>0?(v(),A("div",cUe,[y(p,{space_id:n.space_id,field:_,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const tU=ge(JHe,[["render",uUe]]),dUe={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:tU},data(){return{saving:!1,loading:!1,sections:[],lockscreen:null}},watch:{savingCount(){this.saveChanges(!0)}},methods:{getSections(){this.loading=!0,this.$get("admin/courses/"+this.spaceProfile.id+"/sections",{conditions:["only_published"],with_lock_screen:!0}).then(t=>{this.sections=t.sections,this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveChanges(t=!1){this.lockscreen&&(this.saving=!0,this.$put("admin/courses/"+this.spaceProfile.id+"/lockscreens",{lockscreen:this.lockscreen}).then(e=>{this.$notify.success(e.message),t&&this.$emit("close")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSections()}},hUe={key:0,class:"fcom_lockscreen_meta"},fUe={class:"fcom_description"};function pUe(t,e,n,s,i,o){const r=W("lock-screen-editor");return i.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:i.lockscreen,sections:i.sections,saving:i.saving,loading:i.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=a=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",hUe,[g("div",fUe,[g("p",null,$(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","sections","saving","loading","onSave"])):O("",!0)}const mUe=ge(dUe,[["render",pUe]]),gUe={name:"FluentDnD",props:{items:{type:Array,required:!0},itemClass:{type:String},itemStyle:{type:String},rowKey:{type:String,default:"id"},group:{type:String,default:""},gap:{type:String,default:""},draggable:{type:Boolean,default:!0}},emits:["drop","crossDrop","drag-start"],data(){return{draggingIndex:null,startIndex:null,snapshotBeforeDrag:null}},methods:{dragStart(t,e){t._fluentDndHandled||(t._fluentDndHandled=!0,this.draggingIndex=e,this.startIndex=e,this.snapshotBeforeDrag=[...this.items],this.$emit("drag-start",{index:e,items:this.items}),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",this.items[e][this.rowKey]),this.group&&t.dataTransfer.setData("source-group",this.group))},dragEnd(){this.snapshotBeforeDrag&&(this.items.splice(0,this.items.length,...this.snapshotBeforeDrag),this.snapshotBeforeDrag=null),this.draggingIndex=null},dragOver(t,e){if(t.preventDefault(),!this.group&&t.dataTransfer.types.includes("source-group")||this.draggingIndex===null)return;const n=this.items[this.draggingIndex],s=this.items[e];if(n===s)return;const i=t.currentTarget.getBoundingClientRect(),o=i.top+i.height/2,r=t.clientY;(this.draggingIndex<e&&r>o||this.draggingIndex>e&&r<o)&&(this.reorderItems(this.draggingIndex,e),this.draggingIndex=e)},dropEnd(t,e){const n=t.dataTransfer.getData("source-group");if(!(!this.group&&n)){if(this.group&&n&&n!==this.group){t.stopPropagation();const s=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:s,sourceGroup:n,targetGroup:this.group,targetIndex:e});return}this.startIndex===null||this.startIndex===e||(t.stopPropagation(),this.snapshotBeforeDrag=null,this.draggingIndex=null,this.startIndex=null,this.$emit("drop",{index:e,newItems:this.items}))}},onContainerDragOver(t){t.preventDefault()},onContainerDrop(t){if(!this.group)return;const e=t.dataTransfer.getData("source-group");if(!e||e===this.group)return;const n=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:n,sourceGroup:e,targetGroup:this.group,targetIndex:this.items.length})},reorderItems(t,e){const n=this.items.splice(t,1)[0];this.items.splice(e,0,n)}}},vUe=["onDragstart","onDragover","onDrop","draggable"];function yUe(t,e,n,s,i,o){return v(),A("div",{class:"drag-container",onDragover:e[1]||(e[1]=Be((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[2]||(e[2]=Be((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[y(S_,{name:"flip-list",tag:"div",class:"drag-group",style:qe(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:w(()=>[(v(!0),A(te,null,we(n.items,(r,a)=>(v(),A("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Be(l=>o.dragOver(l,a),["prevent"]),onDrop:Be(l=>o.dropEnd(l,a),["prevent"]),draggable:n.draggable,class:U(["drag-item",n.itemClass,{dragging:i.draggingIndex===a}]),style:qe(n.itemStyle)},[le(t.$slots,"item",{data:r,index:a},void 0,!0)],46,vUe))),128))]),_:3},8,["style"])],32)}const pv=ge(gUe,[["render",yUe],["__scopeId","data-v-97dc50e4"]]),bUe={name:"MenuGroupSettings",components:{SpaceCourseSelector:vS,FluentDnD:pv,LogoEmojiSelector:G1,Drawer:fp},data(){return{editingItem:null,originalItem:null,openEditLinkDrawer:!1,isDragging:!1,isSpaceDragging:!1,draggingIndex:null,draggedSpaceIndex:null,mode:null,urlErrors:[],validationAttempt:0}},computed:{isDirty(){return!this.editingItem||!this.originalItem?!1:JSON.stringify(this.editingItem)!==JSON.stringify(this.originalItem)}},emits:["save"],props:{menuItems:{type:Array,required:!0},saving:{type:Boolean,default:!1},title:{type:String,required:!0},has_svg:{type:Boolean,default:!0},use_icon_selector:{type:Boolean,default:!1},has_enable_disable:{type:Boolean,default:!0},custom_svg:{type:Boolean,default:!1}},methods:{validateLinkForm(){if(this.urlErrors=[],this.validationAttempt++,(!this.editingItem.title||!this.editingItem.title.trim())&&this.urlErrors.push(this.$t("Link title cannot be empty.")),this.editingItem.is_system!=="yes"){const t=K1(this.editingItem.permalink);t.valid||this.urlErrors.push(...t.errors)}return this.urlErrors.length===0},initEditLink(t,e="create"){!t.is_system&&!t.privacy&&(t.privacy="public",t.membership_ids=[]),this.mode=e,this.urlErrors=[],this.originalItem=t,this.editingItem=JSON.parse(JSON.stringify(t||{})),this.$nextTick(()=>{this.openEditLinkDrawer=!0})},removeLink(t){this.$confirm(this.$t("Are you sure you want to remove this link?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuItems.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Link deleted successfully.")})})},createOrUpdateLink(){if(!this.saving&&this.validateLinkForm()){if(!this.editingItem.slug)this.editingItem.slug="fcom_custom_"+this.editingItem.title.toLowerCase().replace(/[^a-z0-9]/g,"_"),this.menuItems.push(this.editingItem);else{const t=this.menuItems.findIndex(e=>e.slug===this.editingItem.slug);t!==-1?Object.assign(this.menuItems[t],this.editingItem):this.menuItems.push(this.editingItem)}this.openEditLinkDrawer=!1,this.editingItem=null,this.saveMenuItems()}},saveMenuItems({customSuccessMessage:t=null}={}){this.$emit("save",{customSuccessMessage:t})},drop({index:t}){this.draggingIndex=null,this.saveMenuItems()},beforeCloseDrawer(t){if(this.saving){this.$notify.info(this.$t("Please wait to complete."));return}this.editingItem=null,this.originalItem=null,this.mode=null,t()}}},_Ue={key:0,class:"fcom_section_primary"},wUe={class:"fcom_section_primary_item"},xUe={class:"fcom_section_primary_item_title"},kUe={class:"fcom_heading_item"},CUe={class:"fcom_section_item_actions"},SUe={class:"fcom_section_items menu-items-container"},$Ue={key:0,style:{padding:"1rem"}},AUe={class:"fcom_section_item_title"},EUe={class:"fcom_heading_item"},MUe={key:0,class:"community_avatar"},TUe=["src"],PUe={key:1,class:"fcom_emoji"},IUe={key:2,class:"fcom_shape"},LUe=["innerHTML"],OUe={class:"fcom_section_item_actions"},DUe={key:0},RUe={key:1},VUe={key:0},FUe={class:"fcom_help_text"},NUe={class:"fcom_help_text"};function BUe(t,e,n,s,i,o){const r=Ge,a=_e,l=Bo,c=W("FluentDnD"),u=W("logo-emoji-selector"),d=_t,h=an,f=Zt,p=zo,m=Ws,b=W("SpaceCourseSelector"),_=Yc,x=fn,k=W("drawer");return v(),A(te,null,[n.menuItems?(v(),A("div",_Ue,[g("div",wUe,[g("div",xUe,[g("div",kUe,[le(t.$slots,"title",{},()=>[g("h4",null,$(n.title),1)])])]),g("div",CUe,[y(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[Y($(t.$t("Add New Link")),1)]),_:1})])]),g("div",SUe,[n.menuItems.length?O("",!0):(v(),A("div",$Ue,[g("p",null,$(t.$t("No link has been added for this section")),1)])),y(c,{items:n.menuItems,"row-key":"slug",onDrop:o.drop,"item-class":"fcom_section_item"+(n.saving?"":" fcom_cursor_move"),"item-style":"padding: 15px 15px 15px 35px"},{item:w(({data:C,index:S})=>[g("div",AUe,[g("p",EUe,[n.use_icon_selector?(v(),A(te,{key:0},[e[12]||(e[12]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),C.icon_image?(v(),A("div",MUe,[y(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:C.icon_image},null,8,TUe)]),_:2},1024)])):C.emoji?(v(),A("span",PUe,$(C.emoji),1)):C.shape_svg?(v(),A("span",IUe,[y(a,{innerHTML:C.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):C.icon_svg?(v(),D(a,{key:1},{default:w(()=>[g("span",{innerHTML:C.icon_svg},null,8,LUe)]),_:2},1024)):O("",!0),g("span",null,$(C.title),1),C.is_unavailable=="yes"?(v(),D(l,{key:2,type:"danger"},{default:w(()=>[Y($(t.$t("unavailable")),1)]),_:1})):C.enabled=="yes"?(v(),D(l,{key:3,type:"success"},{default:w(()=>[Y($(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:4,type:"info"},{default:w(()=>[Y($(t.$t("disabled")),1)]),_:1}))])]),g("div",OUe,[g("div",null,[y(r,{onClick:E=>o.initEditLink(C,"edit"),size:"small"},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),C.is_system!="yes"?(v(),D(r,{key:0,onClick:E=>o.removeLink(S),type:"danger",plain:"",size:"small"},{default:w(()=>[Y($(t.$t("Delete")),1)]),_:1},8,["onClick"])):O("",!0)])])]),_:1},8,["items","onDrop","item-class"])])])):O("",!0),y(k,{modelValue:i.openEditLinkDrawer,"onUpdate:modelValue":e[11]||(e[11]=C=>i.openEditLinkDrawer=C),size:t.drawerWidth,"before-close":o.beforeCloseDrawer,id:"fluent_comminity_body","close-on-click-modal":!0,"has-close-confirmation":o.isDirty&&!n.saving,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{header:w(()=>[i.mode==="edit"?(v(),A("h4",DUe,$(t.$t("Edit Link")),1)):(v(),A("h4",RUe,$(t.$t("Add Custom Link")),1))]),default:w(()=>[i.editingItem?(v(),A("div",VUe,[y(x,{onSubmit:e[10]||(e[10]=Be(C=>t.doNothing(),["prevent"])),"label-position":"top",disabled:n.saving},{default:w(()=>[y(h,{label:t.$t("Name of the Link")},{default:w(()=>[y(d,{disabled:n.saving,placeholder:t.$t("Public Name of the item"),modelValue:i.editingItem.title,"onUpdate:modelValue":e[2]||(e[2]=C=>i.editingItem.title=C)},ks({_:2},[n.use_icon_selector?{name:"prepend",fn:w(()=>[y(u,{custom_svg:n.custom_svg,fallback_mark:"<span style='font-size: 20px;'>☺</span>",onUpdate:e[1]||(e[1]=C=>{n.saving||(i.editingItem.emoji=C.emoji,i.editingItem.icon_image=C.logo,i.editingItem.shape_svg=C.shape_svg)}),config:{logo:i.editingItem.icon_image,emoji:i.editingItem.emoji||"",shape_svg:i.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),y(h,{label:t.$t("URL")},{default:w(()=>[y(d,{disabled:n.saving||i.editingItem.is_system=="yes",type:"text",placeholder:t.$t("URL or path (e.g. https://example.com or /members)"),modelValue:i.editingItem.permalink,"onUpdate:modelValue":e[3]||(e[3]=C=>i.editingItem.permalink=C)},null,8,["disabled","placeholder","modelValue"]),g("div",FUe,[g("p",null,$(t.$t("For internal links, start with / (e.g. /members).")),1)])]),_:1},8,["label"]),n.has_svg?(v(),D(h,{key:0,label:t.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:w(()=>[y(d,{disabled:n.saving,placeholder:t.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:i.editingItem.icon_svg,"onUpdate:modelValue":e[4]||(e[4]=C=>i.editingItem.icon_svg=C)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(v(),D(h,{key:1,style:{"margin-bottom":"5px"}},{default:w(()=>[y(f,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:i.editingItem.enabled,"onUpdate:modelValue":e[5]||(e[5]=C=>i.editingItem.enabled=C),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),i.editingItem.is_system?O("",!0):(v(),A(te,{key:2},[y(h,null,{default:w(()=>[y(f,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:i.editingItem.new_tab,"onUpdate:modelValue":e[6]||(e[6]=C=>i.editingItem.new_tab=C),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1}),y(h,{label:t.$t("Visibility")},{default:w(()=>[y(m,{disabled:n.saving,modelValue:i.editingItem.privacy,"onUpdate:modelValue":e[7]||(e[7]=C=>i.editingItem.privacy=C)},{default:w(()=>[y(p,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),y(p,{label:t.$t("Logged-in only"),value:"logged_in"},null,8,["label"]),y(p,{label:t.$t("Public only"),value:"logged_out_only"},null,8,["label"]),y(p,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["disabled","modelValue"]),g("div",NUe,$(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),i.editingItem.privacy=="members_only"?(v(),D(h,{key:0,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[y(b,{disabled:n.saving,modelValue:i.editingItem.membership_ids,"onUpdate:modelValue":e[8]||(e[8]=C=>i.editingItem.membership_ids=C),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["disabled","modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0)],64)),i.urlErrors.length?(v(),D(_,{key:i.validationAttempt,type:"warning",closable:!0,"show-icon":"",style:{margin:"8px 0"}},{title:w(()=>[g("div",null,[g("ul",null,[(v(!0),A(te,null,we(i.urlErrors,(C,S)=>(v(),A("li",{style:{"margin-bottom":"0"},key:S},$(C),1))),128))])])]),_:1})):O("",!0),y(h,null,{default:w(()=>[y(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.createOrUpdateLink())},{default:w(()=>[Y($(n.saving?t.$t("Saving..."):t.$t("Save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["disabled"])])):O("",!0)]),_:1},8,["modelValue","size","before-close","has-close-confirmation","close-confirmation-message"])],64)}const nU=ge(bUe,[["render",BUe]]),zUe={name:"ManageSpaceLinks",components:{MenuGroupSettings:nU},props:["spaceProfile","savingCount"],emits:["close"],data(){return{saving:!1}},watch:{savingCount(){this.saveMenuItems(!0)}},methods:{saveMenuItems(t=!1){this.saving=!0;let e="spaces/"+this.spaceProfile.slug+"/links";this.spaceProfile.type=="course"&&(e="admin/courses/"+this.spaceProfile.id+"/links"),this.$post(e,{links:this.spaceProfile.settings.links,space_id:this.spaceProfile.id}).then(n=>{this.$notify.success(n.message),this.spaceProfile.settings.links=n.links,t&&this.$emit("close")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})}}},HUe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},UUe={class:"fcom_card_sections"};function jUe(t,e,n,s,i,o){const r=W("menu-group-settings"),a=Ei,l=Ia;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(a,null,{default:w(()=>[g("div",HUe,[g("div",UUe,[y(r,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:e[0]||(e[0]=c=>o.saveMenuItems()),title:t.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const sU=ge(zUe,[["render",jUe]]),WUe={name:"AddPaywallModal",props:{modelValue:{type:Boolean,default:!1},spaceProfile:{type:Object,required:!0}},emits:["update:modelValue","added"],data(){return{products:[],productID:null,saving:!1,creatingProduct:!1,fetchingProducts:!1,newPaywall:{title:"",price:0}}},computed:{addPaywallModal:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{isProductAdded(t){var e,n;return(n=(e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)==null?void 0:n.includes(t)},initCreateProduct(){this.productID=null,this.newPaywall={title:"",price:0}},createProduct(){var t,e;this.creatingProduct=!0,this.$post("cart/products/create",{title:(t=this.newPaywall)==null?void 0:t.title,price:(e=this.newPaywall)==null?void 0:e.price}).then(n=>{var s;this.products.push(n.product),this.productID=(s=n.product)==null?void 0:s.id,this.productID&&this.addPaywall()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingProduct=!1})},searchProducts(t=""){t&&t.length<3||this.fetchProducts(t)},fetchProducts(t=""){this.fetchingProducts=!0,this.$get("cart/products/search",{search:t}).then(e=>{this.products=e.products}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingProducts=!1})},addPaywall(){this.saving=!0,this.$post("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.productID,space_id:this.spaceProfile.id}).then(t=>{var e;this.$notify.success(t.message),this.$emit("added",(e=t.paywall)==null?void 0:e.ID),this.addPaywallModal=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.fetchProducts()}},YUe={class:"fcom_topic_selector"},qUe={class:"fcom_select_photo",style:{float:"left"}},GUe=["src","alt"],XUe=["innerHTML"];function KUe(t,e,n,s,i,o){const r=ln,a=Qt,l=W("Plus"),c=_e,u=Ge,d=_t,h=an,f=fn,p=Xi,m=Al,b=xt("loading");return v(),D(m,{"modal-class":"fcom_common_dialog",class:"fcom_high_drawer",size:t.drawerWidth,modelValue:o.addPaywallModal,"onUpdate:modelValue":e[6]||(e[6]=_=>o.addPaywallModal=_),"close-on-click-modal":!1,visible:o.addPaywallModal,direction:"rtl"},{header:w(()=>[g("h4",null,$(t.$t("Add Paywall")),1)]),default:w(()=>[y(f,{onSubmit:e[5]||(e[5]=Be(_=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(h,null,{default:w(()=>[g("div",YUe,[Oe((v(),D(a,{style:{width:"100%"},modelValue:i.productID,"onUpdate:modelValue":e[0]||(e[0]=_=>i.productID=_),filterable:"",clearable:"",remote:"",loading:i.fetchingProducts,"remote-method":o.searchProducts,placeholder:t.$t("Search Product")},{default:w(()=>[(v(!0),A(te,null,we(i.products,_=>(v(),D(r,{key:_.id,label:_.title,value:_.id,disabled:o.isProductAdded(_.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",qUe,[g("img",{src:_.image,alt:_.title},null,8,GUe),g("span",null,$(_.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:_.price},null,8,XUe)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","loading","remote-method","placeholder"])),[[b,i.fetchingProducts]]),y(p,{ref:"creating_product_ref",onShow:o.initCreateProduct,placement:"bottom",width:400,trigger:"click"},{reference:w(()=>[y(u,{class:"fcom_secondary_button"},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1}),g("span",null,$(t.$t("New")),1)]),_:1})]),default:w(()=>[y(f,{modelValue:i.newPaywall,"onUpdate:modelValue":e[4]||(e[4]=_=>i.newPaywall=_),"label-position":"top"},{default:w(()=>[y(h,{label:t.$t("Title")},{default:w(()=>[y(d,{modelValue:i.newPaywall.title,"onUpdate:modelValue":e[1]||(e[1]=_=>i.newPaywall.title=_),placeholder:t.$t("Title of the product")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(h,{label:t.$t("Price")},{default:w(()=>[y(d,{modelValue:i.newPaywall.price,"onUpdate:modelValue":e[2]||(e[2]=_=>i.newPaywall.price=_),type:"number",placeholder:t.$t("Price of the product"),min:0},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(h,null,{default:w(()=>[y(u,{class:"fcom_primary_button",onClick:e[3]||(e[3]=_=>o.createProduct()),loading:i.creatingProduct,disabled:i.creatingProduct},{default:w(()=>[Y($(t.$t("Create")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["onShow"])])]),_:1}),y(h,null,{default:w(()=>[y(u,{class:"fcom_primary_button",loading:i.saving,onClick:o.addPaywall},{default:w(()=>[Y($(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const ZUe=ge(WUe,[["render",KUe]]),JUe={name:"ManagePaywalls",components:{ImagePlaceholder:wS,AddPaywallModal:ZUe},props:["spaceProfile","savingCount"],emits:["close"],data(){return{paywalls:[],loading:!1,removing:!1,addPaywallModal:!1,removePaywallModal:!1,revokeAccess:!1,removePaywall:null,installing:!1,hasFluentCart:this.hasFeature("has_fluentcart")}},computed:{spaceType(){return this.spaceProfile.type=="course"?this.$t("courses"):this.$t("spaces")}},methods:{copyCheckoutUrl(t){this.$toClipboard(t,this.$t("Checkout URL copied to clipboard"))},initRemovePaywall(t){this.$nextTick(()=>{this.removePaywallModal=!0,this.removePaywall=t})},initAddPaywall(){this.$nextTick(()=>{this.addPaywallModal=!0})},resetPaywall(){var e;const t=((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[];t.splice(t.indexOf(this.removePaywall.ID),1),this.spaceProfile.settings.cart_product_ids=t,this.removePaywall=null,this.revokeAccess=!1,this.getPaywalls()},paywallAdded(t){var n;const e=((n=this.spaceProfile.settings)==null?void 0:n.cart_product_ids)||[];e.includes(t)||e.push(t),this.spaceProfile.settings.cart_product_ids=e,this.getPaywalls()},getPaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.spaceProfile.id+"/paywalls",{space_id:this.spaceProfile.id}).then(t=>{this.paywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},deletePaywall(){this.removing=!0,this.$del("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.removePaywall.ID,revoke_access:this.revokeAccess}).then(t=>{this.$notify.success(t.message),this.removePaywallModal=!1,this.resetPaywall()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.removing=!1})},installPlugin(){this.installing=!0,this.$post("settings/install_plugin",{plugin:"fluent-cart"}).then(t=>{t.is_installed?this.$notify.success(t.message):this.$handleError(this.$t("Sorry, FluentCart could not be installed")),this.hasFluentCart=!0,this.getPaywalls()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.installing=!1})}},mounted(){var e;(((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[])&&this.hasFluentCart&&this.getPaywalls()}},QUe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},eje={class:"fcom_card_sections"},tje={class:"fcom_card_section_heading"},nje={class:"fcom_section_primary_item_title"},sje={class:"fcom_heading_item"},ije={key:0,class:"fcom_section_item_actions"},oje={class:"fcom_section_primary"},rje={class:"fcom_section_primary_item"},aje={class:"fcom_section_primary_item_title"},lje={class:"fcom_heading_item"},cje={class:"fcom_shape"},uje={class:"fcom_section_item_actions"},dje=["href"],hje=["href"],fje={class:"fcom_section_items"},pje={class:"fcom_section_item_title"},mje={class:"fcom_heading_item"},gje={class:"fcom_shape"},vje={class:"fcom_section_item_actions"},yje=["innerHTML"],bje={key:2,style:{padding:"1rem"}},_je={key:1,class:"fcom_section_item"},wje={class:"fcom_section_primary"},xje={class:"fcom_section_primary_item"},kje=["disabled"],Cje={class:"dialog_header"},Sje={class:"dialog_left"},$je={class:"dialog_body"},Aje={style:{"text-align":"center"}},Eje={class:"fcom_heading_item",style:{"justify-content":"center"}},Mje={class:"fcom_shape"},Tje={style:{margin:"1rem 0px 0.8rem"}},Pje={class:"dialog_footer"};function Ije(t,e,n,s,i,o){const r=Ge,a=Jt,l=e5,c=W("MoreFilled"),u=_e,d=Oa,h=Da,f=La,p=W("ImagePlaceholder"),m=Ei,b=Ia,_=W("AddPaywallModal"),x=Zt,k=Fs,C=xt("loading");return v(),A(te,null,[y(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(m,null,{default:w(()=>[g("div",QUe,[g("div",eje,[g("div",tje,[g("div",nje,[g("div",sje,[le(t.$slots,"title",{},()=>[g("h4",null,$(t.$t("Manage Paywalls")),1)])])]),i.hasFluentCart?(v(),A("div",ije,[y(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:w(()=>[Y($(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),i.hasFluentCart?(v(),A(te,{key:0},[i.loading||i.removing?(v(),D(a,{key:0,class:"white_loaded",rows:5,animated:!0})):i.paywalls.length?(v(!0),A(te,{key:1},we(i.paywalls,S=>(v(),A("div",{class:"fcom_section_item",key:S.ID},[g("div",oje,[g("div",rje,[g("div",aje,[g("h4",lje,[g("span",cje,[y(l,{src:S==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,$((S==null?void 0:S.post_title)||""),1)])]),g("div",uje,[y(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.view_url,target:"_blank",rel:"noopener"},$(t.$t("View Product")),9,dje)]),_:2},1024),y(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.admin_url,target:"_blank",rel:"noopener"},$(t.$t("Edit Product")),9,hje)]),_:2},1024),y(d,{type:"danger",onClick:E=>o.initRemovePaywall(S)},{default:w(()=>[Y($(t.$t("Delete Paywall")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[y(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]),g("div",fje,[(v(!0),A(te,null,we(S.variants,E=>(v(),A("div",{class:"fcom_section_item",key:E.id},[g("div",pje,[g("div",mje,[g("span",gje,[E.photo?(v(),D(l,{key:0,src:E.photo},null,8,["src"])):(v(),D(l,{key:1},{default:w(()=>[y(p)]),_:1}))]),g("span",null,$(E.variation_title),1)])]),g("div",vje,[g("span",{class:"fcom_price",innerHTML:E.total_price},null,8,yje),y(f,{trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{onClick:P=>o.copyCheckoutUrl(E.checkout_url)},{default:w(()=>[Y($(t.$t("Copy Checkout URL")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[y(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:"",style:{padding:"0 6px"}},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]))),128))])])]))),128)):(v(),A("div",bje,[g("p",null,$(t.$t("No paywall has been added yet")),1)]))],64)):(v(),A("div",_je,[g("div",wje,[g("div",xje,[g("span",null,[Y($(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Oe((v(),A("a",{disabled:i.installing,onClick:e[1]||(e[1]=(...S)=>o.installPlugin&&o.installPlugin(...S)),class:"fcom_link"},[Y($(t.$t("click here")),1)],8,kje)),[[C,i.installing]]),Y(" "+$(t.$t("to install and activate FluentCart.")),1)])])])]))])])]),_:3})]),_:3}),i.addPaywallModal?(v(),D(_,{key:0,modelValue:i.addPaywallModal,"onUpdate:modelValue":e[2]||(e[2]=S=>i.addPaywallModal=S),spaceProfile:n.spaceProfile,onAdded:o.paywallAdded},null,8,["modelValue","spaceProfile","onAdded"])):O("",!0),y(k,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.drawerWidth,modelValue:i.removePaywallModal,"onUpdate:modelValue":e[5]||(e[5]=S=>i.removePaywallModal=S),direction:"rtl",onClose:e[6]||(e[6]=S=>i.removePaywallModal=!1)},{header:w(()=>[g("div",Cje,[g("div",Sje,[g("h4",null,$(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",Pje,[y(r,{class:"fcom_primary_button",disabled:i.removing,onClick:o.deletePaywall},{default:w(()=>[Y($(t.$t("Delete")),1)]),_:1},8,["disabled","onClick"]),y(r,{class:"fcom_secondary_button",onClick:e[4]||(e[4]=S=>i.removePaywallModal=!1)},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var S,E;return[g("div",$je,[g("div",Aje,[g("h4",Eje,[g("span",Mje,[y(l,{src:(S=i.removePaywall)==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,$((E=i.removePaywall)==null?void 0:E.post_title),1)]),g("p",Tje,$(t.$t("Are you sure you want to delete this paywall? This action cannot be undone.")),1),y(x,{modelValue:i.revokeAccess,"onUpdate:modelValue":e[3]||(e[3]=P=>i.revokeAccess=P),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const iU=ge(JUe,[["render",Ije]]),Lje={name:"CourseCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:sU,CourseLockscreen:mUe,CreateCourseForm:gS,ManagePaywalls:iU},data(){return{saving:!1,currentTab:"general",savingCount:0,hasPro:window.fluentComAdmin.pro}},methods:{saveChanges(){if(!this.hasPro&&this.currentTab=="lock_screen"){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1}},mounted(){this.$router.push({query:{...this.$route.query,customize_course:1}})},unmounted(){const t={...this.$route.query};delete t.customize_course,this.$router.push({query:t})}},Oje={key:0,class:"fcom_full_editor"},Dje={class:"fcom_full_editor_header"},Rje={class:"fcom_editor_menu object_menu"},Vje={class:"fcom_space_menu_ul"},Fje={class:"full_editor_actions"},Nje={style:{"max-width":"800px",margin:"0 auto"}};function Bje(t,e,n,s,i,o){const r=W("ArrowLeft"),a=_e,l=Ge,c=H1,u=W("create-course-form"),d=Ei,h=Ia,f=W("course-lockscreen"),p=W("manage-space-links"),m=W("manage-paywalls"),b=B1,_=xt("loading");return n.course.id?(v(),A("div",Oje,[y(b,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var x;return[g("div",Dje,[g("div",{onClick:e[0]||(e[0]=k=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),Y(" "+$(n.course.title),1)]),g("div",Rje,[g("ul",Vje,[g("li",{onClick:e[1]||(e[1]=k=>i.currentTab="general")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="general"}),href:"#"},$(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=k=>i.currentTab="paywalls")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="paywalls"}),href:"#"},$(t.$t("Paywalls")),3)]),n.course.privacy=="private"&&((x=n.course.settings)==null?void 0:x.custom_lock_screen)=="yes"?(v(),A("li",{key:0,onClick:e[3]||(e[3]=k=>i.currentTab="lock_screen")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="lock_screen"}),href:"#"},$(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=k=>i.currentTab="manage_links")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},$(t.$t("Course Links")),3)])])]),g("div",Fje,[Oe((v(),D(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveChanges,bg:""},{default:w(()=>[Y($(!i.hasPro&&i.currentTab=="lock_screen"?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes & Close")),1)]),_:1},8,["disabled","onClick"])),[[_,i.saving]])])])]}),_:1}),y(b,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[i.currentTab=="general"?(v(),D(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(d,null,{default:w(()=>[g("div",Nje,[y(u,{onClose:e[5]||(e[5]=x=>t.$emit("close")),savingCount:i.savingCount,course:n.course},null,8,["savingCount","course"])])]),_:1})]),_:1})):i.currentTab=="lock_screen"?(v(),D(f,{key:1,savingCount:i.savingCount,spaceProfile:n.course,onClose:e[6]||(e[6]=x=>t.$emit("close"))},null,8,["savingCount","spaceProfile"])):i.currentTab=="manage_links"?(v(),D(p,{key:2,savingCount:i.savingCount,onClose:e[7]||(e[7]=x=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):i.currentTab=="paywalls"?(v(),D(m,{key:3,savingCount:i.savingCount,onClose:e[8]||(e[8]=x=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const oU=ge(Lje,[["render",Bje]]),zje={name:"EditCourseRoute",components:{CourseCustomizer:oU,AppLayout:mi,Layout:pi},props:["course_id"],data(){return{course:{},loading:!0,menuItems:[{name:"course_overview",route:"course_overview",title:this.$t("Overview")},{name:"lessons",route:"edit_lessons",title:this.$t("Lessons")},{name:"students",route:"course_students",title:this.$t("Students")}],customizeCourse:!1}},computed:{computedMenuItems(){var e;const t=[...this.menuItems];return(e=this.course)!=null&&e.quiz_count&&t.push({name:"quiz-results",route:"quiz_results",title:this.$t("Quiz Results")}),t}},methods:{fetchCourse(){this.loading=!0,this.$get("admin/courses/"+this.course_id).then(t=>{this.course=t.course}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initDeleteCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this course?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$promt(this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"'),this.$t("Delete Course"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(t=>{t.value==="DELETE"?this.deleteCourse():this.$notify.error(this.$t("The verification string does not match"))})})},initDuplicateCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to duplicate this course?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes, Duplicate the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"info"}).then(()=>{this.duplicateCourse()})},duplicateCourse(){this.loading=!0,this.$post("admin/courses/"+this.course.id+"/duplicate").then(t=>{this.$notify.success(t.message),t.course&&this.$router.push({name:"course_overview",params:{course_id:t.course.id}}).then(()=>{window.location.reload()}),this.loading=!1}).catch(t=>{this.$handleError(t),this.loading=!1})},deleteCourse(){this.loading=!0,this.$del("admin/courses/"+this.course.id).then(t=>{this.$notify.success(t.message),this.$router.push({name:"manage_courses"})}).catch(t=>{this.$handleError(t),this.loading=!1})},toViewCourse(){let t=this.$getRouteLink("course/:course_slug/lessons",{course_slug:this.course.slug});window.location.href=t}},mounted(){this.fetchCourse(),this.$route.query.customize_course&&(this.customizeCourse=!0)}},Hje={class:"object_menu"},Uje={class:"fcom_space_menu_ul"},jje={key:0},Wje={class:"actions_items"},Yje={key:0,class:"white_loaded"},qje={key:2},Gje={key:0};function Xje(t,e,n,s,i,o){const r=dde,a=ude,l=W("router-link"),c=W("MoreFilled"),u=_e,d=Ge,h=Xi,f=Jt,p=W("router-view"),m=W("layout"),b=W("app-layout"),_=W("course-customizer");return v(),A(te,null,[y(b,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[y(m,{wrapper_class:"no_bg_layout",title:t.$t("Courses")},{title:w(()=>[y(a,null,{default:w(()=>[y(r,{to:{name:"manage_courses"}},{default:w(()=>[Y($(t.$t("Courses")),1)]),_:1}),i.course.id?(v(),D(r,{key:0},{default:w(()=>[Y($(i.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),A("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=x=>{i.customizeCourse=!0})},$(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",Hje,[g("ul",Uje,[(v(!0),A(te,null,we(o.computedMenuItems,x=>(v(),A("li",{key:x.name,class:U("course_inner_menu_"+x.name)},[y(l,{to:{name:x.route,params:{course_id:i.course.id}}},{default:w(()=>[Y($(x.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),A("li",jje,[y(h,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:w(()=>[y(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>[g("ul",Wje,[g("li",{onClick:e[1]||(e[1]=x=>o.toViewCourse())},$(t.$t("View Course")),1),g("li",{onClick:e[2]||(e[2]=()=>{t.$refs.course_actions.hide(),i.customizeCourse=!0})},$(t.$t("Edit Course")),1),g("li",{onClick:e[3]||(e[3]=(...x)=>o.initDuplicateCourse&&o.initDuplicateCourse(...x))},$(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...x)=>o.initDeleteCourse&&o.initDeleteCourse(...x))},$(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[i.loading?(v(),A("div",Yje,[y(f,{loading:i.loading,animation:"pulse",row:"10"},null,8,["loading"])])):i.course.id?(v(),D(p,{key:1,course:i.course},null,8,["course"])):(v(),A("div",qje,[g("h3",null,$(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1}),i.customizeCourse&&i.course.id?(v(),A("div",Gje,[(v(),D(Ta,{to:"body"},[y(_,{course:i.course,onClose:e[5]||(e[5]=x=>{i.customizeCourse=null,o.fetchCourse()}),onCompleted:e[6]||(e[6]=x=>{i.customizeCourse=null,o.fetchCourse()})},null,8,["course"])]))])):O("",!0)],64)}const Kje=ge(zje,[["render",Xje]]),Zje={name:"LengthInput",props:["modelValue"],data(){return{muinutes:0,seconds:0}},methods:{updateLength(){this.$emit("update:modelValue",parseInt(this.muinutes)*60+parseInt(this.seconds))}},mounted(){this.modelValue&&(this.muinutes=Math.floor(this.modelValue/60)||"",this.seconds=this.modelValue%60||"")}},Jje={class:"fcom_length_input"};function Qje(t,e,n,s,i,o){const r=_t;return v(),A("div",Jje,[y(r,{type:"number",modelValue:i.muinutes,"onUpdate:modelValue":e[0]||(e[0]=a=>i.muinutes=a),onChange:o.updateLength,min:0,max:1444,size:"small"},{append:w(()=>[Y($(t.$t("min")),1)]),_:1},8,["modelValue","onChange"]),y(r,{type:"number",modelValue:i.seconds,"onUpdate:modelValue":e[1]||(e[1]=a=>i.seconds=a),onChange:o.updateLength,min:0,max:59,size:"small"},{append:w(()=>[Y($(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const eWe=ge(Zje,[["render",Qje]]),tWe={name:"LessonDocuments",components:{DocumentLists:dv,DocumentsUploader:XH},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},nWe={class:"fcom_meta_section fcom_lesson_documents_form"},sWe={class:"fcom_meta_label"},iWe={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},oWe={key:0,class:"fcom_lesson_documents_list"},rWe={key:1,class:"fcom_lesson_documents_list"};function aWe(t,e,n,s,i,o){const r=W("documents-uploader"),a=W("document-lists");return v(),A("div",nWe,[g("div",sWe,$(t.$t("Documents & Files")),1),g("p",iWe,$(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),A("div",oWe,[y(r,{style:{"margin-bottom":"20px",padding:"0"},showLists:!1,additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),y(a,{class:"fcom_boxed_documents",additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_editable:!0,document_lists:n.lesson.meta.document_lists},null,8,["additional_data","document_lists"])])):(v(),A("div",rWe,[g("p",null,$(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const rU=ge(tWe,[["render",aWe]]),lWe={name:"CourseMeta",components:{LessonDocuments:rU,MediaEmbeder:V2,LengthInput:eWe,BgImageUpload:N2},props:{lesson:{type:Object,required:!0},course:{type:Object,required:!0},quiz_meta:{type:Boolean,default:!1}},computed:{showCommentsDisabled(){return this.course.settings.disable_comments=="yes"},enablePassingScore(){var t;return((t=this.lesson.meta)==null?void 0:t.enable_passing_score)=="yes"}}},cWe={class:"fcom_course_meta"},uWe={class:"fcom_meta_section"},dWe={class:"fcom_meta_label"},hWe={class:"fcom_meta_content"},fWe={key:2,class:"checkbox_with_tooltip"},pWe={key:0},mWe={key:1,class:"checkbox_with_tooltip"},gWe={key:0,class:"fcom_meta_section"},vWe={class:"fcom_meta_label"},yWe={class:"fcom_meta_content"},bWe={key:1,class:"fcom_meta_section"},_We={class:"fcom_meta_label"},wWe={class:"fcom_edit_lesson_documents"};function xWe(t,e,n,s,i,o){var b;const r=Zt,a=W("InfoFilled"),l=_e,c=js,u=_t,d=W("media-embeder"),h=W("length-input"),f=W("BgImageUpload"),p=an,m=W("LessonDocuments");return v(),A("div",cWe,[g("div",uWe,[g("div",dWe,$(t.$t("Features Settings")),1),g("div",hWe,[y(r,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":e[0]||(e[0]=_=>n.lesson.meta.enable_media=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),o.showCommentsDisabled?(v(),D(r,{key:0,disabled:!0,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Comments are disabled for this course")),1)]),_:1})):(v(),D(r,{key:1,modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":e[1]||(e[1]=_=>n.lesson.meta.enable_comments=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),A("div",fWe,[y(r,{modelValue:n.lesson.meta.free_preview_lesson,"onUpdate:modelValue":e[2]||(e[2]=_=>n.lesson.meta.free_preview_lesson=_),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),A("span",pWe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),y(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[Y($(t.$t("If enabled, public users can view this lesson without enrolling in the course.")),1)]),default:w(()=>[y(l,null,{default:w(()=>[y(a)]),_:1})]),_:1})])),n.quiz_meta?(v(),A(te,{key:3},[y(r,{modelValue:n.lesson.meta.enable_passing_score,"onUpdate:modelValue":e[3]||(e[3]=_=>n.lesson.meta.enable_passing_score=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Set a passing grade")),1)]),_:1},8,["modelValue"]),o.enablePassingScore?(v(),D(u,{key:0,modelValue:n.lesson.meta.passing_score,"onUpdate:modelValue":e[4]||(e[4]=_=>n.lesson.meta.passing_score=_),min:10,max:100,step:1,type:"number",class:"fcom_input_number",placeholder:"80"},{append:w(()=>[...e[9]||(e[9]=[Y("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),A("div",mWe,[y(r,{modelValue:n.lesson.meta.enforce_passing_score,"onUpdate:modelValue":e[5]||(e[5]=_=>n.lesson.meta.enforce_passing_score=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),y(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[Y($(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[10]||(e[10]=g("br",null,null,-1)),Y(" "+$(t.$t("proceeding to the next lesson. They can re-take this quiz multiple times.")),1)]),default:w(()=>[y(l,null,{default:w(()=>[y(a)]),_:1})]),_:1})])):O("",!0),y(r,{modelValue:n.lesson.meta.hide_result,"onUpdate:modelValue":e[6]||(e[6]=_=>n.lesson.meta.hide_result=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Hide answers on result page")),1)]),_:1},8,["modelValue"])],64)):O("",!0)])]),((b=n.lesson.meta)==null?void 0:b.enable_media)=="yes"?(v(),A("div",gWe,[n.lesson.meta.enable_media=="yes"?(v(),D(d,{key:0,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])):O("",!0),g("div",vWe,$(t.$t("Lesson Duration")),1),g("div",yWe,[y(h,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":e[7]||(e[7]=_=>n.lesson.meta.video_length=_)},null,8,["modelValue"])])])):O("",!0),n.quiz_meta?(v(),A("div",bWe,[g("div",_We,$(t.$t("Featured Image")),1),y(p,{class:"fcom_bg_image"},{default:w(()=>[y(f,{modelValue:n.lesson.meta.featured_image_id,"onUpdate:modelValue":e[8]||(e[8]=_=>n.lesson.meta.featured_image_id=_),can_remove:!0},null,8,["modelValue"])]),_:1})])):O("",!0),g("div",wWe,[y(m,{lesson:n.lesson},null,8,["lesson"])])])}const aU=ge(lWe,[["render",xWe]]),kWe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:rU,BlockEditor:QH,MediaEmbeder:V2,LessonMeta:aU,FullEditorFrame:eU},data(){return{saving:!1,showSideBar:!1,useClassic:!1,showDocumentsModal:!1}},computed:{previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})}},methods:{saveData(){this.saving=!0;const t={lesson:{id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status}};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,t).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson),this.dispatchLessonSaveEvent(e.lesson,t)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},dispatchLessonSaveEvent(t,e){const n={lesson:t,lessonData:e};if(this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.editorFrame)try{if(this.$refs.fullEditorFrame.editorFrame.contentWindow){const s=new CustomEvent("fluentcommunity:lesson:after_save",{detail:n});this.$refs.fullEditorFrame.editorFrame.contentWindow.dispatchEvent(s);return}}catch(s){console.warn("Could not dispatch event to iframe:",s)}window.dispatchEvent(new CustomEvent("fluentcommunity:lesson:after_save",{detail:n}))},onDocumentsModalClosed(){this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.syncMetaToEditor(this.lesson.meta)},switchToClassic(){this.useClassic=!0,window.fcomFullEditorFailed=!0}},mounted(){window.fcomFullEditorFailed&&(this.useClassic=!0),document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},CWe={class:"fcom_full_editor"},SWe={class:"fcom_full_editor_header"},$We={class:"fcom_desktop_only"},AWe={key:0},EWe={class:"full_editor_actions"},MWe={class:"fcom_lesson_camp"},TWe={class:"fcom_lesson_nav"},PWe=["title","href"],IWe={style:{padding:"20px"}},LWe={class:"fcom_lesson_content"},OWe={key:0},DWe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},RWe={class:"fcom_lesson_title"},VWe={class:"fcom_documents_dialog_footer"};function FWe(t,e,n,s,i,o){const r=W("ArrowLeft"),a=_e,l=Ge,c=W("ArrowRight"),u=W("arrow-down"),d=Oa,h=Da,f=La,p=W("View"),m=H1,b=W("lesson-meta"),_=Ei,x=z1,k=_t,C=W("block-editor"),S=W("FullEditorFrame"),E=Ia,P=B1,T=W("LessonDocuments"),L=Fs,I=xt("loading");return v(),A("div",CWe,[y(P,null,{default:w(()=>[y(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",SWe,[g("div",{onClick:e[0]||(e[0]=V=>t.$emit("close")),class:"fcom_back_header"},[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1}),g("span",$We,$(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),A("span",AWe,"("+$(n.course.title)+")",1)):O("",!0)]),g("div",EWe,[g("div",MWe,[g("div",null,$(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",TWe,[y(l,{onClick:e[1]||(e[1]=V=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1})]),_:1},8,["disabled"]),y(l,{onClick:e[2]||(e[2]=V=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:w(()=>[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!i.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=V=>i.showSideBar=!i.showSideBar)},{default:w(()=>[g("span",null,$(t.$t("Features")),1)]),_:1})):O("",!0),y(f,{onCommand:e[4]||(e[4]=V=>{n.lesson.status=V}),trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"draft"},{default:w(()=>[Y($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[Y($(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[y(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[Y($(t.$labelize(n.lesson.status))+" ",1),y(a,{class:"el-icon--right"},{default:w(()=>[y(u)]),_:1})]),_:1},8,["type"])]),_:1}),Oe((v(),D(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[I,i.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[y(a,null,{default:w(()=>[y(p)]),_:1})],8,PWe)])])]),_:1}),y(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[i.useClassic?Oe((v(),D(x,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[y(_,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",IWe,[y(b,{course:n.course,lesson:n.lesson},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[5]||(e[5]=V=>i.showSideBar=!1)},{default:w(()=>[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512)),[[jt,i.showSideBar||!t.isMobile]]):O("",!0),y(E,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[O("",!0),g("div",LWe,[i.useClassic?(v(),A("div",OWe,[y(_,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",DWe,[g("div",RWe,[g("label",null,$(t.$t("Lesson Title")),1),y(k,{type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":e[7]||(e[7]=V=>n.lesson.title=V),size:"large",placeholder:t.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),g("label",null,$(t.$t("Lesson Content")),1),y(C,{modelValue:n.lesson.message,"onUpdate:modelValue":e[8]||(e[8]=V=>n.lesson.message=V)},null,8,["modelValue"])])]),_:1})])):(v(),D(S,{key:1,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"course_lesson",lesson_id:n.lesson.id},frameHeight:"calc(100vh - 60px)",documentTitle:n.lesson.title,metaSettings:n.lesson.meta,onTitleUpdated:e[9]||(e[9]=V=>{n.lesson.title=V}),onMetaUpdated:e[10]||(e[10]=V=>{n.lesson.meta=V}),featured_image_id:n.lesson.meta.featured_image_id||"",onFeaturedMediaUpdated:e[11]||(e[11]=V=>{n.lesson.meta.featured_image_id=V}),onManageDocuments:e[12]||(e[12]=V=>i.showDocumentsModal=!0),modelValue:n.lesson.message,"onUpdate:modelValue":e[13]||(e[13]=V=>n.lesson.message=V)},null,8,["onUseAlternateEditor","editorParams","documentTitle","metaSettings","featured_image_id","modelValue"]))])]),_:1})]),_:1})]),_:1}),y(L,{modelValue:i.showDocumentsModal,"onUpdate:modelValue":e[15]||(e[15]=V=>i.showDocumentsModal=V),title:t.$t("Documents & Files"),width:"600px","close-on-click-modal":!1,onClosed:o.onDocumentsModalClosed,class:"fcom_documents_dialog"},{footer:w(()=>[g("div",VWe,[y(l,{type:"primary",onClick:e[14]||(e[14]=V=>i.showDocumentsModal=!1)},{default:w(()=>[Y($(t.$t("Done")),1)]),_:1})])]),default:w(()=>[y(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const lU=ge(kWe,[["render",FWe]]),NWe={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson"],props:["course","sections","lesson"],components:{LessonEditor:lU,SlugInput:Nd},data(){return{editing_title:!1,editingSlugPopup:!1,showMoveLessonPopup:!1,selectedSectionId:null}},computed:{filteredSections(){return this.sections.filter(t=>t.id!=this.lesson.parent_id)},isQuizType(){var t;return((t=this.lesson)==null?void 0:t.content_type)==="quiz"}},methods:{updateLessonStatus(t){if(this.lesson.status===t)return!1;this.lesson.status=t,this.$emit("updated",this.lesson,["status"])},updateLessonTitle(){this.editing_title=!1,this.$emit("updated",this.lesson,["title"])},updateLessonSlug(){this.editingSlugPopup=!1,this.$emit("updated",this.lesson,["slug"])},showEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.lesson_title_edit.focus()})},moveLesson(){this.showMoveLessonPopup=!1,this.$emit("moveLesson",this.lesson.id,this.selectedSectionId)},handleLessonAction(t){if(t==="edit_title")this.showEditor();else if(t==="delete")this.$emit("deleteLesson",this.lesson);else if(t==="edit_lesson")this.$emit("showEditor",this.lesson);else if(t==="preview_lesson"){let e=this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug});window.open(e,"_blank")}else t==="move_lesson"?(this.showMoveLessonPopup=!0,this.selectedSectionId=null,this.showOnlyThisPopup("fcom_action_lesson_popup")):t==="edit_slug"&&(this.editingSlugPopup=!0,this.showOnlyThisPopup("fcom_edit_slug_popup"))},showOnlyThisPopup(t){this.$nextTick(()=>{document.querySelector(`.${t}.lesson_${this.lesson.id}`).style.display="block",document.querySelectorAll(`.${t}:not(.lesson_${this.lesson.id})`).forEach(e=>e.style.display="none")})}}},BWe={key:0,class:"fcom_heading_item"},zWe=["innerHTML"],HWe={class:"fcom_section_item_actions"},UWe={class:"fcom_action_lesson"},jWe={class:"fcom_move_popup_close"},WWe={class:"fcom_move_popup_close"};function YWe(t,e,n,s,i,o){const r=Bo,a=Ge,l=_t,c=W("arrow-down"),u=_e,d=Oa,h=Da,f=La,p=W("MoreFilled"),m=ln,b=Qt,_=an,x=fn,k=W("Close"),C=W("slug-input");return v(),A(te,null,[g("div",{class:U([{fcom_title_editing:i.editing_title},"fcom_section_item_title fcom_title_editable"])},[le(t.$slots,"before_section_heading"),i.editing_title?(v(),D(l,{key:1,onKeydown:e[1]||(e[1]=Nt(S=>i.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:Nt(o.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":e[2]||(e[2]=S=>n.lesson.title=S)},{append:w(()=>[y(a,{onClick:o.updateLessonTitle},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),A("p",BWe,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,zWe),o.isQuizType?(v(),D(r,{key:0},{default:w(()=>[Y($(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",HWe,[y(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[Y($(o.isQuizType?t.$t("Edit Quiz"):t.$t("Edit Lesson")),1)]),_:1}),y(f,{onCommand:e[4]||(e[4]=S=>{o.updateLessonStatus(S)}),trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"draft"},{default:w(()=>[Y($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[Y($(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[y(a,{class:U(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[Y($(t.$labelize(n.lesson.status))+" ",1),y(u,{class:"el-icon--right"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",UWe,[y(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"edit_lesson"},{default:w(()=>[Y($(t.$t("Edit Lesson Content")),1)]),_:1}),y(d,{command:"edit_title"},{default:w(()=>[Y($(t.$t("Edit Title")),1)]),_:1}),y(d,{command:"edit_slug"},{default:w(()=>[Y($(t.$t("Edit Slug")),1)]),_:1}),y(d,{command:"preview_lesson"},{default:w(()=>[Y($(t.$t("Preview Lesson")),1)]),_:1}),y(d,{command:"move_lesson"},{default:w(()=>[Y($(t.$t("Move Lesson")),1)]),_:1}),y(d,{command:"delete"},{default:w(()=>[Y($(t.$t("Delete Lesson")),1)]),_:1})]),_:1})]),default:w(()=>[y(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(p)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Oe(g("div",{class:U(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[y(x,{onSubmit:e[6]||(e[6]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(_,{label:t.$t("Move to a different Section")},{default:w(()=>[y(b,{placeholder:t.$t("Select Section"),modelValue:i.selectedSectionId,"onUpdate:modelValue":e[5]||(e[5]=S=>i.selectedSectionId=S)},{default:w(()=>[(v(!0),A(te,null,we(o.filteredSections,S=>(v(),D(m,{key:S.id,label:S.title,value:S.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),y(a,{onClick:o.moveLesson,disabled:!i.selectedSectionId,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Move Lesson")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",jWe,[y(u,{onClick:e[7]||(e[7]=S=>i.showMoveLessonPopup=!1)},{default:w(()=>[y(k)]),_:1})])],2),[[jt,i.showMoveLessonPopup]]),Oe(g("div",{class:U(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[y(x,{onSubmit:e[9]||(e[9]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(_,{label:t.$t("Slug (optional)")},{default:w(()=>[y(C,{modelValue:n.lesson.slug,"onUpdate:modelValue":e[8]||(e[8]=S=>n.lesson.slug=S),is_inital_inactive:!0,placeholder:t.$t("Slug of the lesson")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(a,{onClick:o.updateLessonSlug,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",WWe,[y(u,{onClick:e[10]||(e[10]=S=>i.editingSlugPopup=!1)},{default:w(()=>[y(k)]),_:1})])],2),[[jt,i.editingSlugPopup]])])])],64)}const qWe=ge(NWe,[["render",YWe]]),GWe={name:"AddQuestionModal",components:{CrepeEditor:Yd,BgImageUpload:N2},emits:["close","addQuestion","updateQuestion"],props:{lesson:{type:Object,required:!0},question:{type:Object,required:!1}},data(){return{showModal:!0,appReady:!1,questionData:null,CloseBoldIcon:Ai(j4),questionTypes:this.appVars.question_types,newQuestion:{slug:"",type:"single_choice",label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",options:[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]}}},watch:{showModal(){this.$emit("close")},"questionData.type":{handler(t,e){t=="single_choice"&&e=="multiple_choice"&&this.questionData.options.forEach((n,s)=>{n.is_correct=s===0})},deep:!0}},computed:{isRemovable(){return this.questionData.options.length>1},isSingleChoice(){return this.questionData.type=="single_choice"},isNewQuestion(){return!this.question}},methods:{addQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("addQuestion",this.questionData))},updateQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("updateQuestion",this.questionData))},addNewOption(){const t=this.questionData.options.length;this.questionData.options.push({label:`Option ${t+1}`,is_correct:!1})},removeOption(t){this.questionData.options.splice(t,1)},checkOption(t){this.isSingleChoice&&this.questionData.options.forEach(e=>{e.label!==t.label&&(e.is_correct=!1)})},checkValidation(){if(!this.has_pro)return!1;const{label:t,options:e}=this.questionData,s=[{valid:!!t&&t.trim()!=="",message:this.$t("Please enter a question")},{valid:Array.isArray(e)&&e.length>=2,message:this.$t("Please add at least 2 options")},{valid:e&&e.every(i=>i.label&&i.label.trim()!==""),message:this.$t("Please enter a label for each option")},{valid:e&&e.some(i=>i.is_correct===!0),message:this.$t("Please select the correct option")}].find(i=>!i.valid);return s?(this.$handleError(s.message),!1):!0}},mounted(){this.questionData=this.isNewQuestion?this.newQuestion:this.question,this.$nextTick(()=>{this.appReady=!0})}},XWe={class:"dialog_header"},KWe={class:"dialog_left"},ZWe={class:"dialog_body"},JWe={class:"fcom_choices question_choices"},QWe=["onClick"],eYe={class:"fcom_choice_btn"},tYe={key:0,class:"fcom_banner_image_holder"},nYe={key:1,class:"fcom_banner_image_preview"},sYe={class:"sub_label"},iYe={class:"dialog_footer"},oYe={key:0};function rYe(t,e,n,s,i,o){const r=an,a=Vd,l=W("BgImageUpload"),c=Ra,u=W("CloseBold"),d=_e,h=Ge,f=W("crepe-editor"),p=Zt,m=_t,b=XV,_=fn,x=Fs;return v(),D(x,{modelValue:i.showModal,"onUpdate:modelValue":e[8]||(e[8]=k=>i.showModal=k),width:t.modalWidth,"modal-class":"fcom_common_dialog question_dialog","align-center":!0,"close-on-click-modal":!1,"close-on-press-escape":!1},{header:w(()=>[g("div",XWe,[g("div",KWe,[g("h4",null,$(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",iYe,[y(h,{class:"fcom_secondary_button",onClick:e[7]||(e[7]=k=>i.showModal=!1)},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),o.isNewQuestion?(v(),D(h,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[Y($(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(h,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[Y($(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",oYe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",ZWe,[y(_,{onSubmit:e[6]||(e[6]=Be(k=>t.doNothing(),["prevent"])),"label-position":"top",model:i.questionData},{default:w(()=>[y(r,{label:t.$t("Type")},{default:w(()=>[g("div",JWe,[(v(!0),A(te,null,we(i.questionTypes,k=>(v(),A("div",{key:k.value,onClick:C=>i.questionData.type=k.value,class:U({fcom_choice:!0,fcom_choice_active:i.questionData.type==k.value})},[g("div",eYe,[g("p",null,$(t.$t(k.label)),1)])],10,QWe))),128))])]),_:1},8,["label"]),y(r,{label:t.$t("Image")},{default:w(()=>[y(a,{class:"fcom_question_switch",modelValue:i.questionData.image_enabled,"onUpdate:modelValue":e[0]||(e[0]=k=>i.questionData.image_enabled=k)},null,8,["modelValue"]),i.questionData.image_enabled&&!i.questionData.image_url?(v(),A("div",tYe,[g("h4",null,$(t.$t("Banner Image")),1),g("p",null,$(t.$t("Upload a banner image at the top of the question. Recommended image dimension: 1080x420")),1),y(l,{modelValue:i.questionData.image_url,"onUpdate:modelValue":e[1]||(e[1]=k=>i.questionData.image_url=k)},null,8,["modelValue"])])):i.questionData.image_enabled&&i.questionData.image_url?(v(),A("div",nYe,[y(c,{alt:t.$t("Image Preview"),src:i.questionData.image_url},null,8,["alt","src"]),y(h,{class:"fcom_secondary_button",text:"",onClick:e[2]||(e[2]=k=>i.questionData.image_url="")},{default:w(()=>[y(d,null,{default:w(()=>[y(u)]),_:1})]),_:1})])):O("",!0)]),_:1},8,["label"]),y(r,{label:t.$t("Question")},{default:w(()=>[i.appReady?(v(),D(f,{key:0,modelValue:i.questionData.label,"onUpdate:modelValue":e[3]||(e[3]=k=>i.questionData.label=k),placeholder:t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),y(r,{label:t.$t("Responses"),class:"fcom_question_options"},{default:w(()=>[g("span",sYe,$(t.$t("Select correct answer")),1),(v(!0),A(te,null,we(i.questionData.options,(k,C)=>(v(),A("div",{key:C,class:"fcom_question_option"},[y(p,{modelValue:k.is_correct,"onUpdate:modelValue":S=>k.is_correct=S,onChange:S=>o.checkOption(k),value:k.label,class:U({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","value","class"]),y(m,{modelValue:k.label,"onUpdate:modelValue":S=>k.label=S,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),D(b,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:S=>o.removeOption(C)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),y(b,{type:"primary",underline:!1,onClick:o.addNewOption},{default:w(()=>[Y($("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"]),y(r,{label:t.$t("Help Text")},{default:w(()=>[y(m,{modelValue:i.questionData.help_text,"onUpdate:modelValue":e[4]||(e[4]=k=>i.questionData.help_text=k),type:"text"},null,8,["modelValue"])]),_:1},8,["label"]),y(r,{label:t.$t("Status")},{default:w(()=>[y(p,{modelValue:i.questionData.enabled,"onUpdate:modelValue":e[5]||(e[5]=k=>i.questionData.enabled=k)},{default:w(()=>[Y($(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width"])}const aYe=ge(GWe,[["render",rYe]]),lYe={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonMeta:aU,CrepeEditor:Yd,AddQuestionModal:aYe,Edit:QD,SwitchButton:Mle},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null}},computed:{showMoving(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.quiz_questions)==null?void 0:e.length)>1},previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})},showQuestionImage(){return t=>(t==null?void 0:t.image_enabled)&&(t==null?void 0:t.image_url)}},methods:{getStatusText(t){return t.enabled?this.$t("Disable"):this.$t("Enable")},toggleQuestion(t){t.enabled=!t.enabled,this.saveData()},openEditQuestionModal(t){this.question=t,this.showQuestionModal=!0},openAddQuestionModal(){this.has_pro&&(this.question=null,this.showQuestionModal=!0)},moveUp(t){if(t==0)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t-1],this.lesson.meta.quiz_questions[t-1]=e},moveDown(t){var n,s;if(t==((s=(n=this.lesson.meta)==null?void 0:n.quiz_questions)==null?void 0:s.length)-1)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t+1],this.lesson.meta.quiz_questions[t+1]=e},addQuestion(t){Array.isArray(this.lesson.meta.quiz_questions)||(this.lesson.meta.quiz_questions=[]),this.lesson.meta.quiz_questions.push({...t}),this.saveData()},updateQuestion(t){var e,n,s;this.lesson.meta.quiz_questions=(s=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:s.map(i=>i.slug==t.slug?t:i),this.saveData()},checkAndSaveQuestion(t,e){if(!t.enabled){e.is_correct=!e.is_correct;return}if(t.type=="single_choice"){if(!e.is_correct){e.is_correct=!0;return}t.options.forEach(n=>{n.label!==e.label&&(n.is_correct=!1)})}if(t.type=="multiple_choice"&&!t.options.filter(s=>s.is_correct).length&&!e.is_correct){e.is_correct=!0;return}this.updateQuestion(t)},openDeleteQuestionPrompt(t){this.$confirm(this.$t("Are you sure you want to delete this question?"),this.$t("Delete Question"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{var e,n,s;this.lesson.meta.quiz_questions=(s=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:s.filter(i=>i.slug!==t),this.saveData()})},closeModal(){this.showQuestionModal=!1},saveData(){this.saving=!0;const t={id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,{lesson:t}).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")},mounted(){document.body.classList.add("fcom-no-scroll"),this.$nextTick(()=>{this.appReady=!0})}},cYe={class:"fcom_full_editor"},uYe={class:"fcom_full_editor_header"},dYe={class:"fcom_desktop_only"},hYe={key:0},fYe={class:"full_editor_actions"},pYe={class:"fcom_lesson_camp"},mYe={class:"fcom_lesson_nav"},gYe=["title","href"],vYe={class:"fcom_lesson_content"},yYe={class:"fcom_quiz_editor"},bYe={class:"fcom_questions_wrap"},_Ye={key:0,class:"fcom_question_image"},wYe={class:"fcom_question_header"},xYe=["innerHTML","onClick"],kYe={class:"fcom_question_body"},CYe={class:"fcom_question_options"},SYe={key:0,class:"question_help_text"},$Ye={key:1,class:"fcom_meta_sorting"},AYe={key:1,class:"fcom_banner_image_holder add_quiz_banner"},EYe={key:0},MYe={key:0},TYe={style:{padding:"20px"}};function PYe(t,e,n,s,i,o){const r=W("ArrowLeft"),a=_e,l=Ge,c=W("ArrowRight"),u=W("arrow-down"),d=Oa,h=Da,f=La,p=W("View"),m=H1,b=_t,_=W("crepe-editor"),x=Ra,k=W("MoreFilled"),C=W("SwitchButton"),S=W("Edit"),E=W("Delete"),P=Zt,T=W("Top"),L=W("Bottom"),I=Ei,V=Ia,R=W("lesson-meta"),N=z1,F=W("AddQuestionModal"),B=B1,G=xt("loading");return v(),A("div",cYe,[y(B,null,{default:w(()=>[y(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var q;return[g("div",uYe,[g("div",{onClick:e[0]||(e[0]=X=>t.$emit("close")),class:"fcom_back_header"},[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1}),g("span",dYe,$(t.$t("Back to Lessons")),1),(q=n.course)!=null&&q.title?(v(),A("span",hYe,"("+$(n.course.title)+")",1)):O("",!0)]),g("div",fYe,[g("div",pYe,[g("div",null,$(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",mYe,[y(l,{onClick:e[1]||(e[1]=X=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1},8,["disabled"]),y(l,{onClick:e[2]||(e[2]=X=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:w(()=>[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!i.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=X=>i.showSideBar=!i.showSideBar)},{default:w(()=>[g("span",null,$(t.$t("Features")),1)]),_:1})):O("",!0),y(f,{onCommand:e[4]||(e[4]=X=>{n.lesson.status=X}),trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"draft"},{default:w(()=>[Y($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[Y($(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[y(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[Y($(t.$labelize(n.lesson.status))+" ",1),y(a,{class:"el-icon--right"},{default:w(()=>[y(u)]),_:1})]),_:1},8,["type"])]),_:1}),Oe((v(),D(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[G,i.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[y(a,null,{default:w(()=>[y(p)]),_:1})],8,gYe)])])]}),_:1}),y(B,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[y(V,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[g("div",vYe,[y(I,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var q,X;return[g("div",yYe,[y(b,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=K=>n.lesson.title=K),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),i.appReady?(v(),D(_,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=K=>n.lesson.message=K),autofocus:!0,placeholder:t.$t("Describe about this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),g("div",bYe,[(v(!0),A(te,null,we(n.lesson.meta.quiz_questions,(K,H)=>(v(),A("div",{key:K.slug,class:U(["fcom_question",{disabled:!K.enabled}])},[o.showQuestionImage(K)?(v(),A("div",_Ye,[y(x,{src:K.image_url},null,8,["src"])])):O("",!0),g("div",wYe,[g("div",{innerHTML:K.label_rendered,onClick:Q=>o.openEditQuestionModal(K),style:{cursor:"pointer"}},null,8,xYe),y(f,{trigger:"click",class:"fcom_question_actions"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{onClick:Q=>o.toggleQuestion(K)},{default:w(()=>[y(a,null,{default:w(()=>[y(C)]),_:1}),g("span",null,$(o.getStatusText(K)),1)]),_:2},1032,["onClick"]),y(d,{onClick:Q=>o.openEditQuestionModal(K)},{default:w(()=>[y(a,null,{default:w(()=>[y(S)]),_:1}),Y(" "+$(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(d,{onClick:Q=>o.openDeleteQuestionPrompt(K.slug)},{default:w(()=>[y(a,null,{default:w(()=>[y(E)]),_:1}),Y(" "+$(t.$t("Delete")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[y(l,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(k)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)]),g("div",kYe,[g("div",CYe,[(v(!0),A(te,null,we(K.options,Q=>(v(),A("div",{key:Q.label,class:"fcom_question_option"},[y(P,{modelValue:Q.is_correct,"onUpdate:modelValue":se=>Q.is_correct=se,onChange:se=>o.checkAndSaveQuestion(K,Q),class:U({single_choice:K.type=="single_choice"})},{default:w(()=>[Y($(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])]))),128))]),K.help_text?(v(),A("div",SYe,$(K.help_text),1)):O("",!0)]),o.showMoving?(v(),A("div",$Ye,[y(a,{onClick:Q=>o.moveUp(H)},{default:w(()=>[y(T)]),_:1},8,["onClick"]),y(a,{onClick:Q=>o.moveDown(H)},{default:w(()=>[y(L)]),_:1},8,["onClick"])])):O("",!0)],2))),128))]),(X=(q=n.lesson.meta)==null?void 0:q.quiz_questions)!=null&&X.length?(v(),D(l,{key:2,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[Y($("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",MYe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),A("div",AYe,[g("h4",null,$(t.$t("Add Question")),1),g("p",null,$(t.$t("No questions have been added yet. Click below to create your first quiz question and engage your learners!")),1),y(l,{onClick:o.openAddQuestionModal,class:"fcom_secondary_button add_btn"},{default:w(()=>[Y($("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",EYe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Oe(y(N,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[y(I,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",TYe,[y(R,{course:n.course,lesson:n.lesson,quiz_meta:!0},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[7]||(e[7]=q=>i.showSideBar=!1)},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512),[[jt,i.showSideBar||!t.isMobile]]),i.showQuestionModal?(v(),D(F,{key:0,lesson:n.lesson,question:i.question,onClose:o.closeModal,onAddQuestion:o.addQuestion,onUpdateQuestion:o.updateQuestion},null,8,["lesson","question","onClose","onAddQuestion","onUpdateQuestion"])):O("",!0)]),_:1})]),_:1})])}const IYe=ge(lYe,[["render",PYe]]),LYe={name:"SectionScheduler",components:{CaretBottom:lae},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let t=this.date+" "+this.time+":00";if(!dayjs(t).isValid()){this.$notify.error(this.$t("Please select a valid date and time"));return}this.section.scheduled_at=t,this.patchCourse({scheduled_at:t},()=>{this.show=!1})},saveUnlockDays(){this.patchCourse({reactions_count:this.unlock_after},()=>{this.section.reactions_count=this.unlock_after,this.show=!1})},patchCourse(t={},e=null){this.saving=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,t).then(n=>{this.$notify.success(this.$t("Schedule has been updated")),e&&e(n)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})},initUnlockDay(){if(this.show){this.show=!1;return}this.unlock_after=parseInt(this.section.reactions_count),this.show=!0},initPicker(){if(this.show){this.show=!1;return}let t=this.section.scheduled_at;if(!t){this.show=!0;return}this.date=dayjs(t).format("YYYY-MM-DD"),this.time=dayjs(t).format("HH:mm"),this.show=!0}}},OYe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},DYe={class:"fcom_scheduler_form"},RYe={class:"fcom_input_group"},VYe={class:"el_inline_date_picker"},FYe={class:"fcom_input_group"},NYe={class:"fcom_input_group"},BYe={class:"fcom_scheduler_form scheduler_structured"},zYe={class:"fcom_input_group"},HYe={class:"fcom_label"},UYe={class:"fcom_input_group"};function jYe(t,e,n,s,i,o){const r=W("CaretBottom"),a=_e,l=Rd,c=k5,u=Ge,d=Xi,h=e2,f=xt("loading");return v(),A("div",OYe,[n.course.settings.course_type=="scheduled"?(v(),D(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:i.show},{reference:w(()=>[g("button",{onClick:e[0]||(e[0]=(...p)=>o.initPicker&&o.initPicker(...p)),class:"fcom_input_select_btn"},[g("span",null,$(n.section.scheduled_at?t.smartDate(n.section.scheduled_at,!0,!0):t.$t("Select Drip date")),1),y(a,null,{default:w(()=>[y(r)]),_:1})])]),default:w(()=>[g("div",DYe,[g("div",RYe,[g("div",VYe,[y(l,{"value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:i.date,"onUpdate:modelValue":e[1]||(e[1]=p=>i.date=p)},null,8,["modelValue"])])]),g("div",FYe,[y(c,{modelValue:i.time,"onUpdate:modelValue":e[2]||(e[2]=p=>i.time=p),start:"00:00",end:"23:59",steps:15},null,8,["modelValue"])]),g("div",NYe,[Oe((v(),D(u,{disabled:i.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[Y($(t.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[f,i.saving]])])])]),_:1},8,["visible"])):O("",!0),n.course.settings.course_type=="structured"?(v(),D(d,{key:1,persistent:!1,placement:"bottom",width:275,visible:i.show},{reference:w(()=>[g("button",{onClick:e[3]||(e[3]=(...p)=>o.initUnlockDay&&o.initUnlockDay(...p)),class:"fcom_input_select_btn"},[g("span",null,$(n.section.reactions_count?t.$t("after %s days of enrollment",n.section.reactions_count):t.$t("Immediately")),1),y(a,null,{default:w(()=>[y(r)]),_:1})])]),default:w(()=>[g("div",BYe,[g("div",zYe,[g("div",HYe,$(t.$t("Unlock section after")),1),y(h,{modelValue:i.unlock_after,"onUpdate:modelValue":e[4]||(e[4]=p=>i.unlock_after=p),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),Y(" "+$(t.$t("Days")),1)]),g("div",UYe,[Oe((v(),D(u,{disabled:i.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[Y($(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,i.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const WYe=ge(LYe,[["render",jYe]]),YYe={name:"_SectionSechedulerEmail",components:{CrepeEditor:Yd},props:{section:{type:Object,required:!0},course:{type:Object,required:!0}},data(){return{editorOpen:!1,savingEmailMeta:!1,smartCodes:this.appVars.course_smart_codes}},methods:{openEditor(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.editorOpen=!0},getDefaultSubject(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.subject},getDefaultMessage(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.message},insertIntoSubject(t){const e=(this.section.meta.email_subject||"")+t;this.section.meta.email_subject=e.trim()},insertIntoMessage(t){const e=this.$refs.emailEditor;if(e&&typeof e.updateContent=="function")e.updateContent(t);else{const n=this.section.meta.email_body;this.section.meta.email_body=(n?n+`
133 `:"")+t}},saveSectionMeta(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingEmailMeta=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,{meta:this.section.meta}).then(t=>{this.editorOpen=!1,this.section.meta=t.topic.meta,this.$notify.success(this.$t("Email settings updated"))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingEmailMeta=!1})}},mounted(){var t,e,n;this.section.meta=this.section.meta||{},Object.assign(this.section.meta,{email_enabled:((t=this.section.meta)==null?void 0:t.email_enabled)??"no",email_subject:((e=this.section.meta)==null?void 0:e.email_subject)??this.getDefaultSubject(),email_body:((n=this.section.meta)==null?void 0:n.email_body)??this.getDefaultMessage()})}},qYe={class:"fcom_section_email_config"},GYe={class:"dialog_header"},XYe={class:"dialog_left"},KYe={class:"dialog_body"},ZYe={class:"fcom_input_group"},JYe={class:"fcom_label label_row"},QYe={class:"fcom_input_group"},eqe={class:"fcom_label label_row"},tqe={class:"fcom_extra_editor"},nqe={class:"dialog_footer"};function sqe(t,e,n,s,i,o){const r=Vd,a=Ge,l=Oa,c=Da,u=La,d=_t,h=W("crepe-editor"),f=Fs;return v(),A("div",qYe,[y(r,{"active-value":"yes","inactive-value":"no",disabled:!t.has_pro,modelValue:n.section.meta.email_enabled,"onUpdate:modelValue":e[0]||(e[0]=p=>n.section.meta.email_enabled=p),onClick:o.saveSectionMeta},null,8,["disabled","modelValue","onClick"]),y(a,{size:"small",text:"",class:"fcom_secondary_button",onClick:o.openEditor},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(f,{"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:i.editorOpen,"onUpdate:modelValue":e[4]||(e[4]=p=>i.editorOpen=p),width:t.drawerWidth},{header:w(()=>[g("div",GYe,[g("div",XYe,[g("h4",null,$(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",nqe,[y(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>i.editorOpen=!1)},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),y(a,{class:"fcom_primary_button",loading:i.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",KYe,[g("div",ZYe,[g("div",JYe,[g("span",null,$(t.$t("Subject")),1),y(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[y(c,null,{default:w(()=>[(v(!0),A(te,null,we(i.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[Y($(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[y(a,{class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),y(d,{modelValue:n.section.meta.email_subject,"onUpdate:modelValue":e[1]||(e[1]=p=>n.section.meta.email_subject=p),placeholder:t.$t("Enter email subject")},null,8,["modelValue","placeholder"])]),g("div",QYe,[g("div",eqe,[g("span",null,$(t.$t("Message")),1),y(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[y(c,null,{default:w(()=>[(v(!0),A(te,null,we(i.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[Y($(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[y(a,{class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",tqe,[y(h,{ref:"emailEditor",modelValue:n.section.meta.email_body,"onUpdate:modelValue":e[2]||(e[2]=p=>n.section.meta.email_body=p),placeholder:t.$t("Write the email message")},null,8,["modelValue","placeholder"])])])])]),_:1},8,["modelValue","width"])])}const iqe=ge(YYe,[["render",sqe]]),oqe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:lU,LessonLine:qWe,SectionScheduler:WYe,FluentDnD:pv,QuizEditor:IYe,SectionSechedulerEmail:iqe},data(){return{editing_title:!1,addingSectionItem:!1,newSectionItem:{title:"",type:""},working:!1,editingLesson:null,editingIndex:0,showAddSectionPopup:!1,showCopySectionPopup:!1,selectedCourseId:null,courses:[],loading:!1}},computed:{courseType(){var t;return(t=this.course.settings)==null?void 0:t.course_type},isLesson(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="text"},isQuiz(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="quiz"},selectedType(){return this.newSectionItem.type},hasSchedule(){return["scheduled","structured"].includes(this.courseType)},showEmailConfig(){return this.courseType=="scheduled"?this.section.scheduled_at||!1:this.section.reactions_count||!1}},methods:{handleSaveLesson(t){this.editingLesson=t,this.section.lessons[this.editingIndex]=t},updateLessonStatus(t,e){t.status=e},showTitleEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.fcom_section_title_editor.focus()})},patchSection(t){let e={};t.forEach(n=>{e[n]=this.section[n]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,e).then(n=>{console.log(n)}).catch(n=>{this.$handleError(n)})},handleLessonUpdated(t,e){let n={};e.forEach(s=>{n[s]=t[s]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+t.id,n).then(s=>{this.$notify.success(s.message)}).catch(s=>{this.$handleError(s)})},addSectionItem(t,e=!1){t&&t.preventDefault(),this.addingSectionItem=!0,this.$post("admin/courses/"+this.course.id+"/lessons",{...this.newSectionItem,section_id:parseInt(this.section.id)}).then(n=>{this.section.lessons.push(n.lesson),this.showAddSectionPopup=!1,this.newSectionItem.title="",this.newSectionItem.type="",e&&this.$nextTick(()=>{let s=this.section.lessons.length-1;this.editingLesson=this.section.lessons[s],this.editingIndex=s})}).catch(n=>{this.$handleError(n)}).finally(()=>{this.addingSectionItem=!1})},handleSectionAction(t){if(t=="edit_title"){this.showTitleEditor();return}t=="delete"&&this.$confirm(this.$t("Are you sure you want to delete this section? All the associated lessons and enrollment data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?"),showInput:!0,dangerouslyUseHTMLString:!0,inputPlaceholder:this.$t("Type %s to confirm","DELETE"),inputValidator(e){return e.toLowerCase()==="delete"?!0:this.$t("You must type %s to confirm","DELETE")},inputErrorMessage:this.$t("You must type %s to confirm","DELETE")}).then(e=>{if(e.value!="DELETE"){this.$notify.error({title:"Error",message:this.$t("You must type %s to confirm","DELETE")});return}this.working=!0,this.$del("admin/courses/"+this.course.id+"/sections/"+this.section.id).then(n=>{this.$emit("reload")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})}).catch(()=>{}),t==="copy_section"&&(this.fetchCourses(),this.showCopySectionPopup=!0,this.selectedCourseId=null,this.$nextTick(()=>{var e,n;document.querySelector(`.fcom_copy_section_popup.section_${(e=this.section)==null?void 0:e.id}`).style.display="block",document.querySelectorAll(`.fcom_copy_section_popup:not(.section_${(n=this.section)==null?void 0:n.id})`).forEach(s=>s.style.display="none")}))},fetchCourses(t=""){this.loading=!0,this.$get("admin/courses",{search:t}).then(e=>{var n;(n=e==null?void 0:e.courses)!=null&&n.data&&(this.courses=e.courses.data.filter(s=>s.id!==this.course.id))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},copySection(){this.showCopySectionPopup=!1,this.$put(`admin/courses/${this.selectedCourseId}/copy-section`,{section_id:this.section.id,from_course_id:this.course.id}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})},handleMoveLesson(t,e){this.$put("admin/courses/"+this.course.id+"/move-lesson",{lesson_id:t,section_id:e}).then(n=>{this.$notify.success(n.message),this.$emit("reload")}).catch(n=>{this.$handleError(n)})},handleDeleteLesson(t){this.$confirm(this.$t("Are you sure you want to delete this lesson? All the associated data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?")}).then(()=>{this.working=!0,this.$del("admin/courses/"+this.course.id+"/lessons/"+t.id).then(e=>{this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleChangeLesson(t){this.editingLesson=null,this.editingIndex=0,this.$nextTick(()=>{this.editingLesson=this.section.lessons[t],this.editingIndex=t,this.$router.push({query:{lesson_id:this.editingLesson.id}})})},initLessonEditor(t,e){this.editingLesson=t,this.editingIndex=e,this.$nextTick(()=>{this.$router.push({query:{lesson_id:t.id}})})},dropLesson({index:t}){const e=this.section.lessons.splice(t,1)[0];this.section.lessons.splice(t,0,e),this.resetLessonIndexes()},resetLessonIndexes(){const t={};Cc(this.section.lessons,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id+"/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},handleCloseLessonEditor(){this.editingLesson=null,this.editingIndex=0,this.$router.push({query:{}})},handleAddSectionItem(t){this.newSectionItem.type=t,this.$nextTick(()=>{this.showAddSectionPopup=!0,document.querySelector(`.fcom_add_section_popup.section_${this.section.id}`).style.display="block",document.querySelectorAll(`.fcom_add_section_popup:not(.section_${this.section.id})`).forEach(e=>e.style.display="none"),this.$refs.fcom_lesson_or_quiz_title.focus()})}},mounted(){let t=parseInt(this.$route.query.lesson_id);if(t){let e=this.section.lessons.findIndex(n=>n.id==t);e>-1&&this.initLessonEditor(this.section.lessons[e],e)}}},rqe={class:"fcom_section_primary"},aqe={class:"fcom_section_primary_item"},lqe={key:0,class:"fcom_heading_item"},cqe={class:"fcom_space_counts"},uqe={class:"fcom_section_config fcom_label_schedule"},dqe={class:"fcom_section_config fcom_label_email"},hqe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},fqe={key:0},pqe={class:"fcom_move_popup_close"},mqe={class:"fcom_move_popup_close"},gqe={key:0,class:"fcom_section_items"},vqe={key:0};function yqe(t,e,n,s,i,o){const r=_e,a=Ge,l=_t,c=W("section-scheduler"),u=W("SectionSechedulerEmail"),d=Oa,h=Da,f=La,p=an,m=fn,b=W("Close"),_=ln,x=Qt,k=W("MoreFilled"),C=W("lesson-line"),S=W("FluentDnD"),E=W("LessonEditor"),P=W("QuizEditor"),T=xt("loading");return v(),A(te,null,[Oe((v(),A("div",rqe,[g("div",aqe,[g("div",{class:U(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:i.editing_title}])},[le(t.$slots,"before_section_heading"),i.editing_title?(v(),D(l,{key:1,ref:"fcom_section_title_editor",modelValue:n.section.title,"onUpdate:modelValue":e[3]||(e[3]=L=>n.section.title=L),onKeyup:e[4]||(e[4]=Nt(L=>o.patchSection(["title"]),["enter"]))},{append:w(()=>[y(a,{onClick:e[2]||(e[2]=L=>o.patchSection(["title"]))},{default:w(()=>[Y($(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),A("h4",lqe,[g("span",{onClick:e[0]||(e[0]=L=>i.editing_title=!0)},$(n.section.title),1),n.section.lessons&&n.section.lessons.length?(v(),D(a,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",size:"small",text:"",onClick:e[1]||(e[1]=L=>n.section.isCollapsed=!n.section.isCollapsed)},{default:w(()=>[y(r,{style:qe(n.section.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...e[12]||(e[12]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","data-v-d2e47025":""},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})],-1)])]),_:1},8,["style"]),g("span",cqe,$(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),A(te,{key:0},[g("div",uqe,[y(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",dqe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",hqe,[y(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"lesson"},{default:w(()=>[Y($(t.$t("Lesson")),1)]),_:1}),y(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[Y($(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),A("span",fqe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:w(()=>[y(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Oe(g("div",{class:U(["fcom_add_section_popup","section_"+n.section.id])},[y(m,{onSubmit:[e[7]||(e[7]=Be(L=>t.doNothing(),["prevent"])),o.addSectionItem],"label-position":"top"},{default:w(()=>[y(p,{label:o.selectedType==="quiz"?t.$t("Quiz Title"):t.$t("Lesson Title")},{default:w(()=>[y(l,{ref:"fcom_lesson_or_quiz_title",modelValue:i.newSectionItem.title,"onUpdate:modelValue":e[5]||(e[5]=L=>i.newSectionItem.title=L),placeholder:o.selectedType==="quiz"?t.$t("Enter Quiz title"):t.$t("Enter Lesson title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,null,{default:w(()=>[Oe((v(),D(a,{disabled:i.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[Y($(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[T,i.addingSectionItem]]),Oe((v(),D(a,{disabled:i.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:w(()=>[Y($(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,i.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",pqe,[y(r,{onClick:e[8]||(e[8]=L=>i.showAddSectionPopup=!1)},{default:w(()=>[y(b)]),_:1})])],2),[[jt,i.showAddSectionPopup]]),Oe(g("div",{class:U(["fcom_copy_section_popup","section_"+n.section.id])},[y(m,{onSubmit:e[10]||(e[10]=Be(L=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(p,{label:t.$t("Copy Section to a different Course")},{default:w(()=>[y(x,{filterable:"",clearable:"",remote:"","remote-show-suffix":"","remote-method":o.fetchCourses,modelValue:i.selectedCourseId,"onUpdate:modelValue":e[9]||(e[9]=L=>i.selectedCourseId=L),loading:i.loading,placeholder:t.$t("Select Course")},{default:w(()=>[(v(!0),A(te,null,we(i.courses,L=>(v(),D(_,{key:L.id,label:L.title,value:L.id},null,8,["label","value"]))),128))]),_:1},8,["remote-method","modelValue","loading","placeholder"])]),_:1},8,["label"]),y(a,{onClick:o.copySection,disabled:!i.selectedCourseId,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",mqe,[y(r,{onClick:e[11]||(e[11]=L=>i.showCopySectionPopup=!1)},{default:w(()=>[y(b)]),_:1})])],2),[[jt,i.showCopySectionPopup]]),y(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"edit_title"},{default:w(()=>[Y($(t.$t("Edit Title")),1)]),_:1}),y(d,{command:"copy_section"},{default:w(()=>[Y($(t.$t("Copy To")),1)]),_:1}),y(d,{command:"delete"},{default:w(()=>[Y($(t.$t("Delete section")),1)]),_:1})]),_:1})]),default:w(()=>[y(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[y(r,null,{default:w(()=>[y(k)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),A("div",gqe,[y(S,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item"},{item:w(({data:L,index:I})=>[(v(),D(C,{course:n.course,sections:n.sections,key:L.id,lesson:L,onDeleteLesson:o.handleDeleteLesson,onUpdated:o.handleLessonUpdated,onMoveLesson:o.handleMoveLesson,onShowEditor:V=>o.initLessonEditor(L,I)},{before_section_heading:w(()=>[...e[13]||(e[13]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[T,i.working]]),i.editingLesson?(v(),A("div",vqe,[(v(),D(Ta,{to:"body"},[o.isLesson?(v(),D(E,{key:0,course:n.course,section:n.section,lesson:i.editingLesson,editingIndex:i.editingIndex,onChangeLesson:o.handleChangeLesson,onClose:o.handleCloseLessonEditor},null,8,["course","section","lesson","editingIndex","onChangeLesson","onClose"])):O("",!0),o.isQuiz?(v(),D(P,{key:1,course:n.course,section:n.section,lesson:i.editingLesson,editingIndex:i.editingIndex,onSaved:o.handleSaveLesson,onClose:o.handleCloseLessonEditor,onChangeLesson:o.handleChangeLesson},null,8,["course","section","lesson","editingIndex","onSaved","onClose","onChangeLesson"])):O("",!0)]))])):O("",!0)],64)}const bqe=ge(oqe,[["render",yqe]]),_qe={name:"EditLessons",props:["course"],components:{SectionPart:bqe,FluentDnD:pv},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return Cc(this.sections,e=>{t+=e.lessons.length}),t}},methods:{showAddSectionPopup(){this.$nextTick(()=>{this.$refs.fcom_section_title_add&&this.$refs.fcom_section_title_add.focus()})},fetchSections(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/sections").then(t=>{this.sections=t.sections}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},dropSection({indx:t}){const e=this.sections.splice(t,1)[0];this.sections.splice(t,0,e),this.resetSectionIndexes()},addSection(){this.addingSection=!0,this.$post("admin/courses/"+this.course.id+"/sections",this.newSection).then(t=>{this.sections.push(t.section),this.$refs.add_section.hide(),this.newSection.title="",this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.addingSection=!1})},resetSectionIndexes(){const t={};Cc(this.sections,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},toggleSectionCollapse(){this.isCollapsed=!this.isCollapsed,Cc(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},wqe={class:"fcom_course_lessons"},xqe={class:"fcom_settings_header"},kqe={class:"fcom_settings_header_meta"},Cqe={class:"fcom_settings_header_meta_item"},Sqe={class:"fcom_card_section_heading"},$qe={key:0},Aqe={class:"fcom_section_labels"},Eqe={class:"fcom_lebel fcom_label_lesson"},Mqe={class:"fcom_lebel fcom_label_schedule"},Tqe={class:"fcom_lebel fcom_label_email"};function Pqe(t,e,n,s,i,o){const r=Jt,a=_e,l=Ge,c=_t,u=an,d=fn,h=Xi,f=W("section-part"),p=W("FluentDnD"),m=xt("loading");return v(),A("div",wqe,[g("div",xqe,[g("div",null,[g("h2",null,$(t.$t("Lessons")),1),g("div",kqe,[g("div",Cqe,[g("b",null,$(t.$t("Type:")),1),Y(" "+$(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,$(t.$t("Status:")),1),Y(" "+$(t.$labelize(n.course.status))+" • ",1),g("b",null,$(t.$t("Visibility:")),1),Y(" "+$(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:U(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",Sqe,[i.loading?(v(),D(r,{key:1,rows:1})):(v(),A("h3",$qe,$(t.$_n("%d Section","%d Sections",i.sections.length))+" • "+$(t.$_n("%d Lesson","%d Lessons",o.lessonsCount)),1)),g("div",null,[o.lessonsCount&&i.sections.length>1?(v(),D(l,{key:0,title:t.$t("Expand/Close all sections"),onClick:o.toggleSectionCollapse,class:"fcom_secondary_button"},{default:w(()=>[y(a,{style:qe(i.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...e[2]||(e[2]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",color:"currentColor",fill:"none"},[g("path",{d:"M17.999 12.4999L11.999 18.4999L5.99898 12.4999",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M17.9993 5.49951L11.9994 11.4995L5.99932 5.49956",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["style"])]),_:1},8,["title","onClick"])):O("",!0),y(h,{persistent:!1,ref:"add_section",placement:"bottom",width:400,trigger:"click",onShow:o.showAddSectionPopup},{reference:w(()=>[y(l,{class:"fcom_primary_button",bg:""},{default:w(()=>[Y($(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[y(d,{onSubmit:e[1]||(e[1]=Be(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(u,{label:t.$t("Section Title")},{default:w(()=>[y(c,{ref:"fcom_section_title_add",onKeydown:Nt(Be(o.addSection,["prevent"]),["enter"]),modelValue:i.newSection.title,"onUpdate:modelValue":e[0]||(e[0]=b=>i.newSection.title=b),placeholder:t.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),y(u,null,{default:w(()=>[Oe((v(),D(l,{disabled:i.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[m,i.addingSection]])]),_:1})]),_:1})]),_:1},8,["onShow"])])]),i.loading?(v(),D(r,{key:0,animated:!0,rows:10,style:{padding:"1rem"}})):O("",!0),g("div",Aqe,[g("div",Eqe,$(t.$t("Lesson name")),1),g("div",Mqe,$(t.$t("Schedule")),1),g("div",Tqe,$(t.$t("E-mail")),1),e[3]||(e[3]=g("div",{class:"fcom_lebel fcom_label_actions"},null,-1))]),y(p,{items:i.sections,onDrop:o.dropSection,"item-class":"fcom_section_item"},{item:w(({data:b})=>[y(f,{onReload:o.fetchSections,course:n.course,sections:i.sections,section:b},{before_section_heading:w(()=>[...e[4]||(e[4]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const Iqe=ge(_qe,[["render",Pqe]]),Lqe={name:"GroupIcon"},Oqe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dqe(t,e,n,s,i,o){return v(),A("svg",Oqe,[...e[0]||(e[0]=[g("path",{d:"M13.8494 12C14.3489 12 14.7462 11.6856 15.103 11.2461C15.8333 10.3463 14.6342 9.62723 14.1769 9.27507C13.712 8.91708 13.1929 8.71428 12.6667 8.66667M12 7.33333C12.9205 7.33333 13.6667 6.58714 13.6667 5.66667C13.6667 4.74619 12.9205 4 12 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),g("path",{d:"M2.15096 12C1.65143 12 1.2541 11.6856 0.897356 11.2461C0.167051 10.3463 1.36611 9.62723 1.82342 9.27507C2.28831 8.91708 2.80738 8.71428 3.33366 8.66667M3.66699 7.33333C2.74652 7.33333 2.00033 6.58714 2.00033 5.66667C2.00033 4.74619 2.74652 4 3.66699 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),g("path",{d:"M5.38953 10.0738C4.70834 10.495 2.92232 11.3551 4.01013 12.4313C4.54151 12.957 5.13334 13.333 5.87741 13.333H10.1232C10.8673 13.333 11.4591 12.957 11.9905 12.4313C13.0783 11.3551 11.2923 10.495 10.6111 10.0738C9.01375 9.08608 6.9869 9.08608 5.38953 10.0738Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M10.3337 4.99984C10.3337 6.2885 9.28899 7.33317 8.00033 7.33317C6.71166 7.33317 5.66699 6.2885 5.66699 4.99984C5.66699 3.71117 6.71166 2.6665 8.00033 2.6665C9.28899 2.6665 10.3337 3.71117 10.3337 4.99984Z",stroke:"currentColor"},null,-1)])])}const Rqe=ge(Lqe,[["render",Dqe]]),Vqe={name:"ManageCourses",components:{CreateCourseForm:gS,AppLayout:mi,Layout:pi,GroupIcon:Rqe,Pagination:qd,Search:G_},data(){return{courses:[],loading:!1,pagination:{page:1,per_page:24,total:0},search:"",status:"",sort_by:"latest",courseCategories:null,topic_slug:null,newCourseModal:!1}},methods:{fetchCourses(){this.loading||(this.loading=!0,this.$get("admin/courses",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,status:this.status,sort_by:this.sort_by,topic_slug:this.topic_slug,with_categories:!this.courseCategories}).then(t=>{this.courses=t.courses.data,this.pagination.total=t.courses.total,t.course_categories&&t.course_categories.length&&(this.courseCategories=t.course_categories)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchCourses()},setStatus(t){this.status=t,this.toSearch()},setTopic(t){this.topic_slug=t,this.toSearch()},getExcerpt(t,e=200){if(!t)return"";let n=t.replace(/(<([^>]+)>)/ig,"");return n.length>e&&(n=n.substring(0,e)+"..."),n},navigateToEditLessons(t){this.$router.push({name:"course_overview",params:{course_id:t}})}},mounted(){this.fetchCourses()}},Fqe={class:"object_menu"},Nqe={class:"fcom_space_menu_ul"},Bqe={key:0,class:"fcom_space_topics"},zqe={class:"fcom_topics_filters"},Hqe={class:"search_member"},Uqe={class:"feed_filters"},jqe={class:"fcom_feed_filter_label"},Wqe={class:"fcom_courses"},Yqe={class:"fcom_box_card_list"},qqe=["onClick"],Gqe=["src"],Xqe={key:1,class:"fcom_no_image"},Kqe={class:"fcom_box_card_info"},Zqe={class:"fcom_box_card_name"},Jqe={class:"fcom_box_card_by"},Qqe={class:"fcom_box_card_details"},eGe={class:"inline_details"},tGe={class:"inline_details"},nGe={key:0,class:"fcom_box_card_description"},sGe={class:"fcom_box_card_action"},iGe=["onClick"],oGe={key:0,class:"fcom_no_items_wrap"};function rGe(t,e,n,s,i,o){const r=Ge,a=Ei,l=W("Search"),c=_e,u=_t,d=ln,h=Qt,f=Bo,p=W("router-link"),m=W("GroupIcon"),b=W("pagination"),_=W("layout"),x=W("app-layout"),k=W("create-course-form"),C=Al,S=xt("loading");return v(),A(te,null,[y(x,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[y(_,{wrapper_class:"no_bg_layout",title:t.$t("Manage Courses")+(i.pagination.total?" ("+i.pagination.total+")":"")},{actions:w(()=>[g("div",Fqe,[g("ul",Nqe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Be(E=>o.setStatus(""),["prevent"])),class:U(i.status===""?"router-link-active router-link-exact-active":""),href:"#"},$(t.$t("All")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Be(E=>o.setStatus("published"),["prevent"])),class:U(i.status==="published"?"router-link-active router-link-exact-active":""),href:"#"},$(t.$t("Published")),3)]),g("li",null,[g("a",{onClick:e[2]||(e[2]=Be(E=>o.setStatus("draft"),["prevent"])),class:U(i.status==="draft"?"router-link-active router-link-exact-active":""),href:"#"},$(t.$t("Draft")),3)]),g("li",null,[y(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=E=>i.newCourseModal=!0)},{default:w(()=>[Y($(t.$t("Add Course")),1)]),_:1})])])])]),default:w(()=>[i.courseCategories&&i.courseCategories.length?(v(),A("div",Bqe,[y(a,null,{default:w(()=>[g("div",zqe,[y(r,{onClick:e[4]||(e[4]=E=>o.setTopic("")),class:U({fcom_active_topic:!i.topic_slug})},{default:w(()=>[Y($(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),A(te,null,we(i.courseCategories,E=>(v(),D(r,{key:E.slug,onClick:P=>o.setTopic(E.slug),class:U({fcom_active_topic:E.slug==i.topic_slug})},{default:w(()=>[Y($(E.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",Hqe,[y(u,{clearable:"",onClear:o.toSearch,onKeydown:Nt(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[5]||(e[5]=E=>i.search=E),placeholder:t.$t("Search Courses...")},{prefix:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",Uqe,[e[10]||(e[10]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",jqe,$(t.$t("Sort by:")),1),y(h,{modelValue:i.sort_by,"onUpdate:modelValue":e[6]||(e[6]=E=>i.sort_by=E),class:"fcom_minimal_select space_sort_select","popper-class":"plain_select",onChange:o.toSearch},{default:w(()=>[y(d,{value:"latest",label:t.$t("Latest")},null,8,["label"]),y(d,{value:"alphabetical",label:t.$t("Alphabetical")},null,8,["label"])]),_:1},8,["modelValue","onChange"])]),Oe((v(),A("div",Wqe,[g("div",Yqe,[(v(!0),A(te,null,we(i.courses,E=>{var P;return v(),A("div",{key:E.id,class:"fcom_each_box_card"},[g("div",{class:"fcom_box_card_avatar",onClick:T=>o.navigateToEditLessons(E.id)},[E.cover_photo?(v(),A("img",{key:0,src:E.cover_photo,alt:""},null,8,Gqe)):(v(),A("div",Xqe))],8,qqe),g("div",Kqe,[g("div",Zqe,[y(p,{class:"course_route",to:{name:"course_overview",params:{course_id:E.id}}},{default:w(()=>[Y($(o.getExcerpt(E.title,20))+" ",1),E.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:w(()=>[Y($(E.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",Jqe,$(t.$t("by %s",(P=E==null?void 0:E.owner)==null?void 0:P.display_name)),1)]),g("div",Qqe,[g("div",eGe,[g("span",null,$(t.$_n("%d Section","%d Sections",E.sectionsCount)),1),e[11]||(e[11]=g("span",{class:"fcom_inline_separator"},null,-1)),g("span",null,$(t.$_n("%d Lesson","%d Lessons",E.lessonsCount)),1)]),g("div",tGe,[y(c,null,{default:w(()=>[y(m)]),_:1}),Y(" "+$(t.$_n("%d student","%d students",E.students_count||0)),1)])]),E.description?(v(),A("div",nGe,$(o.getExcerpt(E.description,40)),1)):O("",!0),g("div",sGe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(E.id)},$(t.$t("Manage")),9,iGe)])])])}),128))]),y(b,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:i.pagination},null,8,["onFetch","pagination"]),!i.loading&&!i.courses.length?(v(),A("div",oGe,[i.topic_slug?(v(),A(te,{key:0},[g("h3",null,$(t.$t("No courses found in this topic")),1),g("p",null,$(t.$t("No courses found based on your search criteria")),1)],64)):i.search?(v(),A(te,{key:1},[g("h3",null,$(t.$t("No courses found based on your search criteria")),1),g("p",null,$(t.$t("No courses match your search criteria. Try adjusting your search terms or browse our course catalog.")),1)],64)):i.status?(v(),A(te,{key:2},[g("h3",null,$(t.$t("No courses found")),1),g("p",null,$(t.$t("No courses match your current filters. Try adjusting your filters.")),1)],64)):(v(),A(te,{key:3},[g("h3",null,$(t.$t("Create your first course")),1),g("p",null,$(t.$t("Deliver engaging & high-performance learning experiences in your community.")),1),y(r,{onClick:e[7]||(e[7]=E=>i.newCourseModal=!0),class:"fcom_primary_button fcom_mt_10"},{default:w(()=>[Y($(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[S,i.loading]])]),_:1},8,["title"])]),_:1}),y(C,{"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,modelValue:i.newCourseModal,"onUpdate:modelValue":e[9]||(e[9]=E=>i.newCourseModal=E),direction:"rtl"},{header:w(()=>[g("h4",null,$(t.$t("Create a new course")),1)]),default:w(()=>[i.newCourseModal?(v(),D(k,{key:0,onCompleted:e[8]||(e[8]=E=>{i.newCourseModal=!1,o.fetchCourses()})})):O("",!0)]),_:1},8,["size","modelValue"])],64)}const aGe=ge(Vqe,[["render",rGe]]),lGe={name:"BuddyPress",props:{is_buddyboss:{type:Boolean,default:!1}},data(){return{stage:"config",loading:!1,groupItems:[],stats:{},featureConfig:{},current_status:{},configMap:{},reset_migration:"no",spaceGroups:window.fluentComAdmin.space_groups,migrating:!1,max_ids:{},has_previous_migration:!1,delete_current_data:"no"}},methods:{getMigrationConfig(){this.loading=!0,this.$get("migrations/buddypress/config").then(t=>{this.groupItems=t.groupItems,this.featureConfig=t.featureConfig,this.stats=t.stats,this.current_status=t.current_status,this.has_previous_migration=t.has_previous}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},startMigration(){this.migrating=!0,this.$post("migrations/buddypress/start",{config:this.configMap,reset_migration:this.reset_migration,delete_current_data:this.delete_current_data}).then(t=>{this.migrating=!0,this.current_status=t.current_status,this.max_ids=t.max_ids,this.stage="migrating",this.startPolling()}).catch(t=>{this.$handleError(t),this.migrating=!1})},startPolling(){this.$get("migrations/buddypress/status").then(t=>{this.current_status=t,this.current_status.current_stage!="completed"&&this.startPolling()}).catch(t=>{this.$handleError(t)})},percentage(t,e){return parseInt(t/e*100)}},computed:{providerName(){return this.is_buddyboss?"BuddyBoss":"BuddyPress"},completedSteps(){let t=this.current_status.current_stage;return t=="group_members"?{group_members:!0,posts:!1,users:!1}:t=="posts"?{group_members:!0,posts:!0,users:!1}:t=="users"?{group_members:!0,posts:!0,users:!1}:t=="completed"?{group_members:!0,posts:!0,users:!0}:{group_members:!1,posts:!1,users:!1}}},mounted(){this.getMigrationConfig()}},cGe={class:"setting_header"},uGe={class:"setting_body"},dGe={key:1,class:"fcom_bp_migration_space_table"},hGe={class:"fcom_listed fcom_mb_20"},fGe={key:0},pGe={key:1},mGe={key:2,style:{"text-align":"center"}},gGe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},vGe={key:0},yGe={key:1},bGe={key:0},_Ge={key:1},wGe={key:2},xGe={key:3},kGe=["href"],CGe={key:3};function SGe(t,e,n,s,i,o){const r=Jt,a=Bo,l=Jr,c=W("InfoFilled"),u=_e,d=js,h=ln,f=Qt,p=Zr,m=Zt,b=Ge,_=t2,x=xt("loading");return v(),A(te,null,[g("div",cGe,[g("h2",null,$(t.$t("%s Migration",o.providerName)),1)]),g("div",uGe,[i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.stage=="config"?(v(),A("div",dGe,[g("h5",null,"Please configure your "+$(o.providerName)+" groups for FluentCommunity Menu",1),g("p",null,"The "+$(o.providerName)+" groups will be created with the same name and users, posts, comments, reactions will be migrated to FluentCommunity.",1),e[5]||(e[5]=g("hr",null,null,-1)),i.featureConfig.has_groups?(v(),D(p,{key:0,data:i.groupItems,ref:"spaceTable","empty-text":t.$t("No Groups Found")},{default:w(()=>[y(l,{label:n.is_buddyboss?t.$t("BudyBoss Group"):t.$t("BudyPress Group")},{default:w(k=>[g("div",null,[Y($(k.row.name)+" ",1),k.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:w(()=>[Y($(t.$t("Migrated")),1)]),_:1})):O("",!0)])]),_:1},8,["label"]),y(l,{label:t.$t("FluentCommunity Menu Group"),"class-name":"space_groups"},{header:w(()=>[g("span",null,$(t.$t("FluentCommunity Menu Group")),1),y(d,{class:"box-item",effect:"dark",content:t.$t("Space will be created under the selected Menu group."),placement:"right"},{default:w(()=>[y(u,{class:"el-icon--right"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["content"])]),default:w(k=>[y(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:i.configMap[k.row.id],"onUpdate:modelValue":C=>i.configMap[k.row.id]=C,filterable:""},{default:w(()=>[y(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),A(te,null,we(i.spaceGroups,C=>(v(),D(h,{key:C.id,label:C.title,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),e[6]||(e[6]=g("h5",{style:{margin:"20px 0 20px"}},"The following data will be migrated to FluentCommunity",-1)),g("ul",hGe,[i.featureConfig.has_groups?(v(),A("li",fGe,"Total Groups: "+$(i.groupItems.length),1)):O("",!0),g("li",null,"Total Activity (Posts): "+$(t.$formatNumber(i.stats.total_posts))+" (+ associate favorites/reactions)",1),g("li",null,"Total Comments: "+$(t.$formatNumber(i.stats.total_comments)),1),g("li",null,"Total Users: "+$(t.$formatNumber(i.stats.total_community_users)),1),i.stats.total_reactions?(v(),A("li",pGe,"Total Reactions: "+$(t.$formatNumber(i.stats.total_reactions)),1)):O("",!0)]),i.has_previous_migration?(v(),D(m,{key:1,modelValue:i.reset_migration,"onUpdate:modelValue":e[0]||(e[0]=k=>i.reset_migration=k),"true-value":"yes","false-value":"no"},{default:w(()=>[...e[3]||(e[3]=[Y(" Restart Migration (If unchecked, then it will continue from the last migration stage) ",-1)])]),_:1},8,["modelValue"])):O("",!0),i.has_previous_migration&&i.reset_migration=="yes"?(v(),D(m,{key:2,modelValue:i.delete_current_data,"onUpdate:modelValue":e[1]||(e[1]=k=>i.delete_current_data=k),"true-value":"yes","false-value":"no"},{default:w(()=>[...e[4]||(e[4]=[Y(" Delete Current Data (If checked, all current data of fluent community will be deleted and migration will start from scratch) ",-1)])]),_:1},8,["modelValue"])):O("",!0),e[7]||(e[7]=g("hr",{class:"fcom_mb_20"},null,-1)),y(b,{loading:i.migrating,onClick:e[2]||(e[2]=k=>o.startMigration()),class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Start Migrating Data")),1)]),_:1},8,["loading"])])):i.stage=="migrating"?(v(),A("div",mGe,[g("ul",gGe,[i.featureConfig.has_groups?(v(),A("li",vGe,[e[8]||(e[8]=Y("Groups ",-1)),y(a,{type:"success"},{default:w(()=>[Y($(t.$t("Migrated")),1)]),_:1})])):O("",!0),i.featureConfig.has_groups?Oe((v(),A("li",yGe,[e[9]||(e[9]=Y(" Group Members ",-1)),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:w(()=>[Y($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[x,i.current_status.current_stage=="group_members"]]):O("",!0),Oe((v(),A("li",null,[Y($(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:w(()=>[Y($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[x,i.current_status.current_stage=="posts"]]),Oe((v(),A("li",null,[Y($(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:w(()=>[Y($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[x,i.current_status.current_stage=="users"]])]),e[16]||(e[16]=g("hr",{style:{"margin-bottom":"20px"}},null,-1)),i.current_status.current_stage=="group_members"?(v(),A("div",bGe,[g("h3",null,"Migrating Group Members from "+$(o.providerName)+" to FluentCommunity Spaces",1),e[10]||(e[10]=g("p",null,"Please do not close this window or go to other pages",-1)),e[11]||(e[11]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+$(i.current_status.last_migrated_member_id)+"/"+$(i.max_ids.group_member_max),1),y(_,{"stroke-width":26,percentage:o.percentage(i.current_status.last_migrated_member_id,i.max_ids.group_member_max),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="posts"?(v(),A("div",_Ge,[g("h3",null,"Migrating Posts from "+$(o.providerName)+" to FluentCommunity",1),e[12]||(e[12]=g("p",null,"Please do not close this window or go to other pages",-1)),e[13]||(e[13]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+$(i.current_status.last_activity_id)+"/"+$(i.max_ids.max_activity_id),1),y(_,{"stroke-width":26,percentage:o.percentage(i.current_status.last_activity_id,i.max_ids.max_activity_id),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="users"?(v(),A("div",wGe,[g("h3",null,"Syncing User Data from "+$(o.providerName)+" to FluentCommunity",1),e[14]||(e[14]=g("p",null,"Please do not close this window or go to other pages",-1)),e[15]||(e[15]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+$(i.current_status.last_migrated_user_id)+"/"+$(i.max_ids.max_user_id),1),y(_,{"stroke-width":26,percentage:o.percentage(i.current_status.last_migrated_user_id,i.max_ids.max_user_id),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="completed"?(v(),A("div",xGe,[g("h3",null,$(t.$t("Congratulation! Migration has been completed!")),1),g("p",null,$(t.$t("Enjoy the blazing-fast community portal. Please go to the portal and review your data.")),1),g("a",{class:"el-button fcom_primary_button fcom_mt_20",href:t.appVars.portal_url},$(t.$t("Go to Community Portal")),9,kGe)])):O("",!0)])):(v(),A("div",CGe,$(t.$t("Migration Completed")),1))])],64)}const $Ge=ge(lGe,[["render",SGe]]),AGe={name:"ManageMigrations",components:{BuddyPress:$Ge,Layout:pi,AppLayout:mi},data(){return{selectedMigration:"",loading:!1,migrations:[]}},methods:{getMigrations(){this.loading=!0,this.$get("migrations/").then(t=>{this.migrations=t.migrations,this.loading=!1}).catch(t=>{this.loading=!1,console.log(t)})}},mounted(){this.getMigrations()}},EGe={class:"settings_router"},MGe={class:"fhr_content_layout_body"},TGe={key:0,class:"fcom_migration_selectors white_loaded"},PGe={key:1},IGe={style:{margin:"0"}},LGe={class:"fcom_box_card_list"},OGe=["onClick"],DGe={style:{padding:"10px"},class:"fcom_box_card_avatar"},RGe=["src"],VGe={class:"fcom_box_card_info"},FGe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},NGe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},BGe={key:1,class:"fcom_migration_content"};function zGe(t,e,n,s,i,o){const r=Jt,a=Yc,l=W("BuddyPress"),c=W("layout"),u=W("app-layout");return v(),D(u,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[y(c,{class:"no_bg_layout",title:t.$t("Manage Migrations")},{default:w(()=>[g("div",EGe,[g("div",MGe,[i.selectedMigration?(v(),A("div",BGe,[i.selectedMigration=="buddypress"||i.selectedMigration=="buddyboss"?(v(),D(l,{key:0,is_buddyboss:i.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),A("div",TGe,[i.loading?(v(),D(r,{key:0,animated:!0})):(v(),A("div",PGe,[g("h3",IGe,$(t.$t("Migrate Data from other plugins.")),1),e[0]||(e[0]=g("p",{style:{margin:"10px 0 20px"}},"Please select a plugin from where you want to migrate data to FluentCommunity.",-1)),g("div",LGe,[(v(!0),A(te,null,we(i.migrations,d=>(v(),A("div",{style:{border:"1px solid var(--fcom-primary-border, #e5e7eb)","text-align":"center"},key:d.key,onClick:h=>i.selectedMigration=d.key,class:"fcom_each_box_card"},[g("div",DGe,[d.logo?(v(),A("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,RGe)):O("",!0)]),g("div",VGe,[g("div",FGe,[g("h4",null,$(d.title),1)])])],8,OGe))),128))])])),y(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[Y($(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",NGe,$(t.$t("Read Documentation")),1)])]),_:1})]))])])]),_:1},8,["title"])]),_:1})}const HGe=ge(AGe,[["render",zGe]]),UGe={name:"GeneticPromo"},jGe={class:"fcom_generic_promo"},WGe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},YGe={style:{"font-size":"18px","margin-bottom":"10px"}},qGe=["href"];function GGe(t,e,n,s,i,o){return v(),A("div",jGe,[g("div",WGe,[g("h3",YGe,$(t.$t("This feature is available on the pro version of FluentCommunity")),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade Now")),9,qGe)])])}const XGe=ge(UGe,[["render",GGe]]),KGe={name:"AccessAutomator",components:{GeneticPromo:XGe,AppLayout:mi,Layout:pi},data(){return{loading:!1,saving:!1,settings:{},crm_tags:[],spaceGroups:null,has_fluentcrm:!1}},methods:{fetchSettings(){this.loading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.has_fluentcrm=t.has_fluentcrm,this.settings=t.settings,this.spaceGroups=t.spaceGroups,this.crm_tags=t.crm_tags}).catch(t=>{console.error(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("This feature is available on the pro version of FluentCommunity"));return}this.saving=!0,this.$post("settings/crm-tagging-config",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},installPlugin(t){this.saving=!0,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.fetchSettings()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.has_pro&&this.fetchSettings()}},ZGe={class:"settings_router"},JGe={class:"fhr_content_layout_body_"},QGe={class:"fcom_settings_header"},eXe={class:"setting_body_"},tXe={key:0,class:"white_loaded"},nXe={key:1,class:"white_loaded"},sXe={key:2,class:"white_loaded"},iXe={class:"fcom_generic_promo"},oXe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},rXe={style:{"font-size":"18px","margin-bottom":"10px"}},aXe={key:3},lXe={class:"white_loaded fcom_mb_20"},cXe={class:"fcom_input_wrap"},uXe={key:0},dXe={class:"fcom_input_wrap"},hXe={class:"fcom_input_wrap"},fXe={key:0,class:"fcom_input_wrap"},pXe={key:0,class:"fcom_card_sections fcom_course_type_structured"},mXe={class:"fcom_section_labels"},gXe={style:{"font-weight":"bold","font-size":"16px"},class:"fcom_lebel fcom_label_lesson"},vXe={style:{"text-align":"right","font-weight":"bold","font-size":"16px"},class:"fcom_lebel fcom_label_actions"},yXe={class:"fcom_section_primary"},bXe={class:"fcom_section_primary_item"},_Xe={class:"fcom_section_primary_item_title"},wXe={class:"fcom_section_items"},xXe={class:"fcom_section_item"},kXe={class:"fcom_section_item_title"},CXe=["innerHTML"],SXe=["innerHTML"],$Xe={key:2,class:"fcom_no_avatar"},AXe={class:"fcom_section_item_actions fcom_section_item_actions_separated"},EXe={key:1,class:"white_loaded"},MXe={key:4};function TXe(t,e,n,s,i,o){const r=Ge,a=Yc,l=Jt,c=W("genetic-promo"),u=Zt,d=fn,h=_e,f=ln,p=Qt,m=W("layout"),b=W("app-layout");return v(),D(b,{wrapper_class:"fcom_single_layout fcom_access_automator fcom_max_layout"},{default:w(()=>[y(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Access Management with FluentCRM")},{actions:w(()=>[i.spaceGroups?(v(),D(r,{key:0,class:"fcom_primary_button",loading:i.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:w(()=>[g("div",ZGe,[g("div",JGe,[g("div",QGe,[g("h2",null,$(t.$t("Automate your Course or Space accesses with FluentCRM Tags")),1),g("p",null,$(t.$t("Control user accesses to different spaces/courses of your portal based on the contact tags.")),1),g("p",null,$(t.$t("Select the corresponding FluentCRM Tag for each space/course. So when someone gets the tag, they will get access to the space/course. Similarly when someone join a space or course they will be tagged in FluentCRM.")),1),y(a,{class:"fcom_pro_tag",type:"warning",closable:!1,size:"small"},{default:w(()=>[Y($(t.$t("Please note: Existing contact with the tags will not get access automatically. To Give access to existing contacts with tags, please go to FluentCRM and use bulk actions.")),1)]),_:1})]),g("div",eXe,[i.loading?(v(),A("div",tXe,[y(l,{rows:5,animated:!0})])):t.has_pro?i.has_fluentcrm?i.settings&&i.spaceGroups?(v(),A("div",aXe,[g("div",lXe,[y(d,{onSubmit:e[5]||(e[5]=Be(_=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[6]||(e[6]=_=>i.settings=_),"label-position":"top"},{default:w(()=>[g("div",cXe,[y(u,{modelValue:i.settings.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=_=>i.settings.is_enabled=_),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),i.settings.is_enabled!="yes"?(v(),A("p",uXe,$(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),i.settings.is_enabled=="yes"?(v(),A(te,{key:0},[g("div",dXe,[y(u,{modelValue:i.settings.create_crm_contact,"onUpdate:modelValue":e[2]||(e[2]=_=>i.settings.create_crm_contact=_),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Create contact in FluentCRM (if not exist) when join in the configured spaces / courses.")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("If enabled then, FluentCommunity will create a contact to assign the associate tags from your configuration. Otherwise it will skip tagging.")),1)]),g("div",hXe,[y(u,{modelValue:i.settings.create_user,"onUpdate:modelValue":e[3]||(e[3]=_=>i.settings.create_user=_),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Create User in WP when you apply a configured tag on a contact to add to the course / space.")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("If enabled then, a WP user will be created if not exist and add to the configured course or space.")),1)]),i.settings.create_user=="yes"?(v(),A("div",fXe,[y(u,{modelValue:i.settings.send_welcome_email,"onUpdate:modelValue":e[4]||(e[4]=_=>i.settings.send_welcome_email=_),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Send default WP welcome email when creating the user by tagging.")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("If enabled then, The default WordPress welcome and password set email will be sent.")),1)])):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])]),i.settings.is_enabled=="yes"?(v(),A("div",pXe,[g("div",mXe,[g("div",gXe,$(t.$t("Space")),1),g("div",vXe,$(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),A(te,null,we(i.spaceGroups,_=>(v(),A("div",{key:_.id},[g("div",yXe,[g("div",bXe,[g("div",_Xe,[g("h4",null,$(_.title),1)])])]),g("div",wXe,[(v(!0),A(te,null,we(_.spaces,x=>(v(),A("div",xXe,[g("div",kXe,[x.icon?(v(),D(h,{key:0},{default:w(()=>[g("span",{innerHTML:x.icon},null,8,CXe)]),_:2},1024)):x.shape_svg?(v(),A("span",{key:1,innerHTML:x.shape_svg},null,8,SXe)):(v(),A("span",$Xe)),g("span",null,$(x.title),1)]),g("div",AXe,[y(p,{filterable:"",size:"small",clearable:"",placeholder:t.$t("No Mapping"),style:{width:"100%","min-width":"180px"},modelValue:i.settings.tagging_maps[x.id],"onUpdate:modelValue":k=>i.settings.tagging_maps[x.id]=k},{default:w(()=>[(v(!0),A(te,null,we(i.crm_tags,k=>(v(),D(f,{label:k.title,value:k.id},null,8,["label","value"]))),256))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"]),i.settings.tagging_maps[x.id]?(v(),D(u,{key:0,modelValue:i.settings.linked_maps[x.id],"onUpdate:modelValue":k=>i.settings.linked_maps[x.id]=k,"true-value":i.settings.tagging_maps[x.id],"false-value":""},{default:w(()=>[Y($(t.$t("Sync this tag with the %s access",x.type=="community"?t.$labelize("space"):t.$labelize("course"))),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):O("",!0)])]))),256))])]))),128))])):O("",!0),t.has_pro?(v(),D(r,{key:2,class:"fcom_primary_button",loading:i.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),A("div",EXe,[y(c)]))])):(v(),A("div",MXe,[g("p",null,$(t.$t("Settings could not be loaded")),1)])):(v(),A("div",sXe,[g("div",iXe,[g("div",oXe,[g("h3",rXe,$(t.$t("FluentCRM is not installed!")),1),g("p",null,$(t.$t("Please install FluentCRM to enable this feature.")),1),y(r,{loading:i.saving,class:"el-button fcom_primary_button",onClick:e[0]||(e[0]=_=>o.installPlugin("fluent-crm"))},{default:w(()=>[Y($(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),A("div",nXe,[y(c)]))])])])]),_:1},8,["title"])]),_:1})}const PXe=ge(KGe,[["render",TXe]]),IXe={name:"TopicsConfig",emits:["saved"],data(){return{config:this.appVars.topicsConfig,loading:!1}},methods:{update(){this.loading=!0,this.$post("admin/topics/config",{config:this.config}).then(t=>{this.$notify.success(t.message),this.appVars.topicsConfig=t.config,this.$emit("saved")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}}};function LXe(t,e,n,s,i,o){const r=e2,a=an,l=Zt,c=Ge,u=fn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Be(h=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.config,"onUpdate:modelValue":e[5]||(e[5]=h=>i.config=h)},{default:w(()=>[y(a,{label:t.$t("Maximum Number of Topics a user can select when creating a post")},{default:w(()=>[y(r,{modelValue:i.config.max_topics_per_post,"onUpdate:modelValue":e[0]||(e[0]=h=>i.config.max_topics_per_post=h),min:1,max:20,step:1},null,8,["modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Maximum Number of Topics a space may have")},{default:w(()=>[y(r,{modelValue:i.config.max_topics_per_space,"onUpdate:modelValue":e[1]||(e[1]=h=>i.config.max_topics_per_space=h),min:1,max:40,step:1},null,8,["modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Show/Hide Topics On post Card")},{default:w(()=>[y(l,{"true-value":"yes","false-value":"no",modelValue:i.config.show_on_post_card,"onUpdate:modelValue":e[2]||(e[2]=h=>i.config.show_on_post_card=h),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(a,null,{default:w(()=>[Oe((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[Y($(t.$t("Update")),1)]),_:1})),[[d,i.loading]])]),_:1})]),_:1},8,["modelValue"])}const OXe=ge(IXe,[["render",LXe]]),DXe={name:"TopicCreateForm",components:{SpaceIcon:wp,SlugInput:Nd},emits:["saved"],props:{space_id:{type:Number,required:!1},all_spaces:{type:Array,required:!1,default:()=>[]},topic:{type:Object,required:!1,default:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"}}},data(){return{saving:!1,editing_topic:this.topic,formattedSpaceGroups:[]}},methods:{createOrupdateTopic(){this.saving=!0,this.space_id&&(this.editing_topic.space_ids=[this.space_id],this.editing_topic.inline="yes"),this.$post("admin/topics",this.editing_topic).then(t=>{this.$notify.success(t.message),this.$emit("saved",t.topic)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},formatSpaceGroups(){if(this.space_id||this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],s=[];this.each(e,r=>{let a=t.filter(l=>{let c=l.parent_id==r.id;return c&&s.push(l.slug),c});a.length&&n.push({label:r.title,spaces:a})});let i=e.map(r=>r.id),o=t.filter(r=>{let a=!i.includes(r.id),l=!r.parent_id||!i.includes(r.parent_id);return a&&l&&!s.includes(r.slug)});o.length&&n.push({label:this.$t("Other Spaces - No Assigned Group"),spaces:o}),this.formattedSpaceGroups=n}},mounted(){this.formatSpaceGroups()}},RXe={class:"fcom_help_text"},VXe={key:0,class:"fcom_space_title"},FXe={key:0},NXe={key:1},BXe={class:"fcom_help_text"};function zXe(t,e,n,s,i,o){const r=_t,a=an,l=W("slug-input"),c=W("SpaceIcon"),u=ln,d=Z_,h=Qt,f=Zt,p=Ge,m=fn,b=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Be(_=>t.doNothing(),["prevent"])),modelValue:i.editing_topic,"onUpdate:modelValue":e[6]||(e[6]=_=>i.editing_topic=_),"label-position":"top"},{default:w(()=>[y(a,{label:t.$t("Topic Title")},{default:w(()=>[y(r,{placeholder:t.$t("Title of your topic"),modelValue:i.editing_topic.title,"onUpdate:modelValue":e[0]||(e[0]=_=>i.editing_topic.title=_),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Topic Slug")},{default:w(()=>[y(l,{disabled:!!i.editing_topic.id,modelValue:i.editing_topic.slug,"onUpdate:modelValue":e[1]||(e[1]=_=>i.editing_topic.slug=_),placeholder:t.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),y(a,{label:t.$t("Topic sub-title")},{default:w(()=>[y(r,{placeholder:t.$t("Sub-title of your topic"),modelValue:i.editing_topic.description,"onUpdate:modelValue":e[2]||(e[2]=_=>i.editing_topic.description=_),type:"text"},null,8,["placeholder","modelValue"]),g("div",RXe,[g("p",null,$(t.$t("This will be displayed under the title in the topic when selecting in post creation form")),1)])]),_:1},8,["label"]),n.space_id?O("",!0):(v(),D(a,{key:0,label:t.$t("Space visibility")},{default:w(()=>[y(h,{modelValue:i.editing_topic.space_ids,"onUpdate:modelValue":e[3]||(e[3]=_=>i.editing_topic.space_ids=_),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(i.formattedSpaceGroups,_=>(v(),D(d,{key:_.label,label:_.label},{default:w(()=>[(v(!0),A(te,null,we(_.spaces,x=>(v(),D(u,{key:x.slug,label:x.title,value:x.id.toString()},{default:w(()=>[x.id?(v(),A("span",VXe,[y(c,{space_profile:x},null,8,["space_profile"]),g("span",null,[Y($(t.getExcerpt(x.title,50))+" ",1),x.type=="course"?(v(),A("span",FXe," ("+$(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",NXe,$(t.getExcerpt(x.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",BXe,[g("p",null,$(t.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),y(a,null,{default:w(()=>[y(f,{modelValue:i.editing_topic.admin_only,"onUpdate:modelValue":e[4]||(e[4]=_=>i.editing_topic.admin_only=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),y(a,null,{default:w(()=>[Oe((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:i.saving},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])]),_:1})]),_:1},8,["modelValue"])}const HXe=ge(DXe,[["render",zXe]]),UXe={name:"AllTopics",components:{TopicCreateForm:HXe,SlugInput:Nd,SpaceIcon:wp,Layout:pi,AppLayout:mi,TopicsConfig:OXe},data(){return{topics:[],saving:!1,loading:!1,search:"",showModal:!1,editing_topic:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"},all_spaces:[],showConfig:!1}},methods:{showForm(t){this.editing_topic=t||{title:"",slug:"",space_ids:[],admin_only:"no"},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/topics",{search:this.search}).then(t=>{this.topics=t.topics,this.all_spaces=t.all_spaces}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeTopic(t){this.$confirm(this.$t("Are you sure you want to remove this topic?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.saving=!0,this.$del("admin/topics/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})})},formatTopics(t){let e=this.all_spaces,n=[];return t.forEach(s=>{let i=e.find(o=>o.id==s);i&&n.push(i.title)}),n.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))}},jXe=["href"],WXe={key:0,class:"fhr_content_layout_body"},YXe={class:"fcom_mb_10"},qXe={class:"fcom_manager_actions fcom_mb_10"},GXe={class:"bulk_search"},XXe={style:{margin:"0",padding:"0"}},KXe={class:"fcom_meta_text"},ZXe={class:"fcom_table_action_col"},JXe={key:1,class:"settings_router"},QXe={class:"fhr_content_layout_body"},eKe={class:"setting_body",style:{"text-align":"center"}},tKe={class:"promo_description"},nKe=["href"],sKe={class:"dialog_header"},iKe={class:"dialog_left"},oKe={key:0,class:"dialog_body"};function rKe(t,e,n,s,i,o){const r=W("Plus"),a=_e,l=Ge,c=W("Operation"),u=_t,d=Jr,h=W("DeleteFilled"),f=Zr,p=W("layout"),m=W("app-layout"),b=W("TopicCreateForm"),_=Fs,x=W("TopicsConfig"),k=xt("loading");return v(),A(te,null,[y(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Topics")},{actions:w(()=>[t.has_pro?(v(),A(te,{key:0},[y(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("New Topic")),1)]),_:1}),y(l,{onClick:e[1]||(e[1]=C=>i.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[y(a,null,{default:w(()=>[y(c)]),_:1}),g("span",null,$(t.$t("Settings")),1)]),_:1})],64)):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,jXe))]),default:w(()=>[t.has_pro?(v(),A("div",WXe,[g("div",null,[g("p",YXe,$(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",qXe,[g("div",GXe,[y(u,{modelValue:i.search,"onUpdate:modelValue":e[2]||(e[2]=C=>i.search=C),onKeydown:Nt(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),Oe((v(),D(f,{data:i.topics,style:{"border-radius":"8px"},"empty-text":t.$t("No Topics Found")},{default:w(()=>[y(d,{label:t.$t("Title"),"min-width":"160"},{default:w(C=>[g("p",XXe,$(C.row.title),1),g("span",KXe,$(C.row.description),1)]),_:1},8,["label"]),y(d,{label:t.$t("Spaces"),"min-width":"140"},{default:w(C=>[g("span",null,$(o.formatTopics(C.row.space_ids)),1)]),_:1},8,["label"]),y(d,{label:t.$t("Admin Only?"),width:"120"},{default:w(C=>[g("span",null,$(C.row.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1)]),_:1},8,["label"]),y(d,{label:t.$t("Actions"),width:"160"},{default:w(C=>[g("div",ZXe,[y(l,{onClick:S=>o.showForm(C.row),size:"small"},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:S=>o.removeTopic(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(h)]),_:1})]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[k,i.loading]])])])):(v(),A("div",JXe,[g("div",QXe,[g("div",eKe,[g("p",tKe,$(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,nKe)])])]))]),_:1},8,["title"])]),_:1}),y(_,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[4]||(e[4]=C=>i.showModal=C),direction:"rtl"},{header:w(({close:C})=>[g("div",sKe,[g("div",iKe,[e[8]||(e[8]=g("div",{class:"header_icon"},[g("svg",{viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},[g("path",{d:"M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z",stroke:"currentColor","stroke-width":"1.5"}),g("path",{opacity:"0.4",d:"M7.5 14.5L9.5 16.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M18 6L22 2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})])],-1)),g("div",null,[g("h4",null,$(i.editing_topic.id?t.$t("Update Topic"):t.$t("Add Topic")),1)])])])]),default:w(()=>[i.showModal?(v(),A("div",oKe,[i.showModal?(v(),D(b,{key:0,all_spaces:i.all_spaces,topic:i.editing_topic,onSaved:e[3]||(e[3]=C=>{i.showModal=!1,o.fetch()})},null,8,["all_spaces","topic"])):O("",!0)])):O("",!0)]),_:1},8,["width","modelValue"]),y(_,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,title:t.$t("Topics Settings"),modelValue:i.showConfig,"onUpdate:modelValue":e[6]||(e[6]=C=>i.showConfig=C),direction:"rtl"},{default:w(()=>[i.showConfig?(v(),D(x,{key:0,onSaved:e[5]||(e[5]=C=>{i.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const aKe=ge(UXe,[["render",rKe]]),lKe={name:"CustomizationSettings",components:{Layout:pi,AppLayout:mi},data(){return{loadingCustomizations:!1,loadingSnippets:!1,savingCustomizations:!1,savingSnippets:!1,settings:null,snippetsSettings:null,settingsDirty:!1,snippetsDirty:!1,postOrderOptions:this.appVars.post_order_by_options}},watch:{settings:{handler(){this.settingsDirty=!0},deep:!0},snippetsSettings:{handler(){this.snippetsDirty=!0},deep:!0}},methods:{getCustomizations(){this.loadingCustomizations=!0,this.$get("settings/customization-settings").then(t=>{this.settings=t.settings,this.$nextTick(()=>{this.settingsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingCustomizations=!1})},saveAll(){this.settingsDirty&&this.snippetsDirty?this.saveSnippets(!0).then(()=>{this.saveCustomizations()}):this.settingsDirty?this.saveCustomizations():this.snippetsDirty?this.saveSnippets():this.saveCustomizations()},saveCustomizations(){this.savingCustomizations=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(t=>{this.settingsDirty=!1,this.$notify.success(t.message),window.location.reload()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingCustomizations=!1})},getSnippetsSettings(){this.loadingSnippets=!0,this.$get("settings/snippets-settings").then(t=>{this.snippetsSettings=t.snippets,this.$nextTick(()=>{this.snippetsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingSnippets=!1})},saveSnippets(t=!1){return this.savingSnippets=!0,this.$post("settings/snippets-settings",{snippets:this.snippetsSettings}).then(e=>{this.snippetsDirty=!1,this.$notify.success(e.message)}).catch(e=>{if(this.$handleError(e),t)throw e}).finally(()=>{this.savingSnippets=!1})}},mounted(){this.getCustomizations(),this.has_pro&&this.getSnippetsSettings(),this.changeTitle(this.$t("Customization Settings"))}},cKe={class:"settings_router"},uKe={key:0,class:"white_loaded"},dKe={key:1,class:"fhr_content_layout_body"},hKe={class:"setting_header"},fKe={class:"setting_body"},pKe={class:"fcom_input_wrap"},mKe={class:"fcom_input_wrap"},gKe={class:"fcom_input_wrap"},vKe={class:"fcom_input_wrap"},yKe={class:"fcom_input_wrap"},bKe={key:0,class:"fcom_input_wrap"},_Ke=["innerHTML"],wKe={key:1,style:{cursor:"pointer","font-weight":"bold"}},xKe={class:"fcom_input_wrap"},kKe={style:{"font-weight":"bold"}},CKe={class:"fcom_help_text"},SKe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},$Ke={class:"fcom_input_wrap"},AKe={class:"fcom_input_wrap"},EKe={class:"fcom_input_wrap"},MKe={key:0},TKe={class:"fcom_help_text"},PKe={class:"fcom_input_wrap"},IKe={key:0},LKe={class:"fcom_help_text"},OKe={class:"fcom_input_wrap"},DKe={class:"fcom_help_text"},RKe={class:"fcom_input_wrap"},VKe={class:"fcom_help_text"},FKe={key:0},NKe={key:1},BKe={class:"fcom_input_wrap"},zKe={class:"fcom_input_wrap"},HKe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},UKe={key:2},jKe={key:0,class:"white_loaded"},WKe={key:1,class:"fhr_content_layout_body"},YKe={class:"setting_header"},qKe={class:"setting_body"},GKe={class:"setting_sub_header"},XKe={class:"setting_sub_body"},KKe={class:"setting_sub_header"},ZKe={class:"setting_sub_body"},JKe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},QKe={key:2},eZe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},tZe={class:"setting_header"},nZe={class:"setting_body"},sZe={class:"promo_description"},iZe=["href"];function oZe(t,e,n,s,i,o){const r=Ge,a=Jt,l=Zt,c=_t,u=Xi,d=zo,h=Ws,f=an,p=ln,m=Qt,b=fn,_=NV,x=W("layout"),k=W("app-layout"),C=xt("loading");return v(),D(k,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(x,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Customize Your Portal")},{actions:w(()=>[y(r,{class:"fcom_primary_button",disabled:i.savingCustomizations||i.savingSnippets||i.loadingCustomizations||i.loadingSnippets,onClick:o.saveAll},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",cKe,[i.loadingCustomizations?(v(),A("div",uKe,[y(a,{rows:5,animated:!0})])):i.settings?(v(),A("div",dKe,[g("div",hKe,[g("h2",null,$(t.$t("Customize the UI features of the portal")),1)]),g("div",fKe,[y(b,{onSubmit:e[18]||(e[18]=Be(S=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[19]||(e[19]=S=>i.settings=S),"label-position":"top"},{default:w(()=>[g("div",pKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.dark_mode,"onUpdate:modelValue":e[0]||(e[0]=S=>i.settings.dark_mode=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),g("div",mKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.fixed_page_header,"onUpdate:modelValue":e[1]||(e[1]=S=>i.settings.fixed_page_header=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, the page header will remain visible at the top of the screen as users scroll down the page.")),1)]),g("div",gKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.feed_link_on_sidebar,"onUpdate:modelValue":e[2]||(e[2]=S=>i.settings.feed_link_on_sidebar=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),g("div",vKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.collapse_sidebar_groups,"onUpdate:modelValue":e[3]||(e[3]=S=>i.settings.collapse_sidebar_groups=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Collapse sidebar groups by default")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, all space groups in the left sidebar will be collapsed by default. Users can still expand them manually.")),1)]),g("div",yKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.hide_header_on_scroll,"onUpdate:modelValue":e[4]||(e[4]=S=>i.settings.hide_header_on_scroll=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Hide Header & Footer on Scroll (Mobile)")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("On mobile devices, the header and footer will automatically hide when scrolling down and reappear when scrolling up.")),1)]),t.has_pro?(v(),A("div",bKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_powered_by,"onUpdate:modelValue":e[5]||(e[5]=S=>i.settings.show_powered_by=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[Y($(t.$t("Displays a 'Powered by FluentCommunity' link, showing support for the platform and increasing its visibility."))+" ",1),y(u,{persistent:!1,placement:"bottom",width:400,trigger:"click"},{reference:w(()=>[i.settings.affiliate_id?(v(),A("span",wKe,$(t.$t("Affiliate ID: %s",i.settings.affiliate_id)),1)):(v(),A("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,_Ke))]),default:w(()=>[g("div",xKe,[g("label",kKe,$(t.$t("Your affiliate ID")),1),y(c,{style:{margin:"20px 0"},placeholder:t.$t("Affiliate ID"),type:"number",modelValue:i.settings.affiliate_id,"onUpdate:modelValue":e[6]||(e[6]=S=>i.settings.affiliate_id=S)},null,8,["placeholder","modelValue"]),Oe((v(),D(r,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[C,i.savingCustomizations]])]),g("div",CKe,[g("p",null,[Y($(t.$t("Don't have an affiliate account?"))+" ",1),g("a",SKe,$(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",$Ke,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.icon_on_header_menu,"onUpdate:modelValue":e[7]||(e[7]=S=>i.settings.icon_on_header_menu=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),g("div",AKe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_post_modal,"onUpdate:modelValue":e[8]||(e[8]=S=>i.settings.show_post_modal=S),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Use Modal UI for quick post view")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("If you enable this then, posts will be shown as modal when interacting")),1)]),O("",!0),g("div",EKe,[y(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[y(h,{modelValue:i.settings.rich_post_layout,"onUpdate:modelValue":e[10]||(e[10]=S=>i.settings.rich_post_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"classic"},{default:w(()=>[Y($(t.$t("Classic")),1)]),_:1}),y(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[Y($(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",MKe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",TKe,[g("p",null,$(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",PKe,[y(f,{label:t.$t("Members List Layout")},{default:w(()=>[y(h,{modelValue:i.settings.member_list_layout,"onUpdate:modelValue":e[11]||(e[11]=S=>i.settings.member_list_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"classic"},{default:w(()=>[Y($(t.$t("List View")),1)]),_:1}),y(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[Y($(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),A("span",IKe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",LKe,[g("p",null,$(t.$t("List View: Member profiles will be shown as lists. Modern: Members profile will be shown as cards (Grid)")),1)])]),_:1},8,["label"])]),g("div",OKe,[y(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[y(h,{modelValue:i.settings.post_title_pref,"onUpdate:modelValue":e[12]||(e[12]=S=>i.settings.post_title_pref=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"optional"},{default:w(()=>[Y($(t.$t("Optional")),1)]),_:1}),y(d,{value:"required"},{default:w(()=>[Y($(t.$t("Required")),1)]),_:1}),y(d,{value:"disabled"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",DKe,[g("p",null,$(t.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),g("div",RKe,[y(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[y(h,{modelValue:i.settings.default_feed_layout,"onUpdate:modelValue":e[13]||(e[13]=S=>i.settings.default_feed_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"timeline"},{default:w(()=>[Y($(t.$t("Timeline View")),1)]),_:1}),y(d,{value:"list"},{default:w(()=>[Y($(t.$t("List View")),1)]),_:1}),y(d,{value:"card"},{default:w(()=>[Y($(t.$t("Card View")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(l,{modelValue:i.settings.disable_feed_layout,"onUpdate:modelValue":e[14]||(e[14]=S=>i.settings.disable_feed_layout=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",VKe,[i.settings.disable_feed_layout==="yes"?(v(),A("p",FKe,$(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",NKe,$(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",BKe,[y(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[y(c,{modelValue:i.settings.max_media_per_post,"onUpdate:modelValue":e[15]||(e[15]=S=>i.settings.max_media_per_post=S),placeholder:t.$t("Max Media Per Post"),type:"number",min:1,max:100},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",zKe,[y(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[y(m,{modelValue:i.settings.default_feed_sort_by,"onUpdate:modelValue":e[16]||(e[16]=S=>i.settings.default_feed_sort_by=S),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),A(te,null,we(i.postOrderOptions,(S,E)=>(v(),D(p,{key:E,value:E,label:S},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(l,{modelValue:i.settings.disable_feed_sort_by,"onUpdate:modelValue":e[17]||(e[17]=S=>i.settings.disable_feed_sort_by=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",HKe,[Oe((v(),D(r,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[C,i.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),A("div",UKe,[g("p",null,$(t.$t("Customizations could not be loaded")),1)])),e[22]||(e[22]=g("div",{style:{"margin-top":"30px"}},null,-1)),t.has_pro?(v(),A(te,{key:3},[i.loadingSnippets?(v(),A("div",jKe,[y(a,{rows:5,animated:!0})])):i.snippetsSettings?(v(),A("div",WKe,[g("div",YKe,[g("h2",null,$(t.$t("Custom Snippets")),1)]),g("div",qKe,[g("div",GKe,[g("h3",null,$(t.$t("Custom CSS")),1),g("p",null,$(t.$t("You can write your custom CSS here for the portal. Please do not include %s tag","<style> </style>")),1)]),g("div",XKe,[y(c,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:i.snippetsSettings.custom_css,"onUpdate:modelValue":e[20]||(e[20]=S=>i.snippetsSettings.custom_css=S),rows:5},null,8,["placeholder","modelValue"])]),y(_),g("div",KKe,[g("h3",null,$(t.$t("Custom JavaScript")),1),g("p",null,$(t.$t("You can write your custom JavaScript (with script tag), analytics code, and more here for the portal")),1)]),g("div",ZKe,[y(c,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:i.snippetsSettings.custom_js,"onUpdate:modelValue":e[21]||(e[21]=S=>i.snippetsSettings.custom_js=S),rows:5},null,8,["placeholder","modelValue"])]),g("div",JKe,[Oe((v(),D(r,{onClick:o.saveSnippets,disabled:i.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[C,i.savingSnippets]])])])])):(v(),A("div",QKe,[g("p",null,$(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),A("div",eZe,[g("div",tZe,[g("h2",null,$(t.$t("Custom Snippets")),1)]),g("div",nZe,[g("p",sZe,$(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade to Pro")),9,iZe)])]))])]),_:1},8,["title"])]),_:1})}const rZe=ge(lKe,[["render",oZe]]),aZe={name:"EmailNotification",components:{ImageUploader:Fd,CrepeEditor:Yd,Layout:pi,AppLayout:mi},data(){return{loading:!1,saving:!1,email_settings:null,verifiedEmailSenders:this.appVars.verified_email_senders}},methods:{getSettings(){this.loading=!0,this.$get("admin/email-settings").then(t=>{this.email_settings=t.email_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("admin/email-settings",{email_settings:this.email_settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Email Notification Settings"))}},lZe={class:"settings_router fcom_mb_20"},cZe={key:0,class:"white_loaded"},uZe={key:1,class:"fhr_content_layout_body"},dZe={class:"setting_body"},hZe={style:{"font-size":"18px",margin:"0",padding:"0"}},fZe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},pZe={class:"fcom_help_text"},mZe={class:"fcom_help_text"},gZe={class:"fcom_help_text"},vZe={class:"fcom_help_text"},yZe={class:"fcom_extra_editor"},bZe={class:"fcom_help_text"},_Ze=["innerHTML"],wZe=["src"],xZe={class:"fcom_image_uploader_wrapper"},kZe={class:"setting_body"},CZe={style:{"font-size":"18px",margin:"0",padding:"0"}},SZe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},$Ze={key:0,class:"fcom_help_text"},AZe={key:0,class:"fcom_help_text"},EZe={key:0,class:"fcom_help_text"},MZe={class:"fcom_help_text"},TZe={key:0,class:"fcom_help_text"},PZe={class:"fcom_meta_text"},IZe={class:"setting_body"},LZe={key:2};function OZe(t,e,n,s,i,o){const r=Ge,a=Jt,l=_t,c=an,u=Od,d=ln,h=Qt,f=Ld,p=W("crepe-editor"),m=W("EditPen"),b=_e,_=W("Delete"),x=W("ImageUploader"),k=Zt,C=k5,S=fn,E=W("layout"),P=W("app-layout"),T=xt("loading");return v(),D(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(E,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Email Settings")},{actions:w(()=>[Oe((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[T,i.saving]])]),default:w(()=>[g("div",lZe,[i.loading?(v(),A("div",cZe,[y(a,{rows:5,animated:!0})])):i.email_settings?(v(),A("div",uZe,[y(S,{onSubmit:e[14]||(e[14]=Be(L=>t.doNothing(),["prevent"])),modelValue:i.email_settings,"onUpdate:modelValue":e[15]||(e[15]=L=>i.email_settings=L),"label-position":"top"},{default:w(()=>[g("div",dZe,[g("h3",hZe,$(t.$t("Mailing Settings")),1),g("p",fZe,$(t.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),e[16]||(e[16]=g("hr",null,null,-1)),y(f,{gutter:30},{default:w(()=>[y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("From Name")},{default:w(()=>[y(l,{placeholder:t.$t("Email from name"),modelValue:i.email_settings.send_from_name,"onUpdate:modelValue":e[0]||(e[0]=L=>i.email_settings.send_from_name=L)},null,8,["placeholder","modelValue"]),g("div",pZe,[g("p",null,$(t.$t("Name that will be used to send emails")),1)])]),_:1},8,["label"])]),_:1}),y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("From Email")},{default:w(()=>{var L;return[((L=i.verifiedEmailSenders)==null?void 0:L.length)>0?(v(),D(h,{key:0,class:"fcom_select",placeholder:t.$t("Select Email Address"),modelValue:i.email_settings.send_from_email,"onUpdate:modelValue":e[1]||(e[1]=I=>i.email_settings.send_from_email=I)},{default:w(()=>[(v(!0),A(te,null,we(i.verifiedEmailSenders,I=>(v(),D(d,{key:I,label:I,value:I},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])):(v(),D(l,{key:1,placeholder:t.$t("Valid Email address"),modelValue:i.email_settings.send_from_email,"onUpdate:modelValue":e[2]||(e[2]=I=>i.email_settings.send_from_email=I)},null,8,["placeholder","modelValue"])),g("div",mZe,[g("p",null,$(t.$t("Provide Valid Email Address email as per your domain/SMTP settings. This email will be used to send emails like notifications")),1)])]}),_:1},8,["label"])]),_:1})]),_:1}),y(f,{gutter:30},{default:w(()=>[y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("Reply to name (Optional)")},{default:w(()=>[y(l,{placeholder:t.$t("Optional Reply to email"),modelValue:i.email_settings.reply_to_name,"onUpdate:modelValue":e[3]||(e[3]=L=>i.email_settings.reply_to_name=L)},null,8,["placeholder","modelValue"]),g("div",gZe,[g("p",null,$(t.$t("Name that will be used for replyTo attribute")),1)])]),_:1},8,["label"])]),_:1}),y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("Reply to email (optional)")},{default:w(()=>[y(l,{placeholder:t.$t("Optional email"),modelValue:i.email_settings.reply_to_email,"onUpdate:modelValue":e[4]||(e[4]=L=>i.email_settings.reply_to_email=L)},null,8,["placeholder","modelValue"]),g("div",vZe,[g("p",null,$(t.$t("If someone replies to your notification email, this is where you would like to receive it.")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),y(c,{label:t.$t("Email Footer")},{default:w(()=>[g("div",yZe,[y(p,{modelValue:i.email_settings.email_footer,"onUpdate:modelValue":e[5]||(e[5]=L=>i.email_settings.email_footer=L)},null,8,["modelValue"])]),g("div",bZe,[g("p",null,$(t.$t("This email footer will be used for all emails sent from FluentCommunity. It's highly recommended to use your business name and address in the footer for compliance.")),1),g("p",{innerHTML:t.$t("Use %1$s tag to insert dynamic notification settings URL. Other Smartcode: %2$s for Site Name with permalink","{{manage_email_notification_url|Manage Your Email Notifications Preference}}","{{site_name_with_url}}")},null,8,_Ze)])]),_:1},8,["label"]),y(f,{gutter:30},{default:w(()=>[y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("Logo for Email Header")},{default:w(()=>[i.email_settings.logo||i.email_settings.global_logo?(v(),A("img",{key:0,src:i.email_settings.logo||i.email_settings.global_logo,style:{"max-width":"100px",height:"auto"}},null,8,wZe)):O("",!0),g("div",xZe,[y(x,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.email_settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!i.email_settings.logo,isTextBtn:!1,onUploaded:e[6]||(e[6]=L=>{i.email_settings.logo=L})},ks({remove:w(()=>[y(b,null,{default:w(()=>[y(_)]),_:1})]),_:2},[i.email_settings.logo||i.email_settings.global_logo?{name:"trigger",fn:w(()=>[y(r,{class:"fcom_plain_button"},{default:w(()=>[y(b,null,{default:w(()=>[y(m)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["button_text","can_remove"])])]),_:1},8,["label"])]),_:1}),y(u,{sm:24,md:12},{default:w(()=>[t.has_pro?(v(),D(c,{key:0},{default:w(()=>[y(k,{modelValue:i.email_settings.disable_powered_by,"onUpdate:modelValue":e[7]||(e[7]=L=>i.email_settings.disable_powered_by=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1})]),_:1})]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",kZe,[g("h3",CZe,$(t.$t("Email Notification Settings")),1),g("p",SZe,$(t.$t("This is the default settings that will be applied to all the community members. Individual members can override the settings for their own preference")),1),e[17]||(e[17]=g("hr",null,null,-1)),y(c,{label:t.$t("Email on new comment")},{default:w(()=>[y(k,{modelValue:i.email_settings.com_my_post_mail,"onUpdate:modelValue":e[8]||(e[8]=L=>i.email_settings.com_my_post_mail=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Send an email to the author when a new comment is added to a post.")),1)]),_:1},8,["modelValue"]),i.email_settings.com_my_post_mail!="yes"?(v(),A("div",$Ze,[g("p",null,$(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),y(c,{label:t.$t("Email on comment reply")},{default:w(()=>[y(k,{modelValue:i.email_settings.reply_my_com_mail,"onUpdate:modelValue":e[9]||(e[9]=L=>i.email_settings.reply_my_com_mail=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),i.email_settings.reply_my_com_mail!="yes"?(v(),A("div",AZe,[g("p",null,$(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),y(c,{label:t.$t("Email Announcement on Post")},{default:w(()=>[y(k,{modelValue:i.email_settings.mention_mail,"onUpdate:modelValue":e[10]||(e[10]=L=>i.email_settings.mention_mail=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Give option to admin/moderators to send email when posting on a space")),1)]),_:1},8,["modelValue"]),i.email_settings.mention_mail!="yes"?(v(),A("div",EZe,[g("p",null,$(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),y(c,null,{default:w(()=>[y(k,{"true-value":"yes","false-value":"no",modelValue:i.email_settings.digest_email_status,"onUpdate:modelValue":e[11]||(e[11]=L=>i.email_settings.digest_email_status=L),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",MZe,[g("p",null,$(t.$t("Members can enable/disable their own digest status")),1)])]),_:1}),y(f,{gutter:30},{default:w(()=>[y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("In which day, the digest email will be sent")},{default:w(()=>[y(h,{modelValue:i.email_settings.digest_mail_day,"onUpdate:modelValue":e[12]||(e[12]=L=>i.email_settings.digest_mail_day=L),placeholder:t.$t("Select Digest Email Day")},{default:w(()=>[y(d,{value:"mon",label:t.$t("Every Monday")},null,8,["label"]),y(d,{value:"tue",label:t.$t("Every Tuesday")},null,8,["label"]),y(d,{value:"wed",label:t.$t("Every Wednesday")},null,8,["label"]),y(d,{value:"thu",label:t.$t("Every Thursday")},null,8,["label"]),y(d,{value:"fri",label:t.$t("Every Friday")},null,8,["label"]),y(d,{value:"sat",label:t.$t("Every Saturday")},null,8,["label"]),y(d,{value:"sun",label:t.$t("Every Sunday")},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),i.email_settings.digest_email_status=="yes"?(v(),A("div",TZe,[g("p",null,$(t.$t("Email will be sent if there are any unread notifications for the user from the last email sent.")),1)])):O("",!0)]),_:1},8,["label"])]),_:1}),y(u,{sm:24,md:12},{default:w(()=>[y(c,{label:t.$t("Time to send the digest email")},{default:w(()=>[y(C,{step:"00:10",start:"00:10",end:"23:59",modelValue:i.email_settings.daily_digest_time,"onUpdate:modelValue":e[13]||(e[13]=L=>i.email_settings.daily_digest_time=L)},null,8,["modelValue"]),g("p",PZe,$(t.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),e[19]||(e[19]=g("hr",null,null,-1)),g("div",IZe,[Oe((v(),D(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,i.saving]])])]),_:1},8,["modelValue"])])):(v(),A("div",LZe,[g("p",null,$(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const DZe=ge(aZe,[["render",OZe]]),RZe={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:fwe[this.upgrade_module]||{}}},watch:{openModal:function(){this.$emit("closeModal")}}},VZe={class:"fcom_upgrade_header"},FZe={class:"dialog_body"},NZe={class:"fcom_upgrade_banner"},BZe=["href"],zZe={class:"fcom_upgrade_content"},HZe={key:0,class:"fcom_feature_image"},UZe=["src","alt"],jZe={class:"fcom_upgrade_body"},WZe={class:"fcom_upgrade_description"},YZe=["href"];function qZe(t,e,n,s,i,o){const r=Al;return v(),D(r,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:i.openModal,"onUpdate:modelValue":e[0]||(e[0]=a=>i.openModal=a),direction:"rtl"},{header:w(()=>[g("div",VZe,[g("h4",null,$(i.upgradeModule.headerTitle),1),g("p",null,$(i.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",FZe,[g("div",NZe,[g("p",null," 🎉 "+$(t.$t("Discover exciting new features now!")),1),g("a",{href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade Now")),9,BZe)]),g("div",zZe,[i.upgradeModule.featureImage?(v(),A("div",HZe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+i.upgradeModule.featureImage,alt:i.upgradeModule.headerTitle},null,8,UZe)])):O("",!0),g("div",jZe,[g("h4",null,$(i.upgradeModule.bodyTitle),1),g("p",WZe,$(i.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade to Pro")),9,YZe)])])])]),_:1},8,["modelValue"])}const Sp=ge(RZe,[["render",qZe]]),GZe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Sp},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{},bunnyLocations:{}}},methods:{fetchSettings(){this.fetching=!0,this.$get("admin/storage-settings").then(t=>{this.storageConfig=t.config,this.s3Locations=t.s3_locations,this.bunnyLocations=t.bunny_locations}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.showSettings=!0},saveSettings(){this.saving=!0,this.$post("admin/storage-settings",{config:this.storageConfig}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},maybeResetConfig(){let t=this.storageConfig.driver;this.storageConfig={driver:t}}},mounted(){this.has_pro&&this.fetchSettings()}},XZe={class:"fcom_storage_settings"},KZe={class:"dialog_header"},ZZe={class:"dialog_left"},JZe={key:0,class:"white_loaded"},QZe={key:1,class:"dialog_body"},eJe={key:0},tJe={class:"fcom_cloudflare_settings"},nJe={class:"fcom_s3_settings"},sJe={class:"fcom_cloudflare_settings"},iJe={key:3,class:"fcom_mb_10"},oJe={class:"dialog_footer"},rJe={key:2};function aJe(t,e,n,s,i,o){const r=Ge,a=Jt,l=dp,c=Ws,u=an,d=_t,h=ln,f=Qt,p=fn,m=Fs,b=W("UpgradeToProModal"),_=xt("loading");return v(),A(te,null,[g("div",XZe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=x=>o.openSettings())},{default:w(()=>{var x;return[Y($(t.$t("Configure"))+" ("+$((x=i.storageConfig)==null?void 0:x.driver)+") ",1)]}),_:1})]),y(m,{"align-center":"","modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showSettings,"onUpdate:modelValue":e[18]||(e[18]=x=>i.showSettings=x),direction:"rtl"},{header:w(({close:x})=>[g("div",KZe,[g("div",ZZe,[g("div",null,[g("h4",null,$(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[i.fetching?(v(),A("div",JZe,[y(a,{rows:5,animated:!0})])):i.storageConfig?(v(),A("div",QZe,[i.storageConfig.is_defined?(v(),A("p",eJe,$(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),A(te,{key:1},[y(p,{onSubmit:e[17]||(e[17]=Be(x=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(u,{label:t.$t("Storage Location")},{default:w(()=>[y(c,{class:"fcom_radio_group",onChange:e[1]||(e[1]=x=>o.maybeResetConfig()),modelValue:i.storageConfig.driver,"onUpdate:modelValue":e[2]||(e[2]=x=>i.storageConfig.driver=x)},{default:w(()=>[y(l,{type:"primary",value:"local"},{default:w(()=>[Y($(t.$t("Server Storage")),1)]),_:1}),y(l,{value:"cloudflare_r2"},{default:w(()=>[Y($(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),y(l,{value:"amazon_s3"},{default:w(()=>[Y($(t.$t("Amazon S3")),1)]),_:1}),y(l,{value:"bunny_cdn"},{default:w(()=>[Y($(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.storageConfig.driver==="cloudflare_r2"?(v(),A(te,{key:0},[e[20]||(e[20]=g("p",null,[Y(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-cloudflare-r2/"},"Read the documentation first "),Y(" to configure Cloudflare R2. ")],-1)),e[21]||(e[21]=g("hr",null,null,-1)),g("div",tJe,[y(u,{label:t.$t("Cloudflare Access Key")},{default:w(()=>[y(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[3]||(e[3]=x=>i.storageConfig.access_key=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Cloudflare Secret Key")},{default:w(()=>[y(d,{type:"password",modelValue:i.storageConfig.secret_key,"onUpdate:modelValue":e[4]||(e[4]=x=>i.storageConfig.secret_key=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Cloudflare Bucket Public URL")},{default:w(()=>[y(d,{modelValue:i.storageConfig.public_url,"onUpdate:modelValue":e[5]||(e[5]=x=>i.storageConfig.public_url=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Cloudflare Endpoint URL")},{default:w(()=>[y(d,{modelValue:i.storageConfig.endpoint_url,"onUpdate:modelValue":e[6]||(e[6]=x=>i.storageConfig.endpoint_url=x),placeholder:t.$t("eg: https://your-account-id.r2.cloudflarestorage.com/your-bucket-name")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:w(()=>[y(d,{modelValue:i.storageConfig.sub_folder,"onUpdate:modelValue":e[7]||(e[7]=x=>i.storageConfig.sub_folder=x),placeholder:t.$t("If you want to store files in a folder within the bucket.")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])],64)):i.storageConfig.driver==="amazon_s3"?(v(),A(te,{key:1},[e[22]||(e[22]=g("p",null,[Y(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-amazon-s3/"},"Read the documentation first "),Y(" to configure Amazon S3. ")],-1)),e[23]||(e[23]=g("hr",null,null,-1)),g("div",nJe,[y(u,{label:t.$t("Amazon S3 Access Key")},{default:w(()=>[y(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[8]||(e[8]=x=>i.storageConfig.access_key=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Amazon S3 Secret Key")},{default:w(()=>[y(d,{type:"password",modelValue:i.storageConfig.secret_key,"onUpdate:modelValue":e[9]||(e[9]=x=>i.storageConfig.secret_key=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Amazon S3 Bucket Name")},{default:w(()=>[y(d,{modelValue:i.storageConfig.bucket,"onUpdate:modelValue":e[10]||(e[10]=x=>i.storageConfig.bucket=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Amazon S3 Location")},{default:w(()=>[y(f,{modelValue:i.storageConfig.s3_endpoint,"onUpdate:modelValue":e[11]||(e[11]=x=>i.storageConfig.s3_endpoint=x),placeholder:t.$t("Select S3 Location")},{default:w(()=>[(v(!0),A(te,null,we(i.s3Locations,(x,k)=>(v(),D(h,{label:x,value:k},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:w(()=>[y(d,{placeholder:t.$t("If you want to store files in a folder within the bucket."),modelValue:i.storageConfig.sub_folder,"onUpdate:modelValue":e[12]||(e[12]=x=>i.storageConfig.sub_folder=x)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):O("",!0),i.storageConfig.driver==="bunny_cdn"?(v(),A(te,{key:2},[e[24]||(e[24]=g("p",null,[Y(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-bunnycdn"},"Read the documentation first "),Y(" to configure BunnyCDN. ")],-1)),e[25]||(e[25]=g("hr",null,null,-1)),g("div",sJe,[y(u,{label:t.$t("BunnyCDN API Key")},{default:w(()=>[y(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[13]||(e[13]=x=>i.storageConfig.access_key=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("BunnyCDN Storage Zone Name")},{default:w(()=>[y(d,{modelValue:i.storageConfig.bucket,"onUpdate:modelValue":e[14]||(e[14]=x=>i.storageConfig.bucket=x)},null,8,["modelValue"])]),_:1},8,["label"]),y(u,{label:t.$t("Primary Storage Region")},{default:w(()=>[y(f,{modelValue:i.storageConfig.s3_endpoint,"onUpdate:modelValue":e[15]||(e[15]=x=>i.storageConfig.s3_endpoint=x),placeholder:t.$t("Select Storage Region")},{default:w(()=>[(v(!0),A(te,null,we(i.bunnyLocations,(x,k)=>(v(),D(h,{label:x,value:k},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(u,{label:t.$t("BunnyCDN Public URL")},{default:w(()=>[y(d,{placeholder:t.$t("Provide your CDN URL (without trailing /)"),modelValue:i.storageConfig.public_url,"onUpdate:modelValue":e[16]||(e[16]=x=>i.storageConfig.public_url=x)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(v(),A("p",iJe,$(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",oJe,[Oe((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[_,i.saving]])])],64))])):(v(),A("div",rJe,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),i.openUpgradeModal?(v(),D(b,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[19]||(e[19]=x=>i.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):O("",!0)],64)}const lJe=ge(GZe,[["render",aJe]]),cJe={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:Sp},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/leaderboards/levels").then(t=>{this.levels=t.levels,this.excludedUserIds=t.excludedUserIds,this.users=t.excludedUsers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1,this.usersLoaded=!0})},fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"users",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){let t=this.features.leader_board_module=="yes";this.$emit("saveSettings",!t),t&&this.saveLevelSettings()},saveLevelSettings(){this.saving=!0,this.$post("admin/leaderboards/levels",{levels:this.levels,excludedUserIds:this.excludedUserIds}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},uJe={class:"fcom_storage_settings"},dJe={key:0,class:"white_loaded"},hJe={key:1,class:"dialog_body"},fJe={class:"fcom_mb_20"},pJe={class:"fcom_level_table"},mJe={class:"fcom_level_table_row fcom_header_row"},gJe={class:"fcom_lavel_desc"},vJe={class:"fcom_lavel_actions"},yJe={class:"fcom_lavel_num"},bJe={class:"fcom_lavel_desc"},_Je={class:"fcom_lavel_actions"},wJe={class:"fcom_user_selector fcom_mb_20"},xJe={class:"fcom_mb_20"},kJe={style:{float:"left"}},CJe={style:{float:"right",color:"#8492a6","font-size":"13px"}},SJe={class:"dialog_footer"},$Je={key:2};function AJe(t,e,n,s,i,o){const r=Ge,a=Jt,l=Zt,c=an,u=_t,d=ln,h=Qt,f=fn,p=Al,m=W("UpgradeToProModal"),b=xt("loading");return v(),A(te,null,[g("div",uJe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=_=>o.openSettings())},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),y(p,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:i.showSettings,"onUpdate:modelValue":e[4]||(e[4]=_=>i.showSettings=_),direction:"rtl"},{header:w(({close:_})=>[g("h4",null,$(t.$t("Leaderboard / Gamification Settings")),1)]),default:w(()=>[i.fetching?(v(),A("div",dJe,[y(a,{rows:5,animated:!0})])):i.levels?(v(),A("div",hJe,[y(f,{onSubmit:e[3]||(e[3]=Be(_=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":e[1]||(e[1]=_=>n.features.leader_board_module=_),"true-value":"yes","false-value":"no",label:t.$t("Enable Leaderboards Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.leader_board_module==="yes"?(v(),A(te,{key:0},[g("h5",fJe,$(t.$t("Leaderboard Levels")),1),g("div",pJe,[g("div",mJe,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",gJe,$(t.$t("Title & Description")),1),g("div",vJe,$(t.$t("Minimum Points")),1)]),(v(!0),A(te,null,we(i.levels,(_,x,k)=>(v(),A("div",{class:"fcom_level_table_row",key:x},[g("div",yJe,$(k+1),1),g("div",bJe,[y(u,{class:"fcom_bold_input",type:"text",modelValue:_.title,"onUpdate:modelValue":C=>_.title=C,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),y(u,{type:"text",modelValue:_.tagline,"onUpdate:modelValue":C=>_.tagline=C,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",_Je,[y(c,{label:""},{default:w(()=>[y(u,{min:0,max:999999999,disabled:x==="level_1",type:"number",modelValue:_.min_points,"onUpdate:modelValue":C=>_.min_points=C,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",wJe,[g("h5",xJe,$(t.$t("Exclude Users")),1),y(c,{label:t.$t("Exclude selected users from the leaderboard")},{default:w(()=>[i.usersLoaded?(v(),D(h,{key:0,multiple:!0,class:"rich_select",filterable:"",remote:"","remote-method":o.fetchUsers,placeholder:t.$t("Select Users"),modelValue:i.excludedUserIds,"onUpdate:modelValue":e[2]||(e[2]=_=>i.excludedUserIds=_)},{default:w(()=>[(v(!0),A(te,null,we(i.users,_=>(v(),D(d,{key:_.ID,label:_.display_name+" ("+_.user_email+")",value:_.ID},{default:w(()=>[g("span",kJe,$(_.display_name),1),g("span",CJe,$(_.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["remote-method","placeholder","modelValue"])):O("",!0)]),_:1},8,["label"])])],64)):O("",!0)]),_:1}),g("div",SJe,[Oe((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,i.saving]])])])):(v(),A("div",$Je,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),i.openUpgradeModal?(v(),D(m,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[5]||(e[5]=_=>i.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):O("",!0)],64)}const EJe=ge(cJe,[["render",AJe]]),MJe={name:"UserBadgesConfig",components:{LogoEmojiSelector:G1,UpgradeToProModal:Sp,Drawer:fp},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1,isDirty:!1}},watch:{badges:{handler(){this.isDirty=!0},deep:!0},"features.user_badge"(){this.isDirty=!0}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.isDirty=!1,this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(t=>{this.badges=t.badges,this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){let t=this.features.user_badge=="yes";this.$emit("saveSettings",!t),t?this.saveBadgeSettings():this.isDirty=!1},saveBadgeSettings(){this.saving=!0,this.$post("admin/user-badges",{badges:this.badges}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!1);let e=t.badges;this.badges=Object.values(e),this.features.user_badge=="yes"?this.appVars.user_badges=e:this.appVars.user_badges=null,this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},initAddNew(){this.editingBadge={title:"",config:{emoji:"",shape_svg:"",logo:""},show_label:"yes",color:"",background_color:""},this.showEditBagdeModal=!0},initEdit(t){this.editingBadge=t,this.showEditBagdeModal=!0},closeEdit(){this.badges.find(t=>{var e;return t.slug===((e=this.editingBadge)==null?void 0:e.slug)})||this.badges.push(this.editingBadge),this.showEditBagdeModal=!1,this.editingBadge=null,this.saveBadgeSettings()},deleteBadge(t){this.badges=this.badges.filter(e=>e.slug!==t.slug),this.saveBadgeSettings()}}},TJe={class:"fcom_storage_settings"},PJe={key:0,class:"white_loaded"},IJe={key:1},LJe={class:"header_user_badge"},OJe={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},DJe={class:"fcom_badge_preview"},RJe={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},VJe=["onClick"],FJe=["onClick"],NJe={key:2};function BJe(t,e,n,s,i,o){const r=Ge,a=Jt,l=Zt,c=an,u=Jr,d=W("UserBadge"),h=W("Edit"),f=_e,p=W("Delete"),m=Zr,b=fn,_=W("Drawer"),x=W("logo-emoji-selector"),k=_t,C=Dd,S=Od,E=Ld,P=Fs,T=W("UpgradeToProModal"),L=xt("loading");return v(),A(te,null,[g("div",TJe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=I=>o.openSettings())},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),y(_,{modelValue:i.showSettings,"onUpdate:modelValue":e[4]||(e[4]=I=>i.showSettings=I),size:t.drawerWidth,title:t.$t("User Badge Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":i.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:w(()=>[i.fetching?(v(),A("div",PJe,[y(a,{rows:5,animated:!0})])):i.badges?(v(),A("div",IJe,[y(b,{onSubmit:e[3]||(e[3]=Be(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{"true-value":"yes","false-value":"no",modelValue:n.features.user_badge,"onUpdate:modelValue":e[1]||(e[1]=I=>n.features.user_badge=I),label:t.$t("Enable User Badge Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(v(),A(te,{key:0},[g("div",LJe,[g("h3",null,$(t.$t("User Badges")),1),y(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=I=>o.initAddNew()),size:"small"},{default:w(()=>[Y($(t.$t("Add New")),1)]),_:1})]),g("div",OJe,[y(m,{stripe:"","empty-text":t.$t("No badges have been configured."),data:i.badges},{default:w(()=>[y(u,{prop:"title",label:t.$t("Title"),width:"200px"},null,8,["label"]),y(u,{label:t.$t("Preview")},{default:w(I=>[g("div",DJe,[y(d,{is_preview:!0,badge:I.row},null,8,["badge"])])]),_:1},8,["label"]),y(u,{width:"150px",label:t.$t("Actions")},{default:w(I=>[g("div",RJe,[g("div",{onClick:V=>o.initEdit(I.row),class:"action_item clickable"},[y(f,null,{default:w(()=>[y(h)]),_:1})],8,VJe),g("div",{class:"action_item clickable",onClick:V=>o.deleteBadge(I.row)},[y(f,null,{default:w(()=>[y(p)]),_:1})],8,FJe)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):O("",!0),y(c,null,{default:w(()=>[Oe((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[L,i.saving]])]),_:1})]),_:1})])):(v(),A("div",NJe,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),y(P,{"append-to-body":!0,modelValue:i.showEditBagdeModal,"onUpdate:modelValue":e[14]||(e[14]=I=>i.showEditBagdeModal=I),title:t.$t("Edit Badge"),width:"30%"},{default:w(()=>[i.editingBadge?(v(),D(b,{key:0,onSubmit:e[13]||(e[13]=Be(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Title")},{default:w(()=>[y(k,{modelValue:i.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=I=>i.editingBadge.title=I),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var I,V;return[y(x,{fallback_mark:"",custom_svg:!0,onUpdate:e[5]||(e[5]=R=>{i.editingBadge.config.emoji=R.emoji,i.editingBadge.config.logo=R.logo,i.editingBadge.config.shape_svg=R.shape_svg}),config:{logo:i.editingBadge.config.logo,emoji:((I=i.editingBadge.config)==null?void 0:I.emoji)||"",shape_svg:(V=i.editingBadge.config)==null?void 0:V.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(c,null,{default:w(()=>[y(l,{modelValue:i.editingBadge.show_label,"onUpdate:modelValue":e[7]||(e[7]=I=>i.editingBadge.show_label=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),i.editingBadge.show_label=="yes"?(v(),A(te,{key:0},[y(E,{gutter:20},{default:w(()=>[y(S,{span:12},{default:w(()=>[y(c,{label:t.$t("Color")},{default:w(()=>[y(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=I=>{i.editingBadge.color=I}),modelValue:i.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=I=>i.editingBadge.color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),y(S,{span:12},{default:w(()=>[y(c,{label:t.$t("Background Color")},{default:w(()=>[y(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=I=>{i.editingBadge.background_color=I}),modelValue:i.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=I=>i.editingBadge.background_color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),g("p",null,$(t.$t("For best UI, keep the colors empty")),1)],64)):O("",!0),y(c,null,{default:w(()=>[y(r,{class:"fcom_primary_button",onClick:e[12]||(e[12]=I=>o.closeEdit())},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["modelValue","title"]),i.openUpgradeModal?(v(),D(T,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[15]||(e[15]=I=>i.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const zJe=ge(MJe,[["render",BJe],["__scopeId","data-v-57666044"]]),HJe={name:"SocialMediaLinkConfig",components:{Drawer:fp},data(){return{providers:null,loading:!1,saving:!1,showSettings:!1,isDirty:!1}},watch:{showSettings(t){t||(this.isDirty=!1)}},methods:{openSettings(){this.loading=!0,this.showSettings=!0,this.isDirty=!1,this.providers=null,this.$get("admin/profile-link-providers").then(t=>{this.providers=t.providers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("Please upgrade to Pro to use this feature"));return}this.saving=!0;const t=[];this.each(this.providers,(e,n)=>{e.enabled==="yes"&&t.push(n)}),this.$post("admin/profile-link-providers",{configs:t}).then(e=>{this.$notify.success(e.message),this.isDirty=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},UJe={class:"fcom_storage_settings"},jJe={key:0,class:"white_loaded"},WJe={key:1,class:"dialog_body"},YJe={class:"fcom_level_table"},qJe={class:"fcom_level_table_row fcom_header_row"},GJe={class:"fcom_lavel_desc"},XJe={class:"fcom_lavel_actions"},KJe={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},ZJe=["innerHTML"],JJe={class:"fcom_lavel_actions"},QJe={class:"dialog_footer"},eQe={key:1,class:"fcom_upgrade_banner"},tQe={class:"fcom_upgrade_description"},nQe=["href"],sQe={key:2};function iQe(t,e,n,s,i,o){const r=Ge,a=Jt,l=_e,c=Bo,u=Vd,d=W("Drawer"),h=xt("loading");return v(),A(te,null,[g("div",UJe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),y(d,{modelValue:i.showSettings,"onUpdate:modelValue":e[2]||(e[2]=f=>i.showSettings=f),size:t.drawerWidth,title:t.$t("Social Media Links Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":i.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body"},{default:w(()=>[i.loading?(v(),A("div",jJe,[y(a,{rows:5,animated:!0})])):i.providers?(v(),A("div",WJe,[g("div",YJe,[g("div",qJe,[g("div",GJe,$(t.$t("Provider")),1),g("div",XJe,$(t.$t("Status")),1)]),(v(!0),A(te,null,we(i.providers,(f,p)=>(v(),A("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",KJe,[y(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,ZJe)]),_:2},1024),g("span",null,$(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("disabled")),1)]),_:1}))]),g("div",JJe,[y(u,{modelValue:f.enabled,"onUpdate:modelValue":m=>f.enabled=m,"active-value":"yes","inactive-value":"no",onChange:e[1]||(e[1]=m=>i.isDirty=!0)},null,8,["modelValue","onUpdate:modelValue"])])]))),128))]),g("div",QJe,[t.has_pro?Oe((v(),D(r,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]]):(v(),A("div",eQe,[g("p",tQe,$(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade to Pro")),9,nQe)]))])])):(v(),A("div",sQe,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])],64)}const oQe=ge(HJe,[["render",iQe]]),rQe={name:"MessagingSettings",data(){return{loading:!1,settings:null,saving:!1,socketConfig:this.initSocketConfig()}},computed:{isRealTimeEnabled(){var t;return((t=this.settings)==null?void 0:t.realtime_enabled)==="yes"},isWpConfigDefined(){var t;return((t=this.socketConfig)==null?void 0:t.is_defined)??!1},isFluentMessagingProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="fluent-socket"},showClusterField(){var t;return["pusher","custom"].includes((t=this.settings)==null?void 0:t.socket_provider)},isCustomProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="custom"}},methods:{initSocketConfig(){return{key:"",secret:"",appId:"",cluster:"",options:{host:"",port:443,scheme:"https"}}},maybeResetConfig(){this.socketConfig.is_defined||(this.socketConfig=this.initSocketConfig())},getSettings(){this.loading=!0,this.$get("admin/messaging-setting").then(t=>{this.settings=t.settings,this.socketConfig=t.socket_config??this.initSocketConfig()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(this.isRealTimeEnabled&&!this.isWpConfigDefined){if(["key","secret","appId"].filter(s=>!this.socketConfig[s]).length>0){this.$handleError(this.$t("Please fill in all required socket configuration fields (App Key, App Secret, App ID)"));return}if(this.isCustomProvider&&!this.socketConfig.options.host){this.$handleError(this.$t("Host is required for custom socket provider"));return}}this.saving=!0;const t={settings:this.settings};this.isRealTimeEnabled&&!this.isWpConfigDefined&&(t.socket_config=this.socketConfig),this.$post("admin/messaging-setting",t).then(e=>{this.$notify.success(e.message),this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},aQe={key:1},lQe={class:"fcom_help_text"},cQe={key:0},uQe={key:1},dQe={class:"fcom_help_text"},hQe={class:"fcom_help_text"},fQe={class:"fcom_section_divider"},pQe={class:"fcom_help_text"},mQe={key:0},gQe={key:1},vQe={class:"fcom_help_text"},yQe={key:0},bQe={key:1},_Qe={key:2},wQe={class:"fcom_help_text"},xQe={key:2},kQe={class:"dialog_footer"},CQe={key:1,class:"fcom_upgrade_banner"},SQe={class:"fcom_upgrade_description"},$Qe=["href"];function AQe(t,e,n,s,i,o){const r=Jt,a=Zt,l=an,c=zo,u=Ws,d=e2,h=Yc,f=_t,p=ln,m=Qt,b=fn,_=Ge,x=xt("loading");return v(),A(te,null,[i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.settings?(v(),A("div",aQe,[y(b,{modelValue:i.settings,"onUpdate:modelValue":e[14]||(e[14]=k=>i.settings=k),"label-position":"top"},{default:w(()=>[y(l,null,{default:w(()=>[y(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.messaging_email_status,"onUpdate:modelValue":e[0]||(e[0]=k=>i.settings.messaging_email_status=k),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",lQe,[i.settings.messaging_email_status=="no"?(v(),A("p",cQe,$(t.$t("Email notification on messaging is disabled")),1)):(v(),A("p",uQe,$(t.$t("Emails will be sent based on your Email Frequency settings")),1))])]),_:1}),i.settings.messaging_email_status=="yes"?(v(),D(l,{key:0,label:t.$t("Default Email sending frequency for one-to-one messages")},{default:w(()=>[y(u,{modelValue:i.settings.messaging_email_frequency,"onUpdate:modelValue":e[1]||(e[1]=k=>i.settings.messaging_email_frequency=k)},{default:w(()=>[y(c,{value:"hourly",label:t.$t("Hourly")},null,8,["label"]),y(c,{value:"daily",label:t.$t("Daily")},null,8,["label"]),y(c,{value:"weekly",label:t.$t("Weekly")},null,8,["label"]),y(c,{value:"disabled",label:t.$t("Per User Choice")},null,8,["label"])]),_:1},8,["modelValue"]),g("div",dQe,[g("p",null,$(t.$t("This is your default email sending frequency. Individual users can customize the frequency or disable the notification.")),1)])]),_:1},8,["label"])):O("",!0),y(l,{label:t.$t("Who can initiate an one-to-one message with the other members?")},{default:w(()=>[y(u,{modelValue:i.settings.who_can_initiate_message,"onUpdate:modelValue":e[2]||(e[2]=k=>i.settings.who_can_initiate_message=k)},{default:w(()=>[y(c,{value:"everyone",label:t.$t("Any Community Members")},null,8,["label"]),y(c,{value:"mods",label:t.$t("Only Moderator and Admins")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.settings.who_can_initiate_message==="everyone"?(v(),D(l,{key:1,label:t.$t("Points needed to intiate a new message thread with another member or send message to community chats.")},{default:w(()=>[y(d,{modelValue:i.settings.points_to_initiate_message,"onUpdate:modelValue":e[3]||(e[3]=k=>i.settings.points_to_initiate_message=k),min:0},null,8,["modelValue"]),g("div",hQe,[g("p",null,$(t.$t("Set the number of points a user must have to initiate a new one-to-one message thread. Set to 0 to disable this feature.")),1)])]),_:1},8,["label"])):O("",!0),g("div",fQe,[g("h4",null,$(t.$t("Real-time Chat")),1)]),y(l,null,{default:w(()=>[y(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.realtime_enabled,"onUpdate:modelValue":e[4]||(e[4]=k=>i.settings.realtime_enabled=k),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",pQe,[i.settings.realtime_enabled==="no"?(v(),A("p",mQe,$(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),A("p",gQe,$(t.$t("Real-time chat is enabled. Messages will be delivered instantly via WebSocket.")),1))])]),_:1}),o.isRealTimeEnabled?(v(),D(l,{key:2,label:t.$t("Socket Provider")},{default:w(()=>[y(u,{modelValue:i.settings.socket_provider,"onUpdate:modelValue":e[5]||(e[5]=k=>i.settings.socket_provider=k),onChange:e[6]||(e[6]=k=>o.maybeResetConfig())},{default:w(()=>[y(c,{value:"fluent-socket"},{default:w(()=>[Y($(t.$t("Fluent Socket")),1)]),_:1}),y(c,{value:"pusher"},{default:w(()=>[Y($(t.$t("Pusher")),1)]),_:1}),y(c,{value:"custom"},{default:w(()=>[Y($(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",vQe,[i.settings.socket_provider==="fluent-socket"?(v(),A("p",yQe,[Y($(t.$t("Use the built-in Fluent Socket server. You can create your free credentials at"))+" ",1),e[15]||(e[15]=g("a",{href:"https://fluentsocket.com/",target:"_blank",rel:"noopener"},"fluentsocket.com",-1))])):i.settings.socket_provider==="pusher"?(v(),A("p",bQe,$(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),A("p",_Qe,$(t.$t("Use a custom Pusher-compatible WebSocket server (e.g., Soketi)")),1))])]),_:1},8,["label"])):O("",!0),o.isRealTimeEnabled&&o.isWpConfigDefined?(v(),D(h,{key:3,type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[Y($(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),A(te,{key:4},[y(l,{label:t.$t("App ID")},{default:w(()=>[y(f,{modelValue:i.socketConfig.appId,"onUpdate:modelValue":e[7]||(e[7]=k=>i.socketConfig.appId=k),placeholder:t.$t("Your app ID")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(l,{label:t.$t("App Key")},{default:w(()=>[y(f,{modelValue:i.socketConfig.key,"onUpdate:modelValue":e[8]||(e[8]=k=>i.socketConfig.key=k),placeholder:t.$t("Your app key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(l,{label:t.$t("App Secret")},{default:w(()=>[y(f,{type:"password",modelValue:i.socketConfig.secret,"onUpdate:modelValue":e[9]||(e[9]=k=>i.socketConfig.secret=k),placeholder:t.$t("Your app secret"),"show-password":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o.showClusterField?(v(),D(l,{key:0,label:t.$t("Cluster")},{default:w(()=>[y(f,{modelValue:i.socketConfig.cluster,"onUpdate:modelValue":e[10]||(e[10]=k=>i.socketConfig.cluster=k),placeholder:i.settings.socket_provider==="pusher"?"mt1":t.$t("Optional")},null,8,["modelValue","placeholder"]),g("div",wQe,[g("p",null,$(t.$t("Pusher cluster region (e.g., mt1, us2, eu, ap1). Optional for custom providers.")),1)])]),_:1},8,["label"])):O("",!0),o.isCustomProvider?(v(),A(te,{key:1},[y(l,{label:t.$t("Host")},{default:w(()=>[y(f,{modelValue:i.socketConfig.options.host,"onUpdate:modelValue":e[11]||(e[11]=k=>i.socketConfig.options.host=k),placeholder:t.$t("e.g., ws.example.com")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(l,{label:t.$t("Port")},{default:w(()=>[y(f,{modelValue:i.socketConfig.options.port,"onUpdate:modelValue":e[12]||(e[12]=k=>i.socketConfig.options.port=k),placeholder:"443"},null,8,["modelValue"])]),_:1},8,["label"]),y(l,{label:t.$t("Scheme")},{default:w(()=>[y(m,{modelValue:i.socketConfig.options.scheme,"onUpdate:modelValue":e[13]||(e[13]=k=>i.socketConfig.options.scheme=k),style:{width:"100%"}},{default:w(()=>[y(p,{value:"https",label:"HTTPS (Secure)"}),y(p,{value:"http",label:"HTTP"})]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])])):(v(),A("div",xQe,[...e[16]||(e[16]=[g("h3",null,"Sorry, settings could not be loaded. Please make sure you have latest version of FluentCommunity Pro and Fluent Messaging Addons",-1)])])),g("div",kQe,[t.has_pro?Oe((v(),D(_,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[x,i.saving]]):(v(),A("div",CQe,[g("p",SQe,$(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.appVars.upgrade_url,target:"_blank"},$(t.$t("Upgrade to Pro")),9,$Qe)]))])],64)}const EQe=ge(rQe,[["render",AQe]]),MQe={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Sp},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("settings/followers/config").then(t=>{this.follower_settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.follower_settings.is_enabled!==this.features.followers_module;this.follower_settings.is_enabled=this.features.followers_module,this.saving=!0,this.$post("settings/followers/config",{settings:this.follower_settings}).then(e=>{this.$notify.success(e.message),t&&window.location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},TQe={class:"fcom_storage_settings"},PQe={key:0,class:"white_loaded"},IQe={key:1,class:"dialog_body"},LQe={class:"fcom_mb_20"},OQe={class:"dialog_footer"},DQe={key:2};function RQe(t,e,n,s,i,o){const r=Ge,a=Jt,l=Zt,c=an,u=zo,d=Ws,h=fn,f=Al,p=W("UpgradeToProModal"),m=xt("loading");return v(),A(te,null,[g("div",TQe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),y(f,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:i.showSettings,"onUpdate:modelValue":e[5]||(e[5]=b=>i.showSettings=b),direction:"rtl"},{header:w(({close:b})=>[g("h4",null,$(t.$t("Follower Module Settings")),1)]),default:w(()=>[i.fetching?(v(),A("div",PQe,[y(a,{rows:5,animated:!0})])):i.follower_settings?(v(),A("div",IQe,[y(h,{onSubmit:e[4]||(e[4]=Be(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{modelValue:n.features.followers_module,"onUpdate:modelValue":e[1]||(e[1]=b=>n.features.followers_module=b),"true-value":"yes","false-value":"no",label:t.$t("Enable Follower Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.followers_module==="yes"?(v(),A(te,{key:0},[g("h5",LQe,$(t.$t("Following Config")),1),y(c,{label:t.$t("Who can see the followers list on the user's profile?")},{default:w(()=>[y(d,{modelValue:i.follower_settings.who_can_see_followers,"onUpdate:modelValue":e[2]||(e[2]=b=>i.follower_settings.who_can_see_followers=b)},{default:w(()=>[y(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),y(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),y(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(c,{label:t.$t("Who can see the followings list on the user's profile?")},{default:w(()=>[y(d,{modelValue:i.follower_settings.who_can_see_followings,"onUpdate:modelValue":e[3]||(e[3]=b=>i.follower_settings.who_can_see_followings=b)},{default:w(()=>[y(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),y(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),y(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)]),_:1}),g("div",OQe,[Oe((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,i.saving]])])])):(v(),A("div",DQe,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),i.openUpgradeModal?(v(),D(p,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[6]||(e[6]=b=>i.openUpgradeModal=!1),upgrade_module:"follower_module"},null,8,["showModal"])):O("",!0)],64)}const VQe=ge(MQe,[["render",RQe]]),FQe={name:"FluentPlayerCustomization",components:{InfoFilled:yl},props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],data(){return{activeNames:["0"]}},computed:{localSettings:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},controls(){return this.localSettings.controls||{}},behaviors(){return this.localSettings.behaviors||{}}},methods:{isControlVisible(t){return this.localSettings.skin==="simple"?["play","volume","fullscreen","pip","captions_toggle"].includes(t):!0}}},NQe={key:0,class:"fluent-player-top-title-overlay"},BQe={class:"fluent-player-title-stack"},zQe={class:"fluent-player-media-title"},HQe={key:1,class:"fp-media-controls-center"},UQe={class:"fp-controls-group center"},jQe={key:2,class:"fp-media-controls-bottom"},WQe={key:0,class:"fp-controls-group"},YQe={key:0,class:"fp-media-button vds-button"},qQe={key:1,class:"fp-media-button vds-button"},GQe={key:2,class:"fp-media-button vds-button"},XQe={key:3,class:"fp-media-button vds-button"},KQe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},ZQe={key:5,class:"fp-media-time-group"},JQe={key:6,class:"fp-media-controls-spacer-slider"},QQe={key:7,class:"fp-media-button vds-button"},eet={key:8,class:"fp-media-button vds-button"},tet={key:9,class:"fp-media-button vds-button"},net={key:10,class:"fp-media-button vds-button"},set={key:11,class:"fp-media-button vds-button"},iet={key:0,class:"fp-media-slider vds-time-slider"},oet={key:1,class:"fp-controls-group"},ret={key:0,class:"fp-media-button vds-button"},aet={key:1,class:"fp-media-button vds-button"},cet={key:2,class:"fp-media-button vds-button"},uet={key:3,class:"fp-media-button vds-button"},det={key:4,class:"fp-media-slider vds-time-slider slider-volume"},het={key:5,class:"fp-media-time-group"},fet={key:6,class:"fp-media-button vds-button"},pet={key:7,class:"fp-media-button vds-button"},met={key:8,class:"fp-media-button vds-button"},get={key:9,class:"fp-media-button vds-button"},vet={key:10,class:"fp-media-button vds-button"},yet={key:2,class:"fp-controls-group"},bet={key:0,class:"fp-media-button vds-button"},_et={key:1,class:"fp-media-button vds-button"},wet={key:2,class:"fp-media-slider vds-time-slider slider-volume"},xet={key:3,class:"fp-media-button vds-button"},ket={key:4,class:"fp-media-button vds-button"},Cet={key:5,class:"fp-media-button vds-button"},$et={key:3,class:"fp-controls-group fp-floating-bar"},Aet={key:0,class:"fp-media-button vds-button"},Eet={key:1,class:"fp-media-button vds-button"},Met={key:2,class:"fp-media-button vds-button"},Tet={key:3,class:"fp-media-time-group"},Pet={key:4,class:"fp-media-controls-spacer-slider"},Iet={key:5,class:"fp-media-button vds-button"},Let={key:6,class:"fp-media-slider vds-time-slider slider-volume"},Oet={key:7,class:"fp-media-button vds-button"},Det={key:8,class:"fp-media-button vds-button"},Ret={key:9,class:"fp-media-button vds-button"},Vet={key:10,class:"fp-media-button vds-button"},Fet={key:11,class:"fp-media-button vds-button"},Net={class:"player_settings_wrap"},Bet={class:"setting_row"},zet={class:"setting_row_flex"},Het={class:"setting_row_flex"},Uet={key:0,class:"setting_row"},jet={key:1,class:"setting_row"},Wet={key:2,class:"setting_row"},Yet={key:3,class:"setting_row"},qet={key:4,class:"setting_row"},Get={key:5,class:"setting_row"},Xet={key:6,class:"setting_row"},Ket={key:7,class:"setting_row"},Zet={key:8,class:"setting_row"},Jet={key:9,class:"setting_row"},Qet={key:10,class:"setting_row"},ett={key:1,class:"setting_row"},ttt={class:"setting_row"},ntt={key:2,class:"setting_row"},stt={key:3,class:"setting_row"},itt={key:4,class:"setting_row"},ott={class:"setting_row setting_row--column"},rtt={class:"setting_row__label-with-icon"},att={class:"fcom_help_text"},ltt={class:"fcom_form_label"},ctt={class:"fcom_help_text"};function utt(t,e,n,s,i,o){const r=Od,a=ln,l=Qt,c=Dd,u=Vd,d=W("InfoFilled"),h=_e,f=js,p=Ld,m=an,b=zo,_=Ws;return v(),A("div",{class:U(["fluent_player_config_wrap",{is_disabled:o.localSettings.enable_fluent_player!=="yes"}])},[y(p,{gutter:30},{default:w(()=>[y(r,{span:17},{default:w(()=>[g("div",{class:"player_preview_wrap",style:qe({"--media-brand":o.localSettings.brandColor,"--fp-control-bar-bg":o.localSettings.controlBarColor||void 0})},[g("div",{class:U(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),A("div",NQe,[g("div",BQe,[g("span",zQe,$(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),A("div",HQe,[g("div",UQe,[g("button",{onClick:e[0]||(e[0]=Be(x=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},[...e[24]||(e[24]=[g("svg",{class:"vds-play-icon",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])])])),o.localSettings.skin!=="minimal"&&!o.behaviors.hide_bottom_controls?(v(),A("div",jQe,[o.localSettings.skin==="modern"?(v(),A("div",WQe,[o.controls.backward?(v(),A("button",YQe,[...e[25]||(e[25]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),A("button",qQe,[...e[26]||(e[26]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),A("button",GQe,[...e[27]||(e[27]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("button",XQe,[...e[28]||(e[28]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("div",KQe,[...e[29]||(e[29]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),A("div",ZQe,[...e[30]||(e[30]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),A("div",JQe,[...e[31]||(e[31]=[g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)])])):O("",!0),o.controls.captions_toggle?(v(),A("button",QQe,[...e[32]||(e[32]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),A("button",eet,[...e[33]||(e[33]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),A("button",tet,[...e[34]||(e[34]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),A("button",net,[...e[35]||(e[35]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),A("button",set,[...e[36]||(e[36]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0),o.localSettings.skin==="classic"?(v(),A(te,{key:1},[o.controls.progress_bar?(v(),A("div",iet,[...e[37]||(e[37]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.localSettings.skin==="classic"?(v(),A("div",oet,[o.controls.backward?(v(),A("button",ret,[...e[38]||(e[38]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),A("button",aet,[...e[39]||(e[39]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),A("button",cet,[...e[40]||(e[40]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("button",uet,[...e[41]||(e[41]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("div",det,[...e[42]||(e[42]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),A("div",het,[...e[43]||(e[43]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),e[49]||(e[49]=g("div",{class:"fp-media-controls-spacer"},null,-1)),o.controls.captions_toggle?(v(),A("button",fet,[...e[44]||(e[44]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),A("button",pet,[...e[45]||(e[45]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),A("button",met,[...e[46]||(e[46]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),A("button",get,[...e[47]||(e[47]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),A("button",vet,[...e[48]||(e[48]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0)],64)):O("",!0),o.localSettings.skin==="simple"?(v(),A("div",yet,[o.controls.play?(v(),A("button",bet,[...e[50]||(e[50]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("button",_et,[...e[51]||(e[51]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("div",wet,[...e[52]||(e[52]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),e[56]||(e[56]=g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)),o.controls.captions_toggle?(v(),A("button",xet,[...e[53]||(e[53]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),A("button",ket,[...e[54]||(e[54]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),A("button",Cet,[...e[55]||(e[55]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0),o.localSettings.skin==="floating"?(v(),A("div",$et,[o.controls.backward?(v(),A("button",Aet,[...e[57]||(e[57]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),A("button",Eet,[...e[58]||(e[58]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),A("button",Met,[...e[59]||(e[59]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.current_time?(v(),A("div",Tet,[...e[60]||(e[60]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),A("div",Pet,[...e[61]||(e[61]=[g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)])])):O("",!0),o.controls.volume?(v(),A("button",Iet,[...e[62]||(e[62]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),A("div",Let,[...e[63]||(e[63]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.captions_toggle?(v(),A("button",Oet,[...e[64]||(e[64]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),A("button",Det,[...e[65]||(e[65]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),A("button",Ret,[...e[66]||(e[66]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),A("button",Vet,[...e[67]||(e[67]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),A("button",Fet,[...e[68]||(e[68]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0)])):O("",!0)],2)],4)]),_:1}),y(r,{span:7,class:"player_settings_col"},{default:w(()=>[g("div",Net,[g("div",Bet,[g("span",null,$(t.$t("Skin")),1),y(l,{modelValue:o.localSettings.skin,"onUpdate:modelValue":e[1]||(e[1]=x=>o.localSettings.skin=x)},{default:w(()=>[y(a,{label:t.$t("Modern"),value:"modern"},null,8,["label"]),y(a,{label:t.$t("Classic"),value:"classic"},null,8,["label"]),y(a,{label:t.$t("Simple"),value:"simple"},null,8,["label"]),y(a,{label:t.$t("Floating"),value:"floating"},null,8,["label"]),y(a,{label:t.$t("Minimal"),value:"minimal"},null,8,["label"])]),_:1},8,["modelValue"])]),g("div",zet,[g("label",null,$(t.$t("Brand Color")),1),y(c,{modelValue:o.localSettings.brandColor,"onUpdate:modelValue":e[2]||(e[2]=x=>o.localSettings.brandColor=x)},null,8,["modelValue"])]),g("div",Het,[g("label",null,$(t.$t("Control Bar Color")),1),y(c,{modelValue:o.localSettings.controlBarColor,"onUpdate:modelValue":e[3]||(e[3]=x=>o.localSettings.controlBarColor=x)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),A(te,{key:0},[g("h4",null,$(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),A("div",Uet,[g("span",null,$(t.$t("Progress Bar")),1),y(u,{modelValue:o.localSettings.controls.progress_bar,"onUpdate:modelValue":e[4]||(e[4]=x=>o.localSettings.controls.progress_bar=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("play")?(v(),A("div",jet,[g("span",null,$(t.$t("Play/Pause")),1),y(u,{modelValue:o.localSettings.controls.play,"onUpdate:modelValue":e[5]||(e[5]=x=>o.localSettings.controls.play=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("forward")?(v(),A("div",Wet,[g("span",null,$(t.$t("Forward")),1),y(u,{modelValue:o.localSettings.controls.forward,"onUpdate:modelValue":e[6]||(e[6]=x=>o.localSettings.controls.forward=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("backward")?(v(),A("div",Yet,[g("span",null,$(t.$t("Backward")),1),y(u,{modelValue:o.localSettings.controls.backward,"onUpdate:modelValue":e[7]||(e[7]=x=>o.localSettings.controls.backward=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("volume")?(v(),A("div",qet,[g("span",null,$(t.$t("Volume")),1),y(u,{modelValue:o.localSettings.controls.volume,"onUpdate:modelValue":e[8]||(e[8]=x=>o.localSettings.controls.volume=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("current_time")?(v(),A("div",Get,[g("span",null,$(t.$t("Current Time")),1),y(u,{modelValue:o.localSettings.controls.current_time,"onUpdate:modelValue":e[9]||(e[9]=x=>o.localSettings.controls.current_time=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("playback_speed")?(v(),A("div",Xet,[g("span",null,$(t.$t("Playback Speed")),1),y(u,{modelValue:o.localSettings.controls.playback_speed,"onUpdate:modelValue":e[10]||(e[10]=x=>o.localSettings.controls.playback_speed=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("settings")?(v(),A("div",Ket,[g("span",null,$(t.$t("Settings Menu")),1),y(u,{modelValue:o.localSettings.controls.settings,"onUpdate:modelValue":e[11]||(e[11]=x=>o.localSettings.controls.settings=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("fullscreen")?(v(),A("div",Zet,[g("span",null,$(t.$t("Fullscreen")),1),y(u,{modelValue:o.localSettings.controls.fullscreen,"onUpdate:modelValue":e[12]||(e[12]=x=>o.localSettings.controls.fullscreen=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("pip")?(v(),A("div",Jet,[g("span",null,$(t.$t("Picture in Picture")),1),y(u,{modelValue:o.localSettings.controls.pip,"onUpdate:modelValue":e[13]||(e[13]=x=>o.localSettings.controls.pip=x)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("captions_toggle")?(v(),A("div",Qet,[g("span",null,$(t.$t("Captions Toggle")),1),y(u,{modelValue:o.localSettings.controls.captions_toggle,"onUpdate:modelValue":e[14]||(e[14]=x=>o.localSettings.controls.captions_toggle=x)},null,8,["modelValue"])])):O("",!0)],64)):O("",!0),g("h4",null,$(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),A("div",ett,[g("span",null,$(t.$t("Muted Autoplay")),1),y(u,{modelValue:o.localSettings.behaviors.muted_autoplay,"onUpdate:modelValue":e[15]||(e[15]=x=>o.localSettings.behaviors.muted_autoplay=x)},null,8,["modelValue"])])):O("",!0),g("div",ttt,[g("span",null,$(t.$t("Save Play Position")),1),y(u,{modelValue:o.localSettings.behaviors.save_play_position,"onUpdate:modelValue":e[16]||(e[16]=x=>o.localSettings.behaviors.save_play_position=x)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),A("div",ntt,[g("span",null,$(t.$t("Hide Top Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_top_controls,"onUpdate:modelValue":e[17]||(e[17]=x=>o.localSettings.behaviors.hide_top_controls=x)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),A("div",stt,[g("span",null,$(t.$t("Hide Center Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_center_controls,"onUpdate:modelValue":e[18]||(e[18]=x=>o.localSettings.behaviors.hide_center_controls=x)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),A("div",itt,[g("span",null,$(t.$t("Hide Bottom Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_bottom_controls,"onUpdate:modelValue":e[19]||(e[19]=x=>o.localSettings.behaviors.hide_bottom_controls=x)},null,8,["modelValue"])])):O("",!0),g("div",ott,[g("span",rtt,[Y($(t.$t("Load Strategy"))+" ",1),y(f,{effect:"dark",placement:"top","popper-class":"fp-load-strategy-tooltip","raw-content":!0,content:"<strong>"+t.$t("Visible")+":</strong> "+t.$t("Loads when scrolled into view")+"<br><strong>"+t.$t("Play")+":</strong> "+t.$t("Loads only on click")+"<br><strong>"+t.$t("Idle")+":</strong> "+t.$t("Loads during browser idle time")+"<br><strong>"+t.$t("Eager")+":</strong> "+t.$t("Loads immediately on page load")},{default:w(()=>[y(h,{class:"setting_row__info-icon"},{default:w(()=>[y(d)]),_:1})]),_:1},8,["content"])]),y(l,{modelValue:o.localSettings.behaviors.load_strategy,"onUpdate:modelValue":e[20]||(e[20]=x=>o.localSettings.behaviors.load_strategy=x),class:"setting_row__select"},{default:w(()=>[y(a,{value:"visible",label:t.$t("Visible")},null,8,["label"]),y(a,{value:"play",label:t.$t("Play")},null,8,["label"]),y(a,{value:"idle",label:t.$t("Idle")},null,8,["label"]),y(a,{value:"eager",label:t.$t("Eager")},null,8,["label"])]),_:1},8,["modelValue"])])])]),_:1})]),_:1}),y(p,{gutter:30},{default:w(()=>[y(r,{span:24,md:12},{default:w(()=>[y(m,{label:t.$t("Enable Video Upload"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[y(u,{modelValue:o.localSettings.video_upload,"onUpdate:modelValue":e[21]||(e[21]=x=>o.localSettings.video_upload=x),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",att,[g("p",null,$(t.$t("Allow space members to upload videos on post based on their permission.")),1)])]),_:1})]),_:1}),o.localSettings.video_upload==="yes"?(v(),D(p,{key:0,gutter:30,style:{"margin-top":"16px"}},{default:w(()=>[y(r,{span:24,style:{"margin-bottom":"4px"}},{default:w(()=>[g("label",ltt,$(t.$t("Who Can Upload Videos")),1)]),_:1}),y(r,{span:24},{default:w(()=>[y(_,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[22]||(e[22]=x=>o.localSettings.video_upload_role=x)},{default:w(()=>[y(b,{value:"admin",class:"fcom_radio"},{default:w(()=>[Y($(t.$t("Admins")),1)]),_:1}),y(b,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[Y($(t.$t("Admins and Moderators")),1)]),_:1}),y(b,{value:"everyone",class:"fcom_radio"},{default:w(()=>[Y($(t.$t("Everyone")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):O("",!0),y(p,{gutter:30},{default:w(()=>[y(r,{span:24},{default:w(()=>[y(m,{label:t.$t("Play Embedded Videos With FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0","margin-top":"20px"}},{default:w(()=>[y(u,{modelValue:o.localSettings.play_embedded_videos,"onUpdate:modelValue":e[23]||(e[23]=x=>o.localSettings.play_embedded_videos=x),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",ctt,[g("p",null,$(t.$t("FluentPlayer only supports videos from YouTube, Vimeo, HLS, DASH, and direct video uploads. The native player will be used for other video types.")),1)])]),_:1})]),_:1})],2)}const dtt=ge(FQe,[["render",utt]]),htt={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:dtt},data(){return{loading:!1,settings:null,saving:!1}},computed:{isNotEnabled(){var t;return((t=this.settings)==null?void 0:t.enable_fluent_player)!=="yes"}},methods:{getSettings(){this.loading=!0,this.$get("settings/fluent-player-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("settings/fluent-player-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message),this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},ftt={key:1},ptt={class:"fcom_help_text"},mtt={class:"dialog_footer fcom_mt_20"};function gtt(t,e,n,s,i,o){const r=Jt,a=Vd,l=an,c=W("FluentPlayerCustomization"),u=fn,d=Ge,h=xt("loading");return i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.settings?(v(),A("div",ftt,[y(u,null,{default:w(()=>[y(l,{label:t.$t("Enable FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[y(a,{modelValue:i.settings.enable_fluent_player,"onUpdate:modelValue":e[0]||(e[0]=f=>i.settings.enable_fluent_player=f),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",ptt,[g("p",null,$(t.$t("FluentPlayer allows you to customize the look of the video player. Also, it gives you the ability to upload videos by your community members.")),1)]),y(c,{modelValue:i.settings,"onUpdate:modelValue":e[1]||(e[1]=f=>i.settings=f)},null,8,["modelValue"])]),_:1}),g("div",mtt,[Oe((v(),D(d,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]])])])):O("",!0)}const vtt=ge(htt,[["render",gtt]]),ytt={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Sp,FluentDnD:pv,Drawer:fp},props:["features"],data(){return{CloseBoldIcon:Ai(j4),config:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,showGroupEditor:!1,editingGroup:null,editingGroupIndex:null,showFieldEditor:!1,editingField:null,editingFieldSlug:null,collapsedGroups:[],openedFieldSlug:null,moveTargetGroup:null,multiselectOptionsList:[],isDirty:!1,fieldTypes:this.appVars.customProfileFieldTypes||[],privacyOptions:[{value:"public",label:this.$t("Public (Everyone)"),short:this.$t("Public"),tag:"success"},{value:"logged_in",label:this.$t("Logged-In Users"),short:this.$t("Logged In"),tag:"primary"},{value:"internal",label:this.$t("Admins Only"),short:this.$t("Admins"),tag:"warning"},{value:"private",label:this.$t("Owner & Admins"),short:this.$t("Private"),tag:"danger"}]}},watch:{config:{handler(){this.isDirty=!0},deep:!0},"features.custom_profile_fields"(){this.isDirty=!0},showSettings(t){t||(this.isDirty=!1)}},computed:{isOptionType(){return this.editingField&&["select","radio","multiselect"].includes(this.editingField.type)}},methods:{hasGroupFields(t){return this.getGroupFields(t).length>0},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/custom-profile-fields").then(t=>{this.config=t.config,this.$nextTick(()=>this.isDirty=!1)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.config.is_enabled!==this.features.custom_profile_fields;this.config.is_enabled=this.features.custom_profile_fields,this.saving=!0,this.$post("admin/custom-profile-fields",{groups:this.config.groups,fields:this.config.fields,is_enabled:this.config.is_enabled}).then(e=>{this.$notify.success(e.message),t&&(this.config.is_enabled==="yes"&&localStorage.setItem("fcom_cpf_reopen","1"),window.location.reload()),e.config&&(this.config=e.config),this.$nextTick(()=>this.isDirty=!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},privacyMeta(t){return this.privacyOptions.find(e=>e.value===t)||{short:t,tag:"info"}},getGroupFields(t){return this.config.fields.filter(e=>e.group===t)},getDefaultGroupSlug(){var e;const t=this.config.groups.find(n=>n.is_system);return t?t.slug:((e=this.config.groups[0])==null?void 0:e.slug)||"_additional_info"},openGroupEditor(t=null){this.editingGroupIndex=t,this.editingGroup=t!==null?{...this.config.groups[t]}:{label:"",slug:"",edit_description:""},this.showGroupEditor=!0},confirmGroup(){if(!this.editingGroup.label){this.$notify.error(this.$t("Group label is required"));return}this.editingGroupIndex!==null?this.config.groups[this.editingGroupIndex]=this.editingGroup:this.config.groups.push(this.editingGroup),this.showGroupEditor=!1,this.editingGroup=null,this.editingGroupIndex=null,this.saveSettings()},deleteGroup(t){const e=this.config.groups[t];if(e.is_system)return;const n=this.getGroupFields(e.slug).length;let s=this.$t("Are you sure you want to delete this group?");n&&(s+=" "+this.$t("Fields in this group will be moved to the default group.")),this.$confirm(s,this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const i=this.getDefaultGroupSlug();this.config.fields.forEach(o=>{o.group===e.slug&&(o.group=i)}),this.config.groups.splice(t,1),this.saveSettings()}).catch(()=>{})},toggleGroup(t){this.collapsedGroups.includes(t)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t):this.collapsedGroups.push(t)},openFieldEditor(t=null,e=null){if(t){const n=this.config.fields.find(s=>s.slug===t);if(!n)return;this.editingField={...n,options:n.type==="multiselect"?{...n.options||{}}:[...n.options||[]]},this.editingFieldSlug=t,this.multiselectOptionsList=n.type==="multiselect"&&n.options?Object.entries(n.options).map(([s,i])=>({key:s,label:i})):[]}else this.editingField={label:"",slug:"",type:"text",placeholder:"",options:[],is_required:!1,is_enabled:!0,privacy:"public",group:e||this.getDefaultGroupSlug()},this.editingFieldSlug=null,this.multiselectOptionsList=[];this.showFieldEditor=!0},confirmField(){var t;if(!this.editingField.label){this.$notify.error(this.$t("Label is required"));return}if(this.isOptionType){if(this.editingField.type==="multiselect"){if(!this.multiselectOptionsList.length){this.$notify.error(this.$t("At least one option is required for this field type"));return}const e={};this.multiselectOptionsList.forEach(n=>{n.key&&n.label&&(e[n.key]=n.label)}),this.editingField.options=e}else if(!((t=this.editingField.options)!=null&&t.length)){this.$notify.error(this.$t("At least one option is required for this field type"));return}}if(this.editingFieldSlug!==null){const e=this.config.fields.findIndex(n=>n.slug===this.editingFieldSlug);e!==-1&&(this.config.fields[e]=this.editingField)}else this.config.fields.push(this.editingField);this.showFieldEditor=!1,this.editingField=null,this.editingFieldSlug=null,this.saveSettings()},handleGroupAction(t,e){t==="delete"&&this.deleteGroup(e)},handleFieldAction(t,e){t==="move"?(this.moveTargetGroup=null,this.openedFieldSlug=e.slug):t==="delete"?this.deleteField(e.slug):t==="duplicate"&&this.duplicateField(e)},duplicateField(t){const e=JSON.parse(JSON.stringify(t));e.label=t.label+" "+this.$t("(Copy)"),e.slug="";const n=this.config.fields.findIndex(s=>s.slug===t.slug);n!==-1&&(this.config.fields.splice(n+1,0,e),this.saveSettings())},moveField(t,e){const n=this.config.fields.find(s=>s.slug===t);n&&(n.group=e,this.openedFieldSlug=null,this.moveTargetGroup=null,this.saveSettings())},deleteField(t){this.$confirm(this.$t("Are you sure you want to delete this field? Any saved data for this field will no longer be accessible."),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const e=this.config.fields.findIndex(n=>n.slug===t);e!==-1&&this.config.fields.splice(e,1),this.saveSettings()}).catch(()=>{})},onFieldDrop(t,e){const n=this.config.fields.filter(i=>i.group!==e),s=[];this.config.groups.forEach(i=>{i.slug===e?s.push(...t.newItems):s.push(...n.filter(o=>o.group===i.slug))}),this.config.fields=s},onFieldCrossDrop({itemKey:t,sourceGroup:e,targetGroup:n}){const s=this.config.fields.find(i=>i.slug===t&&i.group===e);s&&(s.group=n,this.saveSettings())},onEmptyGroupDrop(t,e){const n=t.dataTransfer.getData("source-group"),s=t.dataTransfer.getData("text/plain");if(!n||!s||n===e)return;const i=this.config.fields.find(o=>o.slug===s&&o.group===n);i&&(i.group=e,this.saveSettings())},onTypeChange(){this.editingField.type==="multiselect"?(this.editingField.options={},this.multiselectOptionsList=[]):["select","radio"].includes(this.editingField.type)&&(Array.isArray(this.editingField.options)||(this.editingField.options=[]))}},mounted(){localStorage.getItem("fcom_cpf_reopen")&&(localStorage.removeItem("fcom_cpf_reopen"),this.openSettings())}},btt={class:"fcom_storage_settings"},_tt={key:0,class:"white_loaded"},wtt={key:1,class:"fcom_cpf_settings"},xtt={class:"fcom_cpf_header"},ktt={key:0,style:{padding:"1rem"}},Ctt={key:1,class:"fcom_card_sections fcom_cpf_groups"},Stt={class:"fcom_section_primary_item"},$tt={class:"fcom_section_primary_item_title"},Att={class:"fcom_heading_item"},Ett={class:"fcom_space_counts"},Mtt={class:"fcom_section_item_actions"},Ttt={key:0,class:"fcom_section_items"},Ptt={class:"fcom_heading_item"},Itt={key:0,style:{color:"var(--el-color-danger)"}},Ltt={class:"fcom_section_item_actions"},Ott={style:{position:"relative"}},Dtt={class:"fcom_action_field_popup"},Rtt={class:"fcom_move_popup_close"},Vtt=["onDrop"],Ftt={key:2},Ntt={class:"dialog_header"},Btt={class:"dialog_body"},ztt={class:"dialog_footer"},Htt={class:"dialog_header"},Utt={class:"dialog_body"},jtt={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Wtt={style:{flex:"1"}},Ytt={style:{flex:"1"}},qtt={class:"dialog_footer"};function Gtt(t,e,n,s,i,o){const r=Ge,a=Jt,l=Zt,c=an,u=_e,d=Bo,h=W("Plus"),f=W("MoreFilled"),p=Oa,m=Da,b=La,_=Vd,x=ln,k=Qt,C=fn,S=W("CloseBold"),E=W("FluentDnD"),P=W("drawer"),T=_t,L=Fs,I=XV,V=zo,R=Ws,N=W("UpgradeToProModal"),F=xt("loading");return v(),A(te,null,[g("div",btt,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=B=>o.openSettings())},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),y(P,{modelValue:i.showSettings,"onUpdate:modelValue":e[9]||(e[9]=B=>i.showSettings=B),size:t.dialogWidth,title:t.$t("Custom Profile Fields Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":i.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:w(()=>[i.fetching?(v(),A("div",_tt,[y(a,{rows:5,animated:!0})])):i.config!==null?(v(),A("div",wtt,[y(C,{onSubmit:e[8]||(e[8]=Be(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{"true-value":"yes","false-value":"no",modelValue:n.features.custom_profile_fields,"onUpdate:modelValue":e[1]||(e[1]=B=>n.features.custom_profile_fields=B),label:t.$t("Enable Custom Profile Fields"),size:"large",class:"fcom_checkbox",onChange:e[2]||(e[2]=B=>{B==="yes"&&i.config.is_enabled!=="yes"&&!i.saving&&o.saveSettings()})},null,8,["modelValue","label"])]),_:1}),n.features.custom_profile_fields==="yes"?(v(),A(te,{key:0},[g("div",xtt,[g("h3",null,$(t.$t("Field Groups")),1),y(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=B=>o.openGroupEditor())},{default:w(()=>[Y($(t.$t("Add Group")),1)]),_:1})]),i.config.groups.length?(v(),A("div",Ctt,[y(E,{items:i.config.groups,"row-key":"slug"},{item:w(({data:B,index:G})=>[g("div",{class:U({fcom_collapsed_group:i.collapsedGroups.includes(B.slug)})},[g("div",Stt,[g("div",$tt,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",Att,[g("h4",null,$(B.label),1),g("div",null,[o.getGroupFields(B.slug).length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:q=>o.toggleGroup(B.slug),size:"small",text:""},{default:w(()=>[y(u,null,{default:w(()=>[...e[27]||(e[27]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})],-1)])]),_:1}),g("span",Ett,$(t.$t("%s fields",o.getGroupFields(B.slug).length)),1)]),_:2},1032,["onClick"])):O("",!0),B.is_system?(v(),D(d,{key:1,size:"small",type:"info",style:{"margin-left":"6px"}},{default:w(()=>[Y($(t.$t("System")),1)]),_:1})):O("",!0),y(r,{style:{"background-color":"var(--el-fill-color-light)","margin-left":"5px"},size:"small",text:"",onClick:q=>o.openFieldEditor(null,B.slug)},{default:w(()=>[y(u,null,{default:w(()=>[y(h)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Mtt,[y(r,{class:"fcom_secondary_button",onClick:q=>o.openGroupEditor(G)},{default:w(()=>[Y($(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),B.is_system?O("",!0):(v(),D(b,{key:0,trigger:"click",onCommand:q=>o.handleGroupAction(q,G)},{dropdown:w(()=>[y(m,null,{default:w(()=>[y(p,{command:"delete"},{default:w(()=>[Y($(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[y(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]))])]),i.collapsedGroups.includes(B.slug)?O("",!0):(v(),A("div",Ttt,[o.hasGroupFields(B.slug)?(v(),D(E,{key:0,items:o.getGroupFields(B.slug),"row-key":"slug",group:B.slug,"item-class":"fcom_section_item",onDrop:q=>o.onFieldDrop(q,B.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:q})=>[g("div",{class:"fcom_section_item_title",style:qe(q.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",Ptt,[Y($(q.label)+" ",1),q.is_required?(v(),A("span",Itt,"*")):O("",!0),y(d,{size:"small",type:"info"},{default:w(()=>[Y($(q.type),1)]),_:2},1024),y(d,{size:"small",type:o.privacyMeta(q.privacy).tag},{default:w(()=>[Y($(o.privacyMeta(q.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",Ltt,[y(_,{modelValue:q.is_enabled,"onUpdate:modelValue":X=>q.is_enabled=X,size:"small",onChange:o.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"]),y(r,{class:"fcom_secondary_button",size:"small",onClick:X=>o.openFieldEditor(q.slug)},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",Ott,[y(b,{trigger:"click",onCommand:X=>o.handleFieldAction(X,q)},{dropdown:w(()=>[y(m,{class:"fcom_cpf_field_dropdown"},{default:w(()=>[y(p,{command:"duplicate"},{default:w(()=>[Y($(t.$t("Duplicate")),1)]),_:1}),y(p,{command:"move"},{default:w(()=>[Y($(t.$t("Move")),1)]),_:1}),y(p,{command:"delete"},{default:w(()=>[Y($(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[y(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[y(u,null,{default:w(()=>[y(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Oe(g("div",Dtt,[y(C,{onSubmit:e[5]||(e[5]=Be(X=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Move to a different Group")},{default:w(()=>[y(k,{placeholder:t.$t("Select Group"),modelValue:i.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=X=>i.moveTargetGroup=X)},{default:w(()=>[(v(!0),A(te,null,we(i.config.groups.filter(X=>X.slug!==q.group),X=>(v(),D(x,{key:X.slug,label:X.label,value:X.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),y(r,{disabled:!i.moveTargetGroup,onClick:X=>o.moveField(q.slug,i.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",Rtt,[y(u,{onClick:e[6]||(e[6]=X=>i.openedFieldSlug=null)},{default:w(()=>[y(S)]),_:1})])],512),[[jt,i.openedFieldSlug===q.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),A("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Be(()=>{},["prevent"])),onDrop:Be(q=>o.onEmptyGroupDrop(q,B.slug),["prevent"])},$(t.$t("No fields in this group. Click + to add one.")),41,Vtt))]))],2)]),_:1},8,["items"])])):(v(),A("div",ktt,[g("p",null,$(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),y(c,null,{default:w(()=>[Oe((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,i.saving]])]),_:1})]),_:1})])):(v(),A("div",Ftt,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),y(L,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:i.showGroupEditor,"onUpdate:modelValue":e[14]||(e[14]=B=>i.showGroupEditor=B),width:"40%"},{header:w(()=>[g("div",Ntt,[g("h4",null,$(i.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",ztt,[y(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=B=>i.showGroupEditor=!1)},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),y(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[Y($(i.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Btt,[i.editingGroup?(v(),D(C,{key:0,onSubmit:e[12]||(e[12]=Be(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Group Label")},{default:w(()=>[y(T,{modelValue:i.editingGroup.label,"onUpdate:modelValue":e[10]||(e[10]=B=>i.editingGroup.label=B),placeholder:t.$t("Group name"),disabled:i.editingGroup.is_system},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"]),y(c,{label:t.$t("Description (shown on edit form)")},{default:w(()=>[y(T,{modelValue:i.editingGroup.edit_description,"onUpdate:modelValue":e[11]||(e[11]=B=>i.editingGroup.edit_description=B),type:"textarea",rows:3,placeholder:t.$t("Optional description shown to users when editing their profile")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),y(L,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:i.showFieldEditor,"onUpdate:modelValue":e[25]||(e[25]=B=>i.showFieldEditor=B),width:"40%"},{header:w(()=>[g("div",Htt,[g("h4",null,$(i.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",qtt,[y(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=B=>i.showFieldEditor=!1)},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1}),y(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[Y($(i.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Utt,[i.editingField?(v(),D(C,{key:0,onSubmit:e[23]||(e[23]=Be(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Field Type")},{default:w(()=>[y(k,{modelValue:i.editingField.type,"onUpdate:modelValue":e[15]||(e[15]=B=>i.editingField.type=B),disabled:i.editingFieldSlug!==null,onChange:o.onTypeChange},{default:w(()=>[(v(!0),A(te,null,we(i.fieldTypes,(B,G)=>(v(),D(x,{key:G,label:B,value:G},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1},8,["label"]),y(c,{label:t.$t("Label")},{default:w(()=>[y(T,{modelValue:i.editingField.label,"onUpdate:modelValue":e[16]||(e[16]=B=>i.editingField.label=B),placeholder:t.$t("Field Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(c,{label:t.$t("Placeholder")},{default:w(()=>[y(T,{modelValue:i.editingField.placeholder,"onUpdate:modelValue":e[17]||(e[17]=B=>i.editingField.placeholder=B),placeholder:t.$t("Placeholder text")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(c,{label:t.$t("Privacy")},{default:w(()=>[y(k,{modelValue:i.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=B=>i.editingField.privacy=B)},{default:w(()=>[(v(!0),A(te,null,we(i.privacyOptions,B=>(v(),D(x,{key:B.value,label:B.label,value:B.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(c,{label:t.$t("Group")},{default:w(()=>[y(k,{modelValue:i.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=B=>i.editingField.group=B)},{default:w(()=>[(v(!0),A(te,null,we(i.config.groups,B=>(v(),D(x,{key:B.slug,label:B.label,value:B.slug},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isOptionType&&i.editingField.type!=="multiselect"?(v(),D(c,{key:0,label:t.$t("Options"),class:"fcom_question_options"},{default:w(()=>[(v(!0),A(te,null,we(i.editingField.options,(B,G)=>(v(),A("div",{key:G,class:"fcom_question_option"},[y(T,{modelValue:i.editingField.options[G],"onUpdate:modelValue":q=>i.editingField.options[G]=q,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),i.editingField.options.length>1?(v(),D(I,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:q=>i.editingField.options.splice(G,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),y(I,{type:"primary",underline:!1,onClick:e[20]||(e[20]=B=>i.editingField.options.push(`Option ${i.editingField.options.length+1}`))},{default:w(()=>[Y($("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),i.editingField.type==="multiselect"?(v(),D(c,{key:1,label:t.$t("Options (Key-Value)"),class:"fcom_question_options"},{default:w(()=>[g("div",jtt,[g("span",Wtt,$(t.$t("Key")),1),g("span",Ytt,$(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),A(te,null,we(i.multiselectOptionsList,(B,G)=>(v(),A("div",{key:G,class:"fcom_question_option"},[y(T,{modelValue:B.key,"onUpdate:modelValue":q=>B.key=q,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),y(T,{modelValue:B.label,"onUpdate:modelValue":q=>B.label=q,type:"text",placeholder:t.$t("Label")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),i.multiselectOptionsList.length>1?(v(),D(I,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:q=>i.multiselectOptionsList.splice(G,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),y(I,{type:"primary",underline:!1,onClick:e[21]||(e[21]=B=>i.multiselectOptionsList.push({key:`option_${i.multiselectOptionsList.length+1}`,label:`Option ${i.multiselectOptionsList.length+1}`}))},{default:w(()=>[Y($("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),y(c,{label:t.$t("Required")},{default:w(()=>[y(R,{modelValue:i.editingField.is_required,"onUpdate:modelValue":e[22]||(e[22]=B=>i.editingField.is_required=B)},{default:w(()=>[y(V,{value:!0},{default:w(()=>[Y($(t.$t("Yes")),1)]),_:1}),y(V,{value:!1},{default:w(()=>[Y($(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),i.openUpgradeModal?(v(),D(N,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[26]||(e[26]=B=>i.openUpgradeModal=!1),upgrade_module:"custom_profile_fields"},null,8,["showModal"])):O("",!0)],64)}const Xtt=ge(ytt,[["render",Gtt]]),Ktt={name:"Features",components:{UserBadgesConfig:zJe,LeaderBoardConfig:EJe,StorageSettings:lJe,Layout:pi,AppLayout:mi,UpgradeToProModal:Sp,SocialMediaLinkConfig:oQe,MessagingSettings:EQe,FollowingConfigView:VQe,FluentPlayerSettings:vtt,CustomProfileFieldsConfig:Xtt},data(){return{features:null,addOns:{},loading:!1,installing:!1,openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&jH(this.features.giphy_api_key)){this.$handleError("Giphy API Key is required");return}this.$post("settings/features",{features:this.features}).then(e=>{t&&(this.$notify.success(e.message||this.$t("Settings saved successfully")),location.reload())}).catch(e=>{this.$handleError(e)})},getFeatures(){this.loading=!0,this.$get("settings/features").then(t=>{this.features=t.features,this.addOns=t.addOns}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},installPlugin(t){this.installing=!0,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.getFeatures()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installing=!1})}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},Ztt={class:"settings_router"},Jtt={key:0,class:"white_loaded"},Qtt={key:1,style:{"margin-bottom":"30px"}},ent={class:"fhr_content_layout_body"},tnt={class:"setting_header"},nnt={class:"fcom_advanced_features"},snt={key:0,class:"setting_body"},int={class:"setting_item"},ont={class:"setting_field_placeholder"},rnt={class:"title"},ant={class:"info"},lnt={class:"settings_field_data"},cnt={class:"align-right"},unt={class:"setting_item"},dnt={class:"setting_field_placeholder"},hnt={class:"title"},fnt={class:"info"},pnt={class:"settings_field_data"},mnt={class:"align-right"},gnt={class:"setting_item"},vnt={class:"setting_field_placeholder"},ynt={class:"title"},bnt={class:"info"},_nt={class:"settings_field_data"},wnt={class:"align-right"},xnt={class:"setting_item"},knt={class:"setting_field_placeholder"},Cnt={class:"title"},Snt={class:"info"},$nt={class:"settings_field_data"},Ant={class:"align-right"},Ent={class:"fcom_module_popover_content"},Mnt={class:"setting_item"},Tnt={class:"setting_field_placeholder"},Pnt={class:"title"},Int={class:"info"},Lnt={class:"settings_field_data"},Ont={class:"align-right"},Dnt={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},Rnt={class:"fcom_module_popover_content"},Vnt={class:"setting_item"},Fnt={class:"setting_field_placeholder"},Nnt={class:"title"},Bnt={class:"info"},znt={class:"settings_field_data"},Hnt={class:"align-right"},Unt={class:"fcom_module_popover_content"},jnt={class:"setting_item"},Wnt={class:"setting_field_placeholder"},Ynt={class:"title"},qnt={class:"info"},Gnt={class:"settings_field_data"},Xnt={class:"align-right"},Knt={class:"setting_item"},Znt={class:"setting_field_placeholder"},Jnt={class:"title"},Qnt={class:"info"},est={class:"settings_field_data"},tst={class:"align-right"},nst={class:"setting_item"},sst={class:"setting_field_placeholder"},ist={class:"title"},ost={class:"info"},rst={class:"settings_field_data"},ast={class:"align-right"},lst={class:"fhr_content_layout_body"},cst={class:"setting_header"},ust={class:"fcom_advanced_features"},dst={key:0,class:"setting_body"},hst={class:"setting_field_placeholder"},fst={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},pst={class:"avatar",style:{"margin-right":"15px"}},mst=["src"],gst=["href"],vst={class:"info"},yst={class:"settings_field_data"},bst={class:"align-right"},_st=["href"],wst={key:0,class:"dialog_body"},xst={key:0,class:"dialog_body fluent_player_settings_body"};function kst(t,e,n,s,i,o){const r=Jt,a=Bo,l=W("FollowingConfigView"),c=W("LeaderBoardConfig"),u=W("UserBadgesConfig"),d=Zt,h=Ge,f=Xi,p=_t,m=W("UpgradeToProModal"),b=W("storage-settings"),_=W("SocialMediaLinkConfig"),x=W("CustomProfileFieldsConfig"),k=W("messaging-settings"),C=Al,S=W("fluent-player-settings"),E=W("layout"),P=W("app-layout");return v(),D(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(E,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:w(()=>[g("div",Ztt,[i.loading?(v(),A("div",Jtt,[y(r,{rows:5,animated:!0}),e[12]||(e[12]=g("hr",null,null,-1)),y(r,{rows:7,animated:!0})])):(v(),A("div",Qtt,[g("div",ent,[g("div",tnt,[g("h2",null,$(t.$t("Advanced Features")),1)]),g("div",nnt,[i.features?(v(),A("div",snt,[g("div",int,[g("div",ont,[g("div",rnt,[Y($(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.followers_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",ant,$(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",lnt,[g("div",cnt,[y(l,{features:i.features},null,8,["features"])])])]),g("div",unt,[g("div",dnt,[g("div",hnt,[Y($(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.leader_board_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.leader_board_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",fnt,$(t.$t("__LEADERBOARD_DESC")),1)]),g("div",pnt,[g("div",mnt,[y(c,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",gnt,[g("div",vnt,[g("div",ynt,[Y($(t.$t("User Badges"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.user_badge==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",bnt,$(t.$t("__USER_BADGE_DESC")),1)]),g("div",_nt,[g("div",wnt,[y(u,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",xnt,[g("div",knt,[g("div",Cnt,[Y($(t.$t("Course Module"))+" ",1),i.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",Snt,$(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",$nt,[g("div",Ant,[y(f,{persistent:!1,placement:"bottom",title:t.$t("Course Module Settings"),width:400,trigger:"click"},{reference:w(()=>[y(h,{size:"default",class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Ent,[y(d,{modelValue:i.features.course_module,"onUpdate:modelValue":e[0]||(e[0]=T=>i.features.course_module=T),"true-value":"yes","false-value":"no",label:t.$t("Enable Course Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),y(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",Mnt,[g("div",Tnt,[g("div",Pnt,[Y($(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.giphy_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Int,$(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",Lnt,[g("div",Ont,[i.openGiphyUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:w(()=>[y(h,{size:"default",class:"fcom_secondary_button",onClick:e[3]||(e[3]=T=>!t.has_pro&&(i.openGiphyUpgradeModal=!0))},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[i.features.giphy_module==="yes"?(v(),A("div",Dnt,[y(p,{modelValue:i.features.giphy_api_key,"onUpdate:modelValue":e[1]||(e[1]=T=>i.features.giphy_api_key=T),placeholder:t.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):O("",!0),g("div",Rnt,[y(d,{"true-value":"yes","false-value":"no",modelValue:i.features.giphy_module,"onUpdate:modelValue":e[2]||(e[2]=T=>i.features.giphy_module=T),label:t.$t("Enable Giphy Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),y(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),i.openGiphyUpgradeModal?(v(),D(m,{key:1,showModal:i.openGiphyUpgradeModal,onCloseModal:e[4]||(e[4]=T=>i.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):O("",!0)])])]),g("div",Vnt,[g("div",Fnt,[g("div",Nnt,[Y($(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.emoji_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):i.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Bnt,$(t.$t("__EMOJIS_DESC")),1)]),g("div",znt,[g("div",Hnt,[i.openEmojiUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Emoji Settings"),width:400,trigger:"click"},{reference:w(()=>[y(h,{size:"default",class:"fcom_secondary_button",onClick:e[6]||(e[6]=T=>!t.has_pro&&(i.openEmojiUpgradeModal=!0))},{default:w(()=>[Y($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Unt,[y(d,{"true-value":"yes","false-value":"no",modelValue:i.features.emoji_module,"onUpdate:modelValue":e[5]||(e[5]=T=>i.features.emoji_module=T),label:t.$t("Enable Emoji"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),y(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),i.openEmojiUpgradeModal?(v(),D(m,{key:1,showModal:i.openEmojiUpgradeModal,onCloseModal:e[7]||(e[7]=T=>i.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):O("",!0)])])]),g("div",jnt,[g("div",Wnt,[g("div",Ynt,[Y($(t.$t("Media Module"))+" ",1),i.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1})):i.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",qnt,$(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",Gnt,[g("div",Xnt,[y(b,{features:i.features},null,8,["features"])])])]),g("div",Knt,[g("div",Znt,[g("div",Jnt,$(t.$t("Profile Social Media Links")),1),g("div",Qnt,$(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",est,[g("div",tst,[y(_)])])]),g("div",nst,[g("div",sst,[g("div",ist,[Y($(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),A(te,{key:0},[i.features.custom_profile_fields==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[Y($(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[Y($(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",ost,$(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",rst,[g("div",ast,[y(x,{features:i.features},null,8,["features"])])])])])):O("",!0)])])])),g("div",lst,[g("div",cst,[g("h2",null,$(t.$t("Recommended Plugins and Addons")),1)]),g("div",ust,[i.features?(v(),A("div",dst,[(v(!0),A(te,null,we(i.addOns,(T,L)=>(v(),A("div",{key:L,class:"setting_item"},[g("div",hst,[g("div",fst,[g("div",pst,[g("img",{alt:"",src:T.logo,style:{width:"60px"}},null,8,mst)]),g("div",null,[g("a",{target:"_blank",href:T.learn_more_url},$(T.title),9,gst),T.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[Y($(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",vst,$(T.description),1)])])]),g("div",yst,[g("div",bst,[T.is_installed?O("",!0):(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:I=>o.installPlugin(L)},{default:w(()=>[Y($(T.action_text),1)]),_:2},1032,["onClick"])),L==="fluent-messaging"?(v(),D(h,{key:1,onClick:e[8]||(e[8]=I=>i.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Messaging Settings")),1)]),_:1})):L==="fluent-player"&&T.is_installed?(v(),D(h,{key:2,onClick:e[9]||(e[9]=I=>i.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Player Settings")),1)]),_:1})):T.settings_url?(v(),A("a",{key:3,href:T.settings_url,class:"el-button el-button--default fcom_secondary_button"},$(t.$t("View Settings")),9,_st)):O("",!0)])])]))),128))])):O("",!0)])])]),y(C,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:i.showMessagingSettings,"onUpdate:modelValue":e[10]||(e[10]=T=>i.showMessagingSettings=T),direction:"rtl"},{header:w(({close:T})=>[g("h4",null,$(t.$t("Messaging Settings")),1)]),default:w(()=>[i.showMessagingSettings?(v(),A("div",wst,[y(k)])):O("",!0)]),_:1},8,["size","modelValue"]),y(C,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_player_settings_drawer","close-on-click-modal":!1,"append-to-body":!0,size:"900px",modelValue:i.showFluentPlayerSettings,"onUpdate:modelValue":e[11]||(e[11]=T=>i.showFluentPlayerSettings=T),direction:"rtl"},{header:w(()=>[g("h4",null,$(t.$t("FluentPlayer Settings")),1)]),default:w(()=>[i.showFluentPlayerSettings?(v(),A("div",xst,[y(S)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const Cst=ge(Ktt,[["render",kst]]),Sst={name:"FComColorPicker",components:{InfoFilled:yl},props:["modelValue","label","help_msg"],emits:["update:modelValue","change"],data(){return{color:this.modelValue}},watch:{color(t){this.$emit("update:modelValue",t),this.$emit("change",t)}},methods:{showColorPicker(){this.$refs.colorPicker.show()}}},$st={class:"fcom_color_item"};function Ast(t,e,n,s,i,o){const r=Dd,a=W("InfoFilled"),l=_e,c=js;return v(),A("div",$st,[y(r,{predefine:t.appVars.suggestedColors,ref:"colorPicker",onActiveChange:e[0]||(e[0]=u=>{i.color=u}),modelValue:i.color,"onUpdate:modelValue":e[1]||(e[1]=u=>i.color=u)},null,8,["predefine","modelValue"]),g("label",{style:{cursor:"pointer"},class:"fcom_color_label",onClick:e[2]||(e[2]=(...u)=>o.showColorPicker&&o.showColorPicker(...u))},$(n.label),1),n.help_msg?(v(),D(c,{key:0,content:n.help_msg,placement:"right"},{default:w(()=>[y(l,{class:"fcom_tip"},{default:w(()=>[y(a)]),_:1})]),_:1},8,["content"])):O("",!0)])}const Est=ge(Sst,[["render",Ast]]),Mst={name:"AuthMeta",components:{BgImageUpload:N2,CrepeEditor:Yd,FComColorPicker:Est},props:["currentTab","settings","savingCount"],data(){return{editing:!1,editTab:"content",isDirty:!1,editingField:null,formField:"terms"}},watch:{currentTab(){this.editTab="content",this.editing=!1,this.editingField=null,this.isDirty=!1},savingCount(){this.editing=!1,this.editingField=null,this.isDirty=!1},editingField(){this.editTab="content"},"editingField.description"(t,e){t&&e&&t!==e&&!this.isDirty&&(this.isDirty=!0)}},computed:{getLabel(){return t=>({banner:this.$t("Banner"),form:this.$t("Form")})[t]||this.$t("Banner")},getFieldIcon(){return t=>({banner:"Picture",form:"Memo",fields:"Tickets"})[t.type]||"Picture"},sortedFields(){return Object.values(this.settings).sort((t,e)=>t.position==="left"?-1:e.position==="left"?1:0)},isBannerField(){return this.editingField.type=="banner"},isFormField(){return this.editingField.type=="form"}},methods:{toggleHidden(t){t.hidden=!t.hidden},updateField(t){this.editing=!0,this.editingField=t},backToFields(){this.editing=!1,this.editingField=null,this.isDirty=!1,this.editTab="content"},togglePosition(){var e,n;const t=(e=this.settings.banner)==null?void 0:e.position;this.settings.banner.position=(n=this.settings.form)==null?void 0:n.position,this.settings.form.position=t}}},Tst={key:0,class:"fcom_lockscreen_meta"},Pst={class:"fcom_meta_section lockscreen_meta"},Ist={key:0,class:"fcom_description"},Lst={key:1,class:"fcom_description"},Ost={class:"fcom_meta_section lockscreen_meta"},Dst={key:0,class:"fcom_meta_label"},Rst={key:1,class:"fcom_meta_label"},Vst={class:"fcom_meta_content"},Fst={class:"fcom_meta_block"},Nst={class:"fcom_block_label"},Bst={class:"fcom_meta_sorting"},zst={class:"fcom_block_action"},Hst={key:1,class:"fcom_lockscreen_meta"},Ust={class:"fcom_edit_title"},jst={class:"fcom_edit_content"},Wst={key:0,class:"fcom_help_text"},Yst={key:0,class:"fcom_help_text"};function qst(t,e,n,s,i,o){const r=_e,a=W("Top"),l=W("Bottom"),c=W("EditPen"),u=W("Hide"),d=W("View"),h=W("Back"),f=W("BgImageUpload"),p=an,m=_t,b=W("crepe-editor"),_=fn,x=i2,k=W("FComColorPicker"),C=zo,S=Ws,E=Vd,P=Dfe,T=Ofe,L=s2;return i.editing?(v(),A("div",Hst,[g("div",Ust,[y(r,{onClick:o.backToFields},{default:w(()=>[y(h)]),_:1},8,["onClick"]),g("p",null,$(i.editingField.label),1)]),g("div",jst,[o.isBannerField||o.isFormField?(v(),D(L,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=I=>i.editTab=I)},{default:w(()=>[y(x,{label:t.$t("Content"),name:"content"},{default:w(()=>[y(_,{onSubmit:e[4]||(e[4]=Be(I=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[o.isBannerField?(v(),D(p,{key:0,label:t.$t("Logo"),class:"fcom_bg_image"},{default:w(()=>[y(f,{modelValue:i.editingField.logo,"onUpdate:modelValue":e[0]||(e[0]=I=>i.editingField.logo=I),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0),y(p,{label:t.$t("Title")},{default:w(()=>[y(m,{modelValue:i.editingField.title,"onUpdate:modelValue":e[1]||(e[1]=I=>i.editingField.title=I),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(p,{label:t.$t("Description")},{default:w(()=>[y(b,{modelValue:i.editingField.description,"onUpdate:modelValue":e[2]||(e[2]=I=>i.editingField.description=I)},null,8,["modelValue"]),i.isDirty?(v(),A("span",Wst,$(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),o.isFormField?(v(),D(p,{key:1,label:t.$t("Button Label")},{default:w(()=>[y(m,{modelValue:i.editingField.button_label,"onUpdate:modelValue":e[3]||(e[3]=I=>i.editingField.button_label=I),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1},8,["label"]),o.isBannerField?(v(),D(x,{key:0,label:t.$t("Design"),name:"design"},{default:w(()=>[y(_,{onSubmit:e[11]||(e[11]=Be(I=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[y(f,{modelValue:i.editingField.background_image,"onUpdate:modelValue":e[5]||(e[5]=I=>i.editingField.background_image=I),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),y(k,{help_msg:t.$t("The main background color of the form"),label:t.$t("Background Color"),modelValue:i.editingField.background_color,"onUpdate:modelValue":e[6]||(e[6]=I=>i.editingField.background_color=I)},null,8,["help_msg","label","modelValue"]),y(k,{help_msg:t.$t("The title color of the form"),label:t.$t("Title Color"),modelValue:i.editingField.title_color,"onUpdate:modelValue":e[7]||(e[7]=I=>i.editingField.title_color=I)},null,8,["help_msg","label","modelValue"]),y(k,{help_msg:t.$t("The text color of the form"),label:t.$t("Text Color"),modelValue:i.editingField.text_color,"onUpdate:modelValue":e[8]||(e[8]=I=>i.editingField.text_color=I)},null,8,["help_msg","label","modelValue"]),o.isFormField?(v(),D(k,{key:0,help_msg:t.$t("The button text color of the form"),label:t.$t("Button Text Color"),modelValue:i.editingField.button_label_color,"onUpdate:modelValue":e[9]||(e[9]=I=>i.editingField.button_label_color=I)},null,8,["help_msg","label","modelValue"])):O("",!0),o.isFormField?(v(),D(k,{key:1,help_msg:t.$t("The button background color of the form"),label:t.$t("Button Background"),modelValue:i.editingField.button_color,"onUpdate:modelValue":e[10]||(e[10]=I=>i.editingField.button_color=I)},null,8,["help_msg","label","modelValue"])):O("",!0)]),_:1})]),_:1},8,["label"])):O("",!0),o.isFormField&&i.editingField.fields.terms?(v(),D(x,{key:1,label:t.$t("Fields"),name:"fields"},{default:w(()=>[y(T,{modelValue:i.formField,"onUpdate:modelValue":e[17]||(e[17]=I=>i.formField=I),accordion:""},{default:w(()=>[y(P,{title:t.$t("Terms"),name:"terms"},{default:w(()=>[y(_,{onSubmit:e[15]||(e[15]=Be(I=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=I=>i.isDirty=!0),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(p,{label:t.$t("Label")},{default:w(()=>[y(b,{modelValue:i.editingField.fields.terms.label,"onUpdate:modelValue":e[12]||(e[12]=I=>i.editingField.fields.terms.label=I)},null,8,["modelValue"]),i.isDirty?(v(),A("span",Yst,$(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),y(p,{label:t.$t("Required")},{default:w(()=>[y(S,{modelValue:i.editingField.fields.terms.required,"onUpdate:modelValue":e[13]||(e[13]=I=>i.editingField.fields.terms.required=I)},{default:w(()=>[y(C,{value:!0},{default:w(()=>[Y($(t.$t("Yes")),1)]),_:1}),y(C,{value:!1},{default:w(()=>[Y($(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(p,{label:t.$t("Disabled")},{default:w(()=>[y(E,{modelValue:i.editingField.fields.terms.disabled,"onUpdate:modelValue":e[14]||(e[14]=I=>i.editingField.fields.terms.disabled=I)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1},8,["modelValue"])):O("",!0)])])):(v(),A("div",Tst,[g("div",Pst,[n.currentTab=="login"?(v(),A("div",Ist,[g("p",null,$(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),A("div",Lst,[g("p",null,$(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",Ost,[n.currentTab=="login"?(v(),A("div",Dst,$(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),A("div",Rst,$(t.$t("Customize Sign Up")),1)):O("",!0),g("div",Vst,[g("ul",Fst,[(v(!0),A(te,null,we(o.sortedFields,I=>(v(),A("li",{class:U(["fcom_block_list",{block_hidden:I.hidden}])},[g("div",Nst,[y(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(kt(o.getFieldIcon(I))))]),_:2},1024),g("p",null,$(o.getLabel(I.type)),1)]),g("div",Bst,[y(r,{onClick:o.togglePosition},{default:w(()=>[y(a)]),_:1},8,["onClick"]),y(r,{onClick:o.togglePosition},{default:w(()=>[y(l)]),_:1},8,["onClick"])]),g("div",zst,[y(r,{onClick:V=>o.updateField(I)},{default:w(()=>[y(c)]),_:1},8,["onClick"]),I.type=="banner"?(v(),A(te,{key:0},[I.hidden?(v(),D(r,{key:0,onClick:V=>o.toggleHidden(I)},{default:w(()=>[y(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:V=>o.toggleHidden(I)},{default:w(()=>[y(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const Gst=ge(Mst,[["render",qst]]),Xst={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:Gst},data(){return{settings:this.authSettings[this.currentTab]}},watch:{currentTab(){this.settings=this.authSettings[this.currentTab]},savingCount(){this.saveSettings()},authSettings(){this.settings=this.authSettings[this.currentTab]}},computed:{contentStyles(){var t;return{flexDirection:((t=this.settings.banner)==null?void 0:t.position)=="left"?"row":"row-reverse"}},backgroundStyles(){return t=>({backgroundSize:"cover",backgroundImage:`url(${t==null?void 0:t.background_image})`,backgroundColor:t==null?void 0:t.background_color})},titleStyles(){return t=>({color:t==null?void 0:t.title_color})},descriptionStyles(){return t=>({color:t==null?void 0:t.text_color})},buttonStyles(){return t=>({backgroundColor:t==null?void 0:t.button_color,color:t==null?void 0:t.button_label_color})}},methods:{updateTitle(t,e){e.title=t.target.innerText},updateButtonLabel(t,e){e.button_label=t.target.innerText},saveSettings(){this.saving=!0,this.$post("admin/auth-settings",{settings:this.authSettings}).then(t=>{this.$notify.success(t.message),this.$emit("updateAuthSettings",t.settings)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},Kst={class:"fcom_auth_content"},Zst={key:0,class:"fcom_auth_image"},Jst=["src","alt"],Qst={class:"fcom_auth_title"},eit=["innerHTML"],tit={class:"fcom_auth_content form_content"},nit={class:"fcom_auth_form_header"},sit={class:"fcom_auth_title"},iit=["innerHTML"],oit=["innerHTML"];function rit(t,e,n,s,i,o){const r=W("auth-meta"),a=z1,l=_t,c=an,u=Zt,d=fn,h=Ge,f=Ia;return v(),A(te,null,[y(a,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:w(()=>[le(t.$slots,"before_meta"),y(r,{currentTab:n.currentTab,settings:i.settings,savingCount:n.savingCount},null,8,["currentTab","settings","savingCount"])]),_:3}),y(f,{class:"fcom_full_editor_main lockscreen_editor auth_editor"},{default:w(()=>{var p,m,b,_,x,k,C,S,E;return[g("div",{class:"fcom_editor_content",style:qe(o.contentStyles)},[(p=i.settings.banner)!=null&&p.hidden?O("",!0):(v(),A("div",{key:0,class:"fcom_auth_wrap",style:qe(o.backgroundStyles(i.settings.banner))},[g("div",Kst,[(m=i.settings.banner)!=null&&m.logo?(v(),A("div",Zst,[g("img",{src:(b=i.settings.banner)==null?void 0:b.logo,alt:(_=i.settings.banner)==null?void 0:_.title},null,8,Jst)])):O("",!0),g("div",Qst,[g("h2",{style:qe(o.titleStyles(i.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=P=>o.updateTitle(P,i.settings.banner))},$((x=i.settings.banner)==null?void 0:x.title),37)]),(k=i.settings.banner)!=null&&k.description?(v(),A("div",{key:1,class:"fcom_auth_description",style:qe(o.descriptionStyles(i.settings.banner))},[g("p",{innerHTML:i.settings.banner.description_rendered},null,8,eit)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:qe(o.backgroundStyles(i.settings.form))},[g("div",tit,[g("div",nit,[g("div",sit,[g("h2",{style:qe(o.titleStyles(i.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,i.settings.form))},$((C=i.settings.form)==null?void 0:C.title),37)]),(S=i.settings.form)!=null&&S.description?(v(),A("div",{key:0,class:"fcom_auth_description",style:qe(o.descriptionStyles(i.settings.form))},[g("p",{innerHTML:i.settings.form.description_rendered},null,8,iit)],4)):O("",!0)]),(E=i.settings.form)!=null&&E.fields?(v(),D(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:w(()=>[(v(!0),A(te,null,we(i.settings.form.fields,P=>(v(),A("div",{key:P.name},[["text","email","number","textarea","password"].includes(P.type)?(v(),D(c,{key:0,label:P.label},{default:w(()=>[y(l,{type:P.type,placeholder:P.placeholder},null,8,["type","placeholder"])]),_:2},1032,["label"])):O("",!0),P.type=="inline_checkbox"&&!P.disabled?(v(),D(c,{key:1},{default:w(()=>[y(u,{class:"fcom_checkbox"},{default:w(()=>[g("span",{innerHTML:P.inline_label},null,8,oit)]),_:2},1024)]),_:2},1024)):O("",!0)]))),128))]),_:1})):O("",!0),y(h,{style:qe(o.buttonStyles(i.settings.form)),contenteditable:"true",onBlur:e[2]||(e[2]=P=>o.updateButtonLabel(P,i.settings.form))},{default:w(()=>{var P;return[Y($((P=i.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const ait=ge(Xst,[["render",rit]]),lit={name:"AuthSettings",emits:["completed"],components:{AuthEditor:ait},data(){return{saving:!1,loading:!1,currentTab:"login",savingCount:0,authSettings:{login:[],signup:[]},hasPro:window.fluentComAdmin.pro}},methods:{getSettings(){this.loading=!0,this.$get("admin/auth-settings").then(t=>{this.authSettings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.hasPro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount++},updateAuthSettings(t){this.authSettings=t}},mounted(){this.getSettings()}},cit={class:"fcom_full_editor"},uit={class:"fcom_full_editor_header"},dit={class:"fcom_editor_menu object_menu"},hit={class:"fcom_space_menu_ul"},fit={class:"full_editor_actions"},pit={key:0},mit={key:1};function git(t,e,n,s,i,o){const r=W("ArrowLeft"),a=_e,l=Ge,c=H1,u=W("auth-editor"),d=Jt,h=z1,f=Ia,p=B1,m=xt("loading");return v(),A("div",cit,[y(p,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",uit,[g("div",{onClick:e[0]||(e[0]=b=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),Y(" "+$(t.$t("General Settings")),1)]),g("div",dit,[g("ul",hit,[g("li",{onClick:e[1]||(e[1]=b=>i.currentTab="login")},[g("a",{class:U({"router-link-exact-active":i.currentTab=="login"}),href:"#"},$(t.$t("Login")),3)]),g("li",{onClick:e[2]||(e[2]=b=>i.currentTab="signup")},[g("a",{class:U({"router-link-exact-active":i.currentTab=="signup"}),href:"#"},$(t.$t("Sign Up")),3)])])]),g("div",fit,[Oe((v(),D(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[i.hasPro?(v(),A("span",pit,$(t.$t("Save Changes")),1)):(v(),A("span",mit,$(t.$t("Save Changes (Pro Required)")),1))]),_:1},8,["disabled","onClick"])),[[m,i.saving]])])])]),_:1}),y(p,{class:"fcom_full_editor_container"},{default:w(()=>[i.loading?(v(),A(te,{key:1},[y(h,{class:"fcom_full_editor_side lockscreen_editor"},{default:w(()=>[y(d,{animated:!0,rows:5})]),_:1}),y(f,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(d,{animated:!0,rows:10})]),_:1})],64)):(v(),D(u,{key:0,currentTab:i.currentTab,savingCount:i.savingCount,"auth-settings":i.authSettings,onUpdateAuthSettings:o.updateAuthSettings},null,8,["currentTab","savingCount","auth-settings","onUpdateAuthSettings"]))]),_:1})]),_:1})])}const vit=ge(lit,[["render",git]]),yit={name:"GeneralSettings",components:{ImageUploader:Fd,Layout:pi,AppLayout:mi,CopyDocument:ZD,AuthSettings:vit},data(){return{settings:null,user_roles:{},loading:!1,saving:!1,users_can_register:!0,user_registration_enable_url:"",showCustomLoginForm:!1}},computed:{loginUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth"},signupUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth&form=register"},isRoleBase(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="role_based"},isPublic(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="public"},isDefaultLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="default"},isCustomLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="custom"}},methods:{openLoginCustomizeForm(){this.showCustomLoginForm=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},getSettings(){this.loading=!0,this.$get("admin/general").then(t=>{this.settings=t.settings,this.user_roles=t.user_roles,this.users_can_register=t.users_can_register,this.user_registration_enable_url=t.user_registration_enable_url}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/general",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("General Settings"))}},bit={class:"settings_router"},_it={class:"fhr_content_layout_body"},wit={class:"setting_body"},xit={class:"settings_title"},kit={class:"settings_subtitle"},Cit={class:"settings_title"},Sit={class:"settings_subtitle"},$it=["src"],Ait={class:"settings_title"},Eit={class:"settings_subtitle"},Mit=["src"],Tit={class:"settings_title"},Pit={class:"settings_subtitle"},Iit={class:"settings_title"},Lit={class:"settings_subtitle"},Oit=["src"],Dit={class:"settings_title"},Rit={class:"settings_subtitle"},Vit={class:"fcom_help_text"},Fit={class:"settings_title"},Nit={class:"settings_subtitle"},Bit={class:"settings_title"},zit={class:"settings_subtitle"},Hit={class:"help_text"},Uit={class:"settings_title"},jit={class:"settings_subtitle"},Wit={class:"settings_title"},Yit={class:"settings_subtitle"},qit={class:"fcom_help_text"},Git={class:"settings_title"},Xit={class:"settings_subtitle"},Kit={class:"fcom_help_text"},Zit=["href"],Jit={class:"settings_title"},Qit={class:"settings_subtitle"},eot={key:0};function tot(t,e,n,s,i,o){const r=Ge,a=Od,l=_t,c=an,u=Ld,d=W("image-uploader"),h=dp,f=Ws,p=W("CopyDocument"),m=_e,b=Zt,_=zo,x=ln,k=Qt,C=fn,S=Jt,E=W("auth-settings"),P=W("layout"),T=W("app-layout");return v(),D(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(P,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("General Settings")},{actions:w(()=>[y(r,{class:"fcom_primary_button",disabled:i.saving||i.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",bit,[g("div",_it,[g("div",wit,[i.settings?(v(),D(C,{key:0,onSubmit:e[19]||(e[19]=Be(L=>t.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:w(()=>[y(u,{gutter:20,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",xit,$(t.$t("Community Title")),1),g("span",kit,$(t.$t("This title will be used for the meta title and email notification references. It should match your site title.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{placeholder:t.$t("Community title"),type:"text",modelValue:i.settings.site_title,"onUpdate:modelValue":e[0]||(e[0]=L=>i.settings.site_title=L)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),y(u,{gutter:20,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Cit,$(t.$t("Site Logo (For Light Background)")),1),g("span",Sit,$(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[i.settings.logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:i.settings.logo},null,8,$it)):O("",!0),y(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!i.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[1]||(e[1]=L=>{i.settings.logo=L})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Ait,$(t.$t("Site Logo (For Dark Mode)")),1),g("span",Eit,$(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[i.settings.white_logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:i.settings.white_logo},null,8,Mit)):O("",!0),y(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.settings.white_logo?t.$t("Change"):t.$t("Set Logo"),can_remove:!!i.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[2]||(e[2]=L=>{i.settings.white_logo=L})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Tit,$(t.$t("Logo Permalink")),1),g("span",Pit,$(t.$t("Define the permalink of the logo you want to use.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(f,{style:{"flex-direction":"row"},modelValue:i.settings.logo_permalink_type,"onUpdate:modelValue":e[3]||(e[3]=L=>i.settings.logo_permalink_type=L),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"default"},{default:w(()=>[Y($(t.$t("Default")),1)]),_:1}),y(h,{value:"custom"},{default:w(()=>[Y($(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),i.settings.logo_permalink_type=="default"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Default Permalink")},{default:w(()=>[y(l,{value:t.appVars.urls.portal_base,disabled:"",type:"url",placeholder:t.$t("Default Permalink")},{append:w(()=>[y(r,{onClick:e[4]||(e[4]=L=>o.copyToClipboard(t.appVars.urls.portal_base)),text:""},{default:w(()=>[y(m,null,{default:w(()=>[y(p)]),_:1}),g("span",null,$(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"])):O("",!0),i.settings.logo_permalink_type=="custom"?(v(),D(c,{key:1,class:"fcom_mt_20",label:t.$t("Custom Permalink")},{default:w(()=>[y(l,{modelValue:i.settings.logo_permalink,"onUpdate:modelValue":e[5]||(e[5]=L=>i.settings.logo_permalink=L),type:"url"},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Iit,$(t.$t("Default Open Graph Image")),1),g("span",Lit,$(t.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[i.settings.featured_image?(v(),A("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:i.settings.featured_image},null,8,Oit)):O("",!0),y(d,{additionalData:{resize:!1,disable_convert:"yes",max_width:1600,skip_convert:"yes"},button_text:i.settings.featured_image?t.$t("Change"):t.$t("Set Open Graph Image"),can_remove:!!i.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[6]||(e[6]=L=>{i.settings.featured_image=L})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Dit,$(t.$t("Global Post Status")),1),g("span",Rit,$(t.$t("Enable/disable Post Status")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(b,{modelValue:i.settings.disable_global_posts,"onUpdate:modelValue":e[7]||(e[7]=L=>i.settings.disable_global_posts=L),class:"fcom_checkbox","true-value":"no","false-value":"yes"},{default:w(()=>[Y($(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",Vit,[g("p",null,$(t.$t("If you enable this, then users can post globally without selecting a space, which will be available for everyone.")),1)])]),_:1})]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Fit,$(t.$t("Portal Access Settings")),1),g("span",Nit,$(t.$t("Who can access the portal.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(f,{modelValue:i.settings.access.acess_level,"onUpdate:modelValue":e[8]||(e[8]=L=>i.settings.access.acess_level=L),class:"fcom_radio_group"},{default:w(()=>[y(_,{value:"public"},{default:w(()=>[Y($(t.$t("Everyone")),1)]),_:1}),y(_,{value:"logged_in"},{default:w(()=>[Y($(t.$t("Only Logged In Users")),1)]),_:1}),y(_,{value:"role_based"},{default:w(()=>[Y($(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),A(te,{key:0},[y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Bit,$(t.$t("User Roles")),1),g("span",zit,$(t.$t("Select user roles who can access the portal.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(k,{placeholder:t.$t("Select Access Roles"),"allow-create":"",modelValue:i.settings.access.access_roles,"onUpdate:modelValue":e[9]||(e[9]=L=>i.settings.access.access_roles=L),multiple:""},{default:w(()=>[(v(!0),A(te,null,we(i.user_roles,(L,I)=>(v(),D(x,{key:I,label:L,value:I},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),g("span",Hit,$(t.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1}),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Uit,$(t.$t("Not Matched User Roles")),1),g("span",jit,$(t.$t("Message to show for users without matching roles.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{type:"textarea",rows:3,modelValue:i.settings.restricted_role_content,"onUpdate:modelValue":e[10]||(e[10]=L=>i.settings.restricted_role_content=L)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):O("",!0),o.isPublic?O("",!0):(v(),D(u,{key:1,gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Wit,$(t.$t("Redirect URL")),1),g("span",Yit,$(t.$t("Redirect URL for Public Users")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(l,{modelValue:i.settings.auth_url,"onUpdate:modelValue":e[11]||(e[11]=L=>i.settings.auth_url=L)},null,8,["modelValue"]),g("div",qit,[g("p",null,$(t.$t("Do not use your community portal URL here. Maybe you can use your login/signup URL")),1)])]),_:1})]),_:1})]),_:1})),y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Git,$(t.$t("Login / Registration URLs")),1),g("span",Xit,$(t.$t("Find the default Login/Registration Urls")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,{label:t.$t("Login/Signup Form Type")},{default:w(()=>[y(f,{style:{"flex-direction":"row"},modelValue:i.settings.auth_form_type,"onUpdate:modelValue":e[12]||(e[12]=L=>i.settings.auth_form_type=L),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"default"},{default:w(()=>[Y($(t.$t("Use Default")),1)]),_:1}),y(h,{value:"custom"},{default:w(()=>[Y($(t.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isCustomLogin?(v(),D(c,{key:0,label:t.$t("Please provide your custom Authentication Url"),class:"fcom_mt_20"},{default:w(()=>[y(l,{modelValue:i.settings.cutsom_auth_url,"onUpdate:modelValue":e[13]||(e[13]=L=>i.settings.cutsom_auth_url=L),type:"url",placeholder:t.$t("Custom Auth URL")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),y(c,{class:"fcom_mt_20",label:t.$t("Default Login URL")},{default:w(()=>[y(l,{disabled:"",value:o.loginUrl,placeholder:t.$t("Login URL for public Users")},{append:w(()=>[y(r,{onClick:e[14]||(e[14]=L=>o.copyToClipboard(o.loginUrl)),text:""},{default:w(()=>[y(m,null,{default:w(()=>[y(p)]),_:1}),g("span",null,$(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),y(c,{class:"fcom_mt_20",label:t.$t("Default Signup URL")},{default:w(()=>[y(l,{disabled:"",value:o.signupUrl,placeholder:t.$t("Registration URL for public Users")},{append:w(()=>[y(r,{onClick:e[15]||(e[15]=L=>o.copyToClipboard(o.signupUrl)),text:""},{default:w(()=>[y(m,null,{default:w(()=>[y(p)]),_:1}),g("span",null,$(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),i.users_can_register?O("",!0):(v(),A(te,{key:0},[g("div",Kit,[g("p",null,[Y($(t.$t("Global User registration is disabled for your site. Please enable from General Settings or override in FluentCommunity Settings."))+" ",1),g("a",{target:"_blank",rel:"noopener",href:i.user_registration_enable_url},$(t.$t("Go to General Settings.")),9,Zit)])]),e[21]||(e[21]=g("div",{style:{width:"100%"}},[g("hr")],-1)),y(b,{modelValue:i.settings.explicit_registration,"onUpdate:modelValue":e[16]||(e[16]=L=>i.settings.explicit_registration=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])],64))]),_:1},8,["label"]),i.settings.auth_form_type=="default"?(v(),A(te,{key:1},[y(c,{class:"fcom_mt_20"},{default:w(()=>[y(b,{modelValue:i.settings.use_custom_signup_page,"onUpdate:modelValue":e[17]||(e[17]=L=>i.settings.use_custom_signup_page=L),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Use custom signup URL instead of default signup page")),1)]),_:1},8,["modelValue"])]),_:1}),i.settings.use_custom_signup_page=="yes"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Custom Signup URL (Required)")},{default:w(()=>[y(l,{placeholder:t.$t("Custom Signup URL (Required)"),modelValue:i.settings.custom_signup_url,"onUpdate:modelValue":e[18]||(e[18]=L=>i.settings.custom_signup_url=L)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1})]),_:1}),o.isDefaultLogin?(v(),D(u,{key:2,gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Jit,$(t.$t("Customize Login/Signup Form")),1),g("span",Qit,$(t.$t("Customize your login and registration form settings")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(r,{class:"fcom_secondary_button",onClick:o.openLoginCustomizeForm},{default:w(()=>[Y($(t.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):O("",!0),y(u,{gutter:30},{default:w(()=>[y(r,{class:"fcom_primary_button",disabled:i.saving||i.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):i.loading?(v(),D(S,{key:1,animated:!0,rows:10})):O("",!0)])])]),i.showCustomLoginForm?(v(),A("div",eot,[(v(),D(Ta,{to:"body"},[y(E,{onCompleted:e[20]||(e[20]=L=>i.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const not=ge(yit,[["render",tot]]),sot={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},iot={class:"fcom_content_divider__content"};function oot(t,e,n,s,i,o){return v(),A("div",{class:U(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),A("span",{key:0,class:"fcom_content_divider__line",style:qe({background:n.lineColor})},null,4)):O("",!0),g("div",iot,[le(t.$slots,"default")]),n.position!=="right"?(v(),A("span",{key:1,class:"fcom_content_divider__line",style:qe({background:n.lineColor})},null,4)):O("",!0)],2)}const rot=ge(sot,[["render",oot]]),aot={name:"MenuSettings",components:{MenuGroupSettings:nU,Layout:pi,AppLayout:mi,ContentDivider:rot,ActionPopover:pp},data(){return{menuSettings:null,loading:!1,saving:!1,editingGroupSlug:null,editingGroupTitle:""}},methods:{fetchMenuItems(){this.loading||(this.loading=!0,this.$get("settings/menu-settings").then(t=>{this.menuSettings=t.menuSettings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},isSaveBlocked(){return this.saving?(this.$notify.info(this.$t("Please wait for the current operation to complete.")),!0):!1},saveMenuItems({customSuccessMessage:t=null}={}){return this.isSaveBlocked()?Promise.reject():(this.saving=!0,this.$post("settings/menu-settings",{menuSettings:this.menuSettings}).then(e=>{this.$notify.success(t||e.message),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e),this.fetchMenuItems()}).finally(()=>{this.saving=!1}))},addFooterGroup(){if(this.isSaveBlocked())return;const t="custom_footer_group_"+Date.now(),e={title:this.$t("Untitled Group"),slug:t,items:[]};this.menuSettings.afterCommunityLinkGroups.push(e),this.saveMenuItems({customSuccessMessage:this.$t("New group added successfully.")}).then(()=>{this.editingGroupSlug=t,this.editingGroupTitle=this.$t("Untitled Group")})},resetGroupEditState(){this.editingGroupSlug=null,this.editingGroupTitle=""},initiateEditGroupTitle(t){const e=this.menuSettings.afterCommunityLinkGroups[t];e&&(this.editingGroupSlug=e.slug,this.editingGroupTitle=e.title||"")},saveGroupTitle(t){if(this.isSaveBlocked())return;const e=this.menuSettings.afterCommunityLinkGroups[t];if(!e)return;const n=(this.editingGroupTitle||"").trim();if(!n)return this.deleteGroup(t);e.title=n,this.saveMenuItems({customSuccessMessage:this.$t("Group title updated successfully.")}).then(()=>{this.resetGroupEditState()})},deleteGroup(t){this.isSaveBlocked()||this.$confirm(this.$t("Are you sure you want to remove this group and all its links?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuSettings.afterCommunityLinkGroups.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Group deleted successfully.")})}).catch(()=>{})}},mounted(){this.fetchMenuItems()}},lot={class:"settings_router"},cot={key:0},uot={class:"fcom_card_sections"},dot={class:"fcom_card_sections"},hot={class:"fcom_card_sections"},fot={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},pot={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},mot={style:{margin:"0"}},got={style:{"margin-top":"20px","text-align":"center"}},vot={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},yot={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},bot={key:1,class:"white_loaded"};function _ot(t,e,n,s,i,o){const r=Ge,a=W("menu-group-settings"),l=W("content-divider"),c=_t,u=W("action-popover"),d=Jt,h=W("layout"),f=W("app-layout");return v(),D(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Menu Settings")},{actions:w(()=>[y(r,{class:"fcom_primary_button",disabled:i.saving||i.loading,onClick:e[0]||(e[0]=p=>o.saveMenuItems({customSuccessMessage:t.$t("Menu settings saved successfully.")}))},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:w(()=>[g("div",lot,[i.menuSettings?(v(),A("div",cot,[g("div",uot,[i.menuSettings.mainMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Primary Menu Items"),menuItems:i.menuSettings.mainMenuItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",dot,[i.menuSettings.profileDropdownItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Profile Dropdown Items"),menuItems:i.menuSettings.profileDropdownItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",hot,[i.menuSettings.beforeCommunityMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Top Links (At Sidebar)"),menuItems:i.menuSettings.beforeCommunityMenuItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),i.menuSettings.afterCommunityLinkGroups?(v(),A(te,{key:0},[y(l,null,{default:w(()=>[Y($(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),i.menuSettings.afterCommunityLinkGroups.length?(v(),A(te,{key:0},[(v(!0),A(te,null,we(i.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),A("div",{class:"fcom_card_sections",key:p.slug},[y(a,{custom_svg:!0,has_svg:!1,use_icon_selector:!0,onSave:o.saveMenuItems,title:p.title||t.$t("Untitled Group"),menuItems:p.items,saving:i.saving},{title:w(()=>[i.editingGroupSlug===p.slug?(v(),A("div",fot,[y(c,{modelValue:i.editingGroupTitle,"onUpdate:modelValue":e[1]||(e[1]=b=>i.editingGroupTitle=b),disabled:i.saving,placeholder:t.$t("Group Title"),size:"default",onKeyup:Nt(b=>o.saveGroupTitle(m),["enter"])},null,8,["modelValue","disabled","placeholder","onKeyup"]),y(r,{class:"fcom_primary_button",disabled:i.saving,onClick:b=>o.saveGroupTitle(m),style:{"padding-top":"18px","padding-bottom":"18px"}},{default:w(()=>[Y($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"]),y(r,{class:"fcom_secondary_button",disabled:i.saving,style:{"margin-left":"0px","padding-top":"18px","padding-bottom":"18px"},onClick:o.resetGroupEditState},{default:w(()=>[Y($(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),A("div",pot,[g("h4",mot,$(p.title||t.$t("Untitled Group")),1),i.saving?O("",!0):(v(),D(u,{key:0,items:[{label:t.$t("Edit Title"),action:()=>{o.initiateEditGroupTitle(m)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.deleteGroup(m)}}]},null,8,["items"]))]))]),_:2},1032,["onSave","title","menuItems","saving"])]))),128)),g("div",got,[y(r,{disabled:i.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[Y($(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),A("div",vot,[g("p",yot,$(t.$t("No bottom link group has been created yet. Create one to add links to the sidebar bottom.")),1),y(r,{disabled:i.saving,onClick:e[3]||(e[3]=p=>o.addFooterGroup()),class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),A("div",bot,[y(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const wot=ge(aot,[["render",_ot]]),xot={name:"ManagerForm",props:["modelValue"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{user_id:"",roles:[]},adding:!1}},methods:{fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"add_manager",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},addManager(){if(!this.form.user_id||!this.form.roles.length){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/managers",{user_id:this.form.user_id,roles:this.form.roles}).then(t=>{this.$notify.success(t.message),this.$emit("completed")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}},mounted(){this.form.roles||(this.form.roles=[]),this.modelValue.editing_user||this.fetchUsers()}},kot={style:{float:"left"}},Cot={style:{float:"right",color:"#8492a6","font-size":"13px"}},Sot={key:1},$ot={class:"dialog_footer"},Aot={key:0},Eot={key:1};function Mot(t,e,n,s,i,o){const r=ln,a=Qt,l=an,c=Yc,u=Zt,d=r5,h=Ge,f=fn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Be(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.form,"onUpdate:modelValue":e[4]||(e[4]=m=>i.form=m),size:"large"},{default:w(()=>[i.form.editing_user?(v(),A("p",Sot,$(t.$t("Editing manager role for %s",i.form.editing_user.display_name)),1)):(v(),D(l,{key:0,label:t.$t("User")},{default:w(()=>[y(a,{class:"rich_select",filterable:"",remote:"",loading:i.loading,"remote-method":o.fetchUsers,placeholder:t.$t("Select User"),modelValue:i.form.user_id,"onUpdate:modelValue":e[0]||(e[0]=m=>i.form.user_id=m)},{default:w(()=>[(v(!0),A(te,null,we(i.users,m=>(v(),D(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:w(()=>[g("span",kot,$(m.display_name),1),g("span",Cot,$(m.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"])),y(c,{type:"info",closable:!1,class:"fcom_mb_10"},{default:w(()=>[Y($(t.$t("For course editor access, please make sure the selected user have contributor or higher user role.")),1)]),_:1}),y(l,{label:t.$t("Space Management Roles")},{default:w(()=>[y(d,{modelValue:i.form.roles,"onUpdate:modelValue":e[1]||(e[1]=m=>i.form.roles=m)},{default:w(()=>[y(u,{value:"admin",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Community Admin (All Access)")),1)]),_:1}),y(u,{disabled:i.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),y(u,{disabled:i.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Course Admin")),1)]),_:1},8,["disabled"]),y(u,{disabled:i.form.roles.includes("admin")||i.form.roles.includes("course_admin"),value:"course_creator",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",$ot,[le(t.$slots,"after_form",{},()=>[Oe((v(),D(h,{class:"fcom_primary_button",disabled:i.adding,onClick:e[2]||(e[2]=m=>o.addManager())},{default:w(()=>[i.form.editing_user?(v(),A("span",Aot,$(t.$t("Update Role")),1)):(v(),A("span",Eot,$(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,i.adding]])])])]),_:3},8,["modelValue"])}const Tot=ge(xot,[["render",Mot]]),Pot={name:"Avatar",props:{xprofile:{default:()=>({})},with_level:{type:Boolean,default(){return!0}},is_rounded:{type:Boolean,default(){return!0}},with_completion:{type:Boolean,default(){return!1}},is_online:{type:Boolean,default(){return!1}}},computed:{level(){if(!this.with_level||!this.has_leaderboard)return"";const t=kh(this.xprofile.total_points);return t?t.level:0},withCompletion(){var n;if(!this.with_completion||!((n=this.xprofile)!=null&&n.total_points))return!1;const t=kh(this.xprofile.total_points),e=kh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=kh(this.xprofile.total_points),e=kh(t.max_points+1),n=this.xprofile.total_points-t.min_points,s=e.min_points-t.min_points,o=n/s*100/100*360;return{backgroundImage:`conic-gradient(rgb(56, 117, 223) ${o}deg, #D9D9D9 ${o}deg)`}}},methods:{setAltImg(t){t.target.src=this.appVars.assets_url+"images/placeholder.png"}}},Iot=["src"],Lot={key:1,class:"fcom_no_image"},Oot={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function Dot(t,e,n,s,i,o){return v(),A("div",{class:U([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:qe(o.getOutlineStyle),class:U({fcom_compilation_avatar:o.withCompletion})},[n.xprofile?(v(),A("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,Iot)):(v(),A("span",Lot))],6),o.level||n.is_online?(v(),A("div",Oot,[g("span",null,$(o.level),1)])):O("",!0)],2)}const B2=ge(Pot,[["render",Dot]]),Rot={name:"ModeratorSettings",components:{UserAvatar:B2,UserRouteLink:ta,ManagerForm:Tot,Layout:pi,AppLayout:mi},data(){return{managers:[],loading:!1,paginate:{page:1,per_page:20,total:0},search:"",bulkAction:"",showModal:!1,editing_manager:{user_id:"",roles:[]}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_manager=t?{user_id:t.ID,roles:t.community_role.value,editing_user:t}:{user_id:"",roles:[]},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/managers",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{this.managers=t.managers.data,this.paginate.total=t.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeManager(t){this.$confirm(this.$t("Are you sure you want to remove this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/managers/"+t.ID).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})},formatRoles(t){let e=[];return this.each(t,n=>{e.push(this.$labelize(n))}),e.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Moderator Settings"))}},Vot=["href"],Fot={class:"settings_router manager_section"},Not={class:"fhr_content_layout_body"},Bot={key:0,class:"setting_body"},zot={class:"fcom_manager_actions"},Hot={class:"bulk_search"},Uot={class:"fcom_manager_table"},jot={class:"user_col"},Wot={class:"user_info"},Yot={style:{display:"flex"}},qot={class:"user_id"},Got={class:"user_email"},Xot={class:"fcom_table_action_col"},Kot={key:1,class:"setting_body",style:{"text-align":"center"}},Zot={class:"promo_description"},Jot=["href"],Qot={class:"dialog_header"},ert={class:"dialog_left"},trt={class:"dialog_body"};function nrt(t,e,n,s,i,o){const r=W("Plus"),a=_e,l=Ge,c=_t,u=e5,d=W("user-route-link"),h=Jr,f=Zr,p=W("layout"),m=W("app-layout"),b=W("manager-form"),_=Fs,x=xt("loading");return v(),A(te,null,[y(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Community Managers")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=k=>o.showForm(null))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Add Manager")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Vot))]),default:w(()=>[g("div",Fot,[g("div",Not,[t.has_pro?(v(),A("div",Bot,[g("div",zot,[g("div",Hot,[y(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=k=>i.search=k),onKeydown:Nt(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",Uot,[Oe((v(),D(f,{data:i.managers,"empty-text":t.$t("No Managers Found")},{default:w(()=>[y(h,{label:t.$t("Members"),sortable:"","min-width":"160"},{default:w(k=>[g("div",jot,[y(u,{src:k.row.xprofile.avatar},null,8,["src"]),g("div",Wot,[g("div",Yot,[y(d,{xprofile:k.row.xprofile},null,8,["xprofile"]),g("span",qot,"#"+$(k.row.ID),1)]),g("span",Got,$(k.row.user_email),1)])])]),_:1},8,["label"]),y(h,{label:t.$t("Role"),sortable:""},{default:w(k=>[g("span",null,$(o.formatRoles(k.row.community_role.value)),1)]),_:1},8,["label"]),y(h,null,{default:w(k=>[g("div",Xot,[y(l,{onClick:C=>o.showForm(k.row),size:"small"},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:C=>o.removeManager(k.row),type:"danger",plain:"",size:"small"},{default:w(()=>[Y($(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[x,i.loading]])])])):(v(),A("div",Kot,[g("p",Zot,$(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Jot)]))])])]),_:1},8,["title"])]),_:1}),y(_,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[4]||(e[4]=k=>i.showModal=k),direction:"rtl"},{header:w(({close:k})=>[g("div",Qot,[g("div",ert,[e[6]||(e[6]=g("div",{class:"header_icon"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z",fill:"currentColor"})])],-1)),g("div",null,[g("h4",null,$(t.$t(i.editing_manager.editing_user?"Update Role":"Add Manager")),1),g("p",null,$(t.$t("you can edit your role here")),1)])])])]),default:w(()=>[g("div",trt,[i.showModal?(v(),D(b,{key:0,onCompleted:e[2]||(e[2]=()=>{o.fetch(),i.showModal=!1}),modelValue:i.editing_manager,"onUpdate:modelValue":e[3]||(e[3]=k=>i.editing_manager=k)},null,8,["modelValue"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const srt=ge(Rot,[["render",nrt]]),irt={name:"NestedReplyBox",components:{SingleComment:F2,FeedTextComposer:hv,CommentReactions:KH,HeartIcon:D2},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions"],emits:["commented","copyLink"],data(){return{open:!1,commentReply:{message:"",media_images:[]},submitting:!1}},computed:{canComment(){return this.hasCommentPermission(this.feed)||!this.checkPermission}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.addComment()},addComment(){var e,n,s;const t=((e=this.commentReply.media_images)==null?void 0:e.length)>0||((s=(n=this.commentReply.meta)==null?void 0:n.media_preview)==null?void 0:s.image);!this.commentReply.message&&!t||!this.comment.id||(this.submitting=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.commentReply.message,parent_id:this.comment.id,media_images:this.commentReply.media_images,meta:this.commentReply.meta}).then(i=>{this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},this.comment.comments.push(i.comment),Array.isArray(this.feed.comments)&&this.feed.comments.push(i.comment),this.$emit("commented",i.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.open=!1}).catch(i=>{this.$handleError(i)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(t){var n;if(!this.hasCommentPermission(this.feed)){this.$notify({message:this.$t("Please join the Space to post a comment."),type:"warning"});return}this.open=!this.open;let e=(n=t==null?void 0:t.xprofile)==null?void 0:n.username;this.open&&e&&t.user_id!=this.auth.user_id&&(this.commentReply.message=`@${e}&nbsp;`)},handleCommentDelete(t){const e=this.comment.comments[t];this.comment.comments.splice(t,1),e!=null&&e.id&&Array.isArray(this.feed.comments)&&(this.feed.comments=this.feed.comments.filter(n=>n.id!==e.id)),this.feed.comments_count--},toggleLike(t){let e=!t.liked;this.$post("feeds/"+this.feed.id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},emitCopyLink(t){this.$emit("copyLink",t)}}},ort={key:0,class:"reply_box"},rrt={class:"fcom_comments_react fcom_reaction_list"},art={class:"child_comments"},lrt=["id"],crt={key:0,class:"reply_box"},urt=["onClick"],drt={class:"fcom_comments_react fcom_reaction_list"},hrt={key:0,class:"child_reply_wrap"},frt={class:"feed_commenting"},prt={class:"person_avatar"},mrt=["alt","src"];function grt(t,e,n,s,i,o){var h;const r=W("HeartIcon"),a=_e,l=W("CommentReactions"),c=W("single-comment"),u=Ge,d=W("feed-text-composer");return v(),A(te,null,[o.canComment?(v(),A("div",ort,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),A("span",{key:0,onClick:e[0]||(e[0]=f=>o.toggleCommentBox(n.comment)),class:"reply_btn"},$(t.$t("Reply")),1)):O("",!0),g("span",{class:U([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",rrt,[y(a,{class:U({user_reacted:n.comment.liked}),onClick:e[1]||(e[1]=f=>o.toggleLike(n.comment))},{default:w(()=>[y(r,{filled:n.comment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(n.comment.reactions_count)?(v(),D(l,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2),le(t.$slots,"after_reply_box_text")])):O("",!0),!n.show_reacts_only||i.open?(v(),A(te,{key:1},[g("div",art,[(v(!0),A(te,null,we(n.comment.comments,(f,p)=>(v(),A("div",{id:"comment_"+f.id,class:"each_comment"},[y(c,{onCopyLink:o.emitCopyLink,onDeleted:m=>o.handleCommentDelete(p),comment:f,show_report:!0},{after_comment_text:w(()=>{var m;return[o.canComment?(v(),A("div",crt,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("span",{key:0,onClick:b=>o.toggleCommentBox(f),class:"reply_btn"},$(t.$t("Reply")),9,urt)):O("",!0),g("span",{class:U([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",drt,[y(a,{class:U({user_reacted:f.liked}),onClick:b=>o.toggleLike(f)},{default:w(()=>[y(r,{filled:f.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(f.reactions_count)?(v(),D(l,{key:0,comment:f},null,8,["comment"])):O("",!0)])],2)])):O("",!0)]}),_:2},1032,["onCopyLink","onDeleted","comment"])],8,lrt))),256))]),i.open?(v(),A("div",hrt,[g("div",frt,[g("div",prt,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,mrt)]),g("div",{onKeydown:e[3]||(e[3]=Nt((...f)=>o.maybeSave&&o.maybeSave(...f),["enter"])),class:"feed_comment_input comment_text"},[y(d,{config:{multipleMedia:!0},context:"comment",defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:i.submitting,autofocus:i.open,mentionQuery:{space_id:n.feed.space_id},content:i.commentReply,placeholder:t.$t("Leave a reply")},{default:w(()=>[y(u,{loading:i.submitting,disabled:i.submitting,onClick:e[2]||(e[2]=f=>o.addComment()),class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Reply")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["defaultMentions","disabled","autofocus","mentionQuery","content","placeholder"])],32)])])):O("",!0)],64)):O("",!0)],64)}const vrt=ge(irt,[["render",grt]]),yrt={name:"FeedComments",components:{SingleComment:F2,NestedReplyBox:vrt},props:["feed","show_all","checkPermission","defaultMentions","sortBy","is_single"],emits:["forceShowAll"],created(){this._lastSortBy=null,this._sortedTopLevelIds=null},data(){return{loading:!1}},computed:{_displayData(){const t=this.feed.comments;if(!t||!t.length)return{list:[],lastComment:null};const e={},n=[],s={};let i=null;for(let l=0;l<t.length;l++){const c=t[l];!i&&c.is_sticky&&(i=c),c.parent_id?(e[c.parent_id]||(e[c.parent_id]=[]),e[c.parent_id].push(c)):(n.push(c.id),s[c.id]=c)}for(const l of n)s[l].comments=e[l]||void 0;if(i&&s[i.id]){i=s[i.id];const l=n.indexOf(i.id);l!==-1&&n.splice(l,1),delete s[i.id]}const o=i||(n.length?s[n[n.length-1]]:null);if(!n.length&&!i)return{list:[],lastComment:null};const r=this.sortBy;if(this._lastSortBy!==r){let l=[...n];r==="oldest"||!r?l.sort((c,u)=>c-u):r==="latest"?l.sort((c,u)=>u-c):r==="popular"?l.sort((c,u)=>{var d,h;return(((d=s[u])==null?void 0:d.reactions_count)||0)-(((h=s[c])==null?void 0:h.reactions_count)||0)}):r==="most_replied"&&l.sort((c,u)=>{var d,h;return(((d=e[u])==null?void 0:d.length)||0)-(((h=e[c])==null?void 0:h.length)||0)}),this._sortedTopLevelIds=l,this._lastSortBy=r}let a;if(this._sortedTopLevelIds){const l=new Set(n),c=new Set(this._sortedTopLevelIds);a=this._sortedTopLevelIds.filter(u=>l.has(u)&&s[u]).map(u=>s[u]);for(let u=n.length-1;u>=0;u--)c.has(n[u])||a.unshift(s[n[u]])}else a=n.map(l=>s[l]);return i&&a.unshift(i),{list:a,lastComment:o}},displayComments(){return this._displayData.list},lastComment(){return this._displayData.lastComment}},methods:{fetchComments(){this.loading=!0,this.$get("feeds/"+this.feed.id+"/comments").then(t=>{this.feed.comments=t.comments,this.feed.type=="text"&&this.$eventBus.emit("feed_interaction",this.feed.id)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},collectCommentIds(t){var s;const e=new Set([t.id]),n=t.comments?[...t.comments]:[];for(;n.length;){const i=n.pop();e.add(i.id),(s=i.comments)!=null&&s.length&&n.push(...i.comments)}return e},handleCommentDelete(t){const e=this.collectCommentIds(t);this.feed.comments=this.feed.comments.filter(n=>!e.has(n.id)),this.feed.comments_count-=e.size},handleStickyCommentDelete(){this.feed.sticky_comment=null,this.feed.comments_count--},copyCommentLink(t){let e={name:"single_feed",params:{feed_slug:this.feed.slug},query:{comment_id:t.id}};this.feed.course_id&&(e={name:"view_lesson",params:{lesson_slug:this.feed.slug},query:{comment_id:t.id}});let n=this.$router.resolve(e),s=this.appVars.urls.portal_base;s=s.replace(/\/$/,"");let i=s+n.fullPath;navigator.clipboard.writeText(i).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(o=>{this.$notify.error(this.$t("Failed to copy the link"))})},maybeShowAllComments(){if(this.is_single||!this.hasFeature("show_post_modal")){this.$emit("forceShowAll");return}this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments"})}},mounted(){!this.feed.comments&&this.feed.comments_count&&this.fetchComments()}},brt={key:0,class:"feed_comments"},_rt=["id"],wrt={key:1,class:"feed_comments"},xrt={class:"each_comment"};function krt(t,e,n,s,i,o){const r=Jt,a=W("nested-reply-box"),l=W("single-comment");return n.show_all?(v(),A("div",brt,[i.loading?(v(),D(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),A(te,{key:1},[le(t.$slots,"before_comments_start"),(v(!0),A(te,null,we(o.displayComments,(c,u)=>(v(),A("div",{class:"each_comment",key:c.id,id:"comment_"+c.id},[y(l,{comment:c,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onReload:o.fetchComments,onDeleted:d=>o.handleCommentDelete(c)},ks({_:2},[c.parent_id?void 0:{name:"after_comment_text",fn:w(()=>[y(a,{feed:n.feed,comment:c,checkPermission:n.checkPermission,defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:o.copyCommentLink},null,8,["feed","comment","checkPermission","defaultMentions","onCopyLink"])]),key:"0"}]),1032,["comment","space_id","onCopyLink","onReload","onDeleted"])],8,_rt))),128))],64))])):o.lastComment?(v(),A("div",wrt,[g("div",xrt,[y(l,{comment:o.lastComment,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onDeleted:e[1]||(e[1]=c=>o.handleCommentDelete(o.lastComment))},ks({_:2},[o.lastComment.parent_id?void 0:{name:"after_comment_text",fn:w(()=>[y(a,{defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:o.copyCommentLink,show_reacts_only:!0,checkPermission:n.checkPermission,feed:n.feed,comment:o.lastComment},{after_reply_box_text:w(()=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),A("span",{key:0,onClick:e[0]||(e[0]=c=>t.$emit("forceShowAll")),class:"reply_btn last_comment_reply_txt"},$(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),1)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])]),n.feed.comments_count>1?(v(),A("div",{key:0,onClick:e[2]||(e[2]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},$(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const Crt=ge(yrt,[["render",krt]]),Srt={name:"ReactedUsers",components:{UserRouteLink:ta},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{feed:{type:Object,required:!0,default:()=>({})}},computed:{reactedProfiles(){let t=[],e=null;return this.feed.has_user_react&&(e=this.auth.user_id,t.push({user_id:e,avatar:this.auth.avatar})),this.each(this.feed.reactions,n=>{n.user_id!=e&&n.xprofile&&t.push({user_id:n.user_id,avatar:n.xprofile.avatar})}),t.slice(0,3)}},methods:{getReactions(){this.reactions&&this.reactions.length===this.feed.reactions_count||(this.loading=!0,this.$get("feeds/"+this.feed.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows),this.$nextTick(()=>{var e,n,s,i;(i=(s=(n=(e=this.$refs.reactedPopover)==null?void 0:e.popperRef)==null?void 0:n.popperInstanceRef)==null?void 0:s.update)==null||i.call(s)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},$rt=["title"],Art={key:0,class:"reactions_avatars"},Ert=["alt","src"],Mrt={key:0},Trt={key:1},Prt={class:"fcom_user_lists"},Irt={key:2};function Lrt(t,e,n,s,i,o){const r=Jt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ei,u=Xi;return v(),D(u,{ref:"reactedPopover",persistent:!1,"popper-class":"fcom_feed_reacted_user_list",placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",onShow:o.getReactions},{reference:w(()=>[g("div",{title:t.$t("Click to view"),class:"fcom_reactions"},[o.reactedProfiles&&o.reactedProfiles.length?(v(),A("div",Art,[(v(!0),A(te,null,we(o.reactedProfiles,d=>(v(),A("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),A("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,Ert)):O("",!0)]))),128))])):O("",!0),g("span",null,$(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,$rt)]),default:w(()=>[i.loading?(v(),A("div",Mrt,[y(r,{animated:!0,rows:3})])):i.reactions?(v(),A("div",Trt,[y(c,{"max-height":"300px"},{default:w(()=>[g("ul",Prt,[(v(!0),A(te,null,we(i.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(te,{key:0},[y(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),y(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),A("div",Irt,[g("p",null,$(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const Ort=ge(Srt,[["render",Lrt]]);function Drt(){this.__data__=[],this.size=0}var Rrt=Drt;function Vrt(t,e){return t===e||t!==t&&e!==e}var cU=Vrt,Frt=cU;function Nrt(t,e){for(var n=t.length;n--;)if(Frt(t[n][0],e))return n;return-1}var z2=Nrt,Brt=z2,zrt=Array.prototype,Hrt=zrt.splice;function Urt(t){var e=this.__data__,n=Brt(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():Hrt.call(e,n,1),--this.size,!0}var jrt=Urt,Wrt=z2;function Yrt(t){var e=this.__data__,n=Wrt(e,t);return n<0?void 0:e[n][1]}var qrt=Yrt,Grt=z2;function Xrt(t){return Grt(this.__data__,t)>-1}var Krt=Xrt,Zrt=z2;function Jrt(t,e){var n=this.__data__,s=Zrt(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}var Qrt=Jrt,eat=Rrt,tat=jrt,nat=qrt,sat=Krt,iat=Qrt;function $p(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}$p.prototype.clear=eat;$p.prototype.delete=tat;$p.prototype.get=nat;$p.prototype.has=sat;$p.prototype.set=iat;var H2=$p,oat=H2;function rat(){this.__data__=new oat,this.size=0}var aat=rat;function lat(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var cat=lat;function uat(t){return this.__data__.get(t)}var dat=uat;function hat(t){return this.__data__.has(t)}var fat=hat,pat=xp,mat=pat(Object,"create"),U2=mat,oT=U2;function gat(){this.__data__=oT?oT(null):{},this.size=0}var vat=gat;function yat(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bat=yat,_at=U2,wat="__lodash_hash_undefined__",xat=Object.prototype,kat=xat.hasOwnProperty;function Cat(t){var e=this.__data__;if(_at){var n=e[t];return n===wat?void 0:n}return kat.call(e,t)?e[t]:void 0}var Sat=Cat,$at=U2,Aat=Object.prototype,Eat=Aat.hasOwnProperty;function Mat(t){var e=this.__data__;return $at?e[t]!==void 0:Eat.call(e,t)}var Tat=Mat,Pat=U2,Iat="__lodash_hash_undefined__";function Lat(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Pat&&e===void 0?Iat:e,this}var Oat=Lat,Dat=vat,Rat=bat,Vat=Sat,Fat=Tat,Nat=Oat;function Ap(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Ap.prototype.clear=Dat;Ap.prototype.delete=Rat;Ap.prototype.get=Vat;Ap.prototype.has=Fat;Ap.prototype.set=Nat;var Bat=Ap,rT=Bat,zat=H2,Hat=bS;function Uat(){this.size=0,this.__data__={hash:new rT,map:new(Hat||zat),string:new rT}}var jat=Uat;function Wat(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Yat=Wat,qat=Yat;function Gat(t,e){var n=t.__data__;return qat(e)?n[typeof e=="string"?"string":"hash"]:n.map}var j2=Gat,Xat=j2;function Kat(t){var e=Xat(this,t).delete(t);return this.size-=e?1:0,e}var Zat=Kat,Jat=j2;function Qat(t){return Jat(this,t).get(t)}var elt=Qat,tlt=j2;function nlt(t){return tlt(this,t).has(t)}var slt=nlt,ilt=j2;function olt(t,e){var n=ilt(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}var rlt=olt,alt=jat,llt=Zat,clt=elt,ult=slt,dlt=rlt;function Ep(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Ep.prototype.clear=alt;Ep.prototype.delete=llt;Ep.prototype.get=clt;Ep.prototype.has=ult;Ep.prototype.set=dlt;var xS=Ep,hlt=H2,flt=bS,plt=xS,mlt=200;function glt(t,e){var n=this.__data__;if(n instanceof hlt){var s=n.__data__;if(!flt||s.length<mlt-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new plt(s)}return n.set(t,e),this.size=n.size,this}var vlt=glt,ylt=H2,blt=aat,_lt=cat,wlt=dat,xlt=fat,klt=vlt;function Mp(t){var e=this.__data__=new ylt(t);this.size=e.size}Mp.prototype.clear=blt;Mp.prototype.delete=_lt;Mp.prototype.get=wlt;Mp.prototype.has=xlt;Mp.prototype.set=klt;var uU=Mp,Clt="__lodash_hash_undefined__";function Slt(t){return this.__data__.set(t,Clt),this}var $lt=Slt;function Alt(t){return this.__data__.has(t)}var Elt=Alt,Mlt=xS,Tlt=$lt,Plt=Elt;function Gb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Mlt;++e<n;)this.add(t[e])}Gb.prototype.add=Gb.prototype.push=Tlt;Gb.prototype.has=Plt;var dU=Gb;function Ilt(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}var Llt=Ilt;function Olt(t,e){return t.has(e)}var hU=Olt,Dlt=dU,Rlt=Llt,Vlt=hU,Flt=1,Nlt=2;function Blt(t,e,n,s,i,o){var r=n&Flt,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Nlt?new Dlt:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(s)var b=r?s(m,p,d,e,t,o):s(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!Rlt(e,function(_,x){if(!Vlt(f,x)&&(p===_||i(p,_,n,s,o)))return f.push(x)})){h=!1;break}}else if(!(p===m||i(p,m,n,s,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var fU=Blt,zlt=Va,Hlt=zlt.Uint8Array,Ult=Hlt;function jlt(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}var Wlt=jlt;function Ylt(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var kS=Ylt,aT=a2,lT=Ult,qlt=cU,Glt=fU,Xlt=Wlt,Klt=kS,Zlt=1,Jlt=2,Qlt="[object Boolean]",ect="[object Date]",tct="[object Error]",nct="[object Map]",sct="[object Number]",ict="[object RegExp]",oct="[object Set]",rct="[object String]",act="[object Symbol]",lct="[object ArrayBuffer]",cct="[object DataView]",cT=aT?aT.prototype:void 0,D3=cT?cT.valueOf:void 0;function uct(t,e,n,s,i,o,r){switch(n){case cct:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case lct:return!(t.byteLength!=e.byteLength||!o(new lT(t),new lT(e)));case Qlt:case ect:case sct:return qlt(+t,+e);case tct:return t.name==e.name&&t.message==e.message;case ict:case rct:return t==e+"";case nct:var a=Xlt;case oct:var l=s&Zlt;if(a||(a=Klt),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=Jlt,r.set(t,e);var u=Glt(a(t),a(e),s,i,o,r);return r.delete(t),u;case act:if(D3)return D3.call(t)==D3.call(e)}return!1}var dct=uct;function hct(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var fct=hct,pct=fct,mct=Fa;function gct(t,e,n){var s=e(t);return mct(t)?s:pct(s,n(t))}var vct=gct;function yct(t,e){for(var n=-1,s=t==null?0:t.length,i=0,o=[];++n<s;){var r=t[n];e(r,n,t)&&(o[i++]=r)}return o}var bct=yct;function _ct(){return[]}var wct=_ct,xct=bct,kct=wct,Cct=Object.prototype,Sct=Cct.propertyIsEnumerable,uT=Object.getOwnPropertySymbols,$ct=uT?function(t){return t==null?[]:(t=Object(t),xct(uT(t),function(e){return Sct.call(t,e)}))}:kct,Act=$ct,Ect=vct,Mct=Act,Tct=M5;function Pct(t){return Ect(t,Tct,Mct)}var Ict=Pct,dT=Ict,Lct=1,Oct=Object.prototype,Dct=Oct.hasOwnProperty;function Rct(t,e,n,s,i,o){var r=n&Lct,a=dT(t),l=a.length,c=dT(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:Dct.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var b=r;++d<l;){h=a[d];var _=t[h],x=e[h];if(s)var k=r?s(x,_,h,e,t,o):s(_,x,h,t,e,o);if(!(k===void 0?_===x||i(_,x,n,s,o):k)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var C=t.constructor,S=e.constructor;C!=S&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var Vct=Rct,R3=uU,Fct=fU,Nct=dct,Bct=Vct,hT=UH,fT=Fa,pT=S5,zct=A5,Hct=1,mT="[object Arguments]",gT="[object Array]",f0="[object Object]",Uct=Object.prototype,vT=Uct.hasOwnProperty;function jct(t,e,n,s,i,o){var r=fT(t),a=fT(e),l=r?gT:hT(t),c=a?gT:hT(e);l=l==mT?f0:l,c=c==mT?f0:c;var u=l==f0,d=c==f0,h=l==c;if(h&&pT(t)){if(!pT(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new R3),r||zct(t)?Fct(t,e,n,s,i,o):Nct(t,e,l,n,s,i,o);if(!(n&Hct)){var f=u&&vT.call(t,"__wrapped__"),p=d&&vT.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new R3),i(m,b,n,s,o)}}return h?(o||(o=new R3),Bct(t,e,n,s,i,o)):!1}var Wct=jct,Yct=Wct,yT=Y1;function pU(t,e,n,s,i){return t===e?!0:t==null||e==null||!yT(t)&&!yT(e)?t!==t&&e!==e:Yct(t,e,n,s,pU,i)}var mU=pU,qct=uU,Gct=mU,Xct=1,Kct=2;function Zct(t,e,n,s){var i=n.length,o=i,r=!s;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new qct;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?Gct(u,c,Xct|Kct,s,d):h))return!1}}return!0}var Jct=Zct,Qct=q1;function eut(t){return t===t&&!Qct(t)}var gU=eut,tut=gU,nut=M5;function sut(t){for(var e=nut(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,tut(i)]}return e}var iut=sut;function out(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var vU=out,rut=Jct,aut=iut,lut=vU;function cut(t){var e=aut(t);return e.length==1&&e[0][2]?lut(e[0][0],e[0][1]):function(n){return n===t||rut(n,t,e)}}var uut=cut,dut=Fa,hut=R2,fut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,put=/^\w*$/;function mut(t,e){if(dut(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||hut(t)?!0:put.test(t)||!fut.test(t)||e!=null&&t in Object(e)}var CS=mut,yU=xS,gut="Expected a function";function SS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(gut);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],o=n.cache;if(o.has(i))return o.get(i);var r=t.apply(this,s);return n.cache=o.set(i,r)||o,r};return n.cache=new(SS.Cache||yU),n}SS.Cache=yU;var vut=SS,yut=vut,but=500;function _ut(t){var e=yut(t,function(s){return n.size===but&&n.clear(),s}),n=e.cache;return e}var wut=_ut,xut=wut,kut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cut=/\\(\\)?/g,Sut=xut(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kut,function(n,s,i,o){e.push(i?o.replace(Cut,"$1"):s||n)}),e}),$ut=Sut;function Aut(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var Eut=Aut,bT=a2,Mut=Eut,Tut=Fa,Put=R2,Iut=1/0,_T=bT?bT.prototype:void 0,wT=_T?_T.toString:void 0;function bU(t){if(typeof t=="string")return t;if(Tut(t))return Mut(t,bU)+"";if(Put(t))return wT?wT.call(t):"";var e=t+"";return e=="0"&&1/t==-Iut?"-0":e}var Lut=bU,Out=Lut;function Dut(t){return t==null?"":Out(t)}var Rut=Dut,Vut=Fa,Fut=CS,Nut=$ut,But=Rut;function zut(t,e){return Vut(t)?t:Fut(t,e)?[t]:Nut(But(t))}var _U=zut,Hut=R2,Uut=1/0;function jut(t){if(typeof t=="string"||Hut(t))return t;var e=t+"";return e=="0"&&1/t==-Uut?"-0":e}var W2=jut,Wut=_U,Yut=W2;function qut(t,e){e=Wut(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[Yut(e[n++])];return n&&n==s?t:void 0}var wU=qut,Gut=wU;function Xut(t,e,n){var s=t==null?void 0:Gut(t,e);return s===void 0?n:s}var Kut=Xut;function Zut(t,e){return t!=null&&e in Object(t)}var Jut=Zut,Qut=_U,edt=C5,tdt=Fa,ndt=wF,sdt=$5,idt=W2;function odt(t,e,n){e=Qut(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=idt(e[s]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++s!=i?o:(i=t==null?0:t.length,!!i&&sdt(i)&&ndt(r,i)&&(tdt(t)||edt(t)))}var rdt=odt,adt=Jut,ldt=rdt;function cdt(t,e){return t!=null&&ldt(t,e,adt)}var udt=cdt,ddt=mU,hdt=Kut,fdt=udt,pdt=CS,mdt=gU,gdt=vU,vdt=W2,ydt=1,bdt=2;function _dt(t,e){return pdt(t)&&mdt(e)?gdt(vdt(t),e):function(n){var s=hdt(n,t);return s===void 0&&s===e?fdt(n,t):ddt(e,s,ydt|bdt)}}var wdt=_dt;function xdt(t){return function(e){return e==null?void 0:e[t]}}var kdt=xdt,Cdt=wU;function Sdt(t){return function(e){return Cdt(e,t)}}var $dt=Sdt,Adt=kdt,Edt=$dt,Mdt=CS,Tdt=W2;function Pdt(t){return Mdt(t)?Adt(Tdt(t)):Edt(t)}var Idt=Pdt,Ldt=uut,Odt=wdt,Ddt=SF,Rdt=Fa,Vdt=Idt;function Fdt(t){return typeof t=="function"?t:t==null?Ddt:typeof t=="object"?Rdt(t)?Odt(t[0],t[1]):Ldt(t):Vdt(t)}var Ndt=Fdt;function Bdt(t,e,n,s){for(var i=t.length,o=n+(s?1:-1);s?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var zdt=Bdt;function Hdt(t){return t!==t}var Udt=Hdt;function jdt(t,e,n){for(var s=n-1,i=t.length;++s<i;)if(t[s]===e)return s;return-1}var Wdt=jdt,Ydt=zdt,qdt=Udt,Gdt=Wdt;function Xdt(t,e,n){return e===e?Gdt(t,e,n):Ydt(t,qdt,n)}var Kdt=Xdt,Zdt=Kdt;function Jdt(t,e){var n=t==null?0:t.length;return!!n&&Zdt(t,e,0)>-1}var Qdt=Jdt;function eht(t,e,n){for(var s=-1,i=t==null?0:t.length;++s<i;)if(n(e,t[s]))return!0;return!1}var tht=eht;function nht(){}var sht=nht,V3=zH,iht=sht,oht=kS,rht=1/0,aht=V3&&1/oht(new V3([,-0]))[1]==rht?function(t){return new V3(t)}:iht,lht=aht,cht=dU,uht=Qdt,dht=tht,hht=hU,fht=lht,pht=kS,mht=200;function ght(t,e,n){var s=-1,i=uht,o=t.length,r=!0,a=[],l=a;if(n)r=!1,i=dht;else if(o>=mht){var c=e?null:fht(t);if(c)return pht(c);r=!1,i=hht,l=new cht}else l=e?[]:a;e:for(;++s<o;){var u=t[s],d=e?e(u):u;if(u=n||u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var vht=ght,yht=Ndt,bht=vht;function _ht(t,e){return t&&t.length?bht(t,yht(e)):[]}var wht=_ht;const xht=fi(wht),kht={name:"FeedFooter",components:{ReactedUsers:Ort,FeedComments:Crt,FeedTextComposer:hv,ChatIcon:qH,HeartIcon:D2},props:["feed","is_single","space_slug","is_modal"],emits:["commented","joinSpace"],data(){return{commenting:!1,comment:{message:"",media_images:[]},saving:!1,show_all_comments:this.is_single,reactions:[],isAutoFocus:!1,showCommentBox:!0,defaultMentions:[],sortBy:"oldest"}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.postComment()},postComment(){this.saving=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.comment.message,media_images:this.comment.media_images,meta:this.comment.meta}).then(t=>{this.feed.comments||(this.feed.comments=[]),this.feed.comments.push(t.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.comment={message:"",media_images:[]},this.commenting=!1,this.showCommentBox=!1,this.$notify.success(t.message),this.$nextTick(()=>{this.showCommentBox=!0,this.$emit("commented",t.comment)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},showCommentForm(){if(!this.is_single&&this.hasFeature("show_post_modal")){this.feed.auto_focus_comment=!0,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!0});return}this.show_all_comments=!0,this.commenting?(this.commenting=!1,setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)):(this.commenting=!0,this.isAutoFocus=!0),this.prepareDefaultMentions()},showAll(){this.show_all_comments=!this.show_all_comments,this.commenting=!this.commenting,this.isAutoFocus=!1,this.prepareDefaultMentions()},maybeShowFeedModal(){if(this.is_single){this.showAll();return}if(!this.hasFeature("show_post_modal")){this.showAll();return}this.feed.auto_focus_comment=!1,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!1})},toggleReact(){const t={react_type:"like"};this.feed.has_user_react&&(t.remove=!0);let e=!this.feed.has_user_react;this.$post("feeds/"+this.feed.id+"/react",t).then(n=>{this.feed.has_user_react=e,this.feed.reactions_count=n.new_count}).catch(n=>{this.$handleError(n)})},prepareDefaultMentions(){if(!this.auth.user_id||this.defaultMentions.length)return;let t=this.auth.user_id,e=[];this.feed.user_id!=t&&e.push(this.feed.xprofile);let n=this.feed.comments.slice(-30);this.each(n,s=>{s.user_id!=t&&e.push(s.xprofile)}),this.defaultMentions=xht(e,"user_id")},changeCommentsSortBy(){this.$storeLocalData("comments_sort_by",this.sortBy)}},mounted(){let t=this.feed.default_comment_sort_by||"oldest";this.sortBy=this.$getLocalData("comments_sort_by",t),this.is_single&&this.prepareDefaultMentions(),this.feed.auto_focus_comment&&setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)}},Cht={ref:"feed_footer",class:"feed_footer"},Sht={class:"fcom_feed_footer_actions"},$ht={class:"fcom_sr_only"},Aht={class:"fcom_feed_footer_meta"},Eht={key:0},Mht={key:0,class:"fcom_reactions_count feed_reaction_meta"},Tht={class:"feed_comment_count"},Pht={key:2,class:"feed_reaction_meta"},Iht={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},Lht=["id"],Oht={key:0,style:{padding:"0",margin:"0","text-align":"center"}},Dht={key:1,class:"feed_commenting"},Rht={class:"person_avatar"},Vht=["src"],Fht={key:2,class:""},Nht={style:{padding:"0",margin:"0","text-align":"center"}},Bht={key:0,style:{margin:"10px 0"}},zht=["href"];function Hht(t,e,n,s,i,o){var m,b,_,x;const r=W("HeartIcon"),a=_e,l=W("ChatIcon"),c=W("ReactedUsers"),u=ln,d=Qt,h=W("feed-comments"),f=Ge,p=W("feed-text-composer");return v(),A(te,null,[g("div",Cht,[g("div",Sht,[g("ul",null,[g("li",{class:U(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),onClick:e[0]||(e[0]=k=>o.toggleReact())},[y(a,{class:U({user_reacted:n.feed.has_user_react})},{default:w(()=>[y(r,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"])],2),((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("li",{key:0,class:"fcom_comment_btn_wrap",onClick:e[1]||(e[1]=k=>o.showCommentForm())},[y(a,null,{default:w(()=>[y(l)]),_:1}),g("span",null,[g("span",$ht,$(t.$t("Comment")),1)])])):O("",!0)])]),g("div",Aht,[n.feed.reactions_count||n.feed.comments_count||((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),A("ul",Eht,[n.feed.reactions_count?(v(),A("li",Mht,[y(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),A("li",{key:1,onClick:e[2]||(e[2]=(...k)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...k)),class:"feed_reaction_meta"},[g("div",Tht,$(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((_=n.feed.meta)==null?void 0:_.comments_disabled)==="yes"?(v(),A("li",Pht,$(t.$t("comments disabled")),1)):O("",!0)])):O("",!0)])],512),y(h,{sortBy:i.sortBy,defaultMentions:i.defaultMentions,onForceShowAll:o.showAll,show_all:i.show_all_comments,feed:n.feed,is_single:n.is_single},{before_comments_start:w(()=>[n.feed.comments_count>=2?(v(),A("div",Iht,[y(d,{"aria-label":t.$t("Sort comments by"),onChange:e[3]||(e[3]=k=>o.changeCommentsSortBy()),modelValue:i.sortBy,"onUpdate:modelValue":e[4]||(e[4]=k=>i.sortBy=k),class:"fcom_off_color fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("Sort by")},{default:w(()=>[y(u,{value:"oldest",label:t.$t("Earliest")},null,8,["label"]),y(u,{value:"latest",label:t.$t("Latest")},null,8,["label"]),y(u,{value:"popular",label:t.$t("Popular")},null,8,["label"]),y(u,{value:"most_replied",label:t.$t("Most Replied")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])],512)):O("",!0)]),_:1},8,["sortBy","defaultMentions","onForceShowAll","show_all","feed","is_single"]),i.commenting||n.is_single?(v(),A("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((x=n.feed.meta)==null?void 0:x.comments_disabled)==="yes"?(v(),A(te,{key:0},[n.feed.comments_count?(v(),A("p",Oht,$(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),A("div",Dht,[g("div",Rht,[g("img",{alt:"",src:t.auth.photo},null,8,Vht)]),i.showCommentBox?(v(),A("div",{key:0,onKeydown:e[6]||(e[6]=Nt((...k)=>o.maybeSave&&o.maybeSave(...k),["enter"])),class:"feed_comment_input"},[y(p,{context:"comment",is_modal:n.is_modal,config:{multipleMedia:!0},mentionQuery:{space_id:n.feed.space_id},autofocus_changed:i.commenting,defaultMentions:i.defaultMentions,autofocus:i.isAutoFocus,disabled:i.saving,placeholder:t.$t("Write a comment"),content:i.comment},{default:w(()=>[y(f,{loading:i.saving,disabled:i.saving,class:"fcom_primary_button",onClick:e[5]||(e[5]=k=>o.postComment())},{default:w(()=>[Y($(t.$t("Post Comment")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","mentionQuery","autofocus_changed","defaultMentions","autofocus","disabled","placeholder","content"])],32)):O("",!0)])):(v(),A("div",Fht,[g("p",Nht,[Y($(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),A("div",Bht,[y(f,{class:"fcom_primary_button",onClick:e[7]||(e[7]=()=>{t.$emit("joinSpace")})},{default:w(()=>[Y($(t.$t("Join Space")),1)]),_:1})])):(v(),A("a",{key:1,href:t.getCurrentAuthUrl()},$(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,zht))])]))],8,Lht)):O("",!0)],64)}const Uht=ge(kht,[["render",Hht]]),jht={name:"SingleLineTextarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},maxlength:{type:Number,default:500},isActive:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],methods:{onInput(t){const e=t.target.value.replace(/\n/g,"");this.$emit("update:modelValue",e),this.$nextTick(this.adjustTextareaHeight)},adjustTextareaHeight(){const t=this.$refs.textarea;t.style.height="auto",t.style.height=t.scrollHeight+"px"}},mounted(){this.adjustTextareaHeight()},watch:{modelValue(){this.$nextTick(this.adjustTextareaHeight)},isActive(t){t&&setTimeout(()=>{this.$refs.textarea.focus()},100)}}},Wht=["value","maxlength","placeholder"];function Yht(t,e,n,s,i,o){return v(),A("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=Nt(Be(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,Wht)}const qht=ge(jht,[["render",Yht]]),Ght={name:"EyeIcon"},Xht={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kht(t,e,n,s,i,o){return v(),A("svg",Xht,[...e[0]||(e[0]=[g("path",{d:"M17.9536 9.2035C18.207 9.55877 18.3337 9.7364 18.3337 9.99935C18.3337 10.2623 18.207 10.4399 17.9536 10.7952C16.8152 12.3915 13.908 15.8327 10.0003 15.8327C6.09264 15.8327 3.18541 12.3915 2.04703 10.7952C1.79367 10.4399 1.66699 10.2623 1.66699 9.99935C1.66699 9.7364 1.79367 9.55877 2.04703 9.2035C3.18541 7.60722 6.09264 4.16602 10.0003 4.16602C13.908 4.16602 16.8152 7.60722 17.9536 9.2035Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),g("path",{d:"M12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10Z",stroke:"currentColor","stroke-width":"1.5"},null,-1)])])}const Zht=ge(Ght,[["render",Kht]]),Jht={name:"CalendarIcon"},Qht={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eft(t,e,n,s,i,o){return v(),A("svg",Qht,[...e[0]||(e[0]=[Pa('<path d="M11 1.3335V2.66683M3 1.3335V2.66683" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.99766 8.66699H7.00364M6.99766 11.3337H7.00364M9.66134 8.66699H9.66732M4.33398 8.66699H4.33997M4.33398 11.3337H4.33997" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1.33398 5.3335H12.6673" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M0.666992 8.16216C0.666992 5.25729 0.666992 3.80486 1.50174 2.90243C2.33648 2 3.67999 2 6.36699 2H7.63366C10.3207 2 11.6642 2 12.4989 2.90243C13.3337 3.80486 13.3337 5.25729 13.3337 8.16216V8.5045C13.3337 11.4094 13.3337 12.8618 12.4989 13.7642C11.6642 14.6667 10.3207 14.6667 7.63366 14.6667H6.36699C3.67999 14.6667 2.33648 14.6667 1.50174 13.7642C0.666992 12.8618 0.666992 11.4094 0.666992 8.5045V8.16216Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1 5.3335H13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>',5)])])}const tft=ge(Jht,[["render",eft]]),nft={name:"CreateStatusForm",emits:["updatePost","added"],props:{space:{type:String,default:""},btn_text:{type:String,default:"Post"},editing_feed:{type:Object,default:()=>({title:"",type:"text",message:"",media_image:"",topic_ids:[],send_announcement_email:"no"})},defaultState:{type:String,default:"idle"},disableSpace:{type:Boolean,default:!1},default_placeholder:{type:String,default:""},initial_placeholder:{type:String,default:""},disableUpload:{type:Boolean,default:!1},saving:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},components:{SpaceIcon:wp,FeedTextComposer:hv,SingleLineTextarea:qht,EyeIcon:Zht,CalendarIcon:tft},data(){return{feed:this.editing_feed,isAutoFocus:!1,state:this.defaultState,posting:!1,doingOembed:!1,oembed:null,postableSpaces:[],autofocus_changed:!1,globalDisabled:this.appVars.features.disable_global_posts,hasPostTitle:this.hasFeature("has_post_title"),scheduleModalVisible:!1,scheduleForm:{date:null,time:null},editorReady:!1}},watch:{"scheduleForm.date":{handler(t){this.scheduleForm.time=null}}},computed:{..._be(xIe,["spacesBySlug"]),allSpaces(){return this.space&&this.spacesBySlug[this.space]?{...this.appVars.auth.spaces,[this.space]:this.spacesBySlug[this.space]}:this.appVars.auth.spaces},isEditing(){var t;return(t=this.editing_feed)==null?void 0:t.id},isScheduleDisabled(){return!this.scheduleForm.date||!this.scheduleForm.time},showScheduleInfo(){return this.feed.scheduled_at&&!this.isEditing},showScheduleIcon(){return(this.isAdmin()||this.isCurrentSpaceAdmin)&&!this.isEditing&&this.has_pro},isDateDisabled(){return t=>t<new Date().setHours(0,0,0,0)},getPlaceholder(){const t=this.appVars.topicsConfig.max_topics_per_post;return this.isTopicRequired?this.$_n("Select a topic","Choose up to %s topics",t):this.$_n("Select a topic","Choose up to %s topics (optional)",t)},getButtonLabel(){return this.feed.scheduled_at&&!this.isEditing?this.$t("Schedule"):this.btn_text},getScheduleLabel(){return this.$t("Scheduled for %1$s at %2$s",this.formattedDate(this.feed.scheduled_at),this.formattedTime(this.feed.scheduled_at))},getStartTime(){if(!this.scheduleForm.date||!this.isToday(this.scheduleForm.date))return"00:00";const e=this.dayjs().add(30,"minute");if(!this.isToday(e.toDate()))return"23:50";const n=e.format("HH");let s=parseInt(e.format("mm"),10);return s=Math.ceil(s/10)*10,s===60?this.dayjs(e).add(1,"hour").format("HH")+":00":n+":"+(s<10?"0":"")+s},getPostTitle(){return this.isEditing?this.author.name||"":this.$t("Create Post")},canPost(){var t,e;return this.space?(e=(t=this.allSpaces[this.space])==null?void 0:t.permissions)==null?void 0:e.can_create_post:this.appVars.auth.user_id},isTopicRequired(){var t,e;return this.currentSpaceSlug?((e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.settings)==null?void 0:e.topic_required)=="yes":!1},isStateActive(){return this.state=="active"},isCurrentSpaceAdmin(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.community_moderator:!1},isCommunityAdmin(){return this.isAdmin()},currentPlaceHolder(){return this.isStateActive?this.default_placeholder?this.default_placeholder:this.$t("Write something here..."):this.initial_placeholder?this.initial_placeholder:this.$t("What's happening, %s",this.auth.first_name)},currentTopics(){var n;let t=this.currentSpaceSlug;if(!t)return[];let e=((n=this.allSpaces[t])==null?void 0:n.topics)||[];return e=Object.values(e),this.isModerator(t)?e:e.filter(s=>s.admin_only!="yes")},canUploadDoc(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.can_upload_documents:!1},currentSpaceSlug(){if(this.space)return this.space;let t=this.feed.space;return t&&typeof t=="object"?t==null?void 0:t.slug:t},currentSpaceId(){var t;return this.currentSpaceSlug?(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.id:null},feedContext(){const t=this.space||this.currentSpaceSlug;return t&&t!=="__self__post__"?`space-${t}`:"global"}},methods:{...wbe(tT,["createFeed"]),changeAutoFocus(){this.feed.title=this.feed.title.replace(/\n/g,""),this.updateAutofocus()},updateAutofocus(){this.autofocus_changed=!1,setTimeout(()=>{this.autofocus_changed=!0},100)},openScheduleModal(){this.scheduleModalVisible=!0},makeActive(){this.editorReady=!0,this.$nextTick(()=>{this.prepareData(),this.state="active",this.hasPostTitle||this.updateAutofocus()})},cancelPost(){this.state="idle",this.postableSpaces=[]},cancelSchedule(){this.scheduleModalVisible=!1,this.scheduleForm.date=null,this.scheduleForm.time=null,this.feed.scheduled_at=null},previewPost(){const t={...this.feed,space:this.space||this.feed.space,is_editing:this.isEditing,author:this.author};this.$eventBus.emit("showPreviewPostModal",t)},initFeed(){return{type:"text",message:"",media_image:"",topic_ids:[],scheduled_at:null,send_announcement_email:"no"}},schedulePost(){if(this.scheduleModalVisible=!1,!this.scheduleForm.date||!this.scheduleForm.time){this.feed.scheduled_at=null;return}this.feed.scheduled_at=`${this.scheduleForm.date} ${this.scheduleForm.time}:00`},post(){if(!this.isStateActive)return;if(this.feed.id){this.$emit("updatePost",this.feed);return}const t=this.feed;if(this.space&&(t.space=this.space),!t.space){this.$refs.fcom_posting_space.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_posting_space.classList.remove("fcon_shake")},500),this.$notify({title:this.$t("Error"),message:this.$t("Please select a space to post in."),type:"error"});return}if(t.space!="__self__post__"&&t.send_announcement_email=="yes"){let e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space after 5 minutes of this post");t.scheduled_at&&(e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space. The email will be sent at the scheduled time.")),this.$confirm(e,this.$t("Sending email to all members?"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.postStatus(t)}).catch(()=>{this.feed.send_announcement_email="no",this.state="active",this.$notify({title:this.$t("Cancelled"),message:this.$t("You have cancelled the action."),type:"info"})})}else this.postStatus(t)},feedSpaceChanged(){this.$refs.fcom_posting_space_select.blur(),this.feed.topic_ids=""},async postStatus(t){var e;this.posting=!0;try{const s=await tT().createFeed(this.feedContext,t);if(s.scheduled_at||(this.$notify.success(s.message),this.$emit("added",s.feed)),this.feed=this.initFeed(),this.state="idle",s.scheduled_at){const i=this.formattedDateTime(s.scheduled_at);this.$notify.success(this.$t("Your post has been scheduled for %s. Please find the scheduled post from your profile",i))}this.editorReady=!1}catch(n){this.$handleError(n),(e=n==null?void 0:n.shakes)!=null&&e.topic_ids&&(this.$refs.fcom_topics_input.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_topics_input.classList.remove("fcon_shake")},500))}finally{this.posting=!1}},prepareData(){var r;if(this.space)return[];let t=Object.values(this.allSpaces),e=this.appVars.space_groups,n=[],s=[];this.each(e,a=>{let l=t.filter(c=>{let u=c.parent_id==a.id&&c.permissions&&c.permissions.can_create_post;return u&&s.push(c.slug),u});l.length&&n.push({label:a.title,spaces:l})});let i=t.filter(a=>!a.parent_id&&a.permissions&&a.permissions.can_create_post);i&&i.length&&n.push({label:this.$t("Others"),spaces:i}),this.globalDisabled||n.unshift({label:"",spaces:[{title:this.$t("On my profile"),slug:"__self__post__"}]}),this.postableSpaces=n;const o=this.appVars.default_post_space;!this.feed.space&&o&&["all_feeds","user_profile_feeds"].includes((r=this.$route)==null?void 0:r.name)&&this.postableSpaces.some(a=>a.spaces.some(l=>l.slug===o))&&(this.feed.space=o)}},mounted(){(this.editing_feed.id||this.defaultState=="active")&&(this.editorReady=!0)}},sft={class:"person_avatar"},ift=["alt","src"],oft={class:"create_header_content"},rft={key:0,class:"fcom_create_status_box_header"},aft={class:"user_infos"},lft={class:"feed_user_name"},cft={class:"feed_meta_info"},uft={key:1,class:"feed_timestamp"},dft={class:"create_header_action"},hft={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},fft={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},pft={key:0,class:"fcom_meta_text"},mft={class:"fcom_post_actions"},gft={key:0,class:"fcom_post_space_name"},vft={class:"target_label"},yft={ref:"fcom_posting_space",style:{"margin-right":"10px"}},bft={key:0,class:"fcom_space_title"},_ft={key:1},wft={class:"fcom_empty_spaces_dropdown"},xft={key:0,class:"fcom_composer_admin_actions"},kft={key:0},Cft={class:"dialog_header"},Sft={class:"dialog_left schedule_header_left"},$ft={class:"dialog_body"},Aft={class:"fcom_input_help"},Eft={class:"dialog_footer"};function Mft(t,e,n,s,i,o){const r=W("EditPen"),a=_e,l=W("CalendarIcon"),c=Ge,u=W("EyeIcon"),d=W("Close"),h=W("SingleLineTextarea"),f=ln,p=Qt,m=W("SpaceIcon"),b=Z_,_=Zt,x=W("feed-text-composer"),k=Rd,C=an,S=k5,E=fn,P=Fs;return o.canPost?(v(),A("div",{key:0,class:U([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:U(["create_header",{state_active:o.isStateActive}])},[g("div",sft,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,ift)]),g("div",oft,[o.isStateActive?O("",!0):(v(),A("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.makeActive&&o.makeActive(...T)),class:"form_placeholder"},$(o.currentPlaceHolder),1)),g("div",{class:U([{fcom_editor_with_title:i.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),A("div",rft,[g("div",aft,[g("div",lft,$(o.getPostTitle),1),g("div",cft,[!n.editing_feed.id&&o.showScheduleInfo?(v(),A("div",{key:0,onClick:e[1]||(e[1]=(...T)=>o.openScheduleModal&&o.openScheduleModal(...T)),class:"feed_scheduled_info"},[g("span",null,$(o.getScheduleLabel),1),y(a,null,{default:w(()=>[y(r)]),_:1})])):(v(),A("span",uft,$(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.appVars.date_time_formatter)),1))])]),g("div",dft,[o.showScheduleIcon?(v(),D(c,{key:0,onClick:o.openScheduleModal,text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(l)]),_:1})]),_:1},8,["onClick"])):O("",!0),y(c,{onClick:o.previewPost,text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(u)]),_:1})]),_:1},8,["onClick"]),o.isEditing?O("",!0):(v(),D(c,{key:1,class:"close_btn",onClick:o.cancelPost,text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(d)]),_:1})]),_:1},8,["onClick"]))])])):O("",!0),i.editorReady?(v(),D(x,{key:1,context:"feed",placeholder:o.currentPlaceHolder,config:{surveyApp:!0,space_id:o.currentSpaceId,is_admin:o.isCurrentSpaceAdmin||o.isCommunityAdmin,spaceSlug:o.currentSpaceSlug,disableUpload:n.disableUpload,multipleMedia:!0,documentsApp:o.canUploadDoc,videoApp:!0},autofocus:i.isAutoFocus||!i.hasPostTitle,onEditorCreated:e[9]||(e[9]=()=>{i.isAutoFocus=!0}),mentionQuery:o.currentSpaceSlug&&o.currentSpaceSlug!=="__self__post__"?{space:o.currentSpaceSlug}:{},disabled:i.posting,autofocus_changed:i.autofocus_changed,is_editing:!!o.isEditing,content:i.feed},{before_input:w(()=>[i.hasPostTitle?(v(),D(h,{key:0,maxlength:120,autofocus:!0,isActive:o.isStateActive,modelValue:i.feed.title,"onUpdate:modelValue":e[2]||(e[2]=T=>i.feed.title=T),onEnter:e[3]||(e[3]=T=>o.changeAutoFocus()),placeholder:i.hasPostTitle=="required"?t.$t("Short title of this post"):t.$t("Title (optional)")},null,8,["isActive","modelValue","placeholder"])):O("",!0)]),before_composer_footer:w(()=>[le(t.$slots,"before_footer")]),after_input:w(()=>[t.has_pro&&o.currentTopics.length?(v(),A("div",hft,[y(p,{"popper-class":"fcom_topics_select","multiple-limit":t.appVars.topicsConfig.max_topics_per_post,modelValue:i.feed.topic_ids,"onUpdate:modelValue":e[4]||(e[4]=T=>i.feed.topic_ids=T),multiple:t.appVars.topicsConfig.max_topics_per_post>1,placeholder:o.getPlaceholder},{default:w(()=>[(v(!0),A(te,null,we(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:w(()=>[g("span",fft,$(T.title),1),T.description?(v(),A("span",pft,$(T.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["multiple-limit","modelValue","multiple","placeholder"])],512)):O("",!0)]),after_composer_footer:w(()=>[t.hasFeature("mention_mail")&&o.isCurrentSpaceAdmin&&i.feed.send_announcement_email?(v(),A("div",xft,[y(_,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.feed.send_announcement_email,"onUpdate:modelValue":e[8]||(e[8]=T=>i.feed.send_announcement_email=T)},{default:w(()=>[Y($(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),A("span",kft,"("+$(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",mft,[n.space&&o.isStateActive?(v(),A("div",gft,[g("span",null,"#"+$(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),A(te,{key:1},[g("span",vft,$(t.$t("Posting in:")),1),g("span",yft,[y(p,{modelValue:i.feed.space,"onUpdate:modelValue":e[5]||(e[5]=T=>i.feed.space=T),style:{width:"170px"},ref:"fcom_posting_space_select",class:"fcom_minimal_select","popper-class":"fcom_posting_space_select",placeholder:t.$t("Select Space"),onChange:e[6]||(e[6]=T=>o.feedSpaceChanged())},{empty:w(()=>[g("p",wft,$(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:w(()=>[(v(!0),A(te,null,we(i.postableSpaces,T=>(v(),D(b,{key:T.label,label:T.label},{default:w(()=>[(v(!0),A(te,null,we(T.spaces,L=>(v(),D(f,{key:L.slug,label:L.title,value:L.slug},{default:w(()=>[L.id?(v(),A("span",bft,[y(m,{space_profile:L},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(L.title,30)),1)])):(v(),A("span",_ft,$(t.getExcerpt(L.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])],512)],64)):O("",!0),le(t.$slots,"before_submit_btn"),y(c,{onClick:e[7]||(e[7]=T=>o.post()),disabled:i.posting||o.isEditing&&n.saving,loading:o.isEditing?n.saving:i.posting,class:U(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:w(()=>[Y($(o.getButtonLabel),1)]),_:1},8,["disabled","loading","class"])])]),_:3},8,["placeholder","config","autofocus","mentionQuery","disabled","autofocus_changed","is_editing","content"])):O("",!0),le(t.$slots,"after_composer")],2)])],2),y(P,{modelValue:i.scheduleModalVisible,"onUpdate:modelValue":e[12]||(e[12]=T=>i.scheduleModalVisible=T),width:t.modalWidth,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1},{header:w(()=>[g("div",Cft,[g("div",Sft,[g("h4",null,$(t.$t("Schedule Post")),1),g("p",null,$(t.$t("Choose a date and time in the future when you want your post to be published")),1)])])]),footer:w(()=>[g("div",Eft,[y(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[Y($(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),y(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[Y($(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",$ft,[y(E,{"label-position":"top",class:"fcom_schedule_form"},{default:w(()=>[y(C,{label:t.$t("Date")},{default:w(()=>[y(k,{modelValue:i.scheduleForm.date,"onUpdate:modelValue":e[10]||(e[10]=T=>i.scheduleForm.date=T),type:"date","value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:t.$t("Select Date"),"disabled-date":o.isDateDisabled},null,8,["modelValue","placeholder","disabled-date"])]),_:1},8,["label"]),y(C,{label:t.$t("Time")},{default:w(()=>[y(S,{modelValue:i.scheduleForm.time,"onUpdate:modelValue":e[11]||(e[11]=T=>i.scheduleForm.time=T),disabled:!i.scheduleForm.date,style:{width:"210px"},step:"00:10",start:o.getStartTime,end:"23:59",placeholder:t.$t("Select Time")},null,8,["modelValue","disabled","start","placeholder"])]),_:1},8,["label"])]),_:1}),y(C,null,{default:w(()=>[g("p",Aft,$(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const Tft=ge(nft,[["render",Mft]]),Pft={name:"EditFeed",components:{SpaceIcon:wp,CreateStatusForm:Tft},data(){return{loading:!1,saving:!1,localDialogVisible:this.dialogVisible,feed:{},autofocus_changed:!1,hasPostTitle:this.hasFeature("has_post_title"),changeSpace:!1,newSpaceId:null,makePublish:!1}},props:{dialogVisible:{type:Boolean,required:!0},feedSlug:{type:String,required:!0},hide_create_form:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},computed:{canMovePost(){return this.has_pro&&this.hasSpaceModeratorAccess(this.feed.space)},profileOptionLabel(){return this.auth&&this.feed.user_id&&this.auth.user_id==this.feed.user_id?this.$t("On my profile"):this.$t("On author's profile")}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feedSlug+"/by-slug",{context:"edit"}).then(t=>{this.feed=t.feed}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},handleUpdatePost(t){var n;let e={id:t.id,title:t.title,message:t.message,space:(n=t==null?void 0:t.space)==null?void 0:n.slug,meta:t.meta,content_type:t.content_type,document_ids:t.document_ids,media:t.media,media_images:t.media_images,survey:t.survey,topic_ids:t.topic_ids,send_announcement_email:t.send_announcement_email};this.changeSpace&&this.newSpaceId&&(this.newSpaceId==="profile"?e.move_to_profile=1:e.new_space_id=this.newSpaceId),this.makePublish&&(e.status="published"),this.saving=!0,this.$post(`feeds/${t.id}`,e).then(s=>{this.$notify.success(s.message),this.$emit("updated",s.feed),this.handleClose()}).catch(s=>{this.$handleError(s)}).finally(()=>{this.saving=!1})},handleClose(){this.localDialogVisible=!1,this.$emit("close")}},mounted(){this.getFeed()}},Ift={class:"fcom_feed_edit"},Lft={class:"fcom_feed_edit_dialog_header"},Oft={key:0,class:"fcom_feed_edit_dialog_body"},Dft={key:0},Rft={key:0,style:{"margin-top":"5px"}},Vft={class:"fcom_space_title"};function Fft(t,e,n,s,i,o){const r=W("Close"),a=_e,l=Zt,c=ln,u=W("SpaceIcon"),d=Qt,h=W("create-status-form"),f=Jt,p=Fs,m=xt("loading");return v(),A("div",Ift,[y(p,{class:"fcom_feed_edit_dialog",modelValue:i.localDialogVisible,"onUpdate:modelValue":e[3]||(e[3]=b=>i.localDialogVisible=b),width:t.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:w(()=>{var b,_;return[Oe((v(),A("div",null,[g("div",Lft,[g("span",null,$(t.$t("Edit Feed")),1),y(a,{onClick:o.handleClose},{default:w(()=>[y(r)]),_:1},8,["onClick"])]),i.feed.id?(v(),A("div",Oft,[!(n.hide_create_form&&t.auth.user_id)||t.canEditFeed(i.feed)?(v(),D(h,{key:0,"default-state":"active",btn_text:t.$t("Update"),editing_feed:i.feed,author:n.author,onUpdatePost:o.handleUpdatePost,saving:i.saving,disableSpace:!0,space:(_=(b=i.feed)==null?void 0:b.space)==null?void 0:_.slug},{after_composer:w(()=>[o.canMovePost?(v(),A("div",Dft,[y(l,{modelValue:i.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=x=>i.changeSpace=x)},{default:w(()=>[Y($(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),i.changeSpace?(v(),A("div",Rft,[y(d,{modelValue:i.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=x=>i.newSpaceId=x),placeholder:t.$t("Select destination"),style:{width:"100%"}},{default:w(()=>[y(c,{value:"profile",label:o.profileOptionLabel,disabled:!i.feed.space_id},{default:w(()=>[g("span",null,$(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),A(te,null,we(t.appVars.auth.spaces,x=>(v(),D(c,{disabled:i.feed.space_id==x.id,key:x.id,label:x.title,value:x.id},{default:w(()=>[g("span",Vft,[y(u,{space_profile:x},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(x.title,30)),1)])]),_:2},1032,["disabled","label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):O("",!0)])):O("",!0)]),before_submit_btn:w(()=>[i.feed.status=="unlisted"?(v(),D(l,{key:0,modelValue:i.makePublish,"onUpdate:modelValue":e[2]||(e[2]=x=>i.makePublish=x)},{default:w(()=>[Y($(t.$t("Publish as a post")),1)]),_:1},8,["modelValue"])):O("",!0)]),_:1},8,["btn_text","editing_feed","author","onUpdatePost","saving","space"])):O("",!0)])):(v(),D(f,{key:1,rows:5,animated:!0}))])),[[m,i.loading]])]}),_:1},8,["modelValue","width"])])}const xU=ge(Pft,[["render",Fft]]),Nft={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:ta,UserAvatar:B2},data(){return{voters:[],loading:!1,showVotersDialog:!0}},watch:{option(){this.loadVoters()}},computed:{getVotePercentage(){return this.option.vote_counts?Math.floor(this.option.vote_counts/this.totalCount*100)+"%":"0%"}},methods:{switchOption(t){this.$emit("updateOption",t)},closeDialog(){this.showVotersDialog=!1,this.$emit("close")},loadVoters(){var t;this.loading=!0,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${(t=this.option)==null?void 0:t.slug}`).then(e=>{this.voters=e.voters}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.loadVoters()}},Bft={class:"dialog_header"},zft={class:"fcom_filter_menu"},Hft={class:"fcom_filter_menu_ul"},Uft=["onClick"],jft={key:1},Wft={class:"feed_meta_info survey_voters_meta"},Yft={class:"meta_line"},qft={class:"meta_line"},Gft={class:"voters_list"},Xft={class:"voter_avatar"},Kft={class:"voter_info"},Zft=["title"],Jft={key:2,class:"not_found"};function Qft(t,e,n,s,i,o){const r=Jt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ei,u=Fs;return v(),D(u,{modelValue:i.showVotersDialog,"onUpdate:modelValue":e[0]||(e[0]=d=>i.showVotersDialog=d),"modal-class":"fcom_common_dialog menu_dialog","close-on-click-modal":!0,"append-to-body":!0,width:t.dialogWidth,style:{"max-width":"800px"},direction:"rtl",onClose:o.closeDialog},{header:w(({close:d})=>[g("div",Bft,[g("div",zft,[g("ul",Hft,[(v(!0),A(te,null,we(n.options,h=>(v(),A("li",{key:h.slug},[g("a",{onClick:Be(f=>o.switchOption(h.slug),["prevent"]),class:U({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},$(h.label),11,Uft)]))),128))])])])]),default:w(()=>[i.loading?(v(),D(r,{key:0,animated:"",rows:4})):i.voters.length?(v(),A("div",jft,[g("div",Wft,[g("span",Yft,$(o.getVotePercentage),1),g("span",qft,$(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),y(c,{"max-height":"800px"},{default:w(()=>[g("div",Gft,[(v(!0),A(te,null,we(i.voters,d=>(v(),A("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),A(te,{key:0},[g("div",Xft,[y(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",Kft,[y(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),A("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},$(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,Zft)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),A("div",Jft,[g("p",null,$(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const ept=ge(Nft,[["render",Qft]]),tpt={name:"SurveyRenderer",props:{feed:{type:Object,required:!0},is_preview:{type:Boolean,default:!1},hasTopMedia:{type:Boolean,default:!1},isChildFeed:{type:Boolean,default:!1}},components:{SurveyVoters:ept},data(){var t,e;return{inputType:(e=(t=this.feed.meta)==null?void 0:t.survey_config)==null?void 0:e.type,formattedOptions:[],working:!1,totalCount:0,showVotersDialog:!1,selectedOption:null,endingDate:null}},watch:{"feed.meta.survey_config":{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(this.inputType=e.type,this.setupData())},deep:!0}},computed:{isEnded(){return this.endingDate&&this.isPastDate(this.endingDate)},endedDateLabel(){return this.$t("ended %s",this.humanDateDiff(this.endingDate))},endingDateLabel(){return this.$t("ending %s",this.humanDateDiff(this.endingDate))},shouldHideBorder(){var t,e;return!this.hasTopMedia&&(((t=this.feed.meta)==null?void 0:t.media_items)||((e=this.feed.meta)==null?void 0:e.media_preview))||this.isChildFeed}},methods:{getVoteStyle(t){const e=t?t/this.totalCount*100:0,n={width:e+"%"};return e>0&&e<100&&(n["border-top-right-radius"]=0,n["border-bottom-right-radius"]=0),n},showVoters(t){this.selectedOption=t,this.showVotersDialog=!0},updateOption(t){this.selectedOption=this.formattedOptions.find(e=>e.slug===t)},toggleVote(t){if(this.isEnded){this.$notify.error(this.$t("This poll has ended."));return}if(this.showVotersDialog)return;let e=this.formattedOptions[t].voted;this.inputType=="single_choice"&&this.each(this.formattedOptions,n=>{n.voted=!1}),this.formattedOptions[t].voted=!e,this.syncVotes()},syncVotes(){if(this.is_preview)return;let t=[];this.each(this.formattedOptions,e=>{e.voted&&t.push(e.slug)}),this.working=!0,this.$post(`feeds/${this.feed.id}/apps/survey-vote`,{vote_indexes:t}).then(e=>{this.feed.meta.survey_config=e.survey_config,this.setupData()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},setupData(){let t=[],e=0;this.feed.meta.survey_config&&(this.each(this.feed.meta.survey_config.options,n=>{t.push(n),n.vote_counts&&(e+=parseInt(n.vote_counts))}),this.formattedOptions=t,this.totalCount=e,this.endingDate=this.feed.meta.survey_config.end_date)}},mounted(){this.setupData()}},npt={class:"fcom_app_options"},spt=["onClick"],ipt={class:"fcom_app_text"},opt={class:"fcom_app_input_wrap"},rpt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},apt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},lpt=["onClick"],cpt={key:0},upt={class:"feed_meta_info"},dpt={key:0,class:"meta_line"},hpt=["title"],fpt=["title"];function ppt(t,e,n,s,i,o){const r=W("ArrowRight"),a=_e,l=W("SurveyVoters");return v(),A(te,null,[g("div",{class:U(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",npt,[(v(!0),A(te,null,we(i.formattedOptions,(c,u)=>(v(),A("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:U([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",ipt,[g("span",opt,[g("span",{class:U("fcom_input_"+i.inputType)},[i.inputType=="single_choice"?(v(),A("svg",rpt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),A("svg",apt,[...e[2]||(e[2]=[g("path",{fill:"currentColor",d:"M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z"},null,-1)])]))],2)]),g("span",null,$(c.label),1)]),g("div",{class:"fcom_app_counts",onClick:d=>o.showVoters(c)},[Y($(c.vote_counts?Math.floor(c.vote_counts/i.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),A("span",cpt,"("+$(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(v(),D(a,{key:1,class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1})):O("",!0)],8,lpt),i.totalCount?(v(),A("span",{key:0,style:qe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,spt))),128))]),g("div",upt,[i.totalCount?(v(),A("span",dpt,$(t.$_n("%d vote","%d votes",i.totalCount)),1)):O("",!0),i.endingDate?(v(),A(te,{key:1},[o.isEnded?(v(),A("span",{key:0,title:t.$t("Ended at: %s",i.endingDate),class:"meta_line"},$(o.endedDateLabel),9,hpt)):(v(),A("span",{key:1,title:t.$t("Will end at: %s",i.endingDate),class:"meta_line"},$(o.endingDateLabel),9,fpt))],64)):O("",!0)])],2),i.showVotersDialog?(v(),D(l,{key:0,feed:n.feed,option:i.selectedOption,options:i.formattedOptions,totalCount:i.totalCount,onUpdateOption:o.updateOption,onClose:e[0]||(e[0]=c=>i.showVotersDialog=!1)},null,8,["feed","option","options","totalCount","onUpdateOption"])):O("",!0)],64)}const kU=ge(tpt,[["render",ppt]]),mpt={name:"BookmarkIcon",props:["is_active"]},gpt={key:0,style:{color:"#1d9bf0"},class:"bookmark_icon_active",width:"16",height:"20",viewBox:"0 0 16 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},vpt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ypt(t,e,n,s,i,o){return n.is_active?(v(),A("svg",gpt,[...e[0]||(e[0]=[g("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(v(),A("svg",vpt,[...e[1]||(e[1]=[g("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])]))}const bpt=ge(mpt,[["render",ypt]]),_pt={name:"RenderChildPost",components:{ImageCarousel:_S,SurveyRenderer:kU,DocumentLists:dv,UserRouteLink:ta,MediaPreview:Cp,FeedMdContent:fv},props:["feed_id"],data(){return{feed:null,loading:!1,notFound:null,in_space:this.$route.params.space,hasOverflowContent:!1}},computed:{hasTopMedia(){var e,n,s,i,o,r;if(this.appVars.features.post_layout!="modern"||!this.feed)return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(i=(s=this.feed.meta)==null?void 0:s.media_preview)==null?void 0:i.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t},feedClasses(){if(!this.feed)return[];let t=["feed_single"];return t.push("feed_type_"+this.feed.type),this.hasTopMedia&&t.push("feed_modern_layout"),t}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feed_id+"/by-id").then(t=>{this.feed=t.feed,this.appVars.last_feed_id<t.feed.id&&(this.appVars.last_feed_id=t.feed.id),this.$nextTick(()=>{this.setOverFlow()})}).catch(t=>{typeof t=="object"&&t.xhr_status==404?this.notFound=!0:this.$handleError(t)}).finally(()=>{this.loading=!1})},handleFeedClick(t){t.preventDefault()&&t.stopPropagation();let e={name:"single_feed",params:{feed_slug:this.feed.slug}};this.feed.space&&(e={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.feed.space.slug}}),this.$router.push(e)},setOverFlow(){let t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},mounted(){this.getFeed()}},wpt=["id"],xpt={key:0,class:"fcom_top_media"},kpt={class:"fcom_feed_header_wrap"},Cpt={class:"feed_header"},Spt={key:0,class:"feed_user"},$pt={class:"feed_user_name"},Apt={class:"feed_meta_info"},Ept={key:0,class:"meta_line"},Mpt=["title","href"],Tpt={key:1,class:"feed_timestamp"},Ppt={key:0,class:"feed_title"},Ipt={class:"feed_title_heading"},Lpt={key:1,class:"expand-button"};function Opt(t,e,n,s,i,o){var p,m,b,_,x,k,C,S,E,P;const r=W("media-preview"),a=W("UserAvatar"),l=W("UserRouteLink"),c=W("FeedMdContent"),u=Ge,d=W("DocumentLists"),h=W("SurveyRenderer"),f=W("ImageCarousel");return i.feed?(v(),A("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.handleFeedClick&&o.handleFeedClick(...T)),class:"fcom_child_feed"},[g("div",{id:"feed_id_"+i.feed.id,class:U([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),A("div",xpt,[i.feed.meta&&i.feed.meta.media_preview?(v(),D(r,{key:0,feed:i.feed},null,8,["feed"])):O("",!0)])):O("",!0),g("div",kpt,[g("div",Cpt,[i.feed.xprofile?(v(),A("div",Spt,[y(a,{with_level:!1,xprofile:i.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",$pt,[y(l,{show_badge:!0,xprofile:i.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",Apt,[i.feed.content_type=="survey"&&((_=(b=(m=(p=i.feed)==null?void 0:p.meta)==null?void 0:m.survey_config)==null?void 0:b.options)!=null&&_.length)?(v(),A("span",Ept,$(t.$t("created a poll")),1)):O("",!0),g("a",{title:i.feed.created_at,href:i.feed.permalink,class:"feed_timestamp"},$(t.humanDateDiff(i.feed.created_at)),9,Mpt),!i.in_space&&i.feed.space?(v(),A("span",Tpt,$(t.$t("Posted in %s",t.getExcerpt(i.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:U([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[i.feed.title?(v(),A("div",Ppt,[g("h2",Ipt,$(i.feed.title),1)])):O("",!0),y(c,{class_name:"feed_texts",content:i.feed.message_rendered},null,8,["content"]),i.hasOverflowContent?(v(),A("div",Lpt,[y(u,{class:"btn_expand"},{default:w(()=>[Y($(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),i.feed.content_type=="document"?(v(),D(d,{key:1,document_lists:((k=(x=i.feed)==null?void 0:x.meta)==null?void 0:k.document_lists)||[]},null,8,["document_lists"])):(v(),A(te,{key:2},[i.feed.content_type=="survey"&&((P=(E=(S=(C=i.feed)==null?void 0:C.meta)==null?void 0:S.survey_config)==null?void 0:E.options)!=null&&P.length)?(v(),D(h,{key:0,feed:i.feed,isChildFeed:!0},null,8,["feed"])):O("",!0),i.feed.meta?(v(),A(te,{key:1},[i.feed.meta.media_items?(v(),D(f,{key:0,feed:i.feed},null,8,["feed"])):!o.hasTopMedia&&i.feed.meta.media_preview?(v(),D(r,{key:1,feed:i.feed},null,8,["feed"])):O("",!0)],64)):O("",!0)],64))],10,wpt)])):O("",!0)}const Dpt=ge(_pt,[["render",Opt]]),Rpt={name:"CustomAppMeta",components:{RenderChildPost:Dpt},props:{feed:{type:Object,required:!0}}},Vpt={ref:"fcom_custom_app"},Fpt={key:0},Npt=["innerHTML"];function Bpt(t,e,n,s,i,o){const r=W("RenderChildPost");return v(),A("div",Vpt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),A("div",Fpt,[y(r,{feed_id:n.feed.meta.custom_app_preview.feed_id},null,8,["feed_id"])])):n.feed.meta.custom_app_preview.custom_html?(v(),A("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,Npt)):O("",!0)],512)}const zpt=ge(Rpt,[["render",Bpt]]),Hpt={name:"FeedAction",components:{EditFeed:xU},props:{feed:{type:Object,required:!0},hide_create_form:{type:Boolean,default:!1}},emits:["updated","deleted"],data(){return{isEdit:!1,working:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReportOption(){var e,n;return!(((e=this.feed)==null?void 0:e.user_id)==((n=this.auth)==null?void 0:n.user_id))&&this.auth.user_id&&this.isReportEnabled}},methods:{editItem(){this.$refs.popover.hide(),this.isEdit=!0},handleUpdate(t){this.$emit("updated",t);const e=document.getElementById("feed_id_"+t.id);e&&(e.classList.add("fcon_shake"),setTimeout(()=>{e.classList.remove("fcon_shake")},1e3))},reportPost(){this.$refs.popover.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:this.feed,type:"post"})},copyFeedLink(){navigator.clipboard.writeText(this.feed.permalink).then(()=>{this.$notify.success(this.$t("Link copied to clipboard")),this.$refs.popover.hide()}).catch(t=>{this.$notify.error(this.$t("Failed to copy"))})},toggleSticky(){!this.feed.space_id||this.working||(this.working=!0,this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleSidebarPin(){!this.feed.space_id||this.working||(this.$refs.popover.hide(),this.working=!0,this.feed.priority=!this.feed.priority,this.$patch("feeds/"+this.feed.id,{priority:this.feed.priority?1:0}).then(t=>{this.$notify.success(t.feed.priority?this.$t("Pinned to sidebar"):this.$t("Unpinned from sidebar")),this.feed.priority=t.feed.priority,this.$eventBus.emit("updateSpaceSidebar",this.feed.space_id)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleCommentStatus(){var e;if(this.working)return;let t=((e=this.feed.meta)==null?void 0:e.comments_disabled)=="yes";this.$refs.popover.hide(),this.working=!0,this.$patch("feeds/"+this.feed.id,{comments_disabled:t?0:1}).then(n=>{var i;let s=((i=n.feed.meta)==null?void 0:i.comments_disabled)=="yes";this.$notify.success(s?this.$t("Comments have been disabled."):this.$t("Comments have been enabled.")),this.feed.meta.comments_disabled=n.feed.meta.comments_disabled}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},removePreview(){this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to remove the preview image? This action cannot be undone."),this.$t("Remove Preview"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.feed.id+"/media-preview").then(t=>{this.feed.meta.media_preview=null}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})}).catch(()=>{})},deleteItem(){this.working||(this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to delete this feed?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working||(this.working=!0,this.$emit("deleted"),this.working=!1)}).catch(()=>{}))}}},Upt={class:"actions_items"},jpt={key:0},Wpt={key:1},Ypt={key:0},qpt={key:1},Gpt={key:0},Xpt={key:1};function Kpt(t,e,n,s,i,o){var d,h;const r=W("MoreFilled"),a=_e,l=Ge,c=Xi,u=W("EditFeed");return v(),A(te,null,[y(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click"},{reference:w(()=>[y(l,{"aria-label":t.$t("View Post actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>{var f,p;return[g("ul",Upt,[le(t.$slots,"before_feed_actions_pop"),g("li",{onClick:e[0]||(e[0]=m=>o.copyFeedLink())},$(t.$t("Copy Link")),1),o.showReportOption?(v(),A("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},$(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),A(te,{key:1},[g("li",{onClick:e[2]||(e[2]=m=>o.editItem())},$(t.$t("Edit")),1),n.feed.space&&t.hasSpaceAdminAccess(n.feed.space)?(v(),A(te,{key:0},[g("li",{onClick:e[3]||(e[3]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),A("span",jpt,$(t.$t("Unpin from Top")),1)):(v(),A("span",Wpt,$(t.$t("Pin to top")),1))]),g("li",{onClick:e[4]||(e[4]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),A("span",qpt,$(t.$t("Unpin from sidebar")),1)):(v(),A("span",Ypt,$(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),A("li",{key:1,onClick:e[5]||(e[5]=m=>o.removePreview())},$(t.$t("Remove Preview")),1)):O("",!0),t.hasSpaceAdminAccess(n.feed.space)?(v(),A("li",{key:2,onClick:e[6]||(e[6]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),A("span",Gpt,$(t.$t("Enable comments")),1)):(v(),A("span",Xpt,$(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),A("li",{key:2,onClick:e[7]||(e[7]=m=>o.deleteItem())},$(t.$t("Delete")),1)):O("",!0),le(t.$slots,"after_feed_actions_pop")])]}),_:3},512),i.isEdit?(v(),D(u,{key:0,feedSlug:n.feed.slug,dialogVisible:i.isEdit,hide_create_form:n.hide_create_form,author:{name:(d=n.feed.xprofile)==null?void 0:d.display_name,avatar:(h=n.feed.xprofile)==null?void 0:h.avatar},onUpdated:o.handleUpdate,onClose:e[8]||(e[8]=f=>i.isEdit=!1)},null,8,["feedSlug","dialogVisible","hide_create_form","author","onUpdated"])):O("",!0)],64)}const Zpt=ge(Hpt,[["render",Kpt]]),Jpt={name:"Feed",components:{DocumentLists:dv,CustomAppMeta:zpt,BookmarkIcon:bpt,StickyIcon:JH,UserRouteLink:ta,EditFeed:xU,FeedFooter:Uht,MediaPreview:Cp,ImageCarousel:_S,SurveyRenderer:kU,ReportReview:ZH,FeedAction:Zpt,FeedMdContent:fv},emits:["updated","deleted","removed","reload","commented"],props:{feed:{type:Object,required:!0},is_single:{type:Boolean,default:!1},is_route:{type:Boolean,default:!1},show_footer:{type:Boolean,default:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},hide_create_form:{type:Boolean,default:!1},is_preview:{type:Boolean,default:!1},show_actions:{type:Boolean,default:!0},is_modal:{type:Boolean,default:!1},isSingleSpacePage:{type:Boolean,default:!1}},data(){return{in_space:this.$route.params.space,working:!1,hasOverflowContent:!1,isExpanded:!1,joiningSpace:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess(this.feed.space)&&this.isReportEnabled&&this.show_report&&((t=this.feed.meta)==null?void 0:t.reports_count)},space_slug(){let t=!1;return this.feed.space?t=this.feed.space.slug:this.$route.params.space&&(t=this.$route.params.space),t},feedClasses(){let t=[];return t.push("feed_type_"+this.feed.type),this.feed.type=="article"&&t.push(this.feed.featured_image?"feed_has_image":"feed_no_image"),this.is_preview&&t.push("feed_preview"),this.is_single?t.push("feed_single"):t.push("feed_list_item"),this.hasTopMedia&&t.push("feed_modern_layout"),t},feedRoute(){let t={name:"single_feed",params:{feed_slug:this.feed.slug}};return this.space_slug&&(t={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}}),t},hasTopMedia(){var e,n,s,i,o,r;if(this.appVars.features.post_layout!="modern")return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(i=(s=this.feed.meta)==null?void 0:s.media_preview)==null?void 0:i.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t}},methods:{getTopicRoute(t){return this.space_slug?{name:"space_feeds",params:{space:this.space_slug},query:{topic:t}}:{name:"all_feeds",query:{topic:t}}},getScheduledTime(t){return this.formattedDate(t)+" at "+this.formattedTime(t)},gotoTopicUrl(t){let e=this.getTopicRoute(t);this.$router.push(e)},gotoFeed(t){t&&(t.metaKey||t.ctrlKey)||(t&&(t.preventDefault(),t.stopPropagation()),window.__showing_feed=this.feed,this.$router.push(this.feedRoute))},getSpaceRoute(t){return{name:"space_feeds",params:{space:t}}},getFeedContent(){return this.feed.title},showFullContent(t){if(!this.hasFeature("show_post_modal")){this.hasOverflowContent=!1,this.isExpanded=!0;return}t&&t.stopPropagation(),this.$eventBus.emit("showFeedModal",{feed:this.feed})},parseMessage(t){if(!t)return"";const e=this.$route.params.space?`${this.appVars.urls.portal_base}space/${this.$route.params.space}/home`:this.appVars.urls.global_search;let n=t.replace(/<a\s(?:(?!target="_blank")[^>])*>|<[^>]+>|#([\p{L}\p{M}\p{N}_-]+)/gu,(i,o,r,a)=>i.startsWith("<a")&&!i.includes('target="_blank"')?i.includes(window.location.origin)?i:i.replace("<a",'<a target="_blank" rel="noopener noreferrer nofollow"'):o&&!this.isInsideHtmlTag(a,r)?`<a onclick="window.FluentCommunityUtil.handleSearchClick(event)" href="${e}?search=%23${o}">#${o}</a>`:i);return n.indexOf('<span class="fcom_dynamic_prop" data-type="timestamp"')===-1?n:(i=>i.replace(/<span class="fcom_dynamic_prop" data-type="timestamp" data-timestamp="(\d+)">([^<]+)<\/span>/g,(o,r,a)=>{try{const l=this.dayjs(r*1e3);if(!l.isValid())return o;const u=l.local().format("D MMM YYYY, LT (")+this.currentTimeZoneName+")";return`<span class="fcom_timestamp" title="${a}">${u}</span>`}catch{return o}}))(n)},isInsideHtmlTag(t,e){let n=!1;for(let s=0;s<e;s++)t[s]==="<"&&(n=!0),t[s]===">"&&(n=!1);return n},handleUpdate(t){this.$emit("updated",t),Object.assign(this.feed,t)},handleDelete(){this.$emit("deleted")},handleRemoveBookmark(){this.$emit("deleted")},toggleBookmark(){const t={react_type:"bookmark"};this.feed.bookmarked&&(t.remove=!0),this.feed.bookmarked=!this.feed.bookmarked,this.$post("feeds/"+this.feed.id+"/react",t).then(e=>{this.$notify.success(this.feed.bookmarked?this.$t("Bookmarked"):this.$t("Removed from bookmark")),!this.feed.bookmarked&&this.$route.name==="bookmarks"&&this.$emit("removeFromBookmark")}).catch(e=>{this.$handleError(e),this.feed.bookmarked=!this.feed.bookmarked})},toggleSticky(){this.feed.space_id&&(this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}))},joinSpace(){this.joiningSpace=!0,this.$post("spaces/"+this.feed.space.slug+"/join").then(t=>{this.appVars.user_membership_slugs.push(this.feed.space.slug),this.$notify.success(t.message),document.location.href=this.feed.permalink}).catch(t=>{this.$handleError(t)}).finally(()=>{this.joiningSpace=!1})}},created(){this.$eventBus.on("updateModerationReport",t=>{var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&(t.action==="unpublished"&&t.type!=="comment"?this.$emit("removed"):(this.feed.meta={...this.feed.meta,...t.content.meta},t.content.status&&(this.feed.status=t.content.status)))})},mounted(){if(document.dispatchEvent(new CustomEvent("fcomFeedMounted",{detail:{isSingle:this.is_single,feed:this.feed,feedBody:this.$refs.feed_body}})),this.is_single||this.feed.is_sticky||this.feed.priority){this.isExpanded=!0;return}let t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},Qpt=["id"],emt={key:1,class:"fcom_top_media"},tmt={key:2,class:"fcom_feed_header_wrap"},nmt={class:"feed_actions fcom_concat_buttons"},smt={key:0,class:"fcom_feed_topics"},imt={class:"feed_header"},omt={key:0,class:"feed_user"},rmt={class:"feed_user_info"},amt={class:"feed_user_name"},lmt={key:0,class:"feed_status"},cmt={key:1,class:"feed_status"},umt={class:"feed_meta_info"},dmt={key:0,class:"meta_line"},hmt=["title","href"],fmt=["title","href"],pmt={key:3},mmt={key:0,class:"feed_title"},gmt={key:0,class:"feed_title_heading"},vmt=["href"],ymt={key:1,class:"feed_title_heading"};function bmt(t,e,n,s,i,o){var T,L,I,V,R,N,F,B,G,q,X,K,H;const r=W("report-review"),a=W("media-preview"),l=Ge,c=W("StickyIcon"),u=_e,d=W("BookmarkIcon"),h=W("FeedAction"),f=W("router-link"),p=W("UserAvatar"),m=W("UserRouteLink"),b=Bo,_=W("FeedMdContent"),x=W("SurveyRenderer"),k=W("ImageCarousel"),C=W("DocumentLists"),S=W("CustomAppMeta"),E=W("feed-footer"),P=xt("loading");return Oe((v(),A("div",{id:"feed_id_"+((T=n.feed)==null?void 0:T.id),class:U([o.feedClasses,"feed"])},[o.showReport?(v(),D(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),A("div",emt,[n.feed.meta&&n.feed.meta.media_preview?(v(),D(a,{key:0,feed:n.feed,is_preview:n.is_preview},null,8,["feed","is_preview"])):O("",!0)])):O("",!0),n.show_header?(v(),A("div",tmt,[g("div",nmt,[t.auth.user_id&&!t.hasSpaceAccess((L=n.feed.space)==null?void 0:L.slug)&&!n.is_single&&!n.isSingleSpacePage?(v(),D(l,{key:0,loading:i.joiningSpace,class:"fcom_secondary_button join_button",onClick:e[0]||(e[0]=Q=>o.joinSpace())},{default:w(()=>[Y($(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),A(te,{key:1},[n.feed.is_sticky&&i.in_space?(v(),D(l,{key:0,onClick:e[1]||(e[1]=Q=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[y(u,{class:"fcom_sticky"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["aria-label"])):O("",!0),t.auth.user_id?(v(),D(l,{key:1,"aria-label":t.$t("Toggle Bookmark"),size:"small",text:"",onClick:e[2]||(e[2]=Q=>o.toggleBookmark()),class:U([{bookmark_active:n.feed.bookmarked},"feed_bookmark no_pad_btn"]),title:n.feed.bookmarked?t.$t("Remove From Bookmark"):t.$t("Bookmark this post")},{default:w(()=>[y(u,{style:{"font-size":"14px"}},{default:w(()=>[y(d,{is_active:n.feed.bookmarked},null,8,["is_active"])]),_:1})]),_:1},8,["aria-label","class","title"])):O("",!0),y(h,{feed:n.feed,hide_create_form:n.hide_create_form,onUpdated:o.handleUpdate,onDeleted:o.handleDelete},{before_feed_actions_pop:w(()=>[n.is_route?(v(),A("li",{key:0,onClick:e[3]||(e[3]=Q=>t.$emit("reload"))},$(t.$t("Refresh")),1)):O("",!0)]),_:1},8,["feed","hide_create_form","onUpdated","onDeleted"])],64)):O("",!0),le(t.$slots,"after_feed_actions")]),((I=t.appVars.topicsConfig)==null?void 0:I.show_on_post_card)=="yes"&&n.feed.terms&&n.feed.terms.length?(v(),A("div",smt,[(v(!0),A(te,null,we(n.feed.terms,Q=>(v(),D(f,{onClick:Be(se=>o.gotoTopicUrl(Q.slug),["prevent"]),key:Q.slug,to:o.getTopicRoute(Q.slug),class:"feed_timestamp"},{default:w(()=>[Y("#"+$(Q.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",imt,[n.feed.xprofile?(v(),A("div",omt,[y(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",rmt,[g("div",amt,[y(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),A("span",lmt,[y(b,{type:"warning"},{default:w(()=>[Y($(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),A("span",cmt,[y(b,{type:"warning"},{default:w(()=>[Y($(t.$t("Scheduled")),1)]),_:1})])):O("",!0)]),g("div",umt,[n.feed.content_type=="survey"&&((F=(N=(R=(V=n.feed)==null?void 0:V.meta)==null?void 0:R.survey_config)==null?void 0:N.options)!=null&&F.length)?(v(),A("span",dmt,$(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),A("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...Q)=>o.gotoFeed&&o.gotoFeed(...Q)),href:n.feed.permalink,class:"feed_timestamp"},$(o.getScheduledTime(n.feed.scheduled_at)),9,hmt)):(v(),A("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...Q)=>o.gotoFeed&&o.gotoFeed(...Q)),href:n.feed.permalink,class:"feed_timestamp"},$(t.humanDateDiff(n.feed.created_at)),9,fmt)),!i.in_space&&n.feed.space?(v(),A("span",pmt,[y(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[Y($(t.$t("Posted in %s",t.getExcerpt(n.feed.space.title,30))),1)]),_:1},8,["to"])])):O("",!0)])])])):O("",!0),le(t.$slots,"after_feed_header")])])):O("",!0),g("div",{ref:"feed_body",class:U([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),A("div",mmt,[n.is_single?(v(),A("h2",ymt,$(n.feed.title),1)):(v(),A("h2",gmt,[g("a",{onClick:e[6]||(e[6]=Be((...Q)=>o.showFullContent&&o.showFullContent(...Q),["prevent"])),href:n.feed.permalink},$(n.feed.title),9,vmt)]))])):O("",!0),y(_,{class_name:"feed_texts",content:o.parseMessage(n.feed.message_rendered)},null,8,["content"]),i.hasOverflowContent&&!i.isExpanded?(v(),A("div",{key:1,onClick:e[7]||(e[7]=Q=>o.showFullContent()),class:"expand-button"},[y(l,{class:"btn_expand"},{default:w(()=>[Y($(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((X=(q=(G=(B=n.feed)==null?void 0:B.meta)==null?void 0:G.survey_config)==null?void 0:q.options)!=null&&X.length)?(v(),A(te,{key:3},[y(x,{feed:n.feed,is_preview:n.is_preview,hasTopMedia:o.hasTopMedia},null,8,["feed","is_preview","hasTopMedia"]),n.feed.meta.media_items?(v(),D(k,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&n.feed.meta.media_preview?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),D(C,{key:4,document_lists:((H=(K=n.feed)==null?void 0:K.meta)==null?void 0:H.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),A(te,{key:5},[n.feed.meta.media_items?(v(),D(k,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&n.feed.meta.media_preview?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0),n.feed.meta.custom_app_preview?(v(),D(S,{key:2,feed:n.feed},null,8,["feed"])):O("",!0)],64)):O("",!0),n.show_footer?(v(),D(E,{key:6,feed:n.feed,is_modal:n.is_modal,is_single:n.is_single,space_slug:o.space_slug,onJoinSpace:e[8]||(e[8]=()=>{o.joinSpace()}),onCommented:e[9]||(e[9]=Q=>{t.$emit("commented",Q)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),le(t.$slots,"after_feed_footer")],10,Qpt)),[[P,i.working]])}const _mt=ge(Jpt,[["render",bmt]]),wmt={name:"ReportDetails",components:{Feed:_mt,SingleComent:F2,Pagination:qd},props:["is_open","report","status"],data(){return{loading:!1,isOpen:this.is_open,currentTab:"details",postReports:[],pagination:{page:1,per_page:5,total:0}}},watch:{is_open(t){this.isOpen=t},isOpen(t){t||this.$emit("close")}},computed:{isCommentReport(){return t=>t.content_type=="comment"},getReason(){return t=>this.appVars.report_reasons[t]},getPermalink(){return t=>{var n,s;const e=(n=t.post)==null?void 0:n.permalink;return t.content_type=="comment"?`${e}?comment_id=${(s=t.comment)==null?void 0:s.id}`:e}},getAuthorProfile(){return t=>t.content_type=="comment"?t.comment.xprofile:t.post.xprofile},getIgnoreBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Dismiss Reports")},getUnpublishBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{switchOption(t){this.currentTab=t},getPostReports(){this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.report.content_type};this.report.content_type=="comment"?t.parent_id=this.report.parent_id:t.post_id=this.report.post_id,this.$get("moderation/reports",t).then(e=>{this.postReports=e.reports.data,this.pagination.total=e.reports.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},ignoreReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("ignore",t)},unpublishReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("unpublish",t)},deleteReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("delete",t)}},mounted(){this.currentTab="details",this.getPostReports()}},xmt={class:"dialog_header report_details_header"},kmt={class:"report_details_header_left"},Cmt={class:"report_details_header_right"},Smt=["href"],$mt=["href"],Amt=["href"],Emt=["href"],Mmt={class:"meta_line"},Tmt=["href","title"],Pmt={key:0,class:"dialog_body"},Imt={class:"fcom_filter_menu"},Lmt={class:"fcom_filter_menu_ul"},Omt={key:0,class:"report_details"},Dmt={key:1,class:"report_details"},Rmt={class:"report_details_header"},Vmt={class:"report_details_header_left"},Fmt={class:"report_details_header_right"},Nmt={key:0},Bmt={key:1},zmt={key:1},Hmt={class:"report_reason"},Umt=["title"],jmt={key:0,class:"report_details_body"},Wmt=["innerHTML"],Ymt={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},qmt={class:"dialog_footer report_footer"};function Gmt(t,e,n,s,i,o){const r=W("UserAvatar"),a=W("UserRouteLink"),l=W("SingleComent"),c=W("Feed"),u=Jt,d=W("Pagination"),h=Ge,f=Fs;return v(),D(f,{modelValue:i.isOpen,"onUpdate:modelValue":e[6]||(e[6]=p=>i.isOpen=p),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",title:t.$t("Review Report"),width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl"},{header:w(()=>{var p,m,b,_,x,k,C,S,E,P,T,L,I;return[g("div",xmt,[g("div",kmt,[y(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",Cmt,[g("div",null,[y(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),A("a",{key:0,href:o.getPermalink(n.report)},$(t.$t("commented ")),9,Smt)):(v(),A("a",{key:1,href:o.getPermalink(n.report)},$(t.$t("posted ")),9,$mt)),g("span",null,$(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),A("a",{key:2,href:(m=(p=n.report)==null?void 0:p.post)==null?void 0:m.permalink},$(((_=(b=n.report)==null?void 0:b.post)==null?void 0:_.title)||((C=(k=(x=n.report)==null?void 0:x.post)==null?void 0:k.space)==null?void 0:C.title)),9,Amt)):(v(),A("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(P=(E=(S=n.report)==null?void 0:S.post)==null?void 0:E.space)==null?void 0:P.slug})},$((I=(L=(T=n.report)==null?void 0:T.post)==null?void 0:L.space)==null?void 0:I.title),9,Emt))]),g("div",Mmt,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},$(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,Tmt)])])])]}),footer:w(()=>[g("div",qmt,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[Y($(o.getIgnoreBtnText(n.report)),1)]),_:1})):O("",!0),n.status!="unpublished"?(v(),D(h,{key:1,class:"fcom_primary_button",onClick:e[4]||(e[4]=p=>o.unpublishReport(n.report))},{default:w(()=>[Y($(o.getUnpublishBtnText(n.report)),1)]),_:1})):O("",!0),["pending","flagged"].includes(n.status)?O("",!0):(v(),D(h,{key:2,class:"el-button el-button--danger",onClick:e[5]||(e[5]=p=>o.deleteReport(n.report))},{default:w(()=>[Y($(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),A("div",Pmt,[g("div",Imt,[g("ul",Lmt,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Be(p=>o.switchOption("details"),["prevent"])),class:U({"router-link-exact-active":i.currentTab=="details"}),href:"#"},$(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Be(p=>o.switchOption("reports"),["prevent"])),class:U({"router-link-exact-active":i.currentTab=="reports"}),href:"#"},$(t.$t("Reports")+" "+n.report.reports_count),3)])])]),i.currentTab=="details"?(v(),A("div",Omt,[o.isCommentReport(n.report)&&n.report.comment?(v(),D(l,{key:0,comment:n.report.comment,show_header:!1},null,8,["comment"])):n.report.post?(v(),D(c,{key:1,feed:n.report.post,show_header:!1,show_footer:!1},null,8,["feed"])):O("",!0)])):O("",!0),i.currentTab=="reports"?(v(),A("div",Dmt,[i.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),A(te,{key:0},we(i.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",Rmt,[g("div",Vmt,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",Fmt,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",Nmt,$(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",Bmt,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",zmt,$(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(te,{key:2},[g("span",null,$(t.$t("reported for ")),1),g("span",Hmt,$(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},$(t.humanDateDiff(p.created_at)),9,Umt)])]),p.explanation?(v(),A("div",jmt,[g("div",{innerHTML:p.explanation},null,8,Wmt)])):O("",!0)]))),128)),i.pagination.total?(v(),A("div",Ymt,[y(d,{hide_on_single:!0,onFetch:e[2]||(e[2]=p=>o.getPostReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const Xmt=ge(wmt,[["render",Gmt]]),Kmt={name:"ModerationConfig",props:{is_open:{type:Boolean,required:!0},moderation_config:{type:Object,required:!0}},watch:{is_open(t){this.showConfig=t}},data(){return{showConfig:this.is_open,config:this.moderation_config}},methods:{saveConfig(){this.showConfig=!1,this.$emit("saveConfig",this.config)},closeConfig(){this.showConfig=!1,this.$emit("closeConfig")}}},Zmt={class:"help_text"},Jmt={class:"help_text"},Qmt={class:"help_text"};function egt(t,e,n,s,i,o){const r=Zt,a=an,l=_t,c=e2,u=ln,d=Qt,h=Ge,f=fn,p=Fs;return v(),D(p,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"align-center":!0,title:t.$t("Moderation Settings"),"modal-class":"fcom_moderation_dialog",modelValue:i.showConfig,"onUpdate:modelValue":e[8]||(e[8]=m=>i.showConfig=m),onClose:o.closeConfig,direction:"rtl"},{default:w(()=>[y(f,{onSubmit:e[6]||(e[6]=Be(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.config,"onUpdate:modelValue":e[7]||(e[7]=m=>i.config=m)},{default:w(()=>[y(a,{label:t.$t("Moderation")},{default:w(()=>[y(r,{modelValue:i.config.is_enabled,"onUpdate:modelValue":e[0]||(e[0]=m=>i.config.is_enabled=m),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Enable Content Moderation")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.config.is_enabled=="yes"?(v(),A(te,{key:0},[y(a,{label:t.$t("Profanity Filter")},{default:w(()=>[y(l,{modelValue:i.config.profanity_filter,"onUpdate:modelValue":e[1]||(e[1]=m=>i.config.profanity_filter=m),placeholder:t.$t("bad, words, here")},null,8,["modelValue","placeholder"]),g("span",Zmt,$(t.$t("__PROFANITY_FILTER_DESC")),1)]),_:1},8,["label"]),y(a,{label:t.$t("Flag a post or comment after it's reported X times")},{default:w(()=>[y(c,{modelValue:i.config.flag_after_threshold,"onUpdate:modelValue":e[2]||(e[2]=m=>i.config.flag_after_threshold=m),min:0,max:100,step:1},null,8,["modelValue"]),g("span",Jmt,$(t.$t("__FLAG_AFTER_THRESHOLD_DESC")),1)]),_:1},8,["label"]),y(a,{label:t.$t("Mark all new posts as Pending")},{default:w(()=>[y(r,{modelValue:i.config.flag_all_new_posts,"onUpdate:modelValue":e[3]||(e[3]=m=>i.config.flag_all_new_posts=m),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("__FLAG_ALL_NEW_POSTS_DESC")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Require approval for first post")},{default:w(()=>[y(r,{modelValue:i.config.first_post_approval,"onUpdate:modelValue":e[4]||(e[4]=m=>i.config.first_post_approval=m),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("__FIRST_POST_APPROVAL_DESC")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Mark all new posts as Pending in the given spaces")},{default:w(()=>[y(d,{modelValue:i.config.flag_all_new_posts_spaces,"onUpdate:modelValue":e[5]||(e[5]=m=>i.config.flag_all_new_posts_spaces=m),placeholder:t.$t("Select Spaces"),filterable:"",clearable:"",multiple:""},{default:w(()=>[(v(!0),A(te,null,we(t.appVars.auth.spaces,m=>(v(),D(u,{key:m.id,label:m.title,value:m.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),g("span",Qmt,$(t.$t("__FLAG_ALL_NEW_POSTS_SPACES_DESC")),1)]),_:1},8,["label"])],64)):O("",!0),y(a,null,{default:w(()=>[y(h,{class:"fcom_primary_button",onClick:o.saveConfig},{default:w(()=>[Y($(t.$t("Update")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["width","title","modelValue","onClose"])}const tgt=ge(Kmt,[["render",egt]]),ngt={name:"Moderation",components:{Layout:pi,AppLayout:mi,Pagination:qd,ReportDetails:Xmt,ModerationConfigModal:tgt},data(){return{status:"pending",loading:!1,saving:!1,reports:[],reportDetails:null,showConfig:!1,isOpenReportDetails:!1,moderationConfig:this.appVars.moderationConfig,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},getTitle(){return t=>{var e,n;return t.content_type=="post"?(e=t.post)==null?void 0:e.title:(n=t.comment)==null?void 0:n.title}},getAuthorProfile(){return t=>t.content_type=="post"?t.post.xprofile:t.comment.xprofile},getIgnoreBtnText(){return t=>this.isContentLive(t)?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(t.content_type))},getUnpublishBtnText(){return t=>this.isContentLive(t)?this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{getReports(){this.loading=!0,this.$get("moderation/reports",{status:this.status,page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.reports=t.reports.data,this.pagination.total=t.reports.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveConfig(t){this.saving=!0,this.$post("moderation/config",{config:t}).then(e=>{this.$notify.success(e.message),this.appVars.moderationConfig=e.config,this.moderationConfig=e.config,this.showConfig=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},isContentLive(t){const e=t.content_type=="comment"?t.comment:t.post;return(e==null?void 0:e.status)=="published"},confirmAndIgnoreReport(t){const e=this.isContentLive(t),n=e?this.$t("Dismiss Reports"):this.$t("Approve Content"),s=e?this.$t("This will dismiss all reports and keep the content published. Continue?"):this.$t("This will approve the content and make it visible to the community. Continue?"),i=e?this.$t("Yes, Dismiss"):this.$t("Yes, Approve");this.$confirm(s,n,{confirmButtonText:i,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.ignoreReport(t)})},confirmAndUnpublishReport(t){const e=this.isContentLive(t),n=e?this.$t("Unpublish Content"):this.$t("Publish Content"),s=e?this.$t("This will unpublish the content from public view. Continue?"):this.$t("This will publish the content and make it visible to the community. Continue?"),i=e?this.$t("Yes, Unpublish"):this.$t("Yes, Publish");this.$confirm(s,n,{confirmButtonText:i,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.unpublishReport(t)})},ignoreReport(t){this.$put("moderation/reports/"+t.id,{status:"ignored"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},unpublishReport(t){this.$put("moderation/reports/"+t.id,{status:"unpublished"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},openReportDetails(t){this.reportDetails=t,this.isOpenReportDetails=!0},closeReportDetails(){this.isOpenReportDetails=!1,this.reportDetails=null},deleteReport(t){this.$confirm(this.$t("Are you sure you want to delete this report?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(()=>{this.$del("moderation/reports/"+t.id).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})})}},mounted(){this.has_pro&&this.moderationConfig.is_enabled=="yes"&&this.getReports(),this.changeTitle(this.$t("Moderation"))}},sgt=["href"],igt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},ogt={key:0,class:"card_header"},rgt={role:"region","aria-label":"Member Navigation",class:"member_status"},agt={key:1,class:U("fcom_dir_layout fcom_dir_layout_classic")},lgt={key:0,class:"loading"},cgt={key:1,class:"fcom_moderation_table"},ugt={class:"moderation_table"},dgt={class:"moderation_table_header"},hgt={style:{"min-width":"100px"}},fgt={class:"moderation_table_body"},pgt=["onClick"],mgt={key:0,class:"user_avatar moderation_avatar"},ggt={class:"feed_user_name"},vgt={key:1},ygt={key:2,class:"no_reports"},bgt={key:3,role:"region","aria-label":"Pagination",class:"pagination_wrap"},_gt={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},wgt={style:{"text-align":"center"}},xgt={style:{"font-size":"18px","margin-bottom":"10px"}},kgt={class:"promo_description"},Cgt={key:1,class:"setting_body",style:{"text-align":"center"}},Sgt={class:"promo_description"},$gt=["href"];function Agt(t,e,n,s,i,o){const r=W("Operation"),a=_e,l=Ge,c=dp,u=Ws,d=Jt,h=W("UserAvatar"),f=W("UserRouteLink"),p=W("MoreFilled"),m=Oa,b=Da,_=La,x=W("Pagination"),k=W("layout"),C=W("app-layout"),S=W("report-details"),E=W("moderation-config-modal");return v(),A(te,null,[y(C,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:w(()=>[y(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Moderation")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,onClick:e[0]||(e[0]=P=>i.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Settings")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,sgt))]),default:w(()=>[g("div",igt,[t.has_pro?(v(),A(te,{key:0},[i.moderationConfig.is_enabled=="yes"?(v(),A("div",ogt,[g("div",rgt,[y(u,{onChange:e[1]||(e[1]=P=>o.getReports()),modelValue:i.status,"onUpdate:modelValue":e[2]||(e[2]=P=>i.status=P),class:"status_group"},{default:w(()=>[y(c,{value:"pending"},{default:w(()=>[Y($(t.$t("Pending")),1)]),_:1}),y(c,{value:"flagged"},{default:w(()=>[Y($(t.$t("Flagged")),1)]),_:1}),y(c,{value:"ignored"},{default:w(()=>[Y($(t.$t("Dismissed")),1)]),_:1}),y(c,{value:"unpublished"},{default:w(()=>[Y($(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])])])):O("",!0),i.moderationConfig.is_enabled=="yes"?(v(),A("div",agt,[i.loading?(v(),A("div",lgt,[y(d,{class:"white_loaded",rows:3,animated:!0})])):i.reports.length?(v(),A("div",cgt,[g("table",ugt,[g("thead",dgt,[g("tr",null,[g("th",null,$(t.$t("Title")),1),g("th",null,$(t.$t("Type")),1),g("th",null,$(t.$t("Reporter")),1),g("th",hgt,$(t.$t("Date")),1),g("th",null,$(t.$t("Reports")),1)])]),g("tbody",fgt,[(v(!0),A(te,null,we(i.reports,P=>{var T,L;return v(),A("tr",{key:P.id},[g("td",{onClick:I=>o.openReportDetails(P),class:"report_reason"},$(o.getTitle(P)),9,pgt),g("td",null,$(P.content_type),1),g("td",null,[P.reporter?(v(),A("div",mgt,[y(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",ggt,[y(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),A("div",vgt,$((L=P.meta)==null?void 0:L.flagged_by),1)):O("",!0)]),g("td",null,$(t.humanDateDiff(P.created_at)),1),g("td",null,$(P.reports_count),1),g("td",null,[y(_,{trigger:"click"},{dropdown:w(()=>[y(b,null,{default:w(()=>[y(m,null,{default:w(()=>[y(l,{"aria-label":t.$t("Review report"),class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:I=>o.openReportDetails(P)},{default:w(()=>[Y($(t.$t("Review Report")),1)]),_:1},8,["aria-label","onClick"])]),_:2},1024),P.status!="ignored"?(v(),D(m,{key:0},{default:w(()=>[y(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:I=>o.confirmAndIgnoreReport(P)},{default:w(()=>[Y($(o.getIgnoreBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="unpublished"?(v(),D(m,{key:1},{default:w(()=>[y(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:I=>o.confirmAndUnpublishReport(P)},{default:w(()=>[Y($(o.getUnpublishBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="pending"?(v(),D(m,{key:2},{default:w(()=>[y(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:I=>o.deleteReport(P)},{default:w(()=>[Y($(t.$t("Delete Report")),1)]),_:1},8,["onClick"])]),_:2},1024)):O("",!0)]),_:2},1024)]),default:w(()=>[y(l,{class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[y(a,null,{default:w(()=>[y(p)]),_:1})]),_:1})]),_:2},1024)])])}),128))])])])):(v(),A("div",ygt,$(t.$t("No reports to review")),1)),i.pagination.total?(v(),A("div",bgt,[y(x,{hide_on_single:!0,onFetch:e[3]||(e[3]=P=>o.getReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])):(v(),A("div",_gt,[g("div",wgt,[g("h3",xgt,$(t.$t("Content Moderation is disabled")),1),g("p",kgt,$(t.$t("__MODERATION_DISABLED_DESC")),1),y(l,{loading:i.saving,class:"el-button fcom_primary_button",onClick:e[4]||(e[4]=P=>o.saveConfig({is_enabled:"yes"}))},{default:w(()=>[Y($(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),A("div",Cgt,[g("p",Sgt,$(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,$gt)]))])]),_:1},8,["title"])]),_:1}),i.reportDetails?(v(),D(S,{key:0,report:i.reportDetails,is_open:i.isOpenReportDetails,status:i.status,onIgnore:o.ignoreReport,onUnpublish:o.unpublishReport,onDelete:o.deleteReport,onClose:e[5]||(e[5]=P=>o.closeReportDetails())},null,8,["report","is_open","status","onIgnore","onUnpublish","onDelete"])):O("",!0),i.showConfig?(v(),D(E,{key:1,is_open:i.showConfig,moderation_config:i.moderationConfig,onCloseConfig:e[6]||(e[6]=P=>i.showConfig=!1),onSaveConfig:o.saveConfig},null,8,["is_open","moderation_config","onSaveConfig"])):O("",!0)],64)}const Egt=ge(ngt,[["render",Agt]]),Mgt={name:"Tools",components:{Layout:pi,AppLayout:mi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},Tgt=["href"],Pgt={class:"settings_router"},Igt={class:"fhr_content_layout_body"},Lgt={class:"setting_header"},Ogt={key:0,class:"setting_body tools_body"},Dgt={key:0,class:"sitemap_configured"},Rgt={class:"sitemap_header"},Vgt={class:"sitemap_body"},Fgt=["href"],Ngt={key:1,class:"setting_body",style:{"text-align":"center"}},Bgt={class:"promo_description"},zgt=["href"];function Hgt(t,e,n,s,i,o){const r=_e,a=Yc,l=W("layout"),c=W("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(l,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Tools")},{actions:w(()=>[t.has_pro?O("",!0):(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Tgt))]),default:w(()=>[g("div",Pgt,[g("div",Igt,[g("div",Lgt,[g("h2",null,$(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),A("div",Ogt,[o.isPublicPortal?(v(),A("div",Dgt,[g("div",Rgt,[y(r,null,{default:w(()=>[...e[0]||(e[0]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"}),g("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})],-1)])]),_:1}),g("h4",null,$(t.$t("Sitemap is configured and will be generated automatically.")),1)]),g("div",Vgt,[y(a,{type:"warning",closable:!1,style:{"margin-top":"15px"},title:t.$t("The sitemap includes only public content. If you are using the default WordPress sitemap, it will be automatically included. For other sitemap plugins, please add this URL in the plugin settings.")},null,8,["title"]),g("p",null,[g("strong",null,$(t.$t("Sitemap URL : ")),1),g("a",{href:o.sitemapUrl,target:"_blank",rel:"noopener"},$(o.sitemapUrl),9,Fgt)])])])):(v(),D(a,{key:1,type:"warning",closable:!1,title:t.$t("Your portal feeds are not public so no sitemap entry will be generated.")},null,8,["title"]))])):(v(),A("div",Ngt,[g("p",Bgt,$(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,zgt)]))])])]),_:1},8,["title"])]),_:1})}const Ugt=ge(Mgt,[["render",Hgt]]),jgt={name:"PrivacySettings",components:{Layout:pi,AppLayout:mi},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/privacy-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/privacy-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Privacy Settings"))}},Wgt={class:"settings_router"},Ygt={key:0,class:"white_loaded"},qgt={key:1,class:"fhr_content_layout_body"},Ggt={class:"setting_body"},Xgt={class:"fcom_help_text fcom_mt_10"},Kgt={class:"fcom_help_text fcom_mt_10"},Zgt={class:"fcom_help_text fcom_mt_10"},Jgt={class:"fcom_help_text fcom_mt_10"},Qgt={class:"fcom_input_wrap"},e1t={key:0},t1t={class:"fcom_input_wrap"},n1t={key:0},s1t={class:"fcom_input_wrap"},i1t={key:0},o1t={class:"fcom_input_wrap"},r1t={class:"fcom_input_wrap"},a1t={class:"fcom_input_wrap"},l1t={class:"fcom_input_wrap"},c1t={style:{"margin-top":"50px"},class:"fcom_input_wrap"},u1t={key:2};function d1t(t,e,n,s,i,o){const r=Ge,a=Jt,l=NV,c=zo,u=Ws,d=an,h=Zt,f=fn,p=W("layout"),m=W("app-layout"),b=xt("loading");return v(),D(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Privacy Settings")},{actions:w(()=>[Oe((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,$(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[b,i.saving]])]),default:w(()=>[g("div",Wgt,[i.loading?(v(),A("div",Ygt,[y(a,{rows:5,animated:!0})])):i.settings?(v(),A("div",qgt,[g("div",Ggt,[g("p",null,$(t.$t("Customize the privacy and compliance settings as per your needs.")),1),y(l),y(f,{onSubmit:e[11]||(e[11]=Be(_=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[12]||(e[12]=_=>i.settings=_),"label-position":"top"},{default:w(()=>[y(d,{label:t.$t("Who can view all members page?")},{default:w(()=>[y(u,{modelValue:i.settings.members_page_status,"onUpdate:modelValue":e[0]||(e[0]=_=>i.settings.members_page_status=_),class:"fcom_radio_group"},{default:w(()=>[y(c,{border:"",value:"everybody"},{default:w(()=>[Y($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[Y($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[Y($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Xgt,[g("p",null,$(t.$t("Choose whether the all-members page should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),y(d,{label:t.$t("Who can view user profile page?")},{default:w(()=>[y(u,{modelValue:i.settings.profile_page_visibility,"onUpdate:modelValue":e[1]||(e[1]=_=>i.settings.profile_page_visibility=_),class:"fcom_radio_group"},{default:w(()=>[y(c,{border:"",value:"everybody"},{default:w(()=>[Y($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[Y($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[Y($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Kgt,[g("p",null,$(t.$t("Choose whether individual user profile page should be public, private, or admin/moderator only. Users can always view their own profile.")),1)])]),_:1},8,["label"]),y(d,{label:t.$t("Who can view leaderboard top members?")},{default:w(()=>[y(u,{modelValue:i.settings.leaderboard_members_visibility,"onUpdate:modelValue":e[2]||(e[2]=_=>i.settings.leaderboard_members_visibility=_),class:"fcom_radio_group"},{default:w(()=>[y(c,{border:"",value:"everybody"},{default:w(()=>[Y($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[Y($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[Y($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Zgt,[g("p",null,$(t.$t("Choose whether the leaderboard top members should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),y(d,{label:t.$t("Who can view spaces and courses on the user profile page.")},{default:w(()=>[y(u,{modelValue:i.settings.user_space_visibility,"onUpdate:modelValue":e[3]||(e[3]=_=>i.settings.user_space_visibility=_),class:"fcom_radio_group"},{default:w(()=>[y(c,{border:"",value:"everybody"},{default:w(()=>[Y($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[Y($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[Y($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Jgt,[g("p",null,$(t.$t("Choose the privacy settings for the Spaces and Courses tabs of a member profile.")),1)])]),_:1},8,["label"]),g("div",Qgt,[y(h,{modelValue:i.settings.can_customize_username,"onUpdate:modelValue":e[4]||(e[4]=_=>i.settings.can_customize_username=_),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),A("span",e1t,"("+$(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,$(t.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),g("div",t1t,[y(h,{modelValue:i.settings.can_change_email,"onUpdate:modelValue":e[5]||(e[5]=_=>i.settings.can_change_email=_),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),A("span",n1t,"("+$(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,$(t.$t("When enabled, members can change their email address of the account (WordPress User account).")),1)]),g("div",s1t,[y(h,{modelValue:i.settings.email_auto_login,"onUpdate:modelValue":e[6]||(e[6]=_=>i.settings.email_auto_login=_),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Automatically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),t.has_pro?O("",!0):(v(),A("span",i1t,"("+$(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,$(t.$t("When enabled, users will be automatically logged in to the portal when they click on the email notification links. This feature is secure and uses signed URLs. User with post edit access will not be logged in automatically.")),1)]),g("div",o1t,[y(h,{modelValue:i.settings.enable_gravatar,"onUpdate:modelValue":e[7]||(e[7]=_=>i.settings.enable_gravatar=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Use Gravatar Photo Service for default user photo")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, the Gravatar Photo Service automatically fetches user avatars based on their email address. Gravatar is a built-in feature of WP and powered by WordPress.com")),1)]),g("div",r1t,[y(h,{modelValue:i.settings.enable_user_sync,"onUpdate:modelValue":e[8]||(e[8]=_=>i.settings.enable_user_sync=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Sync Community Profile with WordPress User Data")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, updates to a community user's profile will automatically sync with their WordPress user data. Disable this to prevent automatic syncing. Enabling this is recommended.")),1)]),g("div",a1t,[y(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_last_activity,"onUpdate:modelValue":e[9]||(e[9]=_=>i.settings.show_last_activity=_),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show last activity of a user on the profile card")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("If unchecked, then the last activity will be shown to only admins/moderators")),1)]),g("div",l1t,[y(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.can_deactive_account,"onUpdate:modelValue":e[10]||(e[10]=_=>i.settings.can_deactive_account=_),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Allow users to deactivate their account directly from their profile settings")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, this option allows users to deactivate their account directly from their profile settings.")),1)]),g("div",c1t,[Oe((v(),D(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])])]),_:1},8,["modelValue"])])])):(v(),A("div",u1t,[g("p",null,$(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const h1t=ge(jgt,[["render",d1t]]),f1t={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function p1t(t,e,n,s,i,o){const r=W("router-view");return v(),D(r)}const m1t=ge(f1t,[["render",p1t]]),g1t={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:Fd,SlugInput:Nd,ErrorAlerts:X1},props:{group:{required:!1,default:{title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},data(){return{saving:!1,form:{},initialized:!1,errors:[]}},watch:{form:{deep:!0,handler(){this.initialized&&this.$emit("dirty")}}},methods:{validate(){if(this.errors=[],(!this.form.title||!this.form.title.trim())&&this.errors.push({title:this.$t("Title"),description:this.$t("Group title cannot be empty.")}),!this.form.id)if(!this.form.slug||!this.form.slug.trim())this.errors.push({title:this.$t("Slug"),description:this.$t("Slug cannot be empty.")});else{const t=K1("/"+this.form.slug);t.valid||t.errors.forEach(e=>{this.errors.push({title:this.$t("Slug"),description:this.$t(e)})})}return this.errors.length===0},submit(){if(!this.validate())return;this.saving=!0;let t="spaces/space_groups",e={title:this.form.title,description:this.form.description,settings:this.form.settings,slug:this.form.slug},n=this.$post;this.form.id&&(t+="/"+this.form.id,n=this.$put),n(t,e).then(s=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(s.message),this.$emit("completed",s.group)}).catch(s=>{this.$handleError(s)}).finally(()=>{this.saving=!1})}},mounted(){this.group&&this.group.id?this.form=this.group:this.form={title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}},this.$nextTick(()=>{this.initialized=!0})}},v1t={key:0},y1t={key:1};function b1t(t,e,n,s,i,o){const r=_t,a=an,l=W("slug-input"),c=Zt,u=W("error-alerts"),d=Ge,h=fn;return v(),D(h,{onSubmit:e[5]||(e[5]=Be(f=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[6]||(e[6]=f=>i.form=f),"label-position":"top"},{default:w(()=>[y(a,{label:t.$t("Group Title")},{default:w(()=>[y(r,{type:"text",placeholder:t.$t("Your Group Title"),modelValue:i.form.title,"onUpdate:modelValue":e[0]||(e[0]=f=>i.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),y(a,{label:t.$t("Slug")},{default:w(()=>[y(l,{modelValue:i.form.slug,"onUpdate:modelValue":e[1]||(e[1]=f=>i.form.slug=f),disabled:!!i.form.id,placeholder:t.$t("Group Slug (no spaces or special characters)"),is_inital_inactive:!!i.form.id,prefix:"#"},null,8,["modelValue","disabled","placeholder","is_inital_inactive"])]),_:1},8,["label"]),y(a,{label:t.$t("Description")},{default:w(()=>[y(r,{type:"textarea",rows:3,placeholder:t.$t("Group Description"),modelValue:i.form.description,"onUpdate:modelValue":e[2]||(e[2]=f=>i.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),i.form.settings?(v(),D(a,{key:0,label:t.$t("Appearance")},{default:w(()=>[y(c,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.always_show_spaces,"onUpdate:modelValue":e[3]||(e[3]=f=>i.form.settings.always_show_spaces=f),class:"fcom_checkbox"},{default:w(()=>[Y($(t.$t("Show Spaces even if the user is not a member of any space")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),y(u,{errors:i.errors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),y(a,null,{default:w(()=>[y(d,{class:"fcom_primary_button",disabled:i.saving,onClick:e[4]||(e[4]=f=>o.submit()),loading:i.saving},{default:w(()=>[i.form.id?(v(),A("span",v1t,$(t.$t("Update Info")),1)):(v(),A("span",y1t,$(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const _1t=ge(g1t,[["render",b1t]]),w1t={name:"MoveGroupPopup",components:{ActionPopover:pp},props:{groups:{type:Array,default:()=>[]},currentSpace:{type:[Array,Object],default:null}},emits:["moved"],data(){return{selectedGroupId:null,working:!1}},computed:{filteredGroups(){return this.groups.filter(t=>{var e;return t.id!=((e=this.currentSpace)==null?void 0:e.parent_id)})}},methods:{moveSpace(t){this.working=!0,this.$patch("spaces/space_groups/move-space",{space_id:this.currentSpace.id,group_id:this.selectedGroupId}).then(e=>{this.$notify.success(e.message),this.$emit("moved"),t()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}}},x1t={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function k1t(t,e,n,s,i,o){const r=ln,a=Qt,l=an,c=Ge,u=fn,d=W("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",x1t,$(t.$t("Move")),1)]),default:w(({hide:f})=>[y(u,{onSubmit:e[1]||(e[1]=Be(p=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(l,{label:t.$t("Move to a different Group")},{default:w(()=>[y(a,{placeholder:t.$t("Select Group"),modelValue:i.selectedGroupId,"onUpdate:modelValue":e[0]||(e[0]=p=>i.selectedGroupId=p)},{default:w(()=>[(v(!0),A(te,null,we(o.filteredGroups,p=>(v(),D(r,{key:p.id,label:p.title,value:p.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),Oe((v(),D(c,{disabled:!i.selectedGroupId||i.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:w(()=>[Y($(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,i.working]])]),_:2},1024)]),_:1})}const C1t=ge(w1t,[["render",k1t]]),S1t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:tU},data(){return{saving:!1,loading:!1,lockscreen:null}},watch:{savingCount(){this.saveChanges()}},methods:{saveChanges(){this.lockscreen&&(this.saving=!0,this.$put("spaces/"+this.spaceProfile.slug+"/lockscreens",{lockscreen:this.lockscreen}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))},getLockscreen(){this.loading=!0,this.$get("spaces/"+this.spaceProfile.slug+"/lockscreens").then(t=>{this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getLockscreen()}},$1t={key:0,class:"fcom_lockscreen_meta"},A1t={class:"fcom_description"},E1t={class:"white_loaded"};function M1t(t,e,n,s,i,o){const r=W("lock-screen-editor"),a=Jt,l=Ia;return i.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:i.lockscreen,saving:i.saving,loading:i.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",$1t,[g("div",A1t,[g("p",null,$(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","saving","loading","onSave"])):i.loading?(v(),D(l,{key:1,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[g("div",E1t,[y(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const T1t=ge(S1t,[["render",M1t]]),P1t={name:"SpaceCustomizer",props:["space_profile"],emits:["close","completed"],components:{SpaceLockscreen:T1t,CreateSpaceForm:L5,ManageSpaceLinks:sU,ManagePaywalls:iU},data(){return{saving:!1,currentTab:"general",savingCount:0,hasPro:window.fluentComAdmin.pro}},methods:{saveChanges(){if(!this.hasPro&&this.currentTab=="lock_screen"){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1}},mounted(){this.$router.push({query:{...this.$route.query,customize_space:1}})},unmounted(){const t={...this.$route.query};delete t.customize_space,this.$router.push({query:t})}},I1t={key:0,class:"fcom_full_editor"},L1t={class:"fcom_full_editor_header fcom_space_settings_nav"},O1t={class:"fcom_editor_menu object_menu"},D1t={class:"fcom_space_menu_ul"},R1t={class:"full_editor_actions"},V1t={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function F1t(t,e,n,s,i,o){const r=W("ArrowLeft"),a=_e,l=Ge,c=H1,u=W("create-space-form"),d=Ei,h=Ia,f=W("space-lockscreen"),p=W("manage-space-links"),m=W("manage-paywalls"),b=B1;return n.space_profile?(v(),A("div",I1t,[y(b,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var _;return[g("div",L1t,[g("div",{onClick:e[0]||(e[0]=x=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),Y(" "+$(n.space_profile.title),1)]),g("div",O1t,[g("ul",D1t,[g("li",{onClick:e[1]||(e[1]=x=>i.currentTab="general")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="general"}),href:"#"},$(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=x=>i.currentTab="paywalls")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="paywalls"}),href:"#"},$(t.$t("Paywalls")),3)]),n.space_profile.privacy=="private"&&((_=n.space_profile.settings)==null?void 0:_.custom_lock_screen)=="yes"?(v(),A("li",{key:0,onClick:e[3]||(e[3]=x=>i.currentTab="lock_screen")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="lock_screen"}),href:"#"},$(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=x=>i.currentTab="manage_links")},[g("a",{class:U({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},$(t.$t("Space Links")),3)])])]),g("div",R1t,[y(l,{class:"fcom_primary_button",disabled:i.saving,loading:i.saving,onClick:o.saveChanges},{default:w(()=>[Y($(!i.hasPro&&i.currentTab=="lock_screen"?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes")),1)]),_:1},8,["disabled","loading","onClick"]),y(l,{onClick:e[5]||(e[5]=x=>t.$emit("completed")),text:""},{default:w(()=>[...e[9]||(e[9]=[Y(" X ",-1)])]),_:1})])])]}),_:1}),y(b,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[i.currentTab=="general"?(v(),D(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(d,null,{default:w(()=>[g("div",V1t,[y(u,{savingCount:i.savingCount,community:n.space_profile},null,8,["savingCount","community"])])]),_:1})]),_:1})):i.currentTab=="lock_screen"?(v(),D(f,{key:1,savingCount:i.savingCount,onClose:e[6]||(e[6]=_=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):i.currentTab=="manage_links"?(v(),D(p,{key:2,savingCount:i.savingCount,onClose:e[7]||(e[7]=_=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):i.currentTab=="paywalls"?(v(),D(m,{key:3,savingCount:i.savingCount,onClose:e[8]||(e[8]=_=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const N1t=ge(P1t,[["render",F1t]]),B1t={name:"SpaceLinkEditModal",components:{SidebarLinkForm:FH},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function z1t(t,e,n,s,i,o){const r=W("SidebarLinkForm"),a=Fs;return v(),D(a,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[1]||(e[1]=l=>i.showModal=l),direction:"rtl",onClose:e[2]||(e[2]=l=>t.$emit("completed")),title:t.$t("Edit Link")},{default:w(()=>[y(r,{onCompleted:e[0]||(e[0]=l=>t.$emit("completed")),link:n.link},null,8,["link"])]),_:1},8,["width","modelValue","title"])}const H1t=ge(B1t,[["render",z1t]]),U1t={name:"SpaceGroups",components:{FluentDnD:pv,ActionPopover:pp,ArrowDownBold:Ure,Drawer:fp,CreateSpaceForm:L5,CreateGroupForm:_1t,Layout:pi,AppLayout:mi,MoveGroupPopup:C1t,SpaceCustomizer:N1t,CourseCustomizer:oU,SpaceLinkEditModal:H1t},data(){return{groups:[],loading:!0,joining:!1,editSpace:null,showGroupDrawer:!1,isGroupFormDirty:!1,editingGroup:null,draggingIndexGroup:null,draggingIndexSpace:null,collapsedGroups:[],orphanedSpaces:[]}},watch:{showGroupDrawer(t){t||(this.isGroupFormDirty=!1)}},computed:{communityCounts(){let t=this.groups.reduce((e,n)=>{var s;return e+(((s=n.spaces)==null?void 0:s.length)||0)},0);return this.orphanedSpaces&&this.orphanedSpaces.length&&(t+=this.orphanedSpaces.length),t},isCourse(){var t;return((t=this.editSpace)==null?void 0:t.type)=="course"}},methods:{toggleGroup(t){this.collapsedGroups.includes(t.id)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t.id):this.collapsedGroups.push(t.id)},openEditSpace(t){t.type==="course"&&t.topics&&(t.category_ids=t.topics.map(e=>e.id)),this.editSpace=t},initDeleteSpace(t){let e=this.$t("space");t.type=="course"?e=this.$t("course"):t.type=="sidebar_link"&&(e=this.$t("link")),this.$confirm(this.$t("Are you sure you want to delete this %s?",e),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the %s",e),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{if(t.type=="sidebar_link"){this.deleteSpace(t);return}let n=this.$t("Please Type %s to confirm. Please note, all the posts, comments, activities of this Space will be delete.",'"DELETE"');t.type=="course"&&(n=this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"')),this.$promt(this.$t(n),this.$t("Delete %s",e),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(s=>{s.value==="DELETE"?this.deleteSpace(t):this.$notify.error(this.$t("The verification string does not match"))})})},deleteSpace(t){let e="spaces/"+t.id+"/by-id";t.type=="course"?e="admin/courses/"+t.id:t.type=="sidebar_link"&&(e="admin/links/"+t.id),this.$del(e).then(n=>{this.$notify.success(n.message),this.getGroups()}).catch(n=>{this.$handleError(n)})},getGroups(){this.loading=!0,this.editingGroup=null,this.$get("spaces/space_groups").then(t=>{this.groups=t.groups,this.orphanedSpaces=t.orphaned_spaces;const e=[];this.groups.forEach(n=>{e.push({id:n.id,title:n.title})}),this.appVars.space_groups=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initEditGroup(t){this.editingGroup=t,this.showGroupDrawer=!0},initCreateGroup(){this.editingGroup=null,this.showGroupDrawer=!0},resetGroupsIndexes(t){const e={};Cc(this.groups,(n,s)=>{e[n.id]=s+1}),this.$patch("spaces/space_groups/re-index",{indexes:e}).then(n=>{this.$notify.success(n.message)}).catch(n=>{this.$handleError(n),this.groups=t}).finally(()=>{this.$eventBus.emit("reloadMenu")})},resetSpaceIndexes(t,e,n){this.$patch("spaces/space_groups/re-index-spaces",{indexes:t}).then(s=>{this.$notify.success(s.message)}).catch(s=>{this.$handleError(s);const i=this.groups.find(o=>Number(o.id)===Number(n));i&&(i.spaces=e)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},removeGroup(t){if(t&&t.spaces.length){this.$messageBox({title:this.$t("Cannot be deleted"),message:this.$t("You cannot delete a group with spaces. Please move the spaces to a different group first."),type:"warning",confirmButtonText:this.$t("Got it!")});return}this.$confirm(this.$t("Are you sure you want to remove this group?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete this group"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("spaces/space_groups/"+t.id).then(()=>{this.getGroups(),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)})})},getTypeTitle(t){return t=="community"?this.$labelize("space").toLowerCase():this.$labelize(t).toLowerCase()},dropGroup({index:t}){const e=[...this.groups],n=this.groups.splice(t,1)[0];this.groups.splice(t,0,n),this.resetGroupsIndexes(e),this.draggingIndexGroup=null},dropSpace({newItems:t,index:e}){const n=t[0].parent_id;let s=this.groups.find(a=>Number(a.id)===Number(n)).spaces||[];const i=[...s],o=s.splice(e,1)[0];s.splice(e,0,o);let r=[];Cc(s,(a,l)=>{r.push(a.id)}),this.resetSpaceIndexes(r,i,n),this.draggingIndexSpace=null},openCreateSpaceModal(t){window.fluentFrameworkApp.$eventBus.emit("createSpaceModal",{parent_id:t.id.toString(),disable_redirect:!0})}},mounted(){this.getGroups(),this.$eventBus.on("spaceCreated",this.getGroups)},beforeDestroy(){this.$eventBus.off("spaceCreated",this.getGroups)}},j1t={class:"settings_router"},W1t={class:"fcom_communities"},Y1t={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},q1t={class:"fcom_card_section_heading"},G1t={key:1},X1t={class:"fcom_card_sections",style:{"margin-bottom":"0"}},K1t={class:"fcom_section_primary_item_title"},Z1t={class:"fcom_heading_item"},J1t={class:"fcom_space_counts"},Q1t={class:"fcom_section_item_actions"},evt={key:0,class:"fcom_section_items"},tvt={class:"fcom_section_item_title"},nvt={class:"fcom_heading_item"},svt={class:"fcom_section_item_actions"},ivt=["href"],ovt={class:"actions_items"},rvt=["onClick"],avt=["onClick"],lvt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},cvt={class:"fcom_section_primary_item fcom_no_top_border"},uvt={class:"fcom_heading_item"},dvt={class:"fcom_section_items"},hvt={class:"fcom_section_item"},fvt={class:"fcom_section_item_title"},pvt={class:"fcom_heading_item"},mvt={class:"fcom_section_item_actions"},gvt=["href"],vvt={class:"actions_items"},yvt=["onClick"],bvt=["onClick"],_vt={key:0};function wvt(t,e,n,s,i,o){const r=Ge,a=Jt,l=W("ArrowDownBold"),c=_e,u=W("Plus"),d=W("action-popover"),h=Bo,f=W("MoveGroupPopup"),p=W("FluentDnD"),m=W("layout"),b=W("app-layout"),_=W("create-group-form"),x=W("drawer"),k=W("course-customizer"),C=W("space-customizer"),S=W("SpaceLinkEditModal"),E=xt("loading");return v(),A(te,null,[y(b,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("All Space Groups")},{actions:w(()=>[y(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=P=>o.initCreateGroup())},{default:w(()=>[Y($(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",j1t,[Oe((v(),A("div",W1t,[g("div",Y1t,[g("div",q1t,[g("h3",null,$(t.$_n("%d Group","%d Groups",i.groups.length))+" • "+$(t.$_n("%d Space","%d Spaces",o.communityCounts)),1)])]),i.loading?(v(),D(a,{key:0,animated:!0,row:5})):(v(),A("div",G1t,[y(p,{items:i.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:P})=>[g("div",X1t,[g("div",{class:U([{fcom_collapsed_group:i.collapsedGroups.indexOf(P.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",K1t,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",Z1t,[g("h4",null,$(t.$t("Group:"))+" "+$(P.title),1),g("div",null,[P.spaces&&P.spaces.length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:T=>o.toggleGroup(P),size:"small",text:""},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1}),g("span",J1t,$(t.$t("%s items",P.spaces.length)),1)]),_:2},1032,["onClick"])):O("",!0),y(r,{onClick:T=>o.openCreateSpaceModal(P),style:{"margin-left":"5px","background-color":"var(--el-fill-color-light)"},size:"small",text:""},{default:w(()=>[y(c,null,{default:w(()=>[y(u)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Q1t,[y(d,{items:[{label:t.$t("Add new space"),action:()=>{o.openCreateSpaceModal(P)}},{label:t.$t("Edit Group Info"),action:()=>{o.initEditGroup(P)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.removeGroup(P)}}]},null,8,["items"])])],2),i.collapsedGroups.indexOf(P.id)===-1?(v(),A("div",evt,[y(p,{items:P.spaces,"item-class":"fcom_section_item cursor-move","item-style":"padding: 15px 15px 15px 35px",onDrop:o.dropSpace},{item:w(({data:T,index:L})=>[g("div",tvt,[e[11]||(e[11]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",nvt,[Y($(T.title)+" ",1),T.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[Y($(t.$labelize(T.status)),1)]),_:2},1024)):O("",!0),y(h,null,{default:w(()=>[Y($(o.getTypeTitle(T.type)),1)]),_:2},1024),T.type=="sidebar_link"?(v(),D(h,{key:1,type:"info",class:"fcom_hover_show"},{default:w(()=>[Y($(T.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[Y("ID: "+$(T.id),1)]),_:2},1024))])]),g("div",svt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:T.permalink},$(t.$t("View")),9,ivt),y(d,null,{default:w(({hide:I})=>[g("ul",ovt,[g("li",null,[y(f,{groups:i.groups,currentSpace:T,onMoved:V=>{I(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:V=>{I(),o.openEditSpace(T)}},$(t.$t("Edit")),9,rvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:V=>{I(),o.initDeleteSpace(T)}},$(t.$t("Delete")),9,avt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),i.orphanedSpaces&&i.orphanedSpaces.length?(v(),A("div",lvt,[g("div",cvt,[g("div",uvt,[g("h4",null,$(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",dvt,[(v(!0),A(te,null,we(i.orphanedSpaces,P=>(v(),A("div",hvt,[g("div",fvt,[g("p",pvt,[Y($(P.title)+" ",1),P.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[Y($(t.$labelize(P.status)),1)]),_:2},1024)):O("",!0),y(h,null,{default:w(()=>[Y($(o.getTypeTitle(P.type)),1)]),_:2},1024),y(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[Y(" ID: "+$(P.id),1)]),_:2},1024)])]),g("div",mvt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:P.permalink},$(t.$t("View")),9,gvt),y(d,null,{default:w(({hide:T})=>[g("ul",vvt,[g("li",null,[y(f,{groups:i.groups,currentSpace:P,onMoved:L=>{T(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:L=>{T(),o.openEditSpace(P)}},$(t.$t("Edit")),9,yvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:L=>{T(),o.initDeleteSpace(P)}},$(t.$t("Delete")),9,bvt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[E,i.loading]])])]),_:1},8,["title"])]),_:1}),y(x,{id:"fluent_comminity_body",modelValue:i.showGroupDrawer,"onUpdate:modelValue":e[3]||(e[3]=P=>i.showGroupDrawer=P),size:t.drawerWidth,title:i.editingGroup?t.$t("Edit Group"):t.$t("Create a new Group"),"close-on-click-modal":!0,"has-close-confirmation":i.isGroupFormDirty,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{default:w(()=>[i.showGroupDrawer?(v(),D(_,{key:0,group:i.editingGroup,onDirty:e[1]||(e[1]=P=>i.isGroupFormDirty=!0),onCompleted:e[2]||(e[2]=P=>{i.showGroupDrawer=!1,o.getGroups()})},null,8,["group"])):O("",!0)]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),i.editSpace?(v(),A("div",_vt,[(v(),D(Ta,{to:"body"},[i.editSpace.type=="course"?(v(),D(k,{key:0,course:i.editSpace,onClose:e[4]||(e[4]=P=>i.editSpace=null),onCompleted:e[5]||(e[5]=P=>{i.editSpace=null,o.getGroups()})},null,8,["course"])):i.editSpace.type=="community"?(v(),D(C,{key:1,space_profile:i.editSpace,onClose:e[6]||(e[6]=P=>i.editSpace=null),onCompleted:e[7]||(e[7]=P=>{i.editSpace=null,o.getGroups()})},null,8,["space_profile"])):i.editSpace.type=="sidebar_link"?(v(),D(S,{key:2,link:i.editSpace,onClose:e[8]||(e[8]=P=>i.editSpace=null),onCompleted:e[9]||(e[9]=P=>{i.editSpace=null,o.getGroups()})},null,8,["link"])):O("",!0)]))])):O("",!0)],64)}const xvt=ge(U1t,[["render",wvt]]),kvt={name:"WebhookForm",components:{SpaceIcon:wp},props:["modelValue","courses","spaces"],emits:["completed"],data(){return{loading:!1,form:this.modelValue||{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},adding:!1,mapFields:[{field:"Email (required)",key:"email"},{field:"First Name (optional)",key:"first_name"},{field:"Last Name (optional)",key:"last_name"},{field:"Username (optional)",key:"user_login"},{field:"Password (optional)",key:"user_password"}]}},methods:{addWebhook(){if(!this.form.title){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/webhooks",this.form).then(t=>{this.$notify.success(t.message),this.form.id?this.$emit("completed"):(this.form.id=t.webhook.id,this.form.webhook_url=t.webhook.webhook_url)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}}},Cvt={key:0,class:"fcom_highlight_block"},Svt={style:{color:"#E6A23C"}},$vt={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},Avt={key:0,class:"fcom_space_title"},Evt={key:0,class:"fcom_space_title"},Mvt={key:0,class:"fcom_space_title"},Tvt={key:0,class:"fcom_space_title"},Pvt={class:"dialog_footer fcom_mt_20"},Ivt={key:0},Lvt={key:1};function Ovt(t,e,n,s,i,o){const r=W("CopyDocument"),a=_e,l=Ge,c=_t,u=Yc,d=Jr,h=Zr,f=an,p=W("SpaceIcon"),m=ln,b=Qt,_=Od,x=Ld,k=Zt,C=fn,S=xt("loading");return v(),D(C,{onSubmit:e[8]||(e[8]=Be(E=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=E=>i.form=E),size:"large"},{default:w(()=>[i.form.webhook_url?(v(),A("div",Cvt,[g("p",null,$(t.$t("You can use this Webhook URL to send POST request to trigger the actions")),1),y(c,{class:"fcom_mb_20",size:"small",value:i.form.webhook_url,readonly:""},{append:w(()=>[y(l,{onClick:e[0]||(e[0]=E=>t.$toClipboard(i.form.webhook_url,this.$t("Link copied to clipboard")))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1})]),_:1},8,["value"]),y(u,{type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[Y($(t.$t("Copy the keys in the right column and paste it into the app you want to use for sending the POST request."))+" ",1),g("span",Svt,$(t.$t("The email address is required!")),1),e[10]||(e[10]=Y()),g("a",$vt,$(t.$t("Read the documentation")),1)]),_:1}),y(h,{style:{margin:"20px 0"},"empty-text":t.$t("No Data Found"),border:"",stripe:"",height:"250",data:i.mapFields},{default:w(()=>[y(d,{label:t.$t("Input Data Label"),prop:"field",width:"300"},null,8,["label"]),y(d,{label:t.$t("Key"),prop:"key"},null,8,["label"])]),_:1},8,["empty-text","data"])])):O("",!0),y(f,{label:t.$t("Title")},{default:w(()=>[y(c,{modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=E=>i.form.title=E),placeholder:t.$t("Your Webhook Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(x,{gutter:20},{default:w(()=>[y(_,{sm:24,md:12},{default:w(()=>[y(f,{label:t.$t("Add to Spaces")},{default:w(()=>[y(b,{modelValue:i.form.space_ids,"onUpdate:modelValue":e[2]||(e[2]=E=>i.form.space_ids=E),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(n.spaces,E=>(v(),D(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),A("span",Avt,[y(p,{space_profile:E},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),y(_,{sm:24,md:12},{default:w(()=>[y(f,{label:t.$t("Remove from Spaces")},{default:w(()=>[y(b,{modelValue:i.form.remove_space_ids,"onUpdate:modelValue":e[3]||(e[3]=E=>i.form.remove_space_ids=E),multiple:"",placeholder:t.$t("Select Spaces that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(n.spaces,E=>(v(),D(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),A("span",Evt,[y(p,{space_profile:E},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),n.courses?(v(),D(x,{key:1,gutter:20},{default:w(()=>[y(_,{sm:24,md:12},{default:w(()=>[y(f,{label:t.$t("Add to Courses")},{default:w(()=>[y(b,{modelValue:i.form.course_ids,"onUpdate:modelValue":e[4]||(e[4]=E=>i.form.course_ids=E),multiple:"",placeholder:t.$t("Select Courses"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(n.courses,E=>(v(),D(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),A("span",Mvt,[y(p,{space_profile:E},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),y(_,{sm:24,md:12},{default:w(()=>[y(f,{label:t.$t("Remove from Courses")},{default:w(()=>[y(b,{modelValue:i.form.remove_course_ids,"onUpdate:modelValue":e[5]||(e[5]=E=>i.form.remove_course_ids=E),multiple:"",placeholder:t.$t("Select Courses that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(n.courses,E=>(v(),D(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),A("span",Tvt,[y(p,{space_profile:E},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})):O("",!0),y(k,{modelValue:i.form.send_wp_welcome_email,"onUpdate:modelValue":e[6]||(e[6]=E=>i.form.send_wp_welcome_email=E),"true-value":"yes","false-value":"no"},{default:w(()=>[Y($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",Pvt,[le(t.$slots,"after_form",{},()=>[Oe((v(),D(l,{class:"fcom_primary_button",disabled:i.adding,onClick:e[7]||(e[7]=E=>o.addWebhook())},{default:w(()=>[i.form.id?(v(),A("span",Ivt,$(t.$t("Update Webhook")),1)):(v(),A("span",Lvt,$(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,i.adding]])])])]),_:3},8,["modelValue"])}const Dvt=ge(kvt,[["render",Ovt]]),Rvt={name:"IncomingWebhooks",components:{Pagination:qd,UserAvatar:B2,UserRouteLink:ta,WebhookForm:Dvt,Layout:pi,AppLayout:mi},data(){return{webhooks:[],loading:!1,spaces:[],courses:null,paginate:{page:1,per_page:10,total:0},search:"",bulkAction:"",showModal:!1,editing_webhook:{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_webhook=t?{id:t.id,title:t.value.title,course_ids:t.value.course_ids,remove_course_ids:t.value.remove_course_ids,space_ids:t.value.space_ids,remove_space_ids:t.value.remove_space_ids,send_wp_welcome_email:t.value.send_wp_welcome_email,webhook_url:t.webhook_url}:{title:"",course_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},this.showModal=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},fetch(){this.loading=!0,this.$get("admin/webhooks",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{t.spaces&&(this.spaces=t.spaces,this.courses=t.courses),this.webhooks=t.webhooks.data,this.paginate.total=t.webhooks.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeWebhook(t){this.$confirm(this.$t("Are you sure you want to remove this webhook?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/webhooks/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Incoming Webhooks"))}},Vvt=["href"],Fvt={class:"settings_router manager_section"},Nvt={class:"fhr_content_layout_body"},Bvt={key:0,class:"setting_body"},zvt={class:"fcom_manager_actions"},Hvt={class:"bulk_search"},Uvt={class:"fcom_manager_table"},jvt={class:"fcom_webhook_url"},Wvt={class:"fcom_table_action_col"},Yvt={role:"region","aria-label":"Pagination",class:"pagination_wrap"},qvt={key:1,class:"setting_body",style:{"text-align":"center"}},Gvt=["href"],Xvt={class:"dialog_header"},Kvt={class:"dialog_body"};function Zvt(t,e,n,s,i,o){const r=W("Plus"),a=_e,l=Ge,c=_t,u=Bo,d=Jr,h=W("CopyDocument"),f=Zr,p=W("Pagination"),m=W("layout"),b=W("app-layout"),_=W("webhook-form"),x=Fs,k=xt("loading");return v(),A(te,null,[y(b,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Incoming Webhooks")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Add New Webhook")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Vvt))]),default:w(()=>[g("div",Fvt,[g("div",Nvt,[t.has_pro?(v(),A("div",Bvt,[g("div",zvt,[g("div",Hvt,[y(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=C=>i.search=C),onKeydown:Nt(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",Uvt,[Oe((v(),D(f,{data:i.webhooks,"empty-text":t.$t("No Webhooks Found")},{default:w(()=>[y(d,{label:t.$t("Title"),sortable:"","min-width":"160"},{default:w(C=>[Y($(C.row.value.title)+" ",1),C.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[Y($(C.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),y(d,{label:t.$t("Webhook URL"),sortable:""},{default:w(C=>[g("div",jvt,[y(c,{size:"small",value:C.row.webhook_url,readonly:""},{append:w(()=>[y(l,{onClick:S=>o.copyToClipboard(C.row.webhook_url),size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(h)]),_:1})]),_:1},8,["onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),y(d,{label:t.$t("Actions"),width:150},{default:w(C=>[g("div",Wvt,[y(l,{onClick:S=>o.showForm(C.row),size:"small"},{default:w(()=>[Y($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:S=>o.removeWebhook(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[Y($(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[k,i.loading]])]),g("div",Yvt,[y(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=C=>o.fetch()),pagination:i.paginate},null,8,["pagination"])])])):(v(),A("div",qvt,[e[7]||(e[7]=g("p",null,null,-1)),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Gvt)]))])])]),_:1},8,["title"])]),_:1}),y(x,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[5]||(e[5]=C=>i.showModal=C),direction:"rtl"},{header:w(({close:C})=>[g("div",Xvt,[g("h4",null,$(t.$t(i.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",Kvt,[i.showModal?(v(),D(_,{key:0,onCompleted:e[3]||(e[3]=()=>{o.fetch(),i.showModal=!1}),modelValue:i.editing_webhook,"onUpdate:modelValue":e[4]||(e[4]=C=>i.editing_webhook=C),courses:i.courses,spaces:i.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const Jvt=ge(Rvt,[["render",Zvt]]),Qvt={name:"Overview",components:{AppLayout:mi,Layout:pi},data(){return{analyticsNavigations:[{title:this.$t("Overview"),route:"analytics_overview"},{title:this.$t("Members"),route:"analytics_members"},{title:this.$t("Spaces"),route:"analytics_spaces"}]}},mounted(){this.changeTitle(this.$t("Reports"))}},e0t={class:"object_menu"},t0t={class:"fcom_space_menu_ul"};function n0t(t,e,n,s,i,o){const r=W("router-link"),a=W("RouterView"),l=W("layout"),c=W("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[y(l,{wrapper_class:"no_bg_layout",title:t.$t("Reports")+" (Beta)"},{actions:w(()=>[g("div",e0t,[g("ul",t0t,[(v(!0),A(te,null,we(i.analyticsNavigations,(u,d)=>(v(),A("li",{key:`analytics-navigation-${d}`},[y(r,{to:{name:u.route}},{default:w(()=>[Y($(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[y(a)]),_:1},8,["title"])]),_:1})}const s0t=ge(Qvt,[["render",n0t]]),i0t={name:"CheckProStatus"},o0t={class:"upgrade-pro-wrapper"};function r0t(t,e,n,s,i,o){return v(),A("div",o0t,[...e[0]||(e[0]=[g("div",{class:"upgrade-text"},[g("h2",null,"This Feature is [Pro] Only"),g("p",null,"Upgrade to Pro and unlock this feature and many others!")],-1),g("div",{class:"upgrade-button"},[g("a",{href:"https://fluentcommunity.co/",class:"button",target:"_blank"},"Upgrade Now")],-1)])])}const $S=ge(i0t,[["render",r0t],["__scopeId","data-v-cc4c5d40"]]),a0t={name:"AnalyticsHeader",props:["predefinedDate","predefinedDates","dateRanges"],emits:["update:date-ranges","update:predefined-date"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],this.$emit("update:date-ranges",this.localDateRanges),this.$emit("update:predefined-date",this.localPredefinedDate)},disabledDate(t){return t.getTime()>Date.now()}},watch:{localDateRanges(t){this.$emit("update:date-ranges",t)}}},l0t={class:"fcom-report-header"},c0t={class:"fcom-report-header-action"};function u0t(t,e,n,s,i,o){const r=ln,a=Qt,l=Rd;return v(),A("div",l0t,[g("h4",null,$(t.$t("Overview")),1),g("div",c0t,[y(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(te,null,we(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),y(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>i.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.setDateRange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const d0t=ge(a0t,[["render",u0t]]),h0t={name:"Loading",props:{section:{type:Number,default:()=>1}}};function f0t(t,e,n,s,i,o){const r=Jt;return v(!0),A(te,null,we(n.section,a=>(v(),A("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[y(r,{rows:5,loading:"",animated:""})]))),128)}const Ba=ge(h0t,[["render",f0t]]),p0t={name:"AnalyticsWidgets",components:{Loading:Ba},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{let e=Object.values(t.data).map(n=>{const s=typeof(n==null?void 0:n.comparison)=="string"&&n.comparison.startsWith("-");return{...n,down:s}});this.widgets=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},m0t={key:1,class:"fcom-report-stat-widgets"},g0t={class:"stat-title"};function v0t(t,e,n,s,i,o){const r=W("Loading");return i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",m0t,[(v(!0),A(te,null,we(i.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",g0t,$(a.title),1),g("h3",null,[Y($(a.total_records)+" ",1),g("span",{class:U(["stat-percent",{"stat-down":a.down}])},$(a.comparison),3)])]))),128))]))}const y0t=ge(p0t,[["render",v0t]]);/*!
134 * ApexCharts v4.3.0
135 * (c) 2018-2024 ApexCharts
136 * Released under the MIT License.
137 */function L6(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,s=Array(e);n<e;n++)s[n]=t[n];return s}function CU(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xT(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,AU(s.key),s)}}function lt(t,e,n){return e&&xT(t.prototype,e),n&&xT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Sm(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=AS(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
138 In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,r=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return r=l.done,l},e:function(l){a=!0,o=l},f:function(){try{r||n.return==null||n.return()}finally{if(a)throw o}}}}function mv(t){var e=SU();return function(){var n,s=Kb(t);if(e){var i=Kb(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return function(o,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CU(o)}(this,n)}}function Xb(t,e,n){return(e=AU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kb(t){return Kb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kb(t)}function gv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O6(t,e)}function SU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SU=function(){return!!t})()}function kT(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,s)}return n}function et(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kT(Object(n),!0).forEach(function(s){Xb(t,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kT(Object(n)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(n,s))})}return t}function O6(t,e){return O6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},O6(t,e)}function $U(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,s){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,r,a,l,c=[],u=!0,d=!1;try{if(a=(i=i.call(n)).next,s===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(o=a.call(i)).done)&&(c.push(o.value),c.length!==s);u=!0);}catch(h){d=!0,r=h}finally{try{if(!u&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw r}}return c}}(t,e)||AS(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139 In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Rs(t){return function(e){if(Array.isArray(e))return L6(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||AS(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
140 In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function AU(t){var e=function(n,s){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,s||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(n)}(t,"string");return typeof e=="symbol"?e:e+""}function Kf(t){return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kf(t)}function AS(t,e){if(t){if(typeof t=="string")return L6(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L6(t,e):void 0}}var ue=function(){function t(){at(this,t)}return lt(t,[{key:"shadeRGBColor",value:function(e,n){var s=n.split(","),i=e<0?0:255,o=e<0?-1*e:e,r=parseInt(s[0].slice(4),10),a=parseInt(s[1],10),l=parseInt(s[2],10);return"rgb("+(Math.round((i-r)*o)+r)+","+(Math.round((i-a)*o)+a)+","+(Math.round((i-l)*o)+l)+")"}},{key:"shadeHexColor",value:function(e,n){var s=parseInt(n.slice(1),16),i=e<0?0:255,o=e<0?-1*e:e,r=s>>16,a=s>>8&255,l=255&s;return"#"+(16777216+65536*(Math.round((i-r)*o)+r)+256*(Math.round((i-a)*o)+a)+(Math.round((i-l)*o)+l)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,n){return t.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}}],[{key:"bind",value:function(e,n){return function(){return e.apply(n,arguments)}}},{key:"isObject",value:function(e){return e&&Kf(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,n){return Object.prototype.toString.call(n)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var n,s=[];for(n=0;n<e.length;n++)s[n]=e[n];return s}},{key:"extend",value:function(e,n){var s=this;typeof Object.assign!="function"&&(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(o),a=1;a<arguments.length;a++){var l=arguments[a];if(l!=null)for(var c in l)l.hasOwnProperty(c)&&(r[c]=l[c])}return r});var i=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(function(o){s.isObject(n[o])&&o in e?i[o]=s.extend(e[o],n[o]):Object.assign(i,Xb({},o,n[o]))}),i}},{key:"extendArray",value:function(e,n){var s=[];return e.map(function(i){s.push(t.extend(n,i))}),e=s}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||Kf(e)!=="object")return e;if(s.has(e))return s.get(e);if(Array.isArray(e)){n=[],s.set(e,n);for(var i=0;i<e.length;i++)n[i]=this.clone(e[i],s)}else if(e instanceof Date)n=new Date(e.getTime());else for(var o in n={},s.set(e,n),e)e.hasOwnProperty(o)&&(n[o]=this.clone(e[o],s));return n}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,n){return Math.pow(n,Math.floor(Math.log(e)/Math.log(n)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(n))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var n=getComputedStyle(e,null),s=e.clientHeight,i=e.clientWidth;return s-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[i-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s]}},{key:"getBoundingClientRect",value:function(e){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:e.clientWidth,height:e.clientHeight,x:n.left,y:n.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(n,s){return Array.isArray(s)&&(s=s.reduce(function(i,o){return i.length>o.length?i:o})),n.length>s.length?n:s},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var s=e.replace("#","");s=s.match(new RegExp("(.{"+s.length/3+"})","g"));for(var i=0;i<s.length;i++)s[i]=parseInt(s[i].length===1?s[i]+s[i]:s[i],16);return n!==void 0&&s.push(n),"rgba("+s.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,n){for(var s=[],i=2*Math.PI/n,o=0;o<n;o++){var r={};r.x=e*Math.sin(o*i),r.y=-e*Math.cos(o*i),s.push(r)}return s}},{key:"polarToCartesian",value:function(e,n,s,i){var o=(i-90)*Math.PI/180;return{x:e+s*Math.cos(o),y:n+s*Math.sin(o)}}},{key:"escapeString",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",s=e.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,n,s){if(s>=e.length)for(var i=s-e.length+1;i--;)e.push(void 0);return e.splice(s,0,e.splice(n,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,n){for(;(e=e.parentElement)&&!e.classList.contains(n););return e}},{key:"setELstyles",value:function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e.style.key=n[s])}},{key:"preciseAddition",value:function(e,n){var s=(String(e).split(".")[1]||"").length,i=(String(n).split(".")[1]||"").length,o=Math.pow(10,Math.max(s,i));return(Math.round(e*o)+Math.round(n*o))/o}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}},{key:"getGCD",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,n))));for(e=Math.round(Math.abs(e)*i),n=Math.round(Math.abs(n)*i);n;){var o=n;n=e%n,e=o}return e/i}},{key:"getPrimeFactors",value:function(e){for(var n=[],s=2;e>=2;)e%s==0?(n.push(s),e/=s):s++;return n}},{key:"mod",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,n))));return(e=Math.round(Math.abs(e)*i))%(n=Math.round(Math.abs(n)*i))/i}}]),t}(),Tp=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"animateLine",value:function(e,n,s,i){e.attr(n).animate(i).attr(s)}},{key:"animateMarker",value:function(e,n,s,i){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(function(){i()})}},{key:"animateRect",value:function(e,n,s,i,o){e.attr(n).animate(i).attr(s).after(function(){return o()})}},{key:"animatePathsGradually",value:function(e){var n=e.el,s=e.realIndex,i=e.j,o=e.fill,r=e.pathFrom,a=e.pathTo,l=e.speed,c=e.delay,u=this.w,d=0;u.config.chart.animations.animateGradually.enabled&&(d=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!=="bar"&&(d=0),this.morphSVG(n,s,i,u.config.chart.type!=="line"||u.globals.comboCharts?o:"stroke",r,a,l,c*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var n=e.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:e,w:n}))}},{key:"morphSVG",value:function(e,n,s,i,o,r,a,l){var c=this,u=this.w;o||(o=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var d=function(h){return u.config.chart.type==="radar"&&(a=1),"M 0 ".concat(u.globals.gridHeight)};(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=d()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),u.globals.shouldAnimate||(a=1),e.plot(o).animate(1,l).plot(o).animate(a,l).plot(r).after(function(){ue.isNumber(s)?s===u.globals.series[u.globals.maxValsInArrayIndex].length-2&&u.globals.shouldAnimate&&c.animationCompleted(e):i!=="none"&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&n===u.globals.series.length-1||u.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()})}}]),t}();const D6={},EU=[];function Gt(t,e){if(Array.isArray(t))for(const n of t)Gt(n,e);else if(typeof t!="object")MU(Object.getOwnPropertyNames(e)),D6[t]=Object.assign(D6[t]||{},e);else for(const n in t)Gt(n,t[n])}function Qi(t){return D6[t]||{}}function MU(t){EU.push(...t)}function ES(t,e){let n;const s=t.length,i=[];for(n=0;n<s;n++)i.push(e(t[n]));return i}function F3(t){return t%360*Math.PI/180}function Pp(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Ip(t,e,n,s){return e!=null&&n!=null||(s=s||t.bbox(),e==null?e=s.width/s.height*n:n==null&&(n=s.height/s.width*e)),{width:e,height:n}}function R6(t,e){const n=t.origin;let s=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",i=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";n!=null&&([s,i]=Array.isArray(n)?n:typeof n=="object"?[n.x,n.y]:[n,n]);const o=typeof s=="string",r=typeof i=="string";if(o||r){const{height:a,width:l,x:c,y:u}=e.bbox();o&&(s=s.includes("left")?c:s.includes("right")?c+l:c+l/2),r&&(i=i.includes("top")?u:i.includes("bottom")?u+a:u+a/2)}return[s,i]}const b0t=new Set(["desc","metadata","title"]),V6=t=>b0t.has(t.nodeName),TU=(t,e,n={})=>{const s={...e};for(const i in s)s[i].valueOf()===n[i]&&delete s[i];Object.keys(s).length?t.node.setAttribute("data-svgjs",JSON.stringify(s)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},MS="http://www.w3.org/2000/svg",N3="http://www.w3.org/2000/xmlns/",Lp="http://www.w3.org/1999/xlink",mn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function vv(){return mn.window}let TS=class{};const td={},PS="___SYMBOL___ROOT___";function p1(t,e=MS){return mn.document.createElementNS(e,t)}function Ni(t,e=!1){if(t instanceof TS)return t;if(typeof t=="object")return B3(t);if(t==null)return new td[PS];if(typeof t=="string"&&t.charAt(0)!=="<")return B3(mn.document.querySelector(t));const n=e?mn.document.createElement("div"):p1("svg");return n.innerHTML=t,t=B3(n.firstChild),n.removeChild(n.firstChild),t}function Fn(t,e){return e&&(e instanceof mn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:p1(t)}function Qo(t){if(!t)return null;if(t.instance instanceof TS)return t.instance;if(t.nodeName==="#document-fragment")return new td.Fragment(t);let e=Pp(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":td[e]||(e="Dom"),new td[e](t)}let B3=Qo;function vn(t,e=t.name,n=!1){return td[e]=t,n&&(td[PS]=t),MU(Object.getOwnPropertyNames(t.prototype)),t}let _0t=1e3;function PU(t){return"Svgjs"+Pp(t)+_0t++}function IU(t){for(let e=t.children.length-1;e>=0;e--)IU(t.children[e]);return t.id&&(t.id=PU(t.nodeName)),t}function $t(t,e){let n,s;for(s=(t=Array.isArray(t)?t:[t]).length-1;s>=0;s--)for(n in e)t[s].prototype[n]=e[n]}function Vn(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}Gt("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Ni(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Ni(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Ni(t)).before(this),this},insertAfter:function(t){return(t=Ni(t)).after(this),this}});const LU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,w0t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,x0t=/rgb\((\d+),(\d+),(\d+)\)/,k0t=/(#[a-z_][a-z0-9\-_]*)/i,C0t=/\)\s*,?\s*/,S0t=/\s/g,CT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ST=/^rgb\(/,$T=/^(\s+)?$/,AT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$0t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Tl=/[\s,]+/,IS=/[MLHVCSQTAZ]/i;function A0t(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function ch(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function z3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}Gt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Tl)},hasClass:function(t){return this.classes().indexOf(t)!==-1},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter(function(e){return e!==t}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),Gt("Dom",{css:function(t,e){const n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(s){return!!s.length}).forEach(function(s){const i=s.split(/\s*:\s*/);n[i[0]]=i[1]}),n;if(arguments.length<2){if(Array.isArray(t)){for(const s of t){const i=s;n[s]=this.node.style.getPropertyValue(i)}return n}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const s in t)this.node.style.setProperty(s,t[s]==null||$T.test(t[s])?"":t[s])}return arguments.length===2&&this.node.style.setProperty(t,e==null||$T.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Gt("Dom",{data:function(t,e,n){if(t==null)return this.data(ES(function(s,i){let o;const r=s.length,a=[];for(o=0;o<r;o++)i(s[o])&&a.push(s[o]);return a}(this.node.attributes,s=>s.nodeName.indexOf("data-")===0),s=>s.nodeName.slice(5)));if(t instanceof Array){const s={};for(const i of t)s[i]=this.data(i);return s}if(typeof t=="object")for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch{return this.attr("data-"+t)}else this.attr("data-"+t,e===null?null:n===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),Gt("Dom",{remember:function(t,e){if(typeof arguments[0]=="object")for(const n in t)this.remember(n,t[n]);else{if(arguments.length===1)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class In{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof In||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",n){const{random:s,round:i,sin:o,PI:r}=Math;if(e==="vibrant"){const a=24*s()+57,l=38*s()+45,c=360*s();return new In(a,l,c,"lch")}if(e==="sine"){const a=i(80*o(2*r*(n=n??s())/.5+.01)+150),l=i(50*o(2*r*n/.5+4.6)+200),c=i(100*o(2*r*n/.5+2.3)+150);return new In(a,l,c)}if(e==="pastel"){const a=8*s()+86,l=17*s()+9,c=360*s();return new In(a,l,c,"lch")}if(e==="dark"){const a=10+10*s(),l=50*s()+86,c=360*s();return new In(a,l,c,"lch")}if(e==="rgb"){const a=255*s(),l=255*s(),c=255*s();return new In(a,l,c)}if(e==="lab"){const a=100*s(),l=256*s()-128,c=256*s()-128;return new In(a,l,c,"lab")}if(e==="grey"){const a=255*s();return new In(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(CT.test(e)||ST.test(e))}cmyk(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(l=>l/255),a=Math.min(1-i,1-o,1-r);return a===1?new In(0,0,0,1,"cmyk"):new In((1-i-a)/(1-a),(1-o-a)/(1-a),(1-r-a)/(1-a),a,"cmyk")}hsl(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(h=>h/255),a=Math.max(i,o,r),l=Math.min(i,o,r),c=(a+l)/2,u=a===l,d=a-l;return new In(360*(u?0:a===i?((o-r)/d+(o<r?6:0))/6:a===o?((r-i)/d+2)/6:a===r?((i-o)/d+4)/6:0),100*(u?0:c>.5?d/(2-a-l):d/(a+l)),100*c,"hsl")}init(e=0,n=0,s=0,i=0,o="rgb"){if(e=e||0,this.space)for(const d in this.space)delete this[this.space[d]];if(typeof e=="number")o=typeof i=="string"?i:o,i=typeof i=="string"?0:i,Object.assign(this,{_a:e,_b:n,_c:s,_d:i,space:o});else if(e instanceof Array)this.space=n||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const d=function(h,f){const p=ch(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:ch(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:ch(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:ch(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:ch(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:ch(h,"cmyk")?{_a:h.c,_b:h.m,_c:h.y,_d:h.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return p.space=f||p.space,p}(e,n);Object.assign(this,d)}else if(typeof e=="string")if(ST.test(e)){const d=e.replace(S0t,""),[h,f,p]=x0t.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!CT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=w0t.exec(function(m){return m.length===4?["#",m.substring(1,2),m.substring(1,2),m.substring(2,3),m.substring(2,3),m.substring(3,4),m.substring(3,4)].join(""):m}(e)).map(d);Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}}const{_a:r,_b:a,_c:l,_d:c}=this,u=this.space==="rgb"?{r,g:a,b:l}:this.space==="xyz"?{x:r,y:a,z:l}:this.space==="hsl"?{h:r,s:a,l}:this.space==="lab"?{l:r,a,b:l}:this.space==="lch"?{l:r,c:a,h:l}:this.space==="cmyk"?{c:r,m:a,y:l,k:c}:{};Object.assign(this,u)}lab(){const{x:e,y:n,z:s}=this.xyz();return new In(116*n-16,500*(e-n),200*(n-s),"lab")}lch(){const{l:e,a:n,b:s}=this.lab(),i=Math.sqrt(n**2+s**2);let o=180*Math.atan2(s,n)/Math.PI;return o<0&&(o*=-1,o=360-o),new In(e,i,o,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:n,y:s,z:i}=this;if(this.space==="lab"||this.space==="lch"){let{l:f,a:p,b:m}=this;if(this.space==="lch"){const{c:E,h:P}=this,T=Math.PI/180;p=E*Math.cos(T*P),m=E*Math.sin(T*P)}const b=(f+16)/116,_=p/500+b,x=b-m/200,k=16/116,C=.008856,S=7.787;n=.95047*(_**3>C?_**3:(_-k)/S),s=1*(b**3>C?b**3:(b-k)/S),i=1.08883*(x**3>C?x**3:(x-k)/S)}const o=3.2406*n+-1.5372*s+-.4986*i,r=-.9689*n+1.8758*s+.0415*i,a=.0557*n+-.204*s+1.057*i,l=Math.pow,c=.0031308,u=o>c?1.055*l(o,1/2.4)-.055:12.92*o,d=r>c?1.055*l(r,1/2.4)-.055:12.92*r,h=a>c?1.055*l(a,1/2.4)-.055:12.92*a;return new In(255*u,255*d,255*h)}if(this.space==="hsl"){let{h:n,s,l:i}=this;if(n/=360,s/=100,i/=100,s===0)return i*=255,new In(i,i,i);const o=i<.5?i*(1+s):i+s-i*s,r=2*i-o,a=255*z3(r,o,n+1/3),l=255*z3(r,o,n),c=255*z3(r,o,n-1/3);return new In(a,l,c)}if(this.space==="cmyk"){const{c:n,m:s,y:i,k:o}=this,r=255*(1-Math.min(1,n*(1-o)+o)),a=255*(1-Math.min(1,s*(1-o)+o)),l=255*(1-Math.min(1,i*(1-o)+o));return new In(r,a,l)}return this;var e}toArray(){const{_a:e,_b:n,_c:s,_d:i,space:o}=this;return[e,n,s,i,o]}toHex(){const[e,n,s]=this._clamped().map(A0t);return`#${e}${n}${s}`}toRgb(){const[e,n,s]=this._clamped();return`rgb(${e},${n},${s})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(b=>b/255),a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=(.4124*a+.3576*l+.1805*c)/.95047,d=(.2126*a+.7152*l+.0722*c)/1,h=(.0193*a+.1192*l+.9505*c)/1.08883,f=u>.008856?Math.pow(u,1/3):7.787*u+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116,m=h>.008856?Math.pow(h,1/3):7.787*h+16/116;return new In(f,p,m,"xyz")}_clamped(){const{_a:e,_b:n,_c:s}=this.rgb(),{max:i,min:o,round:r}=Math;return[e,n,s].map(a=>i(0,o(r(a),255)))}}let On=class OU{constructor(...e){this.init(...e)}clone(){return new OU(this)}init(e,n){const o=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:n};return this.x=o.x==null?0:o.x,this.y=o.y==null?0:o.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){sn.isMatrixLike(e)||(e=new sn(e));const{x:n,y:s}=this;return this.x=e.a*n+e.c*s+e.e,this.y=e.b*n+e.d*s+e.f,this}};function uh(t,e,n){return Math.abs(e-t)<(n||1e-6)}let sn=class Is{constructor(...e){this.init(...e)}static formatTransforms(e){const n=e.flip==="both"||e.flip===!0,s=e.flip&&(n||e.flip==="x")?-1:1,i=e.flip&&(n||e.flip==="y")?-1:1,o=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,r=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*s:isFinite(e.scale)?e.scale*s:isFinite(e.scaleX)?e.scaleX*s:s,l=e.scale&&e.scale.length?e.scale[1]*i:isFinite(e.scale)?e.scale*i:isFinite(e.scaleY)?e.scaleY*i:i,c=e.shear||0,u=e.rotate||e.theta||0,d=new On(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=d.x,f=d.y,p=new On(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,b=p.y,_=new On(e.translate||e.tx||e.translateX,e.ty||e.translateY),x=_.x,k=_.y,C=new On(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:a,scaleY:l,skewX:o,skewY:r,shear:c,theta:u,rx:C.x,ry:C.y,tx:x,ty:k,ox:h,oy:f,px:m,py:b}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,n,s){const i=e.a*n.a+e.c*n.b,o=e.b*n.a+e.d*n.b,r=e.a*n.c+e.c*n.d,a=e.b*n.c+e.d*n.d,l=e.e+e.a*n.e+e.c*n.f,c=e.f+e.b*n.e+e.d*n.f;return s.a=i,s.b=o,s.c=r,s.d=a,s.e=l,s.f=c,s}around(e,n,s){return this.clone().aroundO(e,n,s)}aroundO(e,n,s){const i=e||0,o=n||0;return this.translateO(-i,-o).lmultiplyO(s).translateO(i,o)}clone(){return new Is(this)}decompose(e=0,n=0){const s=this.a,i=this.b,o=this.c,r=this.d,a=this.e,l=this.f,c=s*r-i*o,u=c>0?1:-1,d=u*Math.sqrt(s*s+i*i),h=Math.atan2(u*i,u*s),f=180/Math.PI*h,p=Math.cos(h),m=Math.sin(h),b=(s*o+i*r)/c,_=o*d/(b*s-i)||r*d/(b*i+s);return{scaleX:d,scaleY:_,shear:b,rotate:f,translateX:a-e+e*p*d+n*(b*p*d-m*_),translateY:l-n+e*m*d+n*(b*m*d+p*_),originX:e,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const n=new Is(e);return uh(this.a,n.a)&&uh(this.b,n.b)&&uh(this.c,n.c)&&uh(this.d,n.d)&&uh(this.e,n.e)&&uh(this.f,n.f)}flip(e,n){return this.clone().flipO(e,n)}flipO(e,n){return e==="x"?this.scaleO(-1,1,n,0):e==="y"?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,e,n||e)}init(e){const n=Is.fromArray([1,0,0,1,0,0]);return e=e instanceof di?e.matrixify():typeof e=="string"?Is.fromArray(e.split(Tl).map(parseFloat)):Array.isArray(e)?Is.fromArray(e):typeof e=="object"&&Is.isMatrixLike(e)?e:typeof e=="object"?new Is().transform(e):arguments.length===6?Is.fromArray([].slice.call(arguments)):n,this.a=e.a!=null?e.a:n.a,this.b=e.b!=null?e.b:n.b,this.c=e.c!=null?e.c:n.c,this.d=e.d!=null?e.d:n.d,this.e=e.e!=null?e.e:n.e,this.f=e.f!=null?e.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,n=this.b,s=this.c,i=this.d,o=this.e,r=this.f,a=e*i-n*s;if(!a)throw new Error("Cannot invert "+this);const l=i/a,c=-n/a,u=-s/a,d=e/a,h=-(l*o+u*r),f=-(c*o+d*r);return this.a=l,this.b=c,this.c=u,this.d=d,this.e=h,this.f=f,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const n=e instanceof Is?e:new Is(e);return Is.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof Is?e:new Is(e);return Is.matrixMultiply(this,n,this)}rotate(e,n,s){return this.clone().rotateO(e,n,s)}rotateO(e,n=0,s=0){e=F3(e);const i=Math.cos(e),o=Math.sin(e),{a:r,b:a,c:l,d:c,e:u,f:d}=this;return this.a=r*i-a*o,this.b=a*i+r*o,this.c=l*i-c*o,this.d=c*i+l*o,this.e=u*i-d*o+s*o-n*i+n,this.f=d*i+u*o-n*o-s*i+s,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,n=e,s=0,i=0){arguments.length===3&&(i=s,s=n,n=e);const{a:o,b:r,c:a,d:l,e:c,f:u}=this;return this.a=o*e,this.b=r*n,this.c=a*e,this.d=l*n,this.e=c*e-s*e+s,this.f=u*n-i*n+i,this}shear(e,n,s){return this.clone().shearO(e,n,s)}shearO(e,n=0,s=0){const{a:i,b:o,c:r,d:a,e:l,f:c}=this;return this.a=i+o*e,this.c=r+a*e,this.e=l+c*e-s*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,n=e,s=0,i=0){arguments.length===3&&(i=s,s=n,n=e),e=F3(e),n=F3(n);const o=Math.tan(e),r=Math.tan(n),{a,b:l,c,d:u,e:d,f:h}=this;return this.a=a+l*o,this.b=l+a*r,this.c=c+u*o,this.d=u+c*r,this.e=d+h*o-i*o,this.f=h+d*r-s*r,this}skewX(e,n,s){return this.skew(e,0,n,s)}skewY(e,n,s){return this.skew(0,e,n,s)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Is.isMatrixLike(e))return new Is(e).multiplyO(this);const n=Is.formatTransforms(e),{x:s,y:i}=new On(n.ox,n.oy).transform(this),o=new Is().translateO(n.rx,n.ry).lmultiplyO(this).translateO(-s,-i).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(s,i);if(isFinite(n.px)||isFinite(n.py)){const r=new On(s,i).transform(o),a=isFinite(n.px)?n.px-r.x:0,l=isFinite(n.py)?n.py-r.y:0;o.translateO(a,l)}return o.translateO(n.tx,n.ty),o}translate(e,n){return this.clone().translateO(e,n)}translateO(e,n){return this.e+=e||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function fc(){if(!fc.nodes){const t=Ni().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;fc.nodes={svg:t,path:e}}if(!fc.nodes.svg.node.parentNode){const t=mn.document.body||mn.document.documentElement;fc.nodes.svg.addTo(t)}return fc.nodes}function DU(t){return!(t.width||t.height||t.x||t.y)}vn(sn,"Matrix");let Hs=class by{constructor(...e){this.init(...e)}addOffset(){return this.x+=mn.window.pageXOffset,this.y+=mn.window.pageYOffset,new by(this)}init(e){return e=typeof e=="string"?e.split(Tl).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return DU(this)}merge(e){const n=Math.min(this.x,e.x),s=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width)-n,o=Math.max(this.y+this.height,e.y+e.height)-s;return new by(n,s,i,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof sn||(e=new sn(e));let n=1/0,s=-1/0,i=1/0,o=-1/0;return[new On(this.x,this.y),new On(this.x2,this.y),new On(this.x,this.y2),new On(this.x2,this.y2)].forEach(function(r){r=r.transform(e),n=Math.min(n,r.x),s=Math.max(s,r.x),i=Math.min(i,r.y),o=Math.max(o,r.y)}),new by(n,i,s-n,o-i)}};function ET(t,e,n){let s;try{if(s=e(t.node),DU(s)&&(i=t.node)!==mn.document&&!(mn.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===mn.document}).call(mn.document.documentElement,i))throw new Error("Element not in the dom")}catch{s=n(t)}var i;return s}Gt({viewbox:{viewbox(t,e,n,s){return t==null?new Hs(this.attr("viewBox")):this.attr("viewBox",new Hs(t,e,n,s))},zoom(t,e){let{width:n,height:s}=this.attr(["width","height"]);if((n||s)&&typeof n!="string"&&typeof s!="string"||(n=this.node.clientWidth,s=this.node.clientHeight),!n||!s)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),o=n/i.width,r=s/i.height,a=Math.min(o,r);if(t==null)return a;let l=a/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new On(n/2/o+i.x,s/2/r+i.y);const c=new Hs(i).transform(new sn({scale:l,origin:e}));return this.viewbox(c)}}}),vn(Hs,"Box");let bd=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};$t([bd],{each(t,...e){return typeof t=="function"?this.map((n,s,i)=>t.call(n,n,s,i)):this.map(n=>n[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const E0t=["toArray","constructor","each"];function Gd(t,e){return new bd(ES((e||mn.document).querySelectorAll(t),function(n){return Qo(n)}))}bd.extend=function(t){t=t.reduce((e,n)=>(E0t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...s){return this.each(n,...s)}),e),{}),$t([bd],t)};let M0t=0;const RU={};function VU(t){let e=t.getEventHolder();return e===mn.window&&(e=RU),e.events||(e.events={}),e.events}function LS(t){return t.getEventTarget()}function rl(t,e,n,s,i){const o=n.bind(s||t),r=Ni(t),a=VU(r),l=LS(r);e=Array.isArray(e)?e:e.split(Tl),n._svgjsListenerId||(n._svgjsListenerId=++M0t),e.forEach(function(c){const u=c.split(".")[0],d=c.split(".")[1]||"*";a[u]=a[u]||{},a[u][d]=a[u][d]||{},a[u][d][n._svgjsListenerId]=o,l.addEventListener(u,o,i||!1)})}function ar(t,e,n,s){const i=Ni(t),o=VU(i),r=LS(i);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Tl)).forEach(function(a){const l=a&&a.split(".")[0],c=a&&a.split(".")[1];let u,d;if(n)o[l]&&o[l][c||"*"]&&(r.removeEventListener(l,o[l][c||"*"][n],s||!1),delete o[l][c||"*"][n]);else if(l&&c){if(o[l]&&o[l][c]){for(d in o[l][c])ar(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&ar(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])ar(r,[l,u].join("."));delete o[l]}}else{for(a in o)ar(r,a);(function(h){let f=h.getEventHolder();f===mn.window&&(f=RU),f.events&&(f.events={})})(i)}})}class yv extends TS{addEventListener(){}dispatch(e,n,s){return function(i,o,r,a){const l=LS(i);return o instanceof mn.window.Event||(o=new mn.window.CustomEvent(o,{detail:r,cancelable:!0,...a})),l.dispatchEvent(o),o}(this,e,n,s)}dispatchEvent(e){const n=this.getEventHolder().events;if(!n)return!0;const s=n[e.type];for(const i in s)for(const o in s[i])s[i][o](e);return!e.defaultPrevented}fire(e,n,s){return this.dispatch(e,n,s),this}getEventHolder(){return this}getEventTarget(){return this}off(e,n,s){return ar(this,e,n,s),this}on(e,n,s,i){return rl(this,e,n,s,i),this}removeEventListener(){}}function MT(){}vn(yv,"EventTarget");const H3=400,T0t=">",P0t=0,I0t={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class _d extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Tl).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class Bt{constructor(...e){this.init(...e)}convert(e){return new Bt(this.value,e)}divide(e){return e=new Bt(e),new Bt(this/e,this.unit||e.unit)}init(e,n){return n=Array.isArray(e)?e[1]:n,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=n||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(n=e.match(LU))&&(this.value=parseFloat(n[1]),n[5]==="%"?this.value/=100:n[5]==="s"&&(this.value*=1e3),this.unit=n[5]):e instanceof Bt&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Bt(e),new Bt(this-e,this.unit||e.unit)}plus(e){return e=new Bt(e),new Bt(this+e,this.unit||e.unit)}times(e){return e=new Bt(e),new Bt(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const L0t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),FU=[];class Bc extends yv{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=Ni(e)).removeNamespace&&this.node instanceof mn.window.SVGElement&&e.removeNamespace(),n==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[n]&&this.node.insertBefore(e.node,this.node.childNodes[n]),this}addTo(e,n){return Ni(e).put(this,n)}children(){return new bd(ES(this.node.children,function(e){return Qo(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,n=!0){this.writeDataToDom();let s=this.node.cloneNode(e);return n&&(s=IU(s)),new this.constructor(s)}each(e,n){const s=this.children();let i,o;for(i=0,o=s.length;i<o;i++)e.apply(s[i],[i,s]),n&&s[i].each(e,n);return this}element(e,n){return this.put(new Bc(p1(e),n))}first(){return Qo(this.node.firstChild)}get(e){return Qo(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,n){return this.xml(e,n,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=PU(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Qo(this.node.lastChild)}matches(e){const n=this.node,s=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return s&&s.call(n,e)}parent(e){let n=this;if(!n.node.parentNode)return null;if(n=Qo(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=Qo(n.node.parentNode));return n}put(e,n){return e=Ni(e),this.add(e,n),e}putIn(e,n){return Ni(e).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Ni(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,n=null){const s=10**e,i=this.attr(n);for(const o in i)typeof i[o]=="number"&&(i[o]=Math.round(i[o]*s)/s);return this.attr(i),this}svg(e,n){return this.xml(e,n,MS)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const n=this.parent();if(!n)return this.addTo(e);const s=n.index(this);return n.put(e,s).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,n,s){if(typeof e=="boolean"&&(s=n,n=e,e=null),e==null||typeof e=="function"){n=n==null||n,this.writeDataToDom();let a=this;if(e!=null){if(a=Qo(a.node.cloneNode(!0)),n){const l=e(a);if(a=l||a,l===!1)return""}a.each(function(){const l=e(this),c=l||this;l===!1?this.remove():l&&this!==c&&this.replace(c)},!0)}return n?a.node.outerHTML:a.node.innerHTML}n=n!=null&&n;const i=p1("wrapper",s),o=mn.document.createDocumentFragment();i.innerHTML=e;for(let a=i.children.length;a--;)o.appendChild(i.firstElementChild);const r=this.parent();return n?this.replace(o)&&r:this.add(o)}}$t(Bc,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const s of e)t[s.nodeName]=AT.test(s.nodeValue)?parseFloat(s.nodeValue):s.nodeValue;return t}if(t instanceof Array)return t.reduce((s,i)=>(s[i]=this.attr(i),s),{});if(typeof t=="object"&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(e===null)this.node.removeAttribute(t);else{if(e==null)return(e=this.node.getAttribute(t))==null?I0t[t]:AT.test(e)?parseFloat(e):e;typeof(e=FU.reduce((s,i)=>i(t,s,this),e))=="number"?e=new Bt(e):L0t.has(t)&&In.isColor(e)?e=new In(e):e.constructor===Array&&(e=new _d(e)),t==="leading"?this.leading&&this.leading(e):typeof n=="string"?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||t!=="font-size"&&t!=="x"||this.rebuild()}return this},find:function(t){return Gd(t,this.node)},findOne:function(t){return Qo(this.node.querySelector(t))}}),vn(Bc,"Dom");let di=class extends Bc{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return t==null?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return t==null?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Bt(t).plus(this.x()))}dy(t=0){return this.y(new Bt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e=typeof t=="string";e||(t=Ni(t));const n=new bd;let s=this;for(;(s=s.parent())&&s.node!==mn.document&&s.nodeName!=="#document-fragment"&&(n.push(s),e||s.node!==t.node)&&(!e||!s.matches(t));)if(s.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(k0t);return e?Ni(e[1]):null}root(){const t=this.parent(function(e){return td[e]}(PS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Ip(this,t,e);return this.width(new Bt(n.width)).height(new Bt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return TU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};$t(di,{bbox:function(){const t=ET(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(fc().svg).show(),s=n.node.getBBox();return n.remove(),s}catch(n){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${n.toString()}`)}});return new Hs(t)},rbox:function(t){const e=ET(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),n=new Hs(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new On(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new sn(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new sn(e)}return new sn(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new sn}}}),vn(di,"Element");const Zp={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return e==="color"?t:t+"-"+e}};["fill","stroke"].forEach(function(t){const e={};let n;e[t]=function(s){if(s===void 0)return this.attr(t);if(typeof s=="string"||s instanceof In||In.isRgb(s)||s instanceof di)this.attr(t,s);else for(n=Zp[t].length-1;n>=0;n--)s[Zp[t][n]]!=null&&this.attr(Zp.prefix(t,Zp[t][n]),s[Zp[t][n]]);return this},Gt(["Element","Runner"],e)}),Gt(["Element","Runner"],{matrix:function(t,e,n,s,i,o){return t==null?new sn(this):this.attr("transform",new sn(t,e,n,s,i,o))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,s){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:s},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,s){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:s},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return"xybothtrue".indexOf(t)===-1&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),Gt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Bt(t)):this.rx(t).ry(e)}}),Gt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new On(this.node.getPointAtLength(t))}}),Gt(["Element","Runner"],{font:function(t,e){if(typeof t=="object"){for(e in t)this.font(e,t[e]);return this}return t==="leading"?this.leading(e):t==="anchor"?this.attr("text-anchor",e):t==="size"||t==="family"||t==="weight"||t==="stretch"||t==="variant"||t==="style"?this.attr("font-"+t,e):this.attr(t,e)}});Gt("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(t,e){return t[e]=function(n){return n===null?this.off(e):this.on(e,n),this},t},{})),Gt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(C0t).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(Tl).map(function(s){return parseFloat(s)})]}).reverse().reduce(function(e,n){return n[0]==="matrix"?e.lmultiply(sn.fromArray(n[1])):e[n[0]].apply(e,n[1])},new sn)},toParent:function(t,e){if(this===t)return this;if(V6(this.node))return this.addTo(t,e);const n=this.screenCTM(),s=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(s.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const s=new sn(this).decompose();return t==null?s:s[t]}sn.isMatrixLike(t)||(t={...t,origin:R6(t,this)});const n=new sn(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Ki extends di{flatten(){return this.each(function(){if(this instanceof Ki)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),n=e.index(this)){return n=n===-1?e.children().length:n,this.each(function(s,i){return i[i.length-s-1].toParent(e,n)}),this.remove()}}vn(Ki,"Container");class Y2 extends Ki{constructor(e,n=e){super(Fn("defs",e),n)}flatten(){return this}ungroup(){return this}}vn(Y2,"Defs");class jo extends di{}function OS(t){return this.attr("rx",t)}function DS(t){return this.attr("ry",t)}function NU(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function BU(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function zU(t){return this.attr("cx",t)}function HU(t){return this.attr("cy",t)}function UU(t){return t==null?2*this.rx():this.rx(new Bt(t).divide(2))}function jU(t){return t==null?2*this.ry():this.ry(new Bt(t).divide(2))}vn(jo,"Shape");var O0t=Object.freeze({__proto__:null,cx:zU,cy:HU,height:jU,rx:OS,ry:DS,width:UU,x:NU,y:BU});class _y extends jo{constructor(e,n=e){super(Fn("ellipse",e),n)}size(e,n){const s=Ip(this,e,n);return this.rx(new Bt(s.width).divide(2)).ry(new Bt(s.height).divide(2))}}$t(_y,O0t),Gt("Container",{ellipse:Vn(function(t=0,e=t){return this.put(new _y).size(t,e).move(0,0)})}),vn(_y,"Ellipse");class WU extends Bc{constructor(e=mn.document.createDocumentFragment()){super(e)}xml(e,n,s){if(typeof e=="boolean"&&(s=n,n=e,e=null),e==null||typeof e=="function"){const i=new Bc(p1("wrapper",s));return i.add(this.node.cloneNode(!0)),i.xml(!1,s)}return super.xml(e,!1,s)}}function YU(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Bt(t),fy:new Bt(e)}):this.attr({x1:new Bt(t),y1:new Bt(e)})}function qU(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Bt(t),cy:new Bt(e)}):this.attr({x2:new Bt(t),y2:new Bt(e)})}vn(WU,"Fragment");var D0t=Object.freeze({__proto__:null,from:YU,to:qU});class mg extends Ki{constructor(e,n){super(Fn(e+"Gradient",typeof e=="string"?null:e),n)}attr(e,n,s){return e==="transform"&&(e="gradientTransform"),super.attr(e,n,s)}bbox(){return new Hs}targets(){return Gd("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}$t(mg,D0t),Gt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Vn(function(t,e){return this.put(new mg(t)).update(e)})}}),vn(mg,"Gradient");class m1 extends Ki{constructor(e,n=e){super(Fn("pattern",e),n)}attr(e,n,s){return e==="transform"&&(e="patternTransform"),super.attr(e,n,s)}bbox(){return new Hs}targets(){return Gd("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Gt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Vn(function(t,e,n){return this.put(new m1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),vn(m1,"Pattern");let wy=class extends jo{constructor(t,e=t){super(Fn("image",t),e)}load(t,e){if(!t)return this;const n=new mn.window.Image;return rl(n,"load",function(s){const i=this.parent(m1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),i instanceof m1&&i.width()===0&&i.height()===0&&i.size(this.width(),this.height()),typeof e=="function"&&e.call(this,s)},this),rl(n,"load error",function(){ar(n)}),this.attr("href",n.src=t,Lp)}};var TT;TT=function(t,e,n){return t!=="fill"&&t!=="stroke"||$0t.test(e)&&(e=n.root().defs().image(e)),e instanceof wy&&(e=n.root().defs().pattern(0,0,s=>{s.add(e)})),e},FU.push(TT),Gt({Container:{image:Vn(function(t,e){return this.put(new wy).size(0,0).load(t,e)})}}),vn(wy,"Image");class zc extends _d{bbox(){let e=-1/0,n=-1/0,s=1/0,i=1/0;return this.forEach(function(o){e=Math.max(o[0],e),n=Math.max(o[1],n),s=Math.min(o[0],s),i=Math.min(o[1],i)}),new Hs(s,i,e-s,n-i)}move(e,n){const s=this.bbox();if(e-=s.x,n-=s.y,!isNaN(e)&&!isNaN(n))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+e,this[i][1]+n];return this}parse(e=[0,0]){const n=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Tl).map(parseFloat)).length%2!=0&&e.pop();for(let s=0,i=e.length;s<i;s+=2)n.push([e[s],e[s+1]]);return n}size(e,n){let s;const i=this.bbox();for(s=this.length-1;s>=0;s--)i.width&&(this[s][0]=(this[s][0]-i.x)*e/i.width+i.x),i.height&&(this[s][1]=(this[s][1]-i.y)*n/i.height+i.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let n=0,s=this.length;n<s;n++)e.push(this[n].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){sn.isMatrixLike(e)||(e=new sn(e));for(let n=this.length;n--;){const[s,i]=this[n];this[n][0]=e.a*s+e.c*i+e.e,this[n][1]=e.b*s+e.d*i+e.f}return this}}const R0t=zc;var RS=Object.freeze({__proto__:null,MorphArray:R0t,height:function(t){const e=this.bbox();return t==null?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return t==null?e.width:this.size(t,e.height)},x:function(t){return t==null?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return t==null?this.bbox().y:this.move(this.bbox().x,t)}});let Du=class extends jo{constructor(t,e=t){super(Fn("line",t),e)}array(){return new zc([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,s){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:n,y2:s}:new zc(t).toLine(),this.attr(t))}size(t,e){const n=Ip(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};$t(Du,RS),Gt({Container:{line:Vn(function(...t){return Du.prototype.plot.apply(this.put(new Du),t[0]!=null?t:[0,0,0,0])})}}),vn(Du,"Line");let xy=class extends Ki{constructor(t,e=t){super(Fn("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function Uh(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}Gt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Vn(function(t,e,n){return this.put(new xy).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker(t,e,n,s){let i=["marker"];return t!=="all"&&i.push(t),i=i.join("-"),t=arguments[1]instanceof xy?arguments[1]:this.defs().marker(e,n,s),this.attr(i,t)}}}),vn(xy,"Marker");const V0t={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,s){return function(i){return i<0?t>0?e/t*i:n>0?s/n*i:0:i>1?n<1?(1-s)/(1-n)*i+(s-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*s+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return e==="none"?--n:e==="both"&&++n,(s,i=!1)=>{let o=Math.floor(s*t);const r=s*o%1==0;return e!=="start"&&e!=="both"||++o,i&&r&&--o,s>=0&&o<0&&(o=0),s<=1&&o>n&&(o=n),o/n}}};class VS{done(){return!1}}class F6 extends VS{constructor(e=T0t){super(),this.ease=V0t[e]||e}step(e,n,s){return typeof e!="number"?s<1?e:n:e+(n-e)*this.ease(s)}}class Zb extends VS{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,s,i){return this.stepper(e,n,s,i)}}function PT(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,s=Math.log(e/100+1e-10),i=-s/Math.sqrt(n*n+s*s),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}$t(class extends Zb{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,s){if(typeof t=="string")return t;if(s.done=n===1/0,n===1/0)return e;if(n===0)return t;n>100&&(n=16),n/=1e3;const i=s.velocity||0,o=-this.d*i-this.k*(t-e),r=t+i*n+o*n*n/2;return s.velocity=i+o*n,s.done=Math.abs(e-r)+Math.abs(i)<.002,s.done?e:r}},{duration:Uh("_duration",PT),overshoot:Uh("_overshoot",PT)});$t(class extends Zb{constructor(t=.1,e=.01,n=0,s=1e3){super(),this.p(t).i(e).d(n).windup(s)}step(t,e,n,s){if(typeof t=="string")return t;if(s.done=n===1/0,n===1/0)return e;if(n===0)return t;const i=e-t;let o=(s.integral||0)+i*n;const r=(i-(s.error||0))/n,a=this._windup;return a!==!1&&(o=Math.max(-a,Math.min(o,a))),s.error=i,s.integral=o,s.done=Math.abs(i)<.001,s.done?e:t+(this.P*i+this.I*o+this.D*r)}},{windup:Uh("_windup"),p:Uh("P"),i:Uh("I"),d:Uh("D")});const F0t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},N6={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},U3="mlhvqtcsaz".split("");for(let t=0,e=U3.length;t<e;++t)N6[U3[t]]=function(n){return function(s,i,o){if(n==="H")s[0]=s[0]+i.x;else if(n==="V")s[0]=s[0]+i.y;else if(n==="A")s[5]=s[5]+i.x,s[6]=s[6]+i.y;else for(let r=0,a=s.length;r<a;++r)s[r]=s[r]+(r%2?i.y:i.x);return N6[n](s,i,o)}}(U3[t].toUpperCase());function B6(t){return t.segment.length&&t.segment.length-1===F0t[t.segment[0].toUpperCase()]}function N0t(t,e){t.inNumber&&_u(t,!1);const n=IS.test(e);if(n)t.segment=[e];else{const s=t.lastCommand,i=s.toLowerCase(),o=s===i;t.segment=[i==="m"?o?"l":"L":s]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function _u(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,B6(t)&&z6(t)}function z6(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return N6[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function B0t(t){if(!t.segment.length)return!1;const e=t.segment[0].toUpperCase()==="A",n=t.segment.length;return e&&(n===4||n===5)}function z0t(t){return t.lastToken.toUpperCase()==="E"}const H0t=new Set([" ",","," ",`
141 `,"\r","\f"]);class Mr extends _d{bbox(){return fc().path.setAttribute("d",this.toString()),new Hs(fc.nodes.path.getBBox())}move(e,n){const s=this.bbox();if(e-=s.x,n-=s.y,!isNaN(e)&&!isNaN(n))for(let i,o=this.length-1;o>=0;o--)i=this[o][0],i==="M"||i==="L"||i==="T"?(this[o][1]+=e,this[o][2]+=n):i==="H"?this[o][1]+=e:i==="V"?this[o][1]+=n:i==="C"||i==="S"||i==="Q"?(this[o][1]+=e,this[o][2]+=n,this[o][3]+=e,this[o][4]+=n,i==="C"&&(this[o][5]+=e,this[o][6]+=n)):i==="A"&&(this[o][6]+=e,this[o][7]+=n);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(n,s=!0){let i=0,o="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:s,p0:new On,p:new On};for(;r.lastToken=o,o=n.charAt(i++);)if(r.inSegment||!N0t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(H0t.has(o))r.inNumber&&_u(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(IS.test(o)){if(r.inNumber)_u(r,!1);else{if(!B6(r))throw new Error("parser Error");z6(r)}--i}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!z0t(r)){_u(r,!1),--i;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||B0t(r)){r.inNumber=!0,r.number=o,_u(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){_u(r,!1),--i;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&_u(r,!1),r.inSegment&&B6(r)&&z6(r),r.segments}(e)}size(e,n){const s=this.bbox();let i,o;for(s.width=s.width===0?1:s.width,s.height=s.height===0?1:s.height,i=this.length-1;i>=0;i--)o=this[i][0],o==="M"||o==="L"||o==="T"?(this[i][1]=(this[i][1]-s.x)*e/s.width+s.x,this[i][2]=(this[i][2]-s.y)*n/s.height+s.y):o==="H"?this[i][1]=(this[i][1]-s.x)*e/s.width+s.x:o==="V"?this[i][1]=(this[i][1]-s.y)*n/s.height+s.y:o==="C"||o==="S"||o==="Q"?(this[i][1]=(this[i][1]-s.x)*e/s.width+s.x,this[i][2]=(this[i][2]-s.y)*n/s.height+s.y,this[i][3]=(this[i][3]-s.x)*e/s.width+s.x,this[i][4]=(this[i][4]-s.y)*n/s.height+s.y,o==="C"&&(this[i][5]=(this[i][5]-s.x)*e/s.width+s.x,this[i][6]=(this[i][6]-s.y)*n/s.height+s.y)):o==="A"&&(this[i][1]=this[i][1]*e/s.width,this[i][2]=this[i][2]*n/s.height,this[i][6]=(this[i][6]-s.x)*e/s.width+s.x,this[i][7]=(this[i][7]-s.y)*n/s.height+s.y);return this}toString(){return function(e){let n="";for(let s=0,i=e.length;s<i;s++)n+=e[s][0],e[s][1]!=null&&(n+=e[s][1],e[s][2]!=null&&(n+=" ",n+=e[s][2],e[s][3]!=null&&(n+=" ",n+=e[s][3],n+=" ",n+=e[s][4],e[s][5]!=null&&(n+=" ",n+=e[s][5],n+=" ",n+=e[s][6],e[s][7]!=null&&(n+=" ",n+=e[s][7])))));return n+" "}(this)}}const GU=t=>{const e=typeof t;return e==="number"?Bt:e==="string"?In.isColor(t)?In:Tl.test(t)?IS.test(t)?Mr:_d:LU.test(t)?Bt:H6:U6.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_d:e==="object"?g1:H6};class wu{constructor(e){this._stepper=e||new F6("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,n){return e&&n},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(GU(e));let n=new this._type(e);return this._type===In&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===g1&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map(function(s){return s.done=!0,s}),n}}class H6{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class bv{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,bv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}bv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const U0t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class g1{constructor(...e){this.init(...e)}align(e){const n=this.values;for(let s=0,i=n.length;s<i;++s){if(n[s+1]===e[s+1]){if(n[s+1]===In&&e[s+7]!==n[s+7]){const a=e[s+7],l=new In(this.values.splice(s+3,5))[a]().toArray();this.values.splice(s+3,0,...l)}s+=n[s+2]+2;continue}if(!e[s+1])return this;const o=new e[s+1]().toArray(),r=n[s+2]+3;n.splice(s,r,e[s],e[s+1],e[s+2],...o),s+=n[s+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const n=[];for(const s in e){const i=GU(e[s]),o=new i(e[s]).toArray();n.push([s,i,o.length,...o])}return n.sort(U0t),this.values=n.reduce((s,i)=>s.concat(i),[]),this}toArray(){return this.values}valueOf(){const e={},n=this.values;for(;n.length;){const s=n.shift(),i=n.shift(),o=n.shift(),r=n.splice(0,o);e[s]=new i(r)}return e}}const U6=[H6,bv,g1];class pf extends jo{constructor(e,n=e){super(Fn("path",e),n)}array(){return this._array||(this._array=new Mr(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,n){return this.attr("d",this.array().move(e,n))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new Mr(e))}size(e,n){const s=Ip(this,e,n);return this.attr("d",this.array().size(s.width,s.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}pf.prototype.MorphArray=Mr,Gt({Container:{path:Vn(function(t){return this.put(new pf).plot(t||new Mr)})}}),vn(pf,"Path");var XU=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new zc(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return t==null?this.array():this.clear().attr("points",typeof t=="string"?t:this._array=new zc(t))},size:function(t,e){const n=Ip(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class Ru extends jo{constructor(e,n=e){super(Fn("polygon",e),n)}}Gt({Container:{polygon:Vn(function(t){return this.put(new Ru).plot(t||new zc)})}}),$t(Ru,RS),$t(Ru,XU),vn(Ru,"Polygon");class Vu extends jo{constructor(e,n=e){super(Fn("polyline",e),n)}}Gt({Container:{polyline:Vn(function(t){return this.put(new Vu).plot(t||new zc)})}}),$t(Vu,RS),$t(Vu,XU),vn(Vu,"Polyline");class ky extends jo{constructor(e,n=e){super(Fn("rect",e),n)}}$t(ky,{rx:OS,ry:DS}),Gt({Container:{rect:Vn(function(t,e){return this.put(new ky).size(t,e)})}}),vn(ky,"Rect");class j3{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const n=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Tn={nextDraw:null,frames:new j3,timeouts:new j3,immediates:new j3,timer:()=>mn.window.performance||mn.window.Date,transforms:[],frame(t){const e=Tn.frames.push({run:t});return Tn.nextDraw===null&&(Tn.nextDraw=mn.window.requestAnimationFrame(Tn._draw)),e},timeout(t,e){e=e||0;const n=Tn.timer().now()+e,s=Tn.timeouts.push({run:t,time:n});return Tn.nextDraw===null&&(Tn.nextDraw=mn.window.requestAnimationFrame(Tn._draw)),s},immediate(t){const e=Tn.immediates.push(t);return Tn.nextDraw===null&&(Tn.nextDraw=mn.window.requestAnimationFrame(Tn._draw)),e},cancelFrame(t){t!=null&&Tn.frames.remove(t)},clearTimeout(t){t!=null&&Tn.timeouts.remove(t)},cancelImmediate(t){t!=null&&Tn.immediates.remove(t)},_draw(t){let e=null;const n=Tn.timeouts.last();for(;(e=Tn.timeouts.shift())&&(t>=e.time?e.run():Tn.timeouts.push(e),e!==n););let s=null;const i=Tn.frames.last();for(;s!==i&&(s=Tn.frames.shift());)s.run(t);let o=null;for(;o=Tn.immediates.shift();)o();Tn.nextDraw=Tn.timeouts.first()||Tn.frames.first()?mn.window.requestAnimationFrame(Tn._draw):null}},j0t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},W0t=function(){const t=mn.window;return(t.performance||t.Date).now()};class KU extends yv{constructor(e=W0t){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),n=e?e.runner.duration():0;return(e?e.start:this._time)+n}getEndTimeOfTimeline(){const e=this._runners.map(n=>n.start+n.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const n=this.speed();if(e==null)return this.speed(-n);const s=Math.abs(n);return this.speed(e?-s:s)}schedule(e,n,s){if(e==null)return this._runners.map(j0t);let i=0;const o=this.getEndTime();if(n=n||0,s==null||s==="last"||s==="after")i=o;else if(s==="absolute"||s==="start")i=n,n=0;else if(s==="now")i=this._time;else if(s==="relative"){const l=this.getRunnerInfoById(e.id);l&&(i=l.start+n,n=0)}else{if(s!=="with-last")throw new Error('Invalid value for the "when" parameter');{const l=this.getLastRunnerInfo();i=l?l.start:this._time}}e.unschedule(),e.timeline(this);const r=e.persist(),a={persist:r===null?this._persist:r,start:i+n,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((l,c)=>l.start-c.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const n=this._runnerIds.indexOf(e.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Tn.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Tn.frame(this._step)),this)}_stepFn(e=!1){const n=this._timeSource();let s=n-this._lastSourceTime;e&&(s=0);const i=this._speed*s+(this._time-this._lastStepTime);this._lastSourceTime=n,e||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let r=this._runners.length;r--;){const a=this._runners[r],l=a.runner;this._time-a.start<=0&&l.reset()}let o=!1;for(let r=0,a=this._runners.length;r<a;r++){const l=this._runners[r],c=l.runner;let u=i;const d=this._time-l.start;if(d<=0){o=!0;continue}d<u&&(u=d),c.active()&&(c.step(u).done?l.persist!==!0&&c.duration()-c.time()+this._time+l.persist<this._time&&(c.unschedule(),--r,--a):o=!0)}return o&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}Gt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new KU,this._timeline):(this._timeline=t,this)}}});class Do extends yv{constructor(e){super(),this.id=Do.id++,e=typeof(e=e??H3)=="function"?new Zb(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Zb,this._stepper=this._isDeclarative?e:new F6,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new sn,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,n,s){let i=1,o=!1,r=0;return n=n??P0t,s=s||"last",typeof(e=e??H3)!="object"||e instanceof VS||(n=e.delay??n,s=e.when??s,o=e.swing||o,i=e.times??i,r=e.wait??r,e=e.duration??H3),{duration:e,delay:n,swing:o,times:i,wait:r,when:s}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,n,s){const i=Do.sanitise(e,n,s),o=new Do(i.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new sn,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new F6(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,n,s){return typeof e=="object"&&(n=e.swing,s=e.wait,e=e.times),this._times=e||1/0,this._swing=n||!1,this._wait=s||0,this._times===!0&&(this._times=1/0),this}loops(e){const n=this._duration+this._wait;if(e==null){const o=Math.floor(this._time/n),r=(this._time-o*n)/this._duration;return Math.min(o+r,this._times)}const s=e%1,i=n*Math.floor(e)+this._duration*s;return this.time(i)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const n=this._time,s=this._duration,i=this._wait,o=this._times,r=this._swing,a=this._reverse;let l;if(e==null){const d=function(f){const p=r*Math.floor(f%(2*(i+s))/(i+s)),m=p&&!a||!p&&a,b=Math.pow(-1,m)*(f%(i+s))/s+m;return Math.max(Math.min(b,1),0)},h=o*(i+s)-i;return l=n<=0?Math.round(d(1e-5)):n<h?d(n):Math.round(d(h-1e-5)),l}const c=Math.floor(this.loops()),u=r&&c%2==0;return l=c+(u&&!a||a&&u?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,n,s,i){return this._queue.push({initialiser:e||MT,runner:n||MT,retarget:s,isTransform:i,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,n,s){if(e instanceof KU||(s=n,n=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,n,s),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const n=this.position(),s=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const i=this.duration(),o=this._lastTime<=0&&this._time>0,r=this._lastTime<i&&this._time>=i;this._lastTime=this._time,o&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!r&&this._time>=i,this._reseted=!1;let l=!1;return(s||a)&&(this._initialise(s),this.transforms=new sn,l=this._run(a?e:n),this.fire("step",this)),this.done=this.done||l&&a,r&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const n=e-this._time;return this.step(n),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let n=0,s=this._queue.length;n<s;++n){const i=this._queue[n],o=this._isDeclarative||!i.initialised&&e;e=!i.finished,o&&e&&(i.initialiser.call(this),i.initialised=!0)}}_rememberMorpher(e,n){if(this._history[e]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const s=this.timeline();s&&s.play()}}_run(e){let n=!0;for(let s=0,i=this._queue.length;s<i;++s){const o=this._queue[s],r=o.runner.call(this,e);o.finished=o.finished||r===!0,n=n&&o.finished}return n}_tryRetarget(e,n,s){if(this._history[e]){if(!this._history[e].caller.initialised){const o=this._queue.indexOf(this._history[e].caller);return this._queue.splice(o,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,n,s):this._history[e].morpher.to(n),this._history[e].caller.finished=!1;const i=this.timeline();return i&&i.play(),!0}return!1}}Do.id=0;class Jb{constructor(e=new sn,n=-1,s=!0){this.transforms=e,this.id=n,this.done=s}clearTransformsFromQueue(){}}$t([Do,Jb],{mergeWith(t){return new Jb(t.transforms.lmultiply(this.transforms),t.id)}});const ZU=(t,e)=>t.lmultiplyO(e),JU=t=>t.transforms;function Y0t(){const t=this._transformationRunners.runners.map(JU).reduce(ZU,new sn);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class q0t{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const n=e.id+1;return this.runners.push(e),this.ids.push(n),this}clearBefore(e){const n=this.ids.indexOf(e+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new Jb).forEach(s=>s.clearTransformsFromQueue()),this}edit(e,n){const s=this.ids.indexOf(e+1);return this.ids.splice(s,1,e+1),this.runners.splice(s,1,n),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let n=0;n<this.runners.length;++n){const s=this.runners[n];if(e&&s.done&&e.done&&(!s._timeline||!s._timeline._runnerIds.includes(s.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(s.id);const i=s.mergeWith(e);this.edit(e.id,i),e=i,--n}else e=s}return this}remove(e){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}Gt({Element:{animate(t,e,n){const s=Do.sanitise(t,e,n),i=this.timeline();return new Do(s.duration).loop(s).element(this).timeline(i.play()).schedule(s.delay,s.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(JU).reduce(ZU,new sn)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(Y0t.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new q0t().add(new Jb(new sn(this))))}}});$t(Do,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if(typeof e=="string")return this.styleAttr(t,{[e]:n});let s=e;if(this._tryRetarget(t,s))return this;let i=new wu(this._stepper).to(s),o=Object.keys(s);return this.queue(function(){i=i.from(this.element()[t](o))},function(r){return this.element()[t](i.at(r).valueOf()),i.done()},function(r){const a=Object.keys(r),l=(c=o,a.filter(d=>!c.includes(d)));var c;if(l.length){const d=this.element()[t](l),h=new g1(i.from()).valueOf();Object.assign(h,d),i.from(h)}const u=new g1(i.to()).valueOf();Object.assign(u,r),i.to(u),o=a,s=r}),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new wu(this._stepper).to(new Bt(t));return this.queue(function(){n=n.from(this.element().zoom())},function(s){return this.element().zoom(n.at(s),e),n.done()},function(s,i){e=i,n.to(s)}),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const s=sn.isMatrixLike(t);n=t.affine!=null?t.affine:n??!s;const i=new wu(this._stepper).type(n?bv:sn);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||R6(t,r),c=new sn(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(u){e||this.clearTransform();const{x:d,y:h}=new On(o).transform(r._currentTransform(this));let f=new sn({...t,origin:[d,h]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(d,h),p=p.decompose(d,h);const b=f.rotate,_=p.rotate,x=[b-360,b,b+360],k=x.map(E=>Math.abs(E-_)),C=Math.min(...k),S=k.indexOf(C);f.rotate=x[S]}e&&(s||(f.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),i.from(p),i.to(f);const m=i.at(u);return l=m.rotate,a=new sn(m),this.addTransform(a),r._addRunner(this),i.done()},function(u){(u.origin||"center").toString()!==(t.origin||"center").toString()&&(o=R6(u,r)),t={...u,origin:o}},!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Bt(e),this._tryRetarget(t,e))return this;const n=new wu(this._stepper).to(e);let s=null;return this.queue(function(){s=this.element()[t](),n.from(s),n.to(s+e)},function(i){return this.element()[t](n.at(i)),n.done()},function(i){n.to(s+new Bt(i))}),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new wu(this._stepper).to(e);return this.queue(function(){n.from(this.element()[t]())},function(s){return this.element()[t](n.at(s)),n.done()}),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Bt(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,s){if(arguments.length===4)return this.plot([t,e,n,s]);if(this._tryRetarget("plot",t))return this;const i=new wu(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){i.from(this._element.array())},function(o){return this._element.plot(i.at(o)),i.done()}),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,s){return this._queueObject("viewbox",new Hs(t,e,n,s))},update(t){return typeof t!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(t.opacity!=null&&this.attr("stop-opacity",t.opacity),t.color!=null&&this.attr("stop-color",t.color),t.offset!=null&&this.attr("offset",t.offset),this)}}),$t(Do,{rx:OS,ry:DS,from:YU,to:qU}),vn(Do,"Runner");class j6 extends Ki{constructor(e,n=e){super(Fn("svg",e),n),this.namespace()}defs(){return this.isRoot()?Qo(this.node.querySelector("defs"))||this.put(new Y2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof mn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:MS,version:"1.1"}).attr("xmlns:xlink",Lp,N3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,N3).attr("xmlns:svgjs",null,N3)}root(){return this.isRoot()?this:super.root()}}Gt({Container:{nested:Vn(function(){return this.put(new j6)})}}),vn(j6,"Svg",!0);let W6=class extends Ki{constructor(t,e=t){super(Fn("symbol",t),e)}};Gt({Container:{symbol:Vn(function(){return this.put(new W6)})}}),vn(W6,"Symbol");var QU=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return t==null?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return t==null?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return this._build===!1&&this.clear(),this.node.appendChild(mn.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return t==null?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return t==null?e.y:this.attr("y",this.attr("y")+t-e.y)}});class Tr extends jo{constructor(e,n=e){super(Fn("text",e),n),this.dom.leading=this.dom.leading??new Bt(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Bt(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const n=this;let s=0;const i=this.dom.leading;this.each(function(o){if(V6(this.node))return;const r=mn.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=i*new Bt(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===`
142 `?s+=a:(this.attr("dy",o?a+s:0),s=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Bt(e.leading||1.3),this}writeDataToDom(){return TU(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const n=this.node.childNodes;let s=0;e="";for(let i=0,o=n.length;i<o;++i)n[i].nodeName==="textPath"||V6(n[i])?i===0&&(s=i+1):(i!==s&&n[i].nodeType!==3&&Qo(n[i]).dom.newLined===!0&&(e+=`
143 `),e+=n[i].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let n=0,s=(e=(e+"").split(`
144 `)).length;n<s;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}$t(Tr,QU),Gt({Container:{text:Vn(function(t=""){return this.put(new Tr).text(t)}),plain:Vn(function(t=""){return this.put(new Tr).plain(t)})}}),vn(Tr,"Text");class Cy extends jo{constructor(e,n=e){super(Fn("tspan",e),n),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Tr))return this;const n=e.index(this),s=mn.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=e.dom.leading*new Bt(s);return this.dy(n?i:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
145 `:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}$t(Cy,QU),Gt({Tspan:{tspan:Vn(function(t=""){const e=new Cy;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),vn(Cy,"Tspan");class W3 extends jo{constructor(e,n=e){super(Fn("circle",e),n)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new Bt(e).divide(2))}}$t(W3,{x:NU,y:BU,cx:zU,cy:HU,width:UU,height:jU}),Gt({Container:{circle:Vn(function(t=0){return this.put(new W3).size(t).move(0,0)})}}),vn(W3,"Circle");class Y3 extends Ki{constructor(e,n=e){super(Fn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Gd("svg [clip-path*="+this.id()+"]")}}Gt({Container:{clip:Vn(function(){return this.defs().put(new Y3)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Y3?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),vn(Y3,"ClipPath");class IT extends di{constructor(e,n=e){super(Fn("foreignObject",e),n)}}Gt({Container:{foreignObject:Vn(function(t,e){return this.put(new IT).size(t,e)})}}),vn(IT,"ForeignObject");var ej=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let s;try{s=n.node instanceof vv().SVGSVGElement?new Hs(n.attr(["x","y","width","height"])):n.bbox()}catch{return}const i=new sn(n),o=i.translate(t,e).transform(i.inverse()),r=new On(s.x,s.y).transform(o);n.move(r.x,r.y)}),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return t==null?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const s=t-n.x,i=e-n.y;return this.dmove(s,i)},size:function(t,e,n=this.bbox()){const s=Ip(this,t,e,n),i=s.width/n.width,o=s.height/n.height;return this.children().forEach(r=>{const a=new On(n).transform(new sn(r).inverse());r.scale(i,o,a.x,a.y)}),this},width:function(t,e=this.bbox()){return t==null?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return t==null?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return t==null?e.y:this.move(e.x,t,e)}});class Mc extends Ki{constructor(e,n=e){super(Fn("g",e),n)}}$t(Mc,ej),Gt({Container:{group:Vn(function(){return this.put(new Mc)})}}),vn(Mc,"G");class p0 extends Ki{constructor(e,n=e){super(Fn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Lp)}}$t(p0,ej),Gt({Container:{link:Vn(function(t){return this.put(new p0).to(t)})},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new p0,this.wrap(e)),typeof t=="function"?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&t.node.nodeName.toLowerCase()==="a"?t:null}}}),vn(p0,"A");class q3 extends Ki{constructor(e,n=e){super(Fn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Gd("svg [mask*="+this.id()+"]")}}Gt({Container:{mask:Vn(function(){return this.defs().put(new q3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof q3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),vn(q3,"Mask");class LT extends di{constructor(e,n=e){super(Fn("stop",e),n)}update(e){return(typeof e=="number"||e instanceof Bt)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new Bt(e.offset)),this}}Gt({Gradient:{stop:function(t,e,n){return this.put(new LT).update(t,e,n)}}}),vn(LT,"Stop");class G3 extends di{constructor(e,n=e){super(Fn("style",e),n)}addText(e=""){return this.node.textContent+=e,this}font(e,n,s={}){return this.rule("@font-face",{fontFamily:e,src:n,...s})}rule(e,n){return this.addText(function(s,i){if(!s)return"";if(!i)return s;let o=s+"{";for(const r in i)o+=r.replace(/([A-Z])/g,function(a,l){return"-"+l.toLowerCase()})+":"+i[r]+";";return o+="}",o}(e,n))}}Gt("Dom",{style(t,e){return this.put(new G3).rule(t,e)},fontface(t,e,n){return this.put(new G3).font(t,e,n)}}),vn(G3,"Style");class X3 extends Tr{constructor(e,n=e){super(Fn("textPath",e),n)}array(){const e=this.track();return e?e.array():null}plot(e){const n=this.track();let s=null;return n&&(s=n.plot(e)),e==null?s:this}track(){return this.reference("href")}}Gt({Container:{textPath:Vn(function(t,e){return t instanceof Tr||(t=this.text(t)),t.path(e)})},Text:{path:Vn(function(t,e=!0){const n=new X3;let s;if(t instanceof pf||(t=this.defs().path(t)),n.attr("href","#"+t,Lp),e)for(;s=this.node.firstChild;)n.node.appendChild(s);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:Vn(function(t){return t instanceof Tr||(t=new Tr().addTo(this.parent()).text(t)),t.path(this)}),targets(){return Gd("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),X3.prototype.MorphArray=Mr,vn(X3,"TextPath");class OT extends jo{constructor(e,n=e){super(Fn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,Lp)}}Gt({Container:{use:Vn(function(t,e){return this.put(new OT).use(t,e)})}}),vn(OT,"Use");const G0t=Ni;$t([j6,W6,wy,m1,xy],Qi("viewbox")),$t([Du,Vu,Ru,pf],Qi("marker")),$t(Tr,Qi("Text")),$t(pf,Qi("Path")),$t(Y2,Qi("Defs")),$t([Tr,Cy],Qi("Tspan")),$t([ky,_y,mg,Do],Qi("radius")),$t(yv,Qi("EventTarget")),$t(Bc,Qi("Dom")),$t(di,Qi("Element")),$t(jo,Qi("Shape")),$t([Ki,WU],Qi("Container")),$t(mg,Qi("Gradient")),$t(Do,Qi("Runner")),bd.extend([...new Set(EU)]),function(t=[]){U6.push(...[].concat(t))}([Bt,In,Hs,sn,_d,zc,Mr,On]),$t(U6,{to(t){return new wu().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,s,i){return this.fromArray(t.map(function(o,r){return s.step(o,e[r],n,i[r],i)}))}});class qn extends di{constructor(e){super(Fn("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,n){return!(e=super.put(e,n)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Gd('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class FS extends di{constructor(e,n){super(e,n),this.result(this.id())}in(e){if(e==null){const n=this.attr("in");return this.parent()&&this.parent().find(`[result="${n}"]`)[0]||n}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const qo=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},X0t={blend:qo(["in","in2","mode"]),colorMatrix:qo(["type","values"]),composite:qo(["in","in2","operator"]),convolveMatrix:function(t){t=new _d(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:qo(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:qo(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:qo(["in","dx","dy","stdDeviation"]),flood:qo(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Lp)},morphology:qo(["operator","radius"]),offset:qo(["dx","dy"]),specularLighting:qo(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:qo([]),turbulence:qo(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(t=>{const e=Pp(t),n=X0t[t];qn[e+"Effect"]=class extends FS{constructor(s){super(Fn("fe"+e,s),s)}update(s){return n.apply(this,s),this}},qn.prototype[t]=Vn(function(s,...i){const o=new qn[e+"Effect"];return s==null?this.put(o):(typeof s=="function"?s.call(o,o):i.unshift(s),this.put(o).update(i))})}),$t(qn,{merge(t){const e=this.put(new qn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof qn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new qn.ComponentTransferEffect);if(typeof t=="function")return t.call(e,e),e;t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t});for(const n in t)e.add(new qn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=Pp(t);qn[e]=class extends FS{constructor(n){super(Fn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=qn[Pp(t)],n=Vn(function(){return this.put(new e)});qn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=qn[Pp(t)],n=Vn(function(){return this.put(new e)});qn.DiffuseLightingEffect.prototype[t]=n,qn.SpecularLightingEffect.prototype[t]=n}),$t(qn.MergeEffect,{mergeNode(t){return this.put(new qn.MergeNode).attr("in",t)}}),$t(Y2,{filter:function(t){const e=this.put(new qn);return typeof t=="function"&&t.call(e,e),e}}),$t(Ki,{filter:function(t){return this.defs().filter(t)}}),$t(di,{filterWith:function(t){const e=t instanceof qn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const K0t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,n,s){return this.parent()&&this.parent().diffuseLighting(t,n,s).in(this)},displacementMap:function(t,e,n,s){return this.parent()&&this.parent().displacementMap(this,t,e,n,s)},dropShadow:function(t,e,n){return this.parent()&&this.parent().dropShadow(this,t,e,n).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,n,s,i){return this.parent()&&this.parent().specularLighting(t,n,s,i).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,n,s,i){return this.parent()&&this.parent().turbulence(t,e,n,s,i).in(this)}};$t(FS,K0t),$t(qn.MergeEffect,{in:function(t){return t instanceof qn.MergeNode?this.add(t,0):this.add(new qn.MergeNode().in(t),0),this}}),$t([qn.CompositeEffect,qn.BlendEffect,qn.DisplacementMapEffect],{in2:function(t){if(t==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",t)}}),qn.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var ai=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getDefaultFilter",value:function(e,n){var s=this.w;e.unfilter(!0),new qn().size("120%","180%","-5%","-40%"),s.config.chart.dropShadow.enabled&&this.dropShadow(e,s.config.chart.dropShadow,n)}},{key:"applyFilter",value:function(e,n,s){var i,o=this,r=this.w;if(e.unfilter(!0),s!=="none"){var a,l,c=r.config.chart.dropShadow,u=s==="lighten"?2:.3;e.filterWith(function(d){d.colorMatrix({type:"matrix",values:`
146 `.concat(u,` 0 0 0 0
147 0 `).concat(u,` 0 0 0
148 0 0 `).concat(u,` 0 0
149 0 0 0 1 0
150 `),in:"SourceGraphic",result:"brightness"}),c.enabled&&o.addShadow(d,n,c,"brightness")}),!c.noUserSpaceOnUse&&((a=e.filterer())===null||a===void 0||(l=a.node)===null||l===void 0||l.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((i=e.filterer())===null||i===void 0?void 0:i.node)}else this.getDefaultFilter(e,n)}},{key:"addShadow",value:function(e,n,s,i){var o,r=this.w,a=s.blur,l=s.top,c=s.left,u=s.color,d=s.opacity;if(u=Array.isArray(u)?u[n]:u,((o=r.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.length)>0&&r.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return e;e.offset({in:i,dx:c,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),e.flood({"flood-color":u,"flood-opacity":d,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",i])}},{key:"dropShadow",value:function(e,n){var s,i,o,r,a,l=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=this.w;return e.unfilter(!0),ue.isMsEdge()&&u.config.chart.type==="radialBar"||((s=u.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.length)>0&&((o=u.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.indexOf(c))===-1?e:(e.filterWith(function(d){l.addShadow(d,c,n,"SourceGraphic")}),n.noUserSpaceOnUse||(r=e.filterer())===null||r===void 0||(a=r.node)===null||a===void 0||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((i=e.filterer())===null||i===void 0?void 0:i.node),e)}},{key:"setSelectionFilter",value:function(e,n,s){var i=this.w;if(i.globals.selectedDataPoints[n]!==void 0&&i.globals.selectedDataPoints[n].indexOf(s)>-1){e.node.setAttribute("selected",!0);var o=i.config.states.active.filter;o!=="none"&&this.applyFilter(e,n,o.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(n){for(var s in n)n.hasOwnProperty(s)&&e.setAttribute(s,n[s])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),Ve=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"roundPathCorners",value:function(e,n){function s(T,L,I){var V=L.x-T.x,R=L.y-T.y,N=Math.sqrt(V*V+R*R);return i(T,L,Math.min(1,I/N))}function i(T,L,I){return{x:T.x+(L.x-T.x)*I,y:T.y+(L.y-T.y)*I}}function o(T,L){T.length>2&&(T[T.length-2]=L.x,T[T.length-1]=L.y)}function r(T){return{x:parseFloat(T[T.length-2]),y:parseFloat(T[T.length-1])}}e.indexOf("NaN")>-1&&(e="");var a=e.split(/[,\s]/).reduce(function(T,L){var I=L.match("([a-zA-Z])(.+)");return I?(T.push(I[1]),T.push(I[2])):T.push(L),T},[]).reduce(function(T,L){return parseFloat(L)==L&&T.length?T[T.length-1].push(L):T.push([L]),T},[]),l=[];if(a.length>1){var c=r(a[0]),u=null;a[a.length-1][0]=="Z"&&a[0].length>2&&(u=["L",c.x,c.y],a[a.length-1]=u),l.push(a[0]);for(var d=1;d<a.length;d++){var h=l[l.length-1],f=a[d],p=f==u?a[1]:a[d+1];if(p&&h&&h.length>2&&f[0]=="L"&&p.length>2&&p[0]=="L"){var m,b,_=r(h),x=r(f),k=r(p);m=s(x,_,n),b=s(x,k,n),o(f,m),f.origPoint=x,l.push(f);var C=i(m,x,.5),S=i(x,b,.5),E=["C",C.x,C.y,S.x,S.y,b.x,b.y];E.origPoint=x,l.push(E)}else l.push(f)}if(u){var P=r(l[l.length-1]);l.push(["Z"]),o(l[0],P)}}else l=a;return l.reduce(function(T,L){return T+L.join(" ")+" "},"")}},{key:"drawLine",value:function(e,n,s,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:n,x2:s,y2:i,stroke:o,"stroke-dasharray":r,"stroke-width":a,"stroke-linecap":l})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,c=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,u=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:n,width:s>0?s:0,height:i>0?i:0,rx:o,ry:o,opacity:a,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":u}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:i,stroke:n,"stroke-width":s})}},{key:"drawCircle",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var s=this.w.globals.dom.Paper.circle(2*e);return n!==null&&s.attr(n),s}},{key:"drawPath",value:function(e){var n=e.d,s=n===void 0?"":n,i=e.stroke,o=i===void 0?"#a8a8a8":i,r=e.strokeWidth,a=r===void 0?1:r,l=e.fill,c=e.fillOpacity,u=c===void 0?1:c,d=e.strokeOpacity,h=d===void 0?1:d,f=e.classes,p=e.strokeLinecap,m=p===void 0?null:p,b=e.strokeDashArray,_=b===void 0?0:b,x=this.w;return m===null&&(m=x.config.stroke.lineCap),(s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s="M 0 ".concat(x.globals.gridHeight)),x.globals.dom.Paper.path(s).attr({fill:l,"fill-opacity":u,stroke:o,"stroke-opacity":h,"stroke-linecap":m,"stroke-width":a,"stroke-dasharray":_,class:f})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w.globals.dom.Paper.group();return e!==null&&n.attr(e),n}},{key:"move",value:function(e,n){var s=["M",e,n].join(" ");return s}},{key:"line",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=null;return s===null?i=[" L",e,n].join(" "):s==="H"?i=[" H",e].join(" "):s==="V"&&(i=[" V",n].join(" ")),i}},{key:"curve",value:function(e,n,s,i,o,r){var a=["C",e,n,s,i,o,r].join(" ");return a}},{key:"quadraticCurve",value:function(e,n,s,i){return["Q",e,n,s,i].join(" ")}},{key:"arc",value:function(e,n,s,i,o,r,a){var l="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(l="a");var c=[l,e,n,s,i,o,r,a].join(" ");return c}},{key:"renderPaths",value:function(e){var n,s=e.j,i=e.realIndex,o=e.pathFrom,r=e.pathTo,a=e.stroke,l=e.strokeWidth,c=e.strokeLinecap,u=e.fill,d=e.animationDelay,h=e.initialSpeed,f=e.dataChangeSpeed,p=e.className,m=e.chartType,b=e.shouldClipToGrid,_=b===void 0||b,x=e.bindEventsOnPaths,k=x===void 0||x,C=e.drawShadow,S=C===void 0||C,E=this.w,P=new ai(this.ctx),T=new Tp(this.ctx),L=this.w.config.chart.animations.enabled,I=L&&this.w.config.chart.animations.dynamicAnimation.enabled,V=!!(L&&!E.globals.resized||I&&E.globals.dataChanged&&E.globals.shouldAnimate);V?n=o:(n=r,E.globals.animationEnded=!0);var R=E.config.stroke.dashArray,N=0;N=Array.isArray(R)?R[i]:E.config.stroke.dashArray;var F=this.drawPath({d:n,stroke:a,strokeWidth:l,fill:u,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:N});F.attr("index",i),_&&(m==="bar"&&!E.globals.isHorizontal||E.globals.comboCharts?F.attr({"clip-path":"url(#gridRectBarMask".concat(E.globals.cuid,")")}):F.attr({"clip-path":"url(#gridRectMask".concat(E.globals.cuid,")")})),E.config.chart.dropShadow.enabled&&S&&P.dropShadow(F,E.config.chart.dropShadow,i),k&&(F.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,F)),F.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,F)),F.node.addEventListener("mousedown",this.pathMouseDown.bind(this,F))),F.attr({pathTo:r,pathFrom:o});var B={el:F,j:s,realIndex:i,pathFrom:o,pathTo:r,fill:u,strokeWidth:l,delay:d};return!L||E.globals.resized||E.globals.dataChanged?!E.globals.resized&&E.globals.dataChanged||T.showDelayedElements():T.animatePathsGradually(et(et({},B),{},{speed:h})),E.globals.dataChanged&&I&&V&&T.animatePathsGradually(et(et({},B),{},{speed:f})),F}},{key:"drawPattern",value:function(e,n,s){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(n,s,function(r){e==="horizontalLines"?r.line(0,0,s,0).stroke({color:i,width:o+1}):e==="verticalLines"?r.line(0,0,0,n).stroke({color:i,width:o+1}):e==="slantedLines"?r.line(0,0,n,s).stroke({color:i,width:o}):e==="squares"?r.rect(n,s).fill("none").stroke({color:i,width:o}):e==="circles"&&r.circle(n).fill("none").stroke({color:i,width:o})})}},{key:"drawGradient",value:function(e,n,s,i,o){var r,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,d=this.w;n.length<9&&n.indexOf("#")===0&&(n=ue.hexToRgba(n,i)),s.length<9&&s.indexOf("#")===0&&(s=ue.hexToRgba(s,o));var h=0,f=1,p=1,m=null;l!==null&&(h=l[0]!==void 0?l[0]/100:0,f=l[1]!==void 0?l[1]/100:1,p=l[2]!==void 0?l[2]/100:1,m=l[3]!==void 0?l[3]/100:null);var b=!(d.config.chart.type!=="donut"&&d.config.chart.type!=="pie"&&d.config.chart.type!=="polarArea"&&d.config.chart.type!=="bubble");if(r=c&&c.length!==0?d.globals.dom.Paper.gradient(b?"radial":"linear",function(k){(Array.isArray(c[u])?c[u]:c).forEach(function(C){k.stop(C.offset/100,C.color,C.opacity)})}):d.globals.dom.Paper.gradient(b?"radial":"linear",function(k){k.stop(h,n,i),k.stop(f,s,o),k.stop(p,s,o),m!==null&&k.stop(m,n,i)}),b){var _=d.globals.gridWidth/2,x=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:_,cy:x,r:a}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?r.from(0,0).to(0,1):e==="diagonal"?r.from(0,0).to(1,1):e==="horizontal"?r.from(0,1).to(1,1):e==="diagonal2"&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var n=e.text,s=e.maxWidth,i=e.fontSize,o=e.fontFamily,r=this.getTextRects(n,i,o),a=r.width/n.length,l=Math.floor(s/a);return s<r.width?n.slice(0,l-3)+"...":n}},{key:"drawText",value:function(e){var n=this,s=e.x,i=e.y,o=e.text,r=e.textAnchor,a=e.fontSize,l=e.fontFamily,c=e.fontWeight,u=e.foreColor,d=e.opacity,h=e.maxWidth,f=e.cssClass,p=f===void 0?"":f,m=e.isPlainText,b=m===void 0||m,_=e.dominantBaseline,x=_===void 0?"auto":_,k=this.w;o===void 0&&(o="");var C=o;r||(r="start"),u&&u.length||(u=k.config.chart.foreColor),l=l||k.config.chart.fontFamily,c=c||"regular";var S,E={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?S=k.globals.dom.Paper.text(function(P){for(var T=0;T<o.length;T++)C=o[T],h&&(C=n.getTextBasedOnMaxWidth(et({text:o[T]},E))),T===0?P.tspan(C):P.tspan(C).newLine()}):(h&&(C=this.getTextBasedOnMaxWidth(et({text:o},E))),S=b?k.globals.dom.Paper.plain(o):k.globals.dom.Paper.text(function(P){return P.tspan(C)})),S.attr({x:s,y:i,"text-anchor":r,"dominant-baseline":x,"font-size":a,"font-family":l,"font-weight":c,fill:u,class:"apexcharts-text "+p}),S.node.style.fontFamily=l,S.node.style.opacity=d,S}},{key:"getMarkerPath",value:function(e,n,s,i){var o="";switch(s){case"cross":o="M ".concat(e-(i/=1.4)," ").concat(n-i," L ").concat(e+i," ").concat(n+i," M ").concat(e-i," ").concat(n+i," L ").concat(e+i," ").concat(n-i);break;case"plus":o="M ".concat(e-(i/=1.12)," ").concat(n," L ").concat(e+i," ").concat(n," M ").concat(e," ").concat(n-i," L ").concat(e," ").concat(n+i);break;case"star":case"sparkle":var r=5;i*=1.15,s==="sparkle"&&(i/=1.1,r=4);for(var a=Math.PI/r,l=0;l<=2*r;l++){var c=l*a,u=l%2==0?i:i/2;o+=(l===0?"M":"L")+(e+u*Math.sin(c))+","+(n-u*Math.cos(c))}o+="Z";break;case"triangle":o="M ".concat(e," ").concat(n-i,`
151 L `).concat(e+i," ").concat(n+i,`
152 L `).concat(e-i," ").concat(n+i,`
153 Z`);break;case"square":case"rect":o="M ".concat(e-(i/=1.125)," ").concat(n-i,`
154 L `).concat(e+i," ").concat(n-i,`
155 L `).concat(e+i," ").concat(n+i,`
156 L `).concat(e-i," ").concat(n+i,`
157 Z`);break;case"diamond":i*=1.05,o="M ".concat(e," ").concat(n-i,`
158 L `).concat(e+i," ").concat(n,`
159 L `).concat(e," ").concat(n+i,`
160 L `).concat(e-i," ").concat(n,`
161 Z`);break;case"line":o="M ".concat(e-(i/=1.1)," ").concat(n,`
162 L `).concat(e+i," ").concat(n);break;default:i*=2,o="M ".concat(e,", ").concat(n,`
163 m -`).concat(i/2,`, 0
164 a `).concat(i/2,",").concat(i/2," 0 1,0 ").concat(i,`,0
165 a `).concat(i/2,",").concat(i/2," 0 1,0 -").concat(i,",0")}return o}},{key:"drawMarkerShape",value:function(e,n,s,i,o){var r=this.drawPath({d:this.getMarkerPath(e,n,s,i,o),stroke:o.pointStrokeColor,strokeDashArray:o.pointStrokeDashArray,strokeWidth:o.pointStrokeWidth,fill:o.pointFillColor,fillOpacity:o.pointFillOpacity,strokeOpacity:o.pointStrokeOpacity});return r.attr({cx:e,cy:n,shape:o.shape,class:o.class?o.class:""}),r}},{key:"drawMarker",value:function(e,n,s){e=e||0;var i=s.pSize||0;return ue.isNumber(n)||(i=0,n=0),this.drawMarkerShape(e,n,s==null?void 0:s.shape,i,et(et({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,n){var s=this.w,i=new ai(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof s.config.chart.events.dataPointMouseEnter=="function"&&s.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}),this.ctx.events.fireEvent("dataPointMouseEnter",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}]),(s.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&s.config.states.hover.filter.type!=="none"&&!s.globals.isTouchDevice){var a=s.config.states.hover.filter;i.applyFilter(e,o,a.type)}}},{key:"pathMouseLeave",value:function(e,n){var s=this.w,i=new ai(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof s.config.chart.events.dataPointMouseLeave=="function"&&s.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}),this.ctx.events.fireEvent("dataPointMouseLeave",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}]),s.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||s.config.states.hover.filter.type!=="none"&&i.getDefaultFilter(e,o)}},{key:"pathMouseDown",value:function(e,n){var s=this.w,i=new ai(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10),a="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),s.globals.selectedDataPoints[o].indexOf(r)>-1){var l=s.globals.selectedDataPoints[o].indexOf(r);s.globals.selectedDataPoints[o].splice(l,1)}}else{if(!s.config.states.active.allowMultipleDataPointsSelection&&s.globals.selectedDataPoints.length>0){s.globals.selectedDataPoints=[];var c=s.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),u=s.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=function(p){Array.prototype.forEach.call(p,function(m){m.node.setAttribute("selected","false"),i.getDefaultFilter(m,o)})};d(c),d(u)}e.node.setAttribute("selected","true"),a="true",s.globals.selectedDataPoints[o]===void 0&&(s.globals.selectedDataPoints[o]=[]),s.globals.selectedDataPoints[o].push(r)}if(a==="true"){var h=s.config.states.active.filter;if(h!=="none")i.applyFilter(e,o,h.type);else if(s.config.states.hover.filter!=="none"&&!s.globals.isTouchDevice){var f=s.config.states.hover.filter;i.applyFilter(e,o,f.type)}}else s.config.states.active.filter.type!=="none"&&(s.config.states.hover.filter.type==="none"||s.globals.isTouchDevice?i.getDefaultFilter(e,o):(f=s.config.states.hover.filter,i.applyFilter(e,o,f.type)));typeof s.config.chart.events.dataPointSelection=="function"&&s.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:s.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:s}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:s.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:s}])}},{key:"rotateAroundCenter",value:function(e){var n={};return e&&typeof e.getBBox=="function"&&(n=e.getBBox()),{x:n.x+n.width/2,y:n.y+n.height/2}}},{key:"getTextRects",value:function(e,n,s,i){var o=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],r=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:n,fontFamily:s,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),r.globals.dom.Paper.add(a);var l=a.bbox();return o||(l=a.node.getBoundingClientRect()),a.remove(),{width:l.width,height:l.height}}},{key:"placeTextWithEllipsis",value:function(e,n,s){if(typeof e.getComputedTextLength=="function"&&(e.textContent=n,n.length>0&&e.getComputedTextLength()>=s/1.1)){for(var i=n.length-3;i>0;i-=3)if(e.getSubStringLength(0,i)<=s/1.1)return void(e.textContent=n.substring(0,i)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,n){for(var s in n)n.hasOwnProperty(s)&&e.setAttribute(s,n[s])}}]),t}(),ys=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,s=[];if(n.globals.series.length===0)return s;for(var i=0;i<n.globals.series[n.globals.maxValsInArrayIndex].length;i++){for(var o=0,r=0;r<n.globals.series.length;r++)n.globals.series[r][i]!==void 0&&e.indexOf(r)===-1&&(o+=n.globals.series[r][i]);s.push(o)}return s}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(n,s){return n+s},0):this.w.globals.series[e].reduce(function(n,s){return n+s},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,n=this.w,s=[];return n.globals.seriesGroups.forEach(function(i){var o=[];n.config.series.forEach(function(a,l){i.indexOf(n.globals.seriesNames[l])>-1&&o.push(l)});var r=n.globals.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1});s.push(e.getStackedSeriesTotals(r))}),s}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,n=this.w.config,s=[],i=[],o=[],r=e.series.length>n.yaxis.length||n.yaxis.some(function(d){return Array.isArray(d.seriesName)});n.series.forEach(function(d,h){o.push(h),i.push(null)}),n.yaxis.forEach(function(d,h){s[h]=[]});var a=[];n.yaxis.forEach(function(d,h){var f=!1;if(d.seriesName){var p=[];Array.isArray(d.seriesName)?p=d.seriesName:p.push(d.seriesName),p.forEach(function(m){n.series.forEach(function(b,_){if(b.name===m){var x=_;h===_||r?!r||o.indexOf(_)>-1?s[h].push([h,_]):console.warn("Series '"+b.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[_].push([_,h]),x=h),f=!0,(x=o.indexOf(x))!==-1&&o.splice(x,1)}})})}f||a.push(h)}),s=s.map(function(d,h){var f=[];return d.forEach(function(p){i[p[1]]=p[0],f.push(p[1])}),f});for(var l=n.yaxis.length-1,c=0;c<a.length&&(l=a[c],s[l]=[],o);c++){var u=o[0];o.shift(),s[l].push(u),i[u]=l}o.forEach(function(d){s[l].push(d),i[d]=l}),e.seriesYAxisMap=s.map(function(d){return d}),e.seriesYAxisReverseMap=i.map(function(d){return d}),e.seriesYAxisMap.forEach(function(d,h){d.forEach(function(f){n.series[f]&&n.series[f].group===void 0&&(n.series[f].group="apexcharts-axis-".concat(h.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(n){return n!==null}):this.w.config.series[e].data.filter(function(n){return n!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(n,s,i){return n===i[0]})}},{key:"getCategoryLabels",value:function(e){var n=this.w,s=e.slice();return n.config.xaxis.convertedCatToNumeric&&(s=e.map(function(i,o){return n.config.xaxis.labels.formatter(i-n.globals.minX+1)})),s}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(n){return n.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(n){return n.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,n=0;return e.globals.markers.size.forEach(function(s){n=Math.max(n,s)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(s){n=Math.max(n,s.size)}),n>0&&(e.config.markers.hover.size>0?n=e.config.markers.hover.size:n+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=n,n}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(n,s){var i=0;if(Array.isArray(n))for(var o=0;o<n.length;o++)i+=n[o];else i+=n;return i})}},{key:"getSeriesTotalsXRange",value:function(e,n){var s=this.w;return s.globals.series.map(function(i,o){for(var r=0,a=0;a<i.length;a++)s.globals.seriesX[o][a]>e&&s.globals.seriesX[o][a]<n&&(r+=i[a]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(n,s){var i=[];if(Array.isArray(n))for(var o=0;o<n.length;o++){var r=e.globals.stackedSeriesTotals[o],a=0;r&&(a=100*n[o]/r),i.push(a)}else{var l=100*n/e.globals.seriesTotals.reduce(function(c,u){return c+u},0);i.push(l)}return i})}},{key:"getCalculatedRatios",value:function(){var e,n,s,i=this,o=this.w,r=o.globals,a=[],l=0,c=[],u=.1,d=0;if(r.yRange=[],r.isMultipleYAxis)for(var h=0;h<r.minYArr.length;h++)r.yRange.push(Math.abs(r.minYArr[h]-r.maxYArr[h])),c.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var f=0;f<r.yRange.length;f++)a.push(r.yRange[f]/r.gridHeight);if(n=r.xRange/r.gridWidth,e=r.yRange/r.gridWidth,s=r.xRange/r.gridHeight,(l=r.zRange/r.gridHeight*16)||(l=1),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(r.hasNegs=!0),o.globals.seriesYAxisReverseMap.length>0){var p=function(b,_){var x=o.config.yaxis[o.globals.seriesYAxisReverseMap[_]],k=b<0?-1:1;return b=Math.abs(b),x.logarithmic&&(b=i.getBaseLog(x.logBase,b)),-k*b/a[_]};if(r.isMultipleYAxis){c=[];for(var m=0;m<a.length;m++)c.push(p(r.minYArr[m],m))}else(c=[]).push(p(r.minY,0)),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(u=-r.minY/e,d=r.minX/n)}else(c=[]).push(0),u=0,d=0;return{yRatio:a,invertedYRatio:e,zRatio:l,xRatio:n,invertedXRatio:s,baseLineInvertedY:u,baseLineY:c,baseLineX:d}}},{key:"getLogSeries",value:function(e){var n=this,s=this.w;return s.globals.seriesLog=e.map(function(i,o){var r=s.globals.seriesYAxisReverseMap[o];return s.config.yaxis[r]&&s.config.yaxis[r].logarithmic?i.map(function(a){return a===null?null:n.getLogVal(s.config.yaxis[r].logBase,a,o)}):i}),s.globals.invalidLogScale?e:s.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,n){if(e===null)return null;var s=this.w,i=s.globals.seriesYAxisReverseMap[n];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,e,n):e}},{key:"getBaseLog",value:function(e,n){return Math.log(n)/Math.log(e)}},{key:"getLogVal",value:function(e,n,s){if(n<=0)return 0;var i=this.w,o=i.globals.minYArr[s]===0?-1:this.getBaseLog(e,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(e,i.globals.maxYArr[s]))-o;return n<1?n/r:(this.getBaseLog(e,n)-o)/r}},{key:"getLogYRatios",value:function(e){var n=this,s=this.w,i=this.w.globals;return i.yLogRatio=e.slice(),i.logYRange=i.yRange.map(function(o,r){var a=s.globals.seriesYAxisReverseMap[r];if(s.config.yaxis[a]&&n.w.config.yaxis[a].logarithmic){var l,c=-Number.MAX_VALUE,u=Number.MIN_VALUE;return i.seriesLog.forEach(function(d,h){d.forEach(function(f){s.config.yaxis[h]&&s.config.yaxis[h].logarithmic&&(c=Math.max(f,c),u=Math.min(f,u))})}),l=Math.pow(i.yRange[r],Math.abs(u-c)/i.yRange[r]),i.yLogRatio[r]=l/i.gridHeight,l}}),i.invalidLogScale?e.slice():i.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,n,s,i){var o=this.w,r=[];return e.series.length>0&&n.forEach(function(a){var l=[],c=[];e.i.forEach(function(u,d){o.config.series[u].group===a&&(l.push(e.series[d]),c.push(u))}),l.length>0&&r.push(i.draw(l,s,c))}),r}}],[{key:"checkComboSeries",value:function(e,n){var s=!1,i=0,o=0;return n===void 0&&(n="line"),e.length&&e[0].type!==void 0&&e.forEach(function(r){r.type!=="bar"&&r.type!=="column"&&r.type!=="candlestick"&&r.type!=="boxPlot"||i++,r.type!==void 0&&r.type!==n&&o++}),o>0&&(s=!0),{comboBarCount:i,comboCharts:s}}},{key:"extendArrayProps",value:function(e,n,s){var i,o,r,a,l,c;return(i=n)!==null&&i!==void 0&&i.yaxis&&(n=e.extendYAxis(n,s)),(o=n)!==null&&o!==void 0&&o.annotations&&(n.annotations.yaxis&&(n=e.extendYAxisAnnotations(n)),(r=n)!==null&&r!==void 0&&(a=r.annotations)!==null&&a!==void 0&&a.xaxis&&(n=e.extendXAxisAnnotations(n)),(l=n)!==null&&l!==void 0&&(c=l.annotations)!==null&&c!==void 0&&c.points&&(n=e.extendPointAnnotations(n))),n}}]),t}(),q2=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e}return lt(t,[{key:"setOrientations",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,s=this.w;if(e.label.orientation==="vertical"){var i=n!==null?n:0,o=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(o!==null){var r=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-r.height+4);var a=e.label.position==="top"?r.width:-r.width;o.setAttribute("y",parseFloat(o.getAttribute("y"))+a);var l=this.annoCtx.graphics.rotateAroundCenter(o),c=l.x,u=l.y;o.setAttribute("transform","rotate(-90 ".concat(c," ").concat(u,")"))}}}},{key:"addBackgroundToAnno",value:function(e,n){var s=this.w;if(!e||!n.label.text||!String(n.label.text).trim())return null;var i=s.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=e.getBoundingClientRect(),r=n.label.style.padding,a=r.left,l=r.right,c=r.top,u=r.bottom;if(n.label.orientation==="vertical"){var d=[a,l,c,u];c=d[0],u=d[1],a=d[2],l=d[3]}var h=o.left-i.left-a,f=o.top-i.top-c,p=this.annoCtx.graphics.drawRect(h-s.globals.barPadForNumericAxis,f,o.width+a+l,o.height+c+u,n.label.borderRadius,n.label.style.background,1,n.label.borderWidth,n.label.borderColor,0);return n.id&&p.node.classList.add(n.id),p}},{key:"annotationsBackground",value:function(){var e=this,n=this.w,s=function(i,o,r){var a=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(o,"']"));if(a){var l=a.parentNode,c=e.addBackgroundToAnno(a,i);c&&(l.insertBefore(c.node,a),i.label.mouseEnter&&c.node.addEventListener("mouseenter",i.label.mouseEnter.bind(e,i)),i.label.mouseLeave&&c.node.addEventListener("mouseleave",i.label.mouseLeave.bind(e,i)),i.label.click&&c.node.addEventListener("click",i.label.click.bind(e,i)))}};n.config.annotations.xaxis.forEach(function(i,o){return s(i,o,"xaxis")}),n.config.annotations.yaxis.forEach(function(i,o){return s(i,o,"yaxis")}),n.config.annotations.points.forEach(function(i,o){return s(i,o,"point")})}},{key:"getY1Y2",value:function(e,n){var s,i=this.w,o=e==="y1"?n.y:n.y2,r=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,l=a.indexOf(o),c=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(l+1,")"));s=c?parseFloat(c.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(l+1)-i.globals.barHeight,n.seriesIndex!==void 0&&i.globals.barHeight&&(s-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*n.seriesIndex)}else{var u,d=i.globals.seriesYAxisMap[n.yAxisIndex][0],h=i.config.yaxis[n.yAxisIndex].logarithmic?new ys(this.annoCtx.ctx).getLogVal(i.config.yaxis[n.yAxisIndex].logBase,o,d)/i.globals.yLogRatio[d]:(o-i.globals.minYArr[d])/(i.globals.yRange[d]/i.globals.gridHeight);s=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),r=h>i.globals.gridHeight||h<0,!n.marker||n.y!==void 0&&n.y!==null||(s=0),(u=i.config.yaxis[n.yAxisIndex])!==null&&u!==void 0&&u.reversed&&(s=h)}return typeof o=="string"&&o.includes("px")&&(s=parseFloat(o)),{yP:s,clipped:r}}},{key:"getX1X2",value:function(e,n){var s=this.w,i=e==="x1"?n.x:n.x2,o=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,r=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,a=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange,l=!1,c=this.annoCtx.inversedReversedAxis?(r-i)/(a/s.globals.gridWidth):(i-o)/(a/s.globals.gridWidth);return s.config.xaxis.type!=="category"&&!s.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||s.globals.dataFormatXNumeric||s.config.chart.sparkline.enabled||(c=this.getStringX(i)),typeof i=="string"&&i.includes("px")&&(c=parseFloat(i)),i==null&&n.marker&&(c=s.globals.gridWidth),n.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=s.globals.barWidth/2*(s.globals.series.length-1)-s.globals.barWidth*n.seriesIndex),c>s.globals.gridWidth?(c=s.globals.gridWidth,l=!0):c<0&&(c=0,l=!0),{x:c,clipped:l}}},{key:"getStringX",value:function(e){var n=this.w,s=e;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(e=n.globals.categoryLabels.indexOf(e)+1);var i=n.globals.labels.map(function(r){return Array.isArray(r)?r.join(" "):r}).indexOf(e),o=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return o&&(s=parseFloat(o.getAttribute("x"))),s}}]),t}(),Z0t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new q2(this.annoCtx)}return lt(t,[{key:"addXaxisAnnotation",value:function(e,n,s){var i,o=this.w,r=this.helpers.getX1X2("x1",e),a=r.x,l=r.clipped,c=!0,u=e.label.text,d=e.strokeDashArray;if(ue.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!l){var h=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,o.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);n.appendChild(h.node),e.id&&h.node.classList.add(e.id)}}else{var f=this.helpers.getX1X2("x2",e);if(i=f.x,c=f.clipped,!l||!c){if(i<a){var p=a;a=i,i=p}var m=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,i-a,o.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,d);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}if(!l||!c){var b=this.annoCtx.graphics.getTextRects(u,parseFloat(e.label.style.fontSize)),_=e.label.position==="top"?4:e.label.position==="center"?o.globals.gridHeight/2+(e.label.orientation==="vertical"?b.width/2:0):o.globals.gridHeight,x=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:_+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?b.width/2-12:-b.width/2:0),text:u,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});x.attr({rel:s}),n.appendChild(x.node),this.annoCtx.helpers.setOrientations(e,s)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,n=this.w,s=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return n.config.annotations.xaxis.map(function(i,o){e.addXaxisAnnotation(i,s.node,o)}),s}}]),t}(),ti=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return lt(t,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var n=Date.parse(e);if(!isNaN(n))return this.getTimeStamp(e);var s=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,n){var s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(Rs(s.months)),r=[""].concat(Rs(s.shortMonths)),a=[""].concat(Rs(s.days)),l=[""].concat(Rs(s.shortDays));function c(T,L){var I=T+"";for(L=L||2;I.length<L;)I="0"+I;return I}var u=i?e.getUTCFullYear():e.getFullYear();n=(n=(n=n.replace(/(^|[^\\])yyyy+/g,"$1"+u)).replace(/(^|[^\\])yy/g,"$1"+u.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+u);var d=(i?e.getUTCMonth():e.getMonth())+1;n=(n=(n=(n=n.replace(/(^|[^\\])MMMM+/g,"$1"+o[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+c(d))).replace(/(^|[^\\])M/g,"$1"+d);var h=i?e.getUTCDate():e.getDate();n=(n=(n=(n=n.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+l[0])).replace(/(^|[^\\])dd/g,"$1"+c(h))).replace(/(^|[^\\])d/g,"$1"+h);var f=i?e.getUTCHours():e.getHours(),p=f>12?f-12:f===0?12:f;n=(n=(n=(n=n.replace(/(^|[^\\])HH+/g,"$1"+c(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+c(p))).replace(/(^|[^\\])h/g,"$1"+p);var m=i?e.getUTCMinutes():e.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+c(m))).replace(/(^|[^\\])m/g,"$1"+m);var b=i?e.getUTCSeconds():e.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+c(b))).replace(/(^|[^\\])s/g,"$1"+b);var _=i?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(_,3)),_=Math.round(_/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(_)),_=Math.round(_/10);var x=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+_)).replace(/(^|[^\\])TT+/g,"$1"+x)).replace(/(^|[^\\])T/g,"$1"+x.charAt(0));var k=x.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+k)).replace(/(^|[^\\])t/g,"$1"+k.charAt(0));var C=-e.getTimezoneOffset(),S=i||!C?"Z":C>0?"+":"-";if(!i){var E=(C=Math.abs(C))%60;S+=c(Math.floor(C/60))+":"+c(E)}n=n.replace(/(^|[^\\])K/g,"$1"+S);var P=(i?e.getUTCDay():e.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(a[0],"g"),a[P])).replace(new RegExp(l[0],"g"),l[P])).replace(new RegExp(o[0],"g"),o[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,n,s){var i=this.w;i.config.xaxis.min!==void 0&&(e=i.config.xaxis.min),i.config.xaxis.max!==void 0&&(n=i.config.xaxis.max);var o=this.getDate(e),r=this.getDate(n),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),l=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(l[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(l[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(l[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(l[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(l[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(l[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(l[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,n,s){return this.determineDaysOfMonths(e,n)-s}},{key:"determineDaysOfYear",value:function(e){var n=365;return this.isLeapYear(e)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(e,n,s){var i=this.daysCntOfYear[n]+s;return n>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(e,n){var s=30;switch(e=ue.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(s=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(e)>-1:default:s=31}return s}}]),t}(),_v=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return lt(t,[{key:"xLabelFormat",value:function(e,n,s,i){var o=this.w;if(o.config.xaxis.type==="datetime"&&o.config.xaxis.labels.formatter===void 0&&o.config.tooltip.x.formatter===void 0){var r=new ti(this.ctx);return r.formatDate(r.getDate(n),o.config.tooltip.x.format)}return e(n,s,i)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(n){return n}):e}},{key:"defaultYFormatter",value:function(e,n,s){var i=this.w;if(ue.isNumber(e))if(i.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:i.globals.yValueDecimal);else{var o=e.toFixed(0);e=e==o?o:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,n=this.w;return n.globals.xaxisTooltipFormatter=function(s){return e.defaultGeneralFormatter(s)},n.globals.ttKeyFormatter=function(s){return e.defaultGeneralFormatter(s)},n.globals.ttZFormatter=function(s){return s},n.globals.legendFormatter=function(s){return e.defaultGeneralFormatter(s)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(s){if(ue.isNumber(s)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(ue.isNumber(n.config.xaxis.decimalsInFloat))return s.toFixed(n.config.xaxis.decimalsInFloat);var i=n.globals.maxX-n.globals.minX;return i>0&&i<100?s.toFixed(1):s.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},typeof n.config.tooltip.x.formatter=="function"?n.globals.ttKeyFormatter=n.config.tooltip.x.formatter:n.globals.ttKeyFormatter=n.globals.xLabelFormatter,typeof n.config.xaxis.tooltip.formatter=="function"&&(n.globals.xaxisTooltipFormatter=n.config.xaxis.tooltip.formatter),(Array.isArray(n.config.tooltip.y)||n.config.tooltip.y.formatter!==void 0)&&(n.globals.ttVal=n.config.tooltip.y),n.config.tooltip.z.formatter!==void 0&&(n.globals.ttZFormatter=n.config.tooltip.z.formatter),n.config.legend.formatter!==void 0&&(n.globals.legendFormatter=n.config.legend.formatter),n.config.yaxis.forEach(function(s,i){s.labels.formatter!==void 0?n.globals.yLabelFormatters[i]=s.labels.formatter:n.globals.yLabelFormatters[i]=function(o){return n.globals.xyCharts?Array.isArray(o)?o.map(function(r){return e.defaultYFormatter(r,s,i)}):e.defaultYFormatter(o,s,i):o}}),n.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var n=e.globals.seriesNames.reduce(function(s,i){return s.length>i.length?s:i},0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}}]),t}(),Hc=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getLabel",value:function(e,n,s,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",a=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],l=this.w,c=e[i]===void 0?"":e[i],u=c,d=l.globals.xLabelFormatter,h=l.config.xaxis.labels.formatter,f=!1,p=new _v(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i,dateFormatter:new ti(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[i],{i,dateFormatter:new ti(this.ctx).formatDate,w:l})));var b,_;n.length>0?(b=n[i].unit,_=null,n.forEach(function(S){S.unit==="month"?_="year":S.unit==="day"?_="month":S.unit==="hour"?_="day":S.unit==="minute"&&(_="hour")}),f=_===b,s=n[i].position,u=n[i].value):l.config.xaxis.type==="datetime"&&h===void 0&&(u=""),u===void 0&&(u=""),u=Array.isArray(u)?u:u.toString();var x=new Ve(this.ctx),k={};k=l.globals.rotateXLabels&&a?x.getTextRects(u,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):x.getTextRects(u,parseInt(r,10));var C=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&C)&&(u=""),{x:s,text:u,textRect:k,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(e,n,s){var i=this.w,o=i.config.xaxis.tickAmount;return o==="dataPoints"&&(o=Math.round(i.globals.gridWidth/120)),o>s||e%Math.round(s/(o+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(e,n,s,i,o){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(n.text=""),e===s-1&&r.globals.skipLastTimelinelabel&&(n.text=""),r.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=o[o.length-1];n.x<a.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+a.x&&(n.text="")}return n}},{key:"checkForReversedLabels",value:function(e,n){var s=this.w;return s.config.yaxis[e]&&s.config.yaxis[e].reversed&&n.reverse(),n}},{key:"yAxisAllSeriesCollapsed",value:function(e){var n=this.w.globals;return!n.seriesYAxisMap[e].some(function(s){return n.collapsedSeriesIndices.indexOf(s)===-1})}},{key:"translateYAxisIndex",value:function(e){var n=this.w,s=n.globals,i=n.config.yaxis;return s.series.length>i.length||i.some(function(o){return Array.isArray(o.seriesName)})?e:s.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var n=this.w,s=n.config.yaxis[e];if(!s.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!s.showForNullSeries){var i=n.globals.seriesYAxisMap[e],o=new ys(this.ctx);return i.every(function(r){return o.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,n){var s=this.w;return Array.isArray(e)&&s.globals.yAxisScale[n]&&this.ctx.theme.pushExtraColors(e,s.globals.yAxisScale[n].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,n,s,i,o,r,a){var l=this.w,c=new Ve(this.ctx),u=l.globals.translateY+l.config.yaxis[o].labels.offsetY;if(l.globals.isBarHorizontal?u=0:l.config.chart.type==="heatmap"&&(u+=r/2),i.show&&n>0){l.config.yaxis[o].opposite===!0&&(e+=i.width);for(var d=n;d>=0;d--){var h=c.drawLine(e+s.offsetX-i.width+i.offsetX,u+i.offsetY,e+s.offsetX+i.offsetX,u+i.offsetY,i.color);a.add(h),u+=r}}}}]),t}(),J0t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new q2(this.annoCtx),this.axesUtils=new Hc(this.annoCtx)}return lt(t,[{key:"addYaxisAnnotation",value:function(e,n,s){var i,o=this.w,r=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),l=a.yP,c=a.clipped,u=!0,d=!1,h=e.label.text;if(e.y2===null||e.y2===void 0){if(!c){d=!0;var f=this.annoCtx.graphics.drawLine(0+e.offsetX,l+e.offsetY,this._getYAxisAnnotationWidth(e),l+e.offsetY,e.borderColor,r,e.borderWidth);n.appendChild(f.node),e.id&&f.node.classList.add(e.id)}}else{if(i=(a=this.helpers.getY1Y2("y2",e)).yP,u=a.clipped,i>l){var p=l;l=i,i=p}if(!c||!u){d=!0;var m=this.annoCtx.graphics.drawRect(0+e.offsetX,i+e.offsetY,this._getYAxisAnnotationWidth(e),l-i,0,e.fillColor,e.opacity,1,e.borderColor,r);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}if(d){var b=e.label.position==="right"?o.globals.gridWidth:e.label.position==="center"?o.globals.gridWidth/2:0,_=this.annoCtx.graphics.drawText({x:b+e.label.offsetX,y:(i??l)+e.label.offsetY-3,text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});_.attr({rel:s}),n.appendChild(_.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var n=this.w;return n.globals.gridWidth,(e.width.indexOf("%")>-1?n.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,n=this.w,s=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.forEach(function(i,o){i.yAxisIndex=e.axesUtils.translateYAxisIndex(i.yAxisIndex),e.axesUtils.isYAxisHidden(i.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(i.yAxisIndex)||e.addYaxisAnnotation(i,s.node,o)}),s}}]),t}(),Q0t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new q2(this.annoCtx)}return lt(t,[{key:"addPointAnnotation",value:function(e,n,s){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var i=this.helpers.getX1X2("x1",e),o=i.x,r=i.clipped,a=(i=this.helpers.getY1Y2("y1",e)).yP,l=i.clipped;if(ue.isNumber(o)&&!l&&!r){var c={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},u=this.annoCtx.graphics.drawMarker(o+e.marker.offsetX,a+e.marker.offsetY,c);n.appendChild(u.node);var d=e.label.text?e.label.text:"",h=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:a+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(h.attr({rel:s}),n.appendChild(h.node),e.customSVG.SVG){var f=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});f.attr({transform:"translate(".concat(o+e.customSVG.offsetX,", ").concat(a+e.customSVG.offsetY,")")}),f.node.innerHTML=e.customSVG.SVG,n.appendChild(f.node)}if(e.image.path){var p=e.image.width?e.image.width:20,m=e.image.height?e.image.height:20;u=this.annoCtx.addImage({x:o+e.image.offsetX-p/2,y:a+e.image.offsetY-m/2,width:p,height:m,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&u.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&u.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&u.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,n=this.w,s=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(i,o){e.addPointAnnotation(i,s.node,o)}),s}}]),t}(),tj={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},$u=function(){function t(){at(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return lt(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[tj],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,s){return n+s},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,s){return n+s},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),eyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.graphics=new Ve(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new q2(this),this.xAxisAnnotations=new Z0t(this),this.yAxisAnnotations=new J0t(this),this.pointsAnnotations=new Q0t(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return lt(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,r=[n,s,i],a=[s.node,n.node,i.node],l=0;l<3;l++)e.globals.dom.elGraphical.add(r[l]),!o||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&a[l].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[l],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(n,s){e.addImage(n,s)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(n,s){e.addText(n,s)})}},{key:"addXaxisAnnotation",value:function(e,n,s){this.xAxisAnnotations.addXaxisAnnotation(e,n,s)}},{key:"addYaxisAnnotation",value:function(e,n,s){this.yAxisAnnotations.addYaxisAnnotation(e,n,s)}},{key:"addPointAnnotation",value:function(e,n,s){this.pointsAnnotations.addPointAnnotation(e,n,s)}},{key:"addText",value:function(e,n){var s=e.x,i=e.y,o=e.text,r=e.textAnchor,a=e.foreColor,l=e.fontSize,c=e.fontFamily,u=e.fontWeight,d=e.cssClass,h=e.backgroundColor,f=e.borderWidth,p=e.strokeDashArray,m=e.borderRadius,b=e.borderColor,_=e.appendTo,x=_===void 0?".apexcharts-svg":_,k=e.paddingLeft,C=k===void 0?4:k,S=e.paddingRight,E=S===void 0?4:S,P=e.paddingBottom,T=P===void 0?2:P,L=e.paddingTop,I=L===void 0?2:L,V=this.w,R=this.graphics.drawText({x:s,y:i,text:o,textAnchor:r||"start",fontSize:l||"12px",fontWeight:u||"regular",fontFamily:c||V.config.chart.fontFamily,foreColor:a||V.config.chart.foreColor,cssClass:d}),N=V.globals.dom.baseEl.querySelector(x);N&&N.appendChild(R.node);var F=R.bbox();if(o){var B=this.graphics.drawRect(F.x-C,F.y-I,F.width+C+E,F.height+T+I,m,h||"transparent",1,f,b,p);N.insertBefore(B.node,R.node)}}},{key:"addImage",value:function(e,n){var s=this.w,i=e.path,o=e.x,r=o===void 0?0:o,a=e.y,l=a===void 0?0:a,c=e.width,u=c===void 0?20:c,d=e.height,h=d===void 0?20:d,f=e.appendTo,p=f===void 0?".apexcharts-svg":f,m=s.globals.dom.Paper.image(i);m.size(u,h).move(r,l);var b=s.globals.dom.baseEl.querySelector(p);return b&&b.appendChild(m.node),m}},{key:"addXaxisAnnotationExternal",value:function(e,n,s){return this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}},{key:"addYaxisAnnotationExternal",value:function(e,n,s){return this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}},{key:"addPointAnnotationExternal",value:function(e,n,s){return this.invertAxis===void 0&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}},{key:"addAnnotationExternal",value:function(e){var n=e.params,s=e.pushToMemory,i=e.context,o=e.type,r=e.contextMethod,a=i,l=a.w,c=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),u=c.childNodes.length+1,d=new $u,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=ue.extend(h,n);switch(o){case"xaxis":this.addXaxisAnnotation(f,c,u);break;case"yaxis":this.addYaxisAnnotation(f,c,u);break;case"point":this.addPointAnnotation(f,c,u)}var p=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(u,"']")),m=this.helpers.addBackgroundToAnno(p,f);return m&&c.insertBefore(m.node,p),s&&l.globals.memory.methodsToExec.push({context:a,id:f.id?f.id:ue.randomId(),method:r,label:"addAnnotation",params:n}),i}},{key:"clearAnnotations",value:function(e){for(var n=e.w,s=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=n.globals.memory.methodsToExec.length-1;i>=0;i--)n.globals.memory.methodsToExec[i].label!=="addText"&&n.globals.memory.methodsToExec[i].label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(i,1);s=ue.listToArray(s),Array.prototype.forEach.call(s,function(o){for(;o.firstChild;)o.removeChild(o.firstChild)})}},{key:"removeAnnotation",value:function(e,n){var s=e.w,i=s.globals.dom.baseEl.querySelectorAll(".".concat(n));i&&(s.globals.memory.methodsToExec.map(function(o,r){o.id===n&&s.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(i,function(o){o.parentElement.removeChild(o)}))}}]),t}(),K3=function(t){var e,n=t.isTimeline,s=t.ctx,i=t.seriesIndex,o=t.dataPointIndex,r=t.y1,a=t.y2,l=t.w,c=l.globals.seriesRangeStart[i][o],u=l.globals.seriesRangeEnd[i][o],d=l.globals.labels[o],h=l.config.series[i].name?l.config.series[i].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,m={w:l,seriesIndex:i,dataPointIndex:o,start:c,end:u};typeof p=="function"&&(h=p(h,m)),(e=l.config.series[i].data[o])!==null&&e!==void 0&&e.x&&(d=l.config.series[i].data[o].x),n||l.config.xaxis.type==="datetime"&&(d=new _v(s).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new ti(s).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var b="",_="",x=l.globals.colors[i];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var k=new ti(s);b=k.formatDate(k.getDate(c),l.config.tooltip.x.format),_=k.formatDate(k.getDate(u),l.config.tooltip.x.format)}else b=c,_=u;else b=l.config.tooltip.x.formatter(c),_=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:b,endVal:_,ylabel:d,color:x,seriesName:h}},Z3=function(t){var e=t.color,n=t.seriesName,s=t.ylabel,i=t.start,o=t.end,r=t.seriesIndex,a=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(r);i=l.yLbFormatter(i),o=l.yLbFormatter(o);var c=l.yLbFormatter(t.w.globals.series[r][a]),u=`<span class="value start-value">
166 `.concat(i,`
167 </span> <span class="separator">-</span> <span class="value end-value">
168 `).concat(o,`
169 </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(n||"")+'</span></div><div> <span class="category">'+s+": </span> "+(t.w.globals.comboCharts?t.w.config.series[r].type==="rangeArea"||t.w.config.series[r].type==="rangeBar"?u:"<span>".concat(c,"</span>"):u)+" </div></div>"},v1=function(){function t(e){at(this,t),this.opts=e}return lt(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),ue.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,n){var s=n.w.config.series[n.seriesIndex].name;return e!==null?s+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),et(et({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var s=n.seriesIndex,i=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,s,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var s=n.seriesIndex,i=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,s,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,n){n.ctx;var s=n.seriesIndex,i=n.dataPointIndex,o=n.w,r=function(){var a=o.globals.seriesRangeStart[s][i];return o.globals.seriesRangeEnd[s][i]-a};return o.globals.comboCharts?o.config.series[s].type==="rangeBar"||o.config.series[s].type==="rangeArea"?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(n){var s=K3(et(et({},n),{},{isTimeline:!0})),i=s.color,o=s.seriesName,r=s.ylabel,a=s.startVal,l=s.endVal;return Z3(et(et({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var s=K3(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return Z3(et(et({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var n,s;return(n=e.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(e.plotOptions.bar.barHeight=2),(s=e.plotOptions.bar)!==null&&s!==void 0&&s.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return function(n){var s=K3(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return Z3(et(et({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return ue.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var n=e.dataLabels.formatter;return e.yaxis.forEach(function(s,i){e.yaxis[i].min=0,e.yaxis[i].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(s){return typeof s=="number"&&s?s.toFixed(0)+"%":s}),e}},{key:"stackedBars",value:function(){var e=this.bar();return et(et({},e),{},{plotOptions:et(et({},e.plotOptions),{},{bar:et(et({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,n,s){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return ue.isNumber(r)?Math.floor(r):r};var i=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return s&&s.length&&(o=s.map(function(r){return Array.isArray(r)?r:String(r)})),o&&o.length&&(e.xaxis.labels.formatter=function(r){return ue.isNumber(r)?i(o[Math.floor(r)-1]):i(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,n,s,i,o){var r=e.globals.seriesCandleO[n][s],a=e.globals.seriesCandleH[n][s],l=e.globals.seriesCandleM[n][s],c=e.globals.seriesCandleL[n][s],u=e.globals.seriesCandleC[n][s];return e.config.series[n].type&&e.config.series[n].type!==o?`<div class="apexcharts-custom-tooltip">
170 `.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][s],`</strong>
171 </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(i[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(i[1],': <span class="value">')+a+"</span></div>"+(l?"<div>".concat(i[2],': <span class="value">')+l+"</span></div>":"")+"<div>".concat(i[3],': <span class="value">')+c+"</span></div>"+"<div>".concat(i[4],': <span class="value">')+u+"</span></div></div>"}}]),t}(),y1=function(){function t(e){at(this,t),this.opts=e}return lt(t,[{key:"init",value:function(e){var n=e.responsiveOverride,s=this.opts,i=new $u,o=new v1(s);this.chartType=s.chart.type,s=this.extendYAxis(s),s=this.extendAnnotations(s);var r=i.init(),a={};if(s&&Kf(s)==="object"){var l,c,u,d,h,f,p,m,b,_,x={};x=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(s.chart.type)!==-1?o[s.chart.type]():o.line(),(l=s.plotOptions)!==null&&l!==void 0&&(c=l.bar)!==null&&c!==void 0&&c.isFunnel&&(x=o.funnel()),s.chart.stacked&&s.chart.type==="bar"&&(x=o.stackedBars()),(u=s.chart.brush)!==null&&u!==void 0&&u.enabled&&(x=o.brush(x)),(d=s.plotOptions)!==null&&d!==void 0&&(h=d.line)!==null&&h!==void 0&&h.isSlopeChart&&(x=o.slope()),s.chart.stacked&&s.chart.stackType==="100%"&&(s=o.stacked100(s)),(f=s.plotOptions)!==null&&f!==void 0&&(p=f.bar)!==null&&p!==void 0&&p.isDumbbell&&(s=o.dumbbell(s)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(s),s.xaxis=s.xaxis||window.Apex.xaxis||{},n||(s.xaxis.convertedCatToNumeric=!1),((m=(s=this.checkForCatToNumericXAxis(this.chartType,x,s)).chart.sparkline)!==null&&m!==void 0&&m.enabled||(b=window.Apex.chart)!==null&&b!==void 0&&(_=b.sparkline)!==null&&_!==void 0&&_.enabled)&&(x=o.sparkline(x)),a=ue.extend(r,x)}var k=ue.extend(a,window.Apex);return r=ue.extend(k,s),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,s){var i,o,r=new v1(s),a=(e==="bar"||e==="boxPlot")&&((i=s.plotOptions)===null||i===void 0||(o=i.bar)===null||o===void 0?void 0:o.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",c=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",u=s.xaxis.tickPlacement?s.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return a||l||!c||u==="between"||(s=r.convertCatToNumeric(s)),s}},{key:"extendYAxis",value:function(e,n){var s=new $u;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=ue.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[ue.extend(s.yAxis,e.yaxis)]:e.yaxis=ue.extendArray(e.yaxis,s.yAxis);var i=!1;e.yaxis.forEach(function(r){r.logarithmic&&(i=!0)});var o=e.series;return n&&!o&&(o=n.config.series),i&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map(function(r,a){if(r.name||(o[a].name="series-".concat(a+1)),e.yaxis[a])return e.yaxis[a].seriesName=o[a].name,e.yaxis[a];var l=ue.extend(s.yAxis,e.yaxis[0]);return l.show=!1,l})),i&&o.length>1&&o.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var n=new $u;return e.annotations.yaxis=ue.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new $u;return e.annotations.xaxis=ue.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new $u;return e.annotations.points=ue.extendArray(e.annotations.points!==void 0?e.annotations.points:[],n.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var n=e;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return n.chart.type!=="bar"&&n.chart.type!=="rangeBar"||n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),n.chart.type!=="candlestick"&&n.chart.type!=="boxPlot"||n.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(n.chart.type," chart is not supported.")),n.yaxis[0].reversed=!1),n}}]),t}(),nj=function(){function t(){at(this,t)}return lt(t,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var n=this.globalVars(e);return this.initGlobalVars(n),n.initialConfig=ue.extend({},e),n.initialSeries=ue.clone(e.series),n.lastXAxis=ue.clone(n.initialConfig.xaxis),n.lastYAxis=ue.clone(n.initialConfig.yaxis),n}}]),t}(),tyt=function(){function t(e){at(this,t),this.opts=e}return lt(t,[{key:"init",value:function(){var e=new y1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new nj().init(e)}}}]),t}(),zr=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return lt(t,[{key:"clippedImgArea",value:function(e){var n=this.w,s=n.config,i=parseInt(n.globals.gridWidth,10),o=parseInt(n.globals.gridHeight,10),r=i>o?i:o,a=e.image,l=0,c=0;e.width===void 0&&e.height===void 0?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(l=s.fill.image.width+1,c=s.fill.image.height):(l=r+1,c=r):(l=e.width,c=e.height);var u=document.createElementNS(n.globals.SVGNS,"pattern");Ve.setAttrs(u,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});var d=document.createElementNS(n.globals.SVGNS,"image");u.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",a),Ve.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),d.style.opacity=e.opacity,n.globals.dom.elDefs.node.appendChild(u)}},{key:"getSeriesIndex",value:function(e){var n=this.w,s=n.config.chart.type;return(s==="bar"||s==="rangeBar")&&n.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,n){var s,i=this.w,o=null,r=null,a=Sm(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;l>=n.threshold?(o===null||l>o)&&(o=l):(r===null||l<r)&&(r=l)}}catch(d){a.e(d)}finally{a.f()}o===null&&(o=n.threshold),r===null&&(r=n.threshold);var c=o-n.threshold+(n.threshold-r);c===0&&(c=1);var u=100-(n.threshold-r)/c*100;return[{offset:u=Math.max(0,Math.min(u,100)),color:n.colorAboveThreshold,opacity:i.config.fill.opacity},{offset:0,color:n.colorBelowThreshold,opacity:i.config.fill.opacity}]}},{key:"fillPath",value:function(e){var n,s,i,o=this.w;this.opts=e;var r,a,l,c=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var u=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold,d=this.getFillColors()[this.seriesIndex];o.globals.seriesColors[this.seriesIndex]!==void 0&&(d=o.globals.seriesColors[this.seriesIndex]),typeof d=="function"&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:o}));var h,f,p,m=e.fillType?e.fillType:this.getFillType(this.seriesIndex),b=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity,_=m==="gradient"||u;e.color&&(d=e.color),(n=o.config.series[this.seriesIndex])!==null&&n!==void 0&&(s=n.data)!==null&&s!==void 0&&(i=s[e.dataPointIndex])!==null&&i!==void 0&&i.fillColor&&(d=(h=o.config.series[this.seriesIndex])===null||h===void 0||(f=h.data)===null||f===void 0||(p=f[e.dataPointIndex])===null||p===void 0?void 0:p.fillColor),d||(d="#fff",console.warn("undefined color - ApexCharts"));var x=d;if(d.indexOf("rgb")===-1?d.indexOf("#")===-1?x=d:d.length<9&&(x=ue.hexToRgba(d,b)):d.indexOf("rgba")>-1?b=ue.getOpacityFromRGBA(d):x=ue.hexToRgba(ue.rgb2hex(d),b),e.opacity&&(b=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:b,defaultColor:x})),_){var k=Rs(c.fill.gradient.colorStops)||[],C=c.fill.gradient.type;u&&(k[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),C="vertical"),l=this.handleGradientFill({type:C,fillConfig:e.fillConfig,fillColor:d,fillOpacity:b,colorStops:k,i:this.seriesIndex})}if(m==="image"){var S=c.fill.image.src,E=e.patternID?e.patternID:"",P="pattern".concat(o.globals.cuid).concat(e.seriesNumber+1).concat(E);this.patternIDs.indexOf(P)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(S)?e.seriesNumber<S.length?S[e.seriesNumber]:S[0]:S,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:P}),this.patternIDs.push(P)),r="url(#".concat(P,")")}else r=_?l:m==="pattern"?a:x;return e.solid&&(r=x),r}},{key:"getFillType",value:function(e){var n=this.w;return Array.isArray(n.config.fill.type)?n.config.fill.type[e]:n.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,n=e.config,s=this.opts,i=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors):n.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors),s.fillColors!==void 0&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}},{key:"handlePatternFill",value:function(e){var n=e.fillConfig,s=e.patternFill,i=e.fillColor,o=e.fillOpacity,r=e.defaultColor,a=this.w.config.fill;n&&(a=n);var l=this.opts,c=new Ve(this.ctx),u=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,d=i;return Array.isArray(a.pattern.style)?s=a.pattern.style[l.seriesNumber]!==void 0?c.drawPattern(a.pattern.style[l.seriesNumber],a.pattern.width,a.pattern.height,d,u,o):r:s=c.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,d,u,o),s}},{key:"handleGradientFill",value:function(e){var n=e.type,s=e.fillColor,i=e.fillOpacity,o=e.fillConfig,r=e.colorStops,a=e.i,l=this.w.config.fill;o&&(l=et(et({},l),o));var c=this.opts,u=new Ve(this.ctx),d=new ue;n=n||l.gradient.type;var h,f=s,p=l.gradient.opacityFrom===void 0?i:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[a]:l.gradient.opacityFrom;f.indexOf("rgba")>-1&&(p=ue.getOpacityFromRGBA(f));var m=l.gradient.opacityTo===void 0?i:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[a]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)h=l.gradient.shade==="dark"?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),s.indexOf("rgb")>-1?ue.rgb2hex(s):s):d.shadeColor(parseFloat(l.gradient.shadeIntensity),s.indexOf("rgb")>-1?ue.rgb2hex(s):s);else if(l.gradient.gradientToColors[c.seriesNumber]){var b=l.gradient.gradientToColors[c.seriesNumber];h=b,b.indexOf("rgba")>-1&&(m=ue.getOpacityFromRGBA(b))}else h=s;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){var _=f;f=h,h=_}return f.indexOf("rgb")>-1&&(f=ue.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=ue.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),Op=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var n=0;n<=e.globals.series.length;n++)e.globals.markers.size[n]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(s){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,n,s,i){var o=arguments.length>4&&arguments[4]!==void 0&&arguments[4],r=this.w,a=n,l=e,c=null,u=new Ve(this.ctx),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(var h=0;h<l.x.length;h++){var f=void 0,p=s,m=!ue.isNumber(l.y[h]);s===1&&h===0&&(p=0),s===1&&h===1&&(p=1);var b="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(b+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[n]>0:r.config.markers.size>0)||o||d){m||(b+=" w".concat(ue.randomId()));var _=this.getMarkerConfig({cssClass:b,seriesIndex:n,dataPointIndex:p});r.config.series[a].data[p]&&(r.config.series[a].data[p].fillColor&&(_.pointFillColor=r.config.series[a].data[p].fillColor),r.config.series[a].data[p].strokeColor&&(_.pointStrokeColor=r.config.series[a].data[p].strokeColor)),i!==void 0&&(_.pSize=i),(l.x[h]<-r.globals.markers.largestSize||l.x[h]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[h]<-r.globals.markers.largestSize||l.y[h]>r.globals.gridHeight+r.globals.markers.largestSize)&&(_.pSize=0),!m&&((r.globals.markers.size[n]>0||o||d)&&!c&&(c=u.group({class:o||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(f=u.drawMarker(l.x[h],l.y[h],_)).attr("rel",p),f.attr("j",p),f.attr("index",n),f.node.setAttribute("default-marker-size",_.pSize),new ai(this.ctx).setSelectionFilter(f,n,p),this.addEvents(f),c&&c.add(f))}else r.globals.pointsArray[n]===void 0&&(r.globals.pointsArray[n]=[]),r.globals.pointsArray[n].push([l.x[h],l.y[h]])}return c}},{key:"getMarkerConfig",value:function(e){var n=e.cssClass,s=e.seriesIndex,i=e.dataPointIndex,o=i===void 0?null:i,r=e.radius,a=r===void 0?null:r,l=e.size,c=l===void 0?null:l,u=e.strokeWidth,d=u===void 0?null:u,h=this.w,f=this.getMarkerStyle(s),p=c===null?h.globals.markers.size[s]:c,m=h.config.markers;return o!==null&&m.discrete.length&&m.discrete.map(function(b){b.seriesIndex===s&&b.dataPointIndex===o&&(f.pointStrokeColor=b.strokeColor,f.pointFillColor=b.fillColor,p=b.size,f.pointShape=b.shape)}),{pSize:a===null?p:a,pRadius:a!==null?a:m.radius,pointStrokeWidth:d!==null?d:Array.isArray(m.strokeWidth)?m.strokeWidth[s]:m.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(m.shape)?m.shape[s]:m.shape),class:n,pointStrokeOpacity:Array.isArray(m.strokeOpacity)?m.strokeOpacity[s]:m.strokeOpacity,pointStrokeDashArray:Array.isArray(m.strokeDashArray)?m.strokeDashArray[s]:m.strokeDashArray,pointFillOpacity:Array.isArray(m.fillOpacity)?m.fillOpacity[s]:m.fillOpacity,seriesIndex:s}}},{key:"addEvents",value:function(e){var n=this.w,s=new Ve(this.ctx);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",s.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",n.config.markers.onClick),e.node.addEventListener("dblclick",n.config.markers.onDblClick),e.node.addEventListener("touchstart",s.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var n=this.w,s=n.globals.markers.colors,i=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[e]:i,pointFillColor:Array.isArray(s)?s[e]:s}}}]),t}(),sj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return lt(t,[{key:"draw",value:function(e,n,s){var i=this.w,o=new Ve(this.ctx),r=s.realIndex,a=s.pointsPos,l=s.zRatio,c=s.elParent,u=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(i.config.chart.type)});if(u.attr("clip-path","url(#gridRectMarkerMask".concat(i.globals.cuid,")")),Array.isArray(a.x))for(var d=0;d<a.x.length;d++){var h=n+1,f=!0;n===0&&d===0&&(h=0),n===0&&d===1&&(h=1);var p=i.globals.markers.size[r];if(l!==1/0){var m=i.config.plotOptions.bubble;p=i.globals.seriesZ[r][h],m.zScaling&&(p/=l),m.minBubbleRadius&&p<m.minBubbleRadius&&(p=m.minBubbleRadius),m.maxBubbleRadius&&p>m.maxBubbleRadius&&(p=m.maxBubbleRadius)}var b=a.x[d],_=a.y[d];if(p=p||0,_!==null&&i.globals.series[r][h]!==void 0||(f=!1),f){var x=this.drawPoint(b,_,p,r,h,n);u.add(x)}c.add(u)}}},{key:"drawPoint",value:function(e,n,s,i,o,r){var a=this.w,l=i,c=new Tp(this.ctx),u=new ai(this.ctx),d=new zr(this.ctx),h=new Op(this.ctx),f=new Ve(this.ctx),p=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:o,radius:a.config.chart.type==="bubble"||a.globals.comboCharts&&a.config.series[i]&&a.config.series[i].type==="bubble"?s:null}),m=d.fillPath({seriesNumber:i,dataPointIndex:o,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][r]}),b=f.drawMarker(e,n,p);if(a.config.series[l].data[o]&&a.config.series[l].data[o].fillColor&&(m=a.config.series[l].data[o].fillColor),b.attr({fill:m}),a.config.chart.dropShadow.enabled){var _=a.config.chart.dropShadow;u.dropShadow(b,_,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var x=a.config.chart.animations.speed;c.animateMarker(b,x,a.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(b)},100)})}return b.attr({rel:o,j:o,index:i,"default-marker-size":p.pSize}),u.setSelectionFilter(b,i,o),h.addEvents(b),b.node.classList.add("apexcharts-marker"),b}},{key:"centerTextInBubble",value:function(e){var n=this.w;return{y:e+=parseInt(n.config.dataLabels.style.fontSize,10)/4}}}]),t}(),Zf=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"dataLabelsCorrection",value:function(e,n,s,i,o,r,a){var l=this.w,c=!1,u=new Ve(this.ctx).getTextRects(s,a),d=u.width,h=u.height;n<0&&(n=0),n>l.globals.gridHeight+h&&(n=l.globals.gridHeight+h/2),l.globals.dataLabelsRects[i]===void 0&&(l.globals.dataLabelsRects[i]=[]),l.globals.dataLabelsRects[i].push({x:e,y:n,width:d,height:h});var f=l.globals.dataLabelsRects[i].length-2,p=l.globals.lastDrawnDataLabelsIndexes[i]!==void 0?l.globals.lastDrawnDataLabelsIndexes[i][l.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(l.globals.dataLabelsRects[i][f]!==void 0){var m=l.globals.dataLabelsRects[i][p];(e>m.x+m.width||n>m.y+m.height||n+h<m.y||e+d<m.x)&&(c=!0)}return(o===0||r)&&(c=!0),{x:e,y:n,textRects:u,drawnextLabel:c}}},{key:"drawDataLabel",value:function(e){var n=this,s=e.type,i=e.pos,o=e.i,r=e.j,a=e.isRangeStart,l=e.strokeWidth,c=l===void 0?2:l,u=this.w,d=new Ve(this.ctx),h=u.config.dataLabels,f=0,p=0,m=r,b=null;if(u.globals.collapsedSeriesIndices.indexOf(o)!==-1||!h.enabled||!Array.isArray(i.x))return b;b=d.group({class:"apexcharts-data-labels"});for(var _=0;_<i.x.length;_++)if(f=i.x[_]+h.offsetX,p=i.y[_]+h.offsetY+c,!isNaN(f)){r===1&&_===0&&(m=0),r===1&&_===1&&(m=1);var x=u.globals.series[o][m];s==="rangeArea"&&(x=a?u.globals.seriesRangeStart[o][m]:u.globals.seriesRangeEnd[o][m]);var k="",C=function(E){return u.config.dataLabels.formatter(E,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(k=C(x=u.globals.seriesZ[o][m]),p=i.y[_],p=new sj(this.ctx).centerTextInBubble(p,o,m).y):x!==void 0&&(k=C(x));var S=u.config.dataLabels.textAnchor;u.globals.isSlopeChart&&(S=m===0?"end":m===u.config.series[o].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:p,text:k,i:o,j:m,parent:b,offsetCorrection:!0,dataLabelsConfig:u.config.dataLabels,textAnchor:S})}return b}},{key:"plotDataLabelsText",value:function(e){var n=this.w,s=new Ve(this.ctx),i=e.x,o=e.y,r=e.i,a=e.j,l=e.text,c=e.textAnchor,u=e.fontSize,d=e.parent,h=e.dataLabelsConfig,f=e.color,p=e.alwaysDrawDataLabel,m=e.offsetCorrection,b=e.className,_=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(r)<0)return _;var x={x:i,y:o,drawnextLabel:!0,textRects:null};m&&(x=this.dataLabelsCorrection(i,o,l,r,a,p,parseInt(h.style.fontSize,10))),n.globals.zoomed||(i=x.x,o=x.y),x.textRects&&(i<-20-x.textRects.width||i>n.globals.gridWidth+x.textRects.width+30)&&(l="");var k=n.globals.dataLabels.style.colors[r];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(k=n.globals.dataLabels.style.colors[a]),typeof k=="function"&&(k=k({series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n})),f&&(k=f);var C=h.offsetX,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(C=0,S=0),n.globals.isSlopeChart&&(a!==0&&(C=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&(C=0)),x.drawnextLabel){if((_=s.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+C,y:o+S,foreColor:k,textAnchor:c||h.textAnchor,text:l,fontSize:u||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:b||"apexcharts-datalabel",cx:i,cy:o}),h.dropShadow.enabled){var E=h.dropShadow;new ai(this.ctx).dropShadow(_,E)}d.add(_),n.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[r]=[]),n.globals.lastDrawnDataLabelsIndexes[r].push(a)}return _}},{key:"addBackgroundToDataLabel",value:function(e,n){var s=this.w,i=s.config.dataLabels.background,o=i.padding,r=i.padding/2,a=n.width,l=n.height,c=new Ve(this.ctx).drawRect(n.x-o,n.y-r/2,a+2*o,l+r,i.borderRadius,s.config.chart.background!=="transparent"&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new ai(this.ctx).dropShadow(c,i.dropShadow),c}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),s=0;s<n.length;s++){var i=n[s],o=i.getBBox(),r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(i,o)),r){i.parentNode.insertBefore(r.node,i);var a=i.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:a}):r.attr({fill:a}),i.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),i=0;i<n.length;i++)s&&s.insertBefore(n[i],s.nextSibling)}}]),t}(),hr=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return lt(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(ue.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var n=this.getSeriesByName(e),s=parseInt(n.getAttribute("data:realIndex"),10);return{isHidden:n.classList.contains("apexcharts-series-collapsed"),realIndex:s}}},{key:"addCollapsedClassToSeries",value:function(e,n){var s=this.w;function i(o){for(var r=0;r<o.length;r++)o[r].index===n&&e.node.classList.add("apexcharts-series-collapsed")}i(s.globals.collapsedSeries),i(s.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var n=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,n.isHidden),n.isHidden}},{key:"showSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!0)}},{key:"hideSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=this.w,o=ue.clone(i.globals.initialSeries);i.globals.previousPaths=[],s?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),i.config.series=o,e&&(n&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var n=this.w,s=0;s<e.length;s++)n.globals.collapsedSeriesIndices.indexOf(s)>-1&&(e[s].data=[]);return e}},{key:"highlightSeries",value:function(e){var n=this.w,s=this.getSeriesByName(e),i=parseInt(s==null?void 0:s.getAttribute("data:realIndex"),10),o=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,a=null,l=null;if(n.globals.axisCharts||n.config.chart.type==="radialBar")if(n.globals.axisCharts){r=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var c=n.globals.seriesYAxisReverseMap[i];l=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(c,"']"))}else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var u=0;u<o.length;u++)o[u].classList.add(this.legendInactiveClass);if(r)n.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),a!==null&&a.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass);else for(var d=0;d<o.length;d++)o[d].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,n){var s=this.w;n||(n=e.target);var i=s.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var o=parseInt(n.getAttribute("rel"),10)-1;this.highlightSeries(s.globals.seriesNames[o])}else if(e.type==="mouseout")for(var r=0;r<i.length;r++)i[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,n){var s=this,i=this.w,o=i.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(c){for(var u=0;u<o.length;u++)o[u].classList[c](s.legendInactiveClass)};if(e.type==="mousemove"){var a=parseInt(n.getAttribute("rel"),10)-1;r("add");var l=i.config.plotOptions.heatmap.colorScale.ranges;(function(c,u){for(var d=0;d<o.length;d++){var h=Number(o[d].getAttribute("val"));h>=c.from&&(h<c.to||c.to===u&&h===u)&&o[d].classList.remove(s.legendInactiveClass)}})(l[a],l.reduce(function(c,u){return Math.max(c,u.to)},0))}else e.type==="mouseout"&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=this.w,i=0;if(s.config.series.length>1){for(var o=s.config.series.map(function(a,l){return a.data&&a.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(l)===-1&&(!s.globals.comboCharts||n.length===0||n.length&&n.indexOf(s.config.series[l].type)>-1)?l:-1}),r=e==="asc"?0:o.length-1;e==="asc"?r<o.length:r>=0;e==="asc"?r++:r--)if(o[r]!==-1){i=o[r];break}}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,n){return e.type==="bar"||e.type==="column"?n:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,n){return n})}},{key:"getPreviousPaths",value:function(){var e=this.w;function n(r,a,l){for(var c=r[a].childNodes,u={type:l,paths:[],realIndex:r[a].getAttribute("data:realIndex")},d=0;d<c.length;d++)if(c[d].hasAttribute("pathTo")){var h=c[d].getAttribute("pathTo");u.paths.push({d:h})}e.globals.previousPaths.push(u)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(r){for(var a,l=(a=r,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),c=0;c<l.length;c++)n(l,c,r)});var s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(s.length>0)for(var i=function(r){for(var a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),l=[],c=function(d){var h=function(p){return a[d].getAttribute(p)},f={x:parseFloat(h("x")),y:parseFloat(h("y")),width:parseFloat(h("width")),height:parseFloat(h("height"))};l.push({rect:f,color:a[d].getAttribute("color")})},u=0;u<a.length;u++)c(u);e.globals.previousPaths.push(l)},o=0;o<s.length;o++)i(o);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,n=e.config.noData,s=new Ve(this.ctx),i=e.globals.svgWidth/2,o=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align==="left"?(i=10,r="start"):n.align==="right"&&(i=e.globals.svgWidth-10,r="end"),n.verticalAlign==="top"?o=50:n.verticalAlign==="bottom"&&(o=e.globals.svgHeight-50),i+=n.offsetX,o=o+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==""){var a=s.drawText({x:i,y:o,text:n.text,textAnchor:r,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var n=this.w,s=0;s<e.length;s++)if(e[s].length===0)for(var i=0;i<e[n.globals.maxValsInArrayIndex].length;i++)e[s].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,n=this.w,s=this.filteredSeriesX(),i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){e=!1;break}return n.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(n){return n.length>0?n:[]});return e}}]),t}(),NS=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new ys(this.ctx)}return lt(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),n=new hr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),n=new hr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,n){for(var s=this.w.config,i=this.w.globals,o=s.chart.type==="boxPlot"||s.series[n].type==="boxPlot",r=0;r<e[n].data.length;r++)if(e[n].data[r][1]!==void 0&&(Array.isArray(e[n].data[r][1])&&e[n].data[r][1].length===4&&!o?this.twoDSeries.push(ue.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(ue.parseNumber(e[n].data[r][4])):this.twoDSeries.push(ue.parseNumber(e[n].data[r][1])),i.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){var a=new Date(e[n].data[r][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[n].data[r][0]);for(var l=0;l<e[n].data.length;l++)e[n].data[l][2]!==void 0&&(this.threeDSeries.push(e[n].data[l][2]),i.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,n){var s=this.w.config,i=this.w.globals,o=new ti(this.ctx),r=n;i.collapsedSeriesIndices.indexOf(n)>-1&&(r=this.activeSeriesIndex);for(var a=0;a<e[n].data.length;a++)e[n].data[a].y!==void 0&&(Array.isArray(e[n].data[a].y)?this.twoDSeries.push(ue.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(ue.parseNumber(e[n].data[a].y))),e[n].data[a].goals!==void 0&&Array.isArray(e[n].data[a].goals)?(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(e[n].data[a].goals)):(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(null));for(var l=0;l<e[r].data.length;l++){var c=typeof e[r].data[l].x=="string",u=Array.isArray(e[r].data[l].x),d=!u&&!!o.isValidDate(e[r].data[l].x);if(c||d)if(c||s.xaxis.convertedCatToNumeric){var h=i.isBarHorizontal&&i.isRangeData;s.xaxis.type!=="datetime"||h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x),isNaN(e[r].data[l].x)||this.w.config.xaxis.type==="category"||typeof e[r].data[l].x=="string"||(i.isXNumeric=!0)):this.twoDSeriesX.push(o.parseDate(e[r].data[l].x))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(o.parseDate(e[r].data[l].x.toString())):(i.dataFormatXNumeric=!0,i.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[l].x)));else u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x)):(i.isXNumeric=!0,i.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[r].data[l].x))}if(e[n].data[0]&&e[n].data[0].z!==void 0){for(var f=0;f<e[n].data.length;f++)this.threeDSeries.push(e[n].data[f].z);i.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,n){var s=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleRangeDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleRangeDataFormat("xy",e,n)),s.seriesRangeStart.push(i.start===void 0?[]:i.start),s.seriesRangeEnd.push(i.end===void 0?[]:i.end),s.seriesRange.push(i.rangeUniques),s.seriesRange.forEach(function(o,r){o&&o.forEach(function(a,l){a.y.forEach(function(c,u){for(var d=0;d<a.y.length;d++)if(u!==d){var h=c.y1,f=c.y2,p=a.y[d].y1;h<=a.y[d].y2&&p<=f&&(a.overlaps.indexOf(c.rangeName)<0&&a.overlaps.push(c.rangeName),a.overlaps.indexOf(a.y[d].rangeName)<0&&a.overlaps.push(a.y[d].rangeName))}})})}),i}},{key:"handleCandleStickBoxData",value:function(e,n){var s=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",e,n)),s.seriesCandleO[n]=i.o,s.seriesCandleH[n]=i.h,s.seriesCandleM[n]=i.m,s.seriesCandleL[n]=i.l,s.seriesCandleC[n]=i.c,i}},{key:"handleRangeDataFormat",value:function(e,n,s){var i=[],o=[],r=n[s].data.filter(function(u,d,h){return d===h.findIndex(function(f){return f.x===u.x})}).map(function(u,d){return{x:u.x,overlaps:[],y:[]}});if(e==="array")for(var a=0;a<n[s].data.length;a++)Array.isArray(n[s].data[a])?(i.push(n[s].data[a][1][0]),o.push(n[s].data[a][1][1])):(i.push(n[s].data[a]),o.push(n[s].data[a]));else if(e==="xy")for(var l=function(u){var d=Array.isArray(n[s].data[u].y),h=ue.randomId(),f=n[s].data[u].x,p={y1:d?n[s].data[u].y[0]:n[s].data[u].y,y2:d?n[s].data[u].y[1]:n[s].data[u].y,rangeName:h};n[s].data[u].rangeName=h;var m=r.findIndex(function(b){return b.x===f});r[m].y.push(p),i.push(p.y1),o.push(p.y2)},c=0;c<n[s].data.length;c++)l(c);return{start:i,end:o,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,n,s){var i=this.w,o=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",r=[],a=[],l=[],c=[],u=[];if(e==="array")if(o&&n[s].data[0].length===6||!o&&n[s].data[0].length===5)for(var d=0;d<n[s].data.length;d++)r.push(n[s].data[d][1]),a.push(n[s].data[d][2]),o?(l.push(n[s].data[d][3]),c.push(n[s].data[d][4]),u.push(n[s].data[d][5])):(c.push(n[s].data[d][3]),u.push(n[s].data[d][4]));else for(var h=0;h<n[s].data.length;h++)Array.isArray(n[s].data[h][1])&&(r.push(n[s].data[h][1][0]),a.push(n[s].data[h][1][1]),o?(l.push(n[s].data[h][1][2]),c.push(n[s].data[h][1][3]),u.push(n[s].data[h][1][4])):(c.push(n[s].data[h][1][2]),u.push(n[s].data[h][1][3])));else if(e==="xy")for(var f=0;f<n[s].data.length;f++)Array.isArray(n[s].data[f].y)&&(r.push(n[s].data[f].y[0]),a.push(n[s].data[f].y[1]),o?(l.push(n[s].data[f].y[2]),c.push(n[s].data[f].y[3]),u.push(n[s].data[f].y[4])):(c.push(n[s].data[f].y[2]),u.push(n[s].data[f].y[3])));return{o:r,h:a,m:l,l:c,c:u}}},{key:"parseDataAxisCharts",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,i=this.w.config,o=this.w.globals,r=new ti(s),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();o.isRangeBar=i.chart.type==="rangeBar"&&o.isBarHorizontal,o.hasXaxisGroups=i.xaxis.type==="category"&&i.xaxis.group.groups.length>0,o.hasXaxisGroups&&(o.groups=i.xaxis.group.groups),e.forEach(function(f,p){f.name!==void 0?o.seriesNames.push(f.name):o.seriesNames.push("series-"+parseInt(p+1,10))}),this.coreUtils.setSeriesYAxisMappings();var l=[],c=Rs(new Set(i.series.map(function(f){return f.group})));i.series.forEach(function(f,p){var m=c.indexOf(f.group);l[m]||(l[m]=[]),l[m].push(o.seriesNames[p])}),o.seriesGroups=l;for(var u=function(){for(var f=0;f<a.length;f++)if(typeof a[f]=="string"){if(!r.isValidDate(a[f]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");n.twoDSeriesX.push(r.parseDate(a[f]))}else n.twoDSeriesX.push(a[f])},d=0;d<e.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[d].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(i.chart.type!=="rangeBar"&&i.chart.type!=="rangeArea"&&e[d].type!=="rangeBar"&&e[d].type!=="rangeArea"||(o.isRangeData=!0,i.chart.type!=="rangeBar"&&i.chart.type!=="rangeArea"||this.handleRangeData(e,d)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,d):this.isFormatXY()&&this.handleFormatXY(e,d),i.chart.type!=="candlestick"&&e[d].type!=="candlestick"&&i.chart.type!=="boxPlot"&&e[d].type!=="boxPlot"||this.handleCandleStickBoxData(e,d),o.series.push(this.twoDSeries),o.labels.push(this.twoDSeriesX),o.seriesX.push(this.twoDSeriesX),o.seriesGoals=this.seriesGoals,d!==this.activeSeriesIndex||this.fallbackToCategory||(o.isXNumeric=!0);else{i.xaxis.type==="datetime"?(o.isXNumeric=!0,u(),o.seriesX.push(this.twoDSeriesX)):i.xaxis.type==="numeric"&&(o.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,o.seriesX.push(this.twoDSeriesX))),o.labels.push(this.twoDSeriesX);var h=e[d].data.map(function(f){return ue.parseNumber(f)});o.series.push(h)}o.seriesZ.push(this.threeDSeries),e[d].color!==void 0?o.seriesColors.push(e[d].color):o.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var n=this.w.globals,s=this.w.config;n.series=e.slice(),n.seriesNames=s.labels.slice();for(var i=0;i<n.series.length;i++)n.seriesNames[i]===void 0&&n.seriesNames.push("series-"+(i+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var n=this.w.config,s=this.w.globals;n.xaxis.categories.length>0?s.labels=n.xaxis.categories:n.labels.length>0?s.labels=n.labels.slice():this.fallbackToCategory?(s.labels=s.labels[0],s.seriesRange.length&&(s.seriesRange.map(function(i){i.forEach(function(o){s.labels.indexOf(o.x)<0&&o.x&&s.labels.push(o.x)})}),s.labels=Array.from(new Set(s.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new v1(n).convertCatToNumericXaxis(n,this.ctx,s.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var n=this.w.globals,s=this.w.config,i=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var o=s.series.map(function(d,h){return d.data.filter(function(f,p,m){return m.findIndex(function(b){return b.x===f.x})===p})}),r=o.reduce(function(d,h,f,p){return p[d].length>h.length?d:f},0),a=0;a<o[r].length;a++)i.push(a+1);else for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++)i.push(l+1);n.seriesX=[];for(var c=0;c<e.length;c++)n.seriesX.push(i);this.w.globals.isBarHorizontal||(n.isXNumeric=!0)}if(i.length===0){i=n.axisCharts?[]:n.series.map(function(d,h){return h+1});for(var u=0;u<e.length;u++)n.seriesX.push(i)}n.labels=i,s.xaxis.convertedCatToNumeric&&(n.categoryLabels=i.map(function(d){return s.xaxis.labels.formatter(d)})),n.noLabelsProvided=!0}},{key:"parseData",value:function(e){var n=this.w,s=n.config,i=n.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),s.chart.stacked){var o=new hr(this.ctx);i.series=o.setNullSeriesToZeroValues(i.series)}this.coreUtils.getSeriesTotals(),i.axisCharts&&(i.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),i.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),i.dataFormatXNumeric||i.isXNumeric&&(s.xaxis.type!=="numeric"||s.labels.length!==0||s.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(i.labels),a=0;a<r.length;a++)if(Array.isArray(r[a])){i.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,n=[];e.globals.seriesYAxisMap.forEach(function(s,i){var o=0;s.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&o++}),o>0&&o==s.length&&n.push(i)}),e.globals.ignoreYAxisIndexes=n.map(function(s){return s})}}]),t}(),Qb=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"scaleSvgNode",value:function(e,n){var s=parseFloat(e.getAttributeNS(null,"width")),i=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",s*n),e.setAttributeNS(null,"height",i*n),e.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}},{key:"getSvgString",value:function(){var e=this;return new Promise(function(n){var s=e.w,i=s.config.chart.toolbar.export.width,o=s.config.chart.toolbar.export.scale||i/s.globals.svgWidth;o||(o=1);var r=e.w.globals.dom.Paper.svg(),a=e.w.globals.dom.Paper.node.cloneNode(!0);o!==1&&e.scaleSvgNode(a,o),e.convertImagesToBase64(a).then(function(){r=new XMLSerializer().serializeToString(a),n(r.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var n=this,s=e.getElementsByTagName("image"),i=Array.from(s).map(function(o){var r=o.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?n.getBase64FromUrl(r).then(function(a){o.setAttributeNS("http://www.w3.org/1999/xlink","href",a)}).catch(function(a){console.error("Error converting image to base64:",a)}):Promise.resolve()});return Promise.all(i)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(n,s){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var o=document.createElement("canvas");o.width=i.width,o.height=i.height,o.getContext("2d").drawImage(i,0,0),n(o.toDataURL())},i.onerror=s,i.src=e})}},{key:"cleanup",value:function(){var e=this.w,n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),s=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(i,function(o){o.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),s&&s[0]&&(s[0].setAttribute("y",-100),s[0].setAttribute("y1",-100),s[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(n){e.cleanup(),e.getSvgString().then(function(s){var i=new Blob([s],{type:"image/svg+xml;charset=utf-8"});n(URL.createObjectURL(i))})})}},{key:"dataURI",value:function(e){var n=this;return new Promise(function(s){var i=n.w,o=e?e.scale||e.width/i.globals.svgWidth:1;n.cleanup();var r=document.createElement("canvas");r.width=i.globals.svgWidth*o,r.height=parseInt(i.globals.dom.elWrap.style.height,10)*o;var a=i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",l=r.getContext("2d");l.fillStyle=a,l.fillRect(0,0,r.width*o,r.height*o),n.getSvgString().then(function(c){var u="data:image/svg+xml,"+encodeURIComponent(c),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(l.drawImage(d,0,0),r.msToBlob){var h=r.msToBlob();s({blob:h})}else{var f=r.toDataURL("image/png");s({imgURI:f})}},d.src=u})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(n){e.triggerDownload(n,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,n=this.w.config.chart.toolbar.export.scale,s=this.w.config.chart.toolbar.export.width,i=n?{scale:n}:s?{width:s}:void 0;this.dataURI(i).then(function(o){var r=o.imgURI,a=o.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(r,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var n=this,s=e.series,i=e.fileName,o=e.columnDelimiter,r=o===void 0?",":o,a=e.lineDelimiter,l=a===void 0?`
172 `:a,c=this.w;s||(s=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(S,E){return c.globals.collapsedSeriesIndices.indexOf(E)===-1?S:[]}),p=function(S){return typeof c.config.chart.toolbar.export.csv.categoryFormatter=="function"?c.config.chart.toolbar.export.csv.categoryFormatter(S):c.config.xaxis.type==="datetime"&&String(S).length>=10?new Date(S).toDateString():ue.isNumber(S)?S:S.split(r).join("")},m=function(S){return typeof c.config.chart.toolbar.export.csv.valueFormatter=="function"?c.config.chart.toolbar.export.csv.valueFormatter(S):S},b=Math.max.apply(Math,Rs(s.map(function(S){return S.data?S.data.length:0}))),_=new NS(this.ctx),x=new Hc(this.ctx),k=function(S){var E="";if(c.globals.axisCharts){if(c.config.xaxis.type==="category"||c.config.xaxis.convertedCatToNumeric)if(c.globals.isBarHorizontal){var P=c.globals.yLabelFormatters[0],T=new hr(n.ctx).getActiveConfigSeriesIndex();E=P(c.globals.labels[S],{seriesIndex:T,dataPointIndex:S,w:c})}else E=x.getLabel(c.globals.labels,c.globals.timescaleLabels,0,S).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?E=c.config.xaxis.categories[S]:c.config.labels.length&&(E=c.config.labels[S]))}else E=c.config.labels[S];return E===null?"nullvalue":(Array.isArray(E)&&(E=E.join(" ")),ue.isNumber(E)?E:E.split(r).join(""))},C=function(S,E){if(u.length&&E===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Rs(Array(b)).map(function(){return""});for(var P=0;P<S.data.length;P++){u=[];var T=k(P);if(T!=="nullvalue"){if(T||(_.isFormatXY()?T=s[E].data[P].x:_.isFormat2DArray()&&(T=s[E].data[P]?s[E].data[P][0]:"")),E===0){u.push(p(T));for(var L=0;L<c.globals.series.length;L++){var I,V=_.isFormatXY()?(I=s[L].data[P])===null||I===void 0?void 0:I.y:f[L][P];u.push(m(V))}}(c.config.chart.type==="candlestick"||S.type&&S.type==="candlestick")&&(u.pop(),u.push(c.globals.seriesCandleO[E][P]),u.push(c.globals.seriesCandleH[E][P]),u.push(c.globals.seriesCandleL[E][P]),u.push(c.globals.seriesCandleC[E][P])),(c.config.chart.type==="boxPlot"||S.type&&S.type==="boxPlot")&&(u.pop(),u.push(c.globals.seriesCandleO[E][P]),u.push(c.globals.seriesCandleH[E][P]),u.push(c.globals.seriesCandleM[E][P]),u.push(c.globals.seriesCandleL[E][P]),u.push(c.globals.seriesCandleC[E][P])),c.config.chart.type==="rangeBar"&&(u.pop(),u.push(c.globals.seriesRangeStart[E][P]),u.push(c.globals.seriesRangeEnd[E][P])),u.length&&d.push(u.join(r))}}}};u.push(c.config.chart.toolbar.export.csv.headerCategory),c.config.chart.type==="boxPlot"?(u.push("minimum"),u.push("q1"),u.push("median"),u.push("q3"),u.push("maximum")):c.config.chart.type==="candlestick"?(u.push("open"),u.push("high"),u.push("low"),u.push("close")):c.config.chart.type==="rangeBar"?(u.push("minimum"),u.push("maximum")):s.map(function(S,E){var P=(S.name?S.name:"series-".concat(E))+"";c.globals.axisCharts&&u.push(P.split(r).join("")?P.split(r).join(""):"series-".concat(E))}),c.globals.axisCharts||(u.push(c.config.chart.toolbar.export.csv.headerValue),d.push(u.join(r))),c.globals.allSeriesHasEqualX||!c.globals.axisCharts||c.config.xaxis.categories.length||c.config.labels.length?s.map(function(S,E){c.globals.axisCharts?C(S,E):((u=[]).push(p(c.globals.labels[E])),u.push(m(f[E])),d.push(u.join(r)))}):function(){var S=new Set,E={};s.forEach(function(P,T){P==null||P.data.forEach(function(L){var I,V;if(_.isFormatXY())I=L.x,V=L.y;else{if(!_.isFormat2DArray())return;I=L[0],V=L[1]}E[I]||(E[I]=Array(s.length).fill("")),E[I][T]=m(V),S.add(I)})}),u.length&&d.push(u.join(r)),Array.from(S).sort().forEach(function(P){d.push([p(P),E[P].join(r)])})}(),h+=d.join(l),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+h),i||c.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,n,s){var i=document.createElement("a");i.href=e,i.download=(n||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}]),t}(),b1=function(){function t(e,n){at(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var s=this.w;this.axesUtils=new Hc(e),this.xaxisLabels=s.globals.labels.slice(),s.globals.timescaleLabels.length>0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],s.config.xaxis.position==="top"?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=s.config.chart.type==="bar"&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return lt(t,[{key:"drawXaxis",value:function(){var e=this.w,n=new Ve(this.ctx),s=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),i=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});s.add(i);for(var o=[],r=0;r<this.xaxisLabels.length;r++)o.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,n,i,o,e.globals.isXNumeric,function(p,m){return m}),e.globals.hasXaxisGroups){var a=e.globals.groups;o=[];for(var l=0;l<a.length;l++)o.push(a[l].title);var c={};e.config.xaxis.group.style&&(c.xaxisFontSize=e.config.xaxis.group.style.fontSize,c.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,c.xaxisForeColors=e.config.xaxis.group.style.colors,c.fontWeight=e.config.xaxis.group.style.fontWeight,c.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,n,i,o,!1,function(p,m){return a[p].cols*m},c)}if(e.config.xaxis.title.text!==void 0){var u=n.group({class:"apexcharts-xaxis-title"}),d=n.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});u.add(d),s.add(u)}if(e.config.xaxis.axisBorder.show){var h=e.globals.barPadForNumericAxis,f=n.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-h,this.offY,this.xaxisBorderWidth+h,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(f):s.add(f)}return s}},{key:"drawXAxisLabelAndGroup",value:function(e,n,s,i,o,r){var a,l=this,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},u=[],d=[],h=this.w,f=c.xaxisFontSize||this.xaxisFontSize,p=c.xaxisFontFamily||this.xaxisFontFamily,m=c.xaxisForeColors||this.xaxisForeColors,b=c.fontWeight||h.config.xaxis.labels.style.fontWeight,_=c.cssClass||h.config.xaxis.labels.style.cssClass,x=h.globals.padHorizontal,k=i.length,C=h.config.xaxis.type==="category"?h.globals.dataPoints:k;if(C===0&&k>C&&(C=k),o){var S=Math.max(Number(h.config.xaxis.tickAmount)||1,C>1?C-1:C);a=h.globals.gridWidth/Math.min(S,k-1),x=x+r(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/C,x=x+r(0,a)+h.config.xaxis.labels.offsetX;for(var E=function(T){var L=x-r(T,a)/2+h.config.xaxis.labels.offsetX;T===0&&k===1&&a/2===x&&C===1&&(L=h.globals.gridWidth/2);var I=l.axesUtils.getLabel(i,h.globals.timescaleLabels,L,T,u,f,e),V=28;if(h.globals.rotateXLabels&&e&&(V=22),h.config.xaxis.title.text&&h.config.xaxis.position==="top"&&(V+=parseFloat(h.config.xaxis.title.style.fontSize)+2),e||(V=V+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),I=h.config.xaxis.tickAmount!==void 0&&h.config.xaxis.tickAmount!=="dataPoints"&&h.config.xaxis.type!=="datetime"?l.axesUtils.checkLabelBasedOnTickamount(T,I,k):l.axesUtils.checkForOverflowingLabels(T,I,k,u,d),h.config.xaxis.labels.show){var R=n.drawText({x:I.x,y:l.offY+h.config.xaxis.labels.offsetY+V-(h.config.xaxis.position==="top"?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:I.text,textAnchor:"middle",fontWeight:I.isBold?600:b,fontSize:f,fontFamily:p,foreColor:Array.isArray(m)?e&&h.config.xaxis.convertedCatToNumeric?m[h.globals.minX+T-1]:m[T]:m,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+_});if(s.add(R),R.on("click",function(F){if(typeof h.config.chart.events.xAxisLabelClick=="function"){var B=Object.assign({},h,{labelIndex:T});h.config.chart.events.xAxisLabelClick(F,l.ctx,B)}}),e){var N=document.createElementNS(h.globals.SVGNS,"title");N.textContent=Array.isArray(I.text)?I.text.join(" "):I.text,R.node.appendChild(N),I.text!==""&&(u.push(I.text),d.push(I))}}T<k-1&&(x+=r(T+1,a))},P=0;P<=k-1;P++)E(P)}},{key:"drawXaxisInversed",value:function(e){var n,s,i=this,o=this.w,r=new Ve(this.ctx),a=o.config.yaxis[0].opposite?o.globals.translateYAxisX[e]:0,l=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),c=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});l.add(c);var u=[];if(o.config.yaxis[e].show)for(var d=0;d<this.xaxisLabels.length;d++)u.push(this.xaxisLabels[d]);n=o.globals.gridHeight/u.length,s=-n/2.2;var h=o.globals.yLabelFormatters[0],f=o.config.yaxis[0].labels;if(f.show)for(var p=function(S){var E=u[S]===void 0?"":u[S];E=h(E,{seriesIndex:e,dataPointIndex:S,w:o});var P=i.axesUtils.getYAxisForeColor(f.style.colors,e),T=0;Array.isArray(E)&&(T=E.length/2*parseInt(f.style.fontSize,10));var L=f.offsetX-15,I="end";i.yaxis.opposite&&(I="start"),o.config.yaxis[0].labels.align==="left"?(L=f.offsetX,I="start"):o.config.yaxis[0].labels.align==="center"?(L=f.offsetX,I="middle"):o.config.yaxis[0].labels.align==="right"&&(I="end");var V=r.drawText({x:L,y:s+n+f.offsetY-T,text:E,textAnchor:I,foreColor:Array.isArray(P)?P[S]:P,fontSize:f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+f.style.cssClass,maxWidth:f.maxWidth});c.add(V),V.on("click",function(F){if(typeof o.config.chart.events.xAxisLabelClick=="function"){var B=Object.assign({},o,{labelIndex:S});o.config.chart.events.xAxisLabelClick(F,i.ctx,B)}});var R=document.createElementNS(o.globals.SVGNS,"title");if(R.textContent=Array.isArray(E)?E.join(" "):E,V.node.appendChild(R),o.config.yaxis[e].labels.rotate!==0){var N=r.rotateAroundCenter(V.node);V.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(N.y,")"))}s+=n},m=0;m<=u.length-1;m++)p(m);if(o.config.yaxis[0].title.text!==void 0){var b=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),_=r.drawText({x:o.config.yaxis[0].title.offsetX,y:o.globals.gridHeight/2+o.config.yaxis[0].title.offsetY,text:o.config.yaxis[0].title.text,textAnchor:"middle",foreColor:o.config.yaxis[0].title.style.color,fontSize:o.config.yaxis[0].title.style.fontSize,fontWeight:o.config.yaxis[0].title.style.fontWeight,fontFamily:o.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+o.config.yaxis[0].title.style.cssClass});b.add(_),l.add(b)}var x=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(x=o.globals.gridWidth);var k=o.config.xaxis.axisBorder;if(k.show){var C=r.drawLine(o.globals.padHorizontal+k.offsetX+x,1+k.offsetY,o.globals.padHorizontal+k.offsetX+x,o.globals.gridHeight+k.offsetY,k.color,0);this.elgrid&&this.elgrid.elGridBorders&&o.config.grid.show?this.elgrid.elGridBorders.add(C):l.add(C)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(x,u.length,o.config.yaxis[0].axisBorder,o.config.yaxis[0].axisTicks,0,n,l),l}},{key:"drawXaxisTicks",value:function(e,n,s){var i=this.w,o=e;if(!(e<0||e-2>i.globals.gridWidth)){var r=this.offY+i.config.xaxis.axisTicks.offsetY;if(n=n+r+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(n=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Ve(this.ctx).drawLine(e+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,o+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,n=[],s=this.xaxisLabels.length,i=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o<s;o++)i=this.xaxisLabels[o].position,n.push(i);else for(var r=s,a=0;a<r;a++){var l=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(l-=1),i+=e.globals.gridWidth/l,n.push(i)}return n}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,n=new Ve(this.ctx),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<i.length;a++){var l=n.rotateAroundCenter(i[a]);l.y=l.y-1,l.x=l.x+1,i[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(l.x," ").concat(l.y,")")),i[a].setAttribute("text-anchor","end"),s.setAttribute("transform","translate(0, ".concat(-10,")"));var c=i[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(c,function(f){n.placeTextWithEllipsis(f,f.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var f=e.globals.gridWidth/(e.globals.labels.length+1),p=0;p<i.length;p++){var m=i[p].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(m,function(b){n.placeTextWithEllipsis(b,b.textContent,f)})}})();if(o.length>0){var u=o[o.length-1].getBBox(),d=o[0].getBBox();u.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&o[0].parentNode.removeChild(o[0]);for(var h=0;h<r.length;h++)n.placeTextWithEllipsis(r[h],r[h].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),t}(),ij=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new Hc(e),this.isRangeBar=n.globals.seriesRange.length&&n.globals.isBarHorizontal,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return lt(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,s=new Ve(this.ctx);e||(e=s.group({class:"apexcharts-grid"}));var i=s.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),o=s.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return e.add(o),e.add(i),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,n=e.globals,s=new Ve(this.ctx),i=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Rs(e.config.stroke.width)):e.config.stroke.width,o=function(u){var d=document.createElementNS(n.SVGNS,"clipPath");return d.setAttribute("id",u),d};n.dom.elGridRectMask=o("gridRectMask".concat(n.cuid)),n.dom.elGridRectBarMask=o("gridRectBarMask".concat(n.cuid)),n.dom.elGridRectMarkerMask=o("gridRectMarkerMask".concat(n.cuid)),n.dom.elForecastMask=o("forecastMask".concat(n.cuid)),n.dom.elNonForecastMask=o("nonForecastMask".concat(n.cuid));var r=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(r=Math.max(e.config.grid.padding.left,n.barPadForNumericAxis),a=Math.max(e.config.grid.padding.right,n.barPadForNumericAxis)),n.dom.elGridRect=s.drawRect(0,0,n.gridWidth,n.gridHeight,0,"#fff"),n.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,n.gridWidth+i+a+r+4,n.gridHeight+i+4,0,"#fff");var l=e.globals.markers.largestSize;n.dom.elGridRectMarker=s.drawRect(-l,-l,n.gridWidth+2*l,n.gridHeight+2*l,0,"#fff"),n.dom.elGridRectMask.appendChild(n.dom.elGridRect.node),n.dom.elGridRectBarMask.appendChild(n.dom.elGridRectBar.node),n.dom.elGridRectMarkerMask.appendChild(n.dom.elGridRectMarker.node);var c=n.dom.baseEl.querySelector("defs");c.appendChild(n.dom.elGridRectMask),c.appendChild(n.dom.elGridRectBarMask),c.appendChild(n.dom.elGridRectMarkerMask),c.appendChild(n.dom.elForecastMask),c.appendChild(n.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var n=e.i,s=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w;if(!(n===0&&c.globals.skipFirstTimelinelabel||n===a-1&&c.globals.skipLastTimelinelabel&&!c.config.xaxis.labels.formatter||c.config.chart.type==="radar")){c.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,x1:s,y1:i,x2:o,y2:r,xCount:a,parent:l});var u=0;if(c.globals.hasXaxisGroups&&c.config.xaxis.tickPlacement==="between"){var d=c.globals.groups;if(d){for(var h=0,f=0;h<n&&f<d.length;f++)h+=d[f].cols;h===n&&(u=.6*c.globals.xAxisLabelsHeight)}}new b1(this.ctx).drawXaxisTicks(s,u,c.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var n=e.i,s=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w,u=l.node.classList.contains("apexcharts-gridlines-horizontal"),d=c.globals.barPadForNumericAxis,h=i===0&&r===0||s===0&&o===0||i===c.globals.gridHeight&&r===c.globals.gridHeight||c.globals.isBarHorizontal&&(n===0||n===a-1),f=new Ve(this).drawLine(s-(u?d:0),i,o+(u?d:0),r,c.config.grid.borderColor,c.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&c.config.grid.show?this.elGridBorders.add(f):l.add(f)}},{key:"_drawGridBandRect",value:function(e){var n=e.c,s=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.type,l=this.w,c=new Ve(this.ctx),u=l.globals.barPadForNumericAxis,d=l.config.grid[a].colors[n],h=c.drawRect(s-(a==="row"?u:0),i,o+(a==="row"?2*u:0),r,0,d,l.config.grid[a].opacity);this.elg.add(h),h.attr("clip-path","url(#gridRectMask".concat(l.globals.cuid,")")),h.node.classList.add("apexcharts-grid-".concat(a))}},{key:"_drawXYLines",value:function(e){var n=this,s=e.xCount,i=e.tickAmount,o=this.w;if(o.config.grid.xaxis.lines.show||o.config.xaxis.axisTicks.show){var r,a=o.globals.padHorizontal,l=o.globals.gridHeight;o.globals.timescaleLabels.length?function(p){for(var m=p.xC,b=p.x1,_=p.y1,x=p.x2,k=p.y2,C=0;C<m;C++)b=n.xaxisLabels[C].position,x=n.xaxisLabels[C].position,n._drawGridLines({i:C,x1:b,y1:_,x2:x,y2:k,xCount:s,parent:n.elgridLinesV})}({xC:s,x1:a,y1:0,x2:r,y2:l}):(o.globals.isXNumeric&&(s=o.globals.xAxisScale.result.length),function(p){for(var m=p.xC,b=p.x1,_=p.y1,x=p.x2,k=p.y2,C=0;C<m+(o.globals.isXNumeric?0:1);C++)C===0&&m===1&&o.globals.dataPoints===1&&(x=b=o.globals.gridWidth/2),n._drawGridLines({i:C,x1:b,y1:_,x2:x,y2:k,xCount:s,parent:n.elgridLinesV}),x=b+=o.globals.gridWidth/(o.globals.isXNumeric?m-1:m)}({xC:s,x1:a,y1:0,x2:r,y2:l}))}if(o.config.grid.yaxis.lines.show){var c=0,u=0,d=o.globals.gridWidth,h=i+1;this.isRangeBar&&(h=o.globals.labels.length);for(var f=0;f<h+(this.isRangeBar?1:0);f++)this._drawGridLine({i:f,xCount:h+(this.isRangeBar?1:0),x1:0,y1:c,x2:d,y2:u,parent:this.elgridLinesH}),u=c+=o.globals.gridHeight/(this.isRangeBar?h:i)}}},{key:"_drawInvertedXYLines",value:function(e){var n=e.xCount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show)for(var i,o=s.globals.padHorizontal,r=s.globals.gridHeight,a=0;a<n+1;a++)s.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:n+1,x1:o,y1:0,x2:i,y2:r,parent:this.elgridLinesV}),new b1(this.ctx).drawXaxisTicks(o,0,s.globals.dom.elGraphical),i=o+=s.globals.gridWidth/n;if(s.config.grid.yaxis.lines.show)for(var l=0,c=0,u=s.globals.gridWidth,d=0;d<s.globals.dataPoints+1;d++)this._drawGridLine({i:d,xCount:s.globals.dataPoints+1,x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=s.globals.gridHeight/s.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,n=e.globals,s=new Ve(this.ctx);this.elg=s.group({class:"apexcharts-grid"}),this.elgridLinesH=s.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=s.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=s.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var i=0;i<n.seriesYAxisMap.length&&n.ignoreYAxisIndexes.includes(i);)i++;i===n.seriesYAxisMap.length&&(i=0);var o,r=n.yAxisScale[i].result.length-1;if(!n.isBarHorizontal||this.isRangeBar){var a,l,c;o=this.xaxisLabels.length,this.isRangeBar&&(r=n.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(o=e.config.xaxis.tickAmount),((a=n.yAxisScale)===null||a===void 0||(l=a[i])===null||l===void 0||(c=l.result)===null||c===void 0?void 0:c.length)>0&&e.config.xaxis.type!=="datetime"&&(o=n.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:o,tickAmount:r})}else o=r,r=n.xTickAmount,this._drawInvertedXYLines({xCount:o,tickAmount:r});return this.drawGridBands(o,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:n.gridWidth/o}}},{key:"drawGridBands",value:function(e,n){var s,i,o=this,r=this.w;if(((s=r.config.grid.row.colors)===null||s===void 0?void 0:s.length)>0&&function(p,m,b,_,x,k){for(var C=0,S=0;C<m;C++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,x1:b,y1:_,x2:x,y2:k,type:p}),_+=r.globals.gridHeight/n}("row",n,0,0,r.globals.gridWidth,r.globals.gridHeight/n),((i=r.config.grid.column.colors)===null||i===void 0?void 0:i.length)>0){var a=r.globals.isBarHorizontal||r.config.xaxis.tickPlacement!=="on"||r.config.xaxis.type!=="category"&&!r.config.xaxis.convertedCatToNumeric?e:e-1;r.globals.isXNumeric&&(a=r.globals.xAxisScale.result.length-1);for(var l=r.globals.padHorizontal,c=r.globals.padHorizontal+r.globals.gridWidth/a,u=r.globals.gridHeight,d=0,h=0;d<e;d++,h++){var f;h>=r.config.grid.column.colors.length&&(h=0),r.config.xaxis.type==="datetime"&&(l=this.xaxisLabels[d].position,c=(((f=this.xaxisLabels[d+1])===null||f===void 0?void 0:f.position)||r.globals.gridWidth)-this.xaxisLabels[d].position),this._drawGridBandRect({c:h,x1:l,y1:0,x2:c,y2:u,type:"column"}),l+=r.globals.gridWidth/a}}}}]),t}(),oj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new ys(this.ctx)}return lt(t,[{key:"niceScale",value:function(e,n){var s,i,o,r,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=1e-11,c=this.w,u=c.globals;u.isBarHorizontal?(s=c.config.xaxis,i=Math.max((u.svgWidth-100)/25,2)):(s=c.config.yaxis[a],i=Math.max((u.svgHeight-100)/15,2)),ue.isNumber(i)||(i=10),o=s.min!==void 0&&s.min!==null,r=s.max!==void 0&&s.min!==null;var d=s.stepSize!==void 0&&s.stepSize!==null,h=s.tickAmount!==void 0&&s.tickAmount!==null,f=h?s.tickAmount:u.niceScaleDefaultTicks[Math.min(Math.round(i/2),u.niceScaleDefaultTicks.length-1)];if(u.isMultipleYAxis&&!h&&u.multiAxisTickAmount>0&&(f=u.multiAxisTickAmount,h=!0),f=f==="dataPoints"?u.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&n===0||!ue.isNumber(e)&&!ue.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=ue.isNumber(s.min)?s.min:0,n=ue.isNumber(s.max)?s.max:e+f,u.allSeriesCollapsed=!1),e>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=n;n=e,e=p}else e===n&&(e=e===0?0:e-1,n=n===0?2:n+1);var m=[];f<1&&(f=1);var b=f,_=Math.abs(n-e);!o&&e>0&&e/_<.15&&(e=0,o=!0),!r&&n<0&&-n/_<.15&&(n=0,r=!0);var x=(_=Math.abs(n-e))/b,k=x,C=Math.floor(Math.log10(k)),S=Math.pow(10,C),E=Math.ceil(k/S);if(x=k=(E=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][E])*S,u.isBarHorizontal&&s.stepSize&&s.type!=="datetime"?(x=s.stepSize,d=!0):d&&(x=s.stepSize),d&&s.forceNiceScale){var P=Math.floor(Math.log10(x));x*=Math.pow(10,C-P)}if(o&&r){var T=_/b;if(h)if(d)if(ue.mod(_,x)!=0){var L=ue.getGCD(x,T);x=T/L<10?L:T}else ue.mod(x,T)==0?x=T:(T=x,h=!1);else x=T;else if(d)ue.mod(_,x)==0?T=x:x=T;else if(ue.mod(_,x)==0)T=x;else{T=_/(b=Math.ceil(_/x));var I=ue.getGCD(_,x);_/I<i&&(T=I),x=T}b=Math.round(_/x)}else{if(o||r){if(r)if(h)e=n-x*b;else{var V=e;e=x*Math.floor(e/x),Math.abs(n-e)/ue.getGCD(_,x)>i&&(e=n-x*f,e+=x*Math.floor((V-e)/x))}else if(o)if(h)n=e+x*b;else{var R=n;n=x*Math.ceil(n/x),Math.abs(n-e)/ue.getGCD(_,x)>i&&(n=e+x*f,n+=x*Math.ceil((R-n)/x))}}else if(u.isMultipleYAxis&&h){var N=x*Math.floor(e/x),F=N+x*b;F<n&&(x*=2),F=n,n=(e=N)+x*b,_=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=x*b),n<0&&-n<Math.abs(N-e)&&(n=0,e=-x*b)}else e=x*Math.floor(e/x),n=x*Math.ceil(n/x);_=Math.abs(n-e),x=ue.getGCD(_,x),b=Math.round(_/x)}if(h||o||r||(b=Math.ceil((_-l)/(x+l)))>16&&ue.getPrimeFactors(b).length<2&&b++,!h&&s.forceNiceScale&&u.yValueDecimal===0&&b>_&&(b=_,x=Math.round(_/b)),b>i&&(!h&&!d||s.forceNiceScale)){var B=ue.getPrimeFactors(b),G=B.length-1,q=b;e:for(var X=0;X<G;X++)for(var K=0;K<=G-X;K++){for(var H=Math.min(K+X,G),Q=q,se=1,Z=K;Z<=H;Z++)se*=B[Z];if((Q/=se)<i){q=Q;break e}}x=q===b?_:_/q,b=Math.round(_/x)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=b);var ae=e-x,ve=x*l;do ae+=x,m.push(ue.stripNumber(ae,7));while(n-ae>ve);return{result:m,niceMin:m[0],niceMax:m[m.length-1]}}},{key:"linearScale",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,r=Math.abs(n-e),a=[];if(e===n)return{result:a=[e],niceMin:a[0],niceMax:a[a.length-1]};(s=this._adjustTicksForSmallRange(s,i,r))==="dataPoints"&&(s=this.w.globals.dataPoints-1),o||(o=r/s),o=Math.round(10*(o+Number.EPSILON))/10,s===Number.MAX_VALUE&&(s=5,o=1);for(var l=e;s>=0;)a.push(l),l=ue.preciseAddition(l,o),s-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,n,s){n<=0&&(n=Math.max(e,s)),e<=0&&(e=Math.min(n,s));for(var i=[],o=Math.ceil(Math.log(n)/Math.log(s)+1),r=Math.floor(Math.log(e)/Math.log(s));r<o;r++)i.push(Math.pow(s,r));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}},{key:"logarithmicScale",value:function(e,n,s){n<=0&&(n=Math.max(e,s)),e<=0&&(e=Math.min(n,s));for(var i=[],o=Math.log(n)/Math.log(s),r=Math.log(e)/Math.log(s),a=o-r,l=Math.round(a),c=a/l,u=0,d=r;u<l;u++,d+=c)i.push(Math.pow(s,d));return i.push(Math.pow(s,o)),{result:i,niceMin:e,niceMax:n}}},{key:"_adjustTicksForSmallRange",value:function(e,n,s){var i=e;if(n!==void 0&&this.w.config.yaxis[n].labels.formatter&&this.w.config.yaxis[n].tickAmount===void 0){var o=Number(this.w.config.yaxis[n].labels.formatter(1));ue.isNumber(o)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<e?i:e}},{key:"setYScaleForIndex",value:function(e,n,s){var i=this.w.globals,o=this.w.config,r=i.isBarHorizontal?o.xaxis:o.yaxis[e];i.yAxisScale[e]===void 0&&(i.yAxisScale[e]=[]);var a=Math.abs(s-n);r.logarithmic&&a<=5&&(i.invalidLogScale=!0),r.logarithmic&&a>5?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(n,s,r.logBase):this.logarithmicScale(n,s,r.logBase)):s!==-Number.MAX_VALUE&&ue.isNumber(s)&&n!==Number.MAX_VALUE&&ue.isNumber(n)?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=this.niceScale(n,s,e)):i.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,n){var s=this.w,i=s.globals,o=Math.abs(n-e);if(n!==-Number.MAX_VALUE&&ue.isNumber(n)){var r=i.xTickAmount;o<10&&o>1&&(r=o),i.xAxisScale=this.linearScale(e,n,r,0,s.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,n=this.w.config,s=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=s.seriesYAxisMap,o=s.minYArr,r=s.maxYArr;s.allSeriesCollapsed=!0,s.barGroups=[],i.forEach(function(a,l){var c=[];a.forEach(function(u){var d=n.series[u].group;c.indexOf(d)<0&&c.push(d)}),a.length>0?function(){var u,d,h=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=h,m=f;if(n.chart.stacked)(function(){var x=new Array(s.dataPoints).fill(0),k=[],C=[],S=[];c.forEach(function(){k.push(x.map(function(){return Number.MIN_VALUE})),C.push(x.map(function(){return Number.MIN_VALUE})),S.push(x.map(function(){return Number.MIN_VALUE}))});for(var E=function(T){!u&&n.series[a[T]].type&&(u=n.series[a[T]].type);var L=a[T];d=n.series[L].group?n.series[L].group:"axis-".concat(l),!(s.collapsedSeriesIndices.indexOf(L)<0&&s.ancillaryCollapsedSeriesIndices.indexOf(L)<0)||(s.allSeriesCollapsed=!1,c.forEach(function(I,V){if(n.series[L].group===I)for(var R=0;R<s.series[L].length;R++){var N=s.series[L][R];N>=0?C[V][R]+=N:S[V][R]+=N,k[V][R]+=N,p=Math.min(p,N),m=Math.max(m,N)}})),u!=="bar"&&u!=="column"||s.barGroups.push(d)},P=0;P<a.length;P++)E(P);u||(u=n.chart.type),u==="bar"||u==="column"?c.forEach(function(T,L){h=Math.min(h,Math.min.apply(null,S[L])),f=Math.max(f,Math.max.apply(null,C[L]))}):(c.forEach(function(T,L){p=Math.min(p,Math.min.apply(null,k[L])),m=Math.max(m,Math.max.apply(null,k[L]))}),h=p,f=m),h===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)})();else for(var b=0;b<a.length;b++){var _=a[b];h=Math.min(h,o[_]),f=Math.max(f,r[_]),!(s.collapsedSeriesIndices.indexOf(_)<0&&s.ancillaryCollapsedSeriesIndices.indexOf(_)<0)||(s.allSeriesCollapsed=!1)}n.yaxis[l].min!==void 0&&(h=typeof n.yaxis[l].min=="function"?n.yaxis[l].min(h):n.yaxis[l].min),n.yaxis[l].max!==void 0&&(f=typeof n.yaxis[l].max=="function"?n.yaxis[l].max(f):n.yaxis[l].max),s.barGroups=s.barGroups.filter(function(x,k,C){return C.indexOf(x)===k}),e.setYScaleForIndex(l,h,f),a.forEach(function(x){o[x]=s.yAxisScale[l].niceMin,r[x]=s.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),t}(),Y6=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.scales=new oj(e)}return lt(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w.config,r=this.w.globals,a=-Number.MAX_VALUE,l=Number.MIN_VALUE;i===null&&(i=e+1);var c=r.series,u=c,d=c;o.chart.type==="candlestick"?(u=r.seriesCandleL,d=r.seriesCandleH):o.chart.type==="boxPlot"?(u=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(u=r.seriesRangeStart,d=r.seriesRangeEnd);var h=!1;if(r.seriesX.length>=i){var f,p=(f=r.brushSource)===null||f===void 0?void 0:f.w.config.chart.brush;(o.chart.zoom.enabled&&o.chart.zoom.autoScaleYaxis||p!=null&&p.enabled&&p!=null&&p.autoScaleYaxis)&&(h=!0)}for(var m=e;m<i;m++){r.dataPoints=Math.max(r.dataPoints,c[m].length);var b=o.series[m].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(S){return S!==void 0}).length),r.labels.length&&o.xaxis.type!=="datetime"&&r.series.reduce(function(S,E){return S+E.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var _=0,x=c[m].length-1;if(h){if(o.xaxis.min)for(;_<x&&r.seriesX[m][_]<o.xaxis.min;_++);if(o.xaxis.max)for(;x>_&&r.seriesX[m][x]>o.xaxis.max;x--);}for(var k=_;k<=x&&k<r.series[m].length;k++){var C=c[m][k];if(C!==null&&ue.isNumber(C)){switch(d[m][k]!==void 0&&(a=Math.max(a,d[m][k]),n=Math.min(n,d[m][k])),u[m][k]!==void 0&&(n=Math.min(n,u[m][k]),s=Math.max(s,u[m][k])),b){case"candlestick":r.seriesCandleC[m][k]!==void 0&&(a=Math.max(a,r.seriesCandleH[m][k]),n=Math.min(n,r.seriesCandleL[m][k]));break;case"boxPlot":r.seriesCandleC[m][k]!==void 0&&(a=Math.max(a,r.seriesCandleC[m][k]),n=Math.min(n,r.seriesCandleO[m][k]))}b&&b!=="candlestick"&&b!=="boxPlot"&&b!=="rangeArea"&&b!=="rangeBar"&&(a=Math.max(a,r.series[m][k]),n=Math.min(n,r.series[m][k])),r.seriesGoals[m]&&r.seriesGoals[m][k]&&Array.isArray(r.seriesGoals[m][k])&&r.seriesGoals[m][k].forEach(function(S){a=Math.max(a,S.value),n=Math.min(n,S.value)}),s=a,ue.isFloat(C)&&(C=ue.noExponents(C),r.yValueDecimal=Math.max(r.yValueDecimal,C.toString().split(".")[1].length)),l>u[m][k]&&u[m][k]<0&&(l=u[m][k])}else r.hasNullValues=!0}b!=="bar"&&b!=="column"||(l<0&&a<0&&(a=0,s=Math.max(s,0)),l===Number.MIN_VALUE&&(l=0,n=Math.min(n,0)))}return o.chart.type==="rangeBar"&&r.seriesRangeStart.length&&r.isBarHorizontal&&(l=n),o.chart.type==="bar"&&(l<0&&a<0&&(a=0),l===Number.MIN_VALUE&&(l=0)),{minY:l,maxY:a,lowestY:n,highestY:s}}},{key:"setYRange",value:function(){var e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var s,i=Number.MAX_VALUE;if(e.isMultipleYAxis){i=Number.MAX_VALUE;for(var o=0;o<e.series.length;o++)s=this.getMinYMaxY(o),e.minYArr[o]=s.lowestY,e.maxYArr[o]=s.highestY,i=Math.min(i,s.lowestY)}return s=this.getMinYMaxY(0,i,null,e.series.length),n.chart.type==="bar"?(e.minY=s.minY,e.maxY=s.maxY):(e.minY=s.lowestY,e.maxY=s.highestY),i=s.lowestY,n.chart.stacked&&this._setStackedMinMax(),n.chart.type==="line"||n.chart.type==="area"||n.chart.type==="scatter"||n.chart.type==="candlestick"||n.chart.type==="boxPlot"||n.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==e.maxY&&(e.minY=i):e.minY=e.minY!==Number.MIN_VALUE?Math.min(s.minY,e.minY):s.minY,n.yaxis.forEach(function(r,a){r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[a]=r.max:typeof r.max=="function"&&(e.maxYArr[a]=r.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[a]=r.min:typeof r.min=="function"&&(e.minYArr[a]=r.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(function(r){n.xaxis[r]!==void 0&&typeof n.xaxis[r]=="number"&&(r==="min"?e.minY=n.xaxis[r]:e.maxY=n.xaxis[r])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=i):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],n.series.forEach(function(r){switch(r.type||n.chart.type){case"bar":case"column":e.barGroups.push(r.group);break;case"line":e.lineGroups.push(r.group);break;case"area":e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.lineGroups=e.lineGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.areaGroups=e.areaGroups.filter(function(r,a,l){return l.indexOf(r)===a}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,n=this.w.config,s=n.xaxis.type==="numeric"||n.xaxis.type==="datetime"||n.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var l=0;l<e.series.length;l++)if(e.labels[l])for(var c=0;c<e.labels[l].length;c++)e.labels[l][c]!==null&&ue.isNumber(e.labels[l][c])&&(e.maxX=Math.max(e.maxX,e.labels[l][c]),e.initialMaxX=Math.max(e.maxX,e.labels[l][c]),e.minX=Math.min(e.minX,e.labels[l][c]),e.initialMinX=Math.min(e.minX,e.labels[l][c]))}(),e.noLabelsProvided&&n.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var i=10;if(n.xaxis.tickAmount===void 0)i=Math.round(e.svgWidth/150),n.xaxis.type==="numeric"&&e.dataPoints<30&&(i=e.dataPoints-1),i>e.dataPoints&&e.dataPoints!==0&&(i=e.dataPoints-1);else if(n.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(i=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var o=e.maxX-e.minX;o<30&&(i=o-1)}}else i=n.xaxis.tickAmount;if(e.xTickAmount=i,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(e.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(e.minX=n.xaxis.min),n.xaxis.range!==void 0&&(e.minX=e.maxX-n.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],a=e.minX-1;a<e.maxX;a++)r.push(a+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,i,i,0,n.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,i-1,0,n.xaxis.stepSize),e.seriesX=e.labels.slice());s&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var n=0;n<e.series.length;n++)if(e.seriesZ[n]!==void 0)for(var s=0;s<e.seriesZ[n].length;s++)e.seriesZ[n][s]!==null&&ue.isNumber(e.seriesZ[n][s])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[n][s]),e.minZ=Math.min(e.minZ,e.seriesZ[n][s]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){var s=new ti(this.ctx);if(n.xaxis.type==="datetime"){var i=s.getDate(e.minX);n.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),e.minX=new Date(i).getTime();var o=s.getDate(e.maxX);n.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()+2):o.setDate(o.getDate()+2),e.maxX=new Date(o).getTime()}else(n.xaxis.type==="numeric"||n.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(n,s){if(n.length){n.length===1&&n.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var i=n.slice();i.sort(function(o,r){return o-r}),i.forEach(function(o,r){if(r>0){var a=o-i[r-1];a>0&&(e.minXDiff=Math.min(a,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,n=this.w.globals;if(n.series.length){var s=n.seriesGroups;s.length||(s=[this.w.globals.seriesNames.map(function(r){return r})]);var i={},o={};s.forEach(function(r){i[r]=[],o[r]=[],e.w.config.series.map(function(a,l){return r.indexOf(n.seriesNames[l])>-1?l:null}).filter(function(a){return a!==null}).forEach(function(a){for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++){var c,u,d,h;i[r][l]===void 0&&(i[r][l]=0,o[r][l]=0),(e.w.config.chart.stacked&&!n.comboCharts||e.w.config.chart.stacked&&n.comboCharts&&(!e.w.config.chart.stackOnlyBar||((c=e.w.config.series)===null||c===void 0||(u=c[a])===null||u===void 0?void 0:u.type)==="bar"||((d=e.w.config.series)===null||d===void 0||(h=d[a])===null||h===void 0?void 0:h.type)==="column"))&&n.series[a][l]!==null&&ue.isNumber(n.series[a][l])&&(n.series[a][l]>0?i[r][l]+=parseFloat(n.series[a][l])+1e-4:o[r][l]+=parseFloat(n.series[a][l]))}})}),Object.entries(i).forEach(function(r){var a=$U(r,1)[0];i[a].forEach(function(l,c){n.maxY=Math.max(n.maxY,i[a][c]),n.minY=Math.min(n.minY,o[a][c])})})}}}]),t}(),BS=function(){function t(e,n){at(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=s.config.chart.type==="bar"&&s.config.plotOptions.bar.horizontal,this.xAxisoffX=s.config.xaxis.position==="bottom"?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Hc(e)}return lt(t,[{key:"drawYaxis",value:function(e){var n=this.w,s=new Ve(this.ctx),i=n.config.yaxis[e].labels.style,o=i.fontSize,r=i.fontFamily,a=i.fontWeight,l=s.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(n.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return l;var c=s.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var u=n.globals.yAxisScale[e].result.length-1,d=n.globals.gridHeight/u,h=n.globals.yLabelFormatters[e],f=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());if(n.config.yaxis[e].labels.show){var p=n.globals.translateY+n.config.yaxis[e].labels.offsetY;n.globals.isBarHorizontal?p=0:n.config.chart.type==="heatmap"&&(p-=d/2),p+=parseInt(o,10)/3;for(var m=u;m>=0;m--){var b=h(f[m],m,n),_=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(_*=-1);var x=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),k=this.axesUtils.getYAxisForeColor(i.colors,e),C=Array.isArray(k)?k[m]:k,S=ue.listToArray(n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(P){return P.textContent}),E=s.drawText({x:_,y:p,text:S.includes(b)&&!n.config.yaxis[e].labels.showDuplicates?"":b,textAnchor:x,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:C,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});c.add(E),this.addTooltip(E,b),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(s,E,firstLabel,n.config.yaxis[e].labels.rotate),p+=d}}return this.addYAxisTitle(s,l,e),this.addAxisBorder(s,l,e,u,d),l}},{key:"getTextAnchor",value:function(e,n){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":n?"start":"end"}},{key:"addTooltip",value:function(e,n){var s=document.createElementNS(this.w.globals.SVGNS,"title");s.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(s)}},{key:"rotateLabel",value:function(e,n,s,i){var o=e.rotateAroundCenter(s.node),r=e.rotateAroundCenter(n.node);n.node.setAttribute("transform","rotate(".concat(i," ").concat(o.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(e,n,s){var i=this.w;if(i.config.yaxis[s].title.text!==void 0){var o=e.group({class:"apexcharts-yaxis-title"}),r=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,a=e.drawText({x:r,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[s].title.style.cssClass)});o.add(a),n.add(o)}}},{key:"addAxisBorder",value:function(e,n,s,i,o){var r=this.w,a=r.config.yaxis[s].axisBorder,l=31+a.offsetX;if(r.config.yaxis[s].opposite&&(l=-31-a.offsetX),a.show){var c=e.drawLine(l,r.globals.translateY+a.offsetY-2,l,r.globals.gridHeight+r.globals.translateY+a.offsetY+2,a.color,0,a.width);n.add(c)}r.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,i,a,r.config.yaxis[s].axisTicks,s,o,n)}},{key:"drawYaxisInversed",value:function(e){var n=this.w,s=new Ve(this.ctx),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=s.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});i.add(o);var r=n.globals.yAxisScale[e].result.length-1,a=n.globals.gridWidth/r+.1,l=a+n.config.xaxis.labels.offsetX,c=n.globals.xLabelFormatter,u=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice()),d=n.globals.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),r=(u=d.slice()).length),n.config.xaxis.labels.show)for(var h=d.length?0:r;d.length?h<d.length:h>=0;d.length?h++:h--){var f=c(u[h],h,n),p=n.globals.gridWidth+n.globals.padHorizontal-(l-a+n.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(u,d,p,h,this.drawnLabels,this.xaxisFontSize);p=m.x,f=m.text,this.drawnLabels.push(m.text),h===0&&n.globals.skipFirstTimelinelabel&&(f=""),h===u.length-1&&n.globals.skipLastTimelinelabel&&(f="")}var b=s.drawText({x:p,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.globals.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(n.config.xaxis.labels.style.cssClass)});o.add(b),b.tspan(f),this.addTooltip(b,f),l+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(e){var n=this.w,s=new Ve(this.ctx),i=n.config.xaxis.axisBorder;if(i.show){var o=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(o-=15);var r=s.drawLine(n.globals.padHorizontal+o+i.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var n=this.w,s=new Ve(this.ctx);if(n.config.xaxis.title.text!==void 0){var i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=s.drawText({x:n.globals.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(n.config.xaxis.title.style.cssClass)});i.add(o),e.add(i)}}},{key:"yAxisTitleRotate",value:function(e,n){var s=this.w,i=new Ve(this.ctx),o=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),r=o?o.getBoundingClientRect():{width:0,height:0},a=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),l=a?a.getBoundingClientRect():{width:0,height:0};if(a){var c=this.xPaddingForYAxisTitle(e,r,l,n);a.setAttribute("x",c.xPos-(n?10:0));var u=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(n?-1*s.config.yaxis[e].title.rotate:s.config.yaxis[e].title.rotate," ").concat(u.x," ").concat(u.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,n,s,i){var o=this.w,r=0,a=10;return o.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(i?r=n.width+o.config.yaxis[e].title.offsetX+s.width/2+a/2:(r=-1*n.width+o.config.yaxis[e].title.offsetX+a/2+s.width/2,o.globals.isBarHorizontal&&(a=25,r=-1*n.width-o.config.yaxis[e].title.offsetX-a)),{xPos:r,padd:a})}},{key:"setYAxisXPosition",value:function(e,n){var s=this.w,i=0,o=0,r=18,a=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach(function(l,c){var u=s.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?s.globals.isBarHorizontal?(o=s.globals.gridWidth+s.globals.translateX-1,s.globals.translateYAxisX[c]=o-l.labels.offsetX):(o=s.globals.gridWidth+s.globals.translateX+a,u||(a+=d+20),s.globals.translateYAxisX[c]=o-l.labels.offsetX+20):(i=s.globals.translateX-r,u||(r+=d+20),s.globals.translateYAxisX[c]=i+l.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;ue.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(n,s){var i=e.config.yaxis[s];if(i&&!i.floating&&i.labels.align!==void 0){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(s,"'] .apexcharts-yaxis-texts-g")),r=ue.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(s,"'] .apexcharts-yaxis-label"))),a=o.getBoundingClientRect();r.forEach(function(l){l.setAttribute("text-anchor",i.labels.align)}),i.labels.align!=="left"||i.opposite?i.labels.align==="center"?o.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):i.labels.align==="right"&&i.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")):o.setAttribute("transform","translate(-".concat(a.width,", 0)"))}})}}]),t}(),nyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.documentEvent=ue.bind(this.documentEvent,this)}return lt(t,[{key:"addEventListener",value:function(e,n){var s=this.w;s.globals.events.hasOwnProperty(e)?s.globals.events[e].push(n):s.globals.events[e]=[n]}},{key:"removeEventListener",value:function(e,n){var s=this.w;if(s.globals.events.hasOwnProperty(e)){var i=s.globals.events[e].indexOf(n);i!==-1&&s.globals.events[e].splice(i,1)}}},{key:"fireEvent",value:function(e,n){var s=this.w;if(s.globals.events.hasOwnProperty(e)){n&&n.length||(n=[]);for(var i=s.globals.events[e],o=i.length,r=0;r<o;r++)i[r].apply(null,n)}}},{key:"setupEventHandlers",value:function(){var e=this,n=this.w,s=this.ctx,i=n.globals.dom.baseEl.querySelector(n.globals.chartClass);this.ctx.eventList.forEach(function(o){i.addEventListener(o,function(r){var a=Object.assign({},n,{seriesIndex:n.globals.axisCharts?n.globals.capturedSeriesIndex:0,dataPointIndex:n.globals.capturedDataPointIndex});r.type==="mousemove"||r.type==="touchmove"?typeof n.config.chart.events.mouseMove=="function"&&n.config.chart.events.mouseMove(r,s,a):r.type==="mouseleave"||r.type==="touchleave"?typeof n.config.chart.events.mouseLeave=="function"&&n.config.chart.events.mouseLeave(r,s,a):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof n.config.chart.events.click=="function"&&n.config.chart.events.click(r,s,a),s.ctx.events.fireEvent("click",[r,s,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(o){n.globals.dom.baseEl.addEventListener(o,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var n=this.w,s=e.target.className;if(e.type==="click"){var i=n.globals.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}n.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,n.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),t}(),syt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"setCurrentLocaleValues",value:function(e){var n=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(n=this.w.config.chart.locales.concat(window.Apex.chart.locales));var s=n.filter(function(o){return o.name===e})[0];if(!s)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=ue.extend(tj,s);this.w.globals.locale=i.options}}]),t}(),iyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawAxis",value:function(e,n){var s,i,o=this,r=this.w.globals,a=this.w.config,l=new b1(this.ctx,n),c=new BS(this.ctx,n);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(i=c.drawYaxisInversed(0),s=l.drawXaxisInversed(0),r.dom.elGraphical.add(s),r.dom.elGraphical.add(i)):(s=l.drawXaxis(),r.dom.elGraphical.add(s),a.yaxis.map(function(u,d){if(r.ignoreYAxisIndexes.indexOf(d)===-1&&(i=c.drawYaxis(d),r.dom.Paper.add(i),o.w.config.grid.position==="back")){var h=r.dom.Paper.children()[1];h.remove(),r.dom.Paper.add(h)}})))}}]),t}(),q6=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,n=new Ve(this.ctx),s=new ai(this.ctx),i=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,a=i.colorFrom,l=i.colorTo,c=i.opacityFrom,u=i.opacityTo,d=i.stops,h=o.enabled,f=o.left,p=o.top,m=o.blur,b=o.color,_=o.opacity,x=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(x=n.drawGradient("vertical",a,l,c,u,null,d,null));var k=n.drawRect();e.config.xaxis.crosshairs.width===1&&(k=n.drawLine());var C=e.globals.gridHeight;(!ue.isNumber(C)||C<0)&&(C=0);var S=e.config.xaxis.crosshairs.width;(!ue.isNumber(S)||S<0)&&(S=0),k.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:C,width:S,height:C,fill:x,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),h&&(k=s.dropShadow(k,{left:f,top:p,blur:m,color:b,opacity:_})),e.globals.dom.elGraphical.add(k)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,n=new Ve(this.ctx),s=e.config.yaxis[0].crosshairs,i=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=n.drawLine(-i,0,e.globals.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var r=n.drawLine(-i,0,e.globals.gridWidth+i,0,s.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),t}(),oyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"checkResponsiveConfig",value:function(e){var n=this,s=this.w,i=s.config;if(i.responsive.length!==0){var o=i.responsive.slice();o.sort(function(c,u){return c.breakpoint>u.breakpoint?1:u.breakpoint>c.breakpoint?-1:0}).reverse();var r=new y1({}),a=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>u){var h=ue.clone(s.globals.initialConfig);h.series=ue.clone(s.config.series);var f=ys.extendArrayProps(r,h,s);c=ue.extend(f,c),c=ue.extend(s.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=ys.extendArrayProps(r,o[p].options,s),c=ue.extend(s.config,c),n.overrideResponsiveOptions(c))};if(e){var l=ys.extendArrayProps(r,e,s);l=ue.extend(s.config,l),a(l=ue.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new y1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),ryt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return lt(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,n=e.chart,s=e.plotOptions;return n.type==="treemap"&&s.treemap&&s.treemap.distributed||n.type==="heatmap"&&s.heatmap&&s.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,n=e.chart,s=e.plotOptions;return s.bar&&s.bar.distributed&&(n.type==="bar"||n.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,n=new ue;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var s=Rs(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(s),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,n));var i=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}},{key:"getColors",value:function(e){var n=this,s=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,s.config.series.map(function(i,o){var r=e[o]||e[0];return typeof r=="function"?r({value:s.globals.axisCharts?s.globals.series[o][0]||0:s.globals.series[o],seriesIndex:o,dataPointIndex:o,w:n.w}):r})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,n){e.forEach(function(s,i){s&&(n[i]=s)})}},{key:"getMonochromeColors",value:function(e,n,s){var i=e.color,o=e.shadeIntensity,r=e.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?n[0].length*n.length:n.length,l=1/(a/o),c=0;return Array.from({length:a},function(){var u=r==="dark"?s.shadeColor(-1*c,i):s.shadeColor(c,i);return c+=l,u})}},{key:"applyColorTypes",value:function(e,n){var s=this,i=this.w;e.forEach(function(o){i.globals[o].colors=i.config[o].colors===void 0?s.isColorFn?i.config.colors:n:i.config[o].colors.slice(),s.pushExtraColors(i.globals[o].colors)})}},{key:"applyDataLabelsColors",value:function(e){var n=this.w;n.globals.dataLabels.style.colors=n.config.dataLabels.style.colors===void 0?e:n.config.dataLabels.style.colors.slice(),this.pushExtraColors(n.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var n=this.w;n.globals.markers.colors=n.config.markers.colors===void 0?e:n.config.markers.colors.slice(),this.pushExtraColors(n.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.w,o=n||i.globals.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.globals.series.length&&(o=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),e.length<o)for(var r=o-e.length,a=0;a<r;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var n=e.theme.mode,s=n==="dark"?"palette4":n==="light"?"palette1":e.theme.palette||"palette1",i=n==="dark"?"#f6f7f8":n==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=n||"light",e.chart.foreColor=i,e.theme.palette=s,e}},{key:"predefined",value:function(){var e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return e[this.w.config.theme.palette]||e.default}}]),t}(),ayt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var n=this.w,s=e==="title"?n.config.title:n.config.subtitle,i=n.globals.svgWidth/2,o=s.offsetY,r="middle";if(s.align==="left"?(i=10,r="start"):s.align==="right"&&(i=n.globals.svgWidth-10,r="end"),i+=s.offsetX,o=o+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){var a=new Ve(this.ctx).drawText({x:i,y:o,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),n.globals.dom.Paper.add(a)}}}]),t}(),lyt=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getTitleSubtitleCoords",value:function(e){var n=this.w,s=0,i=0,o=e==="title"?n.config.title.floating:n.config.subtitle.floating,r=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(r!==null&&!o){var a=r.getBoundingClientRect();s=a.width,i=n.globals.axisCharts?a.height+5:a.height}return{width:s,height:i}}},{key:"getLegendsRect",value:function(){var e=this.w,n=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(n.style.maxHeight=e.globals.svgHeight/2+"px");var s=Object.assign({},ue.getBoundingClientRect(n));return n!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:s.height===0?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,n=this.w,s=[];n.config.series.forEach(function(l,c){l.data.forEach(function(u,d){var h;h=n.globals.series[c][d],i=n.config.dataLabels.formatter(h,{ctx:e.dCtx.ctx,seriesIndex:c,dataPointIndex:d,w:n}),s.push(i)})});var i=ue.getLargestStringFromArr(s),o=new Ve(this.dCtx.ctx),r=n.config.dataLabels.style,a=o.getTextRects(i,parseInt(r.fontSize),r.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(e,n){var s=e;if(this.w.globals.isMultiLineX){var i=n.map(function(r,a){return Array.isArray(r)?r.length:1}),o=Math.max.apply(Math,Rs(i));s=n[i.indexOf(o)]}return s}}]),t}(),cyt=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getxAxisLabelsCoords",value:function(){var e,n=this.w,s=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&s.length===0&&(s=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var i=this.getxAxisTimeScaleLabelsCoords();e={width:i.width,height:i.height},n.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=n.config.legend.position!=="left"&&n.config.legend.position!=="right"||n.config.legend.floating?0:this.dCtx.lgRect.width;var o=n.globals.xLabelFormatter,r=ue.getLargestStringFromArr(s),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s);n.globals.isBarHorizontal&&(a=r=n.globals.yAxisScale[0].result.reduce(function(p,m){return p.length>m.length?p:m},0));var l=new _v(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new ti(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new ti(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Ve(this.dCtx.ctx),d=u.getTextRects(r,n.config.xaxis.labels.style.fontSize),h=d;if(r!==a&&(h=u.getTextRects(a,n.config.xaxis.labels.style.fontSize)),(e={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*s.length>n.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&n.config.xaxis.labels.rotate!==0||n.config.xaxis.labels.rotateAlways){if(!n.globals.isBarHorizontal){n.globals.rotateXLabels=!0;var f=function(p){return u.getTextRects(p,n.config.xaxis.labels.style.fontSize,n.config.xaxis.labels.style.fontFamily,"rotate(".concat(n.config.xaxis.labels.rotate," 0 0)"),!1)};d=f(r),r!==a&&(h=f(a)),e.height=(d.height>h.height?d.height:h.height)/1.5,e.width=d.width>h.width?d.width:h.width}}else n.globals.rotateXLabels=!1}return n.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,n=this.w;if(!n.globals.hasXaxisGroups)return{width:0,height:0};var s,i=((e=n.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||n.config.xaxis.labels.style.fontSize,o=n.globals.groups.map(function(d){return d.title}),r=ue.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Ve(this.dCtx.ctx),c=l.getTextRects(r,i),u=c;return r!==a&&(u=l.getTextRects(a,i)),s={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,n=0,s=0;if(e.config.xaxis.title.text!==void 0){var i=new Ve(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=i.width,s=i.height}return{width:n,height:s}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var s=this.dCtx.timescaleLabels.map(function(o){return o.value}),i=s.reduce(function(o,r){return o===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):o.length>r.length?o:r},0);return 1.05*(e=new Ve(this.dCtx.ctx).getTextRects(i,n.config.xaxis.labels.style.fontSize)).width*s.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var n=this,s=this.w,i=s.globals,o=s.config,r=o.xaxis.type,a=e.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var l=s.config.yaxis[0].opposite&&s.globals.isBarHorizontal,c=function(u,d){o.yaxis.length>1&&function(h){return i.collapsedSeriesIndices.indexOf(h)!==-1}(d)||function(h){if(n.dCtx.timescaleLabels&&n.dCtx.timescaleLabels.length){var f=n.dCtx.timescaleLabels[0],p=n.dCtx.timescaleLabels[n.dCtx.timescaleLabels.length-1].position+a/1.75-n.dCtx.yAxisWidthRight,m=f.position-a/1.75+n.dCtx.yAxisWidthLeft,b=s.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;p>i.svgWidth-i.translateX-b&&(i.skipLastTimelinelabel=!0),m<-(h.show&&!h.floating||o.chart.type!=="bar"&&o.chart.type!=="candlestick"&&o.chart.type!=="rangeBar"&&o.chart.type!=="boxPlot"?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else r==="datetime"?n.dCtx.gridPad.right<a&&!i.rotateXLabels&&(i.skipLastTimelinelabel=!0):r!=="datetime"&&n.dCtx.gridPad.right<a/2-n.dCtx.yAxisWidthRight&&!i.rotateXLabels&&!s.config.xaxis.labels.trim&&(n.dCtx.xPadRight=a/2+1)}(u)};o.yaxis.forEach(function(u,d){l?(n.dCtx.gridPad.left<a&&(n.dCtx.xPadLeft=a/2+1),n.dCtx.xPadRight=a/2+1):c(u,d)})}}]),t}(),uyt=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,n=this.w,s=[],i=10,o=new Hc(this.dCtx.ctx);return n.config.yaxis.map(function(r,a){var l={seriesIndex:a,dataPointIndex:-1,w:n},c=n.globals.yAxisScale[a],u=0;if(!o.isYAxisHidden(a)&&r.labels.show&&r.labels.minWidth!==void 0&&(u=r.labels.minWidth),!o.isYAxisHidden(a)&&r.labels.show&&c.result.length){var d=n.globals.yLabelFormatters[a],h=c.niceMin===Number.MIN_VALUE?0:c.niceMin,f=c.result.reduce(function(C,S){var E,P;return((E=String(d(C,l)))===null||E===void 0?void 0:E.length)>((P=String(d(S,l)))===null||P===void 0?void 0:P.length)?C:S},h),p=f=d(f,l);if(f!==void 0&&f.length!==0||(f=c.niceMax),n.globals.isBarHorizontal){i=0;var m=n.globals.labels.slice();f=ue.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var b=new Ve(e.dCtx.ctx),_="rotate(".concat(r.labels.rotate," 0 0)"),x=b.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,_,!1),k=x;f!==p&&(k=b.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,_,!1)),s.push({width:(u>k.width||u>x.width?u:k.width>x.width?k.width:x.width)+i,height:k.height>x.height?k.height:x.height})}else s.push({width:0,height:0})}),s}},{key:"getyAxisTitleCoords",value:function(){var e=this,n=this.w,s=[];return n.config.yaxis.map(function(i,o){if(i.show&&i.title.text!==void 0){var r=new Ve(e.dCtx.ctx),a="rotate(".concat(i.title.rotate," 0 0)"),l=r.getTextRects(i.title.text,i.title.style.fontSize,i.title.style.fontFamily,a,!1);s.push({width:l.width,height:l.height})}else s.push({width:0,height:0})}),s}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,n=0,s=0,i=0,o=e.globals.yAxisScale.length>1?10:0,r=new Hc(this.dCtx.ctx),a=function(l,c){var u=e.config.yaxis[c].floating,d=0;l.width>0&&!u?(d=l.width+o,function(h){return e.globals.ignoreYAxisIndexes.indexOf(h)>-1}(c)&&(d=d-l.width-o)):d=u||r.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?i+=d:s+=d,n+=d};return e.globals.yLabelsCoords.map(function(l,c){a(l,c)}),e.globals.yTitleCoords.map(function(l,c){a(l,c)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(n=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,n}}]),t}(),dyt=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var n=this.w,s=n.config,i=n.globals;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;var o=function(f){return["bar","rangeBar","candlestick","boxPlot"].includes(f)},r=s.chart.type,a=0,l=o(r)?s.series.length:1;i.comboBarCount>0&&(l=i.comboBarCount),i.collapsedSeries.forEach(function(f){o(f.type)&&(l-=1)}),s.chart.stacked&&(l=1);var c=o(r)||i.comboBarCount>0,u=Math.abs(i.initialMaxX-i.initialMinX);if(c&&i.isXNumeric&&!i.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=i.dataPoints);var d=u/e,h=i.minXDiff&&i.minXDiff/d>0?i.minXDiff/d:0;h>e/2&&(h/=2),(a=h*parseInt(s.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,n=this.w,s=n.globals,i=this.dCtx.isSparkline||!s.axisCharts?0:10;["title","subtitle"].forEach(function(a){n.config[a].text!==void 0?i+=n.config[a].margin:i+=e.dCtx.isSparkline||!s.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||s.axisCharts||(i+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");s.gridHeight-=o.height+r.height+i,s.translateY+=o.height+r.height+i}},{key:"setGridXPosForDualYAxis",value:function(e,n){var s=this.w,i=new Hc(this.dCtx.ctx);s.config.yaxis.forEach(function(o,r){s.globals.ignoreYAxisIndexes.indexOf(r)!==-1||o.floating||i.isYAxisHidden(r)||(o.opposite&&(s.globals.translateX-=n[r].width+e[r].width+parseInt(o.labels.style.fontSize,10)/1.2+12),s.globals.translateX<2&&(s.globals.translateX=2))})}}]),t}(),e_=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new lyt(this),this.dimYAxis=new uyt(this),this.dimXAxis=new cyt(this),this.dimGrid=new dyt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return lt(t,[{key:"plotCoords",value:function(){var e=this,n=this.w,s=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var i=Array.isArray(n.config.stroke.width)?Math.max.apply(Math,Rs(n.config.stroke.width)):n.config.stroke.width;this.isSparkline&&((n.config.markers.discrete.length>0||n.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var a=$U(r,2),l=a[0],c=a[1];e.gridPad[l]=Math.max(c,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),s.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),s.gridHeight=s.gridHeight-this.gridPad.top-this.gridPad.bottom,s.gridWidth=s.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var o=this.dimGrid.gridPadForColumnsInNumericAxis(s.gridWidth);s.gridWidth=s.gridWidth-2*o,s.translateX=s.translateX+this.gridPad.left+this.xPadLeft+(o>0?o:0),s.translateY=s.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,n=this.w,s=n.globals,i=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();s.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(f,p){n.globals.yLabelsCoords.push({width:i[p].width,index:p}),n.globals.yTitleCoords.push({width:o[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),l=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,l,a),s.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,s.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(s.rotateXLabels=!1,s.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),s.translateXAxisY=s.translateXAxisY+n.config.xaxis.labels.offsetY,s.translateXAxisX=s.translateXAxisX+n.config.xaxis.labels.offsetX;var c=this.yAxisWidth,u=this.xAxisHeight;s.xAxisLabelsHeight=this.xAxisHeight-l.height,s.xAxisGroupLabelsHeight=s.xAxisLabelsHeight-r.height,s.xAxisLabelsWidth=this.xAxisWidth,s.xAxisHeight=this.xAxisHeight;var d=10;(n.config.chart.type==="radar"||this.isSparkline)&&(c=0,u=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||n.config.chart.type==="treemap")&&(c=0,u=0,d=0),this.isSparkline||n.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(r);var h=function(){s.translateX=c+e.datalabelsCoords.width,s.gridHeight=s.svgHeight-e.lgRect.height-u-(e.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),s.gridWidth=s.svgWidth-c-2*e.datalabelsCoords.width};switch(n.config.xaxis.position==="top"&&(d=s.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":s.translateY=d,h();break;case"top":s.translateY=this.lgRect.height+d,h();break;case"left":s.translateY=d,s.translateX=this.lgRect.width+c+this.datalabelsCoords.width,s.gridHeight=s.svgHeight-u-12,s.gridWidth=s.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width;break;case"right":s.translateY=d,s.translateX=c+this.datalabelsCoords.width,s.gridHeight=s.svgHeight-u-12,s.gridWidth=s.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,i),new BS(this.ctx).setYAxisXPosition(i,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,n=e.globals,s=e.config,i=0;e.config.legend.show&&!e.config.legend.floating&&(i=20);var o=s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",r=s.plotOptions[o].offsetY,a=s.plotOptions[o].offsetX;if(!s.legend.show||s.legend.floating){n.gridHeight=n.svgHeight;var l=n.dom.elWrap.getBoundingClientRect().width;return n.gridWidth=Math.min(l,n.gridHeight),n.translateY=r,void(n.translateX=a+(n.svgWidth-n.gridWidth)/2)}switch(s.legend.position){case"bottom":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=r-10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"top":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=this.lgRect.height+r+10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"left":n.gridWidth=n.svgWidth-this.lgRect.width-i,n.gridHeight=s.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+this.lgRect.width+i;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-i-5,n.gridHeight=s.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,n,s){var i=this.w,o=i.globals.hasXaxisGroups?2:1,r=s.height+e.height+n.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,l=i.globals.rotateXLabels?22:10,c=i.globals.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*a+o*l+c,this.xAxisWidth=e.width,this.xAxisHeight-n.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);var u=0,d=0;i.config.yaxis.forEach(function(h){u+=h.labels.minWidth,d+=h.labels.maxWidth}),this.yAxisWidth<u&&(this.yAxisWidth=u),this.yAxisWidth>d&&(this.yAxisWidth=d)}}]),t}(),hyt=function(){function t(e){at(this,t),this.w=e.w,this.lgCtx=e}return lt(t,[{key:"getLegendStyles",value:function(){var e,n,s,i=document.createElement("style");i.setAttribute("type","text/css");var o=((e=this.lgCtx.ctx)===null||e===void 0||(n=e.opts)===null||n===void 0||(s=n.chart)===null||s===void 0?void 0:s.nonce)||this.w.config.chart.nonce;o&&i.setAttribute("nonce",o);var r=document.createTextNode(`
173 .apexcharts-flip-y {
174 transform: scaleY(-1) translateY(-100%);
175 transform-origin: top;
176 transform-box: fill-box;
177 }
178 .apexcharts-flip-x {
179 transform: scaleX(-1);
180 transform-origin: center;
181 transform-box: fill-box;
182 }
183 .apexcharts-legend {
184 display: flex;
185 overflow: auto;
186 padding: 0 10px;
187 }
188 .apexcharts-legend.apexcharts-legend-group-horizontal {
189 flex-direction: column;
190 }
191 .apexcharts-legend-group {
192 display: flex;
193 }
194 .apexcharts-legend-group-vertical {
195 flex-direction: column-reverse;
196 }
197 .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
198 flex-wrap: wrap
199 }
200 .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
201 flex-direction: column;
202 bottom: 0;
203 }
204 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
205 justify-content: flex-start;
206 align-items: flex-start;
207 }
208 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
209 justify-content: center;
210 align-items: center;
211 }
212 .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
213 justify-content: flex-end;
214 align-items: flex-end;
215 }
216 .apexcharts-legend-series {
217 cursor: pointer;
218 line-height: normal;
219 display: flex;
220 align-items: center;
221 }
222 .apexcharts-legend-text {
223 position: relative;
224 font-size: 14px;
225 }
226 .apexcharts-legend-text *, .apexcharts-legend-marker * {
227 pointer-events: none;
228 }
229 .apexcharts-legend-marker {
230 position: relative;
231 display: flex;
232 align-items: center;
233 justify-content: center;
234 cursor: pointer;
235 margin-right: 1px;
236 }
237
238 .apexcharts-legend-series.apexcharts-no-click {
239 cursor: auto;
240 }
241 .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
242 display: none !important;
243 }
244 .apexcharts-inactive-legend {
245 opacity: 0.45;
246 }
247
248 `);return i.appendChild(r),i}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),n=e.width;return{clwh:e.height,clww:n}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,n){var s=this,i=this.w;if(i.globals.axisCharts||i.config.chart.type==="radialBar"){i.globals.resized=!0;var o=null,r=null;i.globals.risingSeries=[],i.globals.axisCharts?(o=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(o.getAttribute("data:realIndex"),10)):(o=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(o.getAttribute("rel"),10)-1),n?[{cs:i.globals.collapsedSeries,csi:i.globals.collapsedSeriesIndices},{cs:i.globals.ancillaryCollapsedSeries,csi:i.globals.ancillaryCollapsedSeriesIndices}].forEach(function(u){s.riseCollapsedSeries(u.cs,u.csi,r)}):this.hideSeries({seriesEl:o,realIndex:r})}else{var a=i.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),l=i.config.chart.type;if(l==="pie"||l==="polarArea"||l==="donut"){var c=i.config.plotOptions.pie.donut.labels;new Ve(this.lgCtx.ctx).pathMouseDown(a,null),this.lgCtx.ctx.pie.printDataLabelsInner(a.node,c)}a.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var n=e.realIndex,s=this.w,i=s.globals,o=ue.clone(s.config.series);if(i.axisCharts){var r=s.config.yaxis[i.seriesYAxisReverseMap[n]],a={index:n,data:o[n].data.slice(),type:o[n].type||s.config.chart.type};if(r&&r.show&&r.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(i.ancillaryCollapsedSeries.push(a),i.ancillaryCollapsedSeriesIndices.push(n));else if(i.collapsedSeriesIndices.indexOf(n)<0){i.collapsedSeries.push(a),i.collapsedSeriesIndices.push(n);var l=i.risingSeries.indexOf(n);i.risingSeries.splice(l,1)}}else i.collapsedSeries.push({index:n,data:o[n]}),i.collapsedSeriesIndices.push(n);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.config.series.length,this._getSeriesBasedOnCollapsedState(o)}},{key:"hideSeries",value:function(e){for(var n=e.seriesEl,s=e.realIndex,i=this.w,o=this.getSeriesAfterCollapsing({realIndex:s}),r=n.childNodes,a=0;a<r.length;a++)r[a].classList.contains("apexcharts-series-markers-wrap")&&(r[a].classList.contains("apexcharts-hide")?r[a].classList.remove("apexcharts-hide"):r[a].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,n,s){var i=this.w,o=ue.clone(i.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===s&&(i.globals.axisCharts?o[s].data=e[r].data.slice():o[s]=e[r].data,typeof o[s]!="number"&&(o[s].hidden=!1),e.splice(r,1),n.splice(r,1),i.globals.risingSeries.push(s));o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var n=this.w,s=0;return n.globals.axisCharts?e.forEach(function(i,o){n.globals.collapsedSeriesIndices.indexOf(o)<0&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)<0||(e[o].data=[],s++)}):e.forEach(function(i,o){!n.globals.collapsedSeriesIndices.indexOf(o)<0&&(e[o]=0,s++)}),n.globals.allSeriesCollapsed=s===e.length,e}}]),t}(),rj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new hyt(this)}return lt(t,[{key:"init",value:function(){var e=this.w,n=e.globals,s=e.config,i=s.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!n.axisCharts)&&s.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():s.legend.position!=="right"&&s.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var n=e.i,s=e.fillcolor,i=this.w,o=document.createElement("span");o.classList.add("apexcharts-legend-marker");var r=i.config.legend.markers.shape||i.config.markers.shape,a=r;Array.isArray(r)&&(a=r[n]);var l=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[n]):parseFloat(i.config.legend.markers.size),c=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[n]):parseFloat(i.config.legend.markers.offsetX),u=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[n]):parseFloat(i.config.legend.markers.offsetY),d=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[n]):parseFloat(i.config.legend.markers.strokeWidth),h=o.style;if(h.height=2*(l+d)+"px",h.width=2*(l+d)+"px",h.left=c+"px",h.top=u+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=s[n],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[n]&&(o.innerHTML=i.config.legend.markers.customHTML[n]()):o.innerHTML=i.config.legend.markers.customHTML();else{var f=new Op(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:n,strokeWidth:d,size:l}),p=window.SVG().addTo(o).size("100%","100%"),m=new Ve(this.ctx).drawMarker(0,0,et(et({},f),{},{pointFillColor:Array.isArray(s)?s[n]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(b){b.node.classList.contains("apexcharts-marker-triangle")?b.node.style.transform="translate(50%, 45%)":b.node.style.transform="translate(50%, 50%)"}),p.add(m)}return o}},{key:"drawLegends",value:function(){var e=this,n=this,s=this.w,i=s.config.legend.fontFamily,o=s.globals.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){var a=s.config.plotOptions.heatmap.colorScale.ranges;o=a.map(function(f){return f.name?f.name:f.from+" - "+f.to}),r=a.map(function(f){return f.color})}else this.isBarsDistributed&&(o=s.globals.labels.slice());s.config.legend.customLegendItems.length&&(o=s.config.legend.customLegendItems);var l=s.globals.legendFormatter,c=s.config.legend.inverseOrder,u=[];s.globals.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.globals.seriesGroups.forEach(function(f,p){u[p]=document.createElement("div"),u[p].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(p)),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?s.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):u[p].classList.add("apexcharts-legend-group-vertical")});for(var d=function(f){var p,m=l(o[f],{seriesIndex:f,w:s}),b=!1,_=!1;if(s.globals.collapsedSeries.length>0)for(var x=0;x<s.globals.collapsedSeries.length;x++)s.globals.collapsedSeries[x].index===f&&(b=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(var k=0;k<s.globals.ancillaryCollapsedSeriesIndices.length;k++)s.globals.ancillaryCollapsedSeriesIndices[k]===f&&(_=!0);var C=e.createLegendMarker({i:f,fillcolor:r});Ve.setAttrs(C,{rel:f+1,"data:collapsed":b||_}),(b||_)&&C.classList.add("apexcharts-inactive-legend");var S=document.createElement("div"),E=document.createElement("span");E.classList.add("apexcharts-legend-text"),E.innerHTML=Array.isArray(m)?m.join(" "):m;var P=s.config.legend.labels.useSeriesColors?s.globals.colors[f]:Array.isArray(s.config.legend.labels.colors)?(p=s.config.legend.labels.colors)===null||p===void 0?void 0:p[f]:s.config.legend.labels.colors;P||(P=s.config.chart.foreColor),E.style.color=P,E.style.fontSize=parseFloat(s.config.legend.fontSize)+"px",E.style.fontWeight=s.config.legend.fontWeight,E.style.fontFamily=i||s.config.chart.fontFamily,Ve.setAttrs(E,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":b||_}),S.appendChild(C),S.appendChild(E);var T=new ys(e.ctx);s.config.legend.showForZeroSeries||T.getSeriesTotalByIndex(f)===0&&T.seriesHaveSameValues(f)&&!T.isSeriesNull(f)&&s.globals.collapsedSeriesIndices.indexOf(f)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||T.isSeriesNull(f)&&s.globals.collapsedSeriesIndices.indexOf(f)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-null-series"),u.length?s.globals.seriesGroups.forEach(function(L,I){var V;L.includes((V=s.config.series[f])===null||V===void 0?void 0:V.name)&&(s.globals.dom.elLegendWrap.appendChild(u[I]),u[I].appendChild(S))}):s.globals.dom.elLegendWrap.appendChild(S),s.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(s.config.legend.horizontalAlign)),s.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+s.config.legend.position),S.classList.add("apexcharts-legend-series"),S.style.margin="".concat(s.config.legend.itemMargin.vertical,"px ").concat(s.config.legend.itemMargin.horizontal,"px"),s.globals.dom.elLegendWrap.style.width=s.config.legend.width?s.config.legend.width+"px":"",s.globals.dom.elLegendWrap.style.height=s.config.legend.height?s.config.legend.height+"px":"",Ve.setAttrs(S,{rel:f+1,seriesName:ue.escapeString(o[f]),"data:collapsed":b||_}),(b||_)&&S.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||S.classList.add("apexcharts-no-click")},h=c?o.length-1:0;c?h>=0:h<=o.length-1;c?h--:h++)d(h);s.globals.dom.elWrap.addEventListener("click",n.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.globals.dom.elWrap.addEventListener("mousemove",n.onLegendHovered,!0),s.globals.dom.elWrap.addEventListener("mouseout",n.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,n){var s=this.w,i=s.globals.dom.elLegendWrap,o=i.clientHeight,r=0,a=0;if(s.config.legend.position==="bottom")a=s.globals.svgHeight-Math.min(o,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){var l=new e_(this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,u=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(c>0?c-10:0)+(u>0?u-10:0)}i.style.position="absolute",r=r+e+s.config.legend.offsetX,a=a+n+s.config.legend.offsetY,i.style.left=r+"px",i.style.top=a+"px",s.config.legend.position==="right"&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(function(d){i.style[d]&&(i.style[d]=parseInt(s.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var n=new e_(this.ctx),s=n.dimHelpers.getTitleSubtitleCoords("title"),i=n.dimHelpers.getTitleSubtitleCoords("subtitle"),o=0;e.config.legend.position==="top"&&(o=s.height+i.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,o)}},{key:"legendAlignVertical",value:function(){var e=this.w,n=this.legendHelpers.getLegendDimensions(),s=0;e.config.legend.position==="left"&&(s=20),e.config.legend.position==="right"&&(s=e.globals.svgWidth-n.clww-10),this.setLegendWrapXY(s,20)}},{key:"onLegendHovered",value:function(e){var n=this.w,s=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(n.config.chart.type==="heatmap"||this.isBarsDistributed){if(s){var i=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new hr(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&s&&new hr(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var n=this.w;if(!n.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var s=parseInt(e.target.getAttribute("rel"),10)-1,i=e.target.getAttribute("data:collapsed")==="true",o=this.w.config.chart.events.legendClick;typeof o=="function"&&o(this.ctx,s,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,s,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,s,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,s,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(s,i)}}}]),t}(),aj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return lt(t,[{key:"createToolbar",value:function(){var e=this,n=this.w,s=function(){return document.createElement("div")},i=s();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=n.config.chart.toolbar.offsetY+"px",i.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(i),this.elZoom=s(),this.elZoomIn=s(),this.elZoomOut=s(),this.elPan=s(),this.elSelection=s(),this.elZoomReset=s(),this.elMenuIcon=s(),this.elMenu=s(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var o=0;o<this.t.customIcons.length;o++)this.elCustomIcons.push(s());var r=[],a=function(d,h,f){var p=d.toLowerCase();e.t[p]&&n.config.chart.zoom.enabled&&r.push({el:h,icon:typeof e.t[p]=="string"?e.t[p]:f,title:e.localeValues[d],class:"apexcharts-".concat(p,"-icon")})};a("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
249 <path d="M0 0h24v24H0z" fill="none"/>
250 <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
251 </svg>
252 `),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
253 <path d="M0 0h24v24H0z" fill="none"/>
254 <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
255 </svg>
256 `);var l=function(d){e.t[d]&&n.config.chart[d].enabled&&r.push({el:d==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[d]=="string"?e.t[d]:d==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
257 <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
258 <path d="M0 0h24v24H0V0z" fill="none"/>
259 <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
260 </svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
261 <path d="M0 0h24v24H0z" fill="none"/>
262 <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
263 </svg>`,title:e.localeValues[d==="zoom"?"selectionZoom":"selection"],class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};l("zoom"),l("selection"),this.t.pan&&n.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
264 <defs>
265 <path d="M0 0h24v24H0z" id="a"/>
266 </defs>
267 <clipPath id="b">
268 <use overflow="visible" xlink:href="#a"/>
269 </clipPath>
270 <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
271 </svg>`,title:this.localeValues.pan,class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
272 <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
273 <path d="M0 0h24v24H0z" fill="none"/>
274 </svg>`),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var c=0;c<this.elCustomIcons.length;c++)r.push({el:this.elCustomIcons[c],icon:this.t.customIcons[c].icon,title:this.t.customIcons[c].title,index:this.t.customIcons[c].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[c].class});r.forEach(function(d,h){d.index&&ue.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Ve.setAttrs(r[u].el,{class:r[u].class,title:r[u].title}),r[u].el.innerHTML=r[u].icon,i.appendChild(r[u].el);this._createHamburgerMenu(i),n.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.globals.panEnabled?this.elPan.classList.add(this.selectedClass):n.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),Ve.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var n=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],s=0;s<n.length;s++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[s].innerHTML=n[s].title,Ve.setAttrs(this.elMenuItems[s],{class:"apexcharts-menu-item ".concat(n[s].name),title:n[s].title}),this.elMenu.appendChild(this.elMenuItems[s])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(s){s.classList.contains("exportSVG")?s.addEventListener("click",e.handleDownload.bind(e,"svg")):s.classList.contains("exportPNG")?s.addEventListener("click",e.handleDownload.bind(e,"png")):s.classList.contains("exportCSV")&&s.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons[n].addEventListener("click",this.t.customIcons[n].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){n.ctx.toolbar.toggleOtherControls();var s=e==="selection"?n.ctx.toolbar.elSelection:n.ctx.toolbar.elZoom,i=e==="selection"?"selectionEnabled":"zoomEnabled";n.w.globals[i]=!n.w.globals[i],s.classList.contains(n.ctx.toolbar.selectedClass)?s.classList.remove(n.ctx.toolbar.selectedClass):s.classList.add(n.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var n=e==="pan"?this.elPan:this.elZoom,s=e==="pan"?this.elZoom:this.elPan;n&&n.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,n=this.w;n.globals.panEnabled=!1,n.globals.zoomEnabled=!1,n.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(s){s&&s.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var n=(this.minX+this.maxX)/2,s=(this.minX+n)/2,i=(this.maxX+n)/2,o=this._getNewMinXMaxX(s,i);e.globals.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var n=(this.minX+this.maxX)/2,s=this.minX-(n-this.minX),i=this.maxX-(n-this.maxX),o=this._getNewMinXMaxX(s,i);e.globals.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,n){var s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(e):e,maxX:s?Math.floor(n):n}}},{key:"zoomUpdateOptions",value:function(e,n){var s=this.w;if(e!==void 0||n!==void 0){if(!(s.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,n=s.globals.dataPoints),n-e<2))){var i={min:e,max:n},o=this.getBeforeZoomRange(i);o&&(i=o.xaxis);var r={xaxis:i},a=ue.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(r.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,n){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:n})}},{key:"getBeforeZoomRange",value:function(e,n){var s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:e,yaxis:n})),s}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var n=this.w,s=new Qb(this.ctx);switch(e){case"svg":s.exportToSVG(this.ctx);break;case"png":s.exportToPng(this.ctx);break;case"csv":s.exportToCSV({series:n.config.series,columnDelimiter:n.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){var s=n.w;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,n.updateHelpers.revertDefaultAxisMinMax(),typeof s.config.chart.events.beforeResetZoom=="function"){var i=s.config.chart.events.beforeResetZoom(n,s);i&&n.updateHelpers.revertDefaultAxisMinMax(i)}typeof s.config.chart.events.zoomed=="function"&&n.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max}),s.globals.zoomed=!1;var o=n.ctx.series.emptyCollapsedSeries(ue.clone(s.globals.initialSeries));n.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),fyt=function(t){gv(n,aj);var e=mv(n);function n(s){var i;return at(this,n),(i=e.call(this,s)).ctx=s,i.w=s.w,i.dragged=!1,i.graphics=new Ve(i.ctx),i.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],i.clientX=0,i.clientY=0,i.startX=0,i.endX=0,i.dragX=0,i.startY=0,i.endY=0,i.dragY=0,i.moveDirection="none",i.debounceTimer=null,i.debounceDelay=100,i.wheelDelay=400,i}return lt(n,[{key:"init",value:function(s){var i=this,o=s.xyRatios,r=this.w,a=this;this.xyRatios=o,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Hs(0,0,r.globals.gridWidth,r.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.Paper.add(this.zoomRect),r.globals.dom.Paper.add(this.selectionRect),r.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):r.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(l){i.hoverArea.addEventListener(l,a.svgMouseEvents.bind(a,o),{capture:!1,passive:!0})}),r.config.chart.zoom.enabled&&r.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",a.mouseWheelEvent.bind(a),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(s,i){var o=this.w,r=this.ctx.toolbar,a=o.globals.zoomEnabled?o.config.chart.zoom.type:o.config.chart.selection.type,l=o.config.chart.toolbar.autoSelected;if(i.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(l==="pan"?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(l),this.shiftWasPressed=!1),i.target){var c,u=i.target.classList;if(i.target.parentNode&&i.target.parentNode!==null&&(c=i.target.parentNode.classList),!(u.contains("apexcharts-legend-marker")||u.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(this.clientX=i.type==="touchmove"||i.type==="touchstart"?i.touches[0].clientX:i.type==="touchend"?i.changedTouches[0].clientX:i.clientX,this.clientY=i.type==="touchmove"||i.type==="touchstart"?i.touches[0].clientY:i.type==="touchend"?i.changedTouches[0].clientY:i.clientY,i.type==="mousedown"&&i.which===1||i.type==="touchstart"){var d=this.gridRect.getBoundingClientRect();this.startX=this.clientX-d.left-o.globals.barPadForNumericAxis,this.startY=this.clientY-d.top,this.dragged=!1,this.w.globals.mousedown=!0}(i.type==="mousemove"&&i.which===1||i.type==="touchmove")&&(this.dragged=!0,o.globals.panEnabled?(o.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:s})):(this.w.globals.mousedown&&o.globals.zoomEnabled||this.w.globals.mousedown&&o.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),i.type!=="mouseup"&&i.type!=="touchend"&&i.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(s){var i,o=s.zoomtype,r=s.isResized,a=this.w,l=(i=this.gridRect)===null||i===void 0?void 0:i.getBoundingClientRect();l&&(this.w.globals.mousedown||r)&&(this.endX=this.clientX-l.left-a.globals.barPadForNumericAxis,this.endY=this.clientY-l.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(a.globals.zoomEnabled||a.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:o}),a.globals.panEnabled&&a.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),a.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(s){var i=this,o=this.w;s.preventDefault();var r=Date.now();r-o.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(s),o.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-o.globals.lastWheelExecution>i.wheelDelay&&(i.executeMouseWheelZoom(s),o.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(s){var i,o=this.w;this.minX=o.globals.isRangeBar?o.globals.minY:o.globals.minX,this.maxX=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;var r=(i=this.gridRect)===null||i===void 0?void 0:i.getBoundingClientRect();if(r){var a,l,c,u=(s.clientX-r.left)/r.width,d=this.minX,h=this.maxX,f=h-d;if(s.deltaY<0){var p=d+u*f;l=p-(a=.5*f)/2,c=p+a/2}else l=d-(a=1.5*f)/2,c=h+a/2;if(!o.globals.isRangeBar){l=Math.max(l,o.globals.initialMinX),c=Math.min(c,o.globals.initialMaxX);var m=.01*(o.globals.initialMaxX-o.globals.initialMinX);if(c-l<m){var b=(l+c)/2;l=b-m/2,c=b+m/2}}var _=this._getNewMinXMaxX(l,c);isNaN(_.minX)||isNaN(_.maxX)||this.zoomUpdateOptions(_.minX,_.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var s=this,i=this.w;if(this.selectionRect){var o=this.selectionRect.node.getBoundingClientRect();o.width>0&&o.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,a,l,c,u){return u==="l"||u==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,a){return r.center(a[0],a[1])}}).resize().on("resize",function(){var r=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type;s.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var s=this.w,i=this.xyRatios;if(!s.globals.zoomEnabled){if(s.globals.selection!==void 0&&s.globals.selection!==null)this.drawSelectionRect(et(et({},s.globals.selection),{},{translateX:s.globals.translateX,translateY:s.globals.translateY}));else if(s.config.chart.selection.xaxis.min!==void 0&&s.config.chart.selection.xaxis.max!==void 0){var o=(s.config.chart.selection.xaxis.min-s.globals.minX)/i.xRatio,r=s.globals.gridWidth-(s.globals.maxX-s.config.chart.selection.xaxis.max)/i.xRatio-o;s.globals.isRangeBar&&(o=(s.config.chart.selection.xaxis.min-s.globals.yAxisScale[0].niceMin)/i.invertedYRatio,r=(s.config.chart.selection.xaxis.max-s.config.chart.selection.xaxis.min)/i.invertedYRatio);var a={x:o,y:0,width:r,height:s.globals.gridHeight,translateX:s.globals.translateX,translateY:s.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof s.config.chart.events.selection=="function"&&s.config.chart.events.selection(this.ctx,{xaxis:{min:s.config.chart.selection.xaxis.min,max:s.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(s){var i=s.x,o=s.y,r=s.width,a=s.height,l=s.translateX,c=l===void 0?0:l,u=s.translateY,d=u===void 0?0:u,h=this.w,f=this.zoomRect,p=this.selectionRect;if(this.dragged||h.globals.selection!==null){var m={transform:"translate("+c+", "+d+")"};h.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),f.attr({x:i,y:o,width:r,height:a,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Ve.setAttrs(f.node,m)),h.globals.selectionEnabled&&(p.attr({x:i,y:o,width:r>0?r:0,height:a>0?a:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Ve.setAttrs(p.node,m))}}},{key:"hideSelectionRect",value:function(s){s&&s.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(s){var i=s.context,o=s.zoomtype,r=this.w,a=i,l=this.gridRect.getBoundingClientRect(),c=a.startX-1,u=a.startY,d=!1,h=!1,f=a.clientX-l.left-r.globals.barPadForNumericAxis,p=a.clientY-l.top,m=f-c,b=p-u,_={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(m+c)>r.globals.gridWidth?m=r.globals.gridWidth-c:f<0&&(m=c),c>f&&(d=!0,m=Math.abs(m)),u>p&&(h=!0,b=Math.abs(b)),_=et(et({},_=o==="x"?{x:d?c-m:c,y:0,width:m,height:r.globals.gridHeight}:o==="y"?{x:0,y:h?u-b:u,width:r.globals.gridWidth,height:b}:{x:d?c-m:c,y:h?u-b:u,width:m,height:b}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),a.drawSelectionRect(_),a.selectionDragging("resizing"),_}},{key:"selectionDragging",value:function(s,i){var o=this,r=this.w;if(i){i.preventDefault();var a=i.detail,l=a.handler,c=a.box,u=c.x,d=c.y;u<this.constraints.x&&(u=this.constraints.x),d<this.constraints.y&&(d=this.constraints.y),c.x2>this.constraints.x2&&(u=this.constraints.x2-c.w),c.y2>this.constraints.y2&&(d=this.constraints.y2-c.h),l.move(u,d);var h=this.xyRatios,f=this.selectionRect,p=0;s==="resizing"&&(p=30);var m=function(_){return parseFloat(f.node.getAttribute(_))},b={x:m("x"),y:m("y"),width:m("width"),height:m("height")};r.globals.selection=b,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var _,x,k,C,S=o.gridRect.getBoundingClientRect(),E=f.node.getBoundingClientRect();r.globals.isRangeBar?(_=r.globals.yAxisScale[0].niceMin+(E.left-S.left)*h.invertedYRatio,x=r.globals.yAxisScale[0].niceMin+(E.right-S.left)*h.invertedYRatio,k=0,C=1):(_=r.globals.xAxisScale.niceMin+(E.left-S.left)*h.xRatio,x=r.globals.xAxisScale.niceMin+(E.right-S.left)*h.xRatio,k=r.globals.yAxisScale[0].niceMin+(S.bottom-E.bottom)*h.yRatio[0],C=r.globals.yAxisScale[0].niceMax-(E.top-S.top)*h.yRatio[0]);var P={xaxis:{min:_,max:x},yaxis:{min:k,max:C}};r.config.chart.events.selection(o.ctx,P),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(o.ctx,P)},p))}}},{key:"selectionDrawn",value:function(s){var i=s.context,o=s.zoomtype,r=this.w,a=i,l=this.xyRatios,c=this.ctx.toolbar;if(a.startX>a.endX){var u=a.startX;a.startX=a.endX,a.endX=u}if(a.startY>a.endY){var d=a.startY;a.startY=a.endY,a.endY=d}var h=void 0,f=void 0;r.globals.isRangeBar?(h=r.globals.yAxisScale[0].niceMin+a.startX*l.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+a.endX*l.invertedYRatio):(h=r.globals.xAxisScale.niceMin+a.startX*l.xRatio,f=r.globals.xAxisScale.niceMin+a.endX*l.xRatio);var p=[],m=[];if(r.config.yaxis.forEach(function(E,P){var T=r.globals.seriesYAxisMap[P][0];p.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.startY),m.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.endY)}),a.dragged&&(a.dragX>10||a.dragY>10)&&h!==f){if(r.globals.zoomEnabled){var b=ue.clone(r.globals.initialConfig.yaxis),_=ue.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),f=Math.floor(f),h<1&&(h=1,f=r.globals.dataPoints),f-h<2&&(f=h+1)),o!=="xy"&&o!=="x"||(_={min:h,max:f}),o!=="xy"&&o!=="y"||b.forEach(function(E,P){b[P].min=m[P],b[P].max=p[P]}),c){var x=c.getBeforeZoomRange(_,b);x&&(_=x.xaxis?x.xaxis:_,b=x.yaxis?x.yaxis:b)}var k={xaxis:_};r.config.chart.group||(k.yaxis=b),a.ctx.updateHelpers._updateOptions(k,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(_,b)}else if(r.globals.selectionEnabled){var C,S=null;C={min:h,max:f},o!=="xy"&&o!=="y"||(S=ue.clone(r.config.yaxis)).forEach(function(E,P){S[P].min=m[P],S[P].max=p[P]}),r.globals.selection=a.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(a.ctx,{xaxis:C,yaxis:S})}}}},{key:"panDragging",value:function(s){var i=s.context,o=this.w,r=i;if(o.globals.lastClientPosition.x!==void 0){var a=o.globals.lastClientPosition.x-r.clientX,l=o.globals.lastClientPosition.y-r.clientY;Math.abs(a)>Math.abs(l)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(l)&&a<0?this.moveDirection="right":Math.abs(l)>Math.abs(a)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(a)&&l<0&&(this.moveDirection="down")}o.globals.lastClientPosition={x:r.clientX,y:r.clientY};var c=o.globals.isRangeBar?o.globals.minY:o.globals.minX,u=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;o.config.xaxis.convertedCatToNumeric||r.panScrolled(c,u)}},{key:"delayedPanScrolled",value:function(){var s=this.w,i=s.globals.minX,o=s.globals.maxX,r=(s.globals.maxX-s.globals.minX)/2;this.moveDirection==="left"?(i=s.globals.minX+r,o=s.globals.maxX+r):this.moveDirection==="right"&&(i=s.globals.minX-r,o=s.globals.maxX-r),i=Math.floor(i),o=Math.floor(o),this.updateScrolledChart({xaxis:{min:i,max:o}},i,o)}},{key:"panScrolled",value:function(s,i){var o=this.w,r=this.xyRatios,a=ue.clone(o.globals.initialConfig.yaxis),l=r.xRatio,c=o.globals.minX,u=o.globals.maxX;o.globals.isRangeBar&&(l=r.invertedYRatio,c=o.globals.minY,u=o.globals.maxY),this.moveDirection==="left"?(s=c+o.globals.gridWidth/15*l,i=u+o.globals.gridWidth/15*l):this.moveDirection==="right"&&(s=c-o.globals.gridWidth/15*l,i=u-o.globals.gridWidth/15*l),o.globals.isRangeBar||(s<o.globals.initialMinX||i>o.globals.initialMaxX)&&(s=c,i=u);var d={xaxis:{min:s,max:i}};o.config.chart.group||(d.yaxis=a),this.updateScrolledChart(d,s,i)}},{key:"updateScrolledChart",value:function(s,i,o){var r=this.w;this.ctx.updateHelpers._updateOptions(s,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:i,max:o}})}}]),n}(),lj=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return lt(t,[{key:"getNearestValues",value:function(e){var n=e.hoverArea,s=e.elGrid,i=e.clientX,o=e.clientY,r=this.w,a=s.getBoundingClientRect(),l=a.width,c=a.height,u=l/(r.globals.dataPoints-1),d=c/r.globals.dataPoints,h=this.hasBars();!r.globals.comboCharts&&!h||r.config.xaxis.convertedCatToNumeric||(u=l/r.globals.dataPoints);var f=i-a.left-r.globals.barPadForNumericAxis,p=o-a.top;f<0||p<0||f>l||p>c?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):r.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):r.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var m=Math.round(f/u),b=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/u),m-=1);var _=null,x=null,k=r.globals.seriesXvalues.map(function(T){return T.filter(function(L){return ue.isNumber(L)})}),C=r.globals.seriesYvalues.map(function(T){return T.filter(function(L){return ue.isNumber(L)})});if(r.globals.isXNumeric){var S=this.ttCtx.getElGrid().getBoundingClientRect(),E=f*(S.width/l),P=p*(S.height/c);_=(x=this.closestInMultiArray(E,P,k,C)).index,m=x.j,_!==null&&r.globals.hasNullValues&&(k=r.globals.seriesXvalues[_],m=(x=this.closestInArray(E,k)).j)}return r.globals.capturedSeriesIndex=_===null?-1:_,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=b:r.globals.capturedDataPointIndex=m,{capturedSeries:_,j:r.globals.isBarHorizontal?b:m,hoverX:f,hoverY:p}}},{key:"getFirstActiveXArray",value:function(e){for(var n=this.w,s=0,i=e.map(function(r,a){return r.length>0?a:-1}),o=0;o<i.length;o++)if(i[o]!==-1&&n.globals.collapsedSeriesIndices.indexOf(o)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1){s=i[o];break}return s}},{key:"closestInMultiArray",value:function(e,n,s,i){for(var o,r=this.w,a=1/0,l=null,c=null,u=0;u<s.length;u++)if(o=u,r.globals.collapsedSeriesIndices.indexOf(o)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1)for(var d=s[u],h=i[u],f=Math.min(d.length,h.length),p=0;p<f;p++){var m=e-d[p],b=n-h[p],_=Math.sqrt(m*m+b*b);_<a&&(a=_,l=u,c=p)}return{index:l,j:c}}},{key:"closestInArray",value:function(e,n){for(var s=n[0],i=null,o=Math.abs(e-s),r=0;r<n.length;r++){var a=Math.abs(e-n[r]);a<o&&(o=a,i=r)}return{j:i}}},{key:"isXoverlap",value:function(e){var n=[],s=this.w.globals.seriesX.filter(function(o){return o[0]!==void 0});if(s.length>0)for(var i=0;i<s.length-1;i++)s[i][e]!==void 0&&s[i+1][e]!==void 0&&s[i][e]!==s[i+1][e]&&n.push("unEqual");return n.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,n=this.w.globals.initialSeries,s=0;s<n.length-1;s++)if(n[s].data.length!==n[s+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Rs(e).reduce(function(n,s){return n+s.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");s=Rs(s),n&&(s=s.filter(function(o){var r=Number(o.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),s.sort(function(o,r){var a=Number(o.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return l<a?1:l>a?-1:0});var i=[];return s.forEach(function(o){i.push(o.querySelector(".apexcharts-marker"))}),i}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,n){var s=Number(e.getAttribute("cx")),i=Number(e.getAttribute("cy")),o=e.getAttribute("shape");return new Ve(this.ctx).getMarkerPath(s,i,o,n)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var n=this.w,s=n.config.markers.hover.size;return s===void 0&&(s=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),s}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var n=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=s.allTooltipSeriesGroups,o=0;o<i.length;o++)e==="enable"?(i[o].classList.add("apexcharts-active"),i[o].style.display=n.config.tooltip.items.display):(i[o].classList.remove("apexcharts-active"),i[o].style.display="none")}}]),t}(),pyt=function(){function t(e){at(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new lj(e)}return lt(t,[{key:"drawSeriesTexts",value:function(e){var n=e.shared,s=n===void 0||n,i=e.ttItems,o=e.i,r=o===void 0?0:o,a=e.j,l=a===void 0?null:a,c=e.y1,u=e.y2,d=e.e,h=this.w;h.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:r,j:l,y1:c,y2:u,w:h}):this.toggleActiveInactiveSeries(s,r);var f=this.getValuesToPrint({i:r,j:l});this.printLabels({i:r,j:l,values:f,ttItems:i,shared:s,e:d});var p=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=p.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=p.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var n,s=this,i=e.i,o=e.j,r=e.values,a=e.ttItems,l=e.shared,c=e.e,u=this.w,d=[],h=function(S){return u.globals.seriesGoals[S]&&u.globals.seriesGoals[S][o]&&Array.isArray(u.globals.seriesGoals[S][o])},f=r.xVal,p=r.zVal,m=r.xAxisTTVal,b="",_=u.globals.colors[i];o!==null&&u.config.plotOptions.bar.distributed&&(_=u.globals.colors[o]);for(var x=function(S,E){var P=s.getFormatters(i);b=s.getSeriesName({fn:P.yLbTitleFormatter,index:i,seriesIndex:i,j:o}),u.config.chart.type==="treemap"&&(b=P.yLbTitleFormatter(String(u.config.series[i].data[o].x),{series:u.globals.series,seriesIndex:i,dataPointIndex:o,w:u}));var T=u.config.tooltip.inverseOrder?E:S;if(u.globals.axisCharts){var L=function(R){var N,F,B,G;return u.globals.isRangeData?P.yLbFormatter((N=u.globals.seriesRangeStart)===null||N===void 0||(F=N[R])===null||F===void 0?void 0:F[o],{series:u.globals.seriesRangeStart,seriesIndex:R,dataPointIndex:o,w:u})+" - "+P.yLbFormatter((B=u.globals.seriesRangeEnd)===null||B===void 0||(G=B[R])===null||G===void 0?void 0:G[o],{series:u.globals.seriesRangeEnd,seriesIndex:R,dataPointIndex:o,w:u}):P.yLbFormatter(u.globals.series[R][o],{series:u.globals.series,seriesIndex:R,dataPointIndex:o,w:u})};if(l)P=s.getFormatters(T),b=s.getSeriesName({fn:P.yLbTitleFormatter,index:T,seriesIndex:i,j:o}),_=u.globals.colors[T],n=L(T),h(T)&&(d=u.globals.seriesGoals[T][o].map(function(R){return{attrs:R,val:P.yLbFormatter(R.value,{seriesIndex:T,dataPointIndex:o,w:u})}}));else{var I,V=c==null||(I=c.target)===null||I===void 0?void 0:I.getAttribute("fill");V&&(V.indexOf("url")!==-1?V.indexOf("Pattern")!==-1&&(_=u.globals.dom.baseEl.querySelector(V.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):_=V),n=L(i),h(i)&&Array.isArray(u.globals.seriesGoals[i][o])&&(d=u.globals.seriesGoals[i][o].map(function(R){return{attrs:R,val:P.yLbFormatter(R.value,{seriesIndex:i,dataPointIndex:o,w:u})}}))}}o===null&&(n=P.yLbFormatter(u.globals.series[i],et(et({},u),{},{seriesIndex:i,dataPointIndex:i}))),s.DOMHandling({i,t:T,j:o,ttItems:a,values:{val:n,goalVals:d,xVal:f,xAxisTTVal:m,zVal:p},seriesName:b,shared:l,pColor:_})},k=0,C=u.globals.series.length-1;k<u.globals.series.length;k++,C--)x(k,C)}},{key:"getFormatters",value:function(e){var n,s=this.w,i=s.globals.yLabelFormatters[e];return s.globals.ttVal!==void 0?Array.isArray(s.globals.ttVal)?(i=s.globals.ttVal[e]&&s.globals.ttVal[e].formatter,n=s.globals.ttVal[e]&&s.globals.ttVal[e].title&&s.globals.ttVal[e].title.formatter):(i=s.globals.ttVal.formatter,typeof s.globals.ttVal.title.formatter=="function"&&(n=s.globals.ttVal.title.formatter)):n=s.config.tooltip.y.title.formatter,typeof i!="function"&&(i=s.globals.yLabelFormatters[0]?s.globals.yLabelFormatters[0]:function(o){return o}),typeof n!="function"&&(n=function(o){return o?o+": ":""}),{yLbFormatter:i,yLbTitleFormatter:n}}},{key:"getSeriesName",value:function(e){var n=e.fn,s=e.index,i=e.seriesIndex,o=e.j,r=this.w;return n(String(r.globals.seriesNames[s]),{series:r.globals.series,seriesIndex:i,dataPointIndex:o,w:r})}},{key:"DOMHandling",value:function(e){e.i;var n=e.t,s=e.j,i=e.ttItems,o=e.values,r=e.seriesName,a=e.shared,l=e.pColor,c=this.w,u=this.ttCtx,d=o.val,h=o.goalVals,f=o.xVal,p=o.xAxisTTVal,m=o.zVal,b=null;b=i[n].children,c.config.tooltip.fillSeriesColor&&(i[n].style.backgroundColor=l,b[0].style.display="none"),u.showTooltipTitle&&(u.tooltipTitle===null&&(u.tooltipTitle=c.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),u.tooltipTitle.innerHTML=f),u.isXAxisTooltipEnabled&&(u.xaxisTooltipText.innerHTML=p!==""?p:f);var _=i[n].querySelector(".apexcharts-tooltip-text-y-label");_&&(_.innerHTML=r||"");var x=i[n].querySelector(".apexcharts-tooltip-text-y-value");x&&(x.innerHTML=d!==void 0?d:""),b[0]&&b[0].classList.contains("apexcharts-tooltip-marker")&&(c.config.tooltip.marker.fillColors&&Array.isArray(c.config.tooltip.marker.fillColors)&&(l=c.config.tooltip.marker.fillColors[n]),b[0].style.backgroundColor=l),c.config.tooltip.marker.show||(b[0].style.display="none");var k=i[n].querySelector(".apexcharts-tooltip-text-goals-label"),C=i[n].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&c.globals.seriesGoals[n]){var S=function(){var T="<div >",L="<div>";h.forEach(function(I,V){T+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(I.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(I.attrs.name,"</div>"),L+="<div>".concat(I.val,"</div>")}),k.innerHTML=T+"</div>",C.innerHTML=L+"</div>"};a?c.globals.seriesGoals[n][s]&&Array.isArray(c.globals.seriesGoals[n][s])?S():(k.innerHTML="",C.innerHTML=""):S()}else k.innerHTML="",C.innerHTML="";if(m!==null&&(i[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=c.config.tooltip.z.title,i[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=m!==void 0?m:""),a&&b[0]){if(c.config.tooltip.hideEmptySeries){var E=i[n].querySelector(".apexcharts-tooltip-marker"),P=i[n].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(E.style.display="none",P.style.display="none"):(E.style.display="block",P.style.display="block")}d==null||c.globals.ancillaryCollapsedSeriesIndices.indexOf(n)>-1||c.globals.collapsedSeriesIndices.indexOf(n)>-1||Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1?b[0].parentNode.style.display="none":b[0].parentNode.style.display=c.config.tooltip.items.display}else Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1&&(b[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,n){var s=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(n));i&&(i.classList.add("apexcharts-active"),i.style.display=s.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var n=e.i,s=e.j,i=this.w,o=this.ctx.series.filteredSeriesX(),r="",a="",l=null,c=null,u={series:i.globals.series,seriesIndex:n,dataPointIndex:s,w:i},d=i.globals.ttZFormatter;s===null?c=i.globals.series[n]:i.globals.isXNumeric&&i.config.chart.type!=="treemap"?(r=o[n][s],o[n].length===0&&(r=o[this.tooltipUtil.getFirstActiveXArray(o)][s])):r=new NS(this.ctx).isFormatXY()?i.config.series[n].data[s]!==void 0?i.config.series[n].data[s].x:"":i.globals.labels[s]!==void 0?i.globals.labels[s]:"";var h=r;return i.globals.isXNumeric&&i.config.xaxis.type==="datetime"?r=new _v(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new ti(this.ctx).formatDate,w:this.w}):r=i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,u):i.globals.xLabelFormatter(h,u),i.config.tooltip.x.formatter!==void 0&&(r=i.globals.ttKeyFormatter(h,u)),i.globals.seriesZ.length>0&&i.globals.seriesZ[n].length>0&&(l=d(i.globals.seriesZ[n][s],i)),a=typeof i.config.xaxis.tooltip.formatter=="function"?i.globals.xaxisTooltipFormatter(h,u):r,{val:Array.isArray(c)?c.join(" "):c,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var n=e.i,s=e.j,i=e.y1,o=e.y2,r=e.w,a=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[n]&&(l=l[n]);var c=l({ctx:this.ctx,series:r.globals.series,seriesIndex:n,dataPointIndex:s,y1:i,y2:o,w:r});typeof c=="string"?a.innerHTML=c:(c instanceof Element||typeof c.nodeName=="string")&&(a.innerHTML="",a.appendChild(c))}}]),t}(),cj=function(){function t(e){at(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return lt(t,[{key:"moveXCrosshairs",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,s=this.ttCtx,i=this.w,o=s.getElXCrosshairs(),r=e-s.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(n!==null&&(r=i.globals.gridWidth/a*n),o===null||i.globals.isBarHorizontal||(o.setAttribute("x",r),o.setAttribute("x1",r),o.setAttribute("x2",r),o.setAttribute("y2",i.globals.gridHeight),o.classList.add("apexcharts-active")),r<0&&(r=0),r>i.globals.gridWidth&&(r=i.globals.gridWidth),s.isXAxisTooltipEnabled){var l=r;i.config.xaxis.crosshairs.width!=="tickWidth"&&i.config.xaxis.crosshairs.width!=="barWidth"||(l=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var n=this.ttCtx;n.ycrosshairs!==null&&Ve.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Ve.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var n=this.w,s=this.ttCtx;if(s.xaxisTooltip!==null&&s.xcrosshairsWidth!==0){s.xaxisTooltip.classList.add("apexcharts-active");var i=s.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(e-=s.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=n.globals.translateX;var o;o=new Ve(this.ctx).getTextRects(s.xaxisTooltipText.innerHTML),s.xaxisTooltipText.style.minWidth=o.width+"px",s.xaxisTooltip.style.left=e+"px",s.xaxisTooltip.style.top=i+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var n=this.w,s=this.ttCtx;s.yaxisTTEls===null&&(s.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(s.ycrosshairsHidden.getAttribute("y1"),10),o=n.globals.translateY+i,r=s.yaxisTTEls[e].getBoundingClientRect().height,a=n.globals.translateYAxisX[e]-2;n.config.yaxis[e].opposite&&(a-=26),o-=r/2,n.globals.ignoreYAxisIndexes.indexOf(e)===-1?(s.yaxisTTEls[e].classList.add("apexcharts-active"),s.yaxisTTEls[e].style.top=o+"px",s.yaxisTTEls[e].style.left=a+n.config.yaxis[e].tooltip.offsetX+"px"):s.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.w,o=this.ttCtx,r=o.getElTooltip(),a=o.tooltipRect,l=s!==null?parseFloat(s):1,c=parseFloat(e)+l+5,u=parseFloat(n)+l/2;if(c>i.globals.gridWidth/2&&(c=c-a.ttWidth-l-10),c>i.globals.gridWidth-a.ttWidth-10&&(c=i.globals.gridWidth-a.ttWidth),c<-20&&(c=-20),i.config.tooltip.followCursor){var d=o.getElGrid().getBoundingClientRect();(c=o.e.clientX-d.left)>i.globals.gridWidth/2&&(c-=o.tooltipRect.ttWidth),(u=o.e.clientY+i.globals.translateY-d.top)>i.globals.gridHeight/2&&(u-=o.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+u>i.globals.gridHeight&&(u=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(c)||(c+=i.globals.translateX,r.style.left=c+"px",r.style.top=u+"px")}},{key:"moveMarkers",value:function(e,n){var s=this.w,i=this.ttCtx;if(s.globals.markers.size[e]>0)for(var o=s.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r<o.length;r++)parseInt(o[r].getAttribute("rel"),10)===n&&(i.marker.resetPointsSize(),i.marker.enlargeCurrentPoint(n,o[r]));else i.marker.resetPointsSize(),this.moveDynamicPointOnHover(n,e)}},{key:"moveDynamicPointOnHover",value:function(e,n){var s,i,o,r,a=this.w,l=this.ttCtx,c=new Ve(this.ctx),u=a.globals.pointsArray,d=l.tooltipUtil.getHoverMarkerSize(n),h=a.config.series[n].type;if(!h||h!=="column"&&h!=="candlestick"&&h!=="boxPlot"){o=(s=u[n][e])===null||s===void 0?void 0:s[0],r=((i=u[n][e])===null||i===void 0?void 0:i[1])||0;var f=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"'] .apexcharts-series-markers path"));if(f&&r<a.globals.gridHeight&&r>0){var p=f.getAttribute("shape"),m=c.getMarkerPath(o,r,p,1.5*d);f.setAttribute("d",m)}this.moveXCrosshairs(o),l.fixedTooltip||this.moveTooltip(o,r,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var n,s=this.ttCtx,i=s.w,o=0,r=0,a=i.globals.pointsArray,l=new hr(this.ctx),c=new Ve(this.ctx);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var u=s.tooltipUtil.getHoverMarkerSize(n);if(a[n]&&(o=a[n][e][0],r=a[n][e][1]),!isNaN(o)){var d=s.tooltipUtil.getAllMarkers();if(d.length)for(var h=0;h<i.globals.series.length;h++){var f=a[h];if(i.globals.comboCharts&&f===void 0&&d.splice(h,0,null),f&&f.length){var p=a[h][e][1],m=void 0;d[h].setAttribute("cx",o);var b=d[h].getAttribute("shape");if(i.config.chart.type==="rangeArea"&&!i.globals.comboCharts){var _=e+i.globals.series[h].length;m=a[h][_][1],p-=Math.abs(p-m)/2}if(p!==null&&!isNaN(p)&&p<i.globals.gridHeight+u&&p+u>0){var x=c.getMarkerPath(o,p,b,u);d[h].setAttribute("d",x)}else d[h].setAttribute("d","")}}this.moveXCrosshairs(o),s.fixedTooltip||this.moveTooltip(o,r||i.globals.gridHeight,u)}}},{key:"moveStickyTooltipOverBars",value:function(e,n){var s=this.w,i=this.ttCtx,o=s.globals.columnSeries?s.globals.columnSeries.length:s.globals.series.length,r=o>=2&&o%2==0?Math.floor(o/2):Math.floor(o/2)+1;s.globals.isBarHorizontal&&(r=new hr(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=s.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));a||typeof n!="number"||(a=s.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(e,`'],
275 .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
276 .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
277 .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,"']")));var l=a?parseFloat(a.getAttribute("cx")):0,c=a?parseFloat(a.getAttribute("cy")):0,u=a?parseFloat(a.getAttribute("barWidth")):0,d=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));s.globals.isXNumeric?(a&&!h&&(l-=o%2!=0?u/2:0),a&&h&&(l-=u/2)):s.globals.isBarHorizontal||(l=i.xAxisTicksPositions[e-1]+i.dataPointsDividedWidth/2,isNaN(l)&&(l=i.xAxisTicksPositions[e]-i.dataPointsDividedWidth/2)),s.globals.isBarHorizontal?c-=i.tooltipRect.ttHeight:s.config.tooltip.followCursor?c=i.e.clientY-d.top-i.tooltipRect.ttHeight/2:c+i.tooltipRect.ttHeight+15>s.globals.gridHeight&&(c=s.globals.gridHeight),s.globals.isBarHorizontal||this.moveXCrosshairs(l),i.fixedTooltip||this.moveTooltip(l,c||s.globals.gridHeight)}}]),t}(),myt=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new cj(e)}return lt(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ve(this.ctx),s=new Op(this.ctx),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");i=Rs(i),e.config.chart.stacked&&i.sort(function(d,h){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(h.getAttribute("data:realIndex"))});for(var o=0;o<i.length;o++){var r=i[o].querySelector(".apexcharts-series-markers-wrap");if(r!==null){var a=void 0,l="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(l+=" no-pointer-events");var c=s.getMarkerConfig({cssClass:l,seriesIndex:Number(r.getAttribute("data:realIndex"))});(a=n.drawMarker(0,0,c)).node.setAttribute("default-marker-size",0);var u=document.createElementNS(e.globals.SVGNS,"g");u.classList.add("apexcharts-series-markers"),u.appendChild(a.node),r.appendChild(u)}}}},{key:"enlargeCurrentPoint",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w;o.config.chart.type!=="bubble"&&this.newPointSize(e,n);var r=n.getAttribute("cx"),a=n.getAttribute("cy");if(s!==null&&i!==null&&(r=s,a=i),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(o.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,a,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var n=this.w,s=this,i=this.ttCtx,o=e,r=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=n.config.markers.hover.size,l=0;l<r.length;l++){var c=r[l].getAttribute("rel"),u=r[l].getAttribute("index");if(a===void 0&&(a=n.globals.markers.size[u]+n.config.markers.hover.sizeOffset),o===parseInt(c,10)){s.newPointSize(o,r[l]);var d=r[l].getAttribute("cx"),h=r[l].getAttribute("cy");s.tooltipPosition.moveXCrosshairs(d),i.fixedTooltip||s.tooltipPosition.moveTooltip(d,h,a)}else s.oldPointSize(r[l])}}},{key:"newPointSize",value:function(e,n){var s=this.w,i=s.config.markers.hover.size,o=e===0?n.parentNode.firstChild:n.parentNode.lastChild;if(o.getAttribute("default-marker-size")!=="0"){var r=parseInt(o.getAttribute("index"),10);i===void 0&&(i=s.globals.markers.size[r]+s.config.markers.hover.sizeOffset),i<0&&(i=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(n,i);n.setAttribute("d",a)}}},{key:"oldPointSize",value:function(e){var n=parseFloat(e.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(e,n);e.setAttribute("d",s)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=0;n<e.length;n++){var s=parseFloat(e[n].getAttribute("default-marker-size"));if(ue.isNumber(s)&&s>0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(e[n],s);e[n].setAttribute("d",i)}else e[n].setAttribute("d","M0,0")}}}]),t}(),gyt=function(){function t(e){at(this,t),this.w=e.w;var n=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return lt(t,[{key:"getAttr",value:function(e,n){return parseFloat(e.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(e){var n=e.e,s=e.opt,i=e.x,o=e.y,r=e.type,a=this.ttCtx,l=this.w;if(n.target.classList.contains("apexcharts-".concat(r,"-rect"))){var c=this.getAttr(n,"i"),u=this.getAttr(n,"j"),d=this.getAttr(n,"cx"),h=this.getAttr(n,"cy"),f=this.getAttr(n,"width"),p=this.getAttr(n,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:c,j:u,shared:!1,e:n}),l.globals.capturedSeriesIndex=c,l.globals.capturedDataPointIndex=u,i=d+a.tooltipRect.ttWidth/2+f,o=h+a.tooltipRect.ttHeight/2-p/2,a.tooltipPosition.moveXCrosshairs(d+f/2),i>l.globals.gridWidth/2&&(i=d-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var m=l.globals.dom.elWrap.getBoundingClientRect();i=l.globals.clientX-m.left-(i>l.globals.gridWidth/2?a.tooltipRect.ttWidth:0),o=l.globals.clientY-m.top-(o>l.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:o}}},{key:"handleMarkerTooltip",value:function(e){var n,s,i=e.e,o=e.opt,r=e.x,a=e.y,l=this.w,c=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var u=parseInt(o.paths.getAttribute("cx"),10),d=parseInt(o.paths.getAttribute("cy"),10),h=parseFloat(o.paths.getAttribute("val"));if(s=parseInt(o.paths.getAttribute("rel"),10),n=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,c.intersect){var f=ue.findAncestor(o.paths,"apexcharts-series");f&&(n=parseInt(f.getAttribute("data:realIndex"),10))}if(c.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:n,j:s,shared:!c.showOnIntersect&&l.config.tooltip.shared,e:i}),i.type==="mouseup"&&c.markerClick(i,n,s),l.globals.capturedSeriesIndex=n,l.globals.capturedDataPointIndex=s,r=u,a=d+l.globals.translateY-1.4*c.tooltipRect.ttHeight,c.w.config.tooltip.followCursor){var p=c.getElGrid().getBoundingClientRect();a=c.e.clientY+l.globals.translateY-p.top}h<0&&(a=d),c.marker.enlargeCurrentPoint(s,o.paths,r,a)}return{x:r,y:a}}},{key:"handleBarTooltip",value:function(e){var n,s,i=e.e,o=e.opt,r=this.w,a=this.ttCtx,l=a.getElTooltip(),c=0,u=0,d=0,h=this.getBarTooltipXY({e:i,opt:o});if(h.j!==null||h.barHeight!==0||h.barWidth!==0){n=h.i;var f=h.j;if(r.globals.capturedSeriesIndex=n,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!r.config.tooltip.shared?(u=h.x,d=h.y,s=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width,c=u):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(o.paths.parentNode.getAttribute("data:realIndex"),10),u+a.tooltipRect.ttWidth>r.globals.gridWidth?u-=a.tooltipRect.ttWidth:u<0&&(u=0),a.w.config.tooltip.followCursor){var p=a.getElGrid().getBoundingClientRect();d=a.e.clientY-p.top}a.tooltip===null&&(a.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(c+s/2):a.tooltipPosition.moveXCrosshairs(c)),!a.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(d=d+r.globals.translateY-a.tooltipRect.ttHeight/2,l.style.left=u+r.globals.translateX+"px",l.style.top=d+"px")}}},{key:"getBarTooltipXY",value:function(e){var n=this,s=e.e,i=e.opt,o=this.w,r=null,a=this.ttCtx,l=0,c=0,u=0,d=0,h=0,f=s.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var p=s.target,m=p.getBoundingClientRect(),b=i.elGrid.getBoundingClientRect(),_=m.height;h=m.height;var x=m.width,k=parseInt(p.getAttribute("cx"),10),C=parseInt(p.getAttribute("cy"),10);d=parseFloat(p.getAttribute("barWidth"));var S=s.type==="touchmove"?s.touches[0].clientX:s.clientX;r=parseInt(p.getAttribute("j"),10),l=parseInt(p.parentNode.getAttribute("rel"),10)-1;var E=p.getAttribute("data-range-y1"),P=p.getAttribute("data-range-y2");o.globals.comboCharts&&(l=parseInt(p.parentNode.getAttribute("data:realIndex"),10));var T=function(I){return o.globals.isXNumeric?k-x/2:n.isVerticalGroupedRangeBar?k+x/2:k-a.dataPointsDividedWidth+x/2},L=function(){return C-a.dataPointsDividedHeight+_/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:r,y1:E?parseInt(E,10):null,y2:P?parseInt(P,10):null,shared:!a.showOnIntersect&&o.config.tooltip.shared,e:s}),o.config.tooltip.followCursor?o.globals.isBarHorizontal?(c=S-b.left+15,u=L()):(c=T(),u=s.clientY-b.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=k)<a.xyRatios.baseLineInvertedY&&(c=k-a.tooltipRect.ttWidth),u=L()):(c=T(),u=C)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),vyt=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e}return lt(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,n=this.ttCtx,s=e.config.xaxis.position==="bottom";n.xaxisOffY=s?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",o=e.globals.dom.elWrap;n.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(n.xaxisTooltip=document.createElement("div"),n.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(n.xaxisTooltip),n.xaxisTooltipText=document.createElement("div"),n.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),n.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,n.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,n.xaxisTooltip.appendChild(n.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,n=this.ttCtx,s=0;s<e.config.yaxis.length;s++){var i=e.config.yaxis[s].opposite||e.config.yaxis[s].crosshairs.opposite;n.yaxisOffX=i?e.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s,i?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s))===null&&(n.yaxisTooltip=document.createElement("div"),n.yaxisTooltip.setAttribute("class",o+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(n.yaxisTooltip),s===0&&(n.yaxisTooltipText=[]),n.yaxisTooltipText[s]=document.createElement("div"),n.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),n.yaxisTooltip.appendChild(n.yaxisTooltipText[s]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,n=this.ttCtx,s=n.getElXCrosshairs();if(n.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var i=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(i!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var o=parseFloat(i.getAttribute("barWidth"));n.xcrosshairsWidth=o}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var r=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/r}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var a=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/a}else if(e.config.xaxis.crosshairs.width==="barWidth"){var l=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(l!==null){var c=parseFloat(l.getAttribute("barWidth"));n.xcrosshairsWidth=c}else n.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(n.xcrosshairsWidth=0),s!==null&&n.xcrosshairsWidth>0&&s.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,n=this.ttCtx;n.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,n,s){var i=this.ttCtx,o=this.w,r=o.globals,a=r.seriesYAxisMap[e];if(i.yaxisTooltips[e]&&a.length>0){var l=r.yLabelFormatters[e],c=i.getElGrid().getBoundingClientRect(),u=a[0],d=0;s.yRatio.length>1&&(d=u);var h=(n-c.top)*s.yRatio[d],f=r.maxYArr[u]-r.minYArr[u],p=r.minYArr[u]+(f-h);o.config.yaxis[e].reversed&&(p=r.maxYArr[u]-(f-h)),i.tooltipPosition.moveYCrosshairs(n-c.top),i.yaxisTooltipText[e].innerHTML=l(p),i.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),DT=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new lj(this),this.tooltipLabels=new pyt(this),this.tooltipPosition=new cj(this),this.marker=new myt(this),this.intersect=new gyt(this),this.axesTooltip=new vyt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return lt(t,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var n=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(function(r,a){return!!(r.show&&r.tooltip.enabled&&n.globals.axisCharts)}),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);var s=document.createElement("div");if(s.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&s.classList.add(n.config.tooltip.cssClass),s.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(s),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var i=new b1(this.ctx);this.xAxisTicksPositions=i.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,s.appendChild(this.tooltipTitle));var o=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var n=this,s=this.w,i=[],o=this.getElTooltip(),r=function(l){var c=document.createElement("div");c.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),c.style.order=s.config.tooltip.inverseOrder?e-l:l+1;var u=document.createElement("span");u.classList.add("apexcharts-tooltip-marker"),u.style.backgroundColor=s.globals.colors[l],c.appendChild(u);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=n.tConfig.style.fontFamily||s.config.chart.fontFamily,d.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(h){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(h,"-group"));var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(h,"-label")),f.appendChild(p);var m=document.createElement("span");m.classList.add("apexcharts-tooltip-text-".concat(h,"-value")),f.appendChild(m),d.appendChild(f)}),c.appendChild(d),o.appendChild(c),i.push(c)},a=0;a<e;a++)r(a);return i}},{key:"addSVGEvents",value:function(){var e=this.w,n=e.config.chart.type,s=this.getElTooltip(),i=!(n!=="bar"&&n!=="candlestick"&&n!=="boxPlot"&&n!=="rangeBar"),o=n==="area"||n==="line"||n==="scatter"||n==="bubble"||n==="radar",r=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var l,c=[],u=[],d={hoverArea:r,elGrid:a,tooltipEl:s,tooltipY:c,tooltipX:u,ttItems:this.ttItems};if(e.globals.axisCharts&&(o?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):n!=="heatmap"&&n!=="treemap"||(l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),l&&l.length))for(var h=0;h<l.length;h++)c.push(l[h].getAttribute("cy")),u.push(l[h].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],d);else if(i&&!e.globals.comboCharts||o&&this.showOnIntersect)this.addDatapointEventsListeners(d);else if(!e.globals.axisCharts||n==="heatmap"||n==="treemap"){var f=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,d)}if(this.showOnIntersect){var p=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,n=this.getElTooltip(),s=n.getBoundingClientRect(),i=s.width+10,o=s.height+10,r=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-i+10),l.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-o-10),n.style.left=r+"px",n.style.top=a+"px",{x:r,y:a,ttWidth:i,ttHeight:o}}},{key:"addDatapointEventsListeners",value:function(e){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,e)}},{key:"addPathsEventListeners",value:function(e,n){for(var s=this,i=function(r){var a={paths:e[r],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0})})},o=0;o<e.length;o++)i(o)}},{key:"onSeriesHover",value:function(e,n){var s=this,i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(e,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){s.seriesHover(e,n)},20-i))}},{key:"seriesHover",value:function(e,n){var s=this;this.lastHoverTime=Date.now();var i=[],o=this.w;o.config.chart.group&&(i=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||o.globals.dataPoints===0)||(i.length?i.forEach(function(r){var a=s.getElTooltip(r),l={paths:e.paths,tooltipEl:a,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===s.w.globals.minX&&r.w.globals.maxX===s.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:n}))}},{key:"seriesHoverByContext",value:function(e){var n=e.chartCtx,s=e.ttCtx,i=e.opt,o=e.e,r=n.w,a=this.getElTooltip(n);a&&(s.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},s.e=o,s.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!s.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new hr(n).toggleSeriesOnHover(o,o.target.parentNode),s.fixedTooltip&&s.drawFixedTooltipRect(),r.globals.axisCharts?s.axisChartsTooltips({e:o,opt:i,tooltipRect:s.tooltipRect}):s.nonAxisChartsTooltips({e:o,opt:i,tooltipRect:s.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var n,s,i=e.e,o=e.opt,r=this.w,a=o.elGrid.getBoundingClientRect(),l=i.type==="touchmove"?i.touches[0].clientX:i.clientX,c=i.type==="touchmove"?i.touches[0].clientY:i.clientY;if(this.clientY=c,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,c<a.top||c>a.top+a.height)this.handleMouseOut(o);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var u=parseInt(o.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0)return void this.handleMouseOut(o)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];r.config.chart.group&&(f=this.ctx.getSyncedCharts());var p=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(i.type==="mousemove"||i.type==="touchmove"||i.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;h!==null&&h.classList.add("apexcharts-active");var m=this.yaxisTooltips.filter(function(x){return x===!0});if(this.ycrosshairs!==null&&m.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,l,c,o);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var b=this.intersect.handleHeatTreeTooltip({e:i,opt:o,x:n,y:s,type:r.config.chart.type});n=b.x,s=b.y,d.style.left=n+"px",d.style.top=s+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:o,x:n,y:s});if(this.yaxisTooltips.length)for(var _=0;_<r.config.yaxis.length;_++)this.axesTooltip.drawYaxisTooltipText(_,c,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.tooltipEl.classList.add("apexcharts-active")}else i.type!=="mouseout"&&i.type!=="touchend"||this.handleMouseOut(o)}}},{key:"nonAxisChartsTooltips",value:function(e){var n=e.e,s=e.opt,i=e.tooltipRect,o=this.w,r=s.paths.getAttribute("rel"),a=this.getElTooltip(),l=o.globals.dom.elWrap.getBoundingClientRect();if(n.type==="mousemove"||n.type==="touchmove"){o.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:parseInt(r,10)-1,shared:!1});var c=o.globals.clientX-l.left-i.ttWidth/2,u=o.globals.clientY-l.top-i.ttHeight-10;if(a.style.left=c+"px",a.style.top=u+"px",o.config.legend.tooltipHoverFormatter){var d=r-1,h=(0,o.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"),{seriesIndex:d,dataPointIndex:d,w:o});this.legendLabels[d].innerHTML=h}}else n.type!=="mouseout"&&n.type!=="touchend"||(a.classList.remove("apexcharts-active"),o.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),o.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(f){var p=f.getAttribute("data:default-text");f.innerHTML=decodeURIComponent(p)}))}},{key:"handleStickyTooltip",value:function(e,n,s,i){var o=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:n,clientY:s}),a=r.j,l=r.capturedSeries;o.globals.collapsedSeriesIndices.includes(l)&&(l=null);var c=i.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>c.width)this.handleMouseOut(i);else if(l!==null)this.handleStickyCapturedSeries(e,l,i,a);else if(this.tooltipUtil.isXoverlap(a)||o.globals.isBarHorizontal){var u=o.globals.series.findIndex(function(d,h){return!o.globals.collapsedSeriesIndices.includes(h)});this.create(e,this,u,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,n,s,i){var o=this.w;if(!this.tConfig.shared&&o.globals.series[n][i]===null)return void this.handleMouseOut(s);if(o.globals.series[n][i]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,n,i,s.ttItems):this.create(e,this,n,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var r=o.globals.series.findIndex(function(a,l){return!o.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,i,s.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,n=new Ve(this.ctx),s=e.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i<s.length;i++)n.pathMouseLeave(s[i])}},{key:"handleMouseOut",value:function(e){var n=this.w,s=this.getElXCrosshairs();if(n.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),n.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),s!==null&&s.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var i=0;i<this.yaxisTTEls.length;i++)this.yaxisTTEls[i].classList.remove("apexcharts-active")}n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(o){var r=o.getAttribute("data:default-text");o.innerHTML=decodeURIComponent(r)})}},{key:"markerClick",value:function(e,n,s){var i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(e,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}])}},{key:"create",value:function(e,n,s,i,o){var r,a,l,c,u,d,h,f,p,m,b,_,x,k,C,S,E=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,P=this.w,T=n;e.type==="mouseup"&&this.markerClick(e,s,i),E===null&&(E=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(s),I=this.tooltipUtil.getElBars(),V=function(){P.globals.markers.largestSize>0?T.marker.enlargePoints(i):T.tooltipPosition.moveDynamicPointsOnHover(i)};if(P.config.legend.tooltipHoverFormatter){var R=P.config.legend.tooltipHoverFormatter,N=Array.from(this.legendLabels);N.forEach(function(Z){var ae=Z.getAttribute("data:default-text");Z.innerHTML=decodeURIComponent(ae)});for(var F=0;F<N.length;F++){var B=N[F],G=parseInt(B.getAttribute("i"),10),q=decodeURIComponent(B.getAttribute("data:default-text")),X=R(q,{seriesIndex:E?G:s,dataPointIndex:i,w:P});if(E)B.innerHTML=P.globals.collapsedSeriesIndices.indexOf(G)<0?X:q;else if(B.innerHTML=G===s?X:q,s===G)break}}var K=et(et({ttItems:o,i:s,j:i},((r=P.globals.seriesRange)===null||r===void 0||(a=r[s])===null||a===void 0||(l=a[i])===null||l===void 0||(c=l.y[0])===null||c===void 0?void 0:c.y1)!==void 0&&{y1:(u=P.globals.seriesRange)===null||u===void 0||(d=u[s])===null||d===void 0||(h=d[i])===null||h===void 0||(f=h.y[0])===null||f===void 0?void 0:f.y1}),((p=P.globals.seriesRange)===null||p===void 0||(m=p[s])===null||m===void 0||(b=m[i])===null||b===void 0||(_=b.y[0])===null||_===void 0?void 0:_.y2)!==void 0&&{y2:(x=P.globals.seriesRange)===null||x===void 0||(k=x[s])===null||k===void 0||(C=k[i])===null||C===void 0||(S=C.y[0])===null||S===void 0?void 0:S.y2});if(E){if(T.tooltipLabels.drawSeriesTexts(et(et({},K),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),L)V();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(I),this.barSeriesHeight>0)){var H=new Ve(this.ctx),Q=P.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),T.tooltipPosition.moveStickyTooltipOverBars(i,s),T.tooltipUtil.getAllMarkers(!0).length&&V();for(var se=0;se<Q.length;se++)H.pathMouseEnter(Q[se])}}else T.tooltipLabels.drawSeriesTexts(et({shared:!1},K)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(i,s),L&&T.tooltipPosition.moveMarkers(s,i)}}]),t}(),yyt=function(){function t(e){at(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return lt(t,[{key:"handleBarDataLabels",value:function(e){var n,s,i=e.x,o=e.y,r=e.y1,a=e.y2,l=e.i,c=e.j,u=e.realIndex,d=e.columnGroupIndex,h=e.series,f=e.barHeight,p=e.barWidth,m=e.barXPosition,b=e.barYPosition,_=e.visibleSeries,x=e.renderedPath,k=this.w,C=new Ve(this.barCtx.ctx),S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[u]:this.barCtx.strokeWidth;k.globals.isXNumeric&&!k.globals.isBarHorizontal?(n=i+parseFloat(p*(_+1)),s=o+parseFloat(f*(_+1))-S):(n=i+parseFloat(p*_),s=o+parseFloat(f*_));var E,P=null,T=i,L=o,I={},V=k.config.dataLabels,R=this.barCtx.barOptions.dataLabels,N=this.barCtx.barOptions.dataLabels.total;b!==void 0&&this.barCtx.isRangeBar&&(s=b,L=b),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,T=m);var F=V.offsetX,B=V.offsetY,G={width:0,height:0};if(k.config.dataLabels.enabled){var q=k.globals.series[l][c];G=C.getTextRects(k.config.dataLabels.formatter?k.config.dataLabels.formatter(q,et(et({},k),{},{seriesIndex:l,dataPointIndex:c,w:k})):k.globals.yLabelFormatters[0](q),parseFloat(V.style.fontSize))}var X={x:i,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:x,bcx:n,bcy:s,barHeight:f,barWidth:p,textRects:G,strokeWidth:S,dataLabelsX:T,dataLabelsY:L,dataLabelsConfig:V,barDataLabelsConfig:R,barTotalDataLabelsConfig:N,offX:F,offY:B};return I=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),x.attr({cy:I.bcy,cx:I.bcx,j:c,val:k.globals.series[l][c],barHeight:f,barWidth:p}),E=this.drawCalculatedDataLabels({x:I.dataLabelsX,y:I.dataLabelsY,val:this.barCtx.isRangeBar?[r,a]:k.config.chart.stackType==="100%"?h[u][c]:k.globals.series[u][c],i:u,j:c,barWidth:p,barHeight:f,textRects:G,dataLabelsConfig:V}),k.config.chart.stacked&&N.enabled&&(P=this.drawTotalDataLabels({x:I.totalDataLabelsX,y:I.totalDataLabelsY,barWidth:p,barHeight:f,realIndex:u,textAnchor:I.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:u,j:c}),dataLabelsConfig:V,barTotalDataLabelsConfig:N})),{dataLabels:E,totalDataLabels:P}}},{key:"getStackedTotalDataLabel",value:function(e){var n=e.realIndex,s=e.j,i=this.w,o=this.barCtx.stackedSeriesTotals[s];return this.totalFormatter&&(o=this.totalFormatter(o,et(et({},i),{},{seriesIndex:n,dataPointIndex:s,w:i}))),o}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var n=this.w,s=e.i,i=e.j,o=e.realIndex;e.columnGroupIndex;var r,a,l=e.y,c=e.bcx,u=e.barWidth,d=e.barHeight,h=e.textRects,f=e.dataLabelsX,p=e.dataLabelsY,m=e.dataLabelsConfig,b=e.barDataLabelsConfig,_=e.barTotalDataLabelsConfig,x=e.strokeWidth,k=e.offX,C=e.offY,S=c;d=Math.abs(d);var E=n.config.plotOptions.bar.dataLabels.orientation==="vertical",P=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i}).zeroEncounters;c-=x/2;var T=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=u/2:(f=n.globals.isXNumeric?c-u/2+k:c-T+u/2+k,P>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=u*P)),E&&(f=f+h.height/2-x/2-2);var L=n.globals.series[s][i]<0,I=l;switch(this.barCtx.isReversed&&(I=l+(L?d:-d)),b.position){case"center":p=E?L?I-d/2+C:I+d/2-C:L?I-d/2+h.height/2+C:I+d/2+h.height/2-C;break;case"bottom":p=E?L?I-d+C:I+d-C:L?I-d+h.height+x+C:I+d-h.height/2+x-C;break;case"top":p=E?L?I+C:I-C:L?I-h.height/2-C:I+h.height+C}if(this.barCtx.lastActiveBarSerieIndex===o&&_.enabled){var V=new Ve(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),m.fontSize);r=L?I-V.height/2-C-_.offsetY+18:I+V.height+C+_.offsetY-18;var R=T;a=S+(n.globals.isXNumeric?-u*n.globals.barGroups.length/2:n.globals.barGroups.length*u/2-(n.globals.barGroups.length-1)*u-R)+_.offsetX}return n.config.chart.stacked||(p<0?p=0+x:p+h.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-x)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:a,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var n=this.w,s=e.x,i=e.i,o=e.j,r=e.realIndex,a=e.bcy,l=e.barHeight,c=e.barWidth,u=e.textRects,d=e.dataLabelsX,h=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,b=e.offX,_=e.offY,x=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var k,C,S=a-(this.barCtx.isRangeBar?0:x)+l/2+u.height/2+_-3,E="start",P=n.globals.series[i][o]<0,T=s;switch(this.barCtx.isReversed&&(T=s+(P?-c:c),E=P?"start":"end"),p.position){case"center":d=P?T+c/2-b:Math.max(u.width/2,T-c/2)+b;break;case"bottom":d=P?T+c-h-b:T-c+h+b;break;case"top":d=P?T-h-b:T-h+b}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var L=new Ve(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),f.fontSize);P?(k=T-h-b-m.offsetX,E="end"):k=T+b+m.offsetX+(this.barCtx.isReversed?-(c+h):h),C=S-u.height/2+L.height/2+m.offsetY+h}return n.config.chart.stacked||(f.textAnchor==="start"?d-u.width<0?d=P?u.width+h:h:d+u.width>n.globals.gridWidth&&(d=P?n.globals.gridWidth-h:n.globals.gridWidth-u.width-h):f.textAnchor==="middle"?d-u.width/2<0?d=u.width/2+h:d+u.width/2>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width/2-h):f.textAnchor==="end"&&(d<1?d=u.width+h:d+1>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width-h))),{bcx:s,bcy:a,dataLabelsX:d,dataLabelsY:S,totalDataLabelsX:k,totalDataLabelsY:C,totalDataLabelsAnchor:E}}},{key:"drawCalculatedDataLabels",value:function(e){var n=e.x,s=e.y,i=e.val,o=e.i,r=e.j,a=e.textRects,l=e.barHeight,c=e.barWidth,u=e.dataLabelsConfig,d=this.w,h="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(h="rotate(-90, ".concat(n,", ").concat(s,")"));var f=new Zf(this.barCtx.ctx),p=new Ve(this.barCtx.ctx),m=u.formatter,b=null,_=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!_){b=p.group({class:"apexcharts-data-labels",transform:h});var x="";i!==void 0&&(x=m(i,et(et({},d),{},{seriesIndex:o,dataPointIndex:r,w:d}))),!i&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(x="");var k=d.globals.series[o][r]<0,C=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(C==="top"&&(u.textAnchor=k?"end":"start"),C==="center"&&(u.textAnchor="middle"),C==="bottom"&&(u.textAnchor=k?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<p.getTextRects(x,parseFloat(u.style.fontSize)).width&&(x=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(c)&&(x=""):a.height/1.6>Math.abs(l)&&(x=""));var S=et({},u);this.barCtx.isHorizontal&&i<0&&(u.textAnchor==="start"?S.textAnchor="end":u.textAnchor==="end"&&(S.textAnchor="start")),f.plotDataLabelsText({x:n,y:s,text:x,i:o,j:r,parent:b,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}},{key:"drawTotalDataLabels",value:function(e){var n=e.x,s=e.y,i=e.val,o=e.realIndex,r=e.textAnchor,a=e.barTotalDataLabelsConfig;this.w;var l,c=new Ve(this.barCtx.ctx);return a.enabled&&n!==void 0&&s!==void 0&&this.barCtx.lastActiveBarSerieIndex===o&&(l=c.drawText({x:n,y:s,foreColor:a.style.color,text:i,textAnchor:r,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),l}}]),t}(),byt=function(){function t(e){at(this,t),this.w=e.w,this.barCtx=e}return lt(t,[{key:"initVariables",value:function(e){var n=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var s=0;s<e.length;s++)if(e[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[s].length),n.globals.isXNumeric)for(var i=0;i<e[s].length;i++)n.globals.seriesX[s][i]>n.globals.minX&&n.globals.seriesX[s][i]<n.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=n.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(n.globals.series),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],n.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,n,s,i,o,r,a,l,c=this.w,u=c.globals.dataPoints;this.barCtx.isRangeBar&&(u=c.globals.labels.length);var d=this.barCtx.seriesLen;if(c.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)o=(s=c.globals.gridHeight/u)/d,c.globals.isXNumeric&&(o=(s=c.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+c.globals.padHorizontal+(this.barCtx.isReversed?c.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=c.globals.gridWidth/2),n=(s-o*this.barCtx.seriesLen)/2;else{if(i=c.globals.gridWidth/this.barCtx.visibleItems,c.config.xaxis.convertedCatToNumeric&&(i=c.globals.gridWidth/c.globals.dataPoints),r=i/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,c.globals.isXNumeric){var h=this.barCtx.xRatio;c.globals.minXDiff&&c.globals.minXDiff!==.5&&c.globals.minXDiff/h>0&&(i=c.globals.minXDiff/h),(r=i/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),a=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=c.globals.padHorizontal+ue.noExponents(i-r*this.barCtx.seriesLen)/2}return c.globals.barHeight=o,c.globals.barWidth=r,{x:e,y:n,yDivision:s,xDivision:i,barHeight:o,barWidth:r,zeroH:a,zeroW:l}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].prevY=[],e[n].prevX=[],e[n].prevYF=[],e[n].prevXF=[],e[n].prevYVal=[],e[n].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].xArrj=[],e[n].xArrjF=[],e[n].xArrjVal=[],e[n].yArrj=[],e[n].yArrjF=[],e[n].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,n,s,i){var o,r,a,l,c=this.w,u=this.barCtx.ctx.fill,d=null,h=this.barCtx.barOptions.distributed?s:n,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[n][s]>=p.from&&e[n][s]<=p.to&&(d=p.color,f=!0)}),{color:u.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:s,color:d,value:e[n][s],fillConfig:(o=c.config.series[n].data[s])===null||o===void 0?void 0:o.fill,fillType:(r=c.config.series[n].data[s])!==null&&r!==void 0&&(a=r.fill)!==null&&a!==void 0&&a.type?(l=c.config.series[n].data[s])===null||l===void 0?void 0:l.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[i]:c.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(e,n,s){var i=0,o=this.w;return this.barCtx.series[e][n]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,o.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(e){var n,s=this.w,i=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,o=e.length,r=0|((n=e[0])===null||n===void 0?void 0:n.length),a=Array.from({length:o},function(){return Array(r).fill(i?"top":"none")});if(i)return a;for(var l=0;l<r;l++){for(var c=[],u=[],d=0,h=0;h<o;h++){var f=e[h][l];f>0?(c.push(h),d++):f<0&&(u.push(h),d++)}if(c.length>0&&u.length===0)if(c.length===1)a[c[0]][l]="both";else{var p,m=c[0],b=c[c.length-1],_=Sm(c);try{for(_.s();!(p=_.n()).done;){var x=p.value;a[x][l]=x===m?"bottom":x===b?"top":"none"}}catch(G){_.e(G)}finally{_.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var k,C=Math.max.apply(Math,u),S=Math.min.apply(Math,u),E=Sm(u);try{for(E.s();!(k=E.n()).done;){var P=k.value;a[P][l]=P===C?"bottom":P===S?"top":"none"}}catch(G){E.e(G)}finally{E.f()}}else if(c.length>0&&u.length>0){var T,L=c[c.length-1],I=Sm(c);try{for(I.s();!(T=I.n()).done;){var V=T.value;a[V][l]=V===L?"top":"none"}}catch(G){I.e(G)}finally{I.f()}var R,N=Math.max.apply(Math,u),F=Sm(u);try{for(F.s();!(R=F.n()).done;){var B=R.value;a[B][l]=B===N?"bottom":"none"}}catch(G){F.e(G)}finally{F.f()}}else d===1&&(a[c[0]||u[0]][l]="both")}return a}},{key:"barBackground",value:function(e){var n=e.j,s=e.i,i=e.x1,o=e.x2,r=e.y1,a=e.y2,l=e.elSeries,c=this.w,u=new Ve(this.barCtx.ctx),d=new hr(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===s){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[n],f=u.drawRect(i!==void 0?i:0,r!==void 0?r:0,o!==void 0?o:c.globals.gridWidth,a!==void 0?a:c.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var n,s=e.barWidth,i=e.barXPosition,o=e.y1,r=e.y2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Ve(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=s,_=i;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.columnWidthOffset&&(_=i-p.config.series[d].data[f].columnWidthOffset/2,b=s+p.config.series[d].data[f].columnWidthOffset);var x=a/2,k=_+x,C=_+b-x,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-x*S,r+=.001+x*S;var E=m.move(k,o),P=m.move(k,o),T=m.line(C,o);if(p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1)),E=E+m.line(k,r)+m.line(C,r)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(k,o)+T+T+T+T+T+m.line(k,o)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(E=m.roundPathCorners(E,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var L=this.barCtx;(L=this.barCtx[u]).yArrj.push(r-x*S),L.yArrjF.push(Math.abs(o-r+a*S)),L.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:E,pathFrom:P}}},{key:"getBarpaths",value:function(e){var n,s=e.barYPosition,i=e.barHeight,o=e.x1,r=e.x2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Ve(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=s,_=i;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.barHeightOffset&&(b=s-p.config.series[d].data[f].barHeightOffset/2,_=i+p.config.series[d].data[f].barHeightOffset);var x=a/2,k=b+x,C=b+_-x,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+x*S,r+=.001-x*S;var E=m.move(o,k),P=m.move(o,k);p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1));var T=m.line(o,C);if(E=E+m.line(r,k)+m.line(r,C)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(o,k)+T+T+T+T+T+m.line(o,k)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(E=m.roundPathCorners(E,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var L=this.barCtx;(L=this.barCtx[u]).xArrj.push(r+x*S),L.xArrjF.push(Math.abs(o-r-a*S)),L.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:E,pathFrom:P}}},{key:"checkZeroSeries",value:function(e){for(var n=e.series,s=this.w,i=0;i<n.length;i++){for(var o=0,r=0;r<n[s.globals.maxValsInArrayIndex].length;r++)o+=n[i][r];o===0&&this.barCtx.zeroSerieses.push(i)}}},{key:"getXForValue",value:function(e,n){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return e!=null&&(s=n+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),s}},{key:"getYForValue",value:function(e,n,s){var i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?n:null;return e!=null&&(i=n-e/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[s]:0)),i}},{key:"getGoalValues",value:function(e,n,s,i,o,r){var a=this,l=this.w,c=[],u=function(f,p){var m;c.push((Xb(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,s,r,!1)),Xb(m,"attrs",p),m))};if(l.globals.seriesGoals[i]&&l.globals.seriesGoals[i][o]&&Array.isArray(l.globals.seriesGoals[i][o])&&l.globals.seriesGoals[i][o].forEach(function(f){u(f.value,f)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,h={strokeHeight:e==="x"?0:l.globals.markers.size[i],strokeWidth:e==="x"?l.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[i])?d[i][0]:d[i]};u(l.globals.seriesRangeStart[i][o],h),u(l.globals.seriesRangeEnd[i][o],et(et({},h),{},{strokeColor:Array.isArray(d[i])?d[i][1]:d[i]}))}return c}},{key:"drawGoalLine",value:function(e){var n=e.barXPosition,s=e.barYPosition,i=e.goalX,o=e.goalY,r=e.barWidth,a=e.barHeight,l=new Ve(this.barCtx.ctx),c=l.group({className:"apexcharts-bar-goals-groups"});c.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:c.node}),c.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var u=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach(function(d){if(d.x>=-1&&d.x<=l.w.globals.gridWidth+1){var h=d.attrs.strokeHeight!==void 0?d.attrs.strokeHeight:a/2,f=s+h+a/2;u=l.drawLine(d.x,f-2*h,d.x,f,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),c.add(u)}}):Array.isArray(o)&&o.forEach(function(d){if(d.y>=-1&&d.y<=l.w.globals.gridHeight+1){var h=d.attrs.strokeWidth!==void 0?d.attrs.strokeWidth:r/2,f=n+h+r/2;u=l.drawLine(f-2*h,d.y,f,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),c.add(u)}}),c}},{key:"drawBarShadow",value:function(e){var n=e.prevPaths,s=e.currPaths,i=e.color,o=this.w,r=n.x,a=n.x1,l=n.barYPosition,c=s.x,u=s.x1,d=s.barYPosition,h=l+s.barHeight,f=new Ve(this.barCtx.ctx),p=new ue,m=f.move(a,h)+f.line(r,h)+f.line(c,d)+f.line(u,d)+f.line(a,h)+(o.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return f.drawPath({d:m,fill:p.shadeColor(.5,ue.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var n,s=e.i,i=e.j,o=this.w,r=0,a=0;return(o.config.plotOptions.bar.horizontal?o.globals.series.map(function(l,c){return c}):((n=o.globals.columnSeries)===null||n===void 0?void 0:n.i.map(function(l){return l}))||[]).forEach(function(l){var c=o.globals.seriesPercent[l][i];c&&r++,l<s&&c===0&&a++}),{nonZeroColumns:r,zeroEncounters:a}}},{key:"getGroupIndex",value:function(e){var n=this.w,s=n.globals.seriesGroups.findIndex(function(r){return r.indexOf(n.globals.seriesNames[e])>-1}),i=this.barCtx.columnGroupIndices,o=i.indexOf(s);return o<0&&(i.push(s),o=i.length-1),{groupIndex:s,columnGroupIndex:o}}}]),t}(),Jf=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=n,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var i=new hr(this.ctx);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=i.getBarSeriesIndices(),r=new ys(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1})),this.barHelpers=new byt(this)}return lt(t,[{key:"draw",value:function(e,n){var s=this.w,i=new Ve(this.ctx),o=new ys(this.ctx,s);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=i.group({class:"apexcharts-bar-series apexcharts-plot-series"});s.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,l=0;a<e.length;a++,l++){var c,u,d,h,f=void 0,p=void 0,m=[],b=[],_=s.globals.comboCharts?n[a]:a,x=this.barHelpers.getGroupIndex(_).columnGroupIndex,k=i.group({class:"apexcharts-series",rel:a+1,seriesName:ue.escapeString(s.globals.seriesNames[_]),"data:realIndex":_});this.ctx.series.addCollapsedClassToSeries(k,_),e[a].length>0&&(this.visibleI=this.visibleI+1);var C=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[_],this.translationsIndex=_);var E=this.translationsIndex;this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;var P=this.barHelpers.initialPositions();p=P.y,C=P.barHeight,u=P.yDivision,h=P.zeroW,f=P.x,S=P.barWidth,c=P.xDivision,d=P.zeroH,this.isHorizontal||b.push(f+S/2);var T=i.group({class:"apexcharts-datalabels","data:realIndex":_});s.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");var L=i.group({class:"apexcharts-bar-goals-markers"}),I=i.group({class:"apexcharts-bar-shadows"});s.globals.delayedElements.push({el:I.node}),I.node.classList.add("apexcharts-element-hidden");for(var V=0;V<e[a].length;V++){var R=this.barHelpers.getStrokeWidth(a,V,_),N=null,F={indexes:{i:a,j:V,realIndex:_,translationsIndex:E,bc:l},x:f,y:p,strokeWidth:R,elSeries:k};this.isHorizontal?(N=this.drawBarPaths(et(et({},F),{},{barHeight:C,zeroW:h,yDivision:u})),S=this.series[a][V]/this.invertedYRatio):(N=this.drawColumnPaths(et(et({},F),{},{xDivision:c,barWidth:S,zeroH:d})),C=this.series[a][V]/this.yRatio[E]);var B=this.barHelpers.getPathFillColor(e,a,V,_);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&V>0){var G,q=this.barHelpers.drawBarShadow({color:typeof B.color=="string"&&((G=B.color)===null||G===void 0?void 0:G.indexOf("url"))===-1?B.color:ue.hexToRgba(s.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:N});I.add(q),s.config.chart.dropShadow.enabled&&new ai(this.ctx).dropShadow(q,s.config.chart.dropShadow,_)}this.pathArr.push(N);var X=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:C,barWidth:S});X&&L.add(X),p=N.y,f=N.x,V>0&&b.push(f+S/2),m.push(p),this.renderSeries(et(et({realIndex:_,pathFill:B.color},B.useRangeColor?{lineFill:B.color}:{}),{},{j:V,i:a,columnGroupIndex:x,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:R,elSeries:k,x:f,y:p,series:e,barHeight:Math.abs(N.barHeight?N.barHeight:C),barWidth:Math.abs(N.barWidth?N.barWidth:S),elDataLabelsWrap:T,elGoalsMarkers:L,elBarShadows:I,visibleSeries:this.visibleI,type:"bar"}))}s.globals.seriesXvalues[_]=b,s.globals.seriesYvalues[_]=m,r.add(k)}return r}},{key:"renderSeries",value:function(e){var n=e.realIndex,s=e.pathFill,i=e.lineFill,o=e.j,r=e.i,a=e.columnGroupIndex,l=e.pathFrom,c=e.pathTo,u=e.strokeWidth,d=e.elSeries,h=e.x,f=e.y,p=e.y1,m=e.y2,b=e.series,_=e.barHeight,x=e.barWidth,k=e.barXPosition,C=e.barYPosition,S=e.elDataLabelsWrap,E=e.elGoalsMarkers,P=e.elBarShadows,T=e.visibleSeries,L=e.type,I=e.classes,V=this.w,R=new Ve(this.ctx);if(!i){var N=typeof V.globals.stroke.colors[n]=="function"?function(X){var K,H=V.config.stroke.colors;return Array.isArray(H)&&H.length>0&&((K=H[X])||(K=""),typeof K=="function")?K({value:V.globals.series[X][o],dataPointIndex:o,w:V}):K}(n):V.globals.stroke.colors[n];i=this.barOptions.distributed?V.globals.stroke.colors[o]:N}V.config.series[r].data[o]&&V.config.series[r].data[o].strokeColor&&(i=V.config.series[r].data[o].strokeColor),this.isNullValue&&(s="none");var F=o/V.config.chart.animations.animateGradually.delay*(V.config.chart.animations.speed/V.globals.dataPoints)/2.4,B=R.renderPaths({i:r,j:o,realIndex:n,pathFrom:l,pathTo:c,stroke:i,strokeWidth:u,strokeLineCap:V.config.stroke.lineCap,fill:s,animationDelay:F,initialSpeed:V.config.chart.animations.speed,dataChangeSpeed:V.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area ").concat(I),chartType:L});B.attr("clip-path","url(#gridRectBarMask".concat(V.globals.cuid,")"));var G=V.config.forecastDataPoints;G.count>0&&o>=V.globals.dataPoints-G.count&&(B.node.setAttribute("stroke-dasharray",G.dashArray),B.node.setAttribute("stroke-width",G.strokeWidth),B.node.setAttribute("fill-opacity",G.fillOpacity)),p!==void 0&&m!==void 0&&(B.attr("data-range-y1",p),B.attr("data-range-y2",m)),new ai(this.ctx).setSelectionFilter(B,n,o),d.add(B);var q=new yyt(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:b,realIndex:n,columnGroupIndex:a,barHeight:_,barWidth:x,barXPosition:k,barYPosition:C,renderedPath:B,visibleSeries:T});return q.dataLabels!==null&&S.add(q.dataLabels),q.totalDataLabels&&S.add(q.totalDataLabels),d.add(S),E&&d.add(E),P&&d.add(P),d}},{key:"drawBarPaths",value:function(e){var n,s=e.indexes,i=e.barHeight,o=e.strokeWidth,r=e.zeroW,a=e.x,l=e.y,c=e.yDivision,u=e.elSeries,d=this.w,h=s.i,f=s.j;if(d.globals.isXNumeric)n=(l=(d.globals.seriesX[h][f]-d.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var p=0,m=0;d.globals.seriesPercent.forEach(function(_,x){_[f]&&p++,x<h&&_[f]===0&&m++}),p>0&&(i=this.seriesLen*i/p),n=l+i*this.visibleI,n-=i*m}else n=l+i*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[h][f],r)-r)/2),a=this.barHelpers.getXForValue(this.series[h][f],r);var b=this.barHelpers.getBarpaths({barYPosition:n,barHeight:i,x1:r,x2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,i:h,j:f,w:d});return d.globals.isXNumeric||(l+=c),this.barHelpers.barBackground({j:f,i:h,y1:n-i*this.visibleI,y2:i*this.seriesLen,elSeries:u}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x1:r,x:a,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,h,f),barYPosition:n,barHeight:i}}},{key:"drawColumnPaths",value:function(e){var n,s=e.indexes,i=e.x,o=e.y,r=e.xDivision,a=e.barWidth,l=e.zeroH,c=e.strokeWidth,u=e.elSeries,d=this.w,h=s.realIndex,f=s.translationsIndex,p=s.i,m=s.j,b=s.bc;if(d.globals.isXNumeric){var _=this.getBarXForNumericXAxis({x:i,j:m,realIndex:h,barWidth:a});i=_.x,n=_.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var x=this.barHelpers.getZeroValueEncounters({i:p,j:m}),k=x.nonZeroColumns,C=x.zeroEncounters;k>0&&(a=this.seriesLen*a/k),n=i+a*this.visibleI,n-=a*C}else n=i+a*this.visibleI;o=this.barHelpers.getYForValue(this.series[p][m],l,f);var S=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:a,y1:l,y2:o,strokeWidth:c,isReversed:this.isReversed,series:this.series,realIndex:h,i:p,j:m,w:d});return d.globals.isXNumeric||(i+=r),this.barHelpers.barBackground({bc:b,j:m,i:p,x1:n-c/2-a*this.visibleI,x2:a*this.seriesLen+c/2,elSeries:u}),{pathTo:S.pathTo,pathFrom:S.pathFrom,x:i,y:o,goalY:this.barHelpers.getGoalValues("y",null,l,p,m,f),barXPosition:n,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(e){var n=e.x,s=e.barWidth,i=e.realIndex,o=e.j,r=this.w,a=i;return r.globals.seriesX[i].length||(a=r.globals.maxValsInArrayIndex),ue.isNumber(r.globals.seriesX[a][o])&&(n=(r.globals.seriesX[a][o]-r.globals.minX)/this.xRatio-s*this.seriesLen/2),{barXPosition:n+s*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(e,n){for(var s,i=this.w,o=0;o<i.globals.previousPaths.length;o++){var r=i.globals.previousPaths[o];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&i.globals.previousPaths[o].paths[n]!==void 0&&(s=i.globals.previousPaths[o].paths[n].d)}return s}}]),t}(),RT=function(t){gv(n,Jf);var e=mv(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i){var o=this,r=this.w;this.graphics=new Ve(this.ctx),this.bar=new Jf(this.ctx,this.xyRatios);var a=new ys(this.ctx,r);s=a.getLogSeries(s),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(s),r.config.chart.stackType==="100%"&&(s=r.globals.comboCharts?i.map(function(p){return r.globals.seriesPercent[p]}):r.globals.seriesPercent.slice()),this.series=s,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),c=0,u=0,d=function(p,m){var b=void 0,_=void 0,x=void 0,k=void 0,C=r.globals.comboCharts?i[p]:p,S=o.barHelpers.getGroupIndex(C),E=S.groupIndex,P=S.columnGroupIndex;o.groupCtx=o[r.globals.seriesGroups[E]];var T=[],L=[],I=0;o.yRatio.length>1&&(o.yaxisIndex=r.globals.seriesYAxisReverseMap[C][0],I=C),o.isReversed=r.config.yaxis[o.yaxisIndex]&&r.config.yaxis[o.yaxisIndex].reversed;var V=o.graphics.group({class:"apexcharts-series",seriesName:ue.escapeString(r.globals.seriesNames[C]),rel:p+1,"data:realIndex":C});o.ctx.series.addCollapsedClassToSeries(V,C);var R=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":C}),N=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,B=0,G=o.initialPositions(c,u,b,_,x,k,I);u=G.y,F=G.barHeight,_=G.yDivision,k=G.zeroW,c=G.x,B=G.barWidth,b=G.xDivision,x=G.zeroH,r.globals.barHeight=F,r.globals.barWidth=B,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(ve){return isNaN(ve)})&&(o.groupCtx.prevY[0]=o.groupCtx.prevY[0].map(function(){return x}),o.groupCtx.prevYF[0]=o.groupCtx.prevYF[0].map(function(){return 0}));for(var q=0;q<r.globals.dataPoints;q++){var X=o.barHelpers.getStrokeWidth(p,q,C),K={indexes:{i:p,j:q,realIndex:C,translationsIndex:I,bc:m},strokeWidth:X,x:c,y:u,elSeries:V,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[E]},H=null;o.isHorizontal?(H=o.drawStackedBarPaths(et(et({},K),{},{zeroW:k,barHeight:F,yDivision:_})),B=o.series[p][q]/o.invertedYRatio):(H=o.drawStackedColumnPaths(et(et({},K),{},{xDivision:b,barWidth:B,zeroH:x})),F=o.series[p][q]/o.yRatio[I]);var Q=o.barHelpers.drawGoalLine({barXPosition:H.barXPosition,barYPosition:H.barYPosition,goalX:H.goalX,goalY:H.goalY,barHeight:F,barWidth:B});Q&&N.add(Q),u=H.y,c=H.x,T.push(c),L.push(u);var se=o.barHelpers.getPathFillColor(s,p,q,C),Z="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[C][q]==="bottom"&&r.globals.series[C][q]>0||o.barHelpers.arrBorderRadius[C][q]==="top"&&r.globals.series[C][q]<0)&&(Z=ae),V=o.renderSeries(et(et({realIndex:C,pathFill:se.color},se.useRangeColor?{lineFill:se.color}:{}),{},{j:q,i:p,columnGroupIndex:P,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:X,elSeries:V,x:c,y:u,series:s,barHeight:F,barWidth:B,elDataLabelsWrap:R,elGoalsMarkers:N,type:"bar",visibleSeries:P,classes:Z}))}r.globals.seriesXvalues[C]=T,r.globals.seriesYvalues[C]=L,o.groupCtx.prevY.push(o.groupCtx.yArrj),o.groupCtx.prevYF.push(o.groupCtx.yArrjF),o.groupCtx.prevYVal.push(o.groupCtx.yArrjVal),o.groupCtx.prevX.push(o.groupCtx.xArrj),o.groupCtx.prevXF.push(o.groupCtx.xArrjF),o.groupCtx.prevXVal.push(o.groupCtx.xArrjVal),l.add(V)},h=0,f=0;h<s.length;h++,f++)d(h,f);return l}},{key:"initialPositions",value:function(s,i,o,r,a,l,c){var u,d,h=this.w;if(this.isHorizontal){r=h.globals.gridHeight/h.globals.dataPoints;var f=h.config.plotOptions.bar.barHeight;u=String(f).indexOf("%")===-1?parseInt(f,10):r*parseInt(f,10)/100,l=h.globals.padHorizontal+(this.isReversed?h.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),i=(r-u)/2}else{d=o=h.globals.gridWidth/h.globals.dataPoints;var p=h.config.plotOptions.bar.columnWidth;h.globals.isXNumeric&&h.globals.dataPoints>1?d=(o=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(p).indexOf("%")===-1?d=parseInt(p,10):d*=parseInt(p,10)/100,a=this.isReversed?this.baseLineY[c]:h.globals.gridHeight-this.baseLineY[c],s=h.globals.padHorizontal+(o-d)/2}var m=h.globals.barGroups.length||1;return{x:s,y:i,yDivision:r,xDivision:o,barHeight:u/m,barWidth:d/m,zeroH:a,zeroW:l}}},{key:"drawStackedBarPaths",value:function(s){for(var i,o=s.indexes,r=s.barHeight,a=s.strokeWidth,l=s.zeroW,c=s.x,u=s.y,d=s.columnGroupIndex,h=s.seriesGroup,f=s.yDivision,p=s.elSeries,m=this.w,b=u+d*r,_=o.i,x=o.j,k=o.realIndex,C=o.translationsIndex,S=0,E=0;E<this.groupCtx.prevXF.length;E++)S+=this.groupCtx.prevXF[E][x];var P;if((P=h.indexOf(m.config.series[k].name))>0){var T=l;this.groupCtx.prevXVal[P-1][x]<0?T=this.series[_][x]>=0?this.groupCtx.prevX[P-1][x]+S-2*(this.isReversed?S:0):this.groupCtx.prevX[P-1][x]:this.groupCtx.prevXVal[P-1][x]>=0&&(T=this.series[_][x]>=0?this.groupCtx.prevX[P-1][x]:this.groupCtx.prevX[P-1][x]-S+2*(this.isReversed?S:0)),i=T}else i=l;c=this.series[_][x]===null?i:i+this.series[_][x]/this.invertedYRatio-2*(this.isReversed?this.series[_][x]/this.invertedYRatio:0);var L=this.barHelpers.getBarpaths({barYPosition:b,barHeight:r,x1:i,x2:c,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:o.realIndex,seriesGroup:h,i:_,j:x,w:m});return this.barHelpers.barBackground({j:x,i:_,y1:b,y2:r,elSeries:p}),u+=f,{pathTo:L.pathTo,pathFrom:L.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,_,x,C),barXPosition:i,barYPosition:b,x:c,y:u}}},{key:"drawStackedColumnPaths",value:function(s){var i=s.indexes,o=s.x,r=s.y,a=s.xDivision,l=s.barWidth,c=s.zeroH,u=s.columnGroupIndex,d=s.seriesGroup,h=s.elSeries,f=this.w,p=i.i,m=i.j,b=i.bc,_=i.realIndex,x=i.translationsIndex;if(f.globals.isXNumeric){var k=f.globals.seriesX[_][m];k||(k=0),o=(k-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var C,S=o+u*l,E=0,P=0;P<this.groupCtx.prevYF.length;P++)E+=isNaN(this.groupCtx.prevYF[P][m])?0:this.groupCtx.prevYF[P][m];var T=p;if(d&&(T=d.indexOf(f.globals.seriesNames[_])),T>0&&!f.globals.isXNumeric||T>0&&f.globals.isXNumeric&&f.globals.seriesX[_-1][m]===f.globals.seriesX[_][m]){var L,I,V,R=Math.min(this.yRatio.length+1,_+1);if(this.groupCtx.prevY[T-1]!==void 0&&this.groupCtx.prevY[T-1].length)for(var N=1;N<R;N++){var F;if(!isNaN((F=this.groupCtx.prevY[T-N])===null||F===void 0?void 0:F[m])){V=this.groupCtx.prevY[T-N][m];break}}for(var B=1;B<R;B++){var G,q;if(((G=this.groupCtx.prevYVal[T-B])===null||G===void 0?void 0:G[m])<0){I=this.series[p][m]>=0?V-E+2*(this.isReversed?E:0):V;break}if(((q=this.groupCtx.prevYVal[T-B])===null||q===void 0?void 0:q[m])>=0){I=this.series[p][m]>=0?V:V+E-2*(this.isReversed?E:0);break}}I===void 0&&(I=f.globals.gridHeight),C=(L=this.groupCtx.prevYF[0])!==null&&L!==void 0&&L.every(function(K){return K===0})&&this.groupCtx.prevYF.slice(1,T).every(function(K){return K.every(function(H){return isNaN(H)})})?c:I}else C=c;r=this.series[p][m]?C-this.series[p][m]/this.yRatio[x]+2*(this.isReversed?this.series[p][m]/this.yRatio[x]:0):C;var X=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:l,y1:C,y2:r,yRatio:this.yRatio[x],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:d,realIndex:i.realIndex,i:p,j:m,w:f});return this.barHelpers.barBackground({bc:b,j:m,i:p,x1:S,x2:l,elSeries:h}),{pathTo:X.pathTo,pathFrom:X.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),J3=function(t){gv(n,Jf);var e=mv(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i,o){var r=this,a=this.w,l=new Ve(this.ctx),c=a.globals.comboCharts?i:a.config.chart.type,u=new zr(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var d=new ys(this.ctx,a);s=d.getLogSeries(s),this.series=s,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(s);for(var h=l.group({class:"apexcharts-".concat(c,"-series apexcharts-plot-series")}),f=function(m){r.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[m].type==="boxPlot";var b,_,x,k,C=void 0,S=void 0,E=[],P=[],T=a.globals.comboCharts?o[m]:m,L=r.barHelpers.getGroupIndex(T).columnGroupIndex,I=l.group({class:"apexcharts-series",seriesName:ue.escapeString(a.globals.seriesNames[T]),rel:m+1,"data:realIndex":T});r.ctx.series.addCollapsedClassToSeries(I,T),s[m].length>0&&(r.visibleI=r.visibleI+1);var V,R,N=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[T][0],N=T);var F=r.barHelpers.initialPositions();S=F.y,V=F.barHeight,_=F.yDivision,k=F.zeroW,C=F.x,R=F.barWidth,b=F.xDivision,x=F.zeroH,P.push(C+R/2);for(var B=l.group({class:"apexcharts-datalabels","data:realIndex":T}),G=l.group({class:"apexcharts-bar-goals-markers"}),q=function(K){var H=r.barHelpers.getStrokeWidth(m,K,T),Q=null,se={indexes:{i:m,j:K,realIndex:T,translationsIndex:N},x:C,y:S,strokeWidth:H,elSeries:I};Q=r.isHorizontal?r.drawHorizontalBoxPaths(et(et({},se),{},{yDivision:_,barHeight:V,zeroW:k})):r.drawVerticalBoxPaths(et(et({},se),{},{xDivision:b,barWidth:R,zeroH:x})),S=Q.y,C=Q.x;var Z=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:V,barWidth:R});Z&&G.add(Z),K>0&&P.push(C+R/2),E.push(S),Q.pathTo.forEach(function(ae,ve){var ke=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[ve]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:T,dataPointIndex:K,color:Q.color[ve],value:s[m][K]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:ke,j:K,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:H,elSeries:I,x:C,y:S,series:s,columnGroupIndex:L,barHeight:V,barWidth:R,elDataLabelsWrap:B,elGoalsMarkers:G,visibleSeries:r.visibleI,type:a.config.chart.type})})},X=0;X<a.globals.dataPoints;X++)q(X);a.globals.seriesXvalues[T]=P,a.globals.seriesYvalues[T]=E,h.add(I)},p=0;p<s.length;p++)f(p);return h}},{key:"drawVerticalBoxPaths",value:function(s){var i=s.indexes,o=s.x;s.y;var r=s.xDivision,a=s.barWidth,l=s.zeroH,c=s.strokeWidth,u=this.w,d=new Ve(this.ctx),h=i.i,f=i.j,p=u.config.plotOptions.candlestick.colors,m=this.boxOptions.colors,b=i.realIndex,_=function(B){return Array.isArray(B)?B[b]:B},x=_(p.upward),k=_(p.downward),C=this.yRatio[i.translationsIndex],S=this.getOHLCValue(b,f),E=l,P=l,T=S.o<S.c?[x]:[k];this.isBoxPlot&&(T=[_(m.lower),_(m.upper)]);var L=Math.min(S.o,S.c),I=Math.max(S.o,S.c),V=S.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.xRatio-a/2);var R=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(L=l,I=l):(L=l-L/C,I=l-I/C,E=l-S.h/C,P=l-S.l/C,V=l-S.m/C);var N=d.move(R,l),F=d.move(R+a/2,L);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(b,f,!0)),N=this.isBoxPlot?[d.move(R,L)+d.line(R+a/2,L)+d.line(R+a/2,E)+d.line(R+a/4,E)+d.line(R+a-a/4,E)+d.line(R+a/2,E)+d.line(R+a/2,L)+d.line(R+a,L)+d.line(R+a,V)+d.line(R,V)+d.line(R,L+c/2),d.move(R,V)+d.line(R+a,V)+d.line(R+a,I)+d.line(R+a/2,I)+d.line(R+a/2,P)+d.line(R+a-a/4,P)+d.line(R+a/4,P)+d.line(R+a/2,P)+d.line(R+a/2,I)+d.line(R,I)+d.line(R,V)+"z"]:[d.move(R,I)+d.line(R+a/2,I)+d.line(R+a/2,E)+d.line(R+a/2,I)+d.line(R+a,I)+d.line(R+a,L)+d.line(R+a/2,L)+d.line(R+a/2,P)+d.line(R+a/2,L)+d.line(R,L)+d.line(R,I-c/2)],F+=d.move(R,L),u.globals.isXNumeric||(o+=r),{pathTo:N,pathFrom:F,x:o,y:I,goalY:this.barHelpers.getGoalValues("y",null,l,h,f,i.translationsIndex),barXPosition:R,color:T}}},{key:"drawHorizontalBoxPaths",value:function(s){var i=s.indexes;s.x;var o=s.y,r=s.yDivision,a=s.barHeight,l=s.zeroW,c=s.strokeWidth,u=this.w,d=new Ve(this.ctx),h=i.i,f=i.j,p=this.boxOptions.colors.lower;this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var m=this.invertedYRatio,b=i.realIndex,_=this.getOHLCValue(b,f),x=l,k=l,C=Math.min(_.o,_.c),S=Math.max(_.o,_.c),E=_.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.invertedXRatio-a/2);var P=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(C=l,S=l):(C=l+C/m,S=l+S/m,x=l+_.h/m,k=l+_.l/m,E=l+_.m/m);var T=d.move(l,P),L=d.move(C,P+a/2);return u.globals.previousPaths.length>0&&(L=this.getPreviousPath(b,f,!0)),T=[d.move(C,P)+d.line(C,P+a/2)+d.line(x,P+a/2)+d.line(x,P+a/2-a/4)+d.line(x,P+a/2+a/4)+d.line(x,P+a/2)+d.line(C,P+a/2)+d.line(C,P+a)+d.line(E,P+a)+d.line(E,P)+d.line(C+c/2,P),d.move(E,P)+d.line(E,P+a)+d.line(S,P+a)+d.line(S,P+a/2)+d.line(k,P+a/2)+d.line(k,P+a-a/4)+d.line(k,P+a/4)+d.line(k,P+a/2)+d.line(S,P+a/2)+d.line(S,P)+d.line(E,P)+"z"],L+=d.move(C,P),u.globals.isXNumeric||(o+=r),{pathTo:T,pathFrom:L,x:S,y:o,goalX:this.barHelpers.getGoalValues("x",l,null,h,f),barYPosition:P,color:p}}},{key:"getOHLCValue",value:function(s,i){var o=this.w,r=new ys(this.ctx,o),a=r.getLogValAtSeriesIndex(o.globals.seriesCandleH[s][i],s),l=r.getLogValAtSeriesIndex(o.globals.seriesCandleO[s][i],s),c=r.getLogValAtSeriesIndex(o.globals.seriesCandleM[s][i],s),u=r.getLogValAtSeriesIndex(o.globals.seriesCandleC[s][i],s),d=r.getLogValAtSeriesIndex(o.globals.seriesCandleL[s][i],s);return{o:this.isBoxPlot?a:l,h:this.isBoxPlot?l:a,m:c,l:this.isBoxPlot?u:d,c:this.isBoxPlot?d:u}}}]),n}(),uj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"checkColorRange",value:function(){var e=this.w,n=!1,s=e.config.plotOptions[e.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(i,o){i.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(e,n,s,i){var o=this.w,r=1,a=o.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,n,s);o.globals.hasNegs||i?r=o.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*a):(1-l.percent/100)*(1.25*a):l.percent<=0?1-(1+l.percent/100)*a:(1-l.percent/100)*a:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*a)));var c=l.color,u=new ue;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=ue.hexToRgba(ue.isColorHex(d)?d:ue.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=ue.hexToRgba(ue.isColorHex(h)?h:ue.rgb2hex(h),o.config.fill.opacity)}return{color:c,colorProps:l}}},{key:"determineColor",value:function(e,n,s){var i=this.w,o=i.globals.series[n][s],r=i.config.plotOptions[e],a=r.colorScale.inverse?s:n;r.distributed&&i.config.chart.type==="treemap"&&(a=s);var l=i.globals.colors[a],c=null,u=Math.min.apply(Math,Rs(i.globals.series[n])),d=Math.max.apply(Math,Rs(i.globals.series[n]));r.distributed||e!=="heatmap"||(u=i.globals.minY,d=i.globals.maxY),r.colorScale.min!==void 0&&(u=r.colorScale.min<i.globals.minY?r.colorScale.min:i.globals.minY,d=r.colorScale.max>i.globals.maxY?r.colorScale.max:i.globals.maxY);var h=Math.abs(d)+Math.abs(u),f=100*o/(h===0?h-1e-6:h);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(p,m){if(o>=p.from&&o<=p.to){l=p.color,c=p.foreColor?p.foreColor:null,u=p.from,d=p.to;var b=Math.abs(d)+Math.abs(u);f=100*o/(b===0?b-1e-6:b)}}),{color:l,foreColor:c,percent:f}}},{key:"calculateDataLabels",value:function(e){var n=e.text,s=e.x,i=e.y,o=e.i,r=e.j,a=e.colorProps,l=e.fontSize,c=this.w.config.dataLabels,u=new Ve(this.ctx),d=new Zf(this.ctx),h=null;if(c.enabled){h=u.group({class:"apexcharts-data-labels"});var f=c.offsetX,p=c.offsetY,m=s+f,b=i+parseFloat(c.style.fontSize)/3+p;d.plotDataLabelsText({x:m,y:b,text:n,i:o,j:r,color:a.foreColor,parent:h,fontSize:l,dataLabelsConfig:c})}return h}},{key:"addListeners",value:function(e){var n=new Ve(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this,e))}}]),t}(),_yt=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new uj(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return lt(t,[{key:"draw",value:function(e){var n=this.w,s=new Ve(this.ctx),i=s.group({class:"apexcharts-heatmap"});i.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var o=n.globals.gridWidth/n.globals.dataPoints,r=n.globals.gridHeight/n.globals.series.length,a=0,l=!1;this.negRange=this.helpers.checkColorRange();var c=e.slice();n.config.yaxis[0].reversed&&(l=!0,c.reverse());for(var u=l?0:c.length-1;l?u<c.length:u>=0;l?u++:u--){var d=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:ue.escapeString(n.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});if(this.ctx.series.addCollapsedClassToSeries(d,u),n.config.chart.dropShadow.enabled){var h=n.config.chart.dropShadow;new ai(this.ctx).dropShadow(d,h,u)}for(var f=0,p=n.config.plotOptions.heatmap.shadeIntensity,m=0,b=0;b<n.globals.dataPoints;b++)if(n.globals.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*b<n.globals.seriesX[u][m])f+=o;else{if(m>=c[u].length)break;var _=this.helpers.getShadeColor(n.config.chart.type,u,m,this.negRange),x=_.color,k=_.colorProps;n.config.fill.type==="image"&&(x=new zr(this.ctx).fillPath({seriesNumber:u,dataPointIndex:m,opacity:n.globals.hasNegs?k.percent<0?1-(1+k.percent/100):p+k.percent/100:k.percent/100,patternID:ue.randomId(),width:n.config.fill.image.width?n.config.fill.image.width:o,height:n.config.fill.image.height?n.config.fill.image.height:r}));var C=this.rectRadius,S=s.drawRect(f,a,o,r,C);if(S.attr({cx:f,cy:a}),S.node.classList.add("apexcharts-heatmap-rect"),d.add(S),S.attr({fill:x,i:u,index:u,j:m,val:e[u][m],"stroke-width":this.strokeWidth,stroke:n.config.plotOptions.heatmap.useFillColorAsStroke?x:n.globals.stroke.colors[0],color:x}),this.helpers.addListeners(S),n.config.chart.animations.enabled&&!n.globals.dataChanged){var E=1;n.globals.resized||(E=n.config.chart.animations.speed),this.animateHeatMap(S,f,a,o,r,E)}if(n.globals.dataChanged){var P=1;if(this.dynamicAnim.enabled&&n.globals.shouldAnimate){P=this.dynamicAnim.speed;var T=n.globals.previousPaths[u]&&n.globals.previousPaths[u][m]&&n.globals.previousPaths[u][m].color;T||(T="rgba(255, 255, 255, 0)"),this.animateHeatColor(S,ue.isColorHex(T)?T:ue.rgb2hex(T),ue.isColorHex(x)?x:ue.rgb2hex(x),P)}}var L=(0,n.config.dataLabels.formatter)(n.globals.series[u][m],{value:n.globals.series[u][m],seriesIndex:u,dataPointIndex:m,w:n}),I=this.helpers.calculateDataLabels({text:L,x:f+o/2,y:a+r/2,i:u,j:m,colorProps:k,series:c});I!==null&&d.add(I),f+=o,m++}a+=r,i.add(d)}var V=n.globals.yAxisScale[0].result.slice();return n.config.yaxis[0].reversed?V.unshift(""):V.push(""),n.globals.yAxisScale[0].result=V,i}},{key:"animateHeatMap",value:function(e,n,s,i,o,r){var a=new Tp(this.ctx);a.animateRect(e,{x:n+i/2,y:s+o/2,width:0,height:0},{x:n,y:s,width:i,height:o},r,function(){a.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,n,s,i){e.attr({fill:n}).animate(i).attr({fill:s})}}]),t}(),dj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawYAxisTexts",value:function(e,n,s,i){var o=this.w,r=o.config.yaxis[0],a=o.globals.yLabelFormatters[0];return new Ve(this.ctx).drawText({x:e+r.labels.offsetX,y:n+r.labels.offsetY,text:a(i,s),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[s]:r.labels.style.colors})}}]),t}(),hj=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=Math.min(n.globals.gridWidth,n.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=n.globals.gridWidth/2,n.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(n.config.plotOptions.pie.endAngle-n.config.plotOptions.pie.startAngle),this.initialAngle=n.config.plotOptions.pie.startAngle%this.fullAngle,n.globals.radialSize=this.defaultSize/2.05-n.config.stroke.width-(n.config.chart.sparkline.enabled?0:n.config.chart.dropShadow.blur),this.donutSize=n.globals.radialSize*parseInt(n.config.plotOptions.pie.donut.size,10)/100;var s=n.config.plotOptions.pie.customScale,i=n.globals.gridWidth/2,o=n.globals.gridHeight/2;this.translateX=i-i*s,this.translateY=o-o*s,this.dataLabelsGroup=new Ve(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(s,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=i.group({class:"apexcharts-pie"});if(s.globals.noData)return o;for(var r=0,a=0;a<e.length;a++)r+=ue.negToZero(e[a]);var l=[],c=i.group();r===0&&(r=1e-5),e.forEach(function(k){n.maxY=Math.max(n.maxY,k)}),s.config.yaxis[0].max&&(this.maxY=s.config.yaxis[0].max),s.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(o);for(var u=0;u<e.length;u++){var d=this.fullAngle*ue.negToZero(e[u])/r;l.push(d),this.chartType==="polarArea"?(l[u]=this.fullAngle/e.length,this.sliceSizes.push(s.globals.radialSize*e[u]/this.maxY)):this.sliceSizes.push(s.globals.radialSize)}if(s.globals.dataChanged){for(var h,f=0,p=0;p<s.globals.previousPaths.length;p++)f+=ue.negToZero(s.globals.previousPaths[p]);for(var m=0;m<s.globals.previousPaths.length;m++)h=this.fullAngle*ue.negToZero(s.globals.previousPaths[m])/f,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var b=i.drawCircle(this.donutSize);b.attr({cx:this.centerX,cy:this.centerY,fill:s.config.plotOptions.pie.donut.background?s.config.plotOptions.pie.donut.background:"transparent"}),c.add(b)}var _=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(k){_.add(k)}),c.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(s.config.plotOptions.pie.customScale,")")}),c.add(_),o.add(c),this.donutDataLabels.show){var x=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});o.add(x)}return s.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(o),o}},{key:"drawArcs",value:function(e,n){var s=this.w,i=new ai(this.ctx),o=new Ve(this.ctx),r=new zr(this.ctx),a=o.group({class:"apexcharts-slices"}),l=this.initialAngle,c=this.initialAngle,u=this.initialAngle,d=this.initialAngle;this.strokeWidth=s.config.stroke.show?s.config.stroke.width:0;for(var h=0;h<e.length;h++){var f=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:ue.escapeString(s.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});a.add(f),c=d,u=(l=u)+e[h],d=c+this.prevSectorAngleArr[h];var p=u<l?this.fullAngle+u-l:u-l,m=r.fillPath({seriesNumber:h,size:this.sliceSizes[h],value:n[h]}),b=this.getChangedPath(c,d),_=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[h]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:s.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h)});if(_.attr({index:0,j:h}),i.setSelectionFilter(_,0,h),s.config.chart.dropShadow.enabled){var x=s.config.chart.dropShadow;i.dropShadow(_,x,h)}this.addListeners(_,this.donutDataLabels),Ve.setAttrs(_.node,{"data:angle":p,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":n[h]});var k={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?k=ue.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle):this.chartType==="donut"&&(k=ue.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2+s.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle)),f.add(_);var C=0;if(!this.initialAnim||s.globals.resized||s.globals.dataChanged?this.animBeginArr.push(0):((C=p/this.fullAngle*s.config.chart.animations.speed)===0&&(C=1),this.animDur=C+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&s.globals.dataChanged?this.animatePaths(_,{size:this.sliceSizes[h],endAngle:u,startAngle:l,prevStartAngle:c,prevEndAngle:d,animateStartingPos:!0,i:h,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:s.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(_,{size:this.sliceSizes[h],endAngle:u,startAngle:l,i:h,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:C}),s.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&_.node.addEventListener("mouseup",this.pieClicked.bind(this,h)),s.globals.selectedDataPoints[0]!==void 0&&s.globals.selectedDataPoints[0].indexOf(h)>-1&&this.pieClicked(h),s.config.dataLabels.enabled){var S=k.x,E=k.y,P=100*p/this.fullAngle+"%";if(p!==0&&s.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[h]){var T=s.config.dataLabels.formatter;T!==void 0&&(P=T(s.globals.seriesPercent[h][0],{seriesIndex:h,w:s}));var L=s.globals.dataLabels.style.colors[h],I=o.group({class:"apexcharts-datalabels"}),V=o.drawText({x:S,y:E,text:P,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:L});if(I.add(V),s.config.dataLabels.dropShadow.enabled){var R=s.config.dataLabels.dropShadow;i.dropShadow(V,R)}V.node.classList.add("apexcharts-pie-label"),s.config.chart.animations.animate&&s.globals.resized===!1&&(V.node.classList.add("apexcharts-pie-label-delay"),V.node.style.animationDelay=s.config.chart.animations.speed/940+"s"),this.sliceLabels.push(I)}}}return a}},{key:"addListeners",value:function(e,n){var s=new Ve(this.ctx);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",s.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,n)))}},{key:"animatePaths",value:function(e,n){var s=this.w,i=n.endAngle<n.startAngle?this.fullAngle+n.endAngle-n.startAngle:n.endAngle-n.startAngle,o=i,r=n.startAngle,a=n.startAngle;n.prevStartAngle!==void 0&&n.prevEndAngle!==void 0&&(r=n.prevEndAngle,o=n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle),n.i===s.config.series.length-1&&(i+a>this.fullAngle?n.endAngle=n.endAngle-(i+a):i+a<this.fullAngle&&(n.endAngle=n.endAngle+(this.fullAngle-(i+a)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(e,r,a,i,o,n)}},{key:"animateArc",value:function(e,n,s,i,o,r){var a,l=this,c=this.w,u=new Tp(this.ctx),d=r.size;(isNaN(n)||isNaN(o))&&(n=s,o=i,r.dur=0);var h=i,f=s,p=n<s?this.fullAngle+n-s:n-s;c.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(a=l.getPiePath({me:l,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:d}),e.attr({d:a})),r.dur!==0?e.animate(r.dur,r.animBeginArr[r.i]).after(function(){l.chartType!=="pie"&&l.chartType!=="donut"&&l.chartType!=="polarArea"||this.animate(c.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),r.i===c.config.series.length-1&&u.animationCompleted(e)}).during(function(m){h=p+(i-p)*m,r.animateStartingPos&&(h=o+(i-o)*m,f=n-o+(s-(n-o))*m),a=l.getPiePath({me:l,startAngle:f,angle:h,size:d}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})}):(a=l.getPiePath({me:l,startAngle:f,angle:i,size:d}),r.isTrack||(c.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":l.strokeWidth}))}},{key:"pieClicked",value:function(e){var n,s=this.w,i=this,o=i.sliceSizes[e]+(s.config.plotOptions.pie.expandOnClick?4:0),r=s.globals.dom.Paper.findOne(".apexcharts-".concat(i.chartType.toLowerCase(),"-slice-").concat(e));if(r.attr("data:pieClicked")!=="true"){var a=s.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,function(d){d.setAttribute("data:pieClicked","false");var h=d.getAttribute("data:pathOrig");h&&d.setAttribute("d",h)}),s.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var l=parseInt(r.attr("data:startAngle"),10),c=parseInt(r.attr("data:angle"),10);n=i.getPiePath({me:i,startAngle:l,angle:c,size:o}),c!==360&&r.plot(n)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var u=r.attr("data:pathOrig");r.attr({d:u})}}},{key:"getChangedPath",value:function(e,n){var s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:e,angle:n-e,size:this.size})),s}},{key:"getPiePath",value:function(e){var n,s=e.me,i=e.startAngle,o=e.angle,r=e.size,a=new Ve(this.ctx),l=i,c=Math.PI*(l-90)/180,u=o+i;Math.ceil(u)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(u=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(u)>this.fullAngle&&(u-=this.fullAngle);var d=Math.PI*(u-90)/180,h=s.centerX+r*Math.cos(c),f=s.centerY+r*Math.sin(c),p=s.centerX+r*Math.cos(d),m=s.centerY+r*Math.sin(d),b=ue.polarToCartesian(s.centerX,s.centerY,s.donutSize,u),_=ue.polarToCartesian(s.centerX,s.centerY,s.donutSize,l),x=o>180?1:0,k=["M",h,f,"A",r,r,0,x,1,p,m];return n=s.chartType==="donut"?[].concat(k,["L",b.x,b.y,"A",s.donutSize,s.donutSize,0,x,0,_.x,_.y,"L",h,f,"z"]).join(" "):s.chartType==="pie"||s.chartType==="polarArea"?[].concat(k,["L",s.centerX,s.centerY,"L",h,f]).join(" "):[].concat(k).join(" "),a.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var n=this.w,s=new oj(this.ctx),i=new Ve(this.ctx),o=new dj(this.ctx),r=i.group(),a=i.group(),l=s.niceScale(0,Math.ceil(this.maxY),0),c=l.result.reverse(),u=l.result.length;this.maxY=l.niceMax;for(var d=n.globals.radialSize,h=d/(u-1),f=0;f<u-1;f++){var p=i.drawCircle(d);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":n.config.plotOptions.polarArea.rings.strokeWidth,stroke:n.config.plotOptions.polarArea.rings.strokeColor}),n.config.yaxis[0].show){var m=o.drawYAxisTexts(this.centerX,this.centerY-d+parseInt(n.config.yaxis[0].labels.style.fontSize,10)/2,f,c[f]);a.add(m)}r.add(p),d-=h}this.drawSpokes(e),e.add(r),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,n,s){var i=this.w,o=new Ve(this.ctx),r=n.total.show;e.node.innerHTML="",e.node.style.opacity=s.opacity;var a,l,c=s.centerX,u=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;a=n.name.color===void 0?i.globals.colors[0]:n.name.color;var d=n.name.fontSize,h=n.name.fontFamily,f=n.name.fontWeight;l=n.value.color===void 0?i.config.chart.foreColor:n.value.color;var p=n.value.formatter,m="",b="";if(r?(a=n.total.color,d=n.total.fontSize,h=n.total.fontFamily,f=n.total.fontWeight,b=this.donutDataLabels.total.label?n.total.label:"",m=n.total.formatter(i)):i.globals.series.length===1&&(m=p(i.globals.series[0],i),b=i.globals.seriesNames[0]),b&&(b=n.name.formatter(b,n.total.show,i)),n.name.show){var _=o.drawText({x:c,y:u+parseFloat(n.name.offsetY),text:b,textAnchor:"middle",foreColor:a,fontSize:d,fontWeight:f,fontFamily:h});_.node.classList.add("apexcharts-datalabel-label"),e.add(_)}if(n.value.show){var x=n.name.show?parseFloat(n.value.offsetY)+16:n.value.offsetY,k=o.drawText({x:c,y:u+x,text:m,textAnchor:"middle",foreColor:l,fontWeight:n.value.fontWeight,fontSize:n.value.fontSize,fontFamily:n.value.fontFamily});k.node.classList.add("apexcharts-datalabel-value"),e.add(k)}return e}},{key:"printInnerLabels",value:function(e,n,s,i){var o,r=this.w;i?o=e.name.color===void 0?r.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:e.name.color:r.globals.series.length>1&&e.total.show&&(o=e.total.color);var a=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");s=(0,e.value.formatter)(s,r),i||typeof e.total.formatter!="function"||(s=e.total.formatter(r));var c=n===e.total.label;n=this.donutDataLabels.total.label?e.name.formatter(n,c,r):"",a!==null&&(a.textContent=n),l!==null&&(l.textContent=s),a!==null&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,n){var s=this.w,i=e.getAttribute("data:value"),o=s.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];s.globals.series.length>1&&this.printInnerLabels(n,o,i,e);var r=s.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=s.config.plotOptions.polarArea.spokes;if(o.strokeWidth!==0){for(var r=[],a=360/s.globals.series.length,l=0;l<s.globals.series.length;l++)r.push(ue.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize,s.config.plotOptions.pie.startAngle+a*l));r.forEach(function(c,u){var d=i.drawLine(c.x,c.y,n.centerX,n.centerY,Array.isArray(o.connectorColors)?o.connectorColors[u]:o.connectorColors);e.add(d)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var n=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(n,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}]),t}(),wyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new Ve(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.gridHeight:n.globals.gridWidth,this.isLog=n.config.yaxis[0].logarithmic,this.logBase=n.config.yaxis[0].logBase,this.coreUtils=new ys(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,n.globals.maxY,0):n.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):n.globals.minY,this.polygons=n.config.plotOptions.radar.polygons,this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-n.config.chart.dropShadow.blur,n.config.xaxis.labels.show&&(this.size=this.size-n.globals.xAxisLabelsWidth/1.75),n.config.plotOptions.radar.size!==void 0&&(this.size=n.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new zr(this.ctx),o=[],r=new Zf(this.ctx);e.length&&(this.dataPointsLen=e[s.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=s.globals.gridWidth/2,l=s.globals.gridHeight/2,c=a+s.config.plotOptions.radar.offsetX,u=l+s.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(u||0,")")}),h=[],f=null,p=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(b,_){var x=b.length===s.globals.dataPoints,k=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":x,seriesName:ue.escapeString(s.globals.seriesNames[_]),rel:_+1,"data:realIndex":_});n.dataRadiusOfPercent[_]=[],n.dataRadius[_]=[],n.angleArr[_]=[],b.forEach(function(N,F){var B=Math.abs(n.maxValue-n.minValue);N-=n.minValue,n.isLog&&(N=n.coreUtils.getLogVal(n.logBase,N,0)),n.dataRadiusOfPercent[_][F]=N/B,n.dataRadius[_][F]=n.dataRadiusOfPercent[_][F]*n.size,n.angleArr[_][F]=F*n.disAngle}),h=n.getDataPointsPos(n.dataRadius[_],n.angleArr[_]);var C=n.createPaths(h,{x:0,y:0});f=n.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),p=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":_}),s.globals.delayedElements.push({el:f.node,index:_});var S={i:_,realIndex:_,animationDelay:_,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:s.globals.stroke.colors[_],strokeLineCap:s.config.stroke.lineCap},E=null;s.globals.previousPaths.length>0&&(E=n.getPreviousPath(_));for(var P=0;P<C.linePathsTo.length;P++){var T=n.graphics.renderPaths(et(et({},S),{},{pathFrom:E===null?C.linePathsFrom[P]:E,pathTo:C.linePathsTo[P],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[_]:n.strokeWidth,fill:"none",drawShadow:!1}));k.add(T);var L=i.fillPath({seriesNumber:_}),I=n.graphics.renderPaths(et(et({},S),{},{pathFrom:E===null?C.areaPathsFrom[P]:E,pathTo:C.areaPathsTo[P],strokeWidth:0,fill:L,drawShadow:!1}));if(s.config.chart.dropShadow.enabled){var V=new ai(n.ctx),R=s.config.chart.dropShadow;V.dropShadow(I,Object.assign({},R,{noUserSpaceOnUse:!0}),_)}k.add(I)}b.forEach(function(N,F){var B=new Op(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:_,dataPointIndex:F}),G=n.graphics.drawMarker(h[F].x,h[F].y,B);G.attr("rel",F),G.attr("j",F),G.attr("index",_),G.node.setAttribute("default-marker-size",B.pSize);var q=n.graphics.group({class:"apexcharts-series-markers"});q&&q.add(G),f.add(q),k.add(f);var X=s.config.dataLabels;if(X.enabled){var K=X.formatter(s.globals.series[_][F],{seriesIndex:_,dataPointIndex:F,w:s});r.plotDataLabelsText({x:h[F].x,y:h[F].y,text:K,textAnchor:"middle",i:_,j:_,parent:p,offsetCorrection:!1,dataLabelsConfig:et({},X)})}k.add(p)}),o.push(k)}),this.drawPolygons({parent:d}),s.config.xaxis.labels.show){var m=this.drawXAxisTexts();d.add(m)}return o.forEach(function(b){d.add(b)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var n=this,s=this.w,i=e.parent,o=new dj(this.ctx),r=s.globals.yAxisScale[0].result.reverse(),a=r.length,l=[],c=this.size/(a-1),u=0;u<a;u++)l[u]=c*u;l.reverse();var d=[],h=[];l.forEach(function(f,p){var m=ue.getPolygonPos(f,n.dataPointsLen),b="";m.forEach(function(_,x){if(p===0){var k=n.graphics.drawLine(_.x,_.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[x]:n.polygons.connectorColors);h.push(k)}x===0&&n.yaxisLabelsTextsPos.push({x:_.x,y:_.y}),b+=_.x+","+_.y+" "}),d.push(b)}),d.forEach(function(f,p){var m=n.polygons.strokeColors,b=n.polygons.strokeWidth,_=n.graphics.drawPolygon(f,Array.isArray(m)?m[p]:m,Array.isArray(b)?b[p]:b,s.globals.radarPolygons.fill.colors[p]);i.add(_)}),h.forEach(function(f){i.add(f)}),s.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(f,p){var m=o.drawYAxisTexts(f.x,f.y,p,r[p]);n.yaxisLabels.add(m)})}},{key:"drawXAxisTexts",value:function(){var e=this,n=this.w,s=n.config.xaxis.labels,i=this.graphics.group({class:"apexcharts-xaxis"}),o=ue.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new Zf(e.ctx);if(o[a]){var u=e.getTextPos(o[a],e.size),d=l(r,{seriesIndex:-1,dataPointIndex:a,w:n});c.plotDataLabelsText({x:u.newX,y:u.newY,text:d,textAnchor:u.textAnchor,i:a,j:a,parent:i,className:"apexcharts-xaxis-label",color:Array.isArray(s.style.colors)&&s.style.colors[a]?s.style.colors[a]:"#a8a8a8",dataLabelsConfig:et({textAnchor:u.textAnchor,dropShadow:{enabled:!1}},s),offsetCorrection:!1}).on("click",function(h){if(typeof n.config.chart.events.xAxisLabelClick=="function"){var f=Object.assign({},n,{labelIndex:a});n.config.chart.events.xAxisLabelClick(h,e.ctx,f)}})}}),i}},{key:"createPaths",value:function(e,n){var s=this,i=[],o=[],r=[],a=[];if(e.length){o=[this.graphics.move(n.x,n.y)],a=[this.graphics.move(n.x,n.y)];var l=this.graphics.move(e[0].x,e[0].y),c=this.graphics.move(e[0].x,e[0].y);e.forEach(function(u,d){l+=s.graphics.line(u.x,u.y),c+=s.graphics.line(u.x,u.y),d===e.length-1&&(l+="Z",c+="Z")}),i.push(l),r.push(c)}return{linePathsFrom:o,linePathsTo:i,areaPathsFrom:a,areaPathsTo:r}}},{key:"getTextPos",value:function(e,n){var s="middle",i=e.x,o=e.y;return Math.abs(e.x)>=10?e.x>0?(s="start",i+=10):e.x<0&&(s="end",i-=10):s="middle",Math.abs(e.y)>=n-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:s,newX:i,newY:o}}},{key:"getPreviousPath",value:function(e){for(var n=this.w,s=null,i=0;i<n.globals.previousPaths.length;i++){var o=n.globals.previousPaths[i];o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&n.globals.previousPaths[i].paths[0]!==void 0&&(s=n.globals.previousPaths[i].paths[0].d)}return s}},{key:"getDataPointsPos",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],n=n||[];for(var i=[],o=0;o<s;o++){var r={};r.x=e[o]*Math.sin(n[o]),r.y=-e[o]*Math.cos(n[o]),i.push(r)}return i}}]),t}(),xyt=function(t){gv(n,hj);var e=mv(n);function n(s){var i;at(this,n),(i=e.call(this,s)).ctx=s,i.w=s.w,i.animBeginArr=[0],i.animDur=0;var o=i.w;return i.startAngle=o.config.plotOptions.radialBar.startAngle,i.endAngle=o.config.plotOptions.radialBar.endAngle,i.totalAngle=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle),i.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,i.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,i.barLabels=i.w.config.plotOptions.radialBar.barLabels,i.donutDataLabels=i.w.config.plotOptions.radialBar.dataLabels,i.radialDataLabels=i.donutDataLabels,i.trackStartAngle||(i.trackStartAngle=i.startAngle),i.trackEndAngle||(i.trackEndAngle=i.endAngle),i.endAngle===360&&(i.endAngle=359.99),i.margin=parseInt(o.config.plotOptions.radialBar.track.margin,10),i.onBarLabelClick=i.onBarLabelClick.bind(CU(i)),i}return lt(n,[{key:"draw",value:function(s){var i=this.w,o=new Ve(this.ctx),r=o.group({class:"apexcharts-radialbar"});if(i.globals.noData)return r;var a=o.group(),l=this.defaultSize/2,c=i.globals.gridWidth/2,u=this.defaultSize/2.05;i.config.chart.sparkline.enabled||(u=u-i.config.stroke.width-i.config.chart.dropShadow.blur);var d=i.globals.fill.colors;if(i.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:u,centerX:c,centerY:l,colorArr:d,series:s});a.add(h)}var f=this.drawArcs({size:u,centerX:c,centerY:l,colorArr:d,series:s}),p=360;i.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);var m=(360-p)/360;if(i.globals.radialSize=u-u*m,this.radialDataLabels.value.show){var b=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);i.globals.radialSize+=b*m}return a.add(f.g),i.config.plotOptions.radialBar.hollow.position==="front"&&(f.g.add(f.elHollow),f.dataLabels&&f.g.add(f.dataLabels)),r.add(a),r}},{key:"drawTracks",value:function(s){var i=this.w,o=new Ve(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new ai(this.ctx),l=new zr(this.ctx),c=this.getStrokeWidth(s);s.size=s.size-c/2;for(var u=0;u<s.series.length;u++){var d=o.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(d),d.attr({rel:u+1}),s.size=s.size-c-this.margin;var h=i.config.plotOptions.radialBar.track,f=l.fillPath({seriesNumber:0,size:s.size,fillColors:Array.isArray(h.background)?h.background[u]:h.background,solid:!0}),p=this.trackStartAngle,m=this.trackEndAngle;Math.abs(m)+Math.abs(p)>=360&&(m=360-Math.abs(this.startAngle)-.1);var b=o.drawPath({d:"",stroke:f,strokeWidth:c*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var _=h.dropShadow;a.dropShadow(b,_)}d.add(b),b.attr("id","apexcharts-radialbarTrack-"+u),this.animatePaths(b,{centerX:s.centerX,centerY:s.centerY,endAngle:m,startAngle:p,size:s.size,i:u,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(s){var i=this.w,o=new Ve(this.ctx),r=new zr(this.ctx),a=new ai(this.ctx),l=o.group(),c=this.getStrokeWidth(s);s.size=s.size-c/2;var u=i.config.plotOptions.radialBar.hollow.background,d=s.size-c*s.series.length-this.margin*s.series.length-c*parseInt(i.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=d-i.config.plotOptions.radialBar.hollow.margin;i.config.plotOptions.radialBar.hollow.image!==void 0&&(u=this.drawHollowImage(s,l,d,u));var f=this.drawHollow({size:h,centerX:s.centerX,centerY:s.centerY,fill:u||"transparent"});if(i.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=i.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(f,p)}var m=1;!this.radialDataLabels.total.show&&i.globals.series.length>1&&(m=0);var b=null;if(this.radialDataLabels.show){var _=i.globals.dom.Paper.findOne(".apexcharts-datalabels-group");b=this.renderInnerDataLabels(_,this.radialDataLabels,{hollowSize:d,centerX:s.centerX,centerY:s.centerY,opacity:m})}i.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(f),b&&l.add(b));var x=!1;i.config.plotOptions.radialBar.inverseOrder&&(x=!0);for(var k=x?s.series.length-1:0;x?k>=0:k<s.series.length;x?k--:k++){var C=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:ue.escapeString(i.globals.seriesNames[k])});l.add(C),C.attr({rel:k+1,"data:realIndex":k}),this.ctx.series.addCollapsedClassToSeries(C,k),s.size=s.size-c-this.margin;var S=r.fillPath({seriesNumber:k,size:s.size,value:s.series[k]}),E=this.startAngle,P=void 0,T=ue.negToZero(s.series[k]>100?100:s.series[k])/100,L=Math.round(this.totalAngle*T)+this.startAngle,I=void 0;i.globals.dataChanged&&(P=this.startAngle,I=Math.round(this.totalAngle*ue.negToZero(i.globals.previousPaths[k])/100)+P),Math.abs(L)+Math.abs(E)>360&&(L-=.01),Math.abs(I)+Math.abs(P)>360&&(I-=.01);var V=L-E,R=Array.isArray(i.config.stroke.dashArray)?i.config.stroke.dashArray[k]:i.config.stroke.dashArray,N=o.drawPath({d:"",stroke:S,strokeWidth:c,fill:"none",fillOpacity:i.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+k,strokeDashArray:R});if(Ve.setAttrs(N.node,{"data:angle":V,"data:value":s.series[k]}),i.config.chart.dropShadow.enabled){var F=i.config.chart.dropShadow;a.dropShadow(N,F,k)}if(a.setSelectionFilter(N,0,k),this.addListeners(N,this.radialDataLabels),C.add(N),N.attr({index:0,j:k}),this.barLabels.enabled){var B=ue.polarToCartesian(s.centerX,s.centerY,s.size,E),G=this.barLabels.formatter(i.globals.seriesNames[k],{seriesIndex:k,w:i}),q=["apexcharts-radialbar-label"];this.barLabels.onClick||q.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?i.globals.colors[k]:i.config.chart.foreColor;X||(X=i.config.chart.foreColor);var K=B.x+this.barLabels.offsetX,H=B.y+this.barLabels.offsetY,Q=o.drawText({x:K,y:H,text:G,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:q.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:k+1}),E!==0&&Q.attr({"transform-origin":"".concat(K," ").concat(H),transform:"rotate(".concat(E," 0 0)")}),C.add(Q)}var se=0;!this.initialAnim||i.globals.resized||i.globals.dataChanged||(se=i.config.chart.animations.speed),i.globals.dataChanged&&(se=i.config.chart.animations.dynamicAnimation.speed),this.animDur=se/(1.2*s.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(N,{centerX:s.centerX,centerY:s.centerY,endAngle:L,startAngle:E,prevEndAngle:I,prevStartAngle:P,size:s.size,i:k,totalItems:2,animBeginArr:this.animBeginArr,dur:se,shouldSetPrevPaths:!0})}return{g:l,elHollow:f,dataLabels:b}}},{key:"drawHollow",value:function(s){var i=new Ve(this.ctx).drawCircle(2*s.size);return i.attr({class:"apexcharts-radialbar-hollow",cx:s.centerX,cy:s.centerY,r:s.size,fill:s.fill}),i}},{key:"drawHollowImage",value:function(s,i,o,r){var a=this.w,l=new zr(this.ctx),c=ue.randomId(),u=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)l.clippedImgArea({width:o,height:o,image:u,patternID:"pattern".concat(a.globals.cuid).concat(c)}),r="url(#pattern".concat(a.globals.cuid).concat(c,")");else{var d=a.config.plotOptions.radialBar.hollow.imageWidth,h=a.config.plotOptions.radialBar.hollow.imageHeight;if(d===void 0&&h===void 0){var f=a.globals.dom.Paper.image(u,function(m){this.move(s.centerX-m.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,s.centerY-m.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});i.add(f)}else{var p=a.globals.dom.Paper.image(u,function(m){this.move(s.centerX-d/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,s.centerY-h/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,h)});i.add(p)}}return r}},{key:"getStrokeWidth",value:function(s){var i=this.w;return s.size*(100-parseInt(i.config.plotOptions.radialBar.hollow.size,10))/100/(s.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(s){var i=parseInt(s.target.getAttribute("rel"),10)-1,o=this.barLabels.onClick,r=this.w;o&&o(r.globals.seriesNames[i],{w:r,seriesIndex:i})}}]),n}(),kyt=function(t){gv(n,Jf);var e=mv(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i){var o=this.w,r=new Ve(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=s,this.seriesRangeStart=o.globals.seriesRangeStart,this.seriesRangeEnd=o.globals.seriesRangeEnd,this.barHelpers.initVariables(s);for(var a=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l<s.length;l++){var c,u,d,h,f=void 0,p=void 0,m=o.globals.comboCharts?i[l]:l,b=this.barHelpers.getGroupIndex(m).columnGroupIndex,_=r.group({class:"apexcharts-series",seriesName:ue.escapeString(o.globals.seriesNames[m]),rel:l+1,"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(_,m),s[l].length>0&&(this.visibleI=this.visibleI+1);var x=0,k=0,C=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],C=m);var S=this.barHelpers.initialPositions();p=S.y,h=S.zeroW,f=S.x,k=S.barWidth,x=S.barHeight,c=S.xDivision,u=S.yDivision,d=S.zeroH;for(var E=r.group({class:"apexcharts-datalabels","data:realIndex":m}),P=r.group({class:"apexcharts-rangebar-goals-markers"}),T=0;T<o.globals.dataPoints;T++){var L=this.barHelpers.getStrokeWidth(l,T,m),I=this.seriesRangeStart[l][T],V=this.seriesRangeEnd[l][T],R=null,N=null,F=null,B={x:f,y:p,strokeWidth:L,elSeries:_},G=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(G=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+x*this.visibleI;var q=(u-x*G)/2;if(o.config.series[l].data[T].x){var X=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:q,barHeight:x,yDivision:u,initPositions:S});x=X.barHeight,F=X.barYPosition}k=(R=this.drawRangeBarPaths(et({indexes:{i:l,j:T,realIndex:m},barHeight:x,barYPosition:F,zeroW:h,yDivision:u,y1:I,y2:V},B))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][T]-o.globals.minX)/this.xRatio-k/2),N=f+k*this.visibleI;var K=(c-k*G)/2;if(o.config.series[l].data[T].x){var H=this.detectOverlappingBars({i:l,j:T,barXPosition:N,srtx:K,barWidth:k,xDivision:c,initPositions:S});k=H.barWidth,N=H.barXPosition}x=(R=this.drawRangeColumnPaths(et({indexes:{i:l,j:T,realIndex:m,translationsIndex:C},barWidth:k,barXPosition:N,zeroH:d,xDivision:c},B))).barHeight}var Q=this.barHelpers.drawGoalLine({barXPosition:R.barXPosition,barYPosition:F,goalX:R.goalX,goalY:R.goalY,barHeight:x,barWidth:k});Q&&P.add(Q),p=R.y,f=R.x;var se=this.barHelpers.getPathFillColor(s,l,T,m);this.renderSeries({realIndex:m,pathFill:se.color,lineFill:se.useRangeColor?se.color:o.globals.stroke.colors[m],j:T,i:l,x:f,y:p,y1:I,y2:V,pathFrom:R.pathFrom,pathTo:R.pathTo,strokeWidth:L,elSeries:_,series:s,barHeight:x,barWidth:k,barXPosition:N,barYPosition:F,columnGroupIndex:b,elDataLabelsWrap:E,elGoalsMarkers:P,visibleSeries:this.visibleI,type:"rangebar"})}a.add(_)}return a}},{key:"detectOverlappingBars",value:function(s){var i=s.i,o=s.j,r=s.barYPosition,a=s.barXPosition,l=s.srty,c=s.srtx,u=s.barHeight,d=s.barWidth,h=s.yDivision,f=s.xDivision,p=s.initPositions,m=this.w,b=[],_=m.config.series[i].data[o].rangeName,x=m.config.series[i].data[o].x,k=Array.isArray(x)?x.join(" "):x,C=m.globals.labels.map(function(E){return Array.isArray(E)?E.join(" "):E}).indexOf(k),S=m.globals.seriesRange[i].findIndex(function(E){return E.x===k&&E.overlaps.length>0});return this.isHorizontal?(r=m.config.plotOptions.bar.rangeBarGroupRows?l+h*C:l+u*this.visibleI+h*C,S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[i][S].overlaps).indexOf(_)>-1&&(r=(u=p.barHeight/b.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+u*(this.visibleI+b.indexOf(_))+h*C)):(C>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*C:c+d*this.visibleI+f*C),S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[i][S].overlaps).indexOf(_)>-1&&(a=(d=p.barWidth/b.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+b.indexOf(_))+f*C)),{barYPosition:r,barXPosition:a,barHeight:u,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(s){var i=s.indexes,o=s.x,r=s.xDivision,a=s.barWidth,l=s.barXPosition,c=s.zeroH,u=this.w,d=i.i,h=i.j,f=i.realIndex,p=i.translationsIndex,m=this.yRatio[p],b=this.getRangeValue(f,h),_=Math.min(b.start,b.end),x=Math.max(b.start,b.end);this.series[d][h]===void 0||this.series[d][h]===null?_=c:(_=c-_/m,x=c-x/m);var k=Math.abs(x-_),C=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:_,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:h,w:u});if(u.globals.isXNumeric){var S=this.getBarXForNumericXAxis({x:o,j:h,realIndex:f,barWidth:a});o=S.x,l=S.barXPosition}else o+=r;return{pathTo:C.pathTo,pathFrom:C.pathFrom,barHeight:k,x:o,y:b.start<0&&b.end<0?_:x,goalY:this.barHelpers.getGoalValues("y",null,c,d,h,p),barXPosition:l}}},{key:"preventBarOverflow",value:function(s){var i=this.w;return s<0&&(s=0),s>i.globals.gridWidth&&(s=i.globals.gridWidth),s}},{key:"drawRangeBarPaths",value:function(s){var i=s.indexes,o=s.y,r=s.y1,a=s.y2,l=s.yDivision,c=s.barHeight,u=s.barYPosition,d=s.zeroW,h=this.w,f=i.realIndex,p=i.j,m=this.preventBarOverflow(d+r/this.invertedYRatio),b=this.preventBarOverflow(d+a/this.invertedYRatio),_=this.getRangeValue(f,p),x=Math.abs(b-m),k=this.barHelpers.getBarpaths({barYPosition:u,barHeight:c,x1:m,x2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:p,w:h});return h.globals.isXNumeric||(o+=l),{pathTo:k.pathTo,pathFrom:k.pathFrom,barWidth:x,x:_.start<0&&_.end<0?m:b,goalX:this.barHelpers.getGoalValues("x",d,null,f,p),y:o}}},{key:"getRangeValue",value:function(s,i){var o=this.w;return{start:o.globals.seriesRangeStart[s][i],end:o.globals.seriesRangeEnd[s][i]}}}]),n}(),Cyt=function(){function t(e){at(this,t),this.w=e.w,this.lineCtx=e}return lt(t,[{key:"sameValueSeriesFix",value:function(e,n){var s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[e]==="gradient")&&new ys(this.lineCtx.ctx,s).seriesHaveSameValues(e)){var i=n[e].slice();i[i.length-1]=i[i.length-1]+1e-6,n[e]=i}return n}},{key:"calculatePoints",value:function(e){var n=e.series,s=e.realIndex,i=e.x,o=e.y,r=e.i,a=e.j,l=e.prevY,c=this.w,u=[],d=[];if(a===0){var h=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;c.globals.isXNumeric&&(h=(c.globals.seriesX[s][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),u.push(h),d.push(ue.isNumber(n[r][0])?l+c.config.markers.offsetY:null),u.push(i+c.config.markers.offsetX),d.push(ue.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null)}else u.push(i+c.config.markers.offsetX),d.push(ue.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null);return{x:u,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var n=e.pathFromLine,s=e.pathFromArea,i=e.realIndex,o=this.w,r=0;r<o.globals.previousPaths.length;r++){var a=o.globals.previousPaths[r];(a.type==="line"||a.type==="area")&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(i,10)&&(a.type==="line"?(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[r].paths[0].d):a.type==="area"&&(this.lineCtx.appendPathFrom=!1,s=o.globals.previousPaths[r].paths[0].d,o.config.stroke.show&&o.globals.previousPaths[r].paths[1]&&(n=o.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:n,pathFromArea:s}}},{key:"determineFirstPrevY",value:function(e){var n,s,i,o=e.i,r=e.realIndex,a=e.series,l=e.prevY,c=e.lineYPosition,u=e.translationsIndex,d=this.w,h=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[r])===null||n===void 0?void 0:n.type)==="bar"||((s=this.w.config.series[r])===null||s===void 0?void 0:s.type)==="column");if(((i=a[o])===null||i===void 0?void 0:i[0])!==void 0)l=(c=h&&o>0?this.lineCtx.prevSeriesY[o-1][0]:this.lineCtx.zeroY)-a[o][0]/this.lineCtx.yRatio[u]+2*(this.lineCtx.isReversed?a[o][0]/this.lineCtx.yRatio[u]:0);else if(h&&o>0&&a[o][0]===void 0){for(var f=o-1;f>=0;f--)if(a[f][0]!==null&&a[f][0]!==void 0){l=c=this.lineCtx.prevSeriesY[f][0];break}}return{prevY:l,lineYPosition:c}}}]),t}(),Syt=function(t){for(var e,n,s,i,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=Q3(h,f),m=1,b=u.length-1;m<b;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=Q3(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)s=Q3(t[l],t[l+1]),Math.abs(s)<1e-6?o[l]=o[l+1]=0:(i=(e=o[l]/s)*e+(n=o[l+1]/s)*n)>9&&(i=3*s/Math.sqrt(i),o[l]=i*e,o[l+1]=i*n);for(var c=0;c<=r;c++)i=(t[Math.min(r,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),a.push([i||0,o[c]*i||0]);return a},$yt=function(t){var e=Syt(t),n=t[1],s=t[0],i=[],o=e[1],r=e[0];i.push(s,[s[0]+r[0],s[1]+r[1],n[0]-o[0],n[1]-o[1],n[0],n[1]]);for(var a=2,l=e.length;a<l;a++){var c=t[a],u=e[a];i.push([c[0]-u[0],c[1]-u[1],c[0],c[1]])}return i},Ayt=function(t,e,n){var s=t.slice(e,n);if(e){if(n-e>1&&s[1].length<6){var i=s[0].length;s[1]=[2*s[0][i-2]-s[0][i-4],2*s[0][i-1]-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s};function Q3(t,e){return(e[1]-t[1])/(e[0]-t[0])}var ex=function(){function t(e,n,s){at(this,t),this.ctx=e,this.w=e.w,this.xyRatios=n,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||s,this.scatter=new sj(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Cyt(this),this.markers=new Op(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return lt(t,[{key:"draw",value:function(e,n,s,i){var o,r=this.w,a=new Ve(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new ys(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=u.getLogSeries(e),this.yRatio=u.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var d=[],h=0;h<e.length;h++){e=this.lineHelpers.sameValueSeriesFix(h,e);var f=r.globals.comboCharts?s[h]:h,p=this.yRatio.length>1?f:0;this._initSerieVariables(e,h,f);var m=[],b=[],_=[],x=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(x=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),_.push(x);var k,C=x,S=void 0,E=C,P=this.zeroY,T=this.zeroY;P=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:e,prevY:P,lineYPosition:0,translationsIndex:p}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[h][0]===null?m.push(null):m.push(P),k=P,l==="rangeArea"&&(S=T=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:T,lineYPosition:0,translationsIndex:p}).prevY,b.push(m[0]!==null?T:null));var L=this._calculatePathsFrom({type:l,series:e,i:h,realIndex:f,translationsIndex:p,prevX:E,prevY:P,prevY2:T}),I=[m[0]],V=[b[0]],R={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x,y:1,pX:C,pY:k,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:s,lineYPosition:0,xArrj:_,yArrj:m,y2Arrj:b,seriesRangeEnd:i},N=this._iterateOverDataPoints(et(et({},R),{},{iterations:l==="rangeArea"?e[h].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var F=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:E,prevY:T}),B=this._iterateOverDataPoints(et(et({},R),{},{series:i,xArrj:[x],yArrj:I,y2Arrj:V,pY:S,areaPaths:N.areaPaths,pathsFrom:F,iterations:i[h].length-1,isRangeStart:!1})),G=N.linePaths.length/2,q=0;q<G;q++)N.linePaths[q]=B.linePaths[q+G]+N.linePaths[q];N.linePaths.splice(G),N.pathFromLine=B.pathFromLine+N.pathFromLine}else N.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:N}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),d.push(this.elSeries)}if(((o=r.config.series[0])===null||o===void 0?void 0:o.zIndex)!==void 0&&d.sort(function(H,Q){return Number(H.node.getAttribute("zIndex"))-Number(Q.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var X=d.length-1;X>=0;X--)c.add(d[X]);else for(var K=0;K<d.length;K++)c.add(d[K]);return c}},{key:"_initSerieVariables",value:function(e,n,s){var i=this.w,o=new Ve(this.ctx);this.xDivision=i.globals.gridWidth/(i.globals.dataPoints-(i.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;var r=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[r]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||i.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",zIndex:i.config.series[s].zIndex!==void 0?i.config.series[s].zIndex:s,seriesName:ue.escapeString(i.globals.seriesNames[s])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":s});var a=e[n].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:n+1,"data:realIndex":s}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var n,s,i,o,r=e.type,a=e.series,l=e.i,c=e.realIndex,u=e.translationsIndex,d=e.prevX,h=e.prevY,f=e.prevY2,p=this.w,m=new Ve(this.ctx);if(a[l][0]===null){for(var b=0;b<a[l].length;b++)if(a[l][b]!==null){d=this.xDivision*b,h=this.zeroY-a[l][b]/this.yRatio[u],n=m.move(d,h),s=m.move(d,this.areaBottomY);break}}else n=m.move(d,h),r==="rangeArea"&&(n=m.move(d,f)+m.line(d,h)),s=m.move(d,this.areaBottomY)+m.line(d,h);if(i=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),o=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),p.globals.previousPaths.length>0){var _=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:o,realIndex:c});i=_.pathFromLine,o=_.pathFromArea}return{prevX:d,prevY:h,linePath:n,areaPath:s,pathFromLine:i,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var n=e.type,s=e.realIndex,i=e.i,o=e.paths,r=this.w,a=new Ve(this.ctx),l=new zr(this.ctx);this.prevSeriesY.push(o.yArrj),r.globals.seriesXvalues[s]=o.xArrj,r.globals.seriesYvalues[s]=o.yArrj;var c=r.config.forecastDataPoints;if(c.count>0&&n!=="rangeArea"){var u=r.globals.seriesXvalues[s][r.globals.seriesXvalues[s].length-c.count-1],d=a.drawRect(u,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var h=a.drawRect(0,0,u,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:s});var f={i,realIndex:s,animationDelay:i,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var p=l.fillPath({seriesNumber:s}),m=0;m<o.areaPaths.length;m++){var b=a.renderPaths(et(et({},f),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[m],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(b)}if(r.config.stroke.show&&!this.pointsChart){var _=null;if(n==="line")_=l.fillPath({seriesNumber:s,i});else if(r.config.stroke.fill.type==="solid")_=r.globals.stroke.colors[s];else{var x=r.config.fill;r.config.fill=r.config.stroke.fill,_=l.fillPath({seriesNumber:s,i}),r.config.fill=x}for(var k=0;k<o.linePaths.length;k++){var C=_;n==="rangeArea"&&(C=l.fillPath({seriesNumber:s}));var S=et(et({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[k],stroke:_,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?C:"none"}),E=a.renderPaths(S);if(this.elSeries.add(E),E.attr("fill-rule","evenodd"),c.count>0&&n!=="rangeArea"){var P=a.renderPaths(S);P.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&P.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(P),P.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),E.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var n,s,i=this,o=e.type,r=e.series,a=e.iterations,l=e.realIndex,c=e.translationsIndex,u=e.i,d=e.x,h=e.y,f=e.pX,p=e.pY,m=e.pathsFrom,b=e.linePaths,_=e.areaPaths,x=e.seriesIndex,k=e.lineYPosition,C=e.xArrj,S=e.yArrj,E=e.y2Arrj,P=e.isRangeStart,T=e.seriesRangeEnd,L=this.w,I=new Ve(this.ctx),V=this.yRatio,R=m.prevY,N=m.linePath,F=m.areaPath,B=m.pathFromLine,G=m.pathFromArea,q=ue.isNumber(L.globals.minYArr[l])?L.globals.minYArr[l]:L.globals.minY;a||(a=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var X=function(ie,re){return re-ie/V[c]+2*(i.isReversed?ie/V[c]:0)},K=h,H=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar"||((s=this.w.config.series[l])===null||s===void 0?void 0:s.type)==="column"),Q=L.config.stroke.curve;Array.isArray(Q)&&(Q=Array.isArray(x)?Q[x[u]]:Q[u]);for(var se,Z=0,ae=0;ae<a&&r[u].length!==0;ae++){var ve=r[u][ae+1]===void 0||r[u][ae+1]===null;if(L.globals.isXNumeric){var ke=L.globals.seriesX[l][ae+1];L.globals.seriesX[l][ae+1]===void 0&&(ke=L.globals.seriesX[l][a-1]),d=(ke-L.globals.minX)/this.xRatio}else d+=this.xDivision;H?u>0&&L.globals.collapsedSeries.length<L.config.series.length-1?k=this.prevSeriesY[function(ie){for(var re=ie;re>0;re--){if(!(L.globals.collapsedSeriesIndices.indexOf((x==null?void 0:x[re])||re)>-1))return re;re--}return 0}(u-1)][ae+1]:k=this.zeroY:k=this.zeroY,ve?h=X(q,k):(h=X(r[u][ae+1],k),o==="rangeArea"&&(K=X(T[u][ae+1],k))),C.push(r[u][ae+1]===null?null:d),!ve||L.config.stroke.curve!=="smooth"&&L.config.stroke.curve!=="monotoneCubic"?(S.push(h),E.push(K)):(S.push(null),E.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:ae,prevY:R}),fe=this._createPaths({type:o,series:r,i:u,realIndex:l,j:ae,x:d,y:h,y2:K,xArrj:C,yArrj:S,y2Arrj:E,pX:f,pY:p,pathState:Z,segmentStartX:se,linePath:N,areaPath:F,linePaths:b,areaPaths:_,curve:Q,isRangeStart:P});_=fe.areaPaths,b=fe.linePaths,f=fe.pX,p=fe.pY,Z=fe.pathState,se=fe.segmentStartX,F=fe.areaPath,N=fe.linePath,!this.appendPathFrom||L.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(B+=I.line(d,this.areaBottomY),G+=I.line(d,this.areaBottomY)),this.handleNullDataPoints(r,oe,u,ae,l),this._handleMarkersAndLabels({type:o,pointsPos:oe,i:u,j:ae,realIndex:l,isRangeStart:P})}return{yArrj:S,xArrj:C,pathFromArea:G,areaPaths:_,pathFromLine:B,linePaths:b,linePath:N,areaPath:F}}},{key:"_handleMarkersAndLabels",value:function(e){var n=e.type,s=e.pointsPos,i=e.isRangeStart,o=e.i,r=e.j,a=e.realIndex,l=this.w,c=new Zf(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:a,pointsPos:s,zRatio:this.zRatio,elParent:this.elPointsMain});else{l.globals.series[o].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var u=this.markers.plotChartMarkers(s,a,r+1);u!==null&&this.elPointsMain.add(u)}var d=c.drawDataLabel({type:n,isRangeStart:i,pos:s,i:a,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var n=e.type,s=e.series,i=e.i;e.realIndex;var o,r=e.j,a=e.x,l=e.y,c=e.xArrj,u=e.yArrj,d=e.y2,h=e.y2Arrj,f=e.pX,p=e.pY,m=e.pathState,b=e.segmentStartX,_=e.linePath,x=e.areaPath,k=e.linePaths,C=e.areaPaths,S=e.curve,E=e.isRangeStart,P=new Ve(this.ctx),T=this.areaBottomY,L=n==="rangeArea",I=n==="rangeArea"&&E;switch(S){case"monotoneCubic":var V=E?u:h;switch(m){case 0:if(V[r+1]===null)break;m=1;case 1:if(!(L?c.length===s[i].length:r===s[i].length-2))break;case 2:var R=E?c:c.slice().reverse(),N=E?V:V.slice().reverse(),F=(o=N,R.map(function(ke,oe){return[ke,o[oe]]}).filter(function(ke){return ke[1]!==null})),B=F.length>1?$yt(F):F,G=[];L&&(I?C=F:G=C.reverse());var q=0,X=0;if(function(ke,oe){for(var fe=function(je){var ee=[],ne=0;return je.forEach(function(pe){pe!==null?ne++:ne>0&&(ee.push(ne),ne=0)}),ne>0&&ee.push(ne),ee}(ke),ie=[],re=0,Se=0;re<fe.length;Se+=fe[re++])ie[re]=Ayt(oe,Se,Se+fe[re]);return ie}(N,B).forEach(function(ke){q++;var oe=function(re){for(var Se="",je=0;je<re.length;je++){var ee=re[je],ne=ee.length;ne>4?(Se+="C".concat(ee[0],", ").concat(ee[1]),Se+=", ".concat(ee[2],", ").concat(ee[3]),Se+=", ".concat(ee[4],", ").concat(ee[5])):ne>2&&(Se+="S".concat(ee[0],", ").concat(ee[1]),Se+=", ".concat(ee[2],", ").concat(ee[3]))}return Se}(ke),fe=X,ie=(X+=ke.length)-1;I?_=P.move(F[fe][0],F[fe][1])+oe:L?_=P.move(G[fe][0],G[fe][1])+P.line(F[fe][0],F[fe][1])+oe+P.line(G[ie][0],G[ie][1]):(_=P.move(F[fe][0],F[fe][1])+oe,x=_+P.line(F[ie][0],T)+P.line(F[fe][0],T)+"z",C.push(x)),k.push(_)}),L&&q>1&&!I){var K=k.slice(q).reverse();k.splice(q),K.forEach(function(ke){return k.push(ke)})}m=0}break;case"smooth":var H=.35*(a-f);if(s[i][r]===null)m=0;else switch(m){case 0:if(b=f,_=I?P.move(f,h[r])+P.line(f,p):P.move(f,p),x=P.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){k.push(_),C.push(x);break}if(m=1,r<s[i].length-2){var Q=P.curve(f+H,p,a-H,l,a,l);_+=Q,x+=Q;break}case 1:if(s[i][r+1]===null)_+=I?P.line(f,d):P.move(f,p),x+=P.line(f,T)+P.line(b,T)+"z",k.push(_),C.push(x),m=-1;else{var se=P.curve(f+H,p,a-H,l,a,l);_+=se,x+=se,r>=s[i].length-2&&(I&&(_+=P.curve(a,l,a,l,a,d)+P.move(a,d)),x+=P.curve(a,l,a,l,a,T)+P.line(b,T)+"z",k.push(_),C.push(x),m=-1)}}f=a,p=l;break;default:var Z=function(ke,oe,fe){var ie=[];switch(ke){case"stepline":ie=P.line(oe,null,"H")+P.line(null,fe,"V");break;case"linestep":ie=P.line(null,fe,"V")+P.line(oe,null,"H");break;case"straight":ie=P.line(oe,fe)}return ie};if(s[i][r]===null)m=0;else switch(m){case 0:if(b=f,_=I?P.move(f,h[r])+P.line(f,p):P.move(f,p),x=P.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){k.push(_),C.push(x);break}if(m=1,r<s[i].length-2){var ae=Z(S,a,l);_+=ae,x+=ae;break}case 1:if(s[i][r+1]===null)_+=I?P.line(f,d):P.move(f,p),x+=P.line(f,T)+P.line(b,T)+"z",k.push(_),C.push(x),m=-1;else{var ve=Z(S,a,l);_+=ve,x+=ve,r>=s[i].length-2&&(I&&(_+=P.line(a,d)),x+=P.line(a,T)+P.line(b,T)+"z",k.push(_),C.push(x),m=-1)}}f=a,p=l}return{linePaths:k,areaPaths:C,pX:f,pY:p,pathState:m,segmentStartX:b,linePath:_,areaPath:x}}},{key:"handleNullDataPoints",value:function(e,n,s,i,o){var r=this.w;if(e[s][i]===null&&r.config.markers.showNullDataPoints||e[s].length===1){var a=this.strokeWidth-r.config.markers.strokeWidth/2;a>0||(a=0);var l=this.markers.plotChartMarkers(n,o,i+1,a,!0);l!==null&&this.elPointsMain.add(l)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(a,l,c,u){this.xoffset=a,this.yoffset=l,this.height=u,this.width=c,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var h,f=[],p=this.xoffset,m=this.yoffset,b=o(d)/this.height,_=o(d)/this.width;if(this.width>=this.height)for(h=0;h<d.length;h++)f.push([p,m,p+b,m+d[h]/b]),m+=d[h]/b;else for(h=0;h<d.length;h++)f.push([p,m,p+d[h]/_,m+_]),p+=d[h]/_;return f},this.cutArea=function(d){var h;if(this.width>=this.height){var f=d/this.height,p=this.width-f;h=new t(this.xoffset+f,this.yoffset,p,this.height)}else{var m=d/this.width,b=this.height-m;h=new t(this.xoffset,this.yoffset+m,this.width,b)}return h}}function e(a,l,c,u,d){u=u===void 0?0:u,d=d===void 0?0:d;var h=n(function(f,p){var m,b=[],_=p/o(f);for(m=0;m<f.length;m++)b[m]=f[m]*_;return b}(a,l*c),[],new t(u,d,l,c),[]);return function(f){var p,m,b=[];for(p=0;p<f.length;p++)for(m=0;m<f[p].length;m++)b.push(f[p][m]);return b}(h)}function n(a,l,c,u){var d,h,f;if(a.length!==0)return d=c.shortestEdge(),function(p,m,b){var _;if(p.length===0)return!0;(_=p.slice()).push(m);var x=s(p,b),k=s(_,b);return x>=k}(l,h=a[0],d)?(l.push(h),n(a.slice(1),l,c,u)):(f=c.cutArea(o(l),u),u.push(c.getCoordinates(l)),n(a,[],f,u)),u;u.push(c.getCoordinates(l))}function s(a,l){var c=Math.min.apply(Math,a),u=Math.max.apply(Math,a),d=o(a);return Math.max(Math.pow(l,2)*u/Math.pow(d,2),Math.pow(d,2)/(Math.pow(l,2)*c))}function i(a){return a&&a.constructor===Array}function o(a){var l,c=0;for(l=0;l<a.length;l++)c+=a[l];return c}function r(a){var l,c=0;if(i(a[0]))for(l=0;l<a.length;l++)c+=r(a[l]);else c=o(a);return c}return function a(l,c,u,d,h){d=d===void 0?0:d,h=h===void 0?0:h;var f,p,m=[],b=[];if(i(l[0])){for(p=0;p<l.length;p++)m[p]=r(l[p]);for(f=e(m,c,u,d,h),p=0;p<l.length;p++)b.push(a(l[p],f[p][2]-f[p][0],f[p][3]-f[p][1],f[p][0],f[p][1]))}else b=e(l,c,u,d,h);return b}}();var Eyt=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new uj(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=new zr(this.ctx),r=i.group({class:"apexcharts-treemap"});if(s.globals.noData)return r;var a=[];return e.forEach(function(l){var c=l.map(function(u){return Math.abs(u)});a.push(c)}),this.negRange=this.helpers.checkColorRange(),s.config.series.forEach(function(l,c){l.data.forEach(function(u){Array.isArray(n.labels[c])||(n.labels[c]=[]),n.labels[c].push(u.x)})}),window.TreemapSquared.generate(a,s.globals.gridWidth,s.globals.gridHeight).forEach(function(l,c){var u=i.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:ue.escapeString(s.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(s.config.chart.dropShadow.enabled){var d=s.config.chart.dropShadow;new ai(n.ctx).dropShadow(r,d,c)}var h=i.group({class:"apexcharts-data-labels"});l.forEach(function(f,p){var m=f[0],b=f[1],_=f[2],x=f[3],k=i.drawRect(m,b,_-m,x-b,s.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,s.config.plotOptions.treemap.useFillColorAsStroke?S:s.globals.stroke.colors[c]);k.attr({cx:m,cy:b,index:c,i:c,j:p,width:_-m,height:x-b});var C=n.helpers.getShadeColor(s.config.chart.type,c,p,n.negRange),S=C.color,E=o.fillPath({color:S,seriesNumber:c,dataPointIndex:p});k.node.classList.add("apexcharts-treemap-rect"),k.attr({fill:E}),n.helpers.addListeners(k);var P={x:m+(_-m)/2,y:b+(x-b)/2,width:0,height:0},T={x:m,y:b,width:_-m,height:x-b};if(s.config.chart.animations.enabled&&!s.globals.dataChanged){var L=1;s.globals.resized||(L=s.config.chart.animations.speed),n.animateTreemap(k,P,T,L)}if(s.globals.dataChanged){var I=1;n.dynamicAnim.enabled&&s.globals.shouldAnimate&&(I=n.dynamicAnim.speed,s.globals.previousPaths[c]&&s.globals.previousPaths[c][p]&&s.globals.previousPaths[c][p].rect&&(P=s.globals.previousPaths[c][p].rect),n.animateTreemap(k,P,T,I))}var V=n.getFontSize(f),R=s.config.dataLabels.formatter(n.labels[c][p],{value:s.globals.series[c][p],seriesIndex:c,dataPointIndex:p,w:s});s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(V=parseInt(s.config.dataLabels.style.fontSize,10),R=n.truncateLabels(R,V,m,b,_,x));var N=null;s.globals.series[c][p]&&(N=n.helpers.calculateDataLabels({text:R,x:(m+_)/2,y:(b+x)/2+n.strokeWidth/2+V/3,i:c,j:p,colorProps:C,fontSize:V,series:e})),s.config.dataLabels.enabled&&N&&n.rotateToFitLabel(N,V,R,m,b,_,x),u.add(k),N!==null&&u.add(N)}),u.add(h),r.add(u)}),r}},{key:"getFontSize",value:function(e){var n=this.w,s=function i(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=i(o[r]);else for(r=0;r<o.length;r++)a+=o[r].length;return a}(this.labels)/function i(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=i(o[r]);else for(r=0;r<o.length;r++)a+=1;return a}(this.labels);return function(i,o){var r=i*o,a=Math.pow(r,.5);return Math.min(a/s,parseInt(n.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,n,s,i,o,r,a){var l=new Ve(this.ctx),c=l.getTextRects(s,n);if(c.width+this.w.config.stroke.width+5>r-i&&c.width<=a-o){var u=l.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(u.x," ").concat(u.y,") translate(").concat(c.height/3,")"))}}},{key:"truncateLabels",value:function(e,n,s,i,o,r){var a=new Ve(this.ctx),l=a.getTextRects(e,n).width+this.w.config.stroke.width+5>o-s&&r-i>o-s?r-i:o-s,c=a.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:n});return e.length!==c.length&&l/n<5?"":c}},{key:"animateTreemap",value:function(e,n,s,i){var o=new Tp(this.ctx);o.animateRect(e,{x:n.x,y:n.y,width:n.width,height:n.height},{x:s.x,y:s.y,width:s.width,height:s.height},i,function(){o.animationCompleted(e)})}}]),t}(),fj=86400,Myt=10/fj,Tyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return lt(t,[{key:"calculateTimeScaleTicks",value:function(e,n){var s=this,i=this.w;if(i.globals.allSeriesCollapsed)return i.globals.labels=[],i.globals.timescaleLabels=[],[];var o=new ti(this.ctx),r=(n-e)/864e5;this.determineInterval(r),i.globals.disableZoomIn=!1,i.globals.disableZoomOut=!1,r<Myt?i.globals.disableZoomIn=!0:r>5e4&&(i.globals.disableZoomOut=!0);var a=o.getTimeUnitsfromTimestamp(e,n,this.utc),l=i.globals.gridWidth/r,c=l/24,u=c/60,d=u/60,h=Math.floor(24*r),f=Math.floor(1440*r),p=Math.floor(r*fj),m=Math.floor(r),b=Math.floor(r/30),_=Math.floor(r/365),x={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},k={firstVal:x,currentMillisecond:x.minMillisecond,currentSecond:x.minSecond,currentMinute:x.minMinute,currentHour:x.minHour,currentMonthDate:x.minDate,currentDate:x.minDate,currentMonth:x.minMonth,currentYear:x.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:u,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:h,numberOfDays:m,numberOfMonths:b,numberOfYears:_};switch(this.tickInterval){case"years":this.generateYearScale(k);break;case"months":case"half_year":this.generateMonthScale(k);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(k);break;case"hours":this.generateHourScale(k);break;case"minutes_fives":case"minutes":this.generateMinuteScale(k);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(k)}var C=this.timeScaleArray.map(function(S){var E={position:S.position,unit:S.unit,year:S.year,day:S.day?S.day:1,hour:S.hour?S.hour:0,month:S.month+1};return S.unit==="month"?et(et({},E),{},{day:1,value:S.value+1}):S.unit==="day"||S.unit==="hour"?et(et({},E),{},{value:S.value}):S.unit==="minute"?et(et({},E),{},{value:S.value,minute:S.value}):S.unit==="second"?et(et({},E),{},{value:S.value,minute:S.minute,second:S.second}):S});return C.filter(function(S){var E=1,P=Math.ceil(i.globals.gridWidth/120),T=S.value;i.config.xaxis.tickAmount!==void 0&&(P=i.config.xaxis.tickAmount),C.length>P&&(E=Math.floor(C.length/P));var L=!1,I=!1;switch(s.tickInterval){case"years":S.unit==="year"&&(L=!0);break;case"half_year":E=7,S.unit==="year"&&(L=!0);break;case"months":E=1,S.unit==="year"&&(L=!0);break;case"months_fortnight":E=15,S.unit!=="year"&&S.unit!=="month"||(L=!0),T===30&&(I=!0);break;case"months_days":E=10,S.unit==="month"&&(L=!0),T===30&&(I=!0);break;case"week_days":E=8,S.unit==="month"&&(L=!0);break;case"days":E=1,S.unit==="month"&&(L=!0);break;case"hours":S.unit==="day"&&(L=!0);break;case"minutes_fives":case"seconds_fives":T%5!=0&&(I=!0);break;case"seconds_tens":T%10!=0&&(I=!0)}if(s.tickInterval==="hours"||s.tickInterval==="minutes_fives"||s.tickInterval==="seconds_tens"||s.tickInterval==="seconds_fives"){if(!I)return!0}else if((T%E==0||L)&&!I)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,n){var s=this.w,i=this.formatDates(e),o=this.removeOverlappingTS(i);s.globals.timescaleLabels=o.slice(),new e_(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var n=24*e,s=60*n;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case s>15:this.tickInterval="minutes_fives";break;case s>5:this.tickInterval="minutes";break;case s>1:this.tickInterval="seconds_tens";break;case 60*s>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var n=e.firstVal,s=e.currentMonth,i=e.currentYear,o=e.daysWidthOnXAxis,r=e.numberOfYears,a=n.minYear,l=0,c=new ti(this.ctx),u="year";if(n.minDate>1||n.minMonth>0){var d=c.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);l=(c.determineDaysOfYear(n.minYear)-d+1)*o,a=n.minYear+1,this.timeScaleArray.push({position:l,value:a,unit:u,year:a,month:ue.monthMod(s+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:i,month:ue.monthMod(s+1)});for(var h=a,f=l,p=0;p<r;p++)h++,f=c.determineDaysOfYear(h-1)*o+f,this.timeScaleArray.push({position:f,value:h,unit:u,year:h,month:1})}},{key:"generateMonthScale",value:function(e){var n=e.firstVal,s=e.currentMonthDate,i=e.currentMonth,o=e.currentYear,r=e.daysWidthOnXAxis,a=e.numberOfMonths,l=i,c=0,u=new ti(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(i+1,n.minYear)-s+1)*r,l=ue.monthMod(i+1);var f=o+h,p=ue.monthMod(l),m=l;l===0&&(d="year",m=f,p=1,f+=h+=1),this.timeScaleArray.push({position:c,value:m,unit:d,year:f,month:p})}else this.timeScaleArray.push({position:c,value:l,unit:d,year:o,month:ue.monthMod(i)});for(var b=l+1,_=c,x=0,k=1;x<a;x++,k++){(b=ue.monthMod(b))===0?(d="year",h+=1):d="month";var C=this._getYear(o,b,h);_=u.determineDaysOfMonths(b,C)*r+_;var S=b===0?C:b;this.timeScaleArray.push({position:_,value:S,unit:d,year:C,month:b===0?1:b}),b++}}},{key:"generateDayScale",value:function(e){var n=e.firstVal,s=e.currentMonth,i=e.currentYear,o=e.hoursWidthOnXAxis,r=e.numberOfDays,a=new ti(this.ctx),l="day",c=n.minDate+1,u=c,d=function(k,C,S){return k>a.determineDaysOfMonths(C+1,S)&&(u=1,l="month",f=C+=1),C},h=(24-n.minHour)*o,f=c,p=d(u,s,i);n.minHour===0&&n.minDate===1?(h=0,f=ue.monthMod(n.minMonth),l="month",u=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(h=0,c=n.minDate,f=c,p=d(u=c,s,i),f!==1&&(l="day")),this.timeScaleArray.push({position:h,value:f,unit:l,year:this._getYear(i,p,0),month:ue.monthMod(p),day:u});for(var m=h,b=0;b<r;b++){l="day",p=d(u+=1,p,this._getYear(i,p,0));var _=this._getYear(i,p,0);m=24*o+m;var x=u===1?ue.monthMod(p):u;this.timeScaleArray.push({position:m,value:x,unit:l,year:_,month:ue.monthMod(p),day:x})}}},{key:"generateHourScale",value:function(e){var n=e.firstVal,s=e.currentDate,i=e.currentMonth,o=e.currentYear,r=e.minutesWidthOnXAxis,a=e.numberOfHours,l=new ti(this.ctx),c="hour",u=function(E,P){return E>l.determineDaysOfMonths(P+1,o)&&(b=1,P+=1),{month:P,date:b}},d=function(E,P){return E>l.determineDaysOfMonths(P+1,o)?P+=1:P},h=60-(n.minMinute+n.minSecond/60),f=h*r,p=n.minHour+1,m=p;h===60&&(f=0,m=p=n.minHour);var b=s;m>=24&&(m=0,c="day",p=b+=1);var _=u(b,i).month;_=d(b,_),p>31&&(p=b=1),this.timeScaleArray.push({position:f,value:p,unit:c,day:b,hour:m,year:o,month:ue.monthMod(_)}),m++;for(var x=f,k=0;k<a;k++){c="hour",m>=24&&(m=0,c="day",_=u(b+=1,_).month,_=d(b,_));var C=this._getYear(o,_,0);x=60*r+x;var S=m===0?b:m;this.timeScaleArray.push({position:x,value:S,unit:c,hour:m,day:b,year:C,month:ue.monthMod(_)}),m++}}},{key:"generateMinuteScale",value:function(e){for(var n=e.currentMillisecond,s=e.currentSecond,i=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.minutesWidthOnXAxis,u=e.secondsWidthOnXAxis,d=e.numberOfMinutes,h=i+1,f=r,p=a,m=l,b=o,_=(60-s-n/1e3)*u,x=0;x<d;x++)h>=60&&(h=0,(b+=1)===24&&(b=0)),this.timeScaleArray.push({position:_,value:h,unit:"minute",hour:b,minute:h,day:f,year:this._getYear(m,p,0),month:ue.monthMod(p)}),_+=c,h++}},{key:"generateSecondScale",value:function(e){for(var n=e.currentMillisecond,s=e.currentSecond,i=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.secondsWidthOnXAxis,u=e.numberOfSeconds,d=s+1,h=i,f=r,p=a,m=l,b=o,_=(1e3-n)/1e3*c,x=0;x<u;x++)d>=60&&(d=0,++h>=60&&(h=0,++b===24&&(b=0))),this.timeScaleArray.push({position:_,value:d,unit:"second",hour:b,minute:h,second:d,day:f,year:this._getYear(m,p,0),month:ue.monthMod(p)}),_+=c,d++}},{key:"createRawDateString",value:function(e,n){var s=e.year;return e.month===0&&(e.month=1),s+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?s+=e.unit==="day"?"-"+("0"+n).slice(-2):"-01":s+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?s+=e.unit==="hour"?"T"+("0"+n).slice(-2):"T00":s+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?s+=":"+("0"+n).slice(-2):s+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?s+=":"+("0"+n).slice(-2):s+=":00",this.utc&&(s+=".000Z"),s}},{key:"formatDates",value:function(e){var n=this,s=this.w;return e.map(function(i){var o=i.value.toString(),r=new ti(n.ctx),a=n.createRawDateString(i,o),l=r.getDate(r.parseDate(a));if(n.utc||(l=r.getDate(r.parseDateWithTimezone(a))),s.config.xaxis.labels.format===void 0){var c="dd MMM",u=s.config.xaxis.labels.datetimeFormatter;i.unit==="year"&&(c=u.year),i.unit==="month"&&(c=u.month),i.unit==="day"&&(c=u.day),i.unit==="hour"&&(c=u.hour),i.unit==="minute"&&(c=u.minute),i.unit==="second"&&(c=u.second),o=r.formatDate(l,c)}else o=r.formatDate(l,s.config.xaxis.labels.format);return{dateString:a,position:i.position,value:o,unit:i.unit,year:i.year,month:i.month}})}},{key:"removeOverlappingTS",value:function(e){var n,s=this,i=new Ve(this.ctx),o=!1;e.length>0&&e[0].value&&e.every(function(l){return l.value.length===e[0].value.length})&&(o=!0,n=i.getTextRects(e[0].value).width);var r=0,a=e.map(function(l,c){if(c>0&&s.w.config.xaxis.labels.hideOverlappingLabels){var u=o?n:i.getTextRects(e[r].value).width,d=e[r].position;return l.position>d+u+10?(r=c,l):null}return l});return a=a.filter(function(l){return l!==null})}},{key:"_getYear",value:function(e,n,s){return e+Math.floor(n/12)+s}}]),t}(),Pyt=function(){function t(e,n){at(this,t),this.ctx=n,this.w=n.w,this.el=e}return lt(t,[{key:"setupElements",value:function(){var e=this.w,n=e.globals,s=e.config,i=s.chart.type;n.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(i),n.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(i),n.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(i)&&s.plotOptions.bar.horizontal,n.chartClass=".apexcharts".concat(n.chartID),n.dom.baseEl=this.el,n.dom.elWrap=document.createElement("div"),Ve.setAttrs(n.dom.elWrap,{id:n.chartClass.substring(1),class:"apexcharts-canvas ".concat(n.chartClass.substring(1))}),this.el.appendChild(n.dom.elWrap),n.dom.Paper=window.SVG().addTo(n.dom.elWrap),n.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(s.chart.offsetX,", ").concat(s.chart.offsetY,")")}),n.dom.Paper.node.style.background=s.theme.mode!=="dark"||s.chart.background?s.theme.mode!=="light"||s.chart.background?s.chart.background:"#fff":"#424242",this.setSVGDimensions(),n.dom.elLegendForeign=document.createElementNS(n.SVGNS,"foreignObject"),Ve.setAttrs(n.dom.elLegendForeign,{x:0,y:0,width:n.svgWidth,height:n.svgHeight}),n.dom.elLegendWrap=document.createElement("div"),n.dom.elLegendWrap.classList.add("apexcharts-legend"),n.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),n.dom.elLegendForeign.appendChild(n.dom.elLegendWrap),n.dom.Paper.node.appendChild(n.dom.elLegendForeign),n.dom.elGraphical=n.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),n.dom.elDefs=n.dom.Paper.defs(),n.dom.Paper.add(n.dom.elGraphical),n.dom.elGraphical.add(n.dom.elDefs)}},{key:"plotChartType",value:function(e,n){var s=this.w,i=this.ctx,o=s.config,r=s.globals,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=o.chart.type||"line",c=null,u=0;r.series.forEach(function(E,P){var T=e[P].type||l;a[T]?(T==="rangeArea"?(a[T].series.push(r.seriesRangeStart[P]),a[T].seriesRangeEnd.push(r.seriesRangeEnd[P])):a[T].series.push(E),a[T].i.push(P),T!=="column"&&T!=="bar"||(s.globals.columnSeries=a.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(T)?c=T:T==="bar"?(a.column.series.push(E),a.column.i.push(P)):console.warn("You have specified an unrecognized series type (".concat(T,").")),l!==T&&T!=="scatter"&&u++}),u>0&&(c&&console.warn("Chart or series type ".concat(c," cannot appear with other chart or series types.")),a.column.series.length>0&&o.plotOptions.bar.horizontal&&(u-=a.column.series.length,a.column={series:[],i:[]},s.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=u>0);var d=new ex(i,n),h=new J3(i,n);i.pie=new hj(i);var f=new xyt(i);i.rangeBar=new kyt(i,n);var p=new wyt(i),m=[];if(r.comboCharts){var b,_,x=new ys(i);if(a.area.series.length>0&&(b=m).push.apply(b,Rs(x.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var k=new RT(i,n);m.push(k.draw(a.column.series,a.column.i))}else i.bar=new Jf(i,n),m.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&m.push(d.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(_=m).push.apply(_,Rs(x.drawSeriesByGroup(a.line,r.lineGroups,"line",d))),a.candlestick.series.length>0&&m.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&m.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&m.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var C=new ex(i,n,!0);m.push(C.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new ex(i,n,!0);m.push(S.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(o.chart.type){case"line":m=d.draw(r.series,"line");break;case"area":m=d.draw(r.series,"area");break;case"bar":o.chart.stacked?m=new RT(i,n).draw(r.series):(i.bar=new Jf(i,n),m=i.bar.draw(r.series));break;case"candlestick":m=new J3(i,n).draw(r.series,"candlestick");break;case"boxPlot":m=new J3(i,n).draw(r.series,o.chart.type);break;case"rangeBar":m=i.rangeBar.draw(r.series);break;case"rangeArea":m=d.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":m=new _yt(i,n).draw(r.series);break;case"treemap":m=new Eyt(i,n).draw(r.series);break;case"pie":case"donut":case"polarArea":m=i.pie.draw(r.series);break;case"radialBar":m=f.draw(r.series);break;case"radar":m=p.draw(r.series);break;default:m=d.draw(r.series)}return m}},{key:"setSVGDimensions",value:function(){var e=this.w,n=e.globals,s=e.config;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto",n.svgWidth=s.chart.width,n.svgHeight=s.chart.height;var i=ue.getDimensions(this.el),o=s.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?ue.isNumber(i[0])&&(i[0].width===0&&(i=ue.getDimensions(this.el.parentNode)),n.svgWidth=i[0]*parseInt(s.chart.width,10)/100):o!=="px"&&o!==""||(n.svgWidth=parseInt(s.chart.width,10));var r=String(s.chart.height).toString().split(/[0-9]+/g).pop();if(n.svgHeight!=="auto"&&n.svgHeight!=="")if(r==="%"){var a=ue.getDimensions(this.el.parentNode);n.svgHeight=a[1]*parseInt(s.chart.height,10)/100}else n.svgHeight=parseInt(s.chart.height,10);else n.svgHeight=n.axisCharts?n.svgWidth/1.61:n.svgWidth/1.2;if(n.svgWidth=Math.max(n.svgWidth,0),n.svgHeight=Math.max(n.svgHeight,0),Ve.setAttrs(n.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),r!=="%"){var l=s.chart.sparkline.enabled?0:n.axisCharts?s.chart.parentHeightOffset:0;n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(n.svgHeight+l,"px")}n.dom.elWrap.style.width="".concat(n.svgWidth,"px"),n.dom.elWrap.style.height="".concat(n.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,n=e.translateY,s=e.translateX;Ve.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(s,", ").concat(n,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,n=e.globals,s=0,i=e.config.chart.sparkline.enabled?1:15;i+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(s=new rj(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var o=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(o&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var a=ue.getBoundingClientRect(o);r=a.bottom;var l=a.bottom-a.top;r=Math.max(2.05*e.globals.radialSize,l)}var c=Math.ceil(r+n.translateY+s+i);n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",c),e.config.chart.height&&String(e.config.chart.height).includes("%")||(n.dom.elWrap.style.height="".concat(c,"px"),Ve.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new Y6(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},s=new nj,i=this.w.globals;s.initGlobalVars(i),i.seriesXvalues=n(),i.seriesYvalues=n()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,n=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new q6(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new q6(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Tyt(this.ctx);var s=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(s)}n=new ys(this.ctx).getCalculatedRatios()}return n}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,n=this.ctx,s=this.w;if(s.config.chart.brush.enabled&&typeof s.config.chart.events.selection!="function"){var i=Array.isArray(s.config.chart.brush.targets)?s.config.chart.brush.targets:[s.config.chart.brush.target];i.forEach(function(o){var r=n.constructor.getChartByID(o);r.w.globals.brushSource=e.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),s.config.chart.events.selection=function(o,r){i.forEach(function(a){n.constructor.getChartByID(a).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),Iyt=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"_updateOptions",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(a){var l=[n.ctx];o&&(l=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(l=[n.ctx],n.ctx.w.globals.isExecCalled=!1),l.forEach(function(c,u){var d=c.w;if(d.globals.shouldAnimate=i,s||(d.globals.resized=!0,d.globals.dataChanged=!0,i&&c.series.getPreviousPaths()),e&&Kf(e)==="object"&&(c.config=new y1(e),e=ys.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=ue.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?ue.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?ue.clone(e.yaxis):[],d.globals.initialConfig=ue.extend({},d.config),d.globals.initialSeries=ue.clone(d.config.series),e.series))){for(var h=0;h<d.globals.collapsedSeriesIndices.length;h++){var f=d.config.series[d.globals.collapsedSeriesIndices[h]];d.globals.collapsedSeries[h].data=d.globals.axisCharts?f.data.slice():f}for(var p=0;p<d.globals.ancillaryCollapsedSeriesIndices.length;p++){var m=d.config.series[d.globals.ancillaryCollapsedSeriesIndices[p]];d.globals.ancillaryCollapsedSeries[p].data=d.globals.axisCharts?m.data.slice():m}c.series.emptyCollapsedSeries(d.config.series)}return c.update(e).then(function(){u===l.length-1&&a(c)})})})}},{key:"_updateSeries",value:function(e,n){var s=this,i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(o){var r,a=s.w;return a.globals.shouldAnimate=n,a.globals.dataChanged=!0,n&&s.ctx.series.getPreviousPaths(),a.globals.axisCharts?((r=e.map(function(l,c){return s._extendSeries(l,c)})).length===0&&(r=[{data:[]}]),a.config.series=r):a.config.series=e.slice(),i&&(a.globals.initialConfig.series=ue.clone(a.config.series),a.globals.initialSeries=ue.clone(a.config.series)),s.ctx.update().then(function(){o(s.ctx)})})}},{key:"_extendSeries",value:function(e,n){var s=this.w,i=s.config.series[n];return et(et({},s.config.series[n]),{},{name:e.name?e.name:i==null?void 0:i.name,color:e.color?e.color:i==null?void 0:i.color,type:e.type?e.type:i==null?void 0:i.type,group:e.group?e.group:i==null?void 0:i.group,hidden:e.hidden!==void 0?e.hidden:i==null?void 0:i.hidden,data:e.data?e.data:i==null?void 0:i.data,zIndex:e.zIndex!==void 0?e.zIndex:n})}},{key:"toggleDataPointSelection",value:function(e,n){var s=this.w,i=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return s.globals.axisCharts?i=s.globals.dom.Paper.findOne("".concat(o," path[j='").concat(n,"'], ").concat(o," circle[j='").concat(n,"'], ").concat(o," rect[j='").concat(n,"']")):n===void 0&&(i=s.globals.dom.Paper.findOne("".concat(o," path[j='").concat(e,"']")),s.config.chart.type!=="pie"&&s.config.chart.type!=="polarArea"&&s.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),i?(new Ve(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var n=this.w;if(["min","max"].forEach(function(i){e.xaxis[i]!==void 0&&(n.config.xaxis[i]=e.xaxis[i],n.globals.lastXAxis[i]=e.xaxis[i])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var s=new v1(e);e=s.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(n,s){e.yaxis[s].min=0,e.yaxis[s].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var n=this,s=this.w,i=s.globals.lastXAxis,o=s.globals.lastYAxis;e&&e.xaxis&&(i=e.xaxis),e&&e.yaxis&&(o=e.yaxis),s.config.xaxis.min=i.min,s.config.xaxis.max=i.max;var r=function(a){o[a]!==void 0&&(s.config.yaxis[a].min=o[a].min,s.config.yaxis[a].max=o[a].max)};s.config.yaxis.map(function(a,l){s.globals.zoomed||o[l]!==void 0?r(l):n.ctx.opts.yaxis[l]!==void 0&&(a.min=n.ctx.opts.yaxis[l].min,a.max=n.ctx.opts.yaxis[l].max)})}}]),t}();(function(){function t(){for(var o=arguments.length>0&&arguments[0]!==d?arguments[0]:[],r=arguments.length>1?arguments[1]:d,a=arguments.length>2?arguments[2]:d,l=arguments.length>3?arguments[3]:d,c=arguments.length>4?arguments[4]:d,u=arguments.length>5?arguments[5]:d,d=arguments.length>6?arguments[6]:d,h=o.slice(r,a||d),f=l.slice(c,u||d),p=0,m={pos:[0,0],start:[0,0]},b={pos:[0,0],start:[0,0]};h[p]=e.call(m,h[p]),f[p]=e.call(b,f[p]),h[p][0]!=f[p][0]||h[p][0]=="M"||h[p][0]=="A"&&(h[p][4]!=f[p][4]||h[p][5]!=f[p][5])?(Array.prototype.splice.apply(h,[p,1].concat(s.call(m,h[p]))),Array.prototype.splice.apply(f,[p,1].concat(s.call(b,f[p])))):(h[p]=n.call(m,h[p]),f[p]=n.call(b,f[p])),!(++p==h.length&&p==f.length);)p==h.length&&h.push(["C",m.pos[0],m.pos[1],m.pos[0],m.pos[1],m.pos[0],m.pos[1]]),p==f.length&&f.push(["C",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.pos[1]]);return{start:h,dest:f}}function e(o){switch(o[0]){case"z":case"Z":o[0]="L",o[1]=this.start[0],o[2]=this.start[1];break;case"H":o[0]="L",o[2]=this.pos[1];break;case"V":o[0]="L",o[2]=o[1],o[1]=this.pos[0];break;case"T":o[0]="Q",o[3]=o[1],o[4]=o[2],o[1]=this.reflection[1],o[2]=this.reflection[0];break;case"S":o[0]="C",o[6]=o[4],o[5]=o[3],o[4]=o[2],o[3]=o[1],o[2]=this.reflection[1],o[1]=this.reflection[0]}return o}function n(o){var r=o.length;return this.pos=[o[r-2],o[r-1]],"SCQT".indexOf(o[0])!=-1&&(this.reflection=[2*this.pos[0]-o[r-4],2*this.pos[1]-o[r-3]]),o}function s(o){var r=[o];switch(o[0]){case"M":return this.pos=this.start=[o[1],o[2]],r;case"L":o[5]=o[3]=o[1],o[6]=o[4]=o[2],o[1]=this.pos[0],o[2]=this.pos[1];break;case"Q":o[6]=o[4],o[5]=o[3],o[4]=1*o[4]/3+2*o[2]/3,o[3]=1*o[3]/3+2*o[1]/3,o[2]=1*this.pos[1]/3+2*o[2]/3,o[1]=1*this.pos[0]/3+2*o[1]/3;break;case"A":r=function(a,l){var c,u,d,h,f,p,m,b,_,x,k,C,S,E,P,T,L,I,V,R,N,F,B,G,q,X,K=Math.abs(l[1]),H=Math.abs(l[2]),Q=l[3]%360,se=l[4],Z=l[5],ae=l[6],ve=l[7],ke=new On(a),oe=new On(ae,ve),fe=[];if(K===0||H===0||ke.x===oe.x&&ke.y===oe.y)return[["C",ke.x,ke.y,oe.x,oe.y,oe.x,oe.y]];for(c=new On((ke.x-oe.x)/2,(ke.y-oe.y)/2).transform(new sn().rotate(Q)),u=c.x*c.x/(K*K)+c.y*c.y/(H*H),u>1&&(K*=u=Math.sqrt(u),H*=u),d=new sn().rotate(Q).scale(1/K,1/H).rotate(-Q),ke=ke.transform(d),oe=oe.transform(d),h=[oe.x-ke.x,oe.y-ke.y],p=h[0]*h[0]+h[1]*h[1],f=Math.sqrt(p),h[0]/=f,h[1]/=f,m=p<4?Math.sqrt(1-p/4):0,se===Z&&(m*=-1),b=new On((oe.x+ke.x)/2+m*-h[1],(oe.y+ke.y)/2+m*h[0]),_=new On(ke.x-b.x,ke.y-b.y),x=new On(oe.x-b.x,oe.y-b.y),k=Math.acos(_.x/Math.sqrt(_.x*_.x+_.y*_.y)),_.y<0&&(k*=-1),C=Math.acos(x.x/Math.sqrt(x.x*x.x+x.y*x.y)),x.y<0&&(C*=-1),Z&&k>C&&(C+=2*Math.PI),!Z&&k<C&&(C-=2*Math.PI),E=Math.ceil(2*Math.abs(k-C)/Math.PI),T=[],L=k,S=(C-k)/E,P=4*Math.tan(S/4)/3,N=0;N<=E;N++)V=Math.cos(L),I=Math.sin(L),R=new On(b.x+V,b.y+I),T[N]=[new On(R.x+P*I,R.y-P*V),R,new On(R.x-P*I,R.y+P*V)],L+=S;for(T[0][0]=T[0][1].clone(),T[T.length-1][2]=T[T.length-1][1].clone(),d=new sn().rotate(Q).scale(K,H).rotate(-Q),N=0,F=T.length;N<F;N++)T[N][0]=T[N][0].transform(d),T[N][1]=T[N][1].transform(d),T[N][2]=T[N][2].transform(d);for(N=1,F=T.length;N<F;N++)B=(R=T[N-1][2]).x,G=R.y,q=(R=T[N][0]).x,X=R.y,ae=(R=T[N][1]).x,ve=R.y,fe.push(["C",B,G,q,X,ae,ve]);return fe}(this.pos,o),o=r[0]}return o[0]="C",this.pos=[o[5],o[6]],this.reflection=[2*o[5]-o[3],2*o[6]-o[4]],r}function i(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(r===!1)return!1;for(var a=r,l=o.length;a<l;++a)if(o[a][0]=="M")return a;return!1}$t(Mr,{morph:function(o,r,a,l,c){for(var u=this.parse(o),d=this.parse(r),h=0,f=0,p=!1,m=!1;h!==!1||f!==!1;){var b;p=i(u,h!==!1&&h+1),m=i(d,f!==!1&&f+1),h===!1&&(h=(b=new Mr(_.start).bbox()).height==0||b.width==0?u.push(u[0])-1:u.push(["M",b.x+b.width/2,b.y+b.height/2])-1),f===!1&&(f=(b=new Mr(_.dest).bbox()).height==0||b.width==0?d.push(d[0])-1:d.push(["M",b.x+b.width/2,b.y+b.height/2])-1);var _=t(u,h,p,d,f,m);u=u.slice(0,h).concat(_.start,p===!1?[]:u.slice(p)),d=d.slice(0,f).concat(_.dest,m===!1?[]:d.slice(m)),h=p!==!1&&h+_.start.length,f=m!==!1&&f+_.dest.length}this._array=u,this.destination=new Mr,this.destination._array=d;var x=this.fromArray(u.map(function(k,C){var S=d[C].map(function(E,P){return P===0?E:l.step(k[P],d[C][P],a,c[C],c)});return S}));return x}})})();const VT=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Lyt{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const n=!e.type.indexOf("mouse");if(n&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(VT(e));const s=(n?"mouseup":"touchend")+".drag";rl(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),rl(window,s,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:n,lastClick:s}=this,i=this.el.point(VT(e)),o=i.x-s.x,r=i.y-s.y;if(!o&&!r)return n;const a=n.x+o,l=n.y+r;this.box=new Hs(a,l,n.w,n.h),this.lastClick=i,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(a,l)}move(e,n){this.el.type==="svg"?Mc.prototype.move.call(this.el,e,n):this.el.move(e,n)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),ar(window,"mousemove.drag"),ar(window,"touchmove.drag"),ar(window,"mouseup.drag"),ar(window,"touchend.drag"),this.init(!0)}}/*!
278 * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
279 * @version 4.0.1
280 * https://github.com/svgdotjs/svg.select.js
281 *
282 * @copyright Ulrich-Matthias Schäfer
283 * @license MIT
284 *
285 * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
286 */function G6(t,e,n,s=null){return function(i){i.preventDefault(),i.stopPropagation();var o=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.fire(t,{x:o,y:r,event:i,index:s,points:n})}}function X6([t,e],{a:n,b:s,c:i,d:o,e:r,f:a}){return[t*n+e*i+r,t*s+e*o+a]}$t(di,{draggable(t=!0){return(this.remember("_draggable")||new Lyt(this)).init(t),this}});let pj=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new Mc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=vv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const s=this.order[e];this.createHandle.call(this,this.selection,t,e,n,s),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+s).on("mousedown.selection touchstart.selection",G6(s,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,n,s){const i=s.at(n-1),o=s[(n+1)%s.length],r=e,a=[r[0]-i[0],r[1]-i[1]],l=[r[0]-o[0],r[1]-o[1]],c=Math.sqrt(a[0]*a[0]+a[1]*a[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[a[0]/c,a[1]/c],h=[l[0]/u,l[1]/u],f=[r[0]-10*d[0],r[1]-10*d[1]],p=[r[0]-10*h[0],r[1]-10*h[1]];t.plot([f,r,p])}updateResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const s=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,n,s)})}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const n=this.getPoint("t");t.get(0).plot(n[0],n[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",G6("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map(n=>X6(n,e)),this.rotationPoint=X6(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:n,y2:s,cx:i,cy:o}=this.el.bbox()){return[[t,n],[i,n],[e,n],[e,o],[e,s],[i,s],[t,s],[t,o]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const FT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof pj?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};/*!
287 * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
288 * @version 2.0.4
289 * https://github.com/svgdotjs/svg.resize.js
290 *
291 * @copyright [object Object]
292 * @license MIT
293 *
294 * BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
295 *//*!
296 * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
297 * @version 4.0.1
298 * https://github.com/svgdotjs/svg.select.js
299 *
300 * @copyright Ulrich-Matthias Schäfer
301 * @license MIT
302 *
303 * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
304 */function K6(t,e,n,s=null){return function(i){i.preventDefault(),i.stopPropagation();var o=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.fire(t,{x:o,y:r,event:i,index:s,points:n})}}function Z6([t,e],{a:n,b:s,c:i,d:o,e:r,f:a}){return[t*n+e*i+r,t*s+e*o+a]}$t(di,{select:FT(pj)}),$t([Ru,Vu,Du],{pointSelect:FT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Mc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=vv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",G6("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>X6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class mj{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Mc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const n=vv();this.observer=new n.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,n){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(n)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,n,s)=>{const i=this.order[n];this.createHandle.call(this,this.selection,e,n,s,i),this.selection.get(n+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",K6(i,this.el,this.handlePoints,n))})}createHandleFn(e){e.polyline()}updateHandleFn(e,n,s,i){const o=i.at(s-1),r=i[(s+1)%i.length],a=n,l=[a[0]-o[0],a[1]-o[1]],c=[a[0]-r[0],a[1]-r[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),h=[l[0]/u,l[1]/u],f=[c[0]/d,c[1]/d],p=[a[0]-10*h[0],a[1]-10*h[1]],m=[a[0]-10*f[0],a[1]-10*f[1]];e.plot([p,a,m])}updateResizeHandles(){this.handlePoints.forEach((e,n,s)=>{const i=this.order[n];this.updateHandle.call(this,this.selection.get(n+1),e,n,s,i)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,n){const s=this.getPoint("t");e.get(0).plot(s[0],s[1],n[0],n[1]),e.get(1).center(n[0],n[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",K6("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),n=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(s=>Z6(s,n)),this.rotationPoint=Z6(this.getRotationPoint(e),n)}getHandlePoints({x:e,x2:n,y:s,y2:i,cx:o,cy:r}=this.el.bbox()){return[[e,s],[o,s],[n,s],[n,r],[n,i],[o,i],[e,i],[e,r]]}getRotationPoint({y:e,cx:n}=this.el.bbox()){return[n,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const NT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof mj?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};$t(di,{select:NT(mj)}),$t([Ru,Vu,Du],{pointSelect:NT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Mc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=vv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",K6("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>Z6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const m0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),BT=t=>{let e=1/0,n=1/0,s=-1/0,i=-1/0;for(let o=0;o<t.length;o++){const r=t[o];e=Math.min(e,r[0]),n=Math.min(n,r[1]),s=Math.max(s,r[0]),i=Math.max(i,r[1])}return new Hs(e,n,s-e,i-n)};class zT{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,n){this.preserveAspectRatio=n.preserveAspectRatio??!1,this.aroundCenter=n.aroundCenter??!1,this.grid=n.grid??0,this.degree=n.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:n,index:s,points:i}=e.detail,o=!n.type.indexOf("mouse");if(o&&(n.which||n.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(m0(n)),this.index=s,this.points=i.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?rl(window,r,this.movePoint):e.type==="rot"?rl(window,r,this.rotate):rl(window,r,this.resize),rl(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(m0(e)));let s=n.x-this.startPoint.x,i=n.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(s*=2,i*=2);const o=this.box.x+s,r=this.box.y+i,a=this.box.x2+s,l=this.box.y2+i;let c=new Hs(this.box);if(this.eventType.includes("l")&&(c.x=Math.min(o,this.box.x2),c.x2=Math.max(o,this.box.x2)),this.eventType.includes("r")&&(c.x=Math.min(a,this.box.x),c.x2=Math.max(a,this.box.x)),this.eventType.includes("t")&&(c.y=Math.min(r,this.box.y2),c.y2=Math.max(r,this.box.y2)),this.eventType.includes("b")&&(c.y=Math.min(l,this.box.y),c.y2=Math.max(l,this.box.y)),c.width=c.x2-c.x,c.height=c.y2-c.y,this.preserveAspectRatio){const u=c.width/this.box.width,d=c.height/this.box.height,h=["lt","t","rt","r","rb","b","lb","l"],f=(h.indexOf(this.eventType)+4)%h.length,p=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[f];let m=this.eventType.includes("t")||this.eventType.includes("b")?d:u;m=this.eventType.length===2?Math.max(u,d):m,c=function(b,_,x){const k=[[b.x,b.y],[b.x+b.width,b.y],[b.x+b.width,b.y+b.height],[b.x,b.y+b.height]].map(([C,S])=>{const E=C-_[0],P=(S-_[1])*x;return[E*x+_[0],P+_[1]]});return BT(k)}(this.box,p,m)}this.el.dispatch("resize",{box:new Hs(c),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(c.width,c.height).move(c.x,c.y)}movePoint(e){this.lastEvent=e;const{x:n,y:s}=this.snapToGrid(this.el.point(m0(e))),i=this.el.array().slice();i[this.index]=[n,s],this.el.dispatch("resize",{box:BT(i),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(i)}rotate(e){this.lastEvent=e;const n=this.startPoint,s=this.el.point(m0(e)),{cx:i,cy:o}=this.box,r=n.x-i,a=n.y-o,l=s.x-i,c=s.y-o,u=Math.sqrt(r*r+a*a)*Math.sqrt(l*l+c*c);if(u===0)return;let d=Math.acos((r*l+a*c)/u)/Math.PI*180;if(!d)return;s.x<n.x&&(d=-d);const h=new sn(this.el),{x:f,y:p}=new On(i,o).transformO(h),{rotate:m}=h.decompose(),b=this.snapToAngle(m+d)-m;this.el.dispatch("resize",{box:this.box,angle:b,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(h.rotateO(b,f,p))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",ar(window,"mousemove.resize touchmove.resize"),ar(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}$t(di,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof zT?(n=new t(this),t=!0):n=new zT(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=G0t),window.Apex===void 0&&(window.Apex={});var HT=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new Tp(this.ctx),this.ctx.axes=new iyt(this.ctx),this.ctx.core=new Pyt(this.ctx.el,this.ctx),this.ctx.config=new y1({}),this.ctx.data=new NS(this.ctx),this.ctx.grid=new ij(this.ctx),this.ctx.graphics=new Ve(this.ctx),this.ctx.coreUtils=new ys(this.ctx),this.ctx.crosshairs=new q6(this.ctx),this.ctx.events=new nyt(this.ctx),this.ctx.exports=new Qb(this.ctx),this.ctx.fill=new zr(this.ctx),this.ctx.localization=new syt(this.ctx),this.ctx.options=new $u,this.ctx.responsive=new oyt(this.ctx),this.ctx.series=new hr(this.ctx),this.ctx.theme=new ryt(this.ctx),this.ctx.formatters=new _v(this.ctx),this.ctx.titleSubtitle=new ayt(this.ctx),this.ctx.legend=new rj(this.ctx),this.ctx.toolbar=new aj(this.ctx),this.ctx.tooltip=new DT(this.ctx),this.ctx.dimensions=new e_(this.ctx),this.ctx.updateHelpers=new Iyt(this.ctx),this.ctx.zoomPanSelection=new fyt(this.ctx),this.ctx.w.globals.tooltip=new DT(this.ctx)}}]),t}(),UT=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"clear",value:function(e){var n=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var n=this,s=e.isUpdating,i=this.w.globals.dom.Paper.node;i.parentNode&&i.parentNode.parentNode&&!s&&(i.parentNode.parentNode.style.minHeight="unset");var o=this.w.globals.dom.baseEl;o&&this.ctx.eventList.forEach(function(a){o.removeEventListener(a,n.ctx.events.documentEvent)});var r=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectBarMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}(),tx=new WeakMap,Oyt=function(){function t(e,n){at(this,t),this.opts=n,this.ctx=this,this.w=new tyt(n).init(),this.el=e,this.w.globals.cuid=ue.randomId(),this.w.globals.chartID=this.w.config.chart.id?ue.escapeString(this.w.config.chart.id):this.w.globals.cuid,new HT(this).initModules(),this.create=ue.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return lt(t,[{key:"render",value:function(){var e=this;return new Promise(function(n,s){if(ue.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var i=e.w.config.chart.events.beforeMount;typeof i=="function"&&i(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(h,f){var p=!1;if(h.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var m=h.getBoundingClientRect();h.style.display!=="none"&&m.width!==0||(p=!0)}var b=new ResizeObserver(function(_){p&&f.call(h,_),p=!0});h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(h.children).forEach(function(_){return b.observe(_)}):b.observe(h),tx.set(f,b)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=ue.is("ShadowRoot",o),a=e.el.ownerDocument,l=r?o.getElementById("apexcharts-css"):a.getElementById("apexcharts-css");if(!l){var c;(l=document.createElement("style")).id="apexcharts-css",l.textContent=`@keyframes opaque {
305 0% {
306 opacity: 0
307 }
308
309 to {
310 opacity: 1
311 }
312 }
313
314 @keyframes resizeanim {
315
316 0%,
317 to {
318 opacity: 0
319 }
320 }
321
322 .apexcharts-canvas {
323 position: relative;
324 direction: ltr !important;
325 user-select: none
326 }
327
328 .apexcharts-canvas ::-webkit-scrollbar {
329 -webkit-appearance: none;
330 width: 6px
331 }
332
333 .apexcharts-canvas ::-webkit-scrollbar-thumb {
334 border-radius: 4px;
335 background-color: rgba(0, 0, 0, .5);
336 box-shadow: 0 0 1px rgba(255, 255, 255, .5);
337 -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
338 }
339
340 .apexcharts-inner {
341 position: relative
342 }
343
344 .apexcharts-text tspan {
345 font-family: inherit
346 }
347
348 rect.legend-mouseover-inactive,
349 .legend-mouseover-inactive rect,
350 .legend-mouseover-inactive path,
351 .legend-mouseover-inactive circle,
352 .legend-mouseover-inactive line,
353 .legend-mouseover-inactive text.apexcharts-yaxis-title-text,
354 .legend-mouseover-inactive text.apexcharts-yaxis-label {
355 transition: .15s ease all;
356 opacity: .2
357 }
358
359 .apexcharts-legend-text {
360 padding-left: 15px;
361 margin-left: -15px;
362 }
363
364 .apexcharts-series-collapsed {
365 opacity: 0
366 }
367
368 .apexcharts-tooltip {
369 border-radius: 5px;
370 box-shadow: 2px 2px 6px -4px #999;
371 cursor: default;
372 font-size: 14px;
373 left: 62px;
374 opacity: 0;
375 pointer-events: none;
376 position: absolute;
377 top: 20px;
378 display: flex;
379 flex-direction: column;
380 overflow: hidden;
381 white-space: nowrap;
382 z-index: 12;
383 transition: .15s ease all
384 }
385
386 .apexcharts-tooltip.apexcharts-active {
387 opacity: 1;
388 transition: .15s ease all
389 }
390
391 .apexcharts-tooltip.apexcharts-theme-light {
392 border: 1px solid #e3e3e3;
393 background: rgba(255, 255, 255, .96)
394 }
395
396 .apexcharts-tooltip.apexcharts-theme-dark {
397 color: #fff;
398 background: rgba(30, 30, 30, .8)
399 }
400
401 .apexcharts-tooltip * {
402 font-family: inherit
403 }
404
405 .apexcharts-tooltip-title {
406 padding: 6px;
407 font-size: 15px;
408 margin-bottom: 4px
409 }
410
411 .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
412 background: #eceff1;
413 border-bottom: 1px solid #ddd
414 }
415
416 .apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
417 background: rgba(0, 0, 0, .7);
418 border-bottom: 1px solid #333
419 }
420
421 .apexcharts-tooltip-text-goals-value,
422 .apexcharts-tooltip-text-y-value,
423 .apexcharts-tooltip-text-z-value {
424 display: inline-block;
425 margin-left: 5px;
426 font-weight: 600
427 }
428
429 .apexcharts-tooltip-text-goals-label:empty,
430 .apexcharts-tooltip-text-goals-value:empty,
431 .apexcharts-tooltip-text-y-label:empty,
432 .apexcharts-tooltip-text-y-value:empty,
433 .apexcharts-tooltip-text-z-value:empty,
434 .apexcharts-tooltip-title:empty {
435 display: none
436 }
437
438 .apexcharts-tooltip-text-goals-label,
439 .apexcharts-tooltip-text-goals-value {
440 padding: 6px 0 5px
441 }
442
443 .apexcharts-tooltip-goals-group,
444 .apexcharts-tooltip-text-goals-label,
445 .apexcharts-tooltip-text-goals-value {
446 display: flex
447 }
448
449 .apexcharts-tooltip-text-goals-label:not(:empty),
450 .apexcharts-tooltip-text-goals-value:not(:empty) {
451 margin-top: -6px
452 }
453
454 .apexcharts-tooltip-marker {
455 width: 12px;
456 height: 12px;
457 position: relative;
458 top: 0;
459 margin-right: 10px;
460 border-radius: 50%
461 }
462
463 .apexcharts-tooltip-series-group {
464 padding: 0 10px;
465 display: none;
466 text-align: left;
467 justify-content: left;
468 align-items: center
469 }
470
471 .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
472 opacity: 1
473 }
474
475 .apexcharts-tooltip-series-group.apexcharts-active,
476 .apexcharts-tooltip-series-group:last-child {
477 padding-bottom: 4px
478 }
479
480 .apexcharts-tooltip-y-group {
481 padding: 6px 0 5px
482 }
483
484 .apexcharts-custom-tooltip,
485 .apexcharts-tooltip-box {
486 padding: 4px 8px
487 }
488
489 .apexcharts-tooltip-boxPlot {
490 display: flex;
491 flex-direction: column-reverse
492 }
493
494 .apexcharts-tooltip-box>div {
495 margin: 4px 0
496 }
497
498 .apexcharts-tooltip-box span.value {
499 font-weight: 700
500 }
501
502 .apexcharts-tooltip-rangebar {
503 padding: 5px 8px
504 }
505
506 .apexcharts-tooltip-rangebar .category {
507 font-weight: 600;
508 color: #777
509 }
510
511 .apexcharts-tooltip-rangebar .series-name {
512 font-weight: 700;
513 display: block;
514 margin-bottom: 5px
515 }
516
517 .apexcharts-xaxistooltip,
518 .apexcharts-yaxistooltip {
519 opacity: 0;
520 pointer-events: none;
521 color: #373d3f;
522 font-size: 13px;
523 text-align: center;
524 border-radius: 2px;
525 position: absolute;
526 z-index: 10;
527 background: #eceff1;
528 border: 1px solid #90a4ae
529 }
530
531 .apexcharts-xaxistooltip {
532 padding: 9px 10px;
533 transition: .15s ease all
534 }
535
536 .apexcharts-xaxistooltip.apexcharts-theme-dark {
537 background: rgba(0, 0, 0, .7);
538 border: 1px solid rgba(0, 0, 0, .5);
539 color: #fff
540 }
541
542 .apexcharts-xaxistooltip:after,
543 .apexcharts-xaxistooltip:before {
544 left: 50%;
545 border: solid transparent;
546 content: " ";
547 height: 0;
548 width: 0;
549 position: absolute;
550 pointer-events: none
551 }
552
553 .apexcharts-xaxistooltip:after {
554 border-color: transparent;
555 border-width: 6px;
556 margin-left: -6px
557 }
558
559 .apexcharts-xaxistooltip:before {
560 border-color: transparent;
561 border-width: 7px;
562 margin-left: -7px
563 }
564
565 .apexcharts-xaxistooltip-bottom:after,
566 .apexcharts-xaxistooltip-bottom:before {
567 bottom: 100%
568 }
569
570 .apexcharts-xaxistooltip-top:after,
571 .apexcharts-xaxistooltip-top:before {
572 top: 100%
573 }
574
575 .apexcharts-xaxistooltip-bottom:after {
576 border-bottom-color: #eceff1
577 }
578
579 .apexcharts-xaxistooltip-bottom:before {
580 border-bottom-color: #90a4ae
581 }
582
583 .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
584 .apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
585 border-bottom-color: rgba(0, 0, 0, .5)
586 }
587
588 .apexcharts-xaxistooltip-top:after {
589 border-top-color: #eceff1
590 }
591
592 .apexcharts-xaxistooltip-top:before {
593 border-top-color: #90a4ae
594 }
595
596 .apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
597 .apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
598 border-top-color: rgba(0, 0, 0, .5)
599 }
600
601 .apexcharts-xaxistooltip.apexcharts-active {
602 opacity: 1;
603 transition: .15s ease all
604 }
605
606 .apexcharts-yaxistooltip {
607 padding: 4px 10px
608 }
609
610 .apexcharts-yaxistooltip.apexcharts-theme-dark {
611 background: rgba(0, 0, 0, .7);
612 border: 1px solid rgba(0, 0, 0, .5);
613 color: #fff
614 }
615
616 .apexcharts-yaxistooltip:after,
617 .apexcharts-yaxistooltip:before {
618 top: 50%;
619 border: solid transparent;
620 content: " ";
621 height: 0;
622 width: 0;
623 position: absolute;
624 pointer-events: none
625 }
626
627 .apexcharts-yaxistooltip:after {
628 border-color: transparent;
629 border-width: 6px;
630 margin-top: -6px
631 }
632
633 .apexcharts-yaxistooltip:before {
634 border-color: transparent;
635 border-width: 7px;
636 margin-top: -7px
637 }
638
639 .apexcharts-yaxistooltip-left:after,
640 .apexcharts-yaxistooltip-left:before {
641 left: 100%
642 }
643
644 .apexcharts-yaxistooltip-right:after,
645 .apexcharts-yaxistooltip-right:before {
646 right: 100%
647 }
648
649 .apexcharts-yaxistooltip-left:after {
650 border-left-color: #eceff1
651 }
652
653 .apexcharts-yaxistooltip-left:before {
654 border-left-color: #90a4ae
655 }
656
657 .apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
658 .apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
659 border-left-color: rgba(0, 0, 0, .5)
660 }
661
662 .apexcharts-yaxistooltip-right:after {
663 border-right-color: #eceff1
664 }
665
666 .apexcharts-yaxistooltip-right:before {
667 border-right-color: #90a4ae
668 }
669
670 .apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
671 .apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
672 border-right-color: rgba(0, 0, 0, .5)
673 }
674
675 .apexcharts-yaxistooltip.apexcharts-active {
676 opacity: 1
677 }
678
679 .apexcharts-yaxistooltip-hidden {
680 display: none
681 }
682
683 .apexcharts-xcrosshairs,
684 .apexcharts-ycrosshairs {
685 pointer-events: none;
686 opacity: 0;
687 transition: .15s ease all
688 }
689
690 .apexcharts-xcrosshairs.apexcharts-active,
691 .apexcharts-ycrosshairs.apexcharts-active {
692 opacity: 1;
693 transition: .15s ease all
694 }
695
696 .apexcharts-ycrosshairs-hidden {
697 opacity: 0
698 }
699
700 .apexcharts-selection-rect {
701 cursor: move
702 }
703
704 .svg_select_shape {
705 stroke-width: 1;
706 stroke-dasharray: 10 10;
707 stroke: black;
708 stroke-opacity: 0.1;
709 pointer-events: none;
710 fill: none;
711 }
712
713 .svg_select_handle {
714 stroke-width: 3;
715 stroke: black;
716 fill: none;
717 }
718
719 .svg_select_handle_r {
720 cursor: e-resize;
721 }
722
723 .svg_select_handle_l {
724 cursor: w-resize;
725 }
726
727 .apexcharts-svg.apexcharts-zoomable.hovering-zoom {
728 cursor: crosshair
729 }
730
731 .apexcharts-svg.apexcharts-zoomable.hovering-pan {
732 cursor: move
733 }
734
735 .apexcharts-menu-icon,
736 .apexcharts-pan-icon,
737 .apexcharts-reset-icon,
738 .apexcharts-selection-icon,
739 .apexcharts-toolbar-custom-icon,
740 .apexcharts-zoom-icon,
741 .apexcharts-zoomin-icon,
742 .apexcharts-zoomout-icon {
743 cursor: pointer;
744 width: 20px;
745 height: 20px;
746 line-height: 24px;
747 color: #6e8192;
748 text-align: center
749 }
750
751 .apexcharts-menu-icon svg,
752 .apexcharts-reset-icon svg,
753 .apexcharts-zoom-icon svg,
754 .apexcharts-zoomin-icon svg,
755 .apexcharts-zoomout-icon svg {
756 fill: #6e8192
757 }
758
759 .apexcharts-selection-icon svg {
760 fill: #444;
761 transform: scale(.76)
762 }
763
764 .apexcharts-theme-dark .apexcharts-menu-icon svg,
765 .apexcharts-theme-dark .apexcharts-pan-icon svg,
766 .apexcharts-theme-dark .apexcharts-reset-icon svg,
767 .apexcharts-theme-dark .apexcharts-selection-icon svg,
768 .apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
769 .apexcharts-theme-dark .apexcharts-zoom-icon svg,
770 .apexcharts-theme-dark .apexcharts-zoomin-icon svg,
771 .apexcharts-theme-dark .apexcharts-zoomout-icon svg {
772 fill: #f3f4f5
773 }
774
775 .apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
776 .apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
777 .apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
778 fill: #008ffb
779 }
780
781 .apexcharts-theme-light .apexcharts-menu-icon:hover svg,
782 .apexcharts-theme-light .apexcharts-reset-icon:hover svg,
783 .apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
784 .apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
785 .apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
786 .apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
787 fill: #333
788 }
789
790 .apexcharts-menu-icon,
791 .apexcharts-selection-icon {
792 position: relative
793 }
794
795 .apexcharts-reset-icon {
796 margin-left: 5px
797 }
798
799 .apexcharts-menu-icon,
800 .apexcharts-reset-icon,
801 .apexcharts-zoom-icon {
802 transform: scale(.85)
803 }
804
805 .apexcharts-zoomin-icon,
806 .apexcharts-zoomout-icon {
807 transform: scale(.7)
808 }
809
810 .apexcharts-zoomout-icon {
811 margin-right: 3px
812 }
813
814 .apexcharts-pan-icon {
815 transform: scale(.62);
816 position: relative;
817 left: 1px;
818 top: 0
819 }
820
821 .apexcharts-pan-icon svg {
822 fill: #fff;
823 stroke: #6e8192;
824 stroke-width: 2
825 }
826
827 .apexcharts-pan-icon.apexcharts-selected svg {
828 stroke: #008ffb
829 }
830
831 .apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
832 stroke: #333
833 }
834
835 .apexcharts-toolbar {
836 position: absolute;
837 z-index: 11;
838 max-width: 176px;
839 text-align: right;
840 border-radius: 3px;
841 padding: 0 6px 2px;
842 display: flex;
843 justify-content: space-between;
844 align-items: center
845 }
846
847 .apexcharts-menu {
848 background: #fff;
849 position: absolute;
850 top: 100%;
851 border: 1px solid #ddd;
852 border-radius: 3px;
853 padding: 3px;
854 right: 10px;
855 opacity: 0;
856 min-width: 110px;
857 transition: .15s ease all;
858 pointer-events: none
859 }
860
861 .apexcharts-menu.apexcharts-menu-open {
862 opacity: 1;
863 pointer-events: all;
864 transition: .15s ease all
865 }
866
867 .apexcharts-menu-item {
868 padding: 6px 7px;
869 font-size: 12px;
870 cursor: pointer
871 }
872
873 .apexcharts-theme-light .apexcharts-menu-item:hover {
874 background: #eee
875 }
876
877 .apexcharts-theme-dark .apexcharts-menu {
878 background: rgba(0, 0, 0, .7);
879 color: #fff
880 }
881
882 @media screen and (min-width:768px) {
883 .apexcharts-canvas:hover .apexcharts-toolbar {
884 opacity: 1
885 }
886 }
887
888 .apexcharts-canvas .apexcharts-element-hidden,
889 .apexcharts-datalabel.apexcharts-element-hidden,
890 .apexcharts-hide .apexcharts-series-points {
891 opacity: 0;
892 }
893
894 .apexcharts-hidden-element-shown {
895 opacity: 1;
896 transition: 0.25s ease all;
897 }
898
899 .apexcharts-datalabel,
900 .apexcharts-datalabel-label,
901 .apexcharts-datalabel-value,
902 .apexcharts-datalabels,
903 .apexcharts-pie-label {
904 cursor: default;
905 pointer-events: none
906 }
907
908 .apexcharts-pie-label-delay {
909 opacity: 0;
910 animation-name: opaque;
911 animation-duration: .3s;
912 animation-fill-mode: forwards;
913 animation-timing-function: ease
914 }
915
916 .apexcharts-radialbar-label {
917 cursor: pointer;
918 }
919
920 .apexcharts-annotation-rect,
921 .apexcharts-area-series .apexcharts-area,
922 .apexcharts-gridline,
923 .apexcharts-line,
924 .apexcharts-point-annotation-label,
925 .apexcharts-radar-series path:not(.apexcharts-marker),
926 .apexcharts-radar-series polygon,
927 .apexcharts-toolbar svg,
928 .apexcharts-tooltip .apexcharts-marker,
929 .apexcharts-xaxis-annotation-label,
930 .apexcharts-yaxis-annotation-label,
931 .apexcharts-zoom-rect,
932 .no-pointer-events {
933 pointer-events: none
934 }
935
936 .apexcharts-tooltip-active .apexcharts-marker {
937 transition: .15s ease all
938 }
939
940 .resize-triggers {
941 animation: 1ms resizeanim;
942 visibility: hidden;
943 opacity: 0;
944 height: 100%;
945 width: 100%;
946 overflow: hidden
947 }
948
949 .contract-trigger:before,
950 .resize-triggers,
951 .resize-triggers>div {
952 content: " ";
953 display: block;
954 position: absolute;
955 top: 0;
956 left: 0
957 }
958
959 .resize-triggers>div {
960 height: 100%;
961 width: 100%;
962 background: #eee;
963 overflow: auto
964 }
965
966 .contract-trigger:before {
967 overflow: hidden;
968 width: 200%;
969 height: 200%
970 }
971
972 .apexcharts-bar-goals-markers {
973 pointer-events: none
974 }
975
976 .apexcharts-bar-shadows {
977 pointer-events: none
978 }
979
980 .apexcharts-rangebar-goals-markers {
981 pointer-events: none
982 }`;var u=((c=e.opts.chart)===null||c===void 0?void 0:c.nonce)||e.w.config.chart.nonce;u&&l.setAttribute("nonce",u),r?o.prepend(l):a.head.appendChild(l)}var d=e.create(e.w.config.series,{});if(!d)return n(e);e.mount(d).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),n(d)}).catch(function(h){s(h)})}else s(new Error("Element not found"))})}},{key:"create",value:function(e,n){var s=this,i=this.w;new HT(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!ue.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),i.config.xaxis.convertedCatToNumeric&&new v1(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),i.config.chart.type==="treemap"&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),o.svgWidth===0)return o.animationEnded=!0,null;var r=e;e.forEach(function(h,f){h.hidden&&(r=s.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});var a=ys.checkComboSeries(r,i.config.chart.type);o.comboCharts=a.comboCharts,o.comboBarCount=a.comboBarCount;var l=r.every(function(h){return h.data&&h.data.length===0});(r.length===0||l&&o.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Op(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),o.noData&&o.collapsedSeries.length!==o.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),o.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new ys(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new Zf(this);return d.bringForward(),i.config.dataLabels.background.enabled&&d.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:u,xyRatios:c,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=this,i=s.w;return new Promise(function(o,r){if(s.el===null)return r(new Error("Not enough data to display or target element not found"));(n===null||i.globals.allSeriesCollapsed)&&s.series.handleNoData(),s.grid=new ij(s);var a,l,c=s.grid.drawGrid();if(s.annotations=new eyt(s),s.annotations.drawImageAnnos(),s.annotations.drawTextAnnos(),i.config.grid.position==="back"&&(c&&i.globals.dom.elGraphical.add(c.el),c!=null&&(a=c.elGridBorders)!==null&&a!==void 0&&a.node&&i.globals.dom.elGraphical.add(c.elGridBorders)),Array.isArray(n.elGraph))for(var u=0;u<n.elGraph.length;u++)i.globals.dom.elGraphical.add(n.elGraph[u]);else i.globals.dom.elGraphical.add(n.elGraph);i.config.grid.position==="front"&&(c&&i.globals.dom.elGraphical.add(c.el),c!=null&&(l=c.elGridBorders)!==null&&l!==void 0&&l.node&&i.globals.dom.elGraphical.add(c.elGridBorders)),i.config.xaxis.crosshairs.position==="front"&&s.crosshairs.drawXCrosshairs(),i.config.yaxis[0].crosshairs.position==="front"&&s.crosshairs.drawYCrosshairs(),i.config.chart.type!=="treemap"&&s.axes.drawAxis(i.config.chart.type,c);var d=new b1(e.ctx,c),h=new BS(e.ctx,c);if(c!==null&&(d.xAxisLabelCorrections(c.xAxisTickWidth),h.setYAxisTextAlignments(),i.config.yaxis.map(function(p,m){i.globals.ignoreYAxisIndexes.indexOf(m)===-1&&h.yAxisTitleRotate(m,p.opposite)})),s.annotations.drawAxesAnnotations(),!i.globals.noData){if(i.config.tooltip.enabled&&!i.globals.noData&&s.w.globals.tooltip.drawTooltip(n.xyRatios),i.globals.axisCharts&&(i.globals.isXNumeric||i.config.xaxis.convertedCatToNumeric||i.globals.isRangeBar))(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&s.zoomPanSelection.init({xyRatios:n.xyRatios});else{var f=i.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(p){f[p]=!1})}i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed&&s.toolbar.createToolbar()}i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach(function(p){p.method(p.params,!1,p.context)}),i.globals.axisCharts||i.globals.noData||s.core.resizeNonAxisCharts(),o(s)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(n,s){var i=tx.get(s);i&&(i.disconnect(),tx.delete(s))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,s){n.id===ue.escapeString(e)&&Apex._chartInstances.splice(s,1)}),new UT(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(l,c){return n.updateHelpers._extendSeries(l,c)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,s,i,o,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,n,s)}},{key:"appendSeries",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=this.w.config.series.slice();return i.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,n,s)}},{key:"appendData",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=this;s.w.globals.dataChanged=!0,s.series.getPreviousPaths();for(var i=s.w.config.series.slice(),o=0;o<i.length;o++)if(e[o]!==null&&e[o]!==void 0)for(var r=0;r<e[o].data.length;r++)i[o].data.push(e[o].data[r]);return s.w.config.series=i,n&&(s.w.globals.initialSeries=ue.clone(s.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(s,i){new UT(n.ctx).clear({isUpdating:!0});var o=n.create(n.w.config.series,e);if(!o)return s(n);n.mount(o).then(function(){typeof n.w.config.chart.events.updated=="function"&&n.w.config.chart.events.updated(n,n.w),n.events.fireEvent("updated",[n,n.w]),n.w.globals.isDirty=!0,s(n)}).catch(function(r){i(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),n=[this];return e.length&&(n=[],e.forEach(function(s){n.push(s)})),n}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(n){if(n.group)return!0}).map(function(n){return e.w.config.chart.group===n.group?n.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,n){return this.series.toggleSeriesOnHover(e,n)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,n)}},{key:"addEventListener",value:function(e,n){this.events.addEventListener(e,n)}},{key:"removeEventListener",value:function(e,n){this.events.removeEventListener(e,n)}},{key:"addXaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addXaxisAnnotationExternal(e,n,i)}},{key:"addYaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addYaxisAnnotationExternal(e,n,i)}},{key:"addPointAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addPointAnnotationExternal(e,n,i)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;e&&(n=e),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,s=this;n&&(s=n),s.annotations.removeAnnotation(s,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,n){return this.coreUtils.getSeriesTotalsXRange(e,n)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Y6(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Y6(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,n){return this.updateHelpers.toggleDataPointSelection(e,n)}},{key:"zoomX",value:function(e,n){this.ctx.toolbar.zoomUpdateOptions(e,n)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Qb(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Qb(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var n=ue.escapeString(e);if(Apex._chartInstances){var s=Apex._chartInstances.filter(function(i){return i.id===n})[0];return s&&s.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),n=0;n<e.length;n++)new t(e[n],JSON.parse(e[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,n){var s=this.getChartByID(e);if(s){s.w.globals.isExecCalled=!0;var i=null;if(s.publicMethods.indexOf(n)!==-1){for(var o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];i=s[n].apply(s,r)}return i}}},{key:"merge",value:function(e,n){return ue.extend(e,n)}}]),t}(),Dyt=Oyt;const jT=fi(Dyt),WT=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],t_=he({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:WT,setup(t,{emit:e}){const n=J(null),s=J(null),i=V=>V&&typeof V=="object"&&!Array.isArray(V)&&V!=null,o=(V,R)=>{typeof Object.assign!="function"&&function(){Object.assign=function(F){if(F==null)throw new TypeError("Cannot convert undefined or null to object");let B=Object(F);for(let G=1;G<arguments.length;G++){let q=arguments[G];if(q!=null)for(let X in q)q.hasOwnProperty(X)&&(B[X]=q[X])}return B}}();let N=Object.assign({},V);return i(V)&&i(R)&&Object.keys(R).forEach(F=>{i(R[F])?F in V?N[F]=o(V[F],R[F]):Object.assign(N,{[F]:R[F]}):Object.assign(N,{[F]:R[F]})}),N},r=async()=>{if(await st(),s.value)return;const V={chart:{type:t.type||t.options.chart.type||"line",height:t.height,width:t.width,events:{}},series:t.series},R=t.options.chart?t.options.chart.events:null;WT.forEach(F=>{let B=(...G)=>e(F,...G);V.chart.events[F]=(...G)=>{B(...G),R&&R.hasOwnProperty(F)&&R[F](...G)}});const N=o(t.options,V);return s.value=new jT(n.value,N),s.value.render()},a=()=>(l(),r()),l=()=>{s.value.destroy(),s.value=null},c=(V,R)=>s.value.updateSeries(V,R),u=(V,R,N,F)=>s.value.updateOptions(V,R,N,F),d=V=>s.value.toggleSeries(V),h=V=>{s.value.showSeries(V)},f=V=>{s.value.hideSeries(V)},p=(V,R)=>s.value.appendSeries(V,R),m=()=>{s.value.resetSeries()},b=(V,R)=>{s.value.toggleDataPointSelection(V,R)},_=V=>s.value.appendData(V),x=(V,R)=>s.value.zoomX(V,R),k=V=>s.value.dataURI(V),C=V=>s.value.setLocale(V),S=(V,R)=>{s.value.addXaxisAnnotation(V,R)},E=(V,R)=>{s.value.addYaxisAnnotation(V,R)},P=(V,R)=>{s.value.addPointAnnotation(V,R)},T=(V,R)=>{s.value.removeAnnotation(V,R)},L=()=>{s.value.clearAnnotations()};Sd(()=>{window.ApexCharts=jT}),Vt(()=>{n.value=ht().proxy.$el,r()}),_n(()=>{s.value&&l()});const I=po(t);return Ee(I.options,()=>{!s.value&&t.options?r():s.value.updateOptions(t.options)}),Ee(I.series,()=>{!s.value&&t.series?r():s.value.updateSeries(t.series)},{deep:!0}),Ee(I.type,()=>{a()}),Ee(I.width,()=>{a()}),Ee(I.height,()=>{a()}),{chart:s,init:r,refresh:a,destroy:l,updateOptions:u,updateSeries:c,toggleSeries:d,showSeries:h,hideSeries:f,resetSeries:m,zoomX:x,toggleDataPointSelection:b,appendData:_,appendSeries:p,addXaxisAnnotation:S,addYaxisAnnotation:E,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:L,setLocale:C,dataURI:k}},render(){return vt("div",{class:"vue-apexcharts"})}}),Ryt=t=>{t.component(t_.name,t_)};t_.install=Ryt;const Vyt={data(){return{isDarkMode:!1}},methods:{updateDarkMode(){this.isDarkMode=document.documentElement.classList.contains("dark")}},mounted(){this.updateDarkMode(),this.observer=new MutationObserver(this.updateDarkMode),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})},beforeUnmount(){this.observer&&this.observer.disconnect()}},Fyt={name:"ReportsChart",mixins:[Vyt],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:t_},methods:{formatDate(t){const e=new Date(t),n=e.getDate().toString().padStart(2,"0"),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getFullYear().toString().slice(-2);return`${n}-${s}-${i}`}},computed:{chartSeries(){return this.series.map(t=>({...t,data:t.data.map((e,n)=>({x:this.formatDate(this.categories[n]),y:e}))}))},chartOptions(){return{chart:{type:"area",width:"100%",toolbar:{show:!1},foreColor:"var(--fcom-primary-text)"},dataLabels:{enabled:!1},legend:{show:!0,position:"bottom",horizontalAlign:"center"},stroke:{width:[0,2,5],curve:"smooth"},xaxis:{type:"category",labels:{rotate:-45,rotateAlways:!0,hideOverlappingLabels:!0},tickPlacement:"on"},yaxis:{labels:{formatter:function(t){return Math.floor(t)===t?t:""}}},tooltip:{theme:this.isDarkMode?"dark":"light",x:{formatter:t=>t}},...this.options}}},beforeUnmount(){this.$refs.apexChart&&this.$refs.apexChart.chart&&this.$refs.apexChart.chart.destroy()}},Nyt={class:"reports-chart"};function Byt(t,e,n,s,i,o){const r=W("VueApexCharts");return v(),A("div",Nyt,[y(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const zS=ge(Fyt,[["render",Byt]]),zyt={name:"ActivitiesChart",components:{ReportsChart:zS,Loading:Ba},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,activity:"posts",activitiesFilters:[{label:this.$t("Posts"),value:"posts"},{label:this.$t("Comments"),value:"comments"},{label:this.$t("Members"),value:"members"}],chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:this.$t("Posts"),data:[],type:"column"}],categories:[]}}},watch:{dateRanges:"fetchActivity"},methods:{fetchActivity(){this.loading=!0,this.$get("analytics/overview/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:this.activity}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.renderChart=!1,this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.$nextTick(()=>{this.chart.renderKey=new Date().toDateString(),this.renderChart=!0})}},mounted(){this.fetchActivity()}},Hyt={class:"fcom-report-chart",style:{"min-height":"400px"}},Uyt={key:1},jyt={class:"fcom-report-chart-header"},Wyt={class:"fcom-report-header-action"},Yyt={key:0};function qyt(t,e,n,s,i,o){const r=W("Loading"),a=ln,l=Qt,c=W("ReportsChart");return v(),A("div",Hyt,[i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Uyt,[g("div",jyt,[g("h4",null,$(t.$t("Activities")),1),g("div",Wyt,[y(l,{modelValue:i.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>i.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),A(te,null,we(i.activitiesFilters,(u,d)=>(v(),D(a,{key:`activity-filter-${d}`,value:u.value,label:u.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),i.renderChart?(v(),A("div",Yyt,[(v(),D(c,{key:i.chart.renderKey,"series-name":t.$t("Activities"),data:i.chart.data,options:i.chart,series:i.chart.series,categories:i.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const Gyt=ge(zyt,[["render",qyt]]),Xyt={name:"PopularDayTime",components:{Loading:Ba,InfoFilled:yl},props:["dateRanges"],data(){return{loading:!1,weekly_activities:{}}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/popular-day-time",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.weekly_activities={...t.data,columns:t.data.columns.map(e=>({...e,width:e.prop==="time_range"?180:void 0}))}}).catch(this.$handleError).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},Kyt={class:"fcom-report-popular-time"},Zyt={key:1},Jyt={class:"fcom-report-chart-header"};function Qyt(t,e,n,s,i,o){const r=W("Loading"),a=W("InfoFilled"),l=_e,c=js,u=Jr,d=Zr;return v(),A("div",Kyt,[i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Zyt,[g("div",Jyt,[g("h4",null,[Y($(t.$t("Popular day & time"))+" ",1),y(c,{class:"box-item",effect:"dark",content:t.$t("Popular hour of the day and day of the week"),placement:"top-start"},{default:w(()=>[y(l,null,{default:w(()=>[y(a)]),_:1})]),_:1},8,["content"])])]),y(d,{data:i.weekly_activities.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(i.weekly_activities.columns,(h,f)=>(v(),D(u,{key:`${h.prop}-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const ebt=ge(Xyt,[["render",Qyt]]),tbt={name:"Overview",components:{CheckProStatus:$S,AnalyticsHeader:d0t,AnalyticsWidgets:y0t,ActivitiesChart:Gyt,PopularDayTime:ebt},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},nbt={key:0},sbt={key:1},ibt={class:"fcom-report-body"};function obt(t,e,n,s,i,o){const r=W("CheckProStatus"),a=W("AnalyticsHeader"),l=W("AnalyticsWidgets"),c=W("ActivitiesChart"),u=W("PopularDayTime");return o.isAnalyticsEnabled?(v(),A("div",sbt,[(v(),A("div",{class:"fcom-report-wrap",key:i.instanceKey},[y(a,{"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"date-ranges":i.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",ibt,[y(l,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),y(c,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),y(u,{"date-ranges":i.dateRanges},null,8,["date-ranges"])])]))])):(v(),A("div",nbt,[y(r)]))}const rbt=ge(tbt,[["render",obt]]),abt={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0}},emits:["update:predefinedDate","update:dateRanges"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},lbt={class:"fcom-report-header"},cbt={class:"fcom-report-header-action"};function ubt(t,e,n,s,i,o){const r=ln,a=Qt,l=Rd;return v(),A("div",lbt,[g("h4",null,$(t.$t("Members")),1),g("div",cbt,[y(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(te,null,we(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),y(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>i.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const dbt=ge(abt,[["render",ubt]]),hbt={name:"AnalyticsWidgets",components:{Loading:Ba},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get("analytics/members/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(this.$handleError).finally(()=>this.loading=!1)}}},fbt={key:1,class:"fcom-report-stat-widgets"},pbt={class:"stat-title"};function mbt(t,e,n,s,i,o){const r=W("Loading");return i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",fbt,[(v(!0),A(te,null,we(i.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",pbt,$(a.title),1),g("h3",null,[Y($(a.total_records)+" ",1),g("span",{class:U(["stat-percent",{"stat-down":a.down}])},$(a.comparison)+" % ",3)])]))),128))]))}const gbt=ge(hbt,[["render",mbt]]),vbt={name:"MembersActivitiesChart",components:{Loading:Ba,ReportsChart:zS},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,chartKey:0,chartData:[],chartOptions:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm"}}}},chartSeries:[],chartCategories:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/members/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>this.populateGraphData(t.data)).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chartData=t.data,this.chartCategories=t.data.map(e=>e.date),this.chartSeries=[{name:t.title,data:t.data.map(e=>e.data),type:"column",color:"#6895FF"},{name:this.$t("Cumulative"),data:this.calculateCumulative(t.data),type:"area",width:"100%"}],this.renderChart=!0,this.chartKey++},calculateCumulative(t){let e=0;return t.map(n=>(e+=n.data,e))}}},ybt={class:"fcom-report-chart",style:{"min-height":"400px"}},bbt={key:1},_bt={class:"fcom-report-chart-header"},wbt={key:0};function xbt(t,e,n,s,i,o){const r=W("Loading"),a=W("ReportsChart");return v(),A("div",ybt,[i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",bbt,[g("div",_bt,[g("h4",null,$(t.$t("Members Activities")),1)]),i.renderChart?(v(),A("div",wbt,[(v(),D(a,{key:i.chartKey,"series-name":t.$t("Activities"),data:i.chartData,options:i.chartOptions,series:i.chartSeries,categories:i.chartCategories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const kbt=ge(vbt,[["render",xbt]]),Cbt={name:"TopMembersSection",components:{Loading:Ba,InfoFilled:yl},props:{title:String,tooltipContent:String,dateRanges:Array,endpoint:String,pointLabel:String},data(){return{loading:!1,members:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get(this.endpoint,{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.members=t.data}).catch(this.$handleError).finally(()=>this.loading=!1)}}},Sbt={class:"fcom-top-members-wrap"},$bt={key:1},Abt={class:"fcom-report-chart-header"},Ebt={class:"fcom-members-activity-lists"},Mbt={key:0},Tbt={class:"image-box"},Pbt=["src"],Ibt={class:"number"},Lbt={class:"content-box"},Obt=["title"],Dbt={class:"points"};function Rbt(t,e,n,s,i,o){const r=W("Loading"),a=W("InfoFilled"),l=_e,c=js;return v(),A("div",Sbt,[i.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",$bt,[g("div",Abt,[g("h4",null,[Y($(t.$t(n.title))+" ",1),y(c,{class:"box-item",effect:"dark",content:n.tooltipContent,placement:"top-start"},{default:w(()=>[y(l,null,{default:w(()=>[y(a)]),_:1})]),_:1},8,["content"])])]),g("div",Ebt,[i.members.length?(v(!0),A(te,{key:1},we(i.members,(u,d)=>(v(),A("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",Tbt,[g("img",{src:u.avatar,alt:"Member"},null,8,Pbt),g("span",Ibt,$(i.members.length-d),1)]),g("div",Lbt,[g("h5",null,$(u.display_name),1),g("p",{title:u.created_at,class:"date meta_line"},$(t.$t("Joined %s",t.humanDateDiff(u.created_at))),9,Obt)]),g("div",Dbt,$(u[n.pointLabel]),1)]))),128)):(v(),A("div",Mbt,$(t.$t("No Activity")),1))])]))])}const Vbt=ge(Cbt,[["render",Rbt]]),Fbt={name:"MembersAnalytics",components:{CheckProStatus:$S,AnalyticsHeader:dbt,AnalyticsWidgets:gbt,MembersActivitiesChart:kbt,TopMembersSection:Vbt},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.changeTitle(this.$t("Members analytics"))},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},Nbt={key:0},Bbt={key:1},zbt={class:"fcom-report-body"},Hbt={class:"fcom-members-activities-wrap"};function Ubt(t,e,n,s,i,o){const r=W("CheckProStatus"),a=W("AnalyticsHeader"),l=W("AnalyticsWidgets"),c=W("MembersActivitiesChart"),u=W("TopMembersSection");return o.isAnalyticsEnabled?(v(),A("div",Bbt,[(v(),A("div",{class:"fcom-report-wrap",key:i.instanceKey},[y(a,{"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"date-ranges":i.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",zbt,[y(l,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),y(c,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),g("div",Hbt,[y(u,{title:t.$t("Top Members"),"tooltip-content":t.$t("Top members by Activity count"),"date-ranges":i.dateRanges,endpoint:"analytics/members/top-members","point-label":"total_points"},null,8,["title","tooltip-content","date-ranges"]),y(u,{title:t.$t("Post starters"),"tooltip-content":t.$t("Top Member who started the most posts"),"date-ranges":i.dateRanges,endpoint:"analytics/members/top-post-starters","point-label":"posts_count"},null,8,["title","tooltip-content","date-ranges"]),y(u,{title:t.$t("Top Commenters"),"tooltip-content":t.$t("Top Member who commented the most"),"date-ranges":i.dateRanges,endpoint:"analytics/members/top-commenters","point-label":"comments_count"},null,8,["title","tooltip-content","date-ranges"])])])]))])):(v(),A("div",Nbt,[y(r)]))}const jbt=ge(Fbt,[["render",Ubt]]),Wbt={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0},activeSpace:{type:Number,default:0}},emits:["update:predefinedDate","update:dateRanges","update:active-space"],data(){return{localActiveSpace:this.activeSpace,localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{onSpaceChange(){this.$emit("update:active-space",this.localActiveSpace)},setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},Ybt={class:"fcom-report-header"},qbt={class:"fcom-report-header-action"};function Gbt(t,e,n,s,i,o){const r=ln,a=Qt,l=Rd;return v(),A("div",Ybt,[g("h4",null,$(t.$t("Spaces")),1),g("div",qbt,[y(a,{class:"space-selector",modelValue:i.localActiveSpace,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localActiveSpace=c),filterable:"",placeholder:t.$t("Select Space"),onChange:o.onSpaceChange,clearable:""},{default:w(()=>[(v(!0),A(te,null,we(t.appVars.auth.spaces,(c,u)=>(v(),D(r,{key:`space-${u}`,label:c.title,value:c.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","onChange"]),y(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[1]||(e[1]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(te,null,we(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),y(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[2]||(e[2]=c=>i.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const Xbt=ge(Wbt,[["render",Gbt]]),Kbt={name:"AnalyticsWidgets",components:{Loading:Ba},props:["activeSpace","dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:"posts",space_id:this.activeSpace}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},Zbt={class:"fcom-report-stat-widgets"},Jbt={class:"stat-title"};function Qbt(t,e,n,s,i,o){const r=W("Loading");return v(),A("div",Zbt,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(!0),A(te,{key:1},we(i.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Jbt,$(a.title),1),g("h3",null,[Y($(a.total_records)+" ",1),g("span",{class:U(["stat-percent",{"stat-down":a.down}])},$(a.comparison)+" % ",3)])]))),128))])}const e_t=ge(Kbt,[["render",Qbt]]),t_t={name:"AnalyticsChart",components:{ReportsChart:zS,Loading:Ba},props:["activeSpace","dateRanges"],data(){return{loading:!1,renderChart:!1,chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:"Posts",data:[],type:"column"}],categories:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/spaces/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column",color:"#6895FF"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.chart.renderKey=new Date().toDateString(),this.renderChart=!0}},mounted(){this.fetchData()}},n_t={class:"fcom-report-chart",style:{"min-height":"400px"}},s_t={key:1},i_t={class:"fcom-report-chart-header"},o_t={key:0};function r_t(t,e,n,s,i,o){const r=W("Loading"),a=W("ReportsChart");return v(),A("div",n_t,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),A("div",s_t,[g("div",i_t,[g("h4",null,$(t.$t("Space Activities")),1)]),i.renderChart?(v(),A("div",o_t,[(v(),D(a,{key:i.chart.renderKey,"series-name":t.$t("Activities"),data:i.chart.data,options:i.chart,series:i.chart.series,categories:i.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const a_t=ge(t_t,[["render",r_t]]),l_t={name:"PopularSpaces",components:{InfoFilled:yl,Loading:Ba},props:["activeSpace","dateRanges","title"],data(){return{loading:!1,popularSpaces:{data:[],columns:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/popular",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.popularSpaces.data=t.data.data,this.popularSpaces.columns=t.data.columns}).catch(t=>this.$handleError(t)).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},c_t={class:"fcom-report-popular-time"},u_t={key:1},d_t={class:"fcom-report-chart-header"};function h_t(t,e,n,s,i,o){const r=W("Loading"),a=W("InfoFilled"),l=_e,c=js,u=Jr,d=Zr;return v(),A("div",c_t,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),A("div",u_t,[g("div",d_t,[g("h4",null,[Y($(n.title)+" ",1),y(c,{class:"box-item",effect:"dark",content:t.$t("Top 10 spaces with most activities"),placement:"top-start"},{default:w(()=>[y(l,null,{default:w(()=>[y(a)]),_:1})]),_:1},8,["content"])])]),y(d,{data:i.popularSpaces.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(te,null,we(i.popularSpaces.columns,(h,f)=>(v(),D(u,{key:`popular-spaces-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const f_t=ge(l_t,[["render",h_t]]),p_t={name:"SpaceAnalytics",components:{CheckProStatus:$S,Loading:Ba,AnalyticsHeader:Xbt,AnalyticsWidgets:e_t,AnalyticsChart:a_t,PopularSpaces:f_t},data(){return{pageLoaded:!1,instanceKey:null,activeSpace:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]],predefinedDate:"30",predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.pageLoaded=!0,this.changeTitle(this.$t("Space analytics"))}},m_t={key:0},g_t={key:1},v_t={class:"fcom-report-body"};function y_t(t,e,n,s,i,o){const r=W("CheckProStatus"),a=W("Loading"),l=W("AnalyticsHeader"),c=W("AnalyticsWidgets"),u=W("AnalyticsChart"),d=W("PopularSpaces");return o.isAnalyticsEnabled?(v(),A("div",g_t,[i.pageLoaded?(v(),A("div",{class:"fcom-report-wrap",key:i.instanceKey},[y(l,{"active-space":i.activeSpace,"date-ranges":i.dateRanges,"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"onUpdate:activeSpace":e[0]||(e[0]=h=>i.activeSpace=h),"onUpdate:dateRanges":e[1]||(e[1]=h=>i.dateRanges=h),"onUpdate:predefinedDate":e[2]||(e[2]=h=>i.predefinedDate=h)},null,8,["active-space","date-ranges","predefined-date","predefined-dates"]),g("div",v_t,[y(c,{"active-space":i.activeSpace,"date-ranges":i.dateRanges},null,8,["active-space","date-ranges"]),y(u,{"active-space":i.activeSpace,"date-ranges":i.dateRanges},null,8,["active-space","date-ranges"]),y(d,{"active-space":i.activeSpace,"date-ranges":i.dateRanges,title:i.activeSpace?t.$t("Popular Posts"):t.$t("Popular Spaces")},null,8,["active-space","date-ranges","title"])])])):(v(),D(a,{key:0,section:3}))])):(v(),A("div",m_t,[y(r)]))}const b_t=ge(p_t,[["render",y_t]]),__t=[{path:"/settings",component:m1t,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:not,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:rZe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:srt,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:DZe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Cst,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:wot,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:xvt,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:aKe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:Egt,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:h1t,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:Ugt,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:PXe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:Jvt,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:aGe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:Kje,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:Iqe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:HOe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:UDe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:XBe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:s0t,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:rbt,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:jbt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:b_t,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:HGe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],w_t={name:"VerifiedSign"};function x_t(t,e,n,s,i,o){const r=js;return v(),D(r,{content:t.$t("Verified"),placement:"top"},{default:w(()=>[...e[0]||(e[0]=[g("span",{class:"fcom_verified"},[g("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img","data-testid":"icon-verified"},[g("g",null,[g("path",{d:"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z"})])])],-1)])]),_:1},8,["content"])}const k_t=ge(w_t,[["render",x_t]]),C_t={name:"UserBadge",props:["badge","is_preview","profile"],computed:{renderingBadges(){var t;if(!this.appVars.user_badges&&!this.is_preview)return null;if(this.profile){let e=this.profile.badge_slugs;if(e||(e=(t=this.profile.meta)==null?void 0:t.badge_slug,typeof e=="string"&&(e=[e])),!e||e.length==0)return null;let n=[];for(let s=0;s<e.length;s++){let i=this.appVars.user_badges[e[s]];i&&n.push(i)}return n}return[this.badge]}}},S_t=["src"],$_t={key:1,class:"fcom_emoji"},A_t={key:2,class:"fcom_shape"},E_t={key:1};function M_t(t,e,n,s,i,o){const r=_e,a=js;return o.renderingBadges?(v(!0),A(te,{key:0},we(o.renderingBadges,l=>(v(),A("div",{class:U([{user_icon_only:l.show_label!="yes"},"user_badge"])},[y(a,{content:l.title,placement:"top"},{default:w(()=>[g("div",{style:qe({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),A(te,{key:0},[l.config.logo?(v(),A("img",{key:0,alt:"",src:l.config.logo},null,8,S_t)):l.config.emoji?(v(),A("span",$_t,$(l.config.emoji),1)):l.config.shape_svg?(v(),A("span",A_t,[y(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),A("span",E_t,$(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const T_t=ge(C_t,[["render",M_t]]),P_t={name:"WelcomeBanner",components:{MediaPreview:Cp},data(){return{config:this.appVars.welcome_banner}},computed:{showMedia(){return this.config&&this.config.mediaType=="video"&&this.config.bannerVideo},showCtaButtons(){var t;return this.config&&((t=this.config.ctaButtons)==null?void 0:t.length)&&this.config.ctaButtons.some(e=>e.link&&e.label)},isRemovable(){return this.config&&this.config.allowClose=="yes"},showBanner(){if(!this.isRemovable)return!0;let t=this.Storage.get(this.getCloseKey,!1);return t?new Date().getTime()>t:!0},getCloseKey(){return this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"}},methods:{closeBanner(){this.config=null;let t=new Date().getTime()+7*24*60*60*1e3;this.Storage.set(this.getCloseKey,t)}}},I_t={key:0,class:"fcom_welcome_box"},L_t={key:2,class:"fcom_welcome_title"},O_t=["innerHTML"],D_t={key:4,class:"fcom_welcome_cta_buttons"},R_t=["href","target"];function V_t(t,e,n,s,i,o){const r=W("media-preview"),a=Ra,l=W("MoreFilled"),c=_e,u=Ge,d=Oa,h=Da,f=La;return i.config&&o.showBanner?(v(),A("div",I_t,[o.showMedia?(v(),D(r,{key:0,media_item:i.config.bannerVideo},null,8,["media_item"])):i.config.bannerImage?(v(),D(a,{key:1,class:"feed_media",alt:t.$t("Image Preview"),src:i.config.bannerImage},null,8,["alt","src"])):O("",!0),i.config.title?(v(),A("h2",L_t,$(i.config.title),1)):O("",!0),i.config.description_rendered?(v(),A("div",{key:3,class:"fcom_welcome_sub",innerHTML:i.config.description_rendered},null,8,O_t)):O("",!0),o.showCtaButtons?(v(),A("div",D_t,[(v(!0),A(te,null,we(i.config.ctaButtons,p=>(v(),A(te,null,[p.link&&p.label?(v(),A("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"",class:U({"el-button fcom_primary_button":p.type=="primary","el-button fcom_secondary_button":p.type=="secondary","el-button is-text":p.type=="text","el-link fcom_link_button":p.type=="link"})},$(p.label),11,R_t)):O("",!0)],64))),256))])):O("",!0),o.isRemovable?(v(),D(f,{key:5,trigger:"click",class:"fcom_welcome_close"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{onClick:o.closeBanner},{default:w(()=>[Y($(t.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:w(()=>[y(u,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1})]),_:1},8,["aria-label"])]),_:1})):O("",!0)])):O("",!0)}const F_t=ge(P_t,[["render",V_t]]);ku(()=>Promise.resolve().then(()=>D3t),void 0);ku(()=>Promise.resolve().then(()=>V3t),void 0);const N_t=[uae,nR,$ae,ZD,Iae,mle,Ple,Yae,Jae,ile,Dle,nae,rae,iR,tR,ale,GD,ele,q_,eR,Kae,Y4,Rr,Lle,dd,Td,hae,Jx,q4,Dae,Uae,_le,Zre,br,j4,dle,W4,Fae,eae,wae,cle,JD,sR,yl,G_,QD];function gg(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(gg(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(gg(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Ls=Mg(MLe),HS=pbe();HS.use(Ebe);HS.use(({store:t})=>{t.$api={get:(e,n)=>window.FluentCommunityUtil.Rest.get(e,n),post:(e,n)=>window.FluentCommunityUtil.Rest.post(e,n),put:(e,n)=>window.FluentCommunityUtil.Rest.put(e,n),patch:(e,n)=>window.FluentCommunityUtil.Rest.patch(e,n),delete:e=>window.FluentCommunityUtil.Rest.delete(e)}});Ls.use(HS);Ls.use(Iye);Ls.config.globalProperties.appVars=window.fluentComAdmin;Ls.config.globalProperties.auth=window.fluentComAdmin.auth;Ls.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let J6="40%",Q6="60%",gj="500px";window.innerWidth<600?(Q6="95%",J6="90%",gj="90%"):window.innerWidth<800&&(Q6="80%",J6="80%");N_t.forEach(t=>{Ls.component(t.name,t)});Ls.component("VerifiedSign",k_t);Ls.component("UserAvatar",B2);Ls.component("UserRouteLink",ta);Ls.component("WelcomeBanner",F_t);Ls.component("UserBadge",T_t);function YT(){Ls.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;Ls.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:J6,dialogWidth:Q6,modalWidth:gj,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},methods:{$get:t.get,$post:t.post,$uploadFile:t.uploadFile,$put:t.put,$del:t.delete,$patch:t.patch,$ajax:t.ajax,changeTitle(i){document.title=i+" - "+this.appVars.site_title},$handleError(i){let o="";typeof i=="string"?o=i:i&&i.message?o=i.message:o=gg(i),o||(o="Something is wrong!"),typeof o!="string"&&(o=gg(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:gg,$t(i){i=window.fluentComAdmin.i18n[i]||i;const o=Array.prototype.slice.call(arguments,1);if(o.length===0)return i;const r=/%(\d*)\$?s|%d/g;let a=0;return i=i.replace(r,(l,c)=>{if(c){const u=parseInt(c,10)-1;return u<o.length?o[u]:l}else return a<o.length?o[a++]:l}),i},$_n(i,o,r){return r>1?this.$t(o,r):this.$t(i,r)},$labelize(i){return i?(i=i.charAt(0).toUpperCase()+i.slice(1),window.fluentComAdmin.i18n[i]?window.fluentComAdmin.i18n[i]:i.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())):""},$toClipboard(i,o="Copied to clipboard"){navigator.clipboard.writeText(i).then(()=>{this.$notify.success(this.$t(o))}).catch(r=>{this.$notify.error(this.$t("Failed to copy"))})},dayjs,relativeTimeFromUtc(i){return dayjs.utc(i).local().fromNow()},$storeLocalData(i,o){this.Storage.set(i,o)},$getLocalData(i,o=""){return this.Storage.get(i,o)},ucFirst(i){return i?i.charAt(0).toUpperCase()+i.slice(1):""},ucWords(i){return i?i.replace(/\b[a-z]/g,function(o){return o.toUpperCase()}):""},smartDate(i,o=!1,r=!1){if(!i)return"";let a="D MMM, YYYY";dayjs(i).isSame(new Date,"year")?(a="D MMM",o&&(Math.abs(dayjs(i).diff(new Date,"days"))<=5||r)&&(a="D MMM, HH:mm")):o&&r&&(a="D MMM, YYYY, HH:mm");const l=dayjs(i);return l.isValid()?l.format(a):null},hasPermission(i){return this.appVars.permissions[i]},isAdmin(){return!!this.appVars.permissions.community_admin},hasCourseAdminAccess(){return!!this.appVars.permissions.course_admin},hasCourseCreatorAccess(){return!!this.appVars.permissions.course_creator},hasSpaceAdminAccess(i=null){return this.hasPermissionOrInCurrentSpace("community_admin")||i&&this.isSpaceAdmin(i)},hasSpaceModeratorAccess(i=null){return this.hasPermissionOrInCurrentSpace("community_moderator")||i&&this.isSpaceModerator(i)},canDeleteFeed(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_feed"))},canEditFeed(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_feed"))},canDeleteComment(i){return this.auth&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_comment"))},canEditComment(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_comment"))},hasSpaceAccess(i){return i?this.appVars.user_membership_slugs.indexOf(i)!==-1:!0},hasInPermission(i,o){return!o||typeof o!="object"?!1:o[i]},hasCurrentSpacePermission(i){return window.fcom_current_community?this.hasInPermission(i,window.fcom_current_community.permissions):!1},hasPermissionOrInCurrentSpace(i){return this.hasPermission(i)?!0:this.hasCurrentSpacePermission(i)},humanDateDiff(i){if(!i)return"";const o=dayjs.utc(i,"YYYY-MM-DD HH:mm:ss");if(!o.isValid())return"";const r=o.add(this.appVars.date_offset,"s");return dayjs(r.format("YYYY-MM-DD HH:mm:ss")).from(dayjs(dayjs.utc().format("YYYY-MM-DD HH:mm:ss")))},hasCommentPermission(i){var o;return this.auth.user_id?!i.space_id&&!i.course_id?this.auth.user_id&&(i.user_id==this.auth.user_id||i.privacy=="public"):this.hasSpaceAccess((o=i.space)==null?void 0:o.slug):!1},getExcerpt(i,o=250){if(!i)return"";let r=i.replace(/(<([^>]+)>)/ig,"");return r=r.replace(/(\*\*|__)(.*?)\1/g,"$2"),r=r.replace(/(#+)(.*)/g,"$2"),r=r.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),typeof DOMParser<"u"&&(r=new DOMParser().parseFromString(r,"text/html").body.textContent||""),r.length>o&&(r=r.substring(0,o)+"..."),r},mdToHtml(i){return i?(i=i.replace("&#x20;","",i),i=i.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),i=i.replace(/\*(.*?)\*/g,"<em>$1</em>"),i=i.replace(/\~\~(.*?)\~\~/g,"<del>$1</del>"),i=i.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>'),i=i.replace(/<(https?:\/\/[^\s>]+)>/g,'<a href="$1">$1</a>'),i=i.replace(/^##\s+(.*?)$/gm,"<h2>$1</h2>"),i=i.replace(/^###\s+(.*?)$/gm,"<h3>$1</h3>"),i=i.replace(/^####\s+(.*?)$/gm,"<h4>$1</h4>"),i=i.replace(/^>\s+(.*?)$/gm,"<blockquote>$1</blockquote>"),i=i.replace(/`{3}([\s\S]*?)`{3}/g,"<pre><code>$1</code></pre>"),i=i.replace(/`([^`]+)`/g,"<code>$1</code>"),i=i.replace(/^([\*\-])\s+(.*)$/gm,"<li>$2</li>"),i=i.replace(/(<li>.*?<\/li>(?:\n<li>.*?<\/li>)*)/g,function(o){return"<ul>"+o.replace(/\n/g,"")+"</ul>"}),i=i.replace(/\n/g,"<br>"),i):""},$convertToBoolean(i){return i==="true"||i===!0||i===1||i==="1"||i==="yes"||i==="on"},each:Cc,hasFeature(i){return this.appVars.features[i]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(i=>i==="admin"||i==="moderator")},isSpaceModerator(i){var r,a;return["admin","moderator"].includes((a=(r=i==null?void 0:i.membership)==null?void 0:r.pivot)==null?void 0:a.role)},isSpaceAdmin(i){var o,r;return((r=(o=i==null?void 0:i.membership)==null?void 0:o.pivot)==null?void 0:r.role)=="admin"},getCurrentAuthUrl(){let i=window.location.href,o=this.appVars.auth_url;return o=o.replace(/(\?|&)redirect_to=[^&]+/,""),o.indexOf("?")===-1?o+="?":o+="&",o+"redirect_to="+encodeURIComponent(i)},$formatNumber(i){return i&&i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(i,o={}){return Cc(o,(r,a)=>{i=i.replace(":"+a,r)}),this.appVars.portal_url+i},isOnline(i){if(!i)return!1;const r=dayjs.utc(i,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return r<=5&&r>=0},$exportToCsv(i,o="fcom-export.csv"){if(!i||!Array.isArray(i)||i.length===0){this.$notify({type:"error",title:this.$t("Error"),message:this.$t("No data available to export.")});return}const r=Object.keys(i[0]),a=[r.join(",")];i.forEach(d=>{const h=r.map(f=>`"${String(d[f]??"").replace(/"/g,'""')}"`);a.push(h.join(","))});const l="\uFEFF"+a.join(`
983 `),c=new Blob([l],{type:"text/csv;charset=utf-8;"}),u=document.createElement("a");u.href=URL.createObjectURL(c),u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(u.href)},doNothing(){console.log("OK")}},mounted(){window.fcom_mounted||(window.fcom_mounted=!0,this.isMobile&&dayjs.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1 h",hh:"%d h",d:"%dd",dd:"%dd",M:"1 mo",MM:"%d mo",y:"%d y",yy:"%d y"}}),document.addEventListener("fcom_renew_rest_nonce",i=>{this.$ajax("GET","fluent_community_renew_nonce",{ajax_nonce:window.fluentComAdmin.ajax_nonce}).then(o=>{o.rest_nonce&&(window.fluentComAdmin.rest.nonce=o.rest_nonce,window.fluentComAdmin.ajax_nonce=o.ajax_nonce)}).catch(o=>{window.fluentFrameworkApp.$messageBox.alert(this.$t("Your session has expired due to inactivity. Please refresh the page to continue."),this.$t("Session Expired"),{confirmButtonText:this.$t("Refresh"),callback:r=>{location.reload()}})})}))}}),Ls.config.globalProperties.$notify=ibe,Ls.config.globalProperties.$confirm=zw.confirm,Ls.config.globalProperties.$promt=zw.prompt,Ls.config.globalProperties.$messageBox=zw,Ls.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",__t);let n=null;window.fluentComAdmin.routing_system=="hash"?n=A7({routes:e,history:vZ()}):n=A7({routes:e,history:fO(window.fluentComAdmin.portal_slug)});const s=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Ls);window.fluentFrameworkApp=s.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?YT():document.addEventListener("fluentCommunityUtilReady",function(){YT()});var Fu,mf;class B_t{constructor(e){sa(this,Fu,void 0);sa(this,mf,new Set);Zi(this,Fu,e)}get current(){return Ht(this,Fu)}set current(e){Ht(this,Fu)!=e&&(Zi(this,Fu,e),Ht(this,mf).forEach(n=>n(e)))}on(e){return Ht(this,mf).add(e),()=>Ht(this,mf).delete(e)}}Fu=new WeakMap,mf=new WeakMap;const vj=t=>new B_t(t),eC=Symbol.for("atomico.hooks");globalThis[eC]=globalThis[eC]||{};let Qf=globalThis[eC];const z_t=Symbol.for("Atomico.suspense"),yj=Symbol.for("Atomico.effect"),H_t=Symbol.for("Atomico.layoutEffect"),bj=Symbol.for("Atomico.insertionEffect"),wv=(t,e,n)=>{const{i:s,hooks:i}=Qf.c,o=i[s]=i[s]||{};return o.value=t(o.value),o.effect=e,o.tag=n,Qf.c.i++,i[s].value},nd=t=>wv((e=vj(t))=>e),US=()=>wv((t=vj(Qf.c.host))=>t),_j=()=>Qf.c.update,U_t=(t,e,n=0)=>{let s={},i=!1;const o=()=>i,r=(c,u)=>{for(const d in s){const h=s[d];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{Qf.c={host:e,hooks:s,update:t,i:0,id:n};let u;try{i=!1,u=c()}catch(d){if(d!==z_t)throw d;i=!0}finally{Qf.c=null}return u},cleanEffects:c=>(r(bj,c),()=>(r(H_t,c),()=>{r(yj,c)})),isSuspense:o}},xv=Symbol.for;function wj(t,e){const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++){let i=t[s],o=e[s];if(i!==o)return!1}return!0}const sl=t=>typeof t=="function",vg=t=>typeof t=="object",{isArray:j_t}=Array,tC=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function xj(t,e){let n;const s=i=>{let{length:o}=i;for(let r=0;r<o;r++){const a=i[r];if(a&&Array.isArray(a))s(a);else{const l=typeof a;if(a==null||l==="function"||l==="boolean")continue;l==="string"||l==="number"?(n==null&&(n=""),n+=a):(n!=null&&(e(n),n=null),e(a))}}};s(t),n!=null&&e(n)}const kj=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let Cj=class{constructor(e,n,s){this.message=n,this.target=e,this.value=s}};class W_t extends Cj{}class Y_t extends Cj{}const n_="Custom",q_t=null,G_t={true:1,"":1,1:1};function X_t(t,e,n,s,i){const{type:o,reflect:r,event:a,value:l,attr:c=Z_t(e)}=(n==null?void 0:n.name)!=n_&&vg(n)&&n!=q_t?n:{type:n},u=(o==null?void 0:o.name)===n_&&o.map,d=l!=null?o==Function||!sl(l)?()=>l:l:null;Object.defineProperty(t,e,{configurable:!0,set(h){const f=this[e];d&&o!=Boolean&&h==null&&(h=d());const{error:p,value:m}=(u?e2t:t2t)(o,h);if(p&&m!=null)throw new W_t(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);f!=m&&(this._props[e]=m??void 0,this.update(),a&&K_t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,J_t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(i[e]=d()),s[c]={prop:e,type:o}}const K_t=(t,{type:e,base:n=CustomEvent,...s})=>t.dispatchEvent(new n(e,s)),Z_t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),J_t=(t,e,n,s)=>s==null||e==Boolean&&!s?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===n_&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(s):vg(s)?JSON.stringify(s):e==Boolean?"":s),Q_t=(t,e)=>t==Boolean?!!G_t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==n_?e:new t(e),e2t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},t2t=(t,e)=>t==null||e==null?{value:e,error:!1}:t!=String&&e===""?{value:void 0,error:!1}:t==Object||t==Array||t==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${t.name}]`}:e instanceof t?{value:e,error:t==Number&&Number.isNaN(e.valueOf())}:t==String||t==Number||t==Boolean?{value:e,error:t==Number?typeof e!="number"?!0:Number.isNaN(e):t==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let n2t=0;const s2t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+n2t++},Xd=(t,e=HTMLElement)=>{const n={},s={},i="prototype"in e&&e.prototype instanceof Element,o=i?e:"base"in e?e.base:HTMLElement,{props:r,styles:a}=i?t:e;class l extends o{constructor(){super(),this._setup(),this._render=()=>t({...this._props});for(const u in s)this[u]=s[u]}static get styles(){return[super.styles,a]}async _setup(){if(this._props)return;this._props={};let u,d;this.mounted=new Promise(b=>this.mount=()=>{b(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(b=>this.unmount=()=>{b(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=U_t(()=>this.update(),this,s2t(this));let f,p=!0;const m=tC(this);this.update=()=>(f||(f=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const b=h.load(this._render),_=h.cleanEffects();return b&&b.render(this,this.symbolId,m),f=!1,p&&!h.isSuspense()&&(p=!1,!m&&i2t(this)),_()}finally{f=!1}}).then(b=>{b&&b()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,d,h){if(n[u]){if(u===this._ignoreAttr||d===h)return;const{prop:f,type:p}=n[u];try{this[f]=Q_t(p,h)}catch{throw new Y_t(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,h)}}else super.attributeChangedCallback(u,d,h)}static get props(){return{...super.props,...r}}static get observedAttributes(){const u=super.observedAttributes||[];for(const d in r)X_t(this.prototype,d,r[d],n,s);return Object.keys(n).concat(u)}}return l};function i2t(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const s=[];xj(e,i=>{i&&(i instanceof Element?n.appendChild(i.cloneNode(!0)):s.push(i))}),s.length&&(n.adoptedStyleSheets=s)}}const Sj=t=>(e,n)=>{wv(([s,i]=[])=>((i||!i)&&(i&&wj(i,n)?s=s||!0:(sl(s)&&s(),s=null)),[s,n]),([s,i],o)=>o?(sl(s)&&s(),[]):[s||e(),i],t)},wd=Sj(yj),o2t=Sj(bj);class r2t extends Array{constructor(e,n){let s=!0;const i=o=>{try{n(o,this,s)}finally{s=!1}};super(void 0,i,n),i(e)}}const Er=t=>{const e=_j();return wv((n=new r2t(t,(s,i,o)=>{s=sl(s)?s(i[0]):s,s!==i[0]&&(i[0]=s,o||e())}))=>n)},s_=(t,e)=>{const[n]=wv(([s,i,o=0]=[])=>((!i||i&&!wj(i,e))&&(s=t()),[s,e,o]));return n},dh=(t,e)=>s_(()=>t,e),nC=xv("atomico/options");globalThis[nC]=globalThis[nC]||{sheet:!!document.adoptedStyleSheets};const $j=globalThis[nC];new Promise(t=>{$j.ssr||(document.readyState==="loading"?kj(document,"DOMContentLoaded",t):t())});const a2t={checked:1,value:1,selected:1},l2t={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},c2t={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Sy={},sC=[];class iC extends Text{}const u2t=xv("atomico/id"),yg=xv("atomico/type"),nx=xv("atomico/ref"),Aj=xv("atomico/vnode"),d2t=()=>{};function h2t(t,e,n){return Mj(this,t,e,n)}const Ej=(t,e,...n)=>{const s=e||Sy;let{children:i}=s;if(i=i??(n.length?n:sC),t===d2t)return i;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(i!=sC?{children:i,...s}:s);const r=$j.render||h2t;return{[yg]:Aj,type:t,props:s,children:i,key:s.key,shadow:s.shadowDom,static:s.staticNode,raw:o,is:s.is,clone:s.cloneNode,render:r}};function Mj(t,e,n=u2t,s,i){let o;if(e&&e[n]&&e[n].vnode==t||t[yg]!=Aj)return e;(t||!e)&&(i=i||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[nx]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[nx]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(s=!0,e=t.type.cloneNode(!0),e[nx]=t.type):e=t.raw==1?t.type:t.raw==2?new t.type:i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,t.is?{is:t.is}:void 0)));const r=e[n]?e[n]:Sy,{vnode:a=Sy,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=sC,props:h=Sy}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&m2t(e,h,t.props,u,i),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=p2t(t.children,c,f,n,!l&&s,i&&t.type=="foreignObject"?!1:i)}return e[n]={vnode:t,handlers:u,fragment:c,cycle:l+1},e}function f2t(t,e){const n=new iC(""),s=new iC("");let i;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(tC(o,!0)&&!tC(r,!0)){i=o;break}o=r}}return i?i.before(s):t.append(s),{markStart:n,markEnd:s}}function p2t(t,e,n,s,i,o){t=t==null?null:j_t(t)?t:[t];const r=e||f2t(n,i),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&xj(t,f=>{if(typeof f=="object"&&!f[yg])return;const p=f[yg]&&f.key,m=c&&p!=null&&c.get(p);h!=l&&h===m?d.delete(h):h=h==l?l:h.nextSibling;const b=c?m:h;let _=b;if(f[yg])_=Mj(f,b,s,i,o);else{const x=f+"";!(_ instanceof Text)||_ instanceof iC?_=new Text(x):_.data!=x&&(_.data=x)}_!=h&&(c&&d.delete(_),!b||c?(n.insertBefore(_,h),c&&h!=l&&d.add(h)):b==l?n.insertBefore(_,l):(n.replaceChild(_,b),h=_)),p!=null&&(u=u||new Map,u.set(p,_))}),h=h==l?l:h.nextSibling,e&&h!=l)for(;h!=l;){const f=h;h=h.nextSibling,f.remove()}return d&&d.forEach(f=>f.remove()),r.keyes=u,r}function m2t(t,e,n,s,i){for(const o in e)!(o in n)&&qT(t,o,e[o],null,i,s);for(const o in n)qT(t,o,e[o],n[o],i,s)}function qT(t,e,n,s,i,o){if(e=e=="class"&&!i?"className":e,n=n??null,s=s??null,e in t&&a2t[e]&&(n=t[e]),!(s===n||c2t[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(s);else if(e[0]=="o"&&e[1]=="n"&&(sl(s)||sl(n)))g2t(t,e.slice(2),s,o);else if(e=="ref")s&&(sl(s)?s(t):s.current=t);else if(e=="style"){const{style:r}=t;n=n||"",s=s||"";const a=vg(n),l=vg(s);if(a)for(const c in n)if(l)!(c in s)&&GT(r,c,null);else break;if(l)for(const c in s){const u=s[c];a&&n[c]===u||GT(r,c,u)}else r.cssText=s}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!i&&!l2t[e]&&e in t||sl(s)||sl(n))?t[e]=s??"":s==null?t.removeAttribute(r):t.setAttribute(r,vg(s)?JSON.stringify(s):s)}}function g2t(t,e,n,s){if(s.handleEvent||(s.handleEvent=i=>s[i.type].call(t,i)),n){if(!s[e]){const i=n.capture||n.once||n.passive?Object.assign({},n):null;t.addEventListener(e,s,i)}s[e]=n}else s[e]&&(t.removeEventListener(e,s),delete s[e])}function GT(t,e,n){let s="setProperty";n==null&&(s="removeProperty",n=null),~e.indexOf("-")?t[s](e,n):t[e]=n}const v2t=Ej("host",{style:"display: contents"}),y2t="value",b2t=(t,e)=>{const n=US(),s=nd();o2t(()=>kj(n.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&t===i.detail.id&&(i.stopPropagation(),i.detail.connect(s))}),[t]),s.current=e},_2t=t=>{const e=Xd(({value:n})=>(b2t(e,n),v2t),{props:{value:{type:Object,value:()=>t}}});return e[y2t]=t,e};_2t({dispatch(t,e){}});const w2t=0,hh=1,g0=2,v0=3,XT=4,$m=5,oC=6,Tj=0,x2t=2,Pj=3,Ij=4,Lj=$m,k2t=oC,Oj=(t,e,n,s)=>{let i;e[0]=0;for(let o=1;o<e.length;o++){const r=e[o++],a=e[o]?(e[0]|=r?1:2,n[e[o++]]):e[++o];r===Pj?s[0]=a:r===Ij?s[1]=Object.assign(s[1]||{},a):r===Lj?(s[1]=s[1]||{})[e[++o]]=a:r===k2t?s[1][e[++o]]+=a+"":r?(i=t.apply(a,Oj(t,a,n,["",null])),s.push(i),a[0]?e[0]|=2:(e[o-2]=Tj,e[o]=i)):s.push(a)}return s},C2t=function(t){let e=hh,n="",s="",i=[0],o,r;const a=l=>{e===hh&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(Tj,l,n):e===v0&&(l||n)?(i.push(Pj,l,n),e=g0):e===g0&&n==="..."&&l?i.push(Ij,l,0):e===g0&&n&&!l?i.push(Lj,0,!0,n):e>=$m&&((n||!l&&e===$m)&&(i.push(e,0,n,r),e=oC),l&&(i.push(e,l,0,r),e=oC)),n=""};for(let l=0;l<t.length;l++){l&&(e===hh&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===hh?o==="<"?(a(),i=[i],e=v0):n+=o:e===XT?n==="--"&&o===">"?(e=hh,n=""):n=o+n[0]:s?o===s?s="":n+=o:o==='"'||o==="'"?s=o:o===">"?(a(),e=hh):e&&(o==="="?(e=$m,r=n,n=""):o==="/"&&(e<$m||t[l][c+1]===">")?(a(),e===v0&&(i=i[0]),e=i,(i=i[0]).push(x2t,0,e),e=w2t):o===" "||o===" "||o===`
984 `||o==="\r"?(a(),e=g0):n+=o),e===v0&&n==="!--"&&(e=XT,i=i[0])}return a(),i},S2t=new Map;function Mt(t){let e=S2t;return e=Oj(Ej,e.get(t)||(e.set(t,e=C2t(t)),e),arguments,[]),e.length>1?e:e[0]}var jS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},fh=(t,e,n)=>(jS(t,e,"read from private field"),n?n.call(t):e.get(t)),ph=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},mh=(t,e,n,s)=>(jS(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),$2t=(t,e,n)=>(jS(t,e,"access private method"),n),$y,Ay,Am,Em,Ey,rC,Dj;let WS=class{constructor(e){ph(this,rC),ph(this,$y,void 0),ph(this,Ay,void 0),ph(this,Am,void 0),ph(this,Em,void 0),ph(this,Ey,void 0),mh(this,Am,!1),this.onShow=()=>{},this.onHide=()=>{},mh(this,Ey,(n,s)=>{var i;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=s&&s.doc.eq(l)&&s.selection.eq(a);if(fh(this,Am)||((i=n.dom.parentElement)==null||i.appendChild(this.element),mh(this,Am,!0)),!(r||h)){if(!fh(this,Ay).call(this,n,s)){this.hide();return}Zx({getBoundingClientRect:()=>y2(n,u,d)},this.element,{placement:"top",middleware:[Kx(),Xx(fh(this,Em))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{O2(fh(this,Ey),fh(this,$y))(n,s)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&Zx(n,this.element,{placement:"top",middleware:[Kx(),Xx(fh(this,Em))]}).then(({x:s,y:i})=>{Object.assign(this.element.style,{left:`${s}px`,top:`${i}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=e.content,mh(this,$y,e.debounce??200),mh(this,Ay,e.shouldShow??$2t(this,rC,Dj)),mh(this,Em,e.offset),this.element.dataset.show="false"}};$y=new WeakMap,Ay=new WeakMap,Am=new WeakMap,Em=new WeakMap,Ey=new WeakMap,rC=new WeakSet,Dj=function(t){const{doc:e,selection:n}=t.state,{empty:s,from:i,to:o}=n,r=!e.textBetween(i,o).length&&t.state.selection instanceof It,a=this.element.contains(document.activeElement),l=!t.hasFocus()&&!a,c=!t.editable;return!(l||s||r||c)};function YS(t){const e=ps({},`${t}_TOOLTIP_SPEC`),n=Ts(i=>{const o=i.get(e.key);return new rs({key:new fs(`${t}_TOOLTIP`),...o})}),s=[e,n];return s.key=e.key,s.pluginKey=n.key,e.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${t}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${t}`},s}function Rj(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Rj(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Zs(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Rj(t))&&(s&&(s+=" "),s+=e);return s}var A2t=Object.defineProperty,KT=Object.getOwnPropertySymbols,E2t=Object.prototype.hasOwnProperty,M2t=Object.prototype.propertyIsEnumerable,ZT=(t,e,n)=>e in t?A2t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T2t=(t,e)=>{for(var n in e||(e={}))E2t.call(e,n)&&ZT(t,n,e[n]);if(KT)for(var n of KT(e))M2t.call(e,n)&&ZT(t,n,e[n]);return t};function Kd(t,e){return Object.assign(t,{meta:T2t({package:"@milkdown/components"},e)}),t}var P2t=Object.defineProperty,JT=Object.getOwnPropertySymbols,I2t=Object.prototype.hasOwnProperty,L2t=Object.prototype.propertyIsEnumerable,QT=(t,e,n)=>e in t?P2t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qS=(t,e)=>{for(var n in e||(e={}))I2t.call(e,n)&&QT(t,n,e[n]);if(JT)for(var n of JT(e))L2t.call(e,n)&&QT(t,n,e[n]);return t};const O2t={mode:"preview"},bl=ps(qS({},O2t),"linkTooltipStateCtx");Kd(bl,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const D2t={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},ep=ps(qS({},D2t),"linkTooltipAPICtx");Kd(bl,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const R2t={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>Mt`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},G2=ps(qS({},R2t),"linkTooltipConfigCtx");Kd(bl,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const kv=YS("LINK_PREVIEW");Kd(kv[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});Kd(kv[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const X2=YS("LINK_EDIT");Kd(X2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});Kd(X2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function V2t(t,e,n,s,i){let o={start:-1,end:-1};return n.nodesBetween(s,i,(r,a)=>{if(o.start>-1)return!1;o.start===-1&&t.isInSet(r.marks)&&e===r&&(o={start:a,end:a+Math.max(r.textContent.length,1)})}),o}function F2t(t,e,n){const s=e.posAtCoords({left:n.clientX,top:n.clientY});if(!s)return;const{pos:i}=s,o=e.state.doc.nodeAt(i);if(!o)return;const r=o.marks.find(l=>l.type===Br.mark.type(t));if(!(!r||!kv.pluginKey()))return{show:!0,pos:i,node:o,mark:r}}function Vj(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}const Fj=({config:t,src:e,onEdit:n,onRemove:s})=>{const i=a=>{a.stopPropagation(),a.preventDefault(),n==null||n()},o=a=>{a.stopPropagation(),a.preventDefault(),s==null||s()};return Mt`
985 <host>
986 <div class="link-preview" onmousedown=${a=>{a.preventDefault(),navigator.clipboard&&e&&navigator.clipboard.writeText(e).then(()=>{t==null||t.onCopyLink(e)}).catch(l=>{throw l})}}>
987 <span class="link-icon">
988 ${t==null?void 0:t.linkIcon()}
989 </span>
990 <a href=${e} target="_blank" class="link-display">${e}</a>
991 <span class="button link-edit-button" onmousedown=${i}>
992 ${t==null?void 0:t.editButton()}
993 </span>
994 <span class="button link-remove-button" onmousedown=${o}>
995 ${t==null?void 0:t.removeButton()}
996 </span>
997 </div>
998 </host>
999 `};Fj.props={config:Object,src:String,onEdit:Function,onRemove:Function};const Nj=Xd(Fj);var Bj=t=>{throw TypeError(t)},zj=(t,e,n)=>e.has(t)||Bj("Cannot "+n),Hn=(t,e,n)=>(zj(t,e,"read from private field"),n?n.call(t):e.get(t)),Fl=(t,e,n)=>e.has(t)?Bj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),y0=(t,e,n,s)=>(zj(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Zl,Cr,Mm,Tm,My,Ty,Py,Pm;class N2t{constructor(e,n){this.ctx=e,Fl(this,Zl,new Nj),Fl(this,Cr),Fl(this,Mm,this.ctx.use(bl.key)),Fl(this,Tm,!1),Fl(this,My,({mode:s})=>{s==="edit"&&Hn(this,Pm).call(this)}),Fl(this,Ty,()=>{y0(this,Tm,!0)}),Fl(this,Py,()=>{y0(this,Tm,!1)}),Fl(this,Pm,()=>{Hn(this,Cr).hide(),Hn(this,Cr).element.removeEventListener("mouseenter",Hn(this,Ty)),Hn(this,Cr).element.removeEventListener("mouseleave",Hn(this,Py))}),this.show=(s,i,o,r)=>{Hn(this,Zl).config=this.ctx.get(G2.key),Hn(this,Zl).src=s.attrs.href,Hn(this,Zl).onEdit=()=>{this.ctx.get(ep.key).editLink(s,i,o)},Hn(this,Zl).onRemove=()=>{this.ctx.get(ep.key).removeLink(i,o),Hn(this,Pm).call(this)},Hn(this,Cr).show({getBoundingClientRect:()=>r}),Hn(this,Cr).element.addEventListener("mouseenter",Hn(this,Ty)),Hn(this,Cr).element.addEventListener("mouseleave",Hn(this,Py))},this.hide=()=>{Hn(this,Tm)||Hn(this,Pm).call(this)},this.update=()=>{},this.destroy=()=>{Hn(this,Mm).off(Hn(this,My)),Hn(this,Cr).destroy(),Hn(this,Zl).remove()},y0(this,Cr,new WS({debounce:0,content:Hn(this,Zl),shouldShow:()=>!1})),Hn(this,Cr).update(n),y0(this,Mm,e.use(bl.key)),Hn(this,Mm).on(Hn(this,My))}}Zl=new WeakMap;Cr=new WeakMap;Mm=new WeakMap;Tm=new WeakMap;My=new WeakMap;Ty=new WeakMap;Py=new WeakMap;Pm=new WeakMap;Vj("milkdown-link-preview",Nj);function B2t(t){let e;const s=O2((o,r)=>{if(!e||!o.hasFocus()||t.get(bl.key).mode==="edit")return;const l=F2t(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=V2t(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,y2(o,d,h));return}e.hide()},200),i=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(kv.key,{props:{handleDOMEvents:{mousemove:s,mouseleave:i}},view:o=>(e=new N2t(t,o),e)})}const Hj=({src:t,onConfirm:e,onCancel:n,config:s})=>{const i=nd(),[o,r]=Er(t);wd(()=>{r(t??"")},[t]);const a=()=>{var c,u;e==null||e((u=(c=i.current)==null?void 0:c.value)!=null?u:"")},l=c=>{var u,d;c.stopPropagation(),c.key==="Enter"&&(e==null||e((d=(u=i.current)==null?void 0:u.value)!=null?d:""),c.preventDefault()),c.key==="Escape"&&(n==null||n(),c.preventDefault())};return Mt`
1000 <host>
1001 <div class="link-edit">
1002 <input
1003 class="input-area"
1004 placeholder=${s==null?void 0:s.inputPlaceholder}
1005 ref=${i}
1006 onkeydown=${l}
1007 oninput=${c=>r(c.target.value)}
1008 value=${o}
1009 />
1010 <span class=${Zs("button confirm",!o&&"hidden")} onclick=${a}>
1011 ${s==null?void 0:s.confirmButton()}
1012 </span>
1013 </div>
1014 </host>
1015 `};Hj.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const Uj=Xd(Hj);var z2t=Object.defineProperty,H2t=Object.defineProperties,U2t=Object.getOwnPropertyDescriptors,eP=Object.getOwnPropertySymbols,j2t=Object.prototype.hasOwnProperty,W2t=Object.prototype.propertyIsEnumerable,jj=t=>{throw TypeError(t)},tP=(t,e,n)=>e in t?z2t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b0=(t,e)=>{for(var n in e||(e={}))j2t.call(e,n)&&tP(t,n,e[n]);if(eP)for(var n of eP(e))W2t.call(e,n)&&tP(t,n,e[n]);return t},nP=(t,e)=>H2t(t,U2t(e)),Wj=(t,e,n)=>e.has(t)||jj("Cannot "+n),ls=(t,e,n)=>(Wj(t,e,"read from private field"),n?n.call(t):e.get(t)),gh=(t,e,n)=>e.has(t)?jj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),_0=(t,e,n,s)=>(Wj(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),aa,Jl,Ql,xu,aC,Iy;const sP={from:-1,to:-1,mark:null};class Y2t{constructor(e,n){this.ctx=e,gh(this,aa,new Uj),gh(this,Jl),gh(this,Ql,b0({},sP)),gh(this,xu,()=>{ls(this,Jl).hide(),this.ctx.update(bl.key,s=>nP(b0({},s),{mode:"preview"})),_0(this,Ql,b0({},sP))}),gh(this,aC,s=>{const i=this.ctx.get(Yn),{from:o,to:r,mark:a}=ls(this,Ql),l=Br.type(this.ctx);if(a&&a.attrs.href===s){ls(this,xu).call(this);return}const c=i.state.tr;a&&c.removeMark(o,r,a),c.addMark(o,r,l.create({href:s})),i.dispatch(c),ls(this,xu).call(this)}),gh(this,Iy,(s,i,o)=>{const r=this.ctx.get(G2.key);ls(this,aa).config=r,ls(this,aa).src=s,this.ctx.update(bl.key,l=>nP(b0({},l),{mode:"edit"}));const a=this.ctx.get(Yn);a.dispatch(a.state.tr.setSelection(It.create(a.state.doc,i,o))),ls(this,Jl).show({getBoundingClientRect:()=>y2(a,i,o)}),requestAnimationFrame(()=>{var l;(l=ls(this,aa).querySelector("input"))==null||l.focus()})}),this.update=s=>{const{state:i}=s,{selection:o}=i;if(!(o instanceof It))return;const{from:r,to:a}=o;r===ls(this,Ql).from&&a===ls(this,Ql).to||ls(this,xu).call(this)},this.destroy=()=>{ls(this,Jl).destroy(),ls(this,aa).remove()},this.addLink=(s,i)=>{_0(this,Ql,{from:s,to:i,mark:null}),ls(this,Iy).call(this,"",s,i)},this.editLink=(s,i,o)=>{_0(this,Ql,{from:i,to:o,mark:s}),ls(this,Iy).call(this,s.attrs.href,i,o)},this.removeLink=(s,i)=>{const o=this.ctx.get(Yn),r=o.state.tr;r.removeMark(s,i,Br.type(this.ctx)),o.dispatch(r),ls(this,xu).call(this)},_0(this,Jl,new WS({content:ls(this,aa),debounce:0,shouldShow:()=>!1})),ls(this,Jl).onHide=()=>{ls(this,aa).update().catch(s=>{throw s}),n.dom.focus({preventScroll:!0})},ls(this,Jl).update(n),ls(this,aa).onConfirm=ls(this,aC),ls(this,aa).onCancel=ls(this,xu)}}aa=new WeakMap;Jl=new WeakMap;Ql=new WeakMap;xu=new WeakMap;aC=new WeakMap;Iy=new WeakMap;var q2t=Object.defineProperty,G2t=Object.defineProperties,X2t=Object.getOwnPropertyDescriptors,iP=Object.getOwnPropertySymbols,K2t=Object.prototype.hasOwnProperty,Z2t=Object.prototype.propertyIsEnumerable,oP=(t,e,n)=>e in t?q2t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2t=(t,e)=>{for(var n in e||(e={}))K2t.call(e,n)&&oP(t,n,e[n]);if(iP)for(var n of iP(e))Z2t.call(e,n)&&oP(t,n,e[n]);return t},Q2t=(t,e)=>G2t(t,X2t(e));Vj("milkdown-link-edit",Uj);function ewt(t){let e;t.update(ep.key,n=>Q2t(J2t({},n),{addLink:(s,i)=>{e==null||e.addLink(s,i)},editLink:(s,i,o)=>{e==null||e.editLink(s,i,o)},removeLink:(s,i)=>{e==null||e.removeLink(s,i)}})),t.set(X2.key,{view:n=>(e=new Y2t(t,n),e)})}function twt(t){B2t(t),ewt(t)}const nwt=[bl,ep,G2,kv,X2].flat();Mt`
1016 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1017 <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
1018 </svg>
1019 `;Mt`
1020 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1021 <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
1022 </svg>
1023 `;Mt`
1024 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1025 <path d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"/>
1026 </svg>
1027 `;const swt=Mt`
1028 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1029 <path d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"/>
1030 </svg>
1031 `;Mt`
1032 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1033 <g clip-path="url(#clip0_952_6527)">
1034 <circle cx="12" cy="12" r="3"/>
1035 </g>
1036 <defs>
1037 <clipPath id="clip0_952_6527">
1038 <rect width="24" height="24"/>
1039 </clipPath>
1040 </defs>
1041 </svg>
1042 `;const iwt=Mt`
1043 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1044 <g clip-path="url(#clip0_977_8070)">
1045 <path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"/>
1046 </g>
1047 <defs>
1048 <clipPath id="clip0_977_8070">
1049 <rect width="24" height="24"/>
1050 </clipPath>
1051 </defs>
1052 </svg>
1053 `,owt=Mt`
1054 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
1055 <path fill="currentColor" d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"/>
1056 </svg>
1057 `;Mt`
1058 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1059 <g clip-path="url(#clip0_1803_1151)">
1060 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"/>
1061 </g>
1062 <defs>
1063 <clipPath id="clip0_1803_1151">
1064 <rect width="24" height="24"/>
1065 </clipPath>
1066 </defs>
1067 </svg>
1068 `;Mt`
1069 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1070 <g clip-path="url(#clip0_1803_535)">
1071 <path d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"/>
1072 </g>
1073 <defs>
1074 <clipPath id="clip0_1803_535">
1075 <rect width="24" height="24"/>
1076 </clipPath>
1077 </defs>
1078 </svg>
1079 `;Mt`
1080 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
1081 <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
1082 </svg>
1083 `;Mt`
1084 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1085 <g clip-path="url(#clip0_1098_15553)">
1086 <path d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"/>
1087 </g>
1088 <defs>
1089 <clipPath id="clip0_1098_15553">
1090 <rect width="24" height="24"/>
1091 </clipPath>
1092 </defs>
1093 </svg>
1094 `;const Yj=Mt`
1095 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1096 <g clip-path="url(#clip0_977_8081)">
1097 <path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"/>
1098 </g>
1099 <defs>
1100 <clipPath id="clip0_977_8081">
1101 <rect width="24" height="24"/>
1102 </clipPath>
1103 </defs>
1104 </svg>
1105 `,qj=Mt`
1106 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
1107 <g clip-path="url(#clip0_1013_1606)">
1108 <path d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z" fill="#817567"/>
1109 </g>
1110 <defs>
1111 <clipPath id="clip0_1013_1606">
1112 <rect width="24" height="24" />
1113 </clipPath>
1114 </defs>
1115 </svg>
1116 `;Mt`
1117 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1118 <g clip-path="url(#clip0_977_7900)">
1119 <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"/>
1120 </g>
1121 <defs>
1122 <clipPath id="clip0_977_7900">
1123 <rect width="24" height="24"/>
1124 </clipPath>
1125 </defs>
1126 </svg>
1127 `;Mt`
1128 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
1129 <path d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"/>
1130 </svg>
1131 `;const rwt=Mt`
1132 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1133 <g clip-path="url(#clip0_1013_1585)">
1134 <path d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"/>
1135 </g>
1136 <defs>
1137 <clipPath id="clip0_1013_1585">
1138 <rect width="24" height="24"/>
1139 </clipPath>
1140 </defs>
1141 </svg>
1142 `;Mt`
1143 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1144 <g clip-path="url(#clip0_992_5553)">
1145 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"/>
1146 </g>
1147 <defs>
1148 <clipPath id="clip0_992_5553">
1149 <rect width="24" height="24"/>
1150 </clipPath>
1151 </defs>
1152 </svg>
1153 `;const awt=Mt`
1154 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1155 <g clip-path="url(#clip0_992_5559)">
1156 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15H11V13H13C14.1 13 15 12.11 15 11V9C15 7.89 14.1 7 13 7H9V9H13V11H11C9.9 11 9 11.89 9 13V17H15V15Z"/>
1157 </g>
1158 <defs>
1159 <clipPath id="clip0_992_5559">
1160 <rect width="24" height="24"/>
1161 </clipPath>
1162 </defs>
1163 </svg>
1164 `,lwt=Mt`
1165 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1166 <g clip-path="url(#clip0_992_5565)">
1167 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13.5C15 12.67 14.33 12 13.5 12C14.33 12 15 11.33 15 10.5V9C15 7.89 14.1 7 13 7H9V9H13V11H11V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
1168 </g>
1169 <defs>
1170 <clipPath id="clip0_992_5565">
1171 <rect width="24" height="24"/>
1172 </clipPath>
1173 </defs>
1174 </svg>
1175 `,cwt=Mt`
1176 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1177 <g clip-path="url(#clip0_977_7757)">
1178 <path d="M19.04 3H5.04004C3.94004 3 3.04004 3.9 3.04004 5V19C3.04004 20.1 3.94004 21 5.04004 21H19.04C20.14 21 21.04 20.1 21.04 19V5C21.04 3.9 20.14 3 19.04 3ZM19.04 19H5.04004V5H19.04V19ZM13.04 17H15.04V7H13.04V11H11.04V7H9.04004V13H13.04V17Z"/>
1179 </g>
1180 <defs>
1181 <clipPath id="clip0_977_7757">
1182 <rect width="24" height="24"/>
1183 </clipPath>
1184 </defs>
1185 </svg>
1186 `;Mt`
1187 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1188 <g clip-path="url(#clip0_977_7760)">
1189 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H9V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
1190 </g>
1191 <defs>
1192 <clipPath id="clip0_977_7760">
1193 <rect width="24" height="24"/>
1194 </clipPath>
1195 </defs>
1196 </svg>
1197 `;Mt`
1198 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1199 <g clip-path="url(#clip0_977_7763)">
1200 <path d="M11 17H13C14.1 17 15 16.11 15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H11C9.9 7 9 7.89 9 9V15C9 16.11 9.9 17 11 17ZM11 13H13V15H11V13ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z"/>
1201 </g>
1202 <defs>
1203 <clipPath id="clip0_977_7763">
1204 <rect width="24" height="24"/>
1205 </clipPath>
1206 </defs>
1207 </svg>
1208 `;const lC=Mt`
1209 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1210 <g clip-path="url(#clip0_977_8075)">
1211 <path d="M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14.14 11.86L11.14 15.73L9 13.14L6 17H18L14.14 11.86Z"/>
1212 </g>
1213 <defs>
1214 <clipPath id="clip0_977_8075">
1215 <rect width="24" height="24"/>
1216 </clipPath>
1217 </defs>
1218 </svg>
1219 `,uwt=Mt`
1220 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1221 <path d="M6.29811 18.625C6.04505 18.625 5.83115 18.5375 5.65641 18.3626C5.48166 18.1877 5.39429 17.9736 5.39429 17.7203C5.39429 17.467 5.48166 17.2532 5.65641 17.0788C5.83115 16.9045 6.04505 16.8173 6.29811 16.8173H9.21159L12.452 7.18265H9.53851C9.28545 7.18265 9.07155 7.0952 8.89681 6.9203C8.72206 6.7454 8.63469 6.5313 8.63469 6.278C8.63469 6.02472 8.72206 5.81089 8.89681 5.63652C9.07155 5.46217 9.28545 5.375 9.53851 5.375H16.8847C17.1377 5.375 17.3516 5.46245 17.5264 5.63735C17.7011 5.81225 17.7885 6.02634 17.7885 6.27962C17.7885 6.53293 17.7011 6.74676 17.5264 6.92113C17.3516 7.09548 17.1377 7.18265 16.8847 7.18265H14.2789L11.0385 16.8173H13.6443C13.8973 16.8173 14.1112 16.9048 14.286 17.0797C14.4607 17.2546 14.5481 17.4687 14.5481 17.722C14.5481 17.9752 14.4607 18.1891 14.286 18.3634C14.1112 18.5378 13.8973 18.625 13.6443 18.625H6.29811Z"/>
1222 </svg>
1223 `,Gj=Mt`
1224 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1225 <path d="M17.0385 19.5003V16.5388H14.0769V15.0388H17.0385V12.0773H18.5384V15.0388H21.5V16.5388H18.5384V19.5003H17.0385ZM10.8077 16.5388H7.03845C5.78282 16.5388 4.7125 16.0963 3.8275 15.2114C2.9425 14.3266 2.5 13.2564 2.5 12.0009C2.5 10.7454 2.9425 9.67504 3.8275 8.78979C4.7125 7.90454 5.78282 7.46191 7.03845 7.46191H10.8077V8.96186H7.03845C6.1987 8.96186 5.48235 9.25834 4.8894 9.85129C4.29645 10.4442 3.99998 11.1606 3.99998 12.0003C3.99998 12.8401 4.29645 13.5564 4.8894 14.1494C5.48235 14.7423 6.1987 15.0388 7.03845 15.0388H10.8077V16.5388ZM8.25 12.7503V11.2504H15.75V12.7503H8.25ZM21.5 12.0003H20C20 11.1606 19.7035 10.4442 19.1106 9.85129C18.5176 9.25834 17.8013 8.96186 16.9615 8.96186H13.1923V7.46191H16.9615C18.2171 7.46191 19.2875 7.90441 20.1725 8.78939C21.0575 9.67439 21.5 10.7447 21.5 12.0003Z"/>
1226 </svg>
1227 `;Mt`
1228 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1229 <g clip-path="url(#clip0_971_7680)">
1230 <path d="M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z" />
1231 </g>
1232 <defs>
1233 <clipPath id="clip0_971_7680">
1234 <rect width="24" height="24"/>
1235 </clipPath>
1236 </defs>
1237 </svg>
1238 `;const dwt=Mt`
1239 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1240 <g clip-path="url(#clip0_977_8067)">
1241 <path d="M8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6C7 6.55 7.45 7 8 7ZM20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17ZM20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11ZM4.5 16H2.5C2.22 16 2 16.22 2 16.5C2 16.78 2.22 17 2.5 17H4V17.5H3.5C3.22 17.5 3 17.72 3 18C3 18.28 3.22 18.5 3.5 18.5H4V19H2.5C2.22 19 2 19.22 2 19.5C2 19.78 2.22 20 2.5 20H4.5C4.78 20 5 19.78 5 19.5V16.5C5 16.22 4.78 16 4.5 16ZM2.5 5H3V7.5C3 7.78 3.22 8 3.5 8C3.78 8 4 7.78 4 7.5V4.5C4 4.22 3.78 4 3.5 4H2.5C2.22 4 2 4.22 2 4.5C2 4.78 2.22 5 2.5 5ZM4.5 10H2.5C2.22 10 2 10.22 2 10.5C2 10.78 2.22 11 2.5 11H3.8L2.12 12.96C2.04 13.05 2 13.17 2 13.28V13.5C2 13.78 2.22 14 2.5 14H4.5C4.78 14 5 13.78 5 13.5C5 13.22 4.78 13 4.5 13H3.2L4.88 11.04C4.96 10.95 5 10.83 5 10.72V10.5C5 10.22 4.78 10 4.5 10Z"/>
1242 </g>
1243 <defs>
1244 <clipPath id="clip0_977_8067">
1245 <rect width="24" height="24"/>
1246 </clipPath>
1247 </defs>
1248 </svg>
1249 `;Mt`
1250 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1251 <g clip-path="url(#clip0_971_7676)">
1252 <path d="M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z"/>
1253 </g>
1254 <defs>
1255 <clipPath id="clip0_971_7676">
1256 <rect width="24" height="24"/>
1257 </clipPath>
1258 </defs>
1259 </svg>
1260 `;const hwt=Mt`
1261 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1262 <g clip-path="url(#clip0_977_7897)">
1263 <path d="M7.17 17C7.68 17 8.15 16.71 8.37 16.26L9.79 13.42C9.93 13.14 10 12.84 10 12.53V8C10 7.45 9.55 7 9 7H5C4.45 7 4 7.45 4 8V12C4 12.55 4.45 13 5 13H7L5.97 15.06C5.52 15.95 6.17 17 7.17 17ZM17.17 17C17.68 17 18.15 16.71 18.37 16.26L19.79 13.42C19.93 13.14 20 12.84 20 12.53V8C20 7.45 19.55 7 19 7H15C14.45 7 14 7.45 14 8V12C14 12.55 14.45 13 15 13H17L15.97 15.06C15.52 15.95 16.17 17 17.17 17Z"/>
1264 </g>
1265 <defs>
1266 <clipPath id="clip0_977_7897">
1267 <rect width="24" height="24"/>
1268 </clipPath>
1269 </defs>
1270 </svg>
1271 `,fwt=Mt`
1272 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1273 <path d="M7.30775 20.4997C6.81058 20.4997 6.385 20.3227 6.031 19.9687C5.677 19.6147 5.5 19.1892 5.5 18.692V5.99973H5.25C5.0375 5.99973 4.85942 5.92782 4.71575 5.78398C4.57192 5.64015 4.5 5.46198 4.5 5.24948C4.5 5.03682 4.57192 4.85873 4.71575 4.71523C4.85942 4.57157 5.0375 4.49973 5.25 4.49973H9C9 4.2549 9.08625 4.04624 9.25875 3.87374C9.43108 3.7014 9.63967 3.61523 9.8845 3.61523H14.1155C14.3603 3.61523 14.5689 3.7014 14.7413 3.87374C14.9138 4.04624 15 4.2549 15 4.49973H18.75C18.9625 4.49973 19.1406 4.57165 19.2843 4.71548C19.4281 4.85932 19.5 5.03748 19.5 5.24998C19.5 5.46265 19.4281 5.64073 19.2843 5.78423C19.1406 5.9279 18.9625 5.99973 18.75 5.99973H18.5V18.692C18.5 19.1892 18.323 19.6147 17.969 19.9687C17.615 20.3227 17.1894 20.4997 16.6923 20.4997H7.30775ZM17 5.99973H7V18.692C7 18.7818 7.02883 18.8556 7.0865 18.9132C7.14417 18.9709 7.21792 18.9997 7.30775 18.9997H16.6923C16.7821 18.9997 16.8558 18.9709 16.9135 18.9132C16.9712 18.8556 17 18.7818 17 18.692V5.99973ZM10.1543 16.9997C10.3668 16.9997 10.5448 16.9279 10.6885 16.7842C10.832 16.6404 10.9037 16.4622 10.9037 16.2497V8.74973C10.9037 8.53723 10.8318 8.35907 10.688 8.21523C10.5443 8.07157 10.3662 7.99973 10.1535 7.99973C9.941 7.99973 9.76292 8.07157 9.61925 8.21523C9.47575 8.35907 9.404 8.53723 9.404 8.74973V16.2497C9.404 16.4622 9.47583 16.6404 9.6195 16.7842C9.76333 16.9279 9.94158 16.9997 10.1543 16.9997ZM13.8465 16.9997C14.059 16.9997 14.2371 16.9279 14.3807 16.7842C14.5243 16.6404 14.596 16.4622 14.596 16.2497V8.74973C14.596 8.53723 14.5242 8.35907 14.3805 8.21523C14.2367 8.07157 14.0584 7.99973 13.8458 7.99973C13.6333 7.99973 13.4552 8.07157 13.3115 8.21523C13.168 8.35907 13.0962 8.53723 13.0962 8.74973V16.2497C13.0962 16.4622 13.1682 16.6404 13.312 16.7842C13.4557 16.9279 13.6338 16.9997 13.8465 16.9997Z"/>
1274 </svg>
1275 `;Mt`
1276 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
1277 <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
1278 </svg>
1279 `;const pwt=Mt`
1280 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1281 <path d="M3.25 13.7404C3.0375 13.7404 2.85938 13.6684 2.71563 13.5246C2.57188 13.3808 2.5 13.2026 2.5 12.99C2.5 12.7774 2.57188 12.5993 2.71563 12.4558C2.85938 12.3122 3.0375 12.2404 3.25 12.2404H20.75C20.9625 12.2404 21.1406 12.3123 21.2843 12.4561C21.4281 12.5999 21.5 12.7781 21.5 12.9907C21.5 13.2033 21.4281 13.3814 21.2843 13.525C21.1406 13.6686 20.9625 13.7404 20.75 13.7404H3.25ZM10.9423 10.2596V6.62495H6.5673C6.2735 6.62495 6.02377 6.52201 5.8181 6.31613C5.61245 6.11026 5.50963 5.86027 5.50963 5.56615C5.50963 5.27205 5.61245 5.02083 5.8181 4.8125C6.02377 4.60417 6.2735 4.5 6.5673 4.5H17.4423C17.7361 4.5 17.9858 4.60294 18.1915 4.80883C18.3971 5.01471 18.5 5.2647 18.5 5.5588C18.5 5.85292 18.3971 6.10413 18.1915 6.31245C17.9858 6.52078 17.7361 6.62495 17.4423 6.62495H13.0673V10.2596H10.9423ZM10.9423 15.7211H13.0673V18.4423C13.0673 18.7361 12.9643 18.9858 12.7584 19.1915C12.5526 19.3971 12.3026 19.5 12.0085 19.5C11.7144 19.5 11.4631 19.3962 11.2548 19.1887C11.0465 18.9811 10.9423 18.7291 10.9423 18.4327V15.7211Z"/>
1282 </svg>
1283 `;Mt`
1284 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1285 <g clip-path="url(#clip0_977_8078)">
1286 <path d="M20 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 5V8H5V5H20ZM15 19H10V10H15V19ZM5 10H8V19H5V10ZM17 19V10H20V19H17Z"/>
1287 </g>
1288 <defs>
1289 <clipPath id="clip0_977_8078">
1290 <rect width="24" height="24"/>
1291 </clipPath>
1292 </defs>
1293 </svg>
1294 `;const mwt=Mt`
1295 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1296 <g clip-path="url(#clip0_992_5547)">
1297 <path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z"/>
1298 </g>
1299 <defs>
1300 <clipPath id="clip0_992_5547">
1301 <rect width="24" height="24"/>
1302 </clipPath>
1303 </defs>
1304 </svg>
1305 `;Mt`
1306 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1307 <path d="M5.66936 16.3389L9.39244 12.6158C9.54115 12.4671 9.71679 12.3937 9.91936 12.3957C10.1219 12.3976 10.2975 12.4761 10.4463 12.6312C10.5847 12.7823 10.654 12.9585 10.654 13.1599C10.654 13.3613 10.5847 13.5363 10.4463 13.6851L6.32704 17.8197C6.14627 18.0004 5.93538 18.0908 5.69436 18.0908C5.45333 18.0908 5.24243 18.0004 5.06166 17.8197L3.01744 15.7754C2.87899 15.637 2.81136 15.4629 2.81456 15.2533C2.81776 15.0437 2.88859 14.8697 3.02706 14.7312C3.16551 14.5928 3.34008 14.5235 3.55076 14.5235C3.76144 14.5235 3.93494 14.5928 4.07126 14.7312L5.66936 16.3389ZM5.66936 8.72359L9.39244 5.00049C9.54115 4.85177 9.71679 4.77838 9.91936 4.78031C10.1219 4.78223 10.2975 4.86075 10.4463 5.01586C10.5847 5.16691 10.654 5.34314 10.654 5.54454C10.654 5.74592 10.5847 5.92097 10.4463 6.06969L6.32704 10.2043C6.14627 10.3851 5.93538 10.4755 5.69436 10.4755C5.45333 10.4755 5.24243 10.3851 5.06166 10.2043L3.01744 8.16009C2.87899 8.02162 2.81136 7.84759 2.81456 7.63799C2.81776 7.42837 2.88859 7.25433 3.02706 7.11586C3.16551 6.97741 3.34008 6.90819 3.55076 6.90819C3.76144 6.90819 3.93494 6.97741 4.07126 7.11586L5.66936 8.72359ZM13.7597 16.5581C13.5472 16.5581 13.3691 16.4862 13.2253 16.3424C13.0816 16.1986 13.0097 16.0204 13.0097 15.8078C13.0097 15.5952 13.0816 15.4171 13.2253 15.2735C13.3691 15.13 13.5472 15.0582 13.7597 15.0582H20.7597C20.9722 15.0582 21.1503 15.1301 21.2941 15.2739C21.4378 15.4177 21.5097 15.5959 21.5097 15.8085C21.5097 16.0211 21.4378 16.1992 21.2941 16.3427C21.1503 16.4863 20.9722 16.5581 20.7597 16.5581H13.7597ZM13.7597 8.94276C13.5472 8.94276 13.3691 8.87085 13.2253 8.72704C13.0816 8.58324 13.0097 8.40504 13.0097 8.19244C13.0097 7.97985 13.0816 7.80177 13.2253 7.65819C13.3691 7.5146 13.5472 7.44281 13.7597 7.44281H20.7597C20.9722 7.44281 21.1503 7.51471 21.2941 7.65851C21.4378 7.80233 21.5097 7.98053 21.5097 8.19311C21.5097 8.40571 21.4378 8.5838 21.2941 8.72739C21.1503 8.87097 20.9722 8.94276 20.7597 8.94276H13.7597Z"/>
1308 </svg>
1309 `;const gwt=(t,e)=>{t.config(twt).config(n=>{n.update(G2.key,s=>({...s,linkIcon:(e==null?void 0:e.linkIcon)??(()=>Gj),editButton:(e==null?void 0:e.editButton)??(()=>rwt),removeButton:(e==null?void 0:e.removeButton)??(()=>fwt),confirmButton:(e==null?void 0:e.confirmButton)??(()=>qj),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(nwt)},vwt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:gwt},Symbol.toStringTag,{value:"Module"}));var Xj="Expected a function",rP=0/0,ywt="[object Symbol]",bwt=/^\s+|\s+$/g,_wt=/^[-+]0x[0-9a-f]+$/i,wwt=/^0b[01]+$/i,xwt=/^0o[0-7]+$/i,kwt=parseInt,Cwt=typeof xs=="object"&&xs&&xs.Object===Object&&xs,Swt=typeof self=="object"&&self&&self.Object===Object&&self,$wt=Cwt||Swt||Function("return this")(),Awt=Object.prototype,Ewt=Awt.toString,Mwt=Math.max,Twt=Math.min,sx=function(){return $wt.Date.now()};function Pwt(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(Xj);e=aP(e)||0,i_(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Mwt(aP(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var P=s,T=i;return s=i=void 0,c=E,r=t.apply(T,P),r}function p(E){return c=E,a=setTimeout(_,e),u?f(E):r}function m(E){var P=E-l,T=E-c,L=e-P;return d?Twt(L,o-T):L}function b(E){var P=E-l,T=E-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var E=sx();if(b(E))return x(E);a=setTimeout(_,m(E))}function x(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function C(){return a===void 0?r:x(sx())}function S(){var E=sx(),P=b(E);if(s=arguments,i=this,l=E,P){if(a===void 0)return p(l);if(d)return a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),r}return S.cancel=k,S.flush=C,S}function Iwt(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(Xj);return i_(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),Pwt(t,e,{leading:s,maxWait:e,trailing:i})}function i_(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Lwt(t){return!!t&&typeof t=="object"}function Owt(t){return typeof t=="symbol"||Lwt(t)&&Ewt.call(t)==ywt}function aP(t){if(typeof t=="number")return t;if(Owt(t))return rP;if(i_(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=i_(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(bwt,"");var n=wwt.test(t);return n||xwt.test(t)?kwt(t.slice(2),n?2:8):_wt.test(t)?rP:+t}var Dwt=Iwt;const Rwt=fi(Dwt);var Kj=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xn=(t,e,n)=>(Kj(t,e,"read from private field"),n?n.call(t):e.get(t)),yi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Un=(t,e,n,s)=>(Kj(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function K2(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const Vwt=t=>!q5(e=>e.type.name==="table")(t),Cv=ps({filterNodes:Vwt},"blockConfig");K2(Cv,{displayName:"Ctx<blockConfig>"});function Fwt(t,e,n){var s;if(!t.dom.parentElement)return null;try{const i=(s=t.posAtCoords({left:e.x,top:e.y}))==null?void 0:s.inside;if(i==null||i<0)return null;let o=t.state.doc.resolve(i),r=t.state.doc.nodeAt(i),a=t.nodeDOM(i);const l=u=>{const d=o.depth>=1&&o.index(o.depth)===0;if(!(u||d))return;const h=o.before(o.depth);r=t.state.doc.nodeAt(h),a=t.nodeDOM(h),o=t.state.doc.resolve(h),n(o,r)||l(!0)},c=n(o,r);return l(!c),!a||!r?null:{node:r,$pos:o,el:a}}catch{return null}}let lP=null;function Nwt(){return lP||(lP=document.implementation.createHTMLDocument("title"))}const Bwt={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function zwt(t,e){const n=[];let{openStart:s,openEnd:i,content:o}=e;for(;s>1&&i>1&&o.childCount===1&&o.firstChild.childCount===1;){s-=1,i-=1;const f=o.firstChild;n.push(f.type.name,f.attrs!==f.type.defaultAttrs?f.attrs:null),o=f.content}const r=t.someProp("clipboardSerializer")||Kc.fromSchema(t.state.schema),a=Nwt(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=Bwt[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){const p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType===1&&c.setAttribute("data-pm-slice",`${s} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);const h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
1310
1311 `);return{dom:l,text:h}}const cP=l0.ie&&l0.ie_version<15||l0.ios&&l0.webkit_version<604,uP=20;var bg,Ly,Rh,la,Im,ca,cC,Zj,Vh,Lm,Fh,Nh,Oy,Om,Dm,Rm,Dy,Bh;class Hwt{constructor(){yi(this,cC),yi(this,Vh),yi(this,bg,void 0),yi(this,Ly,void 0),yi(this,Rh,void 0),yi(this,la,void 0),yi(this,Im,void 0),yi(this,ca,void 0),yi(this,Fh,void 0),yi(this,Nh,void 0),yi(this,Oy,void 0),yi(this,Om,void 0),yi(this,Dm,void 0),yi(this,Rm,void 0),yi(this,Dy,void 0),yi(this,Bh,void 0),Un(this,Ly,()=>{if(!xn(this,la))return null;const e=xn(this,la),n=xn(this,Vh,Lm);if(n&&Ot.isSelectable(e.node)){const s=Ot.create(n.state.doc,e.$pos.pos);return n.dispatch(n.state.tr.setSelection(s)),n.focus(),Un(this,Rh,s),s}return null}),Un(this,Rh,null),Un(this,la,null),Un(this,Im,void 0),Un(this,ca,!1),Un(this,Nh,()=>{var e;(e=xn(this,Fh))==null||e.call(this,{type:"hide"}),Un(this,la,null)}),Un(this,Oy,e=>{var n;Un(this,la,e),(n=xn(this,Fh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Un(this,bg,e),Un(this,Fh,n)},this.addEvent=e=>{e.addEventListener("mousedown",xn(this,Om)),e.addEventListener("mouseup",xn(this,Dm)),e.addEventListener("dragstart",xn(this,Rm))},this.removeEvent=e=>{e.removeEventListener("mousedown",xn(this,Om)),e.removeEventListener("mouseup",xn(this,Dm)),e.removeEventListener("dragstart",xn(this,Rm))},this.unBind=()=>{Un(this,Fh,void 0)},Un(this,Om,()=>{var e;Un(this,Im,(e=xn(this,la))==null?void 0:e.el.getBoundingClientRect()),xn(this,Ly).call(this)}),Un(this,Dm,()=>{if(!xn(this,ca)){requestAnimationFrame(()=>{var e;xn(this,Im)&&((e=xn(this,Vh,Lm))==null||e.focus())});return}Un(this,ca,!1),Un(this,Rh,null)}),Un(this,Rm,e=>{var n;Un(this,ca,!0);const s=xn(this,Vh,Lm);if(!s)return;s.dom.dataset.dragging="true";const i=xn(this,Rh);if(e.dataTransfer&&i){const o=i.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=zwt(s,o);e.dataTransfer.clearData(),e.dataTransfer.setData(cP?"Text":"text/html",r.innerHTML),cP||e.dataTransfer.setData("text/plain",a);const l=(n=xn(this,la))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),s.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(xn(this,Nh).call(this),Un(this,ca,!1),e.dom.dataset.dragging="false",!1),Un(this,Dy,Rwt((e,n)=>{if(!e.editable)return;const s=e.dom.getBoundingClientRect(),i=s.left+s.width/2;if(!(e.root.elementFromPoint(i,n.clientY)instanceof Element)){xn(this,Nh).call(this);return}const o=xn(this,cC,Zj);if(!o)return;const r=Fwt(e,{x:i,y:n.clientY},o);if(!r){xn(this,Nh).call(this);return}xn(this,Oy).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||xn(this,Dy).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var s;if(xn(this,ca)){const i=(s=xn(this,Vh,Lm))==null?void 0:s.dom.parentElement;if(!i)return!1;const o=i.scrollHeight>i.clientHeight,r=i.getBoundingClientRect();if(o){if(i.scrollTop>0&&Math.abs(n.y-r.y)<uP){const l=i.scrollTop>10?i.scrollTop-10:0;return i.scrollTop=l,!1}const a=Math.round(e.dom.getBoundingClientRect().height);if(Math.round(i.scrollTop+r.height)<a&&Math.abs(n.y-(r.height+r.y))<uP){const l=i.scrollTop+10;return i.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Un(this,ca,!0),e.dom.dataset.dragging="true")},this.dragleaveCallback=(e,n)=>{const s=n.clientX,i=n.clientY;(s<0||i<0||s>window.innerWidth||i>window.innerHeight)&&(Un(this,la,null),xn(this,Bh).call(this,e))},this.dropCallback=e=>(xn(this,Bh).call(this,e),!1),this.dragendCallback=e=>{xn(this,Bh).call(this,e)},Un(this,Bh,e=>{Un(this,ca,!1),e.dom.dataset.dragging="false"})}}bg=new WeakMap,Ly=new WeakMap,Rh=new WeakMap,la=new WeakMap,Im=new WeakMap,ca=new WeakMap,cC=new WeakSet,Zj=function(){var t;return(t=xn(this,bg))==null?void 0:t.get(Cv.key).filterNodes},Vh=new WeakSet,Lm=function(){var t;return(t=xn(this,bg))==null?void 0:t.get(Yn)},Fh=new WeakMap,Nh=new WeakMap,Oy=new WeakMap,Om=new WeakMap,Dm=new WeakMap,Rm=new WeakMap,Dy=new WeakMap,Bh=new WeakMap;const Jj=ps(new Hwt,"blockService");K2(Cv,{displayName:"Ctx<blockService>"});const GS=ps({},"blockSpec");K2(Cv,{displayName:"Ctx<blockSpec>"});const XS=Ts(t=>{const e=new fs("MILKDOWN_BLOCK"),n=t.get(Jj.key),s=t.get(GS.key);return new rs({key:e,...s,props:{...s.props,handleDOMEvents:{drop:i=>n.dropCallback(i),pointermove:(i,o)=>n.mousemoveCallback(i,o),keydown:i=>n.keydownCallback(i),dragover:(i,o)=>n.dragoverCallback(i,o),dragleave:(i,o)=>n.dragleaveCallback(i,o),dragenter:i=>n.dragenterCallback(i),dragend:i=>n.dragendCallback(i)}}})});K2(XS,{displayName:"Prose<block>"});const KS=[GS,Cv,Jj,XS];KS.key=GS.key;KS.pluginKey=XS.key;var ZS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},pc=(t,e,n)=>(ZS(t,e,"read from private field"),n?n.call(t):e.get(t)),cu=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},uu=(t,e,n,s)=>(ZS(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Uwt=(t,e,n)=>(ZS(t,e,"access private method"),n);function jwt(t){const e=ps({},`${t}_SLASH_SPEC`),n=Ts(i=>{const o=i.get(e.key);return new rs({key:new fs(`${t}_SLASH`),...o})}),s=[e,n];return s.key=e.key,s.pluginKey=n.key,e.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${t}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${t}`},s}var Vm,Ry,jh,Vy,Fy,Ny,uC,Qj;class Wwt{constructor(e){cu(this,uC),cu(this,Vm,void 0),cu(this,Ry,void 0),cu(this,jh,void 0),cu(this,Vy,void 0),cu(this,Fy,void 0),cu(this,Ny,void 0),uu(this,Vm,!1),this.onShow=()=>{},this.onHide=()=>{},uu(this,Ny,(n,s)=>{var i;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=s&&s.doc.eq(l)&&s.selection.eq(a);if(pc(this,Vm)||((i=n.dom.parentElement)==null||i.appendChild(this.element),uu(this,Vm,!0)),!(r||h)){if(!pc(this,Vy).call(this,n,s)){this.hide();return}Zx({getBoundingClientRect:()=>y2(n,u,d)},this.element,{placement:"bottom-start",middleware:[Kx(),Xx(pc(this,Fy))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{O2(pc(this,Ny),pc(this,Ry))(n,s)},this.getContent=(n,s=i=>i.type.name==="paragraph")=>{const{selection:i}=n.state,{empty:o,$from:r}=i,a=n.state.selection instanceof It,l=this.element.contains(document.activeElement),c=!n.hasFocus()&&!l,u=!n.editable,d=!M8e(s)(n.state.selection);if(!(c||u||!o||!a||d))return r.parent.textBetween(Math.max(0,r.parentOffset-500),r.parentOffset,void 0,"")},this.destroy=()=>{},this.show=()=>{this.element.dataset.show="true",this.onShow()},this.hide=()=>{this.element.dataset.show="false",this.onHide()},this.element=e.content,uu(this,Ry,e.debounce??200),uu(this,Vy,e.shouldShow??Uwt(this,uC,Qj)),uu(this,jh,e.trigger??"/"),uu(this,Fy,e.offset)}}Vm=new WeakMap,Ry=new WeakMap,jh=new WeakMap,Vy=new WeakMap,Fy=new WeakMap,Ny=new WeakMap,uC=new WeakSet,Qj=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(pc(this,jh))?pc(this,jh).includes(n):pc(this,jh)===n:!1};function eW(t){return t.$from.parent.type.name==="code_block"}function tW(t){var n;const e=(n=t.$from.node(t.$from.depth-1))==null?void 0:n.type;return(e==null?void 0:e.name)==="list_item"}function nW(t,e){customElements.get(t)==null&&customElements.define(t,e)}var Ywt=Object.defineProperty,dP=Object.getOwnPropertySymbols,qwt=Object.prototype.hasOwnProperty,Gwt=Object.prototype.propertyIsEnumerable,hP=(t,e,n)=>e in t?Ywt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xwt=(t,e)=>{for(var n in e||(e={}))qwt.call(e,n)&&hP(t,n,e[n]);if(dP)for(var n of dP(e))Gwt.call(e,n)&&hP(t,n,e[n]);return t};function Sv(t,e){return Object.assign(t,{meta:Xwt({package:"@milkdown/components"},e)}),t}var Kwt=Object.defineProperty,fP=Object.getOwnPropertySymbols,Zwt=Object.prototype.hasOwnProperty,Jwt=Object.prototype.propertyIsEnumerable,pP=(t,e,n)=>e in t?Kwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qwt=(t,e)=>{for(var n in e||(e={}))Zwt.call(e,n)&&pP(t,n,e[n]);if(fP)for(var n of fP(e))Jwt.call(e,n)&&pP(t,n,e[n]);return t};const dC="image-block",Z2=Ns("image-block",()=>({inline:!1,group:"block",selectable:!0,draggable:!0,isolating:!0,marks:"",atom:!0,priority:100,attrs:{src:{default:""},caption:{default:""},ratio:{default:1}},parseDOM:[{tag:`img[data-type="${dC}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw Qr(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",Qwt({"data-type":dC},t.attrs)],parseMarkdown:{match:({type:t})=>t==="image-block",runner:(t,e,n)=>{const s=e.url,i=e.title;let o=Number(e.alt||1);(Number.isNaN(o)||o===0)&&(o=1),t.addNode(n,{src:s,caption:i,ratio:o})}},toMarkdown:{match:t=>t.type.name==="image-block",runner:(t,e)=>{t.openNode("paragraph"),t.addNode("image",void 0,void 0,{title:e.attrs.caption,url:e.attrs.src,alt:`${Number.parseFloat(e.attrs.ratio).toFixed(2)}`}),t.closeNode()}}}));Sv(Z2.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function e3t(t){return Bd(t,"paragraph",(e,n,s)=>{var i,o;if(((i=e.children)==null?void 0:i.length)!==1)return;const r=(o=e.children)==null?void 0:o[0];if(!r||r.type!=="image")return;const{url:a,alt:l,title:c}=r,u={type:"image-block",url:a,alt:l,title:c};s.children.splice(n,1,u)})}const JS=zd("remark-image-block",()=>()=>e3t);Sv(JS.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});Sv(JS.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const t3t={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>Mt`Upload file`,confirmButton:()=>Mt`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},J2=ps(t3t,"imageBlockConfigCtx");Sv(J2,{displayName:"Config<image-block>",group:"ImageBlock"});function n3t(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}function s3t({image:t,resizeHandle:e,ratio:n,setRatio:s,src:i}){const o=US(),r=s_(()=>o.current.getRootNode(),[o]);wd(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[i]),wd(()=>{const a=e.current,l=t.current;if(!a||!l)return;const c=f=>{f.preventDefault();const p=l.getBoundingClientRect().top,m=f.clientY-p,b=Number(m<100?100:m).toFixed(2);l.dataset.height=b,l.style.height=`${b}px`},u=()=>{r.removeEventListener("pointermove",c),r.removeEventListener("pointerup",u);const f=Number(l.dataset.origin),p=Number(l.dataset.height),m=Number.parseFloat(Number(p/f).toFixed(2));Number.isNaN(m)||s(m)},d=f=>{f.preventDefault(),r.addEventListener("pointermove",c),r.addEventListener("pointerup",u)},h=f=>{const p=o.current.getBoundingClientRect().width;if(!p)return;const m=f.target,b=m.height,_=m.width,x=_<p?b:p*(b/_),k=(x*n).toFixed(2);l.dataset.origin=x.toFixed(2),l.dataset.height=k,l.style.height=`${k}px`};return l.addEventListener("load",h),a.addEventListener("pointerdown",d),()=>{l.removeEventListener("load",h),a.removeEventListener("pointerdown",d)}},[])}var i3t=(t,e,n)=>new Promise((s,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},r=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});let vh=0;const sW=({src:t="",caption:e="",ratio:n=1,selected:s=!1,readonly:i=!1,setAttr:o,config:r})=>{const a=nd(),l=nd(),c=nd(),[u,d]=Er(e.length>0),[h,f]=Er(t.length!==0),[p]=Er(crypto.randomUUID()),[m,b]=Er(!1),[_,x]=Er(t);s3t({image:a,resizeHandle:l,ratio:n,setRatio:R=>o==null?void 0:o("ratio",R),src:t}),wd(()=>{s||d(e.length>0)},[s]);const k=R=>{const F=R.target.value;vh&&window.clearTimeout(vh),vh=window.setTimeout(()=>{o==null||o("caption",F)},1e3)},C=R=>{const F=R.target.value;vh&&(window.clearTimeout(vh),vh=0),o==null||o("caption",F)},S=R=>{const F=R.target.value;f(F.length!==0),x(F)},E=R=>i3t(void 0,null,function*(){var N;const F=(N=R.target.files)==null?void 0:N[0];if(!F)return;const B=yield r==null?void 0:r.onUpload(F);B&&(o==null||o("src",B),f(!0))}),P=R=>{R.preventDefault(),R.stopPropagation(),!i&&d(N=>!N)},T=()=>{var R,N;o==null||o("src",(N=(R=c.current)==null?void 0:R.value)!=null?N:"")},L=R=>{R.key==="Enter"&&T()},I=R=>{R.preventDefault(),R.stopPropagation()},V=R=>{R.stopPropagation(),R.preventDefault()};return Mt`<host class=${Zs(s&&"selected")}>
1312 <div class=${Zs("image-edit",t.length>0&&"hidden")}>
1313 <div class="image-icon">
1314 ${r==null?void 0:r.imageIcon()}
1315 </div>
1316 <div class=${Zs("link-importer",m&&"focus")}>
1317 <input
1318 ref=${c}
1319 draggable="true"
1320 ondragstart=${I}
1321 disabled=${i}
1322 class="link-input-area"
1323 value=${_}
1324 oninput=${S}
1325 onkeydown=${L}
1326 onfocus=${()=>b(!0)}
1327 onblur=${()=>b(!1)}
1328 />
1329 <div class=${Zs("placeholder",h&&"hidden")}>
1330 <input disabled=${i} class="hidden" id=${p} type="file" accept="image/*" onchange=${E} />
1331 <label onpointerdown=${V} class="uploader" for=${p}>
1332 ${r==null?void 0:r.uploadButton()}
1333 </label>
1334 <span class="text" onclick=${()=>{var R;return(R=c.current)==null?void 0:R.focus()}}>
1335 ${r==null?void 0:r.uploadPlaceholderText}
1336 </span>
1337 </div>
1338 </div>
1339 <div
1340 class=${Zs("confirm",_.length===0&&"hidden")}
1341 onclick=${()=>T()}
1342 >
1343 ${r==null?void 0:r.confirmButton()}
1344 </div>
1345 </div>
1346 <div class=${Zs("image-wrapper",t.length===0&&"hidden")}>
1347 <div class="operation">
1348 <div class="operation-item" onpointerdown=${P}>${r==null?void 0:r.captionIcon()}</div>
1349 </div>
1350 <img ref=${a} data-type=${dC} src=${t} alt=${e} ratio=${n} />
1351 <div ref=${l} class="image-resize-handle"></div>
1352 </div>
1353 <input
1354 draggable="true"
1355 ondragstart=${I}
1356 class=${Zs("caption-input",!u&&"hidden")}
1357 placeholder=${r==null?void 0:r.captionPlaceholderText}
1358 oninput=${k}
1359 onblur=${C}
1360 value=${e}
1361 />
1362 </host>`};sW.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const o3t=Xd(sW);n3t("milkdown-image-block",o3t);const iW=lz(Z2.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-block"),o=t.get(J2.key),r=a=>{i.src=a.attrs.src,i.ratio=a.attrs.ratio,i.caption=a.attrs.caption,i.readonly=!n.editable};return r(e),i.selected=!1,i.setAttr=(a,l)=>{const c=s();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},i.config=o,{dom:i,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>a.target instanceof HTMLInputElement,selectNode:()=>{i.selected=!0},deselectNode:()=>{i.selected=!1},destroy:()=>{i.remove()}}});Sv(iW,{displayName:"NodeView<image-block>",group:"ImageBlock"});const r3t=[JS,Z2,iW,J2].flat();function QS(t){const{$from:e,$to:n}=t.selection,{pos:s}=e,{pos:i}=n;return t=t.deleteRange(s-e.node().content.size,i),t}function a3t(t,e,n=null){const{from:s,to:i}=t.selection;return t.setBlockType(s,i,e,n)}function l3t(t,e,n=null){const{$from:s,$to:i}=t.selection,o=s.blockRange(i),r=o&&U5(o,e,n);return r?t.wrap(o,r):null}function c3t(t,e,n=null){const s=e.createAndFill(n);return s?t.replaceSelectionWith(s):null}function w0(t,e=null){return(n,s)=>{if(s){const i=a3t(QS(n.tr),t,e);s(i.scrollIntoView())}return!0}}function ix(t,e=null){return(n,s)=>{const i=l3t(QS(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}function mP(t,e=null){return(n,s)=>{const i=c3t(QS(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}var mc,gf;class u3t{constructor(){sa(this,mc,void 0);sa(this,gf,void 0);Zi(this,mc,[]),this.clear=()=>(Zi(this,mc,[]),this),Zi(this,gf,e=>{const n={group:e,addItem:(s,i)=>{const o={key:s,...i};return e.items.push(o),n},clear:()=>(e.items=[],n)};return n}),this.addGroup=(e,n)=>{const i={key:e,label:n,items:[]};return Ht(this,mc).push(i),Ht(this,gf).call(this,i)},this.getGroup=e=>{const n=Ht(this,mc).find(s=>s.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Ht(this,gf).call(this,n)},this.build=()=>Ht(this,mc)}}mc=new WeakMap,gf=new WeakMap;function Go(t){return window.fluentComAdmin.i18n[t]||t}typeof crypto<"u"&&!crypto.randomUUID&&(crypto.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})});function d3t(t,e){var o,r,a,l,c,u,d,h,f,p;const n=new u3t;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??Go("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??Go("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??mwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;w0(El.type(m))(x,_)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??Go("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??awt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;w0(_a.type(m),{level:2})(x,_)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??Go("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??lwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;w0(_a.type(m),{level:3})(x,_)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??Go("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??cwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;w0(_a.type(m),{level:4})(x,_)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??Go("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??hwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;ix(gp.type(m))(x,_)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??Go("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??Yj,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;mP(vp.type(m))(x,_)}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??Go("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??Go("Bullet List"),icon:((d=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:d.call(e))??iwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;ix(jd.type(m))(x,_)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??Go("Ordered List"),icon:((h=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:h.call(e))??dwt,onRun:m=>{const b=m.get(Yn),{dispatch:_,state:x}=b;ix(Wd.type(m))(x,_)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??Go("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??Go("Image"),icon:((f=e==null?void 0:e.slashMenuImageIcon)==null?void 0:f.call(e))??lC,onRun:m=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const b=m.get(Yn),{dispatch:_,state:x}=b;mP(Z2.type(m))(x,_)}}),(p=e==null?void 0:e.buildMenu)==null||p.call(e,n);let s=n.build();t&&(s=s.map(m=>{const b=m.items.filter(_=>_.label.toLowerCase().includes(t.toLowerCase()));return{...m,items:b}}).filter(m=>m.items.length>0));const i=s.flatMap(m=>m.items);return i.forEach((m,b)=>{Object.assign(m,{index:b})}),s.reduce((m,b)=>{const _=m+b.items.length;return Object.assign(b,{range:[m,_]}),_},0),{groups:s,size:i.length}}const oW=({show:t,hide:e,ctx:n,filter:s,config:i})=>{const{groups:o,size:r}=s_(()=>d3t(s,i),[s]),a=US(),[l,c]=Er(0),u=s_(()=>a.current.getRootNode(),[a]),d=nd({x:-999,y:-999}),h=dh(x=>{const k=d.current;if(!k)return;const{x:C,y:S}=x;k.x=C,k.y=S},[]);wd(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=dh((x,k)=>{c(C=>{const S=typeof x=="function"?x(C):x;return k==null||k(S),S})},[]),p=dh(x=>{const k=a.current.querySelector(`[data-index="${x}"]`),C=a.current.querySelector(".menu-groups");!k||!C||(C.scrollTop=k.offsetTop-C.offsetTop)},[]),m=dh(x=>{const k=o.flatMap(C=>C.items).at(x);k&&n&&k.onRun(n),e==null||e()},[o]),b=dh(x=>{if(x.key==="Escape"){x.preventDefault(),e==null||e();return}if(x.key==="ArrowDown")return x.preventDefault(),f(k=>k<r-1?k+1:k,p);if(x.key==="ArrowUp")return x.preventDefault(),f(k=>k<=0?k:k-1,p);if(x.key==="ArrowLeft")return x.preventDefault(),f(k=>{const C=o.find(E=>E.range[0]<=k&&E.range[1]>k);if(!C)return k;const S=o[o.indexOf(C)-1];return S?S.range[1]-1:k},p);if(x.key==="ArrowRight")return x.preventDefault(),f(k=>{const C=o.find(E=>E.range[0]<=k&&E.range[1]>k);if(!C)return k;const S=o[o.indexOf(C)+1];return S?S.range[0]:k},p);x.key==="Enter"&&(x.preventDefault(),m(l))},[e,o,l]),_=dh(x=>k=>{const C=d.current;if(!C)return;const{x:S,y:E}=k;S===C.x&&E===C.y||f(x)},[]);return wd(()=>(t?u.addEventListener("keydown",b,{capture:!0}):u.removeEventListener("keydown",b,{capture:!0}),()=>{u.removeEventListener("keydown",b,{capture:!0})}),[t,b]),Mt`
1363 <host onmousedown=${x=>x.preventDefault()}>
1364 <div class="menu-groups" onmousemove=${h}>
1365 ${o.map(x=>Mt`
1366 <div key=${x.key} class="menu-group">
1367 <ul>
1368 ${x.items.map(k=>Mt`<li
1369 key=${k.key}
1370 data-index=${k.index}
1371 class=${l===k.index?"hover":""}
1372 onmouseenter=${_(k.index)}
1373 onmousedown=${()=>{var C;(C=a.current.querySelector(`[data-index="${k.index}"]`))==null||C.classList.add("active")}}
1374 onmouseup=${()=>{var C;(C=a.current.querySelector(`[data-index="${k.index}"]`))==null||C.classList.remove("active"),m(k.index)}}
1375 >
1376 ${k.icon}
1377 <span>${k.label}</span>
1378 </li>`)}
1379 </ul>
1380 </div>
1381 `)}
1382 </div>
1383 </host>
1384 `};oW.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const rW=Xd(oW),aW=jwt("CREPE_MENU"),lW=ps({show:()=>{},hide:()=>{}},"menuAPICtx");nW("milkdown-slash-menu",rW);function h3t(t,e){t.set(aW.key,{view:n=>new f3t(t,n,e)})}var Co,pa,gc;class f3t{constructor(e,n,s){sa(this,Co,void 0);sa(this,pa,void 0);sa(this,gc,void 0);Zi(this,gc,null),this.update=o=>{Ht(this,pa).update(o)},this.show=o=>{Zi(this,gc,o),Ht(this,Co).filter="",Ht(this,pa).show()},this.hide=()=>{Zi(this,gc,null),Ht(this,pa).hide()},this.destroy=()=>{Ht(this,pa).destroy(),Ht(this,Co).remove()},Zi(this,Co,new rW),Ht(this,Co).hide=this.hide,Ht(this,Co).ctx=e,Ht(this,Co).config=s;const i=this;Zi(this,pa,new Wwt({content:Ht(this,Co),debounce:20,shouldShow(o){if(eW(o.state.selection)||tW(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Ht(i,gc);return Ht(i,Co).filter=r.startsWith("/")?r.slice(1):r,typeof a=="number"?o.state.doc.resolve(a).node()!==o.state.doc.resolve(o.state.selection.from).node()?(Zi(i,gc,null),!1):!0:!!r.startsWith("/")},offset:10})),Ht(this,pa).onShow=()=>{Ht(this,Co).show=!0},Ht(this,pa).onHide=()=>{Ht(this,Co).show=!1},this.update(n),e.set(lW.key,{show:o=>this.show(o),hide:()=>this.hide()})}}Co=new WeakMap,pa=new WeakMap,gc=new WeakMap;const p3t=(t,e)=>{t.config(n=>h3t(n,e)).use(lW).use(KS).use(aW)},m3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:p3t},Symbol.toStringTag,{value:"Module"}));function g3t(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function v3t(t,e){const{selection:n}=t;if(!n.empty)return null;const s=n.$anchor,i=s.parent;if(i.content.size>0||q5(a=>a.type.name==="table")(s))return null;const r=s.before();return Ds.node(r,r+i.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const o_=ps({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),cW=Ts(t=>new rs({key:new fs("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(o_.key);if(n.mode==="doc"&&!g3t(e.doc)||eW(e.selection)||tW(e.selection))return null;const s=n.text??"Please enter...",i=v3t(e,s);return i?Gn.create(e.doc,[i]):null}}})),y3t=(t,e)=>{t.config(n=>{e&&n.update(o_.key,s=>({...s,...e}))}).use(cW).use(o_)},b3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:y3t,placeholderConfig:o_,placeholderPlugin:cW},Symbol.toStringTag,{value:"Module"})),uW=({ctx:t,hide:e,show:n,config:s})=>{var a,l,c,u,d;const i=_j();wd(()=>{i()},[n]);const o=h=>f=>{f.preventDefault(),t&&h(t),i()},r=h=>{if(!t)return!1;const f=t.get(Yn),{state:{doc:p,selection:m}}=f;return p.rangeHasMark(m.from,m.to,h)};return Mt`<host>
1385 <button
1386 class=${Zs("toolbar-item",t&&r(mp.type(t))&&"active")}
1387 onmousedown=${o(h=>{h.get(pn).call(A2.key)})}
1388 >
1389 ${((a=s==null?void 0:s.boldIcon)==null?void 0:a.call(s))??swt}
1390 </button>
1391 <button
1392 class=${Zs("toolbar-item",t&&r(Hd.type(t))&&"active")}
1393 onmousedown=${o(h=>{h.get(pn).call($2.key)})}
1394 >
1395 ${((l=s==null?void 0:s.italicIcon)==null?void 0:l.call(s))??uwt}
1396 </button>
1397 <button
1398 class=${Zs("toolbar-item",t&&r(yp.type(t))&&"active")}
1399 onmousedown=${o(h=>{h.get(pn).call(P2.key)})}
1400 >
1401 ${((c=s==null?void 0:s.strikethroughIcon)==null?void 0:c.call(s))??pwt}
1402 </button>
1403 <div class="divider"></div>
1404 <button
1405 class=${Zs("toolbar-item",t&&r(ol.type(t))&&"active")}
1406 onmousedown=${o(h=>{h.get(pn).call(E2.key)})}
1407 >
1408 ${((u=s==null?void 0:s.codeIcon)==null?void 0:u.call(s))??Yj}
1409 </button>
1410 <button
1411 class=${Zs("toolbar-item",t&&r(Br.type(t))&&"active")}
1412 onmousedown=${o(h=>{const f=h.get(Yn),{selection:p}=f.state;if(r(Br.type(h))){h.get(ep.key).removeLink(p.from,p.to);return}h.get(ep.key).addLink(p.from,p.to),e==null||e()})}
1413 >
1414 ${((d=s==null?void 0:s.linkIcon)==null?void 0:d.call(s))??Gj}
1415 </button>
1416 </host>`};uW.props={ctx:Object,hide:Function,show:Boolean,config:Object};const dW=Xd(uW),gP=YS("CREPE_TOOLBAR");var Ja,no;class _3t{constructor(e,n,s){sa(this,Ja,void 0);sa(this,no,void 0);this.update=(o,r)=>{Ht(this,Ja).update(o,r)},this.destroy=()=>{Ht(this,Ja).destroy(),Ht(this,no).remove()},this.hide=()=>{Ht(this,Ja).hide()};const i=new dW;Zi(this,no,i),Ht(this,no).ctx=e,Ht(this,no).hide=this.hide,Ht(this,no).config=s,Zi(this,Ja,new WS({content:Ht(this,no),debounce:20,offset:10,shouldShow(o){const{doc:r,selection:a}=o.state,{empty:l,from:c,to:u}=a,d=!r.textBetween(c,u).length&&a instanceof It,h=!(a instanceof It),f=o.dom.getRootNode().activeElement,p=i.contains(f),m=!o.hasFocus()&&!p,b=!o.editable;return!(m||h||l||d||b)}})),Ht(this,Ja).onShow=()=>{Ht(this,no).show=!0,setTimeout(()=>{let o=Ht(this,no).style.left;o=parseInt(o),o<0?Ht(this,no).style.left=0:o>350&&(Ht(this,no).style.left="350px")},0)},Ht(this,Ja).onHide=()=>{Ht(this,no).show=!1},this.update(n)}}Ja=new WeakMap,no=new WeakMap;nW("milkdown-toolbar",dW);const w3t=(t,e)=>{t.config(n=>{n.set(gP.key,{view:s=>new _3t(n,s,e)})}).use(gP)},x3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:w3t},Symbol.toStringTag,{value:"Module"}));var k3t=Object.defineProperty,vP=Object.getOwnPropertySymbols,C3t=Object.prototype.hasOwnProperty,S3t=Object.prototype.propertyIsEnumerable,yP=(t,e,n)=>e in t?k3t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$3t=(t,e)=>{for(var n in e||(e={}))C3t.call(e,n)&&yP(t,n,e[n]);if(vP)for(var n of vP(e))S3t.call(e,n)&&yP(t,n,e[n]);return t};function hW(t,e){return Object.assign(t,{meta:$3t({package:"@milkdown/components"},e)}),t}const A3t={imageIcon:()=>"🌌",uploadButton:()=>Mt`Upload`,confirmButton:()=>Mt`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},Q2=ps(A3t,"inlineImageConfigCtx");hW(Q2,{displayName:"Config<image-inline>",group:"ImageInline"});function E3t(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}var M3t=(t,e,n)=>new Promise((s,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},r=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});const fW=({src:t="",selected:e=!1,alt:n,title:s,setAttr:i,config:o})=>{const r=nd(),[a]=Er(crypto.randomUUID()),[l,c]=Er(!1),[u,d]=Er(t.length!==0),[h,f]=Er(t),p=C=>{const E=C.target.value;d(E.length!==0),f(E)},m=C=>M3t(void 0,null,function*(){var S;const E=(S=C.target.files)==null?void 0:S[0];if(!E)return;const P=yield o==null?void 0:o.onUpload(E);P&&(i==null||i("src",P),d(!0))}),b=()=>{var C,S;i==null||i("src",(S=(C=r.current)==null?void 0:C.value)!=null?S:"")},_=C=>{C.key==="Enter"&&b()},x=C=>{C.preventDefault(),C.stopPropagation()},k=C=>{C.stopPropagation(),C.preventDefault()};return Mt`<host class=${Zs(e&&"selected",!t&&"empty")}>
1417 ${t?Mt`<img class="image-inline" src=${t} alt=${n} title=${s} />`:Mt`<div class="empty-image-inline">
1418 <div class="image-icon">
1419 ${o==null?void 0:o.imageIcon()}
1420 </div>
1421 <div class=${Zs("link-importer",l&&"focus")}>
1422 <input
1423 draggable="true"
1424 ref=${r}
1425 ondragstart=${x}
1426 class="link-input-area"
1427 value=${h}
1428 oninput=${p}
1429 onkeydown=${_}
1430 onfocus=${()=>c(!0)}
1431 onblur=${()=>c(!1)}
1432 />
1433 <div class=${Zs("placeholder",u&&"hidden")}>
1434 <input class="hidden" id=${a} type="file" accept="image/*" onchange=${m} />
1435 <label onpointerdown=${k} class="uploader" for=${a}>
1436 ${o==null?void 0:o.uploadButton()}
1437 </label>
1438 <span class="text" onclick=${()=>{var C;return(C=r.current)==null?void 0:C.focus()}}>
1439 ${o==null?void 0:o.uploadPlaceholderText}
1440 </span>
1441 </div>
1442 </div>
1443 <div
1444 class=${Zs("confirm",h.length===0&&"hidden")}
1445 onclick=${()=>b()}
1446 >
1447 ${o==null?void 0:o.confirmButton()}
1448 </div>
1449 </div>`}
1450 </host>`};fW.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const T3t=Xd(fW);E3t("milkdown-image-inline",T3t);const pW=lz(Ud.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-inline"),o=t.get(Q2.key),r=a=>{i.src=a.attrs.src,i.alt=a.attrs.alt,i.title=a.attrs.title};return r(e),i.selected=!1,i.setAttr=(a,l)=>{const c=s();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},i.config=o,{dom:i,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>!!(i.selected&&a.target instanceof HTMLInputElement),selectNode:()=>{i.selected=!0},deselectNode:()=>{i.selected=!1},destroy:()=>{i.remove()}}});hW(pW,{displayName:"NodeView<image-inline>",group:"ImageInline"});const P3t=[Q2,pW],I3t=(t,e)=>{t.config(n=>{n.update(Q2.key,s=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>lC),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>qj),uploadPlaceholderText:(e==null?void 0:e.inlineUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.inlineOnUpload)??(e==null?void 0:e.onUpload)??s.onUpload})),n.update(J2.key,s=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>lC),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>owt),confirmButton:(e==null?void 0:e.blockConfirmButton)??(()=>"Confirm"),captionPlaceholderText:(e==null?void 0:e.blockCaptionPlaceholderText)??"Write Image Caption",uploadPlaceholderText:(e==null?void 0:e.blockUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.blockOnUpload)??(e==null?void 0:e.onUpload)??s.onUpload}))}).use(r3t).use(P3t)},L3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:I3t},Symbol.toStringTag,{value:"Module"})),O3t=`.fcom_pop_buttons .el-dropdown-menu__item{padding:0;display:block}.fcom_pop_buttons .el-dropdown-menu__item button{padding:15px 30px!important;width:100%;border-radius:0}.fcom_chat_menu .el-badge__content{align-items:center;background-color:var(--el-color-danger);border:1px solid var(--el-color-white);border-radius:10px;color:var(--el-color-white);display:inline-flex;font-size:12px;height:18px;padding:6px;justify-content:center;white-space:nowrap}.fcom_chat_menu .el-badge__content.is-fixed{top:0;z-index:1;transform:translateY(-50%) translate(100%)}.fcom_space_form_bottom{display:flex;justify-content:space-between;align-items:center;width:100%}
1451 `,D3t=Object.freeze(Object.defineProperty({__proto__:null,default:O3t},Symbol.toStringTag,{value:"Module"})),R3t=`.fcom-report-wrap .fcom-report-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.fcom-report-wrap .fcom-report-header h4{font-size:16px;font-weight:500;color:var(--fcom-primary-text, #0E121B);line-height:24px;margin:0}.fcom-report-wrap .fcom-report-header .fcom-report-header-action{display:flex;align-items:center}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .date-selector{border-right:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select{width:150px}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;border:1px solid #E1E4EA;box-shadow:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-date-editor{box-shadow:none;border:1px solid #E1E4EA;border-radius:0 8px 8px 0;max-width:250px}.fcom-report-wrap .fcom-report-body .fcom-report-stat-widgets{margin-bottom:24px}.fcom-report-wrap .fcom-report-chart-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px}.fcom-report-wrap .fcom-report-chart-header .el-select{width:150px}.fcom-report-wrap .fcom-report-chart-header h4{margin:0;display:flex;align-items:center;gap:4px;color:var(--fcom-menu-text, #0E121B);font-size:16px;font-weight:500;line-height:24px;letter-spacing:-.011em}.fcom-report-wrap .fcom-report-chart-header h4 i{color:#99a0ae}.fcom-report-wrap .fcom-report-chart{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;margin-bottom:24px}.fcom-report-wrap .fcom-report-chart .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;overflow:hidden}.fcom-report-popular-time .el-table .el-table__inner-wrapper:before{display:none}.fcom-report-popular-time .el-table .el-table__header thead tr th{background:var(--fcom-primary-border, #F5F7FA);color:var(--fcom-secondary-text, #525866);font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;border:none;padding-top:8px;padding-bottom:8px}.fcom-report-popular-time .el-table .el-table__header thead tr th .cell{padding-left:20px;padding-right:12px}.fcom-report-popular-time .el-table .el-table__body tbody tr{background:var(--fcom-primary-bg, #ffffff)}.fcom-report-popular-time .el-table .el-table__body tbody tr:last-child td{border-bottom:none}.fcom-report-popular-time .el-table .el-table__body tbody tr td{font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;color:var(--fcom-primary-text, #525866);padding-top:14px;padding-bottom:14px;border-bottom-color:var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time .el-table .el-table__body tbody tr td .cell{padding-left:20px;padding-right:12px}.fcom-report-stat-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:24px}.fcom-report-stat-widgets .fcom-report-stat-widget{padding:20px;border-radius:12px;background:var(--fcom-primary-bg, #ffffff)}.fcom-report-stat-widgets .fcom-report-stat-widget .stat-title{display:block;font-size:14px;line-height:20px;color:var(--fcom-primary-text, #525866);letter-spacing:-.006em;margin-bottom:4px}.fcom-report-stat-widgets .fcom-report-stat-widget h3{display:flex;align-items:center;gap:8px;font-size:32px;font-weight:500;line-height:40px;letter-spacing:-.005em;margin:0;color:var(--fcom-primary-text, #0E121B)}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent{display:block;font-size:12px;font-weight:500;line-height:16px;border-radius:30px;color:var(--state-success-dark, #0B4627);background:var(--state-success-light, #C2F5DA);padding:2px 8px}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent.stat-down{background:var(--state-error-light, #FFC0C5);color:var(--state-error-dark, #681219)}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA)}.fcom-members-activity-box{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:var(--fcom-primary-text, #525866);padding:0 4px}.fcom-members-activity-box .points{color:var(--text-strong-950, #0E121B);font-weight:300;display:block;line-height:16px;font-size:12px}.fcom-report-popular-spacers{padding-bottom:20px}.fcom-members-activities-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;margin-bottom:24px;align-items:flex-start}.fcom-members-activities-wrap img{max-width:100%}.fcom-members-activities-wrap .fcom-top-members-wrap{background:var(--fcom-primary-bg, #ffffff);border-radius:12px}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-members-activity-lists{padding:20px}.fcom-members-activity-lists .fcom-members-activity-box:last-child{border-bottom:none;padding-bottom:0}.fcom-members-activity-lists .fcom-members-activity-box:first-child{padding-top:0}.fcom-members-activity-box{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box{position:relative;width:40px;height:40px;border-radius:50%}.fcom-members-activity-box .image-box img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:#fff;padding:0 4px}.fcom-members-activity-box .image-box .indicator{position:absolute;right:0;bottom:5px;width:6px;height:6px;background:var(--state-success-base, #23A682);box-shadow:0 0 0 1.8px #fff;border-radius:50%}.fcom-members-activity-box .image-box .indicator.offline{background:var(--state-faded-base, #717784)}.fcom-members-activity-box .content-box{flex:1}.fcom-members-activity-box .content-box h5{margin:0 0 4px;color:var(--fcom-primary-text, #525866);font-size:14px;font-weight:500;line-height:20px;letter-spacing:-.006em}.fcom-members-activity-box .content-box p{margin:0;line-height:16px;font-size:12px}.fcom-members-activity-box .points{color:var(--fcom-primary-text, #525866);font-weight:300;display:block;line-height:16px;font-size:12px}.el-select.space-selector{margin-right:10px}.el-select.space-selector .el-select__wrapper.el-tooltip__trigger.el-tooltip__trigger{border-top-right-radius:8px;border-bottom-right-radius:8px}
1452 `,V3t=Object.freeze(Object.defineProperty({__proto__:null,default:R3t},Symbol.toStringTag,{value:"Module"}))});export default F3t();
1453