| 1 |
var PW=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var l9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var jt=(t,e,n)=>(l9(t,e,"read from private field"),n?n.call(t):e.get(t)),oa=(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)},Qi=(t,e,n,s)=>(l9(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);var pxt=PW((Lo,Oo)=>{const IW="modulepreload",LW=function(t){return"/"+t},c9={},Mu=function(e,n,s){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=LW(o),o in c9)return;c9[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":IW,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 zo(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const pn={},Kh=[],Dt=()=>{},Yh=()=>!1,Md=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),g6=t=>t.startsWith("onUpdate:"),ln=Object.assign,v6=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},OW=Object.prototype.hasOwnProperty,Nt=(t,e)=>OW.call(t,e),Ee=Array.isArray,Zh=t=>op(t)==="[object Map]",Td=t=>op(t)==="[object Set]",Uy=t=>op(t)==="[object Date]",DW=t=>op(t)==="[object RegExp]",et=t=>typeof t=="function",Ke=t=>typeof t=="string",mo=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",cd=t=>(yt(t)||et(t))&&et(t.then)&&et(t.catch),$P=Object.prototype.toString,op=t=>$P.call(t),RW=t=>op(t).slice(8,-1),ud=t=>op(t)==="[object Object]",c_=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ll=zo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),VW=zo("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u_=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},FW=/-\w/g,Un=u_(t=>t.replace(FW,e=>e.slice(1).toUpperCase())),NW=/\B([A-Z])/g,Bi=u_(t=>t.replace(NW,"-$1").toLowerCase()),Yc=u_(t=>t.charAt(0).toUpperCase()+t.slice(1)),Wu=u_(t=>t?`on${Yc(t)}`:""),Fi=(t,e)=>!Object.is(t,e),Jh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},AP=(t,e,n,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},d_=t=>{const e=parseFloat(t);return isNaN(e)?t:e},jy=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let u9;const h_=()=>u9||(u9=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function BW(t,e){return t+JSON.stringify(e,(n,s)=>typeof s=="function"?s.toString():s)}const zW="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",HW=zo(zW);function Xe(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],i=Ke(s)?EP(s):Xe(s);if(i)for(const o in i)e[o]=i[o]}return e}else if(Ke(t)||yt(t))return t}const UW=/;(?![^(]*\))/g,jW=/:([^]+)/,WW=/\/\*[^]*?\*\//g;function EP(t){const e={};return t.replace(WW,"").split(UW).forEach(n=>{if(n){const s=n.split(jW);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function q(t){let e="";if(Ke(t))e=t;else if(Ee(t))for(let n=0;n<t.length;n++){const s=q(t[n]);s&&(e+=s+" ")}else if(yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Qh(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ke(e)&&(t.class=q(e)),n&&(t.style=Xe(n)),t}const YW="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",qW="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",GW="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",XW="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",KW=zo(YW),ZW=zo(qW),JW=zo(GW),QW=zo(XW),eY="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tY=zo(eY);function MP(t){return!!t||t===""}function nY(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=Lc(t[s],e[s]);return n}function Lc(t,e){if(t===e)return!0;let n=Uy(t),s=Uy(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=mo(t),s=mo(e),n||s)return t===e;if(n=Ee(t),s=Ee(e),n||s)return n&&s?nY(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||!Lc(t[r],e[r]))return!1}}return String(t)===String(e)}function f_(t,e){return t.findIndex(n=>Lc(n,e))}const TP=t=>!!(t&&t.__v_isRef===!0),$=t=>Ke(t)?t:t==null?"":Ee(t)||yt(t)&&(t.toString===$P||!et(t.toString))?TP(t)?$(t.value):JSON.stringify(t,PP,2):String(t),PP=(t,e)=>TP(e)?PP(t,e.value):Zh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[iw(s,o)+" =>"]=i,n),{})}:Td(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>iw(n))}:mo(e)?iw(e):yt(e)&&!Ee(e)&&!ud(e)?String(e):e,iw=(t,e="")=>{var n;return mo(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function sY(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 _i;class y6{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_i,!e&&_i&&(this.index=(_i.scopes||(_i.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=_i;try{return _i=this,e()}finally{_i=n}}}on(){++this._on===1&&(this.prevScope=_i,_i=this)}off(){this._on>0&&--this._on===0&&(_i=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 p_(t){return new y6(t)}function m_(){return _i}function g_(t,e=!1){_i&&_i.cleanups.push(t)}let Gn;const ow=new WeakSet;class Cg{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,_i&&_i.active&&_i.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ow.has(this)&&(ow.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||LP(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,d9(this),OP(this);const e=Gn,n=Lr;Gn=this,Lr=!0;try{return this.fn()}finally{DP(this),Gn=e,Lr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)w6(e);this.deps=this.depsTail=void 0,d9(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ow.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){uk(this)&&this.run()}get dirty(){return uk(this)}}let IP=0,zm,Hm;function LP(t,e=!1){if(t.flags|=8,e){t.next=Hm,Hm=t;return}t.next=zm,zm=t}function b6(){IP++}function _6(){if(--IP>0)return;if(Hm){let e=Hm;for(Hm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;zm;){let e=zm;for(zm=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 OP(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function DP(t){let e,n=t.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),w6(s),iY(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}t.deps=e,t.depsTail=n}function uk(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(RP(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function RP(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===xg)||(t.globalVersion=xg,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!uk(t))))return;t.flags|=2;const e=t.dep,n=Gn,s=Lr;Gn=t,Lr=!0;try{OP(t);const i=t.fn(t._value);(e.version===0||Fi(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{Gn=n,Lr=s,DP(t),t.flags&=-3}}function w6(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)w6(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function iY(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function oY(t,e){t.effect instanceof Cg&&(t=t.effect.fn);const n=new Cg(t);e&&ln(n,e);try{n.run()}catch(i){throw n.stop(),i}const s=n.run.bind(n);return s.effect=n,s}function rY(t){t.effect.stop()}let Lr=!0;const VP=[];function pl(){VP.push(Lr),Lr=!1}function ml(){const t=VP.pop();Lr=t===void 0?!0:t}function d9(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Gn;Gn=void 0;try{e()}finally{Gn=n}}}let xg=0;class aY{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 v_{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(!Gn||!Lr||Gn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gn)n=this.activeLink=new aY(Gn,this),Gn.deps?(n.prevDep=Gn.depsTail,Gn.depsTail.nextDep=n,Gn.depsTail=n):Gn.deps=Gn.depsTail=n,FP(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=Gn.depsTail,n.nextDep=void 0,Gn.depsTail.nextDep=n,Gn.depsTail=n,Gn.deps===n&&(Gn.deps=s)}return n}trigger(e){this.version++,xg++,this.notify(e)}notify(e){b6();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{_6()}}}function FP(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)FP(s)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Wy=new WeakMap,Yu=Symbol(""),dk=Symbol(""),Sg=Symbol("");function Ci(t,e,n){if(Lr&&Gn){let s=Wy.get(t);s||Wy.set(t,s=new Map);let i=s.get(n);i||(s.set(n,i=new v_),i.map=s,i.key=n),i.track()}}function Qa(t,e,n,s,i,o){const r=Wy.get(t);if(!r){xg++;return}const a=l=>{l&&l.trigger()};if(b6(),e==="clear")r.forEach(a);else{const l=Ee(t),c=l&&c_(n);if(l&&n==="length"){const u=Number(s);r.forEach((d,h)=>{(h==="length"||h===Sg||!mo(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(Sg)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Yu)),Zh(t)&&a(r.get(dk)));break;case"delete":l||(a(r.get(Yu)),Zh(t)&&a(r.get(dk)));break;case"set":Zh(t)&&a(r.get(Yu));break}}_6()}function lY(t,e){const n=Wy.get(t);return n&&n.get(e)}function nh(t){const e=rn(t);return e===t?e:(Ci(e,"iterate",Sg),uo(t)?e:e.map(jr))}function y_(t){return Ci(t=rn(t),"iterate",Sg),t}function ic(t,e){return ka(t)?kf(Or(t)?jr(e):e):jr(e)}const cY={__proto__:null,[Symbol.iterator](){return rw(this,Symbol.iterator,t=>ic(this,t))},concat(...t){return nh(this).concat(...t.map(e=>Ee(e)?nh(e):e))},entries(){return rw(this,"entries",t=>(t[1]=ic(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=>ic(this,s)),arguments)},find(t,e){return za(this,"find",t,e,n=>ic(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=>ic(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 aw(this,"includes",t)},indexOf(...t){return aw(this,"indexOf",t)},join(t){return nh(this).join(t)},lastIndexOf(...t){return aw(this,"lastIndexOf",t)},map(t,e){return za(this,"map",t,e,void 0,arguments)},pop(){return Hp(this,"pop")},push(...t){return Hp(this,"push",t)},reduce(t,...e){return h9(this,"reduce",t,e)},reduceRight(t,...e){return h9(this,"reduceRight",t,e)},shift(){return Hp(this,"shift")},some(t,e){return za(this,"some",t,e,void 0,arguments)},splice(...t){return Hp(this,"splice",t)},toReversed(){return nh(this).toReversed()},toSorted(t){return nh(this).toSorted(t)},toSpliced(...t){return nh(this).toSpliced(...t)},unshift(...t){return Hp(this,"unshift",t)},values(){return rw(this,"values",t=>ic(this,t))}};function rw(t,e,n){const s=y_(t),i=s[e]();return s!==t&&!uo(t)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=n(o.value)),o}),i}const uY=Array.prototype;function za(t,e,n,s,i,o){const r=y_(t),a=r!==t&&!uo(t),l=r[e];if(l!==uY[e]){const d=l.apply(t,o);return a?jr(d):d}let c=n;r!==t&&(a?c=function(d,h){return n.call(this,ic(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 h9(t,e,n,s){const i=y_(t);let o=n;return i!==t&&(uo(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,ic(t,a),l,t)}),i[e](o,...s)}function aw(t,e,n){const s=rn(t);Ci(s,"iterate",Sg);const i=s[e](...n);return(i===-1||i===!1)&&x1(n[0])?(n[0]=rn(n[0]),s[e](...n)):i}function Hp(t,e,n=[]){pl(),b6();const s=rn(t)[e].apply(t,n);return _6(),ml(),s}const dY=zo("__proto__,__v_isRef,__isVue"),NP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mo));function hY(t){mo(t)||(t=String(t));const e=rn(this);return Ci(e,"has",t),e.hasOwnProperty(t)}class BP{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?YP:WP:o?jP:UP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const r=Ee(e);if(!i){let l;if(r&&(l=cY[n]))return l;if(n==="hasOwnProperty")return hY}const a=Reflect.get(e,n,hn(e)?e:s);if((mo(n)?NP.has(n):dY(n))||(i||Ci(e,"get",n),o))return a;if(hn(a)){const l=r&&c_(n)?a:a.value;return i&&yt(l)?Oc(l):l}return yt(a)?i?Oc(a):In(a):a}}class zP extends BP{constructor(e=!1){super(!1,e)}set(e,n,s,i){let o=e[n];const r=Ee(e)&&c_(n);if(!this._isShallow){const c=ka(o);if(!uo(s)&&!ka(s)&&(o=rn(o),s=rn(s)),!r&&hn(o)&&!hn(s))return c||(o.value=s),!0}const a=r?Number(n)<e.length:Nt(e,n),l=Reflect.set(e,n,s,hn(e)?e:i);return e===rn(i)&&(a?Fi(s,o)&&Qa(e,"set",n,s):Qa(e,"add",n,s)),l}deleteProperty(e,n){const s=Nt(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(!mo(n)||!NP.has(n))&&Ci(e,"has",n),s}ownKeys(e){return Ci(e,"iterate",Ee(e)?"length":Yu),Reflect.ownKeys(e)}}class HP extends BP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const fY=new zP,pY=new HP,mY=new zP(!0),gY=new HP(!0),hk=t=>t,Pv=t=>Reflect.getPrototypeOf(t);function vY(t,e,n){return function(...s){const i=this.__v_raw,o=rn(i),r=Zh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=i[t](...s),u=n?hk:e?kf:jr;return!e&&Ci(o,"iterate",l?dk:Yu),ln(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 Iv(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function yY(t,e){const n={get(i){const o=this.__v_raw,r=rn(o),a=rn(i);t||(Fi(i,a)&&Ci(r,"get",i),Ci(r,"get",a));const{has:l}=Pv(r),c=e?hk:t?kf:jr;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&&Ci(rn(i),"iterate",Yu),i.size},has(i){const o=this.__v_raw,r=rn(o),a=rn(i);return t||(Fi(i,a)&&Ci(r,"has",i),Ci(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=rn(a),c=e?hk:t?kf:jr;return!t&&Ci(l,"iterate",Yu),a.forEach((u,d)=>i.call(o,c(u),c(d),r))}};return ln(n,t?{add:Iv("add"),set:Iv("set"),delete:Iv("delete"),clear:Iv("clear")}:{add(i){!e&&!uo(i)&&!ka(i)&&(i=rn(i));const o=rn(this);return Pv(o).has.call(o,i)||(o.add(i),Qa(o,"add",i,i)),this},set(i,o){!e&&!uo(o)&&!ka(o)&&(o=rn(o));const r=rn(this),{has:a,get:l}=Pv(r);let c=a.call(r,i);c||(i=rn(i),c=a.call(r,i));const u=l.call(r,i);return r.set(i,o),c?Fi(o,u)&&Qa(r,"set",i,o):Qa(r,"add",i,o),this},delete(i){const o=rn(this),{has:r,get:a}=Pv(o);let l=r.call(o,i);l||(i=rn(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=rn(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]=vY(i,t,e)}),n}function b_(t,e){const n=yY(t,e);return(s,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?s:Reflect.get(Nt(n,i)&&i in s?n:s,i,o)}const bY={get:b_(!1,!1)},_Y={get:b_(!1,!0)},wY={get:b_(!0,!1)},kY={get:b_(!0,!0)},UP=new WeakMap,jP=new WeakMap,WP=new WeakMap,YP=new WeakMap;function CY(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xY(t){return t.__v_skip||!Object.isExtensible(t)?0:CY(RW(t))}function In(t){return ka(t)?t:__(t,!1,fY,bY,UP)}function k6(t){return __(t,!1,mY,_Y,jP)}function Oc(t){return __(t,!0,pY,wY,WP)}function SY(t){return __(t,!0,gY,kY,YP)}function __(t,e,n,s,i){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=xY(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 Or(t){return ka(t)?Or(t.__v_raw):!!(t&&t.__v_isReactive)}function ka(t){return!!(t&&t.__v_isReadonly)}function uo(t){return!!(t&&t.__v_isShallow)}function x1(t){return t?!!t.__v_raw:!1}function rn(t){const e=t&&t.__v_raw;return e?rn(e):t}function Mi(t){return!Nt(t,"__v_skip")&&Object.isExtensible(t)&&AP(t,"__v_skip",!0),t}const jr=t=>yt(t)?In(t):t,kf=t=>yt(t)?Oc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function J(t){return qP(t,!1)}function Fn(t){return qP(t,!0)}function qP(t,e){return hn(t)?t:new $Y(t,e)}class $Y{constructor(e,n){this.dep=new v_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:rn(e),this._value=n?e:jr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,s=this.__v_isShallow||uo(e)||ka(e);e=s?e:rn(e),Fi(e,n)&&(this._rawValue=e,this._value=s?e:jr(e),this.dep.trigger())}}function Um(t){t.dep&&t.dep.trigger()}function A(t){return hn(t)?t.value:t}function fk(t){return et(t)?t():A(t)}const AY={get:(t,e,n)=>e==="__v_raw"?t:A(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 C6(t){return Or(t)?t:new Proxy(t,AY)}class EY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new v_,{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 GP(t){return new EY(t)}function go(t){const e=Ee(t)?new Array(t.length):{};for(const n in t)e[n]=XP(t,n);return e}class MY{constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=rn(e);let i=!0,o=e;if(!Ee(e)||!c_(String(n)))do i=!x1(o)||uo(o);while(i&&(o=o.__v_raw));this._shallow=i}get value(){let e=this._object[this._key];return this._shallow&&(e=A(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 lY(this._raw,this._key)}}class TY{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 Sn(t,e,n){return hn(t)?t:et(t)?new TY(t):yt(t)&&arguments.length>1?XP(t,e,n):J(t)}function XP(t,e,n){return new MY(t,e,n)}class PY{constructor(e,n,s){this.fn=e,this.setter=n,this._value=void 0,this.dep=new v_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xg-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Gn!==this)return LP(this,!0),!0}get value(){const e=this.dep.track();return RP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function IY(t,e,n=!1){let s,i;return et(t)?s=t:(s=t.get,i=t.set),new PY(s,i,n)}const LY={GET:"get",HAS:"has",ITERATE:"iterate"},OY={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Lv={},Yy=new WeakMap;let oc;function DY(){return oc}function KP(t,e=!1,n=oc){if(n){let s=Yy.get(n);s||Yy.set(n,s=[]),s.push(t)}}function RY(t,e,n=pn){const{immediate:s,deep:i,once:o,scheduler:r,augmentJob:a,call:l}=n,c=x=>i?x:uo(x)||i===!1||i===0?el(x,1):el(x);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=uo(t)):Or(t)?(d=()=>c(t),p=!0):Ee(t)?(m=!0,p=t.some(x=>Or(x)||uo(x)),d=()=>t.map(x=>{if(hn(x))return x.value;if(Or(x))return c(x);if(et(x))return l?l(x,2):x()})):et(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){pl();try{h()}finally{ml()}}const x=oc;oc=u;try{return l?l(t,3,[f]):t(f)}finally{oc=x}}:d=Dt,e&&i){const x=d,S=i===!0?1/0:i;d=()=>el(x(),S)}const b=m_(),_=()=>{u.stop(),b&&b.active&&v6(b.effects,u)};if(o&&e){const x=e;e=(...S)=>{x(...S),_()}}let k=m?new Array(t.length).fill(Lv):Lv;const C=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(e){const S=u.run();if(i||p||(m?S.some((M,P)=>Fi(M,k[P])):Fi(S,k))){h&&h();const M=oc;oc=u;try{const P=[S,k===Lv?void 0:m&&k[0]===Lv?[]:k,f];k=S,l?l(e,3,P):e(...P)}finally{oc=M}}}else u.run()};return a&&a(C),u=new Cg(d),u.scheduler=r?()=>r(C,!1):C,f=x=>KP(x,!1,u),h=u.onStop=()=>{const x=Yy.get(u);if(x){if(l)l(x,4);else for(const S of x)S();Yy.delete(u)}},e?s?C(!0):k=u.run():r?r(C.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(Ee(t))for(let s=0;s<t.length;s++)el(t[s],e,n);else if(Td(t)||Zh(t))t.forEach(s=>{el(s,e,n)});else if(ud(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 ZP=[];function VY(t){ZP.push(t)}function FY(){ZP.pop()}function NY(t,e){}const BY={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"},zY={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 rp(t,e,n,s){try{return s?t(...s):t()}catch(i){Pd(i,e,n)}}function mr(t,e,n,s){if(et(t)){const i=rp(t,e,n,s);return i&&cd(i)&&i.catch(o=>{Pd(o,e,n)}),i}if(Ee(t)){const i=[];for(let o=0;o<t.length;o++)i.push(mr(t[o],e,n,s));return i}}function Pd(t,e,n,s=!0){const i=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||pn;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){pl(),rp(o,null,10,[t,l,c]),ml();return}}HY(t,n,i,s,r)}function HY(t,e,n,s=!0,i=!1){if(i)throw t;console.error(t)}const Ni=[];let ha=-1;const ef=[];let rc=null,Ch=0;const JP=Promise.resolve();let qy=null;function ot(t){const e=qy||JP;return t?e.then(this?t.bind(this):t):e}function UY(t){let e=ha+1,n=Ni.length;for(;e<n;){const s=e+n>>>1,i=Ni[s],o=Ag(i);o<t||o===t&&i.flags&2?e=s+1:n=s}return e}function x6(t){if(!(t.flags&1)){const e=Ag(t),n=Ni[Ni.length-1];!n||!(t.flags&2)&&e>=Ag(n)?Ni.push(t):Ni.splice(UY(e),0,t),t.flags|=1,QP()}}function QP(){qy||(qy=JP.then(eI))}function $g(t){Ee(t)?ef.push(...t):rc&&t.id===-1?rc.splice(Ch+1,0,t):t.flags&1||(ef.push(t),t.flags|=1),QP()}function f9(t,e,n=ha+1){for(;n<Ni.length;n++){const s=Ni[n];if(s&&s.flags&2){if(t&&s.id!==t.uid)continue;Ni.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Gy(t){if(ef.length){const e=[...new Set(ef)].sort((n,s)=>Ag(n)-Ag(s));if(ef.length=0,rc){rc.push(...e);return}for(rc=e,Ch=0;Ch<rc.length;Ch++){const n=rc[Ch];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}rc=null,Ch=0}}const Ag=t=>t.id==null?t.flags&2?-1:1/0:t.id;function eI(t){const e=Dt;try{for(ha=0;ha<Ni.length;ha++){const n=Ni[ha];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),rp(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;ha<Ni.length;ha++){const n=Ni[ha];n&&(n.flags&=-2)}ha=-1,Ni.length=0,Gy(),qy=null,(Ni.length||ef.length)&&eI()}}let xh,Ov=[];function tI(t,e){var n,s;xh=t,xh?(xh.enabled=!0,Ov.forEach(({event:i,args:o})=>xh.emit(i,...o)),Ov=[]):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=>{tI(o,e)}),setTimeout(()=>{xh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ov=[])},3e3)):Ov=[]}let ri=null,w_=null;function Eg(t){const e=ri;return ri=t,w_=t&&t.type.__scopeId||null,e}function jY(t){w_=t}function WY(){w_=null}const YY=t=>w;function w(t,e=ri,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&Pg(-1);const o=Eg(e);let r;try{r=t(...i)}finally{Eg(o),s._d&&Pg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Re(t,e){if(ri===null)return t;const n=A1(ri),s=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,r,a,l=pn]=e[i];o&&(et(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 ma(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&&(pl(),mr(l,n,8,[t.el,a,t,e]),ml())}}function Pt(t,e){if(si){let n=si.provides;const s=si.parent&&si.parent.provides;s===n&&(n=si.provides=Object.create(s)),n[t]=e}}function Ye(t,e,n=!1){const s=ht();if(s||qu){let i=qu?qu._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&&et(e)?e.call(s&&s.proxy):e}}function nI(){return!!(ht()||qu)}const sI=Symbol.for("v-scx"),iI=()=>Ye(sI);function gl(t,e){return S1(t,null,e)}function qY(t,e){return S1(t,null,{flush:"post"})}function oI(t,e){return S1(t,null,{flush:"sync"})}function Me(t,e,n){return S1(t,e,n)}function S1(t,e,n=pn){const{immediate:s,deep:i,flush:o,once:r}=n,a=ln({},n),l=e&&s||!e&&o!=="post";let c;if(xf){if(o==="sync"){const f=iI();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Dt,f.resume=Dt,f.pause=Dt,f}}const u=si;a.call=(f,p,m)=>mr(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():x6(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=RY(t,e,a);return xf&&(c?c.push(h):l&&h()),h}function GY(t,e,n){const s=this.proxy,i=Ke(t)?t.includes(".")?rI(s,t):()=>s[t]:t.bind(s,s);let o;et(e)?o=e:(o=e.handler,n=e);const r=hd(this),a=S1(i,o.bind(s),n);return r(),a}function rI(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 aI=Symbol("_vte"),lI=t=>t.__isTeleport,jm=t=>t&&(t.disabled||t.disabled===""),p9=t=>t&&(t.defer||t.defer===""),m9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,g9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,pk=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},cI={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,_=jm(e.props);let{shapeFlag:k,children:C,dynamicChildren:x}=e;if(t==null){const S=e.el=m(""),M=e.anchor=m("");f(S,n,s),f(M,n,s);const P=(I,L)=>{k&16&&u(C,I,L,i,o,r,a,l)},T=()=>{const I=e.target=pk(e.props,p),L=uI(I,e,m,f);I&&(r!=="svg"&&m9(I)?r="svg":r!=="mathml"&&g9(I)&&(r="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(I),_||(P(I,L),S0(e,!1)))};_&&(P(n,M),S0(e,!0)),p9(e.props)?(e.el.__isMounted=!1,$s(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(p9(e.props)&&t.el.__isMounted===!1){$s(()=>{cI.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,M=e.target=t.target,P=e.targetAnchor=t.targetAnchor,T=jm(t.props),I=T?n:M,L=T?S:P;if(r==="svg"||m9(M)?r="svg":(r==="mathml"||g9(M))&&(r="mathml"),x?(h(t.dynamicChildren,x,I,i,o,r,a),R6(t,e,!0)):l||d(t,e,I,L,i,o,r,a,!1),_)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Dv(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=pk(e.props,p);V&&Dv(e,V,null,c,0)}else T&&Dv(e,M,P,c,1);S0(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||!jm(h);for(let p=0;p<a.length;p++){const m=a[p];s(m,e,n,f,!!m.dynamicChildren)}}},move:Dv,hydrate:XY};function Dv(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||jm(u))&&l&16)for(let h=0;h<c.length;h++)i(c[h],e,n,2);d&&s(a,e,n)}function XY(t,e,n,s,i,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,b,_,k){b.anchor=d(r(m),b,a(m),n,s,i,o),b.targetStart=_,b.targetAnchor=k}const f=e.target=pk(e.props,l),p=jm(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||uI(f,e,u,c),d(m&&r(m),e,f,n,s,i,o)}S0(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const Pa=cI;function S0(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 uI(t,e,n,s){const i=e.targetStart=n(""),o=e.targetAnchor=n("");return i[aI]=o,t&&(s(i,t),s(o,t)),o}const Ka=Symbol("_leaveCb"),Rv=Symbol("_enterCb");function S6(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{t.isMounted=!0}),wn(()=>{t.isUnmounting=!0}),t}const Xo=[Function,Array],$6={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Xo,onEnter:Xo,onAfterEnter:Xo,onEnterCancelled:Xo,onBeforeLeave:Xo,onLeave:Xo,onAfterLeave:Xo,onLeaveCancelled:Xo,onBeforeAppear:Xo,onAppear:Xo,onAfterAppear:Xo,onAppearCancelled:Xo},dI=t=>{const e=t.subTree;return e.component?dI(e.component):e},KY={name:"BaseTransition",props:$6,setup(t,{slots:e}){const n=ht(),s=S6();return()=>{const i=e.default&&k_(e.default(),!0);if(!i||!i.length)return;const o=hI(i),r=rn(t),{mode:a}=r;if(s.isLeaving)return lw(o);const l=v9(o);if(!l)return lw(o);let c=Cf(l,r,s,n,d=>c=d);l.type!==Zn&&vl(l,c);let u=n.subTree&&v9(n.subTree);if(u&&u.type!==Zn&&!Er(u,l)&&dI(n).type!==Zn){let d=Cf(u,r,s,n);if(vl(u,d),a==="out-in"&&l.type!==Zn)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},lw(o);a==="in-out"&&l.type!==Zn?d.delayLeave=(h,f,p)=>{const m=pI(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 hI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Zn){e=n;break}}return e}const fI=KY;function pI(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 Cf(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:k,onAppearCancelled:C}=e,x=String(t.key),S=pI(n,t),M=(I,L)=>{I&&mr(I,s,9,L)},P=(I,L)=>{const V=L[1];M(I,L),Ee(I)?I.every(R=>R.length<=1)&&V():I.length<=1&&V()},T={mode:r,persisted:a,beforeEnter(I){let L=l;if(!n.isMounted)if(o)L=b||l;else return;I[Ka]&&I[Ka](!0);const V=S[x];V&&Er(t,V)&&V.el[Ka]&&V.el[Ka](),M(L,[I])},enter(I){let L=c,V=u,R=d;if(!n.isMounted)if(o)L=_||c,V=k||u,R=C||d;else return;let N=!1;const F=I[Rv]=B=>{N||(N=!0,B?M(R,[I]):M(V,[I]),T.delayedLeave&&T.delayedLeave(),I[Rv]=void 0)};L?P(L,[I,F]):F()},leave(I,L){const V=String(t.key);if(I[Rv]&&I[Rv](!0),n.isUnmounting)return L();M(h,[I]);let R=!1;const N=I[Ka]=F=>{R||(R=!0,L(),F?M(m,[I]):M(p,[I]),I[Ka]=void 0,S[V]===t&&delete S[V])};S[V]=t,f?P(f,[I,N]):N()},clone(I){const L=Cf(I,e,n,s,i);return i&&i(L),L}};return T}function lw(t){if($1(t))return t=gr(t),t.children=null,t}function v9(t){if(!$1(t))return lI(t.type)&&t.children?hI(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&&et(n.default))return n.default()}}function vl(t,e){t.shapeFlag&6&&t.component?(t.transition=e,vl(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 k_(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(k_(r.children,e,a))):(e||r.type!==Zn)&&s.push(a!=null?gr(r,{key:a}):r)}if(i>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function fe(t,e){return et(t)?(()=>ln({name:t.name},e,{setup:t}))():t}function ZY(){const t=ht();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function A6(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function JY(t){const e=ht(),n=Fn(null);if(e){const i=e.refs===pn?e.refs={}:e.refs;Object.defineProperty(i,t,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}const Xy=new WeakMap;function tf(t,e,n,s,i=!1){if(Ee(t)){t.forEach((p,m)=>tf(p,e&&(Ee(e)?e[m]:e),n,s,i));return}if(cl(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&tf(t,e,n,s.component.subTree);return}const o=s.shapeFlag&4?A1(s.component):s.el,r=i?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===pn?a.refs={}:a.refs,d=a.setupState,h=rn(d),f=d===pn?Yh:p=>Nt(h,p);if(c!=null&&c!==l){if(y9(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(et(l))rp(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)Ee(_)&&v6(_,o);else if(Ee(_))_.includes(o)||_.push(o);else if(p)u[l]=[o],f(l)&&(d[l]=u[l]);else{const k=[o];l.value=k,t.k&&(u[t.k]=k)}}else p?(u[l]=r,f(l)&&(d[l]=r)):m&&(l.value=r,t.k&&(u[t.k]=r))};if(r){const _=()=>{b(),Xy.delete(t)};_.id=-1,Xy.set(t,_),$s(_,n)}else y9(t),b()}}}function y9(t){const e=Xy.get(t);e&&(e.flags|=8,Xy.delete(t))}let b9=!1;const sh=()=>{b9||(console.error("Hydration completed but contains mismatches."),b9=!0)},QY=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",eq=t=>t.namespaceURI.includes("MathML"),Vv=t=>{if(t.nodeType===1){if(QY(t))return"svg";if(eq(t))return"mathml"}},qh=t=>t.nodeType===8;function tq(t){const{mt:e,p:n,o:{patchProp:s,createText:i,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(C,x)=>{if(!x.hasChildNodes()){n(null,C,x),Gy(),x._vnode=C;return}d(x.firstChild,C,null,null,null),Gy(),x._vnode=C},d=(C,x,S,M,P,T=!1)=>{T=T||!!x.dynamicChildren;const I=qh(C)&&C.data==="[",L=()=>m(C,x,S,M,P,I),{type:V,ref:R,shapeFlag:N,patchFlag:F}=x;let B=C.nodeType;x.el=C,F===-2&&(T=!1,x.dynamicChildren=null);let z=null;switch(V){case ba:B!==3?x.children===""?(l(x.el=i(""),r(C),C),z=C):z=L():(C.data!==x.children&&(sh(),C.data=x.children),z=o(C));break;case Zn:k(C)?(z=o(C),_(x.el=C.content.firstChild,C,S)):B!==8||I?z=L():z=o(C);break;case Gu:if(I&&(C=o(C),B=C.nodeType),B===1||B===3){z=C;const G=!x.children.length;for(let K=0;K<x.staticCount;K++)G&&(x.children+=z.nodeType===1?z.outerHTML:z.data),K===x.staticCount-1&&(x.anchor=z),z=o(z);return I?o(z):z}else L();break;case te:I?z=p(C,x,S,M,P,T):z=L();break;default:if(N&1)(B!==1||x.type.toLowerCase()!==C.tagName.toLowerCase())&&!k(C)?z=L():z=h(C,x,S,M,P,T);else if(N&6){x.slotScopeIds=P;const G=r(C);if(I?z=b(C):qh(C)&&C.data==="teleport start"?z=b(C,C.data,"teleport end"):z=o(C),e(x,G,null,S,M,Vv(G),T),cl(x)&&!x.type.__asyncResolved){let K;I?(K=y(te),K.anchor=z?z.previousSibling:G.lastChild):K=C.nodeType===3?W(""):y("div"),K.el=C,x.component.subTree=K}}else N&64?B!==8?z=L():z=x.type.hydrate(C,x,S,M,P,T,t,f):N&128&&(z=x.type.hydrate(C,x,S,M,Vv(r(C)),P,T,t,d))}return R!=null&&tf(R,null,M,x),z},h=(C,x,S,M,P,T)=>{T=T||!!x.dynamicChildren;const{type:I,props:L,patchFlag:V,shapeFlag:R,dirs:N,transition:F}=x,B=I==="input"||I==="option";if(B||V!==-1){N&&ma(x,null,S,"created");let z=!1;if(k(C)){z=FI(null,F)&&S&&S.vnode.props&&S.vnode.props.appear;const K=C.content.firstChild;if(z){const X=K.getAttribute("class");X&&(K.$cls=X),F.beforeEnter(K)}_(K,C,S),x.el=C=K}if(R&16&&!(L&&(L.innerHTML||L.textContent))){let K=f(C.firstChild,x,C,S,M,P,T);for(;K;){Fv(C,1)||sh();const X=K;K=K.nextSibling,a(X)}}else if(R&8){let K=x.children;K[0]===` |
| 14 |
`&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:X}=C;X!==K&&X!==K.replace(/\r\n|\r/g,` |
| 15 |
`)&&(Fv(C,0)||sh(),C.textContent=x.children)}if(L){if(B||!T||V&48){const K=C.tagName.includes("-");for(const X in L)(B&&(X.endsWith("value")||X==="indeterminate")||Md(X)&&!ll(X)||X[0]==="."||K&&!ll(X))&&s(C,X,null,L[X],void 0,S)}else if(L.onClick)s(C,"onClick",null,L.onClick,void 0,S);else if(V&4&&Or(L.style))for(const K in L.style)L.style[K]}let G;(G=L&&L.onVnodeBeforeMount)&&oo(G,S,x),N&&ma(x,null,S,"beforeMount"),((G=L&&L.onVnodeMounted)||N||z)&&HI(()=>{G&&oo(G,S,x),z&&F.enter(C),N&&ma(x,null,S,"mounted")},M)}return C.nextSibling},f=(C,x,S,M,P,T,I)=>{I=I||!!x.dynamicChildren;const L=x.children,V=L.length;for(let R=0;R<V;R++){const N=I?L[R]:L[R]=ro(L[R]),F=N.type===ba;C?(F&&!I&&R+1<V&&ro(L[R+1]).type===ba&&(l(i(C.data.slice(N.children.length)),S,o(C)),C.data=N.children),C=d(C,N,M,P,T,I)):F&&!N.children?l(N.el=i(""),S):(Fv(S,1)||sh(),n(null,N,S,null,M,P,Vv(S),T))}return C},p=(C,x,S,M,P,T)=>{const{slotScopeIds:I}=x;I&&(P=P?P.concat(I):I);const L=r(C),V=f(o(C),x,L,S,M,P,T);return V&&qh(V)&&V.data==="]"?o(x.anchor=V):(sh(),l(x.anchor=c("]"),L,V),V)},m=(C,x,S,M,P,T)=>{if(Fv(C.parentElement,1)||sh(),x.el=null,T){const V=b(C);for(;;){const R=o(C);if(R&&R!==V)a(R);else break}}const I=o(C),L=r(C);return a(C),n(null,x,L,I,S,M,Vv(L),P),S&&(S.vnode.el=x.el,$_(S,x.el)),I},b=(C,x="[",S="]")=>{let M=0;for(;C;)if(C=o(C),C&&qh(C)&&(C.data===x&&M++,C.data===S)){if(M===0)return o(C);M--}return C},_=(C,x,S)=>{const M=x.parentNode;M&&M.replaceChild(C,x);let P=S;for(;P;)P.vnode.el===x&&(P.vnode.el=P.subTree.el=C),P=P.parent},k=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[u,d]}const _9="data-allow-mismatch",nq={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Fv(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(_9);)t=t.parentElement;const n=t&&t.getAttribute(_9);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return e===0&&s.includes("children")?!0:s.includes(nq[e])}}const sq=h_().requestIdleCallback||(t=>setTimeout(t,1)),iq=h_().cancelIdleCallback||(t=>clearTimeout(t)),oq=(t=1e4)=>e=>{const n=sq(e,{timeout:t});return()=>iq(n)};function rq(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 aq=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(rq(i))return e(),s.disconnect(),!1;s.observe(i)}}),()=>s.disconnect()},lq=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},cq=(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 uq(t,e){if(qh(t)&&t.data==="["){let n=1,s=t.nextSibling;for(;s;){if(s.nodeType===1){if(e(s)===!1)break}else if(qh(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else e(t)}const cl=t=>!!t.type.__asyncLoader;function dq(t){et(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 fe({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,m,b){let _=!1;(m.bu||(m.bu=[])).push(()=>_=!0);const k=()=>{_||b()},C=o?()=>{const x=o(k,S=>uq(p,S));x&&(m.bum||(m.bum=[])).push(x)}:k;u?C():f().then(()=>!m.isUnmounted&&C())},get __asyncResolved(){return u},setup(){const p=si;if(A6(p),u)return()=>Nv(u,p);const m=C=>{c=null,Pd(C,p,13,!s)};if(a&&p.suspense||xf)return f().then(C=>()=>Nv(C,p)).catch(C=>(m(C),()=>s?y(s,{error:C}):null));const b=J(!1),_=J(),k=J(!!i);return i&&setTimeout(()=>{k.value=!1},i),r!=null&&setTimeout(()=>{if(!b.value&&!_.value){const C=new Error(`Async component timed out after ${r}ms.`);m(C),_.value=C}},r),f().then(()=>{b.value=!0,p.parent&&$1(p.parent.vnode)&&p.parent.update()}).catch(C=>{m(C),_.value=C}),()=>{if(b.value&&u)return Nv(u,p);if(_.value&&s)return y(s,{error:_.value});if(n&&!k.value)return Nv(n,p)}}})}function Nv(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 $1=t=>t.type.__isKeepAlive,hq={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 k=e.default&&e.default();return k&&k.length===1?k[0]:k};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=(k,C,x,S,M)=>{const P=k.component;c(k,C,x,0,a),l(P.vnode,k,C,x,P,a,S,k.slotScopeIds,M),$s(()=>{P.isDeactivated=!1,P.a&&Jh(P.a);const T=k.props&&k.props.onVnodeMounted;T&&oo(T,P.parent,k)},a)},s.deactivate=k=>{const C=k.component;Zy(C.m),Zy(C.a),c(k,h,null,1,a),$s(()=>{C.da&&Jh(C.da);const x=k.props&&k.props.onVnodeUnmounted;x&&oo(x,C.parent,k),C.isDeactivated=!0},a)};function f(k){cw(k),u(k,n,a,!0)}function p(k){i.forEach((C,x)=>{const S=Sk(cl(C)?C.type.__asyncResolved||{}:C.type);S&&!k(S)&&m(x)})}function m(k){const C=i.get(k);C&&(!r||!Er(C,r))?f(C):r&&cw(r),i.delete(k),o.delete(k)}Me(()=>[t.include,t.exclude],([k,C])=>{k&&p(x=>tm(k,x)),C&&p(x=>!tm(C,x))},{flush:"post",deep:!0});let b=null;const _=()=>{b!=null&&(Jy(n.subTree.type)?$s(()=>{i.set(b,Bv(n.subTree))},n.subTree.suspense):i.set(b,Bv(n.subTree)))};return Ft(_),kl(_),wn(()=>{i.forEach(k=>{const{subTree:C,suspense:x}=n,S=Bv(C);if(k.type===S.type&&k.key===S.key){cw(S);const M=S.component.da;M&&$s(M,x);return}f(k)})}),()=>{if(b=null,!e.default)return r=null;const k=e.default(),C=k[0];if(k.length>1)return r=null,k;if(!is(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let x=Bv(C);if(x.type===Zn)return r=null,x;const S=x.type,M=Sk(cl(x)?x.type.__asyncResolved||{}:S),{include:P,exclude:T,max:I}=t;if(P&&(!M||!tm(P,M))||T&&M&&tm(T,M))return x.shapeFlag&=-257,r=x,C;const L=x.key==null?S:x.key,V=i.get(L);return x.el&&(x=gr(x),C.shapeFlag&128&&(C.ssContent=x)),b=L,V?(x.el=V.el,x.component=V.component,x.transition&&vl(x,x.transition),x.shapeFlag|=512,o.delete(L),o.add(L)):(o.add(L),I&&o.size>parseInt(I,10)&&m(o.values().next().value)),x.shapeFlag|=256,r=x,Jy(C.type)?C:x}}},fq=hq;function tm(t,e){return Ee(t)?t.some(n=>tm(n,e)):Ke(t)?t.split(",").includes(e):DW(t)?(t.lastIndex=0,t.test(e)):!1}function E6(t,e){mI(t,"a",e)}function M6(t,e){mI(t,"da",e)}function mI(t,e,n=si){const s=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(C_(e,s,n),n){let i=n.parent;for(;i&&i.parent;)$1(i.parent.vnode)&&pq(s,e,n,i),i=i.parent}}function pq(t,e,n,s){const i=C_(e,t,s,!0);Cl(()=>{v6(s[e],i)},n)}function cw(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Bv(t){return t.shapeFlag&128?t.ssContent:t}function C_(t,e,n=si,s=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{pl();const a=hd(n),l=mr(e,n,t,r);return a(),ml(),l});return s?i.unshift(o):i.push(o),o}}const wl=t=>(e,n=si)=>{(!xf||t==="sp")&&C_(t,(...s)=>e(...s),n)},Id=wl("bm"),Ft=wl("m"),x_=wl("bu"),kl=wl("u"),wn=wl("bum"),Cl=wl("um"),gI=wl("sp"),vI=wl("rtg"),yI=wl("rtc");function bI(t,e=si){C_("ec",t,e)}const T6="components",mq="directives";function Y(t,e){return P6(T6,t,!0,e)||t}const _I=Symbol.for("v-ndc");function Ct(t){return Ke(t)?P6(T6,t,!1)||t:t||_I}function xt(t){return P6(mq,t)}function P6(t,e,n=!0,s=!1){const i=ri||si;if(i){const o=i.type;if(t===T6){const a=Sk(o,!1);if(a&&(a===e||a===Un(e)||a===Yc(Un(e))))return o}const r=w9(i[t]||o[t],e)||w9(i.appContext[t],e);return!r&&s?o:r}}function w9(t,e){return t&&(t[e]||t[Un(e)]||t[Yc(Un(e))])}function we(t,e,n,s){let i;const o=n&&n[s],r=Ee(t);if(r||Ke(t)){const a=r&&Or(t);let l=!1,c=!1;a&&(l=!uo(t),c=ka(t),t=y_(t)),i=new Array(t.length);for(let u=0,d=t.length;u<d;u++)i[u]=e(l?c?kf(jr(t[u])):jr(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 fs(t,e){for(let n=0;n<e.length;n++){const s=e[n];if(Ee(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&&cl(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&&I6(o(n)),a=n.key||r&&r.key,l=D(te,{key:(a&&!mo(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 I6(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===te&&!I6(e.children)):!0)?t:null}function wI(t,e){const n={};for(const s in t)n[e&&/[A-Z]/.test(s)?`on:${s}`:Wu(s)]=t[s];return n}const mk=t=>t?qI(t)?A1(t):mk(t.parent):null,Wm=ln(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=>mk(t.parent),$root:t=>mk(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>L6(t),$forceUpdate:t=>t.f||(t.f=()=>{x6(t.update)}),$nextTick:t=>t.n||(t.n=ot.bind(t.proxy)),$watch:t=>GY.bind(t)}),uw=(t,e)=>t!==pn&&!t.__isScriptSetup&&Nt(t,e),gk={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(uw(s,e))return r[e]=1,s[e];if(i!==pn&&Nt(i,e))return r[e]=2,i[e];if(Nt(o,e))return r[e]=3,o[e];if(n!==pn&&Nt(n,e))return r[e]=4,n[e];vk&&(r[e]=0)}}const c=Wm[e];let u,d;if(c)return e==="$attrs"&&Ci(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==pn&&Nt(n,e))return r[e]=4,n[e];if(d=l.config.globalProperties,Nt(d,e))return d[e]},set({_:t},e,n){const{data:s,setupState:i,ctx:o}=t;return uw(i,e)?(i[e]=n,!0):s!==pn&&Nt(s,e)?(s[e]=n,!0):Nt(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!==pn&&a[0]!=="$"&&Nt(t,a)||uw(e,a)||Nt(o,a)||Nt(s,a)||Nt(Wm,a)||Nt(i.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Nt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},gq=ln({},gk,{get(t,e){if(e!==Symbol.unscopables)return gk.get(t,e,t)},has(t,e){return e[0]!=="_"&&!HW(e)}});function vq(){return null}function yq(){return null}function bq(t){}function _q(t){}function wq(){return null}function kq(){}function Cq(t,e){return null}function hi(){return kI().slots}function Ld(){return kI().attrs}function kI(t){const e=ht();return e.setupContext||(e.setupContext=ZI(e))}function Mg(t){return Ee(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function xq(t,e){const n=Mg(t);for(const s in e){if(s.startsWith("__skip"))continue;let i=n[s];i?Ee(i)||et(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 Sq(t,e){return!t||!e?t||e:Ee(t)&&Ee(e)?t.concat(e):ln({},Mg(t),Mg(e))}function $q(t,e){const n={};for(const s in t)e.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>t[s]});return n}function Aq(t){const e=ht();let n=t();return kk(),cd(n)&&(n=n.catch(s=>{throw hd(e),s})),[n,()=>hd(e)]}let vk=!0;function Eq(t){const e=L6(t),n=t.proxy,s=t.ctx;vk=!1,e.beforeCreate&&k9(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:k,destroyed:C,unmounted:x,render:S,renderTracked:M,renderTriggered:P,errorCaptured:T,serverPrefetch:I,expose:L,inheritAttrs:V,components:R,directives:N,filters:F}=e;if(c&&Mq(c,s,null),r)for(const G in r){const K=r[G];et(K)&&(s[G]=K.bind(n))}if(i){const G=i.call(n,n);yt(G)&&(t.data=In(G))}if(vk=!0,o)for(const G in o){const K=o[G],X=et(K)?K.bind(n,n):et(K.get)?K.get.bind(n,n):Dt,H=!et(K)&&et(K.set)?K.set.bind(n):Dt,Q=U({get:X,set:H});Object.defineProperty(s,G,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ne=>Q.value=ne})}if(a)for(const G in a)CI(a[G],s,n,G);if(l){const G=et(l)?l.call(n):l;Reflect.ownKeys(G).forEach(K=>{Pt(K,G[K])})}u&&k9(u,t,"c");function z(G,K){Ee(K)?K.forEach(X=>G(X.bind(n))):K&&G(K.bind(n))}if(z(Id,d),z(Ft,h),z(x_,f),z(kl,p),z(E6,m),z(M6,b),z(bI,T),z(yI,M),z(vI,P),z(wn,k),z(Cl,x),z(gI,I),Ee(L))if(L.length){const G=t.exposed||(t.exposed={});L.forEach(K=>{Object.defineProperty(G,K,{get:()=>n[K],set:X=>n[K]=X,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Dt&&(t.render=S),V!=null&&(t.inheritAttrs=V),R&&(t.components=R),N&&(t.directives=N),I&&A6(t)}function Mq(t,e,n=Dt){Ee(t)&&(t=yk(t));for(const s in t){const i=t[s];let o;yt(i)?"default"in i?o=Ye(i.from||s,i.default,!0):o=Ye(i.from||s):o=Ye(i),hn(o)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[s]=o}}function k9(t,e,n){mr(Ee(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,n)}function CI(t,e,n,s){let i=s.includes(".")?rI(n,s):()=>n[s];if(Ke(t)){const o=e[t];et(o)&&Me(i,o)}else if(et(t))Me(i,t.bind(n));else if(yt(t))if(Ee(t))t.forEach(o=>CI(o,e,n,s));else{const o=et(t.handler)?t.handler.bind(n):e[t.handler];et(o)&&Me(i,o,t)}}function L6(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=>Ky(l,c,r,!0)),Ky(l,e,r)),yt(e)&&o.set(e,l),l}function Ky(t,e,n,s=!1){const{mixins:i,extends:o}=e;o&&Ky(t,o,n,!0),i&&i.forEach(r=>Ky(t,r,n,!0));for(const r in e)if(!(s&&r==="expose")){const a=Tq[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const Tq={data:C9,props:x9,emits:x9,methods:nm,computed:nm,beforeCreate:Di,created:Di,beforeMount:Di,mounted:Di,beforeUpdate:Di,updated:Di,beforeDestroy:Di,beforeUnmount:Di,destroyed:Di,unmounted:Di,activated:Di,deactivated:Di,errorCaptured:Di,serverPrefetch:Di,components:nm,directives:nm,watch:Iq,provide:C9,inject:Pq};function C9(t,e){return e?t?function(){return ln(et(t)?t.call(this,this):t,et(e)?e.call(this,this):e)}:e:t}function Pq(t,e){return nm(yk(t),yk(e))}function yk(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Di(t,e){return t?[...new Set([].concat(t,e))]:e}function nm(t,e){return t?ln(Object.create(null),t,e):e}function x9(t,e){return t?Ee(t)&&Ee(e)?[...new Set([...t,...e])]:ln(Object.create(null),Mg(t),Mg(e??{})):e}function Iq(t,e){if(!t)return e;if(!e)return t;const n=ln(Object.create(null),t);for(const s in e)n[s]=Di(t[s],e[s]);return n}function xI(){return{app:null,config:{isNativeTag:Yh,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 Lq=0;function Oq(t,e){return function(s,i=null){et(s)||(s=ln({},s)),i!=null&&!yt(i)&&(i=null);const o=xI(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:Lq++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:QI,get config(){return o.config},set config(u){},use(u,...d){return r.has(u)||(u&&et(u.install)?(r.add(u),u.install(c,...d)):et(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,A1(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(mr(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=qu;qu=c;try{return u()}finally{qu=d}}};return c}}let qu=null;function Dq(t,e,n=pn){const s=ht(),i=Un(e),o=Bi(e),r=SI(t,i),a=GP((l,c)=>{let u,d=pn,h;return oI(()=>{const f=t[i];Fi(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(!Fi(p,u)&&!(d!==pn&&Fi(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),Fi(f,p)&&Fi(f,d)&&!Fi(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||pn:a,done:!1}:{done:!0}}}},a}const SI=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Un(e)}Modifiers`]||t[`${Bi(e)}Modifiers`];function Rq(t,e,...n){if(t.isUnmounted)return;const s=t.vnode.props||pn;let i=n;const o=e.startsWith("update:"),r=o&&SI(s,e.slice(7));r&&(r.trim&&(i=n.map(u=>Ke(u)?u.trim():u)),r.number&&(i=n.map(d_)));let a,l=s[a=Wu(e)]||s[a=Wu(Un(e))];!l&&o&&(l=s[a=Wu(Bi(e))]),l&&mr(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,mr(c,t,6,i)}}const Vq=new WeakMap;function $I(t,e,n=!1){const s=n?Vq:e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!et(t)){const l=c=>{const u=$I(c,e,!0);u&&(a=!0,ln(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):(Ee(o)?o.forEach(l=>r[l]=null):ln(r,o),yt(t)&&s.set(t,r),r)}function S_(t,e){return!t||!Md(e)?!1:(e=e.slice(2).replace(/Once$/,""),Nt(t,e[0].toLowerCase()+e.slice(1))||Nt(t,Bi(e))||Nt(t,e))}function $0(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=Eg(t);let _,k;try{if(n.shapeFlag&4){const x=i||s,S=x;_=ro(c.call(S,x,u,d,f,h,p)),k=a}else{const x=e;_=ro(x.length>1?x(d,{attrs:a,slots:r,emit:l}):x(d,null)),k=e.props?a:Nq(a)}}catch(x){Ym.length=0,Pd(x,t,1),_=y(Zn)}let C=_;if(k&&m!==!1){const x=Object.keys(k),{shapeFlag:S}=C;x.length&&S&7&&(o&&x.some(g6)&&(k=Bq(k,o)),C=gr(C,k,!1,!0))}return n.dirs&&(C=gr(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&vl(C,n.transition),_=C,Eg(b),_}function Fq(t,e=!0){let n;for(let s=0;s<t.length;s++){const i=t[s];if(is(i)){if(i.type!==Zn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const Nq=t=>{let e;for(const n in t)(n==="class"||n==="style"||Md(n))&&((e||(e={}))[n]=t[n]);return e},Bq=(t,e)=>{const n={};for(const s in t)(!g6(s)||!(s.slice(9)in e))&&(n[s]=t[s]);return n};function zq(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?S9(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]&&!S_(c,h))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?S9(s,r,c):!0:!!r;return!1}function S9(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]&&!S_(n,o))return!0}return!1}function $_({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 AI={},EI=()=>Object.create(AI),MI=t=>Object.getPrototypeOf(t)===AI;function Hq(t,e,n,s=!1){const i={},o=EI();t.propsDefaults=Object.create(null),TI(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);n?t.props=s?i:k6(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function Uq(t,e,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,a=rn(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(S_(t.emitsOptions,h))continue;const f=e[h];if(l)if(Nt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=Un(h);i[p]=bk(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{TI(t,e,i,o)&&(c=!0);let u;for(const d in a)(!e||!Nt(e,d)&&((u=Bi(d))===d||!Nt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(i[d]=bk(l,a,d,void 0,t,!0)):delete i[d]);if(o!==a)for(const d in o)(!e||!Nt(e,d))&&(delete o[d],c=!0)}c&&Qa(t.attrs,"set","")}function TI(t,e,n,s){const[i,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(ll(l))continue;const c=e[l];let u;i&&Nt(i,u=Un(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:S_(t.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=rn(n),c=a||pn;for(let u=0;u<o.length;u++){const d=o[u];n[d]=bk(i,l,d,c[d],t,!Nt(c,d))}}return r}function bk(t,e,n,s,i,o){const r=t[n];if(r!=null){const a=Nt(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&et(l)){const{propsDefaults:c}=i;if(n in c)s=c[n];else{const u=hd(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===Bi(n))&&(s=!0))}return s}const jq=new WeakMap;function PI(t,e,n=!1){const s=n?jq:e.propsCache,i=s.get(t);if(i)return i;const o=t.props,r={},a=[];let l=!1;if(!et(t)){const u=d=>{l=!0;const[h,f]=PI(d,e,!0);ln(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,Kh),Kh;if(Ee(o))for(let u=0;u<o.length;u++){const d=Un(o[u]);$9(d)&&(r[d]=pn)}else if(o)for(const u in o){const d=Un(u);if($9(d)){const h=o[u],f=r[d]=Ee(h)||et(h)?{type:h}:ln({},h),p=f.type;let m=!1,b=!0;if(Ee(p))for(let _=0;_<p.length;++_){const k=p[_],C=et(k)&&k.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(b=!1)}else m=et(p)&&p.name==="Boolean";f[0]=m,f[1]=b,(m||Nt(f,"default"))&&a.push(d)}}const c=[r,a];return yt(t)&&s.set(t,c),c}function $9(t){return t[0]!=="$"&&!ll(t)}const O6=t=>t==="_"||t==="_ctx"||t==="$stable",D6=t=>Ee(t)?t.map(ro):[ro(t)],Wq=(t,e,n)=>{if(e._n)return e;const s=w((...i)=>D6(e(...i)),n);return s._c=!1,s},II=(t,e,n)=>{const s=t._ctx;for(const i in t){if(O6(i))continue;const o=t[i];if(et(o))e[i]=Wq(i,o,s);else if(o!=null){const r=D6(o);e[i]=()=>r}}},LI=(t,e)=>{const n=D6(e);t.slots.default=()=>n},OI=(t,e,n)=>{for(const s in e)(n||!O6(s))&&(t[s]=e[s])},Yq=(t,e,n)=>{const s=t.slots=EI();if(t.vnode.shapeFlag&32){const i=e._;i?(OI(s,e,n),n&&AP(s,"_",i,!0)):II(e,s)}else e&&LI(t,e)},qq=(t,e,n)=>{const{vnode:s,slots:i}=t;let o=!0,r=pn;if(s.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:OI(i,e,n):(o=!e.$stable,II(e,i)),r=e}else e&&(LI(t,e),r={default:1});if(o)for(const a in i)!O6(a)&&r[a]==null&&delete i[a]},$s=HI;function DI(t){return VI(t)}function RI(t){return VI(t,tq)}function VI(t,e){const n=h_();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=Dt,insertStaticContent:p}=t,m=(ee,se,me,$e=null,Se=null,Ie=null,je=void 0,Fe=null,ze=!!se.dynamicChildren)=>{if(ee===se)return;ee&&!Er(ee,se)&&($e=oe(ee),ne(ee,Se,Ie,!0),ee=null),se.patchFlag===-2&&(ze=!1,se.dynamicChildren=null);const{type:Ae,ref:Ze,shapeFlag:We}=se;switch(Ae){case ba:b(ee,se,me,$e);break;case Zn:_(ee,se,me,$e);break;case Gu:ee==null&&k(se,me,$e,je);break;case te:R(ee,se,me,$e,Se,Ie,je,Fe,ze);break;default:We&1?S(ee,se,me,$e,Se,Ie,je,Fe,ze):We&6?N(ee,se,me,$e,Se,Ie,je,Fe,ze):(We&64||We&128)&&Ae.process(ee,se,me,$e,Se,Ie,je,Fe,ze,re)}Ze!=null&&Se?tf(Ze,ee&&ee.ref,Ie,se||ee,!se):Ze==null&&ee&&ee.ref!=null&&tf(ee.ref,null,Ie,ee,!0)},b=(ee,se,me,$e)=>{if(ee==null)s(se.el=a(se.children),me,$e);else{const Se=se.el=ee.el;se.children!==ee.children&&c(Se,se.children)}},_=(ee,se,me,$e)=>{ee==null?s(se.el=l(se.children||""),me,$e):se.el=ee.el},k=(ee,se,me,$e)=>{[ee.el,ee.anchor]=p(ee.children,se,me,$e,ee.el,ee.anchor)},C=({el:ee,anchor:se},me,$e)=>{let Se;for(;ee&&ee!==se;)Se=h(ee),s(ee,me,$e),ee=Se;s(se,me,$e)},x=({el:ee,anchor:se})=>{let me;for(;ee&&ee!==se;)me=h(ee),i(ee),ee=me;i(se)},S=(ee,se,me,$e,Se,Ie,je,Fe,ze)=>{if(se.type==="svg"?je="svg":se.type==="math"&&(je="mathml"),ee==null)M(se,me,$e,Se,Ie,je,Fe,ze);else{const Ae=ee.el&&ee.el._isVueCE?ee.el:null;try{Ae&&Ae._beginPatch(),I(ee,se,Se,Ie,je,Fe,ze)}finally{Ae&&Ae._endPatch()}}},M=(ee,se,me,$e,Se,Ie,je,Fe)=>{let ze,Ae;const{props:Ze,shapeFlag:We,transition:it,dirs:be}=ee;if(ze=ee.el=r(ee.type,Ie,Ze&&Ze.is,Ze),We&8?u(ze,ee.children):We&16&&T(ee.children,ze,null,$e,Se,dw(ee,Ie),je,Fe),be&&ma(ee,null,$e,"created"),P(ze,ee,ee.scopeId,je,$e),Ze){for(const Te in Ze)Te!=="value"&&!ll(Te)&&o(ze,Te,null,Ze[Te],Ie,$e);"value"in Ze&&o(ze,"value",null,Ze.value,Ie),(Ae=Ze.onVnodeBeforeMount)&&oo(Ae,$e,ee)}be&&ma(ee,null,$e,"beforeMount");const ve=FI(Se,it);ve&&it.beforeEnter(ze),s(ze,se,me),((Ae=Ze&&Ze.onVnodeMounted)||ve||be)&&$s(()=>{Ae&&oo(Ae,$e,ee),ve&&it.enter(ze),be&&ma(ee,null,$e,"mounted")},Se)},P=(ee,se,me,$e,Se)=>{if(me&&f(ee,me),$e)for(let Ie=0;Ie<$e.length;Ie++)f(ee,$e[Ie]);if(Se){let Ie=Se.subTree;if(se===Ie||Jy(Ie.type)&&(Ie.ssContent===se||Ie.ssFallback===se)){const je=Se.vnode;P(ee,je,je.scopeId,je.slotScopeIds,Se.parent)}}},T=(ee,se,me,$e,Se,Ie,je,Fe,ze=0)=>{for(let Ae=ze;Ae<ee.length;Ae++){const Ze=ee[Ae]=Fe?ac(ee[Ae]):ro(ee[Ae]);m(null,Ze,se,me,$e,Se,Ie,je,Fe)}},I=(ee,se,me,$e,Se,Ie,je)=>{const Fe=se.el=ee.el;let{patchFlag:ze,dynamicChildren:Ae,dirs:Ze}=se;ze|=ee.patchFlag&16;const We=ee.props||pn,it=se.props||pn;let be;if(me&&uu(me,!1),(be=it.onVnodeBeforeUpdate)&&oo(be,me,se,ee),Ze&&ma(se,ee,me,"beforeUpdate"),me&&uu(me,!0),(We.innerHTML&&it.innerHTML==null||We.textContent&&it.textContent==null)&&u(Fe,""),Ae?L(ee.dynamicChildren,Ae,Fe,me,$e,dw(se,Se),Ie):je||K(ee,se,Fe,null,me,$e,dw(se,Se),Ie,!1),ze>0){if(ze&16)V(Fe,We,it,me,Se);else if(ze&2&&We.class!==it.class&&o(Fe,"class",null,it.class,Se),ze&4&&o(Fe,"style",We.style,it.style,Se),ze&8){const ve=se.dynamicProps;for(let Te=0;Te<ve.length;Te++){const Pe=ve[Te],gt=We[Pe],Lt=it[Pe];(Lt!==gt||Pe==="value")&&o(Fe,Pe,gt,Lt,Se,me)}}ze&1&&ee.children!==se.children&&u(Fe,se.children)}else!je&&Ae==null&&V(Fe,We,it,me,Se);((be=it.onVnodeUpdated)||Ze)&&$s(()=>{be&&oo(be,me,se,ee),Ze&&ma(se,ee,me,"updated")},$e)},L=(ee,se,me,$e,Se,Ie,je)=>{for(let Fe=0;Fe<se.length;Fe++){const ze=ee[Fe],Ae=se[Fe],Ze=ze.el&&(ze.type===te||!Er(ze,Ae)||ze.shapeFlag&198)?d(ze.el):me;m(ze,Ae,Ze,null,$e,Se,Ie,je,!0)}},V=(ee,se,me,$e,Se)=>{if(se!==me){if(se!==pn)for(const Ie in se)!ll(Ie)&&!(Ie in me)&&o(ee,Ie,se[Ie],null,Se,$e);for(const Ie in me){if(ll(Ie))continue;const je=me[Ie],Fe=se[Ie];je!==Fe&&Ie!=="value"&&o(ee,Ie,Fe,je,Se,$e)}"value"in me&&o(ee,"value",se.value,me.value,Se)}},R=(ee,se,me,$e,Se,Ie,je,Fe,ze)=>{const Ae=se.el=ee?ee.el:a(""),Ze=se.anchor=ee?ee.anchor:a("");let{patchFlag:We,dynamicChildren:it,slotScopeIds:be}=se;be&&(Fe=Fe?Fe.concat(be):be),ee==null?(s(Ae,me,$e),s(Ze,me,$e),T(se.children||[],me,Ze,Se,Ie,je,Fe,ze)):We>0&&We&64&&it&&ee.dynamicChildren&&ee.dynamicChildren.length===it.length?(L(ee.dynamicChildren,it,me,Se,Ie,je,Fe),(se.key!=null||Se&&se===Se.subTree)&&R6(ee,se,!0)):K(ee,se,me,Ze,Se,Ie,je,Fe,ze)},N=(ee,se,me,$e,Se,Ie,je,Fe,ze)=>{se.slotScopeIds=Fe,ee==null?se.shapeFlag&512?Se.ctx.activate(se,me,$e,je,ze):F(se,me,$e,Se,Ie,je,ze):B(ee,se,ze)},F=(ee,se,me,$e,Se,Ie,je)=>{const Fe=ee.component=YI(ee,$e,Se);if($1(ee)&&(Fe.ctx.renderer=re),GI(Fe,!1,je),Fe.asyncDep){if(Se&&Se.registerDep(Fe,z,je),!ee.el){const ze=Fe.subTree=y(Zn);_(null,ze,se,me),ee.placeholder=ze.el}}else z(Fe,ee,se,me,Se,Ie,je)},B=(ee,se,me)=>{const $e=se.component=ee.component;if(zq(ee,se,me))if($e.asyncDep&&!$e.asyncResolved){G($e,se,me);return}else $e.next=se,$e.update();else se.el=ee.el,$e.vnode=se},z=(ee,se,me,$e,Se,Ie,je)=>{const Fe=()=>{if(ee.isMounted){let{next:We,bu:it,u:be,parent:ve,vnode:Te}=ee;{const ut=NI(ee);if(ut){We&&(We.el=Te.el,G(ee,We,je)),ut.asyncDep.then(()=>{ee.isUnmounted||Fe()});return}}let Pe=We,gt;uu(ee,!1),We?(We.el=Te.el,G(ee,We,je)):We=Te,it&&Jh(it),(gt=We.props&&We.props.onVnodeBeforeUpdate)&&oo(gt,ve,We,Te),uu(ee,!0);const Lt=$0(ee),Je=ee.subTree;ee.subTree=Lt,m(Je,Lt,d(Je.el),oe(Je),ee,Se,Ie),We.el=Lt.el,Pe===null&&$_(ee,Lt.el),be&&$s(be,Se),(gt=We.props&&We.props.onVnodeUpdated)&&$s(()=>oo(gt,ve,We,Te),Se)}else{let We;const{el:it,props:be}=se,{bm:ve,m:Te,parent:Pe,root:gt,type:Lt}=ee,Je=cl(se);if(uu(ee,!1),ve&&Jh(ve),!Je&&(We=be&&be.onVnodeBeforeMount)&&oo(We,Pe,se),uu(ee,!0),it&&Ue){const ut=()=>{ee.subTree=$0(ee),Ue(it,ee.subTree,ee,Se,null)};Je&&Lt.__asyncHydrate?Lt.__asyncHydrate(it,ee,ut):ut()}else{gt.ce&>.ce._def.shadowRoot!==!1&>.ce._injectChildStyle(Lt);const ut=ee.subTree=$0(ee);m(null,ut,me,$e,ee,Se,Ie),se.el=ut.el}if(Te&&$s(Te,Se),!Je&&(We=be&&be.onVnodeMounted)){const ut=se;$s(()=>oo(We,Pe,ut),Se)}(se.shapeFlag&256||Pe&&cl(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&ee.a&&$s(ee.a,Se),ee.isMounted=!0,se=me=$e=null}};ee.scope.on();const ze=ee.effect=new Cg(Fe);ee.scope.off();const Ae=ee.update=ze.run.bind(ze),Ze=ee.job=ze.runIfDirty.bind(ze);Ze.i=ee,Ze.id=ee.uid,ze.scheduler=()=>x6(Ze),uu(ee,!0),Ae()},G=(ee,se,me)=>{se.component=ee;const $e=ee.vnode.props;ee.vnode=se,ee.next=null,Uq(ee,se.props,$e,me),qq(ee,se.children,me),pl(),f9(ee),ml()},K=(ee,se,me,$e,Se,Ie,je,Fe,ze=!1)=>{const Ae=ee&&ee.children,Ze=ee?ee.shapeFlag:0,We=se.children,{patchFlag:it,shapeFlag:be}=se;if(it>0){if(it&128){H(Ae,We,me,$e,Se,Ie,je,Fe,ze);return}else if(it&256){X(Ae,We,me,$e,Se,Ie,je,Fe,ze);return}}be&8?(Ze&16&&Ce(Ae,Se,Ie),We!==Ae&&u(me,We)):Ze&16?be&16?H(Ae,We,me,$e,Se,Ie,je,Fe,ze):Ce(Ae,Se,Ie,!0):(Ze&8&&u(me,""),be&16&&T(We,me,$e,Se,Ie,je,Fe,ze))},X=(ee,se,me,$e,Se,Ie,je,Fe,ze)=>{ee=ee||Kh,se=se||Kh;const Ae=ee.length,Ze=se.length,We=Math.min(Ae,Ze);let it;for(it=0;it<We;it++){const be=se[it]=ze?ac(se[it]):ro(se[it]);m(ee[it],be,me,null,Se,Ie,je,Fe,ze)}Ae>Ze?Ce(ee,Se,Ie,!0,!1,We):T(se,me,$e,Se,Ie,je,Fe,ze,We)},H=(ee,se,me,$e,Se,Ie,je,Fe,ze)=>{let Ae=0;const Ze=se.length;let We=ee.length-1,it=Ze-1;for(;Ae<=We&&Ae<=it;){const be=ee[Ae],ve=se[Ae]=ze?ac(se[Ae]):ro(se[Ae]);if(Er(be,ve))m(be,ve,me,null,Se,Ie,je,Fe,ze);else break;Ae++}for(;Ae<=We&&Ae<=it;){const be=ee[We],ve=se[it]=ze?ac(se[it]):ro(se[it]);if(Er(be,ve))m(be,ve,me,null,Se,Ie,je,Fe,ze);else break;We--,it--}if(Ae>We){if(Ae<=it){const be=it+1,ve=be<Ze?se[be].el:$e;for(;Ae<=it;)m(null,se[Ae]=ze?ac(se[Ae]):ro(se[Ae]),me,ve,Se,Ie,je,Fe,ze),Ae++}}else if(Ae>it)for(;Ae<=We;)ne(ee[Ae],Se,Ie,!0),Ae++;else{const be=Ae,ve=Ae,Te=new Map;for(Ae=ve;Ae<=it;Ae++){const Le=se[Ae]=ze?ac(se[Ae]):ro(se[Ae]);Le.key!=null&&Te.set(Le.key,Ae)}let Pe,gt=0;const Lt=it-ve+1;let Je=!1,ut=0;const ft=new Array(Lt);for(Ae=0;Ae<Lt;Ae++)ft[Ae]=0;for(Ae=be;Ae<=We;Ae++){const Le=ee[Ae];if(gt>=Lt){ne(Le,Se,Ie,!0);continue}let ce;if(Le.key!=null)ce=Te.get(Le.key);else for(Pe=ve;Pe<=it;Pe++)if(ft[Pe-ve]===0&&Er(Le,se[Pe])){ce=Pe;break}ce===void 0?ne(Le,Se,Ie,!0):(ft[ce-ve]=Ae+1,ce>=ut?ut=ce:Je=!0,m(Le,se[ce],me,null,Se,Ie,je,Fe,ze),gt++)}const ye=Je?Gq(ft):Kh;for(Pe=ye.length-1,Ae=Lt-1;Ae>=0;Ae--){const Le=ve+Ae,ce=se[Le],De=se[Le+1],pt=Le+1<Ze?De.el||BI(De):$e;ft[Ae]===0?m(null,ce,me,pt,Se,Ie,je,Fe,ze):Je&&(Pe<0||Ae!==ye[Pe]?Q(ce,me,pt,2):Pe--)}}},Q=(ee,se,me,$e,Se=null)=>{const{el:Ie,type:je,transition:Fe,children:ze,shapeFlag:Ae}=ee;if(Ae&6){Q(ee.component.subTree,se,me,$e);return}if(Ae&128){ee.suspense.move(se,me,$e);return}if(Ae&64){je.move(ee,se,me,re);return}if(je===te){s(Ie,se,me);for(let We=0;We<ze.length;We++)Q(ze[We],se,me,$e);s(ee.anchor,se,me);return}if(je===Gu){C(ee,se,me);return}if($e!==2&&Ae&1&&Fe)if($e===0)Fe.beforeEnter(Ie),s(Ie,se,me),$s(()=>Fe.enter(Ie),Se);else{const{leave:We,delayLeave:it,afterLeave:be}=Fe,ve=()=>{ee.ctx.isUnmounted?i(Ie):s(Ie,se,me)},Te=()=>{Ie._isLeaving&&Ie[Ka](!0),We(Ie,()=>{ve(),be&&be()})};it?it(Ie,ve,Te):Te()}else s(Ie,se,me)},ne=(ee,se,me,$e=!1,Se=!1)=>{const{type:Ie,props:je,ref:Fe,children:ze,dynamicChildren:Ae,shapeFlag:Ze,patchFlag:We,dirs:it,cacheIndex:be}=ee;if(We===-2&&(Se=!1),Fe!=null&&(pl(),tf(Fe,null,me,ee,!0),ml()),be!=null&&(se.renderCache[be]=void 0),Ze&256){se.ctx.deactivate(ee);return}const ve=Ze&1&&it,Te=!cl(ee);let Pe;if(Te&&(Pe=je&&je.onVnodeBeforeUnmount)&&oo(Pe,se,ee),Ze&6)ge(ee.component,me,$e);else{if(Ze&128){ee.suspense.unmount(me,$e);return}ve&&ma(ee,null,se,"beforeUnmount"),Ze&64?ee.type.remove(ee,se,me,re,$e):Ae&&!Ae.hasOnce&&(Ie!==te||We>0&&We&64)?Ce(Ae,se,me,!1,!0):(Ie===te&&We&384||!Se&&Ze&16)&&Ce(ze,se,me),$e&&Z(ee)}(Te&&(Pe=je&&je.onVnodeUnmounted)||ve)&&$s(()=>{Pe&&oo(Pe,se,ee),ve&&ma(ee,null,se,"unmounted")},me)},Z=ee=>{const{type:se,el:me,anchor:$e,transition:Se}=ee;if(se===te){ae(me,$e);return}if(se===Gu){x(ee);return}const Ie=()=>{i(me),Se&&!Se.persisted&&Se.afterLeave&&Se.afterLeave()};if(ee.shapeFlag&1&&Se&&!Se.persisted){const{leave:je,delayLeave:Fe}=Se,ze=()=>je(me,Ie);Fe?Fe(ee.el,Ie,ze):ze()}else Ie()},ae=(ee,se)=>{let me;for(;ee!==se;)me=h(ee),i(ee),ee=me;i(se)},ge=(ee,se,me)=>{const{bum:$e,scope:Se,job:Ie,subTree:je,um:Fe,m:ze,a:Ae}=ee;Zy(ze),Zy(Ae),$e&&Jh($e),Se.stop(),Ie&&(Ie.flags|=8,ne(je,ee,se,me)),Fe&&$s(Fe,se),$s(()=>{ee.isUnmounted=!0},se)},Ce=(ee,se,me,$e=!1,Se=!1,Ie=0)=>{for(let je=Ie;je<ee.length;je++)ne(ee[je],se,me,$e,Se)},oe=ee=>{if(ee.shapeFlag&6)return oe(ee.component.subTree);if(ee.shapeFlag&128)return ee.suspense.next();const se=h(ee.anchor||ee.el),me=se&&se[aI];return me?h(me):se};let pe=!1;const ie=(ee,se,me)=>{let $e;ee==null?se._vnode&&(ne(se._vnode,null,null,!0),$e=se._vnode.component):m(se._vnode||null,ee,se,null,null,null,me),se._vnode=ee,pe||(pe=!0,f9($e),Gy(),pe=!1)},re={p:m,um:ne,m:Q,r:Z,mt:F,mc:T,pc:K,pbc:L,n:oe,o:t};let ke,Ue;return e&&([ke,Ue]=e(re)),{render:ie,hydrate:ke,createApp:Oq(ie,ke)}}function dw({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 uu({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function FI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function R6(t,e,n=!1){const s=t.children,i=e.children;if(Ee(s)&&Ee(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]=ac(i[o]),a.el=r.el),!n&&a.patchFlag!==-2&&R6(r,a)),a.type===ba&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===te?1:0)),a.type===Zn&&!a.el&&(a.el=r.el)}}function Gq(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 NI(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:NI(e)}function Zy(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function BI(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?BI(e.subTree):null}const Jy=t=>t.__isSuspense;let _k=0;const Xq={name:"Suspense",__isSuspense:!0,process(t,e,n,s,i,o,r,a,l,c){if(t==null)Zq(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}Jq(t,e,n,s,i,r,a,l,c)}},hydrate:Qq,normalize:eG},Kq=Xq;function Tg(t,e){const n=t.props&&t.props[e];et(n)&&n()}function Zq(t,e,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=zI(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?(Tg(t,"onPending"),Tg(t,"onFallback"),c(null,t.ssFallback,e,n,s,null,o,r),nf(h,t.ssFallback)):h.resolve(!1,!0)}function Jq(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,Er(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),nf(d,f)))):(d.pendingId=_k++,_?(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),nf(d,f))):p&&Er(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&&Er(p,h))l(p,h,n,s,i,d,o,r,a),nf(d,h);else if(Tg(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=_k++,l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:C}=d;k>0?setTimeout(()=>{d.pendingId===C&&d.fallback(f)},k):k===0&&d.fallback(f)}}function zI(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 k=tG(t);k&&e&&e.pendingBranch&&(_=e.pendingId,e.deps++);const C=t.props?jy(t.props.timeout):void 0,x=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:_k++,timeout:typeof C=="number"?C:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(M=!1,P=!1){const{vnode:T,activeBranch:I,pendingBranch:L,pendingId:V,effects:R,parentComponent:N,container:F,isInFallback:B}=S;let z=!1;S.isHydrating?S.isHydrating=!1:M||(z=I&&L.transition&&L.transition.mode==="out-in",z&&(I.transition.afterLeave=()=>{V===S.pendingId&&(h(L,F,o===x?p(I):o,0),$g(R),B&&T.ssFallback&&(T.ssFallback.el=null))}),I&&(m(I.el)===F&&(o=p(I)),f(I,N,S,!0),!z&&B&&T.ssFallback&&$s(()=>T.ssFallback.el=null,S)),z||h(L,F,o,0)),nf(S,L),S.pendingBranch=null,S.isInFallback=!1;let G=S.parent,K=!1;for(;G;){if(G.pendingBranch){G.effects.push(...R),K=!0;break}G=G.parent}!K&&!z&&$g(R),S.effects=[],k&&e&&e.pendingBranch&&_===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Tg(T,"onResolve")},fallback(M){if(!S.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:I,container:L,namespace:V}=S;Tg(P,"onFallback");const R=p(T),N=()=>{S.isInFallback&&(d(null,M,L,R,I,null,V,a,l),nf(S,M))},F=M.transition&&M.transition.mode==="out-in";F&&(T.transition.afterLeave=N),S.isInFallback=!0,f(T,I,null,!0),F||N()},move(M,P,T){S.activeBranch&&h(S.activeBranch,M,P,T),S.container=M},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(M,P,T){const I=!!S.pendingBranch;I&&S.deps++;const L=M.vnode.el;M.asyncDep.catch(V=>{Pd(V,M,0)}).then(V=>{if(M.isUnmounted||S.isUnmounted||S.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:R}=M;Ck(M,V,!1),L&&(R.el=L);const N=!L&&M.subTree.el;P(M,R,m(L||M.subTree.el),L?null:p(M.subTree),S,r,T),N&&(R.placeholder=null,b(N)),$_(M,R.el),I&&--S.deps===0&&S.resolve()})},unmount(M,P){S.isUnmounted=!0,S.activeBranch&&f(S.activeBranch,n,M,P),S.pendingBranch&&f(S.pendingBranch,n,M,P)}};return S}function Qq(t,e,n,s,i,o,r,a,l){const c=e.suspense=zI(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 eG(t){const{shapeFlag:e,children:n}=t,s=e&32;t.ssContent=A9(s?n.default:n),t.ssFallback=s?A9(n.fallback):y(Zn)}function A9(t){let e;if(et(t)){const n=dd&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=xi,UI())}return Ee(t)&&(t=Fq(t)),t=ro(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function HI(t,e){e&&e.pendingBranch?Ee(t)?e.effects.push(...t):e.effects.push(t):$g(t)}function nf(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,$_(s,i))}function tG(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const te=Symbol.for("v-fgt"),ba=Symbol.for("v-txt"),Zn=Symbol.for("v-cmt"),Gu=Symbol.for("v-stc"),Ym=[];let xi=null;function v(t=!1){Ym.push(xi=t?null:[])}function UI(){Ym.pop(),xi=Ym[Ym.length-1]||null}let dd=1;function Pg(t,e=!1){dd+=t,t<0&&xi&&e&&(xi.hasOnce=!0)}function jI(t){return t.dynamicChildren=dd>0?xi||Kh:null,UI(),dd>0&&xi&&xi.push(t),t}function E(t,e,n,s,i,o){return jI(g(t,e,n,s,i,o,!0))}function D(t,e,n,s,i){return jI(y(t,e,n,s,i,!0))}function is(t){return t?t.__v_isVNode===!0:!1}function Er(t,e){return t.type===e.type&&t.key===e.key}function nG(t){}const WI=({key:t})=>t??null,A0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||hn(t)||et(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&&WI(e),ref:e&&A0(e),scopeId:w_,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?(V6(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),dd>0&&!r&&xi&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&xi.push(l),l}const y=sG;function sG(t,e=null,n=null,s=0,i=null,o=!1){if((!t||t===_I)&&(t=Zn),is(t)){const a=gr(t,e,!0);return n&&V6(a,n),dd>0&&!o&&xi&&(a.shapeFlag&6?xi[xi.indexOf(t)]=a:xi.push(a)),a.patchFlag=-2,a}if(cG(t)&&(t=t.__vccOpts),e){e=sf(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=q(a)),yt(l)&&(x1(l)&&!Ee(l)&&(l=ln({},l)),e.style=Xe(l))}const r=Ke(t)?1:Jy(t)?128:lI(t)?64:yt(t)?4:et(t)?2:0;return g(t,e,n,s,i,r,o,!0)}function sf(t){return t?x1(t)||MI(t)?ln({},t):t:null}function gr(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&&WI(c),ref:e&&e.ref?n&&o?Ee(o)?o.concat(A0(e)):[o,A0(e)]:A0(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&&gr(t.ssContent),ssFallback:t.ssFallback&&gr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&vl(u,l.clone(u)),u}function W(t=" ",e=0){return y(ba,null,t,e)}function Ia(t,e){const n=y(Gu,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),D(Zn,null,t)):y(Zn,null,t)}function ro(t){return t==null||typeof t=="boolean"?y(Zn):Ee(t)?y(te,null,t.slice()):is(t)?ac(t):y(ba,null,String(t))}function ac(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:gr(t)}function V6(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(Ee(e))n=16;else if(typeof e=="object")if(s&65){const i=e.default;i&&(i._c&&(i._d=!1),V6(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!MI(e)?e._ctx=ri:i===3&&ri&&(ri.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:ri},n=32):(e=String(e),s&64?(n=16,e=[W(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=q([e.class,s.class]));else if(i==="style")e.style=Xe([e.style,s.style]);else if(Md(i)){const o=e[i],r=s[i];r&&o!==r&&!(Ee(o)&&o.includes(r))&&(e[i]=o?[].concat(o,r):r)}else i!==""&&(e[i]=s[i])}return e}function oo(t,e,n,s=null){mr(t,e,7,[n,s])}const iG=xI();let oG=0;function YI(t,e,n){const s=t.type,i=(e?e.appContext:t.appContext)||iG,o={uid:oG++,vnode:t,type:s,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new y6(!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:PI(s,i),emitsOptions:$I(s,i),emit:null,emitted:null,propsDefaults:pn,inheritAttrs:s.inheritAttrs,ctx:pn,data:pn,props:pn,attrs:pn,slots:pn,refs:pn,setupState:pn,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=Rq.bind(null,o),t.ce&&t.ce(o),o}let si=null;const ht=()=>si||ri;let Qy,wk;{const t=h_(),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)}};Qy=e("__VUE_INSTANCE_SETTERS__",n=>si=n),wk=e("__VUE_SSR_SETTERS__",n=>xf=n)}const hd=t=>{const e=si;return Qy(t),t.scope.on(),()=>{t.scope.off(),Qy(e)}},kk=()=>{si&&si.scope.off(),Qy(null)};function qI(t){return t.vnode.shapeFlag&4}let xf=!1;function GI(t,e=!1,n=!1){e&&wk(e);const{props:s,children:i}=t.vnode,o=qI(t);Hq(t,s,o,e),Yq(t,i,n||e);const r=o?rG(t,e):void 0;return e&&wk(!1),r}function rG(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,gk);const{setup:s}=n;if(s){pl();const i=t.setupContext=s.length>1?ZI(t):null,o=hd(t),r=rp(s,t,0,[t.props,i]),a=cd(r);if(ml(),o(),(a||t.sp)&&!cl(t)&&A6(t),a){if(r.then(kk,kk),e)return r.then(l=>{Ck(t,l,e)}).catch(l=>{Pd(l,t,0)});t.asyncDep=r}else Ck(t,r,e)}else KI(t,e)}function Ck(t,e,n){et(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=C6(e)),KI(t,n)}let eb,xk;function XI(t){eb=t,xk=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,gq))}}const aG=()=>!eb;function KI(t,e,n){const s=t.type;if(!t.render){if(!e&&eb&&!s.render){const i=s.template||L6(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=s,c=ln(ln({isCustomElement:o,delimiters:a},r),l);s.render=eb(i,c)}}t.render=s.render||Dt,xk&&xk(t)}{const i=hd(t);pl();try{Eq(t)}finally{ml(),i()}}}const lG={get(t,e){return Ci(t,"get",""),t[e]}};function ZI(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,lG),slots:t.slots,emit:t.emit,expose:e}}function A1(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(C6(Mi(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Wm)return Wm[n](t)},has(e,n){return n in e||n in Wm}})):t.proxy}function Sk(t,e=!0){return et(t)?t.displayName||t.name:t.name||e&&t.__name}function cG(t){return et(t)&&"__vccOpts"in t}const U=(t,e)=>IY(t,e,xf);function bt(t,e,n){try{Pg(-1);const s=arguments.length;return s===2?yt(e)&&!Ee(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{Pg(1)}}function uG(){}function dG(t,e,n,s){const i=n[s];if(i&&JI(i,t))return i;const o=e();return o.memo=t.slice(),o.cacheIndex=s,n[s]=o}function JI(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let s=0;s<n.length;s++)if(Fi(n[s],e[s]))return!1;return dd>0&&xi&&xi.push(t),!0}const QI="3.5.27",eL=Dt,hG=zY,fG=xh,pG=tI,mG={createComponentInstance:YI,setupComponent:GI,renderComponentRoot:$0,setCurrentRenderingInstance:Eg,isVNode:is,normalizeVNode:ro,getComponentPublicInstance:A1,ensureValidVNode:I6,pushWarningContext:VY,popWarningContext:FY},gG=mG,vG=null,yG=null,bG=null;/** |
| 16 |
* @vue/runtime-dom v3.5.27 |
| 17 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 18 |
* @license MIT |
| 19 |
**/let $k;const E9=typeof window<"u"&&window.trustedTypes;if(E9)try{$k=E9.createPolicy("vue",{createHTML:t=>t})}catch{}const tL=$k?t=>$k.createHTML(t):t=>t,_G="http://www.w3.org/2000/svg",wG="http://www.w3.org/1998/Math/MathML",Ga=typeof document<"u"?document:null,M9=Ga&&Ga.createElement("template"),nL={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(_G,t):e==="mathml"?Ga.createElementNS(wG,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{M9.innerHTML=tL(s==="svg"?`<svg>${t}</svg>`:s==="mathml"?`<math>${t}</math>`:t);const a=M9.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]}},Vl="transition",Up="animation",Sf=Symbol("_vtc"),sL={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},iL=ln({},$6,sL),kG=t=>(t.displayName="Transition",t.props=iL,t),Ho=kG((t,{slots:e})=>bt(fI,oL(t),e)),du=(t,e=[])=>{Ee(t)?t.forEach(n=>n(...e)):t&&t(...e)},T9=t=>t?Ee(t)?t.some(e=>e.length>1):t.length>1:!1;function oL(t){const e={};for(const R in t)R in sL||(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=CG(i),m=p&&p[0],b=p&&p[1],{onBeforeEnter:_,onEnter:k,onEnterCancelled:C,onLeave:x,onLeaveCancelled:S,onBeforeAppear:M=_,onAppear:P=k,onAppearCancelled:T=C}=e,I=(R,N,F,B)=>{R._enterCancelled=B,Ul(R,N?u:a),Ul(R,N?c:r),F&&F()},L=(R,N)=>{R._isLeaving=!1,Ul(R,d),Ul(R,f),Ul(R,h),N&&N()},V=R=>(N,F)=>{const B=R?P:k,z=()=>I(N,R,F);du(B,[N,z]),P9(()=>{Ul(N,R?l:o),ra(N,R?u:a),T9(B)||I9(N,s,m,z)})};return ln(e,{onBeforeEnter(R){du(_,[R]),ra(R,o),ra(R,r)},onBeforeAppear(R){du(M,[R]),ra(R,l),ra(R,c)},onEnter:V(!1),onAppear:V(!0),onLeave(R,N){R._isLeaving=!0;const F=()=>L(R,N);ra(R,d),R._enterCancelled?(ra(R,h),Ak(R)):(Ak(R),ra(R,h)),P9(()=>{R._isLeaving&&(Ul(R,d),ra(R,f),T9(x)||I9(R,s,b,F))}),du(x,[R,F])},onEnterCancelled(R){I(R,!1,void 0,!0),du(C,[R])},onAppearCancelled(R){I(R,!0,void 0,!0),du(T,[R])},onLeaveCancelled(R){L(R),du(S,[R])}})}function CG(t){if(t==null)return null;if(yt(t))return[hw(t.enter),hw(t.leave)];{const e=hw(t);return[e,e]}}function hw(t){return jy(t)}function ra(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Sf]||(t[Sf]=new Set)).add(e)}function Ul(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[Sf];n&&(n.delete(e),n.size||(t[Sf]=void 0))}function P9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let xG=0;function I9(t,e,n,s){const i=t._endId=++xG,o=()=>{i===t._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=rL(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 rL(t,e){const n=window.getComputedStyle(t),s=p=>(n[p]||"").split(", "),i=s(`${Vl}Delay`),o=s(`${Vl}Duration`),r=L9(i,o),a=s(`${Up}Delay`),l=s(`${Up}Duration`),c=L9(a,l);let u=null,d=0,h=0;e===Vl?r>0&&(u=Vl,d=r,h=o.length):e===Up?c>0&&(u=Up,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Vl:Up:null,h=u?u===Vl?o.length:l.length:0);const f=u===Vl&&/\b(?:transform|all)(?:,|$)/.test(s(`${Vl}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function L9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,s)=>O9(n)+O9(t[s])))}function O9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ak(t){return(t?t.ownerDocument:document).body.offsetHeight}function SG(t,e,n){const s=t[Sf];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const tb=Symbol("_vod"),aL=Symbol("_vsh"),Ht={name:"show",beforeMount(t,{value:e},{transition:n}){t[tb]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):jp(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),jp(t,!0),s.enter(t)):s.leave(t,()=>{jp(t,!1)}):jp(t,e))},beforeUnmount(t,{value:e}){jp(t,e)}};function jp(t,e){t.style.display=e?t[tb]:"none",t[aL]=!e}function $G(){Ht.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const lL=Symbol("");function AG(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=>nb(o,i))},s=()=>{const i=t(e.proxy);e.ce?nb(e.ce,i):Ek(e.subTree,i),n(i)};x_(()=>{$g(s)}),Ft(()=>{Me(s,Dt,{flush:"post"});const i=new MutationObserver(s);i.observe(e.subTree.el.parentNode,{childList:!0}),Cl(()=>i.disconnect())})}function Ek(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ek(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)nb(t.el,e);else if(t.type===te)t.children.forEach(n=>Ek(n,e));else if(t.type===Gu){let{el:n,anchor:s}=t;for(;n&&(nb(n,e),n!==s);)n=n.nextSibling}}function nb(t,e){if(t.nodeType===1){const n=t.style;let s="";for(const i in e){const o=sY(e[i]);n.setProperty(`--${i}`,o),s+=`--${i}: ${o};`}n[lL]=s}}const EG=/(?:^|;)\s*display\s*:/;function MG(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&&E0(s,a,"")}else for(const r in e)n[r]==null&&E0(s,r,"");for(const r in n)r==="display"&&(o=!0),E0(s,r,n[r])}else if(i){if(e!==n){const r=s[lL];r&&(n+=";"+r),s.cssText=n,o=EG.test(n)}}else e&&t.removeAttribute("style");tb in t&&(t[tb]=o?s.display:"",t[aL]&&(s.display="none"))}const D9=/\s*!important$/;function E0(t,e,n){if(Ee(n))n.forEach(s=>E0(t,e,s));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=TG(t,e);D9.test(n)?t.setProperty(Bi(s),n.replace(D9,""),"important"):t[s]=n}}const R9=["Webkit","Moz","ms"],fw={};function TG(t,e){const n=fw[e];if(n)return n;let s=Un(e);if(s!=="filter"&&s in t)return fw[e]=s;s=Yc(s);for(let i=0;i<R9.length;i++){const o=R9[i]+s;if(o in t)return fw[e]=o}return e}const V9="http://www.w3.org/1999/xlink";function F9(t,e,n,s,i,o=tY(e)){s&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(V9,e.slice(6,e.length)):t.setAttributeNS(V9,e,n):n==null||o&&!MP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":mo(n)?String(n):n)}function N9(t,e,n,s,i){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?tL(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=MP(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 PG(t,e,n,s){t.removeEventListener(e,n,s)}const B9=Symbol("_vei");function IG(t,e,n,s,i=null){const o=t[B9]||(t[B9]={}),r=o[e];if(s&&r)r.value=s;else{const[a,l]=LG(e);if(s){const c=o[e]=RG(s,i);tl(t,a,c,l)}else r&&(PG(t,a,r,l),o[e]=void 0)}}const z9=/(?:Once|Passive|Capture)$/;function LG(t){let e;if(z9.test(t)){e={};let s;for(;s=t.match(z9);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Bi(t.slice(2)),e]}let pw=0;const OG=Promise.resolve(),DG=()=>pw||(OG.then(()=>pw=0),pw=Date.now());function RG(t,e){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;mr(VG(s,n.value),e,5,[s])};return n.value=t,n.attached=DG(),n}function VG(t,e){if(Ee(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 H9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,cL=(t,e,n,s,i,o)=>{const r=i==="svg";e==="class"?SG(t,s,r):e==="style"?MG(t,n,s):Md(e)?g6(e)||IG(t,e,n,s,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):FG(t,e,s,r))?(N9(t,e,s),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&F9(t,e,s,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ke(s))?N9(t,Un(e),s,o,e):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),F9(t,e,s,r))};function FG(t,e,n,s){if(s)return!!(e==="innerHTML"||e==="textContent"||e in t&&H9(e)&&et(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 H9(e)&&Ke(n)?!1:e in t}const U9={};function uL(t,e,n){let s=fe(t,e);ud(s)&&(s=ln({},s,e));class i extends A_{constructor(r){super(s,r,n)}}return i.def=s,i}const NG=(t,e)=>uL(t,e,wL),BG=typeof HTMLElement<"u"?HTMLElement:class{};class A_ extends BG{constructor(e,n={},s=Ig){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!==Ig?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(ln({},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 A_){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,ot(()=>{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&&!Ee(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=jy(this._props[l])),(a||(a=Object.create(null)))[Un(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)Nt(this,s)||Object.defineProperty(this,s,{get:()=>A(n[s])})}_resolveProps(e){const{props:n}=e,s=Ee(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(Un))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):U9;const i=Un(e);n&&this._numberProps&&this._numberProps[i]&&(s=jy(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===U9?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(Bi(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Bi(e),n+""):n||this.removeAttribute(Bi(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),Rc(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=y(this._def,ln(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,ud(r[0])?ln({detail:r},r[0]):{detail:r}))};s.emit=(o,...r)=>{i(o,r),Bi(o)!==o&&i(Bi(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 dL(t){const e=ht(),n=e&&e.ce;return n||null}function zG(){const t=dL();return t&&t.shadowRoot}function HG(t="$style"){{const e=ht();if(!e)return pn;const n=e.type.__cssModules;if(!n)return pn;const s=n[t];return s||pn}}const hL=new WeakMap,fL=new WeakMap,sb=Symbol("_moveCb"),j9=Symbol("_enterCb"),UG=t=>(delete t.props.mode,t),jG=UG({name:"TransitionGroup",props:ln({},iL,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=ht(),s=S6();let i,o;return kl(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!GG(i[0].el,n.vnode.el,r)){i=[];return}i.forEach(WG),i.forEach(YG);const a=i.filter(qG);Ak(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;ra(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[sb]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[sb]=null,Ul(c,r))};c.addEventListener("transitionend",d)}),i=[]}),()=>{const r=rn(t),a=oL(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),vl(u,Cf(u,a,s,n)),hL.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?k_(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&vl(u,Cf(u,a,s,n))}return y(l,null,o)}}}),E_=jG;function WG(t){const e=t.el;e[sb]&&e[sb](),e[j9]&&e[j9]()}function YG(t){fL.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function qG(t){const e=hL.get(t),n=fL.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 GG(t,e,n){const s=t.cloneNode(),i=t[Sf];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}=rL(s);return o.removeChild(s),r}const Dc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ee(e)?n=>Jh(e,n):e};function XG(t){t.target.composing=!0}function W9(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ur=Symbol("_assign");function Y9(t,e,n){return e&&(t=t.trim()),n&&(t=d_(t)),t}const fd={created(t,{modifiers:{lazy:e,trim:n,number:s}},i){t[ur]=Dc(i);const o=s||i.props&&i.props.type==="number";tl(t,e?"change":"input",r=>{r.target.composing||t[ur](Y9(t.value,n,o))}),(n||o)&&tl(t,"change",()=>{t.value=Y9(t.value,n,o)}),e||(tl(t,"compositionstart",XG),tl(t,"compositionend",W9),tl(t,"change",W9))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(t[ur]=Dc(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?d_(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))}},E1={deep:!0,created(t,e,n){t[ur]=Dc(n),tl(t,"change",()=>{const s=t._modelValue,i=$f(t),o=t.checked,r=t[ur];if(Ee(s)){const a=f_(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(Td(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(mL(t,o))})},mounted:q9,beforeUpdate(t,e,n){t[ur]=Dc(n),q9(t,e,n)}};function q9(t,{value:e,oldValue:n},s){t._modelValue=e;let i;if(Ee(e))i=f_(e,s.props.value)>-1;else if(Td(e))i=e.has(s.props.value);else{if(e===n)return;i=Lc(e,mL(t,!0))}t.checked!==i&&(t.checked=i)}const M1={created(t,{value:e},n){t.checked=Lc(e,n.props.value),t[ur]=Dc(n),tl(t,"change",()=>{t[ur]($f(t))})},beforeUpdate(t,{value:e,oldValue:n},s){t[ur]=Dc(s),e!==n&&(t.checked=Lc(e,s.props.value))}},pL={deep:!0,created(t,{value:e,modifiers:{number:n}},s){const i=Td(e);tl(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?d_($f(r)):$f(r));t[ur](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,ot(()=>{t._assigning=!1})}),t[ur]=Dc(s)},mounted(t,{value:e}){G9(t,e)},beforeUpdate(t,e,n){t[ur]=Dc(n)},updated(t,{value:e}){t._assigning||G9(t,e)}};function G9(t,e){const n=t.multiple,s=Ee(e);if(!(n&&!s&&!Td(e))){for(let i=0,o=t.options.length;i<o;i++){const r=t.options[i],a=$f(r);if(n)if(s){const l=typeof a;l==="string"||l==="number"?r.selected=e.some(c=>String(c)===String(a)):r.selected=f_(e,a)>-1}else r.selected=e.has(a);else if(Lc($f(r),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function $f(t){return"_value"in t?t._value:t.value}function mL(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const gL={created(t,e,n){zv(t,e,n,null,"created")},mounted(t,e,n){zv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,s){zv(t,e,n,s,"beforeUpdate")},updated(t,e,n,s){zv(t,e,n,s,"updated")}};function vL(t,e){switch(t){case"SELECT":return pL;case"TEXTAREA":return fd;default:switch(e){case"checkbox":return E1;case"radio":return M1;default:return fd}}}function zv(t,e,n,s,i){const r=vL(t.tagName,n.props&&n.props.type)[i];r&&r(t,e,n,s)}function KG(){fd.getSSRProps=({value:t})=>({value:t}),M1.getSSRProps=({value:t},e)=>{if(e.props&&Lc(e.props.value,t))return{checked:!0}},E1.getSSRProps=({value:t},e)=>{if(Ee(t)){if(e.props&&f_(t,e.props.value)>-1)return{checked:!0}}else if(Td(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},gL.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=vL(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const ZG=["ctrl","shift","alt","meta"],JG={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)=>ZG.some(n=>t[`${n}Key`]&&!e.includes(n))},Oe=(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=JG[e[r]];if(a&&a(i,e))return}return t(i,...o)})},QG={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},kt=(t,e)=>{const n=t._withKeys||(t._withKeys={}),s=e.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=Bi(i.key);if(e.some(r=>r===o||QG[r]===o))return t(i)})},yL=ln({patchProp:cL},nL);let qm,X9=!1;function bL(){return qm||(qm=DI(yL))}function _L(){return qm=X9?qm:RI(yL),X9=!0,qm}const Rc=(...t)=>{bL().render(...t)},eX=(...t)=>{_L().hydrate(...t)},Ig=(...t)=>{const e=bL().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=CL(s);if(!i)return;const o=e._component;!et(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,kL(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e},wL=(...t)=>{const e=_L().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=CL(s);if(i)return n(i,!0,kL(i))},e};function kL(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function CL(t){return Ke(t)?document.querySelector(t):t}let K9=!1;const tX=()=>{K9||(K9=!0,KG(),$G())},nX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:fI,BaseTransitionPropsValidators:$6,Comment:Zn,DeprecationTypes:bG,EffectScope:y6,ErrorCodes:BY,ErrorTypeStrings:hG,Fragment:te,KeepAlive:fq,ReactiveEffect:Cg,Static:Gu,Suspense:Kq,Teleport:Pa,Text:ba,TrackOpTypes:LY,Transition:Ho,TransitionGroup:E_,TriggerOpTypes:OY,VueElement:A_,assertNumber:NY,callWithAsyncErrorHandling:mr,callWithErrorHandling:rp,camelize:Un,capitalize:Yc,cloneVNode:gr,compatUtils:yG,computed:U,createApp:Ig,createBlock:D,createCommentVNode:O,createElementBlock:E,createElementVNode:g,createHydrationRenderer:RI,createPropsRestProxy:$q,createRenderer:DI,createSSRApp:wL,createSlots:fs,createStaticVNode:Ia,createTextVNode:W,createVNode:y,customRef:GP,defineAsyncComponent:dq,defineComponent:fe,defineCustomElement:uL,defineEmits:yq,defineExpose:bq,defineModel:kq,defineOptions:_q,defineProps:vq,defineSSRCustomElement:NG,defineSlots:wq,devtools:fG,effect:oY,effectScope:p_,getCurrentInstance:ht,getCurrentScope:m_,getCurrentWatcher:DY,getTransitionRawChildren:k_,guardReactiveProps:sf,h:bt,handleError:Pd,hasInjectionContext:nI,hydrate:eX,hydrateOnIdle:oq,hydrateOnInteraction:cq,hydrateOnMediaQuery:lq,hydrateOnVisible:aq,initCustomFormatter:uG,initDirectivesForSSR:tX,inject:Ye,isMemoSame:JI,isProxy:x1,isReactive:Or,isReadonly:ka,isRef:hn,isRuntimeOnly:aG,isShallow:uo,isVNode:is,markRaw:Mi,mergeDefaults:xq,mergeModels:Sq,mergeProps:Kt,nextTick:ot,nodeOps:nL,normalizeClass:q,normalizeProps:Qh,normalizeStyle:Xe,onActivated:E6,onBeforeMount:Id,onBeforeUnmount:wn,onBeforeUpdate:x_,onDeactivated:M6,onErrorCaptured:bI,onMounted:Ft,onRenderTracked:yI,onRenderTriggered:vI,onScopeDispose:g_,onServerPrefetch:gI,onUnmounted:Cl,onUpdated:kl,onWatcherCleanup:KP,openBlock:v,patchProp:cL,popScopeId:WY,provide:Pt,proxyRefs:C6,pushScopeId:jY,queuePostFlushCb:$g,reactive:In,readonly:Oc,ref:J,registerRuntimeCompiler:XI,render:Rc,renderList:we,renderSlot:le,resolveComponent:Y,resolveDirective:xt,resolveDynamicComponent:Ct,resolveFilter:vG,resolveTransitionHooks:Cf,setBlockTracking:Pg,setDevtoolsHook:pG,setTransitionHooks:vl,shallowReactive:k6,shallowReadonly:SY,shallowRef:Fn,ssrContextKey:sI,ssrUtils:gG,stop:rY,toDisplayString:$,toHandlerKey:Wu,toHandlers:wI,toRaw:rn,toRef:Sn,toRefs:go,toValue:fk,transformVNodeArgs:nG,triggerRef:Um,unref:A,useAttrs:Ld,useCssModule:HG,useCssVars:AG,useHost:dL,useId:ZY,useModel:Dq,useSSRContext:iI,useShadowRoot:zG,useSlots:hi,useTemplateRef:JY,useTransitionState:S6,vModelCheckbox:E1,vModelDynamic:gL,vModelRadio:M1,vModelSelect:pL,vModelText:fd,vShow:Ht,version:QI,warn:eL,watch:Me,watchEffect:gl,watchPostEffect:qY,watchSyncEffect:oI,withAsyncContext:Aq,withCtx:w,withDefaults:Cq,withDirectives:Re,withKeys:kt,withMemo:dG,withModifiers:Oe,withScopeId:YY},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 Lg=Symbol(""),Gm=Symbol(""),F6=Symbol(""),ib=Symbol(""),xL=Symbol(""),pd=Symbol(""),SL=Symbol(""),$L=Symbol(""),N6=Symbol(""),B6=Symbol(""),T1=Symbol(""),z6=Symbol(""),AL=Symbol(""),H6=Symbol(""),U6=Symbol(""),j6=Symbol(""),W6=Symbol(""),Y6=Symbol(""),q6=Symbol(""),EL=Symbol(""),ML=Symbol(""),M_=Symbol(""),ob=Symbol(""),G6=Symbol(""),X6=Symbol(""),Og=Symbol(""),P1=Symbol(""),K6=Symbol(""),Mk=Symbol(""),sX=Symbol(""),Tk=Symbol(""),rb=Symbol(""),iX=Symbol(""),oX=Symbol(""),Z6=Symbol(""),rX=Symbol(""),aX=Symbol(""),J6=Symbol(""),TL=Symbol(""),Af={[Lg]:"Fragment",[Gm]:"Teleport",[F6]:"Suspense",[ib]:"KeepAlive",[xL]:"BaseTransition",[pd]:"openBlock",[SL]:"createBlock",[$L]:"createElementBlock",[N6]:"createVNode",[B6]:"createElementVNode",[T1]:"createCommentVNode",[z6]:"createTextVNode",[AL]:"createStaticVNode",[H6]:"resolveComponent",[U6]:"resolveDynamicComponent",[j6]:"resolveDirective",[W6]:"resolveFilter",[Y6]:"withDirectives",[q6]:"renderList",[EL]:"renderSlot",[ML]:"createSlots",[M_]:"toDisplayString",[ob]:"mergeProps",[G6]:"normalizeClass",[X6]:"normalizeStyle",[Og]:"normalizeProps",[P1]:"guardReactiveProps",[K6]:"toHandlers",[Mk]:"camelize",[sX]:"capitalize",[Tk]:"toHandlerKey",[rb]:"setBlockTracking",[iX]:"pushScopeId",[oX]:"popScopeId",[Z6]:"withCtx",[rX]:"unref",[aX]:"isRef",[J6]:"withMemo",[TL]:"isMemoSame"};function lX(t){Object.getOwnPropertySymbols(t).forEach(e=>{Af[e]=t[e]})}const Uo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function cX(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Uo}}function Dg(t,e,n,s,i,o,r,a=!1,l=!1,c=!1,u=Uo){return t&&(a?(t.helper(pd),t.helper(Tf(t.inSSR,c))):t.helper(Mf(t.inSSR,c)),r&&t.helper(Y6)),{type:13,tag:e,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Xu(t,e=Uo){return{type:17,loc:e,elements:t}}function ar(t,e=Uo){return{type:15,loc:e,properties:t}}function Ms(t,e){return{type:16,loc:Uo,key:Ke(t)?Wt(t,!0):t,value:e}}function Wt(t,e=!1,n=Uo,s=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:s}}function Dr(t,e=Uo){return{type:8,loc:e,children:t}}function Vs(t,e=[],n=Uo){return{type:14,loc:n,callee:t,arguments:e}}function Ef(t,e=void 0,n=!1,s=!1,i=Uo){return{type:18,params:t,returns:e,newline:n,isSlot:s,loc:i}}function Pk(t,e,n,s=!0){return{type:19,test:t,consequent:e,alternate:n,newline:s,loc:Uo}}function uX(t,e,n=!1,s=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:s,needArraySpread:!1,loc:Uo}}function dX(t){return{type:21,body:t,loc:Uo}}function Mf(t,e){return t||e?N6:B6}function Tf(t,e){return t||e?SL:$L}function Q6(t,{helper:e,removeHelper:n,inSSR:s}){t.isBlock||(t.isBlock=!0,n(Mf(s,t.isComponent)),e(pd),e(Tf(s,t.isComponent)))}const Z9=new Uint8Array([123,123]),J9=new Uint8Array([125,125]);function Q9(t){return t>=97&&t<=122||t>=65&&t<=90}function Eo(t){return t===32||t===10||t===9||t===12||t===13}function Fl(t){return t===47||t===62||Eo(t)}function ab(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const vi={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 hX{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=Z9,this.delimiterClose=J9,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=Z9,this.delimiterClose=J9}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?Fl(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||Eo(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===vi.TitleEnd||this.currentSequence===vi.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===vi.Cdata[this.sequenceIndex]?++this.sequenceIndex===vi.Cdata.length&&(this.state=28,this.currentSequence=vi.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===vi.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){Fl(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Fl(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(ab("</"+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){Eo(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||Eo(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):Eo(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):Eo(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Fl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Fl(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||Fl(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||Fl(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Fl(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)):Eo(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):Eo(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){Eo(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=vi.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===vi.ScriptEnd[3]?this.startSpecial(vi.ScriptEnd,4):e===vi.StyleEnd[3]?this.startSpecial(vi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===vi.TitleEnd[3]?this.startSpecial(vi.TitleEnd,4):e===vi.TextareaEnd[3]?this.startSpecial(vi.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===vi.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 e7(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function Ku(t,e){const n=e7("MODE",e),s=e7(t,e);return n===3?s===!0:s!==!1}function Rg(t,e,n,...s){return Ku(t,e)}function e4(t){throw t}function PL(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 lo=t=>t.type===4&&t.isStatic;function IL(t){switch(t){case"Teleport":case"teleport":return Gm;case"Suspense":case"suspense":return F6;case"KeepAlive":case"keep-alive":return ib;case"BaseTransition":case"base-transition":return xL}}const fX=/^$|^\d|[^\$\w\xA0-\uFFFF]/,t4=t=>!fX.test(t),LL=/[A-Za-z_$\xA0-\uFFFF]/,pX=/[\.\?\w$\xA0-\uFFFF]/,mX=/\s+[.[]\s*|\s*[.[]\s+/g,OL=t=>t.type===4?t.content:t.loc.source,gX=t=>{const e=OL(t).trim().replace(mX,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?LL:pX).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},DL=gX,vX=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,yX=t=>vX.test(OL(t)),bX=yX;function nr(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 T_(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)&&Lu(o.arg,e))return o}}function Lu(t,e){return!!(t&&lo(t)&&t.content===e)}function _X(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function mw(t){return t.type===5||t.type===2}function t7(t){return t.type===7&&t.name==="pre"}function wX(t){return t.type===7&&t.name==="slot"}function lb(t){return t.type===1&&t.tagType===3}function cb(t){return t.type===1&&t.tagType===2}const kX=new Set([Og,P1]);function RL(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&kX.has(n))return RL(t.arguments[0],e.concat(t))}return[t,e]}function ub(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=RL(i);i=a[0],o=a[1],r=o[o.length-1]}if(i==null||Ke(i))s=ar([e]);else if(i.type===14){const a=i.arguments[0];!Ke(a)&&a.type===15?n7(e,a)||a.properties.unshift(e):i.callee===K6?s=Vs(n.helper(ob),[ar([e]),i]):i.arguments.unshift(ar([e])),!s&&(s=i)}else i.type===15?(n7(e,i)||i.properties.unshift(e),s=i):(s=Vs(n.helper(ob),[ar([e]),i]),r&&r.callee===P1&&(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 n7(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 Vg(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,s)=>n==="-"?"_":t.charCodeAt(s).toString())}`}function CX(t){return t.type===14&&t.callee===J6?t.arguments[1].returns:t}const xX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function VL(t){for(let e=0;e<t.length;e++)if(!Eo(t.charCodeAt(e)))return!1;return!0}function n4(t){return t.type===2&&VL(t.content)||t.type===12&&n4(t.content)}function FL(t){return t.type===3||n4(t)}const NL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Yh,isPreTag:Yh,isIgnoreNewlineTag:Yh,isCustomElement:Yh,onError:e4,onWarn:PL,comments:!1,prefixIdentifiers:!1};let An=NL,Fg=null,ul="",ki=null,fn=null,no="",Wa=-1,vu=-1,s4=0,lc=!1,Ik=null;const us=[],ys=new hX(us,{onerr:Ha,ontext(t,e){Hv(Ks(t,e),t,e)},ontextentity(t,e,n){Hv(t,e,n)},oninterpolation(t,e){if(lc)return Hv(Ks(t,e),t,e);let n=t+ys.delimiterOpen.length,s=e-ys.delimiterClose.length;for(;Eo(ul.charCodeAt(n));)n++;for(;Eo(ul.charCodeAt(s-1));)s--;let i=Ks(n,s);i.includes("&")&&(i=An.decodeEntities(i,!1)),Lk({type:5,content:T0(i,!1,ks(n,s)),loc:ks(t,e)})},onopentagname(t,e){const n=Ks(t,e);ki={type:1,tag:n,ns:An.getNamespace(n,us[0],An.ns),tagType:0,props:[],children:[],loc:ks(t-1,e),codegenNode:void 0}},onopentagend(t){i7(t)},onclosetag(t,e){const n=Ks(t,e);if(!An.isVoidTag(n)){let s=!1;for(let i=0;i<us.length;i++)if(us[i].tag.toLowerCase()===n.toLowerCase()){s=!0,i>0&&Ha(24,us[0].loc.start.offset);for(let r=0;r<=i;r++){const a=us.shift();M0(a,e,r<i)}break}s||Ha(23,BL(t,60))}},onselfclosingtag(t){const e=ki.tag;ki.isSelfClosing=!0,i7(t),us[0]&&us[0].tag===e&&M0(us.shift(),t)},onattribname(t,e){fn={type:6,name:Ks(t,e),nameLoc:ks(t,e),value:void 0,loc:ks(t)}},ondirname(t,e){const n=Ks(t,e),s=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!lc&&s===""&&Ha(26,t),lc||s==="")fn={type:6,name:n,nameLoc:ks(t,e),value:void 0,loc:ks(t)};else if(fn={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Wt("prop")]:[],loc:ks(t)},s==="pre"){lc=ys.inVPre=!0,Ik=ki;const i=ki.props;for(let o=0;o<i.length;o++)i[o].type===7&&(i[o]=OX(i[o]))}},ondirarg(t,e){if(t===e)return;const n=Ks(t,e);if(lc&&!t7(fn))fn.name+=n,Ou(fn.nameLoc,e);else{const s=n[0]!=="[";fn.arg=T0(s?n:n.slice(1,-1),s,ks(t,e),s?3:0)}},ondirmodifier(t,e){const n=Ks(t,e);if(lc&&!t7(fn))fn.name+="."+n,Ou(fn.nameLoc,e);else if(fn.name==="slot"){const s=fn.arg;s&&(s.content+="."+n,Ou(s.loc,e))}else{const s=Wt(n,!0,ks(t,e));fn.modifiers.push(s)}},onattribdata(t,e){no+=Ks(t,e),Wa<0&&(Wa=t),vu=e},onattribentity(t,e,n){no+=t,Wa<0&&(Wa=e),vu=n},onattribnameend(t){const e=fn.loc.start.offset,n=Ks(e,t);fn.type===7&&(fn.rawName=n),ki.props.some(s=>(s.type===7?s.rawName:s.name)===n)&&Ha(2,e)},onattribend(t,e){if(ki&&fn){if(Ou(fn.loc,e),t!==0)if(no.includes("&")&&(no=An.decodeEntities(no,!0)),fn.type===6)fn.name==="class"&&(no=HL(no).trim()),t===1&&!no&&Ha(13,e),fn.value={type:2,content:no,loc:t===1?ks(Wa,vu):ks(Wa-1,vu+1)},ys.inSFCRoot&&ki.tag==="template"&&fn.name==="lang"&&no&&no!=="html"&&ys.enterRCDATA(ab("</template"),0);else{let n=0;fn.exp=T0(no,!1,ks(Wa,vu),0,n),fn.name==="for"&&(fn.forParseResult=$X(fn.exp));let s=-1;fn.name==="bind"&&(s=fn.modifiers.findIndex(i=>i.content==="sync"))>-1&&Rg("COMPILER_V_BIND_SYNC",An,fn.loc,fn.arg.loc.source)&&(fn.name="model",fn.modifiers.splice(s,1))}(fn.type!==7||fn.name!=="pre")&&ki.props.push(fn)}no="",Wa=vu=-1},oncomment(t,e){An.comments&&Lk({type:3,content:Ks(t,e),loc:ks(t-4,e+3)})},onend(){const t=ul.length;for(let e=0;e<us.length;e++)M0(us[e],t-1),Ha(24,us[e].loc.start.offset)},oncdata(t,e){us[0].ns!==0?Hv(Ks(t,e),t,e):Ha(1,t-9)},onprocessinginstruction(t){(us[0]?us[0].ns:An.ns)===0&&Ha(21,t-1)}}),s7=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,SX=/^\(|\)$/g;function $X(t){const e=t.loc,n=t.content,s=n.match(xX);if(!s)return;const[,i,o]=s,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return T0(d,!1,ks(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(SX,"").trim();const c=i.indexOf(l),u=l.match(s7);if(u){l=l.replace(s7,"").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 Ks(t,e){return ul.slice(t,e)}function i7(t){ys.inSFCRoot&&(ki.innerLoc=ks(t+1,t+1)),Lk(ki);const{tag:e,ns:n}=ki;n===0&&An.isPreTag(e)&&s4++,An.isVoidTag(e)?M0(ki,t):(us.unshift(ki),(n===1||n===2)&&(ys.inXML=!0)),ki=null}function Hv(t,e,n){{const o=us[0]&&us[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=An.decodeEntities(t,!1))}const s=us[0]||Fg,i=s.children[s.children.length-1];i&&i.type===2?(i.content+=t,Ou(i.loc,n)):s.children.push({type:2,content:t,loc:ks(e,n)})}function M0(t,e,n=!1){n?Ou(t.loc,BL(e,60)):Ou(t.loc,AX(e,62)+1),ys.inSFCRoot&&(t.children.length?t.innerLoc.end=ln({},t.children[t.children.length-1].loc.end):t.innerLoc.end=ln({},t.innerLoc.start),t.innerLoc.source=Ks(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:i,children:o}=t;if(lc||(s==="slot"?t.tagType=2:o7(t)?t.tagType=3:MX(t)&&(t.tagType=1)),ys.inRCDATA||(t.children=zL(o)),i===0&&An.isIgnoreNewlineTag(s)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}i===0&&An.isPreTag(s)&&s4--,Ik===t&&(lc=ys.inVPre=!1,Ik=null),ys.inXML&&(us[0]?us[0].ns:An.ns)===0&&(ys.inXML=!1);{const r=t.props;if(!ys.inSFCRoot&&Ku("COMPILER_NATIVE_TEMPLATE",An)&&t.tag==="template"&&!o7(t)){const l=us[0]||Fg,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&&Rg("COMPILER_INLINE_TEMPLATE",An,a.loc)&&t.children.length&&(a.value={type:2,content:Ks(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function AX(t,e){let n=t;for(;ul.charCodeAt(n)!==e&&n<ul.length-1;)n++;return n}function BL(t,e){let n=t;for(;ul.charCodeAt(n)!==e&&n>=0;)n--;return n}const EX=new Set(["if","else","else-if","for","slot"]);function o7({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&EX.has(e[n].name))return!0}return!1}function MX({tag:t,props:e}){if(An.isCustomElement(t))return!1;if(t==="component"||TX(t.charCodeAt(0))||IL(t)||An.isBuiltInComponent&&An.isBuiltInComponent(t)||An.isNativeTag&&!An.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(Rg("COMPILER_IS_ON_ELEMENT",An,s.loc))return!0}}else if(s.name==="bind"&&Lu(s.arg,"is")&&Rg("COMPILER_IS_ON_ELEMENT",An,s.loc))return!0}return!1}function TX(t){return t>64&&t<91}const PX=/\r\n/g;function zL(t){const e=An.whitespace!=="preserve";let n=!1;for(let s=0;s<t.length;s++){const i=t[s];if(i.type===2)if(s4)i.content=i.content.replace(PX,` |
| 24 |
`);else if(VL(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&&IX(i.content)))?(n=!0,t[s]=null):i.content=" "}else e&&(i.content=HL(i.content))}return n?t.filter(Boolean):t}function IX(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function HL(t){let e="",n=!1;for(let s=0;s<t.length;s++)Eo(t.charCodeAt(s))?n||(e+=" ",n=!0):(e+=t[s],n=!1);return e}function Lk(t){(us[0]||Fg).children.push(t)}function ks(t,e){return{start:ys.getPos(t),end:e==null?e:ys.getPos(e),source:e==null?e:Ks(t,e)}}function LX(t){return ks(t.start.offset,t.end.offset)}function Ou(t,e){t.end=ys.getPos(e),t.source=Ks(t.start.offset,e)}function OX(t){const e={type:6,name:t.rawName,nameLoc:ks(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 T0(t,e=!1,n,s=0,i=0){return Wt(t,e,n,s)}function Ha(t,e,n){An.onError(ss(t,ks(e,e)))}function DX(){ys.reset(),ki=null,fn=null,no="",Wa=-1,vu=-1,us.length=0}function RX(t,e){if(DX(),ul=t,An=ln({},NL),e){let i;for(i in e)e[i]!=null&&(An[i]=e[i])}ys.mode=An.parseMode==="html"?1:An.parseMode==="sfc"?2:0,ys.inXML=An.ns===1||An.ns===2;const n=e&&e.delimiters;n&&(ys.delimiterOpen=ab(n[0]),ys.delimiterClose=ab(n[1]));const s=Fg=cX([],t);return ys.parse(ul),s.loc=ks(0,t.length),s.children=zL(s.children),Fg=null,s}function VX(t,e){P0(t,void 0,e,!!UL(t))}function UL(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!cb(e[0])?e[0]:null}function P0(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:To(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)&&WL(d,n)>=2){const m=YL(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(s?0:To(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++,P0(d,t,n,!1,i),h&&n.scopes.vSlot--}else if(d.type===11)P0(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)P0(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&&Ee(t.codegenNode.children))t.codegenNode.children=l(Xu(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ee(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Xu(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&&!Ee(e.codegenNode.children)&&e.codegenNode.children.type===15){const u=nr(t,"slot",!0),d=u&&u.arg&&c(e.codegenNode,u.arg);d&&(d.returns=l(Xu(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&&!Ee(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 To(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=WL(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=To(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=To(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(pd),e.removeHelper(Tf(e.inSSR,i.isComponent)),i.isBlock=!1,e.helper(Mf(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 To(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)||mo(a))continue;const l=To(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const FX=new Set([G6,X6,Og,P1]);function jL(t,e){if(t.type===14&&!Ke(t.callee)&&FX.has(t.callee)){const n=t.arguments[0];if(n.type===4)return To(n,e);if(n.type===14)return jL(n,e)}return 0}function WL(t,e){let n=3;const s=YL(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=To(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=To(a,e):a.type===14?c=jL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function YL(t){const e=t.codegenNode;if(e.type===13)return e.props}function NX(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:s=!1,hmr:i=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Dt,isCustomElement:u=Dt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:b="",bindingMetadata:_=pn,inline:k=!1,isTS:C=!1,onError:x=e4,onWarn:S=PL,compatConfig:M}){const P=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),T={filename:e,selfName:P&&Yc(Un(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:k,isTS:C,onError:x,onWarn:S,compatConfig:M,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(I){const L=T.helpers.get(I)||0;return T.helpers.set(I,L+1),I},removeHelper(I){const L=T.helpers.get(I);if(L){const V=L-1;V?T.helpers.set(I,V):T.helpers.delete(I)}},helperString(I){return`_${Af[T.helper(I)]}`},replaceNode(I){T.parent.children[T.childIndex]=T.currentNode=I},removeNode(I){const L=T.parent.children,V=I?L.indexOf(I):T.currentNode?T.childIndex:-1;!I||I===T.currentNode?(T.currentNode=null,T.onNodeRemoved()):T.childIndex>V&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(V,1)},onNodeRemoved:Dt,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){Ke(I)&&(I=Wt(I)),T.hoists.push(I);const L=Wt(`_hoisted_${T.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1,V=!1){const R=uX(T.cached.length,I,L,V);return T.cached.push(R),R}};return T.filters=new Set,T}function BX(t,e){const n=NX(t,e);P_(t,n),e.hoistStatic&&VX(t,n),e.ssr||zX(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 zX(t,e){const{helper:n}=e,{children:s}=t;if(s.length===1){const i=UL(t);if(i&&i.codegenNode){const o=i.codegenNode;o.type===13&&Q6(o,e),t.codegenNode=o}else t.codegenNode=s[0]}else if(s.length>1){let i=64;t.codegenNode=Dg(e,n(Lg),void 0,t.children,i,void 0,void 0,!0,void 0,!1)}}function HX(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,P_(i,e))}}function P_(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&&(Ee(r)?s.push(...r):s.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(T1);break;case 5:e.ssr||e.helper(M_);break;case 9:for(let o=0;o<t.branches.length;o++)P_(t.branches[o],e);break;case 10:case 11:case 1:case 0:HX(t,e);break}e.currentNode=t;let i=s.length;for(;i--;)s[i]()}function qL(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(wX))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 I_="/*@__PURE__*/",GL=t=>`${Af[t]}: _${Af[t]}`;function UX(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`_${Af[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 jX(t,e={}){const n=UX(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";WX(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(GL).join(", ")} } = _Vue |
| 26 |
`,-1),l())),t.components.length&&(gw(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(gw(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),gw(t.filters,"filter",n),l()),t.temps>0){i("let ");for(let k=0;k<t.temps;k++)i(`${k>0?", ":""}_temp${k}`)}return(t.components.length||t.directives.length||t.temps)&&(i(` |
| 27 |
`,0),l()),u||i("return "),t.codegenNode?$i(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 WX(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=[N6,B6,T1,z6,AL].filter(h=>u.includes(h)).map(GL).join(", ");i(`const { ${d} } = _Vue |
| 29 |
`,-1)}YX(t.hoists,e),o(),i("return ")}function gw(t,e,{helper:n,push:s,newline:i,isTS:o}){const r=n(e==="filter"?W6:e==="component"?H6:j6);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 ${Vg(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&i()}}function YX(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} = `),$i(o,e),s())}e.pure=!1}function i4(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),I1(t,e,n),n&&e.deindent(),e.push("]")}function I1(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):Ee(a)?i4(a,e):$i(a,e),r<t.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function $i(t,e){if(Ke(t)){e.push(t,-3);return}if(mo(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:$i(t.codegenNode,e);break;case 2:qX(t,e);break;case 4:XL(t,e);break;case 5:GX(t,e);break;case 12:$i(t.codegenNode,e);break;case 8:KL(t,e);break;case 3:KX(t,e);break;case 13:ZX(t,e);break;case 14:QX(t,e);break;case 15:eK(t,e);break;case 17:tK(t,e);break;case 18:nK(t,e);break;case 19:sK(t,e);break;case 20:iK(t,e);break;case 21:I1(t.body,e,!0,!1);break}}function qX(t,e){e.push(JSON.stringify(t.content),-3,t)}function XL(t,e){const{content:n,isStatic:s}=t;e.push(s?JSON.stringify(n):n,-3,t)}function GX(t,e){const{push:n,helper:s,pure:i}=e;i&&n(I_),n(`${s(M_)}(`),$i(t.content,e),n(")")}function KL(t,e){for(let n=0;n<t.children.length;n++){const s=t.children[n];Ke(s)?e.push(s,-3):$i(s,e)}}function XX(t,e){const{push:n}=e;if(t.type===8)n("["),KL(t,e),n("]");else if(t.isStatic){const s=t4(t.content)?t.content:JSON.stringify(t.content);n(s,-2,t)}else n(`[${t.content}]`,-3,t)}function KX(t,e){const{push:n,helper:s,pure:i}=e;i&&n(I_),n(`${s(T1)}(${JSON.stringify(t.content)})`,-3,t)}function ZX(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(Y6)+"("),d&&n(`(${s(pd)}(${h?"true":""}), `),i&&n(I_);const m=d?Tf(e.inSSR,f):Mf(e.inSSR,f);n(s(m)+"(",-2,t),I1(JX([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),$i(u,e),n(")"))}function JX(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function QX(t,e){const{push:n,helper:s,pure:i}=e,o=Ke(t.callee)?t.callee:s(t.callee);i&&n(I_),n(o+"(",-2,t),I1(t.arguments,e),n(")")}function eK(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];XX(c,e),n(": "),$i(u,e),l<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}function tK(t,e){i4(t.elements,e)}function nK(t,e){const{push:n,indent:s,deindent:i}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${Af[Z6]}(`),n("(",-2,t),Ee(o)?I1(o,e):o&&$i(o,e),n(") => "),(l||a)&&(n("{"),s()),r?(l&&n("return "),Ee(r)?i4(r,e):$i(r,e)):a&&$i(a,e),(l||a)&&(i(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function sK(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=!t4(n.content);d&&r("("),XL(n,e),d&&r(")")}else r("("),$i(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),$i(s,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=i.type===19;u||e.indentLevel++,$i(i,e),u||e.indentLevel--,o&&l(!0)}function iK(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(rb)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),$i(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${s(rb)}(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 oK=qL(/^(?:if|else|else-if)$/,(t,e,n)=>rK(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=a7(i,l,n);else{const c=aK(s.codegenNode);c.alternate=a7(i,l+s.branches.length-1,n)}}}));function rK(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=Wt("true",!1,i)}if(e.name==="if"){const i=r7(t,e),o={type:9,loc:LX(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&&FL(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=r7(t,e);r.branches.push(a);const l=s&&s(r,a,!1);P_(a,n),l&&l(),n.currentNode=null}else n.onError(ss(30,t.loc));break}}}function r7(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!nr(t,"for")?t.children:[t],userKey:T_(t,"key"),isTemplateIf:n}}function a7(t,e,n){return t.condition?Pk(t.condition,l7(t,e,n),Vs(n.helper(T1),['""',"true"])):l7(t,e,n)}function l7(t,e,n){const{helper:s}=n,i=Ms("key",Wt(`${e}`,!1,Uo,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 ub(l,i,n),l}else{let l=64;return Dg(n,s(Lg),ar([i]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=CX(l);return c.type===13&&Q6(c,n),ub(c,i,n),l}}function aK(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 lK=qL("for",(t,e,n)=>{const{helper:s,removeHelper:i}=n;return cK(t,e,n,o=>{const r=Vs(s(q6),[o.source]),a=lb(t),l=nr(t,"memo"),c=T_(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Wt(c.value.content,!0):void 0:c.exp);const d=c&&u?Ms("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=Dg(n,s(Lg),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,_=cb(t)?t:a&&t.children.length===1&&cb(t.children[0])?t.children[0]:null;if(_?(p=_.codegenNode,a&&d&&ub(p,d,n)):b?p=Dg(n,s(Lg),d?ar([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&ub(p,d,n),p.isBlock!==!h&&(p.isBlock?(i(pd),i(Tf(n.inSSR,p.isComponent))):i(Mf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(s(pd),s(Tf(n.inSSR,p.isComponent))):s(Mf(n.inSSR,p.isComponent))),l){const k=Ef(Ok(o.parseResult,[Wt("_cached")]));k.body=dX([Dr(["const _memo = (",l.exp,")"]),Dr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(TL)}(_cached, _memo)) return _cached`]),Dr(["const _item = ",p]),Wt("_item.memo = _memo"),Wt("return _item")]),r.arguments.push(k,Wt("_cache"),Wt(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Ef(Ok(o.parseResult),p,!0))}})});function cK(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}ZL(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:lb(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=s&&s(h);return()=>{a.vFor--,f&&f()}}function ZL(t,e){t.finalized||(t.finalized=!0)}function Ok({value:t,key:e,index:n},s=[]){return uK([t,e,n,...s])}function uK(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,s)=>n||Wt("_".repeat(s+1),!1))}const c7=Wt("undefined",!1),dK=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=nr(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},hK=(t,e,n,s)=>Ef(t,n,!1,!0,n.length?n[0].loc:s);function fK(t,e,n=hK){e.helper(Z6);const{children:s,loc:i}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=nr(t,"slot",!0);if(l){const{arg:b,exp:_}=l;b&&!lo(b)&&(a=!0),o.push(Ms(b||Wt("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 k;if(!lb(_)||!(k=nr(_,"slot",!0))){_.type!==3&&d.push(_);continue}if(l){e.onError(ss(37,k.loc));break}c=!0;const{children:C,loc:x}=_,{arg:S=Wt("default",!0),exp:M,loc:P}=k;let T;lo(S)?T=S?S.content:"default":a=!0;const I=nr(_,"for"),L=n(M,I,C,x);let V,R;if(V=nr(_,"if"))a=!0,r.push(Pk(V.exp,Uv(S,L,f++),c7));else if(R=nr(_,/^else(?:-if)?$/,!0)){let N=b,F;for(;N--&&(F=s[N],!!FL(F)););if(F&&lb(F)&&nr(F,/^(?:else-)?if$/)){let B=r[r.length-1];for(;B.alternate.type===19;)B=B.alternate;B.alternate=R.exp?Pk(R.exp,Uv(S,L,f++),c7):Uv(S,L,f++)}else e.onError(ss(30,R.loc))}else if(I){a=!0;const N=I.forParseResult;N?(ZL(N),r.push(Vs(e.helper(q6),[N.source,Ef(Ok(N),Uv(S,L),!0)]))):e.onError(ss(32,I.loc))}else{if(T){if(h.has(T)){e.onError(ss(38,P));continue}h.add(T),T==="default"&&(u=!0)}o.push(Ms(S,L))}}if(!l){const b=(_,k)=>{const C=n(_,void 0,k,i);return e.compatConfig&&(C.isNonScopedSlot=!0),Ms("default",C)};c?d.length&&!d.every(n4)&&(u?e.onError(ss(39,d[0].loc)):o.push(b(void 0,d))):o.push(b(void 0,s))}const p=a?2:I0(t.children)?3:1;let m=ar(o.concat(Ms("_",Wt(p+"",!1))),i);return r.length&&(m=Vs(e.helper(ML),[m,Xu(r)])),{slots:m,hasDynamicSlots:a}}function Uv(t,e,n){const s=[Ms("name",t),Ms("fn",e)];return n!=null&&s.push(Ms("key",Wt(String(n),!0))),ar(s)}function I0(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||I0(n.children))return!0;break;case 9:if(I0(n.branches))return!0;break;case 10:case 11:if(I0(n.children))return!0;break}}return!1}const JL=new WeakMap,pK=(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?mK(t,e):`"${s}"`;const a=yt(r)&&r.callee===U6;let l,c,u=0,d,h,f,p=a||r===Gm||r===F6||!o&&(s==="svg"||s==="foreignObject"||s==="math");if(i.length>0){const m=QL(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const b=m.directives;f=b&&b.length?Xu(b.map(_=>vK(_,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===ib&&(p=!0,u|=1024),o&&r!==Gm&&r!==ib){const{slots:b,hasDynamicSlots:_}=fK(t,e);c=b,_&&(u|=1024)}else if(t.children.length===1&&r!==Gm){const b=t.children[0],_=b.type,k=_===5||_===8;k&&To(b,e)===0&&(u|=1),k||_===2?c=b:c=t.children}else c=t.children;h&&h.length&&(d=yK(h)),t.codegenNode=Dg(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function mK(t,e,n=!1){let{tag:s}=t;const i=Dk(s),o=T_(t,"is",!1,!0);if(o)if(i||Ku("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Wt(o.value.content,!0):(a=o.exp,a||(a=Wt("is",!1,o.arg.loc))),a)return Vs(e.helper(U6),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(s=o.value.content.slice(4));const r=IL(s)||e.isBuiltInComponent(s);return r?(n||e.helper(r),r):(e.helper(H6),e.components.add(s),Vg(s,"component"))}function QL(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,k=!1,C=!1,x=!1;const S=[],M=L=>{c.length&&(u.push(ar(u7(c),a)),c=[]),L&&u.push(L)},P=()=>{e.scopes.vFor>0&&c.push(Ms(Wt("ref_for",!0),Wt("true")))},T=({key:L,value:V})=>{if(lo(L)){const R=L.content,N=Md(R);if(N&&(!s||i)&&R.toLowerCase()!=="onclick"&&R!=="onUpdate:modelValue"&&!ll(R)&&(k=!0),N&&ll(R)&&(x=!0),N&&V.type===14&&(V=V.arguments[0]),V.type===20||(V.type===4||V.type===8)&&To(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 C=!0};for(let L=0;L<n.length;L++){const V=n[L];if(V.type===6){const{loc:R,name:N,nameLoc:F,value:B}=V;let z=!0;if(N==="ref"&&(m=!0,P()),N==="is"&&(Dk(r)||B&&B.content.startsWith("vue:")||Ku("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(Ms(Wt(N,!0,F),Wt(B?B.content:"",z,B?B.loc:R)))}else{const{name:R,arg:N,exp:F,loc:B,modifiers:z}=V,G=R==="bind",K=R==="on";if(R==="slot"){s||e.onError(ss(40,B));continue}if(R==="once"||R==="memo"||R==="is"||G&&Lu(N,"is")&&(Dk(r)||Ku("COMPILER_IS_ON_ELEMENT",e))||K&&o)continue;if((G&&Lu(N,"key")||K&&h&&Lu(N,"vue:before-update"))&&(f=!0),G&&Lu(N,"ref")&&P(),!N&&(G||K)){if(C=!0,F)if(G){if(M(),Ku("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(F);continue}P(),M(),u.push(F)}else M({type:14,loc:B,callee:e.helper(K6),arguments:s?[F]:[F,"true"]});else e.onError(ss(G?34:35,B));continue}G&&z.some(H=>H.content==="prop")&&(p|=32);const X=e.directiveTransforms[R];if(X){const{props:H,needRuntime:Q}=X(V,t,e);!o&&H.forEach(T),K&&N&&!lo(N)?M(ar(H,a)):c.push(...H),Q&&(d.push(V),mo(Q)&&JL.set(V,Q))}else VW(R)||(d.push(V),h&&(f=!0))}}let I;if(u.length?(M(),u.length>1?I=Vs(e.helper(ob),u,a):I=u[0]):c.length&&(I=ar(u7(c),a)),C?p|=16:(b&&!s&&(p|=2),_&&!s&&(p|=4),S.length&&(p|=8),k&&(p|=32)),!f&&(p===0||p===32)&&(m||x||d.length>0)&&(p|=512),!e.inSSR&&I)switch(I.type){case 15:let L=-1,V=-1,R=!1;for(let B=0;B<I.properties.length;B++){const z=I.properties[B].key;lo(z)?z.content==="class"?L=B:z.content==="style"&&(V=B):z.isHandlerKey||(R=!0)}const N=I.properties[L],F=I.properties[V];R?I=Vs(e.helper(Og),[I]):(N&&!lo(N.value)&&(N.value=Vs(e.helper(G6),[N.value])),F&&(_||F.value.type===4&&F.value.content.trim()[0]==="["||F.value.type===17)&&(F.value=Vs(e.helper(X6),[F.value])));break;case 14:break;default:I=Vs(e.helper(Og),[Vs(e.helper(P1),[I])]);break}return{props:I,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function u7(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"||Md(o))&&gK(r,i):(e.set(o,i),n.push(i))}return n}function gK(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Xu([t.value,e.value],t.loc)}function vK(t,e){const n=[],s=JL.get(t);s?n.push(e.helperString(s)):(e.helper(j6),e.directives.add(t.name),n.push(Vg(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=Wt("true",!1,i);n.push(ar(t.modifiers.map(r=>Ms(r,o)),i))}return Xu(n,t.loc)}function yK(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 Dk(t){return t==="component"||t==="Component"}const bK=(t,e)=>{if(cb(t)){const{children:n,loc:s}=t,{slotName:i,slotProps:o}=_K(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Ef([],n,!1,!1,s),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=Vs(e.helper(EL),r,s)}};function _K(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=Un(r.name),i.push(r)));else if(r.name==="bind"&&Lu(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=Un(r.arg.content);n=r.exp=Wt(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&lo(r.arg)&&(r.arg.content=Un(r.arg.content)),i.push(r)}if(i.length>0){const{props:o,directives:r}=QL(t,e,i,!1,!1);s=o,r.length&&e.onError(ss(36,r[0].loc))}return{slotName:n,slotProps:s}}const eO=(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)?Wu(Un(d)):`on:${d}`;a=Wt(h,!0,r.loc)}else a=Dr([`${n.helperString(Tk)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(Tk)}(`),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=DL(l),h=!(d||bX(l)),f=l.content.includes(";");(h||c&&d)&&(l=Dr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[Ms(a,l||Wt("() => {}",!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},wK=(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=Un(o.content):o.content=`${n.helperString(Mk)}(${o.content})`:(o.children.unshift(`${n.helperString(Mk)}(`),o.children.push(")"))),n.inSSR||(s.some(a=>a.content==="prop")&&d7(o,"."),s.some(a=>a.content==="attr")&&d7(o,"^")),{props:[Ms(o,r)]}},d7=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},kK=(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(mw(r)){i=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(mw(l))s||(s=n[o]=Dr([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(mw(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&To(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Vs(e.helper(z6),a)}}}}},h7=new WeakSet,CK=(t,e)=>{if(t.type===1&&nr(t,"once",!0))return h7.has(t)||e.inVOnce||e.inSSR?void 0:(h7.add(t),e.inVOnce=!0,e.helper(rb),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},tO=(t,e,n)=>{const{exp:s,arg:i}=t;if(!s)return n.onError(ss(41,t.loc)),Wp();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)),Wp();if(a==="literal-const"||a==="setup-const")return n.onError(ss(45,s.loc)),Wp();if(!r.trim()||!DL(s))return n.onError(ss(42,s.loc)),Wp();const l=i||Wt("modelValue",!0),c=i?lo(i)?`onUpdate:${Un(i.content)}`:Dr(['"onUpdate:" + ',i]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=Dr([`${d} => ((`,s,") = $event)"]);const h=[Ms(l,t.exp),Ms(c,u)];if(t.modifiers.length&&e.tagType===1){const f=t.modifiers.map(m=>m.content).map(m=>(t4(m)?m:JSON.stringify(m))+": true").join(", "),p=i?lo(i)?`${i.content}Modifiers`:Dr([i,' + "Modifiers"']):"modelModifiers";h.push(Ms(p,Wt(`{ ${f} }`,!1,t.loc,2)))}return Wp(h)};function Wp(t=[]){return{props:t}}const xK=/[\w).+\-_$\]]/,SK=(t,e)=>{Ku("COMPILER_FILTERS",e)&&(t.type===5?db(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&db(n.exp,e)}))};function db(t,e){if(t.type===4)f7(t,e);else for(let n=0;n<t.children.length;n++){const s=t.children[n];typeof s=="object"&&(s.type===4?f7(s,e):s.type===8?db(t,e):s.type===5&&db(s.content,e))}}function f7(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,k;for(;_>=0&&(k=n.charAt(_),k===" ");_--);(!k||!xK.test(k))&&(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=$K(p,m[f],e);t.content=p,t.ast=void 0}}function $K(t,e,n){n.helper(W6);const s=e.indexOf("(");if(s<0)return n.filters.add(e),`${Vg(e,"filter")}(${t})`;{const i=e.slice(0,s),o=e.slice(s+1);return n.filters.add(i),`${Vg(i,"filter")}(${t}${o!==")"?","+o:o}`}}const p7=new WeakSet,AK=(t,e)=>{if(t.type===1){const n=nr(t,"memo");return!n||p7.has(t)||e.inSSR?void 0:(p7.add(t),()=>{const s=t.codegenNode||e.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&Q6(s,e),t.codegenNode=Vs(e.helper(J6),[n.exp,Ef(void 0,s),"_cache",String(e.cached.length)]),e.cached.push(null))})}},EK=(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=Wt("",!0,s.loc);else{const i=Un(s.content);(LL.test(i[0])||i[0]==="-")&&(n.exp=Wt(i,!1,s.loc))}}}};function MK(t){return[[EK,CK,oK,AK,lK,SK,bK,pK,dK,kK],{on:eO,bind:wK,model:tO}]}function TK(t,e={}){const n=e.onError||e4,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=ln({},e,{prefixIdentifiers:i}),r=Ke(t)?RX(t,o):t,[a,l]=MK();return BX(r,ln({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:ln({},l,e.directiveTransforms||{})})),jX(r,o)}const PK=()=>({props:[]});/** |
| 30 |
* @vue/compiler-dom v3.5.27 |
| 31 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 32 |
* @license MIT |
| 33 |
**/const nO=Symbol(""),sO=Symbol(""),iO=Symbol(""),oO=Symbol(""),Rk=Symbol(""),rO=Symbol(""),aO=Symbol(""),lO=Symbol(""),cO=Symbol(""),uO=Symbol("");lX({[nO]:"vModelRadio",[sO]:"vModelCheckbox",[iO]:"vModelText",[oO]:"vModelSelect",[Rk]:"vModelDynamic",[rO]:"withModifiers",[aO]:"withKeys",[lO]:"vShow",[cO]:"Transition",[uO]:"TransitionGroup"});let ih;function IK(t,e=!1){return ih||(ih=document.createElement("div")),e?(ih.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,ih.children[0].getAttribute("foo")):(ih.innerHTML=t,ih.textContent)}const LK={parseMode:"html",isVoidTag:QW,isNativeTag:t=>KW(t)||ZW(t)||JW(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:IK,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return cO;if(t==="TransitionGroup"||t==="transition-group")return uO},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}},OK=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:Wt("style",!0,e.loc),exp:DK(e.value.content,e.loc),modifiers:[],loc:e.loc})})},DK=(t,e)=>{const n=EP(t);return Wt(JSON.stringify(n),!1,e,3)};function xc(t,e){return ss(t,e)}const RK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(xc(54,i)),e.children.length&&(n.onError(xc(55,i)),e.children.length=0),{props:[Ms(Wt("innerHTML",!0,i),s||Wt("",!0))]}},VK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(xc(56,i)),e.children.length&&(n.onError(xc(57,i)),e.children.length=0),{props:[Ms(Wt("textContent",!0),s?To(s,n)>0?s:Vs(n.helperString(M_),[s],i):Wt("",!0))]}},FK=(t,e,n)=>{const s=tO(t,e,n);if(!s.props.length||e.tagType===1)return s;t.arg&&n.onError(xc(59,t.arg.loc));const{tag:i}=e,o=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let r=iO,a=!1;if(i==="input"||o){const l=T_(e,"type");if(l){if(l.type===7)r=Rk;else if(l.value)switch(l.value.content){case"radio":r=nO;break;case"checkbox":r=sO;break;case"file":a=!0,n.onError(xc(60,t.loc));break}}else _X(e)&&(r=Rk)}else i==="select"&&(r=oO);a||(s.needRuntime=n.helper(r))}else n.onError(xc(58,t.loc));return s.props=s.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),s},NK=zo("passive,once,capture"),BK=zo("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),zK=zo("left,right"),dO=zo("onkeyup,onkeydown,onkeypress"),HK=(t,e,n,s)=>{const i=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Rg("COMPILER_V_ON_NATIVE",n)||NK(l)?r.push(l):zK(l)?lo(t)?dO(t.content.toLowerCase())?i.push(l):o.push(l):(i.push(l),o.push(l)):BK(l)?o.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}},m7=(t,e)=>lo(t)&&t.content.toLowerCase()==="onclick"?Wt(e,!0):t.type!==4?Dr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,UK=(t,e,n)=>eO(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}=HK(o,i,n,t.loc);if(l.includes("right")&&(o=m7(o,"onContextmenu")),l.includes("middle")&&(o=m7(o,"onMouseup")),l.length&&(r=Vs(n.helper(rO),[r,JSON.stringify(l)])),a.length&&(!lo(o)||dO(o.content.toLowerCase()))&&(r=Vs(n.helper(aO),[r,JSON.stringify(a)])),c.length){const u=c.map(Yc).join("");o=lo(o)?Wt(`${o.content}${u}`,!0):Dr(["(",o,`) + "${u}"`])}return{props:[Ms(o,r)]}}),jK=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(xc(62,i)),{props:[],needRuntime:n.helper(lO)}},WK=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},YK=[OK],qK={cloak:PK,html:RK,text:VK,model:FK,on:UK,show:jK};function GK(t,e={}){return TK(t,ln({},LK,e,{nodeTransforms:[WK,...YK,...e.nodeTransforms||[]],directiveTransforms:ln({},qK,e.directiveTransforms||{}),transformHoist:null}))}/** |
| 34 |
* vue v3.5.27 |
| 35 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 36 |
* @license MIT |
| 37 |
**/const g7=Object.create(null);function XK(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Dt;const n=BW(t,e),s=g7[n];if(s)return s;if(t[0]==="#"){const a=document.querySelector(t);t=a?a.innerHTML:""}const i=ln({hoistStatic:!0,onError:void 0,onWarn:Dt},e);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=a=>!!customElements.get(a));const{code:o}=GK(t,i),r=new Function("Vue",o)(nX);return r._rc=!0,g7[n]=r}XI(XK);/*! |
| 38 |
* vue-router v4.4.4 |
| 39 |
* (c) 2024 Eduardo San Martin Morote |
| 40 |
* @license MIT |
| 41 |
*/const Sh=typeof document<"u";function hO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function KK(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&hO(t.default)}const On=Object.assign;function vw(t,e){const n={};for(const s in e){const i=e[s];n[s]=Wr(i)?i.map(t):t(i)}return n}const Xm=()=>{},Wr=Array.isArray,fO=/#/g,ZK=/&/g,JK=/\//g,QK=/=/g,eZ=/\?/g,pO=/\+/g,tZ=/%5B/g,nZ=/%5D/g,mO=/%5E/g,sZ=/%60/g,gO=/%7B/g,iZ=/%7C/g,vO=/%7D/g,oZ=/%20/g;function o4(t){return encodeURI(""+t).replace(iZ,"|").replace(tZ,"[").replace(nZ,"]")}function rZ(t){return o4(t).replace(gO,"{").replace(vO,"}").replace(mO,"^")}function Vk(t){return o4(t).replace(pO,"%2B").replace(oZ,"+").replace(fO,"%23").replace(ZK,"%26").replace(sZ,"`").replace(gO,"{").replace(vO,"}").replace(mO,"^")}function aZ(t){return Vk(t).replace(QK,"%3D")}function lZ(t){return o4(t).replace(fO,"%23").replace(eZ,"%3F")}function cZ(t){return t==null?"":lZ(t).replace(JK,"%2F")}function Ng(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const uZ=/\/$/,dZ=t=>t.replace(uZ,"");function yw(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=mZ(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:Ng(r)}}function hZ(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function v7(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function fZ(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Pf(e.matched[s],n.matched[i])&&yO(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Pf(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function yO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!pZ(t[n],e[n]))return!1;return!0}function pZ(t,e){return Wr(t)?y7(t,e):Wr(e)?y7(e,t):t===e}function y7(t,e){return Wr(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function mZ(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 Nl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Bg;(function(t){t.pop="pop",t.push="push"})(Bg||(Bg={}));var Km;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Km||(Km={}));function gZ(t){if(!t)if(Sh){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),dZ(t)}const vZ=/^[^#]+#/;function yZ(t,e){return t.replace(vZ,"#")+e}function bZ(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 L_=()=>({left:window.scrollX,top:window.scrollY});function _Z(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=bZ(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 b7(t,e){return(history.state?history.state.position-e:-1)+t}const Fk=new Map;function wZ(t,e){Fk.set(t,e)}function kZ(t){const e=Fk.get(t);return Fk.delete(t),e}let CZ=()=>location.protocol+"//"+location.host;function bO(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),v7(l,"")}return v7(n,t)+s+i}function xZ(t,e,n,s){let i=[],o=[],r=null;const a=({state:h})=>{const f=bO(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:Bg.pop,direction:b?b>0?Km.forward:Km.back:Km.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(On({},h.state,{scroll:L_()}),"")}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 _7(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?L_():null}}function SZ(t){const{history:e,location:n}=window,s={value:bO(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:CZ()+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=On({},e.state,_7(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=On({},i.value,e.state,{forward:l,scroll:L_()});o(u.current,u,!0);const d=On({},_7(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 _O(t){t=gZ(t);const e=SZ(t),n=xZ(t,e.state,e.location,e.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=On({location:"",base:t,go:s,createHref:yZ.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 $Z(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),_O(t)}function AZ(t){return typeof t=="string"||t&&typeof t=="object"}function wO(t){return typeof t=="string"||typeof t=="symbol"}const kO=Symbol("");var w7;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(w7||(w7={}));function If(t,e){return On(new Error,{type:t,[kO]:!0},e)}function Ua(t,e){return t instanceof Error&&kO in t&&(e==null||!!(t.type&e))}const k7="[^/]+?",EZ={sensitive:!1,strict:!1,start:!0,end:!0},MZ=/[.+*?^${}()[\]/\\]/g;function TZ(t,e){const n=On({},EZ,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(MZ,"\\$&"),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 k=_||k7;if(k!==k7){f+=10;try{new RegExp(`(${k})`)}catch(x){throw new Error(`Invalid custom RegExp for param "${p}" (${k}): `+x.message)}}let C=m?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(C=b&&c.length<2?`(?:/${C})`:"/"+C),b&&(C+="?"),i+=C,f+=20,b&&(f+=-8),m&&(f+=-20),k===".*"&&(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(Wr(_)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const k=Wr(_)?_.join("/"):_;if(!k)if(b)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=k}}return u||"/"}return{re:r,score:s,keys:o,parse:a,stringify:l}}function PZ(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 CO(t,e){let n=0;const s=t.score,i=e.score;for(;n<s.length&&n<i.length;){const o=PZ(s[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-s.length)===1){if(C7(s))return 1;if(C7(i))return-1}return i.length-s.length}function C7(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const IZ={type:0,value:""},LZ=/[a-zA-Z0-9_]/;function OZ(t){if(!t)return[[]];if(t==="/")return[[IZ]];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:LZ.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 DZ(t,e,n){const s=TZ(OZ(t.path),n),i=On(s,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function RZ(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=VZ(d);m.aliasOf=f&&f.record;const b=$7(e,d),_=[m];if("alias"in d){const x=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of x)_.push(On({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let k,C;for(const x of _){const{path:S}=x;if(h&&S[0]!=="/"){const M=h.record.path,P=M[M.length-1]==="/"?"":"/";x.path=h.record.path+(S&&P+S)}if(k=DZ(x,h,b),f?f.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),p&&d.name&&!S7(k)&&r(d.name)),xO(k)&&l(k),m.children){const M=m.children;for(let P=0;P<M.length;P++)o(M[P],k,f&&f.children[P])}f=f||k}return C?()=>{r(C)}:Xm}function r(d){if(wO(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=BZ(d,n);n.splice(h,0,d),d.record.name&&!S7(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 If(1,{location:d});b=f.record.name,p=On(x7(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&x7(d.params,f.keys.map(C=>C.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(C=>C.re.test(m)),f&&(p=f.parse(m),b=f.record.name);else{if(f=h.name?s.get(h.name):n.find(C=>C.re.test(h.path)),!f)throw If(1,{location:d,currentLocation:h});b=f.record.name,p=On({},h.params,d.params),m=f.stringify(p)}const _=[];let k=f;for(;k;)_.unshift(k.record),k=k.parent;return{name:b,path:m,params:p,matched:_,meta:NZ(_)}}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 x7(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function VZ(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:FZ(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 FZ(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 S7(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function NZ(t){return t.reduce((e,n)=>On(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 BZ(t,e){let n=0,s=e.length;for(;n!==s;){const o=n+s>>1;CO(t,e[o])<0?s=o:n=o+1}const i=zZ(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function zZ(t){let e=t;for(;e=e.parent;)if(xO(e)&&CO(t,e)===0)return e}function xO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function HZ(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(pO," "),r=o.indexOf("="),a=Ng(r<0?o:o.slice(0,r)),l=r<0?null:Ng(o.slice(r+1));if(a in e){let c=e[a];Wr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function A7(t){let e="";for(let n in t){const s=t[n];if(n=aZ(n),s==null){s!==void 0&&(e+=(e.length?"&":"")+n);continue}(Wr(s)?s.map(o=>o&&Vk(o)):[s&&Vk(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function UZ(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=Wr(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const jZ=Symbol(""),E7=Symbol(""),r4=Symbol(""),SO=Symbol(""),Nk=Symbol("");function Yp(){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 cc(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(If(4,{from:n,to:e})):h instanceof Error?l(h):AZ(h)?l(If(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 bw(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(hO(l)){const u=(l.__vccOpts||l)[e];u&&o.push(cc(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=KK(u)?u.default:u;r.mods[a]=u,r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&cc(f,n,s,r,a,i)()}))}}return o}function M7(t){const e=Ye(r4),n=Ye(SO),s=U(()=>{const l=A(t.to);return e.resolve(l)}),i=U(()=>{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(Pf.bind(null,u));if(h>-1)return h;const f=T7(l[c-2]);return c>1&&T7(u)===f&&d[d.length-1].path!==f?d.findIndex(Pf.bind(null,l[c-2])):h}),o=U(()=>i.value>-1&&GZ(n.params,s.value.params)),r=U(()=>i.value>-1&&i.value===n.matched.length-1&&yO(n.params,s.value.params));function a(l={}){return qZ(l)?e[A(t.replace)?"replace":"push"](A(t.to)).catch(Xm):Promise.resolve()}return{route:s,href:U(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const WZ=fe({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:M7,setup(t,{slots:e}){const n=In(M7(t)),{options:s}=Ye(r4),i=U(()=>({[P7(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[P7(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:bt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),YZ=WZ;function qZ(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 GZ(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(!Wr(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function T7(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const P7=(t,e,n)=>t??e??n,XZ=fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=Ye(Nk),i=U(()=>t.route||s.value),o=Ye(E7,0),r=U(()=>{let c=A(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=U(()=>i.value.matched[r.value]);Pt(E7,U(()=>r.value+1)),Pt(jZ,a),Pt(Nk,i);const l=J();return Me(()=>[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||!Pf(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 I7(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=bt(h,On({},p,e,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return I7(n.default,{Component:b,route:c})||b}}});function I7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const KZ=XZ;function L7(t){const e=RZ(t.routes,t),n=t.parseQuery||HZ,s=t.stringifyQuery||A7,i=t.history,o=Yp(),r=Yp(),a=Yp(),l=Fn(Nl);let c=Nl;Sh&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vw.bind(null,oe=>""+oe),d=vw.bind(null,cZ),h=vw.bind(null,Ng);function f(oe,pe){let ie,re;return wO(oe)?(ie=e.getRecordMatcher(oe),re=pe):re=oe,e.addRoute(re,ie)}function p(oe){const pe=e.getRecordMatcher(oe);pe&&e.removeRoute(pe)}function m(){return e.getRoutes().map(oe=>oe.record)}function b(oe){return!!e.getRecordMatcher(oe)}function _(oe,pe){if(pe=On({},pe||l.value),typeof oe=="string"){const se=yw(n,oe,pe.path),me=e.resolve({path:se.path},pe),$e=i.createHref(se.fullPath);return On(se,me,{params:h(me.params),hash:Ng(se.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=On({},oe,{path:yw(n,oe.path,pe.path).path});else{const se=On({},oe.params);for(const me in se)se[me]==null&&delete se[me];ie=On({},oe,{params:d(se)}),pe.params=d(pe.params)}const re=e.resolve(ie,pe),ke=oe.hash||"";re.params=u(h(re.params));const Ue=hZ(s,On({},oe,{hash:rZ(ke),path:re.path})),ee=i.createHref(Ue);return On({fullPath:Ue,hash:ke,query:s===A7?UZ(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:ee})}function k(oe){return typeof oe=="string"?yw(n,oe,l.value.path):On({},oe)}function C(oe,pe){if(c!==oe)return If(8,{from:pe,to:oe})}function x(oe){return P(oe)}function S(oe){return x(On(k(oe),{replace:!0}))}function M(oe){const pe=oe.matched[oe.matched.length-1];if(pe&&pe.redirect){const{redirect:ie}=pe;let re=typeof ie=="function"?ie(oe):ie;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=k(re):{path:re},re.params={}),On({query:oe.query,hash:oe.hash,params:re.path!=null?{}:oe.params},re)}}function P(oe,pe){const ie=c=_(oe),re=l.value,ke=oe.state,Ue=oe.force,ee=oe.replace===!0,se=M(ie);if(se)return P(On(k(se),{state:typeof se=="object"?On({},ke,se.state):ke,force:Ue,replace:ee}),pe||ie);const me=ie;me.redirectedFrom=pe;let $e;return!Ue&&fZ(s,re,ie)&&($e=If(16,{to:me,from:re}),Q(re,re,!0,!1)),($e?Promise.resolve($e):L(me,re)).catch(Se=>Ua(Se)?Ua(Se,2)?Se:H(Se):K(Se,me,re)).then(Se=>{if(Se){if(Ua(Se,2))return P(On({replace:ee},k(Se.to),{state:typeof Se.to=="object"?On({},ke,Se.to.state):ke,force:Ue}),pe||me)}else Se=R(me,re,!0,ee,ke);return V(me,re,Se),Se})}function T(oe,pe){const ie=C(oe,pe);return ie?Promise.reject(ie):Promise.resolve()}function I(oe){const pe=ae.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(oe):oe()}function L(oe,pe){let ie;const[re,ke,Ue]=ZZ(oe,pe);ie=bw(re.reverse(),"beforeRouteLeave",oe,pe);for(const se of re)se.leaveGuards.forEach(me=>{ie.push(cc(me,oe,pe))});const ee=T.bind(null,oe,pe);return ie.push(ee),Ce(ie).then(()=>{ie=[];for(const se of o.list())ie.push(cc(se,oe,pe));return ie.push(ee),Ce(ie)}).then(()=>{ie=bw(ke,"beforeRouteUpdate",oe,pe);for(const se of ke)se.updateGuards.forEach(me=>{ie.push(cc(me,oe,pe))});return ie.push(ee),Ce(ie)}).then(()=>{ie=[];for(const se of Ue)if(se.beforeEnter)if(Wr(se.beforeEnter))for(const me of se.beforeEnter)ie.push(cc(me,oe,pe));else ie.push(cc(se.beforeEnter,oe,pe));return ie.push(ee),Ce(ie)}).then(()=>(oe.matched.forEach(se=>se.enterCallbacks={}),ie=bw(Ue,"beforeRouteEnter",oe,pe,I),ie.push(ee),Ce(ie))).then(()=>{ie=[];for(const se of r.list())ie.push(cc(se,oe,pe));return ie.push(ee),Ce(ie)}).catch(se=>Ua(se,8)?se:Promise.reject(se))}function V(oe,pe,ie){a.list().forEach(re=>I(()=>re(oe,pe,ie)))}function R(oe,pe,ie,re,ke){const Ue=C(oe,pe);if(Ue)return Ue;const ee=pe===Nl,se=Sh?history.state:{};ie&&(re||ee?i.replace(oe.fullPath,On({scroll:ee&&se&&se.scroll},ke)):i.push(oe.fullPath,ke)),l.value=oe,Q(oe,pe,ie,ee),H()}let N;function F(){N||(N=i.listen((oe,pe,ie)=>{if(!ge.listening)return;const re=_(oe),ke=M(re);if(ke){P(On(ke,{replace:!0}),re).catch(Xm);return}c=re;const Ue=l.value;Sh&&wZ(b7(Ue.fullPath,ie.delta),L_()),L(re,Ue).catch(ee=>Ua(ee,12)?ee:Ua(ee,2)?(P(ee.to,re).then(se=>{Ua(se,20)&&!ie.delta&&ie.type===Bg.pop&&i.go(-1,!1)}).catch(Xm),Promise.reject()):(ie.delta&&i.go(-ie.delta,!1),K(ee,re,Ue))).then(ee=>{ee=ee||R(re,Ue,!1),ee&&(ie.delta&&!Ua(ee,8)?i.go(-ie.delta,!1):ie.type===Bg.pop&&Ua(ee,20)&&i.go(-1,!1)),V(re,Ue,ee)}).catch(Xm)}))}let B=Yp(),z=Yp(),G;function K(oe,pe,ie){H(oe);const re=z.list();return re.length?re.forEach(ke=>ke(oe,pe,ie)):console.error(oe),Promise.reject(oe)}function X(){return G&&l.value!==Nl?Promise.resolve():new Promise((oe,pe)=>{B.add([oe,pe])})}function H(oe){return G||(G=!oe,F(),B.list().forEach(([pe,ie])=>oe?ie(oe):pe()),B.reset()),oe}function Q(oe,pe,ie,re){const{scrollBehavior:ke}=t;if(!Sh||!ke)return Promise.resolve();const Ue=!ie&&kZ(b7(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return ot().then(()=>ke(oe,pe,Ue)).then(ee=>ee&&_Z(ee)).catch(ee=>K(ee,oe,pe))}const ne=oe=>i.go(oe);let Z;const ae=new Set,ge={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:_,options:t,push:x,replace:S,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:z.add,isReady:X,install(oe){const pe=this;oe.component("RouterLink",YZ),oe.component("RouterView",KZ),oe.config.globalProperties.$router=pe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>A(l)}),Sh&&!Z&&l.value===Nl&&(Z=!0,x(i.location).catch(ke=>{}));const ie={};for(const ke in Nl)Object.defineProperty(ie,ke,{get:()=>l.value[ke],enumerable:!0});oe.provide(r4,pe),oe.provide(SO,k6(ie)),oe.provide(Nk,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=Nl,N&&N(),N=null,l.value=Nl,Z=!1,G=!1),re()}}};function Ce(oe){return oe.reduce((pe,ie)=>pe.then(()=>I(ie)),Promise.resolve())}return ge}function ZZ(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=>Pf(c,a))?s.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>Pf(c,l))||i.push(l))}return[n,s,i]}const He={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"},JZ=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Mt="update:modelValue",dn="change",Do="input",xl=["","default","small","large"],a4=11,QZ=2;var eJ=typeof global=="object"&&global&&global.Object===Object&&global;const $O=eJ;var tJ=typeof self=="object"&&self&&self.Object===Object&&self,nJ=$O||tJ||Function("return this")();const Kr=nJ;var sJ=Kr.Symbol;const vr=sJ;var AO=Object.prototype,iJ=AO.hasOwnProperty,oJ=AO.toString,qp=vr?vr.toStringTag:void 0;function rJ(t){var e=iJ.call(t,qp),n=t[qp];try{t[qp]=void 0;var s=!0}catch{}var i=oJ.call(t);return s&&(e?t[qp]=n:delete t[qp]),i}var aJ=Object.prototype,lJ=aJ.toString;function cJ(t){return lJ.call(t)}var uJ="[object Null]",dJ="[object Undefined]",O7=vr?vr.toStringTag:void 0;function Od(t){return t==null?t===void 0?dJ:uJ:O7&&O7 in Object(t)?rJ(t):cJ(t)}function Ca(t){return t!=null&&typeof t=="object"}var hJ="[object Symbol]";function O_(t){return typeof t=="symbol"||Ca(t)&&Od(t)==hJ}function l4(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 fJ=Array.isArray;const Wi=fJ;var pJ=1/0,D7=vr?vr.prototype:void 0,R7=D7?D7.toString:void 0;function EO(t){if(typeof t=="string")return t;if(Wi(t))return l4(t,EO)+"";if(O_(t))return R7?R7.call(t):"";var e=t+"";return e=="0"&&1/t==-pJ?"-0":e}var mJ=/\s/;function gJ(t){for(var e=t.length;e--&&mJ.test(t.charAt(e)););return e}var vJ=/^\s+/;function yJ(t){return t&&t.slice(0,gJ(t)+1).replace(vJ,"")}function Yi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var V7=0/0,bJ=/^[-+]0x[0-9a-f]+$/i,_J=/^0b[01]+$/i,wJ=/^0o[0-7]+$/i,kJ=parseInt;function of(t){if(typeof t=="number")return t;if(O_(t))return V7;if(Yi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Yi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=yJ(t);var n=_J.test(t);return n||wJ.test(t)?kJ(t.slice(2),n?2:8):bJ.test(t)?V7:+t}var F7=1/0,CJ=17976931348623157e292;function xJ(t){if(!t)return t===0?t:0;if(t=of(t),t===F7||t===-F7){var e=t<0?-1:1;return e*CJ}return t===t?t:0}function SJ(t){var e=xJ(t),n=e%1;return e===e?n?e-n:e:0}function c4(t){return t}var $J="[object AsyncFunction]",AJ="[object Function]",EJ="[object GeneratorFunction]",MJ="[object Proxy]";function u4(t){if(!Yi(t))return!1;var e=Od(t);return e==AJ||e==EJ||e==$J||e==MJ}var TJ=Kr["__core-js_shared__"];const _w=TJ;var N7=function(){var t=/[^.]+$/.exec(_w&&_w.keys&&_w.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function PJ(t){return!!N7&&N7 in t}var IJ=Function.prototype,LJ=IJ.toString;function Dd(t){if(t!=null){try{return LJ.call(t)}catch{}try{return t+""}catch{}}return""}var OJ=/[\\^$.*+?()[\]{}|]/g,DJ=/^\[object .+?Constructor\]$/,RJ=Function.prototype,VJ=Object.prototype,FJ=RJ.toString,NJ=VJ.hasOwnProperty,BJ=RegExp("^"+FJ.call(NJ).replace(OJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zJ(t){if(!Yi(t)||PJ(t))return!1;var e=u4(t)?BJ:DJ;return e.test(Dd(t))}function HJ(t,e){return t==null?void 0:t[e]}function Rd(t,e){var n=HJ(t,e);return zJ(n)?n:void 0}var UJ=Rd(Kr,"WeakMap");const Bk=UJ;var B7=Object.create,jJ=function(){function t(){}return function(e){if(!Yi(e))return{};if(B7)return B7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const WJ=jJ;function YJ(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 MO(t,e){var n=-1,s=t.length;for(e||(e=Array(s));++n<s;)e[n]=t[n];return e}var qJ=800,GJ=16,XJ=Date.now;function KJ(t){var e=0,n=0;return function(){var s=XJ(),i=GJ-(s-n);if(n=s,i>0){if(++e>=qJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ZJ(t){return function(){return t}}var JJ=function(){try{var t=Rd(Object,"defineProperty");return t({},"",{}),t}catch{}}();const hb=JJ;var QJ=hb?function(t,e){return hb(t,"toString",{configurable:!0,enumerable:!1,value:ZJ(e),writable:!0})}:c4;const eQ=QJ;var tQ=KJ(eQ);const TO=tQ;function nQ(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}function sQ(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 iQ=9007199254740991,oQ=/^(?:0|[1-9]\d*)$/;function D_(t,e){var n=typeof t;return e=e??iQ,!!e&&(n=="number"||n!="symbol"&&oQ.test(t))&&t>-1&&t%1==0&&t<e}function d4(t,e,n){e=="__proto__"&&hb?hb(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function L1(t,e){return t===e||t!==t&&e!==e}var rQ=Object.prototype,aQ=rQ.hasOwnProperty;function h4(t,e,n){var s=t[e];(!(aQ.call(t,e)&&L1(s,n))||n===void 0&&!(e in t))&&d4(t,e,n)}function ap(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?d4(n,a,l):h4(n,a,l)}return n}var z7=Math.max;function PO(t,e,n){return e=z7(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,o=z7(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),YJ(t,this,a)}}function lQ(t,e){return TO(PO(t,e,c4),t+"")}var cQ=9007199254740991;function f4(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cQ}function lp(t){return t!=null&&f4(t.length)&&!u4(t)}function uQ(t,e,n){if(!Yi(n))return!1;var s=typeof e;return(s=="number"?lp(n)&&D_(e,n.length):s=="string"&&e in n)?L1(n[e],t):!1}function dQ(t){return lQ(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&&uQ(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 hQ=Object.prototype;function p4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||hQ;return t===n}function fQ(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var pQ="[object Arguments]";function H7(t){return Ca(t)&&Od(t)==pQ}var IO=Object.prototype,mQ=IO.hasOwnProperty,gQ=IO.propertyIsEnumerable,vQ=H7(function(){return arguments}())?H7:function(t){return Ca(t)&&mQ.call(t,"callee")&&!gQ.call(t,"callee")};const zg=vQ;function yQ(){return!1}var LO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,U7=LO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,bQ=U7&&U7.exports===LO,j7=bQ?Kr.Buffer:void 0,_Q=j7?j7.isBuffer:void 0,wQ=_Q||yQ;const Hg=wQ;var kQ="[object Arguments]",CQ="[object Array]",xQ="[object Boolean]",SQ="[object Date]",$Q="[object Error]",AQ="[object Function]",EQ="[object Map]",MQ="[object Number]",TQ="[object Object]",PQ="[object RegExp]",IQ="[object Set]",LQ="[object String]",OQ="[object WeakMap]",DQ="[object ArrayBuffer]",RQ="[object DataView]",VQ="[object Float32Array]",FQ="[object Float64Array]",NQ="[object Int8Array]",BQ="[object Int16Array]",zQ="[object Int32Array]",HQ="[object Uint8Array]",UQ="[object Uint8ClampedArray]",jQ="[object Uint16Array]",WQ="[object Uint32Array]",es={};es[VQ]=es[FQ]=es[NQ]=es[BQ]=es[zQ]=es[HQ]=es[UQ]=es[jQ]=es[WQ]=!0;es[kQ]=es[CQ]=es[DQ]=es[xQ]=es[RQ]=es[SQ]=es[$Q]=es[AQ]=es[EQ]=es[MQ]=es[TQ]=es[PQ]=es[IQ]=es[LQ]=es[OQ]=!1;function YQ(t){return Ca(t)&&f4(t.length)&&!!es[Od(t)]}function m4(t){return function(e){return t(e)}}var OO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,Zm=OO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,qQ=Zm&&Zm.exports===OO,ww=qQ&&$O.process,GQ=function(){try{var t=Zm&&Zm.require&&Zm.require("util").types;return t||ww&&ww.binding&&ww.binding("util")}catch{}}();const Lf=GQ;var W7=Lf&&Lf.isTypedArray,XQ=W7?m4(W7):YQ;const g4=XQ;var KQ=Object.prototype,ZQ=KQ.hasOwnProperty;function DO(t,e){var n=Wi(t),s=!n&&zg(t),i=!n&&!s&&Hg(t),o=!n&&!s&&!i&&g4(t),r=n||s||i||o,a=r?fQ(t.length,String):[],l=a.length;for(var c in t)(e||ZQ.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||D_(c,l)))&&a.push(c);return a}function RO(t,e){return function(n){return t(e(n))}}var JQ=RO(Object.keys,Object);const QQ=JQ;var eee=Object.prototype,tee=eee.hasOwnProperty;function nee(t){if(!p4(t))return QQ(t);var e=[];for(var n in Object(t))tee.call(t,n)&&n!="constructor"&&e.push(n);return e}function O1(t){return lp(t)?DO(t):nee(t)}function see(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var iee=Object.prototype,oee=iee.hasOwnProperty;function ree(t){if(!Yi(t))return see(t);var e=p4(t),n=[];for(var s in t)s=="constructor"&&(e||!oee.call(t,s))||n.push(s);return n}function D1(t){return lp(t)?DO(t,!0):ree(t)}var aee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lee=/^\w*$/;function v4(t,e){if(Wi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||O_(t)?!0:lee.test(t)||!aee.test(t)||e!=null&&t in Object(e)}var cee=Rd(Object,"create");const Ug=cee;function uee(){this.__data__=Ug?Ug(null):{},this.size=0}function dee(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var hee="__lodash_hash_undefined__",fee=Object.prototype,pee=fee.hasOwnProperty;function mee(t){var e=this.__data__;if(Ug){var n=e[t];return n===hee?void 0:n}return pee.call(e,t)?e[t]:void 0}var gee=Object.prototype,vee=gee.hasOwnProperty;function yee(t){var e=this.__data__;return Ug?e[t]!==void 0:vee.call(e,t)}var bee="__lodash_hash_undefined__";function _ee(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ug&&e===void 0?bee:e,this}function md(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])}}md.prototype.clear=uee;md.prototype.delete=dee;md.prototype.get=mee;md.prototype.has=yee;md.prototype.set=_ee;function wee(){this.__data__=[],this.size=0}function R_(t,e){for(var n=t.length;n--;)if(L1(t[n][0],e))return n;return-1}var kee=Array.prototype,Cee=kee.splice;function xee(t){var e=this.__data__,n=R_(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():Cee.call(e,n,1),--this.size,!0}function See(t){var e=this.__data__,n=R_(e,t);return n<0?void 0:e[n][1]}function $ee(t){return R_(this.__data__,t)>-1}function Aee(t,e){var n=this.__data__,s=R_(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,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=wee;Sl.prototype.delete=xee;Sl.prototype.get=See;Sl.prototype.has=$ee;Sl.prototype.set=Aee;var Eee=Rd(Kr,"Map");const jg=Eee;function Mee(){this.size=0,this.__data__={hash:new md,map:new(jg||Sl),string:new md}}function Tee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function V_(t,e){var n=t.__data__;return Tee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Pee(t){var e=V_(this,t).delete(t);return this.size-=e?1:0,e}function Iee(t){return V_(this,t).get(t)}function Lee(t){return V_(this,t).has(t)}function Oee(t,e){var n=V_(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function $l(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])}}$l.prototype.clear=Mee;$l.prototype.delete=Pee;$l.prototype.get=Iee;$l.prototype.has=Lee;$l.prototype.set=Oee;var Dee="Expected a function";function y4(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Dee);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(y4.Cache||$l),n}y4.Cache=$l;var Ree=500;function Vee(t){var e=y4(t,function(s){return n.size===Ree&&n.clear(),s}),n=e.cache;return e}var Fee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nee=/\\(\\)?/g,Bee=Vee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Fee,function(n,s,i,o){e.push(i?o.replace(Nee,"$1"):s||n)}),e});const zee=Bee;function Hee(t){return t==null?"":EO(t)}function cp(t,e){return Wi(t)?t:v4(t,e)?[t]:zee(Hee(t))}var Uee=1/0;function up(t){if(typeof t=="string"||O_(t))return t;var e=t+"";return e=="0"&&1/t==-Uee?"-0":e}function F_(t,e){e=cp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[up(e[n++])];return n&&n==s?t:void 0}function Ui(t,e,n){var s=t==null?void 0:F_(t,e);return s===void 0?n:s}function b4(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Y7=vr?vr.isConcatSpreadable:void 0;function jee(t){return Wi(t)||zg(t)||!!(Y7&&t&&t[Y7])}function _4(t,e,n,s,i){var o=-1,r=t.length;for(n||(n=jee),i||(i=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?_4(a,e-1,n,s,i):b4(i,a):s||(i[i.length]=a)}return i}function fb(t){var e=t==null?0:t.length;return e?_4(t,1):[]}function VO(t){return TO(PO(t,void 0,fb),t+"")}var Wee=RO(Object.getPrototypeOf,Object);const w4=Wee;var Yee="[object Object]",qee=Function.prototype,Gee=Object.prototype,FO=qee.toString,Xee=Gee.hasOwnProperty,Kee=FO.call(Object);function k4(t){if(!Ca(t)||Od(t)!=Yee)return!1;var e=w4(t);if(e===null)return!0;var n=Xee.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&FO.call(n)==Kee}function Zee(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 Us(){if(!arguments.length)return[];var t=arguments[0];return Wi(t)?t:[t]}function Jee(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function NO(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=of(n),n=n===n?n:0),e!==void 0&&(e=of(e),e=e===e?e:0),Jee(of(t),e,n)}function Qee(){this.__data__=new Sl,this.size=0}function ete(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function tte(t){return this.__data__.get(t)}function nte(t){return this.__data__.has(t)}var ste=200;function ite(t,e){var n=this.__data__;if(n instanceof Sl){var s=n.__data__;if(!jg||s.length<ste-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new $l(s)}return n.set(t,e),this.size=n.size,this}function Rr(t){var e=this.__data__=new Sl(t);this.size=e.size}Rr.prototype.clear=Qee;Rr.prototype.delete=ete;Rr.prototype.get=tte;Rr.prototype.has=nte;Rr.prototype.set=ite;function ote(t,e){return t&&ap(e,O1(e),t)}function rte(t,e){return t&&ap(e,D1(e),t)}var BO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,q7=BO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,ate=q7&&q7.exports===BO,G7=ate?Kr.Buffer:void 0,X7=G7?G7.allocUnsafe:void 0;function zO(t,e){if(e)return t.slice();var n=t.length,s=X7?X7(n):new t.constructor(n);return t.copy(s),s}function lte(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 HO(){return[]}var cte=Object.prototype,ute=cte.propertyIsEnumerable,K7=Object.getOwnPropertySymbols,dte=K7?function(t){return t==null?[]:(t=Object(t),lte(K7(t),function(e){return ute.call(t,e)}))}:HO;const C4=dte;function hte(t,e){return ap(t,C4(t),e)}var fte=Object.getOwnPropertySymbols,pte=fte?function(t){for(var e=[];t;)b4(e,C4(t)),t=w4(t);return e}:HO;const UO=pte;function mte(t,e){return ap(t,UO(t),e)}function jO(t,e,n){var s=e(t);return Wi(t)?s:b4(s,n(t))}function zk(t){return jO(t,O1,C4)}function WO(t){return jO(t,D1,UO)}var gte=Rd(Kr,"DataView");const Hk=gte;var vte=Rd(Kr,"Promise");const Uk=vte;var yte=Rd(Kr,"Set");const jk=yte;var Z7="[object Map]",bte="[object Object]",J7="[object Promise]",Q7="[object Set]",e$="[object WeakMap]",t$="[object DataView]",_te=Dd(Hk),wte=Dd(jg),kte=Dd(Uk),Cte=Dd(jk),xte=Dd(Bk),yu=Od;(Hk&&yu(new Hk(new ArrayBuffer(1)))!=t$||jg&&yu(new jg)!=Z7||Uk&&yu(Uk.resolve())!=J7||jk&&yu(new jk)!=Q7||Bk&&yu(new Bk)!=e$)&&(yu=function(t){var e=Od(t),n=e==bte?t.constructor:void 0,s=n?Dd(n):"";if(s)switch(s){case _te:return t$;case wte:return Z7;case kte:return J7;case Cte:return Q7;case xte:return e$}return e});const Wg=yu;var Ste=Object.prototype,$te=Ste.hasOwnProperty;function Ate(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&$te.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Ete=Kr.Uint8Array;const pb=Ete;function x4(t){var e=new t.constructor(t.byteLength);return new pb(e).set(new pb(t)),e}function Mte(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Tte=/\w*$/;function Pte(t){var e=new t.constructor(t.source,Tte.exec(t));return e.lastIndex=t.lastIndex,e}var n$=vr?vr.prototype:void 0,s$=n$?n$.valueOf:void 0;function Ite(t){return s$?Object(s$.call(t)):{}}function YO(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Lte="[object Boolean]",Ote="[object Date]",Dte="[object Map]",Rte="[object Number]",Vte="[object RegExp]",Fte="[object Set]",Nte="[object String]",Bte="[object Symbol]",zte="[object ArrayBuffer]",Hte="[object DataView]",Ute="[object Float32Array]",jte="[object Float64Array]",Wte="[object Int8Array]",Yte="[object Int16Array]",qte="[object Int32Array]",Gte="[object Uint8Array]",Xte="[object Uint8ClampedArray]",Kte="[object Uint16Array]",Zte="[object Uint32Array]";function Jte(t,e,n){var s=t.constructor;switch(e){case zte:return x4(t);case Lte:case Ote:return new s(+t);case Hte:return Mte(t,n);case Ute:case jte:case Wte:case Yte:case qte:case Gte:case Xte:case Kte:case Zte:return YO(t,n);case Dte:return new s;case Rte:case Nte:return new s(t);case Vte:return Pte(t);case Fte:return new s;case Bte:return Ite(t)}}function qO(t){return typeof t.constructor=="function"&&!p4(t)?WJ(w4(t)):{}}var Qte="[object Map]";function ene(t){return Ca(t)&&Wg(t)==Qte}var i$=Lf&&Lf.isMap,tne=i$?m4(i$):ene;const nne=tne;var sne="[object Set]";function ine(t){return Ca(t)&&Wg(t)==sne}var o$=Lf&&Lf.isSet,one=o$?m4(o$):ine;const rne=one;var ane=1,lne=2,cne=4,GO="[object Arguments]",une="[object Array]",dne="[object Boolean]",hne="[object Date]",fne="[object Error]",XO="[object Function]",pne="[object GeneratorFunction]",mne="[object Map]",gne="[object Number]",KO="[object Object]",vne="[object RegExp]",yne="[object Set]",bne="[object String]",_ne="[object Symbol]",wne="[object WeakMap]",kne="[object ArrayBuffer]",Cne="[object DataView]",xne="[object Float32Array]",Sne="[object Float64Array]",$ne="[object Int8Array]",Ane="[object Int16Array]",Ene="[object Int32Array]",Mne="[object Uint8Array]",Tne="[object Uint8ClampedArray]",Pne="[object Uint16Array]",Ine="[object Uint32Array]",qn={};qn[GO]=qn[une]=qn[kne]=qn[Cne]=qn[dne]=qn[hne]=qn[xne]=qn[Sne]=qn[$ne]=qn[Ane]=qn[Ene]=qn[mne]=qn[gne]=qn[KO]=qn[vne]=qn[yne]=qn[bne]=qn[_ne]=qn[Mne]=qn[Tne]=qn[Pne]=qn[Ine]=!0;qn[fne]=qn[XO]=qn[wne]=!1;function Jm(t,e,n,s,i,o){var r,a=e&ane,l=e&lne,c=e&cne;if(n&&(r=i?n(t,s,i,o):n(t)),r!==void 0)return r;if(!Yi(t))return t;var u=Wi(t);if(u){if(r=Ate(t),!a)return MO(t,r)}else{var d=Wg(t),h=d==XO||d==pne;if(Hg(t))return zO(t,a);if(d==KO||d==GO||h&&!i){if(r=l||h?{}:qO(t),!a)return l?mte(t,rte(r,t)):hte(t,ote(r,t))}else{if(!qn[d])return i?t:{};r=Jte(t,d,a)}}o||(o=new Rr);var f=o.get(t);if(f)return f;o.set(t,r),rne(t)?t.forEach(function(b){r.add(Jm(b,e,n,b,t,o))}):nne(t)&&t.forEach(function(b,_){r.set(_,Jm(b,e,n,_,t,o))});var p=c?l?WO:zk:l?D1:O1,m=u?void 0:p(t);return nQ(m||t,function(b,_){m&&(_=b,b=t[_]),h4(r,_,Jm(b,e,n,_,t,o))}),r}var Lne=1,One=4;function Zu(t){return Jm(t,Lne|One)}var Dne="__lodash_hash_undefined__";function Rne(t){return this.__data__.set(t,Dne),this}function Vne(t){return this.__data__.has(t)}function mb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $l;++e<n;)this.add(t[e])}mb.prototype.add=mb.prototype.push=Rne;mb.prototype.has=Vne;function Fne(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 Nne(t,e){return t.has(e)}var Bne=1,zne=2;function ZO(t,e,n,s,i,o){var r=n&Bne,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&zne?new mb: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(!Fne(e,function(_,k){if(!Nne(f,k)&&(p===_||i(p,_,n,s,o)))return f.push(k)})){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 Hne(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function Une(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var jne=1,Wne=2,Yne="[object Boolean]",qne="[object Date]",Gne="[object Error]",Xne="[object Map]",Kne="[object Number]",Zne="[object RegExp]",Jne="[object Set]",Qne="[object String]",ese="[object Symbol]",tse="[object ArrayBuffer]",nse="[object DataView]",r$=vr?vr.prototype:void 0,kw=r$?r$.valueOf:void 0;function sse(t,e,n,s,i,o,r){switch(n){case nse:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case tse:return!(t.byteLength!=e.byteLength||!o(new pb(t),new pb(e)));case Yne:case qne:case Kne:return L1(+t,+e);case Gne:return t.name==e.name&&t.message==e.message;case Zne:case Qne:return t==e+"";case Xne:var a=Hne;case Jne:var l=s&jne;if(a||(a=Une),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=Wne,r.set(t,e);var u=ZO(a(t),a(e),s,i,o,r);return r.delete(t),u;case ese:if(kw)return kw.call(t)==kw.call(e)}return!1}var ise=1,ose=Object.prototype,rse=ose.hasOwnProperty;function ase(t,e,n,s,i,o){var r=n&ise,a=zk(t),l=a.length,c=zk(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:rse.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],k=e[h];if(s)var C=r?s(k,_,h,e,t,o):s(_,k,h,t,e,o);if(!(C===void 0?_===k||i(_,k,n,s,o):C)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var x=t.constructor,S=e.constructor;x!=S&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var lse=1,a$="[object Arguments]",l$="[object Array]",jv="[object Object]",cse=Object.prototype,c$=cse.hasOwnProperty;function use(t,e,n,s,i,o){var r=Wi(t),a=Wi(e),l=r?l$:Wg(t),c=a?l$:Wg(e);l=l==a$?jv:l,c=c==a$?jv:c;var u=l==jv,d=c==jv,h=l==c;if(h&&Hg(t)){if(!Hg(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Rr),r||g4(t)?ZO(t,e,n,s,i,o):sse(t,e,l,n,s,i,o);if(!(n&lse)){var f=u&&c$.call(t,"__wrapped__"),p=d&&c$.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new Rr),i(m,b,n,s,o)}}return h?(o||(o=new Rr),ase(t,e,n,s,i,o)):!1}function N_(t,e,n,s,i){return t===e?!0:t==null||e==null||!Ca(t)&&!Ca(e)?t!==t&&e!==e:use(t,e,n,s,N_,i)}var dse=1,hse=2;function fse(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 Rr;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?N_(u,c,dse|hse,s,d):h))return!1}}return!0}function JO(t){return t===t&&!Yi(t)}function pse(t){for(var e=O1(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,JO(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 mse(t){var e=pse(t);return e.length==1&&e[0][2]?QO(e[0][0],e[0][1]):function(n){return n===t||fse(n,t,e)}}function gse(t,e){return t!=null&&e in Object(t)}function vse(t,e,n){e=cp(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=up(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&&f4(i)&&D_(r,i)&&(Wi(t)||zg(t)))}function eD(t,e){return t!=null&&vse(t,e,gse)}var yse=1,bse=2;function _se(t,e){return v4(t)&&JO(e)?QO(up(t),e):function(n){var s=Ui(n,t);return s===void 0&&s===e?eD(n,t):N_(e,s,yse|bse)}}function wse(t){return function(e){return e==null?void 0:e[t]}}function kse(t){return function(e){return F_(e,t)}}function Cse(t){return v4(t)?wse(up(t)):kse(t)}function tD(t){return typeof t=="function"?t:t==null?c4:typeof t=="object"?Wi(t)?_se(t[0],t[1]):mse(t):Cse(t)}function xse(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 Sse=xse();const nD=Sse;function $se(t,e){return t&&nD(t,e,O1)}function Ase(t,e){return function(n,s){if(n==null)return n;if(!lp(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 Ese=Ase($se);const Mse=Ese;var Tse=function(){return Kr.Date.now()};const Cw=Tse;var Pse="Expected a function",Ise=Math.max,Lse=Math.min;function gd(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(Pse);e=of(e)||0,Yi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Ise(of(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=s,T=i;return s=i=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(_,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?Lse(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var M=Cw();if(b(M))return k(M);a=setTimeout(_,m(M))}function k(M){return a=void 0,h&&s?f(M):(s=i=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:k(Cw())}function S(){var M=Cw(),P=b(M);if(s=arguments,i=this,l=M,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=C,S.flush=x,S}function Wk(t,e,n){(n!==void 0&&!L1(t[e],n)||n===void 0&&!(e in t))&&d4(t,e,n)}function Ose(t){return Ca(t)&&lp(t)}function Yk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Dse(t){return ap(t,D1(t))}function Rse(t,e,n,s,i,o,r){var a=Yk(t,n),l=Yk(e,n),c=r.get(l);if(c){Wk(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Wi(l),f=!h&&Hg(l),p=!h&&!f&&g4(l);u=l,h||f||p?Wi(a)?u=a:Ose(a)?u=MO(a):f?(d=!1,u=zO(l,!0)):p?(d=!1,u=YO(l,!0)):u=[]:k4(l)||zg(l)?(u=a,zg(a)?u=Dse(a):(!Yi(a)||u4(a))&&(u=qO(l))):d=!1}d&&(r.set(l,u),i(u,l,s,o,r),r.delete(l)),Wk(t,n,u)}function sD(t,e,n,s,i){t!==e&&nD(e,function(o,r){if(i||(i=new Rr),Yi(o))Rse(t,e,r,n,sD,s,i);else{var a=s?s(Yk(t,r),o,r+"",t,e,i):void 0;a===void 0&&(a=o),Wk(t,r,a)}},D1)}function Vse(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Fse=Math.max,Nse=Math.min;function Bse(t,e,n){var s=t==null?0:t.length;if(!s)return-1;var i=s-1;return n!==void 0&&(i=SJ(n),i=n<0?Fse(s+i,0):Nse(i,s-1)),sQ(t,tD(e),i,!0)}function zse(t,e){var n=-1,s=lp(t)?Array(t.length):[];return Mse(t,function(i,o,r){s[++n]=e(i,o,r)}),s}function Hse(t,e){var n=Wi(t)?l4:zse;return n(t,tD(e))}function iD(t,e){return _4(Hse(t,e),1)}function Of(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 Use(t,e){return e.length<2?t:F_(t,Zee(e,0,-1))}function ji(t,e){return N_(t,e)}function li(t){return t==null}function B_(t){return t===null}function jse(t){return t===void 0}var Wse=dQ(function(t,e,n){sD(t,e,n)});const oD=Wse;var Yse=Object.prototype,qse=Yse.hasOwnProperty;function Gse(t,e){e=cp(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__"&&!qse.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=Use(t,e);return r==null||delete r[up(Vse(e))]}function Xse(t){return k4(t)?void 0:t}var Kse=1,Zse=2,Jse=4,Qse=VO(function(t,e){var n={};if(t==null)return n;var s=!1;e=l4(e,function(o){return o=cp(o,t),s||(s=o.length>1),o}),ap(t,WO(t),n),s&&(n=Jm(n,Kse|Zse|Jse,Xse));for(var i=e.length;i--;)Gse(n,e[i]);return n});const z_=Qse;function rD(t,e,n,s){if(!Yi(t))return t;e=cp(e,t);for(var i=-1,o=e.length,r=o-1,a=t;a!=null&&++i<o;){var l=up(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=Yi(u)?u:D_(e[i+1])?[]:{})}h4(a,l,c),a=a[l]}return t}function eie(t,e,n){for(var s=-1,i=e.length,o={};++s<i;){var r=e[s],a=F_(t,r);n(a,r)&&rD(o,cp(r,t),a)}return o}function tie(t,e){return eie(t,e,function(n,s){return eD(t,s)})}var nie=VO(function(t,e){return t==null?{}:tie(t,e)});const S4=nie;function sie(t,e,n){return t==null?t:rD(t,e,n)}var iie="Expected a function";function Wv(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(iie);return Yi(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),gd(t,e,{leading:s,maxWait:e,trailing:i})}const en=t=>t===void 0,Jn=t=>typeof t=="boolean",_t=t=>typeof t=="number",$4=t=>!t&&t!==0||Ee(t)&&t.length===0||yt(t)&&!Object.keys(t).length,Po=t=>typeof Element>"u"?!1:t instanceof Element,va=t=>li(t),oie=t=>Ke(t)?!Number.isNaN(Number(t)):!1,rie=t=>t===window,gb=t=>Object.keys(t),aD=t=>Object.entries(t),Sc=(t,e,n)=>({get value(){return Ui(t,e,n)},set value(s){sie(t,e,s)}}),lD="__epPropKey",ue=t=>t,aie=t=>yt(t)&&!!t[lD],H_=(t,e)=>{if(!yt(t)||aie(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),Nt(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(", ");eL(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[lD]:!0};return Nt(t,"default")&&(a.default=i),a},Ge=t=>Of(Object.entries(t).map(([e,n])=>[e,H_(n,e)])),A4=Ge({to:{type:ue([String,Object]),required:!0},disabled:Boolean});var cD=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function vo(t,e){throw new cD(`[${t}] ${e}`)}function Tt(t,e){{const n=Ke(t)?new cD(`[${t}] ${e}`):t;console.warn(n)}}const lie=["class","style"],cie=/^on[A-Z]/,U_=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,s=U(()=>((n==null?void 0:n.value)||[]).concat(lie)),i=ht();return i?U(()=>{var o;return Of(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([r])=>!s.value.includes(r)&&!(e&&cie.test(r))))}):(Tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),U(()=>({})))};function uD(t,e){var n;const s=Fn();return gl(()=>{s.value=t()},{...e,flush:(n=e==null?void 0:e.flush)!=null?n:"sync"}),Oc(s)}function Vd(t){return m_()?(g_(t),!0):!1}function Ro(t){return typeof t=="function"?t():A(t)}function uie(t){if(!hn(t))return In(t);const e=new Proxy({},{get(n,s,i){return A(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 In(e)}function die(t){return uie(U(t))}const Gt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hie=t=>typeof t<"u",dD=t=>t!=null,fie=Object.prototype.toString,pie=t=>fie.call(t)==="[object Object]",hD=(t,e,n)=>Math.min(n,Math.max(e,t)),Vr=()=>{},qk=mie();function mie(){var t,e;return Gt&&((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 fD(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 gie(t,e={}){let n,s,i=Vr;const o=a=>{clearTimeout(a),i(),i=Vr};return a=>{const l=Ro(t),c=Ro(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 vie(...t){let e=0,n,s=!0,i=Vr,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=Vr)};return h=>{const f=Ro(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 yie(t){return t||ht()}function pD(t,e=200,n={}){return fD(gie(e,n),t)}function bie(t,e=200,n={}){const s=J(t.value),i=pD(()=>{s.value=t.value},e,n);return Me(t,()=>i()),s}function _ie(t,e=200,n=!1,s=!0,i=!1){return fD(vie(e,n,s,i),t)}function mD(t,e=!0,n){yie()?Ft(t,n):e?t():ot(t)}function Gk(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)},Ro(e))}return s&&(i.value=!0,Gt&&l()),Vd(a),{isPending:Oc(i),start:l,stop:a}}const Al=Gt?window:void 0,wie=Gt?window.document:void 0;function js(t){var e;const n=Ro(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Hn(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=Al):[e,n,s,i]=t,!e)return Vr;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=Me(()=>[js(e),Ro(i)],([u,d])=>{if(r(),!u)return;const h=pie(d)?{...d}:d;o.push(...n.flatMap(f=>s.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Vd(c),c}let u$=!1;function gD(t,e,n={}){const{window:s=Al,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return Vr;qk&&!u$&&(u$=!0,Array.from(s.document.body.children).forEach(m=>m.addEventListener("click",Vr)),s.document.documentElement.addEventListener("click",Vr));let a=!0;const l=m=>Ro(i).some(b=>{if(typeof b=="string")return Array.from(s.document.querySelectorAll(b)).some(_=>_===m.target||m.composedPath().includes(_));{const _=js(b);return _&&(m.target===_||m.composedPath().includes(_))}});function c(m){const b=Ro(m);return b&&b.$.subTree.shapeFlag===16}function u(m,b){const _=Ro(m),k=_.$.subTree&&_.$.subTree.children;return k==null||!Array.isArray(k)?!1:k.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const d=m=>{const b=js(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=[Hn(s,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),d(m))},{passive:!0,capture:o}),Hn(s,"pointerdown",m=>{const b=js(t);a=!l(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),r&&Hn(s,"blur",m=>{setTimeout(()=>{var b;const _=js(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 kie(){const t=J(!1),e=ht();return e&&Ft(()=>{t.value=!0},e),t}function j_(t){const e=kie();return U(()=>(e.value,!!t()))}function Cie(t,e,n={}){const{window:s=Al,...i}=n;let o;const r=j_(()=>s&&"MutationObserver"in s),a=()=>{o&&(o.disconnect(),o=void 0)},l=U(()=>{const h=Ro(t),f=(Array.isArray(h)?h:[h]).map(js).filter(dD);return new Set(f)}),c=Me(()=>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 Vd(d),{isSupported:r,stop:d,takeRecords:u}}function xie(t,e={}){const{window:n=Al}=e,s=j_(()=>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=gl(()=>{s.value&&(a(),i=n.matchMedia(Ro(t)),"addEventListener"in i?i.addEventListener("change",r):i.addListener(r),o.value=i.matches)});return Vd(()=>{l(),a(),i=void 0}),o}function Sie(t){return JSON.parse(JSON.stringify(t))}function $ie(t={}){const{document:e=wie}=t;if(!e)return J("visible");const n=J(e.visibilityState);return Hn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function Es(t,e,n={}){const{window:s=Al,...i}=n;let o;const r=j_(()=>s&&"ResizeObserver"in s),a=()=>{o&&(o.disconnect(),o=void 0)},l=U(()=>{const d=Ro(t);return Array.isArray(d)?d.map(h=>js(h)):[js(d)]}),c=Me(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 Vd(u),{isSupported:r,stop:u}}function d$(t,e={width:0,height:0},n={}){const{window:s=Al,box:i="content-box"}=n,o=U(()=>{var d,h;return(h=(d=js(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=J(e.width),a=J(e.height),{stop:l}=Es(t,([d])=>{const h=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(s&&o.value){const f=js(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);mD(()=>{const d=js(t);d&&(r.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Me(()=>js(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 Aie(t,e,n={}){const{root:s,rootMargin:i="0px",threshold:o=0,window:r=Al,immediate:a=!0}=n,l=j_(()=>r&&"IntersectionObserver"in r),c=U(()=>{const p=Ro(t);return(Array.isArray(p)?p:[p]).map(js).filter(dD)});let u=Vr;const d=J(a),h=l.value?Me(()=>[c.value,js(s),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const b=new IntersectionObserver(e,{root:js(m),rootMargin:i,threshold:o});p.forEach(_=>_&&b.observe(_)),u=()=>{b.disconnect(),u=Vr}},{immediate:a,flush:"post"}):Vr,f=()=>{u(),h(),d.value=!1};return Vd(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function Eie(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=C=>a?typeof a=="function"?a(C):Sie(C):C,_=()=>hie(t[e])?b(t[e]):d,k=C=>{h?h(C)&&p(m,C):p(m,C)};if(l){const C=_(),x=J(C);let S=!1;return Me(()=>t[e],M=>{S||(S=!0,x.value=b(M),ot(()=>S=!1))}),Me(x,M=>{!S&&(M!==t[e]||u)&&k(M)},{deep:u}),x}else return U({get(){return _()},set(C){k(C)}})}function Mie(t={}){const{window:e=Al}=t;if(!e)return J(!1);const n=J(e.document.hasFocus());return Hn(e,"blur",()=>{n.value=!1}),Hn(e,"focus",()=>{n.value=!0}),n}function Tie(t={}){const{window:e=Al,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(),mD(c),Hn("resize",c,{passive:!0}),i){const u=xie("(orientation: portrait)");Me(u,()=>c())}return{width:a,height:l}}function vD(){const t=Fn(),e=J(0),n=U(()=>({minWidth:`${Math.max(e.value,a4)}px`}));return Es(t,()=>{var i;e.value=((i=t.value)==null?void 0:i.getBoundingClientRect().width)??0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const dl=({from:t,replacement:e,scope:n,version:s,ref:i,type:o="API"},r)=>{Me(()=>A(r),a=>{a&&Tt(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})},Pie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',yD=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,h$=t=>typeof Element>"u"?!1:t instanceof Element,Iie=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,f$=t=>Array.from(t.querySelectorAll(Pie)).filter(e=>Yg(e)&&Iie(e)),Yg=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}},E4=(t,e)=>{if(!t||!t.focus)return;let n=!1;h$(t)&&!Yg(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),h$(t)&&n&&t.removeAttribute("tabindex")},M4=()=>Gt&&/firefox/i.test(window.navigator.userAgent),bD=()=>Gt&&/android/i.test(window.navigator.userAgent),Lie=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),xw=t=>Yc(t),Oie="utils/dom/style",_D=(t="")=>t.split(" ").filter(e=>!!e.trim()),hl=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},vd=(t,e)=>{!t||!e.trim()||t.classList.add(..._D(e))},xa=(t,e)=>{!t||!e.trim()||t.classList.remove(..._D(e))},nl=(t,e)=>{var s;if(!Gt||!t||!e||yD(t))return"";let n=Un(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]}},wD=(t,e,n)=>{if(!(!t||!e))if(yt(e))aD(e).forEach(([s,i])=>wD(t,s,i));else{const s=Un(e);t.style[s]=n}};function ui(t,e="px"){if(!t&&t!==0)return"";if(_t(t)||oie(t))return`${t}${e}`;if(Ke(t))return t;Tt(Oie,"binding value must be a string or number")}const kD=(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,k=b.top,C=b.width,x=b.height,S=document.documentElement.clientWidth,M=document.documentElement.clientHeight,P=-_+p,T=-k+m,I=S-_-C+p,L=M-k-(x<M?x:0)+m;s!=null&&s.value||(h=Math.min(Math.max(h,P),I),f=Math.min(Math.max(f,T),L)),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,_=C=>{o.value||(o.value=!0),r(m+C.clientX-f,b+C.clientY-p)},k=()=>{o.value=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",k)},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 Ft(()=>{gl(()=>{n.value?l():c()})}),wn(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var Die={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 Rie=t=>(e,n)=>Vie(e,n,A(t)),Vie=(t,e,n)=>Ui(n,t,t).replace(/\{(\w+)\}/g,(s,i)=>`${(e==null?void 0:e[i])??`{${i}}`}`),Fie=t=>({lang:U(()=>A(t).name),locale:hn(t)?t:J(t),t:Rie(t)}),CD=Symbol("localeContextKey"),Qt=t=>{const e=t||Ye(CD,J());return Fie(U(()=>e.value||Die))},Qm="el",Nie="is-",hu=(t,e,n,s,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),s&&(o+=`__${s}`),i&&(o+=`--${i}`),o},xD=Symbol("namespaceContextKey"),T4=t=>{const e=t||(ht()?Ye(xD,J(Qm)):J(Qm));return U(()=>A(e)||Qm)},Be=(t,e)=>{const n=T4(e);return{namespace:n,b:(m="")=>hu(n.value,t,m,"",""),e:m=>m?hu(n.value,t,"",m,""):"",m:m=>m?hu(n.value,t,"","",m):"",be:(m,b)=>m&&b?hu(n.value,t,m,b,""):"",em:(m,b)=>m&&b?hu(n.value,t,"",m,b):"",bm:(m,b)=>m&&b?hu(n.value,t,m,"",b):"",bem:(m,b,_)=>m&&b&&_?hu(n.value,t,m,b,_):"",is:(m,...b)=>{const _=b.length>=1?b[0]:!0;return m&&_?`${Nie}${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}`}},qg=t=>Gt?window.requestAnimationFrame(t):setTimeout(t,16),Bie=t=>Gt?window.cancelAnimationFrame(t):clearTimeout(t),zie=(t,e)=>{if(!Gt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],s=nl(t,n);return["scroll","auto","overlay"].some(i=>s.includes(i))},Hie=(t,e)=>{if(!Gt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(zie(n,e))return n;yD(n)?n=n.host:n=n.parentNode}return n};let Yv;const Uie=t=>{var o;if(!Gt)return 0;if(Yv!==void 0)return Yv;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),Yv=n-i,Yv};function jie(t,e){if(!Gt)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 P4=(t,e={})=>{hn(t)||vo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Be("popup"),s=U(()=>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,xa(document.body,s.value))},200))};Me(t,c=>{if(!c){l();return}a=!1,o=!hl(document.body,s.value),o&&(r=document.body.style.width,vd(document.body,s.value)),i=Uie(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,d=nl(document.body,"overflowY");i>0&&(u||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`)}),g_(()=>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)},p$=t=>e=>e.pointerType==="mouse"?t(e):void 0,ls=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=SD(t);if(e){if(Object.values(He).includes(e))return e;switch(e){case" ":return He.space;default:return""}}return""},SD=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&bD()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},Wie=H_({type:ue(Boolean),default:null}),Yie=H_({type:ue(Function)}),$D=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,s=[e],i={[t]:Wie,[n]:Yie};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=ht(),{emit:f}=h,p=h.props,m=U(()=>et(p[n])),b=U(()=>p[t]===null),_=P=>{r.value!==!0&&(r.value=!0,a&&(a.value=P),et(u)&&u(P))},k=P=>{r.value!==!1&&(r.value=!1,a&&(a.value=P),et(d)&&d(P))},C=P=>{if(p.disabled===!0||et(c)&&!c())return;const T=m.value&≫T&&f(e,!0),(b.value||!T)&&_(P)},x=P=>{if(p.disabled===!0||!Gt)return;const T=m.value&≫T&&f(e,!1),(b.value||!T)&&k(P)},S=P=>{Jn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?_():k()))},M=()=>{r.value?x():C()};return Me(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Me(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&x()}),Ft(()=>{S(p[t])}),{hide:x,show:C,toggle:M,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:s}};$D("modelValue");const AD=t=>{const e=ht();return U(()=>{var n,s;return(s=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:s[t]})};var ho="top",yr="bottom",br="right",fo="left",I4="auto",R1=[ho,yr,br,fo],Df="start",Gg="end",qie="clippingParents",ED="viewport",Gp="popper",Gie="reference",m$=R1.reduce(function(t,e){return t.concat([e+"-"+Df,e+"-"+Gg])},[]),dp=[].concat(R1,[I4]).reduce(function(t,e){return t.concat([e,e+"-"+Df,e+"-"+Gg])},[]),Xie="beforeRead",Kie="read",Zie="afterRead",Jie="beforeMain",Qie="main",eoe="afterMain",toe="beforeWrite",noe="write",soe="afterWrite",ioe=[Xie,Kie,Zie,Jie,Qie,eoe,toe,noe,soe];function Sa(t){return t?(t.nodeName||"").toLowerCase():null}function Zr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Rf(t){var e=Zr(t).Element;return t instanceof e||t instanceof Element}function dr(t){var e=Zr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function L4(t){if(typeof ShadowRoot>"u")return!1;var e=Zr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function ooe(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];!dr(o)||!Sa(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 roe(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},{});!dr(i)||!Sa(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var MD={name:"applyStyles",enabled:!0,phase:"write",fn:ooe,effect:roe,requires:["computeStyles"]};function _a(t){return t.split("-")[0]}var Ju=Math.max,vb=Math.min,Vf=Math.round;function Ff(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),s=1,i=1;if(dr(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(s=Vf(n.width)/r||1),o>0&&(i=Vf(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 O4(t){var e=Ff(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 TD(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&L4(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function yl(t){return Zr(t).getComputedStyle(t)}function aoe(t){return["table","td","th"].indexOf(Sa(t))>=0}function qc(t){return((Rf(t)?t.ownerDocument:t.document)||window.document).documentElement}function W_(t){return Sa(t)==="html"?t:t.assignedSlot||t.parentNode||(L4(t)?t.host:null)||qc(t)}function g$(t){return!dr(t)||yl(t).position==="fixed"?null:t.offsetParent}function loe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&dr(t)){var s=yl(t);if(s.position==="fixed")return null}var i=W_(t);for(L4(i)&&(i=i.host);dr(i)&&["html","body"].indexOf(Sa(i))<0;){var o=yl(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 V1(t){for(var e=Zr(t),n=g$(t);n&&aoe(n)&&yl(n).position==="static";)n=g$(n);return n&&(Sa(n)==="html"||Sa(n)==="body"&&yl(n).position==="static")?e:n||loe(t)||e}function D4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function eg(t,e,n){return Ju(t,vb(e,n))}function coe(t,e,n){var s=eg(t,e,n);return s>n?n:s}function PD(){return{top:0,right:0,bottom:0,left:0}}function ID(t){return Object.assign({},PD(),t)}function LD(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var uoe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ID(typeof t!="number"?t:LD(t,R1))};function doe(t){var e,n=t.state,s=t.name,i=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=_a(n.placement),l=D4(a),c=[fo,br].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=uoe(i.padding,n),h=O4(o),f=l==="y"?ho:fo,p=l==="y"?yr:br,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],_=V1(o),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,C=m/2-b/2,x=d[f],S=k-h[u]-d[p],M=k/2-h[u]/2+C,P=eg(x,M,S),T=l;n.modifiersData[s]=(e={},e[T]=P,e.centerOffset=P-M,e)}}function hoe(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)||!TD(e.elements.popper,i)||(e.elements.arrow=i))}var foe={name:"arrow",enabled:!0,phase:"main",fn:doe,effect:hoe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Nf(t){return t.split("-")[1]}var poe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function moe(t){var e=t.x,n=t.y,s=window,i=s.devicePixelRatio||1;return{x:Vf(e*i)/i||0,y:Vf(n*i)/i||0}}function v$(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"),k=r.hasOwnProperty("y"),C=fo,x=ho,S=window;if(c){var M=V1(n),P="clientHeight",T="clientWidth";if(M===Zr(n)&&(M=qc(n),yl(M).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),M=M,i===ho||(i===fo||i===br)&&o===Gg){x=yr;var I=d&&M===S&&S.visualViewport?S.visualViewport.height:M[P];m-=I-s.height,m*=l?1:-1}if(i===fo||(i===ho||i===yr)&&o===Gg){C=br;var L=d&&M===S&&S.visualViewport?S.visualViewport.width:M[T];f-=L-s.width,f*=l?1:-1}}var V=Object.assign({position:a},c&&poe),R=u===!0?moe({x:f,y:m}):{x:f,y:m};if(f=R.x,m=R.y,l){var N;return Object.assign({},V,(N={},N[x]=k?"0":"",N[C]=_?"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[x]=k?m+"px":"",e[C]=_?f+"px":"",e.transform="",e))}function goe(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:_a(e.placement),variation:Nf(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,v$(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,v$(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 OD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:goe,data:{}},qv={passive:!0};function voe(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=Zr(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,qv)}),a&&l.addEventListener("resize",n.update,qv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,qv)}),a&&l.removeEventListener("resize",n.update,qv)}}var DD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:voe,data:{}},yoe={left:"right",right:"left",bottom:"top",top:"bottom"};function L0(t){return t.replace(/left|right|bottom|top/g,function(e){return yoe[e]})}var boe={start:"end",end:"start"};function y$(t){return t.replace(/start|end/g,function(e){return boe[e]})}function R4(t){var e=Zr(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function V4(t){return Ff(qc(t)).left+R4(t).scrollLeft}function _oe(t){var e=Zr(t),n=qc(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+V4(t),y:a}}function woe(t){var e,n=qc(t),s=R4(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Ju(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=Ju(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+V4(t),l=-s.scrollTop;return yl(i||n).direction==="rtl"&&(a+=Ju(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function F4(t){var e=yl(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function RD(t){return["html","body","#document"].indexOf(Sa(t))>=0?t.ownerDocument.body:dr(t)&&F4(t)?t:RD(W_(t))}function tg(t,e){var n;e===void 0&&(e=[]);var s=RD(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Zr(s),r=i?[o].concat(o.visualViewport||[],F4(s)?s:[]):s,a=e.concat(r);return i?a:a.concat(tg(W_(r)))}function Xk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function koe(t){var e=Ff(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 b$(t,e){return e===ED?Xk(_oe(t)):Rf(e)?koe(e):Xk(woe(qc(t)))}function Coe(t){var e=tg(W_(t)),n=["absolute","fixed"].indexOf(yl(t).position)>=0,s=n&&dr(t)?V1(t):t;return Rf(s)?e.filter(function(i){return Rf(i)&&TD(i,s)&&Sa(i)!=="body"}):[]}function xoe(t,e,n){var s=e==="clippingParents"?Coe(t):[].concat(e),i=[].concat(s,[n]),o=i[0],r=i.reduce(function(a,l){var c=b$(t,l);return a.top=Ju(c.top,a.top),a.right=vb(c.right,a.right),a.bottom=vb(c.bottom,a.bottom),a.left=Ju(c.left,a.left),a},b$(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 VD(t){var e=t.reference,n=t.element,s=t.placement,i=s?_a(s):null,o=s?Nf(s):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case ho:l={x:r,y:e.y-n.height};break;case yr:l={x:r,y:e.y+e.height};break;case br:l={x:e.x+e.width,y:a};break;case fo:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?D4(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Df:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Gg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Xg(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?qie:o,a=n.rootBoundary,l=a===void 0?ED:a,c=n.elementContext,u=c===void 0?Gp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=ID(typeof p!="number"?p:LD(p,R1)),b=u===Gp?Gie:Gp,_=t.rects.popper,k=t.elements[h?b:u],C=xoe(Rf(k)?k:k.contextElement||qc(t.elements.popper),r,l),x=Ff(t.elements.reference),S=VD({reference:x,element:_,strategy:"absolute",placement:i}),M=Xk(Object.assign({},_,S)),P=u===Gp?M:x,T={top:C.top-P.top+m.top,bottom:P.bottom-C.bottom+m.bottom,left:C.left-P.left+m.left,right:P.right-C.right+m.right},I=t.modifiersData.offset;if(u===Gp&&I){var L=I[i];Object.keys(T).forEach(function(V){var R=[br,yr].indexOf(V)>=0?1:-1,N=[ho,yr].indexOf(V)>=0?"y":"x";T[V]+=L[N]*R})}return T}function Soe(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?dp:l,u=Nf(s),d=u?a?m$:m$.filter(function(p){return Nf(p)===u}):R1,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]=Xg(t,{placement:m,boundary:i,rootBoundary:o,padding:r})[_a(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function $oe(t){if(_a(t)===I4)return[];var e=L0(t);return[y$(t),e,y$(e)]}function Aoe(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,_=_a(b),k=_===b,C=l||(k||!p?[L0(b)]:$oe(b)),x=[b].concat(C).reduce(function(ae,ge){return ae.concat(_a(ge)===I4?Soe(e,{placement:ge,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ge)},[]),S=e.rects.reference,M=e.rects.popper,P=new Map,T=!0,I=x[0],L=0;L<x.length;L++){var V=x[L],R=_a(V),N=Nf(V)===Df,F=[ho,yr].indexOf(R)>=0,B=F?"width":"height",z=Xg(e,{placement:V,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),G=F?N?br:fo:N?yr:ho;S[B]>M[B]&&(G=L0(G));var K=L0(G),X=[];if(o&&X.push(z[R]<=0),a&&X.push(z[G]<=0,z[K]<=0),X.every(function(ae){return ae})){I=V,T=!1;break}P.set(V,X)}if(T)for(var H=p?3:1,Q=function(ae){var ge=x.find(function(Ce){var oe=P.get(Ce);if(oe)return oe.slice(0,ae).every(function(pe){return pe})});if(ge)return I=ge,"break"},ne=H;ne>0;ne--){var Z=Q(ne);if(Z==="break")break}e.placement!==I&&(e.modifiersData[s]._skip=!0,e.placement=I,e.reset=!0)}}var Eoe={name:"flip",enabled:!0,phase:"main",fn:Aoe,requiresIfExists:["offset"],data:{_skip:!1}};function _$(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 w$(t){return[ho,br,yr,fo].some(function(e){return t[e]>=0})}function Moe(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=Xg(e,{elementContext:"reference"}),a=Xg(e,{altBoundary:!0}),l=_$(r,s),c=_$(a,i,o),u=w$(l),d=w$(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 Toe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Moe};function Poe(t,e,n){var s=_a(t),i=[fo,ho].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,[fo,br].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function Ioe(t){var e=t.state,n=t.options,s=t.name,i=n.offset,o=i===void 0?[0,0]:i,r=dp.reduce(function(u,d){return u[d]=Poe(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 Loe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ioe};function Ooe(t){var e=t.state,n=t.name;e.modifiersData[n]=VD({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var FD={name:"popperOffsets",enabled:!0,phase:"read",fn:Ooe,data:{}};function Doe(t){return t==="x"?"y":"x"}function Roe(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=Xg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),_=_a(e.placement),k=Nf(e.placement),C=!k,x=D4(_),S=Doe(x),M=e.modifiersData.popperOffsets,P=e.rects.reference,T=e.rects.popper,I=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,L=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(M){if(o){var N,F=x==="y"?ho:fo,B=x==="y"?yr:br,z=x==="y"?"height":"width",G=M[x],K=G+b[F],X=G-b[B],H=f?-T[z]/2:0,Q=k===Df?P[z]:T[z],ne=k===Df?-T[z]:-P[z],Z=e.elements.arrow,ae=f&&Z?O4(Z):{width:0,height:0},ge=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:PD(),Ce=ge[F],oe=ge[B],pe=eg(0,P[z],ae[z]),ie=C?P[z]/2-H-pe-Ce-L.mainAxis:Q-pe-Ce-L.mainAxis,re=C?-P[z]/2+H+pe+oe+L.mainAxis:ne+pe+oe+L.mainAxis,ke=e.elements.arrow&&V1(e.elements.arrow),Ue=ke?x==="y"?ke.clientTop||0:ke.clientLeft||0:0,ee=(N=V==null?void 0:V[x])!=null?N:0,se=G+ie-ee-Ue,me=G+re-ee,$e=eg(f?vb(K,se):K,G,f?Ju(X,me):X);M[x]=$e,R[x]=$e-G}if(a){var Se,Ie=x==="x"?ho:fo,je=x==="x"?yr:br,Fe=M[S],ze=S==="y"?"height":"width",Ae=Fe+b[Ie],Ze=Fe-b[je],We=[ho,fo].indexOf(_)!==-1,it=(Se=V==null?void 0:V[S])!=null?Se:0,be=We?Ae:Fe-P[ze]-T[ze]-it+L.altAxis,ve=We?Fe+P[ze]+T[ze]-it-L.altAxis:Ze,Te=f&&We?coe(be,Fe,ve):eg(f?be:Ae,Fe,f?ve:Ze);M[S]=Te,R[S]=Te-Fe}e.modifiersData[s]=R}}var Voe={name:"preventOverflow",enabled:!0,phase:"main",fn:Roe,requiresIfExists:["offset"]};function Foe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Noe(t){return t===Zr(t)||!dr(t)?R4(t):Foe(t)}function Boe(t){var e=t.getBoundingClientRect(),n=Vf(e.width)/t.offsetWidth||1,s=Vf(e.height)/t.offsetHeight||1;return n!==1||s!==1}function zoe(t,e,n){n===void 0&&(n=!1);var s=dr(e),i=dr(e)&&Boe(e),o=qc(e),r=Ff(t,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((Sa(e)!=="body"||F4(o))&&(a=Noe(e)),dr(e)?(l=Ff(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=V4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Hoe(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 Uoe(t){var e=Hoe(t);return ioe.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function joe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Woe(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 k$={placement:"bottom",modifiers:[],strategy:"absolute"};function C$(){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 N4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,s=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?k$:i;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},k$,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:Rf(r)?tg(r):r.contextElement?tg(r.contextElement):[],popper:tg(a)};var _=Uoe(Woe([].concat(s,c.options.modifiers)));return c.orderedModifiers=_.filter(function(k){return k.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,b=m.reference,_=m.popper;if(C$(b,_)){c.rects={reference:zoe(b,V1(_),c.options.strategy==="fixed"),popper:O4(_)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(T){return c.modifiersData[T.name]=Object.assign({},T.data)});for(var k=0;k<c.orderedModifiers.length;k++){if(c.reset===!0){c.reset=!1,k=-1;continue}var C=c.orderedModifiers[k],x=C.fn,S=C.options,M=S===void 0?{}:S,P=C.name;typeof x=="function"&&(c=x({state:c,options:M,name:P,instance:h})||c)}}}},update:joe(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!C$(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,k=_===void 0?{}:_,C=m.effect;if(typeof C=="function"){var x=C({state:c,name:b,instance:h,options:k}),S=function(){};u.push(x||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}N4();var Yoe=[DD,FD,OD,MD];N4({defaultModifiers:Yoe});var qoe=[DD,FD,OD,MD,Loe,Eoe,Voe,foe,Toe],Goe=N4({defaultModifiers:qoe});const Xoe=(t,e,n={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Koe(l);Object.assign(r.value,c)},requires:["computeStyles"]},i=U(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=A(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],s,{name:"applyStyles",enabled:!1}]}}),o=Fn(),r=J({styles:{popper:{position:A(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Me(i,l=>{const c=A(o);c&&c.setOptions(l)},{deep:!0}),Me([t,e],([l,c])=>{a(),!(!l||!c)&&(o.value=Goe(l,c,A(i)))}),wn(()=>{a()}),{state:U(()=>{var l;return{...((l=A(o))==null?void 0:l.state)||{}}}),styles:U(()=>A(r).styles),attributes:U(()=>A(r).attributes),update:()=>{var l;return(l=A(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=A(o))==null?void 0:l.forceUpdate()},instanceRef:U(()=>A(o))}};function Koe(t){const e=Object.keys(t.elements);return{styles:Of(e.map(n=>[n,t.styles[n]||{}])),attributes:Of(e.map(n=>[n,t.attributes[n]]))}}const B4=t=>{if(!t)return{onClick:Dt,onMousedown:Dt,onMouseup:Dt};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}}},Zoe=(t,e=0)=>{if(e===0)return t;const n=J(yt(e)&&!!e.initVal);let s=null;const i=r=>{if(en(r)){n.value=t.value;return}s&&clearTimeout(s),s=setTimeout(()=>{n.value=t.value},r)},o=r=>{r==="leading"?_t(e)?i(e):i(e.leading):yt(e)?i(e.trailing):n.value=!1};return Ft(()=>o("leading")),Me(()=>t.value,r=>{o(r?"leading":"trailing")}),n};function x$(){let t;const e=(s,i)=>{n(),t=window.setTimeout(s,i)},n=()=>window.clearTimeout(t);return Vd(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Kk={prefix:Math.floor(Math.random()*1e4),current:0},Joe=Symbol("elIdInjection"),z4=()=>ht()?Ye(Joe,Kk):Kk,_r=t=>{const e=z4();!Gt&&e===Kk&&Tt("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=T4();return uD(()=>A(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let $h=[];const S$=t=>{ls(t)===He.esc&&$h.forEach(e=>e(t))},Qoe=t=>{Ft(()=>{$h.length===0&&document.addEventListener("keydown",S$),Gt&&$h.push(t)}),wn(()=>{$h=$h.filter(e=>e!==t),$h.length===0&&Gt&&document.removeEventListener("keydown",S$)})},ND=()=>{const t=T4(),e=z4(),n=U(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:U(()=>`#${n.value}`)}},ere=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},tre=()=>{const{id:t,selector:e}=ND();return Id(()=>{Gt&&(document.body.querySelector(e.value)||ere(t.value))}),{id:t,selector:e}},nre=Ge({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),sre=({showAfter:t,hideAfter:e,autoClose:n,open:s,close:i})=>{const{registerTimeout:o}=x$(),{registerTimeout:r,cancelTimeout:a}=x$();return{onOpen:(u,d=A(t))=>{o(()=>{s(u);const h=A(n);_t(h)&&h>0&&r(()=>{i(u)},h)},d)},onClose:(u,d=A(e))=>{a(),o(()=>{i(u)},d)}}},BD=Symbol("elForwardRef"),ire=t=>{Pt(BD,{setForwardRef:n=>{t.value=n}})},ore=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),$$={current:0},A$=J(0),zD=2e3,E$=Symbol("elZIndexContextKey"),HD=Symbol("zIndexContextKey"),Y_=t=>{const e=ht()?Ye(E$,$$):$$,n=t||(ht()?Ye(HD,void 0):void 0),s=U(()=>{const r=A(n);return _t(r)?r:zD}),i=U(()=>s.value+A$.value),o=()=>(e.current++,A$.value=e.current,i.value);return!Gt&&!Ye(E$)&&Tt("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}},M$=Math.min,ng=Math.max,yb=Math.round,Vc=t=>({x:t,y:t}),rre={left:"right",right:"left",bottom:"top",top:"bottom"},are={start:"end",end:"start"};function H4(t,e){return typeof t=="function"?t(e):t}function Bf(t){return t.split("-")[0]}function q_(t){return t.split("-")[1]}function lre(t){return t==="x"?"y":"x"}function UD(t){return t==="y"?"height":"width"}function Kg(t){return["top","bottom"].includes(Bf(t))?"y":"x"}function jD(t){return lre(Kg(t))}function cre(t,e,n){n===void 0&&(n=!1);const s=q_(t),i=jD(t),o=UD(i);let r=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=bb(r)),[r,bb(r)]}function ure(t){const e=bb(t);return[Zk(t),e,Zk(e)]}function Zk(t){return t.replace(/start|end/g,e=>are[e])}function dre(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 hre(t,e,n,s){const i=q_(t);let o=dre(Bf(t),n==="start",s);return i&&(o=o.map(r=>r+"-"+i),e&&(o=o.concat(o.map(Zk)))),o}function bb(t){return t.replace(/left|right|bottom|top/g,e=>rre[e])}function fre(t){return{top:0,right:0,bottom:0,left:0,...t}}function pre(t){return typeof t!="number"?fre(t):{top:t,right:t,bottom:t,left:t}}function _b(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 T$(t,e,n){let{reference:s,floating:i}=t;const o=Kg(e),r=jD(e),a=UD(r),l=Bf(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(q_(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const mre=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}=T$(c,s,l),h=s,f={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:_}=a[m],{x:k,y:C,data:x,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=k??u,d=C??d,f={...f,[b]:{...f[b],...x}},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}=T$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:f}};async function gre(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}=H4(e,t),p=pre(f),b=a[h?d==="floating"?"reference":"floating":d],_=_b(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})),k=d==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),x=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},S=_b(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:C,strategy:l}):k);return{top:(_.top-S.top+p.top)/x.y,bottom:(S.bottom-_.bottom+p.bottom)/x.y,left:(_.left-S.left+p.left)/x.x,right:(S.right-_.right+p.right)/x.x}}const vre=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}=H4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const _=Bf(i),k=Kg(a),C=Bf(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(C||!m?[bb(a)]:ure(a)),M=p!=="none";!h&&M&&S.push(...hre(a,m,p,x));const P=[a,...S],T=await gre(e,b),I=[];let L=((s=o.flip)==null?void 0:s.overflows)||[];if(u&&I.push(T[_]),d){const F=cre(i,r,x);I.push(T[F[0]],T[F[1]])}if(L=[...L,{placement:i,overflows:I}],!I.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:L},reset:{placement:B}};let z=(R=L.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:R.placement;if(!z)switch(f){case"bestFit":{var N;const G=(N=L.filter(K=>{if(M){const X=Kg(K.placement);return X===k||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,H)=>X+H,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:N[0];G&&(z=G);break}case"initialPlacement":z=a;break}if(i!==z)return{reset:{placement:z}}}return{}}}};async function yre(t,e){const{placement:n,platform:s,elements:i}=t,o=await(s.isRTL==null?void 0:s.isRTL(i.floating)),r=Bf(n),a=q_(n),l=Kg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=H4(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 bre=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 yre(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 hp(t){return WD(t)?(t.nodeName||"").toLowerCase():"#document"}function Vo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Gc(t){var e;return(e=(WD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function WD(t){return t instanceof Node||t instanceof Vo(t).Node}function Yr(t){return t instanceof Element||t instanceof Vo(t).Element}function $a(t){return t instanceof HTMLElement||t instanceof Vo(t).HTMLElement}function P$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vo(t).ShadowRoot}function F1(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=qr(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!["inline","contents"].includes(i)}function _re(t){return["table","td","th"].includes(hp(t))}function G_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function U4(t){const e=j4(),n=Yr(t)?qr(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 wre(t){let e=Fc(t);for(;$a(e)&&!zf(e);){if(U4(e))return e;if(G_(e))return null;e=Fc(e)}return null}function j4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zf(t){return["html","body","#document"].includes(hp(t))}function qr(t){return Vo(t).getComputedStyle(t)}function X_(t){return Yr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fc(t){if(hp(t)==="html")return t;const e=t.assignedSlot||t.parentNode||P$(t)&&t.host||Gc(t);return P$(e)?e.host:e}function YD(t){const e=Fc(t);return zf(e)?t.ownerDocument?t.ownerDocument.body:t.body:$a(e)&&F1(e)?e:YD(e)}function Jk(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=YD(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=Vo(i);if(o){const a=Qk(r);return e.concat(r,r.visualViewport||[],F1(i)?i:[],a&&n?Jk(a):[])}return e.concat(i,Jk(i,[],n))}function Qk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function qD(t){const e=qr(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=$a(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=yb(n)!==o||yb(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function GD(t){return Yr(t)?t:t.contextElement}function rf(t){const e=GD(t);if(!$a(e))return Vc(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=qD(e);let r=(o?yb(n.width):n.width)/s,a=(o?yb(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const kre=Vc(0);function XD(t){const e=Vo(t);return!j4()||!e.visualViewport?kre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Cre(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Vo(t)?!1:e}function Zg(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=GD(t);let r=Vc(1);e&&(s?Yr(s)&&(r=rf(s)):r=rf(t));const a=Cre(o,n,s)?XD(o):Vc(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=Vo(o),f=s&&Yr(s)?Vo(s):s;let p=h,m=Qk(p);for(;m&&s&&f!==p;){const b=rf(m),_=m.getBoundingClientRect(),k=qr(m),C=_.left+(m.clientLeft+parseFloat(k.paddingLeft))*b.x,x=_.top+(m.clientTop+parseFloat(k.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=C,c+=x,p=Vo(m),m=Qk(p)}}return _b({width:u,height:d,x:l,y:c})}function xre(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=Gc(s),a=e?G_(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Vc(1);const u=Vc(0),d=$a(s);if((d||!d&&!o)&&((hp(s)!=="body"||F1(r))&&(l=X_(s)),$a(s))){const h=Zg(s);c=rf(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 Sre(t){return Array.from(t.getClientRects())}function KD(t){return Zg(Gc(t)).left+X_(t).scrollLeft}function $re(t){const e=Gc(t),n=X_(t),s=t.ownerDocument.body,i=ng(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=ng(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+KD(t);const a=-n.scrollTop;return qr(s).direction==="rtl"&&(r+=ng(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}function Are(t,e){const n=Vo(t),s=Gc(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=j4();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a,y:l}}function Ere(t,e){const n=Zg(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=$a(t)?rf(t):Vc(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 I$(t,e,n){let s;if(e==="viewport")s=Are(t,n);else if(e==="document")s=$re(Gc(t));else if(Yr(e))s=Ere(e,n);else{const i=XD(t);s={...e,x:e.x-i.x,y:e.y-i.y}}return _b(s)}function ZD(t,e){const n=Fc(t);return n===e||!Yr(n)||zf(n)?!1:qr(n).position==="fixed"||ZD(n,e)}function Mre(t,e){const n=e.get(t);if(n)return n;let s=Jk(t,[],!1).filter(a=>Yr(a)&&hp(a)!=="body"),i=null;const o=qr(t).position==="fixed";let r=o?Fc(t):t;for(;Yr(r)&&!zf(r);){const a=qr(r),l=U4(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||F1(r)&&!l&&ZD(t,r))?s=s.filter(u=>u!==r):i=a,r=Fc(r)}return e.set(t,s),s}function Tre(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?G_(e)?[]:Mre(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((c,u)=>{const d=I$(e,u,i);return c.top=ng(d.top,c.top),c.right=M$(d.right,c.right),c.bottom=M$(d.bottom,c.bottom),c.left=ng(d.left,c.left),c},I$(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Pre(t){const{width:e,height:n}=qD(t);return{width:e,height:n}}function Ire(t,e,n){const s=$a(e),i=Gc(e),o=n==="fixed",r=Zg(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Vc(0);if(s||!s&&!o)if((hp(e)!=="body"||F1(i))&&(a=X_(e)),s){const d=Zg(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=KD(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 Sw(t){return qr(t).position==="static"}function L$(t,e){return!$a(t)||qr(t).position==="fixed"?null:e?e(t):t.offsetParent}function JD(t,e){const n=Vo(t);if(G_(t))return n;if(!$a(t)){let i=Fc(t);for(;i&&!zf(i);){if(Yr(i)&&!Sw(i))return i;i=Fc(i)}return n}let s=L$(t,e);for(;s&&_re(s)&&Sw(s);)s=L$(s,e);return s&&zf(s)&&Sw(s)&&!U4(s)?n:s||wre(t)||n}const Lre=async function(t){const e=this.getOffsetParent||JD,n=this.getDimensions,s=await n(t.floating);return{reference:Ire(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ore(t){return qr(t).direction==="rtl"}const Dre={convertOffsetParentRelativeRectToViewportRelativeRect:xre,getDocumentElement:Gc,getClippingRect:Tre,getOffsetParent:JD,getElementRects:Lre,getClientRects:Sre,getDimensions:Pre,getScale:rf,isElement:Yr,isRTL:Ore},eC=bre,tC=vre,nC=(t,e,n)=>{const s=new Map,i={platform:Dre,...n},o={...i.platform,_c:s};return mre(t,e,{...i,platform:o})};function Rre(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 $w=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 Vre(t){return is(t)&&t.type===Zn}const _c=t=>{const e=Ee(t)?t:[t],n=[];return e.forEach(s=>{var i;Ee(s)?n.push(..._c(s)):is(s)&&((i=s.component)!=null&&i.subTree)?n.push(s,..._c(s.component.subTree)):is(s)&&Ee(s.children)?n.push(..._c(s.children)):is(s)&&s.shapeFlag===2?n.push(..._c(s.type())):n.push(s)}),n},Fre=(t,e,n)=>_c(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),Nre=(t,e)=>{const n=Fn({}),s=Fn([]),i=new WeakMap,o=c=>{n.value[c.uid]=c,Um(n),Ft(()=>{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)&&Um(n),h(f,p))}i.get(d).push(u)})},r=c=>{delete n.value[c.uid],Um(n);const u=c.getVnode().el,d=u.parentNode,h=i.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{s.value=Fre(t,e,n.value)},l=c=>c.render();return{children:s,addChild:o,removeChild:r,ChildrenSorter:fe({setup(c,{slots:u}){return()=>(a(),u.default?bt(l,{render:u.default}):null)}})}},Ki=H_({type:String,values:xl,required:!1}),QD=Symbol("size"),eR=()=>{const t=Ye(QD,{});return U(()=>A(t.size)||"")};function fp(t,{disabled:e,beforeFocus:n,afterFocus:s,beforeBlur:i,afterBlur:o}={}){const{emit:r}=ht(),a=Fn(),l=J(!1),c=h=>{const f=et(n)?n(h):!1;A(e)||l.value||f||(l.value=!0,r("focus",h),s==null||s())},u=h=>{var p;const f=et(i)?i(h):!1;A(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;A(e)||Yg(h.target)||(f=a.value)!=null&&f.contains(document.activeElement)&&a.value!==document.activeElement||(p=t.value)==null||p.focus()};return Me([a,()=>A(e)],([h,f])=>{h&&(f?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),Hn(a,"focus",c,!0),Hn(a,"blur",u,!0),Hn(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function W4({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,ot(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):i(a)},handleCompositionStart:s,handleCompositionUpdate:i,handleCompositionEnd:o}}const tR=Symbol("emptyValuesContextKey"),Bre="use-empty-values",zre=["",void 0,null],Hre=void 0,N1=Ge({emptyValues:Array,valueOnClear:{type:ue([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=et(t)?t():t,Ee(t)?t.every(e=>!e):!t)}}),Y4=(t,e)=>{const n=ht()?Ye(tR,J({})):J({}),s=U(()=>t.emptyValues||n.value.emptyValues||zre),i=U(()=>et(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:et(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:Hre),o=r=>{let a=!0;return Ee(r)?a=s.value.some(l=>ji(r,l)):a=s.value.includes(r),a};return o(i.value)||Tt(Bre,"value-on-clear should be a value of empty-values"),{emptyValues:s,valueOnClear:i,isEmptyValue:o}},Ure=Ge({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),kr=t=>S4(Ure,t),nR=t=>{const e=t.props,n=Ee(e)?Of(e.map(s=>[s,{}])):e;t.setPropsDefaults=s=>{if(n){for(const[i,o]of Object.entries(s)){const r=n[i];if(Nt(n,i)){if(k4(r)){n[i]={...r,default:o};continue}n[i]={type:r,default:o}}}t.props=n}}},Ut=(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 nR(t),t},jre=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Wre=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Is=t=>(t.install=Dt,nR(t),t);var Yre=fe({__name:"teleport",props:A4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(Pa,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),qre=Yre;const K_=Ut(qre);/*! Element Plus Icons Vue v2.3.2 */var Gre=fe({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),E("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"})]))}}),Xre=Gre,Kre=fe({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),E("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"})]))}}),Fd=Kre,Zre=fe({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),E("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"})]))}}),Jre=Zre,Qre=fe({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),E("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"})]))}}),yd=Qre,eae=fe({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),E("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"})]))}}),Fr=eae,tae=fe({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),E("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"})]))}}),Z_=tae,nae=fe({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),E("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"})]))}}),sae=nae,iae=fe({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),E("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"})]))}}),sR=iae,oae=fe({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),E("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"})]))}}),rae=oae,aae=fe({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),E("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"})]))}}),lae=aae,cae=fe({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),E("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"})]))}}),uae=cae,dae=fe({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),hae=dae,fae=fe({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),pae=fae,mae=fe({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),E("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"})]))}}),gae=mae,vae=fe({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),E("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"})]))}}),yae=vae,bae=fe({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),E("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"})]))}}),q4=bae,_ae=fe({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),E("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"})]))}}),G4=_ae,wae=fe({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),iR=wae,kae=fe({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),E("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"})]))}}),Xc=kae,Cae=fe({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),E("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"})]))}}),oR=Cae,xae=fe({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),E("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"})]))}}),rR=xae,Sae=fe({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),E("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"})]))}}),Bo=Sae,$ae=fe({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),E("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"})]))}}),Aae=$ae,Eae=fe({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),E("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"})]))}}),aR=Eae,Mae=fe({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),E("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"})]))}}),Nc=Mae,Tae=fe({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),E("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"})]))}}),Bc=Tae,Pae=fe({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),Iae=Pae,Lae=fe({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),E("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"})]))}}),J_=Lae,Oae=fe({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),E("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"})]))}}),B1=Oae,Dae=fe({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),E("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"})]))}}),Rae=Dae,Vae=fe({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),E("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"})]))}}),lR=Vae,Fae=fe({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),E("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"})]))}}),Nae=Fae,Bae=fe({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),E("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"})]))}}),zae=Bae,Hae=fe({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),E("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"})]))}}),cR=Hae,Uae=fe({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),E("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"})]))}}),jae=Uae,Wae=fe({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),E("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"})]))}}),uR=Wae,Yae=fe({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),qae=Yae,Gae=fe({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),Xae=Gae,Kae=fe({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),bl=Kae,Zae=fe({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),E("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"})]))}}),Jae=Zae,Qae=fe({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),E("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"})]))}}),dR=Qae,ele=fe({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),E("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"})]))}}),Hf=ele,tle=fe({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),E("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"})]))}}),nle=tle,sle=fe({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),E("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"})]))}}),ile=sle,ole=fe({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),E("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"})]))}}),rle=ole,ale=fe({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),E("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"})]))}}),lle=ale,cle=fe({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),E("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"})]))}}),ule=cle,dle=fe({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),sC=dle,hle=fe({name:"More",__name:"more",setup(t){return(e,n)=>(v(),E("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"})]))}}),fle=hle,ple=fe({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),E("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"})]))}}),mle=ple,gle=fe({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),E("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"})]))}}),vle=gle,yle=fe({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),ble=yle,_le=fe({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),E("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"})]))}}),wle=_le,kle=fe({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),E("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"})]))}}),X4=kle,Cle=fe({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),E("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"})]))}}),xle=Cle,Sle=fe({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),E("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=Sle,Ale=fe({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),E("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"})]))}}),hR=Ale,Ele=fe({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),E("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"})]))}}),Mle=Ele,Tle=fe({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),E("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"})]))}}),Ple=Tle,Ile=fe({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),E("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"})]))}}),Q_=Ile,Lle=fe({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),K4=Lle,Ole=fe({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),E("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"})]))}}),Dle=Ole,Rle=fe({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),E("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"})]))}}),Vle=Rle,Fle=fe({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),E("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"})]))}}),Nle=Fle,Ble=fe({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),Z4=Ble,zle=fe({name:"VideoPlay",__name:"video-play",setup(t){return(e,n)=>(v(),E("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 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Hle=zle,Ule=fe({name:"View",__name:"view",setup(t){return(e,n)=>(v(),E("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"})]))}}),fR=Ule,jle=fe({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),E("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"})]))}}),J4=jle,Wle=fe({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),E("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"})]))}}),pR=Wle,Yle=fe({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),E("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"})]))}}),qle=Yle;const ds=ue([String,Object,Function]),Gle={Close:Bo},mR={Close:Bo,SuccessFilled:K4,InfoFilled:bl,WarningFilled:J4,CircleCloseFilled:iR},Uf={primary:bl,success:K4,warning:J4,error:iR,info:bl},Q4={validating:Hf,success:G4,error:Xc},Xle=["light","dark"],Kle=Ge({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:gb(Uf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Xle,default:"light"}}),Zle={close:t=>t instanceof MouseEvent},Jle=Ge({size:{type:ue([Number,String])},color:{type:String}});var Qle=fe({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Jle,setup(t){const e=t,n=Be("icon"),s=U(()=>{const{size:i,color:o}=e,r=ui(i);return!r&&!o?{}:{fontSize:r,"--color":o}});return(i,o)=>(v(),E("i",Kt({class:A(n).b(),style:s.value},i.$attrs),[le(i.$slots,"default")],16))}}),ece=Qle;const _e=Ut(ece);var tce=fe({name:"ElAlert",__name:"alert",props:Kle,emits:Zle,setup(t,{emit:e}){const{Close:n}=mR,s=t,i=e,o=hi(),r=Be("alert"),a=J(!0),l=U(()=>Uf[s.type]),c=U(()=>{var h;if(s.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?_c(d).some(f=>!Vre(f)):!1}),u=d=>{a.value=!1,i("close",d)};return(d,h)=>(v(),D(Ho,{name:A(r).b("fade"),persisted:""},{default:w(()=>[Re(g("div",{class:q([A(r).b(),A(r).m(t.type),A(r).is("center",t.center),A(r).is(t.effect)]),role:"alert"},[t.showIcon&&(d.$slots.icon||l.value)?(v(),D(A(_e),{key:0,class:q([A(r).e("icon"),A(r).is("big",c.value)])},{default:w(()=>[le(d.$slots,"icon",{},()=>[(v(),D(Ct(l.value)))])]),_:3},8,["class"])):O("v-if",!0),g("div",{class:q(A(r).e("content"))},[t.title||d.$slots.title?(v(),E("span",{key:0,class:q([A(r).e("title"),{"with-description":c.value}])},[le(d.$slots,"title",{},()=>[W($(t.title),1)])],2)):O("v-if",!0),c.value?(v(),E("p",{key:1,class:q(A(r).e("description"))},[le(d.$slots,"default",{},()=>[W($(t.description),1)])],2)):O("v-if",!0),t.closable?(v(),E(te,{key:2},[t.closeText?(v(),E("div",{key:0,class:q([A(r).e("close-btn"),A(r).is("customed")]),onClick:u},$(t.closeText),3)):(v(),D(A(_e),{key:1,class:q(A(r).e("close-btn")),onClick:u},{default:w(()=>[y(A(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[Ht,a.value]])]),_:3},8,["name"]))}}),nce=tce;const El=Ut(nce),gR=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],vR=Ge({role:{type:String,values:gR,default:"tooltip"}}),e8=Symbol("popper"),yR=Symbol("popperContent");var sce=fe({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=Be("popper"),{arrowRef:s,arrowStyle:i}=Ye(yR,void 0);return wn(()=>{s.value=void 0}),e({arrowRef:s}),(o,r)=>(v(),E("span",{ref_key:"arrowRef",ref:s,class:q(A(n).e("arrow")),style:Xe(A(i)),"data-popper-arrow":""},null,6))}}),ice=sce;const bR=Ge({virtualRef:{type:ue(Object)},virtualTriggering:Boolean,onMouseenter:{type:ue(Function)},onMouseleave:{type:ue(Function)},onClick:{type:ue(Function)},onKeydown:{type:ue(Function)},onFocus:{type:ue(Function)},onBlur:{type:ue(Function)},onContextmenu:{type:ue(Function)},id:String,open:Boolean}),Aw="ElOnlyChild",_R=fe({name:Aw,setup(t,{slots:e,attrs:n}){var i;const s=ore(((i=Ye(BD))==null?void 0:i.setForwardRef)??Dt);return()=>{var l;const o=(l=e.default)==null?void 0:l.call(e,n);if(!o)return null;const[r,a]=wR(o);return r?(a>1&&Tt(Aw,"requires exact only one valid child."),Re(gr(r,n),[[s]])):(Tt(Aw,"no valid child node found"),null)}}});function wR(t){if(!t)return[null,0];const e=t,n=e.filter(s=>s.type!==Zn).length;for(const s of e){if(yt(s))switch(s.type){case Zn:continue;case ba:case"svg":return[O$(s),n];case te:return wR(s.children);default:return[s,n]}return[O$(s),n]}return[null,0]}function O$(t){const e=Be("only-child");return y("span",{class:e.e("content")},[t])}var oce=fe({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:bR,setup(t,{expose:e}){const n=t,{role:s,triggerRef:i}=Ye(e8,void 0);ire(i);const o=U(()=>a.value?n.id:void 0),r=U(()=>{if(s&&s.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=U(()=>{if(s&&s.value!=="tooltip")return s.value}),l=U(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Ft(()=>{Me(()=>n.virtualRef,d=>{d&&(i.value=js(d))},{immediate:!0}),Me(i,(d,h)=>{c==null||c(),c=void 0,Po(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Po(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Yg(d)&&(c=Me([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}))),Po(h)&&Yg(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),wn(()=>{if(c==null||c(),c=void 0,i.value&&Po(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(A(_R),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"]))}}),rce=oce;const kR=Ge({arrowOffset:{type:Number,default:5}}),ace=["fixed","absolute"],lce=Ge({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:ue(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:dp,default:"bottom"},popperOptions:{type:ue(Object),default:()=>({})},strategy:{type:String,values:ace,default:"absolute"}}),CR=Ge({...lce,...kR,id:String,style:{type:ue([String,Array,Object])},className:{type:ue([String,Array,Object])},effect:{type:ue(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:ue([String,Array,Object])},popperStyle:{type:ue([String,Array,Object])},referenceEl:{type:ue(Object)},triggerTargetEl:{type:ue(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...kr(["ariaLabel"]),loop:Boolean}),cce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},uce=Ge({size:{type:String,values:xl},disabled:Boolean}),dce=Ge({...uce,model:Object,rules:{type:ue(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:ue([Object,Boolean]),default:!0}}),hce={validate:(t,e,n)=>(Ee(t)||Ke(t))&&Jn(e)&&Ke(n)},Nd=Symbol("formContextKey"),bd=Symbol("formItemContextKey"),Ti=(t,e={})=>{const n=J(void 0),s=e.prop?n:AD("size"),i=e.global?n:eR(),o=e.form?{size:void 0}:Ye(Nd,void 0),r=e.formItem?{size:void 0}:Ye(bd,void 0);return U(()=>s.value||A(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||i.value||"")},_s=t=>{const e=AD("disabled"),n=Ye(Nd,void 0);return U(()=>e.value??A(t)??(n==null?void 0:n.disabled)??!1)},yo=()=>({form:Ye(Nd,void 0),formItem:Ye(bd,void 0)}),Ml=(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=U(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return Ft(()=>{a=Me([Sn(t,"id"),n],([c,u])=>{const d=c??(u?void 0:_r().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})}),Cl(()=>{a&&a(),e!=null&&e.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:l,inputId:r}},fce=["","error","validating","success"],pce=Ge({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:ue([String,Array])},required:{type:Boolean,default:void 0},rules:{type:ue([Object,Array])},error:String,validateStatus:{type:String,values:fce},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:xl}}),Xp=t=>Ee(t)?t[0]:t,ao=t=>!t&&t!==0?[]:Ee(t)?t:[t],mce="ElForm";function gce(){const t=J([]),e=U(()=>{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"&&Tt(mce,`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 Gv=(t,e)=>{const n=Us(e).map(s=>Ee(s)?s.join("."):s);return n.length>0?t.filter(s=>s.propString&&n.includes(s.propString)):t},oh="ElForm";var vce=fe({name:oh,__name:"form",props:dce,emits:hce,setup(t,{expose:e,emit:n}){const s=t,i=n,o=J(),r=In([]),a=new Map,l=Ti(),c=Be("form"),u=U(()=>{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=>Gv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,Zu(P.fieldValue)))},f=P=>{P.prop&&r.splice(r.indexOf(P),1)},p=P=>{if(!s.model){Tt(oh,"model is required for setInitialValues to work.");return}if(!P){Tt(oh,"initModel is required for setInitialValues to work.");return}for(const T of a.keys())a.set(T,Zu(Sc(P,T).value));r.forEach(T=>{T.prop&&T.setInitialValue(Sc(P,T.prop).value)})},m=(P=[])=>{if(!s.model){Tt(oh,"model is required for resetFields to work.");return}Gv(r,P).forEach(L=>L.resetField());const T=new Set(r.map(L=>L.propString).filter(Boolean)),I=P.length>0?Us(P).map(L=>Ee(L)?L.join("."):L):[...a.keys()];for(const L of I)!T.has(L)&&a.has(L)&&(Sc(s.model,L).value=Zu(a.get(L)))},b=(P=[])=>{Gv(r,P).forEach(T=>T.clearValidate())},_=U(()=>{const P=!!s.model;return P||Tt(oh,"model is required for validate to work."),P}),k=P=>{if(r.length===0)return[];const T=Gv(r,P);return T.length?T:(Tt(oh,"please pass correct props!"),[])},C=async P=>S(void 0,P),x=async(P=[])=>{if(!_.value)return!1;const T=k(P);if(T.length===0)return!0;let I={};for(const L of T)try{await L.validate(""),L.validateState==="error"&&!L.error&&L.resetField()}catch(V){I={...I,...V}}return Object.keys(I).length===0?!0:Promise.reject(I)},S=async(P=[],T)=>{var V;let I=!1;const L=!et(T);try{return I=await x(P),I===!0&&await(T==null?void 0:T(I)),I}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)),!I&&await(T==null?void 0:T(!1,N)),L&&Promise.reject(N)}},M=P=>{var I;const T=d(P);T&&((I=T.$el)==null||I.scrollIntoView(s.scrollIntoViewOptions))};return Me(()=>s.rules,()=>{s.validateOnRuleChange&&C().catch(P=>Tt(P))},{deep:!0,flush:"post"}),Pt(Nd,In({...go(s),emit:i,resetFields:m,clearValidate:b,validateField:S,getField:d,addField:h,removeField:f,setInitialValues:p,...gce()})),e({validate:C,validateField:S,resetFields:m,clearValidate:b,scrollToField:M,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),E("form",{ref_key:"formRef",ref:o,class:q(u.value)},[le(P.$slots,"default")],2))}}),yce=vce;const D$="ElLabelWrap";var bce=fe({name:D$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=Ye(Nd,void 0),s=Ye(bd);s||vo(D$,"usage: <el-form-item><label-wrap /></el-form-item>");const i=Be("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")=>{ot(()=>{e.default&&t.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Ft(()=>{c()}),wn(()=>{l("remove")}),kl(()=>c()),Me(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Es(U(()=>{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 Du(){return Du=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},Du.apply(this,arguments)}function _ce(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Jg(t,e)}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iC(t)}function Jg(t,e){return Jg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,i){return s.__proto__=i,s},Jg(t,e)}function wce(){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 O0(t,e,n){return wce()?O0=Reflect.construct.bind():O0=function(i,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(i,a),c=new l;return r&&Jg(c,r.prototype),c},O0.apply(null,arguments)}function kce(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function oC(t){var e=typeof Map=="function"?new Map:void 0;return oC=function(s){if(s===null||!kce(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 O0(s,arguments,iC(this).constructor)}return i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Jg(i,s)},oC(t)}var Cce=/%[sdj%]/g,xce=function(){};typeof process<"u"&&process.env;function rC(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 Io(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(Cce,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 Sce(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Bs(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||Sce(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 R$(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 Ace(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var V$=function(t){_ce(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}(oC(Error));function Ece(t,e,n,s,i){if(e.first){var o=new Promise(function(h,f){var p=function(_){return s(_),_.length?f(new V$(_,rC(_))):h(i)},m=Ace(t);R$(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 V$(u,rC(u))):h(i)};a.length||(s(u),h(i)),a.forEach(function(m){var b=t[m];r.indexOf(m)!==-1?R$(b,n,p):$ce(b,n,p)})});return d.catch(function(h){return h}),d}function Mce(t){return!!(t&&t.message!==void 0)}function Tce(t,e){for(var n=t,s=0;s<e.length;s++){if(n==null)return n;n=n[e[s]]}return n}function F$(t,e){return function(n){var s;return t.fullFields?s=Tce(e,t.fullFields):s=e[n.field||t.fullField],Mce(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 N$(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]=Du({},t[n],s):t[n]=s}}return t}var xR=function(e,n,s,i,o,r){e.required&&(!s.hasOwnProperty(e.field)||Bs(n,r||e.type))&&i.push(Io(o.messages.required,e.fullField))},Pce=function(e,n,s,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Io(o.messages.whitespace,e.fullField))},Xv,Ice=function(){if(Xv)return Xv;var t="[a-fA-F\\d:]",e=function(x){return x&&x.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(x){return x&&x.exact?o:new RegExp("(?:"+e(x)+n+e(x)+")|(?:"+e(x)+i+e(x)+")","g")};l.v4=function(C){return C&&C.exact?r:new RegExp(""+e(C)+n+e(C),"g")},l.v6=function(C){return C&&C.exact?a:new RegExp(""+e(C)+i+e(C),"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"]*)?',k="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+b+_;return Xv=new RegExp("(?:^"+k+"$)","i"),Xv},B$={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},sm={integer:function(e){return sm.number(e)&&parseInt(e,10)===e},float:function(e){return sm.number(e)&&!sm.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"&&!sm.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(B$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Ice())},hex:function(e){return typeof e=="string"&&!!e.match(B$.hex)}},Lce=function(e,n,s,i,o){if(e.required&&n===void 0){xR(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?sm[a](n)||i.push(Io(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&i.push(Io(o.messages.types[a],e.fullField,e.type))},Oce=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(Io(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?i.push(Io(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?i.push(Io(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&i.push(Io(o.messages[d].range,e.fullField,e.min,e.max))},rh="enum",Dce=function(e,n,s,i,o){e[rh]=Array.isArray(e[rh])?e[rh]:[],e[rh].indexOf(n)===-1&&i.push(Io(o.messages[rh],e.fullField,e[rh].join(", ")))},Rce=function(e,n,s,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(Io(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(Io(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},mn={required:xR,whitespace:Pce,type:Lce,range:Oce,enum:Dce,pattern:Rce},Vce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return s();mn.required(e,n,i,r,o,"string"),Bs(n,"string")||(mn.type(e,n,i,r,o),mn.range(e,n,i,r,o),mn.pattern(e,n,i,r,o),e.whitespace===!0&&mn.whitespace(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(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&mn.type(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(n===""&&(n=void 0),Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&(mn.type(e,n,i,r,o),mn.range(e,n,i,r,o))}s(r)},Bce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&mn.type(e,n,i,r,o)}s(r)},zce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),Bs(n)||mn.type(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(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&(mn.type(e,n,i,r,o),mn.range(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(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&(mn.type(e,n,i,r,o),mn.range(e,n,i,r,o))}s(r)},jce=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();mn.required(e,n,i,r,o,"array"),n!=null&&(mn.type(e,n,i,r,o),mn.range(e,n,i,r,o))}s(r)},Wce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&mn.type(e,n,i,r,o)}s(r)},Yce="enum",qce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o),n!==void 0&&mn[Yce](e,n,i,r,o)}s(r)},Gce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return s();mn.required(e,n,i,r,o),Bs(n,"string")||mn.pattern(e,n,i,r,o)}s(r)},Xce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n,"date")&&!e.required)return s();if(mn.required(e,n,i,r,o),!Bs(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),mn.type(e,l,i,r,o),l&&mn.range(e,l.getTime(),i,r,o)}}s(r)},Kce=function(e,n,s,i,o){var r=[],a=Array.isArray(n)?"array":typeof n;mn.required(e,n,i,r,o,a),s(r)},Ew=function(e,n,s,i,o){var r=e.type,a=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Bs(n,r)&&!e.required)return s();mn.required(e,n,i,a,o,r),Bs(n,r)||mn.type(e,n,i,a,o)}s(a)},Zce=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return s();mn.required(e,n,i,r,o)}s(r)},sg={string:Vce,method:Fce,number:Nce,boolean:Bce,regexp:zce,integer:Hce,float:Uce,array:jce,object:Wce,enum:qce,pattern:Gce,date:Xce,url:Ew,hex:Ew,email:Ew,required:Kce,any:Zce};function aC(){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 lC=aC(),z1=function(){function t(n){this.rules=null,this._messages=lC,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=N$(aC(),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 k(x){if(Array.isArray(x)){var S;b=(S=b).concat.apply(S,x)}else b.push(x)}for(var C=0;C<m.length;C++)k(m[C]);b.length?(_=rC(b),c(b,_)):c(null,a)}if(l.messages){var d=this.messages();d===lC&&(d=aC()),N$(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(k){var C=k;typeof C.transform=="function"&&(a===s&&(a=Du({},a)),_=a[m]=C.transform(_)),typeof C=="function"?C={validator:C}:C=Du({},C),C.validator=r.getValidationMethod(C),C.validator&&(C.field=m,C.fullField=C.fullField||m,C.type=r.getType(C),h[m]=h[m]||[],h[m].push({rule:C,value:_,source:a,field:m}))})});var p={};return Ece(h,l,function(m,b){var _=m.rule,k=(_.type==="object"||_.type==="array")&&(typeof _.fields=="object"||typeof _.defaultField=="object");k=k&&(_.required||!_.required&&m.value),_.field=m.field;function C(M,P){return Du({},P,{fullField:_.fullField+"."+M,fullFields:_.fullFields?[].concat(_.fullFields,[M]):[M]})}function x(M){M===void 0&&(M=[]);var P=Array.isArray(M)?M:[M];!l.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&_.message!==void 0&&(P=[].concat(_.message));var T=P.map(F$(_,a));if(l.first&&T.length)return p[_.field]=1,b(T);if(!k)b(T);else{if(_.required&&!m.value)return _.message!==void 0?T=[].concat(_.message).map(F$(_,a)):l.error&&(T=[l.error(_,Io(l.messages.required,_.field))]),b(T);var I={};_.defaultField&&Object.keys(m.value).map(function(R){I[R]=_.defaultField}),I=Du({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(R){var N=I[R],F=Array.isArray(N)?N:[N];L[R]=F.map(C.bind(null,R))});var V=new t(L);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,x,m.source,l);else if(_.validator){try{S=_.validator(_,m.value,x,m.source,l)}catch(M){console.error==null||console.error(M),l.suppressValidatorError||setTimeout(function(){throw M},0),x(M.message)}S===!0?x():S===!1?x(typeof _.message=="function"?_.message(_.fullField||_.field):_.message||(_.fullField||_.field)+" fails"):S instanceof Array?x(S):S instanceof Error&&x(S.message)}S&&S.then&&S.then(function(){return x()},function(M){return x(M)})},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&&!sg.hasOwnProperty(s.type))throw new Error(Io("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"?sg.required:sg[this.getType(s)]||void 0},t}();z1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");sg[e]=n};z1.warning=xce;z1.messages=lC;z1.validators=sg;const Jce=["role","aria-labelledby"];var Qce=fe({name:"ElFormItem",__name:"form-item",props:pce,setup(t,{expose:e}){const n=t,s=hi(),i=Ye(Nd,void 0),o=Ye(bd,void 0),r=Ti(void 0,{formItem:!1}),a=Be("form-item"),l=_r().value,c=J([]),u=J(""),d=bie(u,100),h=J(""),f=J();let p,m=!1;const b=U(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),_=U(()=>b.value==="top"?{}:{width:ui(n.labelWidth??(i==null?void 0:i.labelWidth))}),k=U(()=>{if(b.value==="top"||i!=null&&i.inline)return{};if(!n.label&&!n.labelWidth&&L)return{};const ie=ui(n.labelWidth??(i==null?void 0:i.labelWidth));return!n.label&&!s.label?{marginLeft:ie}:{}}),C=U(()=>[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}]),x=U(()=>Jn(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),S=U(()=>[a.e("error"),{[a.em("error","inline")]:x.value}]),M=U(()=>n.prop?Ee(n.prop)?n.prop.join("."):n.prop:""),P=U(()=>!!(n.label||s.label)),T=U(()=>n.for??(c.value.length===1?c.value[0]:void 0)),I=U(()=>!T.value&&P.value),L=!!o,V=U(()=>{const ie=i==null?void 0:i.model;if(!(!ie||!n.prop))return Sc(ie,n.prop).value}),R=U(()=>{const{required:ie}=n,re=[];n.rules&&re.push(...Us(n.rules));const ke=i==null?void 0:i.rules;if(ke&&n.prop){const Ue=Sc(ke,n.prop).value;Ue&&re.push(...Us(Ue))}if(ie!==void 0){const Ue=re.map((ee,se)=>[ee,se]).filter(([ee])=>"required"in ee);if(Ue.length>0)for(const[ee,se]of Ue)ee.required!==ie&&(re[se]={...ee,required:ie});else re.push({required:ie})}return re}),N=U(()=>R.value.length>0),F=ie=>R.value.filter(re=>!re.trigger||!ie?!0:Ee(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...ke})=>ke),B=U(()=>R.value.some(ie=>ie.required)),z=U(()=>d.value==="error"&&n.showMessage&&((i==null?void 0:i.showMessage)??!0)),G=U(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),K=ie=>{u.value=ie},X=ie=>{var Ue;const{errors:re,fields:ke}=ie;(!re||!ke)&&console.error(ie),K("error"),h.value=re?((Ue=re==null?void 0:re[0])==null?void 0:Ue.message)??`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,h.value)},H=()=>{K("success"),i==null||i.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=M.value;return new z1({[re]:ie}).validate({[re]:V.value},{firstFields:!0}).then(()=>(H(),!0)).catch(ke=>(X(ke),Promise.reject(ke)))},ne=async(ie,re)=>{if(m||!n.prop)return!1;const ke=et(re);if(!N.value)return re==null||re(!1),!1;const Ue=F(ie);return Ue.length===0?(re==null||re(!0),!0):(K("validating"),Q(Ue).then(()=>(re==null||re(!0),!0)).catch(ee=>{const{fields:se}=ee;return re==null||re(!1,se),ke?!1:Promise.reject(se)}))},Z=()=>{K(""),h.value="",m=!1},ae=async()=>{const ie=i==null?void 0:i.model;if(!ie||!n.prop)return;const re=Sc(ie,n.prop);m=!0,re.value=Zu(p),await ot(),Z(),m=!1},ge=ie=>{c.value.includes(ie)||c.value.push(ie)},Ce=ie=>{c.value=c.value.filter(re=>re!==ie)},oe=ie=>{p=Zu(ie)};Me(()=>n.error,ie=>{h.value=ie||"",K(ie?"error":"")},{immediate:!0}),Me(()=>n.validateStatus,ie=>K(ie||""));const pe=In({...go(n),$el:f,size:r,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:I,hasLabel:P,fieldValue:V,addInputId:ge,removeInputId:Ce,resetField:ae,clearValidate:Z,validate:ne,propString:M,setInitialValue:oe});return Pt(bd,pe),Ft(()=>{n.prop&&(oe(V.value),i==null||i.addField(pe))}),wn(()=>{i==null||i.removeField(pe)}),e({size:r,validateMessage:h,validateState:u,validate:ne,clearValidate:Z,resetField:ae,setInitialValue:oe}),(ie,re)=>{var ke;return v(),E("div",{ref_key:"formItemRef",ref:f,class:q(C.value),role:I.value?"group":void 0,"aria-labelledby":I.value?A(l):void 0},[y(A(bce),{"is-auto-width":_.value.width==="auto","update-all":((ke=A(i))==null?void 0:ke.labelWidth)==="auto"},{default:w(()=>[t.label||ie.$slots.label?(v(),D(Ct(T.value?"label":"div"),{key:0,id:A(l),for:T.value,class:q(A(a).e("label")),style:Xe(_.value)},{default:w(()=>[le(ie.$slots,"label",{label:G.value},()=>[W($(G.value),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:q(A(a).e("content")),style:Xe(k.value)},[le(ie.$slots,"default"),y(E_,{name:`${A(a).namespace.value}-zoom-in-top`},{default:w(()=>[z.value?le(ie.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:q(S.value)},$(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,Jce)}}}),SR=Qce;const cn=Ut(yce,{FormItem:SR}),tn=Is(SR),Mw="focus-trap.focus-after-trapped",Tw="focus-trap.focus-after-released",eue="focus-trap.focusout-prevented",z$={cancelable:!0,bubbles:!1},tue={cancelable:!0,bubbles:!1},H$="focusAfterTrapped",U$="focusAfterReleased",$R=Symbol("elFocusTrap"),t8=J(),e2=J(0),n8=J(0);let Kv=0;const AR=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},j$=(t,e)=>{for(const n of t)if(!nue(n,e))return n},nue=(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},sue=t=>{const e=AR(t);return[j$(e,t),j$(e.reverse(),t)]},iue=t=>t instanceof HTMLInputElement&&"select"in t,jl=(t,e)=>{if(t){const n=document.activeElement;E4(t,{preventScroll:!0}),n8.value=window.performance.now(),t!==n&&iue(t)&&e&&t.select()}};function W$(t,e){const n=[...t],s=t.indexOf(e);return s!==-1&&n.splice(s,1),n}const oue=()=>{let t=[];return{push:s=>{const i=t[0];i&&s!==i&&i.pause(),t=W$(t,s),t.unshift(s)},remove:s=>{var i,o;t=W$(t,s),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},rue=(t,e=!1)=>{const n=document.activeElement;for(const s of t)if(jl(s,e),document.activeElement!==n)return},Y$=oue(),aue=()=>e2.value>n8.value,Zv=()=>{t8.value="pointer",e2.value=window.performance.now()},q$=()=>{t8.value="keyboard",e2.value=window.performance.now()},lue=()=>(Ft(()=>{Kv===0&&(document.addEventListener("mousedown",Zv),document.addEventListener("touchstart",Zv),document.addEventListener("keydown",q$)),Kv++}),wn(()=>{Kv--,Kv<=0&&(document.removeEventListener("mousedown",Zv),document.removeEventListener("touchstart",Zv),document.removeEventListener("keydown",q$))}),{focusReason:t8,lastUserFocusTimestamp:e2,lastAutomatedFocusTimestamp:n8}),Jv=t=>new CustomEvent(eue,{...tue,detail:t});var cue=fe({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[H$,U$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let s,i;const{focusReason:o}=lue();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:k,shiftKey:C}=p,{loop:x}=t,S=ls(p)===He.tab&&!m&&!b&&!_,M=document.activeElement;if(S&&M){const P=k,[T,I]=sue(P);if(T&&I){if(!C&&M===I){const L=Jv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),x&&jl(T,!0))}else if(C&&[T,P].includes(M)){const L=Jv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),x&&jl(I,!0))}}else if(M===P){const L=Jv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||p.preventDefault()}}};Pt($R,{focusTrapRef:n,onKeydown:a}),Me(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),Me([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(H$,p)},c=p=>e(U$,p),u=p=>{const m=A(n);if(!m)return;const b=p.target,_=p.relatedTarget,k=b&&m.contains(b);t.trapped||_&&m.contains(_)||(s=_),k&&e("focusin",p),!r.paused&&t.trapped&&(k?i=b:jl(i,!0))},d=p=>{const m=A(n);if(!(r.paused||!m))if(t.trapped){const b=p.relatedTarget;!li(b)&&!m.contains(b)&&setTimeout(()=>{if(!r.paused&&t.trapped){const _=Jv({focusReason:o.value});e("focusout-prevented",_),_.defaultPrevented||jl(i,!0)}},0)}else{const b=p.target;b&&m.contains(b)||e("focusout",p)}};async function h(){await ot();const p=A(n);if(p){Y$.push(r);const m=p.contains(document.activeElement)?s:document.activeElement;if(s=m,!p.contains(m)){const b=new Event(Mw,z$);p.addEventListener(Mw,l),p.dispatchEvent(b),b.defaultPrevented||ot(()=>{let _=t.focusStartEl;Ke(_)||(jl(_),document.activeElement!==_&&(_="first")),_==="first"&&rue(AR(p),!0),(document.activeElement===m||_==="container")&&jl(p)})}}}function f(){const p=A(n);if(p){p.removeEventListener(Mw,l);const m=new CustomEvent(Tw,{...z$,detail:{focusReason:o.value}});p.addEventListener(Tw,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!aue()||p.contains(document.activeElement))&&jl(s??document.body),p.removeEventListener(Tw,c),Y$.remove(r),s=null,i=null}}return Ft(()=>{t.trapped&&h(),Me(()=>t.trapped,p=>{p?h():f()})}),wn(()=>{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}}}),fi=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n};function uue(t,e,n,s,i,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var due=fi(cue,[["render",uue]]),H1=due;const hue=(t,e=[])=>{const{placement:n,strategy:s,popperOptions:i}=t,o={placement:n,strategy:s,...i,modifiers:[...pue(t),...e]};return mue(o,i==null?void 0:i.modifiers),o},fue=t=>{if(Gt)return js(t)};function pue(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 mue(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const gue=0,vue=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:s,role:i}=Ye(e8,void 0),o=J(),r=U(()=>t.arrowOffset),a=U(()=>({name:"eventListeners",enabled:!!t.visible})),l=U(()=>{const k=A(o),C=A(r)??gue;return{name:"arrow",enabled:!jse(k),options:{element:k,padding:C}}}),c=U(()=>({onFirstUpdate:()=>{p()},...hue(t,[A(l),A(a)])})),u=U(()=>fue(t.referenceEl)||A(s)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:b}=Xoe(u,n,c);Me(b,k=>e.value=k,{flush:"sync"}),Ft(()=>{Me(()=>{var k,C;return(C=(k=A(u))==null?void 0:k.getBoundingClientRect)==null?void 0:C.call(k)},()=>{p()})});let _;return Me(()=>t.visible,k=>{_==null||_(),_=void 0,k&&(_=Es(n,p).stop)}),wn(()=>{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}},yue=(t,{attributes:e,styles:n,role:s})=>{const{nextZIndex:i}=Y_(),o=Be("popper"),r=U(()=>A(e).popper),a=J(_t(t.zIndex)?t.zIndex:i()),l=U(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=U(()=>[{zIndex:A(a)},A(n).popper,t.popperStyle||{}]),u=U(()=>s.value==="dialog"?"false":void 0),d=U(()=>A(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=_t(t.zIndex)?t.zIndex:i()}}},bue=(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 wn(()=>{s.value=void 0}),{focusStartRef:s,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:i,onFocusInTrap:r,onFocusoutPrevented:a,onReleaseRequested:l}};var _ue=fe({name:"ElPopperContent",__name:"content",props:CR,emits:cce,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}=bue(i,s),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:b,role:_,update:k}=vue(i),{ariaModal:C,arrowStyle:x,contentAttrs:S,contentClass:M,contentStyle:P,updateZIndex:T}=yue(i,{styles:m,attributes:h,role:_}),I=Ye(bd,void 0);Pt(yR,{arrowStyle:x,arrowRef:f}),I&&Pt(bd,{...I,addInputId:Dt,removeInputId:Dt});let L;const V=(N=!0)=>{k(),N&&T()},R=()=>{V(!1),i.visible&&i.focusOnShow?r.value=!0:i.visible===!1&&(r.value=!1)};return Ft(()=>{Me(()=>i.triggerTargetEl,(N,F)=>{L==null||L(),L=void 0;const B=A(N||p.value),z=A(F||p.value);Po(B)&&(L=Me([_,()=>i.ariaLabel,C,()=>i.id],G=>{["role","aria-label","aria-modal","id"].forEach((K,X)=>{li(G[X])?B.removeAttribute(K):B.setAttribute(K,G[X])})},{immediate:!0})),z!==B&&Po(z)&&["role","aria-label","aria-modal","id"].forEach(G=>{z.removeAttribute(G)})},{immediate:!0}),Me(()=>i.visible,R,{immediate:!0})}),wn(()=>{L==null||L(),L=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:b,updatePopper:V,contentStyle:P}),(N,F)=>(v(),E("div",Kt({ref_key:"contentRef",ref:p},A(S),{style:A(P),class:A(M),tabindex:"-1",onMouseenter:F[0]||(F[0]=B=>N.$emit("mouseenter",B)),onMouseleave:F[1]||(F[1]=B=>N.$emit("mouseleave",B))}),[y(A(H1),{loop:t.loop,trapped:A(r),"trap-on-focus-in":!0,"focus-trap-el":A(p),"focus-start-el":A(o),onFocusAfterTrapped:A(l),onFocusAfterReleased:A(a),onFocusin:A(c),onFocusoutPrevented:A(u),onReleaseRequested:A(d)},{default:w(()=>[le(N.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),wue=_ue,kue=fe({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:vR,setup(t,{expose:e}){const n=t,s={triggerRef:J(),popperInstanceRef:J(),contentRef:J(),referenceRef:J(),role:U(()=>n.role)};return e(s),Pt(e8,s),(i,o)=>le(i.$slots,"default")}}),Cue=kue;const xue=Ut(Cue),zn=Ge({...nre,...CR,appendTo:{type:A4.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:ue(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...kr(["ariaLabel"])}),$c=Ge({...bR,disabled:Boolean,trigger:{type:ue([String,Array]),default:"hover"},triggerKeys:{type:ue(Array),default:()=>[He.enter,He.numpadEnter,He.space]},focusOnTarget:Boolean}),{useModelToggleProps:Sue,useModelToggleEmits:$ue,useModelToggle:Aue}=$D("visible"),Eue=Ge({...vR,...Sue,...zn,...$c,...kR,showArrow:{type:Boolean,default:!0}}),Mue=[...$ue,"before-show","before-hide","show","hide","open","close"],s8=Symbol("elTooltip"),cC=(t,e)=>Ee(t)?t.includes(e):t===e,ah=(t,e,n)=>s=>{cC(A(t),e)&&n(s)};var Tue=fe({name:"ElTooltipTrigger",__name:"trigger",props:$c,setup(t,{expose:e}){const n=t,s=Be("tooltip"),{controlled:i,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=Ye(s8,void 0),u=J(null),d=()=>{if(A(i)||n.disabled)return!0},h=Sn(n,"trigger"),f=As(d,ah(h,"hover",x=>{a(x),n.focusOnTarget&&x.target&&ot(()=>{E4(x.target,{preventScroll:!0})})})),p=As(d,ah(h,"hover",l)),m=As(d,ah(h,"click",x=>{x.button===0&&c(x)})),b=As(d,ah(h,"focus",a)),_=As(d,ah(h,"focus",l)),k=As(d,ah(h,"contextmenu",x=>{x.preventDefault(),c(x)})),C=As(d,x=>{const S=ls(x);n.triggerKeys.includes(S)&&(x.preventDefault(),c(x))});return e({triggerRef:u}),(x,S)=>(v(),D(A(rce),{id:A(o),"virtual-ref":t.virtualRef,open:A(r),"virtual-triggering":t.virtualTriggering,class:q(A(s).e("trigger")),onBlur:A(_),onClick:A(m),onContextmenu:A(k),onFocus:A(b),onMouseenter:A(f),onMouseleave:A(p),onKeydown:A(C)},{default:w(()=>[le(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),Pue=Tue,Iue=fe({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:zn,setup(t,{expose:e}){const n=t,{selector:s}=ND(),i=Be("tooltip"),o=J(),r=uD(()=>{var K;return(K=o.value)==null?void 0:K.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:b,onBeforeHide:_}=Ye(s8,void 0),k=U(()=>n.transition||`${i.namespace.value}-fade-in-linear`),C=U(()=>n.persistent);wn(()=>{a==null||a()});const x=U(()=>A(C)?!0:A(u)),S=U(()=>n.disabled?!1:A(u)),M=U(()=>n.appendTo||s.value),P=U(()=>n.style??{}),T=J(!0),I=()=>{m(),G()&&E4(document.body,{preventScroll:!0}),T.value=!0},L=()=>{if(A(l))return!0},V=As(L,()=>{n.enterable&&cC(A(d),"hover")&&f()}),R=As(L,()=>{cC(A(d),"hover")&&h()}),N=()=>{var K,X;(X=(K=o.value)==null?void 0:K.updatePopper)==null||X.call(K),b==null||b()},F=()=>{_==null||_()},B=()=>{p()},z=()=>{n.virtualTriggering||h()},G=K=>{var Q;const X=(Q=o.value)==null?void 0:Q.popperContentRef,H=(K==null?void 0:K.relatedTarget)||document.activeElement;return X==null?void 0:X.contains(H)};return Me(()=>A(u),K=>{K?(T.value=!1,a=gD(r,()=>{A(l)||ao(A(d)).every(X=>X!=="hover"&&X!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:G}),(K,X)=>(v(),D(A(K_),{disabled:!t.teleported,to:M.value},{default:w(()=>[x.value||!T.value?(v(),D(Ho,{key:0,name:k.value,appear:!C.value,onAfterLeave:I,onBeforeEnter:N,onAfterEnter:B,onBeforeLeave:F,persisted:""},{default:w(()=>[Re(y(A(wue),Kt({id:A(c),ref_key:"contentRef",ref:o},K.$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:A(V),onMouseleave:A(R),onBlur:z,onClose:A(h)}),{default:w(()=>[le(K.$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"]),[[Ht,S.value]])]),_:3},8,["name","appear"])):O("v-if",!0)]),_:3},8,["disabled","to"]))}}),Lue=Iue;const Oue=["innerHTML"],Due={key:1};var Rue=fe({name:"ElTooltip",__name:"tooltip",props:Eue,emits:Mue,setup(t,{expose:e,emit:n}){const s=t,i=n;tre();const o=Be("tooltip"),r=_r(),a=J(),l=J(),c=()=>{var S;const x=A(a);x&&((S=x.popperInstanceRef)==null||S.update())},u=J(!1),d=J(),{show:h,hide:f,hasUpdateHandler:p}=Aue({indicator:u,toggleReason:d}),{onOpen:m,onClose:b}=sre({showAfter:Sn(s,"showAfter"),hideAfter:Sn(s,"hideAfter"),autoClose:Sn(s,"autoClose"),open:h,close:f}),_=U(()=>Jn(s.visible)&&!p.value),k=U(()=>[o.b(),s.popperClass]);Pt(s8,{controlled:_,id:r,open:Oc(u),trigger:Sn(s,"trigger"),onOpen:m,onClose:b,onToggle:x=>{A(u)?b(x):m(x)},onShow:()=>{i("show",d.value)},onHide:()=>{i("hide",d.value)},onBeforeShow:()=>{i("before-show",d.value)},onBeforeHide:()=>{i("before-hide",d.value)},updatePopper:c}),Me(()=>s.disabled,x=>{x&&u.value&&(u.value=!1),!x&&Jn(s.visible)&&(u.value=s.visible)});const C=x=>{var S;return(S=l.value)==null?void 0:S.isFocusInsideContent(x)};return M6(()=>u.value&&f()),wn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:C,updatePopper:c,onOpen:m,onClose:b,hide:f}),(x,S)=>(v(),D(A(xue),{ref_key:"popperRef",ref:a,role:t.role},{default:w(()=>[y(Pue,{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(()=>[x.$slots.default?le(x.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),y(Lue,{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":k.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(x.$slots,"content",{},()=>[t.rawContent?(v(),E("span",{key:0,innerHTML:t.content},null,8,Oue)):(v(),E("span",Due,$(t.content),1))]),t.showArrow?(v(),D(A(ice),{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"]))}}),Vue=Rue;const Ls=Ut(Vue),ii=t=>t,Fue=Ge({id:{type:String,default:void 0},size:Ki,disabled:{type:Boolean,default:void 0},modelValue:{type:ue([String,Number,Object]),default:""},modelModifiers:{type:ue(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:ue(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:ue([Boolean,Object]),default:!1},autocomplete:{type:ue(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:ds,default:Xc},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:ue([Object,Array,String]),default:()=>ii({})},autofocus:Boolean,rows:{type:Number,default:2},...kr(["ariaLabel"]),inputmode:{type:ue(String),default:void 0},name:String}),Nue={[Mt]: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};Mi(Xc);let yi;const Bue={height:"0",visibility:"hidden",overflow:M4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},zue=["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"],G$=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Hue(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:zue.map(o=>[o,e.getPropertyValue(o)]),paddingSize:s,borderSize:i,boxSizing:n}}function X$(t,e=1,n){var u;if(!yi){yi=document.createElement("textarea");let d=document.body;!M4()&&t.parentNode&&(d=t.parentNode),d.appendChild(yi)}const{paddingSize:s,borderSize:i,boxSizing:o,contextStyle:r}=Hue(t);r.forEach(([d,h])=>yi==null?void 0:yi.style.setProperty(d,h)),Object.entries(Bue).forEach(([d,h])=>yi==null?void 0:yi.style.setProperty(d,h,"important")),yi.value=t.value||t.placeholder||"";let a=yi.scrollHeight;const l={};o==="border-box"?a=a+i:o==="content-box"&&(a=a-s),yi.value="";const c=yi.scrollHeight-s;if(_t(e)){let d=c*e;o==="border-box"&&(d=d+s+i),a=Math.max(d,a),l.minHeight=`${d}px`}if(_t(n)){let d=c*n;o==="border-box"&&(d=d+s+i),a=Math.min(d,a)}return l.height=`${a}px`,(u=yi.parentNode)==null||u.removeChild(yi),yi=void 0,l}const Uue=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],jue=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],K$="ElInput";var Wue=fe({name:K$,inheritAttrs:!1,__name:"input",props:Fue,emits:Nue,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ld(),r=U_(),a=hi(),l=U(()=>[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")]:X.value&&H.value,[m.b("hidden")]:s.type==="hidden"},o.class]),c=U(()=>[m.e("wrapper"),m.is("focus",I.value)]),{form:u,formItem:d}=yo(),{inputId:h}=Ml(s,{formItemContext:d}),f=Ti(),p=_s(),m=Be("input"),b=Be("textarea"),_=Fn(),k=Fn(),C=J(!1),x=J(!1),S=J(),M=Fn(s.inputStyle),P=U(()=>_.value||k.value),{wrapperRef:T,isFocused:I,handleFocus:L,handleBlur:V}=fp(P,{disabled:p,afterBlur(){var ve;s.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"blur").catch(Te=>Tt(Te)))}}),R=U(()=>(u==null?void 0:u.statusIcon)??!1),N=U(()=>(d==null?void 0:d.validateState)||""),F=U(()=>N.value&&Q4[N.value]),B=U(()=>x.value?fR:uR),z=U(()=>[o.style]),G=U(()=>[s.inputStyle,M.value,{resize:s.resize}]),K=U(()=>li(s.modelValue)?"":String(s.modelValue)),X=U(()=>s.clearable&&!p.value&&!s.readonly&&!!K.value&&(I.value||C.value)),H=U(()=>s.showPassword&&!p.value&&!!K.value),Q=U(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!p.value&&!s.readonly&&!s.showPassword),ne=U(()=>K.value.length),Z=U(()=>!!Q.value&&ne.value>Number(s.maxlength)),ae=U(()=>!!a.suffix||!!s.suffixIcon||X.value||s.showPassword||Q.value||!!N.value&&R.value),ge=U(()=>!!Object.keys(s.modelModifiers).length),[Ce,oe]=Rre(_);Es(k,ve=>{if(re(),!Q.value||s.resize!=="both"&&s.resize!=="horizontal")return;const{width:Te}=ve[0].contentRect;S.value={right:`calc(100% - ${Te+22-10}px)`}});const pe=()=>{const{type:ve,autosize:Te}=s;if(!(!Gt||ve!=="textarea"||!k.value))if(Te){const Pe=yt(Te)?Te.minRows:void 0,gt=yt(Te)?Te.maxRows:void 0,Lt=X$(k.value,Pe,gt);M.value={overflowY:"hidden",...Lt},ot(()=>{k.value.offsetHeight,M.value=Lt})}else M.value={minHeight:X$(k.value).minHeight}},re=(ve=>{let Te=!1;return()=>{var Pe;Te||!s.autosize||((Pe=k.value)==null?void 0:Pe.offsetParent)!==null&&(setTimeout(ve),Te=!0)}})(pe),ke=()=>{const ve=P.value,Te=s.formatter?s.formatter(K.value):K.value;!ve||ve.value===Te||s.type==="file"||(ve.value=Te)},Ue=ve=>{const{trim:Te,number:Pe}=s.modelModifiers;return Te&&(ve=ve.trim()),Pe&&(ve=`${G$(ve)}`),s.formatter&&s.parser&&(ve=s.parser(ve)),ve},ee=async ve=>{if(me.value)return;const{lazy:Te}=s.modelModifiers;let{value:Pe}=ve.target;if(Te){i(Do,Pe);return}if(Pe=Ue(Pe),String(Pe)===K.value){s.formatter&&ke();return}Ce(),i(Mt,Pe),i(Do,Pe),await ot(),(s.formatter&&s.parser||!ge.value)&&ke(),oe()},se=async ve=>{let{value:Te}=ve.target;Te=Ue(Te),s.modelModifiers.lazy&&i(Mt,Te),i(dn,Te,ve),await ot(),ke()},{isComposing:me,handleCompositionStart:$e,handleCompositionUpdate:Se,handleCompositionEnd:Ie}=W4({emit:i,afterComposition:ee}),je=()=>{x.value=!x.value},Fe=()=>{var ve;return(ve=P.value)==null?void 0:ve.focus()},ze=()=>{var ve;return(ve=P.value)==null?void 0:ve.blur()},Ae=ve=>{C.value=!1,i("mouseleave",ve)},Ze=ve=>{C.value=!0,i("mouseenter",ve)},We=ve=>{i("keydown",ve)},it=()=>{var ve;(ve=P.value)==null||ve.select()},be=ve=>{i(Mt,""),i(dn,""),i("clear",ve),i(Do,"")};return Me(()=>s.modelValue,()=>{var ve;ot(()=>pe()),s.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"change").catch(Te=>Tt(Te)))}),Me(K,ve=>{if(!P.value)return;const{trim:Te,number:Pe}=s.modelModifiers,gt=P.value.value,Lt=(Pe||s.type==="number")&&!/^0\d/.test(gt)?`${G$(gt)}`:gt;Lt!==ve&&(document.activeElement===P.value&&P.value.type!=="range"&&Te&&Lt.trim()===ve||ke())}),Me(()=>s.type,async()=>{await ot(),ke(),pe()}),Ft(()=>{!s.formatter&&s.parser&&Tt(K$,"If you set the parser, you also need to set the formatter."),ke(),ot(pe)}),e({input:_,textarea:k,ref:P,textareaStyle:G,autosize:Sn(s,"autosize"),isComposing:me,focus:Fe,blur:ze,select:it,clear:be,resizeTextarea:pe}),(ve,Te)=>(v(),E("div",{class:q([l.value,{[A(m).bm("group","append")]:ve.$slots.append,[A(m).bm("group","prepend")]:ve.$slots.prepend}]),style:Xe(z.value),onMouseenter:Ze,onMouseleave:Ae},[O(" input "),t.type!=="textarea"?(v(),E(te,{key:0},[O(" prepend slot "),ve.$slots.prepend?(v(),E("div",{key:0,class:q(A(m).be("group","prepend"))},[le(ve.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:T,class:q(c.value)},[O(" prefix slot "),ve.$slots.prefix||t.prefixIcon?(v(),E("span",{key:0,class:q(A(m).e("prefix"))},[g("span",{class:q(A(m).e("prefix-inner"))},[le(ve.$slots,"prefix"),t.prefixIcon?(v(),D(A(_e),{key:0,class:q(A(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Kt({id:A(h),ref_key:"input",ref:_,class:A(m).e("inner")},A(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?x.value?"text":"password":t.type,disabled:A(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:Te[0]||(Te[0]=(...Pe)=>A($e)&&A($e)(...Pe)),onCompositionupdate:Te[1]||(Te[1]=(...Pe)=>A(Se)&&A(Se)(...Pe)),onCompositionend:Te[2]||(Te[2]=(...Pe)=>A(Ie)&&A(Ie)(...Pe)),onInput:ee,onChange:se,onKeydown:We}),null,16,Uue),O(" suffix slot "),ae.value?(v(),E("span",{key:1,class:q(A(m).e("suffix"))},[g("span",{class:q(A(m).e("suffix-inner"))},[!X.value||!H.value||!Q.value?(v(),E(te,{key:0},[le(ve.$slots,"suffix"),t.suffixIcon?(v(),D(A(_e),{key:0,class:q(A(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),X.value?(v(),D(A(_e),{key:1,class:q([A(m).e("icon"),A(m).e("clear")]),onMousedown:Oe(A(Dt),["prevent"]),onClick:be},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),H.value?(v(),D(A(_e),{key:2,class:q([A(m).e("icon"),A(m).e("password")]),onClick:je,onMousedown:Oe(A(Dt),["prevent"]),onMouseup:Oe(A(Dt),["prevent"])},{default:w(()=>[le(ve.$slots,"password-icon",{visible:x.value},()=>[(v(),D(Ct(B.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):O("v-if",!0),Q.value?(v(),E("span",{key:3,class:q([A(m).e("count"),A(m).is("outside",t.wordLimitPosition==="outside")])},[g("span",{class:q(A(m).e("count-inner"))},$(ne.value)+" / "+$(t.maxlength),3)],2)):O("v-if",!0),N.value&&F.value&&R.value?(v(),D(A(_e),{key:4,class:q([A(m).e("icon"),A(m).e("validateIcon"),A(m).is("loading",N.value==="validating")])},{default:w(()=>[(v(),D(Ct(F.value)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),ve.$slots.append?(v(),E("div",{key:1,class:q(A(m).be("group","append"))},[le(ve.$slots,"append")],2)):O("v-if",!0)],64)):(v(),E(te,{key:1},[O(" textarea "),g("textarea",Kt({id:A(h),ref_key:"textarea",ref:k,class:[A(b).e("inner"),A(m).is("focus",A(I)),A(b).is("clearable",t.clearable)]},A(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:A(p),readonly:t.readonly,autocomplete:t.autocomplete,style:G.value,"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Te[3]||(Te[3]=(...Pe)=>A($e)&&A($e)(...Pe)),onCompositionupdate:Te[4]||(Te[4]=(...Pe)=>A(Se)&&A(Se)(...Pe)),onCompositionend:Te[5]||(Te[5]=(...Pe)=>A(Ie)&&A(Ie)(...Pe)),onInput:ee,onFocus:Te[6]||(Te[6]=(...Pe)=>A(L)&&A(L)(...Pe)),onBlur:Te[7]||(Te[7]=(...Pe)=>A(V)&&A(V)(...Pe)),onChange:se,onKeydown:We}),null,16,jue),X.value?(v(),D(A(_e),{key:0,class:q([A(b).e("icon"),A(b).e("clear")]),onMousedown:Oe(A(Dt),["prevent"]),onClick:be},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),Q.value?(v(),E("span",{key:1,style:Xe(S.value),class:q([A(m).e("count"),A(m).is("outside",t.wordLimitPosition==="outside")])},$(ne.value)+" / "+$(t.maxlength),7)):O("v-if",!0)],64))],38))}}),Yue=Wue;const vt=Ut(Yue),que=Ge({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:ue([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,...kr(["ariaLabel","ariaOrientation"])}),ER={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(_t)},lh=4,Gue={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"}},Xue=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Kue=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),i8=Symbol("scrollbarContextKey"),Zue=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Jue="Thumb";var Que=fe({__name:"thumb",props:Kue,setup(t){const e=t,n=Ye(i8),s=Be("scrollbar");n||vo(Jue,"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=Gt?document.onselectstart:null;const f=U(()=>Gue[e.vertical?"vertical":"horizontal"]),p=U(()=>Xue({size:e.size,move:e.move,bar:f.value})),m=U(()=>i.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/o.value[f.value.offset]),b=T=>{var L;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(L=window.getSelection())==null||L.removeAllRanges(),k(T);const I=T.currentTarget;I&&(r.value[f.value.axis]=I[f.value.offset]-(T[f.value.client]-I.getBoundingClientRect()[f.value.direction]))},_=T=>{if(!o.value||!i.value||!n.wrapElement)return;const I=(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]=I*n.wrapElement[f.value.scrollSize]/100},k=T=>{T.stopImmediatePropagation(),l=!0,u=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),h=document.onselectstart,document.onselectstart=()=>!1},C=T=>{if(!i.value||!o.value||l===!1)return;const I=r.value[f.value.axis];if(!I)return;const L=((i.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1-(o.value[f.value.offset]-I))*100*m.value/i.value[f.value.offset];f.value.scroll==="scrollLeft"?n.wrapElement[f.value.scroll]=L*d/100:n.wrapElement[f.value.scroll]=L*u/100},x=()=>{l=!1,r.value[f.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),P(),c&&(a.value=!1)},S=()=>{c=!1,a.value=!!e.size},M=()=>{c=!0,a.value=l};wn(()=>{P(),document.removeEventListener("mouseup",x)});const P=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return Hn(Sn(n,"scrollbarElement"),"mousemove",S),Hn(Sn(n,"scrollbarElement"),"mouseleave",M),(T,I)=>(v(),D(Ho,{name:A(s).b("fade"),persisted:""},{default:w(()=>[Re(g("div",{ref_key:"instance",ref:i,class:q([A(s).e("bar"),A(s).is(f.value.key)]),onMousedown:_,onClick:I[0]||(I[0]=Oe(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:q(A(s).e("thumb")),style:Xe(p.value),onMousedown:b},null,38)],34),[[Ht,t.always||a.value]])]),_:1},8,["name"]))}}),Z$=Que,ede=fe({__name:"bar",props:Zue,setup(t,{expose:e}){const n=t,s=Ye(i8),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-lh,p=h.offsetWidth-lh;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-lh,p=h.offsetWidth-lh,m=f**2/h.scrollHeight,b=p**2/h.scrollWidth,_=Math.max(m,n.minSize),k=Math.max(b,n.minSize);l.value=m/(f-m)/(_/(f-_)),c.value=b/(p-b)/(k/(p-k)),a.value=_+lh<f?`${_}px`:"",r.value=k+lh<p?`${k}px`:""}}),(h,f)=>(v(),E(te,null,[y(Z$,{move:i.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),y(Z$,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),tde=ede;const nde=["tabindex"],Pw="ElScrollbar";var sde=fe({name:Pw,__name:"scrollbar",props:que,emits:ER,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Be("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(),_=U(()=>{const R={},N=ui(s.height),F=ui(s.maxHeight);return N&&(R.height=N),F&&(R.maxHeight=F),[s.wrapStyle,R]}),k=U(()=>[s.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!s.native}]),C=U(()=>[o.e("view"),s.viewClass]),x=R=>h[R]??!1,S={top:"bottom",bottom:"top",left:"right",right:"left"},M=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(x(d))return;M(B)}B[d]&&i("end-reached",d)}};function T(R,N){yt(R)?p.value.scrollTo(R):_t(R)&&_t(N)&&p.value.scrollTo(R,N)}const I=R=>{if(!_t(R)){Tt(Pw,"value must be a number");return}p.value.scrollTop=R},L=R=>{if(!_t(R)){Tt(Pw,"value must be a number");return}p.value.scrollLeft=R},V=()=>{var R;(R=b.value)==null||R.update(),h[d]=!1};return Me(()=>s.noresize,R=>{R?(r==null||r(),a==null||a(),l==null||l()):({stop:r}=Es(m,V),{stop:a}=Es(p,V),l=Hn("resize",V))},{immediate:!0}),Me(()=>[s.maxHeight,s.height],()=>{s.native||ot(()=>{var R;V(),p.value&&((R=b.value)==null||R.handleScroll(p.value))})}),Pt(i8,In({scrollbarElement:f,wrapElement:p})),E6(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Ft(()=>{s.native||ot(()=>{V()})}),kl(()=>V()),e({wrapRef:p,update:V,scrollTo:T,setScrollTop:I,setScrollLeft:L,handleScroll:P}),(R,N)=>(v(),E("div",{ref_key:"scrollbarRef",ref:f,class:q(A(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:q(k.value),style:Xe(_.value),tabindex:t.tabindex,onScroll:P},[(v(),D(Ct(t.tag),{id:t.id,ref_key:"resizeRef",ref:m,class:q(C.value),style:Xe(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,nde),t.native?O("v-if",!0):(v(),D(tde,{key:0,ref_key:"barRef",ref:b,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),ide=sde;const Pi=Ut(ide),ode=Ge({size:{type:[Number,String],values:xl,validator:t=>_t(t)},shape:{type:String,values:["circle","square"]},icon:{type:ds},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:ue(String),default:"cover"}}),rde={error:t=>t instanceof Event},MR=Symbol("avatarGroupContextKey"),ade={size:{type:ue([Number,String]),values:xl,validator:t=>_t(t)},shape:{type:ue(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:ue(String),default:"light"},placement:{type:ue(String),values:dp,default:"top"},popperClass:zn.popperClass,popperStyle:zn.popperStyle,collapseClass:String,collapseStyle:{type:ue([String,Array,Object])}},lde=["src","alt","srcset"];var cde=fe({name:"ElAvatar",__name:"avatar",props:ode,emits:rde,setup(t,{emit:e}){const n=t,s=e,i=Ye(MR,void 0),o=Be("avatar"),r=J(!1),a=U(()=>n.size??(i==null?void 0:i.size)),l=U(()=>n.shape??(i==null?void 0:i.shape)??"circle"),c=U(()=>{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=U(()=>_t(a.value)?o.cssVarBlock({size:ui(a.value)}):void 0),d=U(()=>({objectFit:n.fit}));Me(()=>[n.src,n.srcSet],()=>r.value=!1);function h(f){r.value=!0,s("error",f)}return(f,p)=>(v(),E("span",{class:q(c.value),style:Xe(u.value)},[(t.src||t.srcSet)&&!r.value?(v(),E("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:Xe(d.value),onError:h},null,44,lde)):t.icon?(v(),D(A(_e),{key:1},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),TR=cde,PR=fe({name:"ElAvatarGroup",props:ade,setup(t,{slots:e}){const n=Be("avatar-group");return Pt(MR,In({size:Sn(t,"size"),shape:Sn(t,"shape")})),()=>{var o;const s=_c(((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(Ls,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>y(TR,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[W("+ "),r.length]}),content:()=>y("div",{class:n.e("collapse-avatars")},[r.map((a,l)=>is(a)?gr(a,{key:a.key??l}):a)])}))}return y("div",{class:n.b()},[i])}}});const o8=Ut(TR,{AvatarGroup:PR});Is(PR);const ude=Ge({separator:{type:String,default:"/"},separatorIcon:{type:ds}}),IR=Symbol("breadcrumbKey"),dde=Ge({to:{type:ue([String,Object]),default:""},replace:Boolean}),hde=["aria-label"];var fde=fe({name:"ElBreadcrumb",__name:"breadcrumb",props:ude,setup(t){const{t:e}=Qt(),n=t,s=Be("breadcrumb"),i=J();return Pt(IR,n),Ft(()=>{const o=i.value.querySelectorAll(`.${s.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),E("div",{ref_key:"breadcrumb",ref:i,class:q(A(s).b()),"aria-label":A(e)("el.breadcrumb.label"),role:"navigation"},[le(o.$slots,"default")],10,hde))}}),pde=fde,mde=fe({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:dde,setup(t){const e=t,n=ht(),s=Ye(IR,void 0),i=Be("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(),E("span",{class:q(A(i).e("item"))},[g("span",{class:q([A(i).e("inner"),A(i).is("link",!!t.to)]),role:"link",onClick:r},[le(a.$slots,"default")],2),(c=A(s))!=null&&c.separatorIcon?(v(),D(A(_e),{key:0,class:q(A(i).e("separator"))},{default:w(()=>[(v(),D(Ct(A(s).separatorIcon)))]),_:1},8,["class"])):(v(),E("span",{key:1,class:q(A(i).e("separator")),role:"presentation"},$((u=A(s))==null?void 0:u.separator),3))],2)}}}),LR=mde;const gde=Ut(pde,{BreadcrumbItem:LR}),vde=Is(LR),yde=["default","primary","success","warning","info","danger","text",""],bde=["button","submit","reset"],uC=Ge({size:Ki,disabled:{type:Boolean,default:void 0},type:{type:String,values:yde,default:""},icon:{type:ds},nativeType:{type:String,values:bde,default:"button"},loading:Boolean,loadingIcon:{type:ds,default:()=>Hf},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:ue([String,Object]),default:"button"}}),_de={click:t=>t instanceof MouseEvent},OR=Symbol(),wb=J();function Kc(t,e=void 0){const n=ht()?Ye(OR,wb):wb;return t?U(()=>{var s;return((s=n.value)==null?void 0:s[t])??e}):n}function r8(t,e){const n=Kc(),s=Be(t,U(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Qm})),i=Qt(U(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=Y_(U(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||zD})),r=U(()=>{var a;return A(e)||((a=n.value)==null?void 0:a.size)||""});return DR(U(()=>A(n)||{})),{ns:s,locale:i,zIndex:o,size:r}}const DR=(t,e,n=!1)=>{const s=!!ht(),i=s?Kc():void 0,o=(e==null?void 0:e.provide)??(s?Pt:void 0);if(!o){Tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const r=U(()=>{const a=A(t);return i!=null&&i.value?wde(i.value,a):a});return o(OR,r),o(CD,U(()=>r.value.locale)),o(xD,U(()=>r.value.namespace)),o(HD,U(()=>r.value.zIndex)),o(QD,{size:U(()=>r.value.size||"")}),o(tR,U(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!wb.value)&&(wb.value=r.value),r},wde=(t,e)=>{const n=[...new Set([...gb(t),...gb(e)])],s={};for(const i of n)s[i]=e[i]!==void 0?e[i]:t[i];return s},kde=Ge({a11y:{type:Boolean,default:!0},locale:{type:ue(Object)},size:Ki,button:{type:ue(Object)},card:{type:ue(Object)},dialog:{type:ue(Object)},link:{type:ue(Object)},experimentalFeatures:{type:ue(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:ue(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:ue(Object)},...N1}),Cde={placement:"top"},xde=fe({name:"ElConfigProvider",props:kde,setup(t,{slots:e}){const n=DR(t);return Me(()=>t.message,s=>{var i;Object.assign(Cde,((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})}}),Sde=Ut(xde),RR=Symbol("buttonGroupContextKey"),$de=(t,e)=>{dl({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},U(()=>t.type==="text"));const n=Ye(RR,void 0),s=Kc("button"),{form:i}=yo(),o=Ti(U(()=>n==null?void 0:n.size)),r=_s(),a=J(),l=hi(),c=U(()=>{var k;return t.type||(n==null?void 0:n.type)||((k=s.value)==null?void 0:k.type)||""}),u=U(()=>{var k;return t.autoInsertSpace??((k=s.value)==null?void 0:k.autoInsertSpace)??!1}),d=U(()=>{var k;return t.plain??((k=s.value)==null?void 0:k.plain)??!1}),h=U(()=>{var k;return t.round??((k=s.value)==null?void 0:k.round)??!1}),f=U(()=>{var k;return t.text??((k=s.value)==null?void 0:k.text)??!1}),p=U(()=>{var k;return t.dashed??((k=s.value)==null?void 0:k.dashed)??!1}),m=U(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),b=U(()=>{var C;const k=(C=l.default)==null?void 0:C.call(l);if(u.value&&(k==null?void 0:k.length)===1){const x=k[0];if((x==null?void 0:x.type)===ba){const S=x.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:k=>{if(r.value||t.loading){k.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",k)}}};function ci(t,e){Ade(t)&&(t="100%");const n=Ede(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 Qv(t){return Math.min(1,Math.max(0,t))}function Ade(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Ede(t){return typeof t=="string"&&t.indexOf("%")!==-1}function VR(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function e0(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Ru(t){return t.length===1?"0"+t:String(t)}function Mde(t,e,n){return{r:ci(t,255)*255,g:ci(e,255)*255,b:ci(n,255)*255}}function J$(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 Iw(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 Tde(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=Iw(a,r,t+1/3),i=Iw(a,r,t),o=Iw(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 Pde(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 eA(t,e,n,s){const i=[Ru(Math.round(t).toString(16)),Ru(Math.round(e).toString(16)),Ru(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 Ide(t,e,n,s,i){const o=[Ru(Math.round(t).toString(16)),Ru(Math.round(e).toString(16)),Ru(Math.round(n).toString(16)),Ru(Ode(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 Lde(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 tA(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 Ode(t){return Math.round(parseFloat(t)*255).toString(16)}function nA(t){return So(t)/255}function So(t){return parseInt(t,16)}function Dde(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const dC={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 Rde(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=Nde(t)),typeof t=="object"&&(Co(t.r)&&Co(t.g)&&Co(t.b)?(e=Mde(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Co(t.h)&&Co(t.s)&&Co(t.v)?(s=e0(t.s),i=e0(t.v),e=Pde(t.h,s,i),r=!0,a="hsv"):Co(t.h)&&Co(t.s)&&Co(t.l)?(s=e0(t.s),o=e0(t.l),e=Tde(t.h,s,o),r=!0,a="hsl"):Co(t.c)&&Co(t.m)&&Co(t.y)&&Co(t.k)&&(e=Lde(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=VR(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 Vde="[-\\+]?\\d+%?",Fde="[-\\+]?\\d*\\.\\d+%?",wc="(?:"+Fde+")|(?:"+Vde+")",Lw="[\\s|\\(]+("+wc+")[,|\\s]+("+wc+")[,|\\s]+("+wc+")\\s*\\)?",t0="[\\s|\\(]+("+wc+")[,|\\s]+("+wc+")[,|\\s]+("+wc+")[,|\\s]+("+wc+")\\s*\\)?",Zo={CSS_UNIT:new RegExp(wc),rgb:new RegExp("rgb"+Lw),rgba:new RegExp("rgba"+t0),hsl:new RegExp("hsl"+Lw),hsla:new RegExp("hsla"+t0),hsv:new RegExp("hsv"+Lw),hsva:new RegExp("hsva"+t0),cmyk:new RegExp("cmyk"+t0),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 Nde(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(dC[t])t=dC[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Zo.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Zo.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Zo.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Zo.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Zo.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Zo.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Zo.cmyk.exec(t),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Zo.hex8.exec(t),n?{r:So(n[1]),g:So(n[2]),b:So(n[3]),a:nA(n[4]),format:e?"name":"hex8"}:(n=Zo.hex6.exec(t),n?{r:So(n[1]),g:So(n[2]),b:So(n[3]),format:e?"name":"hex"}:(n=Zo.hex4.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),a:nA(n[4]+n[4]),format:e?"name":"hex8"}:(n=Zo.hex3.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function Co(t){return typeof t=="number"?!Number.isNaN(t):Zo.CSS_UNIT.test(t)}class Qn{constructor(e="",n={}){if(e instanceof Qn)return e;typeof e=="number"&&(e=Dde(e)),this.originalInput=e;const s=Rde(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=VR(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=J$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=J$(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 eA(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Ide(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{...tA(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:s,k:i}=tA(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="#"+eA(this.r,this.g,this.b,!1);for(const[n,s]of Object.entries(dC))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=Qv(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=Qv(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=Qv(n.s),new Qn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=Qv(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 Bl(t,e=20){return t.mix("#141414",e).toString()}function Bde(t){const e=_s(),n=Be("button");return U(()=>{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():Bl(r,20);if(t.plain)s=n.cssVarBlock({"bg-color":t.dark?Bl(r,90):r.tint(90).toString(),"text-color":i,"border-color":t.dark?Bl(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?Bl(r,90):r.tint(90).toString(),s[n.cssVarBlockName("disabled-text-color")]=t.dark?Bl(r,50):r.tint(50).toString(),s[n.cssVarBlockName("disabled-border-color")]=t.dark?Bl(r,80):r.tint(80).toString());else{const l=t.dark?Bl(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?Bl(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 zde=fe({name:"ElButton",__name:"button",props:uC,emits:_de,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Bde(s),r=Be("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),k=U(()=>[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}),(C,x)=>(v(),D(Ct(t.tag),Kt({ref_key:"_ref",ref:a},A(d),{class:k.value,style:A(o),onClick:A(_)}),{default:w(()=>[t.loading?(v(),E(te,{key:0},[C.$slots.loading?le(C.$slots,"loading",{key:0}):(v(),D(A(_e),{key:1,class:q(A(r).is("loading"))},{default:w(()=>[(v(),D(Ct(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||C.$slots.icon?(v(),D(A(_e),{key:1},{default:w(()=>[t.icon?(v(),D(Ct(t.icon),{key:0})):le(C.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),C.$slots.default?(v(),E("span",{key:2,class:q({[A(r).em("text","expand")]:A(b)})},[le(C.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Hde=zde;const Ude={size:uC.size,type:uC.type,direction:{type:ue(String),values:["horizontal","vertical"],default:"horizontal"}};var jde=fe({name:"ElButtonGroup",__name:"button-group",props:Ude,setup(t){const e=t;Pt(RR,In({size:Sn(e,"size"),type:Sn(e,"type")}));const n=Be("button");return(s,i)=>(v(),E("div",{class:q([A(n).b("group"),A(n).bm("group",e.direction)])},[le(s.$slots,"default")],2))}}),FR=jde;const qe=Ut(Hde,{ButtonGroup:FR});Is(FR);const sA=["hours","minutes","seconds"],Aa="EP_PICKER_BASE",NR="ElPopperOptions",BR=Symbol("commonPickerContextKey"),Qg="HH:mm:ss",fc="YYYY-MM-DD",Wde={date:fc,dates:fc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${fc} ${Qg}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:fc,datetimerange:`${fc} ${Qg}`};var Cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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,k={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"],z=F%100;return"["+F+(B[(z-20)%10]||B[z]||B[0])+"]"}},C=function(F,B,z){var G=String(F);return!G||G.length>=B?F:""+Array(B+1-G.length).join(z)+F},x={s:C,z:function(F){var B=-F.utcOffset(),z=Math.abs(B),G=Math.floor(z/60),K=z%60;return(B<=0?"+":"-")+C(G,2,"0")+":"+C(K,2,"0")},m:function F(B,z){if(B.date()<z.date())return-F(z,B);var G=12*(z.year()-B.year())+(z.month()-B.month()),K=B.clone().add(G,d),X=z-K<0,H=B.clone().add(G+(X?-1:1),d);return+(-(G+(z-K)/(X?K-H:H-K))||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",M={};M[S]=k;var P="$isDayjsObject",T=function(F){return F instanceof R||!(!F||!F[P])},I=function F(B,z,G){var K;if(!B)return S;if(typeof B=="string"){var X=B.toLowerCase();M[X]&&(K=X),z&&(M[X]=z,K=X);var H=B.split("-");if(!K&&H.length>1)return F(H[0])}else{var Q=B.name;M[Q]=B,K=Q}return!G&&K&&(S=K),K||!G&&S},L=function(F,B){if(T(F))return F.clone();var z=typeof B=="object"?B:{};return z.date=F,z.args=arguments,new R(z)},V=x;V.l=I,V.i=T,V.w=function(F,B){return L(F,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var R=function(){function F(z){this.$L=I(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[P]=!0}var B=F.prototype;return B.parse=function(z){this.$d=function(G){var K=G.date,X=G.utc;if(K===null)return new Date(NaN);if(V.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var H=K.match(b);if(H){var Q=H[2]-1||0,ne=(H[7]||"0").substring(0,3);return X?new Date(Date.UTC(H[1],Q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ne)):new Date(H[1],Q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ne)}}return new Date(K)}(z),this.init()},B.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},B.$utils=function(){return V},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(z,G){var K=L(z);return this.startOf(G)<=K&&K<=this.endOf(G)},B.isAfter=function(z,G){return L(z)<this.startOf(G)},B.isBefore=function(z,G){return this.endOf(G)<L(z)},B.$g=function(z,G,K){return V.u(z)?this[G]:this.set(K,z)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(z,G){var K=this,X=!!V.u(G)||G,H=V.p(z),Q=function(ie,re){var ke=V.w(K.$u?Date.UTC(K.$y,re,ie):new Date(K.$y,re,ie),K);return X?ke:ke.endOf(c)},ne=function(ie,re){return V.w(K.toDate()[ie].apply(K.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(re)),K)},Z=this.$W,ae=this.$M,ge=this.$D,Ce="set"+(this.$u?"UTC":"");switch(H){case f:return X?Q(1,0):Q(31,11);case d:return X?Q(1,ae):Q(0,ae+1);case u:var oe=this.$locale().weekStart||0,pe=(Z<oe?Z+7:Z)-oe;return Q(X?ge-pe:ge+(6-pe),ae);case c:case p:return ne(Ce+"Hours",0);case l:return ne(Ce+"Minutes",1);case a:return ne(Ce+"Seconds",2);case r:return ne(Ce+"Milliseconds",3);default:return this.clone()}},B.endOf=function(z){return this.startOf(z,!1)},B.$set=function(z,G){var K,X=V.p(z),H="set"+(this.$u?"UTC":""),Q=(K={},K[c]=H+"Date",K[p]=H+"Date",K[d]=H+"Month",K[f]=H+"FullYear",K[l]=H+"Hours",K[a]=H+"Minutes",K[r]=H+"Seconds",K[o]=H+"Milliseconds",K)[X],ne=X===c?this.$D+(G-this.$W):G;if(X===d||X===f){var Z=this.clone().set(p,1);Z.$d[Q](ne),Z.init(),this.$d=Z.set(p,Math.min(this.$D,Z.daysInMonth())).$d}else Q&&this.$d[Q](ne);return this.init(),this},B.set=function(z,G){return this.clone().$set(z,G)},B.get=function(z){return this[V.p(z)]()},B.add=function(z,G){var K,X=this;z=Number(z);var H=V.p(G),Q=function(ae){var ge=L(X);return V.w(ge.date(ge.date()+Math.round(ae*z)),X)};if(H===d)return this.set(d,this.$M+z);if(H===f)return this.set(f,this.$y+z);if(H===c)return Q(1);if(H===u)return Q(7);var ne=(K={},K[a]=s,K[l]=i,K[r]=n,K)[H]||1,Z=this.$d.getTime()+z*ne;return V.w(Z,this)},B.subtract=function(z,G){return this.add(-1*z,G)},B.format=function(z){var G=this,K=this.$locale();if(!this.isValid())return K.invalidDate||m;var X=z||"YYYY-MM-DDTHH:mm:ssZ",H=V.z(this),Q=this.$H,ne=this.$m,Z=this.$M,ae=K.weekdays,ge=K.months,Ce=K.meridiem,oe=function(re,ke,Ue,ee){return re&&(re[ke]||re(G,X))||Ue[ke].slice(0,ee)},pe=function(re){return V.s(Q%12||12,re,"0")},ie=Ce||function(re,ke,Ue){var ee=re<12?"AM":"PM";return Ue?ee.toLowerCase():ee};return X.replace(_,function(re,ke){return ke||function(Ue){switch(Ue){case"YY":return String(G.$y).slice(-2);case"YYYY":return V.s(G.$y,4,"0");case"M":return Z+1;case"MM":return V.s(Z+1,2,"0");case"MMM":return oe(K.monthsShort,Z,ge,3);case"MMMM":return oe(ge,Z);case"D":return G.$D;case"DD":return V.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return oe(K.weekdaysMin,G.$W,ae,2);case"ddd":return oe(K.weekdaysShort,G.$W,ae,3);case"dddd":return ae[G.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return ie(Q,ne,!0);case"A":return ie(Q,ne,!1);case"m":return String(ne);case"mm":return V.s(ne,2,"0");case"s":return String(G.$s);case"ss":return V.s(G.$s,2,"0");case"SSS":return V.s(G.$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(z,G,K){var X,H=this,Q=V.p(G),ne=L(z),Z=(ne.utcOffset()-this.utcOffset())*s,ae=this-ne,ge=function(){return V.m(H,ne)};switch(Q){case f:X=ge()/12;break;case d:X=ge();break;case h:X=ge()/3;break;case u:X=(ae-Z)/6048e5;break;case c:X=(ae-Z)/864e5;break;case l:X=ae/i;break;case a:X=ae/s;break;case r:X=ae/n;break;default:X=ae}return K?X:V.a(X)},B.daysInMonth=function(){return this.endOf(d).$D},B.$locale=function(){return M[this.$L]},B.locale=function(z,G){if(!z)return this.$L;var K=this.clone(),X=I(z,G,!0);return X&&(K.$L=X),K},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 L.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])}}),L.extend=function(F,B){return F.$i||(F(B,R,L),F.$i=!0),L},L.locale=I,L.isDayjs=T,L.unix=function(F){return L(1e3*F)},L.en=M[S],L.Ls=M,L.p={},L})})(zR);var Yde=zR.exports;const dt=pi(Yde),Ow=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],HR=t=>Array.from(Array.from({length:t}).keys()),UR=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),jR=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),iA=function(t,e){const n=Uy(t),s=Uy(e);return n&&s?t.getTime()===e.getTime():!n&&!s?t===e:!1},WR=function(t,e){const n=Ee(t),s=Ee(e);return n&&s?t.length!==e.length?!1:t.every((i,o)=>iA(i,e[o])):!n&&!s?iA(t,e):!1},oA=function(t,e,n){const s=$4(e)||e==="x"?dt(t).locale(n):dt(t,e).locale(n);return s.isValid()?s:void 0},rA=function(t,e,n){return $4(e)?t:e==="x"?+t:dt(t).locale(n).format(e)},Dw=(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},D0=t=>Ee(t)?t.map(e=>e.toDate()):t.toDate(),a8=Ge({disabledHours:{type:ue(Function)},disabledMinutes:{type:ue(Function)},disabledSeconds:{type:ue(Function)}}),qde=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),YR=Ge({automaticDropdown:{type:Boolean,default:!0},id:{type:ue([Array,String])},name:{type:ue([Array,String])},popperClass:zn.popperClass,popperStyle:zn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:ue([String,Object]),default:Xc},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:ue([String,Object]),default:""},size:Ki,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:ue(Object),default:()=>({})},modelValue:{type:ue([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:ue([Date,Array])},defaultTime:{type:ue([Date,Array])},isRange:Boolean,...a8,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:ue([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:ue(String),values:dp,default:"bottom"},fallbackPlacements:{type:ue(Array),default:["bottom","top","right","left"]},...N1,...kr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),Gde=Ge({id:{type:ue(Array)},name:{type:ue(Array)},modelValue:{type:ue([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),qR=(t,e)=>{const{lang:n}=Qt(),s=J(!1),i=J(!1),o=J(null),r=U(()=>{const{modelValue:p}=t;return!p||Ee(p)&&!p.filter(Boolean).length}),a=p=>{if(!WR(t.modelValue,p)){let m;Ee(p)?m=p.map(b=>rA(b,t.valueFormat,n.value)):p&&(m=rA(p,t.valueFormat,n.value)),e(Mt,p&&m,n.value)}},l=U(()=>{let p;if(r.value?c.value.getDefaultValue&&(p=c.value.getDefaultValue()):Ee(t.modelValue)?p=t.modelValue.map(m=>oA(m,t.valueFormat,n.value)):p=oA(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);ji(m,p)||(p=m,r.value||a(D0(p)))}return Ee(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;Ee(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}}},Xde=["id","name","placeholder","value","disabled"],Kde=["id","name","placeholder","value","disabled"];var Zde=fe({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:Gde,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const s=t,i=n,{formItem:o}=yo(),{inputId:r}=Ml(In({id:U(()=>{var T;return(T=s.id)==null?void 0:T[0]})}),{formItemContext:o}),a=U_(),l=Be("date"),c=Be("range"),u=J(),d=J(),{wrapperRef:h,isFocused:f}=fp(u,{disabled:U(()=>s.disabled)}),p=T=>{i("click",T)},m=T=>{i("mouseenter",T)},b=T=>{i("mouseleave",T)},_=T=>{i("touchstart",T)},k=T=>{i("startInput",T)},C=T=>{i("endInput",T)},x=T=>{i("startChange",T)},S=T=>{i("endChange",T)};return e({focus:()=>{var T;(T=u.value)==null||T.focus()},blur:()=>{var T,I;(T=u.value)==null||T.blur(),(I=d.value)==null||I.blur()}}),(T,I)=>(v(),E("div",{ref_key:"wrapperRef",ref:h,class:q([A(l).is("active",A(f)),T.$attrs.class]),style:Xe(T.$attrs.style),onClick:p,onMouseenter:m,onMouseleave:b,onTouchstartPassive:_},[le(T.$slots,"prefix"),g("input",Kt(A(a),{id:A(r),ref_key:"inputRef",ref:u,name:T.name&&T.name[0],placeholder:T.startPlaceholder,value:T.modelValue&&T.modelValue[0],class:A(c).b("input"),disabled:T.disabled,onInput:k,onChange:x}),null,16,Xde),le(T.$slots,"range-separator"),g("input",Kt(A(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:A(c).b("input"),disabled:T.disabled,onInput:C,onChange:S}),null,16,Kde),le(T.$slots,"suffix")],38))}}),Jde=Zde,Qde=fe({name:"Picker",__name:"picker",props:YR,emits:[Mt,dn,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const s=t,i=n,o=Ld(),r=Be("date"),a=Be("input"),l=Be("range"),{formItem:c}=yo(),u=Ye(NR,{}),d=Y4(s,null),h=J(),f=J(),p=J(null);let m=!1;const b=_s(),_=qR(s,i),{parsedValue:k,pickerActualVisible:C,userInput:x,pickerVisible:S,pickerOptions:M,valueIsEmpty:P,emitInput:T,onPick:I,onSetPickerOption:L,onCalendarChange:V,onPanelChange:R}=_,{isFocused:N,handleFocus:F,handleBlur:B}=fp(f,{disabled:b,beforeFocus(){return s.readonly},afterFocus(){s.automaticDropdown&&(S.value=!0)},beforeBlur(ce){var De;return!m&&((De=h.value)==null?void 0:De.isFocusInsideContent(ce))},afterBlur(){var ce,De;re.value&&!s.saveOnBlur?P.value||(De=(ce=M.value).handleCancel)==null||De.call(ce):it(),S.value=!1,m=!1,s.validateEvent&&(c==null||c.validate("blur").catch(pt=>Tt(pt)))}}),z=J(!1),G=U(()=>[r.b("editor"),r.bm("editor",s.type),a.e("wrapper"),r.is("disabled",b.value),r.is("active",S.value),l.b("editor"),Ae?l.bm("editor",Ae.value):"",o.class]),K=U(()=>[a.e("icon"),l.e("close-icon"),me.value?"":l.em("close-icon","hidden")]);Me(S,ce=>{ce?ot(()=>{ce&&(p.value=s.modelValue)}):(x.value=null,ot(()=>{X(s.modelValue)}))});const X=(ce,De)=>{(De||!WR(ce,p.value))&&(i(dn,ce),De&&(p.value=ce),s.validateEvent&&(c==null||c.validate("change").catch(pt=>Tt(pt))))},H=ce=>{i("keydown",ce)},Q=U(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ne=(ce,De,pt)=>{const _n=Q.value;_n.length&&(!pt||pt==="min"?(_n[0].setSelectionRange(ce,De),_n[0].focus()):pt==="max"&&(_n[1].setSelectionRange(ce,De),_n[1].focus()))},Z=()=>{C.value=!0},ae=()=>{i("visible-change",!0)},ge=()=>{C.value=!1,S.value=!1,i("visible-change",!1)},Ce=()=>{S.value=!0},oe=()=>{S.value=!1},pe=U(()=>{const ce=ve(k.value);return Ee(x.value)?[x.value[0]||ce&&ce[0]||"",x.value[1]||ce&&ce[1]||""]:x.value!==null?x.value:re.value&&P.value&&!s.saveOnBlur||!re.value&&P.value||!S.value&&P.value?"":ce?ke.value||Ue.value||ee.value?ce.join(", "):ce:""}),ie=U(()=>s.type.includes("time")),re=U(()=>s.type.startsWith("time")),ke=U(()=>s.type==="dates"),Ue=U(()=>s.type==="months"),ee=U(()=>s.type==="years"),se=U(()=>s.prefixIcon||(ie.value?oR:uae)),me=U(()=>s.clearable&&!b.value&&!s.readonly&&!P.value&&(z.value||N.value)),$e=ce=>{s.readonly||b.value||(me.value&&(ce==null||ce.stopPropagation(),M.value.handleClear?M.value.handleClear():T(d.valueOnClear.value),X(d.valueOnClear.value,!0),ge()),i("clear"))},Se=async ce=>{var De;s.readonly||b.value||(((De=ce.target)==null?void 0:De.tagName)!=="INPUT"||N.value||!s.automaticDropdown)&&(S.value=!0)},Ie=()=>{s.readonly||b.value||!P.value&&s.clearable&&(z.value=!0)},je=()=>{z.value=!1},Fe=ce=>{var De;s.readonly||b.value||(((De=ce.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||N.value||!s.automaticDropdown)&&(S.value=!0)},ze=U(()=>s.type.includes("range")),Ae=Ti(),Ze=U(()=>{var ce,De;return(De=(ce=A(h))==null?void 0:ce.popperRef)==null?void 0:De.contentRef}),We=gD(f,ce=>{const De=A(Ze),pt=js(f);De&&(ce.target===De||ce.composedPath().includes(De))||ce.target===pt||pt&&ce.composedPath().includes(pt)||(S.value=!1)});wn(()=>{We==null||We()});const it=()=>{if(!(re.value&&!s.saveOnBlur)){if(x.value){const ce=be(pe.value);ce&&(Te(ce)&&T(D0(ce)),x.value=null)}x.value===""&&(T(d.valueOnClear.value),X(d.valueOnClear.value,!0),x.value=null)}},be=ce=>ce?M.value.parseUserInput(ce):null,ve=ce=>ce?Ee(ce)?ce.map(De=>De.format(s.format)):ce.format(s.format):null,Te=ce=>M.value.isValidValue(ce),Pe=async ce=>{if(s.readonly||b.value)return;const De=ls(ce);if(H(ce),De===He.esc){S.value===!0&&(S.value=!1,ce.preventDefault(),ce.stopPropagation());return}if(De===He.down&&(M.value.handleFocusPicker&&(ce.preventDefault(),ce.stopPropagation()),S.value===!1&&(S.value=!0,await ot()),M.value.handleFocusPicker)){M.value.handleFocusPicker();return}if(De===He.tab){m=!0;return}if(De===He.enter||De===He.numpadEnter){S.value?(x.value===null||x.value===""||Te(be(pe.value)))&&(it(),S.value=!1):S.value=!0,ce.preventDefault(),ce.stopPropagation();return}if(x.value){ce.stopPropagation();return}M.value.handleKeydownInput&&M.value.handleKeydownInput(ce)},gt=ce=>{x.value=ce,S.value||(S.value=!0)},Lt=ce=>{const De=ce.target;x.value?x.value=[De.value,x.value[1]]:x.value=[De.value,null]},Je=ce=>{const De=ce.target;x.value?x.value=[x.value[0],De.value]:x.value=[null,De.value]},ut=()=>{var _n;const ce=x.value,De=be(ce&&ce[0]),pt=A(k);if(De&&De.isValid()){x.value=[ve(De),((_n=pe.value)==null?void 0:_n[1])||null];const gs=[De,pt&&(pt[1]||null)];Te(gs)&&(T(D0(gs)),x.value=null)}},ft=()=>{var _n;const ce=A(x),De=be(ce&&ce[1]),pt=A(k);if(De&&De.isValid()){x.value=[((_n=A(pe))==null?void 0:_n[0])||null,ve(De)];const gs=[pt&&pt[0],De];Te(gs)&&(T(D0(gs)),x.value=null)}},ye=()=>{var ce;(ce=f.value)==null||ce.focus()},Le=()=>{var ce;(ce=f.value)==null||ce.blur()};return Pt(Aa,{props:s,emptyValues:d}),Pt(BR,_),e({focus:ye,blur:Le,handleOpen:Ce,handleClose:oe,onPick:I}),(ce,De)=>(v(),D(A(Ls),Kt({ref_key:"refPopper",ref:h,visible:A(S),effect:"light",pure:"",trigger:"click"},ce.$attrs,{role:"dialog",teleported:"",transition:`${A(r).namespace.value}-zoom-in-top`,"popper-class":[`${A(r).namespace.value}-picker__popper`,ce.popperClass],"popper-style":ce.popperStyle,"popper-options":A(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:ge}),{default:w(()=>[ze.value?(v(),D(Jde,{key:1,id:ce.id,ref_key:"inputRef",ref:f,"model-value":pe.value,name:ce.name,disabled:A(b),readonly:!ce.editable||ce.readonly,"start-placeholder":ce.startPlaceholder,"end-placeholder":ce.endPlaceholder,class:q(G.value),style:Xe(ce.$attrs.style),"aria-label":ce.ariaLabel,tabindex:ce.tabindex,autocomplete:"off",role:"combobox",onClick:Se,onFocus:A(F),onBlur:A(B),onStartInput:Lt,onStartChange:ut,onEndInput:Je,onEndChange:ft,onMousedown:Se,onMouseenter:Ie,onMouseleave:je,onTouchstartPassive:Fe,onKeydown:Pe},{prefix:w(()=>[se.value?(v(),D(A(_e),{key:0,class:q([A(a).e("icon"),A(l).e("icon")])},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),"range-separator":w(()=>[le(ce.$slots,"range-separator",{},()=>[g("span",{class:q(A(l).b("separator"))},$(ce.rangeSeparator),3)])]),suffix:w(()=>[ce.clearIcon?(v(),D(A(_e),{key:0,class:q(K.value),onMousedown:Oe(A(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(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(A(vt),{key:0,id:ce.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":pe.value,name:ce.name,size:A(Ae),disabled:A(b),placeholder:ce.placeholder,class:q([A(r).b("editor"),A(r).bm("editor",ce.type),A(r).is("focus",A(S)),ce.$attrs.class]),style:Xe(ce.$attrs.style),readonly:!ce.editable||ce.readonly||ke.value||Ue.value||ee.value||ce.type==="week","aria-label":ce.ariaLabel,tabindex:ce.tabindex,"validate-event":!1,onInput:gt,onFocus:A(F),onBlur:A(B),onKeydown:Pe,onChange:it,onMousedown:Se,onMouseenter:Ie,onMouseleave:je,onTouchstartPassive:Fe,onClick:De[0]||(De[0]=Oe(()=>{},["stop"]))},{prefix:w(()=>[se.value?(v(),D(A(_e),{key:0,class:q(A(a).e("icon")),onMousedown:Oe(Se,["prevent"]),onTouchstartPassive:Fe},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:w(()=>[me.value&&ce.clearIcon?(v(),D(A(_e),{key:0,class:q(`${A(a).e("icon")} clear-icon`),onMousedown:Oe(A(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(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:A(S),actualVisible:A(C),parsedValue:A(k),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:De[1]||(De[1]=(...pt)=>A(I)&&A(I)(...pt)),onSelectRange:ne,onSetPickerOption:De[2]||(De[2]=(...pt)=>A(L)&&A(L)(...pt)),onCalendarChange:De[3]||(De[3]=(...pt)=>A(V)&&A(V)(...pt)),onClear:$e,onPanelChange:De[4]||(De[4]=(...pt)=>A(R)&&A(R)(...pt)),onMousedown:De[5]||(De[5]=Oe(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),ehe=Qde;const Wl=new Map;if(Gt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Wl.values())for(const{documentHandler:s}of n)s(e,t);t=void 0}})}function aA(t,e){let n=[];return Ee(e.arg)?n=e.arg:Po(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 e1={beforeMount(t,e){Wl.has(t)||Wl.set(t,[]),Wl.get(t).push({documentHandler:aA(t,e),bindingFn:e.value})},updated(t,e){Wl.has(t)||Wl.set(t,[]);const n=Wl.get(t),s=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:aA(t,e),bindingFn:e.value};s>=0?n.splice(s,1,i):n.push(i)},unmounted(t){Wl.delete(t)}},the=100,nhe=600,n0="_RepeatClick",kb={beforeMount(t,e){const n=e.value,{interval:s=the,delay:i=nhe}=et(n)?{}:n;let o,r;const a=()=>et(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[n0]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[n0])return;const{start:e,clear:n}=t[n0];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[n0]=null}},hC="_trap-focus-children",Vu=[],lA=t=>{if(Vu.length===0)return;const e=ls(t),n=Vu[Vu.length-1][hC];if(n.length>0&&e===He.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())}},she={beforeMount(t){t[hC]=f$(t),Vu.push(t),Vu.length<=1&&document.addEventListener("keydown",lA)},updated(t){ot(()=>{t[hC]=f$(t)})},unmounted(){Vu.shift(),Vu.length===0&&document.removeEventListener("keydown",lA)}};var cA=!1,Tu,fC,pC,R0,V0,GR,F0,mC,gC,vC,XR,yC,bC,KR,ZR;function eo(){if(!cA){cA=!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(yC=/\b(iPhone|iP[ao]d)/.exec(t),bC=/\b(iP[ao]d)/.exec(t),vC=/Android/i.exec(t),KR=/FBAN\/\w+;/i.exec(t),ZR=/Mobile/i.exec(t),XR=!!/Win64/.exec(t),e){Tu=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Tu&&document&&document.documentMode&&(Tu=document.documentMode);var s=/(?:Trident\/(\d+.\d+))/.exec(t);GR=s?parseFloat(s[1])+4:Tu,fC=e[2]?parseFloat(e[2]):NaN,pC=e[3]?parseFloat(e[3]):NaN,R0=e[4]?parseFloat(e[4]):NaN,R0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),V0=e&&e[1]?parseFloat(e[1]):NaN):V0=NaN}else Tu=fC=pC=V0=R0=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);F0=i?parseFloat(i[1].replace("_",".")):!0}else F0=!1;mC=!!n[2],gC=!!n[3]}else F0=mC=gC=!1}}var _C={ie:function(){return eo()||Tu},ieCompatibilityMode:function(){return eo()||GR>Tu},ie64:function(){return _C.ie()&&XR},firefox:function(){return eo()||fC},opera:function(){return eo()||pC},webkit:function(){return eo()||R0},safari:function(){return _C.webkit()},chrome:function(){return eo()||V0},windows:function(){return eo()||mC},osx:function(){return eo()||F0},linux:function(){return eo()||gC},iphone:function(){return eo()||yC},mobile:function(){return eo()||yC||bC||vC||ZR},nativeApp:function(){return eo()||KR},android:function(){return eo()||vC},ipad:function(){return eo()||bC}},ihe=_C,s0=!!(typeof window<"u"&&window.document&&window.document.createElement),ohe={canUseDOM:s0,canUseWorkers:typeof Worker<"u",canUseEventListeners:s0&&!!(window.addEventListener||window.attachEvent),canUseViewport:s0&&!!window.screen,isInWorker:!s0},JR=ohe,QR;JR.canUseDOM&&(QR=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function rhe(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&&QR&&t==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var ahe=rhe,uA=10,dA=40,hA=800;function eV(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*uA,i=n*uA,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||i)&&t.deltaMode&&(t.deltaMode==1?(s*=dA,i*=dA):(s*=hA,i*=hA)),s&&!e&&(e=s<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:s,pixelY:i}}eV.getEventType=function(){return ihe.firefox()?"DOMMouseScroll":ahe("wheel")?"wheel":"mousewheel"};var lhe=eV;/** |
| 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 N0="_Mousewheel",fA=function(t,e){if(t&&t.addEventListener){tV(t);const n=function(s){const i=lhe(s);e&&Reflect.apply(e,this,[s,i])};t[N0]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},tV=t=>{var e;(e=t[N0])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[N0].wheelHandler),t[N0]=null)},che={beforeMount(t,e){fA(t,e.value)},unmounted(t){tV(t)},updated(t,e){e.value!==e.oldValue&&fA(t,e.value)}},uhe=Ge({...qde,datetimeRole:String,parsedValue:{type:ue(Object)}}),dhe=({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}}},Rw=t=>{const e=(s,i)=>s||i,n=s=>s!==!0;return t.map(e).filter(n)},nV=(t,e,n)=>({getHoursList:(r,a)=>Dw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>Dw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>Dw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),hhe=(t,e,n)=>{const{getHoursList:s,getMinutesList:i,getSecondsList:o}=nV(t,e,n);return{getAvailableHours:(c,u)=>Rw(s(c,u)),getAvailableMinutes:(c,u,d)=>Rw(i(c,u,d)),getAvailableSeconds:(c,u,d,h)=>Rw(o(c,u,d,h))}},fhe=(t,e)=>{const n=J(t.parsedValue);return Me(()=>t.visible,s=>{const i=fk(e.modelValue),o=fk(e.valueOnClear);if(s&&i===o){n.value=o;return}s||(n.value=t.parsedValue)}),n},phe=Ge({role:{type:String,required:!0},spinnerDate:{type:ue(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:ue(String),default:""},...a8}),mhe=["onClick"],ghe=["onMouseenter"];var vhe=fe({__name:"basic-time-spinner",props:phe,emits:[dn,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:s,format:i,saveOnBlur:o}=Ye(Aa).props,r=e,a=Be("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=nV(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=U(()=>n.showSeconds?sA:sA.slice(0,2)),b=U(()=>{const{spinnerDate:Q}=n;return{hours:Q.hour(),minutes:Q.minute(),seconds:Q.second()}}),_=U(()=>{const{hours:Q,minutes:ne}=A(b),{role:Z,spinnerDate:ae}=n,ge=s?void 0:ae;return{hours:l(Z,ge),minutes:c(Q,Z,ge),seconds:u(Q,ne,Z,ge)}}),k=U(()=>{const{hours:Q,minutes:ne,seconds:Z}=A(b);return{hours:Ow(Q,23),minutes:Ow(ne,59),seconds:Ow(Z,59)}}),C=gd(Q=>{d=!1,M(Q)},200),x=Q=>{if(!n.amPmMode)return"";const ne=n.amPmMode==="A";let Z=Q<12?" am":" pm";return ne&&(Z=Z.toUpperCase()),Z},S=Q=>{let ne=[0,0];const Z=i||Qg,ae=Z.indexOf("HH"),ge=Z.indexOf("mm"),Ce=Z.indexOf("ss");switch(Q){case"hours":ae!==-1&&(ne=[ae,ae+2]);break;case"minutes":ge!==-1&&(ne=[ge,ge+2]);break;case"seconds":Ce!==-1&&(ne=[Ce,Ce+2]);break}const[oe,pe]=ne;r("select-range",oe,pe),f.value=Q},M=Q=>{I(Q,A(b)[Q])},P=()=>{M("hours"),M("minutes"),M("seconds")},T=Q=>Q.querySelector(`.${a.namespace.value}-scrollbar__wrap`),I=(Q,ne)=>{if(n.arrowControl)return;const Z=A(p[Q]);Z&&Z.$el&&(o||(h[Q]=!0,qg(()=>{h[Q]=!1})),T(Z.$el).scrollTop=Math.max(0,ne*L(Q)))},L=Q=>{var Z;const ne=(Z=A(p[Q]))==null?void 0:Z.$el.querySelector("li");return ne&&Number.parseFloat(nl(ne,"height"))||0},V=()=>{N(1)},R=()=>{N(-1)},N=Q=>{f.value||S("hours");const ne=f.value,Z=A(b)[ne],ae=F(ne,Z,Q,f.value==="hours"?24:60);B(ne,ae),I(ne,ae),ot(()=>S(ne))},F=(Q,ne,Z,ae)=>{let ge=(ne+Z+ae)%ae;const Ce=A(_)[Q];for(;Ce[ge]&&ge!==ne;)ge=(ge+Z+ae)%ae;return ge},B=(Q,ne)=>{if(A(_)[Q][ne])return;const{hours:Z,minutes:ae,seconds:ge}=A(b);let Ce;switch(Q){case"hours":Ce=n.spinnerDate.hour(ne).minute(ae).second(ge);break;case"minutes":Ce=n.spinnerDate.hour(Z).minute(ne).second(ge);break;case"seconds":Ce=n.spinnerDate.hour(Z).minute(ae).second(ne);break}r(dn,Ce)},z=(Q,{value:ne,disabled:Z})=>{Z||(B(Q,ne),S(Q),I(Q,ne))},G=Q=>{if(!o&&h[Q])return;const ne=A(p[Q]);ne&&(d=!0,C(Q),B(Q,Math.min(Math.round((T(ne.$el).scrollTop-(K(Q)*.5-10)/L(Q)+3)/L(Q)),Q==="hours"?23:59)))},K=Q=>A(p[Q]).$el.offsetHeight,X=()=>{const Q=ne=>{const Z=A(p[ne]);Z&&Z.$el&&(T(Z.$el).onscroll=()=>{G(ne)})};Q("hours"),Q("minutes"),Q("seconds")};Ft(()=>{ot(()=>{!n.arrowControl&&X(),P(),n.role==="start"&&S("hours")})});const H=(Q,ne)=>{p[ne].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,N]),r("set-option",[`${n.role}_emitSelectRange`,S]),Me(()=>n.spinnerDate,()=>{d||P()}),(Q,ne)=>(v(),E("div",{class:q([A(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),E(te,{key:0},we(m.value,Z=>(v(),D(A(Pi),{key:Z,ref_for:!0,ref:ae=>H(ae,Z),class:q(A(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":A(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ae=>S(Z),onMousemove:ae=>M(Z)},{default:w(()=>[(v(!0),E(te,null,we(_.value[Z],(ae,ge)=>(v(),E("li",{key:ge,class:q([A(a).be("spinner","item"),A(a).is("active",ge===b.value[Z]),A(a).is("disabled",ae)]),onClick:Ce=>z(Z,{value:ge,disabled:ae})},[Z==="hours"?(v(),E(te,{key:0},[W($(("0"+(Q.amPmMode?ge%12||12:ge)).slice(-2))+$(x(ge)),1)],64)):(v(),E(te,{key:1},[W($(("0"+ge).slice(-2)),1)],64))],10,mhe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),E(te,{key:1},we(m.value,Z=>(v(),E("div",{key:Z,class:q([A(a).be("spinner","wrapper"),A(a).is("arrow")]),onMouseenter:ae=>S(Z)},[Re((v(),D(A(_e),{class:q(["arrow-up",A(a).be("spinner","arrow")])},{default:w(()=>[y(A(Z_))]),_:1},8,["class"])),[[A(kb),R]]),Re((v(),D(A(_e),{class:q(["arrow-down",A(a).be("spinner","arrow")])},{default:w(()=>[y(A(Fd))]),_:1},8,["class"])),[[A(kb),V]]),g("ul",{class:q(A(a).be("spinner","list"))},[(v(!0),E(te,null,we(k.value[Z],(ae,ge)=>(v(),E("li",{key:ge,class:q([A(a).be("spinner","item"),A(a).is("active",ae===b.value[Z]),A(a).is("disabled",_.value[Z][ae])])},[A(_t)(ae)?(v(),E(te,{key:0},[Z==="hours"?(v(),E(te,{key:0},[W($(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+$(x(ae)),1)],64)):(v(),E(te,{key:1},[W($(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,ghe))),128)):O("v-if",!0)],2))}}),yhe=vhe,bhe=fe({__name:"panel-time-pick",props:uhe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,s=e,i=Ye(Aa),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=i.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=hhe(r,a,l),f=Be("time"),{t:p,lang:m}=Qt(),b=J([0,2]),_=fhe(n,{modelValue:U(()=>i.props.modelValue),valueOnClear:U(()=>i!=null&&i.emptyValues?i.emptyValues.valueOnClear.value:null)}),k=U(()=>en(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),C=U(()=>n.format.includes("ss")),x=U(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=K=>{const X=dt(K).locale(m.value),H=B(X);return X.isSame(H)},M=()=>{const K=_.value;s("pick",K,!1),ot(()=>{_.value=K})},P=(K=!1,X=!1)=>{X||s("pick",n.parsedValue,K)},T=K=>{n.visible&&s("pick",B(K).millisecond(0),!0)},I=(K,X)=>{s("select-range",K,X),b.value=[K,X]},L=K=>{const X=n.format,H=X.indexOf("HH"),Q=X.indexOf("mm"),ne=X.indexOf("ss"),Z=[],ae=[];H!==-1&&(Z.push(H),ae.push("hours")),Q!==-1&&(Z.push(Q),ae.push("minutes")),ne!==-1&&C.value&&(Z.push(ne),ae.push("seconds"));const ge=(Z.indexOf(b.value[0])+K+Z.length)%Z.length;R.start_emitSelectRange(ae[ge])},V=K=>{const X=ls(K),{left:H,right:Q,up:ne,down:Z}=He;if([H,Q].includes(X)){L(X===H?-1:1),K.preventDefault();return}if([ne,Z].includes(X)){const ae=X===ne?-1:1;R.start_scrollDown(ae),K.preventDefault();return}},{timePickerOptions:R,onSetOption:N,getAvailableTime:F}=dhe({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),B=K=>F(K,n.datetimeRole||"",!0),z=K=>K?dt(K,n.format).locale(m.value):null,G=()=>dt(c).locale(m.value);return s("set-picker-option",["isValidValue",S]),s("set-picker-option",["parseUserInput",z]),s("set-picker-option",["handleKeydownInput",V]),s("set-picker-option",["getRangeAvailableTime",B]),s("set-picker-option",["getDefaultValue",G]),s("set-picker-option",["handleCancel",M]),(K,X)=>(v(),D(Ho,{name:k.value},{default:w(()=>[K.actualVisible||K.visible?(v(),E("div",{key:0,class:q(A(f).b("panel"))},[g("div",{class:q([A(f).be("panel","content"),{"has-seconds":C.value}])},[y(yhe,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":A(o),"show-seconds":C.value,"am-pm-mode":x.value,"spinner-date":K.parsedValue,"disabled-hours":A(r),"disabled-minutes":A(a),"disabled-seconds":A(l),onChange:T,onSetOption:A(N),onSelectRange:I},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),g("div",{class:q(A(f).be("panel","footer"))},[g("button",{type:"button",class:q([A(f).be("panel","btn"),"cancel"]),onClick:M},$(A(p)("el.datepicker.cancel")),3),g("button",{type:"button",class:q([A(f).be("panel","btn"),"confirm"]),onClick:X[0]||(X[0]=H=>P())},$(A(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),wC=bhe,sV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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 k=_.match(/([+-]|\d\d)/g),C=60*k[1]+(+k[2]||0);return C===0?0:k[0]==="+"?-C:C}(b)}],h=function(b){var _=l[b];return _&&(_.indexOf?_:_.s.concat(_.f))},f=function(b,_){var k,C=l.meridiem;if(C){for(var x=1;x<=24;x+=1)if(b.indexOf(C(x,0,_))>-1){k=x>12;break}}else k=b===(_?"pm":"PM");return k},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,k=b.match(/\d+/);if(this.day=k[0],_)for(var C=1;C<=31;C+=1)_(C).replace(/\[|\]/g,"")===b&&(this.day=C)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(b){var _=h("months"),k=(h("monthsShort")||_.map(function(C){return C.slice(0,3)})).indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],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 _,k;_=b,k=l&&l.formats;for(var C=(b=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,V,R){var N=R&&R.toUpperCase();return V||k[R]||n[R]||k[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,B,z){return B||z.slice(1)})})).match(s),x=C.length,S=0;S<x;S+=1){var M=C[S],P=p[M],T=P&&P[0],I=P&&P[1];C[S]=I?{regex:T,parser:I}:M.replace(/^\[|\]$/g,"")}return function(L){for(var V={},R=0,N=0;R<x;R+=1){var F=C[R];if(typeof F=="string")N+=F.length;else{var B=F.regex,z=F.parser,G=L.slice(N),K=B.exec(G)[0];z.call(V,K),L=L.replace(K,"")}}return function(X){var H=X.afternoon;if(H!==void 0){var Q=X.hours;H?Q<12&&(X.hours+=12):Q===12&&(X.hours=0),delete X.afternoon}}(V),V}}return function(b,_,k){k.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var C=_.prototype,x=C.parse;C.parse=function(S){var M=S.date,P=S.utc,T=S.args;this.$u=P;var I=T[1];if(typeof I=="string"){var L=T[2]===!0,V=T[3]===!0,R=L||V,N=T[2];V&&(N=T[2]),l=this.$locale(),!L&&N&&(l=k.Ls[N]),this.$d=function(G,K,X,H){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*G);var Q=m(K)(G),ne=Q.year,Z=Q.month,ae=Q.day,ge=Q.hours,Ce=Q.minutes,oe=Q.seconds,pe=Q.milliseconds,ie=Q.zone,re=Q.week,ke=new Date,Ue=ae||(ne||Z?1:ke.getDate()),ee=ne||ke.getFullYear(),se=0;ne&&!Z||(se=Z>0?Z-1:ke.getMonth());var me,$e=ge||0,Se=Ce||0,Ie=oe||0,je=pe||0;return ie?new Date(Date.UTC(ee,se,Ue,$e,Se,Ie,je+60*ie.offset*1e3)):X?new Date(Date.UTC(ee,se,Ue,$e,Se,Ie,je)):(me=new Date(ee,se,Ue,$e,Se,Ie,je),re&&(me=H(me).week(re).toDate()),me)}catch{return new Date("")}}(M,I,P,k),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),R&&M!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var F=I.length,B=1;B<=F;B+=1){T[1]=I[B-1];var z=k.apply(this,T);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}B===F&&(this.$d=new Date(""))}else x.call(this,S)}}})})(sV);var _he=sV.exports;const iV=pi(_he),t1=Ge({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:xl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),whe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},khe=["aria-label"],Che=["aria-label"];var xhe=fe({name:"ElTag",__name:"tag",props:t1,emits:whe,setup(t,{emit:e}){const n=t,s=e,i=Ti(),{t:o}=Qt(),r=Be("tag"),a=U(()=>{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(),E("span",{key:0,class:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(A(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),E("button",{key:0,"aria-label":A(o)("el.tag.close"),class:q(A(r).e("close")),type:"button",onClick:Oe(l,["stop"])},[y(A(_e),null,{default:w(()=>[y(A(Bo))]),_:1})],10,khe)):O("v-if",!0)],6)):(v(),D(Ho,{key:1,name:`${A(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:w(()=>[g("span",{class:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(A(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),E("button",{key:0,"aria-label":A(o)("el.tag.close"),class:q(A(r).e("close")),type:"button",onClick:Oe(l,["stop"])},[y(A(_e),null,{default:w(()=>[y(A(Bo))]),_:1})],10,Che)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),She=xhe;const Ai=Ut(She),oV=Symbol("ElSelectGroup"),t2=Symbol("ElSelect"),kC={label:"label",value:"value",disabled:"disabled",options:"options"};function $he(t){const e=J({...kC,...t.props});let n={...t.props};return Me(()=>t.props,a=>{ji(a,n)||(e.value={...kC,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>Ui(a,e.value.label),getValue:a=>Ui(a,e.value.value),getDisabled:a=>Ui(a,e.value.disabled),getOptions:a=>Ui(a,e.value.options)}}const Ahe=Ge({name:String,id:String,modelValue:{type:ue([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Ki,effect:{type:ue(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:ue([String,Object])},popperOptions:{type:ue(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:ue(Function)},filterMethod:{type:ue(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:ue(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:zn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ds,default:Xc},fitInputWidth:Boolean,suffixIcon:{type:ds,default:Fd},tagType:{...t1.type,default:"info"},tagEffect:{...t1.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:ue(String),values:dp,default:"bottom-start"},fallbackPlacements:{type:ue(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:zn.appendTo,options:{type:ue(Array)},props:{type:ue(Object),default:()=>kC},...N1,...kr(["ariaLabel"])});Mt+"",dn+"",ER.scroll;const CC="ElOption",Ehe=Ge({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function Mhe(t,e){const n=Ye(t2);n||vo(CC,"usage: <el-select><el-option /></el-select/>");const s=Ye(oV,{disabled:!1}),i=U(()=>u(Us(n.props.modelValue),t.value)),o=U(()=>{if(n.props.multiple){const f=Us(n.props.modelValue??[]);return!i.value&&f.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=U(()=>t.label??(yt(t.value)?"":t.value)),a=U(()=>t.value||t.label||""),l=U(()=>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=>rn(Ui(b,m))===Ui(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(Lie(f),"i").test(String(r.value))||t.created};return Me(()=>r.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Me(()=>t.value,(f,p)=>{const{remote:m,valueKey:b}=n.props;if((m?f!==p:!ji(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()}}),Me(()=>s.disabled,()=>{e.groupDisabled=s.disabled},{immediate:!0}),{select:n,currentLabel:r,currentValue:a,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:h}}var The=fe({name:CC,componentName:CC,props:Ehe,setup(t){const e=Be("select"),n=_r(),s=U(()=>[e.be("dropdown","item"),e.is("disabled",A(a)),e.is("selected",A(r)),e.is("hovering",A(h))]),i=In({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u}=Mhe(t,i),{visible:d,hover:h}=go(i),f=ht().proxy;l.onOptionCreate(f),wn(()=>{const m=f.value;ot(()=>{const{selected:b}=l.states,_=b.some(k=>k.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 Phe=["id","aria-disabled","aria-selected"];function Ihe(t,e,n,s,i,o){return Re((v(),E("li",{id:t.id,class:q(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]=Oe((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,$(t.currentLabel),1)])],42,Phe)),[[Ht,t.visible]])}var l8=fi(The,[["render",Ihe]]),Lhe=fe({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),n=J(),s=ht(),i=J([]);Pt(oV,In({...go(t)}));const o=U(()=>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=Us(c),d=[];return u.forEach(h=>{var f;is(h)&&(r(h)?d.push(h.component.proxy):Ee(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 Ft(()=>{l()}),Cie(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function Ohe(t,e,n,s,i,o){return Re((v(),E("ul",{ref:"groupRef",class:q(t.ns.be("group","wrap"))},[g("li",{class:q(t.ns.be("group","title"))},$(t.label),3),g("li",null,[g("ul",{class:q(t.ns.b("group"))},[le(t.$slots,"default")],2)])],2)),[[Ht,t.visible]])}var c8=fi(Lhe,[["render",Ohe]]),Dhe=fe({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=Ye(t2),e=Be("select"),n=U(()=>t.props.popperClass),s=U(()=>t.props.multiple),i=U(()=>t.props.fitInputWidth),o=J("");function r(){var l;const a=(l=t.selectRef)==null?void 0:l.offsetWidth;a?o.value=`${a-QZ}px`:o.value=""}return Ft(()=>{r(),Es(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:s,isFitInputWidth:i}}});function Rhe(t,e,n,s,i,o){return v(),E("div",{class:q([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:Xe({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(v(),E("div",{key:0,class:q(t.ns.be("dropdown","header"))},[le(t.$slots,"header")],2)):O("v-if",!0),le(t.$slots,"default"),t.$slots.footer?(v(),E("div",{key:1,class:q(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Vhe=fi(Dhe,[["render",Rhe]]);const Fhe=(t,e)=>{const{t:n}=Qt(),s=hi(),i=_r(),o=Be("select"),r=Be("input"),a=In({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(),k=J(),C=J(!1),x=J(),S=J(!1),{form:M,formItem:P}=yo(),{inputId:T}=Ml(t,{formItemContext:P}),{valueOnClear:I,isEmptyValue:L}=Y4(t),{isComposing:V,handleCompositionStart:R,handleCompositionUpdate:N,handleCompositionEnd:F}=W4({afterComposition:xe=>gt(xe)}),B=_s(),{wrapperRef:z,isFocused:G,handleBlur:K}=fp(h,{disabled:B,afterFocus(){t.automaticDropdown&&!C.value&&(C.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(xe){var Qe,$t;return((Qe=u.value)==null?void 0:Qe.isFocusInsideContent(xe))||(($t=d.value)==null?void 0:$t.isFocusInsideContent(xe))},afterBlur(){var xe;C.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((xe=P==null?void 0:P.validate)==null||xe.call(P,"blur").catch(Qe=>Tt(Qe)))}}),X=U(()=>Ee(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),H=U(()=>(M==null?void 0:M.statusIcon)??!1),Q=U(()=>t.clearable&&!B.value&&X.value&&(G.value||a.inputHovering)),ne=U(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),Z=U(()=>o.is("reverse",!!(ne.value&&C.value))),ae=U(()=>(P==null?void 0:P.validateState)||""),ge=U(()=>ae.value&&Q4[ae.value]),Ce=U(()=>t.remote?t.debounce:0),oe=U(()=>t.remote&&!a.inputValue&&a.options.size===0),pe=U(()=>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=U(()=>re.value.filter(xe=>xe.visible).length),re=U(()=>{const xe=Array.from(a.options.values()),Qe=[];return a.optionValues.forEach($t=>{const Mn=xe.findIndex(ws=>ws.value===$t);Mn>-1&&Qe.push(xe[Mn])}),Qe.length>=xe.length?Qe:xe}),ke=U(()=>Array.from(a.cachedOptions.values())),Ue=U(()=>{const xe=re.value.filter(Qe=>!Qe.created).some(Qe=>Qe.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!xe}),ee=()=>{t.filterable&&et(t.filterMethod)||t.filterable&&t.remote&&et(t.remoteMethod)||re.value.forEach(xe=>{var Qe;(Qe=xe.updateOption)==null||Qe.call(xe,a.inputValue)})},se=Ti(),me=U(()=>["small"].includes(se.value)?"small":"default"),$e=U({get(){return C.value&&(t.loading||!oe.value||t.remote&&!!s.empty)&&(!S.value||!$4(a.previousQuery)||a.options.size>0)},set(xe){C.value=xe}}),Se=U(()=>{if(t.multiple&&!en(t.modelValue))return Us(t.modelValue).length===0&&!a.inputValue;const xe=Ee(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||en(xe)?!a.inputValue:!0}),Ie=U(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!X.value?xe:a.selectedLabel}),je=U(()=>qk?null:"mouseenter");Me(()=>t.modelValue,(xe,Qe)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Fe("")),Ae(),!ji(xe,Qe)&&t.validateEvent&&(P==null||P.validate("change").catch($t=>Tt($t)))},{flush:"post",deep:!0}),Me(()=>C.value,xe=>{xe?Fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Me(()=>a.options.entries(),()=>{Gt&&(Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&ze())},{flush:"post"}),Me([()=>a.hoveringIndex,re],([xe])=>{_t(xe)&&xe>-1?x.value=re.value[xe]||{}:x.value={},re.value.forEach(Qe=>{Qe.hover=x.value===Qe})}),gl(()=>{a.isBeforeHide||ee()});const Fe=xe=>{a.previousQuery===xe||V.value||(a.previousQuery=xe,t.filterable&&et(t.filterMethod)?t.filterMethod(xe):t.filterable&&t.remote&&et(t.remoteMethod)&&t.remoteMethod(xe),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value?ot(ze):ot(We))},ze=()=>{const xe=re.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Qe=xe.find(Mn=>Mn.created),$t=xe[0];a.hoveringIndex=De(re.value.map(Mn=>Mn.value),Qe||$t)},Ae=()=>{if(t.multiple)a.selectedLabel="";else{const Qe=Ze(Ee(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Qe.currentLabel,a.selected=[Qe];return}const xe=[];en(t.modelValue)||Us(t.modelValue).forEach(Qe=>{xe.push(Ze(Qe))}),a.selected=xe},Ze=xe=>{let Qe;const $t=ud(xe);for(let Mn=a.cachedOptions.size-1;Mn>=0;Mn--){const ws=ke.value[Mn];if($t?Ui(ws.value,t.valueKey)===Ui(xe,t.valueKey):ws.value===xe){Qe={index:re.value.filter(qs=>!qs.created).indexOf(ws),value:xe,currentLabel:ws.currentLabel,get isDisabled(){return ws.isDisabled}};break}}return Qe||{index:-1,value:xe,currentLabel:$t?xe.label:xe??""}},We=()=>{const xe=a.selected.length;if(xe>0){const Qe=a.selected[xe-1];a.hoveringIndex=re.value.findIndex($t=>Go(Qe)===Go($t))}else a.hoveringIndex=-1},it=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},be=()=>{a.collapseItemWidth=_.value.getBoundingClientRect().width},ve=()=>{var xe,Qe;(Qe=(xe=u.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Te=()=>{var xe,Qe;(Qe=(xe=d.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Pe=()=>{a.inputValue.length>0&&!C.value&&(C.value=!0),Fe(a.inputValue)},gt=xe=>{if(a.inputValue=xe.target.value,t.remote)S.value=!0,Lt();else return Pe()},Lt=pD(()=>{Pe(),S.value=!1},Ce),Je=xe=>{ji(t.modelValue,xe)||e(dn,xe)},ut=xe=>Bse(xe,Qe=>{const $t=a.cachedOptions.get(Qe);return!($t!=null&&$t.disabled)&&!($t!=null&&$t.states.groupDisabled)}),ft=xe=>{const Qe=ls(xe);if(t.multiple&&Qe!==He.delete&&xe.target.value.length<=0){const $t=Us(t.modelValue).slice(),Mn=ut($t);if(Mn<0)return;const ws=$t[Mn];$t.splice(Mn,1),e(Mt,$t),Je($t),e("remove-tag",ws)}},ye=(xe,Qe)=>{const $t=a.selected.indexOf(Qe);if($t>-1&&!B.value){const Mn=Us(t.modelValue).slice();Mn.splice($t,1),e(Mt,Mn),Je(Mn),e("remove-tag",Qe.value)}xe.stopPropagation(),Dl()},Le=xe=>{xe.stopPropagation();const Qe=t.multiple?[]:I.value;if(t.multiple)for(const $t of a.selected)$t.isDisabled&&Qe.push($t.value);e(Mt,Qe),Je(Qe),a.hoveringIndex=-1,C.value=!1,e("clear"),Dl()},ce=xe=>{if(t.multiple){const Qe=Us(t.modelValue??[]).slice(),$t=De(Qe,xe);$t>-1?Qe.splice($t,1):(t.multipleLimit<=0||Qe.length<t.multipleLimit)&&Qe.push(xe.value),e(Mt,Qe),Je(Qe),xe.created&&Fe(""),t.filterable&&(xe.created||!t.reserveKeyword)&&(a.inputValue="")}else!ji(t.modelValue,xe.value)&&e(Mt,xe.value),Je(xe.value),C.value=!1;Dl(),!C.value&&ot(()=>{pt(xe)})},De=(xe,Qe)=>en(Qe)?-1:yt(Qe.value)?xe.findIndex($t=>ji(Ui($t,t.valueKey),Go(Qe))):xe.indexOf(Qe.value),pt=xe=>{var Mn,ws,qs,Bp,a9;const Qe=Ee(xe)?xe[xe.length-1]:xe;let $t=null;if(!li(Qe==null?void 0:Qe.value)){const zp=re.value.filter(TW=>TW.value===Qe.value);zp.length>0&&($t=zp[0].$el)}if(u.value&&$t){const zp=(Bp=(qs=(ws=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:ws.contentRef)==null?void 0:qs.querySelector)==null?void 0:Bp.call(qs,`.${o.be("dropdown","wrap")}`);zp&&jie(zp,$t)}(a9=k.value)==null||a9.handleScroll()},_n=xe=>{a.options.set(xe.value,xe),a.cachedOptions.set(xe.value,xe)},gs=(xe,Qe)=>{a.options.get(xe)===Qe&&a.options.delete(xe)},lu=U(()=>{var xe,Qe;return(Qe=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Qe.contentRef}),Fp=()=>{a.isBeforeHide=!1,ot(()=>{var xe;(xe=k.value)==null||xe.update(),pt(a.selected)})},Dl=()=>{var xe;(xe=h.value)==null||xe.focus()},ia=()=>{var xe;if(C.value){C.value=!1,ot(()=>{var Qe;return(Qe=h.value)==null?void 0:Qe.blur()});return}(xe=h.value)==null||xe.blur()},$n=xe=>{Le(xe)},Li=xe=>{if(C.value=!1,G.value){const Qe=new FocusEvent("blur",xe);ot(()=>K(Qe))}},nt=()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},at=xe=>{var Qe;B.value||t.filterable&&C.value&&xe&&!((Qe=p.value)!=null&&Qe.contains(xe.target))||(qk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:C.value=!C.value)},mt=()=>{if(!C.value)at();else{const xe=re.value[a.hoveringIndex];xe&&!xe.isDisabled&&ce(xe)}},Go=xe=>yt(xe.value)?Ui(xe.value,t.valueKey):xe.value,Rl=U(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),cu=U(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),xW=U(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Mv=xe=>{if(!C.value){C.value=!0;return}if(!(a.options.size===0||ie.value===0||V.value)&&!Rl.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 Qe=re.value[a.hoveringIndex];(Qe.isDisabled||!Qe.visible)&&Mv(xe),ot(()=>pt(x.value))}},r9=(xe,Qe,$t,Mn)=>{for(let ws=Qe;ws>=0&&ws<Mn;ws+=$t){const qs=xe[ws];if(!(qs!=null&&qs.isDisabled)&&(qs!=null&&qs.visible))return ws}return null},Tv=(xe,Qe)=>{const $t=a.options.size;if($t===0)return;const Mn=NO(xe,0,$t-1),ws=re.value,qs=Qe==="up"?-1:1,Bp=r9(ws,Mn,qs,$t)??r9(ws,Mn-qs,-qs,$t);Bp!=null&&(a.hoveringIndex=Bp,ot(()=>pt(x.value)))},SW=xe=>{const Qe=ls(xe);let $t=!0;switch(Qe){case He.up:Mv("prev");break;case He.down:Mv("next");break;case He.enter:case He.numpadEnter:V.value||mt();break;case He.esc:nt();break;case He.backspace:$t=!1,ft(xe);return;case He.home:if(!C.value)return;Tv(0,"down");break;case He.end:if(!C.value)return;Tv(a.options.size-1,"up");break;case He.pageUp:if(!C.value)return;Tv(a.hoveringIndex-10,"up");break;case He.pageDown:if(!C.value)return;Tv(a.hoveringIndex+10,"down");break;default:$t=!1;break}$t&&(xe.preventDefault(),xe.stopPropagation())},$W=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},AW=U(()=>{const xe=$W(),Qe=t.filterable?xe+a4:0;return{maxWidth:`${_.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Qe:a.selectionWidth-Qe}px`}}),EW=U(()=>({maxWidth:`${a.selectionWidth}px`})),MW=xe=>{e("popup-scroll",xe)};Es(c,it),Es(z,ve),Es(b,Te),Es(_,be);let Np;return Me(()=>$e.value,xe=>{xe?Np=Es(m,ve).stop:(Np==null||Np(),Np=void 0),e("visible-change",xe)}),Ft(()=>{Ae()}),{inputId:T,contentId:i,nsSelect:o,nsInput:r,states:a,isFocused:G,expanded:C,optionsArray:re,hoverOption:x,selectSize:se,filteredOptionsCount:ie,updateTooltip:ve,updateTagTooltip:Te,debouncedOnInputChange:Lt,onInput:gt,deletePrevTag:ft,deleteTag:ye,deleteSelected:Le,handleOptionSelect:ce,scrollToOption:pt,hasModelValue:X,shouldShowPlaceholder:Se,currentPlaceholder:Ie,mouseEnterEventName:je,needStatusIcon:H,showClearBtn:Q,iconComponent:ne,iconReverse:Z,validateState:ae,validateIcon:ge,showNewOption:Ue,updateOptions:ee,collapseTagSize:me,setSelected:Ae,selectDisabled:B,emptyText:pe,handleCompositionStart:R,handleCompositionUpdate:N,handleCompositionEnd:F,handleKeydown:SW,onOptionCreate:_n,onOptionDestroy:gs,handleMenuEnter:Fp,focus:Dl,blur:ia,handleClearClick:$n,handleClickOutside:Li,handleEsc:nt,toggleMenu:at,selectOption:mt,getValueKey:Go,navigateOptions:Mv,dropdownMenuVisible:$e,showTagList:cu,collapseTagList:xW,popupScroll:MW,getOption:Ze,tagStyle:AW,collapseTagStyle:EW,popperRef:lu,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:z,selectionRef:c,scrollbarRef:k,menuRef:m,tagMenuRef:b,collapseItemRef:_}};var Nhe=fe({name:"ElOptions",setup(t,{slots:e}){const n=Ye(t2);let s=[];return()=>{var a,l;const i=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Ee(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)&&!Ee(u.children)&&et((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):Ee(u.children)&&r(u.children)})}return i.length&&r((l=i[0])==null?void 0:l.children),ji(o,s)||(s=o,n&&(n.states.optionValues=o)),i}}});const pA="ElSelect",n1=new WeakMap,Bhe=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=n1.get(t))==null?void 0:o.originalWarnHandler;if(s){s(...e);return}console.warn(...e)},zhe=t=>{let e=n1.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:Bhe(t),count:0},n1.set(t,e)),e};var Hhe=fe({name:pA,componentName:pA,components:{ElSelectMenu:Vhe,ElOption:l8,ElOptions:Nhe,ElOptionGroup:c8,ElTag:Ai,ElScrollbar:Pi,ElTooltip:Ls,ElIcon:_e},directives:{ClickOutside:e1},props:Ahe,emits:[Mt,dn,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const s=ht(),i=zhe(s.appContext);i.count+=1,s.appContext.config.warnHandler=i.handler;const o=U(()=>{const{modelValue:k,multiple:C}=t,x=C?[]:void 0;return Ee(k)?C?k:x:C?x:k}),r=In({...go(t),modelValue:o}),a=Fhe(r,e),{calculatorRef:l,inputStyle:c}=vD(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=$he(t),p=k=>({label:u(k),value:d(k),disabled:f(k)}),m=k=>k.reduce((C,x)=>(C.push(x),x.children&&x.children.length>0&&C.push(...m(x.children)),C),[]),b=k=>{_c(k||[]).forEach(C=>{var x;if(yt(C)&&(C.type.name==="ElOption"||C.type.name==="ElTree")){const S=C.type.name;if(S==="ElTree")m(((x=C.props)==null?void 0:x.data)||[]).forEach(M=>{M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)});else if(S==="ElOption"){const M={...C.props};M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)}}})};Me(()=>{var k;return[t.persistent||a.expanded.value||!n.default||(k=n.default)==null?void 0:k.call(n),o.value]},()=>{var k;t.persistent||a.expanded.value||n.default&&(a.states.options.clear(),b((k=n.default)==null?void 0:k.call(n)))},{immediate:!0}),Pt(t2,In({props:r,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const _=U(()=>t.multiple?a.states.selected.map(k=>k.currentLabel):a.states.selectedLabel);return wn(()=>{const k=n1.get(s.appContext);k&&(k.count-=1,k.count<=0&&(s.appContext.config.warnHandler=k.originalWarnHandler,n1.delete(s.appContext)))}),{...a,modelValue:o,selectedLabel:_,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const Uhe=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],jhe=["textContent"],Whe={key:1};function Yhe(t,e,n,s,i,o){const r=Y("el-tag"),a=Y("el-tooltip"),l=Y("el-icon"),c=Y("el-option"),u=Y("el-option-group"),d=Y("el-options"),h=Y("el-scrollbar"),f=Y("el-select-menu"),p=xt("click-outside");return Re((v(),E("div",Kt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[Wu(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:q([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]=Oe((...b)=>t.toggleMenu&&t.toggleMenu(...b),["prevent"]))},[t.$slots.prefix?(v(),E("div",{key:0,ref:"prefixRef",class:q(t.nsSelect.e("prefix"))},[le(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:q([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,_,k,C,x,S,M,P,T,I,L,V,R;return[(v(!0),E(te,null,we(t.showTagList,N=>(v(),E("div",{key:t.getValueKey(N),class:q(t.nsSelect.e("selected-item"))},[y(r,{closable:!t.selectDisabled&&!N.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.tagStyle),onClose:F=>t.deleteTag(F,N)},{default:w(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:N.index,label:N.currentLabel,value:N.value},()=>[W($(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:((k=t.tagTooltip)==null?void 0:k.placement)??"bottom","popper-class":((C=t.tagTooltip)==null?void 0:C.popperClass)??t.popperClass,"popper-style":((x=t.tagTooltip)==null?void 0:x.popperStyle)??t.popperStyle,teleported:((S=t.tagTooltip)==null?void 0:S.teleported)??t.teleported,"append-to":((M=t.tagTooltip)==null?void 0:M.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":(I=t.tagTooltip)==null?void 0:I.showAfter,"hide-after":(L=t.tagTooltip)==null?void 0:L.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:q(t.nsSelect.e("selected-item"))},[y(r,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.collapseTagStyle)},{default:w(()=>[g("span",{class:q(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:q(t.nsSelect.e("selection"))},[(v(!0),E(te,null,we(t.collapseTagList,N=>(v(),E("div",{key:t.getValueKey(N),class:q(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:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:N.index,label:N.currentLabel,value:N.value},()=>[W($(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:q([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:q([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:Xe(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]=Oe(()=>{},["stop"])),onClick:e[6]||(e[6]=Oe((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,Uhe),t.filterable?(v(),E("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:q(t.nsSelect.e("input-calculator")),textContent:$(t.states.inputValue)},null,10,jhe)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),E("div",{key:1,class:q([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(),E("span",Whe,$(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:q(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(v(),D(l,{key:0,class:q([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.showClearBtn&&t.clearIcon?(v(),D(l,{key:1,class:q([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(v(),D(l,{key:2,class:q([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:w(()=>[(v(),D(Ct(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:w(()=>[y(f,{ref:"menuRef"},{default:w(()=>[t.$slots.header?(v(),E("div",{key:0,class:q(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Oe(()=>{},["stop"]))},[le(t.$slots,"header")],2)):O("v-if",!0),Re(y(h,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:q([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),E(te,null,we(t.options,(m,b)=>{var _;return v(),E(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),E(te,null,we(t.getOptions(m),k=>(v(),D(c,Kt({key:t.getValue(k)},{ref_for:!0},t.getOptionProps(k)),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"]),[[Ht,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),E("div",{key:1,class:q(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),E("div",{key:2,class:q(t.nsSelect.be("dropdown","empty"))},[le(t.$slots,"empty",{},()=>[g("span",null,$(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),E("div",{key:3,class:q(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Oe(()=>{},["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 qhe=fi(Hhe,[["render",Yhe]]);const Zt=Ut(qhe,{Option:l8,OptionGroup:c8}),nn=Is(l8),n2=Is(c8);var rV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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]),k=r(b[f]),C=_||k.map(function(S){return S.slice(0,p)});if(!m)return C;var x=b.weekStart;return C.map(function(S,M){return C[(M+(x||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)}}})})(rV);var Ghe=rV.exports;const Xhe=pi(Ghe),aV={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:Ki,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...kr(["ariaControls"])},lV={[Mt]:t=>Ke(t)||_t(t)||Jn(t),change:t=>Ke(t)||_t(t)||Jn(t)},pp=Symbol("checkboxGroupContextKey"),Khe=Ge({modelValue:{type:ue(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Ki,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:ue(Array)},props:{type:ue(Object),default:()=>cV},type:{type:String,values:["checkbox","button"],default:"checkbox"},...kr(["ariaLabel"])}),Zhe={[Mt]:t=>Ee(t),change:t=>Ee(t)},cV={label:"label",value:"value",disabled:"disabled"},Jhe=({model:t,isChecked:e})=>{const n=Ye(pp,void 0),s=Ye(Nd,void 0),i=U(()=>{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!en(o)&&t.value.length>=o&&!e.value||!en(r)&&t.value.length<=r&&e.value});return{isDisabled:_s(U(()=>{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=Ye(pp,void 0),{formItem:a}=yo(),{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(dn,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(dn,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 ot(),u(e.value,p)))}const f=U(()=>(r==null?void 0:r.validateEvent)||t.validateEvent);return Me(()=>t.modelValue,()=>{f.value&&(a==null||a.validate("change").catch(p=>Tt(p)))}),{handleChange:d,onClickRoot:h}},efe=t=>{const e=J(!1),{emit:n}=ht(),s=Ye(pp,void 0),i=U(()=>en(s)===!1),o=J(!1),r=U({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&&Ee(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(Mt,a),e.value=a)}});return{model:r,isGroup:i,isLimitExceeded:o}},tfe=(t,e,{model:n})=>{const s=Ye(pp,void 0),i=J(!1),o=U(()=>va(t.value)?t.label:t.value),r=U(()=>{const a=n.value;return Jn(a)?a:Ee(a)?yt(o.value)?a.map(rn).some(l=>ji(l,o.value)):a.map(rn).includes(o.value):a!=null?a===t.trueValue||a===t.trueLabel:!!a});return{checkboxButtonSize:Ti(U(()=>{var a;return(a=s==null?void 0:s.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:i,checkboxSize:Ti(U(()=>{var a;return(a=s==null?void 0:s.size)==null?void 0:a.value})),hasOwnLabel:U(()=>!!e.default||!va(o.value)),actualValue:o}},uV=(t,e)=>{const{formItem:n}=yo(),{model:s,isGroup:i,isLimitExceeded:o}=efe(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=tfe(t,e,{model:s}),{isDisabled:h}=Jhe({model:s,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Ml(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 k(){Ee(s.value)&&!s.value.includes(d.value)?s.value.push(d.value):s.value=t.trueValue??t.trueLabel??!0}t.checked&&k()})(),dl({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},U(()=>i.value&&va(t.value))),dl({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},U(()=>!!t.trueLabel)),dl({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},U(()=>!!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}},nfe=["id","indeterminate","name","tabindex","disabled"];var sfe=fe({name:"ElCheckbox",__name:"checkbox",props:aV,emits:lV,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}=uV(e,hi()),f=U(()=>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=Be("checkbox"),m=U(()=>[p.b(),p.m(a.value),p.is("disabled",o.value),p.is("bordered",e.border),p.is("checked",i.value)]),b=U(()=>[p.e("input"),p.is("disabled",o.value),p.is("checked",i.value),p.is("indeterminate",e.indeterminate),p.is("focus",r.value)]);return(_,k)=>(v(),D(Ct(!A(l)&&A(s)?"span":"label"),{for:!A(l)&&A(s)?null:A(n),class:q(m.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:A(h)},{default:w(()=>[g("span",{class:q(b.value)},[Re(g("input",Kt({id:A(n),"onUpdate:modelValue":k[0]||(k[0]=C=>hn(c)?c.value=C:null),class:A(p).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:A(o)},f.value,{onChange:k[1]||(k[1]=(...C)=>A(d)&&A(d)(...C)),onFocus:k[2]||(k[2]=C=>r.value=!0),onBlur:k[3]||(k[3]=C=>r.value=!1),onClick:k[4]||(k[4]=Oe(()=>{},["stop"]))}),null,16,nfe),[[E1,A(c)]]),g("span",{class:q(A(p).e("inner"))},null,2)],2),A(l)?(v(),E("span",{key:0,class:q(A(p).e("label"))},[le(_.$slots,"default"),_.$slots.default?O("v-if",!0):(v(),E(te,{key:0},[W($(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),dV=sfe;const ife=["name","tabindex","disabled"];var ofe=fe({name:"ElCheckboxButton",__name:"checkbox-button",props:aV,emits:lV,setup(t){const e=t,{isFocused:n,isChecked:s,isDisabled:i,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=uV(e,hi()),c=U(()=>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=Ye(pp,void 0),d=Be("checkbox"),h=U(()=>{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=U(()=>[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(),E("label",{class:q(f.value)},[Re(g("input",Kt({"onUpdate:modelValue":m[0]||(m[0]=b=>hn(r)?r.value=b:null),class:A(d).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:A(i)},c.value,{onChange:m[1]||(m[1]=(...b)=>A(l)&&A(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]=Oe(()=>{},["stop"]))}),null,16,ife),[[E1,A(r)]]),p.$slots.default||t.label?(v(),E("span",{key:0,class:q(A(d).be("button","inner")),style:Xe(A(s)?h.value:void 0)},[le(p.$slots,"default",{},()=>[W($(t.label),1)])],6)):O("v-if",!0)],2))}}),u8=ofe,rfe=fe({name:"ElCheckboxGroup",__name:"checkbox-group",props:Khe,emits:Zhe,setup(t,{emit:e}){const n=t,s=e,i=Be("checkbox"),o=_s(),{formItem:r}=yo(),{inputId:a,isLabeledByFormItem:l}=Ml(n,{formItemContext:r}),c=async p=>{s(Mt,p),await ot(),s(dn,p)},u=U({get(){return n.modelValue},set(p){c(p)}}),d=U(()=>({...cV,...n.props})),h=p=>{const{label:m,value:b,disabled:_}=d.value,k={label:p[m],value:p[b],disabled:p[_]};return{...z_(p,[m,b,_]),...k}},f=U(()=>n.type==="button"?u8:dV);return Pt(pp,{...S4(go(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:u,changeEvent:c}),Me(()=>n.modelValue,(p,m)=>{n.validateEvent&&!ji(p,m)&&(r==null||r.validate("change").catch(b=>Tt(b)))}),(p,m)=>{var b;return v(),D(Ct(t.tag),{id:A(a),class:q(A(i).b("group")),role:"group","aria-label":A(l)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":A(l)?(b=A(r))==null?void 0:b.labelId:void 0},{default:w(()=>[le(p.$slots,"default",{},()=>[(v(!0),E(te,null,we(t.options,(_,k)=>(v(),D(Ct(f.value),Kt({key:k},{ref_for:!0},h(_)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),hV=rfe;const Jt=Ut(dV,{CheckboxButton:u8,CheckboxGroup:hV});Is(u8);const d8=Is(hV),fV=Ge({modelValue:{type:[String,Number,Boolean],default:void 0},size:Ki,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}}),afe=Ge({...fV,border:Boolean}),pV={[Mt]:t=>Ke(t)||_t(t)||Jn(t),[dn]:t=>Ke(t)||_t(t)||Jn(t)},mV=Symbol("radioGroupKey"),lfe=Ge({...fV}),gV={label:"label",value:"value",disabled:"disabled"},cfe=Ge({id:{type:String,default:void 0},size:Ki,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:ue(Array)},props:{type:ue(Object),default:()=>gV},type:{type:String,values:["radio","button"],default:"radio"},...kr(["ariaLabel"])}),ufe=pV,vV=(t,e)=>{const n=J(),s=Ye(mV,void 0),i=U(()=>!!s),o=U(()=>va(t.value)?t.label:t.value),r=U({get(){return i.value?s.modelValue:t.modelValue},set(d){i.value?s.changeEvent(d):e&&e(Mt,d),n.value.checked=t.modelValue===o.value}}),a=Ti(U(()=>s==null?void 0:s.size)),l=_s(U(()=>s==null?void 0:s.disabled)),c=J(!1),u=U(()=>l.value||i.value&&r.value!==o.value?-1:0);return dl({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},U(()=>i.value&&va(t.value))),{radioRef:n,isGroup:i,radioGroup:s,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},dfe=["value","name","disabled","checked"];var hfe=fe({name:"ElRadio",__name:"radio",props:afe,emits:pV,setup(t,{emit:e}){const n=t,s=e,i=Be("radio"),{radioRef:o,radioGroup:r,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=vV(n,s);function h(){ot(()=>s(dn,u.value))}return(f,p)=>{var m;return v(),E("label",{class:q([A(i).b(),A(i).is("disabled",A(c)),A(i).is("focus",A(a)),A(i).is("bordered",t.border),A(i).is("checked",A(u)===A(d)),A(i).m(A(l))])},[g("span",{class:q([A(i).e("input"),A(i).is("disabled",A(c)),A(i).is("checked",A(u)===A(d))])},[Re(g("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=b=>hn(u)?u.value=b:null),class:q(A(i).e("original")),value:A(d),name:t.name||((m=A(r))==null?void 0:m.name),disabled:A(c),checked:A(u)===A(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]=Oe(()=>{},["stop"]))},null,42,dfe),[[M1,A(u)]]),g("span",{class:q(A(i).e("inner"))},null,2)],2),g("span",{class:q(A(i).e("label")),onKeydown:p[4]||(p[4]=Oe(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[W($(t.label),1)])],34)],2)}}}),yV=hfe;const ffe=["value","name","disabled"];var pfe=fe({name:"ElRadioButton",__name:"radio-button",props:lfe,setup(t){const e=t,n=Be("radio"),{radioRef:s,focus:i,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=vV(e),u=U(()=>({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(),E("label",{class:q([A(n).b("button"),A(n).is("active",A(a)===A(c)),A(n).is("disabled",A(r)),A(n).is("focus",A(i)),A(n).bm("button",A(o))])},[Re(g("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":h[0]||(h[0]=p=>hn(a)?a.value=p:null),class:q(A(n).be("button","original-radio")),value:A(c),type:"radio",name:t.name||((f=A(l))==null?void 0:f.name),disabled:A(r),onFocus:h[1]||(h[1]=p=>i.value=!0),onBlur:h[2]||(h[2]=p=>i.value=!1),onClick:h[3]||(h[3]=Oe(()=>{},["stop"]))},null,42,ffe),[[M1,A(a)]]),g("span",{class:q(A(n).be("button","inner")),style:Xe(A(a)===A(c)?u.value:{}),onKeydown:h[4]||(h[4]=Oe(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[W($(t.label),1)])],38)],2)}}}),h8=pfe;const mfe=["id","aria-label","aria-labelledby"];var gfe=fe({name:"ElRadioGroup",__name:"radio-group",props:cfe,emits:ufe,setup(t,{emit:e}){const n=t,s=e,i=Be("radio"),o=_r(),r=J(),{formItem:a}=yo(),{inputId:l,isLabeledByFormItem:c}=Ml(n,{formItemContext:a}),u=m=>{s(Mt,m),ot(()=>s(dn,m))};Ft(()=>{const m=r.value.querySelectorAll("[type=radio]"),b=m[0];!Array.from(m).some(_=>_.checked)&&b&&(b.tabIndex=0)});const d=U(()=>n.name||o.value),h=U(()=>({...gV,...n.props})),f=m=>{const{label:b,value:_,disabled:k}=h.value,C={label:m[b],value:m[_],disabled:m[k]};return{...z_(m,[b,_,k]),...C}},p=U(()=>n.type==="button"?h8:yV);return Pt(mV,In({...go(n),changeEvent:u,name:d})),Me(()=>n.modelValue,(m,b)=>{n.validateEvent&&!ji(m,b)&&(a==null||a.validate("change").catch(_=>Tt(_)))}),(m,b)=>(v(),E("div",{id:A(l),ref_key:"radioGroupRef",ref:r,class:q(A(i).b("group")),role:"radiogroup","aria-label":A(c)?void 0:t.ariaLabel||"radio-group","aria-labelledby":A(c)?A(a).labelId:void 0},[le(m.$slots,"default",{},()=>[(v(!0),E(te,null,we(t.options,(_,k)=>(v(),D(Ct(p.value),Kt({key:k},{ref_for:!0},f(_)),null,16))),128))])],10,mfe))}}),bV=gfe;const Zi=Ut(yV,{RadioButton:h8,RadioGroup:bV}),Os=Is(bV),mp=Is(h8),vfe=Ge({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:ue([Number,Object]),default:()=>ii({})},sm:{type:ue([Number,Object]),default:()=>ii({})},md:{type:ue([Number,Object]),default:()=>ii({})},lg:{type:ue([Number,Object]),default:()=>ii({})},xl:{type:ue([Number,Object]),default:()=>ii({})}}),yfe=["start","center","end","space-around","space-between","space-evenly"],bfe=["top","middle","bottom"],_fe=Ge({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:yfe,default:"start"},align:{type:String,values:bfe}}),_V=Symbol("rowContextKey");var wfe=fe({name:"ElRow",__name:"row",props:_fe,setup(t){const e=t,n=Be("row");Pt(_V,{gutter:U(()=>e.gutter)});const s=U(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),i=U(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(o,r)=>(v(),D(Ct(t.tag),{class:q(i.value),style:Xe(s.value)},{default:w(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),kfe=wfe;const Bd=Ut(kfe);var Cfe=fe({name:"ElCol",__name:"col",props:vfe,setup(t){const e=t,{gutter:n}=Ye(_V,{gutter:U(()=>0)}),s=Be("col"),i=U(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=U(()=>{const r=[];return["span","offset","pull","push"].forEach(a=>{const l=e[a];_t(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=>{_t(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(Ct(t.tag),{class:q(o.value),style:Xe(i.value)},{default:w(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),xfe=Cfe;const zd=Ut(xfe),mA=t=>_t(t)||Ke(t)||Ee(t),Sfe=Ge({accordion:Boolean,modelValue:{type:ue([Array,String,Number]),default:()=>ii([])},expandIconPosition:{type:ue([String]),default:"right"},beforeCollapse:{type:ue(Function)}}),$fe={[Mt]:mA,[dn]:mA},wV=Symbol("collapseContextKey"),Afe=Ge({title:{type:String,default:""},name:{type:ue([String,Number]),default:void 0},icon:{type:ds,default:Fr},disabled:Boolean});var Efe=fe({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=Be("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(Ho,Kt({name:A(e).b()},wI(s)),{default:w(()=>[le(i.$slots,"default")]),_:3},16,["name"]))}}),Mfe=Efe;const Tfe=Ut(Mfe),gA="ElCollapse",Pfe=(t,e)=>{const n=J(Us(t.modelValue)),s=r=>{n.value=r;const a=t.accordion?n.value[0]:n.value;e(Mt,a),e(dn,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);[cd(l),Jn(l)].includes(!0)||vo(gA,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),cd(l)?l.then(c=>{c!==!1&&i(r)}).catch(c=>{Tt(gA,`some error occurred: ${c}`)}):l&&i(r)};return Me(()=>t.modelValue,()=>n.value=Us(t.modelValue),{deep:!0}),Pt(wV,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:s}},Ife=t=>{const e=Be("collapse");return{rootKls:U(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Lfe=fe({name:"ElCollapse",__name:"collapse",props:Sfe,emits:$fe,setup(t,{expose:e,emit:n}){const s=t,{activeNames:i,setActiveNames:o}=Pfe(s,n),{rootKls:r}=Ife(s);return e({activeNames:i,setActiveNames:o}),(a,l)=>(v(),E("div",{class:q(A(r))},[le(a.$slots,"default")],2))}}),Ofe=Lfe;const Dfe=t=>{const e=Ye(wV),{namespace:n}=Be("collapse"),s=J(!1),i=J(!1),o=z4(),r=U(()=>o.current++),a=U(()=>t.name??`${n.value}-id-${o.prefix}-${A(r)}`),l=U(()=>e==null?void 0:e.activeNames.value.includes(A(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(A(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(A(a)))}}},Rfe=(t,{focusing:e,isActive:n,id:s})=>{const i=Be("collapse"),o=U(()=>[i.b("item"),i.is("active",A(n)),i.is("disabled",t.disabled)]),r=U(()=>[i.be("item","header"),i.is("active",A(n)),{focusing:A(e)&&!t.disabled}]),a=U(()=>[i.be("item","arrow"),i.is("active",A(n))]);return{itemTitleKls:U(()=>[i.be("item","title")]),arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:U(()=>i.be("item","wrap")),itemContentKls:U(()=>i.be("item","content")),scopedContentId:U(()=>i.b(`content-${A(s)}`)),scopedHeadId:U(()=>i.b(`head-${A(s)}`))}},Vfe=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Ffe=["id","aria-hidden","aria-labelledby"];var Nfe=fe({name:"ElCollapseItem",__name:"collapse-item",props:Afe,setup(t,{expose:e}){const n=t,{focusing:s,id:i,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Dfe(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:b}=Rfe(n,{focusing:s,isActive:o,id:i});return e({isActive:o}),(_,k)=>(v(),E("div",{class:q(A(d))},[g("div",{id:A(b),class:q(A(u)),"aria-expanded":A(o),"aria-controls":A(m),"aria-describedby":A(m),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"button",onClick:k[0]||(k[0]=(...C)=>A(a)&&A(a)(...C)),onKeydown:k[1]||(k[1]=kt(Oe((...C)=>A(l)&&A(l)(...C),["stop"]),["space","enter"])),onFocus:k[2]||(k[2]=(...C)=>A(r)&&A(r)(...C)),onBlur:k[3]||(k[3]=C=>s.value=!1)},[g("span",{class:q(A(h))},[le(_.$slots,"title",{isActive:A(o)},()=>[W($(t.title),1)])],2),le(_.$slots,"icon",{isActive:A(o)},()=>[y(A(_e),{class:q(A(c))},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1},8,["class"])])],42,Vfe),y(A(Tfe),null,{default:w(()=>[Re(g("div",{id:A(m),role:"region",class:q(A(f)),"aria-hidden":!A(o),"aria-labelledby":A(b)},[g("div",{class:q(A(p))},[le(_.$slots,"default")],2)],10,Ffe),[[Ht,A(o)]])]),_:3})],2))}}),kV=Nfe;const Bfe=Ut(Ofe,{CollapseItem:kV}),zfe=Is(kV),CV=Ge({modelValue:{type:ue(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:ue(String)},disabled:Boolean,predefine:{type:ue(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:ue([String,Array,Object])},hueSliderStyle:{type:ue([String,Array,Object])}}),Hfe={[Mt]:t=>Ke(t)||li(t)},xV=Symbol("colorCommonPickerKey"),SV=Symbol("colorPickerPanelContextKey"),$V=Ge({color:{type:ue(Object),required:!0},vertical:Boolean,disabled:Boolean}),Ufe=$V,AV=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 Vw=!1;function xC(t,e){if(!Gt)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,Vw=!1,(r=e.end)==null||r.call(e,o)},i=function(o){var r;Vw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",s),document.addEventListener("touchmove",n),document.addEventListener("touchend",s),Vw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const EV=(t,{key:e,minValue:n,maxValue:s})=>{const i=ht(),o=Fn(),r=Fn(),a=U(()=>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}=AV(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=ls(h),m=f?10:1,b=e==="hue"?-1:1;let _=!0;switch(p){case He.left:case He.down:d(-m*b);break;case He.right:case He.up:d(m*b);break;case He.home:t.color.set(e,e==="hue"?s:n);break;case He.end:t.color.set(e,e==="hue"?n:s);break;case He.pageDown:d(-4*b);break;case He.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}},MV=(t,{namespace:e,maxValue:n,bar:s,thumb:i,currentValue:o,handleDrag:r,getBackground:a})=>{const l=ht(),c=Be(e),u=J(0),d=J(0),h=J();function f(){if(!i.value||t.vertical)return 0;const C=l.vnode.el,x=o.value;return C?Math.round(x*(C.offsetWidth-i.value.offsetWidth/2)/n):0}function p(){if(!i.value)return 0;const C=l.vnode.el;if(!t.vertical)return 0;const x=o.value;return C?Math.round(x*(C.offsetHeight-i.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a==null?void 0:a()}Ft(()=>{if(!s.value||!i.value)return;const C={drag:x=>{r(x)},end:x=>{r(x)}};xC(s.value,C),xC(i.value,C),m()}),Me(o,()=>m()),Me(()=>t.color.value,()=>m());const b=U(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),_=U(()=>c.e("bar")),k=U(()=>c.e("thumb"));return{rootKls:b,barKls:_,barStyle:U(()=>({background:h.value})),thumbKls:k,thumbStyle:U(()=>({left:ui(u.value),top:ui(d.value)})),thumbLeft:u,thumbTop:d,update:m}},jfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],vA=0,Fw=100;var Wfe=fe({name:"ElColorAlphaSlider",__name:"alpha-slider",props:$V,setup(t,{expose:e}){const n=t,{currentValue:s,bar:i,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=EV(n,{key:"alpha",minValue:vA,maxValue:Fw}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=MV(n,{namespace:"color-alpha-slider",maxValue:Fw,currentValue:s,bar:i,thumb:o,handleDrag:r,getBackground:k}),{t:m}=Qt(),b=U(()=>m("el.colorpicker.alphaLabel")),_=U(()=>m("el.colorpicker.alphaDescription",{alpha:s.value,color:n.color.value}));function k(){if(n.color&&n.color.value){const{r:C,g:x,b:S}=n.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${x}, ${S}, 0) 0%, rgba(${C}, ${x}, ${S}, 1) 100%)`}return""}return e({update:p,bar:i,thumb:o}),(C,x)=>(v(),E("div",{class:q(A(c))},[g("div",{ref_key:"bar",ref:i,class:q(A(u)),style:Xe(A(d)),onClick:x[0]||(x[0]=(...S)=>A(a)&&A(a)(...S))},null,6),g("div",{ref_key:"thumb",ref:o,class:q(A(h)),style:Xe(A(f)),"aria-label":b.value,"aria-valuenow":A(s),"aria-valuetext":_.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":vA,"aria-valuemax":Fw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:x[1]||(x[1]=(...S)=>A(l)&&A(l)(...S))},null,46,jfe)],2))}}),Yfe=Wfe;const qfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],yA=0,Nw=360;var Gfe=fe({name:"ElColorHueSlider",__name:"hue-slider",props:Ufe,setup(t,{expose:e}){const n=t,{currentValue:s,bar:i,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=EV(n,{key:"hue",minValue:yA,maxValue:Nw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=MV(n,{namespace:"color-hue-slider",maxValue:Nw,currentValue:s,bar:i,thumb:o,handleDrag:r}),{t:m}=Qt(),b=U(()=>m("el.colorpicker.hueLabel")),_=U(()=>m("el.colorpicker.hueDescription",{hue:s.value,color:n.color.value}));return e({bar:i,thumb:o,thumbTop:f,update:p}),(k,C)=>(v(),E("div",{class:q(A(c))},[g("div",{ref_key:"bar",ref:i,class:q(A(u)),onClick:C[0]||(C[0]=(...x)=>A(a)&&A(a)(...x))},null,2),g("div",{ref_key:"thumb",ref:o,class:q(A(d)),style:Xe(A(h)),"aria-label":b.value,"aria-valuenow":A(s),"aria-valuetext":_.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":yA,"aria-valuemax":Nw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...x)=>A(l)&&A(l)(...x))},null,46,qfe)],2))}}),Xfe=Gfe;const Kfe=Ge({colors:{type:ue(Array),required:!0},color:{type:ue(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var Cb=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)Nt(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)Nt(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 Zfe=t=>{const{currentColor:e}=Ye(SV),n=J(i(t.colors,t.color));Me(()=>e.value,o=>{const r=new Cb({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=r.compare(a)})}),gl(()=>{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 Cb({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:s}},Jfe=t=>{const e=Be("color-predefine"),n=U(()=>[e.b(),e.is("disabled",t.disabled)]),s=U(()=>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 epe=fe({name:"ElColorPredefine",__name:"predefine",props:Kfe,setup(t){const e=t,{rgbaColors:n,handleSelect:s}=Zfe(e),{rootKls:i,colorsKls:o,colorSelectorKls:r}=Jfe(e),{t:a}=Qt(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),E("div",{class:q(A(i))},[g("div",{class:q(A(o))},[(v(!0),E(te,null,we(A(n),(d,h)=>(v(),E("button",{key:t.colors[h],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:q(A(r)(d)),onClick:f=>A(s)(h)},[g("div",{style:Xe({backgroundColor:d.value})},null,4)],10,Qfe))),128))],2)],2))}}),tpe=epe;const npe=Ge({color:{type:ue(Object),required:!0},disabled:Boolean}),spe=t=>{const e=ht(),n=J(),s=J(0),i=J(0),o=J("hsl(0, 100%, 50%)"),r=U(()=>t.color.get("saturation")),a=U(()=>t.color.get("value")),l=U(()=>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:_}=AV(p);let k=b-m.left,C=_-m.top;k=Math.max(0,k),k=Math.min(k,m.width),C=Math.max(0,C),C=Math.min(C,m.height),i.value=k,s.value=C,t.color.set({saturation:k/m.width*100,value:100-C/m.height*100})}function d(p){if(t.disabled)return;const{shiftKey:m}=p,b=ls(p),_=m?10:1;let k=!0;switch(b){case He.left:h(-_);break;case He.right:h(_);break;case He.up:f(_);break;case He.down:f(-_);break;default:k=!1;break}k&&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}},ipe=(t,{cursorTop:e,cursorLeft:n,background:s,handleDrag:i})=>{const o=ht(),r=Be("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 Ft(()=>{xC(o.vnode.el,{drag:l=>{i(l)},end:l=>{i(l)}}),a()}),Me([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a()),{rootKls:U(()=>r.b()),cursorKls:U(()=>r.e("cursor")),rootStyle:U(()=>({backgroundColor:s.value})),cursorStyle:U(()=>({top:ui(e.value),left:ui(n.value)})),update:a}},ope=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var rpe=fe({name:"ElSvPanel",__name:"sv-panel",props:npe,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}=spe(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:b}=ipe(n,{cursorTop:i,cursorLeft:o,background:r,handleDrag:u}),{t:_}=Qt(),k=U(()=>_("el.colorpicker.svLabel")),C=U(()=>_("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:b}),(x,S)=>(v(),E("div",{class:q(A(h)),style:Xe(A(p)),onClick:S[1]||(S[1]=(...M)=>A(c)&&A(c)(...M))},[g("div",{ref_key:"cursorRef",ref:s,class:q(A(f)),style:Xe(A(m)),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":k.value,"aria-valuenow":`${A(a)},${A(l)}`,"aria-valuetext":C.value,onKeydown:S[0]||(S[0]=(...M)=>A(d)&&A(d)(...M))},null,46,ope)],6))}}),ape=rpe;const TV=(t,e)=>{const n=In(new Cb({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return Me(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(Mt,n.value)}),{color:n}};var lpe=fe({name:"ElColorPickerPanel",__name:"color-picker-panel",props:CV,emits:Hfe,setup(t,{expose:e,emit:n}){const s=t,i=n,o=Be("color-picker-panel"),{formItem:r}=yo(),a=_s(),l=J(),c=J(),u=J(),d=J(),h=J(""),{color:f}=Ye(xV,()=>TV(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(k=>Tt(k)))}function b(){var _,k,C;(_=l.value)==null||_.update(),(k=c.value)==null||k.update(),(C=u.value)==null||C.update()}return Ft(()=>{s.modelValue&&(h.value=f.value),ot(b)}),Me(()=>s.modelValue,_=>{_!==f.value&&(_?f.fromString(_):f.clear())}),Me(()=>f.value,_=>{i(Mt,_),h.value=_,s.validateEvent&&(r==null||r.validate("change").catch(k=>Tt(k)))}),Pt(SV,{currentColor:U(()=>f.value)}),e({color:f,inputRef:d,update:b}),(_,k)=>(v(),E("div",{class:q([A(o).b(),A(o).is("disabled",A(a)),A(o).is("border",t.border)]),onFocusout:m},[g("div",{class:q(A(o).e("wrapper"))},[y(Xfe,{ref_key:"hueRef",ref:l,color:A(f),vertical:"",disabled:A(a),class:q(["hue-slider",t.hueSliderClass]),style:Xe(t.hueSliderStyle)},null,8,["color","disabled","class","style"]),y(ape,{ref_key:"svRef",ref:c,color:A(f),disabled:A(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(Yfe,{key:0,ref_key:"alphaRef",ref:u,color:A(f),disabled:A(a)},null,8,["color","disabled"])):O("v-if",!0),t.predefine?(v(),D(tpe,{key:1,ref:"predefine","enable-alpha":t.showAlpha,color:A(f),colors:t.predefine,disabled:A(a)},null,8,["enable-alpha","color","colors","disabled"])):O("v-if",!0),g("div",{class:q(A(o).e("footer"))},[y(A(vt),{ref_key:"inputRef",ref:d,modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=C=>h.value=C),"validate-event":!1,size:"small",disabled:A(a),onChange:p},null,8,["modelValue","disabled"]),le(_.$slots,"footer")],2)],34))}}),cpe=lpe;const upe=Ut(cpe),dpe=Ge({persistent:{type:Boolean,default:!0},modelValue:{type:ue(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:ue(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:Ki,popperClass:zn.popperClass,popperStyle:zn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:zn.teleported,appendTo:zn.appendTo,predefine:{type:ue(Array)},validateEvent:{type:Boolean,default:!0},...N1,...kr(["ariaLabel"])}),hpe={[Mt]:t=>Ke(t)||li(t),[dn]:t=>Ke(t)||li(t),activeChange:t=>Ke(t)||li(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},fpe=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var ppe=fe({name:"ElColorPicker",__name:"color-picker",props:dpe,emits:hpe,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Qt(),r=Be("color"),{formItem:a}=yo(),l=Ti(),c=_s(),{valueOnClear:u,isEmptyValue:d}=Y4(s,null),h=TV(s,i),{inputId:f,isLabeledByFormItem:p}=Ml(s,{formItemContext:a}),m=J(),b=J(),_=J(),k=J(!1),C=J(!1);let x=!0;const{isFocused:S,handleFocus:M,handleBlur:P}=fp(b,{disabled:c,beforeBlur(re){var ke;return(ke=m.value)==null?void 0:ke.isFocusInsideContent(re)},afterBlur(){var re;z(!1),H(),s.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(ke=>Tt(ke)))}}),T=die(()=>{var re;return((re=_.value)==null?void 0:re.color)??h.color}),I=U(()=>S4(s,Object.keys(CV))),L=U(()=>!s.modelValue&&!C.value?"transparent":B(T,s.showAlpha)),V=U(()=>!s.modelValue&&!C.value?"":T.value),R=U(()=>p.value?void 0:s.ariaLabel||o("el.colorpicker.defaultLabel")),N=U(()=>p.value?a==null?void 0:a.labelId:void 0),F=U(()=>[r.b("picker"),r.is("disabled",c.value),r.bm("picker",l.value),r.is("focused",S.value)]);function B(re,ke){const{r:Ue,g:ee,b:se,a:me}=re.toRgb();return ke?`rgba(${Ue}, ${ee}, ${se}, ${me})`:`rgb(${Ue}, ${ee}, ${se})`}function z(re){k.value=re}const G=gd(z,100,{leading:!0});function K(){c.value||z(!0)}function X(){G(!1),H()}function H(){ot(()=>{s.modelValue?T.fromString(s.modelValue):(T.value="",ot(()=>{C.value=!1}))})}function Q(){c.value||(k.value&&H(),G(!k.value))}function ne(){const re=d(T.value)?u.value:T.value;i(Mt,re),i(dn,re),s.validateEvent&&(a==null||a.validate("change").catch(ke=>Tt(ke))),G(!1),ot(()=>{const ke=new Cb({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue});T.compare(ke)||H()})}function Z(){G(!1),i(Mt,u.value),i(dn,u.value),s.modelValue!==u.value&&s.validateEvent&&(a==null||a.validate("change").catch(re=>Tt(re))),H(),i("clear")}function ae(){var re,ke;(ke=(re=_==null?void 0:_.value)==null?void 0:re.inputRef)==null||ke.focus()}function ge(){k.value&&(X(),S.value&&pe())}function Ce(re){re.preventDefault(),re.stopPropagation(),z(!1),H()}function oe(re){switch(ls(re)){case He.enter:case He.numpadEnter:case He.space:re.preventDefault(),re.stopPropagation(),K();break;case He.esc:Ce(re);break}}function pe(){b.value.focus()}function ie(){b.value.blur()}return Me(()=>V.value,re=>{x&&i("activeChange",re),x=!0}),Me(()=>T.value,()=>{!s.modelValue&&!C.value&&(C.value=!0)}),Me(()=>s.modelValue,re=>{re?re&&re!==T.value&&(x=!1,T.fromString(re)):C.value=!1}),Me(()=>k.value,()=>{_.value&&ot(_.value.update)}),Pt(xV,h),e({color:T,show:K,hide:X,focus:pe,blur:ie}),(re,ke)=>(v(),D(A(Ls),{ref_key:"popper",ref:m,visible:k.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[A(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:`${A(r).namespace.value}-zoom-in-top`,persistent:t.persistent,"append-to":t.appendTo,onShow:ae,onHide:ke[2]||(ke[2]=Ue=>z(!1))},{content:w(()=>[Re((v(),D(A(upe),Kt({ref_key:"pickerPanelRef",ref:_},I.value,{border:!1,"validate-event":!1,onKeydown:kt(Ce,["esc"])}),{footer:w(()=>[g("div",null,[t.clearable?(v(),D(A(qe),{key:0,class:q(A(r).be("footer","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[W($(A(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),y(A(qe),{plain:"",size:"small",class:q(A(r).be("footer","btn")),onClick:ne},{default:w(()=>[W($(A(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[A(e1),ge,b.value]])]),default:w(()=>[g("div",Kt({id:A(f),ref_key:"triggerRef",ref:b},re.$attrs,{class:F.value,role:"button","aria-label":R.value,"aria-labelledby":N.value,"aria-description":A(o)("el.colorpicker.description",{color:t.modelValue||""}),"aria-disabled":A(c),tabindex:A(c)?void 0:t.tabindex,onKeydown:oe,onFocus:ke[0]||(ke[0]=(...Ue)=>A(M)&&A(M)(...Ue)),onBlur:ke[1]||(ke[1]=(...Ue)=>A(P)&&A(P)(...Ue))}),[g("div",{class:q(A(r).be("picker","trigger")),onClick:Q},[g("span",{class:q([A(r).be("picker","color"),A(r).is("alpha",t.showAlpha)])},[g("span",{class:q(A(r).be("picker","color-inner")),style:Xe({backgroundColor:L.value})},[Re(y(A(_e),{class:q([A(r).be("picker","icon"),A(r).is("icon-arrow-down")])},{default:w(()=>[y(A(Fd))]),_:1},8,["class"]),[[Ht,t.modelValue||C.value]]),Re(y(A(_e),{class:q([A(r).be("picker","empty"),A(r).is("icon-close")])},{default:w(()=>[y(A(Bo))]),_:1},8,["class"]),[[Ht,!t.modelValue&&!C.value]])],6)],2)],2)],16,fpe)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),mpe=ppe;const Hd=Ut(mpe);var gpe=fe({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=hi(),s=Be("container"),i=U(()=>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(),E("section",{class:q([A(s).b(),A(s).is("vertical",i.value)])},[le(o.$slots,"default")],2))}}),vpe=gpe,ype=fe({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("aside"),s=U(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(v(),E("aside",{class:q(A(n).b()),style:Xe(s.value)},[le(i.$slots,"default")],6))}}),PV=ype,bpe=fe({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("footer"),s=U(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),E("footer",{class:q(A(n).b()),style:Xe(s.value)},[le(i.$slots,"default")],6))}}),IV=bpe,_pe=fe({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("header"),s=U(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),E("header",{class:q(A(n).b()),style:Xe(s.value)},[le(i.$slots,"default")],6))}}),LV=_pe,wpe=fe({name:"ElMain",__name:"main",setup(t){const e=Be("main");return(n,s)=>(v(),E("main",{class:q(A(e).b())},[le(n.$slots,"default")],2))}}),OV=wpe;const U1=Ut(vpe,{Aside:PV,Footer:IV,Header:LV,Main:OV}),j1=Is(PV);Is(IV);const W1=Is(LV),La=Is(OV),kpe=Ge({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:ue([Date,Array,String,Number]),default:""},defaultValue:{type:ue([Date,Array])},defaultTime:{type:ue([Date,Array])},isRange:Boolean,...a8,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:ue(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),f8=Symbol("rootPickerContextKey"),Y1="ElIsDefaultFormat",Cpe=["date","dates","year","years","month","months","week","range"],p8=Ge({cellClassName:{type:ue(Function)},disabledDate:{type:ue(Function)},date:{type:ue(Object),required:!0},minDate:{type:ue(Object)},maxDate:{type:ue(Object)},parsedValue:{type:ue([Object,Array])},rangeState:{type:ue(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),DV=Ge({type:{type:ue(String),required:!0,values:JZ},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}}),m8=Ge({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:ue(Array)}}),g8=t=>({type:String,values:Cpe,default:t}),xpe=Ge({...DV,parsedValue:{type:ue([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),s1=t=>{if(!Ee(t))return!1;const[e,n]=t;return dt.isDayjs(e)&&dt.isDayjs(n)&&dt(e).isValid()&&dt(n).isValid()&&e.isSameOrBefore(n)},s2=(t,{lang:e,step:n=1,unit:s,unlinkPanels:i})=>{let o;if(Ee(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)]},Spe=(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)}},xb=(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 HR(i.daysInMonth()).map(o=>i.add(o,"day").toDate())},jf=(t,e,n,s,i)=>{const o=dt().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=xb(t,e,n,s).find(a=>!(i!=null&&i(a)));return r?dt(r).locale(s):o.locale(s)},Sb=(t,e,n)=>{const s=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!xb(t,s,i,e).every(n))return jf(t,s,i,e,n);for(let o=0;o<12;o++)if(!xb(t,s,o,e).every(n))return jf(t,s,o,e,n);return t},Wf=(t,e,n,s)=>{if(Ee(t))return t.map(i=>Wf(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=Ge({...p8,showWeekNumber:Boolean,selectionMode:g8("date")}),Ape=["changerange","pick","select"],$b=(t="")=>["normal","today"].includes(t),Epe=(t,e)=>{const{lang:n}=Qt(),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(X=>X.toLowerCase()),d=U(()=>c>3?7-c:-c),h=U(()=>{const X=t.date.startOf("month");return X.subtract(X.day()||7,"day")}),f=U(()=>u.concat(u).slice(c,c+7)),p=U(()=>fb(A(x)).some(X=>X.isCurrent)),m=U(()=>{const X=t.date.startOf("month");return{startOfMonthDay:X.day()||7,dateCountOfMonth:X.daysInMonth(),dateCountOfLastMonth:X.subtract(1,"month").daysInMonth()}}),b=U(()=>t.selectionMode==="dates"?ao(t.parsedValue):[]),_=(X,{count:H,rowIndex:Q,columnIndex:ne})=>{const{startOfMonthDay:Z,dateCountOfMonth:ae,dateCountOfLastMonth:ge}=A(m),Ce=A(d);if(Q>=0&&Q<=1){const oe=Z+Ce<0?7+Z+Ce:Z+Ce;if(ne+Q*7>=oe)return X.text=H,!0;X.text=ge-(oe-ne%7)+1+Q*7,X.type="prev-month"}else return H<=ae?X.text=H:(X.text=H-ae,X.type="next-month"),!0;return!1},k=(X,{columnIndex:H,rowIndex:Q},ne)=>{const{disabledDate:Z,cellClassName:ae}=t,ge=A(b),Ce=_(X,{count:ne,rowIndex:Q,columnIndex:H}),oe=X.dayjs.toDate();return X.selected=ge.find(pe=>pe.isSame(X.dayjs,"day")),X.isSelected=!!X.selected,X.isCurrent=M(X),X.disabled=Z==null?void 0:Z(oe),X.customClass=ae==null?void 0:ae(oe),Ce},C=X=>{if(t.selectionMode==="week"){const[H,Q]=t.showWeekNumber?[1,7]:[0,6],ne=K(X[H+1]);X[H].inRange=ne,X[H].start=ne,X[Q].inRange=ne,X[Q].end=ne}},x=U(()=>{const{minDate:X,maxDate:H,rangeState:Q,showWeekNumber:ne}=t,Z=A(d),ae=A(a),ge="day";let Ce=1;if(Spe({row:6,column:7},ae,{startDate:X,columnIndexOffset:ne?1:0,nextEndDate:Q.endDate||H||Q.selecting&&X||null,now:dt().locale(A(n)).startOf(ge),unit:ge,relativeDateGetter:oe=>A(h).add(oe-Z,ge),setCellMetadata:(...oe)=>{k(...oe,Ce)&&(Ce+=1)},setRowMetadata:C}),ne)for(let oe=0;oe<6;oe++)ae[oe][1].dayjs&&(ae[oe][0]={type:"week",text:ae[oe][1].dayjs.week()});return ae});Me(()=>t.date,async()=>{var X;(X=A(s))!=null&&X.contains(document.activeElement)&&(await ot(),await S())});const S=async()=>{var X;return(X=A(i))==null?void 0:X.focus()},M=X=>t.selectionMode==="date"&&$b(X.type)&&P(X,t.parsedValue),P=(X,H)=>H?dt(H).locale(A(n)).isSame(t.date.date(Number(X.text)),"day"):!1,T=(X,H)=>{const Q=A(m).startOfMonthDay,ne=A(d),Z=Q+ne<0?7+Q+ne:Q+ne,ae=X*7+(H-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(Z,"day").add(ae,"day")},I=X=>{var Z;if(!t.rangeState.selecting)return;let H=X.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,ne=H.cellIndex;A(x)[Q][ne].disabled||(Q!==A(o)||ne!==A(r))&&(o.value=Q,r.value=ne,e("changerange",{selecting:!0,endDate:T(Q,ne)}))},L=X=>!A(p)&&(X==null?void 0:X.text)===1&&$b(X.type)||X.isCurrent,V=X=>{l||A(p)||t.selectionMode!=="date"||G(X,!0)},R=X=>{X.target.closest("td")&&(l=!0)},N=X=>{X.target.closest("td")&&(l=!1)},F=X=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:X,maxDate:null}),e("select",!0)):(X>=t.minDate?e("pick",{minDate:t.minDate,maxDate:X}):e("pick",{minDate:X,maxDate:t.minDate}),e("select",!1))},B=X=>{const H=X.week(),Q=`${X.year()}w${H}`;e("pick",{year:X.year(),week:H,value:Q,date:X.startOf("week")})},z=(X,H)=>{e("pick",H?ao(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==X.valueOf()):ao(t.parsedValue).concat([X]))},G=(X,H=!1)=>{if(t.disabled)return;const Q=X.target.closest("td");if(!Q)return;const ne=Q.parentNode.rowIndex-1,Z=Q.cellIndex,ae=A(x)[ne][Z];if(ae.disabled||ae.type==="week")return;const ge=T(ne,Z);switch(t.selectionMode){case"range":F(ge);break;case"date":e("pick",ge,H);break;case"week":B(ge);break;case"dates":z(ge,!!ae.selected);break}},K=X=>{if(t.selectionMode!=="week")return!1;let H=t.date.startOf("day");if(X.type==="prev-month"&&(H=H.subtract(1,"month")),X.type==="next-month"&&(H=H.add(1,"month")),H=H.date(Number.parseInt(X.text,10)),t.parsedValue&&!Ee(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:x,tbodyRef:s,currentCellRef:i,focus:S,isCurrent:M,isWeekActive:K,isSelectedCell:L,handlePickDate:G,handleMouseUp:N,handleMouseDown:R,handleMouseMove:I,handleFocus:V}},Mpe=(t,{isCurrent:e,isWeekActive:n})=>{const s=Be("date-table"),{t:i}=Qt(),o=U(()=>[s.b(),s.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),r=U(()=>i("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return $b(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&($b(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}},Tpe=Ge({cell:{type:ue(Object)}});var v8=fe({name:"ElDatePickerCell",props:Tpe,setup(t){const e=Be("date-table-cell"),{slots:n}=Ye(f8);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 Ppe=["aria-label"],Ipe=["aria-label"],Lpe=["aria-current","aria-selected","tabindex","aria-disabled"];var Ope=fe({__name:"basic-date-table",props:$pe,emits:Ape,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}=Epe(s,n),{tableLabel:_,tableKls:k,getCellClasses:C,getRowKls:x,weekHeaderClass:S,t:M}=Mpe(s,{isCurrent:c,isWeekActive:u});let P=!1;return wn(()=>{P=!0}),e({focus:l}),(T,I)=>(v(),E("table",{"aria-label":A(_),class:q(A(k)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:I[1]||(I[1]=(...L)=>A(h)&&A(h)(...L)),onMousemove:I[2]||(I[2]=(...L)=>A(m)&&A(m)(...L)),onMousedown:I[3]||(I[3]=(...L)=>A(p)&&A(p)(...L)),onMouseup:I[4]||(I[4]=(...L)=>A(f)&&A(f)(...L))},[g("tbody",{ref_key:"tbodyRef",ref:r},[g("tr",null,[T.showWeekNumber?(v(),E("th",{key:0,scope:"col",class:q(A(S))},null,2)):O("v-if",!0),(v(!0),E(te,null,we(A(i),(L,V)=>(v(),E("th",{key:V,"aria-label":A(M)("el.datepicker.weeksFull."+L),scope:"col"},$(A(M)("el.datepicker.weeks."+L)),9,Ipe))),128))]),(v(!0),E(te,null,we(A(o),(L,V)=>(v(),E("tr",{key:V,class:q(A(x)(T.showWeekNumber?L[2]:L[1]))},[(v(!0),E(te,null,we(L,(R,N)=>(v(),E("td",{key:`${V}.${N}`,ref_for:!0,ref:F=>!A(P)&&A(d)(R)&&(a.value=F),class:q(A(C)(R)),"aria-current":R.isCurrent?"date":void 0,"aria-selected":R.isCurrent,tabindex:T.disabled?void 0:A(d)(R)?0:-1,"aria-disabled":T.disabled,onFocus:I[0]||(I[0]=(...F)=>A(b)&&A(b)(...F))},[y(A(v8),{cell:R},null,8,["cell"])],42,Lpe))),128))],2))),128))],512)],42,Ppe))}}),SC=Ope;const Dpe=Ge({...p8,selectionMode:g8("month")}),Rpe=["aria-label"],Vpe=["aria-selected","aria-label","tabindex","onKeydown"];var Fpe=fe({__name:"basic-month-table",props:Dpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=t,i=n,o=Be("month-table"),{t:r,lang:a}=Qt(),l=J(),c=J(),u=J(s.date.locale("en").localeData().monthsShort().map(x=>x.toLowerCase())),d=J([[],[],[]]),h=J(),f=J(),p=U(()=>{var M,P,T;const x=d.value,S=dt().locale(a.value).startOf("month");for(let I=0;I<3;I++){const L=x[I];for(let V=0;V<4;V++){const R=L[V]||(L[V]={row:I,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=I*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")),(M=s.minDate)!=null&&M.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 z=F.toDate();R.text=N,R.disabled=((P=s.disabledDate)==null?void 0:P.call(s,z))||!1,R.date=z,R.customClass=(T=s.cellClassName)==null?void 0:T.call(s,z),R.dayjs=F,R.timestamp=F.valueOf(),R.isSelected=_(R)}}return x}),m=()=>{var x;(x=c.value)==null||x.focus()},b=x=>{const S={},M=s.date.year(),P=new Date,T=x.text;return S.disabled=s.disabled||(s.disabledDate?xb(s.date,M,T,a.value).every(s.disabledDate):!1),S.current=ao(s.parsedValue).some(I=>dt.isDayjs(I)&&I.year()===M&&I.month()===T),S.today=P.getFullYear()===M&&P.getMonth()===T,x.customClass&&(S[x.customClass]=!0),x.inRange&&(S["in-range"]=!0,x.start&&(S["start-date"]=!0),x.end&&(S["end-date"]=!0)),S},_=x=>{const S=s.date.year(),M=x.text;return ao(s.date).some(P=>P.year()===S&&P.month()===M)},k=x=>{var T;if(!s.rangeState.selecting)return;let S=x.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 M=S.parentNode.rowIndex,P=S.cellIndex;p.value[M][P].disabled||(M!==h.value||P!==f.value)&&(h.value=M,f.value=P,i("changerange",{selecting:!0,endDate:s.date.startOf("year").month(M*4+P)}))},C=x=>{var I;if(s.disabled)return;const S=(I=x.target)==null?void 0:I.closest("td");if((S==null?void 0:S.tagName)!=="TD"||hl(S,"disabled"))return;const M=S.cellIndex,P=S.parentNode.rowIndex*4+M,T=s.date.startOf("year").month(P);if(s.selectionMode==="months"){if(x.type==="keydown"){i("pick",ao(s.parsedValue),!1);return}const L=jf(s.date,s.date.year(),P,a.value,s.disabledDate);i("pick",hl(S,"current")?ao(s.parsedValue).filter(V=>(V==null?void 0:V.year())!==L.year()||(V==null?void 0:V.month())!==L.month()):ao(s.parsedValue).concat([dt(L)]))}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 Me(()=>s.date,async()=>{var x,S;(x=l.value)!=null&&x.contains(document.activeElement)&&(await ot(),(S=c.value)==null||S.focus())}),e({focus:m}),(x,S)=>(v(),E("table",{role:"grid","aria-label":A(r)("el.datepicker.monthTablePrompt"),class:q(A(o).b()),onClick:C,onMousemove:k},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),E(te,null,we(p.value,(M,P)=>(v(),E("tr",{key:P},[(v(!0),E(te,null,we(M,(T,I)=>(v(),E("td",{key:I,ref_for:!0,ref:L=>T.isSelected&&(c.value=L),class:q(b(T)),"aria-selected":!!T.isSelected,"aria-label":A(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[kt(Oe(C,["prevent","stop"]),["space"]),kt(Oe(C,["prevent","stop"]),["enter"])]},[y(A(v8),{cell:{...T,renderText:A(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Vpe))),128))]))),128))],512)],42,Rpe))}}),i1=Fpe;const Npe=Ge({...p8,selectionMode:g8("year")}),Bpe=["aria-label"],zpe=["aria-selected","aria-label","tabindex","onKeydown"];var Hpe=fe({__name:"basic-year-table",props:Npe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=(S,M)=>{const P=dt(String(S)).locale(M).startOf("year");return HR(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},i=t,o=n,r=Be("year-table"),{t:a,lang:l}=Qt(),c=J(),u=J(),d=U(()=>Math.floor(i.date.year()/10)*10),h=J([[],[],[]]),f=J(),p=J(),m=U(()=>{var P,T,I;const S=h.value,M=dt().locale(l.value).startOf("year");for(let L=0;L<3;L++){const V=S[L];for(let R=0;R<4&&!(L*4+R>=10);R++){let N=V[R];N||(N={row:L,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=L*4+R+d.value,B=dt().year(F),z=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;N.inRange=!!(i.minDate&&B.isSameOrAfter(i.minDate,"year")&&z&&B.isSameOrBefore(z,"year"))||!!(i.minDate&&B.isSameOrBefore(i.minDate,"year")&&z&&B.isSameOrAfter(z,"year")),(P=i.minDate)!=null&&P.isSameOrAfter(z)?(N.start=!!(z&&B.isSame(z,"year")),N.end=!!(i.minDate&&B.isSame(i.minDate,"year"))):(N.start=!!(i.minDate&&B.isSame(i.minDate,"year")),N.end=!!(z&&B.isSame(z,"year"))),M.isSame(B)&&(N.type="today"),N.text=F;const G=B.toDate();N.disabled=((T=i.disabledDate)==null?void 0:T.call(i,G))||!1,N.date=G,N.customClass=(I=i.cellClassName)==null?void 0:I.call(i,G),N.dayjs=B,N.timestamp=B.valueOf(),N.isSelected=k(N),V[R]=N}}return S}),b=()=>{var S;(S=u.value)==null||S.focus()},_=S=>{const M={},P=dt().locale(l.value),T=S.text;return M.disabled=i.disabled||(i.disabledDate?s(T,l.value).every(i.disabledDate):!1),M.today=P.year()===T,M.current=ao(i.parsedValue).some(I=>I.year()===T),S.customClass&&(M[S.customClass]=!0),S.inRange&&(M["in-range"]=!0,S.start&&(M["start-date"]=!0),S.end&&(M["end-date"]=!0)),M},k=S=>{const M=S.text;return ao(i.date).some(P=>P.year()===M)},C=S=>{var L;if(i.disabled)return;const M=(L=S.target)==null?void 0:L.closest("td");if(!M||!M.textContent||hl(M,"disabled"))return;const P=M.cellIndex,T=M.parentNode.rowIndex*4+P+d.value,I=dt().year(T);if(i.selectionMode==="range")i.rangeState.selecting?(i.minDate&&I>=i.minDate?o("pick",{minDate:i.minDate,maxDate:I}):o("pick",{minDate:I,maxDate:i.minDate}),o("select",!1)):(o("pick",{minDate:I,maxDate:null}),o("select",!0));else if(i.selectionMode==="years"){if(S.type==="keydown"){o("pick",ao(i.parsedValue),!1);return}const V=Sb(I.startOf("year"),l.value,i.disabledDate);o("pick",hl(M,"current")?ao(i.parsedValue).filter(R=>(R==null?void 0:R.year())!==T):ao(i.parsedValue).concat([V]))}else o("pick",T)},x=S=>{var I;if(!i.rangeState.selecting)return;const M=(I=S.target)==null?void 0:I.closest("td");if(!M)return;const P=M.parentNode.rowIndex,T=M.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 Me(()=>i.date,async()=>{var S,M;(S=c.value)!=null&&S.contains(document.activeElement)&&(await ot(),(M=u.value)==null||M.focus())}),e({focus:b}),(S,M)=>(v(),E("table",{role:"grid","aria-label":A(a)("el.datepicker.yearTablePrompt"),class:q(A(r).b()),onClick:C,onMousemove:x},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),E(te,null,we(m.value,(P,T)=>(v(),E("tr",{key:T},[(v(!0),E(te,null,we(P,(I,L)=>(v(),E("td",{key:`${T}_${L}`,ref_for:!0,ref:V=>I.isSelected&&(u.value=V),class:q(["available",_(I)]),"aria-selected":I.isSelected,"aria-label":String(I.text),tabindex:I.isSelected?0:-1,onKeydown:[kt(Oe(C,["prevent","stop"]),["space"]),kt(Oe(C,["prevent","stop"]),["enter"])]},[y(A(v8),{cell:I},null,8,["cell"])],42,zpe))),128))]))),128))],512)],42,Bpe))}}),o1=Hpe;const Upe=["disabled","onClick"],jpe=["aria-label","disabled"],Wpe=["aria-label","disabled"],Ype=["tabindex","aria-disabled"],qpe=["tabindex","aria-disabled"],Gpe=["aria-label","disabled"],Xpe=["aria-label","disabled"];var Kpe=fe({__name:"panel-date-pick",props:xpe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(ye,Le,ce)=>!0,s=t,i=e,o=Be("picker-panel"),r=Be("date-picker"),a=Ld(),l=hi(),{t:c,lang:u}=Qt(),d=Ye(Aa),h=Ye(Y1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:b}=d.props,_=Sn(d.props,"defaultValue"),k=J(),C=J(dt().locale(u.value)),x=J(!1);let S=!1;const M=U(()=>dt(b).locale(u.value)),P=U(()=>C.value.month()),T=U(()=>C.value.year()),I=J([]),L=J(null),V=J(null),R=ye=>I.value.length>0?n(ye,I.value,s.format||"HH:mm:ss"):!0,N=ye=>b&&!Ie.value&&!x.value&&!S?M.value.year(ye.year()).month(ye.month()).date(ye.date()):ie.value?ye.millisecond(0):ye.startOf("day"),F=(ye,...Le)=>{ye?Ee(ye)?i("pick",ye.map(N),...Le):i("pick",N(ye),...Le):i("pick",ye,...Le),L.value=null,V.value=null,x.value=!1,S=!1},B=async(ye,Le)=>{if(Q.value==="date"&&dt.isDayjs(ye)){const ce=Xp(s.parsedValue);let De=ce?ce.year(ye.year()).month(ye.month()).date(ye.date()):ye;R(De)||(De=I.value[0][0].year(ye.year()).month(ye.month()).date(ye.date())),C.value=De,F(De,ie.value||Le)}else Q.value==="week"?F(ye.date):Q.value==="dates"&&F(ye,!0)},z=ye=>{const Le=ye?"add":"subtract";C.value=C.value[Le](1,"month"),ft("month")},G=ye=>{const Le=C.value,ce=ye?"add":"subtract";C.value=K.value==="year"?Le[ce](10,"year"):Le[ce](1,"year"),ft("year")},K=J("date"),X=U(()=>{const ye=c("el.datepicker.year");if(K.value==="year"){const Le=Math.floor(T.value/10)*10;return ye?`${Le} ${ye} - ${Le+9} ${ye}`:`${Le} - ${Le+9}`}return`${T.value} ${ye}`}),H=ye=>{const Le=et(ye.value)?ye.value():ye.value;if(Le){S=!0,F(dt(Le).locale(u.value));return}ye.onClick&&ye.onClick({attrs:a,slots:l,emit:i})},Q=U(()=>{const{type:ye}=s;return["week","month","months","year","years","dates"].includes(ye)?ye:"date"}),ne=U(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),Z=U(()=>Q.value==="date"?K.value:Q.value),ae=U(()=>!!f.length),ge=async(ye,Le)=>{Q.value==="month"?(C.value=jf(C.value,C.value.year(),ye,u.value,p),F(C.value,!1)):Q.value==="months"?F(ye,Le??!0):(C.value=jf(C.value,C.value.year(),ye,u.value,p),K.value="date",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),gt())),ft("month")},Ce=async(ye,Le)=>{Q.value==="year"?(C.value=Sb(C.value.startOf("year").year(ye),u.value,p),F(C.value,!1)):Q.value==="years"?F(ye,Le??!0):(C.value=Sb(C.value.year(ye),u.value,p),K.value="month",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),gt())),ft("year")},oe=_s(),pe=async ye=>{oe.value||(K.value=ye,await ot(),gt())},ie=U(()=>s.type==="datetime"||s.type==="datetimerange"),re=U(()=>{const ye=ie.value||Q.value==="dates",Le=Q.value==="years",ce=Q.value==="months",De=K.value==="date",pt=K.value==="year",_n=K.value==="month";return ye&&De||Le&&pt||ce&&_n}),ke=U(()=>!ne.value&&s.showNow||s.showConfirm),Ue=U(()=>p?s.parsedValue?Ee(s.parsedValue)?p(s.parsedValue[0].toDate()):p(s.parsedValue.toDate()):!0:!1),ee=()=>{if(ne.value)F(s.parsedValue);else{let ye=Xp(s.parsedValue);if(!ye){const Le=dt(b).locale(u.value),ce=Pe();ye=Le.year(ce.year()).month(ce.month()).date(ce.date())}C.value=ye,F(ye)}},se=U(()=>p?p(dt().locale(u.value).toDate()):!1),me=()=>{const ye=dt().locale(u.value).toDate();x.value=!0,(!p||!p(ye))&&R(ye)&&(C.value=dt().locale(u.value),F(C.value))},$e=U(()=>s.timeFormat||jR(s.format)||Qg),Se=U(()=>s.dateFormat||UR(s.format)||fc),Ie=U(()=>{if(V.value)return V.value;if(!(!s.parsedValue&&!_.value))return(Xp(s.parsedValue)||C.value).format($e.value)}),je=U(()=>{if(L.value)return L.value;if(!(!s.parsedValue&&!_.value))return(Xp(s.parsedValue)||C.value).format(Se.value)}),Fe=J(!1),ze=()=>{Fe.value=!0},Ae=()=>{Fe.value=!1},Ze=ye=>({hour:ye.hour(),minute:ye.minute(),second:ye.second(),year:ye.year(),month:ye.month(),date:ye.date()}),We=(ye,Le,ce)=>{const{hour:De,minute:pt,second:_n}=Ze(ye),gs=Xp(s.parsedValue);C.value=gs?gs.hour(De).minute(pt).second(_n):ye,F(C.value,!0),ce||(Fe.value=Le)},it=ye=>{const Le=dt(ye,$e.value).locale(u.value);if(Le.isValid()&&R(Le)){const{year:ce,month:De,date:pt}=Ze(C.value);C.value=Le.year(ce).month(De).date(pt),V.value=null,Fe.value=!1,F(C.value,!0)}},be=ye=>{const Le=Wf(ye,Se.value,u.value,h);if(Le.isValid()){if(p&&p(Le.toDate()))return;const{hour:ce,minute:De,second:pt}=Ze(C.value);C.value=Le.hour(ce).minute(De).second(pt),L.value=null,F(C.value,!0)}},ve=ye=>dt.isDayjs(ye)&&ye.isValid()&&(p?!p(ye.toDate()):!0),Te=ye=>Wf(ye,s.format,u.value,h),Pe=()=>{const ye=dt(_.value).locale(u.value);if(!_.value){const Le=M.value;return dt().hour(Le.hour()).minute(Le.minute()).second(Le.second()).locale(u.value)}return ye},gt=()=>{var ye;["week","month","year","date"].includes(Q.value)&&((ye=k.value)==null||ye.focus())},Lt=()=>{gt(),Q.value==="week"&&ut(He.down)},Je=ye=>{const Le=ls(ye);[He.up,He.down,He.left,He.right,He.home,He.end,He.pageUp,He.pageDown].includes(Le)&&(ut(Le),ye.stopPropagation(),ye.preventDefault()),[He.enter,He.space,He.numpadEnter].includes(Le)&&L.value===null&&V.value===null&&(ye.preventDefault(),F(C.value,!1))},ut=ye=>{const{up:Le,down:ce,left:De,right:pt,home:_n,end:gs,pageUp:lu,pageDown:Fp}=He,Dl={year:{[Le]:-4,[ce]:4,[De]:-1,[pt]:1,offset:($n,Li)=>$n.setFullYear($n.getFullYear()+Li)},month:{[Le]:-4,[ce]:4,[De]:-1,[pt]:1,offset:($n,Li)=>$n.setMonth($n.getMonth()+Li)},week:{[Le]:-1,[ce]:1,[De]:-1,[pt]:1,offset:($n,Li)=>$n.setDate($n.getDate()+Li*7)},date:{[Le]:-7,[ce]:7,[De]:-1,[pt]:1,[_n]:$n=>-$n.getDay(),[gs]:$n=>-$n.getDay()+6,[lu]:$n=>-new Date($n.getFullYear(),$n.getMonth(),0).getDate(),[Fp]:$n=>new Date($n.getFullYear(),$n.getMonth()+1,0).getDate(),offset:($n,Li)=>$n.setDate($n.getDate()+Li)}},ia=C.value.toDate();for(;Math.abs(C.value.diff(ia,"year",!0))<1;){const $n=Dl[Z.value];if(!$n)return;if($n.offset(ia,et($n[ye])?$n[ye](ia):$n[ye]??0),p&&p(ia))break;const Li=dt(ia).locale(u.value);C.value=Li,i("pick",Li,!0);break}},ft=ye=>{i("panel-change",C.value.toDate(),ye,K.value)};return Me(()=>Q.value,ye=>{if(["month","year"].includes(ye)){K.value=ye;return}else if(ye==="years"){K.value="year";return}else if(ye==="months"){K.value="month";return}K.value="date"},{immediate:!0}),Me(()=>_.value,ye=>{ye&&(C.value=Pe())},{immediate:!0}),Me(()=>s.parsedValue,ye=>{if(ye){if(ne.value||Ee(ye))return;C.value=ye}else C.value=Pe()},{immediate:!0}),i("set-picker-option",["isValidValue",ve]),i("set-picker-option",["parseUserInput",Te]),i("set-picker-option",["handleFocusPicker",Lt]),(ye,Le)=>(v(),E("div",{class:q([A(o).b(),A(r).b(),A(o).is("border",ye.border),A(o).is("disabled",A(oe)),{"has-sidebar":ye.$slots.sidebar||ae.value,"has-time":ie.value}])},[g("div",{class:q(A(o).e("body-wrapper"))},[le(ye.$slots,"sidebar",{class:q(A(o).e("sidebar"))}),ae.value?(v(),E("div",{key:0,class:q(A(o).e("sidebar"))},[(v(!0),E(te,null,we(A(f),(ce,De)=>(v(),E("button",{key:De,type:"button",disabled:A(oe),class:q(A(o).e("shortcut")),onClick:pt=>H(ce)},$(ce.text),11,Upe))),128))],2)):O("v-if",!0),g("div",{class:q(A(o).e("body"))},[ie.value?(v(),E("div",{key:0,class:q(A(r).e("time-header"))},[g("span",{class:q(A(r).e("editor-wrap"))},[y(A(vt),{placeholder:A(c)("el.datepicker.selectDate"),"model-value":je.value,size:"small","validate-event":!1,disabled:A(oe),readonly:!ye.editable,onInput:Le[0]||(Le[0]=ce=>L.value=ce),onChange:be},null,8,["placeholder","model-value","disabled","readonly"])],2),Re((v(),E("span",{class:q(A(r).e("editor-wrap"))},[y(A(vt),{placeholder:A(c)("el.datepicker.selectTime"),"model-value":Ie.value,size:"small","validate-event":!1,disabled:A(oe),readonly:!ye.editable,onFocus:ze,onInput:Le[1]||(Le[1]=ce=>V.value=ce),onChange:it},null,8,["placeholder","model-value","disabled","readonly"]),y(A(wC),{visible:Fe.value,format:$e.value,"parsed-value":C.value,onPick:We},null,8,["visible","format","parsed-value"])],2)),[[A(e1),Ae]])],2)):O("v-if",!0),Re(g("div",{class:q([A(r).e("header"),(K.value==="year"||K.value==="month")&&A(r).em("header","bordered")])},[g("span",{class:q(A(r).e("prev-btn"))},[g("button",{type:"button","aria-label":A(c)("el.datepicker.prevYear"),class:q(["d-arrow-left",A(o).e("icon-btn")]),disabled:A(oe),onClick:Le[2]||(Le[2]=ce=>G(!1))},[le(ye.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,jpe),Re(g("button",{type:"button","aria-label":A(c)("el.datepicker.prevMonth"),class:q([A(o).e("icon-btn"),"arrow-left"]),disabled:A(oe),onClick:Le[3]||(Le[3]=ce=>z(!1))},[le(ye.$slots,"prev-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(yd))]),_:1})])],10,Wpe),[[Ht,K.value==="date"]])],2),g("span",{role:"button",class:q(A(r).e("header-label")),"aria-live":"polite",tabindex:ye.disabled?void 0:0,"aria-disabled":ye.disabled,onKeydown:Le[4]||(Le[4]=kt(ce=>pe("year"),["enter"])),onClick:Le[5]||(Le[5]=ce=>pe("year"))},$(X.value),43,Ype),Re(g("span",{role:"button","aria-live":"polite",tabindex:ye.disabled?void 0:0,"aria-disabled":ye.disabled,class:q([A(r).e("header-label"),{active:K.value==="month"}]),onKeydown:Le[6]||(Le[6]=kt(ce=>pe("month"),["enter"])),onClick:Le[7]||(Le[7]=ce=>pe("month"))},$(A(c)(`el.datepicker.month${P.value+1}`)),43,qpe),[[Ht,K.value==="date"]]),g("span",{class:q(A(r).e("next-btn"))},[Re(g("button",{type:"button","aria-label":A(c)("el.datepicker.nextMonth"),class:q([A(o).e("icon-btn"),"arrow-right"]),disabled:A(oe),onClick:Le[8]||(Le[8]=ce=>z(!0))},[le(ye.$slots,"next-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Fr))]),_:1})])],10,Gpe),[[Ht,K.value==="date"]]),g("button",{type:"button","aria-label":A(c)("el.datepicker.nextYear"),class:q([A(o).e("icon-btn"),"d-arrow-right"]),disabled:A(oe),onClick:Le[9]||(Le[9]=ce=>G(!0))},[le(ye.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,Xpe)],2)],2),[[Ht,K.value!=="time"]]),g("div",{class:q(A(o).e("content")),onKeydown:Je},[K.value==="date"?(v(),D(SC,{key:0,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":ye.parsedValue,"disabled-date":A(p),disabled:A(oe),"cell-class-name":A(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),K.value==="year"?(v(),D(o1,{key:1,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"disabled-date":A(p),disabled:A(oe),"parsed-value":ye.parsedValue,"cell-class-name":A(m),onPick:Ce},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):O("v-if",!0),K.value==="month"?(v(),D(i1,{key:2,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":ye.parsedValue,"disabled-date":A(p),disabled:A(oe),"cell-class-name":A(m),onPick:ge},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):O("v-if",!0)],34)],2)],2),ye.showFooter&&re.value&&ke.value?(v(),E("div",{key:0,class:q(A(o).e("footer"))},[Re(y(A(qe),{text:"",size:"small",class:q(A(o).e("link-btn")),disabled:se.value,onClick:me},{default:w(()=>[W($(A(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Ht,!ne.value&&ye.showNow]]),ye.showConfirm?(v(),D(A(qe),{key:0,plain:"",size:"small",class:q(A(o).e("link-btn")),disabled:Ue.value,onClick:ee},{default:w(()=>[W($(A(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),Zpe=Kpe;const Jpe=Ge({...DV,...m8}),Qpe=t=>{const{emit:e}=ht(),n=Ld(),s=hi();return o=>{const r=et(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})}},y8=(t,{defaultValue:e,defaultTime:n,leftDate:s,rightDate:i,step:o,unit:r,sortDates:a})=>{const{emit:l}=ht(),{pickerNs:c}=Ye(f8),u=Be("date-range-picker"),{t:d,lang:h}=Qt(),f=Qpe(h),p=J(),m=J(),b=J({endDate:null,selecting:!1}),_=M=>{b.value=M},k=(M=!1)=>{const P=A(p),T=A(m);s1([P,T])&&l("pick",[P,T],M)},C=M=>{b.value.selecting=M,M||(b.value.endDate=null)},x=M=>{if(Ee(M)&&M.length===2){const[P,T]=M;p.value=P,s.value=P,m.value=T,a(A(p),A(m))}else S()},S=()=>{let[M,P]=s2(A(e),{lang:A(h),step:o,unit:r,unlinkPanels:t.unlinkPanels});const T=L=>L.diff(L.startOf("d"),"ms"),I=A(n);if(I){let L=0,V=0;if(Ee(I)){const[R,N]=I.map(dt);L=T(R),V=T(N)}else{const R=T(dt(I));L=R,V=R}M=M.startOf("d").add(L,"ms"),P=P.startOf("d").add(V,"ms")}p.value=void 0,m.value=void 0,s.value=M,i.value=P};return Me(e,M=>{M&&S()},{immediate:!0}),Me(()=>t.parsedValue,M=>{(!(M!=null&&M.length)||!ji(M,[p.value,m.value]))&&x(M)},{immediate:!0}),Me(()=>t.visible,()=>{t.visible&&x(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:b,lang:h,ppNs:c,drpNs:u,handleChangeRange:_,handleRangeConfirm:k,handleShortcutClick:f,onSelect:C,parseValue:x,t:d}},eme=(t,e,n,s)=>{const i=J("date"),o=J(),r=J("date"),a=J(),{disabledDate:l}=Ye(Aa).props,{t:c,lang:u}=Qt(),d=U(()=>n.value.year()),h=U(()=>n.value.month()),f=U(()=>s.value.year()),p=U(()=>s.value.month());function m(S,M){const P=c("el.datepicker.year");if(S.value==="year"){const T=Math.floor(M.value/10)*10;return P?`${T} ${P} - ${T+9} ${P}`:`${T} - ${T+9}`}return`${M.value} ${P}`}function b(S){S==null||S.focus()}async function _(S,M){if(t.disabled)return;const P=S==="left"?i:r,T=S==="left"?o:a;P.value=M,await ot(),b(T.value)}async function k(S,M,P){if(t.disabled)return;const T=M==="left",I=T?n:s,L=T?s:n,V=T?i:r,R=T?o:a;S==="year"&&(I.value=Sb(I.value.year(P),u.value,l)),S==="month"&&(I.value=jf(I.value,I.value.year(),P,u.value,l)),t.unlinkPanels||(L.value=M==="left"?I.value.add(1,"month"):I.value.subtract(1,"month")),V.value=S==="year"?"month":"date",await ot(),b(R.value),C(S)}function C(S){e("panel-change",[n.value.toDate(),s.value.toDate()],S)}function x(S,M,P){const T=P?"add":"subtract";return S==="year"?M[T](10,"year"):M[T](1,"year")}return{leftCurrentView:i,rightCurrentView:r,leftCurrentViewRef:o,rightCurrentViewRef:a,leftYear:d,rightYear:f,leftMonth:h,rightMonth:p,leftYearLabel:U(()=>m(i,d)),rightYearLabel:U(()=>m(r,f)),showLeftPicker:S=>_("left",S),showRightPicker:S=>_("right",S),handleLeftYearPick:S=>k("year","left",S),handleRightYearPick:S=>k("year","right",S),handleLeftMonthPick:S=>k("month","left",S),handleRightMonthPick:S=>k("month","right",S),handlePanelChange:C,adjustDateByView:x}},tme=["disabled","onClick"],nme=["aria-label","disabled"],sme=["aria-label","disabled"],ime=["disabled","aria-label"],ome=["disabled","aria-label"],rme=["tabindex","aria-disabled"],ame=["tabindex","aria-disabled"],lme=["disabled","aria-label"],cme=["disabled","aria-label"],ume=["aria-label","disabled"],dme=["disabled","aria-label"],hme=["tabindex","aria-disabled"],fme=["tabindex","aria-disabled"],i0="month";var pme=fe({__name:"panel-date-range",props:Jpe,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,s=e,i=Ye(Aa),o=Ye(Y1,void 0),{disabledDate:r,cellClassName:a,defaultTime:l,clearable:c}=i.props,u=Sn(i.props,"format"),d=Sn(i.props,"shortcuts"),h=Sn(i.props,"defaultValue"),{lang:f}=Qt(),p=J(dt().locale(f.value)),m=J(dt().locale(f.value).add(1,i0)),{minDate:b,maxDate:_,rangeState:k,ppNs:C,drpNs:x,handleChangeRange:S,handleRangeConfirm:M,handleShortcutClick:P,onSelect:T,parseValue:I,t:L}=y8(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:i0,sortDates:Li});Me(()=>n.visible,nt=>{!nt&&k.value.selecting&&(I(n.parsedValue),T(!1))});const V=J({min:null,max:null}),R=J({min:null,max:null}),{leftCurrentView:N,rightCurrentView:F,leftCurrentViewRef:B,rightCurrentViewRef:z,leftYear:G,rightYear:K,leftMonth:X,rightMonth:H,leftYearLabel:Q,rightYearLabel:ne,showLeftPicker:Z,showRightPicker:ae,handleLeftYearPick:ge,handleRightYearPick:Ce,handleLeftMonthPick:oe,handleRightMonthPick:pe,handlePanelChange:ie,adjustDateByView:re}=eme(n,s,p,m),ke=U(()=>!!d.value.length),Ue=U(()=>V.value.min!==null?V.value.min:b.value?b.value.format(Se.value):""),ee=U(()=>V.value.max!==null?V.value.max:_.value||b.value?(_.value||b.value).format(Se.value):""),se=U(()=>R.value.min!==null?R.value.min:b.value?b.value.format($e.value):""),me=U(()=>R.value.max!==null?R.value.max:_.value||b.value?(_.value||b.value).format($e.value):""),$e=U(()=>n.timeFormat||jR(u.value||"")||Qg),Se=U(()=>n.dateFormat||UR(u.value||"")||fc),Ie=nt=>s1(nt)&&(r?!r(nt[0].toDate())&&!r(nt[1].toDate()):!0),je=()=>{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")},Ae=()=>{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")},Ze=()=>{p.value=re(N.value,p.value,!0),ie("year")},We=()=>{p.value=p.value.add(1,"month"),ie("month")},it=()=>{m.value=re(F.value,m.value,!1),ie("year")},be=()=>{m.value=m.value.subtract(1,"month"),ie("month")},ve=U(()=>{const nt=(X.value+1)%12,at=X.value+1>=12?1:0;return n.unlinkPanels&&new Date(G.value+at,nt)<new Date(K.value,H.value)}),Te=U(()=>n.unlinkPanels&&K.value*12+H.value-(G.value*12+X.value+1)>=12),Pe=_s(),gt=U(()=>!(b.value&&_.value&&!k.value.selecting&&s1([b.value,_.value])&&!Pe.value)),Lt=U(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(nt,at)=>{if(nt)return l?dt(l[at]||l).locale(f.value).year(nt.year()).month(nt.month()).date(nt.date()):nt},ut=(nt,at=!0)=>{const mt=nt.minDate,Go=nt.maxDate,Rl=Je(mt,0),cu=Je(Go,1);_.value===cu&&b.value===Rl||(s("calendar-change",[mt.toDate(),Go&&Go.toDate()]),_.value=cu,b.value=Rl,!Lt.value&&at&&(at=!Rl||!cu),M(at))},ft=J(!1),ye=J(!1),Le=()=>{ft.value=!1},ce=()=>{ye.value=!1},De=(nt,at)=>{V.value[at]=nt;const mt=dt(nt,Se.value).locale(f.value);if(mt.isValid()){if(r&&r(mt.toDate()))return;at==="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"))),Li(b.value,_.value),M(!0)}},pt=(nt,at)=>{V.value[at]=null},_n=(nt,at)=>{R.value[at]=nt;const mt=dt(nt,$e.value).locale(f.value);mt.isValid()&&(at==="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))},gs=(nt,at)=>{R.value[at]=null,at==="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)),M(!0)},lu=(nt,at,mt)=>{R.value.min||(nt&&(b.value=(b.value||p.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),mt||(ft.value=at),(!_.value||_.value.isBefore(b.value))&&(_.value=b.value,m.value=nt,ot(()=>{I(n.parsedValue)})),M(!0))},Fp=(nt,at,mt)=>{R.value.max||(nt&&(_.value=(_.value||m.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),mt||(ye.value=at),_.value&&_.value.isBefore(b.value)&&(b.value=_.value),M(!0))},Dl=()=>{ia(),s("clear")},ia=()=>{let nt=null;i!=null&&i.emptyValues&&(nt=i.emptyValues.valueOnClear.value),p.value=s2(A(h),{lang:A(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),_.value=void 0,b.value=void 0,M(!0),s("pick",nt)},$n=nt=>Wf(nt,u.value||"",f.value,o);function Li(nt,at){if(n.unlinkPanels&&at){const mt=(nt==null?void 0:nt.year())||0,Go=(nt==null?void 0:nt.month())||0,Rl=at.year(),cu=at.month();m.value=mt===Rl&&Go===cu?at.add(1,i0):at}else m.value=p.value.add(1,i0),at&&(m.value=m.value.hour(at.hour()).minute(at.minute()).second(at.second()))}return s("set-picker-option",["isValidValue",Ie]),s("set-picker-option",["parseUserInput",$n]),s("set-picker-option",["handleClear",ia]),(nt,at)=>(v(),E("div",{class:q([A(C).b(),A(x).b(),A(C).is("border",nt.border),A(C).is("disabled",A(Pe)),{"has-sidebar":nt.$slots.sidebar||ke.value,"has-time":Lt.value}])},[g("div",{class:q(A(C).e("body-wrapper"))},[le(nt.$slots,"sidebar",{class:q(A(C).e("sidebar"))}),ke.value?(v(),E("div",{key:0,class:q(A(C).e("sidebar"))},[(v(!0),E(te,null,we(d.value,(mt,Go)=>(v(),E("button",{key:Go,type:"button",disabled:A(Pe),class:q(A(C).e("shortcut")),onClick:Rl=>A(P)(mt)},$(mt.text),11,tme))),128))],2)):O("v-if",!0),g("div",{class:q(A(C).e("body"))},[Lt.value?(v(),E("div",{key:0,class:q(A(x).e("time-header"))},[g("span",{class:q(A(x).e("editors-wrap"))},[g("span",{class:q(A(x).e("time-picker-wrap"))},[y(A(vt),{size:"small",disabled:A(k).selecting||A(Pe),placeholder:A(L)("el.datepicker.startDate"),class:q(A(x).e("editor")),"model-value":Ue.value,"validate-event":!1,readonly:!nt.editable,onInput:at[0]||(at[0]=mt=>De(mt,"min")),onChange:at[1]||(at[1]=mt=>pt(mt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),Re((v(),E("span",{class:q(A(x).e("time-picker-wrap"))},[y(A(vt),{size:"small",class:q(A(x).e("editor")),disabled:A(k).selecting||A(Pe),placeholder:A(L)("el.datepicker.startTime"),"model-value":se.value,"validate-event":!1,readonly:!nt.editable,onFocus:at[2]||(at[2]=mt=>ft.value=!0),onInput:at[3]||(at[3]=mt=>_n(mt,"min")),onChange:at[4]||(at[4]=mt=>gs(mt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),y(A(wC),{visible:ft.value,format:$e.value,"datetime-role":"start","parsed-value":A(b)||p.value,onPick:lu},null,8,["visible","format","parsed-value"])],2)),[[A(e1),Le]])],2),g("span",null,[y(A(_e),null,{default:w(()=>[y(A(Fr))]),_:1})]),g("span",{class:q([A(x).e("editors-wrap"),"is-right"])},[g("span",{class:q(A(x).e("time-picker-wrap"))},[y(A(vt),{size:"small",class:q(A(x).e("editor")),disabled:A(k).selecting||A(Pe),placeholder:A(L)("el.datepicker.endDate"),"model-value":ee.value,readonly:!A(b)||!nt.editable,"validate-event":!1,onInput:at[5]||(at[5]=mt=>De(mt,"max")),onChange:at[6]||(at[6]=mt=>pt(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Re((v(),E("span",{class:q(A(x).e("time-picker-wrap"))},[y(A(vt),{size:"small",class:q(A(x).e("editor")),disabled:A(k).selecting||A(Pe),placeholder:A(L)("el.datepicker.endTime"),"model-value":me.value,readonly:!A(b)||!nt.editable,"validate-event":!1,onFocus:at[7]||(at[7]=mt=>A(b)&&(ye.value=!0)),onInput:at[8]||(at[8]=mt=>_n(mt,"max")),onChange:at[9]||(at[9]=mt=>gs(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),y(A(wC),{"datetime-role":"end",visible:ye.value,format:$e.value,"parsed-value":A(_)||m.value,onPick:Fp},null,8,["visible","format","parsed-value"])],2)),[[A(e1),ce]])],2)],2)):O("v-if",!0),g("div",{class:q([[A(C).e("content"),A(x).e("content")],"is-left"])},[g("div",{class:q(A(x).e("header"))},[g("button",{type:"button",class:q([A(C).e("icon-btn"),"d-arrow-left"]),"aria-label":A(L)("el.datepicker.prevYear"),disabled:A(Pe),onClick:je},[le(nt.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,nme),Re(g("button",{type:"button",class:q([A(C).e("icon-btn"),"arrow-left"]),"aria-label":A(L)("el.datepicker.prevMonth"),disabled:A(Pe),onClick:Fe},[le(nt.$slots,"prev-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(yd))]),_:1})])],10,sme),[[Ht,A(N)==="date"]]),nt.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!Te.value||A(Pe),class:q([[A(C).e("icon-btn"),A(C).is("disabled",!Te.value||A(Pe))],"d-arrow-right"]),"aria-label":A(L)("el.datepicker.nextYear"),onClick:Ze},[le(nt.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,ime)):O("v-if",!0),nt.unlinkPanels&&A(N)==="date"?(v(),E("button",{key:1,type:"button",disabled:!ve.value||A(Pe),class:q([[A(C).e("icon-btn"),A(C).is("disabled",!ve.value||A(Pe))],"arrow-right"]),"aria-label":A(L)("el.datepicker.nextMonth"),onClick:We},[le(nt.$slots,"next-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Fr))]),_:1})])],10,ome)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:q(A(x).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[10]||(at[10]=kt(mt=>A(Z)("year"),["enter"])),onClick:at[11]||(at[11]=mt=>A(Z)("year"))},$(A(Q)),43,rme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([A(x).e("header-label"),{active:A(N)==="month"}]),onKeydown:at[12]||(at[12]=kt(mt=>A(Z)("month"),["enter"])),onClick:at[13]||(at[13]=mt=>A(Z)("month"))},$(A(L)(`el.datepicker.month${p.value.month()+1}`)),43,ame),[[Ht,A(N)==="date"]])])],2),A(N)==="date"?(v(),D(SC,{key:0,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"range",date:p.value,"min-date":A(b),"max-date":A(_),"range-state":A(k),"disabled-date":A(r),"cell-class-name":A(a),"show-week-number":nt.showWeekNumber,disabled:A(Pe),onChangerange:A(S),onPick:ut,onSelect:A(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),A(N)==="year"?(v(),D(o1,{key:1,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"year",date:p.value,"disabled-date":A(r),"parsed-value":nt.parsedValue,disabled:A(Pe),onPick:A(ge)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),A(N)==="month"?(v(),D(i1,{key:2,ref_key:"leftCurrentViewRef",ref:B,"selection-mode":"month",date:p.value,"parsed-value":nt.parsedValue,"disabled-date":A(r),disabled:A(Pe),onPick:A(oe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2),g("div",{class:q([[A(C).e("content"),A(x).e("content")],"is-right"])},[g("div",{class:q(A(x).e("header"))},[nt.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!Te.value||A(Pe),class:q([[A(C).e("icon-btn"),A(C).is("disabled",!Te.value||A(Pe))],"d-arrow-left"]),"aria-label":A(L)("el.datepicker.prevYear"),onClick:it},[le(nt.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,lme)):O("v-if",!0),nt.unlinkPanels&&A(F)==="date"?(v(),E("button",{key:1,type:"button",disabled:!ve.value||A(Pe),class:q([[A(C).e("icon-btn"),A(C).is("disabled",!ve.value||A(Pe))],"arrow-left"]),"aria-label":A(L)("el.datepicker.prevMonth"),onClick:be},[le(nt.$slots,"prev-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(yd))]),_:1})])],10,cme)):O("v-if",!0),g("button",{type:"button","aria-label":A(L)("el.datepicker.nextYear"),class:q([A(C).e("icon-btn"),"d-arrow-right"]),disabled:A(Pe),onClick:ze},[le(nt.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,ume),Re(g("button",{type:"button",class:q([A(C).e("icon-btn"),"arrow-right"]),disabled:A(Pe),"aria-label":A(L)("el.datepicker.nextMonth"),onClick:Ae},[le(nt.$slots,"next-month",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Fr))]),_:1})])],10,dme),[[Ht,A(F)==="date"]]),g("div",null,[g("span",{role:"button",class:q(A(x).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[14]||(at[14]=kt(mt=>A(ae)("year"),["enter"])),onClick:at[15]||(at[15]=mt=>A(ae)("year"))},$(A(ne)),43,hme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([A(x).e("header-label"),{active:A(F)==="month"}]),onKeydown:at[16]||(at[16]=kt(mt=>A(ae)("month"),["enter"])),onClick:at[17]||(at[17]=mt=>A(ae)("month"))},$(A(L)(`el.datepicker.month${m.value.month()+1}`)),43,fme),[[Ht,A(F)==="date"]])])],2),A(F)==="date"?(v(),D(SC,{key:0,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"range",date:m.value,"min-date":A(b),"max-date":A(_),"range-state":A(k),"disabled-date":A(r),"cell-class-name":A(a),"show-week-number":nt.showWeekNumber,disabled:A(Pe),onChangerange:A(S),onPick:ut,onSelect:A(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),A(F)==="year"?(v(),D(o1,{key:1,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"year",date:m.value,"disabled-date":A(r),"parsed-value":nt.parsedValue,disabled:A(Pe),onPick:A(Ce)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),A(F)==="month"?(v(),D(i1,{key:2,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"month",date:m.value,"parsed-value":nt.parsedValue,"disabled-date":A(r),disabled:A(Pe),onPick:A(pe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2)],2)],2),nt.showFooter&&Lt.value&&(nt.showConfirm||A(c))?(v(),E("div",{key:0,class:q(A(C).e("footer"))},[A(c)?(v(),D(A(qe),{key:0,text:"",size:"small",class:q(A(C).e("link-btn")),onClick:Dl},{default:w(()=>[W($(A(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),nt.showConfirm?(v(),D(A(qe),{key:1,plain:"",size:"small",class:q(A(C).e("link-btn")),disabled:gt.value,onClick:at[18]||(at[18]=mt=>A(M)(!1))},{default:w(()=>[W($(A(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),mme=pme;const gme=Ge({...m8}),vme=["pick","set-picker-option","calendar-change"],yme=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:s}=Qt();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:U(()=>`${e.value.year()} ${s("el.datepicker.year")}`),rightLabel:U(()=>`${n.value.year()} ${s("el.datepicker.year")}`),leftYear:U(()=>e.value.year()),rightYear:U(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year())}},bme=["disabled","onClick"],_me=["disabled"],wme=["disabled"],kme=["disabled"],Cme=["disabled"],o0="year";var xme=fe({name:"DatePickerMonthRange",__name:"panel-month-range",props:gme,emits:vme,setup(t,{emit:e}){const n=t,s=e,{lang:i}=Qt(),o=Ye(Aa),r=Ye(Y1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Sn(o.props,"format"),d=Sn(o.props,"defaultValue"),h=J(dt().locale(i.value)),f=J(dt().locale(i.value).add(1,o0)),{minDate:p,maxDate:m,rangeState:b,ppNs:_,drpNs:k,handleChangeRange:C,handleRangeConfirm:x,handleShortcutClick:S,onSelect:M,parseValue:P}=y8(n,{defaultValue:d,leftDate:h,rightDate:f,unit:o0,sortDates:Q}),T=U(()=>!!a.length),{leftPrevYear:I,rightNextYear:L,leftNextYear:V,rightPrevYear:R,leftLabel:N,rightLabel:F,leftYear:B,rightYear:z}=yme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:h,rightDate:f}),G=U(()=>n.unlinkPanels&&z.value>B.value+1),K=(Z,ae=!0)=>{const ge=Z.minDate,Ce=Z.maxDate;m.value===Ce&&p.value===ge||(s("calendar-change",[ge.toDate(),Ce&&Ce.toDate()]),m.value=Ce,p.value=ge,ae&&x())},X=()=>{let Z=null;o!=null&&o.emptyValues&&(Z=o.emptyValues.valueOnClear.value),h.value=s2(A(d),{lang:A(i),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),s("pick",Z)},H=Z=>Wf(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,o0):ae:f.value=h.value.add(1,o0)}const ne=_s();return Me(()=>n.visible,Z=>{!Z&&b.value.selecting&&(P(n.parsedValue),M(!1))}),s("set-picker-option",["isValidValue",s1]),s("set-picker-option",["parseUserInput",H]),s("set-picker-option",["handleClear",X]),(Z,ae)=>(v(),E("div",{class:q([A(_).b(),A(k).b(),A(_).is("border",Z.border),A(_).is("disabled",A(ne)),{"has-sidebar":!!Z.$slots.sidebar||T.value}])},[g("div",{class:q(A(_).e("body-wrapper"))},[le(Z.$slots,"sidebar",{class:q(A(_).e("sidebar"))}),T.value?(v(),E("div",{key:0,class:q(A(_).e("sidebar"))},[(v(!0),E(te,null,we(A(a),(ge,Ce)=>(v(),E("button",{key:Ce,type:"button",class:q(A(_).e("shortcut")),disabled:A(ne),onClick:oe=>A(S)(ge)},$(ge.text),11,bme))),128))],2)):O("v-if",!0),g("div",{class:q(A(_).e("body"))},[g("div",{class:q([[A(_).e("content"),A(k).e("content")],"is-left"])},[g("div",{class:q(A(k).e("header"))},[g("button",{type:"button",class:q([A(_).e("icon-btn"),"d-arrow-left"]),disabled:A(ne),onClick:ae[0]||(ae[0]=(...ge)=>A(I)&&A(I)(...ge))},[le(Z.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,_me),Z.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!G.value||A(ne),class:q([[A(_).e("icon-btn"),A(_).is("disabled",!G.value||A(ne))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...ge)=>A(V)&&A(V)(...ge))},[le(Z.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,wme)):O("v-if",!0),g("div",null,$(A(N)),1)],2),y(i1,{"selection-mode":"range",date:h.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(l),disabled:A(ne),"cell-class-name":A(c),onChangerange:A(C),onPick:K,onSelect:A(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:q([[A(_).e("content"),A(k).e("content")],"is-right"])},[g("div",{class:q(A(k).e("header"))},[Z.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!G.value||A(ne),class:q([[A(_).e("icon-btn"),A(_).is("disabled",!G.value||A(ne))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...ge)=>A(R)&&A(R)(...ge))},[le(Z.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,kme)):O("v-if",!0),g("button",{type:"button",class:q([A(_).e("icon-btn"),"d-arrow-right"]),disabled:A(ne),onClick:ae[3]||(ae[3]=(...ge)=>A(L)&&A(L)(...ge))},[le(Z.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,Cme),g("div",null,$(A(F)),1)],2),y(i1,{"selection-mode":"range",date:f.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(l),disabled:A(ne),"cell-class-name":A(c),onChangerange:A(C),onPick:K,onSelect:A(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Sme=xme;const $me=Ge({...m8}),Ame=["pick","set-picker-option","calendar-change"],Eme=({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:U(()=>{const a=Math.floor(e.value.year()/10)*10;return`${a}-${a+9}`}),rightLabel:U(()=>{const a=Math.floor(n.value.year()/10)*10;return`${a}-${a+9}`}),leftYear:U(()=>Math.floor(e.value.year()/10)*10+9),rightYear:U(()=>Math.floor(n.value.year()/10)*10)}),Mme=["disabled","onClick"],Tme=["disabled"],Pme=["disabled"],Ime=["disabled"],Lme=["disabled"],ch=10,Kp="year";var Ome=fe({name:"DatePickerYearRange",__name:"panel-year-range",props:$me,emits:Ame,setup(t,{emit:e}){const n=t,s=e,{lang:i}=Qt(),o=J(dt().locale(i.value)),r=J(dt().locale(i.value).add(ch,Kp)),a=Ye(Y1,void 0),l=Ye(Aa),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Sn(l.props,"format"),f=Sn(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:b,ppNs:_,drpNs:k,handleChangeRange:C,handleRangeConfirm:x,handleShortcutClick:S,onSelect:M,parseValue:P}=y8(n,{defaultValue:f,leftDate:o,rightDate:r,step:ch,unit:Kp,sortDates:Ce}),{leftPrevYear:T,rightNextYear:I,leftNextYear:L,rightPrevYear:V,leftLabel:R,rightLabel:N,leftYear:F,rightYear:B}=Eme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:o,rightDate:r}),z=_s(),G=U(()=>!!c.length),K=U(()=>[_.b(),k.b(),_.is("border",n.border),_.is("disabled",z.value),{"has-sidebar":!!hi().sidebar||G.value}]),X=U(()=>({content:[_.e("content"),k.e("content"),"is-left"],arrowLeftBtn:[_.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[_.e("icon-btn"),_.is("disabled",!Q.value||z.value),"d-arrow-right"]})),H=U(()=>({content:[_.e("content"),k.e("content"),"is-right"],arrowLeftBtn:[_.e("icon-btn"),_.is("disabled",!Q.value||z.value),"d-arrow-left"],arrowRightBtn:[_.e("icon-btn"),"d-arrow-right"]})),Q=U(()=>n.unlinkPanels&&B.value>F.value+1),ne=(oe,pe=!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,pe&&x())},Z=oe=>Wf(oe,h.value,i.value,a),ae=oe=>s1(oe)&&(u?!u(oe[0].toDate())&&!u(oe[1].toDate()):!0),ge=()=>{let oe=null;l!=null&&l.emptyValues&&(oe=l.emptyValues.valueOnClear.value);const pe=s2(A(f),{lang:A(i),step:ch,unit:Kp,unlinkPanels:n.unlinkPanels});o.value=pe[0],r.value=pe[1],s("pick",oe)};function Ce(oe,pe){if(n.unlinkPanels&&pe){const ie=(oe==null?void 0:oe.year())||0,re=pe.year();r.value=ie+ch>re?pe.add(ch,Kp):pe}else r.value=o.value.add(ch,Kp)}return Me(()=>n.visible,oe=>{!oe&&b.value.selecting&&(P(n.parsedValue),M(!1))}),s("set-picker-option",["isValidValue",ae]),s("set-picker-option",["parseUserInput",Z]),s("set-picker-option",["handleClear",ge]),(oe,pe)=>(v(),E("div",{class:q(K.value)},[g("div",{class:q(A(_).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:q(A(_).e("sidebar"))}),G.value?(v(),E("div",{key:0,class:q(A(_).e("sidebar"))},[(v(!0),E(te,null,we(A(c),(ie,re)=>(v(),E("button",{key:re,type:"button",class:q(A(_).e("shortcut")),disabled:A(z),onClick:ke=>A(S)(ie)},$(ie.text),11,Mme))),128))],2)):O("v-if",!0),g("div",{class:q(A(_).e("body"))},[g("div",{class:q(X.value.content)},[g("div",{class:q(A(k).e("header"))},[g("button",{type:"button",class:q(X.value.arrowLeftBtn),disabled:A(z),onClick:pe[0]||(pe[0]=(...ie)=>A(T)&&A(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,Tme),oe.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!Q.value||A(z),class:q(X.value.arrowRightBtn),onClick:pe[1]||(pe[1]=(...ie)=>A(L)&&A(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,Pme)):O("v-if",!0),g("div",null,$(A(R)),1)],2),y(o1,{"selection-mode":"range",date:o.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(u),disabled:A(z),"cell-class-name":A(d),onChangerange:A(C),onPick:ne,onSelect:A(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:q(H.value.content)},[g("div",{class:q(A(k).e("header"))},[oe.unlinkPanels?(v(),E("button",{key:0,type:"button",disabled:!Q.value||A(z),class:q(H.value.arrowLeftBtn),onClick:pe[2]||(pe[2]=(...ie)=>A(V)&&A(V)(...ie))},[le(oe.$slots,"prev-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Nc))]),_:1})])],10,Ime)):O("v-if",!0),g("button",{type:"button",class:q(H.value.arrowRightBtn),disabled:A(z),onClick:pe[3]||(pe[3]=(...ie)=>A(I)&&A(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[y(A(_e),null,{default:w(()=>[y(A(Bc))]),_:1})])],10,Lme),g("div",null,$(A(N)),1)],2),y(o1,{"selection-mode":"range",date:r.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(u),disabled:A(z),"cell-class-name":A(d),onChangerange:A(C),onPick:ne,onSelect:A(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Dme=Ome;const Rme=function(t){switch(t){case"daterange":case"datetimerange":return mme;case"monthrange":return Sme;case"yearrange":return Dme;default:return Zpe}};var RV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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)}}})})(RV);var Vme=RV.exports;const Fme=pi(Vme);var VV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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)}}})})(VV);var Nme=VV.exports;const Bme=pi(Nme);var FV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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}}})})(FV);var zme=FV.exports;const Hme=pi(zme);var NV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,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")}}})})(NV);var Ume=NV.exports;const jme=pi(Ume);var BV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,function(){return function(n,s){s.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(BV);var Wme=BV.exports;const Yme=pi(Wme);var zV={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Cs,function(){return function(n,s){s.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(zV);var qme=zV.exports;const Gme=pi(qme);function Xme(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}dt.extend(Xhe);dt.extend(Fme);dt.extend(iV);dt.extend(Bme);dt.extend(Hme);dt.extend(jme);dt.extend(Yme);dt.extend(Gme);var Kme=fe({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:kpe,emits:[Mt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:s}){const i=Be("picker-panel");en(Ye(Aa,void 0))&&Pt(Aa,{props:In({...go(t)})}),Pt(f8,{slots:e,pickerNs:i});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=Ye(BR,()=>qR(t,n),!0);return()=>y(Rme(t.type),Kt(z_(s,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),Xme(e)?e:{default:()=>[e]})}});const Zme=Ut(Kme),Jme=Ge({...YR,type:{type:ue(String),default:"date"}});function Qme(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}var ege=fe({name:"ElDatePicker",install:null,props:Jme,emits:[Mt],setup(t,{expose:e,emit:n,slots:s}){Pt(Y1,U(()=>!t.format)),Pt(NR,In(Sn(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(Mt,r)};return()=>{const r=t.format??(Wde[t.type]||fc);return y(ehe,Kt(t,{format:r,type:t.type,ref:i,"onUpdate:modelValue":o}),{default:a=>y(Zme,Kt({disabled:t.disabled,editable:t.editable,border:!1},a),Qme(s)?s:{default:()=>[s]}),"range-separator":s["range-separator"]})}}});const Ud=Ut(ege),HV=Ge({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"}}),tge={close:()=>!0},UV=Ge({...HV,appendToBody:Boolean,appendTo:{type:A4.to.type,default:"body"},beforeClose:{type:ue(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:ue([String,Object]),default:void 0}}),jV={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Mt]:t=>Jn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},nge=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:ue([String,Array,Object])},zIndex:{type:ue([String,Number])}}),sge={click:t=>t instanceof MouseEvent},ige="overlay";var oge=fe({name:"ElOverlay",props:nge,emits:sge,setup(t,{slots:e,emit:n}){const s=Be(ige),i=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=B4(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")],$w.STYLE|$w.CLASS|$w.PROPS,["onClick","onMouseup","onMousedown"]):bt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(e,"default")])}});const b8=oge,WV=Symbol("dialogInjectionKey"),Bw="dialog-fade",rge="ElDialog",YV=(t,e)=>{const n=ht().emit,{nextZIndex:s}=Y_();let i="";const o=_r(),r=_r(),a=J(!1),l=J(!1),c=J(!1),u=J(t.zIndex??s()),d=J(!1);let h,f;const p=Kc(),m=U(()=>{var H;return((H=p.value)==null?void 0:H.namespace)??Qm}),b=U(()=>{var H;return(H=p.value)==null?void 0:H.dialog}),_=U(()=>{const H={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(H[`${Q}-margin-top`]=t.top);const ne=ui(t.width);ne&&(H[`${Q}-width`]=ne)}return H}),k=U(()=>{var H;return(t.draggable??((H=b.value)==null?void 0:H.draggable)??!1)&&!t.fullscreen}),C=U(()=>{var H;return t.alignCenter??((H=b.value)==null?void 0:H.alignCenter)??!1}),x=U(()=>{var H;return t.overflow??((H=b.value)==null?void 0:H.overflow)??!1}),S=U(()=>C.value?{display:"flex"}:{}),M=U(()=>{var ne;const H=t.transition??((ne=b.value)==null?void 0:ne.transition)??Bw,Q={name:H,onAfterEnter:P,onBeforeLeave:I,onAfterLeave:T};if(yt(H)){const Z={...H},ae=(ge,Ce)=>oe=>{Ee(ge)?ge.forEach(pe=>{et(pe)&&pe(oe)}):et(ge)&&ge(oe),Ce()};return Z.onAfterEnter=ae(Z.onAfterEnter,P),Z.onBeforeLeave=ae(Z.onBeforeLeave,I),Z.onAfterLeave=ae(Z.onAfterLeave,T),Z.name||(Z.name=Bw,Tt(rge,`transition.name is missing when using object syntax, fallback to '${Bw}'`)),Z}return Q});function P(){n("opened")}function T(){n("closed"),n(Mt,!1),t.destroyOnClose&&(c.value=!1),d.value=!1}function I(){d.value=!0,n("close")}function L(){f==null||f(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=Gk(()=>F(),t.openDelay):F()}function V(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=Gk(()=>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(){Gt&&(a.value=!0)}function B(){a.value=!1}function z(){n("openAutoFocus")}function G(){n("closeAutoFocus")}function K(H){var Q;((Q=H.detail)==null?void 0:Q.focusReason)==="pointer"&&H.preventDefault()}t.lockScroll&&P4(a);function X(){t.closeOnPressEscape&&R()}return Me(()=>t.zIndex,()=>{u.value=t.zIndex??s()}),Me(()=>t.modelValue,H=>{H?(l.value=!1,d.value=!1,L(),c.value=!0,u.value=t.zIndex??s(),ot(()=>{n("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):a.value&&V()}),Me(()=>t.fullscreen,H=>{e.value&&(H?(i=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=i)}),Ft(()=>{t.modelValue&&(a.value=!0,c.value=!0,L())}),{afterEnter:P,afterLeave:T,beforeLeave:I,handleClose:R,onModalClick:N,close:V,doClose:B,onOpenAutoFocus:z,onCloseAutoFocus:G,onCloseRequested:X,onFocusoutPrevented:K,titleId:o,bodyId:r,closed:l,style:_,overlayDialogStyle:S,rendered:c,visible:a,zIndex:u,transitionConfig:M,_draggable:k,_alignCenter:C,_overflow:x,closing:d}},_8=(...t)=>e=>{t.forEach(n=>{n.value=e})},age=["aria-level"],lge=["aria-label"],cge=["id"];var uge=fe({name:"ElDialogContent",__name:"dialog-content",props:HV,emits:tge,setup(t,{expose:e}){const{t:n}=Qt(),{Close:s}=Gle,i=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=Ye(WV),{focusTrapRef:u}=Ye($R),d=_8(u,o),h=U(()=>!!i.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=kD(o,r,h,U(()=>!!i.overflow)),b=U(()=>[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}),(_,k)=>(v(),E("div",{ref:A(d),class:q(b.value),style:Xe(A(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:q([A(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[le(_.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:q(A(l).e("title"))},$(t.title),11,age)]),t.showClose?(v(),E("button",{key:0,"aria-label":A(n)("el.dialog.close"),class:q(A(l).e("headerbtn")),type:"button",onClick:k[0]||(k[0]=C=>_.$emit("close"))},[y(A(_e),{class:q(A(l).e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||A(s))))]),_:1},8,["class"])],10,lge)):O("v-if",!0)],2),g("div",{id:A(a),class:q([A(l).e("body"),t.bodyClass])},[le(_.$slots,"default")],10,cge),_.$slots.footer?(v(),E("footer",{key:0,class:q([A(l).e("footer"),t.footerClass])},[le(_.$slots,"footer")],2)):O("v-if",!0)],6))}}),dge=uge;const hge=["aria-label","aria-labelledby","aria-describedby"];var fge=fe({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:UV,emits:jV,setup(t,{expose:e}){const n=t,s=hi();dl({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"},U(()=>!!s.title));const i=Be("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:k,handleClose:C,onModalClick:x,onOpenAutoFocus:S,onCloseAutoFocus:M,onCloseRequested:P,onFocusoutPrevented:T,closing:I}=YV(n,o);Pt(WV,{dialogRef:o,headerRef:r,bodyId:u,ns:i,rendered:f,style:d});const L=B4(x),V=U(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var N;(N=a.value)==null||N.resetPosition()},handleClose:C}),(N,F)=>(v(),D(A(K_),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[y(Ho,Kt(A(p),{persisted:""}),{default:w(()=>[Re(y(A(b8),{"custom-mask-event":"",mask:t.modal,"overlay-class":[t.modalClass??"",`${A(i).namespace.value}-modal-dialog`,A(i).is("penetrable",V.value)],"z-index":A(m)},{default:w(()=>[g("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:A(c),"aria-describedby":A(u),class:q([`${A(i).namespace.value}-overlay-dialog`,A(i).is("closing",A(I))]),style:Xe(A(h)),onClick:F[0]||(F[0]=(...B)=>A(L).onClick&&A(L).onClick(...B)),onMousedown:F[1]||(F[1]=(...B)=>A(L).onMousedown&&A(L).onMousedown(...B)),onMouseup:F[2]||(F[2]=(...B)=>A(L).onMouseup&&A(L).onMouseup(...B))},[y(A(H1),{loop:"",trapped:A(l),"focus-start-el":"container",onFocusAfterTrapped:A(S),onFocusAfterReleased:A(M),onFocusoutPrevented:A(T),onReleaseRequested:A(P)},{default:w(()=>[A(f)?(v(),D(dge,Kt({key:0,ref_key:"dialogContentRef",ref:a},N.$attrs,{center:t.center,"align-center":A(_),"close-icon":t.closeIcon,draggable:A(b),overflow:A(k),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:A(C)}),fs({header:w(()=>[N.$slots.title?le(N.$slots,"title",{key:1}):le(N.$slots,"header",{key:0,close:A(C),titleId:A(c),titleClass:A(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,hge)]),_:3},8,["mask","overlay-class","z-index"]),[[Ht,A(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),pge=fge;const xs=Ut(pge),mge=Ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:ue(String),default:"solid"}});var gge=fe({name:"ElDivider",__name:"divider",props:mge,setup(t){const e=t,n=Be("divider"),s=U(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(v(),E("div",{class:q([A(n).b(),A(n).m(t.direction)]),style:Xe(s.value),role:"separator"},[i.$slots.default&&t.direction!=="vertical"?(v(),E("div",{key:0,class:q([A(n).e("text"),A(n).is(t.contentPosition)])},[le(i.$slots,"default")],2)):O("v-if",!0)],6))}}),vge=gge;const qV=Ut(vge),yge=Ge({...UV,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"}}),bge={...jV,"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 _ge(t,e,n){const{width:s,height:i}=Tie(),o=U(()=>["ltr","rtl"].includes(t.direction)),r=U(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=U(()=>o.value?s.value:i.value),l=U(()=>hD(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 x=(S=e.value)==null?void 0:S.closest('[aria-modal="true"]');return x?o.value?x.offsetWidth:x.offsetHeight:100};Me(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,k()});const b=x=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[x.pageX,x.pageY],d.value=!0,n("resize-start",x,c.value),p.push(Hn(window,"mouseup",k),Hn(window,"mousemove",_)))},_=x=>{const{pageX:S,pageY:M}=x,P=S-f[0],T=M-f[1];u.value=o.value?P:T,n("resize",x,l.value)},k=x=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(S=>S==null?void 0:S()),p=[],x&&n("resize-end",x,c.value))},C=Hn(e,"mousedown",b);return wn(()=>{C(),k()}),{size:U(()=>h.value?`${l.value}px`:ui(t.size)),isResizing:d,isHorizontal:o}}const wge=["aria-label","aria-labelledby","aria-describedby"],kge=["id","aria-level"],Cge=["aria-label"],xge=["id"];var Sge=fe({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:yge,emits:bge,setup(t,{expose:e,emit:n}){const s=t,i=n,o=hi();dl({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"},U(()=>!!o.title));const r=J(),a=J(),l=J(),c=Be("drawer"),{t:u}=Qt(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:b,bodyId:_,zIndex:k,onModalClick:C,onOpenAutoFocus:x,onCloseAutoFocus:S,onFocusoutPrevented:M,onCloseRequested:P,handleClose:T}=YV(s,r),{isHorizontal:I,size:L,isResizing:V}=_ge(s,l,i),R=U(()=>s.modalPenetrable&&!s.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(N,F)=>(v(),D(A(K_),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[y(Ho,{name:A(c).b("fade"),onAfterEnter:A(d),onAfterLeave:A(h),onBeforeLeave:A(f),persisted:""},{default:w(()=>[Re(y(A(b8),{mask:t.modal,"overlay-class":[A(c).is("drawer"),t.modalClass??"",`${A(c).namespace.value}-modal-drawer`,A(c).is("penetrable",R.value)],"z-index":A(k),onClick:A(C)},{default:w(()=>[y(A(H1),{loop:"",trapped:A(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:A(x),onFocusAfterReleased:A(S),onFocusoutPrevented:A(M),onReleaseRequested:A(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:A(b),"aria-describedby":A(_)},N.$attrs,{class:[A(c).b(),t.direction,A(p)&&"open",A(c).is("dragging",A(V))],style:{[A(I)?"width":"height"]:A(L)},role:"dialog",onClick:F[1]||(F[1]=Oe(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:q(A(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),E("header",{key:0,class:q([A(c).e("header"),t.headerClass])},[N.$slots.title?le(N.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(N.$slots,"header",{key:0,close:A(T),titleId:A(b),titleClass:A(c).e("title")},()=>[g("span",{id:A(b),role:"heading","aria-level":t.headerAriaLevel,class:q(A(c).e("title"))},$(t.title),11,kge)]),t.showClose?(v(),E("button",{key:2,"aria-label":A(u)("el.drawer.close"),class:q(A(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...B)=>A(T)&&A(T)(...B))},[y(A(_e),{class:q(A(c).e("close"))},{default:w(()=>[y(A(Bo))]),_:1},8,["class"])],10,Cge)):O("v-if",!0)],2)):O("v-if",!0),A(m)?(v(),E("div",{key:1,id:A(_),class:q([A(c).e("body"),t.bodyClass])},[le(N.$slots,"default")],10,xge)):O("v-if",!0),N.$slots.footer?(v(),E("div",{key:2,class:q([A(c).e("footer"),t.footerClass])},[le(N.$slots,"footer")],2)):O("v-if",!0),t.resizable?(v(),E("div",{key:3,ref_key:"draggerRef",ref:l,style:Xe({zIndex:A(k)}),class:q(A(c).e("dragger"))},null,6)):O("v-if",!0)],16,wge)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Ht,A(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),$ge=Sge;const Tl=Ut($ge),B0=Ge({trigger:{...$c.trigger,type:ue([String,Array])},triggerKeys:{type:ue(Array),default:()=>[He.enter,He.numpadEnter,He.space,He.down]},virtualTriggering:$c.virtualTriggering,virtualRef:$c.virtualRef,effect:{...zn.effect,default:"light"},type:{type:ue(String)},placement:{type:ue(String),default:"bottom"},popperOptions:{type:ue(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:ue([Number,String]),default:0},maxHeight:{type:ue([Number,String]),default:""},popperClass:zn.popperClass,popperStyle:zn.popperStyle,disabled:Boolean,role:{type:String,values:gR,default:"menu"},buttonProps:{type:ue(Object)},teleported:zn.teleported,appendTo:zn.appendTo,persistent:{type:Boolean,default:!0}}),GV=Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ds}}),Age=Ge({onKeydown:{type:ue(Function)}}),i2=Symbol("elDropdown"),XV="elDropdown";var Ege=fe({inheritAttrs:!1});function Mge(t,e,n,s,i,o){return le(t.$slots,"default")}var Tge=fi(Ege,[["render",Mge]]),Pge=fe({name:"ElCollectionItem",inheritAttrs:!1});function Ige(t,e,n,s,i,o){return le(t.$slots,"default")}var Lge=fi(Pge,[["render",Ige]]);const KV="data-el-collection-item",Oge=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({},Tge,{name:e,setup(){const o=J(),r=new Map;Pt(s,{itemMap:r,getItems:()=>{const l=A(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${KV}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},Lge,{name:n,setup(o,{attrs:r}){const a=J(),l=Ye(s,void 0);Pt(i,{collectionItemRef:a}),Ft(()=>{const c=A(a);c&&l.itemMap.set(c,{ref:c,...r})}),wn(()=>{const c=A(a);l.itemMap.delete(c)})}})}},Dge=Ge({style:{type:ue([String,Array,Object])},currentTabId:{type:ue(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:ue(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Rge,ElCollectionItem:Vge,COLLECTION_INJECTION_KEY:ZV,COLLECTION_ITEM_INJECTION_KEY:Fge}=Oge("RovingFocusGroup"),w8=Symbol("elRovingFocusGroup"),JV=Symbol("elRovingFocusGroupItem"),Nge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Bge=(t,e)=>{if(e!=="rtl")return t;switch(t){case He.right:return He.left;case He.left:return He.right;default:return t}},zge=(t,e,n)=>{const s=Bge(ls(t),n);if(!(e==="vertical"&&[He.left,He.right].includes(s))&&!(e==="horizontal"&&[He.up,He.down].includes(s)))return Nge[s]},Hge=(t,e)=>t.map((n,s)=>t[(s+e)%t.length]),bA=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},_A="currentTabIdChange",wA="rovingFocusGroup.entryFocus",Uge={bubbles:!1,cancelable:!0};var jge=fe({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Dge,emits:[_A,"entryFocus"],setup(t,{emit:e}){const n=J((t.currentTabId||t.defaultCurrentTabId)??null),s=J(!1),i=J(!1),o=J(),{getItems:r}=Ye(ZV,void 0),a=U(()=>[{outline:"none"},t.style]),l=m=>{e(_A,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=!A(i),{target:_,currentTarget:k}=m;if(_===k&&b&&!A(s)){const C=new Event(wA,Uge);if(k==null||k.dispatchEvent(C),!C.defaultPrevented){const x=r().filter(S=>S.focusable);bA([x.find(S=>S.active),x.find(S=>S.id===A(n)),...x].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=zge(m);if(b){m.preventDefault();let _=r().filter(k=>k.focusable).map(k=>k.ref);switch(b){case"last":_.reverse();break;case"prev":case"next":{b==="prev"&&_.reverse();const k=_.indexOf(m.currentTarget);_=t.loop?Hge(_,k+1):_.slice(k+1);break}}ot(()=>{bA(_)})}};Pt(w8,{currentTabbedId:Oc(n),loop:Sn(t,"loop"),tabIndex:U(()=>A(s)?-1:0),rovingFocusGroupRef:o,rovingFocusGroupRootStyle:a,orientation:Sn(t,"orientation"),dir:Sn(t,"dir"),onItemFocus:l,onItemShiftTab:c,onBlur:h,onFocus:d,onMousedown:u,onKeydown:p}),Me(()=>t.currentTabId,m=>{n.value=m??null}),Hn(o,wA,f)}});function Wge(t,e,n,s,i,o){return le(t.$slots,"default")}var Yge=fi(jge,[["render",Wge]]),qge=fe({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Rge,ElRovingFocusGroupImpl:Yge}});function Gge(t,e,n,s,i,o){const r=Y("el-roving-focus-group-impl"),a=Y("el-focus-group-collection");return v(),D(a,null,{default:w(()=>[y(r,Qh(sf(t.$attrs)),{default:w(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var Xge=fi(qge,[["render",Gge]]),Kge=fe({components:{ElRovingFocusCollectionItem:Vge},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}=Ye(w8,void 0),r=_r(),a=J(),l=As(h=>{e("mousedown",h)},h=>{t.focusable?s(A(r)):h.preventDefault()}),c=As(h=>{e("focus",h)},()=>{s(A(r))}),u=As(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(ls(h)===He.tab&&f){i();return}p===m&&o(h)}),d=U(()=>n.value===A(r));return Pt(JV,{rovingFocusGroupItemRef:a,tabIndex:U(()=>A(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function Zge(t,e,n,s,i,o){const r=Y("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 Jge=fi(Kge,[["render",Zge]]),Qge=Xge;const{ButtonGroup:e1e}=qe;var t1e=fe({name:"ElDropdown",components:{ElButton:qe,ElButtonGroup:e1e,ElScrollbar:Pi,ElTooltip:Ls,ElRovingFocusGroup:Qge,ElOnlyChild:_R,ElIcon:_e,ArrowDown:Fd},props:B0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=ht(),s=Be("dropdown"),{t:i}=Qt(),o=J(),r=J(),a=J(),l=J(),c=J(null),u=J(null),d=J(!1),h=U(()=>({maxHeight:ui(t.maxHeight)})),f=U(()=>[s.m(x.value)]),p=U(()=>Us(t.trigger)),m=_r().value,b=U(()=>t.id||m);function _(){var N;(N=a.value)==null||N.onClose(void 0,0)}function k(){var N;(N=a.value)==null||N.onClose()}function C(){var N;(N=a.value)==null||N.onOpen()}const x=Ti();function S(...N){e("command",...N)}function M(){}function P(){const N=A(l);p.value.includes("hover")&&(N==null||N.focus({preventScroll:!0})),u.value=null}function T(N){u.value=N}function I(){e("visible-change",!0)}function L(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 Pt(i2,{contentRef:l,role:U(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:M,onItemLeave:P,handleClose:k}),Pt(XV,{instance:n,dropdownSize:x,handleClick:_,commandHandler:S,trigger:Sn(t,"trigger"),hideOnClick:Sn(t,"hideOnClick")}),{t:i,ns:s,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:x,triggerId:b,currentTabId:u,handleCurrentTabIdChange:T,handlerMainButtonClick:N=>{e("click",N)},handleClose:k,handleOpen:C,handleBeforeShowTooltip:I,handleShowTooltip:L,handleBeforeHideTooltip:V,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function n1e(t,e,n,s,i,o){const r=Y("el-roving-focus-group"),a=Y("el-scrollbar"),l=Y("el-only-child"),c=Y("el-tooltip"),u=Y("el-button"),d=Y("arrow-down"),h=Y("el-icon"),f=Y("el-button-group");return v(),E("div",{class:q([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},fs({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:q(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 s1e=fi(t1e,[["render",n1e]]),i1e=fe({name:"DropdownItemImpl",components:{ElIcon:_e},props:GV,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Be("dropdown"),{role:s}=Ye(i2,void 0),{collectionItemRef:i}=Ye(Fge,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=Ye(JV,void 0),u=_8(i,o),d=U(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),h=As(f=>{const p=ls(f);if([He.enter,He.numpadEnter,He.space].includes(p))return f.preventDefault(),f.stopImmediatePropagation(),e("clickimpl",f),!0},l);return{ns:n,itemRef:u,dataset:{[KV]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const o1e=["aria-disabled","tabindex","role"];function r1e(t,e,n,s,i,o){const r=Y("el-icon");return v(),E(te,null,[t.divided?(v(),E("li",{key:0,role:"separator",class:q(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]=Oe((...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(Ct(t.icon)))])]),_:3})):O("v-if",!0),le(t.$slots,"default")],16,o1e)],64)}var a1e=fi(i1e,[["render",r1e]]);const QV=()=>{const t=Ye(XV,{});return{elDropdown:t,_elDropdownSize:U(()=>t==null?void 0:t.dropdownSize)}};var l1e=fe({name:"ElDropdownItem",components:{ElRovingFocusItem:Jge,ElDropdownItemImpl:a1e},inheritAttrs:!1,props:GV,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:s}=QV(),i=ht(),{onItemEnter:o,onItemLeave:r}=Ye(i2,void 0),a=As(c=>(e("pointermove",c),c.defaultPrevented),p$(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),p$(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:U(()=>({...t,...n}))}}});function c1e(t,e,n,s,i,o){const r=Y("el-dropdown-item-impl"),a=Y("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}),fs({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 eF=fi(l1e,[["render",c1e]]),u1e=fe({name:"ElDropdownMenu",props:Age,setup(t){const e=Be("dropdown"),{_elDropdownSize:n}=QV(),s=n.value,{contentRef:i,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=Ye(i2,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=Ye(w8,void 0),{collectionRef:m}=Ye(ZV,void 0),b=U(()=>[e.b("menu"),e.bm("menu",s==null?void 0:s.value)]),_=_8(i,c,m),k=As(x=>{var S;(S=t.onKeydown)==null||S.call(t,x)},x=>{const{currentTarget:S,target:M}=x,P=ls(x);if(S.contains(M),He.tab===P)return l();f(x)});function C(x){a.value&&h(x)}return{size:s,rovingFocusGroupRootStyle:u,dropdownKls:b,role:o,triggerId:r,dropdownListWrapperRef:_,handleKeydown:k,onBlur:d,handleFocus:C,onMousedown:p}}});const d1e=["role","aria-labelledby"];function h1e(t,e,n,s,i,o){return v(),E("ul",{ref:t.dropdownListWrapperRef,class:q(t.dropdownKls),style:Xe(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]=Oe((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Oe((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,d1e)}var tF=fi(u1e,[["render",h1e]]);const Oa=Ut(s1e,{DropdownItem:eF,DropdownMenu:tF}),Da=Is(eF),Ra=Is(tF),f1e=Ge({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:ue([String,Object])},previewSrcList:{type:ue(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:ue(String)}}),p1e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>_t(t),close:()=>!0,show:()=>!0},m1e=Ge({urlList:{type:ue(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:ue(String)}}),g1e={close:()=>!0,error:t=>t instanceof Event,switch:t=>_t(t),rotate:t=>_t(t)},v1e=["src","crossorigin"];var y1e=fe({name:"ElImageViewer",__name:"image-viewer",props:m1e,emits:g1e,setup(t,{expose:e,emit:n}){const s={CONTAIN:{name:"contain",icon:Mi(cR)},ORIGINAL:{name:"original",icon:Mi(Ple)}},i=t,o=n;let r;const{t:a}=Qt(),l=Be("image-viewer"),{nextZIndex:c}=Y_(),u=J(),d=J(),h=p_(),f=U(()=>{const{scale:ie,minScale:re,maxScale:ke}=i;return hD(ie,re,ke)}),p=J(!0),m=J(!1),b=J(!1),_=J(i.initialIndex),k=Fn(s.CONTAIN),C=J({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),x=J(i.zIndex??c());P4(b,{ns:l});const S=U(()=>{const{urlList:ie}=i;return ie.length<=1}),M=U(()=>_.value===0),P=U(()=>_.value===i.urlList.length-1),T=U(()=>i.urlList[_.value]),I=U(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!i.infinite&&M.value)]),L=U(()=>[l.e("btn"),l.e("next"),l.is("disabled",!i.infinite&&P.value)]),V=U(()=>{const{scale:ie,deg:re,offsetX:ke,offsetY:Ue,enableTransition:ee}=C.value;let se=ke/ie,me=Ue/ie;const $e=re*Math.PI/180,Se=Math.cos($e),Ie=Math.sin($e);se=se*Se+me*Ie,me=me*Se-ke/ie*Ie;const je={transform:`scale(${ie}) rotate(${re}deg) translate(${se}px, ${me}px)`,transition:ee?"transform .3s":""};return k.value.name===s.CONTAIN.name&&(je.maxWidth=je.maxHeight="100%"),je}),R=U(()=>`${_.value+1} / ${i.urlList.length}`);function N(){B(),r==null||r(),b.value=!1,o("close")}function F(){const ie=Wv(ke=>{switch(ls(ke)){case He.esc:i.closeOnPressEscape&&N();break;case He.space:Q();break;case He.left:Z();break;case He.up:ge("zoomIn");break;case He.right:ae();break;case He.down:ge("zoomOut");break}}),re=Wv(ke=>{ge((ke.deltaY||ke.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});h.run(()=>{Hn(document,"keydown",ie),Hn(u,"wheel",re)})}function B(){h.stop()}function z(){p.value=!1}function G(ie){m.value=!0,p.value=!1,o("error",ie),ie.target.alt=a("el.image.error")}function K(ie){if(p.value||ie.button!==0||!u.value)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,Ue=ie.pageX,ee=ie.pageY,se=Wv(Se=>{C.value={...C.value,offsetX:re+Se.pageX-Ue,offsetY:ke+Se.pageY-ee}}),me=Hn(document,"mousemove",se),$e=Hn(document,"mouseup",()=>{me(),$e()});ie.preventDefault()}function X(ie){if(p.value||!u.value||ie.touches.length!==1)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,{pageX:Ue,pageY:ee}=ie.touches[0],se=Wv(Se=>{const Ie=Se.touches[0];C.value={...C.value,offsetX:re+Ie.pageX-Ue,offsetY:ke+Ie.pageY-ee}}),me=Hn(document,"touchmove",se),$e=Hn(document,"touchend",()=>{me(),$e()});ie.preventDefault()}function H(){C.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=gb(s),re=Object.values(s),ke=k.value.name;k.value=s[ie[(re.findIndex(Ue=>Ue.name===ke)+1)%ie.length]],H()}function ne(ie){m.value=!1;const re=i.urlList.length;_.value=(ie+re)%re}function Z(){M.value&&!i.infinite||ne(_.value-1)}function ae(){P.value&&!i.infinite||ne(_.value+1)}function ge(ie,re={}){if(p.value||m.value)return;const{minScale:ke,maxScale:Ue}=i,{zoomRate:ee,rotateDeg:se,enableTransition:me}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...re};switch(ie){case"zoomOut":C.value.scale>ke&&(C.value.scale=Number.parseFloat((C.value.scale/ee).toFixed(3)));break;case"zoomIn":C.value.scale<Ue&&(C.value.scale=Number.parseFloat((C.value.scale*ee).toFixed(3)));break;case"clockwise":C.value.deg+=se,o("rotate",C.value.deg);break;case"anticlockwise":C.value.deg-=se,o("rotate",C.value.deg);break}C.value.enableTransition=me}function Ce(ie){var re;((re=ie.detail)==null?void 0:re.focusReason)==="pointer"&&ie.preventDefault()}function oe(){i.closeOnPressEscape&&N()}function pe(ie){if(ie.ctrlKey){if(ie.deltaY<0)return ie.preventDefault(),!1;if(ie.deltaY>0)return ie.preventDefault(),!1}}return Me(()=>f.value,ie=>{C.value.scale=ie}),Me(T,()=>{ot(()=>{var ie;(ie=d.value)!=null&&ie.complete||(p.value=!0)})}),Me(_,ie=>{H(),o("switch",ie)}),Ft(()=>{b.value=!0,F(),r=Hn("wheel",pe,{passive:!1})}),e({setActiveItem:ne}),(ie,re)=>(v(),D(A(K_),{to:"body",disabled:!t.teleported},{default:w(()=>[y(Ho,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:q(A(l).e("wrapper")),style:Xe({zIndex:x.value})},[y(A(H1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:Ce,onReleaseRequested:oe},{default:w(()=>[g("div",{class:q(A(l).e("mask")),onClick:re[0]||(re[0]=Oe(ke=>t.hideOnClickModal&&N(),["self"]))},null,2),O(" CLOSE "),g("span",{class:q([A(l).e("btn"),A(l).e("close")]),onClick:N},[y(A(_e),null,{default:w(()=>[y(A(Bo))]),_:1})],2),O(" ARROW "),S.value?O("v-if",!0):(v(),E(te,{key:0},[g("span",{class:q(I.value),onClick:Z},[y(A(_e),null,{default:w(()=>[y(A(yd))]),_:1})],2),g("span",{class:q(L.value),onClick:ae},[y(A(_e),null,{default:w(()=>[y(A(Fr))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),E("div",{key:1,class:q([A(l).e("btn"),A(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:_.value,total:t.urlList.length},()=>[W($(R.value),1)])],2)):O("v-if",!0),O(" ACTIONS "),g("div",{class:q([A(l).e("btn"),A(l).e("actions")])},[g("div",{class:q(A(l).e("actions__inner"))},[le(ie.$slots,"toolbar",{actions:ge,prev:Z,next:ae,reset:Q,activeIndex:_.value,setActiveItem:ne},()=>[y(A(_e),{onClick:re[1]||(re[1]=ke=>ge("zoomOut"))},{default:w(()=>[y(A(qle))]),_:1}),y(A(_e),{onClick:re[2]||(re[2]=ke=>ge("zoomIn"))},{default:w(()=>[y(A(pR))]),_:1}),g("i",{class:q(A(l).e("actions__divider"))},null,2),y(A(_e),{onClick:Q},{default:w(()=>[(v(),D(Ct(k.value.icon)))]),_:1}),g("i",{class:q(A(l).e("actions__divider"))},null,2),y(A(_e),{onClick:re[3]||(re[3]=ke=>ge("anticlockwise"))},{default:w(()=>[y(A(hR))]),_:1}),y(A(_e),{onClick:re[4]||(re[4]=ke=>ge("clockwise"))},{default:w(()=>[y(A(Mle))]),_:1})])],2)],2),O(" CANVAS "),g("div",{class:q(A(l).e("canvas"))},[m.value&&ie.$slots["viewer-error"]?le(ie.$slots,"viewer-error",{key:0,activeIndex:_.value,src:T.value}):(v(),E("img",{ref_key:"imgRef",ref:d,key:T.value,src:T.value,style:Xe(V.value),class:q(A(l).e("img")),crossorigin:t.crossorigin,onLoad:z,onError:G,onMousedown:K,onTouchstart:X},null,46,v1e))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),b1e=y1e;const nF=Ut(b1e),_1e=["src","loading","crossorigin"],w1e={key:0};var k1e=fe({name:"ElImage",inheritAttrs:!1,__name:"image",props:f1e,emits:p1e,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Qt(),r=Be("image"),a=Ld(),l=U(()=>Of(Object.entries(a).filter(([G])=>/^(data-|on[A-Z])/i.test(G)||["id","style"].includes(G)))),c=U_({excludeListeners:!0,excludeKeys:U(()=>Object.keys(l.value))}),u=J(),d=J(!1),h=J(!0),f=J(!1),p=J(),m=J(),b=Gt&&"loading"in HTMLImageElement.prototype;let _;const k=U(()=>[r.e("inner"),x.value&&r.e("preview"),h.value&&r.is("loading")]),C=U(()=>{const{fit:G}=s;return Gt&&G?{objectFit:G}:{}}),x=U(()=>{const{previewSrcList:G}=s;return Ee(G)&&G.length>0}),S=U(()=>{const{previewSrcList:G,initialIndex:K}=s;let X=K;return K>G.length-1&&(X=0),X}),M=U(()=>s.loading==="eager"?!1:!b&&s.loading==="lazy"||s.lazy),P=()=>{Gt&&(h.value=!0,d.value=!1,u.value=s.src)};function T(G){h.value=!1,d.value=!1,i("load",G)}function I(G){h.value=!1,d.value=!0,i("error",G)}function L(G){G&&(P(),N())}const V=_ie(L,200,!0);async function R(){if(!Gt)return;await ot();const{scrollContainer:G}=s;if(Po(G))m.value=G;else if(Ke(G)&&G!=="")m.value=document.querySelector(G)??void 0;else if(p.value){const X=Hie(p.value);m.value=rie(X)?void 0:X}const{stop:K}=Aie(p,([X])=>{V(X.isIntersecting)},{root:m});_=K}function N(){!Gt||!V||(_==null||_(),m.value=void 0,_=void 0)}function F(){x.value&&(f.value=!0,i("show"))}function B(){f.value=!1,i("close")}function z(G){i("switch",G)}return Me(()=>s.src,()=>{M.value?(h.value=!0,d.value=!1,N(),R()):P()}),Ft(()=>{M.value?R():P()}),e({showPreview:F}),(G,K)=>(v(),E("div",Kt({ref_key:"container",ref:p},l.value,{class:[A(r).b(),G.$attrs.class]}),[d.value?le(G.$slots,"error",{key:0},()=>[g("div",{class:q(A(r).e("error"))},$(A(o)("el.image.error")),3)]):(v(),E(te,{key:1},[u.value!==void 0?(v(),E("img",Kt({key:0},A(c),{src:u.value,loading:t.loading,style:C.value,class:k.value,crossorigin:t.crossorigin,onClick:F,onLoad:T,onError:I}),null,16,_1e)):O("v-if",!0),h.value?(v(),E("div",{key:1,class:q(A(r).e("wrapper"))},[le(G.$slots,"placeholder",{},()=>[g("div",{class:q(A(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),x.value?(v(),E(te,{key:2},[f.value?(v(),D(A(nF),{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:z},fs({toolbar:w(X=>[le(G.$slots,"toolbar",Qh(sf(X)))]),default:w(()=>[G.$slots.viewer?(v(),E("div",w1e,[le(G.$slots,"viewer")])):O("v-if",!0)]),_:2},[G.$slots.progress?{name:"progress",fn:w(X=>[le(G.$slots,"progress",Qh(sf(X)))]),key:"0"}:void 0,G.$slots["viewer-error"]?{name:"viewer-error",fn:w(X=>[le(G.$slots,"viewer-error",Qh(sf(X)))]),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))}}),C1e=k1e;const Cr=Ut(C1e),x1e=Ge({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:Ki,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:ue([String,Number,null]),validator:t=>t===null||_t(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},...kr(["ariaLabel"]),inputmode:{type:ue(String),default:void 0},align:{type:ue(String),default:"center"},disabledScientific:Boolean}),S1e={[dn]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Do]:t=>_t(t)||li(t),[Mt]:t=>_t(t)||li(t)},$1e=["aria-label"],A1e=["aria-label"];var E1e=fe({name:"ElInputNumber",__name:"input-number",props:x1e,emits:S1e,setup(t,{expose:e,emit:n}){const s=t,i=n,{t:o}=Qt(),r=Be("input-number"),a=J(),l=In({currentValue:s.modelValue,userInput:null}),{formItem:c}=yo(),u=U(()=>_t(s.modelValue)&&s.modelValue<=s.min),d=U(()=>_t(s.modelValue)&&s.modelValue>=s.max),h=U(()=>{const G=k(s.step);return en(s.precision)?Math.max(k(s.modelValue),G):(G>s.precision&&Tt("InputNumber","precision should not be less than the decimal places of step"),s.precision)}),f=U(()=>s.controls&&s.controlsPosition==="right"),p=Ti(),m=_s(),b=U(()=>{if(l.userInput!==null)return l.userInput;let G=l.currentValue;if(li(G))return"";if(_t(G)){if(Number.isNaN(G))return"";en(s.precision)||(G=G.toFixed(s.precision))}return G}),_=(G,K)=>{if(en(K)&&(K=h.value),K===0)return Math.round(G);let X=String(G);const H=X.indexOf(".");if(H===-1||!X.replace(".","").split("")[H+K])return G;const Q=X.length;return X.charAt(Q-1)==="5"&&(X=`${X.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(X).toFixed(K))},k=G=>{if(li(G))return 0;const K=G.toString(),X=K.indexOf(".");let H=0;return X!==-1&&(H=K.length-X-1),H},C=(G,K=1)=>_t(G)?G>=Number.MAX_SAFE_INTEGER&&K===1?(Tt("InputNumber","The value has reached the maximum safe integer limit."),G):G<=Number.MIN_SAFE_INTEGER&&K===-1?(Tt("InputNumber","The value has reached the minimum safe integer limit."),G):_(G+s.step*K):l.currentValue,x=G=>{const K=ls(G),X=SD(G);if(s.disabledScientific&&["e","E"].includes(X)){G.preventDefault();return}switch(K){case He.up:G.preventDefault(),S();break;case He.down:G.preventDefault(),M();break}},S=()=>{s.readonly||m.value||d.value||(T(C(Number(b.value)||0)),i(Do,l.currentValue),B())},M=()=>{s.readonly||m.value||u.value||(T(C(Number(b.value)||0,-1)),i(Do,l.currentValue),B())},P=(G,K)=>{const{max:X,min:H,step:Q,precision:ne,stepStrictly:Z,valueOnClear:ae}=s;X<H&&vo("InputNumber","min should not be greater than max.");let ge=Number(G);if(li(G)||Number.isNaN(ge))return null;if(G===""){if(ae===null)return null;ge=Ke(ae)?{min:H,max:X}[ae]:ae}return Z&&(ge=_(Math.round(_(ge/Q))*Q,ne),ge!==G&&K&&i(Mt,ge)),en(ne)||(ge=_(ge,ne)),(ge>X||ge<H)&&(ge=ge>X?X:H,K&&i(Mt,ge)),ge},T=(G,K=!0)=>{var Q;const X=l.currentValue,H=P(G);if(!K){i(Mt,H);return}l.userInput=null,!(X===H&&G)&&(i(Mt,H),X!==H&&i(dn,H,X),s.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(ne=>Tt(ne))),l.currentValue=H)},I=G=>{l.userInput=G;const K=G===""?null:Number(G);i(Do,K),T(K,!1)},L=G=>{const K=G!==""?Number(G):"";(_t(K)&&!Number.isNaN(K)||G==="")&&T(K),B(),l.userInput=null},V=()=>{var G,K;(K=(G=a.value)==null?void 0:G.focus)==null||K.call(G)},R=()=>{var G,K;(K=(G=a.value)==null?void 0:G.blur)==null||K.call(G)},N=G=>{i("focus",G)},F=G=>{var K,X;l.userInput=null,l.currentValue===null&&((K=a.value)!=null&&K.input)&&(a.value.input.value=""),i("blur",G),s.validateEvent&&((X=c==null?void 0:c.validate)==null||X.call(c,"blur").catch(H=>Tt(H)))},B=()=>{l.currentValue!==s.modelValue&&(l.currentValue=s.modelValue)},z=G=>{document.activeElement===G.target&&G.preventDefault()};return Me(()=>s.modelValue,(G,K)=>{const X=P(G,!0);l.userInput===null&&X!==K&&(l.currentValue=X)},{immediate:!0}),Me(()=>s.precision,()=>{l.currentValue=P(s.modelValue)}),Ft(()=>{var Q;const{min:G,max:K,modelValue:X}=s,H=(Q=a.value)==null?void 0:Q.input;if(H.setAttribute("role","spinbutton"),Number.isFinite(K)?H.setAttribute("aria-valuemax",String(K)):H.removeAttribute("aria-valuemax"),Number.isFinite(G)?H.setAttribute("aria-valuemin",String(G)):H.removeAttribute("aria-valuemin"),H.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),H.setAttribute("aria-disabled",String(m.value)),!_t(X)&&X!=null){let ne=Number(X);Number.isNaN(ne)&&(ne=null),i(Mt,ne)}H.addEventListener("wheel",z,{passive:!1})}),kl(()=>{var G,K;(K=(G=a.value)==null?void 0:G.input)==null||K.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:V,blur:R}),(G,K)=>(v(),E("div",{class:q([A(r).b(),A(r).m(A(p)),A(r).is("disabled",A(m)),A(r).is("without-controls",!t.controls),A(r).is("controls-right",f.value),A(r).is(t.align,!!t.align)]),onDragstart:K[0]||(K[0]=Oe(()=>{},["prevent"]))},[t.controls?Re((v(),E("span",{key:0,role:"button","aria-label":A(o)("el.inputNumber.decrease"),class:q([A(r).e("decrease"),A(r).is("disabled",u.value)]),onKeydown:kt(M,["enter"])},[le(G.$slots,"decrease-icon",{},()=>[y(A(_e),null,{default:w(()=>[f.value?(v(),D(A(Fd),{key:0})):(v(),D(A(lle),{key:1}))]),_:1})])],42,$1e)),[[A(kb),M]]):O("v-if",!0),t.controls?Re((v(),E("span",{key:1,role:"button","aria-label":A(o)("el.inputNumber.increase"),class:q([A(r).e("increase"),A(r).is("disabled",d.value)]),onKeydown:kt(S,["enter"])},[le(G.$slots,"increase-icon",{},()=>[y(A(_e),null,{default:w(()=>[f.value?(v(),D(A(Z_),{key:0})):(v(),D(A(X4),{key:1}))]),_:1})])],42,A1e)),[[A(kb),S]]):O("v-if",!0),y(A(vt),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":b.value,placeholder:t.placeholder,readonly:t.readonly,disabled:A(m),size:A(p),max:t.max,min:t.min,name:t.name,"aria-label":t.ariaLabel,"validate-event":!1,inputmode:t.inputmode,onKeydown:x,onBlur:F,onFocus:N,onInput:I,onChange:L},fs({_:2},[G.$slots.prefix?{name:"prefix",fn:w(()=>[le(G.$slots,"prefix")]),key:"0"}:void 0,G.$slots.suffix?{name:"suffix",fn:w(()=>[le(G.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),M1e=E1e;const o2=Ut(M1e),T1e=Ge({modelValue:{type:ue(Array)},max:Number,tagType:{...t1.type,default:"info"},tagEffect:t1.effect,effect:{type:ue(String),default:"light"},trigger:{type:ue(String),default:He.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Ki,clearable:Boolean,clearIcon:{type:ds,default:Xc},disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:ue(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),P1e={[Mt]:t=>Ee(t)||en(t),[dn]:t=>Ee(t)||en(t),[Do]:t=>Ke(t),"add-tag":t=>Ke(t)||Ee(t),"remove-tag":(t,e)=>Ke(t)&&_t(e),"drag-tag":(t,e,n)=>_t(t)&&_t(e)&&Ke(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function I1e({wrapperRef:t,handleDragged:e,afterDragged:n}){const s=Be("input-tag"),i=Fn(),o=J(!1);let r,a,l,c;function u(p){return`.${s.e("inner")} .${s.namespace.value}-tag:nth-child(${p+1})`}function d(p,m){r=m,a=t.value.querySelector(u(m)),a&&(a.style.opacity="0.5"),p.dataTransfer.effectAllowed="move"}function h(p,m){if(l=m,p.preventDefault(),p.dataTransfer.dropEffect="move",en(r)||r===m){o.value=!1;return}const b=t.value.querySelector(u(m)).getBoundingClientRect(),_=r+1!==m,k=r-1!==m,C=p.clientX-b.left,x=_?k?.5:1:-1,S=k?_?.5:0:1;C<=b.width*x?c="before":C>b.width*S?c="after":c=void 0;const M=t.value.querySelector(`.${s.e("inner")}`),P=M.getBoundingClientRect(),T=Number.parseFloat(nl(M,"gap"))/2,I=b.top-P.top;let L=-9999;if(c==="before")L=Math.max(b.left-P.left-T,Math.floor(-T/2));else if(c==="after"){const V=b.right-P.left;L=V+(P.width===V?Math.floor(T/2):T)}wD(i.value,{top:`${I}px`,left:`${L}px`}),o.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!en(r)&&!en(l)&&r!==l&&e(r,l,c),o.value=!1,r=void 0,a=null,l=void 0,c=void 0,n==null||n()}return{dropIndicatorRef:i,showDropIndicator:o,handleDragStart:d,handleDragOver:h,handleDragEnd:f}}function L1e(){const t=J(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function O1e({props:t,emit:e,formItem:n}){const s=_s(),i=Ti(),o=Fn(),r=J(),a=J(),l=U(()=>["small"].includes(i.value)?"small":"default"),c=U(()=>{var z;return(z=t.modelValue)!=null&&z.length?void 0:t.placeholder}),u=U(()=>!(t.readonly||s.value)),d=U(()=>{var z;return en(t.max)?!1:(((z=t.modelValue)==null?void 0:z.length)??0)>=t.max}),h=U(()=>{var z;return t.collapseTags?(z=t.modelValue)==null?void 0:z.slice(0,t.maxCollapseTags):t.modelValue}),f=U(()=>{var z;return t.collapseTags?(z=t.modelValue)==null?void 0:z.slice(t.maxCollapseTags):[]}),p=z=>{const G=[...t.modelValue??[],...Us(z)];e(Mt,G),e(dn,G),e("add-tag",z),r.value=void 0},m=z=>{var X;const G=z.split(t.delimiter),K=G.length>1?G.map(H=>H.trim()).filter(Boolean):[];if(t.max){const H=t.max-(((X=t.modelValue)==null?void 0:X.length)??0);K.splice(H)}return K.length===1?K[0]:K},b=z=>{var Z;const G=(Z=z.clipboardData)==null?void 0:Z.getData("text");if(t.readonly||d.value||!t.delimiter||!G)return;const{selectionStart:K=0,selectionEnd:X=0,value:H}=z.target,Q=H.slice(0,K)+G+H.slice(X),ne=m(Q);ne.length&&(p(ne),e(Do,Q),z.preventDefault())},_=z=>{if(d.value){r.value=void 0;return}if(!R.value){if(t.delimiter&&r.value){const G=m(r.value);G.length&&p(G)}e(Do,z.target.value)}},k=z=>{var G;if(!R.value)switch(ls(z)){case t.trigger:z.preventDefault(),z.stopPropagation(),x();break;case He.numpadEnter:t.trigger===He.enter&&(z.preventDefault(),z.stopPropagation(),x());break;case He.backspace:!r.value&&((G=t.modelValue)!=null&&G.length)&&(z.preventDefault(),z.stopPropagation(),S(t.modelValue.length-1));break}},C=z=>{if(!(R.value||!bD()))switch(ls(z)){case He.space:t.trigger===He.space&&(z.preventDefault(),z.stopPropagation(),x());break}},x=()=>{var G;const z=(G=r.value)==null?void 0:G.trim();!z||d.value||p(z)},S=z=>{const G=(t.modelValue??[]).slice(),[K]=G.splice(z,1);e(Mt,G),e(dn,G),e("remove-tag",K,z)},M=()=>{r.value=void 0,e(Mt,void 0),e(dn,void 0),e("clear")},P=(z,G,K)=>{const X=(t.modelValue??[]).slice(),[H]=X.splice(z,1),Q=G>z&&K==="before"?-1:G<z&&K==="after"?1:0;X.splice(G+Q,0,H),e(Mt,X),e(dn,X),e("drag-tag",z,G+Q,H)},T=()=>{var z;(z=o.value)==null||z.focus()},I=()=>{var z;(z=o.value)==null||z.blur()},{wrapperRef:L,isFocused:V}=fp(o,{disabled:s,beforeBlur(z){var G;return(G=a.value)==null?void 0:G.isFocusInsideContent(z)},afterBlur(){var z;t.saveOnBlur?x():r.value=void 0,t.validateEvent&&((z=n==null?void 0:n.validate)==null||z.call(n,"blur").catch(G=>Tt(G)))}}),{isComposing:R,handleCompositionStart:N,handleCompositionUpdate:F,handleCompositionEnd:B}=W4({afterComposition:_});return Me(()=>t.modelValue,()=>{var z;t.validateEvent&&((z=n==null?void 0:n.validate)==null||z.call(n,dn).catch(G=>Tt(G)))}),{inputRef:o,wrapperRef:L,tagTooltipRef:a,isFocused:V,isComposing:R,inputValue:r,size:i,tagSize:l,placeholder:c,closable:u,disabled:s,inputLimit:d,showTagList:h,collapseTagList:f,handleDragged:P,handlePaste:b,handleInput:_,handleKeydown:k,handleKeyup:C,handleAddTag:x,handleRemoveTag:S,handleClear:M,handleCompositionStart:N,handleCompositionUpdate:F,handleCompositionEnd:B,focus:T,blur:I}}function D1e({props:t,isFocused:e,hovering:n,disabled:s,inputValue:i,size:o,validateState:r,validateIcon:a,needStatusIcon:l}){const c=Ld(),u=hi(),d=Be("input-tag"),h=Be("input"),f=J(),p=J(),m=U(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",s.value),d.m(o.value),d.e("wrapper"),c.class]),b=U(()=>[c.style]),_=U(()=>{var I,L;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((I=t.modelValue)!=null&&I.length)&&!u.prefix),d.is("right-space",!((L=t.modelValue)!=null&&L.length)&&!C.value)]}),k=U(()=>{var I;return t.clearable&&!s.value&&!t.readonly&&(((I=t.modelValue)==null?void 0:I.length)||i.value)&&(e.value||n.value)}),C=U(()=>u.suffix||k.value||r.value&&a.value&&l.value),x=In({innerWidth:0,collapseItemWidth:0}),S=()=>{if(!p.value)return 0;const I=window.getComputedStyle(p.value);return Number.parseFloat(I.gap||"6px")},M=()=>{x.innerWidth=Number.parseFloat(window.getComputedStyle(p.value).width)},P=()=>{x.collapseItemWidth=f.value.getBoundingClientRect().width},T=U(()=>{if(!t.collapseTags)return{};const I=S(),L=I+a4,V=f.value&&t.maxCollapseTags===1?x.innerWidth-x.collapseItemWidth-I-L:x.innerWidth-L;return{maxWidth:`${Math.max(V,0)}px`}});return Es(p,M),Es(f,P),{ns:d,nsInput:h,containerKls:m,containerStyle:b,innerKls:_,showClear:k,showSuffix:C,tagStyle:T,collapseItemRef:f,innerRef:p}}const R1e=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],V1e=["textContent"];var F1e=fe({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:T1e,emits:P1e,setup(t,{expose:e,emit:n}){const s=t,i=n,o=U_(),r=hi(),{form:a,formItem:l}=yo(),{inputId:c}=Ml(s,{formItemContext:l}),u=U(()=>(a==null?void 0:a.statusIcon)??!1),d=U(()=>(l==null?void 0:l.validateState)||""),h=U(()=>d.value&&Q4[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:b,inputValue:_,size:k,tagSize:C,placeholder:x,closable:S,disabled:M,showTagList:P,collapseTagList:T,handleDragged:I,handlePaste:L,handleInput:V,handleKeydown:R,handleKeyup:N,handleRemoveTag:F,handleClear:B,handleCompositionStart:z,handleCompositionUpdate:G,handleCompositionEnd:K,focus:X,blur:H}=O1e({props:s,emit:i,formItem:l}),{hovering:Q,handleMouseEnter:ne,handleMouseLeave:Z}=L1e(),{calculatorRef:ae,inputStyle:ge}=vD(),{dropIndicatorRef:Ce,showDropIndicator:oe,handleDragStart:pe,handleDragOver:ie,handleDragEnd:re}=I1e({wrapperRef:p,handleDragged:I,afterDragged:X}),{ns:ke,nsInput:Ue,containerKls:ee,containerStyle:se,innerKls:me,showClear:$e,showSuffix:Se,tagStyle:Ie,collapseItemRef:je,innerRef:Fe}=D1e({props:s,hovering:Q,isFocused:b,inputValue:_,disabled:M,size:k,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:X,blur:H}),(ze,Ae)=>(v(),E("div",{ref_key:"wrapperRef",ref:p,class:q(A(ee)),style:Xe(A(se)),onMouseenter:Ae[9]||(Ae[9]=(...Ze)=>A(ne)&&A(ne)(...Ze)),onMouseleave:Ae[10]||(Ae[10]=(...Ze)=>A(Z)&&A(Z)(...Ze))},[A(r).prefix?(v(),E("div",{key:0,class:q(A(ke).e("prefix"))},[le(ze.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref_key:"innerRef",ref:Fe,class:q(A(me))},[(v(!0),E(te,null,we(A(P),(Ze,We)=>(v(),D(A(Ai),{key:We,size:A(C),closable:A(S),type:t.tagType,effect:t.tagEffect,draggable:A(S)&&t.draggable,style:Xe(A(Ie)),"disable-transitions":"",onClose:it=>A(F)(We),onDragstart:it=>A(pe)(it,We),onDragover:it=>A(ie)(it,We),onDragend:A(re),onDrop:Ae[0]||(Ae[0]=Oe(()=>{},["stop"]))},{default:w(()=>[le(ze.$slots,"tag",{value:Ze,index:We},()=>[W($(Ze),1)])]),_:2},1032,["size","closable","type","effect","draggable","style","onClose","onDragstart","onDragover","onDragend"]))),128)),t.collapseTags&&t.modelValue&&t.modelValue.length>t.maxCollapseTags?(v(),D(A(Ls),{key:0,ref_key:"tagTooltipRef",ref:m,disabled:!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom"},{default:w(()=>[g("div",{ref_key:"collapseItemRef",ref:je,class:q(A(ke).e("collapse-tag"))},[y(A(Ai),{closable:!1,size:A(C),type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:w(()=>[W(" + "+$(t.modelValue.length-t.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:w(()=>[g("div",{class:q(A(ke).e("input-tag-list"))},[(v(!0),E(te,null,we(A(T),(Ze,We)=>(v(),D(A(Ai),{key:We,size:A(C),closable:A(S),type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:it=>A(F)(We+t.maxCollapseTags)},{default:w(()=>[le(ze.$slots,"tag",{value:Ze,index:We+t.maxCollapseTags},()=>[W($(Ze),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):O("v-if",!0),g("div",{class:q(A(ke).e("input-wrapper"))},[Re(g("input",Kt({id:A(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":Ae[1]||(Ae[1]=Ze=>hn(_)?_.value=Ze:null)},A(o),{type:"text",minlength:t.minlength,maxlength:t.maxlength,disabled:A(M),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,placeholder:A(x),autofocus:t.autofocus,ariaLabel:t.ariaLabel,class:A(ke).e("input"),style:A(ge),onCompositionstart:Ae[2]||(Ae[2]=(...Ze)=>A(z)&&A(z)(...Ze)),onCompositionupdate:Ae[3]||(Ae[3]=(...Ze)=>A(G)&&A(G)(...Ze)),onCompositionend:Ae[4]||(Ae[4]=(...Ze)=>A(K)&&A(K)(...Ze)),onPaste:Ae[5]||(Ae[5]=(...Ze)=>A(L)&&A(L)(...Ze)),onInput:Ae[6]||(Ae[6]=(...Ze)=>A(V)&&A(V)(...Ze)),onKeydown:Ae[7]||(Ae[7]=(...Ze)=>A(R)&&A(R)(...Ze)),onKeyup:Ae[8]||(Ae[8]=(...Ze)=>A(N)&&A(N)(...Ze))}),null,16,R1e),[[fd,A(_)]]),g("span",{ref_key:"calculatorRef",ref:ae,"aria-hidden":"true",class:q(A(ke).e("input-calculator")),textContent:$(A(_))},null,10,V1e)],2),Re(g("div",{ref_key:"dropIndicatorRef",ref:Ce,class:q(A(ke).e("drop-indicator"))},null,2),[[Ht,A(oe)]])],2),A(Se)?(v(),E("div",{key:1,class:q(A(ke).e("suffix"))},[le(ze.$slots,"suffix"),A($e)?(v(),D(A(_e),{key:0,class:q([A(ke).e("icon"),A(ke).e("clear")]),onMousedown:Oe(A(Dt),["prevent"]),onClick:A(B)},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):O("v-if",!0),d.value&&h.value&&u.value?(v(),D(A(_e),{key:1,class:q([A(Ue).e("icon"),A(Ue).e("validateIcon"),A(Ue).is("loading",d.value==="validating")])},{default:w(()=>[(v(),D(Ct(h.value)))]),_:1},8,["class"])):O("v-if",!0)],2)):O("v-if",!0)],38))}}),N1e=F1e;const B1e=Ut(N1e),z1e=Ge({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}}),H1e={click:t=>t instanceof MouseEvent},U1e=["href","target"];var j1e=fe({name:"ElLink",__name:"link",props:z1e,emits:H1e,setup(t,{emit:e}){const n=t,s=e,i=Kc("link");dl({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"},U(()=>Jn(n.underline)));const o=Be("link"),r=U(()=>{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=U(()=>{var c;return Jn(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(),E("a",{class:q(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(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):O("v-if",!0),c.$slots.default?(v(),E("span",{key:1,class:q(A(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,U1e))}}),W1e=j1e;const k8=Ut(W1e),sF=Symbol("elPaginationKey"),Y1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ds}}),q1e={click:t=>t instanceof MouseEvent},G1e=["disabled","aria-label","aria-disabled"],X1e={key:0};var K1e=fe({name:"ElPaginationPrev",__name:"prev",props:Y1e,emits:q1e,setup(t){const e=t,{t:n}=Qt(),s=U(()=>e.disabled||e.currentPage<=1);return(i,o)=>(v(),E("button",{type:"button",class:"btn-prev",disabled:s.value,"aria-label":i.prevText||A(n)("el.pagination.prev"),"aria-disabled":s.value,onClick:o[0]||(o[0]=r=>i.$emit("click",r))},[i.prevText?(v(),E("span",X1e,$(i.prevText),1)):(v(),D(A(_e),{key:1},{default:w(()=>[(v(),D(Ct(i.prevIcon)))]),_:1}))],8,G1e))}}),Z1e=K1e;const J1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ds}}),Q1e=["disabled","aria-label","aria-disabled"],eve={key:0};var tve=fe({name:"ElPaginationNext",__name:"next",props:J1e,emits:["click"],setup(t){const e=t,{t:n}=Qt(),s=U(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(v(),E("button",{type:"button",class:"btn-next",disabled:s.value,"aria-label":i.nextText||A(n)("el.pagination.next"),"aria-disabled":s.value,onClick:o[0]||(o[0]=r=>i.$emit("click",r))},[i.nextText?(v(),E("span",eve,$(i.nextText),1)):(v(),D(A(_e),{key:1},{default:w(()=>[(v(),D(Ct(i.nextIcon)))]),_:1}))],8,Q1e))}}),nve=tve;const C8=()=>Ye(sF,{}),sve=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:ue(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:ue([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:xl},appendSizeTo:String});var ive=fe({name:"ElPaginationSizes",__name:"sizes",props:sve,emits:["page-size-change"],setup(t,{emit:e}){const n=t,s=e,{t:i}=Qt(),o=Be("pagination"),r=C8(),a=J(n.pageSize);Me(()=>n.pageSizes,(u,d)=>{ji(u,d)||Ee(u)&&s("page-size-change",u.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),Me(()=>n.pageSize,u=>{a.value=u});const l=U(()=>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(),E("span",{class:q(A(o).e("sizes"))},[y(A(Zt),{"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),E(te,null,we(l.value,h=>(v(),D(A(nn),{key:h,value:h,label:h+A(i)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}}),ove=ive;const rve=Ge({size:{type:String,values:xl}}),ave=["disabled"];var lve=fe({name:"ElPaginationJumper",__name:"jumper",props:rve,setup(t){const{t:e}=Qt(),n=Be("pagination"),{pageCount:s,disabled:i,currentPage:o,changeEvent:r}=C8(),a=J(),l=U(()=>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(),E("span",{class:q(A(n).e("jump")),disabled:A(i)},[g("span",{class:q([A(n).e("goto")])},$(A(e)("el.pagination.goto")),3),y(A(vt),{size:d.size,class:q([A(n).e("editor"),A(n).is("in-pagination")]),min:1,max:A(s),disabled:A(i),"model-value":l.value,"validate-event":!1,"aria-label":A(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),g("span",{class:q([A(n).e("classifier")])},$(A(e)("el.pagination.pageClassifier")),3)],10,ave))}}),cve=lve;const uve=Ge({total:{type:Number,default:1e3}}),dve=["disabled"];var hve=fe({name:"ElPaginationTotal",__name:"total",props:uve,setup(t){const{t:e}=Qt(),n=Be("pagination"),{disabled:s}=C8();return(i,o)=>(v(),E("span",{class:q(A(n).e("total")),disabled:A(s)},$(A(e)("el.pagination.total",{total:i.total})),11,dve))}}),fve=hve;const pve=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),mve=["aria-current","aria-label","tabindex"],gve=["tabindex","aria-label"],vve=["aria-current","aria-label","tabindex"],yve=["tabindex","aria-label"],bve=["aria-current","aria-label","tabindex"];var _ve=fe({name:"ElPaginationPager",__name:"pager",props:pve,emits:[dn],setup(t,{emit:e}){const n=t,s=e,i=Be("pager"),o=Be("icon"),{t:r}=Qt(),a=J(!1),l=J(!1),c=J(!1),u=J(!1),d=J(!1),h=J(!1),f=U(()=>{const S=n.pagerCount,M=(S-1)/2,P=Number(n.currentPage),T=Number(n.pageCount);let I=!1,L=!1;T>S&&(P>S-M&&(I=!0),P<T-M&&(L=!0));const V=[];if(I&&!L){const R=T-(S-2);for(let N=R;N<T;N++)V.push(N)}else if(!I&&L)for(let R=2;R<S;R++)V.push(R);else if(I&&L){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=U(()=>["more","btn-quickprev",o.b(),i.is("disabled",n.disabled)]),m=U(()=>["more","btn-quicknext",o.b(),i.is("disabled",n.disabled)]),b=U(()=>n.disabled?-1:0);Me(()=>[n.pageCount,n.pagerCount,n.currentPage],([S,M,P])=>{const T=(M-1)/2;let I=!1,L=!1;S>M&&(I=P>M-T,L=P<S-T),c.value&&(c.value=I),u.value&&(u.value=L),a.value=I,l.value=L},{immediate:!0});function _(S=!1){n.disabled||(S?c.value=!0:u.value=!0)}function k(S=!1){S?d.value=!0:h.value=!0}function C(S){const M=S.target;if(M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("number")){const P=Number(M.textContent);P!==n.currentPage&&s(dn,P)}else M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("more")&&x(S)}function x(S){const M=S.target;if(M.tagName.toLowerCase()==="ul"||n.disabled)return;let P=Number(M.textContent);const T=n.pageCount,I=n.currentPage,L=n.pagerCount-2;M.className.includes("more")&&(M.className.includes("quickprev")?P=I-L:M.className.includes("quicknext")&&(P=I+L)),Number.isNaN(+P)||(P<1&&(P=1),P>T&&(P=T)),P!==I&&s(dn,P)}return(S,M)=>(v(),E("ul",{class:q(A(i).b()),onClick:x,onKeyup:kt(C,["enter"])},[S.pageCount>0?(v(),E("li",{key:0,class:q([[A(i).is("active",S.currentPage===1),A(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":A(r)("el.pagination.currentPage",{pager:1}),tabindex:b.value}," 1 ",10,mve)):O("v-if",!0),a.value?(v(),E("li",{key:1,class:q(p.value),tabindex:b.value,"aria-label":A(r)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:M[0]||(M[0]=P=>_(!0)),onMouseleave:M[1]||(M[1]=P=>c.value=!1),onFocus:M[2]||(M[2]=P=>k(!0)),onBlur:M[3]||(M[3]=P=>d.value=!1)},[(c.value||d.value)&&!S.disabled?(v(),D(A(Nc),{key:0})):(v(),D(A(sC),{key:1}))],42,gve)):O("v-if",!0),(v(!0),E(te,null,we(f.value,P=>(v(),E("li",{key:P,class:q([[A(i).is("active",S.currentPage===P),A(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===P,"aria-label":A(r)("el.pagination.currentPage",{pager:P}),tabindex:b.value},$(P),11,vve))),128)),l.value?(v(),E("li",{key:2,class:q(m.value),tabindex:b.value,"aria-label":A(r)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:M[4]||(M[4]=P=>_()),onMouseleave:M[5]||(M[5]=P=>u.value=!1),onFocus:M[6]||(M[6]=P=>k()),onBlur:M[7]||(M[7]=P=>h.value=!1)},[(u.value||h.value)&&!S.disabled?(v(),D(A(Bc),{key:0})):(v(),D(A(sC),{key:1}))],42,yve)):O("v-if",!0),S.pageCount>1?(v(),E("li",{key:3,class:q([[A(i).is("active",S.currentPage===S.pageCount),A(i).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":A(r)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:b.value},$(S.pageCount),11,bve)):O("v-if",!0)],34))}}),wve=_ve;const Oi=t=>typeof t!="number",kve=Ge({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>_t(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:ue(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:ue([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ds,default:()=>yd},nextText:{type:String,default:""},nextIcon:{type:ds,default:()=>Fr},teleported:{type:Boolean,default:!0},small:Boolean,size:Ki,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),Cve={"update:current-page":t=>_t(t),"update:page-size":t=>_t(t),"size-change":t=>_t(t),change:(t,e)=>_t(t)&&_t(e),"current-change":t=>_t(t),"prev-click":t=>_t(t),"next-click":t=>_t(t)},kA="ElPagination";var xve=fe({name:kA,props:kve,emits:Cve,setup(t,{emit:e,slots:n}){const{t:s}=Qt(),i=Be("pagination"),o=ht().vnode.props||{},r=eR(),a=U(()=>t.small?"small":t.size??r.value);dl({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},U(()=>!!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=U(()=>{if(Oi(t.total)&&Oi(t.pageCount)||!Oi(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Oi(t.pageCount)){if(!Oi(t.total)&&!Oi(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=J(Oi(t.defaultPageSize)?10:t.defaultPageSize),h=J(Oi(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=U({get(){return Oi(t.pageSize)?d.value:t.pageSize},set(S){Oi(t.pageSize)&&(d.value=S),c&&(e("update:page-size",S),e("size-change",S))}}),p=U(()=>{let S=0;return Oi(t.pageCount)?Oi(t.total)||(S=Math.max(1,Math.ceil(t.total/f.value))):S=t.pageCount,S}),m=U({get(){return Oi(t.currentPage)?h.value:t.currentPage},set(S){let M=S;S<1?M=1:S>p.value&&(M=p.value),Oi(t.currentPage)&&(h.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Me(p,S=>{m.value>S&&(m.value=S)}),Me([m,f],S=>{e(dn,...S)},{flush:"post"});function b(S){m.value=S}function _(S){f.value=S;const M=p.value;m.value>M&&(m.value=M)}function k(){t.disabled||(m.value-=1,e("prev-click",m.value))}function C(){t.disabled||(m.value+=1,e("next-click",m.value))}function x(S,M){S&&(S.props||(S.props={}),S.props.class=[S.props.class,M].join(" "))}return Pt(sF,{pageCount:p,disabled:U(()=>t.disabled),currentPage:m,changeEvent:b,handleSizeChange:_}),()=>{var V;if(!u.value)return Tt(kA,s("el.pagination.deprecationWarning")),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const S=[],M=[],P=bt("div",{class:i.e("rightwrapper")},M),T={prev:bt(Z1e,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:k}),jumper:bt(cve,{size:a.value}),pager:bt(wve,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:b,disabled:t.disabled}),next:bt(nve,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:C}),sizes:bt(ove,{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:bt(fve,{total:Oi(t.total)?0:t.total})},I=t.layout.split(",").map(R=>R.trim());let L=!1;return I.forEach(R=>{if(R==="->"){L=!0;return}L?M.push(T[R]):S.push(T[R])}),x(S[0],i.is("first")),x(S[S.length-1],i.is("last")),L&&M.length>0&&(x(M[0],i.is("first")),x(M[M.length-1],i.is("last")),S.push(P)),bt("div",{class:[i.b(),i.is("background",t.background),i.m(a.value)]},S)}}});const Sve=Ut(xve),$ve=Ge({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:ue(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:ue([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:ue(Function),default:t=>`${t}%`}}),Ave=["aria-valuenow"],Eve={viewBox:"0 0 100 100"},Mve=["d","stroke","stroke-linecap","stroke-width"],Tve=["d","stroke","opacity","stroke-linecap","stroke-width"],Pve={key:0};var Ive=fe({name:"ElProgress",__name:"progress",props:$ve,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,s=Be("progress"),i=U(()=>{const C={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},x=k(n.percentage);return x.includes("gradient")?C.background=x:C.backgroundColor=x,C}),o=U(()=>(n.strokeWidth/n.width*100).toFixed(1)),r=U(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=U(()=>{const C=r.value,x=n.type==="dashboard";return` |
| 73 |
M 50 50 |
| 74 |
m 0 ${x?"":"-"}${C} |
| 75 |
a ${C} ${C} 0 1 1 0 ${x?"-":""}${C*2} |
| 76 |
a ${C} ${C} 0 1 1 0 ${x?"":"-"}${C*2} |
| 77 |
`}),l=U(()=>2*Math.PI*r.value),c=U(()=>n.type==="dashboard"?.75:1),u=U(()=>`${-1*l.value*(1-c.value)/2}px`),d=U(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=U(()=>({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=U(()=>{let C;return n.color?C=k(n.percentage):C=e[n.status]||e.default,C}),p=U(()=>n.status==="warning"?J4:n.type==="line"?n.status==="success"?G4:Xc:n.status==="success"?q4:Bo),m=U(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),b=U(()=>n.format(n.percentage));function _(C){const x=100/C.length;return C.map((S,M)=>Ke(S)?{color:S,percentage:(M+1)*x}:S).sort((S,M)=>S.percentage-M.percentage)}const k=C=>{var S;const{color:x}=n;if(et(x))return x(C);if(Ke(x))return x;{const M=_(x);for(const P of M)if(P.percentage>C)return P.color;return(S=M[M.length-1])==null?void 0:S.color}};return(C,x)=>(v(),E("div",{class:q([A(s).b(),A(s).m(t.type),A(s).is(t.status),{[A(s).m("without-text")]:!t.showText,[A(s).m("text-inside")]:t.textInside}]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(v(),E("div",{key:0,class:q(A(s).b("bar"))},[g("div",{class:q(A(s).be("bar","outer")),style:Xe({height:`${t.strokeWidth}px`})},[g("div",{class:q([A(s).be("bar","inner"),{[A(s).bem("bar","inner","indeterminate")]:t.indeterminate},{[A(s).bem("bar","inner","striped")]:t.striped},{[A(s).bem("bar","inner","striped-flow")]:t.stripedFlow}]),style:Xe(i.value)},[(t.showText||C.$slots.default)&&t.textInside?(v(),E("div",{key:0,class:q(A(s).be("bar","innerText"))},[le(C.$slots,"default",{percentage:t.percentage},()=>[g("span",null,$(b.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),E("div",{key:1,class:q(A(s).b("circle")),style:Xe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),E("svg",Eve,[g("path",{class:q(A(s).be("circle","track")),d:a.value,stroke:`var(${A(s).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,fill:"none",style:Xe(d.value)},null,14,Mve),g("path",{class:q(A(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:Xe(h.value)},null,14,Tve)]))],6)),(t.showText||C.$slots.default)&&!t.textInside?(v(),E("div",{key:2,class:q(A(s).e("text")),style:Xe({fontSize:`${m.value}px`})},[le(C.$slots,"default",{percentage:t.percentage},()=>[t.status?(v(),D(A(_e),{key:1},{default:w(()=>[(v(),D(Ct(p.value)))]),_:1})):(v(),E("span",Pve,$(b.value),1))])],6)):O("v-if",!0)],10,Ave))}}),Lve=Ive;const r2=Ut(Lve),Ove="horizontal",Dve=({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=>{Bie(i);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===Ove?c:u;r(d)||(o+=d,!M4()&&d!==0&&l.preventDefault(),i=qg(()=>{s(o),o=0}))}}},Rve=Ge({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:ue([Number,Object])}}),Vve=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var Fve=fe({name:"ElSkeletonItem",__name:"skeleton-item",props:Vve,setup(t){const e=Be("skeleton");return(n,s)=>(v(),E("div",{class:q([A(e).e("item"),A(e).e(t.variant)])},[t.variant==="image"?(v(),D(A(ble),{key:0})):O("v-if",!0)],2))}}),Ab=Fve,Nve=fe({name:"ElSkeleton",__name:"skeleton",props:Rve,setup(t,{expose:e}){const n=t,s=Be("skeleton"),i=Zoe(Sn(n,"loading"),n.throttle);return e({uiLoading:i}),(o,r)=>A(i)?(v(),E("div",Kt({key:0,class:[A(s).b(),A(s).is("animated",t.animated)]},o.$attrs),[(v(!0),E(te,null,we(t.count,a=>(v(),E(te,{key:a},[A(i)?le(o.$slots,"template",{key:a},()=>[y(Ab,{class:q(A(s).is("first")),variant:"p"},null,8,["class"]),(v(!0),E(te,null,we(t.rows,l=>(v(),D(Ab,{key:l,class:q([A(s).e("paragraph"),A(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",Qh(Kt({key:1},o.$attrs)))}}),Bve=Nve;const Yt=Ut(Bve,{SkeletonItem:Ab});Is(Ab);const iF=t=>["",...xl].includes(t),zve=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:iF},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:ue(Function)},id:String,tabindex:{type:[String,Number]},...kr(["ariaLabel"])}),Hve={[Mt]:t=>Jn(t)||Ke(t)||_t(t),[dn]:t=>Jn(t)||Ke(t)||_t(t),[Do]:t=>Jn(t)||Ke(t)||_t(t)},Uve=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],jve=["aria-hidden"],Wve={key:1},Yve={key:1},qve=["aria-hidden"],zw="ElSwitch";var Gve=fe({name:zw,__name:"switch",props:zve,emits:Hve,setup(t,{expose:e,emit:n}){const s=t,i=n,{formItem:o}=yo(),r=Ti(),a=Be("switch"),{inputId:l}=Ml(s,{formItemContext:o}),c=_s(U(()=>{if(s.loading)return!0})),u=J(s.modelValue!==!1),d=Fn(),h=U(()=>[a.b(),a.m(r.value),a.is("disabled",c.value),a.is("checked",_.value)]),f=U(()=>[a.e("label"),a.em("label","left"),a.is("active",!_.value)]),p=U(()=>[a.e("label"),a.em("label","right"),a.is("active",_.value)]),m=U(()=>({width:ui(s.width)}));Me(()=>s.modelValue,()=>{u.value=!0});const b=U(()=>u.value?s.modelValue:!1),_=U(()=>b.value===s.activeValue);[s.activeValue,s.inactiveValue].includes(b.value)||(i(Mt,s.inactiveValue),i(dn,s.inactiveValue),i(Do,s.inactiveValue)),Me(_,S=>{var M;d.value.checked=S,s.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(P=>Tt(P)))});const k=()=>{const S=_.value?s.inactiveValue:s.activeValue;i(Mt,S),i(dn,S),i(Do,S),ot(()=>{d.value.checked=_.value})},C=()=>{if(c.value)return;const{beforeChange:S}=s;if(!S){k();return}const M=S();[cd(M),Jn(M)].includes(!0)||vo(zw,"beforeChange must return type `Promise<boolean>` or `boolean`"),cd(M)?M.then(P=>{P&&k()}).catch(P=>{Tt(zw,`some error occurred: ${P}`)}):M&&k()},x=()=>{var S,M;(M=(S=d.value)==null?void 0:S.focus)==null||M.call(S)};return Ft(()=>{d.value.checked=_.value}),e({focus:x,checked:_}),(S,M)=>(v(),E("div",{class:q(h.value),onClick:Oe(C,["prevent"])},[g("input",{id:A(l),ref_key:"input",ref:d,class:q(A(a).e("input")),type:"checkbox",role:"switch","aria-checked":_.value,"aria-disabled":A(c),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:A(c),tabindex:t.tabindex,onChange:k,onKeydown:kt(C,["enter"])},null,42,Uve),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||S.$slots.inactive)?(v(),E("span",{key:0,class:q(f.value)},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),E("span",{key:1,"aria-hidden":_.value},$(t.inactiveText),9,jve)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:q(A(a).e("core")),style:Xe(m.value)},[t.inlinePrompt?(v(),E("div",{key:0,class:q(A(a).e("inner"))},[_.value?(v(),E("div",{key:1,class:q(A(a).e("inner-wrapper"))},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),E("span",Yve,$(t.activeText),1)):O("v-if",!0)])],2)):(v(),E("div",{key:0,class:q(A(a).e("inner-wrapper"))},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),E("span",Wve,$(t.inactiveText),1)):O("v-if",!0)])],2))],2)):O("v-if",!0),g("div",{class:q(A(a).e("action"))},[t.loading?(v(),D(A(_e),{key:0,class:q(A(a).is("loading"))},{default:w(()=>[y(A(Hf))]),_:1},8,["class"])):_.value?le(S.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.activeActionIcon)))]),_:1})):O("v-if",!0)]):_.value?O("v-if",!0):le(S.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||S.$slots.active)?(v(),E("span",{key:1,class:q(p.value)},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(A(_e),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),E("span",{key:1,"aria-hidden":!_.value},$(t.activeText),9,qve)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),Xve=Gve;const Zc=Ut(Xve),Hw=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Kve=function(t,e,n,s,i){if(!e&&!s&&(!i||Ee(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?iD(Us(i),c=>Ke(c)?Ui(a,c):c(a,l,t)):(e!=="$key"&&yt(a)&&"$value"in a&&(a=a.$value),[yt(a)?e?Ui(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)},oF=function(t,e){let n=null;return t.columns.forEach(s=>{s.id===e&&(n=s)}),n},Zve=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||vo("ElTable",`No column matching with column-key: ${e}`),n},CA=function(t,e,n){const s=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return s?oF(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(et(e))return e.call(null,t);return""},af=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];Ee(l)&&Object.assign(o,af(l,e,!0,s))}}),o};function Jve(t,e){const n={};let s;for(s in t)n[s]=t[s];for(s in e)if(Nt(e,s)){const i=e[s];en(i)||(n[s]=i)}return n}function x8(t){return t===""||en(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function rF(t){return t===""||en(t)||(t=x8(t),Number.isNaN(t)&&(t=80)),t}function Qve(t){return _t(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function e0e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...s)=>e(n(...s)))}function Eb(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 _&&Ee(_)&&(b+=_.length,_.forEach(k=>{b+=p(k)})),b};return(!i||h)&&(Jn(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!(s!=null&&s.checkStrictly)&&(s!=null&&s.children)&&Ee(e[s.children])&&e[s.children].forEach(m=>{const b=Eb(t,m,n??!d,s,i,a+1,r);a+=p(m)+1,b&&(l=b)}),l}function t0e(t,e,n="children",s="hasChildren",i=!1){const o=a=>!(Ee(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 n0e=(t,e,n,s)=>{const i={strategy:"fixed",...t.popperOptions},o=et(s==null?void 0:s.tooltipFormatter)?s.tooltipFormatter({row:n,column:s,cellValue:Sc(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 s0e(t,e,n,s,i,o){var f;const r=n0e(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;oD(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(Ls,{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");Rc(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(),Rc(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 aF(t){return t.children?iD(t.children,aF):[t]}function xA(t,e){return t+e.colSpan}const lF=(t,e,n,s)=>{let i=0,o=t;const r=n.states.columns.value;if(s){const l=aF(s[t]);i=r.slice(0,r.indexOf(l[0])).reduce(xA,0),o=i+l.reduce(xA,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}:{}},S8=(t,e,n,s,i,o=0)=>{const r=[],{direction:a,start:l,after:c}=lF(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 SA(t,e){return t+(B_(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const $8=(t,e,n,s)=>{const{direction:i,start:o=0,after:r=0}=lF(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(SA,0):a.right=c.slice(r+1).reverse().reduce(SA,0),a},Yf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function cF(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===te&&!cF(e.children)):!0)?t:null}function i0e(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=af(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)||Eb(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=af(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?!!af(s.value,u)[oi(c,u)]:s.value.includes(c)},states:{expandRows:s,defaultExpandAll:n}}}function o0e(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=(A(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 r0e(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=U(()=>t.rowKey.value?h(t.data.value||[]):{}),d=U(()=>{const x=t.rowKey.value,S=Object.keys(o.value),M={};return S.length&&S.forEach(P=>{if(o.value[P].length){const T={children:[]};o.value[P].forEach(I=>{const L=oi(I,x);T.children.push(L),I[r.value]&&!M[L]&&(M[L]={children:[]})}),M[P]=T}}),M}),h=x=>{const S=t.rowKey.value,M={};return t0e(x,(P,T,I)=>{const L=oi(P,S);Ee(T)?M[L]={children:T.map(V=>oi(V,S)),level:I}:i.value&&(M[L]={children:[],lazy:!0,level:I})},a.value,r.value,i.value),M},f=(x=!1,S)=>{var L,V;S||(S=(L=c.store)==null?void 0:L.states.defaultExpandAll.value);const M=u.value,P=d.value,T=Object.keys(M),I={};if(T.length){const R=A(n),N=[],F=(z,G)=>{if(x)return e.value?S||e.value.includes(G):!!(S||z!=null&&z.expanded);{const K=S||e.value&&e.value.includes(G);return!!(z!=null&&z.expanded||K)}};T.forEach(z=>{const G=R[z],K={...M[z]};if(K.expanded=F(G,z),K.lazy){const{loaded:X=!1,loading:H=!1}=G||{};K.loaded=!!X,K.loading=!!H,N.push(z)}I[z]=K});const B=Object.keys(P);i.value&&B.length&&N.length&&B.forEach(z=>{var X;const G=R[z],K=P[z].children;if(N.includes(z)){if(((X=I[z].children)==null?void 0:X.length)!==0)throw new Error("[ElTable]children must be an empty array.");I[z].children=K}else{const{loaded:H=!1,loading:Q=!1}=G||{};I[z]={lazy:!0,loaded:!!H,loading:!!Q,expanded:F(G,z),children:K,level:void 0}}})}n.value=I,(V=c.store)==null||V.updateTableScrollY()};Me(()=>e.value,()=>{f(!0)},{deep:!0}),Me(()=>u.value,()=>{f()}),Me(()=>d.value,()=>{f()});const p=x=>{e.value=x,f()},m=x=>i.value&&x&&"loaded"in x&&!x.loaded,b=(x,S)=>{c.store.assertRowKey();const M=t.rowKey.value,P=oi(x,M),T=P&&n.value[P];if(P&&T&&"expanded"in T){const I=T.expanded;S=en(S)?!T.expanded:S,n.value[P].expanded=S,I!==S&&c.emit("expand-change",x,S),S&&m(T)&&k(x,P,T),c.store.updateTableScrollY()}},_=x=>{c.store.assertRowKey();const S=t.rowKey.value,M=oi(x,S),P=n.value[M];m(P)?k(x,M,P):b(x,void 0)},k=(x,S,M)=>{const{load:P}=c.props;P&&!n.value[S].loaded&&(n.value[S].loading=!0,P(x,M,T=>{if(!Ee(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",x,!0)}))};return{loadData:k,loadOrToggle:_,toggleTreeExpansion:b,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:(x,S)=>{const{lazy:M,rowKey:P}=c.props;if(M){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[x]&&(o.value[x]=S)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:s,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const a0e=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:Kve(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},z0=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,z0(n.children)):e.push(n)}),e};function l0e(){var Lt;const t=ht(),{size:e}=go((Lt=t.proxy)==null?void 0:Lt.$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),k=J(!1),C=J([]),x=J(!1),S=J(!1),M=J(null),P=J(null),T=J({}),I=J(null),L=J(null),V=J(null),R=J(null),N=J(null),F=U(()=>n.value?af(C.value,n.value):void 0);Me(s,()=>{var Je;t.state&&(K(!1),t.props.tableLayout==="auto"&&((Je=t.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const B=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},z=Je=>{var ut;(ut=Je.children)==null||ut.forEach(ft=>{ft.fixed=Je.fixed,z(ft)})},G=()=>{r.value.forEach(De=>{z(De)}),c.value=r.value.filter(De=>[!0,"left"].includes(De.fixed));const Je=r.value.find(De=>De.type==="selection");let ut;Je&&Je.fixed!=="right"&&!c.value.includes(Je)&&r.value.indexOf(Je)===0&&c.value.length&&(c.value.unshift(Je),ut=!0),u.value=r.value.filter(De=>De.fixed==="right");const ft=r.value.filter(De=>(ut?De.type!=="selection":!0)&&!De.fixed);a.value=Array.from(c.value).concat(ft).concat(u.value);const ye=z0(ft),Le=z0(c.value),ce=z0(u.value);m.value=ye.length,b.value=Le.length,_.value=ce.length,l.value=Array.from(Le).concat(ye).concat(ce),o.value=c.value.length>0||u.value.length>0},K=(Je,ut=!1)=>{Je&&G(),ut?t.state.doLayout():t.state.debouncedUpdateLayout()},X=Je=>F.value?!!F.value[oi(Je,n.value)]:C.value.includes(Je),H=()=>{k.value=!1;const Je=C.value;C.value=[],Je.length&&t.emit("selection-change",[])},Q=()=>{var ut,ft;let Je;if(n.value){Je=[];const ye=(ft=(ut=t==null?void 0:t.store)==null?void 0:ut.states)==null?void 0:ft.childrenColumnName.value,Le=af(s.value,n.value,!0,ye);for(const ce in F.value)Nt(F.value,ce)&&!Le[ce]&&Je.push(F.value[ce].row)}else Je=C.value.filter(ye=>!s.value.includes(ye));if(Je.length){const ye=C.value.filter(Le=>!Je.includes(Le));C.value=ye,t.emit("selection-change",ye.slice())}},ne=()=>(C.value||[]).slice(),Z=(Je,ut,ft=!0,ye=!1)=>{var ce,De,pt,_n;const Le={children:(De=(ce=t==null?void 0:t.store)==null?void 0:ce.states)==null?void 0:De.childrenColumnName.value,checkStrictly:(_n=(pt=t==null?void 0:t.store)==null?void 0:pt.states)==null?void 0:_n.checkStrictly.value};if(Eb(C.value,Je,ut,Le,ye?void 0:M.value,s.value.indexOf(Je),n.value)){const gs=(C.value||[]).slice();ft&&t.emit("select",gs,Je),t.emit("selection-change",gs)}},ae=()=>{var De,pt;const Je=S.value?!k.value:!(k.value||C.value.length);k.value=Je;let ut=!1,ft=0;const ye=(pt=(De=t==null?void 0:t.store)==null?void 0:De.states)==null?void 0:pt.rowKey.value,{childrenColumnName:Le}=t.store.states,ce={children:Le.value,checkStrictly:!1};s.value.forEach((_n,gs)=>{const lu=gs+ft;Eb(C.value,_n,Je,ce,M.value,lu,ye)&&(ut=!0),ft+=Ce(oi(_n,ye))}),ut&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",(C.value||[]).slice())},ge=()=>{var ce;if(((ce=s.value)==null?void 0:ce.length)===0){k.value=!1;return}const{childrenColumnName:Je}=t.store.states;let ut=0,ft=0;const ye=De=>{var pt;for(const _n of De){const gs=M.value&&M.value.call(null,_n,ut);if(X(_n))ft++;else if(!M.value||gs)return!1;if(ut++,(pt=_n[Je.value])!=null&&pt.length&&!ye(_n[Je.value]))return!1}return!0},Le=ye(s.value||[]);k.value=ft===0?!1:Le},Ce=Je=>{var Le;if(!t||!t.store)return 0;const{treeData:ut}=t.store.states;let ft=0;const ye=(Le=ut.value[Je])==null?void 0:Le.children;return ye&&(ft+=ye.length,ye.forEach(ce=>{ft+=Ce(ce)})),ft},oe=(Je,ut)=>{const ft={};return Us(Je).forEach(ye=>{T.value[ye.id]=ut,ft[ye.columnKey||ye.id]=ut}),ft},pe=(Je,ut,ft)=>{L.value&&L.value!==Je&&(L.value.order=null),L.value=Je,V.value=ut,R.value=ft},ie=()=>{let Je=A(i);Object.keys(T.value).forEach(ut=>{const ft=T.value[ut];if(!ft||ft.length===0)return;const ye=oF({columns:l.value},ut);ye&&ye.filterMethod&&(Je=Je.filter(Le=>ft.some(ce=>ye.filterMethod.call(null,ce,Le,ye))))}),I.value=Je},re=()=>{s.value=a0e(I.value??[],{sortingColumn:L.value,sortProp:V.value,sortOrder:R.value})},ke=(Je=void 0)=>{Je!=null&&Je.filter||ie(),re()},Ue=Je=>{const{tableHeaderRef:ut}=t.refs;if(!ut)return;const ft=Object.assign({},ut.filterPanels),ye=Object.keys(ft);if(ye.length)if(Ke(Je)&&(Je=[Je]),Ee(Je)){const Le=Je.map(ce=>Zve({columns:l.value},ce));ye.forEach(ce=>{const De=Le.find(pt=>pt.id===ce);De&&(De.filteredValue=[])}),t.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else ye.forEach(Le=>{const ce=l.value.find(De=>De.id===Le);ce&&(ce.filteredValue=[])}),T.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},ee=()=>{L.value&&(pe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:se,toggleRowExpansion:me,updateExpandRows:$e,states:Se,isRowExpanded:Ie}=i0e({data:s,rowKey:n}),{updateTreeExpandKeys:je,toggleTreeExpansion:Fe,updateTreeData:ze,updateKeyChildren:Ae,loadOrToggle:Ze,states:We}=r0e({data:s,rowKey:n}),{updateCurrentRowData:it,updateCurrentRow:be,setCurrentRowKey:ve,states:Te}=o0e({data:s,rowKey:n});return{assertRowKey:B,updateColumns:G,scheduleLayout:K,isSelected:X,clearSelection:H,cleanSelection:Q,getSelectionRows:ne,toggleRowSelection:Z,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:ge,updateFilters:oe,updateCurrentRow:be,updateSort:pe,execFilter:ie,execSort:re,execQuery:ke,clearFilter:Ue,clearSort:ee,toggleRowExpansion:me,setExpandRowKeysAdapter:Je=>{se(Je),je(Je)},setCurrentRowKey:ve,toggleRowExpansionAdapter:(Je,ut)=>{l.value.some(({type:ft})=>ft==="expand")?me(Je,ut):Fe(Je,ut)},isRowExpanded:Ie,updateExpandRows:$e,updateCurrentRowData:it,loadOrToggle:Ze,updateTreeData:ze,updateKeyChildren:Ae,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:k,selection:C,reserveSelection:x,selectOnIndeterminate:S,selectable:M,rowExpandable:P,filters:T,filteredData:I,sortingColumn:L,sortProp:V,sortOrder:R,hoverRow:N,...Se,...We,...Te}}}function $C(t,e){return t.map(n=>{var s;return n.id===e.id?e:((s=n.children)!=null&&s.length&&(n.children=$C(n.children,e)),n)})}function AC(t){t.forEach(e=>{var n,s;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(s=e.children)!=null&&s.length&&AC(e.children)}),t.sort((e,n)=>e.no-n.no)}function c0e(){const t=ht(),e=l0e(),n=Be("table"),{t:s}=Qt();return{ns:n,t:s,...e,mutations:{setData(a,l){const c=A(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),A(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=A(a._columns);let h=[];c?(c&&!c.children&&(c.children=[]),(f=c.children)==null||f.push(l),h=$C(d,c)):(d.push(l),h=d),AC(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&&(AC(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,c,u){var f;const d=A(a._columns)||[];if(c)(f=c.children)==null||f.splice(c.children.findIndex(p=>p.id===l.id),1),ot(()=>{var p;((p=c.children)==null?void 0:p.length)===0&&delete c.children}),a._columns.value=$C(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=A(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=A(c),f=A(u),p=A(d);B_(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(){ot(()=>t.layout.updateScrollY.apply(t.layout))}}}const A8={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 u0e(t,e){if(!t)throw new Error("Table is required.");const n=c0e();return n.toggleAllSelection=gd(n._toggleAllSelection,10),Object.keys(A8).forEach(s=>{uF(dF(e,s),s,n)}),d0e(n,e),n}function d0e(t,e){Object.keys(A8).forEach(n=>{Me(()=>dF(e,n),s=>{uF(s,n,t)})})}function uF(t,e,n){let s=t,i=A8[e];yt(i)&&(s=s||i.default,i=i.key),n.states[i].value=s}function dF(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 h0e=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)Nt(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(B_(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(!Gt)return;const n=this.table.vnode.el;if(t=Qve(t),this.height.value=Number(t),!n&&(t||t===0)){ot(()=>this.setHeight(t,e));return}n&&_t(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(!Gt)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=>!_t(l.width));if(s.forEach(l=>{_t(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 Jr=Symbol("ElTable"),hF=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,hF(n.children))):e.push(n)}),e},fF=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 hF(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 f0e(t){const e=Ye(Jr),n=U(()=>fF(t.store.states.originColumns.value));return{isGroup:U(()=>{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 p0e=fe({name:"ElTableFilterPanel",components:{ElCheckbox:Jt,ElCheckboxGroup:d8,ElScrollbar:Pi,ElTooltip:Ls,ElIcon:_e,ArrowDown:Fd,ArrowUp:Z_},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:zn.appendTo},setup(t){const e=ht(),{t:n}=Qt(),s=Be("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=U(()=>t.column&&t.column.filters),c=U(()=>t.column&&t.column.filterClassName?`${s.b()} ${t.column.filterClassName}`:s.b()),u=U({get:()=>{var P;return(((P=t.column)==null?void 0:P.filteredValue)||[])[0]},set:P=>{d.value&&(va(P)?d.value.splice(0,1):d.value.splice(0,1,P))}}),d=U({get(){return t.column?t.column.filteredValue||[]:[]},set(P){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",P))}}),h=U(()=>t.column?t.column.filterMultiple:!0),f=P=>P.value===u.value,p=()=>{var P;(P=o.value)==null||P.onClose()},m=()=>{k(d.value),p()},b=()=>{d.value=[],k(d.value),p()},_=(P,T)=>{u.value=P,a.value=T,va(P)?k([]):k(d.value),p()},k=P=>{var T,I;(T=t.store)==null||T.commit("filterChange",{column:t.column,values:P}),(I=t.store)==null||I.updateAllSelected()},C=()=>{var P,T;(P=r.value)==null||P.focus(),!h.value&&S(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},x=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},S=()=>{if(va(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:va,isActive:f,t:n,ns:s,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:C,handleHideTooltip:x,handleKeydown:P=>{var R,N;const T=ls(P),I=(l.value?l.value.length:0)+1;let L=a.value,V=!0;switch(T){case He.down:case He.right:L=(L+1)%I;break;case He.up:case He.left:L=(L-1+I)%I;break;case He.tab:p(),V=!1;break;case He.enter:case He.space:if(L===0)_(null,0);else{const F=(l.value||[])[L-1];F.value&&_(F.value,L)}break;default:V=!1;break}V&&P.preventDefault(),a.value=L,(N=(R=r.value)==null?void 0:R.querySelector(`.${s.e("list-item")}:nth-child(${L+1})`))==null||N.focus()}}}});const m0e=["disabled"],g0e=["tabindex","aria-checked"],v0e=["tabindex","aria-checked","onClick"],y0e=["aria-label"];function b0e(t,e,n,s,i,o){const r=Y("el-checkbox"),a=Y("el-checkbox-group"),l=Y("el-scrollbar"),c=Y("arrow-up"),u=Y("arrow-down"),d=Y("el-icon"),h=Y("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(),E("div",{key:0,ref:"rootRef",tabindex:"-1",class:q(t.ns.e("multiple"))},[g("div",{class:q(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:q(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),E(te,null,we(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:w(()=>[W($(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:q(t.ns.e("bottom"))},[g("button",{class:q(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,m0e),g("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},$(t.t("el.table.resetFilter")),1)],2)],2)):(v(),E("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:q(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[g("li",{role:"radio",class:q([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,g0e),(v(!0),E(te,null,we(t.filters,(f,p)=>(v(),E("li",{key:f.value,role:"radio",class:q([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,v0e))),128))],34))]),default:w(()=>{var f;return[g("button",{type:"button",class:q(`${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,y0e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var _0e=fi(p0e,[["render",b0e]]);function E8(t){const e=ht();Id(()=>{n.value.addObserver(e)}),Ft(()=>{s(n.value),i(n.value)}),kl(()=>{s(n.value),i(n.value)}),Cl(()=>{n.value.removeObserver(e)});const n=U(()=>{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 w0e(t,e){const n=ht(),s=Ye(Jr),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 _,k,C;if(Gt&&!(b.children&&b.children.length>0)&&a.value&&t.border&&a.value.id===b.id){l.value=!0;const x=s;e("set-drag-visible",!0);const S=(_=x==null?void 0:x.vnode.el)==null?void 0:_.getBoundingClientRect().left,M=(C=(k=n==null?void 0:n.vnode)==null?void 0:k.el)==null?void 0:C.querySelector(`th.${b.id}`),P=M.getBoundingClientRect(),T=P.left-S+30;vd(M,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-S,startColumnLeft:P.left-S,tableLeft:S};const I=x==null?void 0:x.refs.resizeProxy;I.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=R=>{const N=R.clientX-c.value.startMouseLeft,F=c.value.startLeft+N;I.style.left=`${Math.max(T,F)}px`},V=()=>{if(l.value){const{startColumnLeft:R,startLeft:N}=c.value;b.width=b.realWidth=Number.parseInt(I.style.left,10)-R,x==null||x.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",L),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{xa(M,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",V)}},d=(m,b)=>{var I;if(!t.border||b.children&&b.children.length>0)return;const _=m.target,k=Po(_)?_.closest("th"):null;if(!k)return;const C=hl(k,"is-sortable");if(C){const L=l.value?"col-resize":"";k.style.cursor=L;const V=k.querySelector(".caret-wrapper");V&&(V.style.cursor=L)}if(!b.resizable||l.value){a.value=null;return}const x=k.getBoundingClientRect(),S=((I=k.parentNode)==null?void 0:I.lastElementChild)===k,M=t.allowDragLastColumn||!S,P=x.width>12&&x.right-m.clientX<8&&M,T=P?"col-resize":"";document.body.style.cursor=T,a.value=P?b:null,C&&(k.style.cursor=T)},h=()=>{!Gt||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 I;m.stopPropagation();const k=b.order===_?null:_||f(b),C=(I=m.target)==null?void 0:I.closest("th");if(C&&hl(C,"noclick")){xa(C,"noclick");return}if(!b.sortable)return;const x=m.currentTarget;if(["ascending","descending"].some(L=>hl(x,L)&&!b.sortOrders.includes(L)))return;const S=t.store.states;let M=S.sortProp.value,P;const T=S.sortingColumn.value;(T!==b||T===b&&B_(T.order))&&(T&&(T.order=null),S.sortingColumn.value=b,M=b.property),k?P=b.order=k:P=b.order=null,S.sortProp.value=M,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 k0e(t){const e=Ye(Jr),n=Be("table");return{getHeaderRowStyle:a=>{const l=e==null?void 0:e.props.headerRowStyle;return et(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):et(c)&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{let d=(e==null?void 0:e.props.headerCellStyle)??{};et(d)&&(d=d.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const h=$8(l,u.fixed,t.store,c);return Yf(h,"left"),Yf(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=S8(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):et(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 C0e=fe({name:"ElTableHeader",components:{ElCheckbox:Jt},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=Ye(Jr),i=Be("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=E8(s),l=(s==null?void 0:s.props.tableLayout)==="auto",c=In(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())})};Me(c,h),wn(()=>{d&&(clearTimeout(d),d=void 0)}),Ft(async()=>{await ot(),await ot();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:k,handleFilterClick:C}=w0e(t,e),{getHeaderRowStyle:x,getHeaderRowClass:S,getHeaderCellStyle:M,getHeaderCellClass:P}=k0e(t),{isGroup:T,toggleAllSelection:I,columnRows:L}=f0e(t),{t:V}=Qt();return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=o,{ns:i,t:V,filterPanels:o,onColumnsChange:r,onScrollableChange:a,columnRows:L,getHeaderRowClass:S,getHeaderRowStyle:x,getHeaderCellClass:P,getHeaderCellStyle:M,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:_,handleSortClick:k,handleFilterClick:C,isGroup:T,toggleAllSelection:I,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 k=1;return bt("thead",{ref:"theadRef",class:t.is("group",n)},s.map((C,x)=>bt("tr",{class:r(x),key:x,style:a(x)},C.map((S,M)=>{S.rowSpan>k&&(k=S.rowSpan);const P=o(x,M,C,S);return _&&S.fixed&&b.set(P,S),bt("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(x,M,C,S),onClick:T=>{var I;(I=T.currentTarget)!=null&&I.classList.contains("noclick")||l(T,S)},onContextmenu:T=>c(T,S),onMousedown:T=>u(T,S),onMousemove:T=>d(T,S),onMouseout:f},[bt("div",{class:["cell",S.filteredValue&&S.filteredValue.length>0?"highlight":""]},[S.renderHeader?S.renderHeader({column:S,$index:M,store:p,_self:m}):S.label,S.sortable&&bt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:S.label||""}),onClick:T=>h(T,S)},[bt("i",{onClick:T=>h(T,S,"ascending"),class:"sort-caret ascending"}),bt("i",{onClick:T=>h(T,S,"descending"),class:"sort-caret descending"})]),S.filterable&&bt(_0e,{store:p,placement:S.filterPlacement||"bottom-start",appendTo:m==null?void 0:m.appendFilterPanelTo,column:S,upDataColumn:(T,I)=>{S[T]=I}},{"filter-icon":()=>S.renderFilterIcon?S.renderFilterIcon({filterOpened:S.filterOpened}):null})])])}))))}});function lf(t,e,n=.03){return t-e>n}function x0e(t){const e=Ye(Jr),n=J(""),s=J(bt("div")),i=(p,m,b)=>{var S,M;const _=e,k=Hw(p);let C=null;const x=(S=_==null?void 0:_.vnode.el)==null?void 0:S.dataset.prefix;k&&(C=CA({columns:((M=t.store)==null?void 0:M.states.columns.value)??[]},k,x),C&&(_==null||_.emit(`cell-${b}`,m,C,k,p))),_==null||_.emit(`row-${b}`,m,C,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=gd(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=gd(()=>{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 k;let _=(k=m==null?void 0:m.target)==null?void 0:k.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 G,K,X;if(!e)return;const _=e,k=Hw(p),C=(G=_==null?void 0:_.vnode.el)==null?void 0:G.dataset.prefix;let x=null;if(k){if(x=CA({columns:((K=t.store)==null?void 0:K.states.columns.value)??[]},k,C),!x)return;k.rowSpan>1&&d(k.rowSpan,p,vd);const H=_.hoverState={cell:k,column:x,row:m};_==null||_.emit("cell-mouse-enter",H.row,H.column,H.cell,p)}if(!b){(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn());return}const S=p.target.querySelector(".cell");if(!(hl(S,`${C}-tooltip`)&&S.childNodes.length&&((X=S.textContent)!=null&&X.trim())))return;const M=document.createRange();M.setStart(S,0),M.setEnd(S,S.childNodes.length);const{width:P,height:T}=M.getBoundingClientRect(),{width:I,height:L}=S.getBoundingClientRect(),{top:V,left:R,right:N,bottom:F}=u(S),B=R+N,z=V+F;lf(P+B,I)||lf(T+z,L)||lf(S.scrollWidth,I)?s0e(b,((k==null?void 0:k.innerText)||(k==null?void 0:k.textContent))??"",m,x,k,_):(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn())},handleCellMouseLeave:p=>{const m=Hw(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,xa);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 S0e(t){const e=Ye(Jr),n=Be("table");return{getRowStyle:(c,u)=>{const d=e==null?void 0:e.props.rowStyle;return et(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):et(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??{};et(f)&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=$8(u,t==null?void 0:t.fixed,t.store);return Yf(m,"left"),Yf(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=S8(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):et(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(et(m)){const b=m({row:c,column:u,rowIndex:d,columnIndex:h});Ee(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 $0e=["colspan","rowspan"];var A0e=fe({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(v(),E("td",{colspan:t.colspan,rowspan:t.rowspan},[le(e.$slots,"default")],8,$0e))}}),E0e=A0e;function M0e(t){const e=Ye(Jr),n=Be("table"),{handleDoubleClick:s,handleClick:i,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=x0e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:b,getColspanRealWidth:_}=S0e(t);let k=-1;const C=U(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:I})=>I==="default")}),x=(T,I)=>{var V;const L=(V=e==null?void 0:e.props)==null?void 0:V.rowKey;return L?oi(T,L):I},S=(T,I,L,V=!1)=>{const{tooltipEffect:R,tooltipOptions:N,store:F}=t,{indent:B,columns:z}=F.states,G=[];let K=!0;return L&&(G.push(n.em("row",`level-${L.level}`)),K=!!L.display),I===0&&(k=-1),t.stripe&&K&&k++,G.push(...f(T,I,k)),bt("tr",{style:[K?null:{display:"none"},h(T,I)],class:G,key:x(T,I),onDblclick:X=>s(X,T),onClick:X=>i(X,T),onContextmenu:X=>o(X,T),onMouseenter:()=>r(I),onMouseleave:a},z.value.map((X,H)=>{const{rowspan:Q,colspan:ne}=b(T,X,I,H);if(!Q||!ne)return null;const Z=Object.assign({},X);Z.realWidth=_(z.value,ne,H);const ae={store:F,_self:t.context||e,column:Z,row:T,$index:I,cellIndex:H,expanded:V};H===C.value&&L&&(ae.treeNode={indent:L.level&&L.level*B.value,level:L.level},Jn(L.expanded)&&(ae.treeNode.expanded=L.expanded,"loading"in L&&(ae.treeNode.loading=L.loading),"noLazyChildren"in L&&(ae.treeNode.noLazyChildren=L.noLazyChildren)));const ge=`${x(T,I)},${H}`,Ce=Z.columnKey||Z.rawColumnKey||"",oe=X.showOverflowTooltip&&oD({effect:R},N,X.showOverflowTooltip);return bt(E0e,{style:p(I,H,T,X),class:m(I,H,T,X,ne-1),key:`${Ce}${ge}`,rowspan:Q,colspan:ne,onMouseenter:pe=>l(pe,T,oe),onMouseleave:c},{default:()=>M(H,X,ae)})}))},M=(T,I,L)=>I.renderCell(L);return{wrappedRowRender:(T,I)=>{const L=t.store,{isRowExpanded:V,assertRowKey:R}=L,{treeData:N,lazyTreeNodeMap:F,childrenColumnName:B,rowKey:z}=L.states,G=L.states.columns.value;if(G.some(({type:K})=>K==="expand")){const K=V(T),X=S(T,I,void 0,K),H=e==null?void 0:e.renderExpanded;if(!H)return console.error("[Element Error]renderExpanded is required."),X;const Q=[[X]];return(e.props.preserveExpandedContent||K)&&Q[0].push(bt("tr",{key:`expanded-row__${X.key}`,style:{display:K?"":"none"}},[bt("td",{colspan:G.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[H({row:T,$index:I,store:L,expanded:K})])])),Q}else if(Object.keys(N.value).length){R();const K=oi(T,z.value);let X=N.value[K],H=null;X&&(H={expanded:X.expanded,level:X.level,display:!0,noLazyChildren:void 0,loading:void 0},Jn(X.lazy)&&(H&&Jn(X.loaded)&&X.loaded&&(H.noLazyChildren=!(X.children&&X.children.length)),H.loading=X.loading));const Q=[S(T,I,H??void 0)];if(X){let ne=0;const Z=(ae,ge)=>{ae&&ae.length&&ge&&ae.forEach(Ce=>{const oe={display:ge.display&&ge.expanded,level:ge.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=oi(Ce,z.value);if(va(pe))throw new Error("For nested data item, row-key is required.");X={...N.value[pe]},X&&(oe.expanded=X.expanded,X.level=X.level||oe.level,X.display=!!(X.expanded&&oe.display),Jn(X.lazy)&&(Jn(X.loaded)&&X.loaded&&(oe.noLazyChildren=!(X.children&&X.children.length)),oe.loading=X.loading)),ne++,Q.push(S(Ce,I+ne,oe)),X&&Z(F.value[pe]||Ce[B.value],X)})};X.display=!0,Z(F.value[K]||T[B.value],X)}return Q}else return S(T,I,void 0)},tooltipContent:u,tooltipTrigger:d}}const T0e={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=fe({name:"ElTableBody",props:T0e,setup(t){var u;const e=ht(),n=Ye(Jr),s=Be("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}=M0e(t),{onColumnsChange:a,onScrollableChange:l}=E8(n),c=[];return Me((u=t.store)==null?void 0:u.states.hoverRow,(d,h)=>{var _,k;const f=e==null?void 0:e.vnode.el,p=Array.from((f==null?void 0:f.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${s.e("row")}`));let m=d;const b=(_=p[m])==null?void 0:_.childNodes;if(b!=null&&b.length){let C=0;Array.from(b).reduce((x,S,M)=>{var P,T;return((P=b[M])==null?void 0:P.colSpan)>1&&(C=(T=b[M])==null?void 0:T.colSpan),S.nodeName!=="TD"&&C===0&&x.push(M),C>0&&C--,x},[]).forEach(x=>{var S;for(m=d;m>0;){const M=(S=p[m-1])==null?void 0:S.childNodes;if(M[x]&&M[x].nodeName==="TD"&&M[x].rowSpan>1){vd(M[x],"hover-cell"),c.push(M[x]);break}m--}})}else c.forEach(C=>xa(C,"hover-cell")),c.length=0;!((k=t.store)!=null&&k.states.isComplex.value)||!Gt||qg(()=>{const C=p[h],x=p[d];C&&!C.classList.contains("hover-fixed-row")&&xa(C,"hover-row"),x&&vd(x,"hover-row")})}),Cl(()=>{Rn==null||Rn()}),{ns:s,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this;return bt("tbody",{tabIndex:-1},[((e==null?void 0:e.states.data.value)||[]).reduce((n,s)=>n.concat(t(s,n.length)),[])])}});function I0e(){var e;const t=(e=Ye(Jr))==null?void 0:e.store;return{leftFixedLeafCount:U(()=>(t==null?void 0:t.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:U(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columnsCount:U(()=>(t==null?void 0:t.states.columns.value.length)??0),leftFixedCount:U(()=>(t==null?void 0:t.states.fixedColumns.value.length)??0),rightFixedCount:U(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columns:U(()=>(t==null?void 0:t.states.columns.value)??[])}}function L0e(t){const{columns:e}=I0e(),n=Be("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...S8(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=$8(r,o.fixed,t.store);return Yf(a,"left"),Yf(a,"right"),a},columns:e}}var O0e=fe({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=Ye(Jr),n=Be("table"),{getCellClasses:s,getCellStyles:i,columns:o}=L0e(t),{onScrollableChange:r,onColumnsChange:a}=E8(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)}),bt(bt("tfoot",[bt("tr",{},[...t.map((a,l)=>bt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[bt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function D0e(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 R0e(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);Me(()=>t.height,B=>{e.setHeight(B??null)},{immediate:!0}),Me(()=>t.maxHeight,B=>{e.setMaxHeight(B??null)},{immediate:!0}),Me(()=>[t.currentRowKey,n.states.rowKey],([B,z])=>{!A(z)||!A(B)||n.setCurrentRowKey(`${B}`)},{immediate:!0}),Me(()=>t.data,B=>{s.store.commit("setData",B)},{immediate:!0,deep:!0}),gl(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const _=()=>{s.store.commit("setHoverRow",null),s.hoverState&&(s.hoverState=null)},k=(B,z)=>{const{pixelX:G,pixelY:K}=z;Math.abs(G)>=Math.abs(K)&&(s.refs.bodyWrapper.scrollLeft+=z.pixelX/5)},C=U(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),x=U(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{C.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(I)};Ft(async()=>{await ot(),n.updateColumns(),L(),requestAnimationFrame(S);const B=s.vnode.el,z=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&&z?z.offsetHeight:null},n.states.columns.value.forEach(G=>{G.filteredValue&&G.filteredValue.length&&s.store.commit("filterChange",{column:G,values:G.filteredValue,silent:!0})}),s.$ready=!0});const M=(B,z)=>{if(!B)return;const G=Array.from(B.classList).filter(K=>!K.startsWith("is-scrolling-"));G.push(e.scrollX.value?z:"is-scrolling-none"),B.className=G.join(" ")},P=B=>{const{tableWrapper:z}=s.refs;M(z,B)},T=B=>{const{tableWrapper:z}=s.refs;return!!(z&&z.classList.contains(B))},I=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:z,offsetWidth:G,scrollWidth:K}=B,{headerWrapper:X,footerWrapper:H}=s.refs;X&&(X.scrollLeft=z),H&&(H.scrollLeft=z),z>=K-G-1?P("is-scrolling-right"):P(z===0?"is-scrolling-left":"is-scrolling-middle")},L=()=>{s.refs.scrollBarRef&&(s.refs.scrollBarRef.wrapRef&&Hn(s.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),t.fit?Es(s.vnode.el,V):Hn(window,"resize",V),Es(s.refs.tableInnerWrapper,()=>{var B,z;V(),(z=(B=s.refs)==null?void 0:B.scrollBarRef)==null||z.update()}))},V=()=>{var Z,ae,ge,Ce;const B=s.vnode.el;if(!s.$ready||!B)return;let z=!1;const{width:G,height:K,headerHeight:X}=l.value,H=d.value=B.offsetWidth;G!==H&&(z=!0);const Q=B.offsetHeight;(t.height||C.value)&&K!==Q&&(z=!0);const ne=t.tableLayout==="fixed"?s.refs.headerWrapper:(Z=s.refs.tableHeaderRef)==null?void 0:Z.$el;t.showHeader&&(ne==null?void 0:ne.offsetHeight)!==X&&(z=!0),h.value=((ae=s.refs.tableWrapper)==null?void 0:ae.scrollHeight)||0,p.value=(ne==null?void 0:ne.scrollHeight)||0,m.value=((ge=s.refs.footerWrapper)==null?void 0:ge.offsetHeight)||0,b.value=((Ce=s.refs.appendWrapper)==null?void 0:Ce.offsetHeight)||0,f.value=h.value-p.value-m.value-b.value,z&&(l.value={width:H,height:Q,headerHeight:t.showHeader&&(ne==null?void 0:ne.offsetHeight)||0},S())},R=Ti(),N=U(()=>{const{bodyWidth:B,scrollY:z,gutterWidth:G}=e;return B.value?`${B.value-(z.value?G:0)}px`:""}),F=U(()=>t.maxHeight?"fixed":t.tableLayout);return{isHidden:i,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:_,handleHeaderFooterMousewheel:k,tableSize:R,emptyBlockStyle:U(()=>{if(t.data&&t.data.length)return;let B="100%";t.height&&f.value&&(B=`${f.value}px`);const z=d.value;return{width:z?`${z}px`:"",height:B}}),resizeProxyVisible:r,bodyWidth:N,resizeState:l,doLayout:S,tableBodyStyles:x,tableLayout:F,scrollbarViewStyle:u,scrollbarStyle:U(()=>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 V0e(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)};Ft(()=>{n()}),Cl(()=>{e==null||e.disconnect()})}var F0e={data:{type:Array,default:()=>[]},size:Ki,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 pF(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:i})=>en(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 bt("colgroup",{},n.map(i=>bt("col",s(i))))}pF.props=["columns","tableLayout"];const N0e=()=>{const t=J(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&_t(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 B0e=1;var z0e=fe({name:"ElTable",directives:{Mousewheel:che},components:{TableHeader:C0e,TableBody:P0e,TableFooter:O0e,ElScrollbar:Pi,hColgroup:pF},props:F0e,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}=Qt(),n=Be("table"),s=Kc("table"),i=ht();Pt(Jr,i);const o=u0e(i,t);i.store=o;const r=new h0e({store:i.store,table:i,fit:t.fit,showHeader:t.showHeader});i.layout=r;const a=U(()=>(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:_}=D0e(o),{isHidden:k,renderExpanded:C,setDragVisible:x,isGroup:S,handleMouseLeave:M,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:I,resizeProxyVisible:L,bodyWidth:V,resizeState:R,doLayout:N,tableBodyStyles:F,tableLayout:B,scrollbarViewStyle:z,scrollbarStyle:G}=R0e(t,r,o,i),{scrollBarRef:K,scrollTo:X,setScrollLeft:H,setScrollTop:Q}=N0e(),ne=gd(N,50),Z=`${n.namespace.value}-table_${B0e++}`;i.tableId=Z,i.state={isGroup:S,resizeState:R,doLayout:N,debouncedUpdateLayout:ne};const ae=U(()=>t.sumText??e("el.table.sumText")),ge=U(()=>t.emptyText??e("el.table.emptyText")),Ce=U(()=>{var ie;return t.tooltipEffect??((ie=s.value)==null?void 0:ie.tooltipEffect)}),oe=U(()=>{var ie;return t.tooltipOptions??((ie=s.value)==null?void 0:ie.tooltipOptions)}),pe=U(()=>fF(o.states.originColumns.value)[0]);return V0e(i),wn(()=>{ne.cancel()}),{ns:n,layout:r,store:o,columns:pe,handleHeaderFooterMousewheel:P,handleMouseLeave:M,tableId:Z,tableSize:T,isHidden:k,isEmpty:a,renderExpanded:C,resizeProxyVisible:L,resizeState:R,isGroup:S,bodyWidth:V,tableBodyStyles:F,emptyBlockStyle:I,debouncedUpdateLayout:ne,setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,doLayout:N,sort:b,updateKeyChildren:_,t:e,setDragVisible:x,context:i,computedSumText:ae,computedEmptyText:ge,computedTooltipEffect:Ce,computedTooltipOptions:oe,tableLayout:B,scrollbarViewStyle:z,scrollbarStyle:G,scrollBarRef:K,scrollTo:X,setScrollLeft:H,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const H0e=["data-prefix"],U0e={ref:"hiddenColumns",class:"hidden-columns"};function j0e(t,e,n,s,i,o){const r=Y("hColgroup"),a=Y("table-header"),l=Y("table-body"),c=Y("table-footer"),u=Y("el-scrollbar"),d=xt("mousewheel");return v(),E("div",{ref:"tableWrapper",class:q([{[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:Xe(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...h)=>t.handleMouseLeave&&t.handleMouseLeave(...h))},[g("div",{ref:"tableInnerWrapper",class:q(t.ns.e("inner-wrapper"))},[g("div",U0e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Re((v(),E("div",{key:0,ref:"headerWrapper",class:q(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:q(t.ns.e("header")),style:Xe(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:q(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:q(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe({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:q(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:q(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(),E("div",{key:0,ref:"emptyBlock",style:Xe(t.emptyBlockStyle),class:q(t.ns.e("empty-block"))},[g("span",{class:q(t.ns.e("empty-text"))},[le(t.$slots,"empty",{},()=>[W($(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),E("div",{key:1,ref:"appendWrapper",class:q(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"?Re((v(),E("div",{key:1,ref:"footerWrapper",class:q(t.ns.e("footer-wrapper"))},[g("table",{class:q(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe(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)),[[Ht,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),E("div",{key:2,class:q(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],2),Re(g("div",{ref:"resizeProxy",class:q(t.ns.e("column-resize-proxy"))},null,2),[[Ht,t.resizeProxyVisible]])],46,H0e)}var W0e=fi(z0e,[["render",j0e]]);const Y0e={selection:"table-column--selection",expand:"table__expand-column"},q0e={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:""}},G0e=t=>Y0e[t]||"",X0e={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return bt(Jt,{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 bt(Jt,{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 _t(s)?n=e+s:et(s)&&(n=s(e)),bt("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")),bt("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})]:[bt(_e,null,{default:()=>[bt(Fr)]})]})},sortable:!1,resizable:!1}};function K0e({row:t,column:e,$index:n}){var o;const s=e.property,i=s&&Sc(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 Z0e({row:t,treeNode:e,store:n},s=!1){const{ns:i}=n;if(!e)return s?[bt("span",{class:i.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(bt("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),Jn(e.expanded)&&!e.noLazyChildren){const a=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=Fr;e.loading&&(l=Hf),o.push(bt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:r},{default:()=>[bt(_e,{class:i.is("loading",e.loading)},{default:()=>[bt(l)]})]}))}else o.push(bt("span",{class:i.e("placeholder")}));return o}function $A(t,e){return t.reduce((n,s)=>(n[s]=s,n),e)}function J0e(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];Nt(e,c)&&Me(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=x8(u)),c==="minWidth"&&l==="realMinWidth"&&(d=rF(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];Nt(e,d)&&Me(()=>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=>{Nt(t.value.props,u)&&Me(()=>t.value.props[u],d=>{n.columnConfig.value.type!=="selection"&&en(e[u])&&(n.columnConfig.value[u]=d)})});const c=Kc("table");c.value&&Nt(c.value,"showOverflowTooltip")&&Me(()=>{var u;return(u=c.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!en(e.showOverflowTooltip)||!en(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function Q0e(t,e,n){const s=ht(),i=J(""),o=J(!1),r=J(),a=J(),l=Be("table");gl(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),gl(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:r.value,a.value});const c=U(()=>{let x=s.vnode.vParent||s.parent;for(;x&&!x.tableId&&!x.columnId;)x=x.vnode.vParent||x.parent;return x}),u=U(()=>{const{store:x}=s.parent;if(!x)return!1;const{treeData:S}=x.states,M=S.value;return M&&Object.keys(M).length>0}),d=J(x8(t.width)),h=J(rF(t.minWidth)),f=x=>(d.value&&(x.width=d.value),h.value&&(x.minWidth=h.value),!d.value&&h.value&&(x.width=void 0),x.minWidth||(x.minWidth=80),x.realWidth=Number(en(x.width)?x.minWidth:x.width),x),p=x=>{const S=x.type,M=X0e[S]||{};Object.keys(M).forEach(T=>{const I=M[T];T!=="className"&&!en(I)&&(x[T]=I)});const P=G0e(S);if(P){const T=`${A(l.namespace)}-${P}`;x.className=x.className?`${x.className} ${T}`:T}return x},m=x=>{Ee(x)?x.forEach(M=>S(M)):S(x);function S(M){var P;((P=M==null?void 0:M.type)==null?void 0:P.name)==="ElTableColumn"&&(M.vParent=s)}};return{columnId:i,realAlign:r,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:x=>{t.renderHeader?Tt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):x.type!=="selection"&&(x.renderHeader=M=>{if(s.columnConfig.value.label,e.header){const P=e.header(M);if(cF(P))return bt(te,P)}return W(x.label)}),e["filter-icon"]&&(x.renderFilterIcon=M=>le(e,"filter-icon",M)),e.expand&&(x.renderExpand=M=>le(e,"expand",M));let S=x.renderCell;return x.type==="expand"?(x.renderCell=M=>bt("div",{class:"cell"},[S(M)]),n.value.renderExpanded=M=>e.default?e.default(M):e.default):(S=S||K0e,x.renderCell=M=>{let P=null;if(e.default){const R=e.default(M);P=R.some(N=>N.type!==Zn)?R:S(M)}else P=S(M);const{columns:T}=n.value.store.states,I=T.value.findIndex(R=>R.type==="default"),L=Z0e(M,u.value&&M.cellIndex===I),V={class:"cell",style:{}};return x.showOverflowTooltip&&(V.class=`${V.class} ${A(l.namespace)}-tooltip`,V.style={width:`${(M.column.realWidth||Number(M.column.width))-1}px`}),m(P),bt("div",V,[L,P])}),x},getPropsData:(...x)=>x.reduce((S,M)=>(Ee(M)&&M.forEach(P=>{S[P]=t[P]}),S),{}),getColumnElIndex:(x,S)=>Array.prototype.indexOf.call(x,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",s.columnConfig.value)}}}var eye={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 tye=1;var nye=fe({name:"ElTableColumn",components:{ElCheckbox:Jt},props:eye,setup(t,{slots:e}){const n=ht(),s=Kc("table"),i=J({}),o=U(()=>{let x=n.parent;for(;x&&!x.tableId;)x=x.parent;return x}),{registerNormalWatchers:r,registerComplexWatchers:a}=J0e(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:b,realAlign:_,updateColumnOrder:k}=Q0e(t,e,o),C=d.value;l.value=`${"tableId"in C&&C.tableId||"columnId"in C&&C.columnId}_column_${tye++}`,Id(()=>{var L,V;c.value=o.value!==C;const x=t.type||"default",S=t.sortable===""?!0:t.sortable,M=x==="selection"?!1:en(t.showOverflowTooltip)?C.props.showOverflowTooltip??((L=s.value)==null?void 0:L.showOverflowTooltip):t.showOverflowTooltip,P=en(t.tooltipFormatter)?C.props.tooltipFormatter??((V=s.value)==null?void 0:V.tooltipFormatter):t.tooltipFormatter,T={...q0e[x],id:l.value,type:x,property:t.prop||t.property,align:_,headerAlign:u,showOverflowTooltip:M,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 I=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);I=Jve(T,I),I=e0e(p,h,f)(I),i.value=I,r(),a()}),Ft(()=>{var P,T;const x=d.value,S=c.value?(P=x.vnode.el)==null?void 0:P.children:(T=x.refs.hiddenColumns)==null?void 0:T.children,M=()=>b(S||[],n.vnode.el);i.value.getColumnIndex=M,M()>-1&&o.value.store.commit("insertColumn",i.value,c.value?"columnConfig"in x&&x.columnConfig.value:null,k)}),wn(()=>{const x=i.value.getColumnIndex;(x?x():-1)>-1&&o.value.store.commit("removeColumn",i.value,c.value?"columnConfig"in C&&C.columnConfig.value:null,k)}),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(Ee(s))for(const o of s)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?i.push(o):o.type===te&&Ee(o.children)&&o.children.forEach(r=>{(r==null?void 0:r.patchFlag)!==1024&&!Ke(r==null?void 0:r.children)&&i.push(r)});return bt("div",i)}catch{return bt("div",[])}}}),mF=nye;const Qr=Ut(W0e,{TableColumn:mF}),ea=Is(mF),a2=Symbol("tabsRootContextKey"),sye=Ge({tabs:{type:ue(Array),default:()=>ii([])},tabRefs:{type:ue(Object),default:()=>ii({})}}),AA="ElTabBar";var iye=fe({name:AA,__name:"tab-bar",props:sye,setup(t,{expose:e}){const n=t,s=Ye(a2);s||vo(AA,"<el-tabs><el-tab-bar /></el-tabs>");const i=Be("tabs"),o=J(),r=J(),a=U(()=>{var f;return en(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(k=>{if(en(k.paneName))return!1;const C=n.tabRefs[k.paneName];if(!C)return!1;if(!k.active)return!0;f=C[`offset${xw(_)}`],p=C[`client${xw(m)}`];const x=window.getComputedStyle(C);return m==="width"&&(p-=Number.parseFloat(x.paddingLeft)+Number.parseFloat(x.paddingRight),f+=Number.parseFloat(x.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${xw(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(Es(f,c))})};Me(()=>n.tabs,async()=>{await ot(),c(),d()},{immediate:!0});const h=Es(o,()=>c());return wn(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:o,update:c}),(f,p)=>a.value?(v(),E("div",{key:0,ref_key:"barRef",ref:o,class:q([A(i).e("active-bar"),A(i).is(A(s).props.tabPosition)]),style:Xe(r.value)},null,6)):O("v-if",!0)}}),oye=iye;const rye=Ge({panes:{type:ue(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}}),aye={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},EA="ElTabNav",lye=fe({name:EA,props:rye,emits:aye,setup(t,{expose:e,emit:n}){const s=Ye(a2);s||vo(EA,"<el-tabs><tab-nav /></el-tabs>");const i=Be("tabs"),o=$ie(),r=Mie(),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),_=Fn(),k=U(()=>["top","bottom"].includes(s.props.tabPosition)),C=U(()=>k.value?"width":"height"),x=U(()=>{const ne=C.value==="width"?"X":"Y";return{transition:b.value?"none":void 0,transform:`translate${ne}(-${f.value}px)`}}),{width:S,height:M}=d$(a),{width:P,height:T}=d$(l,{width:0,height:0},{box:"border-box"}),I=U(()=>k.value?S.value:M.value),L=U(()=>k.value?P.value:T.value),{onWheel:V}=Dve({atStartEdge:U(()=>f.value<=0),atEndEdge:U(()=>L.value-f.value<=I.value),layout:U(()=>k.value?"horizontal":"vertical")},ne=>{f.value=NO(f.value+ne,0,L.value-I.value)}),R=ne=>{b.value=!0,V(ne),qg(()=>{b.value=!1})},N=()=>{if(!a.value)return;const ne=a.value.getBoundingClientRect()[C.value],Z=f.value;Z&&(f.value=Z>ne?Z-ne:0)},F=()=>{if(!a.value||!l.value)return;const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;lf(ne-ae,Z)&&(f.value=ne-ae>Z*2?ae+Z:ne-Z)},B=async()=>{const ne=l.value;if(!h.value||!c.value||!a.value||!ne)return;await ot();const Z=u.value[t.currentName];if(!Z)return;const ae=a.value,ge=Z.getBoundingClientRect(),Ce=ae.getBoundingClientRect(),oe=Ce.left+1,pe=Ce.right-1,ie=ne.getBoundingClientRect(),re=k.value?ie.width-Ce.width:ie.height-Ce.height,ke=f.value;let Ue=ke;k.value?(ge.left<oe&&(Ue=ke-(oe-ge.left)),ge.right>pe&&(Ue=ke+ge.right-pe)):(ge.top<Ce.top&&(Ue=ke-(Ce.top-ge.top)),ge.bottom>Ce.bottom&&(Ue=ke+(ge.bottom-Ce.bottom))),Ue=Math.max(Ue,0),f.value=Math.min(Ue,re)},z=()=>{var ge;if(!l.value||!a.value)return;t.stretch&&((ge=d.value)==null||ge.update());const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;Z<ne?(h.value=h.value||{},h.value.prev=ae,h.value.next=lf(ne,ae+Z),lf(Z,ne-ae)&&(f.value=ne-Z)):(h.value=!1,ae>0&&(f.value=0))},G=ne=>{const Z=ls(ne);let ae=0;switch(Z){case He.left:case He.up:ae=-1;break;case He.right:case He.down:ae=1;break;default:return}const ge=Array.from(ne.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let Ce=ge.indexOf(ne.target)+ae;Ce<0?Ce=ge.length-1:Ce>=ge.length&&(Ce=0),ge[Ce].focus({preventScroll:!0}),ge[Ce].click(),K()},K=()=>{m.value&&(p.value=!0)},X=()=>p.value=!1,H=(ne,Z)=>{u.value[Z]=ne},Q=async()=>{var ne;await ot(),(ne=u.value[t.currentName])==null||ne.focus({preventScroll:!0})};return Me(o,ne=>{ne==="hidden"?m.value=!1:ne==="visible"&&setTimeout(()=>m.value=!0,50)}),Me(r,ne=>{ne?setTimeout(()=>m.value=!0,50):m.value=!1}),Es(c,()=>{qg(z)}),Ft(()=>setTimeout(()=>B(),0)),kl(()=>z()),e({scrollToActiveTab:B,removeFocus:X,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Um(_)}),()=>{const ne=h.value?[y("span",{class:[i.e("nav-prev"),i.is("disabled",!h.value.prev)],onClick:N},[y(_e,null,{default:()=>[y(yd,null,null)]})]),y("span",{class:[i.e("nav-next"),i.is("disabled",!h.value.next)],onClick:F},[y(_e,null,{default:()=>[y(Fr,null,null)]})])]:null,Z=t.panes.map((ae,ge)=>{var ee,se;const Ce=ae.uid,oe=ae.props.disabled,pe=ae.props.name??ae.index??`${ge}`,ie=!oe&&(ae.isClosable||ae.props.closable!==!1&&t.editable);ae.index=`${ge}`;const re=ie?y(_e,{class:"is-icon-close",onClick:me=>n("tabRemove",ae,me)},{default:()=>[y(Bo,null,null)]}):null,ke=((se=(ee=ae.slots).label)==null?void 0:se.call(ee))||ae.props.label,Ue=!oe&&ae.active?t.tabindex??s.props.tabindex:-1;return y("div",{ref:me=>H(me,pe),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-${pe}`,key:`tab-${Ce}`,"aria-controls":`pane-${pe}`,role:"tab","aria-selected":ae.active,tabindex:Ue,onFocus:()=>K(),onBlur:()=>X(),onClick:me=>{X(),n("tabClick",ae,pe,me)},onKeydown:me=>{const $e=ls(me);ie&&($e===He.delete||$e===He.backspace)&&n("tabRemove",ae,me)}},[ke,re])});return _.value,y("div",{ref:c,class:[i.e("nav-wrap"),i.is("scrollable",!!h.value),i.is(s.props.tabPosition)]},[ne,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:x.value,role:"tablist",onKeydown:G,onWheel:R},[t.type?null:y(oye,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Z]):null])])}}}),cye=Ge({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:ue(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Uw=t=>Ke(t)||_t(t),uye={[Mt]:t=>Uw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Uw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Uw(t),tabAdd:()=>!0},dye=fe({name:"ElTabs",props:cye,emits:uye,setup(t,{emit:e,slots:n,expose:s}){const i=Be("tabs"),o=U(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Nre(ht(),"ElTabPane"),u=J(),d=J((en(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(k,C=!1)=>{var x,S,M,P;if(!(d.value===k||en(k)))try{let T;if(t.beforeLeave){const I=t.beforeLeave(k,d.value);T=I instanceof Promise?await I:I}else T=!0;if(T!==!1){const I=(x=r.value.find(L=>L.paneName===d.value))==null?void 0:x.isFocusInsidePane();d.value=k,C&&(e(Mt,k),e("tabChange",k)),(M=(S=u.value)==null?void 0:S.removeFocus)==null||M.call(S),I&&((P=u.value)==null||P.focusActiveTab())}}catch{}},f=(k,C,x)=>{k.props.disabled||(e("tabClick",k,x),h(C,!0))},p=(k,C)=>{k.props.disabled||en(k.props.name)||(C.stopPropagation(),e("edit",k.props.name,"remove"),e("tabRemove",k.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},b=k=>{const C=ls(k);[He.enter,He.numpadEnter].includes(C)&&m()},_=k=>{const C=k.el.firstChild,x=["bottom","right"].includes(t.tabPosition)?k.children[0].el:k.children[1].el;C!==x&&C.before(x)};return Me(()=>t.modelValue,k=>h(k)),Me(d,async()=>{var k;await ot(),(k=u.value)==null||k.scrollToActiveTab()}),Pt(a2,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),s({currentName:d,get tabNavRef(){return z_(u.value,["scheduleRender"])}}),()=>{const k=n["add-icon"],C=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},[k?le(n,"add-icon"):y(_e,{class:i.is("icon-plus")},{default:()=>[y(X4,null,null)]})]):null,x=()=>y(lye,{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:x,$stable:!0}),C]),M=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:_},[M,S])}}}),hye=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),fye=["id","aria-hidden","aria-labelledby"],MA="ElTabPane";var pye=fe({name:MA,__name:"tab-pane",props:hye,setup(t){const e=t,n=ht(),s=hi(),i=Ye(a2);i||vo(MA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Be("tab-pane"),r=J(),a=J(),l=U(()=>e.closable??i.props.closable),c=U(()=>i.currentName.value===(e.name??a.value)),u=J(c.value),d=U(()=>e.name??a.value),h=U(()=>!e.lazy||u.value||c.value),f=()=>{var m;return(m=r.value)==null?void 0:m.contains(document.activeElement)};Me(c,m=>{m&&(u.value=!0)});const p=In({uid:n.uid,getVnode:()=>n.vnode,slots:s,props:e,paneName:d,active:c,index:a,isClosable:l,isFocusInsidePane:f});return i.registerPane(p),wn(()=>{i.unregisterPane(p)}),x_(()=>{var m;s.label&&((m=i.nav$.value)==null||m.scheduleRender())}),(m,b)=>h.value?Re((v(),E("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:r,class:q(A(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[le(m.$slots,"default")],10,fye)),[[Ht,c.value]]):O("v-if",!0)}}),gF=pye;const l2=Ut(dye,{TabPane:gF}),c2=Is(gF),EC="00:30",mye=Ge({format:{type:String,default:"HH:mm"},modelValue:{type:ue(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:ue(String),default:"light"},clearable:{type:Boolean,default:!0},size:Ki,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:EC},minTime:{type:ue(String)},maxTime:{type:ue(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:ue([String,Object]),default:()=>oR},clearIcon:{type:ue([String,Object]),default:()=>Xc},popperClass:{type:String,default:""},popperStyle:{type:ue([String,Object])},...N1}),sl=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},jw=(t,e)=>{const n=sl(t);if(!n)return-1;const s=sl(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},TA=t=>`${t}`.padStart(2,"0"),Ah=t=>`${TA(t.hours)}:${TA(t.minutes)}`,gye=(t,e)=>{const n=sl(t);if(!n)return"";const s=sl(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,Ah(i)};var vye=fe({name:"ElTimeSelect",__name:"time-select",props:mye,emits:[dn,"blur","focus","clear",Mt],setup(t,{expose:e}){dt.extend(iV);const{Option:n}=Zt,s=t,i=Be("input"),o=J(),r=_s(),{lang:a}=Qt(),l=U(()=>s.modelValue),c=U(()=>{const _=sl(s.start);return _?Ah(_):null}),u=U(()=>{const _=sl(s.end);return _?Ah(_):null}),d=U(()=>{const _=sl(s.minTime||"");return _?Ah(_):null}),h=U(()=>{const _=sl(s.maxTime||"");return _?Ah(_):null}),f=U(()=>{const _=sl(s.step),k=!_||_.hours<0||_.minutes<0||Number.isNaN(_.hours)||Number.isNaN(_.minutes)||_.hours===0&&_.minutes===0;return k&&Tt("ElTimeSelect",`invalid step, fallback to default step (${EC}).`),k?EC:Ah(_)}),p=U(()=>{var C;const _=[],k=(x,S)=>{_.push({value:x,rawValue:S,disabled:jw(S,d.value||"-1:-1")<=0||jw(S,h.value||"100:100")>=0})};if(s.start&&s.end&&s.step){let x=c.value,S;for(;x&&u.value&&jw(x,u.value)<=0;)S=dt(x,"HH:mm").locale(a.value).format(s.format),k(S,x),x=gye(x,f.value);s.includeEndTime&&u.value&&((C=_[_.length-1])==null?void 0:C.rawValue)!==u.value&&k(dt(u.value,"HH:mm").locale(a.value).format(s.format),u.value)}return _});return e({blur:()=>{var _,k;(k=(_=o.value)==null?void 0:_.blur)==null||k.call(_)},focus:()=>{var _,k;(k=(_=o.value)==null?void 0:_.focus)==null||k.call(_)}}),(_,k)=>(v(),D(A(Zt),{ref_key:"select",ref:o,name:t.name,"model-value":l.value,disabled:A(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":k[0]||(k[0]=C=>_.$emit(A(Mt),C)),onChange:k[1]||(k[1]=C=>_.$emit(A(dn),C)),onBlur:k[2]||(k[2]=C=>_.$emit("blur",C)),onFocus:k[3]||(k[3]=C=>_.$emit("focus",C)),onClear:k[4]||(k[4]=()=>_.$emit("clear"))},{prefix:w(()=>[t.prefixIcon?(v(),D(A(_e),{key:0,class:q(A(i).e("prefix-icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:w(()=>[(v(!0),E(te,null,we(p.value,C=>(v(),D(A(n),{key:C.value,label:C.value,value:C.value,disabled:C.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"]))}}),yye=vye;const M8=Ut(yye),bye="ElUpload";var _ye=class extends Error{constructor(t,e,n,s){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=s}};function PA(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 _ye(s,n.status,e.method,t)}function wye(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const kye=t=>{typeof XMLHttpRequest>"u"&&vo(bye,"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))Ee(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(PA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(PA(n,t,e));t.onSuccess(wye(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},vF=["text","picture","picture-card"];let Cye=1;const MC=()=>Date.now()+Cye++,yF=Ge({action:{type:String,default:"#"},headers:{type:ue(Object)},method:{type:String,default:"post"},data:{type:ue([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:ue(Array),default:()=>ii([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:vF,default:"text"},httpRequest:{type:ue(Function),default:kye},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),xye=Ge({...yF,beforeUpload:{type:ue(Function),default:Dt},beforeRemove:{type:ue(Function)},onRemove:{type:ue(Function),default:Dt},onChange:{type:ue(Function),default:Dt},onPreview:{type:ue(Function),default:Dt},onSuccess:{type:ue(Function),default:Dt},onProgress:{type:ue(Function),default:Dt},onError:{type:ue(Function),default:Dt},onExceed:{type:ue(Function),default:Dt},crossorigin:{type:ue(String)}}),bF=Symbol("uploadContextKey"),Sye=Ge({files:{type:ue(Array),default:()=>ii([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:ue(Function),default:Dt},listType:{type:String,values:vF,default:"text"},crossorigin:{type:ue(String)}}),$ye={remove:t=>!!t},Aye=Ge({...yF,beforeUpload:{type:ue(Function),default:Dt},onRemove:{type:ue(Function),default:Dt},onStart:{type:ue(Function),default:Dt},onSuccess:{type:ue(Function),default:Dt},onProgress:{type:ue(Function),default:Dt},onError:{type:ue(Function),default:Dt},onExceed:{type:ue(Function),default:Dt}}),Eye=Ge({disabled:{type:Boolean,default:void 0},directory:Boolean}),Mye={file:t=>Ee(t)},Tye=["tabindex","aria-disabled","onKeydown"],Pye=["src","crossorigin"],Iye=["onClick"],Lye=["title"],Oye=["onClick"],Dye=["onClick"];var Rye=fe({name:"ElUploadList",__name:"upload-list",props:Sye,emits:$ye,setup(t,{emit:e}){const n=t,s=e,{t:i}=Qt(),o=Be("upload"),r=Be("icon"),a=Be("list"),l=_s(),c=J(!1),u=U(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=h=>{s("remove",h)};return(h,f)=>(v(),D(E_,{tag:"ul",class:q(u.value),name:A(a).b()},{default:w(()=>[(v(!0),E(te,null,we(t.files,(p,m)=>(v(),E("li",{key:p.uid||p.name,class:q([A(o).be("list","item"),A(o).is(p.status),{focusing:c.value}]),tabindex:A(l)?void 0:0,"aria-disabled":A(l),role:"button",onKeydown:kt(b=>!A(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(),E("img",{key:0,class:q(A(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(),E("div",{key:1,class:q(A(o).be("list","item-info"))},[g("a",{class:q(A(o).be("list","item-name")),onClick:Oe(b=>t.handlePreview(p),["prevent"])},[y(A(_e),{class:q(A(r).m("document"))},{default:w(()=>[y(A(B1))]),_:1},8,["class"]),g("span",{class:q(A(o).be("list","item-file-name")),title:p.name},$(p.name),11,Lye)],10,Iye),p.status==="uploading"?(v(),D(A(r2),{key:0,type:t.listType==="picture-card"?"circle":"line","stroke-width":t.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Xe(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:q(A(o).be("list","item-status-label"))},[t.listType==="text"?(v(),D(A(_e),{key:0,class:q([A(r).m("upload-success"),A(r).m("circle-check")])},{default:w(()=>[y(A(G4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(A(_e),{key:1,class:q([A(r).m("upload-success"),A(r).m("check")])},{default:w(()=>[y(A(q4))]),_:1},8,["class"])):O("v-if",!0)],2),A(l)?O("v-if",!0):(v(),D(A(_e),{key:2,class:q(A(r).m("close")),"aria-label":A(i)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>d(p),onKeydown:kt(Oe(b=>d(p),["prevent"]),["enter","space"])},{default:w(()=>[y(A(Bo))]),_:1},8,["class","aria-label","onClick","onKeydown"])),A(l)?O("v-if",!0):(v(),E("i",{key:3,class:q(A(r).m("close-tip"))},$(A(i)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),E("span",{key:4,class:q(A(o).be("list","item-actions"))},[g("span",{class:q(A(o).be("list","item-preview")),onClick:b=>t.handlePreview(p)},[y(A(_e),{class:q(A(r).m("zoom-in"))},{default:w(()=>[y(A(pR))]),_:1},8,["class"])],10,Oye),A(l)?O("v-if",!0):(v(),E("span",{key:0,class:q(A(o).be("list","item-delete")),onClick:b=>d(p)},[y(A(_e),{class:q(A(r).m("delete"))},{default:w(()=>[y(A(J_))]),_:1},8,["class"])],10,Dye))],2)):O("v-if",!0)])],42,Tye))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),IA=Rye;const LA="ElUploadDrag";var Vye=fe({name:LA,__name:"upload-dragger",props:Eye,emits:Mye,setup(t,{emit:e}){const n=t,s=e;Ye(bF)||vo(LA,"usage: <el-upload><el-upload-dragger /></el-upload>");const i=Be("upload"),o=J(!1),r=_s(),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((k,C)=>f.readEntries(k,C)),m=[];let b=await p();for(;b.length>0;)m.push(...b),b=await p();const _=m.map(k=>l(k).catch(()=>[]));return fb(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",fb(await Promise.all(m.map(l))));return}f.forEach((m,b)=>{var k,C;const _=(C=(k=p[b])==null?void 0:k.webkitGetAsEntry)==null?void 0:C.call(k);_&&(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(),E("div",{class:q([A(i).b("dragger"),A(i).is("dragover",o.value)]),onDrop:Oe(c,["prevent"]),onDragover:Oe(u,["prevent"]),onDragleave:Oe(d,["prevent"])},[le(h.$slots,"default")],34))}}),Fye=Vye;const Nye=["tabindex","aria-disabled","onKeydown"],Bye=["name","disabled","multiple","accept","webkitdirectory"];var zye=fe({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:Aye,setup(t,{expose:e}){const n=t,s=Be("upload"),i=_s(),o=Fn({}),r=Fn(),a=m=>{if(m.length===0)return;const{autoUpload:b,limit:_,fileList:k,multiple:C,onStart:x,onExceed:S}=n;if(_&&k.length+m.length>_){S(m,k);return}C||(m=m.slice(0,1));for(const M of m){const P=M;P.uid=MC(),x(P),b&&l(P)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let b,_={};try{const C=n.data,x=n.beforeUpload(m);_=ud(n.data)?Zu(n.data):n.data,b=await x,ud(n.data)&&ji(C,_)&&(_=Zu(n.data))}catch{b=!1}if(b===!1){n.onRemove(m);return}let k=m;b instanceof Blob&&(b instanceof File?k=b:k=new File([b],m.name,{type:m.type})),u(Object.assign(k,{uid:m.uid}),_)},c=async(m,b)=>et(m)?m(b):m,u=async(m,b)=>{const{headers:_,data:k,method:C,withCredentials:x,name:S,action:M,onProgress:P,onSuccess:T,onError:I,httpRequest:L}=n;try{b=await c(b??k,m)}catch{n.onRemove(m);return}const{uid:V}=m,R={headers:_||{},withCredentials:x,file:m,data:b,method:C,filename:S,action:M,onProgress:F=>{P(F,m)},onSuccess:F=>{T(F,m),delete o.value[V]},onError:F=>{I(F,m),delete o.value[V]}},N=L(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=>{aD(o.value).filter(m?([b])=>String(m.uid)===b:()=>!0).forEach(([b,_])=>{_ instanceof XMLHttpRequest&&_.abort(),delete o.value[b]})},upload:l}),(m,b)=>(v(),E("div",{class:q([A(s).b(),A(s).m(t.listType),A(s).is("drag",t.drag),A(s).is("disabled",A(i))]),tabindex:A(i)?void 0:0,"aria-disabled":A(i),role:"button",onClick:h,onKeydown:kt(Oe(f,["self"]),["enter","space"])},[t.drag?(v(),D(Fye,{key:0,disabled:A(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:q(A(s).e("input")),name:t.name,disabled:A(i),multiple:t.multiple,accept:t.accept,webkitdirectory:t.directory||void 0,type:"file",onChange:d,onClick:b[0]||(b[0]=Oe(()=>{},["stop"]))},null,42,Bye)],42,Nye))}}),OA=zye;const DA="ElUpload",RA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},Hye=(t,e)=>{const n=Eie(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=>{ot(()=>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=MC());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){Tt(DA,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||vo(DA,"file to be removed not found");const b=_=>{i(_),r(_),t.onRemove(_,n.value),RA(_)};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 Me(()=>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(k){t.onError(k,m,n.value)}return m}))}),Me(n,p=>{for(const m of p)m.uid||(m.uid=MC()),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:RA}};var Uye=fe({name:"ElUpload",__name:"upload",props:xye,setup(t,{expose:e}){const n=t,s=_s(),i=Fn(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=Hye(n,i),m=U(()=>n.listType==="picture-card"),b=U(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return wn(()=>{l.value.forEach(p)}),Pt(bF,{accept:Sn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(_,k)=>(v(),E("div",null,[m.value&&t.showFileList?(v(),D(IA,{key:0,disabled:A(s),"list-type":t.listType,files:A(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:A(d)},fs({append:w(()=>[y(OA,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:C,index:x})=>[le(_.$slots,"file",{file:C,index:x})]),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(OA,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(IA,{key:3,disabled:A(s),"list-type":t.listType,files:A(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:A(d)},fs({_:2},[_.$slots.file?{name:"default",fn:w(({file:C,index:x})=>[le(_.$slots,"file",{file:C,index:x})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}}),jye=Uye;const q1=Ut(jye);function Wye(t,e){let n;const s=J(!1),i=In({...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()):(xa(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),xa(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=Ig(fe({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=r8("loading");return f({ns:p,zIndex:m}),()=>{const b=i.spinner||i.svg,_=bt("svg",{class:"circular",viewBox:i.svgViewBox?i.svgViewBox:"0 0 50 50",...b?{innerHTML:b}:{}},[bt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=i.text?bt("p",{class:p.b("text")},[i.text]):void 0;return bt(Ho,{name:p.b("fade"),onAfterLeave:c},{default:w(()=>[Re(y("div",{style:{backgroundColor:i.background||""},class:[p.b("mask"),i.customClass,p.is("fullscreen",i.fullscreen)]},[bt("div",{class:p.b("spinner")},[_,k])]),[[Ht,i.visible]])])})}}}));Object.assign(u._context,e??{});const d=u.mount(document.createElement("div"));return{...go(i),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:d,get $el(){return d.$el}}}let r0;const cf=function(t={},e){if(!Gt)return;const n=Yye(t);if(n.fullscreen&&r0)return r0;const s=Wye({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(r0=void 0)}},e??cf._context);qye(n,n.parent,s),VA(n,n.parent,s),n.parent.vLoadingAddClassList=()=>VA(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),ot(()=>s.visible.value=n.visible),n.fullscreen&&(r0=s),s},Yye=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}},qye=async(t,e,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=nl(document.body,"position"),n.originalOverflow.value=nl(document.body,"overflow"),i.zIndex=s();else if(t.parent===document.body){n.originalPosition.value=nl(document.body,"position"),await ot();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(nl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=nl(e,"position");for(const[o,r]of Object.entries(i))n.$el.style[o]=r},VA=(t,e,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?xa(e,s.bm("parent","relative")):vd(e,s.bm("parent","relative")),t.fullscreen&&t.lock?vd(e,s.bm("parent","hidden")):xa(e,s.bm("parent","hidden"))};cf._context=null;const im=Symbol("ElLoading"),bu=t=>`element-loading-${Bi(t)}`,FA=(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(bu(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=cf(a);l._context=ig._context,t[im]={options:a,instance:l}},Gye=(t,e)=>{for(const n of Object.keys(t))hn(t[n])&&(t[n].value=e[n])},ig={mounted(t,e){e.value&&FA(t,e)},updated(t,e){const n=t[im];if(!e.value){n==null||n.instance.close(),t[im]=null;return}n?Gye(n.options,yt(e.value)?e.value:{text:t.getAttribute(bu("text")),svg:t.getAttribute(bu("svg")),svgViewBox:t.getAttribute(bu("svgViewBox")),spinner:t.getAttribute(bu("spinner")),background:t.getAttribute(bu("background")),customClass:t.getAttribute(bu("customClass"))}):FA(t,e)},unmounted(t){var e;(e=t[im])==null||e.instance.close(),t[im]=null}};ig._context=null;const Xye={install(t){cf._context=t._context,ig._context=t._context,t.directive("loading",ig),t.config.globalProperties.$loading=cf},directive:ig,service:cf};var Kye=fe({name:"ElMessageBox",directives:{TrapFocus:she},components:{ElButton:qe,ElFocusTrap:H1,ElInput:vt,ElOverlay:b8,ElIcon:_e,...mR},inheritAttrs:!1,props:{buttonSize:{type:String,validator:iF},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}=r8("message-box",U(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=s,l=J(!1),c=In({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:Mi(Hf),cancelButtonLoadingIcon:Mi(Hf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=U(()=>{const B=c.type;return{[i.bm("icon",B)]:B&&Uf[B]}}),d=_r(),h=_r(),f=U(()=>{const B=c.type;return c.icon||B&&Uf[B]||""}),p=U(()=>!!c.message),m=J(),b=J(),_=J(),k=J(),C=J(),x=U(()=>c.confirmButtonClass);Me(()=>c.inputValue,async B=>{await ot(),t.boxType==="prompt"&&B&&V()},{immediate:!0}),Me(()=>l.value,B=>{var z;B&&(t.boxType!=="prompt"&&(c.autofocus?_.value=((z=C.value)==null?void 0:z.$el)??m.value:_.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(B?ot().then(()=>{k.value&&k.value.$el&&(c.autofocus?_.value=R()??m.value:_.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:S}=kD(m,b,U(()=>t.draggable),U(()=>t.overflow));Ft(async()=>{await ot(),t.closeOnHashChange&&window.addEventListener("hashchange",M)}),wn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",M)});function M(){l.value&&(l.value=!1,ot(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&L(c.distinguishCancelAndClose?"close":"cancel")},T=B4(P),I=B=>{var z;if(c.inputType!=="textarea"&&!((z=k.value)!=null&&z.isComposing))return B.preventDefault(),L("confirm")},L=B=>{var z;t.boxType==="prompt"&&B==="confirm"&&!V()||(c.action=B,c.beforeClose?(z=c.beforeClose)==null||z.call(c,B,c,M):M())},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 z=c.inputValidator;if(et(z)){const G=z(c.inputValue);if(G===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(G))return c.editorErrorMessage=G,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},R=()=>{var z;const B=(z=k.value)==null?void 0:z.$refs;return(B==null?void 0:B.input)??(B==null?void 0:B.textarea)},N=()=>{L("close")},F=()=>{t.closeOnPressEscape&&N()};return t.lockScroll&&P4(l,{ns:i}),{...go(c),ns:i,overlayEvent:T,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:x,rootRef:m,focusStartRef:_,headerRef:b,inputRef:k,isDragging:S,confirmRef:C,doClose:M,handleClose:N,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:I,handleAction:L,t:r}}});const Zye=["aria-label","aria-describedby"],Jye=["aria-label"],Qye=["id"];function ebe(t,e,n,s,i,o){const r=Y("el-icon"),a=Y("el-input"),l=Y("el-button"),c=Y("el-focus-trap"),u=Y("el-overlay");return v(),D(Ho,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:w(()=>[Re(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:q(`${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:q([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:Xe(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=Oe(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),E("div",{key:0,ref:"headerRef",class:q([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:q(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),D(r,{key:0,class:q([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,$(t.title),1)],2),t.showClose?(v(),E("button",{key:0,type:"button",class:q(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]=kt(Oe(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[y(r,{class:q(t.ns.e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||"close")))]),_:1},8,["class"])],42,Jye)):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:q(t.ns.e("content"))},[g("div",{class:q(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),D(r,{key:0,class:q([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),E("div",{key:1,class:q(t.ns.e("message"))},[le(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),D(Ct(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(v(),D(Ct(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),Re(g("div",{class:q(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:q({invalid:t.validateError}),onKeydown:kt(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:q(t.ns.e("errormsg")),style:Xe({visibility:t.editorErrorMessage?"visible":"hidden"})},$(t.editorErrorMessage),7)],2),[[Ht,t.showInput]])],10,Qye),g("div",{class:q(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:q([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=kt(Oe(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:w(()=>[W($(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):O("v-if",!0),Re(y(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:q([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]=kt(Oe(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:w(()=>[W($(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[Ht,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Zye)]),_:3},8,["z-index","overlay-class","mask"]),[[Ht,t.visible]])]),_:3})}var tbe=fi(Kye,[["render",ebe]]);const r1=new Map,nbe=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),Po(t.appendTo)&&(e=t.appendTo),Po(e)||(Tt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},sbe=(t,e,n=null)=>{const s=y(tbe,t,et(t.message)||is(t.message)?{default:et(t.message)?t.message:()=>t.message}:null);return s.appContext=n,Rc(s,e),nbe(t).appendChild(e.firstElementChild),s.component},ibe=()=>document.createElement("div"),obe=(t,e)=>{const n=ibe();t.onVanish=()=>{Rc(null,n),r1.delete(i)},t.onAction=o=>{const r=r1.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=sbe(t,n,e),i=s.proxy;for(const o in t)Nt(t,o)&&!Nt(i.$props,o)&&(o==="closeIcon"&&yt(t[o])?i[o]=Mi(t[o]):i[o]=t[o]);return i.visible=!0,i};function gp(t,e=null){if(!Gt)return Promise.reject();let n;return Ke(t)||is(t)?t={message:t}:n=t.callback,new Promise((s,i)=>{const o=obe(t,e??gp._context);r1.set(o,{options:t,callback:n,resolve:s,reject:i})})}const rbe=["alert","confirm","prompt"],abe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};rbe.forEach(t=>{gp[t]=lbe(t)});function lbe(t){return(e,n,s,i)=>{let o="";return yt(n)?(s=n,o=""):en(n)?o="":o=n,gp(Object.assign({title:o,message:e,type:"",...abe[t]},s,{boxType:t}),i)}}gp.close=()=>{r1.forEach((t,e)=>{e.doClose()}),r1.clear()};gp._context=null;const Yl=gp;Yl.install=t=>{Yl._context=t._context,t.config.globalProperties.$msgbox=Yl,t.config.globalProperties.$messageBox=Yl,t.config.globalProperties.$alert=Yl.alert,t.config.globalProperties.$confirm=Yl.confirm,t.config.globalProperties.$prompt=Yl.prompt};const Ww=Yl,_F=["primary","success","info","warning","error"],cbe=Ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ds},id:{type:String,default:""},message:{type:ue([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:ue(Function),default:()=>{}},onClose:{type:ue(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:[..._F,""],default:""},zIndex:Number,closeIcon:{type:ds,default:Bo}}),ube={destroy:()=>!0},dbe=["id"],hbe=["textContent"],fbe={key:0},pbe=["innerHTML"];var mbe=fe({name:"ElNotification",__name:"notification",props:cbe,emits:ube,setup(t,{expose:e}){const n=t,{ns:s,zIndex:i}=r8("notification"),{nextZIndex:o,currentZIndex:r}=i,a=J(!1);let l;const c=U(()=>{const k=n.type;return k&&Uf[n.type]?s.m(k):""}),u=U(()=>n.type&&Uf[n.type]||n.icon),d=U(()=>n.position.endsWith("right")?"right":"left"),h=U(()=>n.position.startsWith("top")?"top":"bottom"),f=U(()=>({[h.value]:`${n.offset}px`,zIndex:n.zIndex??r.value}));function p(){n.duration>0&&({stop:l}=Gk(()=>{a.value&&b()},n.duration))}function m(){l==null||l()}function b(){a.value=!1}function _(k){switch(ls(k)){case He.delete:case He.backspace:m();break;case He.esc:a.value&&b();break;default:p();break}}return Ft(()=>{p(),o(),a.value=!0}),Hn(document,"keydown",_),e({visible:a,close:b}),(k,C)=>(v(),D(Ho,{name:A(s).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:C[1]||(C[1]=x=>k.$emit("destroy")),persisted:""},{default:w(()=>[Re(g("div",{id:t.id,class:q([A(s).b(),t.customClass,d.value]),style:Xe(f.value),role:"alert",onMouseenter:m,onMouseleave:p,onClick:C[0]||(C[0]=(...x)=>t.onClick&&t.onClick(...x))},[u.value?(v(),D(A(_e),{key:0,class:q([A(s).e("icon"),c.value])},{default:w(()=>[(v(),D(Ct(u.value)))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:q(A(s).e("group"))},[g("h2",{class:q(A(s).e("title")),textContent:$(t.title)},null,10,hbe),Re(g("div",{class:q(A(s).e("content")),style:Xe(t.title?void 0:{margin:0})},[le(k.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),E(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,pbe)],2112)):(v(),E("p",fbe,$(t.message),1))])],6),[[Ht,t.message]]),t.showClose?(v(),D(A(_e),{key:0,class:q(A(s).e("closeBtn")),onClick:Oe(b,["stop"])},{default:w(()=>[(v(),D(Ct(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,dbe),[[Ht,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),gbe=mbe;const qf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Mb=16;let vbe=1;const _d=function(t={},e){if(!Gt)return{close:()=>{}};(Ke(t)||is(t))&&(t={message:t});const n=t.position||"top-right";let s=t.offset||0;qf[n].forEach(({vm:u})=>{var d;s+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+Mb}),s+=Mb;const i=`notification_${vbe++}`,o=t.onClose,r={...t,offset:s,id:i,onClose:()=>{ybe(i,n,o)}};let a=document.body;Po(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),Po(a)||(Tt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=y(gbe,r,et(r.message)?r.message:is(r.message)?()=>r.message:null);return c.appContext=en(e)?_d._context:e,c.props.onDestroy=()=>{Rc(null,l)},Rc(c,l),qf[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};_F.forEach(t=>{_d[t]=(e={},n)=>((Ke(e)||is(e))&&(e={message:e}),_d({...e,type:t},n))});function ybe(t,e,n){const s=qf[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-Mb;d.props.offset=h}}function bbe(){for(const t of Object.values(qf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function _be(t="top-right"){var n,s,i,o;let e=((i=(s=(n=qf[t][0])==null?void 0:n.vm.component)==null?void 0:s.props)==null?void 0:i.offset)||0;for(const{vm:r}of qf[t])r.component.props.offset=e,e+=(((o=r.el)==null?void 0:o.offsetHeight)||0)+Mb}_d.closeAll=bbe;_d.updateOffsets=_be;_d._context=null;const wbe=jre(_d,"$notify"),kbe=Ge({trigger:$c.trigger,triggerKeys:$c.triggerKeys,placement:B0.placement,disabled:$c.disabled,visible:zn.visible,transition:zn.transition,popperOptions:B0.popperOptions,tabindex:B0.tabindex,content:zn.content,popperStyle:zn.popperStyle,popperClass:zn.popperClass,enterable:{...zn.enterable,default:!0},effect:{...zn.effect,default:"light"},teleported:zn.teleported,appendTo:zn.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}}),Cbe={"update:visible":t=>Jn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},xbe="onUpdate:visible";var Sbe=fe({name:"ElPopover",__name:"popover",props:kbe,emits:Cbe,setup(t,{expose:e,emit:n}){const s=t,i=n,o=U(()=>s[xbe]),r=Be("popover"),a=J(),l=U(()=>{var _;return(_=A(a))==null?void 0:_.popperRef}),c=U(()=>[{width:ui(s.width)},s.popperStyle]),u=U(()=>[r.b(),s.popperClass,{[r.m("plain")]:!!s.content}]),d=U(()=>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}),(_,k)=>(v(),D(A(Ls),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(),E("div",{key:0,class:q(A(r).e("title")),role:"title"},$(t.title),3)):O("v-if",!0),le(_.$slots,"default",{hide:h},()=>[W($(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"]))}}),$be=Sbe;const NA=(t,e)=>{var s;const n=(s=e.arg||e.value)==null?void 0:s.popperRef;n&&(n.triggerRef=t)};var Abe={mounted(t,e){NA(t,e)},updated(t,e){NA(t,e)}};const Ebe="popover",Mbe=Wre(Abe,Ebe),jo=Ut($be,{directive:Mbe});var Tbe=!1;/*! |
| 78 |
* pinia v2.3.1 |
| 79 |
* (c) 2025 Eduardo San Martin Morote |
| 80 |
* @license MIT |
| 81 |
*/let wF;const u2=t=>wF=t,kF=Symbol();function TC(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var og;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(og||(og={}));function Pbe(){const t=p_(!0),e=t.run(()=>J({}));let n=[],s=[];const i=Mi({install(o){u2(i),i._a=o,o.provide(kF,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!Tbe?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const CF=()=>{};function BA(t,e,n,s=CF){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&m_()&&g_(i),i}function uh(t,...e){t.slice().forEach(n=>{n(...e)})}const Ibe=t=>t(),zA=Symbol(),Yw=Symbol();function PC(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];TC(i)&&TC(s)&&t.hasOwnProperty(n)&&!hn(s)&&!Or(s)?t[n]=PC(i,s):t[n]=s}return t}const Lbe=Symbol();function Obe(t){return!TC(t)||!t.hasOwnProperty(Lbe)}const{assign:ql}=Object;function Dbe(t){return!!(hn(t)&&t.effect)}function Rbe(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=go(n.state.value[t]);return ql(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Mi(U(()=>{u2(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=xF(t,c,e,n,s,!0),l}function xF(t,e,n={},s,i,o){let r;const a=ql({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 I;c=u=!1,typeof T=="function"?(T(s.state.value[t]),I={type:og.patchFunction,storeId:t,events:f}):(PC(s.state.value[t],T),I={type:og.patchObject,payload:T,storeId:t,events:f});const L=m=Symbol();ot().then(()=>{m===L&&(c=!0)}),u=!0,uh(d,I,s.state.value[t])}const _=o?function(){const{state:I}=n,L=I?I():{};this.$patch(V=>{ql(V,L)})}:CF;function k(){r.stop(),d=[],h=[],s._s.delete(t)}const C=(T,I="")=>{if(zA in T)return T[Yw]=I,T;const L=function(){u2(s);const V=Array.from(arguments),R=[],N=[];function F(G){R.push(G)}function B(G){N.push(G)}uh(h,{args:V,name:L[Yw],store:S,after:F,onError:B});let z;try{z=T.apply(this&&this.$id===t?this:S,V)}catch(G){throw uh(N,G),G}return z instanceof Promise?z.then(G=>(uh(R,G),G)).catch(G=>(uh(N,G),Promise.reject(G))):(uh(R,z),z)};return L[zA]=!0,L[Yw]=I,L},x={_p:s,$id:t,$onAction:BA.bind(null,h),$patch:b,$reset:_,$subscribe(T,I={}){const L=BA(d,T,I.detached,()=>V()),V=r.run(()=>Me(()=>s.state.value[t],R=>{(I.flush==="sync"?u:c)&&T({storeId:t,type:og.direct,events:f},R)},ql({},l,I)));return L},$dispose:k},S=In(x);s._s.set(t,S);const P=(s._a&&s._a.runWithContext||Ibe)(()=>s._e.run(()=>(r=p_()).run(()=>e({action:C}))));for(const T in P){const I=P[T];if(hn(I)&&!Dbe(I)||Or(I))o||(p&&Obe(I)&&(hn(I)?I.value=p[T]:PC(I,p[T])),s.state.value[t][T]=I);else if(typeof I=="function"){const L=C(I,T);P[T]=L,a.actions[T]=I}}return ql(S,P),ql(rn(S),P),Object.defineProperty(S,"$state",{get:()=>s.state.value[t],set:T=>{b(I=>{ql(I,T)})}}),s._p.forEach(T=>{ql(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 d2(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=nI();return a=a||(c?Ye(kF,null):null),a&&u2(a),a=wF,a._s.has(s)||(o?xF(s,e,i,a):Rbe(s,i,a)),a._s.get(s)}return r.$id=s,r}function Vbe(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 Fbe(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 Nbe(t){return typeof t=="object"&&t!==null}function HA(t,e){return t=Nbe(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 Bbe(t,e){return e.reduce((n,s)=>n==null?void 0:n[s],t)}function zbe(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 Hbe(t,e){return e.reduce((n,s)=>{const i=s.split(".");return zbe(n,i,Bbe(t,i))},{})}function Ube(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 UA(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 jA(t,{storage:e,serializer:n,key:s,paths:i,debug:o}){try{const r=Array.isArray(i)?Hbe(t,i):t;e.setItem(s,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function jbe(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=>HA(a,t)):[HA(s,t)]).map(Ube(t,i)).filter(Boolean);i.$persist=()=>{r.forEach(a=>{jA(i.$state,a)})},i.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),UA(i,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),UA(i,a),c==null||c(e),i.$subscribe((u,d)=>{jA(d,a)},{detached:!0})})}}var Wbe=jbe();const de=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},Ybe={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()}}},qbe=["id"];function Gbe(t,e,n,s,i,o){const r=Tl;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}),fs({default:w(()=>[g("div",{class:q(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(),E("h4",{key:0,id:l,class:q([c,n.headerClass]),style:{margin:"0"}},$(n.title),11,qbe)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[g("div",{class:q(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 jd=de(Ybe,[["render",Gbe]]);function Xbe(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}var Kbe=Xbe;function Zbe(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 Jbe=Zbe,Qbe=Jbe,e_e=Qbe(),t_e=e_e;function n_e(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var s_e=n_e,i_e=typeof Cs=="object"&&Cs&&Cs.Object===Object&&Cs,SF=i_e,o_e=SF,r_e=typeof self=="object"&&self&&self.Object===Object&&self,a_e=o_e||r_e||Function("return this")(),Va=a_e,l_e=Va,c_e=l_e.Symbol,h2=c_e,WA=h2,$F=Object.prototype,u_e=$F.hasOwnProperty,d_e=$F.toString,Zp=WA?WA.toStringTag:void 0;function h_e(t){var e=u_e.call(t,Zp),n=t[Zp];try{t[Zp]=void 0;var s=!0}catch{}var i=d_e.call(t);return s&&(e?t[Zp]=n:delete t[Zp]),i}var f_e=h_e,p_e=Object.prototype,m_e=p_e.toString;function g_e(t){return m_e.call(t)}var v_e=g_e,YA=h2,y_e=f_e,b_e=v_e,__e="[object Null]",w_e="[object Undefined]",qA=YA?YA.toStringTag:void 0;function k_e(t){return t==null?t===void 0?w_e:__e:qA&&qA in Object(t)?y_e(t):b_e(t)}var G1=k_e;function C_e(t){return t!=null&&typeof t=="object"}var X1=C_e,x_e=G1,S_e=X1,$_e="[object Arguments]";function A_e(t){return S_e(t)&&x_e(t)==$_e}var E_e=A_e,GA=E_e,M_e=X1,AF=Object.prototype,T_e=AF.hasOwnProperty,P_e=AF.propertyIsEnumerable,I_e=GA(function(){return arguments}())?GA:function(t){return M_e(t)&&T_e.call(t,"callee")&&!P_e.call(t,"callee")},T8=I_e,L_e=Array.isArray,Fa=L_e,Tb={exports:{}};function O_e(){return!1}var D_e=O_e;Tb.exports;(function(t,e){var n=Va,s=D_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})(Tb,Tb.exports);var P8=Tb.exports,R_e=9007199254740991,V_e=/^(?:0|[1-9]\d*)$/;function F_e(t,e){var n=typeof t;return e=e??R_e,!!e&&(n=="number"||n!="symbol"&&V_e.test(t))&&t>-1&&t%1==0&&t<e}var EF=F_e,N_e=9007199254740991;function B_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=N_e}var I8=B_e,z_e=G1,H_e=I8,U_e=X1,j_e="[object Arguments]",W_e="[object Array]",Y_e="[object Boolean]",q_e="[object Date]",G_e="[object Error]",X_e="[object Function]",K_e="[object Map]",Z_e="[object Number]",J_e="[object Object]",Q_e="[object RegExp]",e2e="[object Set]",t2e="[object String]",n2e="[object WeakMap]",s2e="[object ArrayBuffer]",i2e="[object DataView]",o2e="[object Float32Array]",r2e="[object Float64Array]",a2e="[object Int8Array]",l2e="[object Int16Array]",c2e="[object Int32Array]",u2e="[object Uint8Array]",d2e="[object Uint8ClampedArray]",h2e="[object Uint16Array]",f2e="[object Uint32Array]",ts={};ts[o2e]=ts[r2e]=ts[a2e]=ts[l2e]=ts[c2e]=ts[u2e]=ts[d2e]=ts[h2e]=ts[f2e]=!0;ts[j_e]=ts[W_e]=ts[s2e]=ts[Y_e]=ts[i2e]=ts[q_e]=ts[G_e]=ts[X_e]=ts[K_e]=ts[Z_e]=ts[J_e]=ts[Q_e]=ts[e2e]=ts[t2e]=ts[n2e]=!1;function p2e(t){return U_e(t)&&H_e(t.length)&&!!ts[z_e(t)]}var m2e=p2e;function g2e(t){return function(e){return t(e)}}var v2e=g2e,Pb={exports:{}};Pb.exports;(function(t,e){var n=SF,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})(Pb,Pb.exports);var y2e=Pb.exports,b2e=m2e,_2e=v2e,XA=y2e,KA=XA&&XA.isTypedArray,w2e=KA?_2e(KA):b2e,L8=w2e,k2e=s_e,C2e=T8,x2e=Fa,S2e=P8,$2e=EF,A2e=L8,E2e=Object.prototype,M2e=E2e.hasOwnProperty;function T2e(t,e){var n=x2e(t),s=!n&&C2e(t),i=!n&&!s&&S2e(t),o=!n&&!s&&!i&&A2e(t),r=n||s||i||o,a=r?k2e(t.length,String):[],l=a.length;for(var c in t)(e||M2e.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||$2e(c,l)))&&a.push(c);return a}var P2e=T2e,I2e=Object.prototype;function L2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||I2e;return t===n}var MF=L2e;function O2e(t,e){return function(n){return t(e(n))}}var D2e=O2e,R2e=D2e,V2e=R2e(Object.keys,Object),F2e=V2e,N2e=MF,B2e=F2e,z2e=Object.prototype,H2e=z2e.hasOwnProperty;function U2e(t){if(!N2e(t))return B2e(t);var e=[];for(var n in Object(t))H2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var TF=U2e;function j2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var K1=j2e,W2e=G1,Y2e=K1,q2e="[object AsyncFunction]",G2e="[object Function]",X2e="[object GeneratorFunction]",K2e="[object Proxy]";function Z2e(t){if(!Y2e(t))return!1;var e=W2e(t);return e==G2e||e==X2e||e==q2e||e==K2e}var PF=Z2e,J2e=PF,Q2e=I8;function ewe(t){return t!=null&&Q2e(t.length)&&!J2e(t)}var O8=ewe,twe=P2e,nwe=TF,swe=O8;function iwe(t){return swe(t)?twe(t):nwe(t)}var D8=iwe,owe=t_e,rwe=D8;function awe(t,e){return t&&owe(t,e,rwe)}var lwe=awe,cwe=O8;function uwe(t,e){return function(n,s){if(n==null)return n;if(!cwe(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 dwe=uwe,hwe=lwe,fwe=dwe,pwe=fwe(hwe),mwe=pwe;function gwe(t){return t}var IF=gwe,vwe=IF;function ywe(t){return typeof t=="function"?t:vwe}var bwe=ywe,_we=Kbe,wwe=mwe,kwe=bwe,Cwe=Fa;function xwe(t,e){var n=Cwe(t)?_we:wwe;return n(t,kwe(e))}var Swe=xwe,$we=Swe;const Ac=pi($we);function qt(t){return window.fluentComAdmin.i18n[t]||t}const Awe={public:{label:qt("Public"),description:qt("__PUBLIC_SPACE_DESC"),space_description:qt("__PIBLIC_SPACE_DESC_2")},private:{label:qt("Private"),description:qt("__PRIVATE_SPACE_DESC"),space_description:qt("__PRIVATE_SPACE_DESC_2")},secret:{label:qt("Secret"),description:qt("Only invited members can view and post."),space_description:qt("__SECRET_SPACE_DESC_2")}},Ewe={public:{label:qt("Public"),description:qt("Anyone can view and enroll the course for free")},private:{label:qt("Private"),description:qt("__PRIVATE_COURSE_DESC")},secret:{label:qt("Secret"),description:qt("Only invited students can view and enroll the course content.")}},Mwe={self_paced:{label:qt("Self Paced"),description:qt("__SELF_PAED_COURSE_DESC")},structured:{label:qt("Structured"),description:qt("__STRUCTURED_COURSE_DESC")},scheduled:{label:qt("Scheduled"),description:qt("Course starts on a specific date. Sections are dripped relative to that date.")}},Twe={leader_board_module:{headerTitle:qt("Leaderboard Settings"),headerDescription:qt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:qt("Get Leaderboard & Gamification Module"),bodyDescription:qt("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:qt("Emoji Module"),headerDescription:qt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:qt("Get Emoji & Reaction Module"),bodyDescription:qt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:qt("Giphy Module"),headerDescription:qt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:qt("Get Giphy Module"),bodyDescription:qt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:qt("User Badge Module"),headerDescription:qt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:qt("Get User Badge Module"),bodyDescription:qt("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:qt("Media Module"),headerDescription:qt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:qt("Get Media Module"),bodyDescription:qt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")}},Eh=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 Iwe(t,e,n,s,i,o){const r=qe,a=q1,l=Y("CloseBold"),c=_e,u=xt("loading");return v(),E(te,null,[y(a,{class:q(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",{loading:i.loading},()=>[le(t.$slots,"default",{loading:i.loading},()=>[Re((v(),D(r,{disabled:i.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:w(()=>[W($(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 Jc=de(Pwe,[["render",Iwe]]),Lwe={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])}}},Owe={class:"fcom_svg_generator"},Dwe={class:"fcom_form_item"},Rwe={class:"fcom_form_item"},Vwe=["innerHTML"];function Fwe(t,e,n,s,i,o){const r=Hd,a=mp,l=Os;return v(),E("div",Owe,[g("div",Dwe,[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",Rwe,[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),E(te,null,we(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,Vwe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const Nwe=de(Lwe,[["render",Fwe]]);var R8="emoji-mart";const Bwe=JSON;var LF=typeof window<"u"&&"localStorage"in window;let IC,LC;function zwe(t){t||(t={}),IC=t.getter,LC=t.setter}function Hwe(t){R8=t}function Uwe(t){for(let e in t){let n=t[e];OF(e,n)}}function OF(t,e){if(LC)LC(t,e);else{if(!LF)return;try{window.localStorage[`${R8}.${t}`]=Bwe.stringify(e)}catch{}}}function jwe(t){if(IC)return IC(t);if(!LF)return;try{var e=window.localStorage[`${R8}.${t}`]}catch{return}if(e)return JSON.parse(e)}const Gf={update:Uwe,set:OF,get:jwe,setNamespace:Hwe,setHandlers:zwe},qw={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"},DF=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 RF(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let s=t[n];t[n]=s&&typeof s=="object"?RF(s):s}return Object.freeze(t)}const Wwe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let s in qw)n[s]=n[qw[s]],delete n[qw[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=DF(n)}return t=RF(t),t},Gw=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let sr,V8,OC={};function VF(){V8=!0,sr=Gf.get("frequently")}function Ywe(t){V8||VF();var{id:e}=t;sr||(sr=OC),sr[e]||(sr[e]=0),sr[e]+=1,Gf.set("last",e),Gf.set("frequently",sr)}function qwe(t){if(V8||VF(),!sr){OC={};const r=[];let a=Math.min(t,Gw.length);for(let l=0;l<a;l++)OC[Gw[l]]=parseInt((a-l)/4,10)+1,r.push(Gw[l]);return r}const e=t,n=[];for(let r in sr)sr.hasOwnProperty(r)&&n.push(r);const i=n.sort((r,a)=>sr[r]-sr[a]).reverse().slice(0,e),o=Gf.get("last");return o&&i.indexOf(o)==-1&&(i.pop(),i.push(o)),i}const DC={add:Ywe,get:qwe},Gwe={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>'},Xwe={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=Gwe}},Kwe={role:"tablist",class:"emoji-mart-anchors"},Zwe=["aria-label","aria-selected","data-title","onClick"],Jwe=["innerHTML"];function Qwe(t,e,n,s,i,o){return v(),E("div",Kwe,[(v(!0),E(te,null,we(n.categories,r=>(v(),E("button",{role:"tab",type:"button","aria-label":r.name,"aria-selected":r.id==n.activeCategory.id,key:r.id,class:q({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":r.id==n.activeCategory.id}),style:Xe({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,Jwe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Xe({backgroundColor:n.color})},null,4)],14,Zwe))),128))])}const e3e=de(Xwe,[["render",Qwe]]),t3e=String,n3e=t3e.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 s3e(t){var e=t.split("-"),n=e.map(s=>`0x${s}`);return n3e.apply(null,n)}function ZA(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function i3e(t,e){const n=ZA(t),s=ZA(e);return n.filter(i=>s.indexOf(i)>=0)}function FF(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=FF(i,o)),n[s]=o}return n}function o3e(){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 r3e=61,a3e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,JA=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class l3e{constructor(e,{emojisToShowFilter:n,include:s,exclude:i,custom:o,recent:r,recentLength:a=20}={}){this._data=Wwe(e),this._emojisFilter=n||null,this._include=s||null,this._exclude=i||null,this._custom=o||[],this._recent=r||DC.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(a3e);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 k=_+1;b==f&&(k=0),l.results.push(p),l.emojis[f]=p,h[f]=k}}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=i3e.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=DF(n));let s=new Ib(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 Ib(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 Ib{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in JA){let s=JA[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 Ib(o))}}this._sanitized=c3e(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=r3e-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 NF{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 c3e(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:s3e(r)})}const u3e={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"}},d3e={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{}}}},h3e={props:{...u3e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new NF(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 f3e(t,e,n,s,i,o){return o.view.canRender?(v(),D(Ct(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:q(o.view.cssClass),style:Xe(o.view.cssStyle)},$(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const BF=de(h3e,[["render",f3e]]),p3e={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 NF(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:BF}},m3e=["aria-label"],g3e={class:"emoji-mart-category-label"},v3e={class:"emoji-mart-category-label"},y3e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],b3e={key:0},_3e={class:"emoji-mart-no-results-label"};function w3e(t,e,n,s,i,o){const r=Y("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),E("section",{key:0,class:q({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",g3e,[g("h3",v3e,$(n.i18n.categories[n.id]),1)]),(v(!0),E(te,null,we(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),E(te,null,[l.canRender?(v(),E("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:q(["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:q(l.cssClass),style:Xe(l.cssStyle)},$(l.content),7)],42,y3e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),E("div",b3e,[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",_3e,$(n.i18n.notfound),1)]))],10,m3e)):O("",!0)}const k3e=de(p3e,[["render",w3e]]),C3e={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}}},x3e=["onClick"];function S3e(t,e,n,s,i,o){return v(),E("div",{class:q({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":i.opened})},[(v(),E(te,null,we(6,r=>g("span",{key:r,class:q({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:q("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,x3e)],2)),64))],2)}const $3e=de(C3e,[["render",S3e]]),A3e={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:BF,Skins:$3e}},E3e={class:"emoji-mart-preview"},M3e={class:"emoji-mart-preview-emoji"},T3e={class:"emoji-mart-preview-data"},P3e={class:"emoji-mart-preview-name"},I3e={class:"emoji-mart-preview-shortnames"},L3e={class:"emoji-mart-preview-emoticons"},O3e={class:"emoji-mart-preview-emoji"},D3e={class:"emoji-mart-preview-data"},R3e={class:"emoji-mart-title-label"},V3e={key:0,class:"emoji-mart-preview-skins"};function F3e(t,e,n,s,i,o){const r=Y("emoji"),a=Y("skins");return v(),E("div",E3e,[n.emoji?(v(),E(te,{key:0},[g("div",M3e,[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",T3e,[g("div",P3e,$(n.emoji.name),1),g("div",I3e,[(v(!0),E(te,null,we(o.emojiShortNames,l=>(v(),E("span",{key:l,class:"emoji-mart-preview-shortname"},":"+$(l)+":",1))),128))]),g("div",L3e,[(v(!0),E(te,null,we(o.emojiEmoticons,l=>(v(),E("span",{key:l,class:"emoji-mart-preview-emoticon"},$(l),1))),128))])])],64)):(v(),E(te,{key:1},[g("div",O3e,[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",D3e,[g("span",R3e,$(n.title),1)]),n.showSkinTones?(v(),E("div",V3e,[y(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const N3e=de(A3e,[["render",F3e]]),B3e={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()}},z3e={class:"emoji-mart-search"},H3e=["placeholder"];function U3e(t,e,n,s,i,o){return v(),E("div",z3e,[Re(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]=kt(r=>t.$emit("arrowLeft",r),["left"])),e[1]||(e[1]=kt(()=>t.$emit("arrowRight"),["right"])),e[2]||(e[2]=kt(()=>t.$emit("arrowDown"),["down"])),e[3]||(e[3]=kt(r=>t.$emit("arrowUp",r),["up"])),e[4]||(e[4]=kt(()=>t.$emit("enter"),["enter"]))],"onUpdate:modelValue":e[5]||(e[5]=r=>i.value=r)},null,40,H3e),[[fd,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 j3e=de(B3e,[["render",U3e]]);var W3e=typeof window<"u";W3e&&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 Y3e{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 q3e={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"}},G3e={props:{...d3e,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||Gf.get("skin")||this.defaultSkin,view:new Y3e(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+o3e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(FF(q3e,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),DC.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),DC.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,Gf.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:e3e,Category:k3e,Preview:N3e,Search:j3e}},X3e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},K3e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},Z3e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function J3e(t,e,n,s,i,o){const r=Y("anchors"),a=Y("search"),l=Y("category"),c=Y("preview");return v(),E("section",{class:"emoji-mart emoji-mart-static",style:Xe(o.customStyles)},[t.showCategories?(v(),E("div",X3e,[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",K3e,[le(t.$slots,"customCategory"),(v(!0),E(te,null,we(i.view.filteredCategories,(u,d)=>Re((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"])),[[Ht,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(),E("div",Z3e,[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 Q3e=de(G3e,[["render",J3e]]),eke={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()},focusFirstItem(){this.focusItem(0)},focusItem(t){var s;const e=this.$refs.menuItems;if(!Array.isArray(e)||!e.length)return;const n=e[(t+e.length)%e.length];(s=n==null?void 0:n.focus)==null||s.call(n)},hideAndFocusTrigger(){this.hide(),this.$nextTick(()=>{var n,s;const t=this.$refs.triggerRef,e=((n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,"button, a, [tabindex]"))||t;(s=e==null?void 0:e.focus)==null||s.call(e)})}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside,!0)}},tke=["onClick","onKeydown"];function nke(t,e,n,s,i,o){const r=Y("MoreFilled"),a=_e,l=qe,c=jo;return v(),D(c,{trigger:"manual",placement:n.placement,persistent:n.persistent,width:n.width,visible:i.visible,teleported:!1,"popper-class":"fcom_menu_below_nav",onAfterEnter:o.focusFirstItem,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"),"aria-haspopup":"menu","aria-expanded":i.visible,class:"fcom_action_popover_default_trigger_button",size:"small"},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1})]),_:1},8,["aria-label","aria-expanded"])])],512)]),default:w(()=>[le(t.$slots,"default",{hide:o.hide},()=>[g("ul",{class:"actions_items",role:"menu","aria-orientation":"vertical",onKeydown:e[1]||(e[1]=kt(Oe((...u)=>o.hideAndFocusTrigger&&o.hideAndFocusTrigger(...u),["prevent","stop"]),["esc"]))},[(v(!0),E(te,null,we(n.items,(u,d)=>(v(),E("li",{key:d,ref_for:!0,ref:"menuItems",class:q(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",tabindex:"0",onClick:h=>o.handleAction(u),onKeydown:[kt(Oe(h=>o.handleAction(u),["prevent"]),["enter"]),kt(Oe(h=>o.handleAction(u),["prevent"]),["space"]),kt(Oe(h=>o.focusItem(d+1),["prevent"]),["down"]),kt(Oe(h=>o.focusItem(d-1),["prevent"]),["up"])]},$(u.label),43,tke))),128))],32)])]),_:3},8,["placement","persistent","width","visible","onAfterEnter"])}const Pl=de(eke,[["render",nke]]),ske={name:"SmilyIcon"},ike={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oke(t,e,n,s,i,o){return v(),E("svg",ike,[...e[0]||(e[0]=[Ia('<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 rke=de(ske,[["render",oke]]),ake={name:"EmojiPicker",components:{Picker:Q3e,ActionPopover:Pl,SmilyIcon:rke},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 l3e(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})}}},lke={class:"ffcom_emoji"},cke={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},uke={key:0},dke={style:{"text-align":"center","margin-bottom":"20px"}},hke={key:1,class:"fcom_emoji_holder"};function fke(t,e,n,s,i,o){const r=Y("SmilyIcon"),a=_e,l=qe,c=Yt,u=Y("Picker"),d=Y("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",lke,[i.emojiLoading?(v(),E("div",cke,[i.errorMessage?(v(),E("div",uke,$(i.errorMessage),1)):(v(),E(te,{key:1},[g("div",dke,$(t.$t("Loading.....")),1),y(c,{animated:!0,rows:3})],64))])):i.emojiIndex?(v(),E("div",hke,[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 zF=de(ake,[["render",fke]]),pke={name:"LogoEmojiSelector",components:{EmojiPicker:zF,ImageUploader:Jc,SvgShapeGenerator:Nwe,ActionPopover:Pl},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"}}},mke=["innerHTML"];function gke(t,e,n,s,i,o){const r=qe,a=Y("EmojiPicker"),l=vt,c=c2,u=Y("SvgShapeGenerator"),d=Cr,h=Y("ImageUploader"),f=l2,p=Y("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,mke)]),_: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%"}},fs({_: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(()=>[W($(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const Z1=de(pke,[["render",gke]]),vke={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})}}},yke={key:0,class:"fcom_slug_input_info"},bke=["innerHTML"],_ke={key:1,class:"fcom_help_text"};function wke(t,e,n,s,i,o){const r=qe,a=vt;return v(),E(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},fs({_: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(()=>[W($(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!i.showEdit&&n.edit_notice?(v(),E("div",yke,[g("p",{innerHTML:n.edit_notice},null,8,bke)])):O("",!0),n.description?(v(),E("div",_ke,[g("p",null,$(n.description),1)])):O("",!0)],64)}const Wd=de(vke,[["render",wke]]),kke={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},Cke={class:"fcom_errors_alert_list"};function xke(t,e,n,s,i,o){const r=El;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",Cke,[(v(!0),E(te,null,we(n.errors,(a,l)=>(v(),E("li",{key:l},$(a),1))),128))])]),_:1},8,["closable"])):O("",!0)}const J1=de(kke,[["render",xke]]),Vi=t=>{var e,n;return((n=(e=window.fluentComAdmin)==null?void 0:e.i18n)==null?void 0:n[t])||t},Ske=t=>{const e=[];return!t||!t.trim()?(e.push(Vi("Path cannot be empty.")),{valid:!1,type:"path",errors:e}):(t=t.trim(),t.startsWith("/")||e.push(Vi("Path must start with /")),/\s/.test(t)&&e.push(Vi("Path cannot contain spaces.")),/[<>{}|\\^`"']/.test(t)&&e.push(Vi("Path contains invalid characters: < > { } | \\ ^ ` \" '")),t.includes("..")&&e.push(Vi('Path cannot contain ".." (directory traversal).')),/#.*#/.test(t)&&e.push(Vi("Path cannot contain multiple hash fragments.")),{valid:e.length===0,type:"path",errors:e})},HF=t=>{const e=[];if(!t||!t.trim())return e.push(Vi("URL cannot be empty.")),{valid:!1,type:"url",errors:e};if(t=t.trim(),!/^https?:\/\//i.test(t))return e.push(Vi("URL must start with http:// or https://")),{valid:!1,type:"url",errors:e};/\s/.test(t)&&e.push(Vi("URL cannot contain spaces."));const n=t.replace(/^https?:\/\//i,"");(!n||n==="/")&&e.push(Vi("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(Vi("Domain must include a valid TLD (e.g. .com, .org).")),/[^a-zA-Z0-9.\-:]/.test(s)&&e.push(Vi("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(Vi("Port must be a number (e.g. :8080)."))}return(/javascript:/i.test(t)||/data:/i.test(t)||/vbscript:/i.test(t))&&e.push(Vi("URL contains a blocked protocol (javascript:, data:, vbscript:).")),{valid:e.length===0,type:"url",errors:e}},Q1=t=>!t||!t.trim()?{valid:!1,type:null,errors:[Vi("URL or path cannot be empty.")]}:(t=t.trim(),t.startsWith("/")?Ske(t):HF(t)),$ke={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Wd,ActionPopover:Pl,ErrorAlerts:J1},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(this.$t("Topic title is required.")),this.newTopic.slug&&this.newTopic.slug.trim()){const t=Q1("/"+this.newTopic.slug);t.valid||t.errors.forEach(e=>{this.newTopicErrors.push(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()}},Ake={class:"fcom_topic_selector"},Eke={key:0,class:"fcom_meta_text"};function Mke(t,e,n,s,i,o){const r=nn,a=Zt,l=Y("Plus"),c=_e,u=qe,d=vt,h=tn,f=Y("slug-input"),p=Y("error-alerts"),m=cn,b=Y("action-popover"),_=xt("loading");return v(),E("div",Ake,[Re((v(),D(a,{modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=k=>i.selected=k),"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),E(te,null,we(i.topics,k=>(v(),D(r,{key:k.slug,label:k.title,value:k.id},{default:w(()=>[g("span",null,$(k.title),1),k.description?(v(),E("span",Eke,$(k.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:k})=>[y(m,{modelValue:i.newTopic,"onUpdate:modelValue":e[4]||(e[4]=C=>i.newTopic=C),"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]=C=>i.newTopic.title=C),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]=C=>i.newTopic.slug=C),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]=C=>i.newTopic.description=C),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:C=>o.createTopic(k),loading:i.creatingTopic},{default:w(()=>[W($(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const UF=de($ke,[["render",Mke]]),Tke={name:"ListViewIcon"},Pke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ike(t,e,n,s,i,o){return v(),E("svg",Pke,[...e[0]||(e[0]=[Ia('<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 Lke=de(Tke,[["render",Ike]]),Oke={name:"TimelineViewIcon"},Dke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rke(t,e,n,s,i,o){return v(),E("svg",Dke,[...e[0]||(e[0]=[Ia('<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 Vke=de(Oke,[["render",Rke]]),Fke={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 Nke(t,e,n,s,i,o){const r=nn,a=Zt,l=xt("loading");return Re((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),E(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 F8=de(Fke,[["render",Nke]]),Bke={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)}}},zke={class:"fcom_form_builder"},Hke=["innerHTML"],Uke={key:8},jke={key:9,class:"fcom_help_text"},Wke=["innerHTML"];function Yke(t,e,n,s,i,o){const r=vt,a=Zi,l=Os,c=nn,u=Zt,d=Jt,h=d8,f=Ud,p=Hd,m=tn,b=qe,_=cn;return v(),E("div",zke,[y(_,{"label-position":"top",model:n.formData,onSubmit:Oe(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),E(te,null,we(n.formFields,(k,C)=>(v(),D(m,{key:t.index,label:k.label},fs({default:w(()=>[k.type=="text"?(v(),D(r,{key:0,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x,placeholder:k.placeholder,type:k.data_type||"text"},null,8,["modelValue","onUpdate:modelValue","placeholder","type"])):k.type=="radio"?(v(),D(l,{key:1,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x},{default:w(()=>[(v(!0),E(te,null,we(k.options,(x,S)=>(v(),D(a,{key:S,value:x.value,label:x.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="select"?(v(),D(u,{key:2,class:"fcom_select",multiple:k.is_multiple,clearable:"",filterable:"",modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x,placeholder:k.placeholder},{default:w(()=>[(v(!0),E(te,null,we(k.options,(x,S)=>(v(),D(c,{key:S,label:x.label,value:x.value},null,8,["label","value"]))),128))]),_:2},1032,["multiple","modelValue","onUpdate:modelValue","placeholder"])):k.type=="checkbox"?(v(),D(h,{key:3,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x},{default:w(()=>[(v(!0),E(te,null,we(k.options,(x,S)=>(v(),D(d,{key:S,value:x.value,label:x.label,class:"fcom_checkbox"},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="inline_checkbox"?(v(),D(d,{key:4,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x,"true-value":k.true_value||"yes","false-value":k.false_value||"no",class:"fcom_checkbox"},{default:w(()=>[W($(k.checkbox_label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value","false-value"])):k.type=="date"?(v(),D(f,{key:5,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x,type:k.data_type||"date","value-format":k.value_format||"YYYY-MM-DD",format:k.value_format||"YYYY-MM-DD",placeholder:k.placeholder},null,8,["modelValue","onUpdate:modelValue","type","value-format","format","placeholder"])):k.type=="color_picker"?(v(),D(p,{key:6,modelValue:n.formData[C],"onUpdate:modelValue":x=>n.formData[C]=x},null,8,["modelValue","onUpdate:modelValue"])):k.type=="raw_html"?(v(),E("div",{key:7,innerHTML:k.content},null,8,Hke)):(v(),E("div",Uke,[g("pre",null,$(k),1)])),k.help_text?(v(),E("div",jke,[g("p",{innerHTML:k.help_text},null,8,Wke)])):O("",!0)]),_:2},[k.label?{name:"label",fn:w(()=>[W($(k.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:Oe(o.handleSubmit,["prevent"])},{default:w(()=>[W($(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const jF=de(Bke,[["render",Yke]]),qke={name:"CardViewIcon"},Gke={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function Xke(t,e,n,s,i,o){return v(),E("svg",Gke,[...e[0]||(e[0]=[Ia('<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 Kke=de(qke,[["render",Xke]]),Zke={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:F8,SlugInput:Wd,ImageUploader:Jc,LogoEmojiSelector:Z1,TopicSelector:UF,ListViewIcon:Lke,TimelineViewIcon:Vke,FormBuilder:jF,ErrorAlerts:J1,CardViewIcon:Kke},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:Awe,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",media_gallery:"no",media_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"])},getValidationErrors(){var e,n;const t=[];if((!this.form.title||!this.form.title.trim())&&t.push(this.$t("Space title is required.")),this.form.slug&&this.form.slug.trim()){const s=Q1("/"+this.form.slug);s.valid||s.errors.forEach(i=>t.push(this.$t(i)))}return((e=this.form.settings)==null?void 0:e.topic_required)==="yes"&&!((n=this.form.topic_ids)!=null&&n.length)&&t.push(this.$t("Please select at least one topic when members are required to select a topic.")),t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(){if(this.form.id){const s=this.getValidationErrors();if(s.length){this.$notify.error(s[0]);return}}else 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}},Jke={key:0},Qke={class:"fcom_form_section"},eCe={class:"fcom_help_text"},tCe={class:"fcom_form_section"},nCe={style:{"font-weight":"bold"}},sCe=["innerHTML"],iCe={key:0},oCe={class:"fcom_help_text"},rCe={key:0},aCe={key:1,class:"fcom_form_section"},lCe={class:"fcom_lined_checkboxes"},cCe={key:0,class:"fcom_pro_feature"},uCe={key:0,class:"fcom_feature_nested"},dCe={key:0,class:"fcom_pro_feature"},hCe={key:1,class:"fcom_feature_nested"},fCe={class:"fcom_form_section"},pCe={class:"fcom_svg_radio_item"},mCe={class:"svg_radio_label"},gCe={class:"fcom_svg_radio_item"},vCe={class:"svg_radio_label"},yCe={class:"fcom_svg_radio_item"},bCe={class:"svg_radio_label"},_Ce={class:"fcom_help_text"},wCe={key:0},kCe={key:1},CCe={class:"fcom_form_section"},xCe={class:"fcom_help_text"},SCe=["href"],$Ce={class:"fcom_image_uploader_wrapper"},ACe={class:"fcom_help_text"},ECe={class:"fcom_image_uploader_wrapper"},MCe={class:"fcom_help_text"},TCe={class:"fcom_space_form_bottom"},PCe={class:"fcom_space_form_bottom"},ICe={key:0},LCe={class:"fcom_form_section fcom_mt_20"};function OCe(t,e,n,s,i,o){const r=Y("logo-emoji-selector"),a=vt,l=tn,c=Y("SlugInput"),u=Y("space-group-selector"),d=nn,h=Zt,f=Zi,p=Os,m=Jt,b=Y("TimelineViewIcon"),_=Y("ListViewIcon"),k=Y("CardViewIcon"),C=Y("topic-selector"),x=Cr,S=Y("EditPen"),M=_e,P=qe,T=Y("Delete"),I=Y("ImageUploader"),L=Y("error-alerts"),V=cn,R=Y("form-builder"),N=xt("loading");return v(),E("div",null,[y(V,{onSubmit:e[31]||(e[31]=Oe(F=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[32]||(e[32]=F=>i.form=F),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[i.showingSections.indexOf("basic")!==-1?(v(),E(te,{key:0},[i.form.id?O("",!0):(v(),E("h4",Jke,$(t.$t("Basic Info")),1)),g("div",Qke,[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]=z=>{i.form.settings.emoji=z.emoji,i.form.logo=z.logo,i.form.settings.shape_svg=z.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",eCe,[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",tCe,[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),E(te,null,we(i.privacies,(F,B)=>(v(),D(d,{key:B,label:F.label,value:B},{default:w(()=>[g("span",nCe,$(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,sCe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i.form.privacy=="private"?(v(),E(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(()=>[W($(t.$t("Custom Lock Screen")),1)]),_:1}),y(f,{value:"no"},{default:w(()=>[W($(t.$t("Default Lock Screen")),1)]),_:1}),y(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[W($(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),E("span",iCe,$(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",oCe,[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(()=>[W($(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(()=>[W($(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(),E(te,{key:1},[i.form.id?O("",!0):(v(),E("h4",rCe,$(t.$t("Customization")),1)),i.form.settings?(v(),E("div",aCe,[g("h4",null,$(t.$t("Features Customizations")),1),y(l,null,{default:w(()=>[g("div",lCe,[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(()=>[W($(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(()=>[W($(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(()=>[W($(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(()=>[W($(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),E("span",cCe," ("+$(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),i.form.settings.document_library=="yes"?(v(),E("div",uCe,[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(()=>[W($(t.$t("Members of this space")),1)]),_:1}),y(f,{value:"logged_in"},{default:w(()=>[W($(t.$t("Any Logged in users")),1)]),_:1}),y(f,{value:"everybody"},{default:w(()=>[W($(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,{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(()=>[W($(t.$t("Any Members")),1)]),_:1}),y(f,{value:"admin_only"},{default:w(()=>[W($(t.$t("Admin/Moderators Only")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0),y(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.form.settings.media_gallery,"onUpdate:modelValue":e[17]||(e[17]=F=>i.form.settings.media_gallery=F)},{default:w(()=>[W($(t.$t("Enable Media Gallery for this space"))+" ",1),t.has_pro?O("",!0):(v(),E("span",dCe," ("+$(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),t.has_pro&&i.form.settings.media_gallery=="yes"?(v(),E("div",hCe,[y(l,{label:t.$t("Media Gallery Access (View)")},{default:w(()=>[y(p,{modelValue:i.form.settings.media_access,"onUpdate:modelValue":e[18]||(e[18]=F=>i.form.settings.media_access=F),class:"fcom_radio_group_inline"},{default:w(()=>[y(f,{value:"members_only"},{default:w(()=>[W($(t.$t("Members of this space")),1)]),_:1}),y(f,{value:"logged_in"},{default:w(()=>[W($(t.$t("Any Logged in users")),1)]),_:1}),y(f,{value:"everybody"},{default:w(()=>[W($(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0)])]),_:1}),y(l,{label:t.$t("Default Post Sort By")},{default:w(()=>[y(h,{modelValue:i.form.settings.default_post_sort_by,"onUpdate:modelValue":e[19]||(e[19]=F=>i.form.settings.default_post_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),E(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[20]||(e[20]=F=>i.form.settings.disable_post_sort_by=F)},{default:w(()=>[W($(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[21]||(e[21]=F=>i.form.settings.default_comment_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Comments Sort")},{default:w(()=>[(v(!0),E(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",fCe,[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[22]||(e[22]=F=>i.form.settings.layout_style=F),class:"fcom_svg_radio_group"},{default:w(()=>[g("div",pCe,[y(f,{value:"timeline"},{default:w(()=>[y(b,{style:{width:"100px",height:"auto"}}),g("p",mCe,$(t.$t("Timeline")),1)]),_:1})]),g("div",gCe,[y(f,{value:"list"},{default:w(()=>[y(_,{style:{width:"100px",height:"auto"}}),g("p",vCe,$(t.$t("List")),1)]),_:1})]),g("div",yCe,[y(f,{value:"card"},{default:w(()=>[y(k,{style:{width:"100px",height:"auto"}}),g("p",bCe,$(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[23]||(e[23]=F=>i.form.settings.disable_layout_style=F)},{default:w(()=>[W($(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",_Ce,[i.form.settings.disable_layout_style==="yes"?(v(),E("p",wCe,$(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),E("p",kCe,$(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",CCe,[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,{creatable:!0,space_id:i.form.id,modelValue:i.form.topic_ids,"onUpdate:modelValue":e[24]||(e[24]=F=>i.form.topic_ids=F)},null,8,["space_id","modelValue"]),g("div",xCe,[g("p",null,[W($(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(),E("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},$(t.$t("Manage all topics.")),9,SCe)):O("",!0)])]),y(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.topic_required,"onUpdate:modelValue":e[25]||(e[25]=F=>i.form.settings.topic_required=F),class:"fcom_checkbox"},{default:w(()=>[W($(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[26]||(e[26]=F=>i.form.group_chat_support=F),class:"fcom_checkbox"},{default:w(()=>[W($(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(x,{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",$Ce,[y(I,{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[27]||(e[27]=F=>{i.form.settings.og_image=F})},fs({remove:w(()=>[y(M,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(M,null,{default:w(()=>[y(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",ACe,[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(x,{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",ECe,[y(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.form.cover_photo,confirm_remove:!0,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},fs({remove:w(()=>[y(M,null,{default:w(()=>[y(T)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[y(P,{class:"fcom_plain_button"},{default:w(()=>[y(M,null,{default:w(()=>[y(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",MCe,[g("p",null,$(t.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),y(L,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),i.form.id?O("",!0):(v(),D(l,{key:2,style:{"margin-top":"45px"}},{default:w(()=>[g("div",TCe,[i.showingSections.indexOf("basic")===-1?(v(),D(P,{key:0,class:"plain_button",text:"",onClick:e[28]||(e[28]=()=>{i.showingSections=["basic"]})},{default:w(()=>[g("span",null,$(t.$t("Go Back")),1)]),_:1})):O("",!0),Re((v(),D(P,{class:"fcom_primary_button",disabled:i.saving,onClick:e[29]||(e[29]=F=>o.submit())},{default:w(()=>[g("span",null,$(t.$t("Create")),1)]),_:1},8,["disabled"])),[[N,i.saving]])])]),_:1}))])],64)):(v(),E(te,{key:2},[y(L,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),y(l,null,{default:w(()=>[g("div",PCe,[e[33]||(e[33]=g("span",null,null,-1)),y(P,{onClick:e[30]||(e[30]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,$(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Re((v(),E("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),E("div",ICe,[(v(!0),E(te,null,we(i.metaSettings,F=>(v(),E("div",LCe,[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 N8=de(Zke,[["render",OCe]]);var bo=(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))(bo||{});let Wo=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const DCe=(t,e)=>typeof e=="function"?"[Function]":e,Xf=t=>JSON.stringify(t,DCe);function RCe(t){return new Wo(bo.docTypeError,`Doc type error, unsupported type: ${Xf(t)}`)}function VCe(t){return new Wo(bo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function FCe(t){return new Wo(bo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function B8(){return new Wo(bo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function NCe(...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?Xf(o.toJSON()):o.spec?Xf(o.spec):o.toString();return`${n}, ${i(s)}`},"Create prosemirror node from remark failed in parser");return new Wo(bo.createNodeInParserFail,e)}function WF(){return new Wo(bo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function BCe(t){return new Wo(bo.parserMatchError,`Cannot match target parser for node: ${Xf(t)}.`)}function zCe(t){return new Wo(bo.serializerMatchError,`Cannot match target serializer for node: ${Xf(t)}.`)}function HCe(t,e){return new Wo(bo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function ta(t){return new Wo(bo.expectDomTypeError,`Expect to be a dom, but get: ${Xf(t)}.`)}function UCe(){return new Wo(bo.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 YF(t){return new Wo(bo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function jCe(t){return new Wo(bo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var qF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},wt=(t,e,n)=>(qF(t,e,"read from private field"),n?n.call(t):e.get(t)),vs=(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)},xn=(t,e,n,s)=>(qF(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let GF=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 VCe(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 aa,Gl,om;let WCe=class{constructor(e,n,s){vs(this,aa,void 0),vs(this,Gl,void 0),vs(this,om,void 0),xn(this,aa,[]),xn(this,om,()=>{wt(this,aa).forEach(i=>i(wt(this,Gl)))}),this.set=i=>{xn(this,Gl,i),wt(this,om).call(this)},this.get=()=>wt(this,Gl),this.update=i=>{xn(this,Gl,i(wt(this,Gl))),wt(this,om).call(this)},this.type=s,xn(this,Gl,n),e.set(s.id,this)}on(e){return wt(this,aa).push(e),()=>{xn(this,aa,wt(this,aa).filter(n=>n!==e))}}once(e){const n=this.on(s=>{e(s),n()});return n}off(e){xn(this,aa,wt(this,aa).filter(n=>n!==e))}offAll(){xn(this,aa,[])}};aa=new WeakMap,Gl=new WeakMap,om=new WeakMap;let YCe=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw B8()}}create(e,n=this._defaultValue){return new WCe(e,n,this)}};const kn=(t,e)=>new YCe(t,e);var H0,U0,j0,Mh,rm,_u,am,lm,cm;let qCe=class{constructor(e,n,s){vs(this,H0,void 0),vs(this,U0,void 0),vs(this,j0,void 0),vs(this,Mh,void 0),vs(this,rm,void 0),vs(this,_u,void 0),vs(this,am,void 0),vs(this,lm,void 0),vs(this,cm,void 0),xn(this,Mh,new Set),xn(this,rm,new Set),xn(this,_u,new Map),xn(this,am,new Map),this.read=()=>({metadata:wt(this,H0),injectedSlices:[...wt(this,Mh)].map(i=>({name:typeof i=="string"?i:i.name,value:wt(this,lm).call(this,i)})),consumedSlices:[...wt(this,rm)].map(i=>({name:typeof i=="string"?i:i.name,value:wt(this,lm).call(this,i)})),recordedTimers:[...wt(this,_u)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:wt(this,cm).call(this,i)})),waitTimers:[...wt(this,am)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:wt(this,cm).call(this,i)}))}),this.onRecord=i=>{wt(this,_u).set(i,{start:Date.now(),duration:0})},this.onClear=i=>{wt(this,_u).delete(i)},this.onDone=i=>{const o=wt(this,_u).get(i);o&&(o.duration=Date.now()-o.start)},this.onWait=(i,o)=>{const r=Date.now();o.finally(()=>{wt(this,am).set(i,{duration:Date.now()-r})})},this.onInject=i=>{wt(this,Mh).add(i)},this.onRemove=i=>{wt(this,Mh).delete(i)},this.onUse=i=>{wt(this,rm).add(i)},xn(this,lm,i=>wt(this,U0).get(i).get()),xn(this,cm,i=>wt(this,j0).get(i).status),xn(this,U0,e),xn(this,j0,n),xn(this,H0,s)}};H0=new WeakMap,U0=new WeakMap,j0=new WeakMap,Mh=new WeakMap,rm=new WeakMap,_u=new WeakMap,am=new WeakMap,lm=new WeakMap,cm=new WeakMap;var Xl,Kl,W0,Sr;const GCe=class XF{constructor(e,n,s){vs(this,Xl,void 0),vs(this,Kl,void 0),vs(this,W0,void 0),vs(this,Sr,void 0),this.produce=i=>i&&Object.keys(i).length?new XF(wt(this,Xl),wt(this,Kl),{...i}):this,this.inject=(i,o)=>{var r;const a=i.create(wt(this,Xl).sliceMap);return o!=null&&a.set(o),(r=wt(this,Sr))==null||r.onInject(i),this},this.remove=i=>{var o;return wt(this,Xl).remove(i),(o=wt(this,Sr))==null||o.onRemove(i),this},this.record=i=>{var o;return i.create(wt(this,Kl).store),(o=wt(this,Sr))==null||o.onRecord(i),this},this.clearTimer=i=>{var o;return wt(this,Kl).remove(i),(o=wt(this,Sr))==null||o.onClear(i),this},this.isInjected=i=>wt(this,Xl).has(i),this.isRecorded=i=>wt(this,Kl).has(i),this.use=i=>{var o;return(o=wt(this,Sr))==null||o.onUse(i),wt(this,Xl).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=>wt(this,Kl).get(i),this.done=i=>{var o;this.timer(i).done(),(o=wt(this,Sr))==null||o.onDone(i)},this.wait=i=>{var o;const r=this.timer(i).start();return(o=wt(this,Sr))==null||o.onWait(i,r),r},this.waitTimers=async i=>{await Promise.all(this.get(i).map(o=>this.wait(o)))},xn(this,Xl,e),xn(this,Kl,n),xn(this,W0,s),s&&xn(this,Sr,new qCe(e,n,s))}get meta(){return wt(this,W0)}get inspector(){return wt(this,Sr)}};Xl=new WeakMap,Kl=new WeakMap,W0=new WeakMap,Sr=new WeakMap;let XCe=GCe,KCe=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw FCe(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var Th,wu,um,Zl,dm,Y0;let ZCe=class{constructor(e,n){vs(this,Th,void 0),vs(this,wu,void 0),vs(this,um,void 0),vs(this,Zl,void 0),vs(this,dm,void 0),vs(this,Y0,void 0),xn(this,Th,null),xn(this,wu,null),xn(this,Zl,"pending"),this.start=()=>(wt(this,Th)??xn(this,Th,new Promise((s,i)=>{xn(this,wu,o=>{o instanceof CustomEvent&&o.detail.id===wt(this,um)&&(xn(this,Zl,"resolved"),wt(this,dm).call(this),o.stopImmediatePropagation(),s())}),wt(this,Y0).call(this,()=>{wt(this,Zl)==="pending"&&xn(this,Zl,"rejected"),wt(this,dm).call(this),i(new Error(`Timing ${this.type.name} timeout.`))}),xn(this,Zl,"pending"),addEventListener(this.type.name,wt(this,wu))})),wt(this,Th)),this.done=()=>{const s=new CustomEvent(this.type.name,{detail:{id:wt(this,um)}});dispatchEvent(s)},xn(this,dm,()=>{wt(this,wu)&&removeEventListener(this.type.name,wt(this,wu))}),xn(this,Y0,s=>{setTimeout(()=>{s()},this.type.timeout)}),xn(this,um,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return wt(this,Zl)}};Th=new WeakMap,wu=new WeakMap,um=new WeakMap,Zl=new WeakMap,dm=new WeakMap,Y0=new WeakMap;let JCe=class{constructor(e,n=3e3){this.create=s=>new ZCe(s,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const Qc=(t,e=3e3)=>new JCe(t,e);function Zs(t){this.content=t}Zs.prototype={constructor:Zs,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 Zs(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 Zs(n)},addToStart:function(t,e){return new Zs([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Zs(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 Zs(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=Zs.from(t),t.size?new Zs(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Zs.from(t),t.size?new Zs(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Zs.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}};Zs.from=function(t){if(t instanceof Zs)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Zs(e)};function KF(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=KF(i.content,o.content,n+1);if(r!=null)return r}n+=i.nodeSize}}function ZF(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=ZF(r.content,a.content,n-1,s-1);if(c)return c}n-=l,s-=l}}let st=class Ri{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 Ri(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 Ri(s,i)}cutByIndex(e,n){return e==n?Ri.empty:e==0&&n==this.content.length?this:new Ri(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 Ri(i,o)}addToStart(e){return new Ri([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ri(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 KF(this,e,n)}findDiffEnd(e,n=this.size,s=e.size){return ZF(this,e,n,s)}findIndex(e,n=-1){if(e==0)return a0(0,e);if(e==this.size)return a0(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?a0(s+1,r):a0(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 Ri.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ri(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ri.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 Ri(n||e,s)}static from(e){if(!e)return Ri.empty;if(e instanceof Ri)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ri([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};st.empty=new st([],0);const Xw={index:0,offset:0};function a0(t,e){return Xw.index=t,Xw.offset=e,Xw}function Lb(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(!Lb(t[s],e[s]))return!1}else{for(let s in t)if(!(s in e)||!Lb(t[s],e[s]))return!1;for(let s in e)if(!(s in t))return!1}return!0}let En=class RC{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&&Lb(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 RC.none;if(e instanceof RC)return[e];let n=e.slice();return n.sort((s,i)=>s.type.rank-i.type.rank),n}};En.none=[];class Ob extends Error{}class rt{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=QF(this.content,e+this.openStart,n);return s&&new rt(s,this.openStart,this.openEnd)}removeBetween(e,n){return new rt(JF(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 rt.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 rt(st.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 rt(e,s,i)}}rt.empty=new rt(st.empty,0,0);function JF(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(JF(o.content,e-i-1,n-i-1)))}function QF(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=QF(r.content,e-o-1,n);return a&&t.replaceChild(i,r.copy(a))}function QCe(t,e,n){if(n.openStart>t.depth)throw new Ob("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ob("Inconsistent open depths");return eN(t,e,n,0)}function eN(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=eN(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 ed(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=exe(n,t);return ed(o,nN(t,r,a,e,s))}else return ed(o,Db(t,e,s))}function tN(t,e){if(!e.type.compatibleContent(t.type))throw new Ob("Cannot join "+e.type.name+" onto "+t.type.name)}function VC(t,e,n){let s=t.node(n);return tN(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 rg(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 ed(t,e){return t.type.checkContent(e),t.copy(e)}function nN(t,e,n,s,i){let o=t.depth>i&&VC(t,e,i+1),r=s.depth>i&&VC(n,s,i+1),a=[];return rg(null,t,i,a),o&&r&&e.index(i)==n.index(i)?(tN(o,r),Qu(ed(o,nN(t,e,n,s,i+1)),a)):(o&&Qu(ed(o,Db(t,e,i+1)),a),rg(e,n,i,a),r&&Qu(ed(r,Db(n,s,i+1)),a)),rg(s,null,i,a),new st(a)}function Db(t,e,n){let s=[];if(rg(null,t,n,s),t.depth>n){let i=VC(t,e,n+1);Qu(ed(i,Db(t,e,n+1)),s)}return rg(e,null,n,s),new st(s)}function exe(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(st.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class a1{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 En.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 sN(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 a1(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 txe);let i=s.elts[s.i]=a1.resolve(e,n);return s.i=(s.i+1)%nxe,i}}class txe{constructor(){this.elts=[],this.i=0}}const nxe=12,QA=new WeakMap;class sN{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 sxe=Object.create(null);let Ec=class FC{constructor(e,n,s,i=En.none){this.type=e,this.attrs=n,this.marks=i,this.content=s||st.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&&Lb(this.attrs,n||e.defaultAttrs||sxe)&&En.sameSet(this.marks,s||En.none)}copy(e=null){return e==this.content?this:new FC(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new FC(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 rt.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 rt(c,i.depth-r,o.depth-r)}replace(e,n,s){return QCe(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 a1.resolveCached(this,e)}resolveNoCache(e){return a1.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()+")"),iN(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=st.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=En.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(!En.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=st.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,s);return o.type.checkAttrs(o.attrs),o}};Ec.prototype.text=void 0;class Rb extends Ec{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):iN(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 Rb(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Rb(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 iN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class wd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let s=new ixe(e,n);if(s.next==null)return wd.empty;let i=oN(s);s.next&&s.err("Unexpected trailing text");let o=dxe(uxe(i));return hxe(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 st.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 |
`)}}wd.empty=new wd(!0);class ixe{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 oN(t){let e=[];do e.push(oxe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oxe(t){let e=[];do e.push(rxe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function rxe(t){let e=cxe(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=axe(t,e);else break;return e}function eE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function axe(t,e){let n=eE(t),s=n;return t.eat(",")&&(t.next!="}"?s=eE(t):s=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:s,expr:e}}function lxe(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 cxe(t){if(t.eat("(")){let e=oN(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=lxe(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 uxe(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 rN(t,e){return e-t}function tE(t,e){let n=[];return s(e),n.sort(rN);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 dxe(t){let e=Object.create(null);return n(tE(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]);tE(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[s.join(",")]=new wd(s.indexOf(t.length-1)>-1);for(let r=0;r<i.length;r++){let a=i[r][1].sort(rN);o.next.push({type:i[r][0],next:e[a.join(",")]||n(a)})}return o}}function hxe(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 aN(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 lN(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 cN(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 uN(t,e){let n=Object.create(null);if(e)for(let s in e)n[s]=new pxe(t,s,e[s]);return n}let Vb=class dN{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=uN(e,s.attrs),this.defaultAttrs=aN(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==wd.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:lN(this.attrs,e)}create(e=null,n,s){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ec(this,this.computeAttrs(e),st.from(n),En.setFrom(s))}createChecked(e=null,n,s){return n=st.from(n),this.checkContent(n),new Ec(this,this.computeAttrs(e),n,En.setFrom(s))}createAndFill(e=null,n,s){if(e=this.computeAttrs(e),n=st.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(st.empty,!0);return o?new Ec(this,e,n.append(o),En.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){cN(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:En.none:e}static compile(e,n){let s=Object.create(null);e.forEach((o,r)=>s[o]=new dN(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 fxe(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 pxe{constructor(e,n,s){this.hasDefault=Object.prototype.hasOwnProperty.call(s,"default"),this.default=s.default,this.validate=typeof s.validate=="string"?fxe(e,n,s.validate):s.validate}get isRequired(){return!this.hasDefault}}class f2{constructor(e,n,s,i){this.name=e,this.rank=n,this.schema=s,this.spec=i,this.attrs=uN(e,i.attrs),this.excluded=null;let o=aN(this.attrs);this.instance=o?new En(this,o):null}create(e=null){return!e&&this.instance?this.instance:new En(this,lN(this.attrs,e))}static compile(e,n){let s=Object.create(null),i=0;return e.forEach((o,r)=>s[o]=new f2(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){cN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class mxe{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=Zs.from(e.nodes),n.marks=Zs.from(e.marks||{}),this.nodes=Vb.compile(this.spec.nodes,this),this.marks=f2.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]=wd.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?nE(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==""?[]:nE(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 Vb){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 Rb(s,s.defaultAttrs,e,En.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Ec.fromJSON(this,e)}markFromJSON(e){return En.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function nE(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 gxe(t){return t.tag!=null}function vxe(t){return t.style!=null}let p2=class NC{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let s=this.matchedStyles=[];n.forEach(i=>{if(gxe(i))this.tags.push(i);else if(vxe(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 iE(this,n,!1);return s.addAll(e,En.none,n.from,n.to),s.finish()}parseSlice(e,n={}){let s=new iE(this,n,!0);return s.addAll(e,En.none,n.from,n.to),rt.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(_xe(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=oE(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=oE(r)),r.node||r.ignore||r.mark||(r.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new NC(e,NC.schemaRules(e)))}};const hN={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},yxe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fN={ol:!0,ul:!0},Fb=1,Nb=2,ag=4;function sE(t,e,n){return e!=null?(e?Fb:0)|(e==="full"?Nb:0):t&&t.whitespace=="pre"?Fb|Nb:n&~ag}class l0{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=En.none,this.match=o||(r&ag?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(st.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&Fb)){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=st.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(st.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&&!hN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class iE{constructor(e,n,s){this.parser=e,this.options=n,this.isOpen=s,this.open=0;let i=n.topNode,o,r=sE(null,n.preserveWhitespace,0)|(s?ag:0);i?o=new l0(i.type,i.attrs,En.none,!0,n.topMatch||i.type.contentMatch,r):s?o=new l0(null,null,En.none,!0,null,r):o=new l0(e.schema.topNodeType,null,En.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&Nb||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(s)){if(i.options&Fb)i.options&Nb?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;fN.hasOwnProperty(i)&&this.parser.normalizeLists&&bxe(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,s));if(r?r.ignore:yxe.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(hN.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=En.none;for(let r of s.concat(e.marks))(i.type?i.type.allowsMarkType(r.type):rE(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=sE(e,o,r.options);r.options&ag&&r.content.length==0&&(a|=ag);let l=En.none;return s=s.filter(c=>(r.type?r.type.allowsMarkType(c.type):rE(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new l0(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 bxe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let s=e.nodeType==1?e.nodeName.toLowerCase():null;s&&fN.hasOwnProperty(s)&&n?(n.appendChild(e),e=n):s=="li"?n=e:s&&(n=null)}}function _xe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function oE(t){let e={};for(let n in t)e[n]=t[n];return e}function rE(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 eu{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},s){s||(s=Kw(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}=q0(Kw(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&&q0(Kw(s),i(e,n),null,e.attrs)}static renderSpec(e,n,s=null,i){return q0(e,n,s,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new eu(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=aE(e.nodes);return n.text||(n.text=s=>s.text),n}static marksFromSchema(e){return aE(e.marks)}}function aE(t){let e={};for(let n in t){let s=t[n].spec.toDOM;s&&(e[n]=s)}return e}function Kw(t){return t.document||window.document}const lE=new WeakMap;function wxe(t){let e=lE.get(t);return e===void 0&&lE.set(t,e=kxe(t)),e}function kxe(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 q0(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=wxe(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}=q0(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 Cxe={};function z8(t,e){const n=e||Cxe,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pN(t,s,i)}function pN(t,e,n){if(xxe(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 cE(t.children,e,n)}return Array.isArray(t)?cE(t,e,n):""}function cE(t,e,n){const s=[];let i=-1;for(;++i<t.length;)s[i]=pN(t[i],e,n);return s.join("")}function xxe(t){return!!(t&&typeof t=="object")}const uE=document.createElement("i");function H8(t){const e="&"+t+";";uE.innerHTML=e;const n=uE.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function hr(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 ir(t,e){return t.length>0?(hr(t,t.length,0,e),t):e}const dE={}.hasOwnProperty;function mN(t){const e={};let n=-1;for(;++n<t.length;)Sxe(e,t[n]);return e}function Sxe(t,e){let n;for(n in e){const i=(dE.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){dE.call(i,r)||(i[r]=[]);const a=o[r];$xe(i[r],Array.isArray(a)?a:a?[a]:[])}}}function $xe(t,e){let n=-1;const s=[];for(;++n<e.length;)(e[n].add==="after"?t:s).push(e[n]);hr(t,0,0,s)}function gN(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 Nr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zi=tu(/[A-Za-z]/),co=tu(/[\dA-Za-z]/),Axe=tu(/[#-'*+\--9=?A-Z^-~]/);function Bb(t){return t!==null&&(t<32||t===127)}const BC=tu(/\d/),Exe=tu(/[\dA-Fa-f]/),Mxe=tu(/[!-/:-@[-`{-~]/);function Et(t){return t!==null&&t<-2}function jn(t){return t!==null&&(t<0||t===32)}function un(t){return t===-2||t===-1||t===32}const m2=tu(/\p{P}|\p{S}/u),kd=tu(/\s/);function tu(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function yn(t,e,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return un(l)?(t.enter(n),a(l)):e(l)}function a(l){return un(l)&&o++<i?(t.consume(l),a):(t.exit(n),e(l))}}const Txe={tokenize:Pxe};function Pxe(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"),yn(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 Et(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),r)}}const Ixe={tokenize:Lxe},hE={tokenize:Oxe};function Lxe(t){const e=this,n=[];let s=0,i,o,r;return a;function a(C){if(s<n.length){const x=n[s];return e.containerState=x[1],t.attempt(x[0].continuation,l,c)(C)}return c(C)}function l(C){if(s++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&k();const x=e.events.length;let S=x,M;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){M=e.events[S][1].end;break}_(s);let P=x;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},M),P++;return hr(e.events,S+1,0,e.events.slice(x)),e.events.length=P,c(C)}return a(C)}function c(C){if(s===n.length){if(!i)return h(C);if(i.currentConstruct&&i.currentConstruct.concrete)return p(C);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(hE,u,d)(C)}function u(C){return i&&k(),_(s),h(C)}function d(C){return e.parser.lazy[e.now().line]=s!==n.length,r=e.now().offset,p(C)}function h(C){return e.containerState={},t.attempt(hE,f,p)(C)}function f(C){return s++,n.push([e.currentConstruct,e.containerState]),h(C)}function p(C){if(C===null){i&&k(),_(0),t.consume(C);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(C)}function m(C){if(C===null){b(t.exit("chunkFlow"),!0),_(0),t.consume(C);return}return Et(C)?(t.consume(C),b(t.exit("chunkFlow")),s=0,e.interrupt=void 0,a):(t.consume(C),m)}function b(C,x){const S=e.sliceStream(C);if(x&&S.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(S),e.parser.lazy[C.start.line]){let M=i.events.length;for(;M--;)if(i.events[M][1].start.offset<r&&(!i.events[M][1].end||i.events[M][1].end.offset>r))return;const P=e.events.length;let T=P,I,L;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(I){L=e.events[T][1].end;break}I=!0}for(_(s),M=P;M<e.events.length;)e.events[M][1].end=Object.assign({},L),M++;hr(e.events,T+1,0,e.events.slice(P)),e.events.length=M}}function _(C){let x=n.length;for(;x-- >C;){const S=n[x];e.containerState=S[1],S[0].exit.call(e,t)}n.length=C}function k(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function Oxe(t,e,n){return yn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zb(t){if(t===null||jn(t)||kd(t))return 1;if(m2(t))return 2}function g2(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 zC={name:"attention",tokenize:Rxe,resolveAll:Dxe};function Dxe(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);fE(d,-l),fE(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=ir(c,[["enter",t[s][1],e],["exit",t[s][1],e]])),c=ir(c,[["enter",i,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=ir(c,g2(e.parser.constructs.insideSpan.null,t.slice(s+1,n),e)),c=ir(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=ir(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,hr(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 Rxe(t,e){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=zb(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=zb(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 fE(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Vxe={name:"autolink",tokenize:Fxe};function Fxe(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 zi(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||co(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||co(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||Bb(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):Axe(f)?(t.consume(f),c):n(f)}function u(f){return co(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||co(f))&&s++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const ev={tokenize:Nxe,partial:!0};function Nxe(t,e,n){return s;function s(o){return un(o)?yn(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||Et(o)?e(o):n(o)}}const vN={name:"blockQuote",tokenize:Bxe,continuation:{tokenize:zxe},exit:Hxe};function Bxe(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 un(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function zxe(t,e,n){const s=this;return i;function i(r){return un(r)?yn(t,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(vN,e,n)(r)}}function Hxe(t){t.exit("blockQuote")}const yN={name:"characterEscape",tokenize:Uxe};function Uxe(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 Mxe(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const bN={name:"characterReference",tokenize:jxe};function jxe(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=co,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=Exe,u):(t.enter("characterReferenceValue"),o=7,r=BC,u(d))}function u(d){if(d===59&&i){const h=t.exit("characterReferenceValue");return r===co&&!H8(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 pE={tokenize:Yxe,partial:!0},mE={name:"codeFenced",tokenize:Wxe,concrete:!0};function Wxe(t,e,n){const s=this,i={tokenize:S,partial:!0};let o=0,r=0,a;return l;function l(M){return c(M)}function c(M){const P=s.events[s.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=M,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(M)}function u(M){return M===a?(r++,t.consume(M),u):r<3?n(M):(t.exit("codeFencedFenceSequence"),un(M)?yn(t,d,"whitespace")(M):d(M))}function d(M){return M===null||Et(M)?(t.exit("codeFencedFence"),s.interrupt?e(M):t.check(pE,m,x)(M)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(M))}function h(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(M)):un(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),yn(t,f,"whitespace")(M)):M===96&&M===a?n(M):(t.consume(M),h)}function f(M){return M===null||Et(M)?d(M):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(M))}function p(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(M)):M===96&&M===a?n(M):(t.consume(M),p)}function m(M){return t.attempt(i,x,b)(M)}function b(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),_}function _(M){return o>0&&un(M)?yn(t,k,"linePrefix",o+1)(M):k(M)}function k(M){return M===null||Et(M)?t.check(pE,m,x)(M):(t.enter("codeFlowValue"),C(M))}function C(M){return M===null||Et(M)?(t.exit("codeFlowValue"),k(M)):(t.consume(M),C)}function x(M){return t.exit("codeFenced"),e(M)}function S(M,P,T){let I=0;return L;function L(B){return M.enter("lineEnding"),M.consume(B),M.exit("lineEnding"),V}function V(B){return M.enter("codeFencedFence"),un(B)?yn(M,R,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===a?(M.enter("codeFencedFenceSequence"),N(B)):T(B)}function N(B){return B===a?(I++,M.consume(B),N):I>=r?(M.exit("codeFencedFenceSequence"),un(B)?yn(M,F,"whitespace")(B):F(B)):T(B)}function F(B){return B===null||Et(B)?(M.exit("codeFencedFence"),P(B)):T(B)}}}function Yxe(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 Zw={name:"codeIndented",tokenize:Gxe},qxe={tokenize:Xxe,partial:!0};function Gxe(t,e,n){const s=this;return i;function i(c){return t.enter("codeIndented"),yn(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):Et(c)?t.attempt(qxe,r,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Et(c)?(t.exit("codeFlowValue"),r(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function Xxe(t,e,n){const s=this;return i;function i(r){return s.parser.lazy[s.now().line]?n(r):Et(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),i):yn(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):Et(r)?i(r):n(r)}}const Kxe={name:"codeText",tokenize:Qxe,resolve:Zxe,previous:Jxe};function Zxe(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 Jxe(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qxe(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)):Et(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||Et(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 e6e{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&&Jp(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),Jp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Jp(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);Jp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Jp(this.left,n.reverse())}}}function Jp(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 _N(t){const e={};let n=-1,s,i,o,r,a,l,c;const u=new e6e(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,t6e(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 hr(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function t6e(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]),k=o.pop();l.push([k,k+_.length-1]),t.splice(k,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 n6e={tokenize:o6e,resolve:i6e},s6e={tokenize:r6e,partial:!0};function i6e(t){return _N(t),t}function o6e(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):Et(a)?t.check(s6e,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 r6e(t,e,n){const s=this;return i;function i(r){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),yn(t,o,"linePrefix")}function o(r){if(r===null||Et(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 wN(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||Bb(_)?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||Et(_)?n(_):(t.consume(_),_===92?p:f)}function p(_){return _===60||_===62||_===92?(t.consume(_),f):f(_)}function m(_){return!u&&(_===null||_===41||jn(_))?(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||Bb(_)?n(_):(t.consume(_),_===92?b:m)}function b(_){return _===40||_===41||_===92?(t.consume(_),m):m(_)}}function kN(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):Et(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||Et(f)||a++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!un(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function CN(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):Et(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),yn(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===r||h===null||Et(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 lg(t,e){let n;return s;function s(i){return Et(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,s):un(i)?yn(t,s,n?"linePrefix":"lineSuffix")(i):e(i)}}const a6e={name:"definition",tokenize:c6e},l6e={tokenize:u6e,partial:!0};function c6e(t,e,n){const s=this;let i;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return kN.call(s,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Nr(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 jn(f)?lg(t,c)(f):c(f)}function c(f){return wN(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(l6e,d,d)(f)}function d(f){return un(f)?yn(t,h,"whitespace")(f):h(f)}function h(f){return f===null||Et(f)?(t.exit("definition"),s.parser.defined.push(i),e(f)):n(f)}}function u6e(t,e,n){return s;function s(a){return jn(a)?lg(t,i)(a):n(a)}function i(a){return CN(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return un(a)?yn(t,r,"whitespace")(a):r(a)}function r(a){return a===null||Et(a)?e(a):n(a)}}const d6e={name:"hardBreakEscape",tokenize:h6e};function h6e(t,e,n){return s;function s(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return Et(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const f6e={name:"headingAtx",tokenize:m6e,resolve:p6e};function p6e(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"},hr(t,s,n-s+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function m6e(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||jn(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Et(u)?(t.exit("atxHeading"),e(u)):un(u)?yn(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||jn(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const g6e=["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"],gE=["pre","script","style","textarea"],v6e={name:"htmlFlow",tokenize:w6e,resolveTo:_6e,concrete:!0},y6e={tokenize:C6e,partial:!0},b6e={tokenize:k6e,partial:!0};function _6e(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 w6e(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):zi(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):zi(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 zi(Z)?(t.consume(Z),r=String.fromCharCode(Z),b):n(Z)}function b(Z){if(Z===null||Z===47||Z===62||jn(Z)){const ae=Z===47,ge=r.toLowerCase();return!ae&&!o&&gE.includes(ge)?(i=1,s.interrupt?e(Z):R(Z)):g6e.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?k(Z):C(Z))}return Z===45||co(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 k(Z){return un(Z)?(t.consume(Z),k):L(Z)}function C(Z){return Z===47?(t.consume(Z),L):Z===58||Z===95||zi(Z)?(t.consume(Z),x):un(Z)?(t.consume(Z),C):L(Z)}function x(Z){return Z===45||Z===46||Z===58||Z===95||co(Z)?(t.consume(Z),x):S(Z)}function S(Z){return Z===61?(t.consume(Z),M):un(Z)?(t.consume(Z),S):C(Z)}function M(Z){return Z===null||Z===60||Z===61||Z===62||Z===96?n(Z):Z===34||Z===39?(t.consume(Z),l=Z,P):un(Z)?(t.consume(Z),M):T(Z)}function P(Z){return Z===l?(t.consume(Z),l=null,I):Z===null||Et(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||jn(Z)?S(Z):(t.consume(Z),T)}function I(Z){return Z===47||Z===62||un(Z)?C(Z):n(Z)}function L(Z){return Z===62?(t.consume(Z),V):n(Z)}function V(Z){return Z===null||Et(Z)?R(Z):un(Z)?(t.consume(Z),V):n(Z)}function R(Z){return Z===45&&i===2?(t.consume(Z),z):Z===60&&i===1?(t.consume(Z),G):Z===62&&i===4?(t.consume(Z),Q):Z===63&&i===3?(t.consume(Z),H):Z===93&&i===5?(t.consume(Z),X):Et(Z)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(y6e,ne,N)(Z)):Z===null||Et(Z)?(t.exit("htmlFlowData"),N(Z)):(t.consume(Z),R)}function N(Z){return t.check(b6e,F,ne)(Z)}function F(Z){return t.enter("lineEnding"),t.consume(Z),t.exit("lineEnding"),B}function B(Z){return Z===null||Et(Z)?N(Z):(t.enter("htmlFlowData"),R(Z))}function z(Z){return Z===45?(t.consume(Z),H):R(Z)}function G(Z){return Z===47?(t.consume(Z),r="",K):R(Z)}function K(Z){if(Z===62){const ae=r.toLowerCase();return gE.includes(ae)?(t.consume(Z),Q):R(Z)}return zi(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),K):R(Z)}function X(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||Et(Z)?(t.exit("htmlFlowData"),ne(Z)):(t.consume(Z),Q)}function ne(Z){return t.exit("htmlFlow"),e(Z)}}function k6e(t,e,n){const s=this;return i;function i(r){return Et(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 C6e(t,e,n){return s;function s(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(ev,e,n)}}const x6e={name:"htmlText",tokenize:S6e};function S6e(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),C):zi(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):zi(H)?(t.consume(H),k):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):Et(H)?(r=d,G(H)):(t.consume(H),d)}function h(H){return H===45?(t.consume(H),f):d(H)}function f(H){return H===62?z(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):Et(H)?(r=m,G(H)):(t.consume(H),m)}function b(H){return H===93?(t.consume(H),_):m(H)}function _(H){return H===62?z(H):H===93?(t.consume(H),_):m(H)}function k(H){return H===null||H===62?z(H):Et(H)?(r=k,G(H)):(t.consume(H),k)}function C(H){return H===null?n(H):H===63?(t.consume(H),x):Et(H)?(r=C,G(H)):(t.consume(H),C)}function x(H){return H===62?z(H):C(H)}function S(H){return zi(H)?(t.consume(H),M):n(H)}function M(H){return H===45||co(H)?(t.consume(H),M):P(H)}function P(H){return Et(H)?(r=P,G(H)):un(H)?(t.consume(H),P):z(H)}function T(H){return H===45||co(H)?(t.consume(H),T):H===47||H===62||jn(H)?I(H):n(H)}function I(H){return H===47?(t.consume(H),z):H===58||H===95||zi(H)?(t.consume(H),L):Et(H)?(r=I,G(H)):un(H)?(t.consume(H),I):z(H)}function L(H){return H===45||H===46||H===58||H===95||co(H)?(t.consume(H),L):V(H)}function V(H){return H===61?(t.consume(H),R):Et(H)?(r=V,G(H)):un(H)?(t.consume(H),V):I(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):Et(H)?(r=R,G(H)):un(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):Et(H)?(r=N,G(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||jn(H)?I(H):(t.consume(H),F)}function B(H){return H===47||H===62||jn(H)?I(H):n(H)}function z(H){return H===62?(t.consume(H),t.exit("htmlTextData"),t.exit("htmlText"),e):n(H)}function G(H){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),K}function K(H){return un(H)?yn(t,X,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):X(H)}function X(H){return t.enter("htmlTextData"),r(H)}}const U8={name:"labelEnd",tokenize:P6e,resolveTo:T6e,resolveAll:M6e},$6e={tokenize:I6e},A6e={tokenize:L6e},E6e={tokenize:O6e};function M6e(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 T6e(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=ir(a,t.slice(o+1,o+s+3)),a=ir(a,[["enter",u,e]]),a=ir(a,g2(e.parser.constructs.insideSpan.null,t.slice(o+s+4,r-3),e)),a=ir(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=ir(a,t.slice(r+1)),a=ir(a,[["exit",l,e]]),hr(t,o,t.length,a),t}function P6e(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(Nr(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($6e,u,r?u:d)(h):h===91?t.attempt(A6e,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(E6e,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function I6e(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 jn(d)?lg(t,o)(d):o(d)}function o(d){return d===41?u(d):wN(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return jn(d)?lg(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?CN(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return jn(d)?lg(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 L6e(t,e,n){const s=this;return i;function i(a){return kN.call(s,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return s.parser.defined.includes(Nr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function O6e(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 D6e={name:"labelStartImage",tokenize:R6e,resolveAll:U8.resolveAll};function R6e(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 V6e={name:"labelStartLink",tokenize:F6e,resolveAll:U8.resolveAll};function F6e(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 Jw={name:"lineEnding",tokenize:N6e};function N6e(t,e){return n;function n(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),yn(t,e,"linePrefix")}}const G0={name:"thematicBreak",tokenize:B6e};function B6e(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||Et(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),s++,l):(t.exit("thematicBreakSequence"),un(c)?yn(t,a,"whitespace")(c):a(c))}}const so={name:"list",tokenize:U6e,continuation:{tokenize:j6e},exit:Y6e},z6e={tokenize:q6e,partial:!0},H6e={tokenize:W6e,partial:!0};function U6e(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:BC(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(G0,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 BC(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(ev,s.interrupt?n:u,t.attempt(z6e,h,d))}function u(f){return s.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return un(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 j6e(t,e,n){const s=this;return s.containerState._closeFlow=void 0,t.check(ev,i,o);function i(a){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,yn(t,e,"listItemIndent",s.containerState.size+1)(a)}function o(a){return s.containerState.furtherBlankLines||!un(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(H6e,e,r)(a))}function r(a){return s.containerState._closeFlow=!0,s.interrupt=void 0,yn(t,t.attempt(so,e,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function W6e(t,e,n){const s=this;return yn(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 Y6e(t){t.exit(this.containerState.type)}function q6e(t,e,n){const s=this;return yn(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!un(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const vE={name:"setextUnderline",tokenize:X6e,resolveTo:G6e};function G6e(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 X6e(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"),un(c)?yn(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Et(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const K6e={tokenize:Z6e};function Z6e(t){const e=this,n=t.attempt(ev,s,t.attempt(this.parser.constructs.flowInitial,i,yn(t,t.attempt(this.parser.constructs.flow,i,t.attempt(n6e,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 J6e={resolveAll:SN()},Q6e=xN("string"),e4e=xN("text");function xN(t){return{tokenize:e,resolveAll:SN(t==="text"?t4e: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 SN(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 t4e(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 n4e(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:k,enter:C,exit:x,attempt:P(S),check:P(M),interrupt:P(M,{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=ir(r,V),b(),r[r.length-1]!==null?[]:(T(e,0),c.events=g2(o,c.events,c),c.events)}function h(V,R){return i4e(f(V),R)}function f(V){return s4e(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,L()}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 k(V){Et(V)?(s.line++,s.column=1,s.offset+=V===-3?2:1,L()):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 C(V,R){const N=R||{};return N.type=V,N.start=p(),c.events.push(["enter",N,c]),a.push(N),N}function x(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 M(V,R){R.restore()}function P(V,R){return N;function N(F,B,z){let G,K,X,H;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):Q(F);function Q(Ce){return oe;function oe(pe){const ie=pe!==null&&Ce[pe],re=pe!==null&&Ce.null,ke=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return ne(ke)(pe)}}function ne(Ce){return G=Ce,K=0,Ce.length===0?z:Z(Ce[K])}function Z(Ce){return oe;function oe(pe){return H=I(),X=Ce,Ce.partial||(c.currentConstruct=Ce),Ce.name&&c.parser.constructs.disable.null.includes(Ce.name)?ge():Ce.tokenize.call(R?Object.assign(Object.create(c),R):c,l,ae,ge)(pe)}}function ae(Ce){return V(X,H),B}function ge(Ce){return H.restore(),++K<G.length?Z(G[K]):z}}}function T(V,R){V.resolveAll&&!o.includes(V)&&o.push(V),V.resolve&&hr(c.events,R,c.events.length-R,V.resolve(c.events.slice(R),c)),V.resolveTo&&(c.events=V.resolveTo(c.events,c))}function I(){const V=p(),R=c.previous,N=c.currentConstruct,F=c.events.length,B=Array.from(a);return{restore:z,from:F};function z(){s=V,c.previous=R,c.currentConstruct=N,c.events.length=F,a=B,L()}}function L(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function s4e(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 i4e(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 o4e={42:so,43:so,45:so,48:so,49:so,50:so,51:so,52:so,53:so,54:so,55:so,56:so,57:so,62:vN},r4e={91:a6e},a4e={[-2]:Zw,[-1]:Zw,32:Zw},l4e={35:f6e,42:G0,45:[vE,G0],60:v6e,61:vE,95:G0,96:mE,126:mE},c4e={38:bN,92:yN},u4e={[-5]:Jw,[-4]:Jw,[-3]:Jw,33:D6e,38:bN,42:zC,60:[Vxe,x6e],91:V6e,92:[d6e,yN],93:U8,95:zC,96:Kxe},d4e={null:[zC,J6e]},h4e={null:[42,95]},f4e={null:[]},p4e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:h4e,contentInitial:r4e,disable:f4e,document:o4e,flow:l4e,flowInitial:a4e,insideSpan:d4e,string:c4e,text:u4e},Symbol.toStringTag,{value:"Module"}));function m4e(t){const n=mN([p4e,...(t||{}).extensions||[]]),s={defined:[],lazy:{},constructs:n,content:i(Txe),document:i(Ixe),flow:i(K6e),string:i(Q6e),text:i(e4e)};return s;function i(o){return r;function r(a){return n4e(s,o,a)}}}function g4e(t){for(;!_N(t););return t}const yE=/[\0\t\n\r]/g;function v4e(){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(yE.lastIndex=d,c=yE.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 y4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $N(t){return t.replace(y4e,b4e)}function b4e(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return gN(n.slice(o?2:1),o?16:10)}return H8(n)||t}function cg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?bE(t.position):"start"in t||"end"in t?bE(t):"line"in t||"column"in t?HC(t):""}function HC(t){return _E(t&&t.line)+":"+_E(t&&t.column)}function bE(t){return HC(t&&t.start)+"-"+HC(t&&t.end)}function _E(t){return t&&typeof t=="number"?t:1}const AN={}.hasOwnProperty;function _4e(t,e,n){return typeof e!="string"&&(n=e,e=void 0),w4e(n)(g4e(m4e(n).document().write(v4e()(t,e,!0))))}function w4e(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(je),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(me),blockQuote:o(re),characterEscape:I,characterReference:I,codeFenced:o(ke),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:o(ke,r),codeText:o(Ue,r),codeTextData:I,data:I,codeFlowValue:I,definition:o(ee),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:o(se),hardBreakEscape:o($e),hardBreakTrailing:o($e),htmlFlow:o(Se,r),htmlFlowData:I,htmlText:o(Se,r),htmlTextData:I,image:o(Ie),label:r,link:o(je),listItem:o(ze),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(Ae),reference:Z,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(me),strong:o(Ze),thematicBreak:o(it)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ie,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Ce,characterReference:oe,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(_),codeText:l(B),codeTextData:L,data:L,definition:l(),definitionDestinationString:x,definitionLabelString:k,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(N),htmlFlowData:L,htmlText:l(F),htmlTextData:L,image:l(G),label:X,labelText:K,lineEnding:V,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:H,resourceTitleString:Q,resource:ne,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:M,strong:l(),thematicBreak:l()}};EN(e,(t||{}).mdastExtensions||[]);const n={};return s;function s(be){let ve={type:"root",children:[]};const Te={stack:[ve],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},Pe=[];let gt=-1;for(;++gt<be.length;)if(be[gt][1].type==="listOrdered"||be[gt][1].type==="listUnordered")if(be[gt][0]==="enter")Pe.push(gt);else{const Lt=Pe.pop();gt=i(be,Lt,gt)}for(gt=-1;++gt<be.length;){const Lt=e[be[gt][0]];AN.call(Lt,be[gt][1].type)&&Lt[be[gt][1].type].call(Object.assign({sliceSerialize:be[gt][2].sliceSerialize},Te),be[gt][1])}if(Te.tokenStack.length>0){const Lt=Te.tokenStack[Te.tokenStack.length-1];(Lt[1]||wE).call(Te,void 0,Lt[0])}for(ve.position={start:zl(be.length>0?be[0][1].start:{line:1,column:1,offset:0}),end:zl(be.length>0?be[be.length-2][1].end:{line:1,column:1,offset:0})},gt=-1;++gt<e.transforms.length;)ve=e.transforms[gt](ve)||ve;return ve}function i(be,ve,Te){let Pe=ve-1,gt=-1,Lt=!1,Je,ut,ft,ye;for(;++Pe<=Te;){const Le=be[Pe];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?gt++:gt--,ye=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(Je&&!ye&&!gt&&!ft&&(ft=Pe),ye=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ye=void 0}if(!gt&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||gt===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(Je){let ce=Pe;for(ut=void 0;ce--;){const De=be[ce];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;ut&&(be[ut][1].type="lineEndingBlank",Lt=!0),De[1].type="lineEnding",ut=ce}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}ft&&(!ut||ft<ut)&&(Je._spread=!0),Je.end=Object.assign({},ut?be[ut][1].start:Le[1].end),be.splice(ut||Pe,0,["exit",Je,Le[2]]),Pe++,Te++}if(Le[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};Je=ce,be.splice(Pe,0,["enter",ce,Le[2]]),Pe++,Te++,ft=void 0,ye=!0}}}return be[ve][1]._spread=Lt,Te}function o(be,ve){return Te;function Te(Pe){a.call(this,be(Pe),Pe),ve&&ve.call(this,Pe)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(be,ve,Te){this.stack[this.stack.length-1].children.push(be),this.stack.push(be),this.tokenStack.push([ve,Te]),be.position={start:zl(ve.start),end:void 0}}function l(be){return ve;function ve(Te){be&&be.call(this,Te),c.call(this,Te)}}function c(be,ve){const Te=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==be.type&&(ve?ve.call(this,be,Pe[0]):(Pe[1]||wE).call(this,be,Pe[0]));else throw new Error("Cannot close `"+be.type+"` ("+cg({start:be.start,end:be.end})+"): it’s not open");Te.position.end=zl(be.end)}function u(){return z8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(be){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(be),10),this.data.expectingFirstListItemValue=void 0}}function f(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=be}function p(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=be}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be.replace(/(\r?\n|\r)$/g,"")}function k(be){const ve=this.resume(),Te=this.stack[this.stack.length-1];Te.label=ve,Te.identifier=Nr(this.sliceSerialize(be)).toLowerCase()}function C(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.title=be}function x(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.url=be}function S(be){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Te=this.sliceSerialize(be).length;ve.depth=Te}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P(be){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(be).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function I(be){const Te=this.stack[this.stack.length-1].children;let Pe=Te[Te.length-1];(!Pe||Pe.type!=="text")&&(Pe=We(),Pe.position={start:zl(be.start),end:void 0},Te.push(Pe)),this.stack.push(Pe)}function L(be){const ve=this.stack.pop();ve.value+=this.sliceSerialize(be),ve.position.end=zl(be.end)}function V(be){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=ve.children[ve.children.length-1];Te.position.end=zl(be.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ve.type)&&(I.call(this,be),L.call(this,be))}function R(){this.data.atHardBreak=!0}function N(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function F(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function B(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function z(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=ve,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function G(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=ve,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function K(be){const ve=this.sliceSerialize(be),Te=this.stack[this.stack.length-2];Te.label=$N(ve),Te.identifier=Nr(ve).toLowerCase()}function X(){const be=this.stack[this.stack.length-1],ve=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const Pe=be.children;Te.children=Pe}else Te.alt=ve}function H(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.url=be}function Q(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.title=be}function ne(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function ae(be){const ve=this.resume(),Te=this.stack[this.stack.length-1];Te.label=ve,Te.identifier=Nr(this.sliceSerialize(be)).toLowerCase(),this.data.referenceType="full"}function ge(be){this.data.characterReferenceType=be.type}function Ce(be){const ve=this.sliceSerialize(be),Te=this.data.characterReferenceType;let Pe;Te?(Pe=gN(ve,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=H8(ve);const gt=this.stack[this.stack.length-1];gt.value+=Pe}function oe(be){const ve=this.stack.pop();ve.position.end=zl(be.end)}function pe(be){L.call(this,be);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(be)}function ie(be){L.call(this,be);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(be)}function re(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Ie(){return{type:"image",title:null,url:"",alt:null}}function je(){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 Ae(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function We(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function zl(t){return{line:t.line,column:t.column,offset:t.offset}}function EN(t,e){let n=-1;for(;++n<e.length;){const s=e[n];Array.isArray(s)?EN(t,s):k4e(t,s)}}function k4e(t,e){let n;for(n in e)if(AN.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 wE(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+cg({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+cg({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+cg({start:e.start,end:e.end})+") is still open")}function UC(t){const e=this;e.parser=n;function n(s){return _4e(s,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const kE={}.hasOwnProperty;function C4e(t,e){const n=e||{};function s(i,...o){let r=s.invalid;const a=s.handlers;if(i&&kE.call(i,t)){const l=String(i[t]);r=kE.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 x4e={}.hasOwnProperty;function MN(t,e){let n=-1,s;if(e.extensions)for(;++n<e.extensions.length;)MN(t,e.extensions[n]);for(s in e)if(x4e.call(e,s))switch(s){case"extensions":break;case"unsafe":{CE(t[s],e[s]);break}case"join":{CE(t[s],e[s]);break}case"handlers":{S4e(t[s],e[s]);break}default:t.options[s]=e[s]}return t}function CE(t,e){e&&t.push(...e)}function S4e(t,e){e&&Object.assign(t,e)}function $4e(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()),A4e);return i(),r}function A4e(t,e,n){return">"+(n?"":" ")+t}function TN(t,e){return xE(t,e.inConstruct,!0)&&!xE(t,e.notInConstruct,!1)}function xE(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 SE(t,e,n,s){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` |
| 87 |
`&&TN(n.stack,n.unsafe[i]))return/[ \t]/.test(s.before)?"":" ";return`\\ |
| 88 |
`}function E4e(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 jC(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 M4e(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 T4e(t,e,n,s){const i=M4e(n),o=t.value||"",r=i==="`"?"GraveAccent":"Tilde";if(jC(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,P4e);return d(),h}const a=n.createTracker(s),l=i.repeat(Math.max(E4e(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 P4e(t,e,n){return(n?"":" ")+t}function j8(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 I4e(t,e,n,s){const i=j8(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 L4e(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}PN.peek=O4e;function PN(t,e,n,s){const i=L4e(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 O4e(t,e,n){return n.options.emphasis||"*"}const v2=function(t){if(t==null)return F4e;if(typeof t=="function")return y2(t);if(typeof t=="object")return Array.isArray(t)?D4e(t):R4e(t);if(typeof t=="string")return V4e(t);throw new Error("Expected function, string, or object as test")};function D4e(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=v2(t[n]);return y2(s);function s(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function R4e(t){const e=t;return y2(n);function n(s){const i=s;let o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function V4e(t){return y2(e);function e(n){return n&&n.type===t}}function y2(t){return e;function e(n,s,i){return!!(N4e(n)&&t.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function F4e(){return!0}function N4e(t){return t!==null&&typeof t=="object"&&"type"in t}const IN=[],B4e=!0,WC=!1,YC="skip";function LN(t,e,n,s){let i;typeof e=="function"&&typeof n!="function"?(s=n,n=e):i=e;const o=v2(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=IN,p,m,b;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=z4e(n(l,u)),f[0]===WC))return f;if("children"in l&&l.children){const _=l;if(_.children&&f[0]!==YC)for(m=(s?_.children.length:-1)+r,b=u.concat(_);m>-1&&m<_.children.length;){const k=_.children[m];if(p=a(k,m,b)(),p[0]===WC)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function z4e(t){return Array.isArray(t)?t:typeof t=="number"?[B4e,t]:t==null?IN:[t]}function Yd(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),LN(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 ON(t,e){let n=!1;return Yd(t,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,WC}),!!((!t.depth||t.depth<3)&&z8(t)&&(e.options.setext||n))}function H4e(t,e,n,s){const i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(s);if(ON(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}DN.peek=U4e;function DN(t){return t.value||""}function U4e(){return"<"}RN.peek=j4e;function RN(t,e,n,s){const i=j8(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 j4e(){return"!"}VN.peek=W4e;function VN(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 W4e(){return"!"}FN.peek=Y4e;function FN(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 Y4e(){return"`"}function NN(t,e){const n=z8(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))}BN.peek=q4e;function BN(t,e,n,s){const i=j8(n),o=i==='"'?"Quote":"Apostrophe",r=n.createTracker(s);let a,l;if(NN(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 q4e(t,e,n){return NN(t,n)?"<":"["}zN.peek=G4e;function zN(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 G4e(){return"["}function W8(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 X4e(t){const e=W8(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 K4e(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 HN(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 Z4e(t,e,n,s){const i=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?K4e(n):W8(n);const a=t.ordered?r==="."?")":".":X4e(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),HN(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 J4e(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 Q4e(t,e,n,s){const i=J4e(n);let o=n.bulletCurrent||W8(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 e8e(t,e,n,s){const i=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,s);return o(),i(),r}const t8e=v2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n8e(t,e,n,s){return(t.children.some(function(r){return t8e(r)})?n.containerPhrasing:n.containerFlow).call(n,t,s)}function s8e(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}UN.peek=i8e;function UN(t,e,n,s){const i=s8e(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 i8e(t,e,n){return n.options.strong||"*"}function o8e(t,e,n,s){return n.safe(t.value,s)}function r8e(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 a8e(t,e,n){const s=(HN(n)+(n.options.ruleSpaces?" ":"")).repeat(r8e(n));return n.options.ruleSpaces?s.slice(0,-1):s}const Y8={blockquote:$4e,break:SE,code:T4e,definition:I4e,emphasis:PN,hardBreak:SE,heading:H4e,html:DN,image:RN,imageReference:VN,inlineCode:FN,link:BN,linkReference:zN,list:Z4e,listItem:Q4e,paragraph:e8e,root:n8e,strong:UN,text:o8e,thematicBreak:a8e},l8e=[c8e];function c8e(t,e,n,s){if(e.type==="code"&&jC(e,s)&&(t.type==="list"||t.type===e.type&&jC(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"&&ON(e,s))?void 0:n.spread?1:0}const fu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],u8e=[{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:fu},{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:fu},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r |
| 100 |
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:fu},{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:fu},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:fu},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:fu},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:fu},{atBreak:!0,character:"~"}];function d8e(t){return t.label||!t.identifier?t.label||"":$N(t.identifier)}function h8e(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 f8e(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 p8e(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(m8e(l,i[a+1],t,e)))}return s.pop(),r.join("")}function m8e(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 g8e=/\r?\n|\r/g;function v8e(t,e){const n=[];let s=0,i=0,o;for(;o=g8e.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 y8e(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(!TN(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(b8e);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 b8e(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 _8e(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 w8e(t,e={}){const n={enter:i,indentLines:v8e,associationId:d8e,containerPhrasing:S8e,containerFlow:$8e,createTracker:_8e,compilePattern:h8e,safe:A8e,stack:[],unsafe:[...u8e],join:[...l8e],handlers:{...Y8},options:{},indexStack:[],handle:void 0};MN(n,e),n.options.tightDefinitions&&n.join.push(x8e),n.handle=C4e("type",{invalid:k8e,unknown:C8e,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 k8e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function C8e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function x8e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function S8e(t,e){return f8e(t,this,e)}function $8e(t,e){return p8e(t,this,e)}function A8e(t,e){return y8e(this,t,e)}function qC(t){const e=this;e.compiler=n;function n(s){return w8e(s,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function AE(t){if(t)throw t}var X0=Object.prototype.hasOwnProperty,jN=Object.prototype.toString,EE=Object.defineProperty,ME=Object.getOwnPropertyDescriptor,TE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):jN.call(e)==="[object Array]"},PE=function(e){if(!e||jN.call(e)!=="[object Object]")return!1;var n=X0.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&X0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!s)return!1;var i;for(i in e);return typeof i>"u"||X0.call(e,i)},IE=function(e,n){EE&&n.name==="__proto__"?EE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},LE=function(e,n){if(n==="__proto__")if(X0.call(e,n)){if(ME)return ME(e,n).value}else return;return e[n]},E8e=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=LE(a,n),i=LE(e,n),a!==i&&(u&&i&&(PE(i)||(o=TE(i)))?(o?(o=!1,r=s&&TE(s)?s:[]):r=s&&PE(s)?s:{},IE(a,{name:n,newValue:t(u,r,i)})):typeof i<"u"&&IE(a,{name:n,newValue:i}));return a};const Qw=pi(E8e);function GC(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 M8e(){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?T8e(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 T8e(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 _o 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=cg(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}}_o.prototype.file="";_o.prototype.name="";_o.prototype.reason="";_o.prototype.message="";_o.prototype.stack="";_o.prototype.column=void 0;_o.prototype.line=void 0;_o.prototype.ancestors=void 0;_o.prototype.cause=void 0;_o.prototype.fatal=void 0;_o.prototype.place=void 0;_o.prototype.ruleId=void 0;_o.prototype.source=void 0;const fa={basename:P8e,dirname:I8e,extname:L8e,join:O8e,sep:"/"};function P8e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');tv(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 I8e(t){if(tv(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 L8e(t){tv(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 O8e(...t){let e=-1,n;for(;++e<t.length;)tv(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":D8e(n)}function D8e(t){tv(t);const e=t.codePointAt(0)===47;let n=R8e(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function R8e(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 tv(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const V8e={cwd:F8e};function F8e(){return"/"}function XC(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function N8e(t){if(typeof t=="string")t=new URL(t);else if(!XC(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 B8e(t)}function B8e(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 e3=["history","path","basename","stem","extname","dirname"];class z8e{constructor(e){let n;e?XC(e)?n={path:e}:typeof e=="string"||H8e(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":V8e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<e3.length;){const o=e3[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)e3.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?fa.basename(this.path):void 0}set basename(e){n3(e,"basename"),t3(e,"basename"),this.path=fa.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?fa.dirname(this.path):void 0}set dirname(e){OE(this.basename,"dirname"),this.path=fa.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?fa.extname(this.path):void 0}set extname(e){if(t3(e,"extname"),OE(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=fa.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){XC(e)&&(e=N8e(e)),n3(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?fa.basename(this.path,this.extname):void 0}set stem(e){n3(e,"stem"),t3(e,"stem"),this.path=fa.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 _o(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 t3(t,e){if(t&&t.includes(fa.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+fa.sep+"`")}function n3(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function OE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function H8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const U8e=function(t){const s=this.constructor.prototype,i=s[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,s),o},j8e={}.hasOwnProperty;class q8 extends U8e{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=M8e()}copy(){const e=new q8;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];e.use(...s)}return e.data(Qw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(o3("data",this.frozen),this.namespace[e]=n,this):j8e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(o3("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=c0(e),s=this.parser||this.Parser;return s3("parse",s),s(String(n),n)}process(e,n){const s=this;return this.freeze(),s3("process",this.parser||this.Parser),i3("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,r){const a=c0(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);Y8e(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(),s3("processSync",this.parser||this.Parser),i3("processSync",this.compiler||this.Compiler),this.process(e,i),RE("processSync","process",n),s;function i(o,r){n=!0,AE(o),s=r}}run(e,n,s){DE(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=c0(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),RE("runSync","run",s),i;function o(r,a){AE(r),i=a,s=!0}}stringify(e,n){this.freeze();const s=c0(n),i=this.compiler||this.Compiler;return i3("stringify",i),DE(e),i(e,s)}use(e,...n){const s=this.attachers,i=this.namespace;if(o3("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=Qw(!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];GC(m)&&GC(f)&&(f=Qw(!0,m,f)),s[h]=[c,f,...p]}}}}const KC=new q8().freeze();function s3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function i3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function o3(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 DE(t){if(!GC(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function RE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function c0(t){return W8e(t)?t:new z8e(t)}function W8e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Y8e(t){return typeof t=="string"||q8e(t)}function q8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var WN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},on=(t,e,n)=>(WN(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)=>(WN(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let YN=class{},qN=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 WF();return e}}},G8e=class GN extends YN{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 GN(e,n,s)}};var la,hm,K0,Z0,J0,fm,pm;const ZC=class extends qN{constructor(e){super(),Ss(this,la,void 0),Ss(this,hm,void 0),Ss(this,K0,void 0),Ss(this,Z0,void 0),Ss(this,J0,void 0),Ss(this,fm,void 0),Ss(this,pm,void 0),ns(this,la,En.none),ns(this,hm,n=>n.isText),ns(this,K0,(n,s)=>{if(on(this,hm).call(this,n)&&on(this,hm).call(this,s)&&En.sameSet(n.marks,s.marks))return this.schema.text(n.text+s.text,n.marks)}),ns(this,Z0,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!s)throw BCe(n);return s}),ns(this,J0,n=>{const s=on(this,Z0).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(G8e.create(n,[],s)),this),ns(this,fm,()=>{ns(this,la,En.none);const n=this.close();return on(this,pm).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(on(this,fm).call(this),this),ns(this,pm,(n,s,i)=>{const o=n.createAndFill(s,i,on(this,la));if(!o)throw NCe(n,s,i);return this.push(o),o}),this.addNode=(n,s,i)=>(on(this,pm).call(this,n,s,i),this),this.openMark=(n,s)=>{const i=n.create(s);return ns(this,la,i.addToSet(on(this,la))),this},this.closeMark=n=>(ns(this,la,n.removeFromSet(on(this,la))),this),this.addText=n=>{const s=this.top();if(!s)throw WF();const i=s.pop(),o=this.schema.text(n,on(this,la));if(!i)return s.push(o),this;const r=on(this,K0).call(this,i,o);return r?(s.push(r),this):(s.push(i,o),this)},this.build=()=>{let n;do n=on(this,fm).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(s=>on(this,J0).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}};la=new WeakMap,hm=new WeakMap,K0=new WeakMap,Z0=new WeakMap,J0=new WeakMap,fm=new WeakMap,pm=new WeakMap,ZC.create=(t,e)=>{const n=new ZC(t);return s=>(n.run(e,s),n.toDoc())};let X8e=ZC;const JC=class extends YN{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()}}};JC.create=(t,e,n,s={})=>new JC(t,e,n,s);let VE=JC;const K8e=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ya,mm,Q0,ey,gm,ty,vm,ny,sy,Ph,ku,iy,ym;const QC=class extends qN{constructor(e){super(),Ss(this,Ya,void 0),Ss(this,mm,void 0),Ss(this,Q0,void 0),Ss(this,ey,void 0),Ss(this,gm,void 0),Ss(this,ty,void 0),Ss(this,vm,void 0),Ss(this,ny,void 0),Ss(this,sy,void 0),Ss(this,Ph,void 0),Ss(this,ku,void 0),Ss(this,iy,void 0),Ss(this,ym,void 0),ns(this,Ya,En.none),ns(this,mm,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!s)throw zCe(n.type);return s}),ns(this,Q0,n=>on(this,mm).call(this,n).spec.toMarkdown.runner(this,n)),ns(this,ey,(n,s)=>on(this,mm).call(this,n).spec.toMarkdown.runner(this,n,s)),ns(this,gm,n=>{const{marks:s}=n,i=o=>o.type.spec.priority??50;[...s].sort((o,r)=>i(o)-i(r)).every(o=>!on(this,ey).call(this,o,n))&&on(this,Q0).call(this,n),s.forEach(o=>on(this,ym).call(this,o))}),ns(this,ty,(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,vm,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=on(this,ty).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(on(this,vm).call(this,h))}}return i.concat(o)},[])),n}),ns(this,ny,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(VE.create(n,void 0,s,i)),this),ns(this,sy,(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&&on(this,ku).call(this,"text",void 0,i);const u=s();return o.length&&on(this,ku).call(this,"text",void 0,o),u}),ns(this,Ph,(n=!1)=>{const s=this.close(),i=()=>on(this,ku).call(this,s.type,s.children,s.value,s.props);return n?on(this,sy).call(this,s,i):i()}),this.closeNode=()=>(on(this,Ph).call(this),this),ns(this,ku,(n,s,i,o)=>{const r=VE.create(n,s,i,o),a=on(this,vm).call(this,on(this,ny).call(this,r));return this.push(a),a}),this.addNode=(n,s,i,o)=>(on(this,ku).call(this,n,s,i,o),this),ns(this,iy,(n,s,i,o)=>n.isInSet(on(this,Ya))?this:(ns(this,Ya,n.addToSet(on(this,Ya))),this.openNode(s,i,{...o,isMark:!0}))),ns(this,ym,n=>{n.isInSet(on(this,Ya))&&(ns(this,Ya,n.type.removeFromSet(on(this,Ya))),on(this,Ph).call(this,!0))}),this.withMark=(n,s,i,o)=>(on(this,iy).call(this,n,s,i,o),this),this.closeMark=n=>(on(this,ym).call(this,n),this),this.build=()=>{let n=null;do n=on(this,Ph).call(this);while(this.size());return n},this.next=n=>K8e(n)?(n.forEach(s=>{on(this,gm).call(this,s)}),this):(on(this,gm).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ya=new WeakMap,mm=new WeakMap,Q0=new WeakMap,ey=new WeakMap,gm=new WeakMap,ty=new WeakMap,vm=new WeakMap,ny=new WeakMap,sy=new WeakMap,Ph=new WeakMap,ku=new WeakMap,iy=new WeakMap,ym=new WeakMap,QC.create=(t,e)=>{const n=new QC(t);return s=>(n.run(s),n.toString(e))};let Z8e=QC;const XN=65535,KN=Math.pow(2,16);function J8e(t,e){return t+e*KN}function FE(t){return t&XN}function Q8e(t){return(t-(t&XN))/KN}const ZN=1,JN=2,oy=4,QN=8;class ex{constructor(e,n,s){this.pos=e,this.delInfo=n,this.recover=s}get deleted(){return(this.delInfo&QN)>0}get deletedBefore(){return(this.delInfo&(ZN|oy))>0}get deletedAfter(){return(this.delInfo&(JN|oy))>0}get deletedAcross(){return(this.delInfo&oy)>0}}class Mo{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Mo.empty)return Mo.empty}recover(e){let n=0,s=FE(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+Q8e(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:J8e(a/3,e-l),m=e==l?JN:e==d?ZN:oy;return(n<0?e!=l:e!=d)&&(m|=QN),new ex(f,m,p)}i+=u-c}return s?e+i:new ex(e+i,0,null)}touches(e,n){let s=0,i=FE(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 Mo(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Mo.empty:new Mo(e<0?[0,-e,0]:[0,0,e])}}Mo.empty=new Mo([]);class uf{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 uf(this.maps,this.mirror,e,n)}copy(){return new uf(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 uf;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 ex(e,i,null)}}const r3=Object.create(null);class Ii{getMap(){return Mo.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let s=r3[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 r3)throw new RangeError("Duplicate use of step JSON ID "+e);return r3[e]=n,n.prototype.jsonID=e,n}}class Ts{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ts(e,null)}static fail(e){return new Ts(null,e)}static fromReplace(e,n,s,i){try{return Ts.ok(e.replace(n,s,i))}catch(o){if(o instanceof Ob)return Ts.fail(o.message);throw o}}}function G8(t,e,n){let s=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(G8(o.content,e,o))),o.isInline&&(o=e(o,n,i)),s.push(o)}return st.fromArray(s)}class ol extends Ii{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 rt(G8(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 Ts.fromReplace(e,this.from,this.to,o)}invert(){return new ya(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 ol(n.pos,s.pos,this.mark)}merge(e){return e instanceof ol&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ol(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 ol(n.from,n.to,e.markFromJSON(n.mark))}}Ii.jsonID("addMark",ol);class ya extends Ii{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 rt(G8(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ts.fromReplace(e,this.from,this.to,s)}invert(){return new ol(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 ya(n.pos,s.pos,this.mark)}merge(e){return e instanceof ya&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ya(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 ya(n.from,n.to,e.markFromJSON(n.mark))}}Ii.jsonID("removeMark",ya);class kc extends Ii{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ts.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ts.fromReplace(e,this.pos,this.pos+1,new rt(st.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 kc(this.pos,n.marks[i]);return new kc(this.pos,this.mark)}}return new Kf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new kc(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 kc(n.pos,e.markFromJSON(n.mark))}}Ii.jsonID("addNodeMark",kc);class Kf extends Ii{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ts.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ts.fromReplace(e,this.pos,this.pos+1,new rt(st.from(s),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new kc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Kf(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 Kf(n.pos,e.markFromJSON(n.mark))}}Ii.jsonID("removeNodeMark",Kf);class Qs extends Ii{constructor(e,n,s,i=!1){super(),this.from=e,this.to=n,this.slice=s,this.structure=i}apply(e){return this.structure&&tx(e,this.from,this.to)?Ts.fail("Structure replace would overwrite content"):Ts.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Mo([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qs(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 Qs(n.pos,Math.max(n.pos,s.pos),this.slice)}merge(e){if(!(e instanceof Qs)||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?rt.empty:new rt(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qs(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?rt.empty:new rt(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qs(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 Qs(n.from,n.to,rt.fromJSON(e,n.slice),!!n.structure)}}Ii.jsonID("replace",Qs);class Ei extends Ii{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&&(tx(e,this.from,this.gapFrom)||tx(e,this.gapTo,this.to)))return Ts.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ts.fail("Gap is not a flat range");let s=this.slice.insertAt(this.insert,n.content);return s?Ts.fromReplace(e,this.from,this.to,s):Ts.fail("Content does not fit in gap")}getMap(){return new Mo([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 Ei(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 Ei(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 Ei(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ii.jsonID("replaceAround",Ei);function tx(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 e5e(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 ya(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new ol(h,f,s))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function t5e(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 f2){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 ya(r.from,r.to,r.style)))}function eB(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 Qs(a,u,rt.empty));else{s=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new ya(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 rt(st.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new Qs(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!s.validEnd){let l=s.fillBefore(st.empty,!0);t.replace(a,a,new rt(l,0,0))}for(let l=r.length-1;l>=0;l--)t.step(r[l])}function n5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function b2(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||!n5e(i,o,r))break}return null}function s5e(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=st.empty,d=0;for(let p=o,m=!1;p>n;p--)m||s.index(p)>0?(m=!0,u=st.from(s.node(p).copy(u)),d++):l--;let h=st.empty,f=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,h=st.from(i.node(p).copy(h)),f++):c++;t.step(new Ei(l,c,r,a,new rt(u.append(h),d,f),u.size-d,!0))}function X8(t,e,n=null,s=t){let i=i5e(t,e),o=i&&o5e(s,e);return o?i.map(NE).concat({type:e,attrs:n}).concat(o.map(NE)):null}function NE(t){return{type:t,attrs:null}}function i5e(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 o5e(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 r5e(t,e,n){let s=st.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=st.from(n[r].type.create(n[r].attrs,s))}let i=e.start,o=e.end;t.step(new Ei(i,o,i,o,new rt(s,0,0),n.length,!0))}function a5e(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)&&u5e(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&&c5e(t,r,a,o),eB(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 Ei(d,h,d+1,h-1,new rt(st.from(s.create(l,null,r.marks)),0,0),1,!0)),c===!0&&l5e(t,r,a,o),!1}})}function l5e(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 c5e(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 u5e(t,e,n){let s=t.resolve(e),i=s.index();return s.parent.canReplaceWith(i,i+1,n)}function d5e(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 Ei(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new rt(st.from(r),0,0),1,!0))}function ug(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 h5e(t,e,n=1,s){let i=t.doc.resolve(e),o=st.empty,r=st.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=st.from(i.node(a).copy(o));let u=s&&s[c];r=st.from(u?u.type.create(u.attrs,r):i.node(a).copy(r))}t.step(new Qs(e,e,new rt(o.append(r),n,n),!0))}function _2(t,e){let n=t.resolve(e),s=n.index();return f5e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(s,s+1)}function f5e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function p5e(t,e,n){let s=new Qs(e-n,e+n,rt.empty,!0);t.step(s)}function m5e(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 g5e(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 K8(t,e,n=e,s=rt.empty){if(e==n&&!s.size)return null;let i=t.resolve(e),o=t.resolve(n);return tB(i,o,s)?new Qs(e,n,s):new v5e(i,o,s).fit()}function tB(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class v5e{constructor(e,n,s){this.$from=e,this.$to=n,this.unplaced=s,this.frontier=[],this.placed=st.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=st.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 rt(o,r,a);return e>-1?new Ei(s.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||s.pos!=this.$to.pos?new Qs(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=a3(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(st.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=a3(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new rt(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=a3(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new rt(bm(e,n-1,1),n-1,o?n-1:s)}else this.unplaced=new rt(bm(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(nB(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=_m(this.placed,n,st.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?rt.empty:new rt(bm(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new rt(bm(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||!l3(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=l3(e,n,i,s,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=l3(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=_m(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=_m(this.placed,this.depth,st.from(e.create(n,s))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(st.empty,!0);n.childCount&&(this.placed=_m(this.placed,this.frontier.length,n))}}function bm(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(bm(t.firstChild.content,e-1,n)))}function _m(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(_m(t.lastChild.content,e-1,n)))}function a3(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function nB(t,e,n){if(e<=0)return t;let s=t.content;return e>1&&(s=s.replaceChild(0,nB(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(st.empty,!0)))),t.copy(s)}function l3(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&&!y5e(n,o.content,r)?a:null}function y5e(t,e,n){for(let s=n;s<e.childCount;s++)if(!t.allowsMarks(e.child(s).marks))return!0;return!1}function b5e(t){return t.spec.defining||t.spec.definingForContent}function _5e(t,e,n,s){if(!s.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(tB(i,o,s))return t.step(new Qs(e,n,s));let r=iB(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=b5e(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 k=i.node(b-1),C=i.index(b-1);if(k.canReplaceWith(C,C,p.type,p.marks))return t.replace(i.before(b),_?o.after(b):n,new rt(sB(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 sB(t,e,n,s,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(sB(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(st.empty,!0))}return t}function w5e(t,e,n,s){if(!s.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=m5e(t.doc,e,s.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new rt(st.from(s),0,0))}function k5e(t,e,n){let s=t.doc.resolve(e),i=t.doc.resolve(n),o=iB(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 iB(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 df extends Ii{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 Ts.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 Ts.fromReplace(e,this.pos,this.pos+1,new rt(st.from(i),0,n.isLeaf?0:1))}getMap(){return Mo.empty}invert(e){return new df(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 df(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 df(n.pos,n.attr,n.value)}}Ii.jsonID("attr",df);class l1 extends Ii{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 Ts.ok(s)}getMap(){return Mo.empty}invert(e){return new l1(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 l1(n.attr,n.value)}}Ii.jsonID("docAttr",l1);let Zf=class extends Error{};Zf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Zf.prototype=Object.create(Error.prototype);Zf.prototype.constructor=Zf;Zf.prototype.name="TransformError";class oB{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new uf}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Zf(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=rt.empty){let i=K8(this.doc,e,n,s);return i&&this.step(i),this}replaceWith(e,n,s){return this.replace(e,n,new rt(st.from(s),0,0))}delete(e,n){return this.replace(e,n,rt.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,s){return _5e(this,e,n,s),this}replaceRangeWith(e,n,s){return w5e(this,e,n,s),this}deleteRange(e,n){return k5e(this,e,n),this}lift(e,n){return s5e(this,e,n),this}join(e,n=1){return p5e(this,e,n),this}wrap(e,n){return r5e(this,e,n),this}setBlockType(e,n=e,s,i=null){return a5e(this,e,n,s,i),this}setNodeMarkup(e,n,s=null,i){return d5e(this,e,n,s,i),this}setNodeAttribute(e,n,s){return this.step(new df(e,n,s)),this}setDocAttribute(e,n){return this.step(new l1(e,n)),this}addNodeMark(e,n){return this.step(new kc(e,n)),this}removeNodeMark(e,n){if(!(n instanceof En)){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 Kf(e,n)),this}split(e,n=1,s){return h5e(this,e,n,s),this}addMark(e,n,s){return e5e(this,e,n,s),this}removeMark(e,n,s){return t5e(this,e,n,s),this}clearIncompatible(e,n,s){return eB(this,e,n,s),this}}const c3=Object.create(null);class zt{constructor(e,n,s){this.$anchor=e,this.$head=n,this.ranges=s||[new Hb(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=rt.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?rt.empty:n),a==0&&HE(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),HE(e,s,n.isInline?-1:1))}}static findFrom(e,n,s=!1){let i=e.parent.inlineContent?new Ot(e):Ih(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?Ih(e.node(0),e.node(o),e.before(o+1),e.index(o),n,s):Ih(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 Fo(e.node(0))}static atStart(e){return Ih(e,e,0,0,1)||new Fo(e)}static atEnd(e){return Ih(e,e,e.content.size,e.childCount,-1)||new Fo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let s=c3[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 c3)throw new RangeError("Duplicate use of selection JSON ID "+e);return c3[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}}zt.prototype.visible=!0;class Hb{constructor(e,n){this.$from=e,this.$to=n}}let BE=!1;function zE(t){!BE&&!t.parent.inlineContent&&(BE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ot extends zt{constructor(e,n=e){zE(e),zE(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 Ot(i.parent.inlineContent?i:s,s)}replace(e,n=rt.empty){if(super.replace(e,n),n==rt.empty){let s=this.$from.marksAcross(this.$to);s&&e.ensureMarks(s)}}eq(e){return e instanceof Ot&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new w2(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 Ot(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 Ot(e,n)}}zt.jsonID("text",Ot);class w2{constructor(e,n){this.anchor=e,this.head=n}map(e){return new w2(e.map(this.anchor),e.map(this.head))}resolve(e){return Ot.between(e.resolve(this.anchor),e.resolve(this.head))}}class Rt 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 Rt(o)}content(){return new rt(st.from(this.node),0,0)}eq(e){return e instanceof Rt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Z8(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Rt(e.resolve(n.anchor))}static create(e,n){return new Rt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Rt.prototype.visible=!1;zt.jsonID("node",Rt);class Z8{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:s}=e.mapResult(this.anchor);return n?new w2(s,s):new Z8(s)}resolve(e){let n=e.resolve(this.anchor),s=n.nodeAfter;return s&&Rt.isSelectable(s)?new Rt(n):zt.near(n)}}class Fo extends zt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=rt.empty){if(n==rt.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 Fo(e)}map(e){return new Fo(e)}eq(e){return e instanceof Fo}getBookmark(){return C5e}}zt.jsonID("all",Fo);const C5e={map(){return this},resolve(t){return new Fo(t)}};function Ih(t,e,n,s,i,o=!1){if(e.inlineContent)return Ot.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&&Rt.isSelectable(a))return Rt.create(t,n-(i<0?a.nodeSize:0))}else{let l=Ih(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function HE(t,e,n){let s=t.steps.length-1;if(s<e)return;let i=t.steps[s];if(!(i instanceof Qs||i instanceof Ei))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 UE=1,u0=2,jE=4;class x5e extends oB{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|UE)&~u0,this.storedMarks=null,this}get selectionSet(){return(this.updated&UE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=u0,this}ensureMarks(e){return En.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&u0)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~u0,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)||En.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|=jE,this}get scrolledIntoView(){return(this.updated&jE)>0}}function WE(t,e){return!e||!t?t:t.bind(e)}class wm{constructor(e,n,s){this.name=e,this.init=WE(n.init,s),this.apply=WE(n.apply,s)}}const S5e=[new wm("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new wm("selection",{init(t,e){return t.selection||zt.atStart(e.doc)},apply(t){return t.selection}}),new wm("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,s){return s.selection.$cursor?t.storedMarks:null}}),new wm("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class u3{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=S5e.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 wm(s.key,s.spec.state,s))})}}class Fu{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 Fu(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 x5e(this)}static create(e){let n=new u3(e.doc?e.doc.type.schema:e.schema,e.plugins),s=new Fu(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 u3(this.schema,e.plugins),s=n.fields,i=new Fu(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 u3(e.schema,e.plugins),o=new Fu(i);return i.fields.forEach(r=>{if(r.name=="doc")o.doc=Ec.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 rB(t,e,n){for(let s in t){let i=t[s];i instanceof Function?i=i.bind(e):s=="handleDOMEvents"&&(i=rB(i,e,{})),n[s]=i}return n}class rs{constructor(e){this.spec=e,this.props={},e.props&&rB(e.props,this,this.props),this.key=e.key?e.key.key:aB("plugin")}getState(e){return e[this.key]}}const d3=Object.create(null);function aB(t){return t in d3?t+"$"+ ++d3[t]:(d3[t]=0,t+"$")}class ps{constructor(e="key"){this.key=aB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class Yo{constructor(e,n,s={}){this.match=e,this.match=e,this.handler=typeof n=="string"?$5e(n):n,this.undoable=s.undoable!==!1,this.inCode=s.inCode||!1}}function $5e(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 A5e=(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 Yo(/--$/,"—");new Yo(/\.\.\.$/,"…");new Yo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Yo(/"$/,"”");new Yo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Yo(/'$/,"’");function J8(t,e,n=null,s){return new Yo(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&&X8(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&_2(c.doc,r-1)&&(!s||s(o,f))&&c.join(r-1),c})}function lB(t,e,n=null){return new Yo(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 zc=typeof navigator<"u"?navigator:null,YE=typeof document<"u"?document:null,nu=zc&&zc.userAgent||"",nx=/Edge\/(\d+)/.exec(nu),cB=/MSIE \d/.exec(nu),sx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nu),k2=!!(cB||sx||nx),E5e=cB?document.documentMode:sx?+sx[1]:nx?+nx[1]:0,uB=!k2&&/gecko\/(\d+)/i.test(nu),M5e=uB&&+(/Firefox\/(\d+)/.exec(nu)||[0,0])[1],ix=!k2&&/Chrome\/(\d+)/.exec(nu),T5e=!!ix,P5e=ix?+ix[1]:0,dB=!k2&&!!zc&&/Apple Computer/.test(zc.vendor),hB=dB&&(/Mobile\/\w+/.test(nu)||!!zc&&zc.maxTouchPoints>2),I5e=hB||(zc?/Mac/.test(zc.platform):!1),L5e=/Android \d/.test(nu),fB=!!YE&&"webkitFontSmoothing"in YE.documentElement.style,O5e=fB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var d0=Object.freeze({__proto__:null,android:L5e,chrome:T5e,chrome_version:P5e,gecko:uB,gecko_version:M5e,ie:k2,ie_version:E5e,ios:hB,mac:I5e,safari:dB,webkit:fB,webkit_version:O5e});function h3(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 D5e=new ps("MILKDOWN_CUSTOM_INPUTRULES");function R5e({rules:t}){const e=new rs({key:D5e,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 h3(n,s,i,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:s}=n.state.selection;s&&h3(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?h3(n,i.pos,i.pos,` |
| 118 |
`,t,e):!1}}});return e}function nv(t,e,n={}){return new Yo(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},k=(a=n.updateCaptured)==null?void 0:a.call(n,_);if(Object.assign(_,k),{group:f,fullMatch:p,start:o,end:r}=_,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const C=p.search(/\S/),x=o+p.indexOf(f),S=x+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,r),x>o&&d.delete(o+C,x),b=o+C+f.length;const M=(c=n.getAttr)==null?void 0:c.call(n,i);d.addMark(o,b,e.create(M)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:i,start:o,end:r,tr:d})}return d})}var V5e=Object.defineProperty,F5e=Object.defineProperties,N5e=Object.getOwnPropertyDescriptors,qE=Object.getOwnPropertySymbols,B5e=Object.prototype.hasOwnProperty,z5e=Object.prototype.propertyIsEnumerable,GE=(t,e,n)=>e in t?V5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,H5e=(t,e)=>{for(var n in e||(e={}))B5e.call(e,n)&&GE(t,n,e[n]);if(qE)for(var n of qE(e))z5e.call(e,n)&&GE(t,n,e[n]);return t},U5e=(t,e)=>F5e(t,N5e(e));function XE(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function C2(t,e,n){const i=t.state.doc.content.size,o=XE(e,0,i),r=XE(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 U5e(H5e({},_),{toJSON:()=>_})}function x2(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function j5e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function Q8(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 W5e(t,e){return Q8(n=>n.type===e)(t)}function Y5e(t,e){const n=e.nodes[t];if(!n)throw HCe("node",t);return n}function e5(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 q5e(t){return e=>e5(t)(e.$from)}function G5e(t,e){if(!(t instanceof Rt))return;const{node:n,$from:s}=t;if(j5e(e,n))return{node:n,pos:s.pos,start:s.start(s.depth),depth:s.depth}}const t5=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function X5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const pB=(t,e,n)=>{let s=X5e(t,n);if(!s)return!1;let i=gB(s);if(!i){let r=s.blockRange(),a=r&&b2(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(yB(t,i,e,-1))return!0;if(s.parent.content.size==0&&(Jf(o,"end")||Rt.isSelectable(o)))for(let r=s.depth;;r--){let a=K8(t.doc,s.before(r),s.after(r),rt.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Jf(o,"end")?zt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Rt.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 Jf(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 mB=(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=gB(s)}let r=o&&o.nodeBefore;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos-r.nodeSize)).scrollIntoView()),!0)};function gB(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 K5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Z5e=(t,e,n)=>{let s=K5e(t,n);if(!s)return!1;let i=vB(s);if(!i)return!1;let o=i.nodeAfter;if(yB(t,i,e,1))return!0;if(s.parent.content.size==0&&(Jf(o,"start")||Rt.isSelectable(o))){let r=K8(t.doc,s.before(),s.after(),rt.empty);if(r&&r.slice.size<r.to-r.from){if(e){let a=t.tr.step(r);a.setSelection(Jf(o,"start")?zt.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Rt.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},J5e=(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=vB(s)}let r=o&&o.nodeAfter;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos)).scrollIntoView()),!0)};function vB(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 Q5e=(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 n5(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 eSe=(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=n5(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},tSe=(t,e)=>{let n=t.selection,{$from:s,$to:i}=n;if(n instanceof Fo||s.parent.inlineContent||i.parent.inlineContent)return!1;let o=n5(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(Ot.create(a.doc,r+1)),e(a.scrollIntoView())}return!0},nSe=(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(ug(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let s=n.blockRange(),i=s&&b2(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)};function sSe(t){return(e,n)=>{let{$from:s,$to:i}=e.selection;if(e.selection instanceof Rt&&e.selection.node.isBlock)return!s.parentOffset||!ug(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 Ot||e.selection instanceof Fo)&&r.deleteSelection();let a=s.depth==0?null:n5(s.node(-1).contentMatchAt(s.indexAfter(-1))),l=t&&t(i.parent,o,s),c=l?[l]:o&&a?[{type:a}]:void 0,u=ug(r.doc,r.mapping.map(s.pos),1,c);if(!c&&!u&&ug(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 iSe=sSe(),oSe=(t,e)=>(e&&e(t.tr.setSelection(new Fo(t.doc))),!0);function rSe(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||_2(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,s.type,s.contentMatchAt(s.childCount)).join(e.pos).scrollIntoView()),!0)}function yB(t,e,n,s){let i=e.nodeBefore,o=e.nodeAfter,r,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&rSe(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=st.empty;for(let _=r.length-1;_>=0;_--)p=st.from(r[_].create(null,p));p=st.from(i.copy(p));let m=t.tr.step(new Ei(e.pos-1,f,e.pos,f,new rt(p,1,0),r.length,!0)),b=f+2*r.length;_2(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&&b2(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&Jf(o,"start",!0)&&Jf(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 _=st.empty;for(let C=p.length-1;C>=0;C--)_=st.from(p[C].copy(_));let k=t.tr.step(new Ei(e.pos-p.length,e.pos+o.nodeSize,e.pos+b,e.pos+o.nodeSize-b,new rt(_,p.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function bB(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(Ot.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const aSe=bB(-1),lSe=bB(1);function s5(t,e=null){return function(n,s){let{$from:i,$to:o}=n.selection,r=i.blockRange(o),a=r&&X8(r,t,e);return a?(s&&s(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function c1(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 cSe(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 uSe(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 Hb(s,s.doc.resolve(r+1))),s=s.doc.resolve(r+1+o.content.size),!1}),s.pos<i.pos&&e.push(new Hb(s,i))}return e}function S2(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||!cSe(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=uSe(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,k=p.nodeBefore,C=_&&_.isText?/^\s*/.exec(_.text)[0].length:0,x=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+C<b&&(m+=C,b-=x),d.addMark(m,b,t.create(e))}}r(d.scrollIntoView())}return!0}}function $2(...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 f3=$2(t5,pB,mB),KE=$2(t5,Z5e,J5e);const Za={Enter:$2(Q5e,tSe,nSe,iSe),"Mod-Enter":eSe,Backspace:f3,"Mod-Backspace":f3,"Shift-Backspace":f3,Delete:KE,"Mod-Delete":KE,"Mod-a":oSe},_B={"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":aSe,"Ctrl-e":lSe};for(let t in Za)_B[t]=Za[t];const dSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,hSe=dSe?_B:Za;var Hc={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:"'"},Ub={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},fSe=typeof navigator<"u"&&/Mac/.test(navigator.platform),pSe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ei=0;ei<10;ei++)Hc[48+ei]=Hc[96+ei]=String(ei);for(var ei=1;ei<=24;ei++)Hc[ei+111]="F"+ei;for(var ei=65;ei<=90;ei++)Hc[ei]=String.fromCharCode(ei+32),Ub[ei]=String.fromCharCode(ei);for(var p3 in Hc)Ub.hasOwnProperty(p3)||(Ub[p3]=Hc[p3]);function mSe(t){var e=fSe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||pSe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ub:Hc)[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 gSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function vSe(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))gSe?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 ySe(t){let e=Object.create(null);for(let n in t)e[vSe(n)]=t[n];return e}function m3(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 wB(t){return new rs({props:{handleKeyDown:kB(t)}})}function kB(t){let e=ySe(t);return function(n,s){let i=mSe(s),o,r=e[m3(i,s)];if(r&&r(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(s.shiftKey){let a=e[m3(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=Hc[s.keyCode])&&o!=i){let a=e[m3(o,s)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const ti=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},u1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ox=null;const Xa=function(t,e,n){let s=ox||(ox=document.createRange());return s.setEnd(t,n??t.nodeValue.length),s.setStart(t,e||0),s},bSe=function(){ox=null},Cd=function(t,e,n,s){return n&&(ZE(t,e,n,s,-1)||ZE(t,e,n,s,1))},_Se=/^(img|br|input|textarea|hr)$/i;function ZE(t,e,n,s,i){for(;;){if(t==n&&e==s)return!0;if(e==(i<0?0:or(t))){let o=t.parentNode;if(!o||o.nodeType!=1||sv(t)||_Se.test(t.nodeName)||t.contentEditable=="false")return!1;e=ti(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?or(t):0}else return!1}}function or(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function wSe(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=or(t)}else if(t.parentNode&&!sv(t))e=ti(t),t=t.parentNode;else return null}}function kSe(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&&!sv(t))e=ti(t)+1,t=t.parentNode;else return null}}function CSe(t,e,n){for(let s=e==0,i=e==or(t);s||i;){if(t==n)return!0;let o=ti(t);if(t=t.parentNode,!t)return!1;s=s&&o==0,i=i&&o==or(t)}}function sv(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 A2=function(t){return t.focusNode&&Cd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Pu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function xSe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function SSe(t,e,n){if(t.caretPositionFromPoint)try{let s=t.caretPositionFromPoint(e,n);if(s)return{node:s.offsetNode,offset:Math.min(or(s.offsetNode),s.offset)}}catch{}if(t.caretRangeFromPoint){let s=t.caretRangeFromPoint(e,n);if(s)return{node:s.startContainer,offset:Math.min(or(s.startContainer),s.startOffset)}}}const Ea=typeof navigator<"u"?navigator:null,JE=typeof document<"u"?document:null,su=Ea&&Ea.userAgent||"",rx=/Edge\/(\d+)/.exec(su),CB=/MSIE \d/.exec(su),ax=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(su),po=!!(CB||ax||rx),Mc=CB?document.documentMode:ax?+ax[1]:rx?+rx[1]:0,Gr=!po&&/gecko\/(\d+)/i.test(su);Gr&&+(/Firefox\/(\d+)/.exec(su)||[0,0])[1];const lx=!po&&/Chrome\/(\d+)/.exec(su),Si=!!lx,xB=lx?+lx[1]:0,qi=!po&&!!Ea&&/Apple Computer/.test(Ea.vendor),Qf=qi&&(/Mobile\/\w+/.test(su)||!!Ea&&Ea.maxTouchPoints>2),er=Qf||(Ea?/Mac/.test(Ea.platform):!1),$Se=Ea?/Win/.test(Ea.platform):!1,Ar=/Android \d/.test(su),iv=!!JE&&"webkitFontSmoothing"in JE.documentElement.style,ASe=iv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ESe(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 MSe(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=u1(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?ESe(o):MSe(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 TSe(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:SB(t.dom)}}function SB(t){let e=[],n=t.ownerDocument;for(let s=t;s&&(e.push({dom:s,top:s.scrollTop,left:s.scrollLeft}),t!=n);s=u1(s));return e}function PSe({refDOM:t,refTop:e,stack:n}){let s=t?t.getBoundingClientRect().top:0;$B(n,s==0?0:s-e)}function $B(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 dh=null;function ISe(t){if(t.setActive)return t.setActive();if(dh)return t.focus(dh);let e=SB(t);t.focus(dh==null?{get preventScroll(){return dh={preventScroll:!0},!0}}:void 0),dh||(dh=!1,$B(e,0))}function AB(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?LSe(n,i):!n||s&&n.nodeType==1?{node:t,offset:o}:AB(n,i)}function LSe(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=Jl(s,1);if(o.top!=o.bottom&&i5(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function i5(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function OSe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function DSe(t,e,n){let{node:s,offset:i}=AB(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 RSe(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 EB(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(i5(e,c))return EB(r,e,c)}}if((o=(o+1)%s)==i)break}return t}function VSe(t,e){let n=t.dom.ownerDocument,s,i=0,o=SSe(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(!i5(e,c)||(r=EB(t.dom,e,c),!r))return null}if(qi)for(let c=r;s&&c;c=u1(c))c.draggable&&(s=void 0);if(r=OSe(r,e),s){if(Gr&&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;iv&&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=RSe(t,s,i,e))}a==null&&(a=DSe(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function eM(t){return t.top<t.bottom||t.left<t.right}function Jl(t,e){let n=t.getClientRects();if(n.length){let s=n[e<0?0:n.length-1];if(eM(s))return s}return Array.prototype.find.call(n,eM)||t.getBoundingClientRect()}const FSe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function MB(t,e,n){let{node:s,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=iv||Gr;if(s.nodeType==3)if(r&&(FSe.test(s.nodeValue)||(n<0?!i:i==s.nodeValue.length))){let l=Jl(Xa(s,i,i),n);if(Gr&&i&&/\s/.test(s.nodeValue[i-1])&&i<s.nodeValue.length){let c=Jl(Xa(s,i-1,i-1),-1);if(c.top==l.top){let u=Jl(Xa(s,i,i+1),-1);if(u.top!=l.top)return Qp(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++,Qp(Jl(Xa(s,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==or(s))){let l=s.childNodes[i-1];if(l.nodeType==1)return g3(l.getBoundingClientRect(),!1)}if(o==null&&i<or(s)){let l=s.childNodes[i];if(l.nodeType==1)return g3(l.getBoundingClientRect(),!0)}return g3(s.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==or(s))){let l=s.childNodes[i-1],c=l.nodeType==3?Xa(l,or(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Qp(Jl(c,1),!1)}if(o==null&&i<or(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 Qp(Jl(c,-1),!0)}return Qp(Jl(s.nodeType==3?Xa(s):s,-n),n>=0)}function Qp(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 g3(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 TB(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 NSe(t,e,n){let s=e.selection,i=n=="up"?s.$from:s.$to;return TB(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=MB(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 BSe=/[\u0590-\u08ac]/;function zSe(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?!BSe.test(s.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:TB(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 tM=null,nM=null,sM=!1;function HSe(t,e,n){return tM==e&&nM==n?sM:(tM=e,nM=n,sM=n=="up"||n=="down"?NSe(t,e,n):zSe(t,e,n))}const fr=0,iM=1,Nu=2,Ma=3;class ov{constructor(e,n,s,i){this.parent=e,this.children=n,this.dom=s,this.contentDOM=i,this.dirty=fr,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>ti(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 IB){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 PB&&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?ti(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?ti(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=ti(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=ti(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((Gr||qi)&&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:ti(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(Gr&&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&&qi)&&Cd(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Cd(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?Nu:iM,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ma:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Nu:Ma}s=r}this.dirty=Nu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let s=e==1?Nu:iM;n.dirty<s&&(n.dirty=s)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class PB extends ov{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==fr&&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 USe extends ov{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 xd extends ov{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=eu.renderSpec(document,n.type.spec.toDOM(n,s),null,n.attrs)),new xd(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Ma||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ma&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=fr){let s=this.parent;for(;!s.node;)s=s.parent;s.dirty<this.dirty&&(s.dirty=this.dirty),this.dirty=fr}}slice(e,n,s){let i=xd.create(this.parent,this.mark,!0,s),o=this.children,r=this.size;n<r&&(o=dx(o,n,r,s)),e>0&&(o=dx(o,0,e,s));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class Tc extends ov{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}=eu.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=DB(u,s,n),c?l=new jSe(e,n,s,i,u,d||null,h,c,o,r+1):n.isText?new E2(e,n,s,i,u,h,o):new Tc(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=()=>st.empty)}return e}matchesNode(e,n,s){return this.dirty==fr&&e.eq(this.node)&&ux(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 YSe(this,r&&r.node,e);XSe(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?En.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==Nu)&&(r&&this.protectLocalComposition(e,r),LB(this.contentDOM,this.children,e),Qf&&KSe(this.dom))}localCompositionInfo(e,n){let{from:s,to:i}=e.state.selection;if(!(e.state.selection instanceof Ot)||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=ZSe(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 USe(this,o,n,i);e.input.compositionNodes.push(r),this.children=dx(this.children,s,s+i.length,e,r)}update(e,n,s,i){return this.dirty==Ma||!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=fr}updateOuterDeco(e){if(ux(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,s=this.dom;this.dom=OB(this.dom,this.nodeDOM,cx(this.outerDeco,this.node,n),cx(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 oM(t,e,n,s,i){DB(s,e,t);let o=new Tc(void 0,t,e,n,s,s,s,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class E2 extends Tc{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==Ma||this.dirty!=fr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=fr||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=fr,!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 E2(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=Ma)}get domAtom(){return!1}isText(e){return this.node.text==e}}class IB extends ov{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==fr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class jSe extends Tc{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==Ma)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 LB(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=rM(s),i=!0;s=s.nextSibling}else i=!0,t.insertBefore(a,s);if(r instanceof xd){let l=s?s.previousSibling:t.lastChild;LB(r.contentDOM,r.children,n),s=l?l.nextSibling:t.firstChild}}for(;s;)s=rM(s),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const dg=function(t){t&&(this.nodeName=t)};dg.prototype=Object.create(null);const Bu=[new dg];function cx(t,e,n){if(t.length==0)return Bu;let s=n?Bu[0]:new dg,i=[s];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&i.push(s=new dg(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&i.length==1&&i.push(s=new dg(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 OB(t,e,n,s){if(n==Bu&&s==Bu)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=Bu[0]),i=l}WSe(i,a||Bu[0],r)}return i}function WSe(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 DB(t,e,n){return OB(t,t,Bu,cx(e,n,t.nodeType!=1))}function ux(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 rM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class YSe{constructor(e,n,s){this.lock=n,this.view=s,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=qSe(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=fr,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=xd.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==Ma&&r.dom==r.contentDOM&&(r.dirty=Nu),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 Tc){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!=Ma&&ux(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=Nu,d.updateChildren(i,r+1),d.dirty=fr),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=Tc.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=Tc.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 PB(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 xd;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof E2)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((qi||Si)&&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 IB(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 qSe(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 xd)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 GSe(t,e){return t.type.side-e.type.side}function XSe(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(GSe);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 KSe(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 ZSe(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 dx(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 o5(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(A2(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&Rt.isSelectable(u)&&i.parent&&!(u.isInline&&CSe(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new Rt(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=r5(t,l,a,u)}return c}function RB(t){return t.editable?t.hasFocus():FB(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function fl(t,e=!1){let n=t.state.selection;if(VB(t,n),!!RB(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Si){let s=t.domSelectionRange(),i=t.domObserver.currentSelection;if(s.anchorNode&&i.anchorNode&&Cd(s.anchorNode,s.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)QSe(t);else{let{anchor:s,head:i}=n,o,r;aM&&!(n instanceof Ot)&&(n.$from.parent.inlineContent||(o=lM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=lM(t,n.to))),t.docView.setSelection(s,i,t.root,e),aM&&(o&&cM(o),r&&cM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&JSe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const aM=qi||Si&&xB<63;function lM(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(qi&&i&&i.contentEditable=="false")return v3(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return v3(i);if(o)return v3(o)}}function v3(t){return t.contentEditable="true",qi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function cM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function JSe(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(()=>{(!RB(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function QSe(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,ti(s)+1):n.setStart(s,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&po&&Mc<=11&&(s.disabled=!0,s.disabled=!1)}function VB(t,e){if(e instanceof Rt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(uM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else uM(t)}function uM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function r5(t,e,n,s){return t.someProp("createSelectionBetween",i=>i(t,e,n))||Ot.between(e,n,s)}function dM(t){return t.editable&&!t.hasFocus()?!1:FB(t)}function FB(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 e9e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Cd(e.node,e.offset,n.anchorNode,n.anchorOffset)}function hx(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 uc(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function hM(t,e,n){let s=t.state.selection;if(s instanceof Ot)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 uc(t,new Ot(s.$anchor,r))}else if(s.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=hx(t.state,e);return i&&i instanceof Rt?uc(t,i):!1}else if(!(er&&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?Rt.isSelectable(o)?uc(t,new Rt(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):iv?uc(t,new Ot(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(s instanceof Rt&&s.node.isInline)return uc(t,new Ot(e>0?s.$to:s.$from));{let i=hx(t.state,e);return i?uc(t,i):!1}}}function jb(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function hg(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function hh(t,e){return e<0?t9e(t):n9e(t)}function t9e(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i,o,r=!1;for(Gr&&n.nodeType==1&&s<jb(n)&&hg(n.childNodes[s],-1)&&(r=!0);;)if(s>0){if(n.nodeType!=1)break;{let a=n.childNodes[s-1];if(hg(a,-1))i=n,o=--s;else if(a.nodeType==3)n=a,s=n.nodeValue.length;else break}}else{if(NB(n))break;{let a=n.previousSibling;for(;a&&hg(a,-1);)i=n.parentNode,o=ti(a),a=a.previousSibling;if(a)n=a,s=jb(n);else{if(n=n.parentNode,n==t.dom)break;s=0}}}r?fx(t,n,s):i&&fx(t,i,o)}function n9e(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i=jb(n),o,r;for(;;)if(s<i){if(n.nodeType!=1)break;let a=n.childNodes[s];if(hg(a,1))o=n,r=++s;else break}else{if(NB(n))break;{let a=n.nextSibling;for(;a&&hg(a,1);)o=a.parentNode,r=ti(a)+1,a=a.nextSibling;if(a)n=a,s=0,i=jb(n);else{if(n=n.parentNode,n==t.dom)break;s=i=0}}}o&&fx(t,o,r)}function NB(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function s9e(t,e){for(;t&&e==t.childNodes.length&&!sv(t);)e=ti(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 i9e(t,e){for(;t&&!e&&!sv(t);)e=ti(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 fx(t,e,n){if(e.nodeType!=3){let o,r;(r=s9e(e,n))?(e=r,n=0):(o=i9e(e,n))&&(e=o,n=o.nodeValue.length)}let s=t.domSelection();if(!s)return;if(A2(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&&fl(t)},50)}function fM(t,e){let n=t.state.doc.resolve(e);if(!(Si||$Se)&&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 pM(t,e,n){let s=t.state.selection;if(s instanceof Ot&&!s.empty||n.indexOf("s")>-1||er&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=s;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=hx(t.state,e);if(r&&r instanceof Rt)return uc(t,r)}if(!i.parent.inlineContent){let r=e<0?i:o,a=s instanceof Fo?zt.near(r,e):zt.findFrom(r,e);return a?uc(t,a):!1}return!1}function mM(t,e){if(!(t.state.selection instanceof Ot))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 gM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function o9e(t){if(!qi||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;gM(t,s,"true"),setTimeout(()=>gM(t,s,"false"),20)}return!1}function r9e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function a9e(t,e){let n=e.keyCode,s=r9e(e);if(n==8||er&&n==72&&s=="c")return mM(t,-1)||hh(t,-1);if(n==46&&!e.shiftKey||er&&n==68&&s=="c")return mM(t,1)||hh(t,1);if(n==13||n==27)return!0;if(n==37||er&&n==66&&s=="c"){let i=n==37?fM(t,t.state.selection.from)=="ltr"?-1:1:-1;return hM(t,i,s)||hh(t,i)}else if(n==39||er&&n==70&&s=="c"){let i=n==39?fM(t,t.state.selection.from)=="ltr"?1:-1:1;return hM(t,i,s)||hh(t,i)}else{if(n==38||er&&n==80&&s=="c")return pM(t,-1,s)||hh(t,-1);if(n==40||er&&n==78&&s=="c")return o9e(t)||pM(t,1,s)||hh(t,1);if(s==(er?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function BB(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")||eu.fromSchema(t.state.schema),a=YB(),l=a.createElement("div");l.appendChild(r.serializeFragment(s,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=WB[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 zB(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 rt(st.from(t.state.schema.text(e.replace(/\r\n?/g,` |
| 123 |
`))),0,0):rt.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=eu.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=d9e(n),iv&&h9e(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")||p2.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!l9e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=f9e(vM(a,+u[1],+u[2]),u[4]);else if(a=rt.maxOpen(c9e(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=vM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const l9e=/^(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 c9e(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&&UB(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=jB(r[r.length-1],o.length));let u=HB(a,l);r.push(u),i=i.matchType(u.type),o=l}}),r)return st.from(r)}return t}function HB(t,e,n=0){for(let s=e.length-1;s>=n;s--)t=e[s].create(null,st.from(t));return t}function UB(t,e,n,s,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=UB(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(st.from(HB(n,t,i+1))))}}function jB(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,jB(t.lastChild,e-1)),s=t.contentMatchAt(t.childCount).fillBefore(st.empty,!0);return t.copy(n.append(s))}function px(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=px(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(st.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function vM(t,e,n){return e<t.openStart&&(t=new rt(px(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new rt(px(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const WB={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 yM=null;function YB(){return yM||(yM=document.implementation.createHTMLDocument("title"))}function u9e(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function d9e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=YB().createElement("div"),s=/<([a-z][^>\s]+)/i.exec(t),i;if((i=s&&WB[s[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=u9e(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function h9e(t){let e=t.querySelectorAll(Si?"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 f9e(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=st.from(l.create(s[a+1],i)),o++,r++}return new rt(i,o,r)}const Gi={},Xi={},p9e={touchstart:!0,touchmove:!0};class m9e{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 g9e(t){for(let e in Gi){let n=Gi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=s=>{y9e(t,s)&&!a5(t,s)&&(t.editable||!(s.type in Xi))&&n(t,s)},p9e[e]?{passive:!0}:void 0)}qi&&t.dom.addEventListener("input",()=>null),mx(t)}function Cc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function v9e(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 mx(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=s=>a5(t,s))})}function a5(t,e){return t.someProp("handleDOMEvents",n=>{let s=n[e.type];return s?s(t,e)||e.defaultPrevented:!1})}function y9e(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 b9e(t,e){!a5(t,e)&&Gi[e.type]&&(t.editable||!(e.type in Xi))&&Gi[e.type](t,e)}Xi.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!GB(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ar&&Si&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),Qf&&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,Pu(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",s=>s(t,n))||a9e(t,n)?n.preventDefault():Cc(t,"key")};Xi.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Xi.keypress=(t,e)=>{let n=e;if(GB(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||er&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let s=t.state.selection;if(!(s instanceof Ot)||!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 M2(t){return{left:t.clientX,top:t.clientY}}function _9e(t,e){let n=e.x-t.clientX,s=e.y-t.clientY;return n*n+s*s<100}function l5(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 hf(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 w9e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),s=n.nodeAfter;return s&&s.isAtom&&Rt.isSelectable(s)?(hf(t,new Rt(n),"pointer"),!0):!1}function k9e(t,e){if(e==-1)return!1;let n=t.state.selection,s,i;n instanceof Rt&&(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(Rt.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?(hf(t,Rt.create(t.state.doc,i),"pointer"),!0):!1}function C9e(t,e,n,s,i){return l5(t,"handleClickOn",e,n,s)||t.someProp("handleClick",o=>o(t,e,s))||(i?k9e(t,n):w9e(t,n))}function x9e(t,e,n,s){return l5(t,"handleDoubleClickOn",e,n,s)||t.someProp("handleDoubleClick",i=>i(t,e,s))}function S9e(t,e,n,s){return l5(t,"handleTripleClickOn",e,n,s)||t.someProp("handleTripleClick",i=>i(t,e,s))||$9e(t,n,s)}function $9e(t,e,n){if(n.button!=0)return!1;let s=t.state.doc;if(e==-1)return s.inlineContent?(hf(t,Ot.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)hf(t,Ot.create(s,a+1,a+1+r.content.size),"pointer");else if(Rt.isSelectable(r))hf(t,Rt.create(s,a),"pointer");else continue;return!0}}function c5(t){return Wb(t)}const qB=er?"metaKey":"ctrlKey";Gi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let s=c5(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&_9e(n,t.input.lastClick)&&!n[qB]&&(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(M2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new A9e(t,r,n,!!s)):(o=="doubleClick"?x9e:S9e)(t,r.pos,r.inside,n)?n.preventDefault():Cc(t,"pointer"))};class A9e{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[qB],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 Rt&&c.from<=r&&c.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Gr&&!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)),Cc(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(()=>fl(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(M2(e))),this.updateAllowDefault(e),this.allowDefault||!n?Cc(this.view,"pointer"):C9e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||qi&&this.mightDrag&&!this.mightDrag.node.isAtom||Si&&!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)?(hf(this.view,zt.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Cc(this.view,"pointer")}move(e){this.updateAllowDefault(e),Cc(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)}}Gi.touchstart=t=>{t.input.lastTouch=Date.now(),c5(t),Cc(t,"pointer")};Gi.touchmove=t=>{t.input.lastTouch=Date.now(),Cc(t,"pointer")};Gi.contextmenu=t=>c5(t);function GB(t,e){return t.composing?!0:qi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const E9e=Ar?5e3:-1;Xi.compositionstart=Xi.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ot&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(s=>s.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Wb(t,!0),t.markCursor=null;else if(Wb(t,!e.selection.empty),Gr&&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}XB(t,E9e)};Xi.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++,XB(t,20))};function XB(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Wb(t),e))}function KB(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=T9e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function M9e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=wSe(e.focusNode,e.focusOffset),s=kSe(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 T9e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Wb(t,e=!1){if(!(Ar&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),KB(t),e||t.docView&&t.docView.dirty){let n=o5(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 P9e(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 d1=po&&Mc<15||Qf&&ASe<604;Gi.copy=Xi.cut=(t,e)=>{let n=e,s=t.state.selection,i=n.type=="cut";if(s.empty)return;let o=d1?null:n.clipboardData,r=s.content(),{dom:a,text:l}=BB(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):P9e(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function I9e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function L9e(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?h1(t,s.value,null,i,e):h1(t,s.textContent,s.innerHTML,i,e)},50)}function h1(t,e,n,s,i){let o=zB(t,e,n,s,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||rt.empty)))return!0;if(!o)return!1;let r=I9e(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 ZB(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," "):""}Xi.paste=(t,e)=>{let n=e;if(t.composing&&!Ar)return;let s=d1?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;s&&h1(t,ZB(s),s.getData("text/html"),i,n)?n.preventDefault():L9e(t,n)};class JB{constructor(e,n,s){this.slice=e,this.move=n,this.node=s}}const QB=er?"altKey":"ctrlKey";Gi.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(M2(n)),r;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof Rt?i.to-1:i.to))){if(s&&s.mightDrag)r=Rt.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=Rt.create(t.state.doc,d.posBefore))}}let a=(r||t.state.selection).content(),{dom:l,text:c,slice:u}=BB(t,a);(!n.dataTransfer.files.length||!Si||xB>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(d1?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",d1||n.dataTransfer.setData("text/plain",c),t.dragging=new JB(u,!n[QB],r)};Gi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Xi.dragover=Xi.dragenter=(t,e)=>e.preventDefault();Xi.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(M2(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=zB(t,ZB(n.dataTransfer),d1?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(s&&!n[QB]);if(t.someProp("handleDrop",p=>p(t,n,r||rt.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?g5e(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&&Rt.isSelectable(r.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new Rt(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,_,k)=>p=k),c.setSelection(r5(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Gi.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())&&fl(t)},20))};Gi.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)};Gi.beforeinput=(t,e)=>{if(Si&&Ar&&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,Pu(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 Xi)Gi[t]=Xi[t];function f1(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 Yb{constructor(e,n){this.toDOM=e,this.spec=n||td,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 Fs(o-s,o-s,this)}valid(){return!0}eq(e){return this==e||e instanceof Yb&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&f1(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pc{constructor(e,n){this.attrs=e,this.spec=n||td}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 Fs(o,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Pc&&f1(this.attrs,e.attrs)&&f1(this.spec,e.spec)}static is(e){return e.type instanceof Pc}destroy(){}}class u5{constructor(e,n){this.attrs=e,this.spec=n||td}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 Fs(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 u5&&f1(this.attrs,e.attrs)&&f1(this.spec,e.spec)}destroy(){}}class Fs{constructor(e,n,s){this.from=e,this.to=n,this.type=s}copy(e,n){return new Fs(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 Fs(e,e,new Yb(n,s))}static inline(e,n,s,i){return new Fs(e,n,new Pc(s,i))}static node(e,n,s,i){return new Fs(e,n,new u5(s,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pc}get widget(){return this.type instanceof Yb}}const Lh=[],td={};class Kn{constructor(e,n){this.local=e.length?e:Lh,this.children=n.length?n:Lh}static create(e,n){return n.length?qb(n,e,0,td):wi}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==wi||e.maps.length==0?this:this.mapInner(e,n,0,0,s||td)}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?O9e(this.children,r||[],e,n,s,i,o):r?new Kn(r.sort(nd),Lh):wi}add(e,n){return n.length?this==wi?Kn.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=tz(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,qb(u,a,c+1,td)),o+=3}});let r=ez(o?nz(n):n,-s);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Kn(r.length?this.local.concat(r).sort(nd):this.local,i||this.children)}remove(e){return e.length==0||this==wi?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!=wi?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 Kn(i,s):wi}forChild(e,n){if(this==wi)return this;if(n.isLeaf)return Kn.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 Pc){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 Kn(i.sort(nd),Lh);return s?new pc([a,s]):a}return s||wi}eq(e){if(this==e)return!0;if(!(e instanceof Kn)||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 d5(this.localsInner(e))}localsInner(e){if(this==wi)return Lh;if(e.inlineContent||!this.local.some(Pc.is))return this.local;let n=[];for(let s=0;s<this.local.length;s++)this.local[s].type instanceof Pc||n.push(this.local[s]);return n}forEachSet(e){e(this)}}Kn.empty=new Kn([],[]);Kn.removeOverlap=d5;const wi=Kn.empty;class pc{constructor(e){this.members=e}map(e,n){const s=this.members.map(i=>i.map(e,n,td));return pc.from(s)}forChild(e,n){if(n.isLeaf)return Kn.empty;let s=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=wi&&(o instanceof pc?s=s.concat(o.members):s.push(o))}return pc.from(s)}eq(e){if(!(e instanceof pc)||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?d5(s?n:n.sort(nd)):Lh}static from(e){switch(e.length){case 0:return wi;case 1:return e[0];default:return new pc(e.every(n=>n instanceof Kn)?e:e.reduce((n,s)=>n.concat(s instanceof Kn?s:s.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function O9e(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 k=a[_+1];if(k<0||h>k+u-d)continue;let C=a[_]+u-d;f>=C?a[_+1]=h<=C?-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);_!=wi?(a[c]=d,a[c+1]=f,a[c+2]=_):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=D9e(a,t,e,n,i,o,r),u=qb(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 Kn(e.sort(nd),a)}function ez(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 Fs(i.from+e,i.to+e,i.type))}return n}function D9e(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 tz(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 nz(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function qb(t,e,n,s){let i=[],o=!1;e.forEach((a,l)=>{let c=tz(t,a,l+n);if(c){o=!0;let u=qb(c,a,n+l+1,s);u!=wi&&i.push(l,l+a.nodeSize,u)}});let r=ez(o?nz(t):t,-n).sort(nd);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 Kn(r,i):wi}function nd(t,e){return t.from-e.from||t.to-e.to}function d5(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),bM(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),bM(e,i,s.copy(o.from,s.to)));break}}}return e}function bM(t,e,n){for(;e<t.length&&nd(n,t[e])>0;)e++;t.splice(e,0,n)}function y3(t){let e=[];return t.someProp("decorations",n=>{let s=n(t.state);s&&s!=wi&&e.push(s)}),t.cursorWrapper&&e.push(Kn.create(t.state.doc,[t.cursorWrapper.deco])),pc.from(e)}const R9e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},V9e=po&&Mc<=11;class F9e{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 N9e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new F9e,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]);po&&Mc<=11&&s.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),V9e&&(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,R9e)),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(dM(this.view)){if(this.suppressingSelectionUpdates)return fl(this.view);if(po&&Mc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Cd(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=u1(o))n.add(o);for(let o=e.anchorNode;o;o=u1(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)&&dM(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(Gr&&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||H9e(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&&A2(s)&&(c=o5(e))&&c.eq(zt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,fl(e),this.currentSelection.set(s),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,r),B9e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(s)||fl(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(po&&Mc<=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?ti(i)+1:0,a=s.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?ti(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 _M=new WeakMap,wM=!1;function B9e(t){if(!_M.has(t)&&(_M.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Gr,wM)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."),wM=!0}}function kM(t,e){let n=e.startContainer,s=e.startOffset,i=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return Cd(r.node,r.offset,i,o)&&([n,s,i,o]=[i,o,n,s]),{anchorNode:n,anchorOffset:s,focusNode:i,focusOffset:o}}function z9e(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return kM(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?kM(t,n):null}function H9e(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 U9e(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}],A2(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Si&&t.input.lastKeyCode===8)for(let b=o;b>i;b--){let _=s.childNodes[b-1],k=_.pmViewDesc;if(_.nodeName=="BR"&&!k){o=b;break}if(!k||k.size)break}let d=t.state.doc,h=t.someProp("domParser")||p2.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:j9e,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 j9e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(qi&&/^(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||qi&&/^(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 W9e=/^(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 Y9e(t,e,n,s,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let I=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,L=o5(t,I);if(L&&!t.state.selection.eq(L)){if(Si&&Ar&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",R=>R(t,Pu(13,"Enter"))))return;let V=t.state.tr.setSelection(L);I=="pointer"?V.setMeta("pointer",!0):I=="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=U9e(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=X9e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(Qf&&t.input.lastIOSEnter>Date.now()-225||Ar)&&i.some(I=>I.nodeType==1&&!W9e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,Pu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(s&&l instanceof Ot&&!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 I=CM(t,t.state.doc,c.sel);if(I&&!I.eq(t.state.selection)){let L=t.state.tr.setSelection(I);o&&L.setMeta("composition",o),t.dispatch(L)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof Ot&&(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)),po&&Mc<=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),k=m.sameParent(b)&&m.parent.inlineContent&&_.end()>=p.endA,C;if((Qf&&t.input.lastIOSEnter>Date.now()-225&&(!k||i.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!k&&m.pos<c.doc.content.size&&!m.sameParent(b)&&(C=zt.findFrom(c.doc.resolve(m.pos+1),1,!0))&&C.head==b.pos)&&t.someProp("handleKeyDown",I=>I(t,Pu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&G9e(u,p.start,p.endA,m,b)&&t.someProp("handleKeyDown",I=>I(t,Pu(8,"Backspace")))){Ar&&Si&&t.domObserver.suppressSelectionUpdates();return}Si&&Ar&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Ar&&!k&&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(I){return I(t,Pu(13,"Enter"))})},20));let x=p.start,S=p.endA,M,P,T;if(k){if(m.pos==b.pos)po&&Mc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>fl(t),20)),M=t.state.tr.delete(x,S),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=q9e(m.parent.content.cut(m.parentOffset,b.parentOffset),_.parent.content.cut(_.parentOffset,p.endA-_.start()))))M=t.state.tr,T.type=="add"?M.addMark(x,S,T.mark):M.removeMark(x,S,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,b.parentOffset);if(t.someProp("handleTextInput",L=>L(t,x,S,I)))return;M=t.state.tr.insertText(I,x,S)}}if(M||(M=t.state.tr.replace(x,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=CM(t,M.doc,c.sel);I&&!(Si&&Ar&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==x||I.head==M.mapping.map(S)-1)||po&&I.empty&&I.head==x)&&M.setSelection(I)}P&&M.ensureMarks(P),o&&M.setMeta("composition",o),t.dispatch(M.scrollIntoView())}function CM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:r5(t,e.resolve(n.anchor),e.resolve(n.head))}function q9e(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(st.from(c).eq(t))return{mark:a,type:r}}function G9e(t,e,n,s,i){if(n-e<=i.pos-s.pos||b3(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(b3(o,!0,!0));return!r.parent.isTextblock||r.pos>n||b3(r,!0,!1)<n?!1:s.parent.content.cut(s.parentOffset).eq(r.parent.content)}function b3(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 X9e(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&&xM(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&&xM(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function xM(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 K9e{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 m9e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(MM),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=AM(this),$M(this),this.nodeViews=EM(this),this.docView=oM(this.state.doc,SM(this),y3(this),this.dom,this),this.domObserver=new N9e(this,(s,i,o,r)=>Y9e(this,s,i,o,r)),this.domObserver.start(),g9e(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&&mx(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(MM),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&&(KB(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=EM(this);J9e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&mx(this),this.editable=AM(this),$M(this);let l=y3(this),c=SM(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&&TSe(this);if(r){this.domObserver.stop();let f=d&&(po||Si)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Z9e(i.selection,e.selection);if(d){let p=Si?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=M9e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=oM(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&e9e(this))?fl(this,f):(VB(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&&PSe(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Rt){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 JB(e.slice,e.move,i<0?void 0:Rt.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(po){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&&ISe(this.dom),fl(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 VSe(this,e)}coordsAtPos(e,n=1){return MB(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 HSe(this,n||this.state,e)}pasteHTML(e,n){return h1(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return h1(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(v9e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],y3(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,bSe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return b9e(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?qi&&this.root.nodeType===11&&xSe(this.dom.ownerDocument)==this.dom&&z9e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function SM(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"),[Fs.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:Fs.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function AM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Z9e(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 EM(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 J9e(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 MM(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 sz=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},St=(t,e,n)=>(sz(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)},hs=(t,e,n,s)=>(sz(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function iu(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const iz={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}},Vn=kn({},"editorView"),km=kn({},"editorState"),_3=kn([],"initTimer"),TM=kn({},"editor"),p1=kn([],"inputRules"),Xr=kn([],"prosePlugins"),m1=kn([],"remarkPlugins"),g1=kn([],"nodeView"),v1=kn([],"markView"),sd=kn(KC().use(UC).use(qC),"remark"),fg=kn({handlers:iz},"remarkStringifyOptions"),ry=Qc("ConfigReady");function Q9e(t){const e=n=>(n.record(ry),async()=>(await t(n),n.done(ry),()=>{n.clearTimer(ry)}));return iu(e,{displayName:"Config"}),e}const id=Qc("InitReady");function e7e(t){const e=n=>(n.inject(TM,t).inject(Xr,[]).inject(m1,[]).inject(p1,[]).inject(g1,[]).inject(v1,[]).inject(fg,{handlers:iz}).inject(sd,KC().use(UC).use(qC)).inject(_3,[ry]).record(id),async()=>{await n.waitTimers(_3);const s=n.get(fg);return n.set(sd,KC().use(UC).use(qC,s)),n.done(id),()=>{n.remove(TM).remove(Xr).remove(m1).remove(p1).remove(g1).remove(v1).remove(fg).remove(sd).remove(_3).clearTimer(id)}});return iu(e,{displayName:"Init"}),e}const Br=Qc("SchemaReady"),w3=kn([],"schemaTimer"),zr=kn({},"schema"),ff=kn([],"nodes"),pf=kn([],"marks");function PM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const oz=t=>(t.inject(zr,{}).inject(ff,[]).inject(pf,[]).inject(w3,[id]).record(Br),async()=>{await t.waitTimers(w3);const e=t.get(sd),n=t.get(m1).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(sd,n);const s=Object.fromEntries(t.get(ff).map(([r,a])=>[r,PM(a)])),i=Object.fromEntries(t.get(pf).map(([r,a])=>[r,PM(a)])),o=new mxe({nodes:s,marks:i});return t.set(zr,o),t.done(Br),()=>{t.remove(zr).remove(ff).remove(pf).remove(w3).clearTimer(Br)}});iu(oz,{displayName:"Schema"});var Oh,Cu;let rz=class{constructor(){Gs(this,Oh,void 0),Gs(this,Cu,void 0),hs(this,Oh,new GF),hs(this,Cu,null),this.setCtx=e=>{hs(this,Cu,e)}}get ctx(){return St(this,Cu)}create(e,n){const s=e.create(St(this,Oh).sliceMap);return s.set(n),s}get(e){return St(this,Oh).get(e).get()}remove(e){return St(this,Oh).remove(e)}call(e,n){if(St(this,Cu)==null)throw UCe();const s=this.get(e)(n),i=St(this,Cu).get(Vn);return s(i.state,i.dispatch,i)}};Oh=new WeakMap,Cu=new WeakMap;function t7e(t="cmdKey"){return kn(()=>()=>!1,t)}const gn=kn(new rz,"commands"),k3=kn([Br],"commandsTimer"),pg=Qc("CommandsReady"),az=t=>{const e=new rz;return e.setCtx(t),t.inject(gn,e).inject(k3,[Br]).record(pg),async()=>(await t.waitTimers(k3),t.done(pg),()=>{t.remove(gn).remove(k3).clearTimer(pg)})};iu(az,{displayName:"Commands"});const ay=Qc("ParserReady"),lz=()=>{throw B8()},mf=kn(lz,"parser"),C3=kn([],"parserTimer"),cz=t=>(t.inject(mf,lz).inject(C3,[Br]).record(ay),async()=>{await t.waitTimers(C3);const e=t.get(sd),n=t.get(zr);return t.set(mf,X8e.create(n,e)),t.done(ay),()=>{t.remove(mf).remove(C3).clearTimer(ay)}});iu(cz,{displayName:"Parser"});const mg=Qc("SerializerReady"),x3=kn([],"serializerTimer"),uz=()=>{throw B8()},gf=kn(uz,"serializer"),dz=t=>(t.inject(gf,uz).inject(x3,[Br]).record(mg),async()=>{await t.waitTimers(x3);const e=t.get(sd),n=t.get(zr);return t.set(gf,Z8e.create(n,e)),t.done(mg),()=>{t.remove(gf).remove(x3).clearTimer(mg)}});iu(dz,{displayName:"Serializer"});const ly=kn("","defaultValue"),cy=kn(t=>t,"stateOptions"),S3=kn([],"editorStateTimer"),uy=Qc("EditorStateReady");function n7e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return p2.fromSchema(n).parse(t.dom);if(t.type==="json")return Ec.fromJSON(n,t.value);throw RCe(t)}const s7e=new ps("MILKDOWN_STATE_TRACKER");function i7e(t){const e=$2(A5e,t5,pB,mB);return t.Backspace=e,t}const hz=t=>(t.inject(ly,"").inject(km,{}).inject(cy,e=>e).inject(S3,[ay,mg,pg]).record(uy),async()=>{await t.waitTimers(S3);const e=t.get(zr),n=t.get(mf),s=t.get(p1),i=t.get(cy),o=t.get(Xr),r=t.get(ly),a=n7e(r,n,e),l=[...o,new rs({key:s7e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(km,p)}}}),R5e({rules:s}),wB(i7e(hSe))];t.set(Xr,l);const c=i({schema:e,doc:a,plugins:l}),u=Fu.create(c);return t.set(km,u),t.done(uy),()=>{t.remove(ly).remove(km).remove(cy).remove(S3).clearTimer(uy)}});iu(hz,{displayName:"EditorState"});const dy=Qc("EditorViewReady"),$3=kn([],"editorViewTimer"),gg=kn({},"editorViewOptions"),hy=kn(null,"root"),gx=kn(null,"rootDOM"),vx=kn({},"rootAttrs");function o7e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(gx,n);const s=e.get(vx);return Object.entries(s).forEach(([i,o])=>n.setAttribute(i,o)),n}function r7e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const a7e=new ps("MILKDOWN_VIEW_CLEAR"),fz=t=>(t.inject(hy,document.body).inject(Vn,{}).inject(gg,{}).inject(gx,null).inject(vx,{}).inject($3,[uy]).record(dy),async()=>{await t.wait(id);const e=t.get(hy)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(Xr,l=>[new rs({key:a7e,view:c=>{const u=n?o7e(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($3);const s=t.get(km),i=t.get(gg),o=Object.fromEntries(t.get(g1)),r=Object.fromEntries(t.get(v1)),a=new K9e(n,{state:s,nodeViews:o,markViews:r,...i});return r7e(a.dom),t.set(Vn,a),t.done(dy),()=>{a==null||a.destroy(),t.remove(hy).remove(Vn).remove(gg).remove(gx).remove(vx).remove($3).clearTimer(dy)}});iu(fz,{displayName:"EditorView"});var Dh,Jo,Ql,Cm,fy,py,$o,ec,Rh,my,Vh,xm,gy,xu,Sm;const l7e=class pz{constructor(){Gs(this,Dh,void 0),Gs(this,Jo,void 0),Gs(this,Ql,void 0),Gs(this,Cm,void 0),Gs(this,fy,void 0),Gs(this,py,void 0),Gs(this,$o,void 0),Gs(this,ec,void 0),Gs(this,Rh,void 0),Gs(this,my,void 0),Gs(this,Vh,void 0),Gs(this,xm,void 0),Gs(this,gy,void 0),Gs(this,xu,void 0),Gs(this,Sm,void 0),hs(this,Dh,!1),hs(this,Jo,"Idle"),hs(this,Ql,[]),hs(this,Cm,()=>{}),hs(this,fy,new GF),hs(this,py,new KCe),hs(this,$o,new Map),hs(this,ec,new Map),hs(this,Rh,new XCe(St(this,fy),St(this,py))),hs(this,my,()=>{const e=Q9e(async s=>{await Promise.all(St(this,Ql).map(i=>i(s)))}),n=[oz,cz,dz,az,hz,fz,e7e(this),e];St(this,Vh).call(this,n,St(this,ec))}),hs(this,Vh,(e,n)=>{e.forEach(s=>{const i=St(this,Rh).produce(St(this,Dh)?s.meta:void 0),o=s(i);n.set(s,{ctx:i,handler:o,cleanup:void 0})})}),hs(this,xm,(e,n=!1)=>Promise.all([e].flat().map(s=>{const i=St(this,$o).get(s),o=i==null?void 0:i.cleanup;return n?St(this,$o).delete(s):St(this,$o).set(s,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),hs(this,gy,async()=>{await Promise.all([...St(this,ec).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),St(this,ec).clear()}),hs(this,xu,e=>{hs(this,Jo,e),St(this,Cm).call(this,e)}),hs(this,Sm,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)=>(hs(this,Dh,e),this),this.onStatusChange=e=>(hs(this,Cm,e),this),this.config=e=>(St(this,Ql).push(e),this),this.removeConfig=e=>(hs(this,Ql,St(this,Ql).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(s=>{St(this,$o).set(s,{ctx:void 0,handler:void 0,cleanup:void 0})}),St(this,Jo)==="Created"&&St(this,Vh).call(this,n,St(this,$o)),this},this.remove=async e=>St(this,Jo)==="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 St(this,xm).call(this,[e].flat(),!0),this),this.create=async()=>St(this,Jo)==="OnCreate"?this:(St(this,Jo)==="Created"&&await this.destroy(),St(this,xu).call(this,"OnCreate"),St(this,my).call(this),St(this,Vh).call(this,[...St(this,$o).keys()],St(this,$o)),await Promise.all([St(this,Sm).call(this,St(this,ec)),St(this,Sm).call(this,St(this,$o))].flat()),St(this,xu).call(this,"Created"),this),this.destroy=async(e=!1)=>St(this,Jo)==="Destroyed"||St(this,Jo)==="OnDestroy"?this:St(this,Jo)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&hs(this,Ql,[]),St(this,xu).call(this,"OnDestroy"),await St(this,xm).call(this,[...St(this,$o).keys()],e),await St(this,gy).call(this),St(this,xu).call(this,"Destroyed"),this),this.action=e=>e(St(this,Rh)),this.inspect=()=>St(this,Dh)?[...St(this,ec).values(),...St(this,$o).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 pz}get ctx(){return St(this,Rh)}get status(){return St(this,Jo)}};Dh=new WeakMap,Jo=new WeakMap,Ql=new WeakMap,Cm=new WeakMap,fy=new WeakMap,py=new WeakMap,$o=new WeakMap,ec=new WeakMap,Rh=new WeakMap,my=new WeakMap,Vh=new WeakMap,xm=new WeakMap,gy=new WeakMap,xu=new WeakMap,Sm=new WeakMap;let c7e=l7e,u7e=t=>crypto.getRandomValues(new Uint8Array(t)),d7e=(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}}},h7e=(t,e=21)=>d7e(t,e|0,u7e);h7e("abcedfghicklmn",10);function sn(t,e){const n=t7e(t),s=i=>async()=>{s.key=n,await i.wait(pg);const o=e(i);return i.get(gn).create(n,o),s.run=r=>i.get(gn).call(t,r),()=>{i.get(gn).remove(n)}};return s}function wo(t){const e=n=>async()=>{await n.wait(Br);const s=t(n);return n.update(p1,i=>[...i,s]),e.inputRule=s,()=>{n.update(p1,i=>i.filter(o=>o!==s))}};return e}function f7e(t,e){const n=s=>async()=>{const i=e(s);return s.update(pf,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(pf,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get(zr).marks[t];if(!i)throw jCe(t);return i},n}function h5(t,e){const n=s=>async()=>{const i=e(s);return s.update(ff,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(ff,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get(zr).nodes[t];if(!i)throw YF(t);return i},n}function Ps(t){let e;const n=s=>async()=>(await s.wait(Br),e=t(s),s.update(Xr,i=>[...i,e]),()=>{s.update(Xr,i=>i.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function p7e(t){const e=n=>async()=>{await n.wait(Br);const s=t(n),i=wB(s);return n.update(Xr,o=>[...o,i]),e.keymap=s,()=>{n.update(Xr,o=>o.filter(r=>r!==i))}};return e}function mz(t,e){const n=s=>async()=>{await s.wait(Br);const i=e(s);return t.type(s)instanceof Vb?s.update(g1,o=>[...o,[t.id,i]]):s.update(v1,o=>[...o,[t.id,i]]),n.view=i,n.type=t,()=>{t.type(s)instanceof Vb?s.update(g1,o=>o.filter(r=>r[0]!==t.id)):s.update(v1,o=>o.filter(r=>r[0]!==t.id))}};return n}function ms(t,e){const n=kn(t,e),s=i=>(i.inject(n),()=>()=>{i.remove(n)});return s.key=n,s}function zs(t,e){const n=ms(e,t),s=h5(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(ff,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function rv(t,e){const n=ms(e,t),s=f7e(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(pf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function ko(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),s=ms(n,`${t}Keymap`),i=p7e(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 na=(t,e=()=>({}))=>ms(e,`${t}Attr`),av=(t,e=()=>({}))=>ms(e,`${t}Attr`);function qd(t,e,n){const s=ms(n??{},t),i=r=>async()=>{await r.wait(id);const a={plugin:e(r),options:r.get(s.key)};return r.update(m1,l=>[...l,a]),()=>{r.update(m1,l=>l.filter(c=>c!==a))}},o=[s,i];return o.id=t,o.plugin=i,o.options=s,o}function m7e(){return t=>{const e=t.get(Vn);return t.get(gf)(e.state.doc)}}function g7e(t,e=!1){return n=>{const s=n.get(Vn),i=n.get(mf)(t);if(!i)return;if(!e){const{state:c}=s;return s.dispatch(c.tr.replace(0,c.doc.content.size,new rt(i.content,0,0)))}const o=n.get(zr),r=n.get(cy),a=n.get(Xr),l=Fu.create({schema:o,doc:i,plugins:a,...r});s.updateState(l)}}function T2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const v7e=[["ß","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"]],y7e=(t,e)=>{for(const[n,s]of e)t=t.replace(new RegExp(T2(n),"g"),s);return t};function b7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...v7e,...e.customReplacements]);return t=t.normalize(),t=y7e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const _7e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],w7e=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"),k7e=(t,e)=>{const n=T2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},C7e=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+=T2(n)}return new RegExp(`[^${e}]+`,"g")};function x7e(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([..._7e,...e.customReplacements]);t=b7e(t,{customReplacements:i}),e.decamelize&&(t=w7e(t));const o=C7e(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=k7e(t,e.separator)),n&&(t=`_${t}`),s&&(t=`${t}-`),t}function S7e(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=st.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let _=i.depth-h;_>=i.depth-3;_--)d=st.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(st.from(t.createAndFill()));let p=i.before(i.depth-(h-1)),m=n.tr.replace(p,i.after(-f),new rt(d,4-h,0)),b=-1;m.doc.nodesBetween(p,m.doc.content.size,(_,k)=>{if(b>-1)return!1;_.isTextblock&&_.content.size==0&&(b=k+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 ug(c.doc,i.pos,2,u)?(s&&s(c.split(i.pos,2,u).scrollIntoView()),!0):!1}}function gz(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?$7e(e,n,t,o):A7e(e,n,o):!0:!1}}function $7e(t,e,n,s){let i=t.tr,o=s.end,r=s.$to.end(s.depth);o<r&&(i.step(new Ei(o-1,r,o,r,new rt(st.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new sN(i.doc.resolve(s.$from.pos),i.doc.resolve(r),s.depth));const a=b2(s);if(a==null)return!1;i.lift(s,a);let l=i.mapping.map(o,-1)-1;return _2(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function A7e(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?st.empty:st.from(i))))return!1;let d=o.pos,h=d+r.nodeSize;return s.step(new Ei(d-(a?1:0),h+(l?1:0),d+1,h-1,new rt((a?st.empty:st.from(i.copy(st.empty))).append(l?st.empty:st.from(i.copy(st.empty))),a?0:1,l?0:1),a?0:1)),e(s.scrollIntoView()),!0}function E7e(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=st.from(c?t.create():null),d=new rt(st.from(t.create(null,st.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new Ei(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function M7e(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Yd(t,"definition",function(s){const i=IM(s.identifier);i&&!e.get(i)&&e.set(i,s)}),n;function n(s){const i=IM(s);return e.get(i)}}function IM(t){return String(t||"").toUpperCase()}function T7e(){return function(t){const e=M7e(t);Yd(t,function(n,s,i){if(n.type==="definition"&&i!==void 0&&typeof s=="number")return i.children.splice(s,1),[YC,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},[YC,s]}})}}function vz(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(st.fromArray(s))}function Ve(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const f5=av("emphasis");Ve(f5,{displayName:"Attr<emphasis>",group:"Emphasis"});const Gd=rv("emphasis",t=>({attrs:{marker:{default:t.get(fg).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(f5.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})}}}));Ve(Gd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});Ve(Gd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const P2=sn("ToggleEmphasis",t=>()=>S2(Gd.type(t)));Ve(P2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const yz=wo(t=>nv(/(?:^|[^*])\*([^*]+)\*$/,Gd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(yz,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const bz=wo(t=>nv(/(?:^|[^_])_([^_]+)_$/,Gd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(bz,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const p5=ko("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(gn);return()=>e.call(P2.key)}}});Ve(p5.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Ve(p5.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const m5=av("strong");Ve(m5,{displayName:"Attr<strong>",group:"Strong"});const vp=rv("strong",t=>({attrs:{marker:{default:t.get(fg).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(m5.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})}}}));Ve(vp.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Ve(vp.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const I2=sn("ToggleStrong",t=>()=>S2(vp.type(t)));Ve(I2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const _z=wo(t=>nv(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,vp.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Ve(_z,{displayName:"InputRule<strong>",group:"Strong"});const g5=ko("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(gn);return()=>e.call(I2.key)}}});Ve(g5.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Ve(g5.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const v5=av("inlineCode");Ve(v5,{displayName:"Attr<inlineCode>",group:"InlineCode"});const rl=rv("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(v5.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||"")}}}));Ve(rl.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});Ve(rl.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const L2=sn("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,rl.type(t))?(n==null||n(i.removeMark(o,r,rl.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==rl.type.name).map(a=>e.schema.marks[a]).forEach(a=>{i.removeMark(o,r,a)}),n==null||n(i.addMark(o,r,rl.type(t).create())),!0)});Ve(L2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const wz=wo(t=>nv(/(?:\`)([^\`]+)(?:\`)$/,rl.type(t)));Ve(wz,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const y5=ko("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(gn);return()=>e.call(L2.key)}}});Ve(y5.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Ve(y5.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const b5=av("link");Ve(b5,{displayName:"Attr<link>",group:"Link"});const Hr=rv("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ta(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(b5.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})}}}));Ve(Hr.mark,{displayName:"MarkSchema<link>",group:"Link"});const kz=sn("ToggleLink",t=>(e={})=>S2(Hr.type(t),e));Ve(kz,{displayName:"Command<toggleLinkCommand>",group:"Link"});const Cz=sn("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(Hr.type(t).isInSet(p.marks))return i=p,o=m,!1}),!i)return!1;const c=i.marks.find(({type:p})=>p===Hr.type(t));if(!c)return!1;const u=o,d=o+i.nodeSize,{tr:h}=n,f=Hr.type(t).create({...c.attrs,...e});return f?(s(h.removeMark(u,d,c).addMark(u,d,f).setSelection(new Ot(h.selection.$anchor)).scrollIntoView()),!0):!1});Ve(Cz,{displayName:"Command<updateLinkCommand>",group:"Link"});const xz=h5("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)}}}));Ve(xz,{displayName:"NodeSchema<doc>",group:"Doc"});const _5=na("paragraph");Ve(_5,{displayName:"Attr<paragraph>",group:"Paragraph"});const Il=zs("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(_5.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"),vz(e,n),e.closeNode()}}}));Ve(Il.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Ve(Il.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const w5=sn("TurnIntoText",t=>()=>c1(Il.type(t)));Ve(w5,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const k5=ko("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(gn);return()=>e.call(w5.key)}}});Ve(k5.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Ve(k5.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const P7e=Array(6).fill(0).map((t,e)=>e+1);function I7e(t){return x7e(t.textContent)}const O2=ms(I7e,"headingIdGenerator");Ve(O2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const C5=na("heading");Ve(C5,{displayName:"Attr<heading>",group:"Heading"});const wa=zs("heading",t=>{const e=t.get(O2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:P7e.map(n=>({tag:`h${n}`,getAttrs:s=>{if(!(s instanceof HTMLElement))throw ta(s);return{level:n,id:s.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(C5.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}),vz(n,s),n.closeNode()}}}});Ve(wa.node,{displayName:"NodeSchema<heading>",group:"Heading"});Ve(wa.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const Sz=wo(t=>lB(/^(?<hashes>#+)\s$/,wa.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(Vn),{$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}}));Ve(Sz,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const dc=sn("WrapInHeading",t=>e=>(e??(e=1),e<1?c1(Il.type(t)):c1(wa.type(t),{level:e})));Ve(dc,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const x5=sn("DowngradeHeading",t=>()=>(e,n,s)=>{const{$from:i}=e.selection,o=i.node();if(o.type!==wa.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):c1(Il.type(t))(e,n,s)});Ve(x5,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const S5=ko("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(gn);return()=>e.call(dc.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(gn);return()=>e.call(x5.key)}}});Ve(S5.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Ve(S5.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const $5=na("blockquote");Ve($5,{displayName:"Attr<blockquote>",group:"Blockquote"});const yp=zs("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get($5.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()}}}));Ve(yp.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Ve(yp.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const $z=wo(t=>J8(/^\s*>\s$/,yp.type(t)));Ve($z,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const A5=sn("WrapInBlockquote",t=>()=>s5(yp.type(t)));Ve(A5,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const E5=ko("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(gn);return()=>e.call(A5.key)}}});Ve(E5.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Ve(E5.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const M5=na("codeBlock",()=>({pre:{},code:{}}));Ve(M5,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const bp=zs("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 ta(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(M5.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})}}}));Ve(bp.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Ve(bp.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const Az=wo(t=>lB(/^```(?<language>[a-z]*)?[\s\n]$/,bp.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Ve(Az,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const T5=sn("CreateCodeBlock",t=>(e="")=>c1(bp.type(t),{language:e}));Ve(T5,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const L7e=sn("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,s)=>t>=0?(s==null||s(n.tr.setNodeAttribute(t,"language",e)),!0):!1);Ve(L7e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const P5=ko("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(gn);return()=>e.call(T5.key)}}});Ve(P5.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Ve(P5.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const I5=na("image");Ve(I5,{displayName:"Attr<image>",group:"Image"});const Xd=zs("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 ta(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get(I5.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})}}}));Ve(Xd.node,{displayName:"NodeSchema<image>",group:"Image"});Ve(Xd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const Ez=sn("InsertImage",t=>(e={})=>(n,s)=>{if(!s)return!0;const{src:i="",alt:o="",title:r=""}=e,a=Xd.type(t).create({src:i,alt:o,title:r});return a&&s(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});Ve(Ez,{displayName:"Command<insertImageCommand>",group:"Image"});const Mz=sn("UpdateImage",t=>(e={})=>(n,s)=>{const i=G5e(n.selection,Xd.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});Ve(Mz,{displayName:"Command<updateImageCommand>",group:"Image"});const O7e=wo(t=>new Yo(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,s,i)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(s,i,Xd.type(t).create({src:a,alt:r,title:l})):null}));Ve(O7e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const Gb=na("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Ve(Gb,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const od=zs("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(Gb.key)(e)," "]:["br",t.get(Gb.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")}}}));Ve(od.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Ve(od.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const L5=sn("InsertHardbreak",t=>()=>(e,n)=>{var s;const{selection:i,tr:o}=e;if(!(i instanceof Ot))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(od.type(t).create()).scrollIntoView()),!0});Ve(L5,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const O5=ko("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(gn);return()=>e.call(L5.key)}}});Ve(O5.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Ve(O5.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const D5=na("hr");Ve(D5,{displayName:"Attr<hr>",group:"Hr"});const _p=zs("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(D5.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")}}}));Ve(_p.node,{displayName:"NodeSchema<hr>",group:"Hr"});Ve(_p.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Tz=wo(t=>new Yo(/^(?:---|___\s|\*\*\*\s)$/,(e,n,s,i)=>{const{tr:o}=e;return n[0]&&o.replaceWith(s-1,i,_p.type(t).create()),o}));Ve(Tz,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Pz=sn("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const s=Il.node.type(t).create(),{tr:i,selection:o}=e,{from:r}=o,a=_p.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});Ve(Pz,{displayName:"Command<insertHrCommand>",group:"Hr"});const R5=na("bulletList");Ve(R5,{displayName:"Attr<bulletList>",group:"BulletList"});const Kd=zs("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ta(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(R5.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()}}}));Ve(Kd.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});Ve(Kd.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const Iz=wo(t=>J8(/^\s*([-+*])\s$/,Kd.type(t)));Ve(Iz,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const V5=sn("WrapInBulletList",t=>()=>s5(Kd.type(t)));Ve(V5,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const F5=ko("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(gn);return()=>e.call(V5.key)}}});Ve(F5.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Ve(F5.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const N5=na("orderedList");Ve(N5,{displayName:"Attr<orderedList>",group:"OrderedList"});const Zd=zs("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ta(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(N5.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()}}}));Ve(Zd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});Ve(Zd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const Lz=wo(t=>J8(/^\s*(\d+)\.\s$/,Zd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Ve(Lz,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const B5=sn("WrapInOrderedList",t=>()=>s5(Zd.type(t)));Ve(B5,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const z5=ko("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(gn);return()=>e.call(B5.key)}}});Ve(z5.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Ve(z5.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const H5=na("listItem");Ve(H5,{displayName:"Attr<listItem>",group:"ListItem"});const Ta=zs("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 ta(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(H5.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()}}}));Ve(Ta.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Ve(Ta.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const U5=sn("SinkListItem",t=>()=>E7e(Ta.type(t)));Ve(U5,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const j5=sn("LiftListItem",t=>()=>gz(Ta.type(t)));Ve(j5,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const W5=sn("SplitListItem",t=>()=>S7e(Ta.type(t)));Ve(W5,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function D7e(t){return(e,n,s)=>{const{selection:i}=e;if(!(i instanceof Ot))return!1;const{empty:o,$from:r}=i;if(!o||r.parentOffset!==0)return!1;const a=r.node(-1);return a.type!==Ta.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:gz(Ta.type(t))(e,n,s)}}const Y5=sn("LiftFirstListItem",t=>()=>D7e(t));Ve(Y5,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const q5=ko("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(gn);return()=>e.call(W5.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(gn);return()=>e.call(U5.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(gn);return()=>e.call(j5.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(gn);return()=>e.call(Y5.key)}}});Ve(q5.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Ve(q5.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const Oz=h5("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)}}}));Ve(Oz,{displayName:"NodeSchema<text>",group:"Text"});const G5=na("html");Ve(G5,{displayName:"Attr<html>",group:"Html"});const X5=zs("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),s={...t.get(G5.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)}}}));Ve(X5.node,{displayName:"NodeSchema<html>",group:"Html"});Ve(X5.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const R7e=[xz,_5,Il,O2,C5,wa,Gb,od,$5,yp,M5,bp,D5,_p,I5,Xd,R5,Kd,N5,Zd,H5,Ta,f5,Gd,m5,vp,v5,rl,b5,Hr,G5,X5,Oz].flat(),V7e=[$z,Iz,Lz,Az,Tz,Sz].flat(),F7e=[yz,bz,wz,_z],N7e=[w5,A5,dc,x5,T5,L5,Pz,Ez,Mz,B5,V5,U5,W5,j5,Y5,P2,L2,I2,kz,Cz],B7e=[E5,P5,O5,S5,q5,z5,F5,k5,p5,y5,g5].flat(),K5=qd("remarkAddOrderInList",()=>()=>t=>{Yd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((s,i)=>{s.label=i+n})}})});Ve(K5.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Ve(K5.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Z5=qd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;Yd(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})});Ve(Z5.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Ve(Z5.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const J5=qd("remarkInlineLink",()=>T7e);Ve(J5.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Ve(J5.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const z7e=t=>!!t.children,H7e=t=>t.type==="html";function U7e(t,e){return n(t,0,null)[0];function n(s,i,o){if(z7e(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 Q5=qd("remarkHTMLTransformer",()=>()=>t=>{U7e(t,(e,n,s)=>H7e(e)?((s==null?void 0:s.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Ve(Q5.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Ve(Q5.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const eS=qd("remarkMarker",()=>()=>(t,e)=>{const n=s=>e.value.charAt(s.position.start.offset);Yd(t,s=>["strong","emphasis"].includes(s.type),s=>{s.marker=n(s)})});Ve(eS.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Ve(eS.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const Dz=Ps(()=>{let t=!1;const e=new ps("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=Fs.widget(i,o,{side:-1}),a=document.createElement("span"),l=Fs.widget(i,a);return setTimeout(()=>{o.contentEditable="true",a.contentEditable="true"}),Kn.create(s.doc,[r,l])}return Kn.empty}}});return n});Ve(Dz,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const Rz=Ps(t=>new rs({key:new ps("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 Qs))return;const{from:r}=o;return s.tr.setNodeMarkup(r,od.type(t),void 0,[])}if(o instanceof ol){let r=s.tr;const{from:a,to:l}=o;return s.doc.nodesBetween(a,l,(c,u)=>{c.type===od.type(t)&&(r=r.setNodeMarkup(u,od.type(t),void 0,[]))}),r}}}));Ve(Rz,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const tS=ms(["table","code_block"],"hardbreakFilterNodes");Ve(tS,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const Vz=Ps(t=>{const e=t.get(tS.key);return new rs({key:new ps("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}})});Ve(Vz,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const Fz=Ps(t=>{const e=new ps("MILKDOWN_HEADING_ID"),n=s=>{if(s.composing)return;const i=t.get(O2.key),o=s.state.tr.setMeta("addToHistory",!1);let r=!1;s.state.doc.descendants((a,l)=>{if(a.type===wa.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)}})})});Ve(Fz,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const Nz=Ps(t=>{const e=n=>{if(n.composing||!n.editable)return;const s=Zd.type(t),i=Kd.type(t),o=Ta.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,_,k)=>{if(m.type===o){const C={...m.attrs};a(C,k)&&(l=l.setNodeMarkup(b,void 0,C))}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 ps("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:s=>{e(s)}})})});Ve(Nz,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const j7e=[Rz,tS,Vz,Dz,K5,J5,Z5,Q5,eS,Fz,Nz].flat(),W7e=[R7e,V7e,F7e,N7e,B7e,j7e].flat();var yx,bx;if(typeof WeakMap<"u"){let t=new WeakMap;yx=e=>t.get(e),bx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;yx=s=>{for(let i=0;i<t.length;i+=2)if(t[i]==s)return t[i+1]},bx=(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 yx(t)||bx(t,Y7e(t))}};function Y7e(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=q7e(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:k}=m.attrs;for(let C=0;C<_;C++){if(C+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:_-C});break}const x=i+C*e;for(let S=0;S<b;S++){s[x+S]==0?s[x+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-S});const M=k&&k[S];if(M){const P=(x+S)%e*2,T=r[P];T==null||T!=M&&r[P+1]==1?(r[P]=M,r[P+1]=1):T==M&&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&&G7e(a,r,t),a}function q7e(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 G7e(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=X7e(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function X7e(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function LM(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 OM(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 K7e(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=>LM(s,e)}],toDOM(s){return["td",OM(s,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:s=>LM(s,e)}],toDOM(s){return["th",OM(s,e),0]}}}}function wr(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 mc=new ps("selectingCells");function lv(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 D2(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=lv(e.$head)||Z7e(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Z7e(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 _x(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function J7e(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function nS(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Bz(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 Sd(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 Q7e(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 e$e(t,e,n){const s=wr(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 Hb(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(_x(s)&&_x(i)&&nS(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 Ot.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&&(_=Sd(_,0,m)),b>0&&(_=Sd(_,_.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(st.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new rt(st.from(a),1,1)}replace(e,n=rt.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?rt.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 rt(st.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 t$e(this.$anchorCell.pos,this.$headCell.pos)}};as.prototype.visible=!1;zt.jsonID("cell",as);var t$e=class zz{constructor(e,n){this.anchor=e,this.head=n}map(e){return new zz(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&&nS(n,s)?new as(n,s):zt.near(s,1)}};function n$e(t){if(!(t.selection instanceof as))return null;const e=[];return t.selection.forEachCell((n,s)=>{e.push(Fs.node(s,s+n.nodeSize,{class:"selectedCell"}))}),Kn.create(t.doc,e)}function s$e({$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 i$e({$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 o$e(t,e,n){const s=(e||t).selection,i=(e||t).doc;let o,r;if(s instanceof Rt&&(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 Ot&&s$e(s)?o=Ot.create(i,s.from):s instanceof Ot&&i$e(s)&&(o=Ot.create(i,s.$from.start(),s.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var r$e=new ps("fix-tables");function Hz(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)?Hz(t.child(a),l,n+1,s):l.nodesBetween(0,l.content.size,s,n+1),n+=l.nodeSize}}function a$e(t,e){let n;const s=(i,o)=>{i.type.spec.tableRole=="table"&&(n=l$e(t,i,o,n))};return e?e.doc!=t.doc&&Hz(e.doc,t.doc,0,s):t.doc.descendants(s),n}function l$e(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,Sd(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 _=wr(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(r$e,{fixTables:!0})}function ou(t){const e=t.selection,n=D2(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 Uz(t,{map:e,tableStart:n,table:s},i){let o=i>0?-1:0;e$e(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,Q7e(c.attrs,i-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?wr(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 c$e(t,e){if(!xr(t))return!1;if(e){const n=ou(t);e(Uz(t.tr,n,n.left))}return!0}function u$e(t,e){if(!xr(t))return!1;if(e){const n=ou(t);e(Uz(t.tr,n,n.right))}return!0}function d$e(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,Sd(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 h$e(t,e){if(!xr(t))return!1;if(e){const n=ou(t),s=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;d$e(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 f$e(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 p$e(t,e){if(!xr(t))return!1;if(e){const n=ou(t),s=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;f$e(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 m$e(t,e){return function(n,s){if(!xr(n))return!1;const i=D2(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 g$e(t){return function(e,n){if(!xr(e))return!1;if(n){const s=wr(e.schema),i=ou(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 DM(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 sS(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?g$e(t):function(n,s){if(!xr(n))return!1;if(s){const i=wr(n.schema),o=ou(n),r=n.tr,a=DM("row",o,i),l=DM("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}}sS("row",{useDeprecatedLogic:!0});sS("column",{useDeprecatedLogic:!0});sS("cell",{useDeprecatedLogic:!0});function v$e(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 jz(t){return function(e,n){if(!xr(e))return!1;const s=v$e(D2(e),t);if(s==null)return!1;if(n){const i=e.doc.resolve(s);n(e.tr.setSelection(Ot.between(i,J7e(i))).scrollIntoView())}return!0}}function y$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 h0(t,e){const n=t.selection;if(!(n instanceof as))return!1;if(e){const s=t.tr,i=wr(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 rt(i,0,0))}),s.docChanged&&e(s)}return!0}function b$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=wx(wr(r).row,new rt(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||s?wx(wr(r).row,new rt(e,n,s)).content:e);else return null;return _$e(r,a)}function _$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(st.empty),n[i]<s){const o=wr(t).cell.createAndFill(),r=[];for(let a=n[i];a<s;a++)r.push(o);e[i]=e[i].append(st.from(r))}return{height:e.length,width:s,rows:e}}function wx(t,e){const n=t.createAndFill();return new oB(n).replace(0,n.content.size,e).doc}function w$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(Sd(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(st.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(st.from(l))}n=o,e=i}return{width:t,height:e,rows:n}}function k$e(t,e,n,s,i,o,r){const a=t.doc.type.schema,l=wr(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,st.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 RM(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 VM(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,Sd(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(Sd(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function FM(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}k$e(d,r,o,n,c,u,h)&&f(),RM(d,r,o,n,l,c,a,h)&&f(),RM(d,r,o,n,l,c,u,h)&&f(),VM(d,r,o,n,a,u,l,h)&&f(),VM(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 rt(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 C$e=kB({ArrowLeft:f0("horiz",-1),ArrowRight:f0("horiz",1),ArrowUp:f0("vert",-1),ArrowDown:f0("vert",1),"Shift-ArrowLeft":p0("horiz",-1),"Shift-ArrowRight":p0("horiz",1),"Shift-ArrowUp":p0("vert",-1),"Shift-ArrowDown":p0("vert",1),Backspace:h0,"Mod-Backspace":h0,Delete:h0,"Mod-Delete":h0});function vy(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function f0(t,e){return(n,s,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof as)return vy(n,s,zt.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=Wz(i,t,e);if(r==null)return!1;if(t=="horiz")return vy(n,s,zt.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=Bz(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),vy(n,s,c)}}}function p0(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=Wz(i,t,e);if(l==null)return!1;r=new as(n.doc.resolve(l))}const a=Bz(r.$headCell,t,e);return a?vy(n,s,new as(r.$anchorCell,a)):!1}}function x$e(t,e){const n=t.state.doc,s=lv(n.resolve(e));return s?(t.dispatch(t.state.tr.setSelection(new as(s))),!0):!1}function S$e(t,e,n){if(!xr(t.state))return!1;let s=b$e(n);const i=t.state.selection;if(i instanceof as){s||(s={width:1,height:1,rows:[st.from(wx(wr(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=w$e(s,a.right-a.left,a.bottom-a.top),FM(t.state,t.dispatch,r,a,s),!0}else if(s){const o=D2(t.state),r=o.start(-1);return FM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),s),!0}else return!1}function $$e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const s=NM(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=lv(t.state.selection.$anchor))!=null&&((n=A3(t,e))==null?void 0:n.pos)!=i.pos)o(i,e),e.preventDefault();else if(!s)return;function o(l,c){let u=A3(t,c);const d=mc.getState(t.state)==null;if(!u||!nS(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(mc,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),mc.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(mc,-1))}function a(l){const c=l,u=mc.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(NM(t,c.target)!=s&&(d=A3(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 Wz(t,e,n){if(!(t.state.selection instanceof Ot))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 NM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function A3(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?lv(t.state.doc.resolve(n.pos)):null}var A$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")),kx(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,kx(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function kx(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 rr=new ps("tableColumnResizing");function E$e({handleWidth:t=5,cellMinWidth:e=25,View:n=A$e,lastColumnResizable:s=!0}={}){const i=new rs({key:rr,state:{init(o,r){var a,l;const c=(l=(a=i.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=wr(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new M$e(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=rr.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{T$e(o,r,t,e,s)},mouseleave:o=>{P$e(o)},mousedown:(o,r)=>{I$e(o,r,e)}},decorations:o=>{const r=rr.getState(o);if(r&&r.activeHandle>-1)return F$e(o,r.activeHandle)},nodeViews:{}}});return i}var M$e=class yy{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,s=e.getMeta(rr);if(s&&s.setHandle!=null)return new yy(s.setHandle,!1);if(s&&s.setDragging!==void 0)return new yy(n.activeHandle,s.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return _x(e.doc.resolve(i))||(i=-1),new yy(i,n.dragging)}return n}};function T$e(t,e,n,s,i){const o=rr.getState(t.state);if(o&&!o.dragging){const r=O$e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=BM(t,e,"left",n):c-e.clientX<=n&&(a=BM(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}Yz(t,a)}}}function P$e(t){const e=rr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Yz(t,-1)}function I$e(t,e,n){var s;const i=(s=t.dom.ownerDocument.defaultView)!=null?s:window,o=rr.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=L$e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(rr,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){i.removeEventListener("mouseup",l),i.removeEventListener("mousemove",c);const d=rr.getState(t.state);d!=null&&d.dragging&&(D$e(t,d.activeHandle,zM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(rr,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=rr.getState(t.state);if(d&&d.dragging){const h=zM(d.dragging,u,n);R$e(t,d.activeHandle,h,n)}}return i.addEventListener("mouseup",l),i.addEventListener("mousemove",c),e.preventDefault(),!0}function L$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 O$e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function BM(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=lv(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 zM(t,e,n){const s=e.clientX-t.startX;return Math.max(n,t.startWidth+s)}function Yz(t,e){t.dispatch(t.state.tr.setMeta(rr,{setHandle:e}))}function D$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():V$e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function R$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&&kx(o,l.firstChild,l,s,a,n)}function V$e(t){return Array(t).fill(0)}function F$e(t,e){const n=[],s=t.doc.resolve(e),i=s.node(-1);if(!i)return Kn.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(Fs.widget(d,h))}}return Kn.create(t.doc,n)}function N$e({allowTableNodeSelection:t=!1}={}){return new rs({key:mc,state:{init(){return null},apply(e,n){const s=e.getMeta(mc);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:n$e,handleDOMEvents:{mousedown:$$e},createSelectionBetween(e){return mc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:x$e,handleKeyDown:C$e,handlePaste:S$e},appendTransaction(e,n,s){return o$e(s,a$e(s,n),t)}})}var Xb=typeof navigator<"u"?navigator:null,iS=Xb&&Xb.userAgent||"",B$e=/Edge\/(\d+)/.exec(iS),z$e=/MSIE \d/.exec(iS),H$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iS),U$e=!!(z$e||H$e||B$e),j$e=!U$e&&!!Xb&&/Apple Computer/.test(Xb.vendor),qz=new ps("safari-ime-span"),Cx=!1,W$e={key:qz,props:{decorations:Y$e,handleDOMEvents:{compositionstart:()=>{Cx=!0},compositionend:()=>{Cx=!1}}}};function Y$e(t){const{$from:e,$to:n,to:s}=t.selection;if(Cx&&e.sameParent(n)){const i=Fs.widget(s,q$e,{ignoreSelection:!0,key:"safari-ime-span"});return Kn.create(t.doc,[i])}}function q$e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var G$e=new rs(j$e?W$e:{key:qz});function HM(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 X$e(t,e,n){const i=v2((n||{}).ignore||[]),o=K$e(e);let r=-1;for(;++r<o.length;)LN(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,k=[];h.lastIndex=0;let C=h.exec(c.value);for(;C;){const x=C.index,S={index:C.index,input:C.input,stack:[...u,c]};let M=f(...C,S);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?h.lastIndex=x+1:(p!==x&&k.push({type:"text",value:c.value.slice(p,x)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=x+C[0].length,_=!0),!h.global)break;C=h.exec(c.value)}return _?(p<c.value.length&&k.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...k)):k=[c],b+k.length}}function K$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([Z$e(i[0]),J$e(i[1])])}return e}function Z$e(t){return typeof t=="string"?new RegExp(T2(t),"g"):t}function J$e(t){return typeof t=="function"?t:function(){return t}}const E3="phrasing",M3=["autolink","link","image","label"];function Q$e(){return{transforms:[rAe],enter:{literalAutolink:tAe,literalAutolinkEmail:T3,literalAutolinkHttp:T3,literalAutolinkWww:T3},exit:{literalAutolink:oAe,literalAutolinkEmail:iAe,literalAutolinkHttp:nAe,literalAutolinkWww:sAe}}}function eAe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:":",before:"[ps]",after:"\\/",inConstruct:E3,notInConstruct:M3}]}}function tAe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function T3(t){this.config.enter.autolinkProtocol.call(this,t)}function nAe(t){this.config.exit.autolinkProtocol.call(this,t)}function sAe(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 iAe(t){this.config.exit.autolinkEmail.call(this,t)}function oAe(t){this.exit(t)}function rAe(t){X$e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aAe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lAe]],{ignore:["link","linkReference"]})}function aAe(t,e,n,s,i){let o="";if(!Gz(i)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!cAe(n)))return!1;const r=uAe(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 lAe(t,e,n,s){return!Gz(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function cAe(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 uAe(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=HM(t,"(");let o=HM(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 Gz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||kd(n)||m2(n))&&(!e||n!==47)}Xz.peek=wAe;function dAe(){return{enter:{gfmFootnoteDefinition:fAe,gfmFootnoteDefinitionLabelString:pAe,gfmFootnoteCall:vAe,gfmFootnoteCallString:yAe},exit:{gfmFootnoteDefinition:gAe,gfmFootnoteDefinitionLabelString:mAe,gfmFootnoteCall:_Ae,gfmFootnoteCallString:bAe}}}function hAe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:kAe,footnoteReference:Xz}}}function fAe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function pAe(){this.buffer()}function mAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Nr(this.sliceSerialize(t)).toLowerCase()}function gAe(t){this.exit(t)}function vAe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function yAe(){this.buffer()}function bAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Nr(this.sliceSerialize(t)).toLowerCase()}function _Ae(t){this.exit(t)}function Xz(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 wAe(){return"["}function kAe(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()),CAe)),r(),o}function CAe(t,e,n){return e===0?t:(n?"":" ")+t}const xAe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kz.peek=MAe;function SAe(){return{canContainEols:["delete"],enter:{strikethrough:AAe},exit:{strikethrough:EAe}}}function $Ae(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xAe}],handlers:{delete:Kz}}}function AAe(t){this.enter({type:"delete",children:[]},t)}function EAe(t){this.exit(t)}function Kz(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 MAe(){return"~"}function TAe(t,e={}){const n=(e.align||[]).concat(),s=e.stringLength||IAe,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 _=PAe(t[c][b]);if(e.alignDelimiters!==!1){const k=s(_);m[b]=k,(a[b]===void 0||k>a[b])&&(a[b]=k)}p.push(_)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)i[u]=UM(n[u]);else{const p=UM(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 k=m+"-".repeat(_)+b;e.alignDelimiters!==!1&&(_=m.length+_+b.length,_>a[u]&&(a[u]=_),h[u]=_),d[u]=k}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 k="",C="";if(e.alignDelimiters!==!1){const x=a[u]-(m[u]||0),S=i[u];S===114?k=" ".repeat(x):S===99?x%2?(k=" ".repeat(x/2+.5),C=" ".repeat(x/2-.5)):(k=" ".repeat(x/2),C=k):C=" ".repeat(x)}e.delimiterStart!==!1&&!u&&b.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&_==="")&&(e.delimiterStart!==!1||u)&&b.push(" "),e.alignDelimiters!==!1&&b.push(k),b.push(_),e.alignDelimiters!==!1&&b.push(C),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 PAe(t){return t==null?"":String(t)}function IAe(t){return t.length}function UM(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 LAe(){return{enter:{table:OAe,tableData:jM,tableHeader:jM,tableRow:RAe},exit:{codeText:VAe,table:DAe,tableData:P3,tableHeader:P3,tableRow:P3}}}function OAe(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 DAe(t){this.exit(t),this.data.inTable=void 0}function RAe(t){this.enter({type:"tableRow",children:[]},t)}function P3(t){this.exit(t)}function jM(t){this.enter({type:"tableCell",children:[]},t)}function VAe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,FAe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function FAe(t,e){return e==="|"?e:t}function NAe(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),k=c([_]);return k.slice(0,k.indexOf(` |
| 128 |
`))}function l(f,p,m,b){const _=m.enter("tableCell"),k=m.enter("phrasing"),C=m.containerPhrasing(f,{...b,before:o,after:o});return k(),_(),C}function c(f,p){return TAe(f,{align:p,alignDelimiters:s,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let _=-1;const k=[],C=p.enter("table");for(;++_<b.length;)k[_]=d(b[_],p,m);return C(),k}function d(f,p,m){const b=f.children;let _=-1;const k=[],C=p.enter("tableRow");for(;++_<b.length;)k[_]=l(b[_],f,p,m);return C(),k}function h(f,p,m){let b=Y8.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function BAe(){return{exit:{taskListCheckValueChecked:WM,taskListCheckValueUnchecked:WM,paragraph:HAe}}}function zAe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UAe}}}function WM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function HAe(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 UAe(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=Y8.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 jAe(){return[Q$e(),dAe(),SAe(),LAe(),BAe()]}function WAe(t){return{extensions:[eAe(),hAe(),$Ae(),NAe(t),zAe()]}}const YAe={tokenize:JAe,partial:!0},Zz={tokenize:QAe,partial:!0},Jz={tokenize:eEe,partial:!0},Qz={tokenize:tEe,partial:!0},qAe={tokenize:nEe,partial:!0},eH={name:"wwwAutolink",tokenize:KAe,previous:nH},tH={name:"protocolAutolink",tokenize:ZAe,previous:sH},Ll={name:"emailAutolink",tokenize:XAe,previous:iH},Na={};function GAe(){return{text:Na}}let pu=48;for(;pu<123;)Na[pu]=Ll,pu++,pu===58?pu=65:pu===91&&(pu=97);Na[43]=Ll;Na[45]=Ll;Na[46]=Ll;Na[95]=Ll;Na[72]=[Ll,tH];Na[104]=[Ll,tH];Na[87]=[Ll,eH];Na[119]=[Ll,eH];function XAe(t,e,n){const s=this;let i,o;return r;function r(d){return!xx(d)||!iH.call(s,s.previous)||oS(s.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return xx(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(qAe,u,c)(d):d===45||d===95||co(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&&zi(s.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function KAe(t,e,n){const s=this;return i;function i(r){return r!==87&&r!==119||!nH.call(s,s.previous)||oS(s.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(YAe,t.attempt(Zz,t.attempt(Jz,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function ZAe(t,e,n){const s=this;let i="",o=!1;return r;function r(d){return(d===72||d===104)&&sH.call(s,s.previous)&&!oS(s.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(zi(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||Bb(d)||jn(d)||kd(d)||m2(d)?n(d):t.attempt(Zz,t.attempt(Jz,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function JAe(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 QAe(t,e,n){let s,i,o;return r;function r(c){return c===46||c===95?t.check(Qz,l,a)(c):c===null||jn(c)||kd(c)||c!==45&&m2(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 eEe(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(Qz,e,o)(r):r===null||jn(r)||kd(r)?e(r):(t.consume(r),i)}function o(r){return r===41&&s++,t.consume(r),i}}function tEe(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||jn(a)||kd(a)?e(a):n(a)}function i(a){return a===null||a===40||a===91||jn(a)||kd(a)?e(a):s(a)}function o(a){return zi(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),s):zi(a)?(t.consume(a),r):n(a)}}function nEe(t,e,n){return s;function s(o){return t.consume(o),i}function i(o){return co(o)?n(o):e(o)}}function nH(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||jn(t)}function sH(t){return!zi(t)}function iH(t){return!(t===47||xx(t))}function xx(t){return t===43||t===45||t===46||t===95||co(t)}function oS(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 sEe={tokenize:dEe,partial:!0};function iEe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lEe,continuation:{tokenize:cEe},exit:uEe}},text:{91:{name:"gfmFootnoteCall",tokenize:aEe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oEe,resolveTo:rEe}}}}function oEe(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=Nr(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 rEe(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 aEe(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||jn(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(Nr(s.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return jn(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 lEe(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||jn(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=Nr(s.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return jn(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),yn(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function cEe(t,e,n){return t.check(ev,e,t.attempt(sEe,e,n))}function uEe(t){t.exit("gfmFootnoteDefinition")}function dEe(t,e,n){const s=this;return yn(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 hEe(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&&hr(h,h.length,0,g2(f,r.slice(c+1,l),a)),hr(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),hr(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=zb(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"),_=zb(p);return b._open=!_||_===2&&!!m,b._close=!m||m===2&&!!_,a(p)}}}class fEe{constructor(){this.map=[]}add(e,n,s){pEe(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 pEe(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 mEe(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 gEe(){return{flow:{null:{name:"table",tokenize:vEe,resolveAll:yEe}}}}function vEe(t,e,n){const s=this;let i=0,o=0,r;return a;function a(L){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"?M:l;return N===M&&s.parser.lazy[s.now().line]?n(L):N(L)}function l(L){return t.enter("tableHead"),t.enter("tableRow"),c(L)}function c(L){return L===124||(r=!0,o+=1),u(L)}function u(L){return L===null?n(L):Et(L)?o>1?(o=0,s.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),f):n(L):un(L)?yn(t,u,"whitespace")(L):(o+=1,r&&(r=!1,i+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),r=!0,u):(t.enter("data"),d(L)))}function d(L){return L===null||L===124||jn(L)?(t.exit("data"),u(L)):(t.consume(L),L===92?h:d)}function h(L){return L===92||L===124?(t.consume(L),d):d(L)}function f(L){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(L):(t.enter("tableDelimiterRow"),r=!1,un(L)?yn(t,p,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):p(L))}function p(L){return L===45||L===58?b(L):L===124?(r=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),m):S(L)}function m(L){return un(L)?yn(t,b,"whitespace")(L):b(L)}function b(L){return L===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),_):L===45?(o+=1,_(L)):L===null||Et(L)?x(L):S(L)}function _(L){return L===45?(t.enter("tableDelimiterFiller"),k(L)):S(L)}function k(L){return L===45?(t.consume(L),k):L===58?(r=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(L))}function C(L){return un(L)?yn(t,x,"whitespace")(L):x(L)}function x(L){return L===124?p(L):L===null||Et(L)?!r||i!==o?S(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(L)):S(L)}function S(L){return n(L)}function M(L){return t.enter("tableRow"),P(L)}function P(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),P):L===null||Et(L)?(t.exit("tableRow"),e(L)):un(L)?yn(t,P,"whitespace")(L):(t.enter("data"),T(L))}function T(L){return L===null||L===124||jn(L)?(t.exit("data"),P(L)):(t.consume(L),L===92?I:T)}function I(L){return L===92||L===124?(t.consume(L),T):T(L)}}function yEe(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 fEe;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(YM(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=m0(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=m0(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=m0(h,e,o,i,n,d)):r[1]!==0&&(d=m0(h,e,r,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&YM(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=mEe(e.events,n))}return t}function m0(t,e,n,s,i,o){const r=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Fh(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=Fh(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=Fh(e.events,n[2]),u=Fh(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({},Fh(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function YM(t,e,n,s,i){const o=[],r=Fh(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 Fh(t,e){const n=t[e],s=n[0]==="enter"?"start":"end";return n[1][s]}const bEe={name:"tasklistCheck",tokenize:wEe};function _Ee(){return{text:{91:bEe}}}function wEe(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 jn(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 Et(l)?e(l):un(l)?t.check({tokenize:kEe},e,n)(l):n(l)}}function kEe(t,e,n){return yn(t,s,"whitespace");function s(i){return i===null?n(i):e(i)}}function CEe(t){return mN([GAe(),iEe(),hEe(t),gEe(),_Ee()])}const xEe={};function SEe(t){const e=this,n=t||xEe,s=e.data(),i=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),r=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);i.push(CEe(n)),o.push(jAe()),r.push(WAe(n))}function Vt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const rS=av("strike_through");Vt(rS,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const wp=rv("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(rS.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")}}}));Vt(wp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Vt(wp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const R2=sn("ToggleStrikeThrough",t=>()=>S2(wp.type(t)));Vt(R2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const oH=wo(t=>nv(/~([^~]+)~$/,wp.type(t)));Vt(oH,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const aS=ko("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(gn);return()=>e.call(R2.key)}}});Vt(aS.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Vt(aS.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const cv=K7e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),kp=zs("table",()=>({...cv.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()}}}));Vt(kp.node,{displayName:"NodeSchema<table>",group:"Table"});Vt(kp.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const V2=zs("table_header_row",()=>({...cv.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()}}}));Vt(V2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Vt(V2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const uv=zs("table_row",()=>({...cv.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()}}}));Vt(uv.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Vt(uv.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const dv=zs("table_cell",()=>({...cv.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()}}}));Vt(dv.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Vt(dv.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const F2=zs("table_header",()=>({...cv.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()}}}));Vt(F2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Vt(F2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function rH(t,e=3,n=3){const s=Array(n).fill(0).map(()=>dv.type(t).createAndFill()),i=Array(n).fill(0).map(()=>F2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?V2.type(t).create(null,i):uv.type(t).create(null,s));return kp.type(t).create(null,o)}function hv(t){return e5(e=>e.type.spec.tableRole==="table")(t)}function Nh(t,e){const n=hv(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 Bh(t,e){const n=hv(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 $Ee(t){const e=hv(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 AEe(t){const e=$Ee(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 x2(t.setSelection(new as(i,n)))}}return t}function aH(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 dv.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,uv.type(t).create(null,a)),e}function lH(t){return(e,n)=>s=>{n=n??s.selection.from;const i=s.doc.resolve(n),o=e5(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 x2(s.setSelection(d(u,f)))}}return s}}const EEe=lH("row"),MEe=lH("col");function qM(t){return t[0].map((e,n)=>t.map(s=>s[n]))}function cH(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 uH(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 dH(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 TEe(t,e,n,s){let i=qM(uH(t.node));return i=dH(i,e,n,s),i=qM(i),cH(t.node,i)}function PEe(t,e,n,s){let i=uH(t.node);return i=dH(i,e,n,s),cH(t.node,i)}function GM(t,e){let n=t,s=t;for(let u=t;u>=0;u--){const d=Nh(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=Nh(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=Nh(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=Nh(n,e.selection),r=Bh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=Nh(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 XM(t,e){let n=t,s=t;for(let u=t;u>=0;u--)Bh(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++)Bh(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=Bh(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=Bh(n,e.selection),r=Nh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=Bh(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 IEe(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=hv(r);if(!a)return e;const{indexes:l}=GM(n,e),{indexes:c}=GM(s,e);if(l.includes(s))return e;const u=TEe(a,l,c,0),d=x2(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,k=h.positionAt(0,p,u),C=d.doc.resolve(f+k);return d.setSelection(_(b,C))}function LEe(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=hv(r);if(!a)return e;const{indexes:l}=XM(n,e),{indexes:c}=XM(s,e);if(l.includes(s))return e;const u=PEe(a,l,c,0),d=x2(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,k=h.positionAt(p,0,u),C=d.doc.resolve(f+k);return d.setSelection(_(b,C))}const lS=sn("GoToPrevTableCell",()=>()=>jz(-1));Vt(lS,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const cS=sn("GoToNextTableCell",()=>()=>jz(1));Vt(cS,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const uS=sn("ExitTable",t=>()=>(e,n)=>{if(!xr(e))return!1;const{$head:s}=e.selection,i=W5e(s,kp.type(t));if(!i)return!1;const{to:o}=i,r=e.tr.replaceWith(o,o,Il.type(t).createAndFill());return r.setSelection(zt.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Vt(uS,{displayName:"Command<breakTableCommand>",group:"Table"});const hH=sn("InsertTable",t=>({row:e,col:n}={})=>(s,i)=>{const{selection:o,tr:r}=s,{from:a}=o,l=rH(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});Vt(hH,{displayName:"Command<insertTableCommand>",group:"Table"});const fH=sn("MoveRow",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(LEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(fH,{displayName:"Command<moveRowCommand>",group:"Table"});const pH=sn("MoveCol",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(IEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(pH,{displayName:"Command<moveColCommand>",group:"Table"});const mH=sn("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(EEe(t.index,t.pos)(s)))});Vt(mH,{displayName:"Command<selectRowCommand>",group:"Table"});const gH=sn("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(MEe(t.index,t.pos)(s)))});Vt(gH,{displayName:"Command<selectColCommand>",group:"Table"});const vH=sn("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e(AEe(n)))});Vt(vH,{displayName:"Command<selectTableCommand>",group:"Table"});const yH=sn("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof as))return!1;const s=n.isRowSelection(),i=n.isColSelection();return s&&i?y$e(t,e):i?h$e(t,e):p$e(t,e)});Vt(yH,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const bH=sn("AddColBefore",()=>()=>c$e);Vt(bH,{displayName:"Command<addColBeforeCommand>",group:"Table"});const _H=sn("AddColAfter",()=>()=>u$e);Vt(_H,{displayName:"Command<addColAfterCommand>",group:"Table"});const wH=sn("AddRowBefore",t=>()=>(e,n)=>{if(!xr(e))return!1;if(n){const s=ou(e);n(aH(t,e.tr,s,s.top))}return!0});Vt(wH,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const kH=sn("AddRowAfter",t=>()=>(e,n)=>{if(!xr(e))return!1;if(n){const s=ou(e);n(aH(t,e.tr,s,s.bottom))}return!0});Vt(kH,{displayName:"Command<addRowAfterCommand>",group:"Table"});const CH=sn("SetAlign",()=>(t="left")=>m$e("alignment",t));Vt(CH,{displayName:"Command<setAlignCommand>",group:"Table"});const xH=wo(t=>new Yo(/^\|(?<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),kp.type(t)))return null;const l=rH(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(Ot.create(c.doc,s+3)).scrollIntoView()}));Vt(xH,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const dS=ko("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(gn);return()=>e.call(cS.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(gn);return()=>e.call(lS.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(gn);return()=>e.call(uS.key)}}});Vt(dS.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Vt(dS.shortcuts,{displayName:"Keymap<table>",group:"Table"});const I3="footnote_definition",KM="footnoteDefinition",hS=zs("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${I3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw ta(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":I3},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===KM,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===I3,runner:(t,e)=>{t.openNode(KM,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Vt(hS.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Vt(hS.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const L3="footnote_reference",fS=zs("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${L3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw ta(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":L3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===L3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Vt(fS.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Vt(fS.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const SH=Ta.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 ta(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()}}}});Vt(SH,{displayName:"NodeSchema<listItem>",group:"ListItem"});const $H=wo(()=>new Yo(/^\[(?<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}));Vt($H,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const OEe=[aS,dS].flat(),DEe=[xH,$H],REe=[oH],AH=Ps(()=>G$e);Vt(AH,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const VEe=Ps(()=>E$e({}));Vt(VEe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const EH=Ps(()=>N$e({allowTableNodeSelection:!0}));Vt(EH,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const pS=qd("remarkGFM",()=>SEe);Vt(pS.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Vt(pS.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const FEe=new ps("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function NEe(t,e){let n=0;return e.forEach((s,i,o)=>{s===t&&(n=o)}),n}const MH=Ps(()=>new rs({key:FEe,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=NEe(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}}));Vt(MH,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const BEe=[MH,AH,pS,EH].flat(),zEe=[SH,kp,V2,uv,F2,dv,hS,fS,rS,wp].flat(),HEe=[cS,lS,uS,hH,fH,pH,mH,gH,vH,yH,wH,kH,bH,_H,CH,R2],UEe=[zEe,DEe,REe,OEe,HEe,BEe].flat();var Kb=200,Ys=function(){};Ys.prototype.append=function(e){return e.length?(e=Ys.from(e),!this.length&&e||e.length<Kb&&this.leafAppend(e)||this.length<Kb&&e.leafPrepend(this)||this.appendInner(e)):this};Ys.prototype.prepend=function(e){return e.length?Ys.from(e).append(this):this};Ys.prototype.appendInner=function(e){return new jEe(this,e)};Ys.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ys.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ys.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ys.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)};Ys.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};Ys.from=function(e){return e instanceof Ys?e:e&&e.length?new TH(e):Ys.empty};var TH=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<=Kb)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Kb)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}(Ys);Ys.empty=new TH([]);var jEe=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}(Ys);const WEe=500;class Mr{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 pa(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 pa(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 Mr(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 pa(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>qEe&&(a=YEe(a,c),r-=c),new Mr(a.append(o),r)}remapping(e,n){let s=new uf;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 Mr(this.items.append(e.map(n=>new pa(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 pa(p,m,b))}else s.push(new pa(p))},i);let c=[];for(let h=n;h<r;h++)c.push(new pa(o.maps[h]));let u=this.items.slice(0,i).append(c).append(s),d=new Mr(u,a);return d.emptyItemCount()>WEe&&(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 pa(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 Mr(Ys.from(i.reverse()),o)}}Mr.empty=new Mr(Ys.empty,0);function YEe(t,e){let n;return t.forEach((s,i)=>{if(s.selection&&e--==0)return n=i,!1}),t.slice(n)}class pa{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 pa(n.getMap().invert(),n,this.selection)}}}class hc{constructor(e,n,s,i,o){this.done=e,this.undone=n,this.prevRanges=s,this.prevTime=i,this.prevComposition=o}}const qEe=20;function GEe(t,e,n,s){let i=n.getMeta(rd),o;if(i)return i.historyState;n.getMeta(ZEe)&&(t=new hc(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(rd))return r.getMeta(rd).redo?new hc(t.done.addTransform(n,void 0,s,by(e)),t.undone,ZM(n.mapping.maps),t.prevTime,t.prevComposition):new hc(t.done,t.undone.addTransform(n,void 0,s,by(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||!XEe(n,t.prevRanges)),c=r?O3(t.prevRanges,n.mapping):ZM(n.mapping.maps);return new hc(t.done.addTransform(n,l?e.selection.getBookmark():void 0,s,by(e)),Mr.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new hc(t.done.rebased(n,o),t.undone.rebased(n,o),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new hc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function XEe(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 ZM(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 O3(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 KEe(t,e,n){let s=by(e),i=rd.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 hc(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(rd,{redo:n,historyState:l})}let D3=!1,JM=null;function by(t){let e=t.plugins;if(JM!=e){D3=!1,JM=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){D3=!0;break}}return D3}const rd=new ps("history"),ZEe=new ps("closeHistory");function JEe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rs({key:rd,state:{init(){return new hc(Mr.empty,Mr.empty,null,0,-1)},apply(e,n,s){return GEe(n,s,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let s=n.inputType,i=s=="historyUndo"?IH:s=="historyRedo"?LH:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function PH(t,e){return(n,s)=>{let i=rd.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(s){let o=KEe(i,n,t);o&&s(e?o.scrollIntoView():o)}return!0}}const IH=PH(!1,!0),LH=PH(!0,!0);function Cp(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const mS=sn("Undo",()=>()=>IH);Cp(mS,{displayName:"Command<undo>"});const gS=sn("Redo",()=>()=>LH);Cp(gS,{displayName:"Command<redo>"});const vS=ms({},"historyProviderConfig");Cp(vS,{displayName:"Ctx<historyProviderConfig>"});const OH=Ps(t=>JEe(t.get(vS.key)));Cp(OH,{displayName:"Ctx<historyProviderPlugin>"});const yS=ko("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(gn);return()=>e.call(mS.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(gn);return()=>e.call(gS.key)}}});Cp(yS.ctx,{displayName:"KeymapCtx<history>"});Cp(yS.shortcuts,{displayName:"Keymap<history>"});const QEe=[vS,OH,yS,mS,gS].flat();function Sx(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:Sx(t[0]);const e=t.content;return e?Sx(e):t.type==="text"}function eMe(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 DH=Ps(t=>{const e=t.get(zr);t.update(gg,s=>({...s,editable:s.editable??(()=>!0)}));const n=new ps("MILKDOWN_CLIPBOARD");return new rs({key:n,props:{handlePaste:(s,i)=>{var o,r;const a=t.get(mf),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),k=_==null?void 0:_.mode;if(u&&k){const{tr:C}=s.state,x=Y5e("code_block",e);return C.replaceSelectionWith(x.create({language:k})).setSelection(Ot.near(C.doc.resolve(Math.max(0,C.selection.from-2)))).insertText(u.replace(/\r\n?/g,` |
| 129 |
`)),s.dispatch(C),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=p2.fromSchema(e);let p;if(h.length===0){const _=a(u);if(!_||typeof _=="string")return!1;p=eu.fromSchema(e).serializeFragment(_.content)}else{const _=document.createElement("template");_.innerHTML=h,p=_.content.cloneNode(!0),_.remove()}const m=f.parseSlice(p),b=eMe(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(gf);if(Sx(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):""}}})});DH.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const bS=ms({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");bS.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const RH=Ps(t=>{const e=new ps("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:s}=t.get(bS.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});RH.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const tMe=[bS,RH];var VH=(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))(VH||{});const nMe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function sMe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:s}=await Mu(()=>Promise.resolve().then(()=>qkt),void 0);return s(e,n)}case"block-edit":{const{defineFeature:s}=await Mu(()=>Promise.resolve().then(()=>WCt),void 0);return s(e,n)}case"placeholder":{const{defineFeature:s}=await Mu(()=>Promise.resolve().then(()=>XCt),void 0);return s(e,n)}case"toolbar":{const{defineFeature:s}=await Mu(()=>Promise.resolve().then(()=>JCt),void 0);return s(e,n)}case"image-block":{const{defineFeature:s}=await Mu(()=>Promise.resolve().then(()=>cxt),void 0);return s(e,n)}}}const iMe=kn([],"FeaturesCtx");function oMe(t){return e=>{e.inject(iMe,t)}}var rMe="Expected a function",QM=0/0,aMe="[object Symbol]",lMe=/^\s+|\s+$/g,cMe=/^[-+]0x[0-9a-f]+$/i,uMe=/^0b[01]+$/i,dMe=/^0o[0-7]+$/i,hMe=parseInt,fMe=typeof Cs=="object"&&Cs&&Cs.Object===Object&&Cs,pMe=typeof self=="object"&&self&&self.Object===Object&&self,mMe=fMe||pMe||Function("return this")(),gMe=Object.prototype,vMe=gMe.toString,yMe=Math.max,bMe=Math.min,R3=function(){return mMe.Date.now()};function _Me(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(rMe);e=eT(e)||0,$x(n)&&(u=!!n.leading,d="maxWait"in n,o=d?yMe(eT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=s,T=i;return s=i=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(_,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?bMe(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var M=R3();if(b(M))return k(M);a=setTimeout(_,m(M))}function k(M){return a=void 0,h&&s?f(M):(s=i=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:k(R3())}function S(){var M=R3(),P=b(M);if(s=arguments,i=this,l=M,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=C,S.flush=x,S}function $x(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function wMe(t){return!!t&&typeof t=="object"}function kMe(t){return typeof t=="symbol"||wMe(t)&&vMe.call(t)==aMe}function eT(t){if(typeof t=="number")return t;if(kMe(t))return QM;if($x(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$x(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(lMe,"");var n=uMe.test(t);return n||dMe.test(t)?hMe(t.slice(2),n?2:8):cMe.test(t)?QM:+t}var CMe=_Me;const N2=pi(CMe);let FH=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 Ax=kn(new FH,"listener"),xMe=new ps("MILKDOWN_LISTENER"),NH=t=>(t.inject(Ax,new FH),async()=>{await t.wait(id);const e=t.get(Ax),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(mg);const s=t.get(gf);let i=null,o=null;const r=new rs({key:xMe,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:N2(()=>{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(Xr,a=>a.concat(r)),await t.wait(dy),n.mounted.forEach(a=>a(t))});NH.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function SMe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const $Me=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 YF("image");return(await Promise.all(n.map(i=>SMe(i)))).map(({alt:i,src:o})=>s.createAndFill({src:o,alt:i}))},vf=ms({uploader:$Me,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Fs.widget(t,n,e)}},"uploadConfig");vf.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const BH=Ps(t=>{const e=new ps("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(zr),{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(vf.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 Kn.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(vf.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(vf.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}}})});BH.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const AMe=[vf,BH];var _S=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Xs=(t,e,n)=>(_S(t,e,"read from private field"),n?n.call(t):e.get(t)),fh=(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)},$m=(t,e,n,s)=>(_S(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),EMe=(t,e,n)=>(_S(t,e,"access private method"),n),Qo,Am,vg,_y,yf,Ex,zH;class HH{constructor({root:e,features:n={},featureConfigs:s={},defaultValue:i="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;fh(this,Ex),fh(this,Qo,void 0),fh(this,Am,void 0),fh(this,vg,void 0),fh(this,_y,!0),fh(this,yf,null);const a=Object.entries({...nMe,...n}).filter(([,d])=>d).map(([d])=>d);$m(this,vg,(typeof e=="string"?document.querySelector(e):e)??document.body),$m(this,Qo,c7e.make().config(oMe(a)).config(d=>{d.set(hy,Xs(this,vg)),d.set(ly,i),d.set(gg,{editable:()=>Xs(this,_y)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(vf.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(Ax);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(W7e).use(QEe).use(tMe).use(DH).use(NH).use(AMe).use(UEe));const l=(u=s==null?void 0:s["block-edit"])==null?void 0:u.canAddImage;l&&Xs(this,Qo).use(Ps(()=>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 k;_.type.name.includes("image")&&(p=!0),(k=_.content)==null||k.forEach(C=>{C.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Xs(this,Qo).use(Ps(()=>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 k=_[1].replace(/[.,)]+$/,""),C=h-_[1].length,x=C+k.length;if(d.state.doc.rangeHasMark(C,x,m))return!1;const S=(k.startsWith("http")?"":"https://")+k,M=d.state.tr.insertText(p,h).addMark(C,x,m.create({href:S})).removeStoredMark(m);return d.dispatch(M),!0}},appendTransaction:(d,h,f)=>{const p=f.schema.marks.link,m=f.selection.$cursor;if(!p||!m||!d.some(M=>M.docChanged))return null;const b=M=>M==null?void 0:M.marks.find(P=>P.type===p);if((f.storedMarks??m.marks()).some(M=>M.type===p)&&!b(m.nodeBefore)&&!b(m.nodeAfter))return f.tr.removeStoredMark(p);const C=m.pos;if(C<1||f.doc.textBetween(C-1,C)!==" "||!f.doc.rangeHasMark(C-1,C,p))return null;const x=b(f.doc.resolve(C-1).nodeBefore),S=b(f.doc.resolve(C).nodeAfter);return S&&(x==null?void 0:x.attrs.href)===S.attrs.href?null:f.tr.removeMark(C-1,C,p).removeStoredMark(p)}}))),Xs(this,Qo).use(Ps(()=>{let d=!1,h=!1;return new rs({view:f=>({update(){var x;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,b=S=>S.type===p,_=!!p&&!!(m!=null&&m.marks().some(b)),k=document.querySelector("milkdown-link-preview"),C=(k==null?void 0:k.style.display)==="none"&&!h;if(_&&!C){k&&h&&(k.style.display=""),h=!1;const S=f.coordsAtPos((x=m.nodeBefore)!=null&&x.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})),k&&(k.style.display="none"),h=!0);d=_}})})}));const c=[];a.forEach(d=>{const h=s[d];c.push(sMe(d,Xs(this,Qo),h))}),$m(this,Am,Promise.all(c))}async create(){await Xs(this,Am);const e=await Xs(this,Qo).create();return EMe(this,Ex,zH).call(this),e}async destroy(){var e;return(e=Xs(this,yf))==null||e.disconnect(),await Xs(this,Am),Xs(this,Qo).destroy()}get editor(){return Xs(this,Qo)}setReadonly(e){return $m(this,_y,!e),this}getMarkdown(){return Xs(this,Qo).action(m7e())}getEditor(){return Xs(this,Qo)}destroyEditor(){this.destroy()}}Qo=new WeakMap;Am=new WeakMap;vg=new WeakMap;_y=new WeakMap;yf=new WeakMap;Ex=new WeakSet;zH=function(){const t=Xs(this,vg),e=s=>{parseFloat(s.style.left)<0&&(s.style.left="0px")},n=s=>{const i=t.querySelector(s);i&&(Xs(this,yf).observe(i,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(i),0))};$m(this,yf,new MutationObserver(s=>{const i=s[0];i.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(i.target)})),Xs(this,yf).observe(t,{childList:!0,subtree:!0})};HH.Feature=VH;const MMe=Symbol("editorInfoCtxKey"),TMe=fe({name:"MilkdownProvider",setup:(t,{slots:e})=>(Pt(MMe,{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 PMe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},UH=(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)},Mx=(t,e,n)=>(PMe(t,e,"access private method"),n),wy,Tx;let IMe=class{constructor({node:e,view:n,getPos:s,decorations:i,innerDecorations:o,options:r}){UH(this,wy),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 Mx(this,wy,Tx).call(this,e)}createContentDOM(e){return Mx(this,wy,Tx).call(this,e)}get component(){return this.options.component}};wy=new WeakSet,Tx=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 LMe=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 Px,jH;let OMe=class{constructor({pos:e,spec:n,options:s}){UH(this,Px),this.pos=e,this.options=s,this.spec=n,this.dom=Mx(this,Px,jH).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}};Px=new WeakSet,jH=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let wS=(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 DMe=Object.defineProperty,RMe=(t,e,n)=>e in t?DMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lr=(t,e,n)=>(RMe(t,typeof e!="symbol"?e+"":e,n),n);const VMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),FMe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let NMe=class extends IMe{constructor(){super(...arguments),lr(this,"key",wS()),lr(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:Fn(this.node),selected:Fn(this.selected),decorations:Fn(this.decorations),innerDecorations:Fn(this.innerDecorations)}),lr(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)})}),lr(this,"render",()=>{const e=this.component;return Mi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(VMe,this.context),()=>y(Pa,{key:this.key,to:this.dom},{default:()=>[y(e,null,null)]}))}))})}};const BMe=(t,e)=>n=>(s,i,o,r,a)=>{const l=new NMe({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},zMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),HMe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let UMe=class extends LMe{constructor(){super(...arguments),lr(this,"key",wS()),lr(this,"context",{view:Fn(this.view),prevState:Fn(this.prevState)}),lr(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})}),lr(this,"render",()=>{const e=this.component;return Mi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(zMe,this.context),()=>y(Pa,{key:this.key,to:this.root},{default:()=>[y(e,null,null)]}))}))})}};const jMe=(t,e)=>n=>s=>{const i=new UMe({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},WMe=()=>{const t=J({}),e=ht(),n=Mi({});return Id(()=>{n.updater=()=>{e==null||e.update()}}),Cl(()=>{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]}}},YMe=Symbol("[ProsemirrorAdapter]widgetViewContext"),qMe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let GMe=class extends OMe{constructor(){super(...arguments),lr(this,"key",wS()),lr(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),lr(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),lr(this,"render",()=>{const e=this.component;return Mi(fe({name:"ProsemirrorWidgetView",setup:()=>(Pt(YMe,this.context),()=>y(Pa,{key:this.key,to:this.dom},{default:()=>[y(e,null,null)]}))}))})}};const XMe=(t,e)=>n=>(s,i={})=>{const o=new GMe({pos:s,options:n}),r={...i,destroy:a=>{var l;(l=i.destroy)==null||l.call(i,a),e(o)}};return o.spec=r,Fs.widget(s,(a,l)=>(o.bind(a,l),o.updateContext(),t(o),o.dom),r)},KMe=fe({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:s,removeVueRenderer:i}=WMe(),o=BMe(s,i),r=jMe(s,i),a=XMe(s,i);return Pt(FMe,o),Pt(HMe,r),Pt(qMe,a),()=>{var l;return y(te,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>bt(c))])}}}),ZMe={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:TMe,ProsemirrorAdapterProvider:KMe},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(/ |\u00A0/gi,"").trim()),this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=this.hasUnsavedChanges)}},methods:{onUnsavedChangesProceeded(){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)}},clearContent(){this.editor&&(this.editor.action(t=>{const e=t.get(Vn),{state:n}=e,s=n.tr.replaceWith(0,n.doc.content.size,n.schema.nodes.paragraph.create());e.dispatch(s)}),this.currentContent="")},updateContent(t){this.editor.action(e=>{const n=e.get(Vn),{state:s}=n,{from:i}=s.selection,o=t,r=s.tr.insertText(o,i),a=i+o.length,l=r.setSelection(Ot.create(r.doc,a));n.dispatch(l),n.focus()})},initEditor(){const t=this,e=new HH({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")},"link-tooltip":{inputPlaceholder:this.$t("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(Vn),{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(Ot.create(s.doc,o))),n.focus()})},checkforMention(t){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=t.get(Vn),{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(g7e(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(Vn),{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",this.onUnsavedChangesProceeded)},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)),this.$eventBus.off("unsavedChangesProceeded",this.onUnsavedChangesProceeded)}},JMe={style:{position:"relative"},class:"fcom_md_editor"},QMe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},eTe={class:"fcom_mention_pop_wrap"},tTe={key:0},nTe={key:0},sTe=["onClick"],iTe=["src"],oTe={key:1};function rTe(t,e,n,s,i,o){const r=Y("ProsemirrorAdapterProvider"),a=Y("MilkdownProvider"),l=jo;return v(),E(te,null,[y(a,null,{default:w(()=>[y(r,null,{default:w(()=>[g("div",JMe,[g("div",QMe,null,512)])]),_:1})]),_:1}),g("div",eTe,[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(),E("div",tTe,[i.mentionResults.length?(v(),E("ul",nTe,[(v(!0),E(te,null,we(i.mentionResults,c=>(v(),E("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),E("img",{key:0,alt:"",src:c.avatar},null,8,iTe)):O("",!0),g("span",null,$(c.display_name)+" (@"+$(c.username)+")",1)],8,sTe))),128))])):i.searchingMention?O("",!0):(v(),E("div",oTe,[g("p",null,$(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const ru=de(ZMe,[["render",rTe]]),aTe={name:"CreateCorseForm",components:{FormBuilder:jF,SpaceGroupSelector:F8,TopicSelector:UF,SlugInput:Wd,ImageUploader:Jc,LogoEmojiSelector:Z1,ErrorAlerts:J1,CrepeEditor:ru},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:Ewe,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:Mwe,dataLoaded:!1,metaSettings:null,fetchingMetaBoxes:!1,appReady:!1,courseInstructors:[],fetchingInstructors:!1}},watch:{savingCount(){this.submit(!1)}},methods:{getValidationErrors(){var e;const t=[];if((!this.form.title||!this.form.title.trim())&&t.push(this.$t("Course title is required.")),(!this.form.description||!this.form.description.trim())&&t.push(this.$t("Short description is required.")),(e=this.form.slug)!=null&&e.trim()){const n=Q1("/"+this.form.slug);n.valid||n.errors.forEach(s=>t.push(this.$t(s)))}return t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(t=!1){if(this.form.id){const i=this.getValidationErrors();if(i.length){this.$notify.error(i[0]);return}}else if(!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})}},lTe={key:0},cTe={class:"fcom_form_section"},uTe={class:"fcom_help_text"},dTe={class:"fcom_help_text"},hTe={class:"fcom_form_section"},fTe={style:{"font-weight":"bold"}},pTe={key:0},mTe={class:"fcom_help_text"},gTe={style:{"font-weight":"bold"}},vTe={class:"fcom_form_section"},yTe={class:"fcom_lined_checkboxes"},bTe={class:"fcom_checkbox_with_tooltip"},_Te={key:0},wTe={key:0},kTe={class:"fcom_help_text"},CTe={key:0,class:"fcom_form_section"},xTe={class:"fcom_select_photo",style:{float:"left"}},STe=["src","alt"],$Te={style:{float:"right",color:"#8492a6","font-size":"13px"}},ATe={class:"fcom_lined_checkboxes"},ETe={class:"fcom_form_section"},MTe={class:"fcom_help_text"},TTe=["href"],PTe={class:"fcom_image_uploader_wrapper"},ITe={class:"fcom_help_text"},LTe={class:"fcom_space_form_bottom"},OTe={key:0},DTe={class:"fcom_form_section fcom_mt_20"},RTe={key:1},VTe=["href"];function FTe(t,e,n,s,i,o){const r=Y("logo-emoji-selector"),a=vt,l=tn,c=Y("SlugInput"),u=Y("crepe-editor"),d=Y("space-group-selector"),h=Zi,f=Os,p=nn,m=Zt,b=Jt,_=Y("InfoFilled"),k=_e,C=Ls,x=Y("topic-selector"),S=Cr,M=Y("EditPen"),P=qe,T=Y("Delete"),I=Y("ImageUploader"),L=Y("error-alerts"),V=cn,R=Y("form-builder"),N=xt("loading");return t.hasFeature("has_course")?(v(),E("div",lTe,[y(V,{onSubmit:e[23]||(e[23]=Oe(F=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[24]||(e[24]=F=>i.form=F),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[g("div",cTe,[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]=z=>{i.form.settings.emoji=z.emoji,i.form.logo=z.logo,i.form.settings.shape_svg=z.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",uTe,[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",dTe,[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(()=>[W($(t.$t("Published")),1)]),_:1}),y(h,{value:"draft"},{default:w(()=>[W($(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",hTe,[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),E(te,null,we(i.privacies,(F,B)=>(v(),D(p,{key:B,label:F.label,value:B},{default:w(()=>[g("span",fTe,$(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(),E(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(()=>[W($(t.$t("Custom")),1)]),_:1}),y(h,{value:"no"},{default:w(()=>[W($(t.$t("Default")),1)]),_:1}),y(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[W($(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),E("span",pTe,"("+$(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",mTe,[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,style:{"margin-bottom":"0"}},{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(()=>[W($(t.$t("Show Paywalls in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),i.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:2},{default:w(()=>[y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_welcome_banner,"onUpdate:modelValue":e[11]||(e[11]=F=>i.form.settings.show_welcome_banner=F),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Show Welcome Banner 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[12]||(e[12]=F=>i.form.course_type=F),placeholder:t.$t("Select Type")},{default:w(()=>[(v(!0),E(te,null,we(i.courseTypes,(F,B)=>(v(),D(p,{key:B,label:F.label,value:B},{default:w(()=>[g("span",gTe,$(F.label),1),g("p",null,$(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",vTe,[g("h4",null,$(t.$t("Features Customizations")),1),y(l,null,{default:w(()=>[g("div",yTe,[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[13]||(e[13]=F=>i.form.settings.public_lesson_view=F),class:"fcom_checkbox"},{default:w(()=>[W($(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[14]||(e[14]=F=>i.form.settings.disable_comments=F),class:"fcom_checkbox"},{default:w(()=>[W($(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[15]||(e[15]=F=>i.form.settings.hide_members_count=F),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",bTe,[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[16]||(e[16]=F=>{i.form.settings.sequential_lesson_order=F}),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),E("span",_Te,"("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),y(C,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:w(()=>[W($(t.$t("Your members will have to complete each lesson")),1),e[25]||(e[25]=g("br",null,null,-1)),W(" "+$(t.$t("in order before moving onto the next one.")),1)]),default:w(()=>[y(k,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[17]||(e[17]=F=>i.form.settings.course_layout=F),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"classic"},{default:w(()=>[W($(t.$t("Classic")),1)]),_:1}),y(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[W($(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),E("span",wTe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",kTe,[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(),E("div",CTe,[g("h4",null,$(t.$t("Course Instructor")),1),y(l,{label:t.$t("Instructor")},{default:w(()=>[y(m,{disabled:!t.isAdmin(),class:"rich_select","fit-input-width":"",filterable:"",remote:"",loading:i.fetchingInstructors,"remote-method":o.searchUsers,placeholder:t.$t("Select User"),modelValue:i.form.created_by,"onUpdate:modelValue":e[18]||(e[18]=F=>i.form.created_by=F)},{default:w(()=>[(v(!0),E(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",xTe,[g("img",{src:F.photo,alt:F.display_name},null,8,STe),g("span",null,$(F.display_name),1)]),g("span",$Te,$(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",ATe,[y(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_instructor_view,"onUpdate:modelValue":e[19]||(e[19]=F=>i.form.settings.hide_instructor_view=F),class:"fcom_checkbox"},{default:w(()=>[W($(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[20]||(e[20]=F=>i.form.settings.show_instructor_students_count=F),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",ETe,[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(x,{modelValue:i.form.category_ids,"onUpdate:modelValue":e[21]||(e[21]=F=>i.form.category_ids=F),creatable:!0},null,8,["modelValue"]),g("div",MTe,[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(),E("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},$(t.$t("Manage all topics")),9,TTe)):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",PTe,[y(I,{isTextBtn:!1,can_remove:!!i.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},fs({remove:w(()=>[y(k,null,{default:w(()=>[y(T)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[y(P,{class:"fcom_plain_button"},{default:w(()=>[y(k,null,{default:w(()=>[y(M)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",ITe,[g("p",null,$(t.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),y(L,{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",LTe,[e[26]||(e[26]=g("span",null,null,-1)),y(P,{class:"fcom_primary_button",disabled:i.saving,onClick:e[22]||(e[22]=F=>o.submit()),loading:i.saving},{default:w(()=>[g("span",null,$(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Re((v(),E("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),E("div",OTe,[(v(!0),E(te,null,we(i.metaSettings,F=>(v(),E("div",DTe,[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(),E("div",RTe,[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,VTe)]))}const kS=de(aTe,[["render",FTe]]),NTe={name:"SpaceIcon",props:["space_profile"]},BTe=["alt","src"],zTe={key:1,class:"fcom_emoji"},HTe={key:2,class:"fcom_shape"},UTe={key:3,class:"fcom_no_avatar"};function jTe(t,e,n,s,i,o){var a,l,c,u;const r=_e;return n.space_profile.logo?(v(),E("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,BTe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),E("span",zTe,$((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),E("span",HTe,[y(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),E("span",UTe))}const xp=de(NTe,[["render",jTe]]),WTe={name:"SpaceCourseSelector",components:{SpaceIcon:xp},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}},YTe={key:0,class:"fcom_space_title"},qTe={key:0},GTe={key:1};function XTe(t,e,n,s,i,o){const r=Y("SpaceIcon"),a=nn,l=n2,c=Zt,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),E(te,null,we(i.formattedSpaceGroups,d=>Re((v(),D(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),E(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(),E("span",YTe,[y(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[W($(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),E("span",qTe," ("+$(t.$t("course"))+")",1)):O("",!0)])])):(v(),E("span",GTe,$(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 CS=de(WTe,[["render",XTe]]),KTe={name:"SidebarLinkForm",components:{SpaceGroupSelector:F8,LogoEmojiSelector:Z1,SpaceCourseSelector:CS,ErrorAlerts:J1},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(this.$t("Link title is required."));const t=HF(this.form.settings.permalink);return t.valid||t.errors.forEach(e=>{this.formErrors.push(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}},ZTe={class:"fcom_form_section"},JTe={class:"fcom_help_text"},QTe={class:"fcom_help_text"},ePe={class:"fcom_help_text"},tPe={key:0},nPe={key:1};function sPe(t,e,n,s,i,o){const r=Y("logo-emoji-selector"),a=vt,l=tn,c=Jt,u=Y("space-group-selector"),d=Zi,h=Os,f=Y("SpaceCourseSelector"),p=Y("error-alerts"),m=qe,b=cn,_=xt("loading");return v(),D(b,{onSubmit:e[8]||(e[8]=Oe(k=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=k=>i.form=k),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[g("div",ZTe,[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]=k=>i.form.title=k)},{prepend:w(()=>{var k,C;return[i.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=x=>{i.form.settings.emoji=x.emoji,i.form.logo=x.logo,i.form.settings.shape_svg=x.shape_svg}),config:{logo:i.form.logo,emoji:((k=i.form.settings)==null?void 0:k.emoji)||"",shape_svg:((C=i.form.settings)==null?void 0:C.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]=k=>i.form.settings.permalink=k)},null,8,["placeholder","modelValue"]),g("div",JTe,[y(c,{modelValue:i.form.settings.new_tab,"onUpdate:modelValue":e[3]||(e[3]=k=>i.form.settings.new_tab=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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]=k=>i.form.parent_id=k),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",QTe,[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]=k=>i.form.privacy=k)},{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",ePe,[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]=k=>i.form.settings.membership_ids=k),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(()=>[Re((v(),D(m,{class:"fcom_primary_button",disabled:i.saving,onClick:e[7]||(e[7]=k=>o.saveSettings())},{default:w(()=>[i.form.id?(v(),E("span",tPe,$(t.$t("Update")),1)):(v(),E("span",nPe,$(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[_,i.saving]])]),_:1})])]),_:1},8,["modelValue"])}const WH=de(KTe,[["render",sPe]]),iPe={name:"SpaceIcon"},oPe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function rPe(t,e,n,s,i,o){return v(),E("svg",oPe,[...e[0]||(e[0]=[Ia('<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 aPe=de(iPe,[["render",rPe]]),lPe={name:"CourseIcon"},cPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function uPe(t,e,n,s,i,o){return v(),E("svg",cPe,[...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 YH=de(lPe,[["render",uPe]]),dPe={name:"SpaceCreateModal",components:{Drawer:jd,CreateSpaceForm:N8,CreateCourseForm:kS,SidebarLinkForm:WH,ArrowLeftBold:Jre,SpaceIcon:aPe,CourseIcon:YH,Link:dR},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})})}},hPe={class:"dialog_header"},fPe={class:"dialog_left"},pPe={class:"dialog_body"},mPe={key:0,class:"space-type-selector"},gPe={class:"space-cards"},vPe={class:"space-card-label"},yPe={class:"space-card-label"},bPe={key:0,class:"space-card-note"},_Pe={class:"space-card-label"},wPe={key:0,class:"space-card-note"},kPe={class:"dialog_footer"};function CPe(t,e,n,s,i,o){const r=Y("ArrowLeftBold"),a=_e,l=qe,c=Y("SpaceIcon"),u=Y("CourseIcon"),d=Y("Link"),h=Y("create-space-form"),f=Y("create-course-form"),p=Y("sidebar-link-form"),m=Y("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"},fs({header:w(()=>[g("div",hPe,[g("div",fPe,[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",pPe,[i.step=="choose_type"?(v(),E("div",mPe,[g("div",gPe,[g("div",{onClick:e[1]||(e[1]=b=>i.select_type="space_form"),class:q([{"is-active":i.select_type==="space_form"},"space-card"])},[y(a,{class:"space-card-icon"},{default:w(()=>[y(c)]),_:1}),g("span",vPe,$(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=b=>!!t.hasFeature("has_course")&&(i.select_type="course_form")),class:q([{"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",yPe,$(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),E("span",bPe,$(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:q([{"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",_Pe,$(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),E("span",wPe,$(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",kPe,[y(l,{disabled:!i.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=b=>o.handleNextStep())},{default:w(()=>[W($(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const xPe=de(dPe,[["render",CPe]]),Hs=d2("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)})}}}),xS=d2("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=Hs(),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,o;const s=Hs();try{const r=n||((i=this.currentUser)==null?void 0:i.username),a=await this.$api.put(`profile/${r}`,{data:t}),l=a.profile||a.user||a;return this.currentUser={...this.currentUser,...l},e&&e!==l.username&&(delete this.profilesByUsername[e],s.invalidate(`user-profile:${e}`)),l.username&&(this.profilesByUsername[l.username]=l,s.invalidate(`user-profile:${l.username}`)),(o=window.fluentComAdmin)!=null&&o.auth&&(window.fluentComAdmin.auth={...window.fluentComAdmin.auth,...l}),l}catch(r){throw console.error("Failed to update profile:",r),r}},async toggleFollow(t,e=null){var a,l,c;const n=Hs(),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}},invalidateProfile(t){Hs().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=Hs();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var SPe=Va,$Pe=SPe["__core-js_shared__"],APe=$Pe,V3=APe,tT=function(){var t=/[^.]+$/.exec(V3&&V3.keys&&V3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function EPe(t){return!!tT&&tT in t}var MPe=EPe,TPe=Function.prototype,PPe=TPe.toString;function IPe(t){if(t!=null){try{return PPe.call(t)}catch{}try{return t+""}catch{}}return""}var qH=IPe,LPe=PF,OPe=MPe,DPe=K1,RPe=qH,VPe=/[\\^$.*+?()[\]{}|]/g,FPe=/^\[object .+?Constructor\]$/,NPe=Function.prototype,BPe=Object.prototype,zPe=NPe.toString,HPe=BPe.hasOwnProperty,UPe=RegExp("^"+zPe.call(HPe).replace(VPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jPe(t){if(!DPe(t)||OPe(t))return!1;var e=LPe(t)?UPe:FPe;return e.test(RPe(t))}var WPe=jPe;function YPe(t,e){return t==null?void 0:t[e]}var qPe=YPe,GPe=WPe,XPe=qPe;function KPe(t,e){var n=XPe(t,e);return GPe(n)?n:void 0}var Sp=KPe,ZPe=Sp,JPe=Va,QPe=ZPe(JPe,"DataView"),eIe=QPe,tIe=Sp,nIe=Va,sIe=tIe(nIe,"Map"),SS=sIe,iIe=Sp,oIe=Va,rIe=iIe(oIe,"Promise"),aIe=rIe,lIe=Sp,cIe=Va,uIe=lIe(cIe,"Set"),GH=uIe,dIe=Sp,hIe=Va,fIe=dIe(hIe,"WeakMap"),pIe=fIe,Ix=eIe,Lx=SS,Ox=aIe,Dx=GH,Rx=pIe,XH=G1,$p=qH,nT="[object Map]",mIe="[object Object]",sT="[object Promise]",iT="[object Set]",oT="[object WeakMap]",rT="[object DataView]",gIe=$p(Ix),vIe=$p(Lx),yIe=$p(Ox),bIe=$p(Dx),_Ie=$p(Rx),Su=XH;(Ix&&Su(new Ix(new ArrayBuffer(1)))!=rT||Lx&&Su(new Lx)!=nT||Ox&&Su(Ox.resolve())!=sT||Dx&&Su(new Dx)!=iT||Rx&&Su(new Rx)!=oT)&&(Su=function(t){var e=XH(t),n=e==mIe?t.constructor:void 0,s=n?$p(n):"";if(s)switch(s){case gIe:return rT;case vIe:return nT;case yIe:return sT;case bIe:return iT;case _Ie:return oT}return e});var KH=Su,wIe=TF,kIe=KH,CIe=T8,xIe=Fa,SIe=O8,$Ie=P8,AIe=MF,EIe=L8,MIe="[object Map]",TIe="[object Set]",PIe=Object.prototype,IIe=PIe.hasOwnProperty;function LIe(t){if(t==null)return!0;if(SIe(t)&&(xIe(t)||typeof t=="string"||typeof t.splice=="function"||$Ie(t)||EIe(t)||CIe(t)))return!t.length;var e=kIe(t);if(e==MIe||e==TIe)return!t.size;if(AIe(t))return!wIe(t).length;for(var n in t)if(IIe.call(t,n))return!1;return!0}var OIe=LIe;const ZH=pi(OIe),DIe={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),ZH(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}}},RIe={key:0,class:"fcom_social_links"},VIe=["href","title"];function FIe(t,e,n,s,i,o){const r=_e,a=Y("router-link");return o.hasSocialLinks?(v(),E("div",RIe,[(v(!0),E(te,null,we(o.socialLinks,l=>(v(),E("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[y(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,VIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[W($("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const NIe=de(DIe,[["render",FIe]]),aT=d2("feed",{state:()=>({feedsByContext:{},feedsById:{},stickyFeeds:{},loading:{},pagination:{},filters:{},tickerIntervals:{},tickerEnabled:{},lastTickerCheck:{},tickerPending:{},newPostsCount:{},ticker:{count:0,lastFetched:0},executionTimes:{},_pendingRequests:{},_recentContexts:[]}),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 c,u,d;if(console.log("[Feed Store] fetchFeeds called:",{context:t,loadMore:n,paramsPage:e.page,currentLoading:this.loading[t],currentPage:(c=this.pagination[t])==null?void 0:c.page}),this.loading[t]){console.log("[Feed Store] Already loading for context:",t,"- ignoring duplicate request");return}const s=n?(((u=this.pagination[t])==null?void 0:u.page)||0)+1:e.page||1,i={...e,page:s,per_page:e.per_page||10},o=`feeds:${t}:${JSON.stringify(i)}`,r=Hs(),a=JSON.stringify({search:i.search||"",order_by_type:i.order_by_type||"",topic_slug:i.topic_slug||""});if(!n&&s===1){const h=r.get(o,3e5);if(h)return this.feedsByContext[t]={...h.feedsByContext,filterKey:a},this.pagination[t]=h.pagination,this.executionTimes[t]=h.executionTime,this.touchContext(t),h.stickyFeed&&!window["viewed_sticky_posts_"+h.stickyFeed.id]?this.stickyFeeds[t]=h.stickyFeed:(this.stickyFeeds[t]=null,h.stickyFeed&&((d=this.feedsByContext[t])!=null&&d.data)&&(this.feedsByContext[t].data.some(f=>f.id===h.stickyFeed.id)||this.feedsByContext[t].data.unshift(h.stickyFeed))),h.feedsByContext.data.forEach(f=>{this.feedsById[f.id]=f}),this.loading[t]=!1,h}return this.loading[t]=!0,this.$api.get(e.feed_base_url||"feeds",i).then(h=>{var f,p,m,b;if(h.sticky){const _="viewed_sticky_posts_"+h.sticky.id;window[_]?(h.feeds.data.some(k=>k.id===h.sticky.id)||h.feeds.data.unshift(h.sticky),this.stickyFeeds[t]=null):this.stickyFeeds[t]=h.sticky}else s===1&&(this.stickyFeeds[t]=null);if(n){const _=((f=this.feedsByContext[t])==null?void 0:f.data)||[];this.feedsByContext[t]={data:[..._,...h.feeds.data],timestamp:Date.now(),filterKey:a}}else this.feedsByContext[t]={data:h.feeds.data,timestamp:Date.now(),filterKey:a};if(this.pagination[t]={page:s,per_page:i.per_page,total:h.feeds.total,last_page:h.feeds.last_page,has_more:h.feeds.has_more},this.touchContext(t),console.log("[Feed Store] Updated pagination:",{context:t,page:s,has_more:h.feeds.has_more,total:h.feeds.total}),h.execution_time&&(this.executionTimes[t]=h.execution_time),h.feeds.data.forEach(_=>{this.feedsById[_.id]={..._,timestamp:Date.now()}}),n){const _=((m=(p=this.feedsByContext[t])==null?void 0:p.data)==null?void 0:m.length)||0;_>500&&(console.log("[Feed Store] Pruning feeds, count:",_),this.pruneOldFeeds(t))}return h.last_fetched_timestamp&&(this.ticker.lastFetched=h.last_fetched_timestamp,(b=window.fluentFrameworkApp)!=null&&b.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:h.last_fetched_timestamp})),h.current_user_follows&&xS().setFollows(h.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(h=>{throw console.error("[Feed Store] Failed to fetch feeds:",h),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after error for context:",t),h})},async fetchFeedBySlug(t){const e=`feed:slug:${t}`,n=Hs(),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,o,r;try{const a=await this.$api.post("feeds",e),l=a.feed;if(this.feedsById[l.id]={...l,timestamp:Date.now()},!a.scheduled_at){const u=h=>{this.feedsByContext[h]||(this.feedsByContext[h]={data:[],timestamp:Date.now()}),this.stickyFeeds[h]&&(this.feedsByContext[h].data.some(p=>p.id===this.stickyFeeds[h].id)||this.feedsByContext[h].data.unshift(this.stickyFeeds[h]),this.stickyFeeds[h]=null);const f=this.feedsByContext[h].data.findIndex(p=>p.id===l.id);f===-1&&this.feedsByContext[h].data.unshift(l),this.pagination[h]?f===-1&&this.pagination[h].total++:this.pagination[h]={page:1,per_page:10,total:1,last_page:1,has_more:!1}};u(t),l.space_id&&t!=="global"&&(u("global"),Hs().invalidatePattern("feeds:global"));const d=`user-${l.user_id}`;this.feedsByContext[d]&&t!==d&&u(d),(s=(n=window.fluentFrameworkApp)==null?void 0:n.$eventBus)==null||s.emit("recent_activities_refresh")}return a.last_fetched_timestamp&&(this.ticker.lastFetched=a.last_fetched_timestamp,(i=window.FluentCommunityUtil)!=null&&i.eventBus&&((r=(o=window.fluentFrameworkApp)==null?void 0:o.$eventBus)==null||r.emit("newest_feed_fetched",{last_fetched_timestamp:a.last_fetched_timestamp}))),Hs().invalidatePattern(`feeds:${t}`),a}catch(a){throw console.error("Failed to create feed:",a),a}},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})}),Hs().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--,Hs().invalidatePattern("feed:"),!0}catch(s){throw console.error("Failed to delete feed:",s),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]="",Hs().invalidatePattern(`feeds:${t}`)},touchContext(t){if(!t)return;const e=this._recentContexts.indexOf(t);e>-1&&this._recentContexts.splice(e,1),this._recentContexts.push(t);const n=10;if(this._recentContexts.length<=n)return;let s=this._recentContexts.length-n;const i=[];for(const o of this._recentContexts)s>0&&!this.loading[o]?(delete this.feedsByContext[o],delete this.pagination[o],delete this.stickyFeeds[o],delete this.executionTimes[o],s--):i.push(o);this._recentContexts=i},async softRefreshContext(t,e={}){var n,s,i,o;if((s=(n=this.feedsByContext[t])==null?void 0:n.data)!=null&&s.length&&!this.loading[t]){this.touchContext(t);try{const r=await this.$api.get(e.feed_base_url||"feeds",{...e,page:1,per_page:e.per_page||10}),a=this.feedsByContext[t];if(!((i=a==null?void 0:a.data)!=null&&i.length))return;const l=a.data,c=((o=r.feeds)==null?void 0:o.data)||[];if(!c.length){a.timestamp=Date.now();return}const u=new Map(c.map(m=>[m.id,m])),d=new Set(l.map(m=>m.id)),h=l.map(m=>{const b=u.get(m.id);return b?{...m,...b}:m}),f=c.filter(m=>!d.has(m.id));this.feedsByContext[t]={...a,data:[...f,...h],timestamp:Date.now()};const p=Date.now();if(c.forEach(m=>{this.feedsById[m.id]={...this.feedsById[m.id]||{},...m,timestamp:p}}),r.sticky){const m="viewed_sticky_posts_"+r.sticky.id;window[m]||(this.stickyFeeds[t]=r.sticky)}}catch(r){console.warn("[Feed Store] Soft refresh failed for context",t,r)}}},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)),Hs().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={}}}}),BIe=d2("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=Hs(),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 joinSpace(t,e=null){var o,r,a;const n=Hs(),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=Hs(),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}},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=Hs();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=Hs();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),zIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:xS()}},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{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||this.$t("Successfully followed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},async unfollowUser(){this.loading=!0;try{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||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})}}},HIe={key:0},UIe={key:1},jIe={key:0},WIe={key:1};function YIe(t,e,n,s,i,o){const r=qe;return o.showFollowAction?(v(),E(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(),E("span",UIe,$(t.$t("Unblock")),1)):(v(),E("span",HIe,$(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),D(r,{key:1,onClick:o.confirmUnfollow,class:q(["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(),E("span",WIe,$(t.$t("Unfollow")),1)):(v(),E("span",jIe,$(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 qIe=de(zIe,[["render",YIe]]),GIe={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:NIe,FollowAction:qIe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?Eh(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)}},XIe=["href"],KIe={class:"fcom_user_display_name"},ZIe={key:1,class:"user_route"},JIe=["href"],QIe={class:"fcom_user_display_name"},eLe={class:"fcom_profile_pop_avatar"},tLe={key:0,class:"fcom_prfile_tagline"},nLe={class:"fcom_level_name"},sLe={style:{display:"block"},class:"fcoml_level_sub meta_line"},iLe={class:"fcom_profile_pop_info"},oLe={class:"pop_info_header"},rLe={class:"header_name"},aLe=["href"],lLe={class:"fcom_user_display_name"},cLe={class:"fcom_user_name"},uLe={key:0,class:"header_actions"},dLe={key:0,class:"fcom_profile_pop_bio"},hLe=["title"],fLe=["title"],pLe={class:"pop_info_btns"},mLe=["href"],gLe=["href"];function vLe(t,e,n,s,i,o){const r=Y("verified-sign"),a=Y("UserBadge"),l=Y("UserAvatar"),c=zd,u=Y("follow-action"),d=Y("SocialLinks"),h=Bd,f=jo;return n.show_pop?(v(),E("span",ZIe,[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",QIe,$(n.xprofile.display_name),1)],8,JIe)])]),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",eLe,[y(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),E("div",tLe,[g("div",nLe,$(o.userLevel.title),1),g("div",sLe,$(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),y(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",iLe,[g("div",oLe,[g("div",rLe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",lLe,$(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,aLe),g("span",cLe," @"+$(n.xprofile.username),1)]),n.show_follow?(v(),E("div",uLe,[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(),E("div",dLe,$(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(),E("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},$(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,hLe)):O("",!0),n.xprofile.last_activity?(v(),E("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},$(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,fLe)):O("",!0),g("div",pLe,[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,mLe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),E("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,gLe)):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(),E("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(t.$slots,"default",{},()=>[g("p",KIe,$(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,XIe))}const sa=de(GIe,[["render",vLe]]),yLe={name:"MentionPopover",components:{UserRouteLink:sa},setup(){return{userStore:xS()}},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 bLe(t,e,n,s,i,o){const r=Y("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 _Le=de(yLe,[["render",bLe]]),wLe={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)}},kLe={class:"dialog_header"},CLe={class:"dialog_left"},xLe={class:"dialog_body"},SLe={class:"dialog_footer"};function $Le(t,e,n,s,i,o){const r=qe,a=xs;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",kLe,[g("div",CLe,[g("h4",null,$(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",SLe,[y(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),y(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[W($(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",xLe,[g("span",null,$(i.message),1)])]),_:1},8,["modelValue","width"])}const ALe=de(wLe,[["render",$Le]]),ELe={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")}}},MLe={class:"fcom_pagination_wrap"};function TLe(t,e,n,s,i,o){const r=Sve;return v(),E("div",MLe,[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 au=de(ELe,[["render",TLe]]),PLe={name:"ReportReviewModal",components:{Pagination:au},data(){return{isOpen:!1,loading:!1,content:{},postReports:[],report:null,type:null,ignoring:!1,unpublishing:!1,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},isContentLive(){var t;return((t=this.content)==null?void 0:t.status)=="published"},getPublishBtnText(){return this.isContentLive?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(this.type))},getUnpublishBtnText(){return this.isContentLive?this.$t("Unpublish")+" "+this.$t(this.ucFirst(this.type)):this.$t("Remove")+" "+this.$t(this.ucFirst(this.type))}},methods:{closeModal(){this.isOpen=!1,this.content={},this.type=null,this.postReports=[],this.report=null,this.pagination={page:1,per_page:10,total:0}},showReportReviewModal(t){this.isOpen=!0,this.content=t.content,this.type=t.type,this.getPostReports()},getPostReports(){var e;this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.type,space_id:(e=this.content)==null?void 0:e.space_id};this.type=="comment"?t.parent_id=this.content.id:t.post_id=this.content.id,this.$get("moderation/reports",t).then(n=>{this.postReports=n.reports.data,this.report=n.reports.data[0]||null,this.pagination.total=n.reports.total}).catch(n=>{this.$handleError(n)}).finally(()=>{this.loading=!1})},ignoreReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.ignoring=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"ignored"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"ignored",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.ignoring=!1})},unpublishReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.unpublishing=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"unpublished"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"unpublished",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.unpublishing=!1})}},created(){this.$eventBus.on("showReportReviewModal",this.showReportReviewModal)},beforeUnmount(){this.$eventBus.off("showReportReviewModal",this.showReportReviewModal)}},ILe={class:"dialog_body"},LLe={class:"report_details"},OLe={class:"report_details_header"},DLe={class:"report_details_header_left"},RLe={class:"report_details_header_right"},VLe={key:0},FLe={key:1},NLe={key:1},BLe={class:"report_reason"},zLe=["title"],HLe={key:0,class:"report_details_body"},ULe=["textContent"],jLe={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},WLe={class:"dialog_footer report_footer"};function YLe(t,e,n,s,i,o){const r=Y("UserAvatar"),a=Y("UserRouteLink"),l=Yt,c=Y("Pagination"),u=qe,d=xs;return v(),D(d,{modelValue:i.isOpen,"onUpdate:modelValue":e[3]||(e[3]=h=>i.isOpen=h),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl",onClose:o.closeModal},{footer:w(()=>[g("div",WLe,[y(u,{class:"fcom_secondary_button",onClick:e[1]||(e[1]=h=>o.unpublishReport()),loading:i.unpublishing,disabled:!i.loading&&!i.report},{default:w(()=>[W($(o.getUnpublishBtnText),1)]),_:1},8,["loading","disabled"]),y(u,{class:"fcom_primary_button",onClick:e[2]||(e[2]=h=>o.ignoreReport()),loading:i.ignoring,disabled:!i.loading&&!i.report},{default:w(()=>[W($(o.getPublishBtnText),1)]),_:1},8,["loading","disabled"])])]),default:w(()=>{var h,f;return[g("div",ILe,[g("h4",null,$(t.$t("Reports")+" ("+((f=(h=i.content)==null?void 0:h.meta)==null?void 0:f.reports_count)+")"),1),g("div",LLe,[i.loading?(v(),D(l,{key:1,rows:5,animated:!0})):(v(!0),E(te,{key:0},we(i.postReports,p=>(v(),E("div",{key:p.id,class:"report_details_item"},[g("div",OLe,[g("div",DLe,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",RLe,[!p.reporter&&!o.getReason(p.reason)?(v(),E("div",VLe,$(t.$t("Flagged automatically by the site rule")),1)):(v(),E("div",FLe,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),E("span",NLe,$(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),E(te,{key:2},[g("span",null,$(t.$t("reported for ")),1),g("span",BLe,$(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},$(t.humanDateDiff(p.created_at)),9,zLe)])]),p.explanation?(v(),E("div",HLe,[g("div",{textContent:$(p.explanation)},null,8,ULe)])):O("",!0)]))),128)),i.pagination.total?(v(),E("div",jLe,[y(c,{hide_on_single:!0,onFetch:e[0]||(e[0]=p=>o.getPostReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])])]}),_:1},8,["modelValue","width","onClose"])}const qLe=de(PLe,[["render",YLe]]),GLe={name:"ReportContentModal",data(){return{reportConfig:null,showModal:!1,saving:!1,contentType:"",reportReason:"",reportExplanation:""}},computed:{currentTitle(){return this.contentType=="comment"?this.$t("Report Comment"):this.$t("Report Post")}},methods:{closeModal(){this.showModal=!1},showReportContentModal(t){this.showModal=!0,this.reportReason="",this.reportExplanation="",this.contentType=t.type,this.reportConfig=t.reportConfig},validateAndSubmit(){if(!this.reportReason){this.$handleError(this.$t("Please select a reason for reporting this content"));return}this.submitReport()},getParentId(){return this.contentType=="comment"?this.reportConfig.id:null},getPostId(){return this.contentType=="post"?this.reportConfig.id:this.reportConfig.post_id},submitReport(){this.saving=!0,this.$post("moderation/report",{content_type:this.contentType,user_id:this.auth.user_id,post_id:this.getPostId(),parent_id:this.getParentId(),reason:this.reportReason,explanation:this.reportExplanation}).then(t=>{this.$notify.success(t.message),this.$eventBus.emit("updateModerationReport",{content:t.content,action:"reported"}),this.closeModal()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},created(){this.$eventBus.on("showReportContentModal",this.showReportContentModal)},beforeUnmount(){this.$eventBus.off("showReportContentModal",this.showReportContentModal)}},XLe={class:"dialog_header"},KLe={class:"dialog_left"},ZLe={class:"dialog_body"},JLe={class:"fcom_report_content_form"},QLe={class:"dialog_footer"};function eOe(t,e,n,s,i,o){const r=nn,a=Zt,l=tn,c=vt,u=cn,d=qe,h=xs;return i.showModal?(v(),D(h,{key:0,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,width:t.drawerWidth,modelValue:i.showModal,"onUpdate:modelValue":e[4]||(e[4]=f=>i.showModal=f),direction:"rtl",onClose:o.closeModal},{header:w(()=>[g("div",XLe,[g("div",KLe,[g("h4",null,$(o.currentTitle),1)])])]),footer:w(()=>[g("div",QLe,[y(d,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=f=>o.closeModal())},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(d,{class:"fcom_primary_button",onClick:e[3]||(e[3]=f=>o.validateAndSubmit()),loading:i.saving},{default:w(()=>[W($(t.$t("Report")),1)]),_:1},8,["loading"])])]),default:w(()=>[g("div",ZLe,[g("div",JLe,[y(u,{ref:"reportForm","label-position":"top"},{default:w(()=>[y(l,{label:t.$t("Reason")},{default:w(()=>[y(a,{modelValue:i.reportReason,"onUpdate:modelValue":e[0]||(e[0]=f=>i.reportReason=f),placeholder:t.$t("Please select a reason for reporting this content")},{default:w(()=>[(v(!0),E(te,null,we(t.appVars.report_reasons,(f,p)=>(v(),D(r,{key:p,label:f,value:p},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),y(l,{label:t.$t("Explanation")},{default:w(()=>[y(c,{modelValue:i.reportExplanation,"onUpdate:modelValue":e[1]||(e[1]=f=>i.reportExplanation=f),placeholder:t.$t("Provide an explanation (Optional)"),type:"textarea",rows:4,maxlength:1e3,"show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},512)])])]),_:1},8,["width","modelValue","onClose"])):O("",!0)}const tOe=de(GLe,[["render",eOe]]);/*! Element Plus v2.13.6 */var JH={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 nOe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(nOe))JH.el[t]=e;const sOe={name:"PortalApplication",components:{Back:sR,SpaceCreateModal:xPe,CourseIcon:YH,AnalyticsIcon:qae,MentionPopover:_Le,UnfinishedChangesModal:ALe,ReportReviewModal:qLe,ReportContentModal:tOe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:JH}},created(){this.isSmallScreen=window.innerWidth<=1024}},iOe={class:"fcom_general_menu"},oOe=["href"],rOe={class:"el-icon fcom_arrow_icon"},aOe={class:"fcom_communities_menu fcom_admin_menu"},lOe={class:"fcom_general_menu"},cOe={class:"community_avatar"},uOe={class:"fcom_shape"},dOe={class:"community_name"},hOe={class:"fcom_general_menu"},fOe={class:"community_avatar"},pOe={class:"fcom_shape"},mOe={class:"community_name"},gOe={class:"fcom_general_menu"},vOe={class:"community_avatar"},yOe={class:"fcom_shape"},bOe={class:"community_name"};function _Oe(t,e,n,s,i,o){const r=Y("router-view"),a=Y("Back"),l=_e,c=Y("router-link"),u=Y("CourseIcon"),d=Y("AnalyticsIcon"),h=Y("space-create-modal"),f=Y("mention-popover"),p=Y("unfinished-changes-modal"),m=Y("report-review-modal"),b=Y("report-content-modal"),_=Sde;return v(),D(_,{locale:i.enLang},{default:w(()=>[y(r),(v(),D(Pa,{to:"#fcom_menu_sidebar"},[g("ul",iOe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",rOe,[y(a)]),g("span",null,$(t.$t("Back to home")),1)],8,oOe)])]),g("div",aOe,[Object.keys(i.menuItems).length>0?(v(),E(te,{key:0},[g("h4",null,$(t.$t("Portal Settings")),1),g("ul",lOe,[(v(!0),E(te,null,we(i.menuItems,k=>(v(),E("li",{key:k.route,class:q("settings_inner_menu_"+k.route)},[y(c,{to:{name:k.route}},{default:w(()=>[g("div",cOe,[g("span",uOe,[y(l,{innerHTML:k.icon_svg},null,8,["innerHTML"])])]),g("span",dOe,$(k.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),E(te,{key:1},[g("h4",null,$(t.$t("Course Management")),1),g("ul",hOe,[g("li",null,[y(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",fOe,[g("span",pOe,[y(l,null,{default:w(()=>[y(u)]),_:1})])]),g("span",mOe,$(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),E(te,{key:2},[g("h4",null,$(t.$t("Reports")),1),g("ul",gOe,[g("li",null,[y(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",vOe,[g("span",yOe,[y(l,null,{default:w(()=>[y(d)]),_:1})])]),g("span",bOe,$(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),y(h),y(f),y(p),y(m),y(b)]),_:1},8,["locale"])}const wOe=de(sOe,[["render",_Oe]]),kOe={name:"AddMembersForm",components:{SpaceCourseSelector:CS},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()}},COe={class:"fcom_add_members_form"},xOe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},SOe={key:1,class:"fcom_import_done"},$Oe={class:"fcom_done_title"},AOe={class:"fcom_done_subtitle"},EOe={class:"fcom_import_summary"},MOe={class:"fcom_import_summary_title"},TOe={class:"fcom_import_summary_row"},POe={class:"fcom_import_summary_row"},IOe={key:0,class:"fcom_import_summary_row"},LOe={key:1,class:"fcom_import_summary_row"},OOe={key:2,class:"fcom_import_progress_wrap"},DOe={class:"fcom_help_text fcom_mb_15"},ROe={key:0,class:"fcom_muted_text fcom_mt_10"},VOe={class:"fcom_select_photo",style:{float:"left"}},FOe=["src","alt"],NOe={style:{float:"right",color:"#8492a6","font-size":"13px"}},BOe={style:{padding:"4px","text-align":"center"}},zOe={style:{margin:"0 0 8px"}},HOe={key:0},UOe={key:1},jOe={key:2},WOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},YOe={key:0,class:"fcom_help_text fcom_mb_10"},qOe=["href"],GOe={class:"fcom_help_text fcom_mb_15"},XOe={key:0},KOe={key:2},ZOe={class:"fcom_spaced_flex fcom_mb_10"},JOe={class:"fcom_csv_drop_inner"},QOe={class:"el-upload__text fcom_mt_10"},eDe={key:0},tDe={class:"el-upload__tip"},nDe={class:"fcom_spaced_flex fcom_mb_10"},sDe={class:"fcom_muted_text",style:{"margin-left":"8px"}},iDe={key:0,class:"fcom_muted_text fcom_mb_10"},oDe=["aria-label"],rDe={class:"fcom_help_text fcom_mb_15"},aDe=["aria-label"],lDe={class:"fcom_help_text fcom_mb_15"},cDe={key:0};function uDe(t,e,n,s,i,o){const r=mp,a=Os,l=r2,c=nn,u=qe,d=Zt,h=tn,f=cn,p=Y("SpaceCourseSelector"),m=q1,b=ea,_=Qr,k=Jt,C=xt("loading");return v(),E("div",COe,[!i.batchRunning&&!i.importDone?(v(),E("div",xOe,[y(a,{modelValue:i.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=x=>i.sourceMode=x),size:"small"},{default:w(()=>[y(r,{value:"wp_users"},{default:w(()=>[W($(t.$t("WP Users")),1)]),_:1}),y(r,{value:"from_source"},{default:w(()=>[W($(t.$t("From Space/Course")),1)]),_:1}),y(r,{value:"csv"},{default:w(()=>[W($(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:w(()=>[W($(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),i.importDone?(v(),E("div",SOe,[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",$Oe,$(t.$t("All Done!")),1),g("p",AOe,$(t.$t("Import has been completed. You may close this now.")),1),g("div",EOe,[g("strong",MOe,$(t.$t("Import Summary")),1),g("p",TOe,$(t.$t("Total Records:"))+" "+$(i.importDone.total),1),g("p",POe,$(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+$(i.importDone.added),1),i.importDone.skipped?(v(),E("p",IOe,$(t.$t("Skipped:"))+" "+$(i.importDone.skipped),1)):O("",!0),i.importDone.failed?(v(),E("p",LOe,$(t.$t("Failed:"))+" "+$(i.importDone.failed),1)):O("",!0)])])):i.batchRunning?(v(),E("div",OOe,[g("div",DOe,[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(),E("p",ROe,$(i.batchProcessed)+" / "+$(i.batchTotal)+" "+$(t.$t("processed")),1)):O("",!0)])):(v(),E(te,{key:3},[i.sourceMode==="wp_users"?(v(),D(f,{key:0,onSubmit:e[5]||(e[5]=Oe(()=>{},["prevent"])),"label-position":"top"},{default:w(()=>[y(h,{label:t.$t("Users")},{default:w(()=>[y(d,{class:"rich_select","fit-input-width":"",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]=x=>i.selectedUserIds=x)},{empty:w(()=>[g("div",BOe,[g("p",zOe,[o.isEmail?(v(),E("span",HOe,[W($(t.$t("User not registered:"))+" ",1),g("strong",null,$(i.currentSearch),1)])):i.currentSearch?(v(),E("span",UOe,$(t.$t("No matching user found.")),1)):(v(),E("span",jOe,$(t.$t("No data")),1))]),n.context==="space"?(v(),E(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]=x=>o.inviteToSpace())},{default:w(()=>[W($(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):i.currentSearch?(v(),E("p",WOe,$(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:w(()=>[(v(!0),E(te,null,we(i.wpUsers,x=>(v(),D(c,{class:"fcom_with_photo_option",key:x.ID,label:`${x.display_name} (${x.user_email||x.ID})`,value:x.ID},{default:w(()=>[g("span",VOe,[g("img",{src:x.photo,alt:x.display_name},null,8,FOe),g("span",null,$(x.display_name),1)]),g("span",NOe,$(x.user_email||x.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]=x=>i.role=x),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(),E("div",YOe,[g("p",null,[W($(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),E("a",{key:0,href:t.$upgradeUrl("feature_lock_bulk_add_members"),target:"_blank"},$(t.$t("Upgrade")),9,qOe)):O("",!0)])])):O("",!0),Re((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=x=>o.addWpUsers())},{default:w(()=>[W($(n.context==="course"?t.$t("Add Students"):t.$t("Add as %s",i.role)),1)]),_:1})),[[C,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]=x=>i.selectedSourceId=x),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[7]||(e[7]=x=>i.selectedSourceType=x),onSelectedSlug:e[8]||(e[8]=x=>i.selectedSourceSlug=x)},null,8,["modelValue","placeholder_text","memberships"])]),_:1},8,["label"]),g("div",GOe,[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]=x=>o.importFromSource())},{default:w(()=>[W($(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),E("span",XOe," ("+$(t.$t("Pro"))+")",1))]),_:1})]),_:1})):i.sourceMode==="csv"?(v(),E("div",KOe,[i.csvRows.length?(v(),E(te,{key:1},[g("div",nDe,[g("div",null,[g("strong",null,$(i.csvFileName),1),g("span",sDe,$(i.csvRows.length)+" "+$(t.$t("contacts")),1)]),y(u,{link:"",size:"small",onClick:e[11]||(e[11]=x=>o.resetCsvImport())},{default:w(()=>[W($(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(),E("p",iDe," + "+$(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(k,{modelValue:i.createMissingUsers,"onUpdate:modelValue":e[12]||(e[12]=x=>i.createMissingUsers=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(y(k,{modelValue:i.sendWelcomeEmailCsv,"onUpdate:modelValue":e[13]||(e[13]=x=>i.sendWelcomeEmailCsv=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[Ht,i.createMissingUsers]])])],8,oDe)]),_:1}),g("div",rDe,[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]=x=>o.importCsv())},{default:w(()=>[W($(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),E(te,{key:0},[g("div",ZOe,[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]=x=>o.downloadSampleCsv())},{default:w(()=>[W("↓ "+$(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",tDe,$(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",JOe,[e[22]||(e[22]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",QOe,[W($(t.$t("Drop CSV here or"))+" ",1),g("em",null,$(t.$t("click to browse")),1),e[21]||(e[21]=W()),t.appVars.pro?O("",!0):(v(),E("span",eDe," ("+$(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]=x=>i.selectedTagId=x),loading:i.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:w(()=>[(v(!0),E(te,null,we(i.crmTags,x=>(v(),D(c,{key:x.id,label:x.title,value:x.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(k,{modelValue:i.createMissingCrmUsers,"onUpdate:modelValue":e[16]||(e[16]=x=>i.createMissingCrmUsers=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(y(k,{modelValue:i.sendWelcomeEmailCrm,"onUpdate:modelValue":e[17]||(e[17]=x=>i.sendWelcomeEmailCrm=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[Ht,i.createMissingCrmUsers]])])],8,aDe)]),_:1}),g("div",lDe,[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]=x=>o.addFromCrmTag())},{default:w(()=>[W($(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),E("span",cDe," ("+$(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const dDe=de(kOe,[["render",uDe]]),hDe={name:"ExportIcon"},fDe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pDe(t,e,n,s,i,o){return v(),E("svg",fDe,[...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 QH=de(hDe,[["render",pDe]]),mDe={name:"CourseMembers",props:["course"],components:{Search:Q_,UserRouteLink:sa,Pagination:au,AddMembersForm:dDe,ExportIcon:QH},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()},restartStudent(t){this.$confirm(this.$t("Restart progress for %s?",t.display_name),this.$t("Restart Progress"),{confirmButtonText:this.$t("Yes, restart"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id+"/progress").then(e=>{this.$notify.success(e.message),this.fetchStudents()}).catch(e=>{this.$handleError(e)})}).catch(()=>{})},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()}},gDe={class:"fcom_course_members"},vDe={class:"fcom_course_member_header"},yDe={class:"fcom_course_member_actions"},bDe={key:0},_De={key:1},wDe={class:"search_member fcom_mb_20"},kDe={class:"table_user_card"},CDe={class:"card_avatar"},xDe={class:"card_info"},SDe={class:"card_name"},$De={key:0,class:"meta_line"},ADe={class:"progress_wrap"},EDe=["title"],MDe=["title"];function TDe(t,e,n,s,i,o){const r=Y("ExportIcon"),a=_e,l=qe,c=Y("Search"),u=vt,d=Y("UserAvatar"),h=Y("UserRouteLink"),f=ea,p=r2,m=Y("MoreFilled"),b=Da,_=Ra,k=Oa,C=Qr,x=Y("pagination"),S=Y("add-members-form"),M=Tl,P=xt("loading");return v(),E("div",gDe,[g("div",vDe,[g("h3",null,$(t.$t("Course Students")),1),g("div",yDe,[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(),E("span",bDe,$(t.$t("Export")),1)):(v(),E("span",_De,$(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(()=>[W($(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",wDe,[y(u,{onKeydown:kt(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"])]),Re((v(),D(C,{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 I;return[g("div",kDe,[g("div",CDe,[y(d,{xprofile:T.row},null,8,["xprofile"])]),g("div",xDe,[g("div",SDe,[y(h,{show_badge:!0,xprofile:T.row},null,8,["xprofile"])]),T.row.short_description?(v(),E("div",$De,$(t.getExcerpt(((I=T.row.meta)==null?void 0:I.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",ADe,[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,EDe)]),_: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,MDe)]),_:1},8,["label"]),y(f,{width:"60"},{default:w(T=>[t.hasCourseCreatorAccess()?(v(),D(k,{key:0,trigger:"click"},{dropdown:w(()=>[y(_,null,{default:w(()=>[O("",!0),y(b,{onClick:I=>o.removeStudentPrompt(T.row)},{default:w(()=>[W($(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(x,{hide_on_single:!0,onFetch:o.fetchStudents,pagination:i.pagination},null,8,["onFetch","pagination"]),y(M,{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 PDe=de(mDe,[["render",TDe]]),IDe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:q4},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 s;const n=(s=this.userAnswers[t.slug])==null?void 0:s.user_answer;return Array.isArray(n)?n.includes(e.label):n===e.label},isSingleChoice(t){return t.type==="single_choice"},isWrittenAnswer(t){return t.type==="written_answer"},isExactMatchQuestion(t){return t.grading_mode==="exact_match"},freeTextBadgeClass(t){return this.isExactMatchQuestion(t)?this.isQuestionCorrect(t)?"correct":"incorrect":"correct"},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")})}}},LDe={class:"dialog_header"},ODe={class:"dialog_left"},DDe={class:"fcom_view_quiz_result"},RDe={class:"fcom_result_details"},VDe={class:"fcom_questions_wrap"},FDe={key:0,class:"fcom_question_image"},NDe={class:"fcom_question_header"},BDe=["innerHTML"],zDe={class:"fcom_question_body"},HDe={key:0,class:"correct_text"},UDe={key:1,class:"correct_text"},jDe={class:"fcom_written_answer_answer"},WDe={class:"fcom_user_answer_text"},YDe={key:0,class:"correct_text"},qDe={key:1,class:"correct_text"},GDe={class:"fcom_question_options"},XDe={key:2,class:"question_help_text"},KDe={class:"fcom_result_info"},ZDe={class:"result_info_item"},JDe={class:"left_side"},QDe={class:"sub_title"},eRe={class:"right_side"},tRe={class:"result_info_item"},nRe={class:"left_side"},sRe={class:"title"},iRe={class:"sub_title"},oRe={class:"result_info_item"},rRe={class:"left_side"},aRe={class:"title"},lRe={class:"sub_title"},cRe={class:"result_info_item"},uRe={class:"left_side"},dRe={class:"title"},hRe={class:"score"},fRe={class:"right_side"},pRe={class:"title"},mRe={class:"score"},gRe={class:"result_info_item"},vRe={class:"left_side"},yRe={class:"title"},bRe={class:"dialog_footer"};function _Re(t,e,n,s,i,o){const r=Cr,a=Y("Check"),l=_e,c=Y("Close"),u=Jt,d=Y("UserRouteLink"),h=Y("UserAvatar"),f=nn,p=Zt,m=qe,b=xs;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",LDe,[g("div",ODe,[g("h4",null,$(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",bRe,[y(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),y(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[W($(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var _;return[g("div",DDe,[g("div",RDe,[g("div",VDe,[(v(!0),E(te,null,we(o.questions,k=>{var C;return v(),E(te,{key:k.slug},[o.showQuestion(k)?(v(),E("div",{key:0,class:q(["fcom_question",k.type])},[o.showQuestionImage(k)?(v(),E("div",FDe,[y(r,{src:k.image_url},null,8,["src"])])):O("",!0),g("div",NDe,[g("div",{innerHTML:k.label_rendered,class:"fcom_question_label"},null,8,BDe)]),g("div",zDe,[o.isWrittenAnswer(k)?(v(),E(te,{key:0},[g("div",{class:q(["fcom_is_correct",o.freeTextBadgeClass(k)])},[o.isExactMatchQuestion(k)?(v(),E("p",HDe,[o.isQuestionCorrect(k)?(v(),E(te,{key:0},[y(l,null,{default:w(()=>[y(a)]),_:1}),W(" "+$(t.$t("Correct")),1)],64)):(v(),E(te,{key:1},[y(l,null,{default:w(()=>[y(c)]),_:1}),W(" "+$(t.$t("Incorrect")),1)],64))])):(v(),E("p",UDe,[y(l,null,{default:w(()=>[y(a)]),_:1}),W(" "+$(t.$t("Answered")),1)]))],2),g("div",jDe,[g("div",WDe,$((C=i.userAnswers[k.slug])==null?void 0:C.user_answer),1)])],64)):(v(),E(te,{key:1},[g("div",{class:q(["fcom_is_correct",o.isQuestionCorrect(k)?"correct":"incorrect"])},[o.isQuestionCorrect(k)?(v(),E("p",YDe,[y(l,null,{default:w(()=>[y(a)]),_:1}),W(" "+$(t.$t("Correct")),1)])):(v(),E("p",qDe,[y(l,null,{default:w(()=>[y(c)]),_:1}),W(" "+$(t.$t("Incorrect")),1)]))],2),g("div",GDe,[(v(!0),E(te,null,we(k.options,x=>(v(),E("div",{key:x.label,class:"fcom_question_option"},[y(u,{class:q({single_choice:o.isSingleChoice(k)}),"model-value":o.isOptionSelected(k,x),onChange:S=>o.handleOptionChange(k,x)},{default:w(()=>[W($(x.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))])],64)),k.help_text?(v(),E("div",XDe,$(k.help_text),1)):O("",!0)])],2)):O("",!0)],64)}),128))])]),g("div",KDe,[g("div",ZDe,[g("div",JDe,[y(d,{show_badge:!0,xprofile:i.xprofile},null,8,["xprofile"]),g("div",QDe,$(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",eRe,[y(h,{xprofile:i.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",tRe,[g("div",nRe,[g("div",sRe,$(n.result.lesson.title),1),g("div",iRe,$((_=n.course)==null?void 0:_.title),1)])]),g("div",oRe,[g("div",rRe,[g("div",aRe,$(t.$t("Submitted")),1),g("div",lRe,$(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",cRe,[g("div",uRe,[g("div",dRe,$(t.$t("Score")),1),g("div",hRe,$(n.result.score+"%"),1)]),g("div",fRe,[g("div",pRe,$(t.$t("Correct")),1),g("div",mRe,$(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",gRe,[g("div",vRe,[g("div",yRe,$(t.$t("Did the student pass or fail?")),1),y(p,{modelValue:i.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=k=>i.currentStatus=k),placeholder:t.$t("-- Select --")},{default:w(()=>[(v(!0),E(te,null,we(Object.keys(i.statuses),k=>(v(),D(f,{key:k,label:i.statuses[k],value:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const wRe=de(IDe,[["render",_Re]]),kRe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:sa,Pagination:au,ViewQuizResult:wRe,Search:Q_,ExportIcon:QH},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()}},CRe={class:"fcom_course_members"},xRe={class:"fcom_course_member_header"},SRe={key:0,class:"fcom_course_member_actions"},$Re={class:"search_member"},ARe={class:"feed_filters"},ERe={id:"feed_short_by",class:"fcom_feed_filter_label"},MRe={class:"table_user_card"},TRe={class:"card_avatar"},PRe={class:"card_info"},IRe={class:"card_name"},LRe={class:"meta_line"};function ORe(t,e,n,s,i,o){const r=Y("ExportIcon"),a=_e,l=qe,c=Y("Search"),u=vt,d=nn,h=Zt,f=Y("UserAvatar"),p=Y("UserRouteLink"),m=ea,b=Ai,_=Qr,k=Y("pagination"),C=Y("ViewQuizResult"),x=xt("loading");return v(),E("div",CRe,[g("div",xRe,[g("h3",null,$(t.$t("Quiz Results")),1),t.has_pro?(v(),E("div",SRe,[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",$Re,[y(u,{clearable:"",onClear:o.toSearch,onKeydown:kt(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",ARe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",ERe,$(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"])]),Re((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 M;return[g("div",MRe,[g("div",TRe,[y(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",PRe,[g("div",IRe,[y(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",LRe,$(t.getExcerpt((M=S.row.lesson)==null?void 0:M.title,160)),1)])])]}),_:1},8,["label"]),y(m,{width:"260",label:t.$t("Submitted Date")},{default:w(S=>[W($(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),y(m,{width:"120",label:t.$t("Score")},{default:w(S=>[W($(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(()=>[W($(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:M=>o.isOpenResult(S.row)},{default:w(()=>[W($(t.$t("View")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[x,i.loading]]),y(k,{hide_on_single:!0,onFetch:o.fetchResults,pagination:i.pagination},null,8,["onFetch","pagination"]),i.openResult?(v(),D(C,{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 DRe=de(kRe,[["render",ORe]]),RRe={name:"ChatIcon"},VRe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FRe(t,e,n,s,i,o){return v(),E("svg",VRe,[...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 eU=de(RRe,[["render",FRe]]),NRe={name:"HeartIcon",props:{filled:{default:!1}}},BRe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},zRe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function HRe(t,e,n,s,i,o){return n.filled?(v(),E("svg",BRe,[...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(),E("svg",zRe,[...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 B2=de(NRe,[["render",HRe]]),URe={name:"ImageIcon"},jRe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function WRe(t,e,n,s,i,o){return v(),E("svg",jRe,[...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 tU=de(URe,[["render",WRe]]),YRe={name:"PollIcon"},qRe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function GRe(t,e,n,s,i,o){return v(),E("svg",qRe,[...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 XRe=de(YRe,[["render",GRe]]),KRe={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)}}},ZRe={class:"fcom_compose_app_form"},JRe={class:"fcom_app_header"},QRe={class:"fcom_app_options"},eVe={class:"fcom_app_pref"},tVe={class:"fcom_app_footer"},nVe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function sVe(t,e,n,s,i,o){const r=qe,a=vt,l=Y("Plus"),c=_e,u=Jt,d=Ud;return v(),E("div",ZRe,[g("div",JRe,[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(()=>[W($(t.$t("cancel")),1)]),_:1})])]),g("div",QRe,[(v(!0),E(te,null,we(n.form.options,(h,f)=>(v(),E("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")},fs({_: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]=[W("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",eVe,[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",tVe,[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(()=>[W($(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",nVe,$(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 iVe=de(KRe,[["render",sVe]]),oVe={name:"GiphyIcon"},rVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function aVe(t,e,n,s,i,o){return v(),E("svg",rVe,[...e[0]||(e[0]=[Ia('<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 lVe=de(oVe,[["render",aVe]]);var cVe=Va,uVe=function(){return cVe.Date.now()},dVe=uVe,hVe=/\s/;function fVe(t){for(var e=t.length;e--&&hVe.test(t.charAt(e)););return e}var pVe=fVe,mVe=pVe,gVe=/^\s+/;function vVe(t){return t&&t.slice(0,mVe(t)+1).replace(gVe,"")}var yVe=vVe,bVe=G1,_Ve=X1,wVe="[object Symbol]";function kVe(t){return typeof t=="symbol"||_Ve(t)&&bVe(t)==wVe}var z2=kVe,CVe=yVe,lT=K1,xVe=z2,cT=0/0,SVe=/^[-+]0x[0-9a-f]+$/i,$Ve=/^0b[01]+$/i,AVe=/^0o[0-7]+$/i,EVe=parseInt;function MVe(t){if(typeof t=="number")return t;if(xVe(t))return cT;if(lT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=lT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=CVe(t);var n=$Ve.test(t);return n||AVe.test(t)?EVe(t.slice(2),n?2:8):SVe.test(t)?cT:+t}var TVe=MVe,PVe=K1,F3=dVe,uT=TVe,IVe="Expected a function",LVe=Math.max,OVe=Math.min;function DVe(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(IVe);e=uT(e)||0,PVe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?LVe(uT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=s,T=i;return s=i=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(_,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?OVe(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var M=F3();if(b(M))return k(M);a=setTimeout(_,m(M))}function k(M){return a=void 0,h&&s?f(M):(s=i=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:k(F3())}function S(){var M=F3(),P=b(M);if(s=arguments,i=this,l=M,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=C,S.flush=x,S}var RVe=DVe;const VVe=pi(RVe),FVe={name:"Giphy",components:{GiphyIcon:lVe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var e,n;if(this.offset===0&&((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:VVe(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()}}},NVe={class:"fcom_giphy_composer"},BVe={class:"search-container"},zVe=["onLoad","src","alt","onClick"],HVe={key:0,class:"img_loading"},UVe={key:1,class:"no_result"};function jVe(t,e,n,s,i,o){const r=vt,a=zd,l=Bd,c=Y("GiphyIcon"),u=_e,d=qe,h=jo,f=xt("loading");return v(),E("div",NVe,[y(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click",teleported:!1,"popper-class":"fcom_giphy_popover fcom_menu_below_nav",ref:"popover"},{reference:w(()=>[y(d,{"aria-label":"Pick GIF",text:"",onClick:o.handleGiphyClick},{default:w(()=>[y(u,{class:q(["fcom_apps_icon"])},{default:w(()=>[y(c)]),_:1})]),_:1},8,["onClick"])]),default:w(()=>[Re((v(),E("div",BVe,[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),E(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,zVe),p.loaded?O("",!0):(v(),E("p",HVe))]),_:2},1024))),128))]),_:1})):(v(),E("p",UVe,$(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 WVe=de(FVe,[["render",jVe]]),YVe={name:"VideoIcon"},qVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function GVe(t,e,n,s,i,o){return v(),E("svg",qVe,[...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 XVe=de(YVe,[["render",GVe]]),KVe={name:"FluentPlayerPreview",emits:["load-failed"],props:{media:{type:Object,required:!0}},data(){return{html:"",loading:!1,playerInstanceKey:"",fallbackGuardCleanups:[],guardGeneration:0}},watch:{"media.url"(){this.loadFluentPlayerContent()}},async mounted(){await this.loadFluentPlayerContent()},beforeUnmount(){this.clearFallbackGuard()},methods:{getFallbackTiming(t,e){var s,i;const n=Number((i=(s=this.appVars.features.fluent_player)==null?void 0:s.fallback)==null?void 0:i[t]);return!Number.isFinite(n)||n<500?e:n},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.clearFallbackGuard();const t=++this.guardGeneration;this.loading=!0;try{if(!this.appVars.features.has_fluent_player||this.appVars.features.enable_fluent_player!=="yes"){this.$emit("load-failed");return}const e=this.getStableMediaId(),n=await this.withTimeout(this.$get("fluent-player/video-content/"+e,{...this.media,media_id:e,player_instance_key:this.getPlayerInstanceKey()}),this.getFallbackTiming("content_timeout_ms",1e4));if(t!==this.guardGeneration)return;n.html?(this.html=n.html,this.$nextTick(()=>{if(t!==this.guardGeneration)return;const s=this.$el&&this.$el.querySelector(".fluent-player");if(!s){this.fallBack("player markup missing");return}this.startFallbackGuard(s,n.media)})):this.$emit("load-failed")}catch(e){if(t!==this.guardGeneration)return;console.warn("Failed to load fluent-player assets:",e),this.$emit("load-failed")}finally{t===this.guardGeneration&&(this.loading=!1)}},withTimeout(t,e){return Promise.race([t,new Promise((n,s)=>{const i=setTimeout(()=>s(new Error("fluent-player content request timed out")),e);this.fallbackGuardCleanups.push(()=>clearTimeout(i))})])},startFallbackGuard(t,e){const n=()=>{document.dispatchEvent(new CustomEvent("InitSingleFluentPlayer",{detail:{container:t,playerData:{media:e}}}))};this.waitForPlayerScript(this.getFallbackTiming("script_timeout_ms",12e3),s=>{if(!s){this.fallBack("player script never loaded");return}n(),this.verifyPlayerInit(t)})},waitForPlayerScript(t,e){const n=()=>typeof window.FluentPlayer=="function";if(n()){e(!0);return}const s=document.querySelector('script[src*="fluent-player.js"]');let i=!1;const o=()=>{i=!0};s&&s.addEventListener("error",o);const r=()=>!s||!window.performance||!performance.getEntriesByType?!1:performance.getEntriesByType("resource").some(h=>h.name===s.src&&h.responseEnd>0);let a=0,l=0;const c=this.getFallbackTiming("script_grace_ms",2e3),u=setInterval(()=>{if(a+=250,n()){d(),e(!0);return}s&&(i||r())&&(l+=250),(l>=c||a>=t)&&(d(),e(!1))},250),d=()=>{clearInterval(u),s&&s.removeEventListener("error",o)};this.fallbackGuardCleanups.push(d)},verifyPlayerInit(t){const e=()=>{const i=t.querySelector("media-player");return!!(i&&i.hasAttribute("data-media-player"))};if(e()){this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t);return}let n=0;const s=setInterval(()=>{n+=250,e()?(clearInterval(s),this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t)):n>=this.getFallbackTiming("init_timeout_ms",3e3)&&(clearInterval(s),this.fallBack("player did not initialize"))},250);this.fallbackGuardCleanups.push(()=>clearInterval(s))},enhanceAudioSpeedLabel(t){try{const e=t.querySelector("media-player");if(!(e&&(e.getAttribute("view-type")==="audio"||t.querySelector(".fp-audio-layout"))))return;const s=t.querySelector(".fp-speed-menu media-menu-button");if(!s)return;const i=s.querySelector('media-icon[type="odometer"]');i&&(i.style.display="none");let o=s.querySelector(".fcom_speed_label");o||(o=document.createElement("span"),o.className="fcom_speed_label",s.appendChild(o));const r=()=>{const a=Number(e.playbackRate)||1;o.textContent=(Number.isInteger(a)?a:a.toFixed(2).replace(/0+$/,"").replace(/\.$/,""))+"x"};r(),e.addEventListener("rate-change",r),this.fallbackGuardCleanups.push(()=>e.removeEventListener("rate-change",r))}catch{}},watchCanPlay(t){const e=t.querySelector("media-player");if(!e){this.fallBack("media-player element missing");return}if(e.hasAttribute("data-can-play"))return;let n=0,s=!1;const i=this.getFallbackTiming("stall_timeout_ms",12e3),o=1e3,r=()=>{n=0},a=["load-start","source-change","provider-change","loaded-metadata","loaded-data","progress","waiting","play"];a.forEach(_=>e.addEventListener(_,r));let l=null;const c=()=>{const _=e.querySelector("iframe");_&&_!==l&&(l=_,l.addEventListener("load",r),r())};c();let u=null;const d=()=>{u&&(clearInterval(u),u=null)},h=()=>{u||(u=setInterval(b,o))},f="IntersectionObserver"in window?new IntersectionObserver(_=>{const k=_[_.length-1];s=!!(k&&k.isIntersecting),s?(n=0,h()):d()}):null,p=()=>m();e.addEventListener("can-play",p);const m=()=>{d(),e.removeEventListener("can-play",p),a.forEach(_=>e.removeEventListener(_,r)),l&&l.removeEventListener("load",r),f&&f.disconnect()},b=()=>{if(!document.body.contains(e)||e.hasAttribute("data-can-play")){m();return}c(),!(!s||!e.hasAttribute("data-can-load"))&&(n+=o,n>=i&&(m(),this.fallBack("player stalled before becoming playable")))};f?f.observe(e):(s=!0,h()),this.fallbackGuardCleanups.push(m)},fallBack(t){this.clearFallbackGuard(),console.warn("FluentPlayer: switching to standard media render ("+t+")"),this.html="",this.$emit("load-failed")},clearFallbackGuard(){const t=this.fallbackGuardCleanups;this.fallbackGuardCleanups=[],t.forEach(e=>{try{e()}catch{}})}}},ZVe={class:"fluent-player-preview"},JVe={key:0,class:"player-container"},QVe=["innerHTML"];function eFe(t,e,n,s,i,o){const r=Yt;return v(),E("div",ZVe,[i.html?(v(),E("div",JVe,[g("div",{innerHTML:i.html},null,8,QVe)])):O("",!0),i.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const nU=de(KVe,[["render",eFe],["__scopeId","data-v-e627e334"]]),tFe={name:"TuneIcon"},nFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",focusable:"false"};function sFe(t,e,n,s,i,o){return v(),E("svg",nFe,[...e[0]||(e[0]=[g("path",{d:"M6 4v6M6 14v6M12 4v3M12 11v9M18 4v9M18 17v3",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),g("path",{d:"M4 12h4M10 9h4M16 15h4",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1)])])}const iFe=de(tFe,[["render",sFe]]),oFe={name:"AudioList",components:{FluentPlayerPreview:nU,TuneIcon:iFe,Close:Bo},emits:["remove","edit"],props:{feed:{type:Object,default:null},audios:{type:Array,default:()=>[]},editable:{type:Boolean,default:!1}},data(){return{failedItems:{}}},methods:{onLoadFailed(t){this.failedItems={...this.failedItems,[t]:!0}},audioUrl(t){var e;return((e=t.settings)==null?void 0:e.src)||t.url||""},audioType(t){const n=this.audioUrl(t).split("?")[0].split("#")[0].split(".").pop().toLowerCase();return{mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"}[n]||"audio/mpeg"},audioKey(t,e){var i,o;const n=((i=t.settings)==null?void 0:i.posterSrc)||t.image||"",s=((o=t.settings)==null?void 0:o.title)||t.title||"";return(t.media_id||e)+"|"+n+"|"+s},playerMediaFor(t){var n,s;const e={...t,feed_id:((n=this.feed)==null?void 0:n.id)||t.feed_id||"",share_url:((s=this.feed)==null?void 0:s.permalink)||t.share_url||""};return this.editable&&(e.controls={...t.controls||{},settings:!1}),e}}},rFe={class:"fcom_audio_list"},aFe={key:1,class:"fcom_audio_native_wrap"},lFe={class:"fcom_audio_native",controls:"",preload:"metadata"},cFe=["src","type"],uFe=["aria-label","onClick"],dFe=["aria-label","onClick"];function hFe(t,e,n,s,i,o){const r=Y("fluent-player-preview"),a=Y("tune-icon"),l=Y("Close"),c=_e;return v(),E("div",rFe,[(v(!0),E(te,null,we(n.audios,(u,d)=>(v(),E("div",{key:o.audioKey(u,d),class:"fcom_audio_player_wrap"},[i.failedItems[u.media_id||d]?(v(),E("div",aFe,[g("audio",lFe,[g("source",{src:o.audioUrl(u),type:o.audioType(u)},null,8,cFe)])])):(v(),D(r,{key:0,media:o.playerMediaFor(u),onLoadFailed:h=>o.onLoadFailed(u.media_id||d)},null,8,["media","onLoadFailed"])),n.editable?(v(),E(te,{key:2},[g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_edit_btn","aria-label":t.$t("Edit audio"),onClick:h=>t.$emit("edit",d)},[y(a)],8,uFe),g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_remove_btn","aria-label":t.$t("Remove audio"),onClick:h=>t.$emit("remove",d)},[y(c,null,{default:w(()=>[y(l)]),_:1})],8,dFe)],64)):O("",!0)]))),128))])}const sU=de(oFe,[["render",hFe]]),fFe={name:"MediaPreview",components:{Postcard:xle,FluentPlayerPreview:nU,AudioList:sU},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},audioMedias(){var n,s,i,o,r;const t=(s=(n=this.feed)==null?void 0:n.meta)==null?void 0:s.audio_medias;if(Array.isArray(t)&&t.length)return t;const e=(o=(i=this.feed)==null?void 0:i.meta)==null?void 0:o.media_preview;return e&&(((r=e.settings)==null?void 0:r.viewType)==="audio"||e.content_type==="audio")?[e]:[]},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|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/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",mov:"video/quicktime",qt:"video/quicktime"},n=t.split(".").pop().toLowerCase();return e[n]||"video/mp4"},isAudioUrl(t){return t?/\.(mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i.test(t):!1},getAudioType(t){const e={mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"},n=t.split("?")[0].split("#")[0].split(".").pop().toLowerCase();return e[n]||"audio/mpeg"},playVideo(){this.$refs.nativeVideo&&this.$refs.nativeVideo.play()},onVideoPause(){this.$refs.nativeVideo&&this.$refs.nativeVideo.currentTime>0&&(this.isPlaying=!0)}}},pFe={key:0,class:"feed_media feed_media_audio_list"},mFe={key:0},gFe={key:1},vFe=["innerHTML"],yFe={key:2,class:"native_audio_wrapper"},bFe=["preload"],_Fe=["src","type"],wFe=["controls","preload","poster"],kFe=["src","type"],CFe=["href"],xFe={key:0,class:"feed_media_image"},SFe={key:1,class:"feed_media_content"},$Fe={class:"media_domain"},AFe={class:"feed_media_title"},EFe={key:0,class:"feed_media_description"},MFe={class:"feed_meta_desc"};function TFe(t,e,n,s,i,o){const r=Y("audio-list"),a=Y("fluent-player-preview"),l=Yt,c=Cr;return o.audioMedias.length?(v(),E("div",pFe,[y(r,{feed:n.feed,audios:o.audioMedias},null,8,["feed","audios"])])):(v(),E("div",{key:1,class:q(["feed_media","feed_media_"+o.media.type])},[o.isVideoMedia?(v(),E(te,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!i.fluentPlayerFailed?(v(),E("div",mFe,[y(a,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=u=>i.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),E("div",gFe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,vFe)])):o.media.url&&o.isAudioUrl(o.media.url)?(v(),E("div",yFe,[g("audio",{class:"native_audio_player",controls:"",preload:n.is_single?"metadata":"none"},[g("source",{src:o.media.url,type:o.getAudioType(o.media.url)},null,8,_Fe)],8,bFe)])):o.media.url?(v(),E("div",{key:3,class:q(["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]=u=>i.isPlaying=!0),onPause:e[2]||(e[2]=(...u)=>o.onVideoPause&&o.onVideoPause(...u)),onEnded:e[3]||(e[3]=u=>i.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url)},null,8,kFe)],40,wFe),i.isPlaying?O("",!0):(v(),E("div",{key:0,class:"native_video_overlay",onClick:e[4]||(e[4]=(...u)=>o.playVideo&&o.playVideo(...u))},[...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(),E("div",{key:1,class:q(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!i.is_error?(v(),D(c,{key:0,alt:"",style:Xe({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:q("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:w(()=>[y(l,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),E("a",{key:2,href:o.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!i.is_error?(v(),E("div",xFe,[y(c,{onError:e[5]||(e[5]=u=>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(),E("div",SFe,[g("div",$Fe,$(o.getDomainName(o.media.url)),1),g("div",AFe,$(t.getExcerpt(o.media.title,88)),1),o.media.description?(v(),E("div",EFe,[g("div",MFe,$(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,CFe))],2))}const Ap=de(fFe,[["render",TFe],["__scopeId","data-v-e4a3a6c3"]]),dT={video:{extensions:[".mp4",".webm",".mov",".qt"],pattern:/\.(mp4|webm|mov|qt)$/i},audio:{extensions:[".mp3",".wav",".m4a",".aac",".ogg",".oga",".flac"],pattern:/\.(mp3|wav|m4a|aac|ogg|oga|flac)$/i}},hT=[{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|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i}],PFe={name:"FluentPlayerUploader",components:{UploadFilled:Z4},emits:["video-added","completed","uploading"],props:{className:{type:String,default:"video-uploader"},type:{type:String,default:"url"},media_kind:{type:String,default:"video"}},data(){return{videoUrl:"",processing:!1}},computed:{uploadKind(){return this.media_kind==="audio"?"audio":"video"},acceptTypes(){return dT[this.uploadKind].extensions.join(",")},uploadButtonLabel(){return this.uploadKind==="audio"?this.$t("Upload Audio"):this.$t("Upload Video")},kindErrorMessage(){return this.uploadKind==="audio"?this.$t("The file must be a valid audio type (MP3, WAV, M4A, AAC, OGG, FLAC)"):this.$t("The file must be a valid video type (MP4, WebM, MOV)")},uploadData(){return{context:"fluent_player",media_kind:this.uploadKind}},action_url(){return this.appVars.rest.url+"/fluent-player/video-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{beforeUpload(t){return dT[this.uploadKind].pattern.test(t.name||"")?!0:(this.$handleError(this.kindErrorMessage),!1)},async handleUrlSubmit(){if(!this.videoUrl)return;const t=hT.some(s=>s.name==="file"&&s.regex.test(this.videoUrl)),e=hT.some(s=>s.name!=="file"&&s.regex.test(this.videoUrl));let n={type:"oembed",url:this.videoUrl,html:"",content_type:"video"};t?(n.player="fluent_player",n.provider="url",n.media_id=new Date().getTime()):e&&(n.player="fluent_player",n.media_id=new Date().getTime()),this.$emit("video-added",n)},handleVideoUploadSuccess(t){var e,n;try{if(!t||!t.media||!t.media.url)throw new Error("Invalid response: missing media.url");const{media:s}=t,i=((e=s.settings)==null?void 0:e.viewType)==="audio"||this.uploadKind==="audio",o={type:"upload",url:s.url,player:"fluent_player",provider:"upload",content_type:i?"audio":"video",html:"",title:((n=s.settings)==null?void 0:n.title)||"",media_id:s.media_id,settings:s.settings||{}};this.$emit("video-added",o)}catch(s){console.error("[FluentPlayerUploader] handleVideoUploadSuccess error:",s,t)}finally{this.$emit("completed",t),this.processing=!1}},handleError(t){try{let e=(t==null?void 0:t.message)||t;if(typeof e=="string")try{const n=JSON.parse(e);e=(n==null?void 0:n.message)||e}catch{}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}}},IFe=["element-loading-text"],LFe={key:0,class:"upload-options"},OFe={class:"uploader-content"},DFe={class:"el-upload__text"},RFe={key:1,class:"url-input-section"};function VFe(t,e,n,s,i,o){const r=Y("upload-filled"),a=_e,l=qe,c=q1,u=vt,d=xt("loading");return Re((v(),E("div",{class:"fluent-player-uploader","element-loading-text":t.$t("Uploading media..."),"element-loading-background":"rgba(255, 255, 255, 0.85)"},[n.type==="upload"?(v(),E("div",LFe,[y(c,{drag:"",class:q([n.className,"video-drag-uploader"]),multiple:o.uploadKind==="audio",action:o.action_url,headers:o.headers,accept:o.acceptTypes,data:o.uploadData,"before-upload":o.beforeUpload,"on-success":o.handleVideoUploadSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1,disabled:i.processing},{default:w(()=>[g("div",OFe,[y(a,{class:"el-icon--upload"},{default:w(()=>[y(r)]),_:1}),g("div",DFe,[W($(t.$t("Drop file here or"))+" ",1),g("em",null,$(t.$t("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",{},()=>[W($(i.processing?t.$t("Uploading..."):o.uploadButtonLabel),1)])])]),_:3},8,["loading","disabled"])])]),_:3},8,["class","multiple","action","headers","accept","data","before-upload","on-success","on-progress","on-error","disabled"])])):(v(),E("div",RFe,[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(()=>[W($(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,IFe)),[[d,i.processing]])}const FFe=de(PFe,[["render",VFe]]),NFe={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:Ap,FluentPlayerUploader:FFe},computed:{showPreview(){return this.media.html&&!this.showInput},editorMode:{get(){return this.media.type},set(t){this.media.type=t}},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},editorTitle(){return this.box_title||this.$t("Featured media")},uploadHint(){return this.$t("The file must be a valid video type (MP4, WebM, MOV)")},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,uploading:!1,uploadKind:"video"}},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){Object.assign(this.media,t);const e=this.media.type==="upload"||this.media.provider==="url";if(this.media.player==="fluent_player"&&e){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()}},BFe={key:0},zFe={key:0,class:"fcom_media_editor_actions"},HFe={key:1,class:"fcom_media_editor fcom_media_embeder"},UFe={key:0},jFe={key:1},WFe={key:2,class:"fcom_course_media"};function YFe(t,e,n,s,i,o){var f;const r=qe,a=mp,l=Os,c=vt,u=Y("fluent-player-uploader"),d=Y("media-preview"),h=xt("loading");return i.appReady?Re((v(),E("div",BFe,[n.has_iframe||o.hasUpload?(v(),E("div",zFe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>i.showInput=!0),type:"danger",size:"small",text:""},{default:w(()=>[W($(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:o.editorMode,"onUpdate:modelValue":e[2]||(e[2]=p=>o.editorMode=p),disabled:i.uploading,"aria-label":t.$t("Media source")},{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","data-testid":"upload-kind-video"},null,8,["label"])):O("",!0)]),_:1},8,["modelValue","disabled","aria-label"]))])):O("",!0),o.showPreview?(v(),E("div",WFe,[y(d,{media_item:n.media},null,8,["media_item"])])):(v(),E("div",HFe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),E(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(()=>[W($(t.$t("Embed")),1)]),_:1})],64)):(v(),E(te,{key:1},[g("h3",null,$(o.editorTitle),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),E("p",UFe,$(o.uploadHint),1)):(v(),E("p",jFe,$(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",media_kind:i.uploadKind,onVideoAdded:o.handleFluentPlayerVideo,onUploading:e[5]||(e[5]=p=>i.uploading=!0),onCompleted:e[6]||(e[6]=p=>i.uploading=!1)},null,8,["type","media_kind","onVideoAdded"])):(v(),D(c,{key:3,onKeydown:kt(o.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":e[7]||(e[7]=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(()=>[W($(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,i.fetching]]):O("",!0)}const fv=de(NFe,[["render",YFe]]),qFe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:fv,VideoIcon:XVe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},watch:{showVideoPop(t){t||this.resetMedia()}},methods:{show(){this.showVideoPop=!0},resetMedia(){this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}},embeded(t){var n;this.$emit("embeded",t),t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")||(this.showVideoPop=!1,this.resetMedia())}}},GFe={class:"fcom_video_embeder"};function XFe(t,e,n,s,i,o){const r=Y("VideoIcon"),a=_e,l=qe,c=Y("media-embeder"),u=xs;return v(),E("div",GFe,[y(l,{"aria-label":"Add Video",text:"",onClick:o.show},{default:w(()=>[y(a,{class:q(["fcom_apps_icon"])},{default:w(()=>[y(r)]),_:1})]),_:1},8,["onClick"]),i.showVideoPop?(v(),D(u,{key:0,title:t.$t("Attach Media"),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 KFe=de(qFe,[["render",XFe]]),ZFe={name:"AudioEditModal",components:{ImageUploader:Jc,EditPen:lR,Delete:J_},emits:["update:visible","saved"],props:{media:{type:Object,required:!0},visible:{type:Boolean,default:!1}},data(){return{localTitle:this.readTitle(),localPoster:this.readPoster(),saving:!1}},watch:{visible(t){t&&(this.localTitle=this.readTitle(),this.localPoster=this.readPoster())}},methods:{readTitle(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.title)||((n=this.media)==null?void 0:n.title)||""},readPoster(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.posterSrc)||((n=this.media)==null?void 0:n.image)||""},save(){var t;if(!this.localTitle||!this.localTitle.trim()){this.$handleError(this.$t("Audio file name cannot be empty"));return}if(this.localTitle=this.localTitle.trim(),!((t=this.media)!=null&&t.media_id)){this.$emit("saved",this.buildLocalUpdate()),this.$emit("update:visible",!1);return}this.saving=!0,this.$post("fluent-player/audio-media/"+this.media.media_id,{title:this.localTitle,posterSrc:this.localPoster}).then(e=>{this.$emit("saved",{...this.media,...e.media}),this.$emit("update:visible",!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},buildLocalUpdate(){var e;const t={...((e=this.media)==null?void 0:e.settings)||{},title:this.localTitle,posterSrc:this.localPoster,poster_is_custom:!!this.localPoster};return{...this.media,title:this.localTitle,image:this.localPoster,settings:t}}}},JFe={class:"fcom_audio_edit"},QFe={id:"fcom_audio_name_label",class:"fcom_audio_edit__label"},eNe={class:"fcom_audio_edit__label"},tNe={class:"fcom_audio_edit__thumb_row"},nNe={class:"fcom_image_uploader_wrapper"},sNe={class:"fcom_sr_only"};function iNe(t,e,n,s,i,o){const r=vt,a=Cr,l=Y("EditPen"),c=_e,u=qe,d=Y("Delete"),h=Y("image-uploader"),f=xs;return v(),D(f,{"model-value":n.visible,title:t.$t("Edit Audio"),width:"440px","append-to-body":"","onUpdate:modelValue":e[3]||(e[3]=p=>t.$emit("update:visible",p))},{footer:w(()=>[y(u,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=p=>t.$emit("update:visible",!1))},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(u,{class:"fcom_primary_button",loading:i.saving,disabled:!i.localTitle||!i.localTitle.trim(),onClick:o.save},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["loading","disabled","onClick"])]),default:w(()=>[g("div",JFe,[g("label",QFe,$(t.$t("Audio file name")),1),y(r,{modelValue:i.localTitle,"onUpdate:modelValue":e[0]||(e[0]=p=>i.localTitle=p),placeholder:t.$t("Audio file name"),"aria-label":t.$t("Audio file name"),"aria-labelledby":"fcom_audio_name_label"},null,8,["modelValue","placeholder","aria-label"]),g("label",eNe,$(t.$t("Thumbnail")),1),g("div",tNe,[i.localPoster?(v(),D(a,{key:0,src:i.localPoster,alt:t.$t("Thumbnail"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",nNe,[y(h,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.localPoster,confirm_remove:!0,additionalData:{resize:!1,max_width:500,skip_convert:"yes"},onUploaded:e[1]||(e[1]=p=>{i.localPoster=p})},fs({remove:w(()=>[y(c,null,{default:w(()=>[y(d)]),_:1}),g("span",sNe,$(t.$t("Remove Thumbnail")),1)]),_:2},[i.localPoster?{name:"trigger",fn:w(({loading:p})=>[y(u,{class:"fcom_plain_button",loading:p,disabled:p,"aria-label":t.$t("Change Thumbnail"),title:t.$t("Change Thumbnail")},{default:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1})]),_:1},8,["loading","disabled","aria-label","title"])]),key:"0"}:void 0]),1032,["can_remove"])])])])]),_:1},8,["model-value","title"])}const oNe=de(ZFe,[["render",iNe]]),rNe={name:"MusicIcon"},aNe={width:"22",height:"22",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false"};function lNe(t,e,n,s,i,o){return v(),E("svg",aNe,[...e[0]||(e[0]=[g("path",{d:"M7.5 15V4.583l8.333-1.25V13.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M5.417 17.5c1.15 0 2.083-.84 2.083-1.875S6.567 13.75 5.417 13.75 3.333 14.59 3.333 15.625 4.266 17.5 5.417 17.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M13.75 15.625c1.15 0 2.083-.84 2.083-1.875s-.933-1.875-2.083-1.875-2.083.84-2.083 1.875.933 1.875 2.083 1.875Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const cNe=de(rNe,[["render",lNe]]),uNe={name:"AudioUploadButton",components:{MusicIcon:cNe},emits:["audio-added","uploading","completed"],props:{space:{type:String,default:""},remaining:{type:Number,default:null}},data(){return{uploading:!1}},computed:{maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},capacity(){return this.remaining===null?this.maxAudios:Math.max(0,this.remaining)},canUpload(){const t=this.appVars.features.fluent_player;if(!this.appVars.features.has_fluent_player||!t||!t.enable||!t.has_audio_upload)return!1;const e=t.video_upload_role||"admin";return e==="everyone"?!0:e==="admin_moderator"?this.isModerator(this.space)||this.isAdmin():this.isAdmin()}},methods:{pickFiles(){this.$refs.fileInput&&this.$refs.fileInput.click()},async onFilesSelected(t){var n,s;let e=Array.from(t.target.files||[]);if(t.target.value="",!!e.length){if(this.capacity<=0){this.$handleError(this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}e.length>this.capacity&&((s=(n=this.$notify)==null?void 0:n.warning)==null||s.call(n,this.$t("You can add a maximum of %s audios per post.",this.maxAudios)),e=e.slice(0,this.capacity)),this.uploading=!0,this.$emit("uploading");for(const i of e)try{await this.uploadOne(i)}catch(o){this.$handleError(o&&o.message?o.message:o)}this.uploading=!1,this.$emit("completed")}},uploadOne(t){const e=new FormData;return e.append("file",t),e.append("context","fluent_player"),e.append("media_kind","audio"),fetch(this.appVars.rest.url+"/fluent-player/video-upload",{method:"POST",headers:{"X-WP-Nonce":this.appVars.rest.nonce},body:e}).then(n=>n.json().then(s=>({ok:n.ok,body:s}))).then(({ok:n,body:s})=>{if(!n||!s||!s.media||!s.media.url)throw new Error(s&&s.message||this.$t("Failed to upload audio"));const i=s.media;this.$emit("audio-added",{type:"upload",url:i.url,player:"fluent_player",provider:"upload",content_type:"audio",html:"",title:i.settings&&i.settings.title||t.name,media_id:i.media_id,settings:i.settings||{}})})}}};function dNe(t,e,n,s,i,o){const r=Y("MusicIcon"),a=_e,l=qe;return o.canUpload?(v(),D(l,{key:0,"aria-label":t.$t("Upload Audio"),title:t.$t("Upload Audio"),text:"",loading:i.uploading,onClick:o.pickFiles},{default:w(()=>[y(a,{class:"fcom_status_img_icon"},{default:w(()=>[y(r)]),_:1}),g("input",{ref:"fileInput",type:"file",accept:".mp3,.wav,.m4a,.aac,.ogg,.oga,.flac",multiple:"",hidden:"",onChange:e[0]||(e[0]=(...c)=>o.onFilesSelected&&o.onFilesSelected(...c))},null,544)]),_:1},8,["aria-label","title","loading","onClick"])):O("",!0)}const hNe=de(uNe,[["render",dNe]]),fNe={name:"DocumentsUploader",components:{UploadFilled:Z4,Document:B1},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))}}},pNe={class:"fcom_documents_uploader"},mNe={class:"el-upload__text"},gNe={key:0},vNe={class:"fcom_document_lists"},yNe={class:"fcom_each_document"},bNe={class:"fcom_document_info"},_Ne={class:"fcom_document_icon"},wNe={class:"fcom_document_title"},kNe={class:"fcom_document_actions"};function CNe(t,e,n,s,i,o){const r=Y("UploadFilled"),a=_e,l=q1,c=Y("Document"),u=qe;return v(),E("div",pNe,[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",mNe,$(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(),E("div",gNe,[g("div",vNe,[(v(!0),E(te,null,we(o.uploadingFiles,d=>(v(),E("div",yNe,[g("div",bNe,[g("div",_Ne,[y(a,null,{default:w(()=>[y(c)]),_:1})]),g("span",wNe,$(d.name),1)]),g("div",kNe,[y(u,{text:"",size:"small",loading:!0},{default:w(()=>[W($(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const iU=de(fNe,[["render",CNe]]),xNe={name:"PdfIcon"},SNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function $Ne(t,e,n,s,i,o){return v(),E("svg",SNe,[...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 ANe=de(xNe,[["render",$Ne]]),ENe={name:"ZipIcon"},MNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function TNe(t,e,n,s,i,o){return v(),E("svg",MNe,[...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 PNe=de(ENe,[["render",TNe]]),INe={name:"AudioIcon"},LNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function ONe(t,e,n,s,i,o){return v(),E("svg",LNe,[...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 DNe=de(INe,[["render",ONe]]),RNe={name:"DocIcon"},VNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function FNe(t,e,n,s,i,o){return v(),E("svg",VNe,[...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 NNe=de(RNe,[["render",FNe]]),BNe={name:"VideoFileIcon"},zNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function HNe(t,e,n,s,i,o){return v(),E("svg",zNe,[...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 UNe=de(BNe,[["render",HNe]]),jNe={name:"DocumentLists",components:{Document:B1,Download:Rae,PdfIcon:ANe,ImageIcon:tU,ZipIcon:PNe,AudioIcon:DNe,DocIcon:NNe,VideoFileIcon:UNe},props:["document_lists","additional_data","is_editable","allow_rename"],emits:["fileRemoved","documentsUpdated"],data(){return{editingIndex:null,editingTitle:"",isSaving:!1}},computed:{canEditTitle(){return this.is_editable||this.allow_rename}},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"},startEdit(t,e){this.editingIndex=t,this.editingTitle=this.getBaseName(e.title)},cancelEdit(){this.editingIndex=null,this.editingTitle=""},getFileExtension(t){if(!t)return"";const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e)},getBaseName(t){const e=this.getFileExtension(t);return e?t.slice(0,-e.length):t||""},saveDoc(t){const e=this.editingTitle.trim()+this.getFileExtension(t.title);this.isSaving=!0,this.$post("documents/update",{id:t.id,title:e,...this.additional_data}).then(n=>{t.title=e,this.$notify.success(n.message),this.isSaving=!1,this.editingIndex=null,this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})}}},WNe={class:"fcom_document_lists"},YNe={class:"fcom_each_document"},qNe={class:"fcom_document_info"},GNe={class:"fcom_document_icon"},XNe={class:"fcom_document_ext"},KNe={class:"fcom_rename_actions"},ZNe=["href"],JNe={class:"fcom_document_actions"},QNe=["href"];function eBe(t,e,n,s,i,o){const r=_e,a=vt,l=qe,c=Y("EditPen"),u=Y("Download"),d=Y("DeleteFilled"),h=xt("loading");return v(),E("div",WNe,[(v(!0),E(te,null,we(n.document_lists,(f,p)=>(v(),E("div",YNe,[g("div",qNe,[g("div",GNe,[y(r,null,{default:w(()=>[(v(),D(Ct(o.getIcon(f.type))))]),_:2},1024)]),o.canEditTitle&&i.editingIndex==p?(v(),E(te,{key:0},[y(a,{readonly:i.isSaving,size:"small","aria-label":t.$t("Document name"),style:{flex:"1",width:"100%"},modelValue:i.editingTitle,"onUpdate:modelValue":e[0]||(e[0]=m=>i.editingTitle=m)},fs({_:2},[o.getFileExtension(f.title)?{name:"suffix",fn:w(()=>[g("span",XNe,$(o.getFileExtension(f.title)),1)]),key:"0"}:void 0]),1032,["readonly","aria-label","modelValue"]),g("div",KNe,[y(l,{disabled:i.isSaving||!i.editingTitle.trim(),loading:i.isSaving,onClick:m=>o.saveDoc(f),type:"primary",size:"small"},{default:w(()=>[W($(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"]),y(l,{disabled:i.isSaving,onClick:o.cancelEdit,size:"small"},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])],64)):(v(),E("a",{key:1,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},$(f.title),9,ZNe))]),Re((v(),E("div",JNe,[o.canEditTitle&&i.editingIndex!=p?(v(),D(l,{key:0,onClick:m=>o.startEdit(p,f),plain:"",text:"",size:"small"},{default:w(()=>[y(r,null,{default:w(()=>[y(c)]),_:1})]),_:1},8,["onClick"])):O("",!0),!n.is_editable&&f.url?(v(),E("a",{key:1,href:f.url+"&force_download=1",target:"_blank",class:"el-button el-button--text"},[y(r,null,{default:w(()=>[y(u)]),_:1})],8,QNe)):O("",!0),n.is_editable?(v(),D(l,{key:2,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 pv=de(jNe,[["render",eBe]]),tBe={name:"DocumentUploaderPop",components:{DocumentLists:pv,DocumentsUploader:iU,Document:B1},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="")}}},nBe={class:"fcom_inline_docs_form"},sBe={class:"fcom_doc_upload_modal"};function iBe(t,e,n,s,i,o){var c;const r=qe,a=Y("documents-uploader"),l=Y("document-lists");return v(),E("div",nBe,[g("div",sBe,[y(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[W($(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 oBe=de(tBe,[["render",iBe]]),rBe={name:"PaperClipIcon"},aBe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function lBe(t,e,n,s,i,o){return v(),E("svg",aBe,[...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 cBe=de(rBe,[["render",lBe]]),uBe=window.fluentComAdmin.auth,dBe={name:"FeedTextComposer",components:{AudioEditModal:oNe,AudioList:sU,AudioUploadButton:hNe,PaperClipIcon:cBe,DocumentLists:pv,DocumentUploaderPop:oBe,Document:B1,MediaPreview:Ap,Giphy:WVe,ImageUploader:Jc,SurveyEditForm:iVe,MarkdownEditor:ru,EmojiPicker:zF,VideoEmbeder:KFe,ImageIcon:tU,PollIcon:XRe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+uBe.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"},maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},audioRemaining(){var t,e;return Math.max(0,this.maxAudios-(((e=(t=this.content)==null?void 0:t.audio_medias)==null?void 0:e.length)||0))}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1,showAudioEdit:!1,composerEditIndex:null,maxMediaPerPost:this.appVars.features.max_media_per_post}},methods:{cencelSurvey(){this.content.survey=null},insertEmoji(t){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(t)},clearContent(){var t;this.content.message="",(t=this.$refs.markdownEditor)==null||t.clearContent()},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.audio_medias=[],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),this.content.audio_medias=[];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){var n,s,i;if(t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")){if(this.content.media_images=[],this.content.media=null,this.content.meta&&!Array.isArray(this.content.meta)&&this.content.meta.media_preview&&(this.content.meta.media_preview=null),Array.isArray(this.content.audio_medias)||(this.content.audio_medias=[]),this.content.audio_medias.length>=this.maxAudios){(i=(s=this.$notify)==null?void 0:s.warning)==null||i.call(s,this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}this.content.audio_medias.push({...t,player:"fluent_player"}),this.syncAudioMediasToMeta();return}this.content.media_images=[],this.content.meta=[],this.content.audio_medias=[],this.content.media=t},syncAudioMediasToMeta(){const t=Array.isArray(this.content.audio_medias)?this.content.audio_medias:[];(!this.content.meta||Array.isArray(this.content.meta))&&(this.content.meta={...this.content.meta||{}}),t.length?this.content.meta.audio_medias=t:delete this.content.meta.audio_medias},removeComposerAudio(t){Array.isArray(this.content.audio_medias)&&(this.content.audio_medias.splice(t,1),this.syncAudioMediasToMeta())},openComposerAudioEdit(t){this.composerEditIndex=t,this.showAudioEdit=!0},onComposerAudioSaved(t){if(this.composerEditIndex===null)return;const e=this.content.audio_medias[this.composerEditIndex]||{};this.content.audio_medias.splice(this.composerEditIndex,1,{...e,...t}),this.syncAudioMediasToMeta()},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(){var e,n,s;const t=(n=(e=this.content)==null?void 0:e.meta)==null?void 0:n.audio_medias;Array.isArray(t)&&t.length&&!((s=this.content.audio_medias)!=null&&s.length)&&(this.content.audio_medias=[...t]),this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},hBe={class:"fcom_text_composer"},fBe={class:"fcom_editor status_text_input"},pBe={key:1,class:"fcom_audio_compose_list"},mBe={key:2,style:{position:"relative","text-align":"center"}},gBe={key:3,class:"fcom_media_items"},vBe={key:0,class:"fcom_media_images"},yBe=["src","alt"],bBe={key:1,class:"fcrom_media_images"},_Be={class:"fcrom_media_image"},wBe=["src","alt"],kBe={key:4,class:"fcrom_media_images"},CBe=["src","alt"],xBe={key:5,class:"fcrom_media_images"},SBe={class:"fcrom_media_image"},$Be=["src","alt"],ABe={class:"fcom_composer_footer"},EBe={class:"fcom_composer_apps"},MBe={key:0},TBe={class:"fcom_composer_actions"};function PBe(t,e,n,s,i,o){var T,I,L,V,R,N,F,B,z,G,K;const r=Y("MarkdownEditor"),a=Y("DocumentUploaderPop"),l=Y("SurveyEditForm"),c=Y("audio-list"),u=Y("audio-edit-modal"),d=qe,h=Y("media-preview"),f=Y("CloseBold"),p=_e,m=Y("ImageIcon"),b=Y("image-uploader"),_=Y("video-embeder"),k=Y("audio-upload-button"),C=Y("PaperClipIcon"),x=Y("PollIcon"),S=Y("EmojiPicker"),M=Y("Giphy"),P=xt("loading");return v(),E(te,null,[g("div",hBe,[g("div",fBe,[le(t.$slots,"before_input"),y(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=X=>n.content.message=X),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?X=>o.uploadImage(X,!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(),E(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(),E(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),(I=(T=n.content)==null?void 0:T.audio_medias)!=null&&I.length?(v(),E("div",pBe,[y(c,{audios:n.content.audio_medias,editable:!0,onRemove:o.removeComposerAudio,onEdit:o.openComposerAudioEdit},null,8,["audios","onRemove","onEdit"]),i.composerEditIndex!==null?(v(),D(u,{key:0,media:n.content.audio_medias[i.composerEditIndex],visible:i.showAudioEdit,"onUpdate:visible":e[2]||(e[2]=X=>i.showAudioEdit=X),onSaved:o.onComposerAudioSaved},null,8,["media","visible","onSaved"])):O("",!0)])):(V=(L=n.content)==null?void 0:L.media)!=null&&V.type?(v(),E("div",mBe,[y(d,{onClick:e[3]||(e[3]=X=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[W($(t.$t("Remove Media")),1)]),_:1}),y(h,{media_item:n.content.media},null,8,["media_item"])])):(R=n.content)!=null&&R.meta?(v(),E("div",gBe,[(F=(N=n.content.meta)==null?void 0:N.media_items)!=null&&F.length?(v(!0),E(te,{key:0},we(n.content.meta.media_items,(X,H)=>(v(),E("div",{key:H},[X.type=="image"?(v(),E("div",vBe,[g("img",{class:"fcom_media_image",src:X.url,alt:t.$t("Media image")},null,8,yBe),y(d,{class:"fcom_media_images_cross_button",link:"",onClick:Q=>n.content.meta.media_items.splice(H,1)},{default:w(()=>[y(p,null,{default:w(()=>[y(f)]),_:1})]),_:1},8,["onClick"])])):O("",!0)]))),128)):((z=(B=n.content.meta)==null?void 0:B.media_preview)==null?void 0:z.type)=="image"||(K=(G=n.content.meta)==null?void 0:G.media_preview)!=null&&K.image?(v(),E("div",bBe,[g("div",_Be,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,wBe),y(d,{link:"",onClick:e[4]||(e[4]=X=>n.content.meta.media_preview=null)},{default:w(()=>[y(p,null,{default:w(()=>[y(f)]),_:1})]),_:1})])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),E("div",kBe,[(v(!0),E(te,null,we(n.content.media_images,(X,H)=>(v(),E("div",{class:"fcrom_media_image",key:H},[g("img",{src:X.url,alt:t.$t("Media image")},null,8,CBe),y(d,{link:"",onClick:Q=>n.content.media_images.splice(H,1)},{default:w(()=>[y(p,null,{default:w(()=>[y(f)]),_:1})]),_:1},8,["onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),E("div",xBe,[g("div",SBe,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,$Be),y(d,{link:"",onClick:e[5]||(e[5]=X=>o.removeImageFromComments())},{default:w(()=>[y(p,null,{default:w(()=>[y(f)]),_:1})]),_:1})])])):O("",!0)],64))]),le(t.$slots,"before_composer_footer"),Re((v(),E("div",ABe,[g("div",EBe,[o.hasActiveApp?O("",!0):(v(),E(te,{key:0},[i.maxMediaPerPost?(v(),D(b,{key:0,additionalData:{resize:!0,context:n.context,max_width:1400},isMultiple:n.config.multipleMedia,onUploading:e[6]||(e[6]=()=>{i.uploading=!0}),onCompleted:e[7]||(e[7]=()=>{i.uploading=!1}),onUploaded:o.handleMediaUpload},{default:w(()=>[y(d,{"aria-label":"Upload Media",loading:i.uploading,text:""},{default:w(()=>[y(p,{class:"fcom_status_img_icon"},{default:w(()=>[y(m)]),_:1}),i.uploading?(v(),E("span",MBe,$(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(_,{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.videoApp&&t.hasFeature("video_embeder")?(v(),D(k,{key:2,space:n.config.spaceSlug,remaining:o.audioRemaining,onAudioAdded:o.handleVideoAttachment,onUploading:e[8]||(e[8]=()=>{i.uploading=!0}),onCompleted:e[9]||(e[9]=()=>{i.uploading=!1})},null,8,["space","remaining","onAudioAdded"])):O("",!0),n.config.documentsApp&&n.config.space_id?(v(),D(d,{key:3,"aria-label":t.$t("Add Documents"),title:t.$t("Upload Documents"),text:"",onClick:e[10]||(e[10]=X=>n.content.content_type="document")},{default:w(()=>[y(p,{class:q(["fcom_apps_icon"])},{default:w(()=>[y(C)]),_:1})]),_:1},8,["aria-label","title"])):O("",!0),n.config.surveyApp&&t.hasFeature("has_survey_poll")?(v(),D(d,{key:4,"aria-label":"Create Poll",onClick:o.initSurveyForm,text:""},{default:w(()=>[y(p,{class:"fcom_apps_icon"},{default:w(()=>[y(x)]),_:1})]),_:1},8,["onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),D(S,{key:5,onEmojiSelected:o.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),t.hasFeature("giphy_app")?(v(),D(M,{key:6,onSelectedGiphy:o.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),g("div",TBe,[le(t.$slots,"default")])])),[[P,i.uploading]]),le(t.$slots,"after_composer_footer")],64)}const mv=de(dBe,[["render",PBe]]),IBe={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="'+this.$t("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()}},LBe=["innerHTML"];function OBe(t,e,n,s,i,o){const r=nF;return v(),E(te,null,[g("div",{ref:"content",class:q(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,LBe),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=[]),"show-progress":i.lightboxImages.length>1},null,8,["url-list","initial-index","show-progress"])):O("",!0)],64)}const gv=de(IBe,[["render",OBe]]),DBe={name:"CommentReacts",components:{UserRouteLink:sa},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}))}}},RBe={style:{"margin-left":"5px"}},VBe={key:0},FBe={key:1},NBe={class:"fcom_user_lists"},BBe={key:2};function zBe(t,e,n,s,i,o){const r=Yt,a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Pi,u=jo;return v(),D(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav",onShow:o.getReactions},{reference:w(()=>[g("span",RBe,$(n.comment.reactions_count),1)]),default:w(()=>[i.loading?(v(),E("div",VBe,[y(r,{animated:!0,rows:1})])):i.reactions?(v(),E("div",FBe,[y(c,{"max-height":"300px"},{default:w(()=>[g("ul",NBe,[(v(!0),E(te,null,we(i.reactions,d=>(v(),E("li",null,[d.xprofile?(v(),E(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(),E("div",BBe,[g("p",null,$(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const oU=de(DBe,[["render",zBe]]),HBe={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}}},UBe={class:"fcom_image_carousel"},jBe={key:0},WBe=["preload","poster"],YBe=["src","type"],qBe={key:1,class:"fcom_image_wrap"},GBe={key:0,class:"fcom_image_overlay"};function XBe(t,e,n,s,i,o){const r=Cr;return v(),E("div",UBe,[g("div",{class:q([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),E(te,null,we(o.visibleMedia,(a,l)=>(v(),E("div",{class:q(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),E("div",jBe,[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,YBe)],8,WBe)])):(v(),E("div",qBe,[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,"show-progress":"",fit:"cover"},null,8,["src","initial-index","preview-src-list"]),o.isOverflowSlot(l)?(v(),E("div",GBe,"+"+$(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const $S=de(HBe,[["render",XBe]]),KBe={name:"ErrorIcon"},ZBe={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 JBe(t,e,n,s,i,o){return v(),E("svg",ZBe,[...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 QBe=de(KBe,[["render",JBe]]),eze={name:"ReportReview",components:{ErrorIcon:QBe},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)}},tze={class:"fcom_feed_report_wrap"},nze={class:"fcom_feed_report_content"},sze={key:0},ize={key:1},oze={key:2},rze={class:"fcom_feed_report_action"};function aze(t,e,n,s,i,o){const r=Y("ErrorIcon"),a=qe;return v(),E("div",tze,[g("div",nze,[y(r),n.feed.meta.auto_flagged=="yes"?(v(),E("span",sze,$(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),E("span",ize,$(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),E("span",oze,$(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",rze,[y(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[W($(t.$t("Review")),1)]),_:1})])])}const rU=de(eze,[["render",aze]]),lze={name:"StickyIcon"},cze={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 uze(t,e,n,s,i,o){return v(),E("svg",cze,[...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 aU=de(lze,[["render",uze]]),dze=80,hze=20,fze=5e3,H2={methods:{scrollCommentIntoView(t,e=null){var a;const n=this.$el instanceof Element?this.$el:(a=this.$el)==null?void 0:a.parentElement,s=(n==null?void 0:n.closest(".feed"))||document,i=l=>l&&s.querySelector("#comment_"+l),o=i(t)||i(e);if(!o)return;const r=o.querySelector(".comment_text")||o;r.classList.add("fcom_highlight_glow"),setTimeout(()=>r.classList.remove("fcom_highlight_glow"),fze),setTimeout(()=>{const l=o.getBoundingClientRect();l.top>=dze&&l.bottom<=window.innerHeight-hze||o.scrollIntoView({behavior:"smooth",block:"center"})},50)}}},pze={name:"SingleComment",mixins:[H2],components:{ImageCarousel:$S,FeedTextComposer:mv,MediaPreview:Ap,ReportReview:rU,StickyIcon:aU,FeedMdContent:gv,ActionPopover:Pl},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&&(this.comment.status=="pending"||((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}},commentActions(){const t=[{label:this.$t("Copy Link"),action:()=>this.copyCommentLink(this.comment)}];return this.showStickyOption&&t.push({label:this.comment.is_sticky?this.$t("Unpin from Top"):this.$t("Pin to Top"),action:()=>this.toggleSticky()}),this.showReportOption&&t.push({label:this.$t("Report Comment"),action:()=>this.reportComment(this.comment)}),this.canEditComment(this.comment)&&t.push({label:this.$t("Edit"),action:()=>this.editComment()}),this.canDeleteComment(this.comment)&&t.push({label:this.$t("Delete"),type:"danger",action:()=>this.deleteComment()}),t}},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(/ |\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=[],this.isEdit=!1,this.$nextTick(()=>{this.scrollCommentIntoView(this.comment.id)})}).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"))}}},mze={key:1,class:"person_avatar"},gze={class:"comment_wrap"},vze={key:0,class:"comment_text"},yze={key:0,class:"comment_text_head"},bze={class:"comment_text_head_name"},_ze=["title"],wze={key:0,class:"comment_text_head_status"},kze={class:"comment_actions"},Cze={key:2,class:"comment_text_media"},xze={key:3,class:"comment_text_media"};function Sze(t,e,n,s,i,o){const r=Y("ReportReview"),a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Ai,u=Y("StickyIcon"),d=_e,h=qe,f=Y("MoreFilled"),p=Y("ActionPopover"),m=Y("FeedMdContent"),b=Y("MediaPreview"),_=Y("ImageCarousel"),k=Y("feed-text-composer"),C=xt("loading");return v(),E(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(),E("div",mze,[y(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Re((v(),E("div",gze,[i.isEdit?(v(),E("div",{key:1,onKeydown:e[4]||(e[4]=kt((...x)=>o.maybeSave&&o.maybeSave(...x),["enter"])),class:"comment_text"},[y(k,{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[2]||(e[2]=x=>i.isEdit=!1),class:"fcom_secondary_button"},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=x=>o.updateComment(i.editingComment))},{default:w(()=>[W($(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),E("div",vze,[n.show_header?(v(),E("div",yze,[g("div",bze,[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,_ze),n.comment.status=="pending"?(v(),E("div",wze,[y(c,{type:"warning"},{default:w(()=>[W($(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",kze,[n.comment.is_sticky?(v(),D(h,{key:0,onClick:e[0]||(e[0]=x=>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,{ref:"comment_actions",items:o.commentActions,placement:"bottom",width:200},{trigger: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"])]),_:1},8,["items"])])])):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(),E("button",{key:1,type:"button",class:"fcom_see_more_btn",onClick:e[1]||(e[1]=(...x)=>o.toggleExpand&&o.toggleExpand(...x))},$(i.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),E("div",Cze,[y(b,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),E("div",xze,[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")])),[[C,i.working]])],64)}const U2=de(pze,[["render",Sze]]),$ze={name:"IndividualCommentReply",mixins:[H2],components:{FeedTextComposer:mv,FeedMdContent:gv,HeartIcon:B2,SingleComment:U2,CommentReactions:oU},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},handleCommentDelete(t){this.replyingComment.comments&&this.replyingComment.comments.splice(t,1)},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.$eventBus.emit("recent_activities_refresh"),this.newComment={message:"",media_images:[]},this.$nextTick(()=>{this.scrollCommentIntoView(t.comment.id,this.comment.id)})}).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()}},Aze={class:"fcom_course_comment each_comment"},Eze={key:0,class:"person_avatar"},Mze=["src","alt"],Tze={class:"comment_wrap"},Pze={class:"comment_text"},Ize={class:"comment_text_head"},Lze={class:"comment_text_head_name"},Oze=["title"],Dze={class:"reply_box"},Rze={class:"fcom_comments_react"},Vze={class:"child_comments"},Fze=["id"],Nze={class:"reply_box"},Bze=["onClick"],zze={class:"fcom_comments_react fcom_reaction_list"},Hze={key:0,class:"child_reply_wrap"},Uze={class:"feed_commenting"},jze={class:"person_avatar"},Wze=["src"],Yze={class:"feed_comment_input comment_text"};function qze(t,e,n,s,i,o){const r=Y("UserRouteLink"),a=Y("FeedMdContent"),l=Y("HeartIcon"),c=_e,u=Y("CommentReactions"),d=Y("single-comment"),h=qe,f=Y("FeedTextComposer"),p=xt("loading");return v(),E("div",Aze,[i.replyingComment.xprofile?(v(),E("div",Eze,[g("img",{src:i.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,Mze)])):O("",!0),g("div",Tze,[g("div",Pze,[g("div",Ize,[g("div",Lze,[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,Oze)])]),y(a,{content:i.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",Dze,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},$(t.$t("Post Comment")),1),g("span",{class:q([{fcom_is_liked:i.replyingComment.liked},"reply_btn"])},[g("div",Rze,[y(c,{class:q({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",Vze,[(v(!0),E(te,null,we(i.replyingComment.comments,(m,b)=>(v(),E("div",{id:"comment_"+m.id,class:"each_comment"},[y(d,{onDeleted:_=>o.handleCommentDelete(b),comment:m,show_report:!0},{after_comment_text:w(()=>[g("div",Nze,[g("span",{onClick:_=>o.toggleCommentBox(m),class:"reply_btn"},$(t.$t("Reply")),9,Bze),g("span",{class:q([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",zze,[y(c,{class:q({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,Fze))),256))]),i.commenting?(v(),E("div",Hze,[g("div",Uze,[g("div",jze,[g("img",{alt:"",src:t.auth.avatar},null,8,Wze)]),g("div",Yze,[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(()=>[Re((v(),D(h,{disabled:i.saving,class:"fcom_primary_button",onClick:e[2]||(e[2]=m=>o.postComment())},{default:w(()=>[W($(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,i.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const Gze=de($ze,[["render",qze]]),Xze={name:"CourseComments",props:["course"],components:{IndividualCommentReply:Gze,Pagination:au,ChatIcon:eU,HeartIcon:B2,FeedMdContent:gv,ActionPopover:Pl},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()}},Kze={key:0,class:"white_loaded"},Zze={key:0,class:"fcom_course_comments_header"},Jze={class:"course_comments feed_comments overview_comments"},Qze={key:0,class:"person_avatar"},eHe={class:"comment_wrap"},tHe={class:"comment_text"},nHe={class:"comment_text_head"},sHe={class:"comment_text_head_name"},iHe=["title"],oHe={class:"comment_actions"},rHe={class:"comment_text_details"},aHe=["href"],lHe={class:"comment_text_actions"},cHe={key:0},uHe={key:1};function dHe(t,e,n,s,i,o){const r=Yt,a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Y("MoreFilled"),u=_e,d=qe,h=Y("ActionPopover"),f=Y("FeedMdContent"),p=Y("ChatIcon"),m=Y("HeartIcon"),b=Y("pagination"),_=Y("IndividualCommentReply"),k=Tl,C=xt("loading");return i.loading?(v(),E("div",Kze,[y(r,{row:5})])):(v(),E(te,{key:1},[i.pagination.total?(v(),E("div",Zze,[g("h5",null,$(t.$t("Comments (%s)",i.pagination.total)),1)])):O("",!0),g("div",Jze,[(v(!0),E(te,null,we(i.comments,(x,S)=>(v(),E("div",{key:x.id,class:"fcom_course_comment each_comment"},[x.xprofile?(v(),E("div",Qze,[y(a,{with_level:!1,xprofile:x.xprofile},null,8,["xprofile"])])):O("",!0),g("div",eHe,[g("div",tHe,[g("div",nHe,[g("div",sHe,[y(l,{xprofile:x.xprofile},null,8,["xprofile"]),g("div",{title:x.created_at,class:"comment_text_head_time"},$(t.humanDateDiff(x.created_at)),9,iHe)]),Re((v(),E("div",oHe,[t.canDeleteComment(x)?(v(),D(h,{key:0,placement:"bottom",width:200,items:[{label:t.$t("Delete"),type:"danger",action:()=>o.deleteComment(x,S)}]},{trigger: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"])]),_:1},8,["items"])):O("",!0)])),[[C,i.working]])]),g("div",rHe,[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:x.post.slug,comment_id:x.id})},[W($(t.$t("Commented in"))+" ",1),g("b",null,$(t.getExcerpt(x.post.title,60)),1)],8,aHe)]),y(f,{content:x.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",lHe,[y(d,{onClick:M=>o.initCommentReply(x),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:q({user_reacted:x.liked}),onClick:M=>o.toggleLike(x)},{default:w(()=>[y(m,{filled:x.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,$(x.reactions_count||""),1)]),_:2},1024)])])])]))),128)),i.pagination.total?O("",!0):(v(),E("div",cHe,[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(k,{"append-to-body":!0,modelValue:i.isReplying,"onUpdate:modelValue":e[0]||(e[0]=x=>i.isReplying=x),size:t.dialogWidth},{header:w(()=>{var x;return[g("p",null,[W($(t.$t("Replying to"))+" ",1),g("b",null,$((x=i.replyingComemnt)==null?void 0:x.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(),E("h3",uHe,$(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 hHe=de(Xze,[["render",dHe]]),fHe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:hHe}},pHe={class:"fcom_cards fcom_cards_2"},mHe={class:"fcom_card"},gHe={class:"fcom_card_body"},vHe={class:"fcom_card"},yHe={class:"fcom_card_body"};function bHe(t,e,n,s,i,o){const r=Y("course-comments");return v(),E(te,null,[g("div",pHe,[g("div",mHe,[g("div",gHe,[g("p",null,$(t.$t("Students")),1),g("h3",null,$(n.course.students_count),1)])]),g("div",vHe,[g("div",yHe,[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 _He=de(fHe,[["render",bHe]]),wHe={name:"ContentLayout",props:["title","content_class","wrapper_class"]},kHe={key:0,class:"fhr_content_layout_header"},CHe={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function xHe(t,e,n,s,i,o){return v(),E("div",{class:q([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),E("div",kHe,[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",CHe,[le(t.$slots,"actions")])])):O("",!0)]),le(t.$slots,"sub_header"),g("div",{class:q([n.content_class,"fhr_content_layout_body"])},[le(t.$slots,"default")],2)],2)}const mi=de(wHe,[["render",xHe]]),SHe={name:"AppLayout",props:["wrapper_class"]},$He={class:"feeds_main"};function AHe(t,e,n,s,i,o){const r=Y("router-view");return v(),E("div",{class:q([n.wrapper_class,"feeds"])},[g("div",$He,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[y(r)]),le(t.$slots,"after_route_view")])],2)}const gi=de(SHe,[["render",AHe]]),EHe={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 MHe(t,e,n,s,i,o){const r=Cr,a=qe,l=q1,c=Y("CloseBold"),u=_e;return v(),E(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(()=>[W($(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 vv=de(EHe,[["render",MHe]]),THe={name:"ImagePlaceholder"},PHe={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IHe(t,e,n,s,i,o){return v(),E("svg",PHe,[...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 AS=de(THe,[["render",IHe]]),LHe={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:AS},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()}},OHe={key:0,class:"fcom_paywalls"},DHe={class:"fcom_paywall"},RHe={class:"fcom_select_photo",style:{float:"left"}},VHe=["src"],FHe={key:0,class:"fcom_description"},NHe={class:"fcom_paywall_actions"},BHe={class:"fcom_color_input_wrap"},zHe={class:"fcom_color_input_wrap"},HHe={class:"fcom_color_input_wrap"},UHe={class:"fcom_color_input_wrap"};function jHe(t,e,n,s,i,o){const r=Y("image-placeholder"),a=nn,l=n2,c=Zt,u=Y("Delete"),d=_e,h=qe,f=Yt,p=c2,m=vt,b=tn,_=Jt,k=cn,C=Hd,x=l2;return v(),D(x,{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(),E("div",OHe,[(v(!0),E(te,null,we(n.field.paywalls,(S,M)=>(v(),E("div",DHe,[y(c,{"fit-input-width":"",modelValue:n.field.paywalls[M],"onUpdate:modelValue":P=>n.field.paywalls[M]=P,placeholder:t.$t("Select Paywall")},{default:w(()=>[(v(!0),E(te,null,we(i.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:w(()=>[(v(!0),E(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",RHe,[T.photo?(v(),E("img",{key:0,src:T.photo},null,8,VHe)):(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(),E("div",FHe,[g("p",null,$(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",NHe,[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(k,{onSubmit:e[2]||(e[2]=Oe(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",class:"fcom_checkbox"},{default:w(()=>[W($(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(k,{onSubmit:e[11]||(e[11]=Oe(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(b,{label:t.$t("Background Color")},{default:w(()=>[g("div",BHe,[y(C,{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",zHe,[y(C,{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",HHe,[y(C,{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",UHe,[y(C,{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 WHe=de(LHe,[["render",jHe]]),YHe={name:"LockscreenMeta",components:{BgImageUpload:vv,LockscreenPaywallMeta:WHe},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",welcome_banner:"VideoPlay"};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)}}},qHe={key:0,class:"fcom_lockscreen_meta"},GHe={class:"fcom_meta_section lockscreen_meta"},XHe={class:"fcom_description"},KHe={class:"fcom_meta_section lockscreen_meta"},ZHe={class:"fcom_meta_label"},JHe={class:"fcom_meta_content"},QHe={class:"fcom_meta_block"},eUe={class:"fcom_block_label"},tUe={class:"fcom_meta_sorting"},nUe={class:"fcom_block_action"},sUe={key:1,class:"fcom_lockscreen_meta"},iUe={class:"fcom_edit_title"},oUe={class:"fcom_edit_content"},rUe={class:"fcom_color_input_wrap"},aUe={class:"fcom_color_input_wrap"},lUe={class:"fcom_color_input_wrap"},cUe={class:"fcom_color_input_wrap"},uUe={class:"fcom_color_input_wrap"},dUe={key:1,class:"fcom_description"},hUe={key:2,class:"fcom_description"},fUe={key:3,class:"fcom_description"};function pUe(t,e,n,s,i,o){const r=_e,a=Y("Top"),l=Y("Bottom"),c=Y("EditPen"),u=Y("Hide"),d=Y("View"),h=Y("Back"),f=vt,p=tn,m=Jt,b=cn,_=c2,k=Y("BgImageUpload"),C=Hd,x=l2,S=Y("lockscreen-paywall-meta");return i.editing?(v(),E("div",sUe,[g("div",iUe,[y(r,{onClick:o.backToFields},{default:w(()=>[y(h)]),_:1},8,["onClick"]),g("p",null,$(t.$labelize(i.editingField.label)),1)]),g("div",oUe,[i.editingField.type=="image"?(v(),D(x,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=M=>i.editTab=M)},{default:w(()=>[y(_,{label:t.$t("Content"),name:"content"},{default:w(()=>[y(b,{onSubmit:e[5]||(e[5]=Oe(M=>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]=M=>i.editingField.heading=M),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]=M=>i.editingField.description=M),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]=M=>i.editingField.button_text=M),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]=M=>i.editingField.button_link=M)},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]=M=>i.editingField.new_tab=M),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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]=Oe(M=>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(k,{modelValue:i.editingField.background_image,"onUpdate:modelValue":e[6]||(e[6]=M=>i.editingField.background_image=M),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),y(p,{label:t.$t("Overlay Color")},{default:w(()=>[g("div",rUe,[y(C,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[7]||(e[7]=M=>i.editingField.overlay_color=M)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[8]||(e[8]=M=>i.editingField.overlay_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Heading Color")},{default:w(()=>[g("div",aUe,[y(C,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[9]||(e[9]=M=>i.editingField.heading_color=M)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[10]||(e[10]=M=>i.editingField.heading_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Text Color")},{default:w(()=>[g("div",lUe,[y(C,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.text_color,"onUpdate:modelValue":e[11]||(e[11]=M=>i.editingField.text_color=M)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.text_color,"onUpdate:modelValue":e[12]||(e[12]=M=>i.editingField.text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Button Label")},{default:w(()=>[g("div",cUe,[y(C,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[13]||(e[13]=M=>i.editingField.button_text_color=M)},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[14]||(e[14]=M=>i.editingField.button_text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),y(p,{label:t.$t("Button Background")},{default:w(()=>[g("div",uUe,[y(C,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_color,"onUpdate:modelValue":e[15]||(e[15]=M=>i.editingField.button_color=M),"show-alpha":""},null,8,["predefine","modelValue"]),y(f,{modelValue:i.editingField.button_color,"onUpdate:modelValue":e[16]||(e[16]=M=>i.editingField.button_color=M)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):i.editingField.type=="block"?(v(),E("div",dUe,$(t.$t("Edit the field from block editor ")),1)):i.editingField.type=="lesson"?(v(),E("div",hUe,$(t.$t("Edit lessons from lesson editor ")),1)):i.editingField.type=="welcome_banner"?(v(),E("div",fUe,$(t.$t("__COURSE_BANNER_SOURCE_DESC")),1)):i.editingField.type=="paywall"?(v(),D(S,{key:4,field:i.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),E("div",qHe,[g("div",GHe,[g("div",XHe,[g("p",null,$(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",KHe,[g("div",ZHe,$(t.$t("Page Blocks")),1),g("div",JHe,[g("ul",QHe,[(v(!0),E(te,null,we(o.lockscreenFields,(M,P)=>(v(),E("li",{class:q(["fcom_block_list",{block_hidden:M.hidden}])},[g("div",eUe,[y(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(M))))]),_:2},1024),g("p",null,$(t.$labelize(M.label)),1)]),g("div",tUe,[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",nUe,[y(r,{onClick:T=>o.updateField(M)},{default:w(()=>[y(c)]),_:1},8,["onClick"]),M.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(M)},{default:w(()=>[y(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(M)},{default:w(()=>[y(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const mUe=de(YHe,[["render",pUe]]),gUe={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)}},vUe={class:"fcom_block_editor"};function yUe(t,e,n,s,i,o){const r=Yt;return v(),E("div",vUe,[Re(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"}," "+$(i.html)+` |
| 132 |
`,513)],512),[[Ht,i.all_loaded]]),i.all_loaded?O("",!0):(v(),D(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const lU=de(gUe,[["render",yUe]]),bUe={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())}}},_Ue={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},wUe=["element-loading-text"],kUe={ref:"iframeContainer",class:"iframe-container"};function CUe(t,e,n,s,i,o){const r=qe,a=Yt,l=xt("loading");return v(),E(te,null,[o.notLoading?(v(),E("div",_Ue,[g("p",null,$(t.$t("Problem with loading the editor?")),1),y(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[W($(t.$t("Use Alternative Editor")),1)]),_:1})])):O("",!0),Re((v(),E("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",kUe,null,512)],8,wUe)),[[l,!i.dataSent]])],64)}const cU=de(bUe,[["render",CUe],["__scopeId","data-v-ba29dde7"]]),xUe={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},SUe=["fill"];function $Ue(t,e,n,s,i,o){return v(),E("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,SUe)}const AUe=de(xUe,[["render",$Ue]]),EUe={name:"LessonIcon"},MUe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TUe(t,e,n,s,i,o){return v(),E("svg",MUe,[...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 PUe=de(EUe,[["render",TUe]]),IUe={name:"PlayIcon"},LUe={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function OUe(t,e,n,s,i,o){return v(),E("svg",LUe,[...e[0]||(e[0]=[Ia('<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 DUe=de(IUe,[["render",OUe]]),RUe={name:"PlayPlaceholderIcon"},VUe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FUe(t,e,n,s,i,o){return v(),E("svg",VUe,[...e[0]||(e[0]=[Ia('<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 NUe=de(RUe,[["render",FUe]]),BUe={name:"_LockscreenLessonEditor",components:{CircleIcon:AUe,LessonIcon:PUe,PlayIcon:DUe,PlayPlaceholderIcon:NUe},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+=this.$t("%dh ",e)),n>0&&(i+=this.$t("%dm ",n)),s>0&&(i+=this.$t("%ds",s)),i.trim()||null}}},zUe={class:"fcom_course_sections"},HUe={class:"fcom_course_intro"},UUe={class:"fcom_course_labels"},jUe={class:"fcom_course_info"},WUe={class:"fcom_card_sections"},YUe={class:"fcom_section_items"},qUe=["onClick"],GUe={class:"fcom_section_primary_item_title"},XUe={class:"title_line_container"},KUe={class:"title_line"},ZUe={class:"fcom_meta_text"},JUe={key:0,class:"fcom_meta_text"},QUe={class:"fcom_section_primary_item_actions"},eje=["onClick"],tje={class:"fcom_heading_item clickable"},nje={class:"lesson_feature_media"},sje=["src","alt"],ije=["src","alt"],oje={class:"lesson_title"},rje=["innerHTML"],aje={class:"lesson_duration"},lje={key:0},cje={key:1},uje=["innerHTML"];function dje(t,e,n,s,i,o){const r=Y("ArrowRight"),a=Y("ArrowDown"),l=_e,c=Y("CircleIcon"),u=Y("Lock"),d=Y("PlayPlaceholderIcon"),h=Y("LessonIcon"),f=Y("PlayIcon");return v(),E("div",zUe,[g("div",HUe,[g("div",UUe,[g("h3",null,$(t.$t("Course Content")),1),g("p",jUe,[W($(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),e[0]||(e[0]=g("span",null," • ",-1)),W(" "+$(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",WUe,[g("div",YUe,[(v(!0),E(te,null,we(n.sections,p=>(v(),E("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),E("div",{key:0,onClick:m=>p.is_closed=!p.is_closed,class:q(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",GUe,[g("div",XUe,[g("div",KUe,[g("h4",null,$(p.title),1)]),g("span",ZUe,$(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),E("span",JUe," • "+$(o.lessonDuration(p)),1)):O("",!0)])]),g("div",QUe,[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,qUe)):O("",!0),p.is_closed?O("",!0):(v(!0),E(te,{key:1},we(p.lessons,m=>(v(),E("div",{key:m.id,class:q(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:b=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",tje,[y(l,null,{default:w(()=>[o.isFreePreview(m)?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),E(te,{key:0},[g("span",nje,[m.featured_image?(v(),E("img",{key:0,src:m.featured_image,alt:m.title},null,8,sje)):o.hasMediaImage(m)?(v(),E("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,ije)):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",oje,[g("span",{innerHTML:m.title},null,8,rje),g("span",aje,[m.meta.video_length?(v(),E("span",lje,$(o.formatSeconds(m.meta.video_length)),1)):(v(),E("span",cje,$("---")))])])],64)):(v(),E("span",{key:1,innerHTML:m.title},null,8,uje))])],8,eje)],2))),128))]))),128))])])])}const hje=de(BUe,[["render",dje]]),fje={name:"LockscreenPaywallView",components:{ImagePlaceholder:AS},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()}},pje={class:"fcom_paywall_cards"},mje={class:"paywall_header"},gje={class:"paywall_body"},vje=["innerHTML"],yje={key:0,class:"subscription"},bje={class:"paywall_footer"},_je={key:0,class:"fcom_mb_10"},wje=["href"];function kje(t,e,n,s,i,o){const r=Yt,a=o8,l=Y("ImagePlaceholder");return v(),E("div",pje,[i.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),E(te,{key:1},we(o.filteredPaywalls,c=>(v(),E("div",{key:c.id,class:"fcom_paywall",style:Xe(o.cardStyles)},[g("div",mje,[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",gje,[g("span",{innerHTML:c.total_price},null,8,vje),o.isSubscriptionPaywall(c)?(v(),E("span",yje," / "+$(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",bje,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),E("span",_je,$(c.description),1)):O("",!0),n.editable?Re((v(),E("input",{key:1,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),type:"text","onUpdate:modelValue":e[0]||(e[0]=u=>n.field.button_text=u)},null,4)),[[fd,n.field.button_text]]):(v(),E("a",{key:2,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),href:c.checkout_url},$(n.field.button_text),13,wje))])],4))),128))])}const Cje=de(fje,[["render",kje]]),xje={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:hje,MediaEmbeder:fv,BlockEditor:lU,LockscreenMeta:mUe,LockscreenPaywallView:Cje,FullEditorFrame:cU},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}}},Sje={class:"fcom_editor_topbar"},$je={class:"fcom_editor_content"},Aje={class:"fcom_item"},Eje={class:"fcom_content"},Mje=["onBlur"],Tje=["onBlur"],Pje=["onBlur"],Ije={key:1,class:"fcom_content_wrap"},Lje={id:"fcomBlockContent"},Oje={key:2,class:"fcom_content_wrap"},Dje={key:1,class:"fcom_description"},Rje={key:3,class:"fcom_content_wrap"},Vje={key:4,class:"fcom_paywall_wrap"};function Fje(t,e,n,s,i,o){const r=Y("lockscreen-meta"),a=j1,l=Y("Lock"),c=_e,u=Y("block-editor"),d=Y("FullEditorFrame"),h=Y("welcome-banner"),f=Y("lockscreen-lesson-editor"),p=Yt,m=Y("lockscreen-paywall-view"),b=Pi,_=La;return v(),E(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(_,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(b,null,{default:w(()=>[g("div",Sje,[y(c,null,{default:w(()=>[y(l)]),_:1}),g("h3",null,$(n.title),1)]),g("div",$je,[(v(!0),E(te,null,we(o.lockscreenFields,k=>{var C;return v(),E("div",Aje,[k.type=="image"?(v(),E("div",{key:0,class:"fcom_image_wrap",style:Xe(o.imageStyles(k))},[g("div",Eje,[g("h2",{style:Xe(o.headingStyles(k)),contenteditable:"true",onBlur:x=>o.updateHeading(x,k)},$(k.heading),45,Mje),k.description?(v(),E("p",{key:0,style:Xe(o.descriptionStyles(k)),contenteditable:"true",onBlur:x=>o.updateDescription(x,k)},$(k.description),45,Tje)):O("",!0),k.button_text?(v(),E("button",{key:1,class:"fcom_btn",style:Xe(o.buttonStyles(k)),contenteditable:"true",onBlur:x=>o.updateButtonLabel(x,k)},$(k.button_text),45,Pje)):O("",!0)])],4)):O("",!0),k.type=="block"?(v(),E("div",Ije,[g("div",Lje,[i.useClassic?(v(),D(u,{key:0,modelValue:k.content,"onUpdate:modelValue":x=>k.content=x},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:k.content,"onUpdate:modelValue":x=>k.content=x},null,8,["onUseAlternateEditor","editorParams","modelValue","onUpdate:modelValue"]))])])):O("",!0),k.type=="welcome_banner"?(v(),E("div",Oje,[k.banner?(v(),D(h,{key:0,config:k.banner,"wrapper-class":"fcom_course_welcome_box","content-class":"fcom_course_welcome_content"},null,8,["config"])):(v(),E("div",Dje,$(t.$t("__COURSE_BANNER_EMPTY_DESC")),1))])):O("",!0),k.type=="lesson"?(v(),E("div",Rje,[n.loading?(v(),D(p,{key:1,rows:5,animated:!0})):(v(),D(f,{key:0,sections:n.sections,is_editor:!0,settings:n.settings},null,8,["sections","settings"]))])):O("",!0),k.type=="paywall"&&((C=k.paywalls)==null?void 0:C.length)>0?(v(),E("div",Vje,[y(m,{space_id:n.space_id,field:k,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const uU=de(xje,[["render",Fje]]),Nje={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:uU},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()}},Bje={key:0,class:"fcom_lockscreen_meta"},zje={class:"fcom_description"};function Hje(t,e,n,s,i,o){const r=Y("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(),E("div",Bje,[g("div",zje,[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 Uje=de(Nje,[["render",Hje]]),jje={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)}}},Wje=["onDragstart","onDragover","onDrop","draggable"];function Yje(t,e,n,s,i,o){return v(),E("div",{class:"drag-container",onDragover:e[1]||(e[1]=Oe((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[2]||(e[2]=Oe((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[y(E_,{name:"flip-list",tag:"div",class:"drag-group",style:Xe(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:w(()=>[(v(!0),E(te,null,we(n.items,(r,a)=>(v(),E("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Oe(l=>o.dragOver(l,a),["prevent"]),onDrop:Oe(l=>o.dropEnd(l,a),["prevent"]),draggable:n.draggable,class:q(["drag-item",n.itemClass,{dragging:i.draggingIndex===a}]),style:Xe(n.itemStyle)},[le(t.$slots,"item",{data:r,index:a},void 0,!0)],46,Wje))),128))]),_:3},8,["style"])],32)}const Jd=de(jje,[["render",Yje],["__scopeId","data-v-97dc50e4"]]),qje={name:"MenuGroupSettings",components:{SpaceCourseSelector:CS,FluentDnD:Jd,LogoEmojiSelector:Z1,Drawer:jd},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=Q1(this.editingItem.permalink);t.valid||this.urlErrors.push(...t.errors)}return this.urlErrors.length===0},initEditLink(t,e="create"){t.privacy||(t.privacy="public",t.membership_ids=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()}}},Gje={key:0,class:"fcom_section_primary"},Xje={class:"fcom_section_primary_item"},Kje={class:"fcom_section_primary_item_title"},Zje={class:"fcom_heading_item"},Jje={class:"fcom_section_item_actions"},Qje={class:"fcom_section_items menu-items-container"},eWe={key:0,style:{padding:"1rem"}},tWe={class:"fcom_section_item_title"},nWe={class:"fcom_heading_item"},sWe={key:0,class:"community_avatar"},iWe=["src"],oWe={key:1,class:"fcom_emoji"},rWe={key:2,class:"fcom_shape"},aWe=["innerHTML"],lWe={class:"fcom_section_item_actions"},cWe={key:0},uWe={key:1},dWe={key:0},hWe={class:"fcom_help_text"},fWe={class:"fcom_help_text"};function pWe(t,e,n,s,i,o){const r=qe,a=_e,l=Ai,c=Y("FluentDnD"),u=Y("logo-emoji-selector"),d=vt,h=tn,f=Jt,p=Zi,m=Os,b=Y("SpaceCourseSelector"),_=El,k=cn,C=Y("drawer");return v(),E(te,null,[n.menuItems?(v(),E("div",Gje,[g("div",Xje,[g("div",Kje,[g("div",Zje,[le(t.$slots,"title",{},()=>[g("h4",null,$(n.title),1)])])]),g("div",Jje,[y(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[W($(t.$t("Add New Link")),1)]),_:1})])]),g("div",Qje,[n.menuItems.length?O("",!0):(v(),E("div",eWe,[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:x,index:S})=>[g("div",tWe,[g("p",nWe,[n.use_icon_selector?(v(),E(te,{key:0},[e[12]||(e[12]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),x.icon_image?(v(),E("div",sWe,[y(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:x.icon_image},null,8,iWe)]),_:2},1024)])):x.emoji?(v(),E("span",oWe,$(x.emoji),1)):x.shape_svg?(v(),E("span",rWe,[y(a,{innerHTML:x.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):x.icon_svg?(v(),D(a,{key:1},{default:w(()=>[g("span",{innerHTML:x.icon_svg},null,8,aWe)]),_:2},1024)):O("",!0),g("span",null,$(x.title),1),x.is_unavailable=="yes"?(v(),D(l,{key:2,type:"danger"},{default:w(()=>[W($(t.$t("unavailable")),1)]),_:1})):x.enabled=="yes"?(v(),D(l,{key:3,type:"success"},{default:w(()=>[W($(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:4,type:"info"},{default:w(()=>[W($(t.$t("disabled")),1)]),_:1}))])]),g("div",lWe,[g("div",null,[y(r,{onClick:M=>o.initEditLink(x,"edit"),size:"small"},{default:w(()=>[W($(t.$t("Edit")),1)]),_:1},8,["onClick"]),x.is_system!="yes"?(v(),D(r,{key:0,onClick:M=>o.removeLink(S),type:"danger",plain:"",size:"small"},{default:w(()=>[W($(t.$t("Delete")),1)]),_:1},8,["onClick"])):O("",!0)])])]),_:1},8,["items","onDrop","item-class"])])])):O("",!0),y(C,{modelValue:i.openEditLinkDrawer,"onUpdate:modelValue":e[11]||(e[11]=x=>i.openEditLinkDrawer=x),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(),E("h4",cWe,$(t.$t("Edit Link")),1)):(v(),E("h4",uWe,$(t.$t("Add Custom Link")),1))]),default:w(()=>[i.editingItem?(v(),E("div",dWe,[y(k,{onSubmit:e[10]||(e[10]=Oe(x=>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]=x=>i.editingItem.title=x)},fs({_: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]=x=>{n.saving||(i.editingItem.emoji=x.emoji,i.editingItem.icon_image=x.logo,i.editingItem.shape_svg=x.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]=x=>i.editingItem.permalink=x)},null,8,["disabled","placeholder","modelValue"]),g("div",hWe,[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]=x=>i.editingItem.icon_svg=x)},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]=x=>i.editingItem.enabled=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),i.editingItem.is_system!="yes"?(v(),D(h,{key:2},{default:w(()=>[y(f,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:i.editingItem.new_tab,"onUpdate:modelValue":e[6]||(e[6]=x=>i.editingItem.new_tab=x),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),y(h,{label:t.$t("Visibility")},{default:w(()=>[y(m,{disabled:n.saving,modelValue:i.editingItem.privacy,"onUpdate:modelValue":e[7]||(e[7]=x=>i.editingItem.privacy=x)},{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",fWe,$(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),i.editingItem.privacy=="members_only"?(v(),D(h,{key:3,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]=x=>i.editingItem.membership_ids=x),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["disabled","modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),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),E(te,null,we(i.urlErrors,(x,S)=>(v(),E("li",{style:{"margin-bottom":"0"},key:S},$(x),1))),128))])])]),_:1})):O("",!0),y(h,null,{default:w(()=>[y(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=x=>o.createOrUpdateLink())},{default:w(()=>[W($(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 dU=de(qje,[["render",pWe]]),mWe={name:"ManageSpaceLinks",components:{MenuGroupSettings:dU},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})}}},gWe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},vWe={class:"fcom_card_sections"};function yWe(t,e,n,s,i,o){const r=Y("menu-group-settings"),a=Pi,l=La;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(a,null,{default:w(()=>[g("div",gWe,[g("div",vWe,[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 hU=de(mWe,[["render",yWe]]),bWe={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()}},_We={class:"fcom_topic_selector"},wWe={class:"fcom_select_photo",style:{float:"left"}},kWe=["src","alt"],CWe=["innerHTML"];function xWe(t,e,n,s,i,o){const r=nn,a=Zt,l=Y("Plus"),c=_e,u=qe,d=vt,h=tn,f=cn,p=jo,m=Tl,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]=Oe(_=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(h,null,{default:w(()=>[g("div",_We,[Re((v(),D(a,{style:{width:"100%"},"fit-input-width":"",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),E(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",wWe,[g("img",{src:_.image,alt:_.title},null,8,kWe),g("span",null,$(_.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:_.price},null,8,CWe)]),_: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(()=>[W($(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(()=>[W($(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const SWe=de(bWe,[["render",xWe]]),$We={name:"ManagePaywalls",components:{ImagePlaceholder:AS,AddPaywallModal:SWe},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()}},AWe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},EWe={class:"fcom_card_sections"},MWe={class:"fcom_card_section_heading"},TWe={class:"fcom_section_primary_item_title"},PWe={class:"fcom_heading_item"},IWe={key:0,class:"fcom_section_item_actions"},LWe={class:"fcom_section_primary"},OWe={class:"fcom_section_primary_item"},DWe={class:"fcom_section_primary_item_title"},RWe={class:"fcom_heading_item"},VWe={class:"fcom_shape"},FWe={class:"fcom_section_item_actions"},NWe=["href"],BWe=["href"],zWe={class:"fcom_section_items"},HWe={class:"fcom_section_item_title"},UWe={class:"fcom_heading_item"},jWe={class:"fcom_shape"},WWe={class:"fcom_section_item_actions"},YWe=["innerHTML"],qWe={key:2,style:{padding:"1rem"}},GWe={key:1,class:"fcom_section_item"},XWe={class:"fcom_section_primary"},KWe={class:"fcom_section_primary_item"},ZWe=["disabled"],JWe={class:"dialog_header"},QWe={class:"dialog_left"},eYe={class:"dialog_body"},tYe={style:{"text-align":"center"}},nYe={class:"fcom_heading_item",style:{"justify-content":"center"}},sYe={class:"fcom_shape"},iYe={style:{margin:"1rem 0px 0.8rem"}},oYe={class:"dialog_footer"};function rYe(t,e,n,s,i,o){const r=qe,a=Yt,l=o8,c=Y("MoreFilled"),u=_e,d=Da,h=Ra,f=Oa,p=Y("ImagePlaceholder"),m=Pi,b=La,_=Y("AddPaywallModal"),k=Jt,C=xs,x=xt("loading");return v(),E(te,null,[y(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(m,null,{default:w(()=>[g("div",AWe,[g("div",EWe,[g("div",MWe,[g("div",TWe,[g("div",PWe,[le(t.$slots,"title",{},()=>[g("h4",null,$(t.$t("Manage Paywalls")),1)])])]),i.hasFluentCart?(v(),E("div",IWe,[y(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:w(()=>[W($(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),i.hasFluentCart?(v(),E(te,{key:0},[i.loading||i.removing?(v(),D(a,{key:0,class:"white_loaded",rows:5,animated:!0})):i.paywalls.length?(v(!0),E(te,{key:1},we(i.paywalls,S=>(v(),E("div",{class:"fcom_section_item",key:S.ID},[g("div",LWe,[g("div",OWe,[g("div",DWe,[g("h4",RWe,[g("span",VWe,[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",FWe,[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,NWe)]),_: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,BWe)]),_:2},1024),y(d,{type:"danger",onClick:M=>o.initRemovePaywall(S)},{default:w(()=>[W($(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",zWe,[(v(!0),E(te,null,we(S.variants,M=>(v(),E("div",{class:"fcom_section_item",key:M.id},[g("div",HWe,[g("div",UWe,[g("span",jWe,[M.photo?(v(),D(l,{key:0,src:M.photo},null,8,["src"])):(v(),D(l,{key:1},{default:w(()=>[y(p)]),_:1}))]),g("span",null,$(M.variation_title),1)])]),g("div",WWe,[g("span",{class:"fcom_price",innerHTML:M.total_price},null,8,YWe),y(f,{trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{onClick:P=>o.copyCheckoutUrl(M.checkout_url)},{default:w(()=>[W($(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(),E("div",qWe,[g("p",null,$(t.$t("No paywall has been added yet")),1)]))],64)):(v(),E("div",GWe,[g("div",XWe,[g("div",KWe,[g("span",null,[W($(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Re((v(),E("a",{disabled:i.installing,onClick:e[1]||(e[1]=(...S)=>o.installPlugin&&o.installPlugin(...S)),class:"fcom_link"},[W($(t.$t("click here")),1)],8,ZWe)),[[x,i.installing]]),W(" "+$(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(C,{"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",JWe,[g("div",QWe,[g("h4",null,$(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",oYe,[y(r,{class:"fcom_primary_button",disabled:i.removing,onClick:o.deletePaywall},{default:w(()=>[W($(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(()=>[W($(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var S,M;return[g("div",eYe,[g("div",tYe,[g("h4",nYe,[g("span",sYe,[y(l,{src:(S=i.removePaywall)==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,$((M=i.removePaywall)==null?void 0:M.post_title),1)]),g("p",iYe,$(t.$t("Are you sure you want to delete this paywall? This action cannot be undone.")),1),y(k,{class:"fcom_checkbox",modelValue:i.revokeAccess,"onUpdate:modelValue":e[3]||(e[3]=P=>i.revokeAccess=P),"true-value":"yes","false-value":"no"},{default:w(()=>[W($(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const fU=de($We,[["render",rYe]]),aYe={name:"CourseWelcomeBannerConfig",props:["course","savingCount","hasPro"],emits:["saved"],components:{MediaEmbeder:fv,BgImageUpload:vv,CrepeEditor:ru},data(){return{saving:!1,loading:!1,loadFailed:!1,currentTab:"enrolled",appReady:!1,bannerData:{enrolled:{enabled:"no",mediaType:"image",title:"",description:"",allowClose:"no",bannerImage:"",ctaButtons:[],bannerVideo:{}},not_enrolled:{enabled:"no",mediaType:"image",title:"",description:"",bannerImage:"",ctaButtons:[],bannerVideo:{}}}}},watch:{savingCount(){!this.hasPro||this.loadFailed||this.saveSettings()}},computed:{isEnabled(){return this.bannerData[this.currentTab].enabled=="yes"}},methods:{switchOption(t){this.appReady=!1,this.currentTab=t,this.$nextTick(()=>{this.appReady=!0})},addButton(){this.bannerData[this.currentTab].ctaButtons.push({label:"",link:"",type:"primary",newTab:"yes"})},removeButton(t){this.bannerData[this.currentTab].ctaButtons.splice(t,1)},getSettings(){this.loading=!0,this.loadFailed=!1,this.$get("admin/courses/"+this.course.id+"/welcome-banner").then(t=>{this.bannerData=t.settings,this.appReady=!0}).catch(t=>{this.loadFailed=!0,this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/courses/"+this.course.id+"/welcome-banner",{settings:this.bannerData}).then(t=>{this.$notify.success(t.message),this.$emit("saved"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_enrolled"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_not_enrolled")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.hasPro&&this.getSettings()}},lYe={class:"fcom_customizer_container"},cYe={class:"fcom_wc_banner_header"},uYe={class:"fcom_wc_banner_options"},dYe={class:"fcom_filter_menu"},hYe={class:"fcom_filter_menu_ul"},fYe={key:0,class:"fcom_wc_banner_load_error"},pYe={key:1,class:"fcom_wc_banner_content"},mYe={class:"fcom_wc_banner_content_header"},gYe={class:"fcom_wc_banner_media_type"},vYe={key:0,class:"fcom_banner_image_holder"},yYe={key:1,class:"fcom_banner_image_preview"},bYe={key:0,class:"fcom_wc_banner_cta_buttons"},_Ye={class:"fcom_course_wc_help_text"},wYe={class:"fcom_wc_banner_content_footer"},kYe={key:1,class:"fcom_upgrade_banner"},CYe={class:"fcom_upgrade_description"},xYe=["href"];function SYe(t,e,n,s,i,o){const r=qe,a=Zc,l=Zi,c=Os,u=Y("BgImageUpload"),d=Cr,h=Y("CloseBold"),f=_e,p=Y("media-embeder"),m=vt,b=tn,_=Y("crepe-editor"),k=nn,C=Zt,x=k8,S=Jt,M=cn,P=Yt;return v(),E("div",lYe,[g("div",cYe,[g("h4",null,$(t.$t("Welcome Banner")),1)]),g("div",uYe,[g("div",dYe,[g("ul",hYe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Oe(T=>o.switchOption("enrolled"),["prevent"])),class:q({"router-link-exact-active":i.currentTab=="enrolled"}),href:"#"},$(t.$t("Enrolled")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Oe(T=>o.switchOption("not_enrolled"),["prevent"])),class:q({"router-link-exact-active":i.currentTab=="not_enrolled"}),href:"#"},$(t.$t("Not Enrolled")),3)])])])]),i.loadFailed?(v(),E("div",fYe,[g("p",null,$(t.$t("Unable to load welcome banner settings. Please try again.")),1),y(r,{class:"fcom_primary_button",onClick:o.getSettings},{default:w(()=>[W($(t.$t("Retry")),1)]),_:1},8,["onClick"])])):i.loading?(v(),D(P,{key:2,rows:5})):(v(),E("div",pYe,[g("div",mYe,[g("h4",null,$(i.currentTab==="enrolled"?t.$t("Enable for enrolled members"):t.$t("Enable for not enrolled visitors")),1),y(a,{modelValue:i.bannerData[i.currentTab].enabled,"onUpdate:modelValue":e[2]||(e[2]=T=>i.bannerData[i.currentTab].enabled=T),"active-value":"yes","inactive-value":"no",class:"fcom_switch"},null,8,["modelValue"])]),g("div",{class:q(["fcom_wc_banner_content_body",{fcom_wc_disabled:!o.isEnabled}])},[g("div",gYe,[g("p",null,$(t.$t("Media type")),1),y(c,{modelValue:i.bannerData[i.currentTab].mediaType,"onUpdate:modelValue":e[3]||(e[3]=T=>i.bannerData[i.currentTab].mediaType=T),class:"fcom_radio_group"},{default:w(()=>[y(l,{label:t.$t("Image"),value:"image"},null,8,["label"]),y(l,{label:t.$t("Video"),value:"video"},null,8,["label"])]),_:1},8,["modelValue"])]),i.bannerData[i.currentTab].mediaType==="image"?(v(),E(te,{key:0},[i.bannerData[i.currentTab].bannerImage?(v(),E("div",yYe,[y(d,{alt:t.$t("Image Preview"),src:i.bannerData[i.currentTab].bannerImage},null,8,["alt","src"]),y(r,{class:"fcom_secondary_button",text:"",onClick:e[5]||(e[5]=T=>i.bannerData[i.currentTab].bannerImage="")},{default:w(()=>[y(f,null,{default:w(()=>[y(h)]),_:1})]),_:1})])):(v(),E("div",vYe,[g("h4",null,$(t.$t("Featured Image")),1),g("p",null,$(t.$t("Set a featured image at the top of the welcome banner. Recommended image dimension: 1680x600")),1),y(u,{modelValue:i.bannerData[i.currentTab].bannerImage,"onUpdate:modelValue":e[4]||(e[4]=T=>i.bannerData[i.currentTab].bannerImage=T)},null,8,["modelValue"])]))],64)):O("",!0),i.bannerData[i.currentTab].mediaType==="video"?(v(),D(p,{key:1,media:i.bannerData[i.currentTab].bannerVideo},null,8,["media"])):O("",!0),y(M,{onSubmit:Oe(t.doNothing,["prevent"]),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[y(b,{label:t.$t("Title")},{default:w(()=>[y(m,{modelValue:i.bannerData[i.currentTab].title,"onUpdate:modelValue":e[6]||(e[6]=T=>i.bannerData[i.currentTab].title=T)},null,8,["modelValue"])]),_:1},8,["label"]),y(b,{label:t.$t("Description")},{default:w(()=>[i.appReady?(v(),D(_,{key:0,modelValue:i.bannerData[i.currentTab].description,"onUpdate:modelValue":e[7]||(e[7]=T=>i.bannerData[i.currentTab].description=T)},null,8,["modelValue"])):O("",!0)]),_:1},8,["label"]),y(b,{label:t.$t("Call to Action")},{default:w(()=>{var T;return[((T=i.bannerData[i.currentTab].ctaButtons)==null?void 0:T.length)>0?(v(),E("div",bYe,[(v(!0),E(te,null,we(i.bannerData[i.currentTab].ctaButtons,(I,L)=>(v(),E("div",{key:L,class:"fcom_wc_banner_cta_button"},[y(b,{label:L?"":t.$t("Button Label")},{default:w(()=>[y(m,{modelValue:I.label,"onUpdate:modelValue":V=>I.label=V},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),y(b,{label:L?"":t.$t("Button Link")},{default:w(()=>[y(m,{modelValue:I.link,"onUpdate:modelValue":V=>I.link=V},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),y(b,{label:L?"":t.$t("Button Type"),class:"fcom_wc_banner_select"},{default:w(()=>[y(C,{modelValue:I.type,"onUpdate:modelValue":V=>I.type=V,class:"fcom_select",placeholder:t.$t("Select type")},{default:w(()=>[y(k,{label:t.$t("Primary"),value:"primary"},null,8,["label"]),y(k,{label:t.$t("Secondary"),value:"secondary"},null,8,["label"]),y(k,{label:t.$t("Text"),value:"text"},null,8,["label"]),y(k,{label:t.$t("Link"),value:"link"},null,8,["label"])]),_:1},8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),y(b,{label:L?"":t.$t("Open in new tab"),class:"fcom_wc_banner_select"},{default:w(()=>[y(C,{modelValue:I.newTab,"onUpdate:modelValue":V=>I.newTab=V,class:"fcom_select"},{default:w(()=>[y(k,{label:t.$t("Yes"),value:"yes"},null,8,["label"]),y(k,{label:t.$t("No"),value:"no"},null,8,["label"])]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),y(r,{text:"",class:"wc_button_remove",onClick:V=>o.removeButton(L)},{default:w(()=>[y(f,null,{default:w(()=>[y(h)]),_:1})]),_:1},8,["onClick"])]))),128)),y(x,{underline:!1,onClick:o.addButton},{default:w(()=>[W($("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"])])):(v(),D(x,{key:1,underline:!1,onClick:o.addButton},{default:w(()=>[W($("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"]))]}),_:1},8,["label"]),i.currentTab=="enrolled"?(v(),D(b,{key:0,class:"fcom_course_wc_allowclose"},{default:w(()=>[y(S,{modelValue:i.bannerData[i.currentTab].allowClose,"onUpdate:modelValue":e[8]||(e[8]=T=>i.bannerData[i.currentTab].allowClose=T),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),g("div",_Ye,$(t.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1},8,["onSubmit"])],2),g("div",wYe,[n.hasPro?(v(),D(r,{key:0,class:"fcom_primary_button",disabled:i.saving,loading:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Update Info")),1)]),_:1},8,["disabled","loading","onClick"])):(v(),E("div",kYe,[g("p",CYe,$(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_course_welcome_banner"),target:"_blank"},$(t.$t("Upgrade to Pro")),9,xYe)]))])]))])}const $Ye=de(aYe,[["render",SYe]]),AYe={name:"CourseCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:hU,CourseLockscreen:Uje,CreateCourseForm:kS,ManagePaywalls:fU,CourseWelcomeBannerConfig:$Ye},data(){return{saving:!1,currentTab:"general",savingCount:0,hasPro:window.fluentComAdmin.pro}},methods:{saveChanges(){if(!this.hasPro&&(this.currentTab=="lock_screen"||this.currentTab=="welcome_banner")){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})}},EYe={key:0,class:"fcom_full_editor"},MYe={class:"fcom_full_editor_header"},TYe={class:"fcom_editor_menu object_menu"},PYe={class:"fcom_space_menu_ul"},IYe={class:"full_editor_actions"},LYe={style:{"max-width":"800px",margin:"0 auto"}},OYe={class:"fcom_course_welcome_banner_wrap"};function DYe(t,e,n,s,i,o){const r=Y("ArrowLeft"),a=_e,l=qe,c=W1,u=Y("create-course-form"),d=Pi,h=La,f=Y("course-lockscreen"),p=Y("manage-space-links"),m=Y("manage-paywalls"),b=Y("course-welcome-banner-config"),_=U1,k=xt("loading");return n.course.id?(v(),E("div",EYe,[y(_,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var C;return[g("div",MYe,[g("div",{onClick:e[0]||(e[0]=x=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),W(" "+$(n.course.title),1)]),g("div",TYe,[g("ul",PYe,[g("li",{onClick:e[1]||(e[1]=x=>i.currentTab="general")},[g("a",{class:q({"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:q({"router-link-exact-active":i.currentTab==="paywalls"}),href:"#"},$(t.$t("Paywalls")),3)]),n.course.privacy=="private"&&((C=n.course.settings)==null?void 0:C.custom_lock_screen)=="yes"?(v(),E("li",{key:0,onClick:e[3]||(e[3]=x=>i.currentTab="lock_screen")},[g("a",{class:q({"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="welcome_banner")},[g("a",{class:q({"router-link-exact-active":i.currentTab==="welcome_banner"}),href:"#"},$(t.$t("Welcome Banner")),3)]),g("li",{onClick:e[5]||(e[5]=x=>i.currentTab="manage_links")},[g("a",{class:q({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},$(t.$t("Course Links")),3)])])]),g("div",IYe,[Re((v(),D(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveChanges,bg:""},{default:w(()=>[W($(!i.hasPro&&(i.currentTab=="lock_screen"||i.currentTab=="welcome_banner")?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes")),1)]),_:1},8,["disabled","onClick"])),[[k,i.saving]]),y(l,{"aria-label":t.$t("Close"),onClick:e[6]||(e[6]=x=>t.$emit("completed")),text:""},{default:w(()=>[...e[10]||(e[10]=[W(" X ",-1)])]),_:1},8,["aria-label"])])])]}),_:1}),y(_,{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",LYe,[y(u,{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[7]||(e[7]=C=>t.$emit("close"))},null,8,["savingCount","spaceProfile"])):i.currentTab=="manage_links"?(v(),D(p,{key:2,savingCount:i.savingCount,onClose:e[8]||(e[8]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):i.currentTab=="paywalls"?(v(),D(m,{key:3,savingCount:i.savingCount,onClose:e[9]||(e[9]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):i.currentTab=="welcome_banner"?(v(),D(h,{key:4,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[y(d,null,{default:w(()=>[g("div",OYe,[y(b,{course:n.course,savingCount:i.savingCount,hasPro:i.hasPro},null,8,["course","savingCount","hasPro"])])]),_:1})]),_:1})):O("",!0)]),_:1})]),_:1})])):O("",!0)}const pU=de(AYe,[["render",DYe]]),RYe={name:"EditCourseRoute",components:{CourseCustomizer:pU,AppLayout:gi,Layout:mi},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)}},VYe={class:"object_menu"},FYe={class:"fcom_space_menu_ul"},NYe={key:0},BYe={class:"actions_items"},zYe={key:0,class:"white_loaded"},HYe={key:2},UYe={key:0};function jYe(t,e,n,s,i,o){const r=vde,a=gde,l=Y("router-link"),c=Y("MoreFilled"),u=_e,d=qe,h=jo,f=Yt,p=Y("router-view"),m=Y("layout"),b=Y("app-layout"),_=Y("course-customizer");return v(),E(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(()=>[W($(t.$t("Courses")),1)]),_:1}),i.course.id?(v(),D(r,{key:0},{default:w(()=>[W($(i.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),E("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=k=>{i.customizeCourse=!0})},$(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",VYe,[g("ul",FYe,[(v(!0),E(te,null,we(o.computedMenuItems,k=>(v(),E("li",{key:k.name,class:q("course_inner_menu_"+k.name)},[y(l,{to:{name:k.route,params:{course_id:i.course.id}}},{default:w(()=>[W($(k.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),E("li",NYe,[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",BYe,[g("li",{onClick:e[1]||(e[1]=k=>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]=(...k)=>o.initDuplicateCourse&&o.initDuplicateCourse(...k))},$(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...k)=>o.initDeleteCourse&&o.initDeleteCourse(...k))},$(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[i.loading?(v(),E("div",zYe,[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(),E("div",HYe,[g("h3",null,$(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1}),i.customizeCourse&&i.course.id?(v(),E("div",UYe,[(v(),D(Pa,{to:"body"},[y(_,{course:i.course,onClose:e[5]||(e[5]=k=>{i.customizeCourse=null,o.fetchCourse()}),onCompleted:e[6]||(e[6]=k=>{i.customizeCourse=null,o.fetchCourse()})},null,8,["course"])]))])):O("",!0)],64)}const WYe=de(RYe,[["render",jYe]]),YYe={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||"")}},qYe={class:"fcom_length_input"};function GYe(t,e,n,s,i,o){const r=vt;return v(),E("div",qYe,[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(()=>[W($(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(()=>[W($(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const XYe=de(YYe,[["render",GYe]]),KYe={name:"LessonDocuments",components:{DocumentLists:pv,DocumentsUploader:iU},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},ZYe={class:"fcom_meta_section fcom_lesson_documents_form"},JYe={class:"fcom_meta_label"},QYe={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},eqe={key:0,class:"fcom_lesson_documents_list"},tqe={key:1,class:"fcom_lesson_documents_list"};function nqe(t,e,n,s,i,o){const r=Y("documents-uploader"),a=Y("document-lists");return v(),E("div",ZYe,[g("div",JYe,$(t.$t("Documents & Files")),1),g("p",QYe,$(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),E("div",eqe,[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(),E("div",tqe,[g("p",null,$(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const mU=de(KYe,[["render",nqe]]),sqe={name:"CourseMeta",components:{LessonDocuments:mU,MediaEmbeder:fv,LengthInput:XYe,BgImageUpload:vv},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"},isFluentPlayerMedia(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.media)==null?void 0:e.type)=="fluent_player"}}},iqe={class:"fcom_course_meta"},oqe={class:"fcom_meta_section"},rqe={class:"fcom_meta_label"},aqe={class:"fcom_meta_content"},lqe={key:2,class:"checkbox_with_tooltip"},cqe={key:0},uqe={key:1,class:"checkbox_with_tooltip"},dqe={key:0,class:"fcom_meta_section"},hqe={key:0,class:"fcom_meta_content"},fqe={class:"fcom_meta_label"},pqe={class:"fcom_meta_content"},mqe={key:1,class:"fcom_meta_section"},gqe={class:"fcom_meta_label"},vqe={class:"fcom_edit_lesson_documents"};function yqe(t,e,n,s,i,o){var b;const r=Jt,a=Y("InfoFilled"),l=_e,c=Ls,u=vt,d=Y("media-embeder"),h=Y("length-input"),f=Y("BgImageUpload"),p=tn,m=Y("LessonDocuments");return v(),E("div",iqe,[g("div",oqe,[g("div",rqe,$(t.$t("Features Settings")),1),g("div",aqe,[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(()=>[W($(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(()=>[W($(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(()=>[W($(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),E("div",lqe,[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(()=>[W($(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),E("span",cqe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),y(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[W($(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(),E(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(()=>[W($(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]=[W("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),E("div",uqe,[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(()=>[W($(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),y(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[W($(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[10]||(e[10]=g("br",null,null,-1)),W(" "+$(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(()=>[W($(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(),E("div",dqe,[o.isFluentPlayerMedia?(v(),E("div",hqe,[g("p",null,$(t.$t("The feature video is managed by the FluentPlayer block in the lesson editor.")),1)])):(v(),D(d,{key:1,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])),g("div",fqe,$(t.$t("Lesson Duration")),1),g("div",pqe,[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(),E("div",mqe,[g("div",gqe,$(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",vqe,[y(m,{lesson:n.lesson},null,8,["lesson"])])])}const gU=de(sqe,[["render",yqe]]),bqe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:mU,BlockEditor:lU,MediaEmbeder:fv,LessonMeta:gU,FullEditorFrame:cU},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")}},_qe={class:"fcom_full_editor"},wqe={class:"fcom_full_editor_header"},kqe={class:"fcom_desktop_only"},Cqe={key:0},xqe={class:"full_editor_actions"},Sqe={class:"fcom_lesson_camp"},$qe={class:"fcom_lesson_nav"},Aqe=["title","href"],Eqe={style:{padding:"20px"}},Mqe={class:"fcom_lesson_content"},Tqe={key:0},Pqe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},Iqe={class:"fcom_lesson_title"},Lqe={class:"fcom_documents_dialog_footer"};function Oqe(t,e,n,s,i,o){const r=Y("ArrowLeft"),a=_e,l=qe,c=Y("ArrowRight"),u=Y("arrow-down"),d=Da,h=Ra,f=Oa,p=Y("View"),m=W1,b=Y("lesson-meta"),_=Pi,k=j1,C=vt,x=Y("block-editor"),S=Y("FullEditorFrame"),M=La,P=U1,T=Y("LessonDocuments"),I=xs,L=xt("loading");return v(),E("div",_qe,[y(P,null,{default:w(()=>[y(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",wqe,[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",kqe,$(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),E("span",Cqe,"("+$(n.course.title)+")",1)):O("",!0)]),g("div",xqe,[g("div",Sqe,[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",$qe,[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(()=>[W($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[W($(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(()=>[W($(t.$labelize(n.lesson.status))+" ",1),y(a,{class:"el-icon--right"},{default:w(()=>[y(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[L,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,Aqe)])])]),_:1}),y(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[i.useClassic?Re((v(),D(k,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[y(_,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",Eqe,[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)),[[Ht,i.showSideBar||!t.isMobile]]):O("",!0),y(M,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[O("",!0),g("div",Mqe,[i.useClassic?(v(),E("div",Tqe,[y(_,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",Pqe,[g("div",Iqe,[g("label",null,$(t.$t("Lesson Title")),1),y(C,{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(x,{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(I,{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",Lqe,[y(l,{type:"primary",onClick:e[14]||(e[14]=V=>i.showDocumentsModal=!1)},{default:w(()=>[W($(t.$t("Done")),1)]),_:1})])]),default:w(()=>[y(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const vU=de(bqe,[["render",Oqe]]),Dqe={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson","duplicateLesson"],props:["course","sections","lesson"],components:{LessonEditor:vU,SlugInput:Wd},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"},menuLabels(){return this.isQuizType?{preview:this.$t("Preview Quiz"),move:this.$t("Move Quiz"),duplicate:this.$t("Duplicate Quiz"),delete:this.$t("Delete Quiz")}:{preview:this.$t("Preview Lesson"),move:this.$t("Move Lesson"),duplicate:this.$t("Duplicate Lesson"),delete:this.$t("Delete Lesson")}}},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==="duplicate_lesson"?this.$emit("duplicateLesson",this.lesson):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")})}}},Rqe={key:0,class:"fcom_heading_item"},Vqe=["innerHTML"],Fqe={class:"fcom_section_item_actions"},Nqe={class:"fcom_action_lesson"},Bqe={class:"fcom_move_popup_close"},zqe={class:"fcom_move_popup_close"};function Hqe(t,e,n,s,i,o){const r=Ai,a=qe,l=vt,c=Y("arrow-down"),u=_e,d=Da,h=Ra,f=Oa,p=Y("MoreFilled"),m=nn,b=Zt,_=tn,k=cn,C=Y("Close"),x=Y("slug-input");return v(),E(te,null,[g("div",{class:q([{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]=kt(S=>i.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:kt(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(()=>[W($(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),E("p",Rqe,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,Vqe),o.isQuizType?(v(),D(r,{key:0},{default:w(()=>[W($(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",Fqe,[y(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[W($(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(()=>[W($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[W($(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[y(a,{class:q(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[W($(t.$labelize(n.lesson.status))+" ",1),y(u,{class:"el-icon--right"},{default:w(()=>[y(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",Nqe,[y(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"edit_lesson"},{default:w(()=>[W($(t.$t("Edit Content")),1)]),_:1}),y(d,{command:"edit_title"},{default:w(()=>[W($(t.$t("Edit Title")),1)]),_:1}),y(d,{command:"edit_slug"},{default:w(()=>[W($(t.$t("Edit Slug")),1)]),_:1}),y(d,{command:"preview_lesson"},{default:w(()=>[W($(o.menuLabels.preview),1)]),_:1}),y(d,{command:"move_lesson"},{default:w(()=>[W($(o.menuLabels.move),1)]),_:1}),y(d,{command:"duplicate_lesson"},{default:w(()=>[W($(o.menuLabels.duplicate),1)]),_:1}),y(d,{command:"delete"},{default:w(()=>[W($(o.menuLabels.delete),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"]),Re(g("div",{class:q(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[y(k,{onSubmit:e[6]||(e[6]=Oe(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),E(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(()=>[W($(o.menuLabels.move),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",Bqe,[y(u,{onClick:e[7]||(e[7]=S=>i.showMoveLessonPopup=!1)},{default:w(()=>[y(C)]),_:1})])],2),[[Ht,i.showMoveLessonPopup]]),Re(g("div",{class:q(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[y(k,{onSubmit:e[9]||(e[9]=Oe(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(_,{label:t.$t("Slug (optional)")},{default:w(()=>[y(x,{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(()=>[W($(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",zqe,[y(u,{onClick:e[10]||(e[10]=S=>i.editingSlugPopup=!1)},{default:w(()=>[y(C)]),_:1})])],2),[[Ht,i.editingSlugPopup]])])])],64)}const Uqe=de(Dqe,[["render",Hqe]]),jqe={name:"AddQuestionModal",components:{CrepeEditor:ru,BgImageUpload:vv,FluentDnD:Jd},emits:["close","addQuestion","updateQuestion"],props:{lesson:{type:Object,required:!0},question:{type:Object,required:!1}},data(){return{showModal:!0,appReady:!1,questionData:null,optKeyCounter:0,originalQuestionData:null,DeleteIcon:Mi(J_),questionTypes:this.appVars.question_types,newQuestion:{slug:"",type:"single_choice",label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",grading_mode:"open",correct_answers:[],options:[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]}}},watch:{showModal(t){t||this.$emit("close")},"questionData.type"(t,e){t=="single_choice"&&e=="multiple_choice"&&this.questionData.options.forEach((n,s)=>{n.is_correct=s===0}),t!=="written_answer"&&e==="written_answer"&&(!this.questionData.options||this.questionData.options.length===0)&&(this.questionData.options=[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]),t==="written_answer"&&(this.questionData.grading_mode||(this.questionData.grading_mode="open"),Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]))}},computed:{isDirty(){return!this.questionData||!this.originalQuestionData?!1:JSON.stringify(this.cleanQuestion())!==this.originalQuestionData},isRemovable(){return this.questionData.options.length>1},isSingleChoice(){return this.questionData.type=="single_choice"},isWrittenAnswer(){return this.questionData.type==="written_answer"},isExactMatch(){return this.questionData.grading_mode==="exact_match"},isNewQuestion(){return!this.question}},methods:{confirmDiscard(){return this.$confirm(this.$t("You have unsaved changes. Closing will discard them. Continue?"),this.$t("Discard changes?"),{confirmButtonText:this.$t("Discard"),cancelButtonText:this.$t("Keep editing"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"})},requestClose(){if(!this.isDirty){this.showModal=!1;return}this.confirmDiscard().then(()=>{this.showModal=!1}).catch(()=>{})},handleBeforeClose(t){if(!this.isDirty){t();return}this.confirmDiscard().then(()=>t()).catch(()=>{})},cleanQuestion(){return{...this.questionData,options:this.questionData.options.map(({_key:t,...e})=>e)}},addQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("addQuestion",this.prepareQuestionData()))},updateQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("updateQuestion",this.prepareQuestionData()))},prepareQuestionData(){const t=this.cleanQuestion();return t.type==="written_answer"&&(t.options=[],t.correct_answers=t.grading_mode==="exact_match"?this.getCleanCorrectAnswers():[]),t},getCleanCorrectAnswers(){return[...new Set((this.questionData.correct_answers||[]).map(t=>(t||"").trim()).filter(Boolean))]},addNewOption(){const t=this.questionData.options.length;this.questionData.options.push({label:`Option ${t+1}`,is_correct:!1,_key:++this.optKeyCounter})},removeOption(t){this.questionData.options.splice(t,1)},checkOption(t){this.isSingleChoice&&this.questionData.options.forEach(e=>{e.is_correct=e===t})},checkValidation(){if(!this.has_pro)return!1;const{label:t,options:e,type:n,grading_mode:s}=this.questionData,i=[{valid:!!t&&t.trim()!=="",message:this.$t("Please enter a question")}];n!=="written_answer"&&i.push({valid:Array.isArray(e)&&e.length>=2,message:this.$t("Please add at least 2 options")},{valid:e&&e.every(r=>r.label&&r.label.trim()!==""),message:this.$t("Please enter a label for each option")},{valid:e&&e.some(r=>r.is_correct===!0),message:this.$t("Please select the correct option")}),n==="written_answer"&&s==="exact_match"&&i.push({valid:this.getCleanCorrectAnswers().length>0,message:this.$t("Please add at least one correct answer")});const o=i.find(r=>!r.valid);return o?(this.$handleError(o.message),!1):!0}},created(){const t=this.isNewQuestion?this.newQuestion:this.question;this.questionData=JSON.parse(JSON.stringify(t)),this.questionData.options.forEach(e=>{e._key=++this.optKeyCounter}),this.originalQuestionData=JSON.stringify(this.cleanQuestion())},mounted(){Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]),this.questionData.grading_mode||(this.questionData.grading_mode="open"),this.$nextTick(()=>{this.appReady=!0})}},Wqe={class:"dialog_header"},Yqe={class:"dialog_left"},qqe={class:"dialog_body"},Gqe={key:0,class:"fcom_banner_image_holder"},Xqe={key:1,class:"fcom_banner_image_preview"},Kqe=["aria-label"],Zqe=["aria-checked","onClick","onKeydown"],Jqe={class:"fcom_choice_btn"},Qqe={class:"fcom_help_text"},eGe={class:"sub_label"},tGe={class:"fcom_question_option"},nGe={class:"dialog_footer"},sGe={key:0};function iGe(t,e,n,s,i,o){const r=Zc,a=Y("BgImageUpload"),l=Cr,c=Y("CloseBold"),u=_e,d=qe,h=tn,f=Y("crepe-editor"),p=Zi,m=Os,b=B1e,_=Jt,k=vt,C=k8,x=Y("FluentDnD"),S=cn,M=xs;return v(),D(M,{modelValue:i.showModal,"onUpdate:modelValue":e[9]||(e[9]=P=>i.showModal=P),width:t.drawerWidth,"modal-class":"fcom_common_dialog question_dialog","align-center":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,"before-close":o.handleBeforeClose},{header:w(()=>[g("div",Wqe,[g("div",Yqe,[g("h4",null,$(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",nGe,[y(d,{class:"fcom_secondary_button",onClick:o.requestClose},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),o.isNewQuestion?(v(),D(d,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[W($(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(d,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[W($(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),E("span",sGe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",qqe,[y(S,{onSubmit:e[8]||(e[8]=Oe(P=>t.doNothing(),["prevent"])),"label-position":"top",model:i.questionData},{default:w(()=>[y(h,{label:t.$t("Image")},{default:w(()=>[y(r,{class:"fcom_question_switch",modelValue:i.questionData.image_enabled,"onUpdate:modelValue":e[0]||(e[0]=P=>i.questionData.image_enabled=P)},null,8,["modelValue"]),i.questionData.image_enabled&&!i.questionData.image_url?(v(),E("div",Gqe,[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(a,{modelValue:i.questionData.image_url,"onUpdate:modelValue":e[1]||(e[1]=P=>i.questionData.image_url=P)},null,8,["modelValue"])])):i.questionData.image_enabled&&i.questionData.image_url?(v(),E("div",Xqe,[y(l,{alt:t.$t("Image Preview"),src:i.questionData.image_url},null,8,["alt","src"]),y(d,{class:"fcom_secondary_button",text:"",onClick:e[2]||(e[2]=P=>i.questionData.image_url="")},{default:w(()=>[y(u,null,{default:w(()=>[y(c)]),_:1})]),_:1})])):O("",!0)]),_:1},8,["label"]),y(h,{label:t.$t("Question")},{default:w(()=>[i.appReady?(v(),D(f,{key:0,modelValue:i.questionData.label,"onUpdate:modelValue":e[3]||(e[3]=P=>i.questionData.label=P),placeholder:t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),y(h,{label:t.$t("Type")},{default:w(()=>[g("div",{class:"fcom_choices question_choices",role:"radiogroup","aria-label":t.$t("Type")},[(v(!0),E(te,null,we(i.questionTypes,P=>(v(),E("div",{key:P.value,role:"radio",tabindex:"0","aria-checked":i.questionData.type==P.value,onClick:T=>i.questionData.type=P.value,onKeydown:[kt(Oe(T=>i.questionData.type=P.value,["prevent"]),["enter"]),kt(Oe(T=>i.questionData.type=P.value,["prevent"]),["space"])],class:q({fcom_choice:!0,fcom_choice_active:i.questionData.type==P.value})},[g("div",Jqe,[g("p",null,$(t.$t(P.label)),1)])],42,Zqe))),128))],8,Kqe)]),_:1},8,["label"]),o.isWrittenAnswer?(v(),D(h,{key:0,label:t.$t("Grading Mode")},{default:w(()=>[y(m,{modelValue:i.questionData.grading_mode,"onUpdate:modelValue":e[4]||(e[4]=P=>i.questionData.grading_mode=P)},{default:w(()=>[y(p,{value:"open"},{default:w(()=>[W($(t.$t("Open (any answer accepted)")),1)]),_:1}),y(p,{value:"exact_match"},{default:w(()=>[W($(t.$t("Exact Match (auto-graded)")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer&&o.isExactMatch?(v(),D(h,{key:1,label:t.$t("Correct Answer(s)")},{default:w(()=>[y(b,{modelValue:i.questionData.correct_answers,"onUpdate:modelValue":e[5]||(e[5]=P=>i.questionData.correct_answers=P),trigger:"Enter",placeholder:t.$t("Type an answer and press Enter"),style:{width:"100%"}},null,8,["modelValue","placeholder"]),g("div",Qqe,[g("p",null,$(t.$t("Add multiple variations to handle different ways students might write the answer (case-insensitive, trimmed).")),1)])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer?O("",!0):(v(),D(h,{key:2,label:t.$t("Responses"),class:"fcom_question_options"},{default:w(()=>[g("span",eGe,$(t.$t("Select correct answer")),1),y(x,{items:i.questionData.options,"row-key":"_key",class:"fcom_modal_options"},{item:w(({data:P,index:T})=>[g("div",tGe,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),y(_,{modelValue:P.is_correct,"onUpdate:modelValue":I=>P.is_correct=I,onChange:I=>o.checkOption(P),class:q({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","class"]),y(k,{modelValue:P.label,"onUpdate:modelValue":I=>P.label=I,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),D(C,{key:0,type:"danger",title:t.$t("Remove"),"aria-label":t.$t("Remove option"),icon:i.DeleteIcon,underline:!1,onClick:I=>o.removeOption(T)},null,8,["title","aria-label","icon","onClick"])):O("",!0)])]),_:1},8,["items"]),y(C,{type:"primary",underline:!1,onClick:o.addNewOption},{default:w(()=>[W($("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])),y(h,{label:t.$t("Help Text")},{default:w(()=>[y(k,{modelValue:i.questionData.help_text,"onUpdate:modelValue":e[6]||(e[6]=P=>i.questionData.help_text=P),type:"textarea",autosize:{minRows:2,maxRows:5}},null,8,["modelValue"])]),_:1},8,["label"]),y(h,{label:t.$t("Status")},{default:w(()=>[y(_,{modelValue:i.questionData.enabled,"onUpdate:modelValue":e[7]||(e[7]=P=>i.questionData.enabled=P)},{default:w(()=>[W($(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width","before-close"])}const oGe=de(jqe,[["render",iGe]]),rGe={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["close","changeLesson","saved"],components:{LessonMeta:gU,CrepeEditor:ru,AddQuestionModal:oGe,FluentDnD:Jd,ActionPopover:Pl},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null,keyCounter:0}},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()},duplicateQuestion(t){const e=JSON.parse(JSON.stringify(t));e.slug="";const[n,...s]=t.label.split(` |
| 133 |
`),i=n.replace(/\s*\(Copy(?:\s+\d+)?\)\s*$/,""),o=l=>[i+(l>1?` (Copy ${l})`:" (Copy)"),...s].join(` |
| 134 |
`);let r=1;for(;this.lesson.meta.quiz_questions.some(l=>l.label===o(r));)r++;e.label=o(r),e.label_rendered="";const a=this.lesson.meta.quiz_questions.indexOf(t)+1;this.lesson.meta.quiz_questions.splice(a,0,e),this.ensureKeys(),this.saveData()},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,this.saveData()},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,this.saveData()},openEditQuestionModal(t){this.question=t,this.showQuestionModal=!0},openAddQuestionModal(){this.has_pro&&(this.question=null,this.showQuestionModal=!0)},ensureKeys(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{(e.options||[]).forEach(n=>{n._key||(n._key=++this.keyCounter)})})},buildMetaForSave(){const t={...this.lesson.meta};return Array.isArray(t.quiz_questions)&&(t.quiz_questions=t.quiz_questions.map(e=>({...e,options:(e.options||[]).map(({_key:n,...s})=>s)}))),t},normalizeSingleChoice(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{if(e.type!=="single_choice")return;let n=!1;(e.options||[]).forEach(s=>{s.is_correct&&!n?n=!0:s.is_correct=!1}),!n&&e.options&&e.options.length&&(e.options[0].is_correct=!0)})},syncQuestionsFromServer(t){var s,i,o;const e=((s=t==null?void 0:t.meta)==null?void 0:s.quiz_questions)||[],n=((o=(i=this.lesson)==null?void 0:i.meta)==null?void 0:o.quiz_questions)||[];e.forEach((r,a)=>{const l=n[a];l&&(l.slug=r.slug,l.label_rendered=r.label_rendered)})},addQuestion(t){Array.isArray(this.lesson.meta.quiz_questions)||(this.lesson.meta.quiz_questions=[]),this.lesson.meta.quiz_questions.push({...t}),this.ensureKeys(),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.ensureKeys(),this.saveData()},checkAndSaveQuestion(t,e){if(!t.enabled){e.is_correct=!e.is_correct;return}if(t.type=="single_choice"&&t.options.forEach(n=>{n.is_correct=n===e}),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.buildMetaForSave(),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.syncQuestionsFromServer(e.lesson),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")},created(){this.ensureKeys(),this.normalizeSingleChoice()},mounted(){document.body.classList.add("fcom-no-scroll"),this.$nextTick(()=>{this.appReady=!0})}},aGe={class:"fcom_full_editor"},lGe={class:"fcom_full_editor_header"},cGe={class:"fcom_desktop_only"},uGe={key:0},dGe={class:"full_editor_actions"},hGe={class:"fcom_lesson_camp"},fGe={class:"fcom_lesson_nav"},pGe=["title","href"],mGe={class:"fcom_lesson_content"},gGe={class:"fcom_quiz_editor"},vGe={key:1,class:"fcom_questions_wrap"},yGe=["id"],bGe={key:0,class:"fcom_question_image"},_Ge={class:"fcom_question_header"},wGe=["aria-label","onClick","onKeydown"],kGe=["innerHTML"],CGe={key:1},xGe={class:"fcom_question_actions"},SGe={class:"fcom_question_body"},$Ge={class:"fcom_question_option"},AGe={key:0,class:"question_help_text"},EGe={key:1,class:"fcom_meta_sorting"},MGe={key:2,class:"fcom_banner_image_holder add_quiz_banner"},TGe={key:0},PGe={key:0},IGe={style:{padding:"20px"}};function LGe(t,e,n,s,i,o){const r=Y("ArrowLeft"),a=_e,l=qe,c=Y("ArrowRight"),u=Y("arrow-down"),d=Da,h=Ra,f=Oa,p=Y("View"),m=W1,b=vt,_=Y("crepe-editor"),k=Cr,C=Y("action-popover"),x=Jt,S=Y("FluentDnD"),M=Y("Top"),P=Y("Bottom"),T=Pi,I=La,L=Y("lesson-meta"),V=j1,R=Y("AddQuestionModal"),N=U1,F=xt("loading");return v(),E("div",aGe,[y(N,null,{default:w(()=>[y(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var B;return[g("div",lGe,[g("div",{onClick:e[0]||(e[0]=z=>t.$emit("close")),class:"fcom_back_header"},[y(a,{class:"fcom_arrow_icon"},{default:w(()=>[y(r)]),_:1}),g("span",cGe,$(t.$t("Back to Lessons")),1),(B=n.course)!=null&&B.title?(v(),E("span",uGe,"("+$(n.course.title)+")",1)):O("",!0)]),g("div",dGe,[g("div",hGe,[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",fGe,[y(l,{onClick:e[1]||(e[1]=z=>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]=z=>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]=z=>i.showSideBar=!i.showSideBar)},{default:w(()=>[g("span",null,$(t.$t("Features")),1)]),_:1})):O("",!0),y(f,{onCommand:e[4]||(e[4]=z=>{n.lesson.status=z}),trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"draft"},{default:w(()=>[W($(t.$t("Draft")),1)]),_:1}),y(d,{command:"published"},{default:w(()=>[W($(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(()=>[W($(t.$labelize(n.lesson.status))+" ",1),y(a,{class:"el-icon--right"},{default:w(()=>[y(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[F,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,pGe)])])]}),_:1}),y(N,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[y(I,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[g("div",mGe,[y(T,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var B,z,G,K;return[g("div",gGe,[y(b,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=X=>n.lesson.title=X),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),i.appReady?(v(),D(_,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=X=>n.lesson.message=X),autofocus:!0,placeholder:t.$t("Describe about this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),(z=(B=n.lesson.meta)==null?void 0:B.quiz_questions)!=null&&z.length?(v(),E("div",vGe,[(v(!0),E(te,null,we(n.lesson.meta.quiz_questions,(X,H)=>(v(),E("div",{key:X.slug,id:"fcom_question_"+X.slug,class:q(["fcom_question",[X.type,{disabled:!X.enabled}]])},[o.showQuestionImage(X)?(v(),E("div",bGe,[y(k,{src:X.image_url},null,8,["src"])])):O("",!0),g("div",_Ge,[g("div",{class:"fcom_question_label",role:"button",tabindex:"0","aria-label":t.$t("Edit question"),onClick:Q=>o.openEditQuestionModal(X),onKeydown:[kt(Q=>o.openEditQuestionModal(X),["enter"]),kt(Oe(Q=>o.openEditQuestionModal(X),["prevent"]),["space"])]},[X.label_rendered?(v(),E("span",{key:0,innerHTML:X.label_rendered},null,8,kGe)):(v(),E("span",CGe,$(X.label||t.$t("Untitled question")),1))],40,wGe),g("div",xGe,[y(C,{items:[{label:o.getStatusText(X),action:()=>{o.toggleQuestion(X)}},{label:t.$t("Edit"),action:()=>{o.openEditQuestionModal(X)}},{label:t.$t("Duplicate"),action:()=>{o.duplicateQuestion(X)}},{label:t.$t("Delete"),type:"danger",action:()=>{o.openDeleteQuestionPrompt(X.slug)}}],placement:"bottom-end"},null,8,["items"])])]),g("div",SGe,[y(S,{class:"fcom_question_options",items:X.options,"row-key":"_key","item-class":"fcom_question_option_dnd",onDrop:o.saveData},{item:w(({data:Q})=>[g("div",$Ge,[e[8]||(e[8]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),y(x,{modelValue:Q.is_correct,"onUpdate:modelValue":ne=>Q.is_correct=ne,onChange:ne=>o.checkAndSaveQuestion(X,Q),class:q({single_choice:X.type=="single_choice"})},{default:w(()=>[W($(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])])]),_:2},1032,["items","onDrop"]),X.help_text?(v(),E("div",AGe,$(X.help_text),1)):O("",!0)]),o.showMoving?(v(),E("div",EGe,[y(a,{role:"button",tabindex:H===0?-1:0,"aria-disabled":H===0,"aria-label":t.$t("Move question up"),onClick:Q=>o.moveUp(H),onKeydown:[kt(Q=>o.moveUp(H),["enter"]),kt(Oe(Q=>o.moveUp(H),["prevent"]),["space"])]},{default:w(()=>[y(M)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"]),y(a,{role:"button",tabindex:H===n.lesson.meta.quiz_questions.length-1?-1:0,"aria-disabled":H===n.lesson.meta.quiz_questions.length-1,"aria-label":t.$t("Move question down"),onClick:Q=>o.moveDown(H),onKeydown:[kt(Q=>o.moveDown(H),["enter"]),kt(Oe(Q=>o.moveDown(H),["prevent"]),["space"])]},{default:w(()=>[y(P)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"])])):O("",!0)],10,yGe))),128))])):O("",!0),(K=(G=n.lesson.meta)==null?void 0:G.quiz_questions)!=null&&K.length?(v(),D(l,{key:3,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[W($("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),E("span",PGe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),E("div",MGe,[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(()=>[W($("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),E("span",TGe," ("+$(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Re(y(V,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[y(T,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",IGe,[y(L,{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]=B=>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),[[Ht,i.showSideBar||!t.isMobile]]),i.showQuestionModal?(v(),D(R,{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 OGe=de(rGe,[["render",LGe]]),DGe={name:"SectionScheduler",components:{CaretBottom:pae},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let t=this.date+" "+this.convertTo24Hour(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(this.siteTimeFormat),this.show=!0}}},RGe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},VGe={class:"fcom_scheduler_form"},FGe={class:"fcom_input_group"},NGe={class:"el_inline_date_picker"},BGe={class:"fcom_input_group"},zGe={class:"fcom_input_group"},HGe={class:"fcom_scheduler_form scheduler_structured"},UGe={class:"fcom_input_group"},jGe={class:"fcom_label"},WGe={class:"fcom_input_group"};function YGe(t,e,n,s,i,o){const r=Y("CaretBottom"),a=_e,l=Ud,c=M8,u=qe,d=jo,h=o2,f=xt("loading");return v(),E("div",RGe,[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",VGe,[g("div",FGe,[g("div",NGe,[y(l,{"value-format":"YYYY-MM-DD",format:t.siteDateFormat,teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:i.date,"onUpdate:modelValue":e[1]||(e[1]=p=>i.date=p)},null,8,["format","modelValue"])])]),g("div",BGe,[y(c,{modelValue:i.time,"onUpdate:modelValue":e[2]||(e[2]=p=>i.time=p),start:"00:00",end:"23:59",steps:15,format:t.siteTimeFormat},null,8,["modelValue","format"])]),g("div",zGe,[Re((v(),D(u,{disabled:i.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[W($(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",HGe,[g("div",UGe,[g("div",jGe,$(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"]),W(" "+$(t.$t("Days")),1)]),g("div",WGe,[Re((v(),D(u,{disabled:i.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[W($(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,i.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const qGe=de(DGe,[["render",YGe]]),GGe={name:"_SectionSechedulerEmail",components:{CrepeEditor:ru},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+` |
| 135 |
`:"")+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()})}},XGe={class:"fcom_section_email_config"},KGe={class:"dialog_header"},ZGe={class:"dialog_left"},JGe={class:"dialog_body"},QGe={class:"fcom_input_group"},eXe={class:"fcom_label label_row"},tXe={class:"fcom_input_group"},nXe={class:"fcom_label label_row"},sXe={class:"fcom_extra_editor"},iXe={class:"dialog_footer"};function oXe(t,e,n,s,i,o){const r=Zc,a=qe,l=Da,c=Ra,u=Oa,d=vt,h=Y("crepe-editor"),f=xs;return v(),E("div",XGe,[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(()=>[W($(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",KGe,[g("div",ZGe,[g("h4",null,$(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",iXe,[y(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>i.editorOpen=!1)},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(a,{class:"fcom_primary_button",loading:i.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",JGe,[g("div",QGe,[g("div",eXe,[g("span",null,$(t.$t("Subject")),1),y(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[y(c,null,{default:w(()=>[(v(!0),E(te,null,we(i.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[W($(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[y(a,{class:"fcom_secondary_button"},{default:w(()=>[W($(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",tXe,[g("div",nXe,[g("span",null,$(t.$t("Message")),1),y(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[y(c,null,{default:w(()=>[(v(!0),E(te,null,we(i.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[W($(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[y(a,{class:"fcom_secondary_button"},{default:w(()=>[W($(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",sXe,[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 rXe=de(GGe,[["render",oXe]]),aXe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:vU,LessonLine:Uqe,SectionScheduler:qGe,FluentDnD:Jd,QuizEditor:OGe,SectionSechedulerEmail:rXe},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){const e=this.section.lessons[this.editingIndex];!e||!t||(e.title=t.title,e.status=t.status)},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)})},handleDuplicateLesson(t){this.working=!0,this.$post("admin/courses/"+this.course.id+"/lessons/"+t.id+"/duplicate").then(e=>{this.$notify.success(e.message),this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},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={};Ac(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()})}},watch:{"$route.query.lesson_id"(t){const e=this.section.lessons.findIndex(n=>n.id==parseInt(t));this.editingLesson=e>-1?this.section.lessons[e]:null,this.editingIndex=e>-1?e:0}},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)}}},lXe={class:"fcom_section_primary"},cXe={class:"fcom_section_primary_item"},uXe={key:0,class:"fcom_heading_item"},dXe={class:"fcom_space_counts"},hXe={class:"fcom_section_config fcom_label_schedule"},fXe={class:"fcom_section_config fcom_label_email"},pXe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},mXe={key:0},gXe={class:"fcom_move_popup_close"},vXe={class:"fcom_move_popup_close"},yXe={key:0,class:"fcom_section_items"},bXe={key:0};function _Xe(t,e,n,s,i,o){const r=_e,a=qe,l=vt,c=Y("section-scheduler"),u=Y("SectionSechedulerEmail"),d=Da,h=Ra,f=Oa,p=tn,m=cn,b=Y("Close"),_=nn,k=Zt,C=Y("MoreFilled"),x=Y("lesson-line"),S=Y("FluentDnD"),M=Y("LessonEditor"),P=Y("QuizEditor"),T=xt("loading");return v(),E(te,null,[Re((v(),E("div",lXe,[g("div",cXe,[g("div",{class:q(["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]=I=>n.section.title=I),onKeyup:e[4]||(e[4]=kt(I=>o.patchSection(["title"]),["enter"]))},{append:w(()=>[y(a,{onClick:e[2]||(e[2]=I=>o.patchSection(["title"]))},{default:w(()=>[W($(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),E("h4",uXe,[g("span",{onClick:e[0]||(e[0]=I=>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]=I=>n.section.isCollapsed=!n.section.isCollapsed)},{default:w(()=>[y(r,{style:Xe(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",dXe,$(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),E(te,{key:0},[g("div",hXe,[y(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",fXe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",pXe,[y(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"lesson"},{default:w(()=>[W($(t.$t("Lesson")),1)]),_:1}),y(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[W($(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),E("span",mXe," ("+$(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(()=>[W($(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",{class:q(["fcom_add_section_popup","section_"+n.section.id])},[y(m,{onSubmit:[e[7]||(e[7]=Oe(I=>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]=I=>i.newSectionItem.title=I),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(()=>[Re((v(),D(a,{disabled:i.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[W($(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[T,i.addingSectionItem]]),Re((v(),D(a,{disabled:i.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:w(()=>[W($(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,i.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",gXe,[y(r,{onClick:e[8]||(e[8]=I=>i.showAddSectionPopup=!1)},{default:w(()=>[y(b)]),_:1})])],2),[[Ht,i.showAddSectionPopup]]),Re(g("div",{class:q(["fcom_copy_section_popup","section_"+n.section.id])},[y(m,{onSubmit:e[10]||(e[10]=Oe(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(p,{label:t.$t("Copy Section to a different Course")},{default:w(()=>[y(k,{filterable:"",clearable:"",remote:"","remote-show-suffix":"","remote-method":o.fetchCourses,modelValue:i.selectedCourseId,"onUpdate:modelValue":e[9]||(e[9]=I=>i.selectedCourseId=I),loading:i.loading,placeholder:t.$t("Select Course")},{default:w(()=>[(v(!0),E(te,null,we(i.courses,I=>(v(),D(_,{key:I.id,label:I.title,value:I.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(()=>[W($(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",vXe,[y(r,{onClick:e[11]||(e[11]=I=>i.showCopySectionPopup=!1)},{default:w(()=>[y(b)]),_:1})])],2),[[Ht,i.showCopySectionPopup]]),y(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{command:"edit_title"},{default:w(()=>[W($(t.$t("Edit Title")),1)]),_:1}),y(d,{command:"copy_section"},{default:w(()=>[W($(t.$t("Copy To")),1)]),_:1}),y(d,{command:"delete"},{default:w(()=>[W($(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(C)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),E("div",yXe,[y(S,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item"},{item:w(({data:I,index:L})=>[(v(),D(x,{course:n.course,sections:n.sections,key:I.id,lesson:I,onDeleteLesson:o.handleDeleteLesson,onUpdated:o.handleLessonUpdated,onMoveLesson:o.handleMoveLesson,onDuplicateLesson:o.handleDuplicateLesson,onShowEditor:V=>o.initLessonEditor(I,L)},{before_section_heading:w(()=>[...e[13]||(e[13]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onDuplicateLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[T,i.working]]),i.editingLesson?(v(),E("div",bXe,[(v(),D(Pa,{to:"body"},[o.isLesson?(v(),D(M,{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 wXe=de(aXe,[["render",_Xe]]),kXe={name:"EditLessons",props:["course"],components:{SectionPart:wXe,FluentDnD:Jd},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return Ac(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={};Ac(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,Ac(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},CXe={class:"fcom_course_lessons"},xXe={class:"fcom_settings_header"},SXe={class:"fcom_settings_header_meta"},$Xe={class:"fcom_settings_header_meta_item"},AXe={class:"fcom_card_section_heading"},EXe={key:0},MXe={class:"fcom_section_labels"},TXe={class:"fcom_lebel fcom_label_lesson"},PXe={class:"fcom_lebel fcom_label_schedule"},IXe={class:"fcom_lebel fcom_label_email"};function LXe(t,e,n,s,i,o){const r=Yt,a=_e,l=qe,c=vt,u=tn,d=cn,h=jo,f=Y("section-part"),p=Y("FluentDnD"),m=xt("loading");return v(),E("div",CXe,[g("div",xXe,[g("div",null,[g("h2",null,$(t.$t("Lessons")),1),g("div",SXe,[g("div",$Xe,[g("b",null,$(t.$t("Type:")),1),W(" "+$(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,$(t.$t("Status:")),1),W(" "+$(t.$labelize(n.course.status))+" • ",1),g("b",null,$(t.$t("Visibility:")),1),W(" "+$(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:q(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",AXe,[i.loading?(v(),D(r,{key:1,rows:1})):(v(),E("h3",EXe,$(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:Xe(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(()=>[W($(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[y(d,{onSubmit:e[1]||(e[1]=Oe(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:kt(Oe(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(()=>[Re((v(),D(l,{disabled:i.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[W($(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",MXe,[g("div",TXe,$(t.$t("Lesson name")),1),g("div",PXe,$(t.$t("Schedule")),1),g("div",IXe,$(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 OXe=de(kXe,[["render",LXe]]),DXe={name:"GroupIcon"},RXe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VXe(t,e,n,s,i,o){return v(),E("svg",RXe,[...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 FXe=de(DXe,[["render",VXe]]),NXe={name:"ManageCourses",components:{CreateCourseForm:kS,AppLayout:gi,Layout:mi,GroupIcon:FXe,Pagination:au,Search:Q_},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()}},BXe={class:"object_menu"},zXe={class:"fcom_space_menu_ul"},HXe={key:0,class:"fcom_space_topics"},UXe={class:"fcom_topics_filters"},jXe={class:"search_member"},WXe={class:"feed_filters"},YXe={class:"fcom_feed_filter_label"},qXe={class:"fcom_courses"},GXe={class:"fcom_box_card_list"},XXe=["onClick"],KXe=["src","onError"],ZXe={key:1,class:"fcom_no_image"},JXe={class:"fcom_box_card_info"},QXe={class:"fcom_box_card_name"},eKe={class:"fcom_box_card_by"},tKe={class:"fcom_box_card_details"},nKe={class:"inline_details"},sKe={class:"inline_details"},iKe={key:0,class:"fcom_box_card_description"},oKe={class:"fcom_box_card_action"},rKe=["onClick"],aKe={key:0,class:"fcom_no_items_wrap"};function lKe(t,e,n,s,i,o){const r=qe,a=Pi,l=Y("Search"),c=_e,u=vt,d=nn,h=Zt,f=Ai,p=Y("router-link"),m=Y("GroupIcon"),b=Y("pagination"),_=Y("layout"),k=Y("app-layout"),C=Y("create-course-form"),x=Tl,S=xt("loading");return v(),E(te,null,[y(k,{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",BXe,[g("ul",zXe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Oe(M=>o.setStatus(""),["prevent"])),class:q(i.status===""?"router-link-active router-link-exact-active":""),href:"#"},$(t.$t("All")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Oe(M=>o.setStatus("published"),["prevent"])),class:q(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]=Oe(M=>o.setStatus("draft"),["prevent"])),class:q(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]=M=>i.newCourseModal=!0)},{default:w(()=>[W($(t.$t("Add Course")),1)]),_:1})])])])]),default:w(()=>[i.courseCategories&&i.courseCategories.length?(v(),E("div",HXe,[y(a,null,{default:w(()=>[g("div",UXe,[y(r,{onClick:e[4]||(e[4]=M=>o.setTopic("")),class:q({fcom_active_topic:!i.topic_slug})},{default:w(()=>[W($(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),E(te,null,we(i.courseCategories,M=>(v(),D(r,{key:M.slug,onClick:P=>o.setTopic(M.slug),class:q({fcom_active_topic:M.slug==i.topic_slug})},{default:w(()=>[W($(M.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",jXe,[y(u,{clearable:"",onClear:o.toSearch,onKeydown:kt(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[5]||(e[5]=M=>i.search=M),placeholder:t.$t("Search Courses...")},{prefix:w(()=>[y(c,null,{default:w(()=>[y(l)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",WXe,[e[10]||(e[10]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",YXe,$(t.$t("Sort by:")),1),y(h,{modelValue:i.sort_by,"onUpdate:modelValue":e[6]||(e[6]=M=>i.sort_by=M),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"])]),Re((v(),E("div",qXe,[g("div",GXe,[(v(!0),E(te,null,we(i.courses,M=>{var P;return v(),E("div",{key:M.id,class:"fcom_each_box_card"},[g("div",{class:"fcom_box_card_avatar",onClick:T=>o.navigateToEditLessons(M.id)},[M.cover_photo&&!M.coverError?(v(),E("img",{key:0,src:M.cover_photo,alt:"",onError:T=>M.coverError=!0},null,40,KXe)):(v(),E("div",ZXe))],8,XXe),g("div",JXe,[g("div",QXe,[y(p,{class:"course_route",to:{name:"course_overview",params:{course_id:M.id}}},{default:w(()=>[W($(o.getExcerpt(M.title,20))+" ",1),M.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:w(()=>[W($(M.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",eKe,$(t.$t("by %s",(P=M==null?void 0:M.owner)==null?void 0:P.display_name)),1)]),g("div",tKe,[g("div",nKe,[g("span",null,$(t.$_n("%d Section","%d Sections",M.sectionsCount)),1),e[11]||(e[11]=g("span",{class:"fcom_inline_separator"},null,-1)),g("span",null,$(t.$_n("%d Lesson","%d Lessons",M.lessonsCount)),1)]),g("div",sKe,[y(c,null,{default:w(()=>[y(m)]),_:1}),W(" "+$(t.$_n("%d student","%d students",M.students_count||0)),1)])]),M.description?(v(),E("div",iKe,$(o.getExcerpt(M.description,40)),1)):O("",!0),g("div",oKe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(M.id)},$(t.$t("Manage")),9,rKe)])])])}),128))]),y(b,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:i.pagination},null,8,["onFetch","pagination"]),!i.loading&&!i.courses.length?(v(),E("div",aKe,[i.topic_slug?(v(),E(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(),E(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(),E(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(),E(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]=M=>i.newCourseModal=!0),class:"fcom_primary_button fcom_mt_10"},{default:w(()=>[W($(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[S,i.loading]])]),_:1},8,["title"])]),_:1}),y(x,{"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,modelValue:i.newCourseModal,"onUpdate:modelValue":e[9]||(e[9]=M=>i.newCourseModal=M),direction:"rtl"},{header:w(()=>[g("h4",null,$(t.$t("Create a new course")),1)]),default:w(()=>[i.newCourseModal?(v(),D(C,{key:0,onCompleted:e[8]||(e[8]=M=>{i.newCourseModal=!1,o.fetchCourses()})})):O("",!0)]),_:1},8,["size","modelValue"])],64)}const cKe=de(NXe,[["render",lKe]]),uKe={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()}},dKe={class:"setting_header"},hKe={class:"setting_body"},fKe={key:1,class:"fcom_bp_migration_space_table"},pKe={style:{margin:"20px 0 20px"}},mKe={class:"fcom_listed fcom_mb_20"},gKe={key:0},vKe={key:1},yKe={key:2,style:{"text-align":"center"}},bKe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},_Ke={key:0},wKe={key:1},kKe={key:0},CKe={key:1},xKe={key:2},SKe={key:3},$Ke=["href"],AKe={key:3};function EKe(t,e,n,s,i,o){const r=Yt,a=Ai,l=ea,c=Y("InfoFilled"),u=_e,d=Ls,h=nn,f=Zt,p=Qr,m=Jt,b=qe,_=r2,k=xt("loading");return v(),E(te,null,[g("div",dKe,[g("h2",null,$(t.$t("%s Migration",o.providerName)),1)]),g("div",hKe,[i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.stage=="config"?(v(),E("div",fKe,[g("h5",null,$(t.$t("Please configure your %s groups for FluentCommunity Menu",o.providerName)),1),g("p",null,$(t.$t("The %s groups will be created with the same name and users, posts, comments, reactions will be migrated to FluentCommunity.",o.providerName)),1),e[3]||(e[3]=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(C=>[g("div",null,[W($(C.row.name)+" ",1),C.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:w(()=>[W($(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(C=>[y(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:i.configMap[C.row.id],"onUpdate:modelValue":x=>i.configMap[C.row.id]=x,filterable:""},{default:w(()=>[y(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),E(te,null,we(i.spaceGroups,x=>(v(),D(h,{key:x.id,label:x.title,value:x.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),g("h5",pKe,$(t.$t("The following data will be migrated to FluentCommunity")),1),g("ul",mKe,[i.featureConfig.has_groups?(v(),E("li",gKe,$(t.$t("Total Groups:"))+" "+$(i.groupItems.length),1)):O("",!0),g("li",null,$(t.$t("Total Activity (Posts):"))+" "+$(t.$formatNumber(i.stats.total_posts))+" "+$(t.$t("(+ associate favorites/reactions)")),1),g("li",null,$(t.$t("Total Comments:"))+" "+$(t.$formatNumber(i.stats.total_comments)),1),g("li",null,$(t.$t("Total Users:"))+" "+$(t.$formatNumber(i.stats.total_community_users)),1),i.stats.total_reactions?(v(),E("li",vKe,$(t.$t("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]=C=>i.reset_migration=C),"true-value":"yes","false-value":"no"},{default:w(()=>[W($(t.$t("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]=C=>i.delete_current_data=C),"true-value":"yes","false-value":"no"},{default:w(()=>[W($(t.$t("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[4]||(e[4]=g("hr",{class:"fcom_mb_20"},null,-1)),y(b,{loading:i.migrating,onClick:e[2]||(e[2]=C=>o.startMigration()),class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Start Migrating Data")),1)]),_:1},8,["loading"])])):i.stage=="migrating"?(v(),E("div",yKe,[g("ul",bKe,[i.featureConfig.has_groups?(v(),E("li",_Ke,[W($(t.$t("Groups"))+" ",1),y(a,{type:"success"},{default:w(()=>[W($(t.$t("Migrated")),1)]),_:1})])):O("",!0),i.featureConfig.has_groups?Re((v(),E("li",wKe,[W($(t.$t("Group Members"))+" ",1),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:w(()=>[W($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[k,i.current_status.current_stage=="group_members"]]):O("",!0),Re((v(),E("li",null,[W($(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:w(()=>[W($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[k,i.current_status.current_stage=="posts"]]),Re((v(),E("li",null,[W($(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:w(()=>[W($(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[k,i.current_status.current_stage=="users"]])]),e[8]||(e[8]=g("hr",{style:{"margin-bottom":"20px"}},null,-1)),i.current_status.current_stage=="group_members"?(v(),E("div",kKe,[g("h3",null,$(t.$t("Migrating Group Members from %s to FluentCommunity Spaces",o.providerName)),1),g("p",null,$(t.$t("Please do not close this window or go to other pages")),1),e[5]||(e[5]=g("hr",null,null,-1)),g("h4",null,$(t.$t("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(),E("div",CKe,[g("h3",null,$(t.$t("Migrating Posts from %s to FluentCommunity",o.providerName)),1),g("p",null,$(t.$t("Please do not close this window or go to other pages")),1),e[6]||(e[6]=g("hr",null,null,-1)),g("h4",null,$(t.$t("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(),E("div",xKe,[g("h3",null,$(t.$t("Syncing User Data from %s to FluentCommunity",o.providerName)),1),g("p",null,$(t.$t("Please do not close this window or go to other pages")),1),e[7]||(e[7]=g("hr",null,null,-1)),g("h4",null,$(t.$t("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(),E("div",SKe,[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,$Ke)])):O("",!0)])):(v(),E("div",AKe,$(t.$t("Migration Completed")),1))])],64)}const MKe=de(uKe,[["render",EKe]]),TKe={name:"ManageMigrations",components:{BuddyPress:MKe,Layout:mi,AppLayout:gi},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()}},PKe={class:"settings_router"},IKe={class:"fhr_content_layout_body"},LKe={key:0,class:"fcom_migration_selectors white_loaded"},OKe={key:1},DKe={style:{margin:"0"}},RKe={style:{margin:"10px 0 20px"}},VKe={class:"fcom_box_card_list"},FKe=["onClick"],NKe={style:{padding:"10px"},class:"fcom_box_card_avatar"},BKe=["src"],zKe={class:"fcom_box_card_info"},HKe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},UKe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},jKe={key:1,class:"fcom_migration_content"};function WKe(t,e,n,s,i,o){const r=Yt,a=El,l=Y("BuddyPress"),c=Y("layout"),u=Y("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",PKe,[g("div",IKe,[i.selectedMigration?(v(),E("div",jKe,[i.selectedMigration=="buddypress"||i.selectedMigration=="buddyboss"?(v(),D(l,{key:0,is_buddyboss:i.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),E("div",LKe,[i.loading?(v(),D(r,{key:0,animated:!0})):(v(),E("div",OKe,[g("h3",DKe,$(t.$t("Migrate Data from other plugins.")),1),g("p",RKe,$(t.$t("Please select a plugin from where you want to migrate data to FluentCommunity.")),1),g("div",VKe,[(v(!0),E(te,null,we(i.migrations,d=>(v(),E("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",NKe,[d.logo?(v(),E("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,BKe)):O("",!0)]),g("div",zKe,[g("div",HKe,[g("h4",null,$(d.title),1)])])],8,FKe))),128))])])),y(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[W($(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",UKe,$(t.$t("Read Documentation")),1)])]),_:1})]))])])]),_:1},8,["title"])]),_:1})}const YKe=de(TKe,[["render",WKe]]),qKe={name:"GeneticPromo",props:{placement:{type:String,default:"generic_promo"}}},GKe={class:"fcom_generic_promo"},XKe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},KKe={style:{"font-size":"18px","margin-bottom":"10px"}},ZKe=["href"];function JKe(t,e,n,s,i,o){return v(),E("div",GKe,[g("div",XKe,[g("h3",KKe,$(t.$t("This feature is available on the pro version of FluentCommunity")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl(n.placement),target:"_blank"},$(t.$t("Upgrade Now")),9,ZKe)])])}const QKe=de(qKe,[["render",JKe]]),eZe={name:"AccessAutomator",components:{GeneticPromo:QKe,AppLayout:gi,Layout:mi},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()}},tZe={class:"settings_router"},nZe={class:"fhr_content_layout_body_"},sZe={class:"fcom_settings_header"},iZe={class:"setting_body_"},oZe={key:0,class:"white_loaded"},rZe={key:1,class:"white_loaded"},aZe={key:2,class:"white_loaded"},lZe={class:"fcom_generic_promo"},cZe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},uZe={style:{"font-size":"18px","margin-bottom":"10px"}},dZe={key:3},hZe={class:"white_loaded fcom_mb_20"},fZe={class:"fcom_input_wrap"},pZe={key:0},mZe={class:"fcom_input_wrap"},gZe={class:"fcom_input_wrap"},vZe={key:0,class:"fcom_input_wrap"},yZe={key:0,class:"fcom_mapped_list"},bZe={class:"fcom_mapped_list__head"},_Ze={class:"fcom_mapped_list__group_title"},wZe={class:"fcom_mapped_list__space"},kZe=["innerHTML"],CZe=["innerHTML"],xZe={key:2,class:"fcom_mapped_list__icon fcom_no_avatar"},SZe={class:"fcom_mapped_list__name"},$Ze={class:"fcom_mapped_list__actions"},AZe={key:1,class:"white_loaded"},EZe={key:4};function MZe(t,e,n,s,i,o){const r=qe,a=El,l=Yt,c=Y("genetic-promo"),u=Jt,d=cn,h=_e,f=nn,p=Zt,m=Y("layout"),b=Y("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",tZe,[g("div",nZe,[g("div",sZe,[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(()=>[W($(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",iZe,[i.loading?(v(),E("div",oZe,[y(l,{rows:5,animated:!0})])):t.has_pro?i.has_fluentcrm?i.settings&&i.spaceGroups?(v(),E("div",dZe,[g("div",hZe,[y(d,{onSubmit:e[5]||(e[5]=Oe(_=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[6]||(e[6]=_=>i.settings=_),"label-position":"top"},{default:w(()=>[g("div",fZe,[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(()=>[W($(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),i.settings.is_enabled!="yes"?(v(),E("p",pZe,$(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),i.settings.is_enabled=="yes"?(v(),E(te,{key:0},[g("div",mZe,[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(()=>[W($(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",gZe,[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(()=>[W($(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(),E("div",vZe,[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(()=>[W($(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(),E("div",yZe,[g("div",bZe,[g("span",null,$(t.$t("Space")),1),g("span",null,$(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),E(te,null,we(i.spaceGroups,_=>(v(),E("div",{class:"fcom_mapped_list__group",key:_.id},[g("div",_Ze,$(_.title),1),(v(!0),E(te,null,we(_.spaces,k=>(v(),E("div",{class:"fcom_mapped_list__row",key:k.id},[g("div",wZe,[k.icon?(v(),D(h,{key:0,class:"fcom_mapped_list__icon"},{default:w(()=>[g("span",{innerHTML:k.icon},null,8,kZe)]),_:2},1024)):k.shape_svg?(v(),E("span",{key:1,class:"fcom_mapped_list__icon",innerHTML:k.shape_svg},null,8,CZe)):(v(),E("span",xZe)),g("span",SZe,$(k.title),1)]),g("div",$Ze,[y(p,{filterable:"",clearable:"",placeholder:t.$t("No Mapping"),modelValue:i.settings.tagging_maps[k.id],"onUpdate:modelValue":C=>i.settings.tagging_maps[k.id]=C},{default:w(()=>[(v(!0),E(te,null,we(i.crm_tags,C=>(v(),D(f,{label:C.title,value:C.id},null,8,["label","value"]))),256))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"]),i.settings.tagging_maps[k.id]?(v(),D(u,{key:0,modelValue:i.settings.linked_maps[k.id],"onUpdate:modelValue":C=>i.settings.linked_maps[k.id]=C,"true-value":i.settings.tagging_maps[k.id],"false-value":""},{default:w(()=>[W($(t.$t("Sync this tag with the %s access",k.type=="community"?t.$labelize("space"):t.$labelize("course"))),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):O("",!0)])]))),128))]))),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(),E("div",AZe,[y(c,{placement:"feature_lock_access_automator"})]))])):(v(),E("div",EZe,[g("p",null,$(t.$t("Settings could not be loaded")),1)])):(v(),E("div",aZe,[g("div",lZe,[g("div",cZe,[g("h3",uZe,$(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(()=>[W($(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),E("div",rZe,[y(c,{placement:"feature_lock_access_automator"})]))])])])]),_:1},8,["title"])]),_:1})}const TZe=de(eZe,[["render",MZe]]),PZe={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 IZe(t,e,n,s,i,o){const r=o2,a=tn,l=Jt,c=qe,u=cn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Oe(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(()=>[W($(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(a,null,{default:w(()=>[Re((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[W($(t.$t("Update")),1)]),_:1})),[[d,i.loading]])]),_:1})]),_:1},8,["modelValue"])}const LZe=de(PZe,[["render",IZe]]),OZe={name:"TopicCreateForm",components:{SpaceIcon:xp,SlugInput:Wd},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()}},DZe={class:"fcom_help_text"},RZe={key:0,class:"fcom_space_title"},VZe={key:0},FZe={key:1},NZe={class:"fcom_help_text"};function BZe(t,e,n,s,i,o){const r=vt,a=tn,l=Y("slug-input"),c=Y("SpaceIcon"),u=nn,d=n2,h=Zt,f=Jt,p=qe,m=cn,b=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Oe(_=>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",DZe,[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),E(te,null,we(i.formattedSpaceGroups,_=>(v(),D(d,{key:_.label,label:_.label},{default:w(()=>[(v(!0),E(te,null,we(_.spaces,k=>(v(),D(u,{key:k.slug,label:k.title,value:k.id.toString()},{default:w(()=>[k.id?(v(),E("span",RZe,[y(c,{space_profile:k},null,8,["space_profile"]),g("span",null,[W($(t.getExcerpt(k.title,50))+" ",1),k.type=="course"?(v(),E("span",VZe," ("+$(t.$t("course"))+")",1)):O("",!0)])])):(v(),E("span",FZe,$(t.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",NZe,[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(()=>[W($(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),y(a,null,{default:w(()=>[Re((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:i.saving},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])]),_:1})]),_:1},8,["modelValue"])}const zZe=de(OZe,[["render",BZe]]),HZe={name:"AllTopics",components:{TopicCreateForm:zZe,SlugInput:Wd,SpaceIcon:xp,Layout:mi,AppLayout:gi,TopicsConfig:LZe},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"))}},UZe=["href"],jZe={key:0,class:"fhr_content_layout_body"},WZe={class:"fcom_mb_10"},YZe={class:"fcom_manager_actions fcom_mb_10"},qZe={class:"bulk_search"},GZe={style:{margin:"0",padding:"0"}},XZe={class:"fcom_meta_text"},KZe={class:"fcom_table_action_col"},ZZe={key:1,class:"settings_router"},JZe={class:"fhr_content_layout_body"},QZe={class:"setting_body",style:{"text-align":"center"}},eJe={class:"promo_description"},tJe=["href"],nJe={class:"dialog_header"},sJe={class:"dialog_left"},iJe={key:0,class:"dialog_body"};function oJe(t,e,n,s,i,o){const r=Y("Plus"),a=_e,l=qe,c=Y("Operation"),u=vt,d=ea,h=Y("DeleteFilled"),f=Qr,p=Y("layout"),m=Y("app-layout"),b=Y("TopicCreateForm"),_=xs,k=Y("TopicsConfig"),C=xt("loading");return v(),E(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(),E(te,{key:0},[y(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>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]=x=>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(),E("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,UZe))]),default:w(()=>[t.has_pro?(v(),E("div",jZe,[g("div",null,[g("p",WZe,$(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",YZe,[g("div",qZe,[y(u,{modelValue:i.search,"onUpdate:modelValue":e[2]||(e[2]=x=>i.search=x),onKeydown:kt(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"])])]),Re((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(x=>[g("p",GZe,$(x.row.title),1),g("span",XZe,$(x.row.description),1)]),_:1},8,["label"]),y(d,{label:t.$t("Spaces"),"min-width":"140"},{default:w(x=>[g("span",null,$(o.formatTopics(x.row.space_ids)),1)]),_:1},8,["label"]),y(d,{label:t.$t("Admin Only?"),width:"120"},{default:w(x=>[g("span",null,$(x.row.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1)]),_:1},8,["label"]),y(d,{label:t.$t("Actions"),width:"160"},{default:w(x=>[g("div",KZe,[y(l,{onClick:S=>o.showForm(x.row),size:"small"},{default:w(()=>[W($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:S=>o.removeTopic(x.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"])),[[C,i.loading]])])])):(v(),E("div",ZZe,[g("div",JZe,[g("div",QZe,[g("p",eJe,$(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,tJe)])])]))]),_: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]=x=>i.showModal=x),direction:"rtl"},{header:w(({close:x})=>[g("div",nJe,[g("div",sJe,[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(),E("div",iJe,[i.showModal?(v(),D(b,{key:0,all_spaces:i.all_spaces,topic:i.editing_topic,onSaved:e[3]||(e[3]=x=>{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]=x=>i.showConfig=x),direction:"rtl"},{default:w(()=>[i.showConfig?(v(),D(k,{key:0,onSaved:e[5]||(e[5]=x=>{i.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const rJe=de(HZe,[["render",oJe]]),aJe={name:"CustomizationSettings",components:{Layout:mi,AppLayout:gi},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"))}},lJe={class:"settings_router"},cJe={key:0,class:"white_loaded"},uJe={key:1,class:"fhr_content_layout_body"},dJe={class:"setting_header"},hJe={class:"setting_body"},fJe={class:"fcom_input_wrap"},pJe={class:"fcom_input_wrap"},mJe={class:"fcom_input_wrap"},gJe={class:"fcom_input_wrap"},vJe={class:"fcom_input_wrap"},yJe={key:0},bJe={class:"fcom_input_wrap"},_Je={key:0,class:"fcom_input_wrap"},wJe=["innerHTML"],kJe={key:1,style:{cursor:"pointer","font-weight":"bold"}},CJe={class:"fcom_input_wrap"},xJe={style:{"font-weight":"bold"}},SJe={class:"fcom_help_text"},$Je={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},AJe={class:"fcom_input_wrap"},EJe={class:"fcom_input_wrap"},MJe={class:"fcom_input_wrap"},TJe={key:0},PJe={class:"fcom_help_text"},IJe={class:"fcom_input_wrap"},LJe={key:0},OJe={class:"fcom_help_text"},DJe={class:"fcom_input_wrap"},RJe={class:"fcom_help_text"},VJe={key:2,class:"fcom_input_wrap"},FJe={class:"fcom_help_text"},NJe={class:"fcom_input_wrap"},BJe={class:"fcom_help_text"},zJe={key:0},HJe={key:1},UJe={class:"fcom_input_wrap"},jJe={class:"fcom_input_wrap"},WJe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},YJe={key:2},qJe={key:0,class:"white_loaded"},GJe={key:1,class:"fhr_content_layout_body"},XJe={class:"setting_header"},KJe={class:"setting_body"},ZJe={class:"setting_sub_header"},JJe={class:"setting_sub_body"},QJe={class:"setting_sub_header"},eQe={class:"setting_sub_body"},tQe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},nQe={key:2},sQe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},iQe={class:"setting_header"},oQe={class:"setting_body"},rQe={class:"promo_description"},aQe=["href"];function lQe(t,e,n,s,i,o){const r=qe,a=Yt,l=Jt,c=vt,u=jo,d=Zi,h=Os,f=tn,p=nn,m=Zt,b=cn,_=qV,k=Y("layout"),C=Y("app-layout"),x=xt("loading");return v(),D(C,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[y(k,{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",lJe,[i.loadingCustomizations?(v(),E("div",cJe,[y(a,{rows:5,animated:!0})])):i.settings?(v(),E("div",uJe,[g("div",dJe,[g("h2",null,$(t.$t("Customize the UI features of the portal")),1)]),g("div",hJe,[y(b,{onSubmit:e[20]||(e[20]=Oe(S=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[21]||(e[21]=S=>i.settings=S),"label-position":"top"},{default:w(()=>[g("div",fJe,[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(()=>[W($(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",pJe,[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(()=>[W($(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",mJe,[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(()=>[W($(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",gJe,[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(()=>[W($(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",vJe,[y(l,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.settings.enable_sidebar_toggle,"onUpdate:modelValue":e[4]||(e[4]=S=>i.settings.enable_sidebar_toggle=S),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable sidebar collapse on desktop"))+" ",1),t.has_pro?O("",!0):(v(),E("span",yJe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled","modelValue"]),g("p",null,$(t.$t("__SIDEBAR_TOGGLE_DESC")),1)]),g("div",bJe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.hide_header_on_scroll,"onUpdate:modelValue":e[5]||(e[5]=S=>i.settings.hide_header_on_scroll=S),class:"fcom_checkbox"},{default:w(()=>[W($(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(),E("div",_Je,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_powered_by,"onUpdate:modelValue":e[6]||(e[6]=S=>i.settings.show_powered_by=S),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[W($(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(),E("span",kJe,$(t.$t("Affiliate ID: %s",i.settings.affiliate_id)),1)):(v(),E("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,wJe))]),default:w(()=>[g("div",CJe,[g("label",xJe,$(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[7]||(e[7]=S=>i.settings.affiliate_id=S)},null,8,["placeholder","modelValue"]),Re((v(),D(r,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingCustomizations]])]),g("div",SJe,[g("p",null,[W($(t.$t("Don't have an affiliate account?"))+" ",1),g("a",$Je,$(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",AJe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.icon_on_header_menu,"onUpdate:modelValue":e[8]||(e[8]=S=>i.settings.icon_on_header_menu=S),class:"fcom_checkbox"},{default:w(()=>[W($(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",EJe,[y(l,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_post_modal,"onUpdate:modelValue":e[9]||(e[9]=S=>i.settings.show_post_modal=S),class:"fcom_checkbox"},{default:w(()=>[W($(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",MJe,[y(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[y(h,{modelValue:i.settings.rich_post_layout,"onUpdate:modelValue":e[11]||(e[11]=S=>i.settings.rich_post_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"classic"},{default:w(()=>[W($(t.$t("Classic")),1)]),_:1}),y(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[W($(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),E("span",TJe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",PJe,[g("p",null,$(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",IJe,[y(f,{label:t.$t("Members List Layout")},{default:w(()=>[y(h,{modelValue:i.settings.member_list_layout,"onUpdate:modelValue":e[12]||(e[12]=S=>i.settings.member_list_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"classic"},{default:w(()=>[W($(t.$t("List View")),1)]),_:1}),y(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[W($(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),E("span",LJe,"("+$(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",OJe,[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",DJe,[y(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[y(h,{modelValue:i.settings.post_title_pref,"onUpdate:modelValue":e[13]||(e[13]=S=>i.settings.post_title_pref=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"optional"},{default:w(()=>[W($(t.$t("Optional")),1)]),_:1}),y(d,{value:"required"},{default:w(()=>[W($(t.$t("Required")),1)]),_:1}),y(d,{value:"disabled"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",RJe,[g("p",null,$(t.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),i.settings.dark_mode==="yes"?(v(),E("div",VJe,[y(f,{label:t.$t("Default Theme Mode")},{default:w(()=>[y(h,{modelValue:i.settings.default_theme_mode,"onUpdate:modelValue":e[14]||(e[14]=S=>i.settings.default_theme_mode=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"light"},{default:w(()=>[W($(t.$t("Light")),1)]),_:1}),y(d,{value:"dark"},{default:w(()=>[W($(t.$t("Dark")),1)]),_:1}),y(d,{value:"system"},{default:w(()=>[W($(t.$t("System")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",FJe,[g("p",null,$(t.$t("New members see the selected theme by default and can change it anytime.")),1)])]),_:1},8,["label"])])):O("",!0),g("div",NJe,[y(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[y(h,{modelValue:i.settings.default_feed_layout,"onUpdate:modelValue":e[15]||(e[15]=S=>i.settings.default_feed_layout=S),class:"fcom_radio_group"},{default:w(()=>[y(d,{value:"timeline"},{default:w(()=>[W($(t.$t("Timeline View")),1)]),_:1}),y(d,{value:"list"},{default:w(()=>[W($(t.$t("List View")),1)]),_:1}),y(d,{value:"card"},{default:w(()=>[W($(t.$t("Card View")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(l,{modelValue:i.settings.disable_feed_layout,"onUpdate:modelValue":e[16]||(e[16]=S=>i.settings.disable_feed_layout=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",BJe,[i.settings.disable_feed_layout==="yes"?(v(),E("p",zJe,$(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),E("p",HJe,$(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",UJe,[y(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[y(c,{modelValue:i.settings.max_media_per_post,"onUpdate:modelValue":e[17]||(e[17]=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",jJe,[y(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[y(m,{modelValue:i.settings.default_feed_sort_by,"onUpdate:modelValue":e[18]||(e[18]=S=>i.settings.default_feed_sort_by=S),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),E(te,null,we(i.postOrderOptions,(S,M)=>(v(),D(p,{key:M,value:M,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[19]||(e[19]=S=>i.settings.disable_feed_sort_by=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",WJe,[Re((v(),D(r,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),E("div",YJe,[g("p",null,$(t.$t("Customizations could not be loaded")),1)])),e[24]||(e[24]=g("div",{style:{"margin-top":"30px"}},null,-1)),t.has_pro?(v(),E(te,{key:3},[i.loadingSnippets?(v(),E("div",qJe,[y(a,{rows:5,animated:!0})])):i.snippetsSettings?(v(),E("div",GJe,[g("div",XJe,[g("h2",null,$(t.$t("Custom Snippets")),1)]),g("div",KJe,[g("div",ZJe,[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",JJe,[y(c,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:i.snippetsSettings.custom_css,"onUpdate:modelValue":e[22]||(e[22]=S=>i.snippetsSettings.custom_css=S),rows:5},null,8,["placeholder","modelValue"])]),y(_),g("div",QJe,[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",eQe,[y(c,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:i.snippetsSettings.custom_js,"onUpdate:modelValue":e[23]||(e[23]=S=>i.snippetsSettings.custom_js=S),rows:5},null,8,["placeholder","modelValue"])]),g("div",tQe,[Re((v(),D(r,{onClick:o.saveSnippets,disabled:i.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingSnippets]])])])])):(v(),E("div",nQe,[g("p",null,$(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),E("div",sQe,[g("div",iQe,[g("h2",null,$(t.$t("Custom Snippets")),1)]),g("div",oQe,[g("p",rQe,$(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl("feature_lock_customization"),target:"_blank"},$(t.$t("Upgrade to Pro")),9,aQe)])]))])]),_:1},8,["title"])]),_:1})}const cQe=de(aJe,[["render",lQe]]),uQe={name:"EmailNotification",components:{ImageUploader:Jc,CrepeEditor:ru,Layout:mi,AppLayout:gi},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"))}},dQe={class:"settings_router fcom_mb_20"},hQe={key:0,class:"white_loaded"},fQe={key:1,class:"fhr_content_layout_body"},pQe={class:"setting_body"},mQe={style:{"font-size":"18px",margin:"0",padding:"0"}},gQe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},vQe={class:"fcom_help_text"},yQe={class:"fcom_help_text"},bQe={class:"fcom_help_text"},_Qe={class:"fcom_help_text"},wQe={class:"fcom_extra_editor"},kQe={class:"fcom_help_text"},CQe=["innerHTML"],xQe=["src"],SQe={class:"fcom_image_uploader_wrapper"},$Qe={class:"setting_body"},AQe={style:{"font-size":"18px",margin:"0",padding:"0"}},EQe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},MQe={key:0,class:"fcom_help_text"},TQe={key:0,class:"fcom_help_text"},PQe={key:0,class:"fcom_help_text"},IQe={class:"fcom_help_text"},LQe={key:0,class:"fcom_help_text"},OQe={class:"fcom_meta_text"},DQe={class:"setting_body"},RQe={key:2};function VQe(t,e,n,s,i,o){const r=qe,a=Yt,l=vt,c=tn,u=zd,d=nn,h=Zt,f=Bd,p=Y("crepe-editor"),m=Y("EditPen"),b=_e,_=Y("Delete"),k=Y("ImageUploader"),C=Jt,x=M8,S=cn,M=Y("layout"),P=Y("app-layout"),T=xt("loading");return v(),D(P,{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("Email Settings")},{actions:w(()=>[Re((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",dQe,[i.loading?(v(),E("div",hQe,[y(a,{rows:5,animated:!0})])):i.email_settings?(v(),E("div",fQe,[y(S,{onSubmit:e[14]||(e[14]=Oe(I=>t.doNothing(),["prevent"])),modelValue:i.email_settings,"onUpdate:modelValue":e[15]||(e[15]=I=>i.email_settings=I),"label-position":"top"},{default:w(()=>[g("div",pQe,[g("h3",mQe,$(t.$t("Mailing Settings")),1),g("p",gQe,$(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]=I=>i.email_settings.send_from_name=I)},null,8,["placeholder","modelValue"]),g("div",vQe,[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 I;return[((I=i.verifiedEmailSenders)==null?void 0:I.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]=L=>i.email_settings.send_from_email=L)},{default:w(()=>[(v(!0),E(te,null,we(i.verifiedEmailSenders,L=>(v(),D(d,{key:L,label:L,value:L},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]=L=>i.email_settings.send_from_email=L)},null,8,["placeholder","modelValue"])),g("div",yQe,[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]=I=>i.email_settings.reply_to_name=I)},null,8,["placeholder","modelValue"]),g("div",bQe,[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]=I=>i.email_settings.reply_to_email=I)},null,8,["placeholder","modelValue"]),g("div",_Qe,[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",wQe,[y(p,{modelValue:i.email_settings.email_footer,"onUpdate:modelValue":e[5]||(e[5]=I=>i.email_settings.email_footer=I)},null,8,["modelValue"])]),g("div",kQe,[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,CQe)])]),_: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(),E("img",{key:0,src:i.email_settings.logo||i.email_settings.global_logo,style:{"max-width":"100px",height:"auto"}},null,8,xQe)):O("",!0),g("div",SQe,[y(k,{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]=I=>{i.email_settings.logo=I})},fs({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(C,{modelValue:i.email_settings.disable_powered_by,"onUpdate:modelValue":e[7]||(e[7]=I=>i.email_settings.disable_powered_by=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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",$Qe,[g("h3",AQe,$(t.$t("Email Notification Settings")),1),g("p",EQe,$(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(C,{modelValue:i.email_settings.com_my_post_mail,"onUpdate:modelValue":e[8]||(e[8]=I=>i.email_settings.com_my_post_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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(),E("div",MQe,[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(C,{modelValue:i.email_settings.reply_my_com_mail,"onUpdate:modelValue":e[9]||(e[9]=I=>i.email_settings.reply_my_com_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),i.email_settings.reply_my_com_mail!="yes"?(v(),E("div",TQe,[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(C,{modelValue:i.email_settings.mention_mail,"onUpdate:modelValue":e[10]||(e[10]=I=>i.email_settings.mention_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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(),E("div",PQe,[g("p",null,$(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),y(c,null,{default:w(()=>[y(C,{"true-value":"yes","false-value":"no",modelValue:i.email_settings.digest_email_status,"onUpdate:modelValue":e[11]||(e[11]=I=>i.email_settings.digest_email_status=I),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",IQe,[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]=I=>i.email_settings.digest_mail_day=I),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(),E("div",LQe,[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(x,{step:"00:10",start:"00:10",end:"23:59",modelValue:i.email_settings.daily_digest_time,"onUpdate:modelValue":e[13]||(e[13]=I=>i.email_settings.daily_digest_time=I)},null,8,["modelValue"]),g("p",OQe,$(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",DQe,[Re((v(),D(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,i.saving]])])]),_:1},8,["modelValue"])])):(v(),E("div",RQe,[g("p",null,$(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const FQe=de(uQe,[["render",VQe]]),NQe={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:Twe[this.upgrade_module]||{}}},computed:{upgradeUrl(){const t=(this.upgrade_module||"").replace(/_module$/,"");return this.$upgradeUrl(t?"feature_lock_"+t:"upgrade_page")}},watch:{openModal:function(){this.$emit("closeModal")}}},BQe={class:"fcom_upgrade_header"},zQe={class:"dialog_body"},HQe={class:"fcom_upgrade_banner"},UQe=["href"],jQe={class:"fcom_upgrade_content"},WQe={key:0,class:"fcom_feature_image"},YQe=["src","alt"],qQe={class:"fcom_upgrade_body"},GQe={class:"fcom_upgrade_description"},XQe=["href"];function KQe(t,e,n,s,i,o){const r=Tl;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",BQe,[g("h4",null,$(i.upgradeModule.headerTitle),1),g("p",null,$(i.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",zQe,[g("div",HQe,[g("p",null," 🎉 "+$(t.$t("Discover exciting new features now!")),1),g("a",{href:o.upgradeUrl,target:"_blank"},$(t.$t("Upgrade Now")),9,UQe)]),g("div",jQe,[i.upgradeModule.featureImage?(v(),E("div",WQe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+i.upgradeModule.featureImage,alt:i.upgradeModule.headerTitle},null,8,YQe)])):O("",!0),g("div",qQe,[g("h4",null,$(i.upgradeModule.bodyTitle),1),g("p",GQe,$(i.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:o.upgradeUrl,target:"_blank"},$(t.$t("Upgrade to Pro")),9,XQe)])])])]),_:1},8,["modelValue"])}const Ep=de(NQe,[["render",KQe]]),ZQe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Ep},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()}},JQe={class:"fcom_storage_settings"},QQe={class:"dialog_header"},eet={class:"dialog_left"},tet={key:0,class:"white_loaded"},net={key:1,class:"dialog_body"},set={key:0},iet={class:"fcom_cloudflare_settings"},oet={class:"fcom_s3_settings"},ret={class:"fcom_cloudflare_settings"},aet={key:3,class:"fcom_mb_10"},cet={class:"dialog_footer"},uet={key:2};function det(t,e,n,s,i,o){const r=qe,a=Yt,l=mp,c=Os,u=tn,d=vt,h=nn,f=Zt,p=cn,m=xs,b=Y("UpgradeToProModal"),_=xt("loading");return v(),E(te,null,[g("div",JQe,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=k=>o.openSettings())},{default:w(()=>{var k;return[W($(t.$t("Configure"))+" ("+$((k=i.storageConfig)==null?void 0:k.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]=k=>i.showSettings=k),direction:"rtl"},{header:w(({close:k})=>[g("div",QQe,[g("div",eet,[g("div",null,[g("h4",null,$(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[i.fetching?(v(),E("div",tet,[y(a,{rows:5,animated:!0})])):i.storageConfig?(v(),E("div",net,[i.storageConfig.is_defined?(v(),E("p",set,$(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),E(te,{key:1},[y(p,{onSubmit:e[17]||(e[17]=Oe(k=>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]=k=>o.maybeResetConfig()),modelValue:i.storageConfig.driver,"onUpdate:modelValue":e[2]||(e[2]=k=>i.storageConfig.driver=k)},{default:w(()=>[y(l,{type:"primary",value:"local"},{default:w(()=>[W($(t.$t("Server Storage")),1)]),_:1}),y(l,{value:"cloudflare_r2"},{default:w(()=>[W($(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),y(l,{value:"amazon_s3"},{default:w(()=>[W($(t.$t("Amazon S3")),1)]),_:1}),y(l,{value:"bunny_cdn"},{default:w(()=>[W($(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.storageConfig.driver==="cloudflare_r2"?(v(),E(te,{key:0},[e[20]||(e[20]=g("p",null,[W(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-cloudflare-r2/"},"Read the documentation first "),W(" to configure Cloudflare R2. ")],-1)),e[21]||(e[21]=g("hr",null,null,-1)),g("div",iet,[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]=k=>i.storageConfig.access_key=k)},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]=k=>i.storageConfig.secret_key=k)},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]=k=>i.storageConfig.public_url=k)},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]=k=>i.storageConfig.endpoint_url=k),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]=k=>i.storageConfig.sub_folder=k),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(),E(te,{key:1},[e[22]||(e[22]=g("p",null,[W(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-amazon-s3/"},"Read the documentation first "),W(" to configure Amazon S3. ")],-1)),e[23]||(e[23]=g("hr",null,null,-1)),g("div",oet,[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]=k=>i.storageConfig.access_key=k)},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]=k=>i.storageConfig.secret_key=k)},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]=k=>i.storageConfig.bucket=k)},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]=k=>i.storageConfig.s3_endpoint=k),placeholder:t.$t("Select S3 Location")},{default:w(()=>[(v(!0),E(te,null,we(i.s3Locations,(k,C)=>(v(),D(h,{label:k,value:C},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]=k=>i.storageConfig.sub_folder=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):O("",!0),i.storageConfig.driver==="bunny_cdn"?(v(),E(te,{key:2},[e[24]||(e[24]=g("p",null,[W(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-bunnycdn"},"Read the documentation first "),W(" to configure BunnyCDN. ")],-1)),e[25]||(e[25]=g("hr",null,null,-1)),g("div",ret,[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]=k=>i.storageConfig.access_key=k)},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]=k=>i.storageConfig.bucket=k)},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]=k=>i.storageConfig.s3_endpoint=k),placeholder:t.$t("Select Storage Region")},{default:w(()=>[(v(!0),E(te,null,we(i.bunnyLocations,(k,C)=>(v(),D(h,{label:k,value:C},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]=k=>i.storageConfig.public_url=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(v(),E("p",aet,$(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",cet,[Re((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[_,i.saving]])])],64))])):(v(),E("div",uet,[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]=k=>i.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):O("",!0)],64)}const het=de(ZQe,[["render",det]]),fet={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:Ep},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})}}},pet={class:"fcom_storage_settings"},met={key:0,class:"white_loaded"},get={key:1,class:"dialog_body"},vet={class:"fcom_mb_20"},yet={class:"fcom_level_table"},bet={class:"fcom_level_table_row fcom_header_row"},_et={class:"fcom_lavel_desc"},wet={class:"fcom_lavel_actions"},ket={class:"fcom_lavel_num"},Cet={class:"fcom_lavel_desc"},xet={class:"fcom_lavel_actions"},$et={class:"fcom_user_selector fcom_mb_20"},Aet={class:"fcom_mb_20"},Eet={style:{float:"left"}},Met={style:{float:"right",color:"#8492a6","font-size":"13px"}},Tet={class:"dialog_footer"},Pet={key:2};function Iet(t,e,n,s,i,o){const r=qe,a=Yt,l=Jt,c=tn,u=vt,d=nn,h=Zt,f=cn,p=Tl,m=Y("UpgradeToProModal"),b=xt("loading");return v(),E(te,null,[g("div",pet,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=_=>o.openSettings())},{default:w(()=>[W($(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(),E("div",met,[y(a,{rows:5,animated:!0})])):i.levels?(v(),E("div",get,[y(f,{onSubmit:e[3]||(e[3]=Oe(_=>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(),E(te,{key:0},[g("h5",vet,$(t.$t("Leaderboard Levels")),1),g("div",yet,[g("div",bet,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",_et,$(t.$t("Title & Description")),1),g("div",wet,$(t.$t("Minimum Points")),1)]),(v(!0),E(te,null,we(i.levels,(_,k,C)=>(v(),E("div",{class:"fcom_level_table_row",key:k},[g("div",ket,$(C+1),1),g("div",Cet,[y(u,{class:"fcom_bold_input",type:"text",modelValue:_.title,"onUpdate:modelValue":x=>_.title=x,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),y(u,{type:"text",modelValue:_.tagline,"onUpdate:modelValue":x=>_.tagline=x,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",xet,[y(c,{label:""},{default:w(()=>[y(u,{min:0,max:999999999,disabled:k==="level_1",type:"number",modelValue:_.min_points,"onUpdate:modelValue":x=>_.min_points=x,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",$et,[g("h5",Aet,$(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),E(te,null,we(i.users,_=>(v(),D(d,{key:_.ID,label:_.display_name+" ("+_.user_email+")",value:_.ID},{default:w(()=>[g("span",Eet,$(_.display_name),1),g("span",Met,$(_.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",Tet,[Re((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,i.saving]])])])):(v(),E("div",Pet,[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 Let=de(fet,[["render",Iet]]),Oet={name:"UserBadgesConfig",components:{LogoEmojiSelector:Z1,UpgradeToProModal:Ep,Drawer:jd},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()}}},Det={class:"fcom_storage_settings"},Ret={key:0,class:"white_loaded"},Vet={key:1},Fet={class:"header_user_badge"},Net={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},Bet={class:"fcom_badge_preview"},zet={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},Het=["onClick"],Uet=["onClick"],jet={key:2};function Wet(t,e,n,s,i,o){const r=qe,a=Yt,l=Jt,c=tn,u=ea,d=Y("UserBadge"),h=Y("Edit"),f=_e,p=Y("Delete"),m=Qr,b=cn,_=Y("Drawer"),k=Y("logo-emoji-selector"),C=vt,x=Hd,S=zd,M=Bd,P=xs,T=Y("UpgradeToProModal"),I=xt("loading");return v(),E(te,null,[g("div",Det,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=L=>o.openSettings())},{default:w(()=>[W($(t.$t("Settings")),1)]),_:1})]),y(_,{modelValue:i.showSettings,"onUpdate:modelValue":e[4]||(e[4]=L=>i.showSettings=L),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(),E("div",Ret,[y(a,{rows:5,animated:!0})])):i.badges?(v(),E("div",Vet,[y(b,{onSubmit:e[3]||(e[3]=Oe(L=>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]=L=>n.features.user_badge=L),label:t.$t("Enable User Badge Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(v(),E(te,{key:0},[g("div",Fet,[g("h3",null,$(t.$t("User Badges")),1),y(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=L=>o.initAddNew()),size:"small"},{default:w(()=>[W($(t.$t("Add New")),1)]),_:1})]),g("div",Net,[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(L=>[g("div",Bet,[y(d,{is_preview:!0,badge:L.row},null,8,["badge"])])]),_:1},8,["label"]),y(u,{width:"150px",label:t.$t("Actions")},{default:w(L=>[g("div",zet,[g("div",{onClick:V=>o.initEdit(L.row),class:"action_item clickable"},[y(f,null,{default:w(()=>[y(h)]),_:1})],8,Het),g("div",{class:"action_item clickable",onClick:V=>o.deleteBadge(L.row)},[y(f,null,{default:w(()=>[y(p)]),_:1})],8,Uet)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):O("",!0),y(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[I,i.saving]])]),_:1})]),_:1})])):(v(),E("div",jet,[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]=L=>i.showEditBagdeModal=L),title:t.$t("Edit Badge"),width:"30%"},{default:w(()=>[i.editingBadge?(v(),D(b,{key:0,onSubmit:e[13]||(e[13]=Oe(L=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Title")},{default:w(()=>[y(C,{modelValue:i.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=L=>i.editingBadge.title=L),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var L,V;return[y(k,{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:((L=i.editingBadge.config)==null?void 0:L.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]=L=>i.editingBadge.show_label=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),i.editingBadge.show_label=="yes"?(v(),E(te,{key:0},[y(M,{gutter:20},{default:w(()=>[y(S,{span:12},{default:w(()=>[y(c,{label:t.$t("Color")},{default:w(()=>[y(x,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=L=>{i.editingBadge.color=L}),modelValue:i.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=L=>i.editingBadge.color=L)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),y(S,{span:12},{default:w(()=>[y(c,{label:t.$t("Background Color")},{default:w(()=>[y(x,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=L=>{i.editingBadge.background_color=L}),modelValue:i.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=L=>i.editingBadge.background_color=L)},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]=L=>o.closeEdit())},{default:w(()=>[W($(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]=L=>i.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const Yet=de(Oet,[["render",Wet],["__scopeId","data-v-57666044"]]),qet={name:"SocialMediaLinkConfig",components:{Drawer:jd},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})}}},Get={class:"fcom_storage_settings"},Xet={key:0,class:"white_loaded"},Ket={key:1,class:"dialog_body"},Zet={class:"fcom_level_table"},Jet={class:"fcom_level_table_row fcom_header_row"},Qet={class:"fcom_lavel_desc"},ett={class:"fcom_lavel_actions"},ttt={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},ntt=["innerHTML"],stt={class:"fcom_lavel_actions"},itt={class:"dialog_footer"},ott={key:1,class:"fcom_upgrade_banner"},rtt={class:"fcom_upgrade_description"},att=["href"],ltt={key:2};function ctt(t,e,n,s,i,o){const r=qe,a=Yt,l=_e,c=Ai,u=Zc,d=Y("Drawer"),h=xt("loading");return v(),E(te,null,[g("div",Get,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[W($(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(),E("div",Xet,[y(a,{rows:5,animated:!0})])):i.providers?(v(),E("div",Ket,[g("div",Zet,[g("div",Jet,[g("div",Qet,$(t.$t("Provider")),1),g("div",ett,$(t.$t("Status")),1)]),(v(!0),E(te,null,we(i.providers,(f,p)=>(v(),E("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",ttt,[y(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,ntt)]),_:2},1024),g("span",null,$(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:w(()=>[W($(t.$t("disabled")),1)]),_:1}))]),g("div",stt,[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",itt,[t.has_pro?Re((v(),D(r,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]]):(v(),E("div",ott,[g("p",rtt,$(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_social_links"),target:"_blank"},$(t.$t("Upgrade to Pro")),9,att)]))])])):(v(),E("div",ltt,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])],64)}const utt=de(qet,[["render",ctt]]),dtt={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()}},htt={key:1},ftt={class:"fcom_help_text"},ptt={key:0},mtt={key:1},gtt={class:"fcom_help_text"},vtt={class:"fcom_help_text"},ytt={class:"fcom_section_divider"},btt={class:"fcom_help_text"},_tt={key:0},wtt={key:1},ktt={class:"fcom_help_text"},Ctt={key:0},xtt={key:1},Stt={key:2},$tt={class:"fcom_help_text"},Att={key:2},Ett={class:"dialog_footer"},Mtt={key:1,class:"fcom_upgrade_banner"},Ttt={class:"fcom_upgrade_description"},Ptt=["href"];function Itt(t,e,n,s,i,o){const r=Yt,a=Jt,l=tn,c=Zi,u=Os,d=o2,h=El,f=vt,p=nn,m=Zt,b=cn,_=qe,k=xt("loading");return v(),E(te,null,[i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.settings?(v(),E("div",htt,[y(b,{modelValue:i.settings,"onUpdate:modelValue":e[14]||(e[14]=C=>i.settings=C),"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]=C=>i.settings.messaging_email_status=C),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",ftt,[i.settings.messaging_email_status=="no"?(v(),E("p",ptt,$(t.$t("Email notification on messaging is disabled")),1)):(v(),E("p",mtt,$(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]=C=>i.settings.messaging_email_frequency=C)},{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",gtt,[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]=C=>i.settings.who_can_initiate_message=C)},{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]=C=>i.settings.points_to_initiate_message=C),min:0},null,8,["modelValue"]),g("div",vtt,[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",ytt,[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]=C=>i.settings.realtime_enabled=C),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",btt,[i.settings.realtime_enabled==="no"?(v(),E("p",_tt,$(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),E("p",wtt,$(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]=C=>i.settings.socket_provider=C),onChange:e[6]||(e[6]=C=>o.maybeResetConfig())},{default:w(()=>[y(c,{value:"fluent-socket"},{default:w(()=>[W($(t.$t("Fluent Socket")),1)]),_:1}),y(c,{value:"pusher"},{default:w(()=>[W($(t.$t("Pusher")),1)]),_:1}),y(c,{value:"custom"},{default:w(()=>[W($(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",ktt,[i.settings.socket_provider==="fluent-socket"?(v(),E("p",Ctt,[W($(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(),E("p",xtt,$(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),E("p",Stt,$(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(()=>[W($(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),E(te,{key:4},[y(l,{label:t.$t("App ID")},{default:w(()=>[y(f,{modelValue:i.socketConfig.appId,"onUpdate:modelValue":e[7]||(e[7]=C=>i.socketConfig.appId=C),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]=C=>i.socketConfig.key=C),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]=C=>i.socketConfig.secret=C),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]=C=>i.socketConfig.cluster=C),placeholder:i.settings.socket_provider==="pusher"?"mt1":t.$t("Optional")},null,8,["modelValue","placeholder"]),g("div",$tt,[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(),E(te,{key:1},[y(l,{label:t.$t("Host")},{default:w(()=>[y(f,{modelValue:i.socketConfig.options.host,"onUpdate:modelValue":e[11]||(e[11]=C=>i.socketConfig.options.host=C),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]=C=>i.socketConfig.options.port=C),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]=C=>i.socketConfig.options.scheme=C),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(),E("div",Att,[g("h3",null,$(t.$t("Sorry, settings could not be loaded. Please make sure you have latest version of FluentCommunity Pro and Fluent Messaging Addons")),1)])),g("div",Ett,[t.has_pro?Re((v(),D(_,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[k,i.saving]]):(v(),E("div",Mtt,[g("p",Ttt,$(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_messaging"),target:"_blank"},$(t.$t("Upgrade to Pro")),9,Ptt)]))])],64)}const Ltt=de(dtt,[["render",Itt]]),Ott={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Ep},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})}}},Dtt={class:"fcom_storage_settings"},Rtt={key:0,class:"white_loaded"},Vtt={key:1,class:"dialog_body"},Ftt={class:"fcom_mb_20"},Ntt={class:"dialog_footer"},Btt={key:2};function ztt(t,e,n,s,i,o){const r=qe,a=Yt,l=Jt,c=tn,u=Zi,d=Os,h=cn,f=Tl,p=Y("UpgradeToProModal"),m=xt("loading");return v(),E(te,null,[g("div",Dtt,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[W($(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(),E("div",Rtt,[y(a,{rows:5,animated:!0})])):i.follower_settings?(v(),E("div",Vtt,[y(h,{onSubmit:e[4]||(e[4]=Oe(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(),E(te,{key:0},[g("h5",Ftt,$(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",Ntt,[Re((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,i.saving]])])])):(v(),E("div",Btt,[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 Htt=de(Ott,[["render",ztt]]),Utt={name:"FluentPlayerCustomization",components:{InfoFilled:bl},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}}},jtt={key:0,class:"fluent-player-top-title-overlay"},Wtt={class:"fluent-player-title-stack"},Ytt={class:"fluent-player-media-title"},qtt={key:1,class:"fp-media-controls-center"},Gtt={class:"fp-controls-group center"},Xtt={key:2,class:"fp-media-controls-bottom"},Ktt={key:0,class:"fp-controls-group"},Ztt={key:0,class:"fp-media-button vds-button"},Jtt={key:1,class:"fp-media-button vds-button"},Qtt={key:2,class:"fp-media-button vds-button"},ent={key:3,class:"fp-media-button vds-button"},tnt={key:4,class:"fp-media-slider vds-time-slider slider-volume"},nnt={key:5,class:"fp-media-time-group"},snt={key:6,class:"fp-media-controls-spacer-slider"},int={key:7,class:"fp-media-button vds-button"},ont={key:8,class:"fp-media-button vds-button"},rnt={key:9,class:"fp-media-button vds-button"},ant={key:10,class:"fp-media-button vds-button"},lnt={key:11,class:"fp-media-button vds-button"},cnt={key:0,class:"fp-media-slider vds-time-slider"},unt={key:1,class:"fp-controls-group"},dnt={key:0,class:"fp-media-button vds-button"},hnt={key:1,class:"fp-media-button vds-button"},fnt={key:2,class:"fp-media-button vds-button"},pnt={key:3,class:"fp-media-button vds-button"},mnt={key:4,class:"fp-media-slider vds-time-slider slider-volume"},gnt={key:5,class:"fp-media-time-group"},vnt={key:6,class:"fp-media-button vds-button"},ynt={key:7,class:"fp-media-button vds-button"},bnt={key:8,class:"fp-media-button vds-button"},_nt={key:9,class:"fp-media-button vds-button"},wnt={key:10,class:"fp-media-button vds-button"},knt={key:2,class:"fp-controls-group"},Cnt={key:0,class:"fp-media-button vds-button"},xnt={key:1,class:"fp-media-button vds-button"},Snt={key:2,class:"fp-media-slider vds-time-slider slider-volume"},$nt={key:3,class:"fp-media-button vds-button"},Ant={key:4,class:"fp-media-button vds-button"},Ent={key:5,class:"fp-media-button vds-button"},Mnt={key:3,class:"fp-controls-group fp-floating-bar"},Tnt={key:0,class:"fp-media-button vds-button"},Pnt={key:1,class:"fp-media-button vds-button"},Int={key:2,class:"fp-media-button vds-button"},Lnt={key:3,class:"fp-media-time-group"},Ont={key:4,class:"fp-media-controls-spacer-slider"},Dnt={key:5,class:"fp-media-button vds-button"},Rnt={key:6,class:"fp-media-slider vds-time-slider slider-volume"},Vnt={key:7,class:"fp-media-button vds-button"},Fnt={key:8,class:"fp-media-button vds-button"},Nnt={key:9,class:"fp-media-button vds-button"},Bnt={key:10,class:"fp-media-button vds-button"},znt={key:11,class:"fp-media-button vds-button"},Hnt={class:"player_settings_wrap"},Unt={class:"setting_row"},jnt={class:"setting_row_flex"},Wnt={class:"setting_row_flex"},Ynt={class:"setting_row_flex"},qnt={class:"setting_row_flex"},Gnt={key:0,class:"setting_row"},Xnt={key:1,class:"setting_row"},Knt={key:2,class:"setting_row"},Znt={key:3,class:"setting_row"},Jnt={key:4,class:"setting_row"},Qnt={key:5,class:"setting_row"},est={key:6,class:"setting_row"},tst={key:7,class:"setting_row"},nst={key:8,class:"setting_row"},sst={key:9,class:"setting_row"},ist={key:10,class:"setting_row"},ost={key:1,class:"setting_row"},rst={class:"setting_row"},ast={key:2,class:"setting_row"},lst={key:3,class:"setting_row"},cst={key:4,class:"setting_row"},ust={class:"setting_row setting_row--column"},dst={class:"setting_row__label-with-icon"},hst={class:"fcom_help_text"},fst={class:"fcom_form_label"},pst={class:"fcom_help_text"};function mst(t,e,n,s,i,o){const r=zd,a=nn,l=Zt,c=Hd,u=Zc,d=Y("InfoFilled"),h=_e,f=Ls,p=Bd,m=tn,b=Zi,_=Os;return v(),E("div",{class:q(["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:Xe({"--media-brand":o.localSettings.brandColor,"--fp-control-bar-bg":o.localSettings.controlBarColor||void 0,"--media-play-color":o.localSettings.playButtonColor||void 0,"--media-play-bg":o.localSettings.playButtonBgColor||void 0})},[g("div",{class:q(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),E("div",jtt,[g("div",Wtt,[g("span",Ytt,$(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),E("div",qtt,[g("div",Gtt,[g("button",{onClick:e[0]||(e[0]=Oe(k=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},[...e[26]||(e[26]=[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(),E("div",Xtt,[o.localSettings.skin==="modern"?(v(),E("div",Ktt,[o.controls.backward?(v(),E("button",Ztt,[...e[27]||(e[27]=[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(),E("button",Jtt,[...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:"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(),E("button",Qtt,[...e[29]||(e[29]=[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(),E("button",ent,[...e[30]||(e[30]=[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(),E("div",tnt,[...e[31]||(e[31]=[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(),E("div",nnt,[...e[32]||(e[32]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),E("div",snt,[...e[33]||(e[33]=[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(),E("button",int,[...e[34]||(e[34]=[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(),E("button",ont,[...e[35]||(e[35]=[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(),E("button",rnt,[...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",{"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(),E("button",ant,[...e[37]||(e[37]=[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(),E("button",lnt,[...e[38]||(e[38]=[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(),E(te,{key:1},[o.controls.progress_bar?(v(),E("div",cnt,[...e[39]||(e[39]=[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(),E("div",unt,[o.controls.backward?(v(),E("button",dnt,[...e[40]||(e[40]=[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(),E("button",hnt,[...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:"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(),E("button",fnt,[...e[42]||(e[42]=[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(),E("button",pnt,[...e[43]||(e[43]=[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(),E("div",mnt,[...e[44]||(e[44]=[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(),E("div",gnt,[...e[45]||(e[45]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),e[51]||(e[51]=g("div",{class:"fp-media-controls-spacer"},null,-1)),o.controls.captions_toggle?(v(),E("button",vnt,[...e[46]||(e[46]=[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(),E("button",ynt,[...e[47]||(e[47]=[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(),E("button",bnt,[...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",{"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(),E("button",_nt,[...e[49]||(e[49]=[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(),E("button",wnt,[...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:"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(),E("div",knt,[o.controls.play?(v(),E("button",Cnt,[...e[52]||(e[52]=[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(),E("button",xnt,[...e[53]||(e[53]=[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(),E("div",Snt,[...e[54]||(e[54]=[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[58]||(e[58]=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(),E("button",$nt,[...e[55]||(e[55]=[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(),E("button",Ant,[...e[56]||(e[56]=[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(),E("button",Ent,[...e[57]||(e[57]=[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(),E("div",Mnt,[o.controls.backward?(v(),E("button",Tnt,[...e[59]||(e[59]=[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(),E("button",Pnt,[...e[60]||(e[60]=[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(),E("button",Int,[...e[61]||(e[61]=[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(),E("div",Lnt,[...e[62]||(e[62]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),E("div",Ont,[...e[63]||(e[63]=[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(),E("button",Dnt,[...e[64]||(e[64]=[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(),E("div",Rnt,[...e[65]||(e[65]=[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(),E("button",Vnt,[...e[66]||(e[66]=[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(),E("button",Fnt,[...e[67]||(e[67]=[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(),E("button",Nnt,[...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",{"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(),E("button",Bnt,[...e[69]||(e[69]=[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(),E("button",znt,[...e[70]||(e[70]=[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",Hnt,[g("div",Unt,[g("span",null,$(t.$t("Skin")),1),y(l,{modelValue:o.localSettings.skin,"onUpdate:modelValue":e[1]||(e[1]=k=>o.localSettings.skin=k)},{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",jnt,[g("label",null,$(t.$t("Brand Color")),1),y(c,{modelValue:o.localSettings.brandColor,"onUpdate:modelValue":e[2]||(e[2]=k=>o.localSettings.brandColor=k)},null,8,["modelValue"])]),g("div",Wnt,[g("label",null,$(t.$t("Control Bar Color")),1),y(c,{modelValue:o.localSettings.controlBarColor,"onUpdate:modelValue":e[3]||(e[3]=k=>o.localSettings.controlBarColor=k)},null,8,["modelValue"])]),g("div",Ynt,[g("label",null,$(t.$t("Play Button Color")),1),y(c,{modelValue:o.localSettings.playButtonColor,"onUpdate:modelValue":e[4]||(e[4]=k=>o.localSettings.playButtonColor=k)},null,8,["modelValue"])]),g("div",qnt,[g("label",null,$(t.$t("Play Button Background Color")),1),y(c,{modelValue:o.localSettings.playButtonBgColor,"onUpdate:modelValue":e[5]||(e[5]=k=>o.localSettings.playButtonBgColor=k),"show-alpha":""},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),E(te,{key:0},[g("h4",null,$(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),E("div",Gnt,[g("span",null,$(t.$t("Progress Bar")),1),y(u,{modelValue:o.localSettings.controls.progress_bar,"onUpdate:modelValue":e[6]||(e[6]=k=>o.localSettings.controls.progress_bar=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("play")?(v(),E("div",Xnt,[g("span",null,$(t.$t("Play/Pause")),1),y(u,{modelValue:o.localSettings.controls.play,"onUpdate:modelValue":e[7]||(e[7]=k=>o.localSettings.controls.play=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("forward")?(v(),E("div",Knt,[g("span",null,$(t.$t("Forward")),1),y(u,{modelValue:o.localSettings.controls.forward,"onUpdate:modelValue":e[8]||(e[8]=k=>o.localSettings.controls.forward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("backward")?(v(),E("div",Znt,[g("span",null,$(t.$t("Backward")),1),y(u,{modelValue:o.localSettings.controls.backward,"onUpdate:modelValue":e[9]||(e[9]=k=>o.localSettings.controls.backward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("volume")?(v(),E("div",Jnt,[g("span",null,$(t.$t("Volume")),1),y(u,{modelValue:o.localSettings.controls.volume,"onUpdate:modelValue":e[10]||(e[10]=k=>o.localSettings.controls.volume=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("current_time")?(v(),E("div",Qnt,[g("span",null,$(t.$t("Current Time")),1),y(u,{modelValue:o.localSettings.controls.current_time,"onUpdate:modelValue":e[11]||(e[11]=k=>o.localSettings.controls.current_time=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("playback_speed")?(v(),E("div",est,[g("span",null,$(t.$t("Playback Speed")),1),y(u,{modelValue:o.localSettings.controls.playback_speed,"onUpdate:modelValue":e[12]||(e[12]=k=>o.localSettings.controls.playback_speed=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("settings")?(v(),E("div",tst,[g("span",null,$(t.$t("Settings Menu")),1),y(u,{modelValue:o.localSettings.controls.settings,"onUpdate:modelValue":e[13]||(e[13]=k=>o.localSettings.controls.settings=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("fullscreen")?(v(),E("div",nst,[g("span",null,$(t.$t("Fullscreen")),1),y(u,{modelValue:o.localSettings.controls.fullscreen,"onUpdate:modelValue":e[14]||(e[14]=k=>o.localSettings.controls.fullscreen=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("pip")?(v(),E("div",sst,[g("span",null,$(t.$t("Picture in Picture")),1),y(u,{modelValue:o.localSettings.controls.pip,"onUpdate:modelValue":e[15]||(e[15]=k=>o.localSettings.controls.pip=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("captions_toggle")?(v(),E("div",ist,[g("span",null,$(t.$t("Captions Toggle")),1),y(u,{modelValue:o.localSettings.controls.captions_toggle,"onUpdate:modelValue":e[16]||(e[16]=k=>o.localSettings.controls.captions_toggle=k)},null,8,["modelValue"])])):O("",!0)],64)):O("",!0),g("h4",null,$(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),E("div",ost,[g("span",null,$(t.$t("Muted Autoplay")),1),y(u,{modelValue:o.localSettings.behaviors.muted_autoplay,"onUpdate:modelValue":e[17]||(e[17]=k=>o.localSettings.behaviors.muted_autoplay=k)},null,8,["modelValue"])])):O("",!0),g("div",rst,[g("span",null,$(t.$t("Save Play Position")),1),y(u,{modelValue:o.localSettings.behaviors.save_play_position,"onUpdate:modelValue":e[18]||(e[18]=k=>o.localSettings.behaviors.save_play_position=k)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),E("div",ast,[g("span",null,$(t.$t("Hide Top Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_top_controls,"onUpdate:modelValue":e[19]||(e[19]=k=>o.localSettings.behaviors.hide_top_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),E("div",lst,[g("span",null,$(t.$t("Hide Center Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_center_controls,"onUpdate:modelValue":e[20]||(e[20]=k=>o.localSettings.behaviors.hide_center_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),E("div",cst,[g("span",null,$(t.$t("Hide Bottom Controls")),1),y(u,{modelValue:o.localSettings.behaviors.hide_bottom_controls,"onUpdate:modelValue":e[21]||(e[21]=k=>o.localSettings.behaviors.hide_bottom_controls=k)},null,8,["modelValue"])])):O("",!0),g("div",ust,[g("span",dst,[W($(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[22]||(e[22]=k=>o.localSettings.behaviors.load_strategy=k),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[23]||(e[23]=k=>o.localSettings.video_upload=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",hst,[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",fst,$(t.$t("Who Can Upload Videos")),1)]),_:1}),y(r,{span:24},{default:w(()=>[y(_,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[24]||(e[24]=k=>o.localSettings.video_upload_role=k)},{default:w(()=>[y(b,{value:"admin",class:"fcom_radio"},{default:w(()=>[W($(t.$t("Admins")),1)]),_:1}),y(b,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[W($(t.$t("Admins and Moderators")),1)]),_:1}),y(b,{value:"everyone",class:"fcom_radio"},{default:w(()=>[W($(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[25]||(e[25]=k=>o.localSettings.play_embedded_videos=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",pst,[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 gst=de(Utt,[["render",mst]]),vst={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:gst},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()}},yst={key:1},bst={class:"fcom_help_text"},_st={class:"fcom_help_text"},wst={class:"dialog_footer fcom_mt_20"};function kst(t,e,n,s,i,o){const r=Yt,a=Zc,l=tn,c=Y("FluentPlayerCustomization"),u=cn,d=qe,h=xt("loading");return i.loading?(v(),D(r,{key:0,animated:!0,rows:5})):i.settings?(v(),E("div",yst,[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",bst,[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(l,{label:t.$t("Enable FluentPlayer Audio"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[y(a,{modelValue:i.settings.enable_audio,"onUpdate:modelValue":e[1]||(e[1]=f=>i.settings.enable_audio=f),"active-value":"yes","inactive-value":"no",disabled:o.isNotEnabled},null,8,["modelValue","disabled"])]),_:1},8,["label"]),g("div",_st,[g("p",null,$(t.$t("Enable the Audio tab in the feed composer so members can upload audio files based on their upload permission.")),1)]),y(c,{modelValue:i.settings,"onUpdate:modelValue":e[2]||(e[2]=f=>i.settings=f)},null,8,["modelValue"])]),_:1}),g("div",wst,[Re((v(),D(d,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]])])])):O("",!0)}const Cst=de(vst,[["render",kst]]),xst={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Ep,FluentDnD:Jd,Drawer:jd},props:["features"],data(){return{CloseBoldIcon:Mi(rR),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())}},Sst={class:"fcom_storage_settings"},$st={key:0,class:"white_loaded"},Ast={key:1,class:"fcom_cpf_settings"},Est={class:"fcom_cpf_header"},Mst={key:0,style:{padding:"1rem"}},Tst={key:1,class:"fcom_card_sections fcom_cpf_groups"},Pst={class:"fcom_section_primary_item"},Ist={class:"fcom_section_primary_item_title"},Lst={class:"fcom_heading_item"},Ost={class:"fcom_space_counts"},Dst={class:"fcom_section_item_actions"},Rst={key:0,class:"fcom_section_items"},Vst={class:"fcom_heading_item"},Fst={key:0,style:{color:"var(--el-color-danger)"}},Nst={class:"fcom_section_item_actions"},Bst={style:{position:"relative"}},zst={class:"fcom_action_field_popup"},Hst={class:"fcom_move_popup_close"},Ust=["onDrop"],jst={key:2},Wst={class:"dialog_header"},Yst={class:"dialog_body"},qst={class:"dialog_footer"},Gst={class:"dialog_header"},Xst={class:"dialog_body"},Kst={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Zst={style:{flex:"1"}},Jst={style:{flex:"1"}},Qst={class:"dialog_footer"};function eit(t,e,n,s,i,o){const r=qe,a=Yt,l=Jt,c=tn,u=_e,d=Ai,h=Y("Plus"),f=Y("MoreFilled"),p=Da,m=Ra,b=Oa,_=Zc,k=nn,C=Zt,x=cn,S=Y("CloseBold"),M=Y("FluentDnD"),P=Y("drawer"),T=vt,I=xs,L=k8,V=Zi,R=Os,N=Y("UpgradeToProModal"),F=xt("loading");return v(),E(te,null,[g("div",Sst,[y(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=B=>o.openSettings())},{default:w(()=>[W($(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(),E("div",$st,[y(a,{rows:5,animated:!0})])):i.config!==null?(v(),E("div",Ast,[y(x,{onSubmit:e[8]||(e[8]=Oe(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(),E(te,{key:0},[g("div",Est,[g("h3",null,$(t.$t("Field Groups")),1),y(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=B=>o.openGroupEditor())},{default:w(()=>[W($(t.$t("Add Group")),1)]),_:1})]),i.config.groups.length?(v(),E("div",Tst,[y(M,{items:i.config.groups,"row-key":"slug"},{item:w(({data:B,index:z})=>[g("div",{class:q({fcom_collapsed_group:i.collapsedGroups.includes(B.slug)})},[g("div",Pst,[g("div",Ist,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",Lst,[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:G=>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",Ost,$(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(()=>[W($(t.$t("System")),1)]),_:1})):O("",!0),y(r,{style:{"background-color":"var(--el-fill-color-light)","margin-left":"5px"},size:"small",text:"",onClick:G=>o.openFieldEditor(null,B.slug)},{default:w(()=>[y(u,null,{default:w(()=>[y(h)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Dst,[y(r,{class:"fcom_secondary_button",onClick:G=>o.openGroupEditor(z)},{default:w(()=>[W($(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),B.is_system?O("",!0):(v(),D(b,{key:0,trigger:"click",onCommand:G=>o.handleGroupAction(G,z)},{dropdown:w(()=>[y(m,null,{default:w(()=>[y(p,{command:"delete"},{default:w(()=>[W($(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(),E("div",Rst,[o.hasGroupFields(B.slug)?(v(),D(M,{key:0,items:o.getGroupFields(B.slug),"row-key":"slug",group:B.slug,"item-class":"fcom_section_item",onDrop:G=>o.onFieldDrop(G,B.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:G})=>[g("div",{class:"fcom_section_item_title",style:Xe(G.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",Vst,[W($(G.label)+" ",1),G.is_required?(v(),E("span",Fst,"*")):O("",!0),y(d,{size:"small",type:"info"},{default:w(()=>[W($(G.type),1)]),_:2},1024),y(d,{size:"small",type:o.privacyMeta(G.privacy).tag},{default:w(()=>[W($(o.privacyMeta(G.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",Nst,[y(_,{modelValue:G.is_enabled,"onUpdate:modelValue":K=>G.is_enabled=K,size:"small",onChange:o.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"]),y(r,{class:"fcom_secondary_button",size:"small",onClick:K=>o.openFieldEditor(G.slug)},{default:w(()=>[W($(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",Bst,[y(b,{trigger:"click",onCommand:K=>o.handleFieldAction(K,G)},{dropdown:w(()=>[y(m,{class:"fcom_cpf_field_dropdown"},{default:w(()=>[y(p,{command:"duplicate"},{default:w(()=>[W($(t.$t("Duplicate")),1)]),_:1}),y(p,{command:"move"},{default:w(()=>[W($(t.$t("Move")),1)]),_:1}),y(p,{command:"delete"},{default:w(()=>[W($(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"]),Re(g("div",zst,[y(x,{onSubmit:e[5]||(e[5]=Oe(K=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Move to a different Group")},{default:w(()=>[y(C,{placeholder:t.$t("Select Group"),modelValue:i.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=K=>i.moveTargetGroup=K)},{default:w(()=>[(v(!0),E(te,null,we(i.config.groups.filter(K=>K.slug!==G.group),K=>(v(),D(k,{key:K.slug,label:K.label,value:K.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),y(r,{disabled:!i.moveTargetGroup,onClick:K=>o.moveField(G.slug,i.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",Hst,[y(u,{onClick:e[6]||(e[6]=K=>i.openedFieldSlug=null)},{default:w(()=>[y(S)]),_:1})])],512),[[Ht,i.openedFieldSlug===G.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),E("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Oe(()=>{},["prevent"])),onDrop:Oe(G=>o.onEmptyGroupDrop(G,B.slug),["prevent"])},$(t.$t("No fields in this group. Click + to add one.")),41,Ust))]))],2)]),_:1},8,["items"])])):(v(),E("div",Mst,[g("p",null,$(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),y(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,i.saving]])]),_:1})]),_:1})])):(v(),E("div",jst,[g("p",null,$(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),y(I,{"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",Wst,[g("h4",null,$(i.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",qst,[y(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=B=>i.showGroupEditor=!1)},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[W($(i.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Yst,[i.editingGroup?(v(),D(x,{key:0,onSubmit:e[12]||(e[12]=Oe(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(I,{"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",Gst,[g("h4",null,$(i.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",Qst,[y(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=B=>i.showFieldEditor=!1)},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1}),y(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[W($(i.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Xst,[i.editingField?(v(),D(x,{key:0,onSubmit:e[23]||(e[23]=Oe(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[y(c,{label:t.$t("Field Type")},{default:w(()=>[y(C,{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),E(te,null,we(i.fieldTypes,(B,z)=>(v(),D(k,{key:z,label:B,value:z},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(C,{modelValue:i.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=B=>i.editingField.privacy=B)},{default:w(()=>[(v(!0),E(te,null,we(i.privacyOptions,B=>(v(),D(k,{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(C,{modelValue:i.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=B=>i.editingField.group=B)},{default:w(()=>[(v(!0),E(te,null,we(i.config.groups,B=>(v(),D(k,{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),E(te,null,we(i.editingField.options,(B,z)=>(v(),E("div",{key:z,class:"fcom_question_option"},[y(T,{modelValue:i.editingField.options[z],"onUpdate:modelValue":G=>i.editingField.options[z]=G,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),i.editingField.options.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:G=>i.editingField.options.splice(z,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),y(L,{type:"primary",underline:!1,onClick:e[20]||(e[20]=B=>i.editingField.options.push(`Option ${i.editingField.options.length+1}`))},{default:w(()=>[W($("+ "+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",Kst,[g("span",Zst,$(t.$t("Key")),1),g("span",Jst,$(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),E(te,null,we(i.multiselectOptionsList,(B,z)=>(v(),E("div",{key:z,class:"fcom_question_option"},[y(T,{modelValue:B.key,"onUpdate:modelValue":G=>B.key=G,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),y(T,{modelValue:B.label,"onUpdate:modelValue":G=>B.label=G,type:"text",placeholder:t.$t("Label")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),i.multiselectOptionsList.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:G=>i.multiselectOptionsList.splice(z,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),y(L,{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(()=>[W($("+ "+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(()=>[W($(t.$t("Yes")),1)]),_:1}),y(V,{value:!1},{default:w(()=>[W($(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 tit=de(xst,[["render",eit]]),nit={name:"Features",components:{UserBadgesConfig:Yet,LeaderBoardConfig:Let,StorageSettings:het,Layout:mi,AppLayout:gi,UpgradeToProModal:Ep,SocialMediaLinkConfig:utt,MessagingSettings:Ltt,FollowingConfigView:Htt,FluentPlayerSettings:Cst,CustomProfileFieldsConfig:tit},data(){return{features:null,addOns:{},loading:!1,installingSlug:"",openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&ZH(this.features.giphy_api_key)){this.$handleError(this.$t("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.installingSlug||(this.installingSlug=t,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.installingSlug=""}))}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},sit={class:"settings_router"},iit={key:0,class:"white_loaded"},oit={key:1,style:{"margin-bottom":"30px"}},rit={class:"fhr_content_layout_body"},ait={class:"setting_header"},lit={class:"fcom_advanced_features"},cit={key:0,class:"setting_body"},uit={class:"setting_item"},dit={class:"setting_field_placeholder"},hit={class:"title"},fit={class:"info"},pit={class:"settings_field_data"},mit={class:"align-right"},git={class:"setting_item"},vit={class:"setting_field_placeholder"},yit={class:"title"},bit={class:"info"},_it={class:"settings_field_data"},wit={class:"align-right"},kit={class:"setting_item"},Cit={class:"setting_field_placeholder"},xit={class:"title"},Sit={class:"info"},$it={class:"settings_field_data"},Ait={class:"align-right"},Eit={class:"setting_item"},Mit={class:"setting_field_placeholder"},Tit={class:"title"},Pit={class:"info"},Iit={class:"settings_field_data"},Lit={class:"align-right"},Oit={class:"fcom_module_popover_content"},Dit={class:"setting_item"},Rit={class:"setting_field_placeholder"},Vit={class:"title"},Fit={class:"info"},Nit={class:"settings_field_data"},Bit={class:"align-right"},zit={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},Hit={class:"fcom_module_popover_content"},Uit={class:"setting_item"},jit={class:"setting_field_placeholder"},Wit={class:"title"},Yit={class:"info"},qit={class:"settings_field_data"},Git={class:"align-right"},Xit={class:"fcom_module_popover_content"},Kit={class:"setting_item"},Zit={class:"setting_field_placeholder"},Jit={class:"title"},Qit={class:"info"},eot={class:"settings_field_data"},tot={class:"align-right"},not={class:"setting_item"},sot={class:"setting_field_placeholder"},iot={class:"title"},oot={class:"info"},rot={class:"settings_field_data"},aot={class:"align-right"},lot={class:"setting_item"},cot={class:"setting_field_placeholder"},uot={class:"title"},dot={class:"info"},hot={class:"settings_field_data"},fot={class:"align-right"},pot={class:"fhr_content_layout_body"},mot={class:"setting_header"},got={class:"fcom_advanced_features"},vot={key:0,class:"setting_body"},yot={class:"setting_field_placeholder"},bot={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},_ot={class:"avatar",style:{"margin-right":"15px"}},wot=["src"],kot=["href"],Cot={class:"info"},xot={class:"settings_field_data"},Sot={class:"align-right"},$ot=["href"],Aot={key:0,class:"dialog_body"},Eot={key:0,class:"dialog_body fluent_player_settings_body"};function Mot(t,e,n,s,i,o){const r=Yt,a=Ai,l=Y("FollowingConfigView"),c=Y("LeaderBoardConfig"),u=Y("UserBadgesConfig"),d=Jt,h=qe,f=jo,p=vt,m=Y("UpgradeToProModal"),b=Y("storage-settings"),_=Y("SocialMediaLinkConfig"),k=Y("CustomProfileFieldsConfig"),C=Y("messaging-settings"),x=Tl,S=Y("fluent-player-settings"),M=Y("layout"),P=Y("app-layout");return v(),D(P,{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("Advanced Features & Addons")},{default:w(()=>[g("div",sit,[i.loading?(v(),E("div",iit,[y(r,{rows:5,animated:!0}),e[12]||(e[12]=g("hr",null,null,-1)),y(r,{rows:7,animated:!0})])):(v(),E("div",oit,[g("div",rit,[g("div",ait,[g("h2",null,$(t.$t("Advanced Features")),1)]),g("div",lit,[i.features?(v(),E("div",cit,[g("div",uit,[g("div",dit,[g("div",hit,[W($(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.followers_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",fit,$(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",pit,[g("div",mit,[y(l,{features:i.features},null,8,["features"])])])]),g("div",git,[g("div",vit,[g("div",yit,[W($(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.leader_board_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.leader_board_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",bit,$(t.$t("__LEADERBOARD_DESC")),1)]),g("div",_it,[g("div",wit,[y(c,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",kit,[g("div",Cit,[g("div",xit,[W($(t.$t("User Badges"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.user_badge==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Sit,$(t.$t("__USER_BADGE_DESC")),1)]),g("div",$it,[g("div",Ait,[y(u,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",Eit,[g("div",Mit,[g("div",Tit,[W($(t.$t("Course Module"))+" ",1),i.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",Pit,$(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",Iit,[g("div",Lit,[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(()=>[W($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Oit,[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(()=>[W($(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",Dit,[g("div",Rit,[g("div",Vit,[W($(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.giphy_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Fit,$(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",Nit,[g("div",Bit,[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(()=>[W($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[i.features.giphy_module==="yes"?(v(),E("div",zit,[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",Hit,[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(()=>[W($(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",Uit,[g("div",jit,[g("div",Wit,[W($(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.emoji_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):i.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Yit,$(t.$t("__EMOJIS_DESC")),1)]),g("div",qit,[g("div",Git,[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(()=>[W($(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Xit,[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(()=>[W($(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",Kit,[g("div",Zit,[g("div",Jit,[W($(t.$t("Media Module"))+" ",1),i.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1})):i.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",Qit,$(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",eot,[g("div",tot,[y(b,{features:i.features},null,8,["features"])])])]),g("div",not,[g("div",sot,[g("div",iot,$(t.$t("Profile Social Media Links")),1),g("div",oot,$(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",rot,[g("div",aot,[y(_)])])]),g("div",lot,[g("div",cot,[g("div",uot,[W($(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),E(te,{key:0},[i.features.custom_profile_fields==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[W($(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[W($(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",dot,$(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",hot,[g("div",fot,[y(k,{features:i.features},null,8,["features"])])])])])):O("",!0)])])])),g("div",pot,[g("div",mot,[g("h2",null,$(t.$t("Recommended Plugins and Addons")),1)]),g("div",got,[i.features?(v(),E("div",vot,[(v(!0),E(te,null,we(i.addOns,(T,I)=>(v(),E("div",{key:I,class:"setting_item"},[g("div",yot,[g("div",bot,[g("div",_ot,[g("img",{alt:"",src:T.logo,style:{width:"60px"}},null,8,wot)]),g("div",null,[g("a",{target:"_blank",href:T.learn_more_url},$(T.title),9,kot),T.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[W($(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",Cot,$(T.description),1)])])]),g("div",xot,[g("div",Sot,[T.is_installed?O("",!0):(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:L=>o.installPlugin(I),loading:i.installingSlug===I,disabled:!!i.installingSlug&&i.installingSlug!==I},{default:w(()=>[W($(T.action_text),1)]),_:2},1032,["onClick","loading","disabled"])),I==="fluent-messaging"?(v(),D(h,{key:1,onClick:e[8]||(e[8]=L=>i.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[W($(t.$t("Messaging Settings")),1)]),_:1})):I==="fluent-player"&&T.is_installed?(v(),D(h,{key:2,onClick:e[9]||(e[9]=L=>i.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[W($(t.$t("Player Settings")),1)]),_:1})):T.settings_url?(v(),E("a",{key:3,href:T.settings_url,class:"el-button el-button--default fcom_secondary_button"},$(t.$t("View Settings")),9,$ot)):O("",!0)])])]))),128))])):O("",!0)])])]),y(x,{"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(),E("div",Aot,[y(C)])):O("",!0)]),_:1},8,["size","modelValue"]),y(x,{"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(),E("div",Eot,[y(S)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const Tot=de(nit,[["render",Mot]]),Pot={name:"FComColorPicker",components:{InfoFilled:bl},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()}}},Iot={class:"fcom_color_item"};function Lot(t,e,n,s,i,o){const r=Hd,a=Y("InfoFilled"),l=_e,c=Ls;return v(),E("div",Iot,[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 Oot=de(Pot,[["render",Lot]]),Dot={name:"AuthMeta",components:{BgImageUpload:vv,CrepeEditor:ru,FComColorPicker:Oot},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}}},Rot={key:0,class:"fcom_lockscreen_meta"},Vot={class:"fcom_meta_section lockscreen_meta"},Fot={key:0,class:"fcom_description"},Not={key:1,class:"fcom_description"},Bot={class:"fcom_meta_section lockscreen_meta"},zot={key:0,class:"fcom_meta_label"},Hot={key:1,class:"fcom_meta_label"},Uot={class:"fcom_meta_content"},jot={class:"fcom_meta_block"},Wot={class:"fcom_block_label"},Yot={class:"fcom_meta_sorting"},qot={class:"fcom_block_action"},Got={key:1,class:"fcom_lockscreen_meta"},Xot={class:"fcom_edit_title"},Kot={class:"fcom_edit_content"},Zot={key:0,class:"fcom_help_text"},Jot={key:0,class:"fcom_help_text"};function Qot(t,e,n,s,i,o){const r=_e,a=Y("Top"),l=Y("Bottom"),c=Y("EditPen"),u=Y("Hide"),d=Y("View"),h=Y("Back"),f=Y("BgImageUpload"),p=tn,m=vt,b=Y("crepe-editor"),_=cn,k=c2,C=Y("FComColorPicker"),x=Zi,S=Os,M=Zc,P=zfe,T=Bfe,I=l2;return i.editing?(v(),E("div",Got,[g("div",Xot,[y(r,{onClick:o.backToFields},{default:w(()=>[y(h)]),_:1},8,["onClick"]),g("p",null,$(i.editingField.label),1)]),g("div",Kot,[o.isBannerField||o.isFormField?(v(),D(I,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=L=>i.editTab=L)},{default:w(()=>[y(k,{label:t.$t("Content"),name:"content"},{default:w(()=>[y(_,{onSubmit:e[4]||(e[4]=Oe(L=>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]=L=>i.editingField.logo=L),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]=L=>i.editingField.title=L),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]=L=>i.editingField.description=L)},null,8,["modelValue"]),i.isDirty?(v(),E("span",Zot,$(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]=L=>i.editingField.button_label=L),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1},8,["label"]),o.isBannerField?(v(),D(k,{key:0,label:t.$t("Design"),name:"design"},{default:w(()=>[y(_,{onSubmit:e[11]||(e[11]=Oe(L=>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]=L=>i.editingField.background_image=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),y(C,{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]=L=>i.editingField.background_color=L)},null,8,["help_msg","label","modelValue"]),y(C,{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]=L=>i.editingField.title_color=L)},null,8,["help_msg","label","modelValue"]),y(C,{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]=L=>i.editingField.text_color=L)},null,8,["help_msg","label","modelValue"]),o.isFormField?(v(),D(C,{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]=L=>i.editingField.button_label_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0),o.isFormField?(v(),D(C,{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]=L=>i.editingField.button_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0)]),_:1})]),_:1},8,["label"])):O("",!0),o.isFormField&&i.editingField.fields.terms?(v(),D(k,{key:1,label:t.$t("Fields"),name:"fields"},{default:w(()=>[y(T,{modelValue:i.formField,"onUpdate:modelValue":e[17]||(e[17]=L=>i.formField=L),accordion:""},{default:w(()=>[y(P,{title:t.$t("Terms"),name:"terms"},{default:w(()=>[y(_,{onSubmit:e[15]||(e[15]=Oe(L=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=L=>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]=L=>i.editingField.fields.terms.label=L)},null,8,["modelValue"]),i.isDirty?(v(),E("span",Jot,$(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]=L=>i.editingField.fields.terms.required=L)},{default:w(()=>[y(x,{value:!0},{default:w(()=>[W($(t.$t("Yes")),1)]),_:1}),y(x,{value:!1},{default:w(()=>[W($(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),y(p,{label:t.$t("Disabled")},{default:w(()=>[y(M,{modelValue:i.editingField.fields.terms.disabled,"onUpdate:modelValue":e[14]||(e[14]=L=>i.editingField.fields.terms.disabled=L)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1},8,["modelValue"])):O("",!0)])])):(v(),E("div",Rot,[g("div",Vot,[n.currentTab=="login"?(v(),E("div",Fot,[g("p",null,$(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),E("div",Not,[g("p",null,$(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",Bot,[n.currentTab=="login"?(v(),E("div",zot,$(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),E("div",Hot,$(t.$t("Customize Sign Up")),1)):O("",!0),g("div",Uot,[g("ul",jot,[(v(!0),E(te,null,we(o.sortedFields,L=>(v(),E("li",{class:q(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",Wot,[y(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(L))))]),_:2},1024),g("p",null,$(o.getLabel(L.type)),1)]),g("div",Yot,[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",qot,[y(r,{onClick:V=>o.updateField(L)},{default:w(()=>[y(c)]),_:1},8,["onClick"]),L.type=="banner"?(v(),E(te,{key:0},[L.hidden?(v(),D(r,{key:0,onClick:V=>o.toggleHidden(L)},{default:w(()=>[y(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:V=>o.toggleHidden(L)},{default:w(()=>[y(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const ert=de(Dot,[["render",Qot]]),trt={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:ert},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})}}},nrt={class:"fcom_auth_content"},srt={key:0,class:"fcom_auth_image"},irt=["src","alt"],ort={class:"fcom_auth_title"},rrt=["innerHTML"],art={class:"fcom_auth_content form_content"},lrt={class:"fcom_auth_form_header"},crt={class:"fcom_auth_title"},urt=["innerHTML"],drt=["innerHTML"];function hrt(t,e,n,s,i,o){const r=Y("auth-meta"),a=j1,l=vt,c=tn,u=Jt,d=cn,h=qe,f=La;return v(),E(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,_,k,C,x,S,M;return[g("div",{class:"fcom_editor_content",style:Xe(o.contentStyles)},[(p=i.settings.banner)!=null&&p.hidden?O("",!0):(v(),E("div",{key:0,class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(i.settings.banner))},[g("div",nrt,[(m=i.settings.banner)!=null&&m.logo?(v(),E("div",srt,[g("img",{src:(b=i.settings.banner)==null?void 0:b.logo,alt:(_=i.settings.banner)==null?void 0:_.title},null,8,irt)])):O("",!0),g("div",ort,[g("h2",{style:Xe(o.titleStyles(i.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=P=>o.updateTitle(P,i.settings.banner))},$((k=i.settings.banner)==null?void 0:k.title),37)]),(C=i.settings.banner)!=null&&C.description?(v(),E("div",{key:1,class:"fcom_auth_description",style:Xe(o.descriptionStyles(i.settings.banner))},[g("p",{innerHTML:i.settings.banner.description_rendered},null,8,rrt)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(i.settings.form))},[g("div",art,[g("div",lrt,[g("div",crt,[g("h2",{style:Xe(o.titleStyles(i.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,i.settings.form))},$((x=i.settings.form)==null?void 0:x.title),37)]),(S=i.settings.form)!=null&&S.description?(v(),E("div",{key:0,class:"fcom_auth_description",style:Xe(o.descriptionStyles(i.settings.form))},[g("p",{innerHTML:i.settings.form.description_rendered},null,8,urt)],4)):O("",!0)]),(M=i.settings.form)!=null&&M.fields?(v(),D(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:w(()=>[(v(!0),E(te,null,we(i.settings.form.fields,P=>(v(),E("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,drt)]),_:2},1024)]),_:2},1024)):O("",!0)]))),128))]),_:1})):O("",!0),y(h,{style:Xe(o.buttonStyles(i.settings.form)),contenteditable:"true",onBlur:e[2]||(e[2]=P=>o.updateButtonLabel(P,i.settings.form))},{default:w(()=>{var P;return[W($((P=i.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const frt=de(trt,[["render",hrt]]),prt={name:"AuthSettings",emits:["completed"],components:{AuthEditor:frt},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()}},mrt={class:"fcom_full_editor"},grt={class:"fcom_full_editor_header"},vrt={class:"fcom_editor_menu object_menu"},yrt={class:"fcom_space_menu_ul"},brt={class:"full_editor_actions"},_rt={key:0},wrt={key:1};function krt(t,e,n,s,i,o){const r=Y("ArrowLeft"),a=_e,l=qe,c=W1,u=Y("auth-editor"),d=Yt,h=j1,f=La,p=U1,m=xt("loading");return v(),E("div",mrt,[y(p,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",grt,[g("div",{onClick:e[0]||(e[0]=b=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),W(" "+$(t.$t("General Settings")),1)]),g("div",vrt,[g("ul",yrt,[g("li",{onClick:e[1]||(e[1]=b=>i.currentTab="login")},[g("a",{class:q({"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:q({"router-link-exact-active":i.currentTab=="signup"}),href:"#"},$(t.$t("Sign Up")),3)])])]),g("div",brt,[Re((v(),D(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[i.hasPro?(v(),E("span",_rt,$(t.$t("Save Changes")),1)):(v(),E("span",wrt,$(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(),E(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 Crt=de(prt,[["render",krt]]),xrt={name:"GeneralSettings",components:{ImageUploader:Jc,Layout:mi,AppLayout:gi,CopyDocument:aR,AuthSettings:Crt},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"))}},Srt={class:"settings_router"},$rt={class:"fhr_content_layout_body"},Art={class:"setting_body"},Ert={class:"settings_title"},Mrt={class:"settings_subtitle"},Trt={class:"settings_title"},Prt={class:"settings_subtitle"},Irt=["src"],Lrt={class:"settings_title"},Ort={class:"settings_subtitle"},Drt=["src"],Rrt={class:"settings_title"},Vrt={class:"settings_subtitle"},Frt={class:"settings_title"},Nrt={class:"settings_subtitle"},Brt=["src"],zrt={class:"settings_title"},Hrt={class:"settings_subtitle"},Urt={class:"fcom_help_text"},jrt={class:"settings_title"},Wrt={class:"settings_subtitle"},Yrt={class:"settings_title"},qrt={class:"settings_subtitle"},Grt={class:"help_text"},Xrt={class:"settings_title"},Krt={class:"settings_subtitle"},Zrt={class:"settings_title"},Jrt={class:"settings_subtitle"},Qrt={class:"fcom_help_text"},eat={class:"settings_title"},tat={class:"settings_subtitle"},nat={class:"fcom_help_text"},sat=["href"],iat={class:"settings_title"},oat={class:"settings_subtitle"},rat={key:0};function aat(t,e,n,s,i,o){const r=qe,a=zd,l=vt,c=tn,u=Bd,d=Y("image-uploader"),h=mp,f=Os,p=Y("CopyDocument"),m=_e,b=Jt,_=Zi,k=nn,C=Zt,x=cn,S=Yt,M=Y("auth-settings"),P=Y("layout"),T=Y("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",Srt,[g("div",$rt,[g("div",Art,[i.settings?(v(),D(x,{key:0,onSubmit:e[19]||(e[19]=Oe(I=>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",Ert,$(t.$t("Community Title")),1),g("span",Mrt,$(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]=I=>i.settings.site_title=I)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),y(u,{gutter:20,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Trt,$(t.$t("Site Logo (For Light Background)")),1),g("span",Prt,$(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(),E("img",{key:0,alt:"",class:"settings_img",src:i.settings.logo},null,8,Irt)):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]=I=>{i.settings.logo=I})},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",Lrt,$(t.$t("Site Logo (For Dark Mode)")),1),g("span",Ort,$(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(),E("img",{key:0,alt:"",class:"settings_img",src:i.settings.white_logo},null,8,Drt)):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]=I=>{i.settings.white_logo=I})},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",Rrt,$(t.$t("Logo Permalink")),1),g("span",Vrt,$(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]=I=>i.settings.logo_permalink_type=I),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"default"},{default:w(()=>[W($(t.$t("Default")),1)]),_:1}),y(h,{value:"custom"},{default:w(()=>[W($(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]=I=>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]=I=>i.settings.logo_permalink=I),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",Frt,$(t.$t("Default Open Graph Image")),1),g("span",Nrt,$(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(),E("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:i.settings.featured_image},null,8,Brt)):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]=I=>{i.settings.featured_image=I})},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",zrt,$(t.$t("Global Post Status")),1),g("span",Hrt,$(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]=I=>i.settings.disable_global_posts=I),class:"fcom_checkbox","true-value":"no","false-value":"yes"},{default:w(()=>[W($(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",Urt,[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",jrt,$(t.$t("Portal Access Settings")),1),g("span",Wrt,$(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]=I=>i.settings.access.acess_level=I),class:"fcom_radio_group"},{default:w(()=>[y(_,{value:"public"},{default:w(()=>[W($(t.$t("Everyone")),1)]),_:1}),y(_,{value:"logged_in"},{default:w(()=>[W($(t.$t("Only Logged In Users")),1)]),_:1}),y(_,{value:"role_based"},{default:w(()=>[W($(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),E(te,{key:0},[y(u,{gutter:30,class:"setting_row"},{default:w(()=>[y(a,{sm:12},{default:w(()=>[g("p",Yrt,$(t.$t("User Roles")),1),g("span",qrt,$(t.$t("Select user roles who can access the portal.")),1)]),_:1}),y(a,{sm:12},{default:w(()=>[y(c,null,{default:w(()=>[y(C,{placeholder:t.$t("Select Access Roles"),"allow-create":"",modelValue:i.settings.access.access_roles,"onUpdate:modelValue":e[9]||(e[9]=I=>i.settings.access.access_roles=I),multiple:""},{default:w(()=>[(v(!0),E(te,null,we(i.user_roles,(I,L)=>(v(),D(k,{key:L,label:I,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),g("span",Grt,$(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",Xrt,$(t.$t("Not Matched User Roles")),1),g("span",Krt,$(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]=I=>i.settings.restricted_role_content=I)},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",Zrt,$(t.$t("Redirect URL")),1),g("span",Jrt,$(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]=I=>i.settings.auth_url=I)},null,8,["modelValue"]),g("div",Qrt,[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",eat,$(t.$t("Login / Registration URLs")),1),g("span",tat,$(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]=I=>i.settings.auth_form_type=I),class:"fcom_radio_group"},{default:w(()=>[y(h,{value:"default"},{default:w(()=>[W($(t.$t("Use Default")),1)]),_:1}),y(h,{value:"custom"},{default:w(()=>[W($(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]=I=>i.settings.cutsom_auth_url=I),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]=I=>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]=I=>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(),E(te,{key:0},[g("div",nat,[g("p",null,[W($(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,sat)])]),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]=I=>i.settings.explicit_registration=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])],64))]),_:1},8,["label"]),i.settings.auth_form_type=="default"?(v(),E(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]=I=>i.settings.use_custom_signup_page=I),"true-value":"yes","false-value":"no"},{default:w(()=>[W($(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]=I=>i.settings.custom_signup_url=I)},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",iat,$(t.$t("Customize Login/Signup Form")),1),g("span",oat,$(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(()=>[W($(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(),E("div",rat,[(v(),D(Pa,{to:"body"},[y(M,{onCompleted:e[20]||(e[20]=I=>i.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const lat=de(xrt,[["render",aat]]),cat={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},uat={class:"fcom_content_divider__content"};function dat(t,e,n,s,i,o){return v(),E("div",{class:q(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),E("span",{key:0,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0),g("div",uat,[le(t.$slots,"default")]),n.position!=="right"?(v(),E("span",{key:1,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0)],2)}const hat=de(cat,[["render",dat]]),fat={name:"MenuSettings",components:{MenuGroupSettings:dU,Layout:mi,AppLayout:gi,ContentDivider:hat,ActionPopover:Pl},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()}},pat={class:"settings_router"},mat={key:0},gat={class:"fcom_card_sections"},vat={class:"fcom_card_sections"},yat={class:"fcom_card_sections"},bat={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},_at={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},wat={style:{margin:"0"}},kat={style:{"margin-top":"20px","text-align":"center"}},Cat={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},xat={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},Sat={key:1,class:"white_loaded"};function $at(t,e,n,s,i,o){const r=qe,a=Y("menu-group-settings"),l=Y("content-divider"),c=vt,u=Y("action-popover"),d=Yt,h=Y("layout"),f=Y("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",pat,[i.menuSettings?(v(),E("div",mat,[g("div",gat,[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",vat,[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",yat,[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(),E(te,{key:0},[y(l,null,{default:w(()=>[W($(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),i.menuSettings.afterCommunityLinkGroups.length?(v(),E(te,{key:0},[(v(!0),E(te,null,we(i.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),E("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(),E("div",bat,[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:kt(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(()=>[W($(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(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),E("div",_at,[g("h4",wat,$(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",kat,[y(r,{disabled:i.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[W($(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),E("div",Cat,[g("p",xat,$(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(()=>[W($(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),E("div",Sat,[y(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Aat=de(fat,[["render",$at]]),Eat={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()}},Mat={style:{float:"left"}},Tat={style:{float:"right",color:"#8492a6","font-size":"13px"}},Pat={key:1},Iat={class:"dialog_footer"},Lat={key:0},Oat={key:1};function Dat(t,e,n,s,i,o){const r=nn,a=Zt,l=tn,c=El,u=Jt,d=d8,h=qe,f=cn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Oe(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(),E("p",Pat,$(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),E(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",Mat,$(m.display_name),1),g("span",Tat,$(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(()=>[W($(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(()=>[W($(t.$t("Community Admin (All Access)")),1)]),_:1}),y(u,{disabled:i.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),y(u,{disabled:i.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[W($(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(()=>[W($(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",Iat,[le(t.$slots,"after_form",{},()=>[Re((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(),E("span",Lat,$(t.$t("Update Role")),1)):(v(),E("span",Oat,$(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,i.adding]])])])]),_:3},8,["modelValue"])}const Rat=de(Eat,[["render",Dat]]),Vat={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=Eh(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=Eh(this.xprofile.total_points),e=Eh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=Eh(this.xprofile.total_points),e=Eh(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"}}},Fat=["src"],Nat={key:1,class:"fcom_no_image"},Bat={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function zat(t,e,n,s,i,o){return v(),E("div",{class:q([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:Xe(o.getOutlineStyle),class:q({fcom_compilation_avatar:o.withCompletion})},[n.xprofile?(v(),E("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,Fat)):(v(),E("span",Nat))],6),o.level||n.is_online?(v(),E("div",Bat,[g("span",null,$(o.level),1)])):O("",!0)],2)}const j2=de(Vat,[["render",zat]]),Hat={name:"ModeratorSettings",components:{UserAvatar:j2,UserRouteLink:sa,ManagerForm:Rat,Layout:mi,AppLayout:gi},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"))}},Uat=["href"],jat={class:"settings_router manager_section"},Wat={class:"fhr_content_layout_body"},Yat={key:0,class:"setting_body"},qat={class:"fcom_manager_actions"},Gat={class:"bulk_search"},Xat={class:"fcom_manager_table"},Kat={class:"user_col"},Zat={class:"user_info"},Jat={style:{display:"flex"}},Qat={class:"user_id"},elt={class:"user_email"},tlt={class:"fcom_table_action_col"},nlt={key:1,class:"setting_body",style:{"text-align":"center"}},slt={class:"promo_description"},ilt=["href"],olt={class:"dialog_header"},rlt={class:"dialog_left"},alt={class:"dialog_body"};function llt(t,e,n,s,i,o){const r=Y("Plus"),a=_e,l=qe,c=vt,u=o8,d=Y("user-route-link"),h=ea,f=Qr,p=Y("layout"),m=Y("app-layout"),b=Y("manager-form"),_=xs,k=xt("loading");return v(),E(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]=C=>o.showForm(null))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Add Manager")),1)]),_:1})):(v(),E("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Uat))]),default:w(()=>[g("div",jat,[g("div",Wat,[t.has_pro?(v(),E("div",Yat,[g("div",qat,[g("div",Gat,[y(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=C=>i.search=C),onKeydown:kt(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",Xat,[Re((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(C=>[g("div",Kat,[y(u,{src:C.row.xprofile.avatar},null,8,["src"]),g("div",Zat,[g("div",Jat,[y(d,{xprofile:C.row.xprofile},null,8,["xprofile"]),g("span",Qat,"#"+$(C.row.ID),1)]),g("span",elt,$(C.row.user_email),1)])])]),_:1},8,["label"]),y(h,{label:t.$t("Role"),sortable:""},{default:w(C=>[g("span",null,$(o.formatRoles(C.row.community_role.value)),1)]),_:1},8,["label"]),y(h,null,{default:w(C=>[g("div",tlt,[y(l,{onClick:x=>o.showForm(C.row),size:"small"},{default:w(()=>[W($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:x=>o.removeManager(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[W($(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[k,i.loading]])])])):(v(),E("div",nlt,[g("p",slt,$(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,ilt)]))])])]),_: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",olt,[g("div",rlt,[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",alt,[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]=C=>i.editing_manager=C)},null,8,["modelValue"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const clt=de(Hat,[["render",llt]]),ult={name:"NestedReplyBox",mixins:[H2],components:{SingleComment:U2,FeedTextComposer:mv,CommentReactions:oU,HeartIcon:B2},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions","is_modal"],emits:["commented","copyLink"],data(){return{open:!1,composerOpen:!1,replyingToId:null,autofocusInput:!1,focusTick:0,composerKey:0,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=>{var o;this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},(o=this.$refs.composer)==null||o.clearContent(),this.comment.comments.push(i.comment),Array.isArray(this.feed.comments)&&this.feed.comments.push(i.comment),this.$emit("commented",i.comment),this.$eventBus.emit("recent_activities_refresh"),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.$nextTick(()=>{this.scrollCommentIntoView(i.comment.id,this.comment.id)})}).catch(i=>{this.$handleError(i)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(t,e=!0){var r;if(!this.hasCommentPermission(this.feed)){this.$notify({message:this.$t("Please join the Space to post a comment."),type:"warning"});return}const n=t==null?void 0:t.id,s=(r=t==null?void 0:t.xprofile)==null?void 0:r.username,i=e&&s&&t.user_id!=this.auth.user_id?s:"";if(!e){this.open=this.composerOpen=!this.open,this.replyingToId=null,this.autofocusInput=!1;return}if(this.composerOpen&&this.replyingToId===n){this.composerOpen=!1;return}const o=this.composerOpen;this.replyingToId=n,this.open=this.composerOpen=this.autofocusInput=!0,this.isComposerEmpty()?(this.commentReply.message=i?`@${i} `:"",o&&this.composerKey++):this.focusTick++},isComposerEmpty(){return!(this.commentReply.message||"").replace(/ |\u00A0/gi,"").trim()},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)}}},dlt={key:0,class:"reply_box"},hlt=["aria-expanded"],flt={class:"fcom_comments_react fcom_reaction_list"},plt={class:"child_comments"},mlt=["id"],glt={key:0,class:"reply_box"},vlt=["onClick","aria-expanded"],ylt={class:"fcom_comments_react fcom_reaction_list"},blt={key:0,class:"child_reply_wrap"},_lt={class:"feed_commenting"},wlt={class:"person_avatar"},klt=["alt","src"];function Clt(t,e,n,s,i,o){var h;const r=Y("HeartIcon"),a=_e,l=Y("CommentReactions"),c=Y("single-comment"),u=qe,d=Y("feed-text-composer");return v(),E(te,null,[o.canComment?(v(),E("div",dlt,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),E("button",{key:0,type:"button",onClick:e[0]||(e[0]=f=>o.toggleCommentBox(n.comment)),class:"reply_btn","aria-expanded":i.composerOpen&&i.replyingToId===n.comment.id},$(t.$t("Reply")),9,hlt)):O("",!0),g("span",{class:q([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",flt,[y(a,{class:q({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",{toggleOpen:()=>o.toggleCommentBox(n.comment,!1),open:i.open})])):O("",!0),!n.show_reacts_only||i.open?(v(),E(te,{key:1},[g("div",plt,[(v(!0),E(te,null,we(n.comment.comments,(f,p)=>(v(),E("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(),E("div",glt,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),E("button",{key:0,type:"button",onClick:b=>o.toggleCommentBox(f),class:"reply_btn","aria-expanded":i.composerOpen&&i.replyingToId===f.id},$(t.$t("Reply")),9,vlt)):O("",!0),g("span",{class:q([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",ylt,[y(a,{class:q({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,mlt))),256))]),i.composerOpen?(v(),E("div",blt,[g("div",_lt,[g("div",wlt,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,klt)]),g("div",{onKeydown:e[3]||(e[3]=kt((...f)=>o.maybeSave&&o.maybeSave(...f),["enter"])),class:"feed_comment_input comment_text"},[(v(),D(d,{ref:"composer",key:i.composerKey,config:{multipleMedia:!0},context:"comment",is_modal:n.is_modal,defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:i.submitting,autofocus:i.autofocusInput,autofocus_changed:i.focusTick,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(()=>[W($(t.$t("Reply")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","defaultMentions","disabled","autofocus","autofocus_changed","mentionQuery","content","placeholder"]))],32)])])):O("",!0)],64)):O("",!0)],64)}const xlt=de(ult,[["render",Clt]]),Slt={name:"FeedComments",components:{SingleComment:U2,NestedReplyBox:xlt},props:["feed","show_all","checkPermission","defaultMentions","sortBy","is_single","is_modal"],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}).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()}},$lt={key:0,class:"feed_comments"},Alt=["id"],Elt={key:1,class:"feed_comments"},Mlt=["id"],Tlt=["onClick","aria-expanded"];function Plt(t,e,n,s,i,o){const r=Yt,a=Y("nested-reply-box"),l=Y("single-comment");return n.show_all?(v(),E("div",$lt,[i.loading?(v(),D(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),E(te,{key:1},[le(t.$slots,"before_comments_start"),(v(!0),E(te,null,we(o.displayComments,(c,u)=>(v(),E("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)},fs({_: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:[],is_modal:n.is_modal,onCopyLink:o.copyCommentLink},null,8,["feed","comment","checkPermission","defaultMentions","is_modal","onCopyLink"])]),key:"0"}]),1032,["comment","space_id","onCopyLink","onReload","onDeleted"])],8,Alt))),128))],64))])):o.lastComment?(v(),E("div",Elt,[g("div",{class:"each_comment",id:"comment_"+o.lastComment.id},[y(l,{comment:o.lastComment,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onDeleted:e[0]||(e[0]=c=>o.handleCommentDelete(o.lastComment))},fs({_: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,is_modal:n.is_modal},{after_reply_box_text:w(({toggleOpen:c,open:u})=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),E("button",{key:0,type:"button",onClick:d=>c(),class:"reply_btn last_comment_reply_txt","aria-expanded":u},$(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),9,Tlt)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment","is_modal"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])],8,Mlt),n.feed.comments_count>1?(v(),E("div",{key:0,onClick:e[1]||(e[1]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},$(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const Ilt=de(Slt,[["render",Plt]]),Llt={name:"ReactedUsers",components:{UserRouteLink:sa},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}))}}},Olt=["title"],Dlt={key:0,class:"reactions_avatars"},Rlt=["alt","src"],Vlt={key:0},Flt={key:1},Nlt={class:"fcom_user_lists"},Blt={key:2};function zlt(t,e,n,s,i,o){const r=Yt,a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Pi,u=jo;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(),E("div",Dlt,[(v(!0),E(te,null,we(o.reactedProfiles,d=>(v(),E("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),E("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,Rlt)):O("",!0)]))),128))])):O("",!0),g("span",null,$(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,Olt)]),default:w(()=>[i.loading?(v(),E("div",Vlt,[y(r,{animated:!0,rows:3})])):i.reactions?(v(),E("div",Flt,[y(c,{"max-height":"300px"},{default:w(()=>[g("ul",Nlt,[(v(!0),E(te,null,we(i.reactions,d=>(v(),E("li",null,[d.xprofile?(v(),E(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(),E("div",Blt,[g("p",null,$(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const Hlt=de(Llt,[["render",zlt]]);function Ult(){this.__data__=[],this.size=0}var jlt=Ult;function Wlt(t,e){return t===e||t!==t&&e!==e}var yU=Wlt,Ylt=yU;function qlt(t,e){for(var n=t.length;n--;)if(Ylt(t[n][0],e))return n;return-1}var W2=qlt,Glt=W2,Xlt=Array.prototype,Klt=Xlt.splice;function Zlt(t){var e=this.__data__,n=Glt(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():Klt.call(e,n,1),--this.size,!0}var Jlt=Zlt,Qlt=W2;function ect(t){var e=this.__data__,n=Qlt(e,t);return n<0?void 0:e[n][1]}var tct=ect,nct=W2;function sct(t){return nct(this.__data__,t)>-1}var ict=sct,oct=W2;function rct(t,e){var n=this.__data__,s=oct(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}var act=rct,lct=jlt,cct=Jlt,uct=tct,dct=ict,hct=act;function Mp(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])}}Mp.prototype.clear=lct;Mp.prototype.delete=cct;Mp.prototype.get=uct;Mp.prototype.has=dct;Mp.prototype.set=hct;var Y2=Mp,fct=Y2;function pct(){this.__data__=new fct,this.size=0}var mct=pct;function gct(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var vct=gct;function yct(t){return this.__data__.get(t)}var bct=yct;function _ct(t){return this.__data__.has(t)}var wct=_ct,kct=Sp,Cct=kct(Object,"create"),q2=Cct,fT=q2;function xct(){this.__data__=fT?fT(null):{},this.size=0}var Sct=xct;function $ct(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Act=$ct,Ect=q2,Mct="__lodash_hash_undefined__",Tct=Object.prototype,Pct=Tct.hasOwnProperty;function Ict(t){var e=this.__data__;if(Ect){var n=e[t];return n===Mct?void 0:n}return Pct.call(e,t)?e[t]:void 0}var Lct=Ict,Oct=q2,Dct=Object.prototype,Rct=Dct.hasOwnProperty;function Vct(t){var e=this.__data__;return Oct?e[t]!==void 0:Rct.call(e,t)}var Fct=Vct,Nct=q2,Bct="__lodash_hash_undefined__";function zct(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nct&&e===void 0?Bct:e,this}var Hct=zct,Uct=Sct,jct=Act,Wct=Lct,Yct=Fct,qct=Hct;function Tp(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])}}Tp.prototype.clear=Uct;Tp.prototype.delete=jct;Tp.prototype.get=Wct;Tp.prototype.has=Yct;Tp.prototype.set=qct;var Gct=Tp,pT=Gct,Xct=Y2,Kct=SS;function Zct(){this.size=0,this.__data__={hash:new pT,map:new(Kct||Xct),string:new pT}}var Jct=Zct;function Qct(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var eut=Qct,tut=eut;function nut(t,e){var n=t.__data__;return tut(e)?n[typeof e=="string"?"string":"hash"]:n.map}var G2=nut,sut=G2;function iut(t){var e=sut(this,t).delete(t);return this.size-=e?1:0,e}var out=iut,rut=G2;function aut(t){return rut(this,t).get(t)}var lut=aut,cut=G2;function uut(t){return cut(this,t).has(t)}var dut=uut,hut=G2;function fut(t,e){var n=hut(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}var put=fut,mut=Jct,gut=out,vut=lut,yut=dut,but=put;function Pp(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])}}Pp.prototype.clear=mut;Pp.prototype.delete=gut;Pp.prototype.get=vut;Pp.prototype.has=yut;Pp.prototype.set=but;var ES=Pp,_ut=Y2,wut=SS,kut=ES,Cut=200;function xut(t,e){var n=this.__data__;if(n instanceof _ut){var s=n.__data__;if(!wut||s.length<Cut-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new kut(s)}return n.set(t,e),this.size=n.size,this}var Sut=xut,$ut=Y2,Aut=mct,Eut=vct,Mut=bct,Tut=wct,Put=Sut;function Ip(t){var e=this.__data__=new $ut(t);this.size=e.size}Ip.prototype.clear=Aut;Ip.prototype.delete=Eut;Ip.prototype.get=Mut;Ip.prototype.has=Tut;Ip.prototype.set=Put;var bU=Ip,Iut="__lodash_hash_undefined__";function Lut(t){return this.__data__.set(t,Iut),this}var Out=Lut;function Dut(t){return this.__data__.has(t)}var Rut=Dut,Vut=ES,Fut=Out,Nut=Rut;function Zb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Vut;++e<n;)this.add(t[e])}Zb.prototype.add=Zb.prototype.push=Fut;Zb.prototype.has=Nut;var _U=Zb;function But(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 zut=But;function Hut(t,e){return t.has(e)}var wU=Hut,Uut=_U,jut=zut,Wut=wU,Yut=1,qut=2;function Gut(t,e,n,s,i,o){var r=n&Yut,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&qut?new Uut: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(!jut(e,function(_,k){if(!Wut(f,k)&&(p===_||i(p,_,n,s,o)))return f.push(k)})){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 kU=Gut,Xut=Va,Kut=Xut.Uint8Array,Zut=Kut;function Jut(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}var Qut=Jut;function edt(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var MS=edt,mT=h2,gT=Zut,tdt=yU,ndt=kU,sdt=Qut,idt=MS,odt=1,rdt=2,adt="[object Boolean]",ldt="[object Date]",cdt="[object Error]",udt="[object Map]",ddt="[object Number]",hdt="[object RegExp]",fdt="[object Set]",pdt="[object String]",mdt="[object Symbol]",gdt="[object ArrayBuffer]",vdt="[object DataView]",vT=mT?mT.prototype:void 0,N3=vT?vT.valueOf:void 0;function ydt(t,e,n,s,i,o,r){switch(n){case vdt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case gdt:return!(t.byteLength!=e.byteLength||!o(new gT(t),new gT(e)));case adt:case ldt:case ddt:return tdt(+t,+e);case cdt:return t.name==e.name&&t.message==e.message;case hdt:case pdt:return t==e+"";case udt:var a=sdt;case fdt:var l=s&odt;if(a||(a=idt),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=rdt,r.set(t,e);var u=ndt(a(t),a(e),s,i,o,r);return r.delete(t),u;case mdt:if(N3)return N3.call(t)==N3.call(e)}return!1}var bdt=ydt;function _dt(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var wdt=_dt,kdt=wdt,Cdt=Fa;function xdt(t,e,n){var s=e(t);return Cdt(t)?s:kdt(s,n(t))}var Sdt=xdt;function $dt(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 Adt=$dt;function Edt(){return[]}var Mdt=Edt,Tdt=Adt,Pdt=Mdt,Idt=Object.prototype,Ldt=Idt.propertyIsEnumerable,yT=Object.getOwnPropertySymbols,Odt=yT?function(t){return t==null?[]:(t=Object(t),Tdt(yT(t),function(e){return Ldt.call(t,e)}))}:Pdt,Ddt=Odt,Rdt=Sdt,Vdt=Ddt,Fdt=D8;function Ndt(t){return Rdt(t,Fdt,Vdt)}var Bdt=Ndt,bT=Bdt,zdt=1,Hdt=Object.prototype,Udt=Hdt.hasOwnProperty;function jdt(t,e,n,s,i,o){var r=n&zdt,a=bT(t),l=a.length,c=bT(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:Udt.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],k=e[h];if(s)var C=r?s(k,_,h,e,t,o):s(_,k,h,t,e,o);if(!(C===void 0?_===k||i(_,k,n,s,o):C)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var x=t.constructor,S=e.constructor;x!=S&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var Wdt=jdt,B3=bU,Ydt=kU,qdt=bdt,Gdt=Wdt,_T=KH,wT=Fa,kT=P8,Xdt=L8,Kdt=1,CT="[object Arguments]",xT="[object Array]",g0="[object Object]",Zdt=Object.prototype,ST=Zdt.hasOwnProperty;function Jdt(t,e,n,s,i,o){var r=wT(t),a=wT(e),l=r?xT:_T(t),c=a?xT:_T(e);l=l==CT?g0:l,c=c==CT?g0:c;var u=l==g0,d=c==g0,h=l==c;if(h&&kT(t)){if(!kT(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new B3),r||Xdt(t)?Ydt(t,e,n,s,i,o):qdt(t,e,l,n,s,i,o);if(!(n&Kdt)){var f=u&&ST.call(t,"__wrapped__"),p=d&&ST.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new B3),i(m,b,n,s,o)}}return h?(o||(o=new B3),Gdt(t,e,n,s,i,o)):!1}var Qdt=Jdt,eht=Qdt,$T=X1;function CU(t,e,n,s,i){return t===e?!0:t==null||e==null||!$T(t)&&!$T(e)?t!==t&&e!==e:eht(t,e,n,s,CU,i)}var xU=CU,tht=bU,nht=xU,sht=1,iht=2;function oht(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 tht;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?nht(u,c,sht|iht,s,d):h))return!1}}return!0}var rht=oht,aht=K1;function lht(t){return t===t&&!aht(t)}var SU=lht,cht=SU,uht=D8;function dht(t){for(var e=uht(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,cht(i)]}return e}var hht=dht;function fht(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var $U=fht,pht=rht,mht=hht,ght=$U;function vht(t){var e=mht(t);return e.length==1&&e[0][2]?ght(e[0][0],e[0][1]):function(n){return n===t||pht(n,t,e)}}var yht=vht,bht=Fa,_ht=z2,wht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kht=/^\w*$/;function Cht(t,e){if(bht(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||_ht(t)?!0:kht.test(t)||!wht.test(t)||e!=null&&t in Object(e)}var TS=Cht,AU=ES,xht="Expected a function";function PS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(xht);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(PS.Cache||AU),n}PS.Cache=AU;var Sht=PS,$ht=Sht,Aht=500;function Eht(t){var e=$ht(t,function(s){return n.size===Aht&&n.clear(),s}),n=e.cache;return e}var Mht=Eht,Tht=Mht,Pht=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Iht=/\\(\\)?/g,Lht=Tht(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Pht,function(n,s,i,o){e.push(i?o.replace(Iht,"$1"):s||n)}),e}),Oht=Lht;function Dht(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 Rht=Dht,AT=h2,Vht=Rht,Fht=Fa,Nht=z2,Bht=1/0,ET=AT?AT.prototype:void 0,MT=ET?ET.toString:void 0;function EU(t){if(typeof t=="string")return t;if(Fht(t))return Vht(t,EU)+"";if(Nht(t))return MT?MT.call(t):"";var e=t+"";return e=="0"&&1/t==-Bht?"-0":e}var zht=EU,Hht=zht;function Uht(t){return t==null?"":Hht(t)}var jht=Uht,Wht=Fa,Yht=TS,qht=Oht,Ght=jht;function Xht(t,e){return Wht(t)?t:Yht(t,e)?[t]:qht(Ght(t))}var MU=Xht,Kht=z2,Zht=1/0;function Jht(t){if(typeof t=="string"||Kht(t))return t;var e=t+"";return e=="0"&&1/t==-Zht?"-0":e}var X2=Jht,Qht=MU,eft=X2;function tft(t,e){e=Qht(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[eft(e[n++])];return n&&n==s?t:void 0}var TU=tft,nft=TU;function sft(t,e,n){var s=t==null?void 0:nft(t,e);return s===void 0?n:s}var ift=sft;function oft(t,e){return t!=null&&e in Object(t)}var rft=oft,aft=MU,lft=T8,cft=Fa,uft=EF,dft=I8,hft=X2;function fft(t,e,n){e=aft(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=hft(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&&dft(i)&&uft(r,i)&&(cft(t)||lft(t)))}var pft=fft,mft=rft,gft=pft;function vft(t,e){return t!=null&&gft(t,e,mft)}var yft=vft,bft=xU,_ft=ift,wft=yft,kft=TS,Cft=SU,xft=$U,Sft=X2,$ft=1,Aft=2;function Eft(t,e){return kft(t)&&Cft(e)?xft(Sft(t),e):function(n){var s=_ft(n,t);return s===void 0&&s===e?wft(n,t):bft(e,s,$ft|Aft)}}var Mft=Eft;function Tft(t){return function(e){return e==null?void 0:e[t]}}var Pft=Tft,Ift=TU;function Lft(t){return function(e){return Ift(e,t)}}var Oft=Lft,Dft=Pft,Rft=Oft,Vft=TS,Fft=X2;function Nft(t){return Vft(t)?Dft(Fft(t)):Rft(t)}var Bft=Nft,zft=yht,Hft=Mft,Uft=IF,jft=Fa,Wft=Bft;function Yft(t){return typeof t=="function"?t:t==null?Uft:typeof t=="object"?jft(t)?Hft(t[0],t[1]):zft(t):Wft(t)}var qft=Yft;function Gft(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 Xft=Gft;function Kft(t){return t!==t}var Zft=Kft;function Jft(t,e,n){for(var s=n-1,i=t.length;++s<i;)if(t[s]===e)return s;return-1}var Qft=Jft,ept=Xft,tpt=Zft,npt=Qft;function spt(t,e,n){return e===e?npt(t,e,n):ept(t,tpt,n)}var ipt=spt,opt=ipt;function rpt(t,e){var n=t==null?0:t.length;return!!n&&opt(t,e,0)>-1}var apt=rpt;function lpt(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 cpt=lpt;function upt(){}var dpt=upt,z3=GH,hpt=dpt,fpt=MS,ppt=1/0,mpt=z3&&1/fpt(new z3([,-0]))[1]==ppt?function(t){return new z3(t)}:hpt,gpt=mpt,vpt=_U,ypt=apt,bpt=cpt,_pt=wU,wpt=gpt,kpt=MS,Cpt=200;function xpt(t,e,n){var s=-1,i=ypt,o=t.length,r=!0,a=[],l=a;if(n)r=!1,i=bpt;else if(o>=Cpt){var c=e?null:wpt(t);if(c)return kpt(c);r=!1,i=_pt,l=new vpt}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 Spt=xpt,$pt=qft,Apt=Spt;function Ept(t,e){return t&&t.length?Apt(t,$pt(e)):[]}var Mpt=Ept;const Tpt=pi(Mpt),Ppt={name:"FeedFooter",mixins:[H2],components:{ReactedUsers:Hlt,FeedComments:Ilt,FeedTextComposer:mv,ChatIcon:eU,HeartIcon:B2},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=>{var e;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,(e=this.$refs.composer)==null||e.clearContent(),this.$notify.success(t.message),this.$nextTick(()=>{this.$emit("commented",t.comment),this.scrollCommentIntoView(t.comment.id)})}).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=Tpt(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)}},Ipt={ref:"feed_footer",class:"feed_footer"},Lpt={class:"fcom_feed_footer_actions"},Opt={class:"fcom_sr_only"},Dpt={class:"fcom_feed_footer_meta"},Rpt={key:0},Vpt={key:0,class:"fcom_reactions_count feed_reaction_meta"},Fpt={class:"feed_comment_count"},Npt={key:2,class:"feed_reaction_meta"},Bpt={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},zpt=["id"],Hpt={key:0,style:{padding:"0",margin:"0","text-align":"center"}},Upt={key:1,class:"feed_commenting"},jpt={class:"person_avatar"},Wpt=["src"],Ypt={key:2,class:""},qpt={style:{padding:"0",margin:"0","text-align":"center"}},Gpt={key:0,style:{margin:"10px 0"}},Xpt=["href"];function Kpt(t,e,n,s,i,o){var m,b,_,k;const r=Y("HeartIcon"),a=_e,l=Y("ChatIcon"),c=Y("ReactedUsers"),u=nn,d=Zt,h=Y("feed-comments"),f=qe,p=Y("feed-text-composer");return v(),E(te,null,[g("div",Ipt,[g("div",Lpt,[g("ul",null,[g("li",{class:q(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),onClick:e[0]||(e[0]=C=>o.toggleReact())},[y(a,{class:q({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(),E("li",{key:0,class:"fcom_comment_btn_wrap",onClick:e[1]||(e[1]=C=>o.showCommentForm())},[y(a,null,{default:w(()=>[y(l)]),_:1}),g("span",null,[g("span",Opt,$(t.$t("Comment")),1)])])):O("",!0)])]),g("div",Dpt,[n.feed.reactions_count||n.feed.comments_count||((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),E("ul",Rpt,[n.feed.reactions_count?(v(),E("li",Vpt,[y(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),E("li",{key:1,onClick:e[2]||(e[2]=(...C)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...C)),class:"feed_reaction_meta"},[g("div",Fpt,$(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((_=n.feed.meta)==null?void 0:_.comments_disabled)==="yes"?(v(),E("li",Npt,$(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,is_modal:n.is_modal},{before_comments_start:w(()=>[n.feed.comments_count>=2?(v(),E("div",Bpt,[y(d,{"aria-label":t.$t("Sort comments by"),onChange:e[3]||(e[3]=C=>o.changeCommentsSortBy()),modelValue:i.sortBy,"onUpdate:modelValue":e[4]||(e[4]=C=>i.sortBy=C),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","is_modal"]),i.commenting||n.is_single?(v(),E("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((k=n.feed.meta)==null?void 0:k.comments_disabled)==="yes"?(v(),E(te,{key:0},[n.feed.comments_count?(v(),E("p",Hpt,$(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),E("div",Upt,[g("div",jpt,[g("img",{alt:"",src:t.auth.photo},null,8,Wpt)]),i.showCommentBox?(v(),E("div",{key:0,onKeydown:e[6]||(e[6]=kt((...C)=>o.maybeSave&&o.maybeSave(...C),["enter"])),class:"feed_comment_input"},[y(p,{ref:"composer",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]=C=>o.postComment())},{default:w(()=>[W($(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(),E("div",Ypt,[g("p",qpt,[W($(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),E("div",Gpt,[y(f,{class:"fcom_primary_button",onClick:e[7]||(e[7]=()=>{t.$emit("joinSpace")})},{default:w(()=>[W($(t.$t("Join Space")),1)]),_:1})])):(v(),E("a",{key:1,href:t.getCurrentAuthUrl()},$(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,Xpt))])]))],8,zpt)):O("",!0)],64)}const Zpt=de(Ppt,[["render",Kpt]]),Jpt={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)}}},Qpt=["value","maxlength","placeholder"];function emt(t,e,n,s,i,o){return v(),E("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=kt(Oe(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,Qpt)}const tmt=de(Jpt,[["render",emt]]),nmt={name:"EyeIcon"},smt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function imt(t,e,n,s,i,o){return v(),E("svg",smt,[...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 omt=de(nmt,[["render",imt]]),rmt={name:"CalendarIcon"},amt={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lmt(t,e,n,s,i,o){return v(),E("svg",amt,[...e[0]||(e[0]=[Ia('<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 cmt=de(rmt,[["render",lmt]]),umt={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:xp,FeedTextComposer:mv,SingleLineTextarea:tmt,EyeIcon:omt,CalendarIcon:cmt},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:{...Vbe(BIe,["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:{...Fbe(aT,["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}const t=this.convertTo24Hour(this.scheduleForm.time);this.feed.scheduled_at=`${this.scheduleForm.date} ${t}: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 aT().createFeed(this.feedContext,t);if(s.scheduled_at||(this.$notify.success(s.message),this.$emit("added",s.feed),this.$nextTick(()=>{const i=document.getElementById("feed_id_"+s.feed.id);i&&(i.classList.add("fcom_highlight_glow"),setTimeout(()=>{i.classList.remove("fcom_highlight_glow")},4500))})),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)}},dmt={class:"person_avatar"},hmt=["alt","src"],fmt={class:"create_header_content"},pmt={key:0,class:"fcom_create_status_box_header"},mmt={class:"user_infos"},gmt={class:"feed_user_name"},vmt={class:"feed_meta_info"},ymt={key:1,class:"feed_timestamp"},bmt={class:"create_header_action"},_mt={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},wmt={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},kmt={key:0,class:"fcom_meta_text"},Cmt={class:"fcom_post_actions"},xmt={key:0,class:"fcom_post_space_name"},Smt={class:"target_label"},$mt={ref:"fcom_posting_space",style:{"margin-right":"10px"}},Amt={key:0,class:"fcom_space_title"},Emt={key:1},Mmt={class:"fcom_empty_spaces_dropdown"},Tmt={key:0,class:"fcom_composer_admin_actions"},Pmt={key:0},Imt={class:"dialog_header"},Lmt={class:"dialog_left schedule_header_left"},Omt={class:"dialog_body"},Dmt={class:"fcom_input_help"},Rmt={class:"dialog_footer"};function Vmt(t,e,n,s,i,o){const r=Y("EditPen"),a=_e,l=Y("CalendarIcon"),c=qe,u=Y("EyeIcon"),d=Y("Close"),h=Y("SingleLineTextarea"),f=nn,p=Zt,m=Y("SpaceIcon"),b=n2,_=Jt,k=Y("feed-text-composer"),C=Ud,x=tn,S=M8,M=cn,P=xs;return o.canPost?(v(),E("div",{key:0,class:q([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:q(["create_header",{state_active:o.isStateActive}])},[g("div",dmt,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,hmt)]),g("div",fmt,[o.isStateActive?O("",!0):(v(),E("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.makeActive&&o.makeActive(...T)),class:"form_placeholder"},$(o.currentPlaceHolder),1)),g("div",{class:q([{fcom_editor_with_title:i.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),E("div",pmt,[g("div",mmt,[g("div",gmt,$(o.getPostTitle),1),g("div",vmt,[!n.editing_feed.id&&o.showScheduleInfo?(v(),E("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(),E("span",ymt,$(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.siteDateTimeFormat)),1))])]),g("div",bmt,[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(k,{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(),E("div",_mt,[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),E(te,null,we(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:w(()=>[g("span",wmt,$(T.title),1),T.description?(v(),E("span",kmt,$(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(),E("div",Tmt,[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),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),E("span",Pmt,"("+$(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",Cmt,[n.space&&o.isStateActive?(v(),E("div",xmt,[g("span",null,"#"+$(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),E(te,{key:1},[g("span",Smt,$(t.$t("Posting in:")),1),g("span",$mt,[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",Mmt,$(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:w(()=>[(v(!0),E(te,null,we(i.postableSpaces,T=>(v(),D(b,{key:T.label,label:T.label},{default:w(()=>[(v(!0),E(te,null,we(T.spaces,I=>(v(),D(f,{key:I.slug,label:I.title,value:I.slug},{default:w(()=>[I.id?(v(),E("span",Amt,[y(m,{space_profile:I},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(I.title,30)),1)])):(v(),E("span",Emt,$(t.getExcerpt(I.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:q(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:w(()=>[W($(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",Imt,[g("div",Lmt,[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",Rmt,[y(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[W($(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),y(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[W($(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",Omt,[y(M,{"label-position":"top",class:"fcom_schedule_form"},{default:w(()=>[y(x,{label:t.$t("Date")},{default:w(()=>[y(C,{modelValue:i.scheduleForm.date,"onUpdate:modelValue":e[10]||(e[10]=T=>i.scheduleForm.date=T),type:"date","value-format":"YYYY-MM-DD",format:t.siteDateFormat,placeholder:t.$t("Select Date"),"disabled-date":o.isDateDisabled},null,8,["modelValue","format","placeholder","disabled-date"])]),_:1},8,["label"]),y(x,{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",format:t.siteTimeFormat,start:o.getStartTime,end:"23:59",placeholder:t.$t("Select Time")},null,8,["modelValue","disabled","format","start","placeholder"])]),_:1},8,["label"])]),_:1}),y(x,null,{default:w(()=>[g("p",Dmt,$(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const Fmt=de(umt,[["render",Vmt]]),Nmt={name:"EditFeed",components:{SpaceIcon:xp,CreateStatusForm:Fmt},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()}},Bmt={class:"fcom_feed_edit"},zmt={class:"fcom_feed_edit_dialog_header"},Hmt={key:0,class:"fcom_feed_edit_dialog_body"},Umt={key:0},jmt={key:0,style:{"margin-top":"5px"}},Wmt={class:"fcom_space_title"};function Ymt(t,e,n,s,i,o){const r=Y("Close"),a=_e,l=Jt,c=nn,u=Y("SpaceIcon"),d=Zt,h=Y("create-status-form"),f=Yt,p=xs,m=xt("loading");return v(),E("div",Bmt,[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[Re((v(),E("div",null,[g("div",zmt,[g("span",null,$(t.$t("Edit Feed")),1),y(a,{onClick:o.handleClose},{default:w(()=>[y(r)]),_:1},8,["onClick"])]),i.feed.id?(v(),E("div",Hmt,[!(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(),E("div",Umt,[y(l,{modelValue:i.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=k=>i.changeSpace=k),class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),i.changeSpace?(v(),E("div",jmt,[y(d,{modelValue:i.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=k=>i.newSpaceId=k),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),E(te,null,we(t.appVars.auth.spaces,k=>(v(),D(c,{disabled:i.feed.space_id==k.id,key:k.id,label:k.title,value:k.id},{default:w(()=>[g("span",Wmt,[y(u,{space_profile:k},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(k.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]=k=>i.makePublish=k),class:"fcom_checkbox"},{default:w(()=>[W($(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 PU=de(Nmt,[["render",Ymt]]),qmt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:sa,UserAvatar:j2},data(){return{voters:[],loading:!1,showVotersDialog:!0,cache:{},requestId: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 s;const t=(s=this.option)==null?void 0:s.slug;if(!t)return;const e=++this.requestId,n=this.cache[t];n&&(this.voters=n),this.loading=!n,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${t}`).then(({voters:i})=>{this.cache[t]=i,e===this.requestId&&(this.voters=i)}).catch(i=>{n||this.$handleError(i)}).finally(()=>{e===this.requestId&&(this.loading=!1)})}},mounted(){this.loadVoters()}},Gmt={class:"dialog_header"},Xmt={class:"fcom_filter_menu"},Kmt={class:"fcom_filter_menu_ul"},Zmt=["onClick"],Jmt={key:1},Qmt={class:"feed_meta_info survey_voters_meta"},egt={class:"meta_line"},tgt={class:"meta_line"},ngt={class:"voters_list"},sgt={class:"voter_avatar"},igt={class:"voter_info"},ogt=["title"],rgt={key:2,class:"not_found"};function agt(t,e,n,s,i,o){const r=Yt,a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Pi,u=xs;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",Gmt,[g("div",Xmt,[g("ul",Kmt,[(v(!0),E(te,null,we(n.options,h=>(v(),E("li",{key:h.slug},[g("a",{onClick:Oe(f=>o.switchOption(h.slug),["prevent"]),class:q({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},$(h.label),11,Zmt)]))),128))])])])]),default:w(()=>[i.loading?(v(),D(r,{key:0,animated:"",rows:4})):i.voters.length?(v(),E("div",Jmt,[g("div",Qmt,[g("span",egt,$(o.getVotePercentage),1),g("span",tgt,$(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),y(c,{"max-height":"800px"},{default:w(()=>[g("div",ngt,[(v(!0),E(te,null,we(i.voters,d=>(v(),E("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),E(te,{key:0},[g("div",sgt,[y(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",igt,[y(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),E("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},$(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,ogt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),E("div",rgt,[g("p",null,$(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const lgt=de(qmt,[["render",agt]]),cgt={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:lgt},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()}},ugt={class:"fcom_app_options"},dgt=["onClick"],hgt={class:"fcom_app_text"},fgt={class:"fcom_app_input_wrap"},pgt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},mgt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},ggt=["onClick"],vgt={key:0},ygt={class:"feed_meta_info"},bgt={key:0,class:"meta_line"},_gt=["title"],wgt=["title"];function kgt(t,e,n,s,i,o){const r=Y("ArrowRight"),a=_e,l=Y("SurveyVoters");return v(),E(te,null,[g("div",{class:q(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",ugt,[(v(!0),E(te,null,we(i.formattedOptions,(c,u)=>(v(),E("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:q([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",hgt,[g("span",fgt,[g("span",{class:q("fcom_input_"+i.inputType)},[i.inputType=="single_choice"?(v(),E("svg",pgt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),E("svg",mgt,[...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)},[W($(c.vote_counts?Math.floor(c.vote_counts/i.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),E("span",vgt,"("+$(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,ggt),i.totalCount?(v(),E("span",{key:0,style:Xe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,dgt))),128))]),g("div",ygt,[i.totalCount?(v(),E("span",bgt,$(t.$_n("%d vote","%d votes",i.totalCount)),1)):O("",!0),i.endingDate?(v(),E(te,{key:1},[o.isEnded?(v(),E("span",{key:0,title:t.$t("Ended at: %s",i.endingDate),class:"meta_line"},$(o.endedDateLabel),9,_gt)):(v(),E("span",{key:1,title:t.$t("Will end at: %s",i.endingDate),class:"meta_line"},$(o.endingDateLabel),9,wgt))],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 IU=de(cgt,[["render",kgt]]),Cgt={name:"BookmarkIcon",props:["is_active"]},xgt={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"},Sgt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $gt(t,e,n,s,i,o){return n.is_active?(v(),E("svg",xgt,[...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(),E("svg",Sgt,[...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 Agt=de(Cgt,[["render",$gt]]),Egt={name:"RenderChildPost",components:{ImageCarousel:$S,SurveyRenderer:IU,DocumentLists:pv,UserRouteLink:sa,MediaPreview:Ap,FeedMdContent:gv},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()}},Mgt=["id"],Tgt={key:0,class:"fcom_top_media"},Pgt={class:"fcom_feed_header_wrap"},Igt={class:"feed_header"},Lgt={key:0,class:"feed_user"},Ogt={class:"feed_user_name"},Dgt={class:"feed_meta_info"},Rgt={key:0,class:"meta_line"},Vgt=["title","href"],Fgt={key:1,class:"feed_timestamp"},Ngt={key:0,class:"feed_title"},Bgt={class:"feed_title_heading"},zgt={key:1,class:"expand-button"};function Hgt(t,e,n,s,i,o){var p,m,b,_,k,C,x,S,M,P,T;const r=Y("media-preview"),a=Y("UserAvatar"),l=Y("UserRouteLink"),c=Y("FeedMdContent"),u=qe,d=Y("DocumentLists"),h=Y("SurveyRenderer"),f=Y("ImageCarousel");return i.feed?(v(),E("div",{key:0,onClick:e[0]||(e[0]=(...I)=>o.handleFeedClick&&o.handleFeedClick(...I)),class:"fcom_child_feed"},[g("div",{id:"feed_id_"+i.feed.id,class:q([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),E("div",Tgt,[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",Pgt,[g("div",Igt,[i.feed.xprofile?(v(),E("div",Lgt,[y(a,{with_level:!1,xprofile:i.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",Ogt,[y(l,{show_badge:!0,xprofile:i.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",Dgt,[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(),E("span",Rgt,$(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,Vgt),!i.in_space&&i.feed.space?(v(),E("span",Fgt,$(t.$t("Posted in %s",t.getExcerpt(i.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:q([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[i.feed.title?(v(),E("div",Ngt,[g("h2",Bgt,$(i.feed.title),1)])):O("",!0),y(c,{class_name:"feed_texts",content:i.feed.message_rendered},null,8,["content"]),i.hasOverflowContent?(v(),E("div",zgt,[y(u,{class:"btn_expand"},{default:w(()=>[W($(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),i.feed.content_type=="document"?(v(),D(d,{key:1,document_lists:((C=(k=i.feed)==null?void 0:k.meta)==null?void 0:C.document_lists)||[]},null,8,["document_lists"])):(v(),E(te,{key:2},[i.feed.content_type=="survey"&&((P=(M=(S=(x=i.feed)==null?void 0:x.meta)==null?void 0:S.survey_config)==null?void 0:M.options)!=null&&P.length)?(v(),D(h,{key:0,feed:i.feed,isChildFeed:!0},null,8,["feed"])):O("",!0),i.feed.meta?(v(),E(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||(T=i.feed.meta.audio_medias)!=null&&T.length)?(v(),D(r,{key:1,feed:i.feed},null,8,["feed"])):O("",!0)],64)):O("",!0)],64))],10,Mgt)])):O("",!0)}const Ugt=de(Egt,[["render",Hgt]]),jgt={name:"CustomAppMeta",components:{RenderChildPost:Ugt},props:{feed:{type:Object,required:!0}}},Wgt={ref:"fcom_custom_app"},Ygt={key:0},qgt=["innerHTML"];function Ggt(t,e,n,s,i,o){const r=Y("RenderChildPost");return v(),E("div",Wgt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),E("div",Ygt,[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(),E("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,qgt)):O("",!0)],512)}const Xgt=de(jgt,[["render",Ggt]]),Kgt={name:"FeedAction",components:{EditFeed:PU},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("fcom_highlight_glow"),setTimeout(()=>{e.classList.remove("fcom_highlight_glow")},4500))},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(()=>{}))}}},Zgt={class:"actions_items"},Jgt={key:0},Qgt={key:1},e1t={key:0},t1t={key:1},n1t={key:0},s1t={key:1};function i1t(t,e,n,s,i,o){var d,h;const r=Y("MoreFilled"),a=_e,l=qe,c=jo,u=Y("EditFeed");return v(),E(te,null,[y(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav"},{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",Zgt,[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(),E("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},$(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),E(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(),E(te,{key:0},[g("li",{onClick:e[3]||(e[3]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),E("span",Jgt,$(t.$t("Unpin from Top")),1)):(v(),E("span",Qgt,$(t.$t("Pin to top")),1))]),g("li",{onClick:e[4]||(e[4]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),E("span",t1t,$(t.$t("Unpin from sidebar")),1)):(v(),E("span",e1t,$(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),E("li",{key:1,onClick:e[5]||(e[5]=m=>o.removePreview())},$(t.$t("Remove Preview")),1)):O("",!0),t.hasSpaceAdminAccess(n.feed.space)?(v(),E("li",{key:2,onClick:e[6]||(e[6]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),E("span",n1t,$(t.$t("Enable comments")),1)):(v(),E("span",s1t,$(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),E("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 o1t=de(Kgt,[["render",i1t]]),r1t={name:"Feed",components:{DocumentLists:pv,CustomAppMeta:Xgt,BookmarkIcon:Agt,StickyIcon:aU,UserRouteLink:sa,EditFeed:PU,FeedFooter:Zpt,MediaPreview:Ap,ImageCarousel:$S,SurveyRenderer:IU,ReportReview:rU,FeedAction:o1t,FeedMdContent:gv},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&&(this.feed.status=="pending"||((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},parsedMessage(){return this.parseMessage(this.feed.message_rendered)}},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.$t("%1$s at %2$s",this.formattedDate(t),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},expandInline(){this.hasOverflowContent=!1,this.isExpanded=!0},showFullContent(t){if(!this.hasFeature("show_post_modal")){this.expandInline();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(this.siteDateTimeFormat)+" ("+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})},onModReport(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)))}},created(){this.$eventBus.on("updateModerationReport",this.onModReport)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.onModReport)},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)}},a1t=["id"],l1t={key:1,class:"fcom_top_media"},c1t={key:2,class:"fcom_feed_header_wrap"},u1t={class:"feed_actions fcom_concat_buttons"},d1t={key:0,class:"fcom_feed_topics"},h1t={class:"feed_header"},f1t={key:0,class:"feed_user"},p1t={class:"feed_user_info"},m1t={class:"feed_user_name"},g1t={key:0,class:"feed_status"},v1t={key:1,class:"feed_status"},y1t={class:"feed_meta_info"},b1t={key:0,class:"meta_line"},_1t=["title","href"],w1t=["title","href"],k1t={key:3},C1t={key:0,class:"feed_title"},x1t={key:0,class:"feed_title_heading"},S1t=["href"],$1t={key:1,class:"feed_title_heading"};function A1t(t,e,n,s,i,o){var T,I,L,V,R,N,F,B,z,G,K,X,H,Q,ne;const r=Y("report-review"),a=Y("media-preview"),l=qe,c=Y("StickyIcon"),u=_e,d=Y("BookmarkIcon"),h=Y("FeedAction"),f=Y("router-link"),p=Y("UserAvatar"),m=Y("UserRouteLink"),b=Ai,_=Y("FeedMdContent"),k=Y("SurveyRenderer"),C=Y("ImageCarousel"),x=Y("DocumentLists"),S=Y("CustomAppMeta"),M=Y("feed-footer"),P=xt("loading");return Re((v(),E("div",{id:"feed_id_"+((T=n.feed)==null?void 0:T.id),class:q([o.feedClasses,"feed"])},[o.showReport?(v(),D(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),E("div",l1t,[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(),E("div",c1t,[g("div",u1t,[t.auth.user_id&&!t.hasSpaceAccess((I=n.feed.space)==null?void 0:I.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]=Z=>o.joinSpace())},{default:w(()=>[W($(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),E(te,{key:1},[n.feed.is_sticky&&i.in_space?(v(),D(l,{key:0,onClick:e[1]||(e[1]=Z=>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]=Z=>o.toggleBookmark()),class:q([{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(),E("li",{key:0,onClick:e[3]||(e[3]=Z=>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")]),((L=t.appVars.topicsConfig)==null?void 0:L.show_on_post_card)=="yes"&&n.feed.terms&&n.feed.terms.length?(v(),E("div",d1t,[(v(!0),E(te,null,we(n.feed.terms,Z=>(v(),D(f,{onClick:Oe(ae=>o.gotoTopicUrl(Z.slug),["prevent"]),key:Z.slug,to:o.getTopicRoute(Z.slug),class:"feed_timestamp"},{default:w(()=>[W("#"+$(Z.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",h1t,[n.feed.xprofile?(v(),E("div",f1t,[y(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",p1t,[g("div",m1t,[y(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),E("span",g1t,[y(b,{type:"warning"},{default:w(()=>[W($(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),E("span",v1t,[y(b,{type:"warning"},{default:w(()=>[W($(t.$t("Scheduled")),1)]),_:1})])):O("",!0)]),g("div",y1t,[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(),E("span",b1t,$(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),E("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},$(o.getScheduledTime(n.feed.scheduled_at)),9,_1t)):(v(),E("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},$(t.humanDateDiff(n.feed.created_at)),9,w1t)),!i.in_space&&n.feed.space?(v(),E("span",k1t,[y(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[W($(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:q([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),E("div",C1t,[n.is_single?(v(),E("h2",$1t,$(n.feed.title),1)):(v(),E("h2",x1t,[g("a",{onClick:e[6]||(e[6]=Oe((...Z)=>o.showFullContent&&o.showFullContent(...Z),["prevent"])),href:n.feed.permalink},$(n.feed.title),9,S1t)]))])):O("",!0),y(_,{class_name:"feed_texts",content:o.parsedMessage},null,8,["content"]),i.hasOverflowContent&&!i.isExpanded?(v(),E("div",{key:1,onClick:e[7]||(e[7]=Z=>o.expandInline()),class:"expand-button"},[y(l,{class:"btn_expand"},{default:w(()=>[W($(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((K=(G=(z=(B=n.feed)==null?void 0:B.meta)==null?void 0:z.survey_config)==null?void 0:G.options)!=null&&K.length)?(v(),E(te,{key:3},[y(k,{feed:n.feed,is_preview:n.is_preview,hasTopMedia:o.hasTopMedia},null,8,["feed","is_preview","hasTopMedia"]),n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(X=n.feed.meta.audio_medias)!=null&&X.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),D(x,{key:4,document_lists:((Q=(H=n.feed)==null?void 0:H.meta)==null?void 0:Q.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),E(te,{key:5},[n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(ne=n.feed.meta.audio_medias)!=null&&ne.length)?(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(M,{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]=Z=>{t.$emit("commented",Z)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),le(t.$slots,"after_feed_footer")],10,a1t)),[[P,i.working]])}const E1t=de(r1t,[["render",A1t]]),M1t={name:"ReportDetails",components:{Feed:E1t,SingleComent:U2,Pagination:au},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()}},T1t={class:"dialog_header report_details_header"},P1t={class:"report_details_header_left"},I1t={class:"report_details_header_right"},L1t=["href"],O1t=["href"],D1t=["href"],R1t=["href"],V1t={class:"meta_line"},F1t=["href","title"],N1t={key:0,class:"dialog_body"},B1t={class:"fcom_filter_menu"},z1t={class:"fcom_filter_menu_ul"},H1t={key:0,class:"report_details"},U1t={key:1,class:"report_details"},j1t={class:"report_details_header"},W1t={class:"report_details_header_left"},Y1t={class:"report_details_header_right"},q1t={key:0},G1t={key:1},X1t={key:1},K1t={class:"report_reason"},Z1t=["title"],J1t={key:0,class:"report_details_body"},Q1t=["textContent"],evt={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},tvt={class:"dialog_footer report_footer"};function nvt(t,e,n,s,i,o){const r=Y("UserAvatar"),a=Y("UserRouteLink"),l=Y("SingleComent"),c=Y("Feed"),u=Yt,d=Y("Pagination"),h=qe,f=xs;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,_,k,C,x,S,M,P,T,I,L;return[g("div",T1t,[g("div",P1t,[y(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",I1t,[g("div",null,[y(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),E("a",{key:0,href:o.getPermalink(n.report)},$(t.$t("commented ")),9,L1t)):(v(),E("a",{key:1,href:o.getPermalink(n.report)},$(t.$t("posted ")),9,O1t)),g("span",null,$(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),E("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)||((x=(C=(k=n.report)==null?void 0:k.post)==null?void 0:C.space)==null?void 0:x.title)),9,D1t)):(v(),E("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(P=(M=(S=n.report)==null?void 0:S.post)==null?void 0:M.space)==null?void 0:P.slug})},$((L=(I=(T=n.report)==null?void 0:T.post)==null?void 0:I.space)==null?void 0:L.title),9,R1t))]),g("div",V1t,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},$(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,F1t)])])])]}),footer:w(()=>[g("div",tvt,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[W($(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(()=>[W($(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(()=>[W($(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),E("div",N1t,[g("div",B1t,[g("ul",z1t,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Oe(p=>o.switchOption("details"),["prevent"])),class:q({"router-link-exact-active":i.currentTab=="details"}),href:"#"},$(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Oe(p=>o.switchOption("reports"),["prevent"])),class:q({"router-link-exact-active":i.currentTab=="reports"}),href:"#"},$(t.$t("Reports")+" "+n.report.reports_count),3)])])]),i.currentTab=="details"?(v(),E("div",H1t,[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(),E("div",U1t,[i.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),E(te,{key:0},we(i.postReports,p=>(v(),E("div",{key:p.id,class:"report_details_item"},[g("div",j1t,[g("div",W1t,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",Y1t,[!p.reporter&&!o.getReason(p.reason)?(v(),E("div",q1t,$(t.$t("Flagged automatically by the site rule")),1)):(v(),E("div",G1t,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),E("span",X1t,$(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),E(te,{key:2},[g("span",null,$(t.$t("reported for ")),1),g("span",K1t,$(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},$(t.humanDateDiff(p.created_at)),9,Z1t)])]),p.explanation?(v(),E("div",J1t,[g("div",{textContent:$(p.explanation)},null,8,Q1t)])):O("",!0)]))),128)),i.pagination.total?(v(),E("div",evt,[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 svt=de(M1t,[["render",nvt]]),ivt={name:"ModerationConfig",components:{Drawer:jd},props:{is_open:{type:Boolean,required:!0},moderation_config:{type:Object,required:!0},saving:{type:Boolean,default:!1}},data(){const t=JSON.parse(JSON.stringify(this.moderation_config||{}));return Array.isArray(t.flag_all_new_posts_spaces)||(t.flag_all_new_posts_spaces=[]),{showConfig:this.is_open,config:t,isDirty:!1,dirtyReady:!1}},watch:{is_open(t){this.showConfig=t},showConfig(t){t||(this.isDirty=!1,this.$emit("closeConfig"))},config:{deep:!0,handler(){this.dirtyReady&&(this.isDirty=!0)}}},methods:{saveConfig(){this.$emit("saveConfig",this.config)},handleCancel(){if(!this.isDirty){this.showConfig=!1;return}this.$confirm(this.$t("You have unsaved changes. Are you sure you want to close this?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showConfig=!1}).catch(()=>{})}},mounted(){this.$nextTick(()=>{this.dirtyReady=!0})}},ovt={class:"fcom_moderation_settings"},rvt={class:"fcom_moderation_section"},avt={class:"fcom_input_wrap"},lvt={class:"fcom_moderation_section"},cvt={class:"fcom_moderation_section_head"},uvt={class:"help_text"},dvt={class:"fcom_moderation_section"},hvt={class:"fcom_moderation_section_head"},fvt={class:"fcom_inline_field"},pvt={class:"fcom_inline_row"},mvt={class:"fcom_inline_field"},gvt={class:"fcom_inline_row"},vvt={class:"fcom_inline_field"},yvt={class:"fcom_inline_row"},bvt={class:"fcom_moderation_section"},_vt={class:"fcom_moderation_section_head"},wvt={class:"fcom_input_wrap"},kvt={class:"fcom_input_wrap"},Cvt={class:"fcom_input_wrap"},xvt={class:"help_text"},Svt={class:"fcom_moderation_footer"};function $vt(t,e,n,s,i,o){const r=Y("InfoFilled"),a=_e,l=Ls,c=Jt,u=vt,d=tn,h=o2,f=El,p=nn,m=Zt,b=cn,_=qe,k=Y("Drawer");return v(),D(k,{modelValue:i.showConfig,"onUpdate:modelValue":e[14]||(e[14]=C=>i.showConfig=C),size:t.dialogWidth,title:t.$t("Moderation 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_moderation_settings",id:"fluent_comminity_body"},{footer:w(()=>[g("div",Svt,[y(_,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[W($(t.$t("Cancel")),1)]),_:1},8,["onClick"]),y(_,{class:"fcom_primary_button",loading:n.saving,disabled:n.saving,onClick:o.saveConfig},{default:w(()=>[W($(t.$t("Update")),1)]),_:1},8,["loading","disabled","onClick"])])]),default:w(()=>[g("div",ovt,[y(b,{onSubmit:e[13]||(e[13]=Oe(C=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[g("div",rvt,[g("div",avt,[y(c,{modelValue:i.config.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=C=>i.config.is_enabled=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Enable Content Moderation"))+" ",1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("When enabled, reported and pending content will appear here for review.")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",onClick:e[0]||(e[0]=Oe(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("When enabled, reported and pending content will appear here for review.")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])])]),i.config.is_enabled=="yes"?(v(),E(te,{key:0},[g("div",lvt,[g("div",cvt,[g("h4",null,$(t.$t("Content Filtering")),1),g("p",null,$(t.$t("Add the blocked words that you want to use for content filtering.")),1)]),y(d,{label:t.$t("Profanity Filter")},{default:w(()=>[y(u,{modelValue:i.config.profanity_filter,"onUpdate:modelValue":e[2]||(e[2]=C=>i.config.profanity_filter=C),placeholder:t.$t("bad, words, here")},null,8,["modelValue","placeholder"]),g("span",uvt,$(t.$t("Use comma-separated words. If these words found then the content will go in review state.")),1)]),_:1},8,["label"])]),g("div",dvt,[g("div",hvt,[g("h4",null,$(t.$t("Automatic Moderation")),1),g("p",null,$(t.$t("Automatically act on content and members once a threshold is reached.")),1)]),g("div",fvt,[g("div",pvt,[g("span",null,$(t.$t("1. Flag a post or comment after it's reported")),1),y(h,{modelValue:i.config.flag_after_threshold,"onUpdate:modelValue":e[3]||(e[3]=C=>i.config.flag_after_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Flag a post or comment after it's reported X times")},null,8,["modelValue","aria-label"]),g("span",null,$(t.$t("times")),1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",mvt,[g("div",gvt,[g("span",null,$(t.$t("2. Moderate a member after")),1),y(h,{modelValue:i.config.auto_flag_user_reject_threshold,"onUpdate:modelValue":e[4]||(e[4]=C=>i.config.auto_flag_user_reject_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are rejected")},null,8,["modelValue","aria-label"]),g("span",null,$(t.$t("of their posts or comments are rejected")),1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",vvt,[g("div",yvt,[g("span",null,$(t.$t("3. Moderate a member after")),1),y(h,{modelValue:i.config.auto_flag_user_report_threshold,"onUpdate:modelValue":e[5]||(e[5]=C=>i.config.auto_flag_user_report_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are reported")},null,8,["modelValue","aria-label"]),g("span",null,$(t.$t("of their posts or comments are reported")),1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),y(f,{class:"fcom_moderation_note",type:"primary",title:t.$t("Note: Keep 0 to disable a rule."),closable:!1},null,8,["title"])]),g("div",bvt,[g("div",_vt,[g("h4",null,$(t.$t("New Content Approval")),1),g("p",null,$(t.$t("Require approval before new posts or comments become visible.")),1)]),g("div",wvt,[y(c,{modelValue:i.config.flag_all_new_posts,"onUpdate:modelValue":e[7]||(e[7]=C=>i.config.flag_all_new_posts=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Mark all new posts as Pending"))+" ",1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",onClick:e[6]||(e[6]=Oe(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",kvt,[y(c,{modelValue:i.config.first_post_approval,"onUpdate:modelValue":e[9]||(e[9]=C=>i.config.first_post_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Require approval for first post"))+" ",1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_POST_APPROVAL_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",onClick:e[8]||(e[8]=Oe(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_POST_APPROVAL_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",Cvt,[y(c,{modelValue:i.config.first_comment_approval,"onUpdate:modelValue":e[11]||(e[11]=C=>i.config.first_comment_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Require approval for first comment"))+" ",1),y(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:w(()=>[y(a,{class:"fcom_label_tooltip",onClick:e[10]||(e[10]=Oe(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:w(()=>[y(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),y(d,{label:t.$t("Mark all new posts as Pending in the given spaces")},{default:w(()=>[y(m,{modelValue:i.config.flag_all_new_posts_spaces,"onUpdate:modelValue":e[12]||(e[12]=C=>i.config.flag_all_new_posts_spaces=C),placeholder:t.$t("Select Spaces"),filterable:"",clearable:"",multiple:""},{default:w(()=>[(v(!0),E(te,null,we(t.appVars.auth.spaces,C=>(v(),D(p,{key:C.id,label:C.title,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),g("span",xvt,$(t.$t("__FLAG_ALL_NEW_POSTS_SPACES_DESC")),1)]),_:1},8,["label"])])],64)):O("",!0)]),_:1})])]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])}const Avt=de(ivt,[["render",$vt]]),Evt={name:"Moderation",components:{Layout:mi,AppLayout:gi,Pagination:au,ReportDetails:svt,ModerationConfigDrawer:Avt},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"))}},Mvt=["href"],Tvt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},Pvt={key:0,class:"card_header"},Ivt={role:"region","aria-label":"Member Navigation",class:"member_status"},Lvt={key:1,class:q("fcom_dir_layout fcom_dir_layout_classic")},Ovt={key:0,class:"loading"},Dvt={key:1,class:"fcom_moderation_table"},Rvt={class:"moderation_table"},Vvt={class:"moderation_table_header"},Fvt={style:{"min-width":"100px"}},Nvt={class:"moderation_table_body"},Bvt=["onClick"],zvt={key:0,class:"user_avatar moderation_avatar"},Hvt={class:"feed_user_name"},Uvt={key:1},jvt={key:2,class:"no_reports"},Wvt={key:3,role:"region","aria-label":"Pagination",class:"pagination_wrap"},Yvt={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},qvt={style:{"text-align":"center"}},Gvt={style:{"font-size":"18px","margin-bottom":"10px"}},Xvt={class:"promo_description"},Kvt={key:1,class:"setting_body",style:{"text-align":"center"}},Zvt={class:"promo_description"},Jvt=["href"];function Qvt(t,e,n,s,i,o){const r=Y("Operation"),a=_e,l=qe,c=mp,u=Os,d=Yt,h=Y("UserAvatar"),f=Y("UserRouteLink"),p=Y("MoreFilled"),m=Da,b=Ra,_=Oa,k=Y("Pagination"),C=Y("layout"),x=Y("app-layout"),S=Y("report-details"),M=Y("moderation-config-drawer");return v(),E(te,null,[y(x,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:w(()=>[y(C,{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(),E("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Mvt))]),default:w(()=>[g("div",Tvt,[t.has_pro?(v(),E(te,{key:0},[i.moderationConfig.is_enabled=="yes"?(v(),E("div",Pvt,[g("div",Ivt,[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(()=>[W($(t.$t("Pending")),1)]),_:1}),y(c,{value:"flagged"},{default:w(()=>[W($(t.$t("Flagged")),1)]),_:1}),y(c,{value:"ignored"},{default:w(()=>[W($(t.$t("Dismissed")),1)]),_:1}),y(c,{value:"unpublished"},{default:w(()=>[W($(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])])])):O("",!0),i.moderationConfig.is_enabled=="yes"?(v(),E("div",Lvt,[i.loading?(v(),E("div",Ovt,[y(d,{class:"white_loaded",rows:3,animated:!0})])):i.reports.length?(v(),E("div",Dvt,[g("table",Rvt,[g("thead",Vvt,[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",Fvt,$(t.$t("Date")),1),g("th",null,$(t.$t("Reports")),1)])]),g("tbody",Nvt,[(v(!0),E(te,null,we(i.reports,P=>{var T,I;return v(),E("tr",{key:P.id},[g("td",{onClick:L=>o.openReportDetails(P),class:"report_reason"},$(o.getTitle(P)),9,Bvt),g("td",null,$(P.content_type),1),g("td",null,[P.reporter?(v(),E("div",zvt,[y(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",Hvt,[y(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),E("div",Uvt,$((I=P.meta)==null?void 0:I.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:L=>o.openReportDetails(P)},{default:w(()=>[W($(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:L=>o.confirmAndIgnoreReport(P)},{default:w(()=>[W($(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:L=>o.confirmAndUnpublishReport(P)},{default:w(()=>[W($(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:L=>o.deleteReport(P)},{default:w(()=>[W($(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(),E("div",jvt,$(t.$t("No reports to review")),1)),i.pagination.total?(v(),E("div",Wvt,[y(k,{hide_on_single:!0,onFetch:e[3]||(e[3]=P=>o.getReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])):(v(),E("div",Yvt,[g("div",qvt,[g("h3",Gvt,$(t.$t("Content Moderation is disabled")),1),g("p",Xvt,$(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(()=>[W($(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),E("div",Kvt,[g("p",Zvt,$(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,Jvt)]))])]),_: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(M,{key:1,is_open:i.showConfig,moderation_config:i.moderationConfig,saving:i.saving,onCloseConfig:e[6]||(e[6]=P=>i.showConfig=!1),onSaveConfig:o.saveConfig},null,8,["is_open","moderation_config","saving","onSaveConfig"])):O("",!0)],64)}const e0t=de(Evt,[["render",Qvt]]),t0t={name:"Tools",components:{Layout:mi,AppLayout:gi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},n0t=["href"],s0t={class:"settings_router"},i0t={class:"fhr_content_layout_body"},o0t={class:"setting_header"},r0t={key:0,class:"setting_body tools_body"},a0t={key:0,class:"sitemap_configured"},l0t={class:"sitemap_header"},c0t={class:"sitemap_body"},u0t=["href"],d0t={key:1,class:"setting_body",style:{"text-align":"center"}},h0t={class:"promo_description"},f0t=["href"];function p0t(t,e,n,s,i,o){const r=_e,a=El,l=Y("layout"),c=Y("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(),E("a",{key:0,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,n0t))]),default:w(()=>[g("div",s0t,[g("div",i0t,[g("div",o0t,[g("h2",null,$(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),E("div",r0t,[o.isPublicPortal?(v(),E("div",a0t,[g("div",l0t,[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",c0t,[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,u0t)])])])):(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(),E("div",d0t,[g("p",h0t,$(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,f0t)]))])])]),_:1},8,["title"])]),_:1})}const m0t=de(t0t,[["render",p0t]]),g0t={name:"PrivacySettings",components:{Layout:mi,AppLayout:gi},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"))}},v0t={class:"settings_router"},y0t={key:0,class:"white_loaded"},b0t={key:1,class:"fhr_content_layout_body"},_0t={class:"setting_body"},w0t={class:"fcom_help_text fcom_mt_10"},k0t={class:"fcom_help_text fcom_mt_10"},C0t={class:"fcom_help_text fcom_mt_10"},x0t={class:"fcom_help_text fcom_mt_10"},S0t={class:"fcom_input_wrap"},$0t={key:0},A0t={class:"fcom_input_wrap"},E0t={key:0},M0t={class:"fcom_input_wrap"},T0t={class:"fcom_input_wrap"},P0t={key:0},I0t={class:"fcom_input_wrap"},L0t={class:"fcom_input_wrap"},O0t={class:"fcom_input_wrap"},D0t={class:"fcom_input_wrap"},R0t={style:{"margin-top":"50px"},class:"fcom_input_wrap"},V0t={key:2};function F0t(t,e,n,s,i,o){const r=qe,a=Yt,l=qV,c=Zi,u=Os,d=tn,h=Jt,f=cn,p=Y("layout"),m=Y("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(()=>[Re((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",v0t,[i.loading?(v(),E("div",y0t,[y(a,{rows:5,animated:!0})])):i.settings?(v(),E("div",b0t,[g("div",_0t,[g("p",null,$(t.$t("Customize the privacy and compliance settings as per your needs.")),1),y(l),y(f,{onSubmit:e[12]||(e[12]=Oe(_=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[13]||(e[13]=_=>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(()=>[W($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[W($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[W($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",w0t,[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(()=>[W($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[W($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[W($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",k0t,[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(()=>[W($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[W($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[W($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",C0t,[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(()=>[W($(t.$t("Everybody")),1)]),_:1}),y(c,{border:"",value:"logged_in"},{default:w(()=>[W($(t.$t("Only logged-in members")),1)]),_:1}),y(c,{border:"",value:"admin_only"},{default:w(()=>[W($(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",x0t,[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",S0t,[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(()=>[W($(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),E("span",$0t,"("+$(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",A0t,[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(()=>[W($(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),E("span",E0t,"("+$(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",M0t,[y(h,{modelValue:i.settings.can_change_password,"onUpdate:modelValue":e[6]||(e[6]=_=>i.settings.can_change_password=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Allow users to change their password from profile")),1)]),_:1},8,["modelValue"]),g("p",null,$(t.$t("When enabled, members can change their password from their profile settings. Disable this if you enforce a strong password policy elsewhere.")),1)]),g("div",T0t,[y(h,{modelValue:i.settings.email_auto_login,"onUpdate:modelValue":e[7]||(e[7]=_=>i.settings.email_auto_login=_),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(t.$t("Automatically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),t.has_pro?O("",!0):(v(),E("span",P0t,"("+$(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",I0t,[y(h,{modelValue:i.settings.enable_gravatar,"onUpdate:modelValue":e[8]||(e[8]=_=>i.settings.enable_gravatar=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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",L0t,[y(h,{modelValue:i.settings.enable_user_sync,"onUpdate:modelValue":e[9]||(e[9]=_=>i.settings.enable_user_sync=_),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[W($(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",O0t,[y(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_last_activity,"onUpdate:modelValue":e[10]||(e[10]=_=>i.settings.show_last_activity=_),class:"fcom_checkbox"},{default:w(()=>[W($(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",D0t,[y(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.can_deactive_account,"onUpdate:modelValue":e[11]||(e[11]=_=>i.settings.can_deactive_account=_),class:"fcom_checkbox"},{default:w(()=>[W($(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",R0t,[Re((v(),D(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])])]),_:1},8,["modelValue"])])])):(v(),E("div",V0t,[g("p",null,$(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const N0t=de(g0t,[["render",F0t]]),B0t={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function z0t(t,e,n,s,i,o){const r=Y("router-view");return v(),D(r)}const H0t=de(B0t,[["render",z0t]]),U0t={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:Jc,SlugInput:Wd,ErrorAlerts:J1},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(this.$t("Group title cannot be empty.")),!this.form.id)if(!this.form.slug||!this.form.slug.trim())this.errors.push(this.$t("Slug cannot be empty."));else{const t=Q1("/"+this.form.slug);t.valid||t.errors.forEach(e=>{this.errors.push(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})}},j0t={key:0},W0t={key:1};function Y0t(t,e,n,s,i,o){const r=vt,a=tn,l=Y("slug-input"),c=Jt,u=Y("error-alerts"),d=qe,h=cn;return v(),D(h,{onSubmit:e[5]||(e[5]=Oe(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(()=>[W($(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(),E("span",j0t,$(t.$t("Update Info")),1)):(v(),E("span",W0t,$(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const q0t=de(U0t,[["render",Y0t]]),G0t={name:"MoveGroupPopup",components:{ActionPopover:Pl},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})}}},X0t={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function K0t(t,e,n,s,i,o){const r=nn,a=Zt,l=tn,c=qe,u=cn,d=Y("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",X0t,$(t.$t("Move")),1)]),default:w(({hide:f})=>[y(u,{onSubmit:e[1]||(e[1]=Oe(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),E(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"]),Re((v(),D(c,{disabled:!i.selectedGroupId||i.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:w(()=>[W($(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,i.working]])]),_:2},1024)]),_:1})}const Z0t=de(G0t,[["render",K0t]]),J0t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:uU},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()}},Q0t={key:0,class:"fcom_lockscreen_meta"},eyt={class:"fcom_description"},tyt={class:"white_loaded"};function nyt(t,e,n,s,i,o){const r=Y("lock-screen-editor"),a=Yt,l=La;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(),E("div",Q0t,[g("div",eyt,[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",tyt,[y(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const syt=de(J0t,[["render",nyt]]),iyt={name:"SpaceCustomizer",props:["space_profile"],emits:["close","completed"],components:{SpaceLockscreen:syt,CreateSpaceForm:N8,ManageSpaceLinks:hU,ManagePaywalls:fU},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})}},oyt={key:0,class:"fcom_full_editor"},ryt={class:"fcom_full_editor_header fcom_space_settings_nav"},ayt={class:"fcom_editor_menu object_menu"},lyt={class:"fcom_space_menu_ul"},cyt={class:"full_editor_actions"},uyt={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function dyt(t,e,n,s,i,o){const r=Y("ArrowLeft"),a=_e,l=qe,c=W1,u=Y("create-space-form"),d=Pi,h=La,f=Y("space-lockscreen"),p=Y("manage-space-links"),m=Y("manage-paywalls"),b=U1;return n.space_profile?(v(),E("div",oyt,[y(b,null,{default:w(()=>[y(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var _;return[g("div",ryt,[g("div",{onClick:e[0]||(e[0]=k=>t.$emit("completed")),class:"fcom_back_header"},[y(a,null,{default:w(()=>[y(r)]),_:1}),W(" "+$(n.space_profile.title),1)]),g("div",ayt,[g("ul",lyt,[g("li",{onClick:e[1]||(e[1]=k=>i.currentTab="general")},[g("a",{class:q({"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:q({"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(),E("li",{key:0,onClick:e[3]||(e[3]=k=>i.currentTab="lock_screen")},[g("a",{class:q({"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:q({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},$(t.$t("Space Links")),3)])])]),g("div",cyt,[y(l,{class:"fcom_primary_button",disabled:i.saving,loading:i.saving,onClick:o.saveChanges},{default:w(()=>[W($(!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]=k=>t.$emit("completed")),text:""},{default:w(()=>[...e[9]||(e[9]=[W(" 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",uyt,[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 hyt=de(iyt,[["render",dyt]]),fyt={name:"SpaceLinkEditModal",components:{SidebarLinkForm:WH},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function pyt(t,e,n,s,i,o){const r=Y("SidebarLinkForm"),a=xs;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 myt=de(fyt,[["render",pyt]]),gyt={name:"SpaceGroups",components:{FluentDnD:Jd,ActionPopover:Pl,ArrowDownBold:Xre,Drawer:jd,CreateSpaceForm:N8,CreateGroupForm:q0t,Layout:mi,AppLayout:gi,MoveGroupPopup:Z0t,SpaceCustomizer:hyt,CourseCustomizer:pU,SpaceLinkEditModal:myt},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={};Ac(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=[];Ac(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)}},vyt={class:"settings_router"},yyt={class:"fcom_communities"},byt={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},_yt={class:"fcom_card_section_heading"},wyt={key:1},kyt={class:"fcom_card_sections",style:{"margin-bottom":"0"}},Cyt={class:"fcom_section_primary_item_title"},xyt={class:"fcom_heading_item"},Syt={class:"fcom_space_counts"},$yt={class:"fcom_section_item_actions"},Ayt={key:0,class:"fcom_section_items"},Eyt={class:"fcom_section_item_title"},Myt={class:"fcom_heading_item"},Tyt={class:"fcom_section_item_actions"},Pyt=["href"],Iyt={class:"actions_items"},Lyt=["onClick"],Oyt=["onClick"],Dyt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},Ryt={class:"fcom_section_primary_item fcom_no_top_border"},Vyt={class:"fcom_heading_item"},Fyt={class:"fcom_section_items"},Nyt={class:"fcom_section_item"},Byt={class:"fcom_section_item_title"},zyt={class:"fcom_heading_item"},Hyt={class:"fcom_section_item_actions"},Uyt=["href"],jyt={class:"actions_items"},Wyt=["onClick"],Yyt=["onClick"],qyt={key:0};function Gyt(t,e,n,s,i,o){const r=qe,a=Yt,l=Y("ArrowDownBold"),c=_e,u=Y("Plus"),d=Y("action-popover"),h=Ai,f=Y("MoveGroupPopup"),p=Y("FluentDnD"),m=Y("layout"),b=Y("app-layout"),_=Y("create-group-form"),k=Y("drawer"),C=Y("course-customizer"),x=Y("space-customizer"),S=Y("SpaceLinkEditModal"),M=xt("loading");return v(),E(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(()=>[W($(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",vyt,[Re((v(),E("div",yyt,[g("div",byt,[g("div",_yt,[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(),E("div",wyt,[y(p,{items:i.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:P})=>[g("div",kyt,[g("div",{class:q([{fcom_collapsed_group:i.collapsedGroups.indexOf(P.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",Cyt,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",xyt,[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",Syt,$(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",$yt,[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),P.spaces&&P.spaces.length&&i.collapsedGroups.indexOf(P.id)===-1?(v(),E("div",Ayt,[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:I})=>[g("div",Eyt,[e[11]||(e[11]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",Myt,[W($(T.title)+" ",1),T.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[W($(t.$labelize(T.status)),1)]),_:2},1024)):O("",!0),y(h,null,{default:w(()=>[W($(o.getTypeTitle(T.type)),1)]),_:2},1024),T.type=="sidebar_link"?(v(),D(h,{key:1,type:"info",class:"fcom_hover_show"},{default:w(()=>[W($(T.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[W("ID: "+$(T.id),1)]),_:2},1024))])]),g("div",Tyt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:T.permalink},$(t.$t("View")),9,Pyt),y(d,null,{default:w(({hide:L})=>[g("ul",Iyt,[g("li",null,[y(f,{groups:i.groups,currentSpace:T,onMoved:V=>{L(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:V=>{L(),o.openEditSpace(T)}},$(t.$t("Edit")),9,Lyt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:V=>{L(),o.initDeleteSpace(T)}},$(t.$t("Delete")),9,Oyt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),i.orphanedSpaces&&i.orphanedSpaces.length?(v(),E("div",Dyt,[g("div",Ryt,[g("div",Vyt,[g("h4",null,$(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",Fyt,[(v(!0),E(te,null,we(i.orphanedSpaces,P=>(v(),E("div",Nyt,[g("div",Byt,[g("p",zyt,[W($(P.title)+" ",1),P.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[W($(t.$labelize(P.status)),1)]),_:2},1024)):O("",!0),y(h,null,{default:w(()=>[W($(o.getTypeTitle(P.type)),1)]),_:2},1024),y(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[W(" ID: "+$(P.id),1)]),_:2},1024)])]),g("div",Hyt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:P.permalink},$(t.$t("View")),9,Uyt),y(d,null,{default:w(({hide:T})=>[g("ul",jyt,[g("li",null,[y(f,{groups:i.groups,currentSpace:P,onMoved:I=>{T(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:I=>{T(),o.openEditSpace(P)}},$(t.$t("Edit")),9,Wyt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{T(),o.initDeleteSpace(P)}},$(t.$t("Delete")),9,Yyt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[M,i.loading]])])]),_:1},8,["title"])]),_:1}),y(k,{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(),E("div",qyt,[(v(),D(Pa,{to:"body"},[i.editSpace.type=="course"?(v(),D(C,{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(x,{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 Xyt=de(gyt,[["render",Gyt]]),Kyt={name:"WebhookForm",components:{SpaceIcon:xp},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})}}},Zyt={key:0,class:"fcom_highlight_block"},Jyt={style:{color:"#E6A23C"}},Qyt={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},ebt={key:0,class:"fcom_space_title"},tbt={key:0,class:"fcom_space_title"},nbt={key:0,class:"fcom_space_title"},sbt={key:0,class:"fcom_space_title"},ibt={class:"dialog_footer fcom_mt_20"},obt={key:0},rbt={key:1};function abt(t,e,n,s,i,o){const r=Y("CopyDocument"),a=_e,l=qe,c=vt,u=El,d=ea,h=Qr,f=tn,p=Y("SpaceIcon"),m=nn,b=Zt,_=zd,k=Bd,C=Jt,x=cn,S=xt("loading");return v(),D(x,{onSubmit:e[8]||(e[8]=Oe(M=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=M=>i.form=M),size:"large"},{default:w(()=>[i.form.webhook_url?(v(),E("div",Zyt,[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]=M=>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(()=>[W($(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",Jyt,$(t.$t("The email address is required!")),1),e[10]||(e[10]=W()),g("a",Qyt,$(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]=M=>i.form.title=M),placeholder:t.$t("Your Webhook Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),y(k,{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]=M=>i.form.space_ids=M),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),E(te,null,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),E("span",ebt,[y(p,{space_profile:M},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(M.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]=M=>i.form.remove_space_ids=M),multiple:"",placeholder:t.$t("Select Spaces that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),E(te,null,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),E("span",tbt,[y(p,{space_profile:M},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),n.courses?(v(),D(k,{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]=M=>i.form.course_ids=M),multiple:"",placeholder:t.$t("Select Courses"),style:{width:"100%"}},{default:w(()=>[(v(!0),E(te,null,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),E("span",nbt,[y(p,{space_profile:M},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(M.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]=M=>i.form.remove_course_ids=M),multiple:"",placeholder:t.$t("Select Courses that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),E(te,null,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),E("span",sbt,[y(p,{space_profile:M},null,8,["space_profile"]),g("span",null,$(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})):O("",!0),y(C,{modelValue:i.form.send_wp_welcome_email,"onUpdate:modelValue":e[6]||(e[6]=M=>i.form.send_wp_welcome_email=M),"true-value":"yes","false-value":"no"},{default:w(()=>[W($(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",ibt,[le(t.$slots,"after_form",{},()=>[Re((v(),D(l,{class:"fcom_primary_button",disabled:i.adding,onClick:e[7]||(e[7]=M=>o.addWebhook())},{default:w(()=>[i.form.id?(v(),E("span",obt,$(t.$t("Update Webhook")),1)):(v(),E("span",rbt,$(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,i.adding]])])])]),_:3},8,["modelValue"])}const lbt=de(Kyt,[["render",abt]]),cbt={name:"IncomingWebhooks",components:{Pagination:au,UserAvatar:j2,UserRouteLink:sa,WebhookForm:lbt,Layout:mi,AppLayout:gi},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"))}},ubt=["href"],dbt={class:"settings_router manager_section"},hbt={class:"fhr_content_layout_body"},fbt={key:0,class:"setting_body"},pbt={class:"fcom_manager_actions"},mbt={class:"bulk_search"},gbt={class:"fcom_manager_table"},vbt={class:"fcom_webhook_url"},ybt={class:"fcom_table_action_col"},bbt={role:"region","aria-label":"Pagination",class:"pagination_wrap"},_bt={key:1,class:"setting_body",style:{"text-align":"center"}},wbt=["href"],kbt={class:"dialog_header"},Cbt={class:"dialog_body"};function xbt(t,e,n,s,i,o){const r=Y("Plus"),a=_e,l=qe,c=vt,u=Ai,d=ea,h=Y("CopyDocument"),f=Qr,p=Y("Pagination"),m=Y("layout"),b=Y("app-layout"),_=Y("webhook-form"),k=xs,C=xt("loading");return v(),E(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]=x=>o.showForm(null))},{default:w(()=>[y(a,null,{default:w(()=>[y(r)]),_:1}),g("span",null,$(t.$t("Add New Webhook")),1)]),_:1})):(v(),E("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,ubt))]),default:w(()=>[g("div",dbt,[g("div",hbt,[t.has_pro?(v(),E("div",fbt,[g("div",pbt,[g("div",mbt,[y(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=x=>i.search=x),onKeydown:kt(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",gbt,[Re((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(x=>[W($(x.row.value.title)+" ",1),x.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[W($(x.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),y(d,{label:t.$t("Webhook URL"),sortable:""},{default:w(x=>[g("div",vbt,[y(c,{size:"small",value:x.row.webhook_url,readonly:""},{append:w(()=>[y(l,{onClick:S=>o.copyToClipboard(x.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(x=>[g("div",ybt,[y(l,{onClick:S=>o.showForm(x.row),size:"small"},{default:w(()=>[W($(t.$t("Edit")),1)]),_:1},8,["onClick"]),y(l,{onClick:S=>o.removeWebhook(x.row),type:"danger",plain:"",size:"small"},{default:w(()=>[W($(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,i.loading]])]),g("div",bbt,[y(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=x=>o.fetch()),pagination:i.paginate},null,8,["pagination"])])])):(v(),E("div",_bt,[e[7]||(e[7]=g("p",null,null,-1)),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},$(t.$t("Upgrade to Pro")),9,wbt)]))])])]),_:1},8,["title"])]),_:1}),y(k,{"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]=x=>i.showModal=x),direction:"rtl"},{header:w(({close:x})=>[g("div",kbt,[g("h4",null,$(t.$t(i.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",Cbt,[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]=x=>i.editing_webhook=x),courses:i.courses,spaces:i.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const Sbt=de(cbt,[["render",xbt]]),$bt={name:"Overview",components:{AppLayout:gi,Layout:mi},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"))}},Abt={class:"object_menu"},Ebt={class:"fcom_space_menu_ul"};function Mbt(t,e,n,s,i,o){const r=Y("router-link"),a=Y("RouterView"),l=Y("layout"),c=Y("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",Abt,[g("ul",Ebt,[(v(!0),E(te,null,we(i.analyticsNavigations,(u,d)=>(v(),E("li",{key:`analytics-navigation-${d}`},[y(r,{to:{name:u.route}},{default:w(()=>[W($(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[y(a)]),_:1},8,["title"])]),_:1})}const Tbt=de($bt,[["render",Mbt]]),Pbt={name:"CheckProStatus"},Ibt={class:"upgrade-pro-wrapper"},Lbt={class:"upgrade-text"},Obt={class:"upgrade-button"},Dbt=["href"];function Rbt(t,e,n,s,i,o){return v(),E("div",Ibt,[g("div",Lbt,[g("h2",null,$(t.$t("This Feature is [Pro] Only")),1),g("p",null,$(t.$t("Upgrade to Pro and unlock this feature and many others!")),1)]),g("div",Obt,[g("a",{href:t.$upgradeUrl("feature_lock_analytics"),class:"button",target:"_blank"},$(t.$t("Upgrade Now")),9,Dbt)])])}const IS=de(Pbt,[["render",Rbt],["__scopeId","data-v-492a58f0"]]),Vbt={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)}}},Fbt={class:"fcom-report-header"},Nbt={class:"fcom-report-header-action"};function Bbt(t,e,n,s,i,o){const r=nn,a=Zt,l=Ud;return v(),E("div",Fbt,[g("h4",null,$(t.$t("Overview")),1),g("div",Nbt,[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),E(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:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.setDateRange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const zbt=de(Vbt,[["render",Bbt]]),Hbt={name:"Loading",props:{section:{type:Number,default:()=>1}}};function Ubt(t,e,n,s,i,o){const r=Yt;return v(!0),E(te,null,we(n.section,a=>(v(),E("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[y(r,{rows:5,loading:"",animated:""})]))),128)}const Ba=de(Hbt,[["render",Ubt]]),jbt={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()}},Wbt={key:1,class:"fcom-report-stat-widgets"},Ybt={class:"stat-title"};function qbt(t,e,n,s,i,o){const r=Y("Loading");return i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",Wbt,[(v(!0),E(te,null,we(i.widgets,(a,l)=>(v(),E("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Ybt,$(a.title),1),g("h3",null,[W($(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},$(a.comparison),3)])]))),128))]))}const Gbt=de(jbt,[["render",qbt]]);/*! |
| 136 |
* ApexCharts v4.3.0 |
| 137 |
* (c) 2018-2024 ApexCharts |
| 138 |
* Released under the MIT License. |
| 139 |
*/function Vx(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 LU(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TT(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,RU(s.key),s)}}function ct(t,e,n){return e&&TT(t.prototype,e),n&&TT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Em(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=LS(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. |
| 140 |
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 yv(t){var e=OU();return function(){var n,s=Qb(t);if(e){var i=Qb(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 LU(o)}(this,n)}}function Jb(t,e,n){return(e=RU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qb(t){return Qb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qb(t)}function bv(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&&Fx(t,e)}function OU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OU=function(){return!!t})()}function PT(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 tt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?PT(Object(n),!0).forEach(function(s){Jb(t,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(n,s))})}return t}function Fx(t,e){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Fx(t,e)}function DU(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)||LS(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. |
| 141 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ns(t){return function(e){if(Array.isArray(e))return Vx(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||LS(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. |
| 142 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function RU(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 ep(t){return ep=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},ep(t)}function LS(t,e){if(t){if(typeof t=="string")return Vx(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)?Vx(t,e):void 0}}var he=function(){function t(){lt(this,t)}return ct(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&&ep(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,Jb({},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||ep(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}(),Lp=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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(){he.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 Nx={},VU=[];function Xt(t,e){if(Array.isArray(t))for(const n of t)Xt(n,e);else if(typeof t!="object")FU(Object.getOwnPropertyNames(e)),Nx[t]=Object.assign(Nx[t]||{},e);else for(const n in t)Xt(n,t[n])}function to(t){return Nx[t]||{}}function FU(t){VU.push(...t)}function OS(t,e){let n;const s=t.length,i=[];for(n=0;n<s;n++)i.push(e(t[n]));return i}function H3(t){return t%360*Math.PI/180}function Op(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Dp(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 Bx(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 Xbt=new Set(["desc","metadata","title"]),zx=t=>Xbt.has(t.nodeName),NU=(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"))},DS="http://www.w3.org/2000/svg",U3="http://www.w3.org/2000/xmlns/",Rp="http://www.w3.org/1999/xlink",vn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function _v(){return vn.window}let RS=class{};const ad={},VS="___SYMBOL___ROOT___";function y1(t,e=DS){return vn.document.createElementNS(e,t)}function Hi(t,e=!1){if(t instanceof RS)return t;if(typeof t=="object")return j3(t);if(t==null)return new ad[VS];if(typeof t=="string"&&t.charAt(0)!=="<")return j3(vn.document.querySelector(t));const n=e?vn.document.createElement("div"):y1("svg");return n.innerHTML=t,t=j3(n.firstChild),n.removeChild(n.firstChild),t}function Bn(t,e){return e&&(e instanceof vn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:y1(t)}function tr(t){if(!t)return null;if(t.instance instanceof RS)return t.instance;if(t.nodeName==="#document-fragment")return new ad.Fragment(t);let e=Op(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":ad[e]||(e="Dom"),new ad[e](t)}let j3=tr;function bn(t,e=t.name,n=!1){return ad[e]=t,n&&(ad[VS]=t),FU(Object.getOwnPropertyNames(t.prototype)),t}let Kbt=1e3;function BU(t){return"Svgjs"+Op(t)+Kbt++}function zU(t){for(let e=t.children.length-1;e>=0;e--)zU(t.children[e]);return t.id&&(t.id=BU(t.nodeName)),t}function At(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 Nn(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)}}Xt("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=Hi(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Hi(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Hi(t)).before(this),this},insertAfter:function(t){return(t=Hi(t)).after(this),this}});const HU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Zbt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Jbt=/rgb\((\d+),(\d+),(\d+)\)/,Qbt=/(#[a-z_][a-z0-9\-_]*)/i,e_t=/\)\s*,?\s*/,t_t=/\s/g,IT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,LT=/^rgb\(/,OT=/^(\s+)?$/,DT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,n_t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ol=/[\s,]+/,FS=/[MLHVCSQTAZ]/i;function s_t(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function ph(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function W3(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}Xt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Ol)},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)}}),Xt("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||OT.test(t[s])?"":t[s])}return arguments.length===2&&this.node.style.setProperty(t,e==null||OT.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Xt("Dom",{data:function(t,e,n){if(t==null)return this.data(OS(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}}),Xt("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 Ln{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ln||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 Ln(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 Ln(a,l,c)}if(e==="pastel"){const a=8*s()+86,l=17*s()+9,c=360*s();return new Ln(a,l,c,"lch")}if(e==="dark"){const a=10+10*s(),l=50*s()+86,c=360*s();return new Ln(a,l,c,"lch")}if(e==="rgb"){const a=255*s(),l=255*s(),c=255*s();return new Ln(a,l,c)}if(e==="lab"){const a=100*s(),l=256*s()-128,c=256*s()-128;return new Ln(a,l,c,"lab")}if(e==="grey"){const a=255*s();return new Ln(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(IT.test(e)||LT.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 Ln(0,0,0,1,"cmyk"):new Ln((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 Ln(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=ph(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:ph(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:ph(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:ph(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:ph(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:ph(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(LT.test(e)){const d=e.replace(t_t,""),[h,f,p]=Jbt.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!IT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=Zbt.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 Ln(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 Ln(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:M,h:P}=this,T=Math.PI/180;p=M*Math.cos(T*P),m=M*Math.sin(T*P)}const b=(f+16)/116,_=p/500+b,k=b-m/200,C=16/116,x=.008856,S=7.787;n=.95047*(_**3>x?_**3:(_-C)/S),s=1*(b**3>x?b**3:(b-C)/S),i=1.08883*(k**3>x?k**3:(k-C)/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 Ln(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 Ln(i,i,i);const o=i<.5?i*(1+s):i+s-i*s,r=2*i-o,a=255*W3(r,o,n+1/3),l=255*W3(r,o,n),c=255*W3(r,o,n-1/3);return new Ln(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 Ln(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(s_t);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 Ln(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 Dn=class UU{constructor(...e){this.init(...e)}clone(){return new UU(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){an.isMatrixLike(e)||(e=new an(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 mh(t,e,n){return Math.abs(e-t)<(n||1e-6)}let an=class Ds{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 Dn(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=d.x,f=d.y,p=new Dn(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,b=p.y,_=new Dn(e.translate||e.tx||e.translateX,e.ty||e.translateY),k=_.x,C=_.y,x=new Dn(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:a,scaleY:l,skewX:o,skewY:r,shear:c,theta:u,rx:x.x,ry:x.y,tx:k,ty:C,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 Ds(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 Ds(e);return mh(this.a,n.a)&&mh(this.b,n.b)&&mh(this.c,n.c)&&mh(this.d,n.d)&&mh(this.e,n.e)&&mh(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=Ds.fromArray([1,0,0,1,0,0]);return e=e instanceof di?e.matrixify():typeof e=="string"?Ds.fromArray(e.split(Ol).map(parseFloat)):Array.isArray(e)?Ds.fromArray(e):typeof e=="object"&&Ds.isMatrixLike(e)?e:typeof e=="object"?new Ds().transform(e):arguments.length===6?Ds.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 Ds?e:new Ds(e);return Ds.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof Ds?e:new Ds(e);return Ds.matrixMultiply(this,n,this)}rotate(e,n,s){return this.clone().rotateO(e,n,s)}rotateO(e,n=0,s=0){e=H3(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=H3(e),n=H3(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(Ds.isMatrixLike(e))return new Ds(e).multiplyO(this);const n=Ds.formatTransforms(e),{x:s,y:i}=new Dn(n.ox,n.oy).transform(this),o=new Ds().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 Dn(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 gc(){if(!gc.nodes){const t=Hi().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;gc.nodes={svg:t,path:e}}if(!gc.nodes.svg.node.parentNode){const t=vn.document.body||vn.document.documentElement;gc.nodes.svg.addTo(t)}return gc.nodes}function jU(t){return!(t.width||t.height||t.x||t.y)}bn(an,"Matrix");let Ws=class ky{constructor(...e){this.init(...e)}addOffset(){return this.x+=vn.window.pageXOffset,this.y+=vn.window.pageYOffset,new ky(this)}init(e){return e=typeof e=="string"?e.split(Ol).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 jU(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 ky(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 an||(e=new an(e));let n=1/0,s=-1/0,i=1/0,o=-1/0;return[new Dn(this.x,this.y),new Dn(this.x2,this.y),new Dn(this.x,this.y2),new Dn(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 ky(n,i,s-n,o-i)}};function RT(t,e,n){let s;try{if(s=e(t.node),jU(s)&&(i=t.node)!==vn.document&&!(vn.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===vn.document}).call(vn.document.documentElement,i))throw new Error("Element not in the dom")}catch{s=n(t)}var i;return s}Xt({viewbox:{viewbox(t,e,n,s){return t==null?new Ws(this.attr("viewBox")):this.attr("viewBox",new Ws(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 Dn(n/2/o+i.x,s/2/r+i.y);const c=new Ws(i).transform(new an({scale:l,origin:e}));return this.viewbox(c)}}}),bn(Ws,"Box");let $d=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};At([$d],{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 i_t=["toArray","constructor","each"];function Qd(t,e){return new $d(OS((e||vn.document).querySelectorAll(t),function(n){return tr(n)}))}$d.extend=function(t){t=t.reduce((e,n)=>(i_t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...s){return this.each(n,...s)}),e),{}),At([$d],t)};let o_t=0;const WU={};function YU(t){let e=t.getEventHolder();return e===vn.window&&(e=WU),e.events||(e.events={}),e.events}function NS(t){return t.getEventTarget()}function al(t,e,n,s,i){const o=n.bind(s||t),r=Hi(t),a=YU(r),l=NS(r);e=Array.isArray(e)?e:e.split(Ol),n._svgjsListenerId||(n._svgjsListenerId=++o_t),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 cr(t,e,n,s){const i=Hi(t),o=YU(i),r=NS(i);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Ol)).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])cr(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&cr(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])cr(r,[l,u].join("."));delete o[l]}}else{for(a in o)cr(r,a);(function(h){let f=h.getEventHolder();f===vn.window&&(f=WU),f.events&&(f.events={})})(i)}})}class wv extends RS{addEventListener(){}dispatch(e,n,s){return function(i,o,r,a){const l=NS(i);return o instanceof vn.window.Event||(o=new vn.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 cr(this,e,n,s),this}on(e,n,s,i){return al(this,e,n,s,i),this}removeEventListener(){}}function VT(){}bn(wv,"EventTarget");const Y3=400,r_t=">",a_t=0,l_t={"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 Ad 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(Ol).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(HU))&&(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 c_t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),qU=[];class Uc extends wv{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=Hi(e)).removeNamespace&&this.node instanceof vn.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 Hi(e).put(this,n)}children(){return new $d(OS(this.node.children,function(e){return tr(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=zU(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 Uc(y1(e),n))}first(){return tr(this.node.firstChild)}get(e){return tr(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=BU(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return tr(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=tr(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=tr(n.node.parentNode));return n}put(e,n){return e=Hi(e),this.add(e,n),e}putIn(e,n){return Hi(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=Hi(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,DS)}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=tr(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=y1("wrapper",s),o=vn.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)}}At(Uc,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const s of e)t[s.nodeName]=DT.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?l_t[t]:DT.test(e)?parseFloat(e):e;typeof(e=qU.reduce((s,i)=>i(t,s,this),e))=="number"?e=new Bt(e):c_t.has(t)&&Ln.isColor(e)?e=new Ln(e):e.constructor===Array&&(e=new Ad(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 Qd(t,this.node)},findOne:function(t){return tr(this.node.querySelector(t))}}),bn(Uc,"Dom");let di=class extends Uc{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=Hi(t));const n=new $d;let s=this;for(;(s=s.parent())&&s.node!==vn.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(Qbt);return e?Hi(e[1]):null}root(){const t=this.parent(function(e){return ad[e]}(VS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Dp(this,t,e);return this.width(new Bt(n.width)).height(new Bt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return NU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};At(di,{bbox:function(){const t=RT(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(gc().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 Ws(t)},rbox:function(t){const e=RT(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),n=new Ws(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 Dn(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new an(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 an(e)}return new an(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new an}}}),bn(di,"Element");const em={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 Ln||Ln.isRgb(s)||s instanceof di)this.attr(t,s);else for(n=em[t].length-1;n>=0;n--)s[em[t][n]]!=null&&this.attr(em.prefix(t,em[t][n]),s[em[t][n]]);return this},Xt(["Element","Runner"],e)}),Xt(["Element","Runner"],{matrix:function(t,e,n,s,i,o){return t==null?new an(this):this.attr("transform",new an(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)}}),Xt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Bt(t)):this.rx(t).ry(e)}}),Xt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Dn(this.node.getPointAtLength(t))}}),Xt(["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)}});Xt("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},{})),Xt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(e_t).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(Ol).map(function(s){return parseFloat(s)})]}).reverse().reduce(function(e,n){return n[0]==="matrix"?e.lmultiply(an.fromArray(n[1])):e[n[0]].apply(e,n[1])},new an)},toParent:function(t,e){if(this===t)return this;if(zx(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 an(this).decompose();return t==null?s:s[t]}an.isMatrixLike(t)||(t={...t,origin:Bx(t,this)});const n=new an(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Ji extends di{flatten(){return this.each(function(){if(this instanceof Ji)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()}}bn(Ji,"Container");class K2 extends Ji{constructor(e,n=e){super(Bn("defs",e),n)}flatten(){return this}ungroup(){return this}}bn(K2,"Defs");class qo extends di{}function BS(t){return this.attr("rx",t)}function zS(t){return this.attr("ry",t)}function GU(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function XU(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function KU(t){return this.attr("cx",t)}function ZU(t){return this.attr("cy",t)}function JU(t){return t==null?2*this.rx():this.rx(new Bt(t).divide(2))}function QU(t){return t==null?2*this.ry():this.ry(new Bt(t).divide(2))}bn(qo,"Shape");var u_t=Object.freeze({__proto__:null,cx:KU,cy:ZU,height:QU,rx:BS,ry:zS,width:JU,x:GU,y:XU});class Cy extends qo{constructor(e,n=e){super(Bn("ellipse",e),n)}size(e,n){const s=Dp(this,e,n);return this.rx(new Bt(s.width).divide(2)).ry(new Bt(s.height).divide(2))}}At(Cy,u_t),Xt("Container",{ellipse:Nn(function(t=0,e=t){return this.put(new Cy).size(t,e).move(0,0)})}),bn(Cy,"Ellipse");class ej extends Uc{constructor(e=vn.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 Uc(y1("wrapper",s));return i.add(this.node.cloneNode(!0)),i.xml(!1,s)}return super.xml(e,!1,s)}}function tj(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 nj(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)})}bn(ej,"Fragment");var d_t=Object.freeze({__proto__:null,from:tj,to:nj});class yg extends Ji{constructor(e,n){super(Bn(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 Ws}targets(){return Qd("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()+")"}}At(yg,d_t),Xt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Nn(function(t,e){return this.put(new yg(t)).update(e)})}}),bn(yg,"Gradient");class b1 extends Ji{constructor(e,n=e){super(Bn("pattern",e),n)}attr(e,n,s){return e==="transform"&&(e="patternTransform"),super.attr(e,n,s)}bbox(){return new Ws}targets(){return Qd("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()+")"}}Xt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Nn(function(t,e,n){return this.put(new b1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),bn(b1,"Pattern");let xy=class extends qo{constructor(t,e=t){super(Bn("image",t),e)}load(t,e){if(!t)return this;const n=new vn.window.Image;return al(n,"load",function(s){const i=this.parent(b1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),i instanceof b1&&i.width()===0&&i.height()===0&&i.size(this.width(),this.height()),typeof e=="function"&&e.call(this,s)},this),al(n,"load error",function(){cr(n)}),this.attr("href",n.src=t,Rp)}};var FT;FT=function(t,e,n){return t!=="fill"&&t!=="stroke"||n_t.test(e)&&(e=n.root().defs().image(e)),e instanceof xy&&(e=n.root().defs().pattern(0,0,s=>{s.add(e)})),e},qU.push(FT),Xt({Container:{image:Nn(function(t,e){return this.put(new xy).size(0,0).load(t,e)})}}),bn(xy,"Image");class jc extends Ad{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 Ws(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(Ol).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){an.isMatrixLike(e)||(e=new an(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 h_t=jc;var HS=Object.freeze({__proto__:null,MorphArray:h_t,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 zu=class extends qo{constructor(t,e=t){super(Bn("line",t),e)}array(){return new jc([[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 jc(t).toLine(),this.attr(t))}size(t,e){const n=Dp(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};At(zu,HS),Xt({Container:{line:Nn(function(...t){return zu.prototype.plot.apply(this.put(new zu),t[0]!=null?t:[0,0,0,0])})}}),bn(zu,"Line");let Sy=class extends Ji{constructor(t,e=t){super(Bn("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 Gh(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}Xt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Nn(function(t,e,n){return this.put(new Sy).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 Sy?arguments[1]:this.defs().marker(e,n,s),this.attr(i,t)}}}),bn(Sy,"Marker");const f_t={"-":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 US{done(){return!1}}class Hx extends US{constructor(e=r_t){super(),this.ease=f_t[e]||e}step(e,n,s){return typeof e!="number"?s<1?e:n:e+(n-e)*this.ease(s)}}class e_ extends US{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,s,i){return this.stepper(e,n,s,i)}}function NT(){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}At(class extends e_{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:Gh("_duration",NT),overshoot:Gh("_overshoot",NT)});At(class extends e_{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:Gh("_windup"),p:Gh("P"),i:Gh("I"),d:Gh("D")});const p_t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ux={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]]}},q3="mlhvqtcsaz".split("");for(let t=0,e=q3.length;t<e;++t)Ux[q3[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 Ux[n](s,i,o)}}(q3[t].toUpperCase());function jx(t){return t.segment.length&&t.segment.length-1===p_t[t.segment[0].toUpperCase()]}function m_t(t,e){t.inNumber&&$u(t,!1);const n=FS.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,jx(t)&&Wx(t)}function Wx(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return Ux[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function g_t(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 v_t(t){return t.lastToken.toUpperCase()==="E"}const y_t=new Set([" ",","," ",` |
| 143 |
`,"\r","\f"]);class Pr extends Ad{bbox(){return gc().path.setAttribute("d",this.toString()),new Ws(gc.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 Dn,p:new Dn};for(;r.lastToken=o,o=n.charAt(i++);)if(r.inSegment||!m_t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(y_t.has(o))r.inNumber&&$u(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(FS.test(o)){if(r.inNumber)$u(r,!1);else{if(!jx(r))throw new Error("parser Error");Wx(r)}--i}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!v_t(r)){$u(r,!1),--i;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||g_t(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&&jx(r)&&Wx(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 sj=t=>{const e=typeof t;return e==="number"?Bt:e==="string"?Ln.isColor(t)?Ln:Ol.test(t)?FS.test(t)?Pr:Ad:HU.test(t)?Bt:Yx:qx.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Ad:e==="object"?_1:Yx};class Au{constructor(e){this._stepper=e||new Hx("-"),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(sj(e));let n=new this._type(e);return this._type===Ln&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===_1&&(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 Yx{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 kv{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,kv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}kv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const b_t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class _1{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]===Ln&&e[s+7]!==n[s+7]){const a=e[s+7],l=new Ln(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=sj(e[s]),o=new i(e[s]).toArray();n.push([s,i,o.length,...o])}return n.sort(b_t),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 qx=[Yx,kv,_1];class bf extends qo{constructor(e,n=e){super(Bn("path",e),n)}array(){return this._array||(this._array=new Pr(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 Pr(e))}size(e,n){const s=Dp(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)}}bf.prototype.MorphArray=Pr,Xt({Container:{path:Nn(function(t){return this.put(new bf).plot(t||new Pr)})}}),bn(bf,"Path");var ij=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new jc(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 jc(t))},size:function(t,e){const n=Dp(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class Hu extends qo{constructor(e,n=e){super(Bn("polygon",e),n)}}Xt({Container:{polygon:Nn(function(t){return this.put(new Hu).plot(t||new jc)})}}),At(Hu,HS),At(Hu,ij),bn(Hu,"Polygon");class Uu extends qo{constructor(e,n=e){super(Bn("polyline",e),n)}}Xt({Container:{polyline:Nn(function(t){return this.put(new Uu).plot(t||new jc)})}}),At(Uu,HS),At(Uu,ij),bn(Uu,"Polyline");class $y extends qo{constructor(e,n=e){super(Bn("rect",e),n)}}At($y,{rx:BS,ry:zS}),Xt({Container:{rect:Nn(function(t,e){return this.put(new $y).size(t,e)})}}),bn($y,"Rect");class G3{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 G3,timeouts:new G3,immediates:new G3,timer:()=>vn.window.performance||vn.window.Date,transforms:[],frame(t){const e=Tn.frames.push({run:t});return Tn.nextDraw===null&&(Tn.nextDraw=vn.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=vn.window.requestAnimationFrame(Tn._draw)),s},immediate(t){const e=Tn.immediates.push(t);return Tn.nextDraw===null&&(Tn.nextDraw=vn.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()?vn.window.requestAnimationFrame(Tn._draw):null}},__t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},w_t=function(){const t=vn.window;return(t.performance||t.Date).now()};class oj extends wv{constructor(e=w_t){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(__t);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)}}Xt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new oj,this._timeline):(this._timeline=t,this)}}});class No extends wv{constructor(e){super(),this.id=No.id++,e=typeof(e=e??Y3)=="function"?new e_(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof e_,this._stepper=this._isDeclarative?e:new Hx,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new an,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??a_t,s=s||"last",typeof(e=e??Y3)!="object"||e instanceof US||(n=e.delay??n,s=e.when??s,o=e.swing||o,i=e.times??i,r=e.wait??r,e=e.duration??Y3),{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=No.sanitise(e,n,s),o=new No(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 an,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 Hx(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||VT,runner:n||VT,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 oj||(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 an,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}}No.id=0;class t_{constructor(e=new an,n=-1,s=!0){this.transforms=e,this.id=n,this.done=s}clearTransformsFromQueue(){}}At([No,t_],{mergeWith(t){return new t_(t.transforms.lmultiply(this.transforms),t.id)}});const rj=(t,e)=>t.lmultiplyO(e),aj=t=>t.transforms;function k_t(){const t=this._transformationRunners.runners.map(aj).reduce(rj,new an);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class C_t{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 t_).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}}Xt({Element:{animate(t,e,n){const s=No.sanitise(t,e,n),i=this.timeline();return new No(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(aj).reduce(rj,new an)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(k_t.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new C_t().add(new t_(new an(this))))}}});At(No,{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 Au(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 _1(i.from()).valueOf();Object.assign(h,d),i.from(h)}const u=new _1(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 Au(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=an.isMatrixLike(t);n=t.affine!=null?t.affine:n??!s;const i=new Au(this._stepper).type(n?kv:an);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||Bx(t,r),c=new an(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(u){e||this.clearTransform();const{x:d,y:h}=new Dn(o).transform(r._currentTransform(this));let f=new an({...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,k=[b-360,b,b+360],C=k.map(M=>Math.abs(M-_)),x=Math.min(...C),S=C.indexOf(x);f.rotate=k[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 an(m),this.addTransform(a),r._addRunner(this),i.done()},function(u){(u.origin||"center").toString()!==(t.origin||"center").toString()&&(o=Bx(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 Au(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 Au(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 Au(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 Ws(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)}}),At(No,{rx:BS,ry:zS,from:tj,to:nj}),bn(No,"Runner");class Gx extends Ji{constructor(e,n=e){super(Bn("svg",e),n),this.namespace()}defs(){return this.isRoot()?tr(this.node.querySelector("defs"))||this.put(new K2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof vn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:DS,version:"1.1"}).attr("xmlns:xlink",Rp,U3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,U3).attr("xmlns:svgjs",null,U3)}root(){return this.isRoot()?this:super.root()}}Xt({Container:{nested:Nn(function(){return this.put(new Gx)})}}),bn(Gx,"Svg",!0);let Xx=class extends Ji{constructor(t,e=t){super(Bn("symbol",t),e)}};Xt({Container:{symbol:Nn(function(){return this.put(new Xx)})}}),bn(Xx,"Symbol");var lj=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(vn.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 Ir extends qo{constructor(e,n=e){super(Bn("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(zx(this.node))return;const r=vn.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=i*new Bt(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===` |
| 144 |
`?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 NU(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"||zx(n[i])?i===0&&(s=i+1):(i!==s&&n[i].nodeType!==3&&tr(n[i]).dom.newLined===!0&&(e+=` |
| 145 |
`),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(` |
| 146 |
`)).length;n<s;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}At(Ir,lj),Xt({Container:{text:Nn(function(t=""){return this.put(new Ir).text(t)}),plain:Nn(function(t=""){return this.put(new Ir).plain(t)})}}),bn(Ir,"Text");class Ay extends qo{constructor(e,n=e){super(Bn("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 Ir))return this;const n=e.index(this),s=vn.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?` |
| 147 |
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}At(Ay,lj),Xt({Tspan:{tspan:Nn(function(t=""){const e=new Ay;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),bn(Ay,"Tspan");class X3 extends qo{constructor(e,n=e){super(Bn("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))}}At(X3,{x:GU,y:XU,cx:KU,cy:ZU,width:JU,height:QU}),Xt({Container:{circle:Nn(function(t=0){return this.put(new X3).size(t).move(0,0)})}}),bn(X3,"Circle");class K3 extends Ji{constructor(e,n=e){super(Bn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Qd("svg [clip-path*="+this.id()+"]")}}Xt({Container:{clip:Nn(function(){return this.defs().put(new K3)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof K3?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),bn(K3,"ClipPath");class BT extends di{constructor(e,n=e){super(Bn("foreignObject",e),n)}}Xt({Container:{foreignObject:Nn(function(t,e){return this.put(new BT).size(t,e)})}}),bn(BT,"ForeignObject");var cj=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let s;try{s=n.node instanceof _v().SVGSVGElement?new Ws(n.attr(["x","y","width","height"])):n.bbox()}catch{return}const i=new an(n),o=i.translate(t,e).transform(i.inverse()),r=new Dn(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=Dp(this,t,e,n),i=s.width/n.width,o=s.height/n.height;return this.children().forEach(r=>{const a=new Dn(n).transform(new an(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 Ic extends Ji{constructor(e,n=e){super(Bn("g",e),n)}}At(Ic,cj),Xt({Container:{group:Nn(function(){return this.put(new Ic)})}}),bn(Ic,"G");class v0 extends Ji{constructor(e,n=e){super(Bn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Rp)}}At(v0,cj),Xt({Container:{link:Nn(function(t){return this.put(new v0).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 v0,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}}}),bn(v0,"A");class Z3 extends Ji{constructor(e,n=e){super(Bn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Qd("svg [mask*="+this.id()+"]")}}Xt({Container:{mask:Nn(function(){return this.defs().put(new Z3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Z3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),bn(Z3,"Mask");class zT extends di{constructor(e,n=e){super(Bn("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}}Xt({Gradient:{stop:function(t,e,n){return this.put(new zT).update(t,e,n)}}}),bn(zT,"Stop");class J3 extends di{constructor(e,n=e){super(Bn("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))}}Xt("Dom",{style(t,e){return this.put(new J3).rule(t,e)},fontface(t,e,n){return this.put(new J3).font(t,e,n)}}),bn(J3,"Style");class Q3 extends Ir{constructor(e,n=e){super(Bn("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")}}Xt({Container:{textPath:Nn(function(t,e){return t instanceof Ir||(t=this.text(t)),t.path(e)})},Text:{path:Nn(function(t,e=!0){const n=new Q3;let s;if(t instanceof bf||(t=this.defs().path(t)),n.attr("href","#"+t,Rp),e)for(;s=this.node.firstChild;)n.node.appendChild(s);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:Nn(function(t){return t instanceof Ir||(t=new Ir().addTo(this.parent()).text(t)),t.path(this)}),targets(){return Qd("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),Q3.prototype.MorphArray=Pr,bn(Q3,"TextPath");class HT extends qo{constructor(e,n=e){super(Bn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,Rp)}}Xt({Container:{use:Nn(function(t,e){return this.put(new HT).use(t,e)})}}),bn(HT,"Use");const x_t=Hi;At([Gx,Xx,xy,b1,Sy],to("viewbox")),At([zu,Uu,Hu,bf],to("marker")),At(Ir,to("Text")),At(bf,to("Path")),At(K2,to("Defs")),At([Ir,Ay],to("Tspan")),At([$y,Cy,yg,No],to("radius")),At(wv,to("EventTarget")),At(Uc,to("Dom")),At(di,to("Element")),At(qo,to("Shape")),At([Ji,ej],to("Container")),At(yg,to("Gradient")),At(No,to("Runner")),$d.extend([...new Set(VU)]),function(t=[]){qx.push(...[].concat(t))}([Bt,Ln,Ws,an,Ad,jc,Pr,Dn]),At(qx,{to(t){return new Au().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 Xn extends di{constructor(e){super(Bn("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 Qd('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class jS 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 Ko=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},S_t={blend:Ko(["in","in2","mode"]),colorMatrix:Ko(["type","values"]),composite:Ko(["in","in2","operator"]),convolveMatrix:function(t){t=new Ad(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ko(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ko(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ko(["in","dx","dy","stdDeviation"]),flood:Ko(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Rp)},morphology:Ko(["operator","radius"]),offset:Ko(["dx","dy"]),specularLighting:Ko(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ko([]),turbulence:Ko(["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=Op(t),n=S_t[t];Xn[e+"Effect"]=class extends jS{constructor(s){super(Bn("fe"+e,s),s)}update(s){return n.apply(this,s),this}},Xn.prototype[t]=Nn(function(s,...i){const o=new Xn[e+"Effect"];return s==null?this.put(o):(typeof s=="function"?s.call(o,o):i.unshift(s),this.put(o).update(i))})}),At(Xn,{merge(t){const e=this.put(new Xn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof Xn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new Xn.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 Xn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=Op(t);Xn[e]=class extends jS{constructor(n){super(Bn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Xn[Op(t)],n=Nn(function(){return this.put(new e)});Xn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Xn[Op(t)],n=Nn(function(){return this.put(new e)});Xn.DiffuseLightingEffect.prototype[t]=n,Xn.SpecularLightingEffect.prototype[t]=n}),At(Xn.MergeEffect,{mergeNode(t){return this.put(new Xn.MergeNode).attr("in",t)}}),At(K2,{filter:function(t){const e=this.put(new Xn);return typeof t=="function"&&t.call(e,e),e}}),At(Ji,{filter:function(t){return this.defs().filter(t)}}),At(di,{filterWith:function(t){const e=t instanceof Xn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const $_t={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)}};At(jS,$_t),At(Xn.MergeEffect,{in:function(t){return t instanceof Xn.MergeNode?this.add(t,0):this.add(new Xn.MergeNode().in(t),0),this}}),At([Xn.CompositeEffect,Xn.BlendEffect,Xn.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)}}),Xn.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){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getDefaultFilter",value:function(e,n){var s=this.w;e.unfilter(!0),new Xn().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:` |
| 148 |
`.concat(u,` 0 0 0 0 |
| 149 |
0 `).concat(u,` 0 0 0 |
| 150 |
0 0 `).concat(u,` 0 0 |
| 151 |
0 0 0 1 0 |
| 152 |
`),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),he.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}(),Ne=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"roundPathCorners",value:function(e,n){function s(T,I,L){var V=I.x-T.x,R=I.y-T.y,N=Math.sqrt(V*V+R*R);return i(T,I,Math.min(1,L/N))}function i(T,I,L){return{x:T.x+(I.x-T.x)*L,y:T.y+(I.y-T.y)*L}}function o(T,I){T.length>2&&(T[T.length-2]=I.x,T[T.length-1]=I.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,I){var L=I.match("([a-zA-Z])(.+)");return L?(T.push(L[1]),T.push(L[2])):T.push(I),T},[]).reduce(function(T,I){return parseFloat(I)==I&&T.length?T[T.length-1].push(I):T.push([I]),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),k=r(f),C=r(p);m=s(k,_,n),b=s(k,C,n),o(f,m),f.origPoint=k,l.push(f);var x=i(m,k,.5),S=i(k,b,.5),M=["C",x.x,x.y,S.x,S.y,b.x,b.y];M.origPoint=k,l.push(M)}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,I){return T+I.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,k=this.w;return m===null&&(m=k.config.stroke.lineCap),(s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s="M 0 ".concat(k.globals.gridHeight)),k.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,k=e.bindEventsOnPaths,C=k===void 0||k,x=e.drawShadow,S=x===void 0||x,M=this.w,P=new ai(this.ctx),T=new Lp(this.ctx),I=this.w.config.chart.animations.enabled,L=I&&this.w.config.chart.animations.dynamicAnimation.enabled,V=!!(I&&!M.globals.resized||L&&M.globals.dataChanged&&M.globals.shouldAnimate);V?n=o:(n=r,M.globals.animationEnded=!0);var R=M.config.stroke.dashArray,N=0;N=Array.isArray(R)?R[i]:M.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"&&!M.globals.isHorizontal||M.globals.comboCharts?F.attr({"clip-path":"url(#gridRectBarMask".concat(M.globals.cuid,")")}):F.attr({"clip-path":"url(#gridRectMask".concat(M.globals.cuid,")")})),M.config.chart.dropShadow.enabled&&S&&P.dropShadow(F,M.config.chart.dropShadow,i),C&&(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!I||M.globals.resized||M.globals.dataChanged?!M.globals.resized&&M.globals.dataChanged||T.showDelayedElements():T.animatePathsGradually(tt(tt({},B),{},{speed:h})),M.globals.dataChanged&&L&&V&&T.animatePathsGradually(tt(tt({},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=he.hexToRgba(n,i)),s.length<9&&s.indexOf("#")===0&&(s=he.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(C){(Array.isArray(c[u])?c[u]:c).forEach(function(x){C.stop(x.offset/100,x.color,x.opacity)})}):d.globals.dom.Paper.gradient(b?"radial":"linear",function(C){C.stop(h,n,i),C.stop(f,s,o),C.stop(p,s,o),m!==null&&C.stop(m,n,i)}),b){var _=d.globals.gridWidth/2,k=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:_,cy:k,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,k=_===void 0?"auto":_,C=this.w;o===void 0&&(o="");var x=o;r||(r="start"),u&&u.length||(u=C.config.chart.foreColor),l=l||C.config.chart.fontFamily,c=c||"regular";var S,M={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?S=C.globals.dom.Paper.text(function(P){for(var T=0;T<o.length;T++)x=o[T],h&&(x=n.getTextBasedOnMaxWidth(tt({text:o[T]},M))),T===0?P.tspan(x):P.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth(tt({text:o},M))),S=b?C.globals.dom.Paper.plain(o):C.globals.dom.Paper.text(function(P){return P.tspan(x)})),S.attr({x:s,y:i,"text-anchor":r,"dominant-baseline":k,"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,` |
| 153 |
L `).concat(e+i," ").concat(n+i,` |
| 154 |
L `).concat(e-i," ").concat(n+i,` |
| 155 |
Z`);break;case"square":case"rect":o="M ".concat(e-(i/=1.125)," ").concat(n-i,` |
| 156 |
L `).concat(e+i," ").concat(n-i,` |
| 157 |
L `).concat(e+i," ").concat(n+i,` |
| 158 |
L `).concat(e-i," ").concat(n+i,` |
| 159 |
Z`);break;case"diamond":i*=1.05,o="M ".concat(e," ").concat(n-i,` |
| 160 |
L `).concat(e+i," ").concat(n,` |
| 161 |
L `).concat(e," ").concat(n+i,` |
| 162 |
L `).concat(e-i," ").concat(n,` |
| 163 |
Z`);break;case"line":o="M ".concat(e-(i/=1.1)," ").concat(n,` |
| 164 |
L `).concat(e+i," ").concat(n);break;default:i*=2,o="M ".concat(e,", ").concat(n,` |
| 165 |
m -`).concat(i/2,`, 0 |
| 166 |
a `).concat(i/2,",").concat(i/2," 0 1,0 ").concat(i,`,0 |
| 167 |
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 he.isNumber(n)||(i=0,n=0),this.drawMarkerShape(e,n,s==null?void 0:s.shape,i,tt(tt({},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}(),bs=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 k=_;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]),k=h),f=!0,(k=o.indexOf(k))!==-1&&o.splice(k,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 k=o.config.yaxis[o.globals.seriesYAxisReverseMap[_]],C=b<0?-1:1;return b=Math.abs(b),k.logarithmic&&(b=i.getBaseLog(k.logBase,b)),-C*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}(),Z2=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e}return ct(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 bs(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}(),A_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Z2(this.annoCtx)}return ct(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(he.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,k=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:"")});k.attr({rel:s}),n.appendChild(k.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}(),ni=function(){function t(e){lt(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 ct(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(Ns(s.months)),r=[""].concat(Ns(s.shortMonths)),a=[""].concat(Ns(s.days)),l=[""].concat(Ns(s.shortDays));function c(T,I){var L=T+"";for(I=I||2;L.length<I;)L="0"+L;return L}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 k=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+_)).replace(/(^|[^\\])TT+/g,"$1"+k)).replace(/(^|[^\\])T/g,"$1"+k.charAt(0));var C=k.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+C)).replace(/(^|[^\\])t/g,"$1"+C.charAt(0));var x=-e.getTimezoneOffset(),S=i||!x?"Z":x>0?"+":"-";if(!i){var M=(x=Math.abs(x))%60;S+=c(Math.floor(x/60))+":"+c(M)}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=he.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}(),Cv=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return ct(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 ni(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(he.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(he.isNumber(s)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(he.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}(),Wc=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 Cv(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i,dateFormatter:new ni(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[i],{i,dateFormatter:new ni(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 k=new Ne(this.ctx),C={};C=l.globals.rotateXLabels&&a?k.getTextRects(u,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):k.getTextRects(u,parseInt(r,10));var x=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&x)&&(u=""),{x:s,text:u,textRect:C,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 bs(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 Ne(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}(),E_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(this.annoCtx),this.axesUtils=new Wc(this.annoCtx)}return ct(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}(),M_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(this.annoCtx)}return ct(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(he.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}(),uj={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"}}},Iu=function(){function t(){lt(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 ct(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:[uj],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}(),T_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.graphics=new Ne(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Z2(this),this.xAxisAnnotations=new A_t(this),this.yAxisAnnotations=new E_t(this),this.pointsAnnotations=new M_t(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 ct(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,k=_===void 0?".apexcharts-svg":_,C=e.paddingLeft,x=C===void 0?4:C,S=e.paddingRight,M=S===void 0?4:S,P=e.paddingBottom,T=P===void 0?2:P,I=e.paddingTop,L=I===void 0?2:I,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(k);N&&N.appendChild(R.node);var F=R.bbox();if(o){var B=this.graphics.drawRect(F.x-x,F.y-L,F.width+x+M,F.height+T+L,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 Iu,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=he.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:he.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=he.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}(),ek=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 Cv(s).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new ni(s).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var b="",_="",k=l.globals.colors[i];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var C=new ni(s);b=C.formatDate(C.getDate(c),l.config.tooltip.x.format),_=C.formatDate(C.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:k,seriesName:h}},tk=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"> |
| 168 |
`.concat(i,` |
| 169 |
</span> <span class="separator">-</span> <span class="value end-value"> |
| 170 |
`).concat(o,` |
| 171 |
</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>"},w1=function(){function t(e){lt(this,t),this.opts=e}return ct(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(),he.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(),tt(tt({},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=ek(tt(tt({},n),{},{isTimeline:!0})),i=s.color,o=s.seriesName,r=s.ylabel,a=s.startVal,l=s.endVal;return tk(tt(tt({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var s=ek(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return tk(tt(tt({},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=ek(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return tk(tt(tt({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return he.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 tt(tt({},e),{},{plotOptions:tt(tt({},e.plotOptions),{},{bar:tt(tt({},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 he.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 he.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"> |
| 172 |
`.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][s],`</strong> |
| 173 |
</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}(),k1=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(e){var n=e.responsiveOverride,s=this.opts,i=new Iu,o=new w1(s);this.chartType=s.chart.type,s=this.extendYAxis(s),s=this.extendAnnotations(s);var r=i.init(),a={};if(s&&ep(s)==="object"){var l,c,u,d,h,f,p,m,b,_,k={};k=["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&&(k=o.funnel()),s.chart.stacked&&s.chart.type==="bar"&&(k=o.stackedBars()),(u=s.chart.brush)!==null&&u!==void 0&&u.enabled&&(k=o.brush(k)),(d=s.plotOptions)!==null&&d!==void 0&&(h=d.line)!==null&&h!==void 0&&h.isSlopeChart&&(k=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,k,s)).chart.sparkline)!==null&&m!==void 0&&m.enabled||(b=window.Apex.chart)!==null&&b!==void 0&&(_=b.sparkline)!==null&&_!==void 0&&_.enabled)&&(k=o.sparkline(k)),a=he.extend(r,k)}var C=he.extend(a,window.Apex);return r=he.extend(C,s),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,s){var i,o,r=new w1(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 Iu;(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=he.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[he.extend(s.yAxis,e.yaxis)]:e.yaxis=he.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=he.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 Iu;return e.annotations.yaxis=he.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new Iu;return e.annotations.xaxis=he.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new Iu;return e.annotations.points=he.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}(),dj=function(){function t(){lt(this,t)}return ct(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=he.extend({},e),n.initialSeries=he.clone(e.series),n.lastXAxis=he.clone(n.initialConfig.xaxis),n.lastYAxis=he.clone(n.initialConfig.yaxis),n}}]),t}(),P_t=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(){var e=new k1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new dj().init(e)}}}]),t}(),Ur=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return ct(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");Ne.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),Ne.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=Em(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 k=d;if(d.indexOf("rgb")===-1?d.indexOf("#")===-1?k=d:d.length<9&&(k=he.hexToRgba(d,b)):d.indexOf("rgba")>-1?b=he.getOpacityFromRGBA(d):k=he.hexToRgba(he.rgb2hex(d),b),e.opacity&&(b=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:b,defaultColor:k})),_){var C=Ns(c.fill.gradient.colorStops)||[],x=c.fill.gradient.type;u&&(C[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),x="vertical"),l=this.handleGradientFill({type:x,fillConfig:e.fillConfig,fillColor:d,fillOpacity:b,colorStops:C,i:this.seriesIndex})}if(m==="image"){var S=c.fill.image.src,M=e.patternID?e.patternID:"",P="pattern".concat(o.globals.cuid).concat(e.seriesNumber+1).concat(M);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:k;return e.solid&&(r=k),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 Ne(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=tt(tt({},l),o));var c=this.opts,u=new Ne(this.ctx),d=new he;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=he.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?he.rgb2hex(s):s):d.shadeColor(parseFloat(l.gradient.shadeIntensity),s.indexOf("rgb")>-1?he.rgb2hex(s):s);else if(l.gradient.gradientToColors[c.seriesNumber]){var b=l.gradient.gradientToColors[c.seriesNumber];h=b,b.indexOf("rgba")>-1&&(m=he.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=he.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=he.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),Vp=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 Ne(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=!he.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(he.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 Ne(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}(),hj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return ct(t,[{key:"draw",value:function(e,n,s){var i=this.w,o=new Ne(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 k=this.drawPoint(b,_,p,r,h,n);u.add(k)}c.add(u)}}},{key:"drawPoint",value:function(e,n,s,i,o,r){var a=this.w,l=i,c=new Lp(this.ctx),u=new ai(this.ctx),d=new Ur(this.ctx),h=new Vp(this.ctx),f=new Ne(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 k=a.config.chart.animations.speed;c.animateMarker(b,k,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}(),tp=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"dataLabelsCorrection",value:function(e,n,s,i,o,r,a){var l=this.w,c=!1,u=new Ne(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 Ne(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 k=u.globals.series[o][m];s==="rangeArea"&&(k=a?u.globals.seriesRangeStart[o][m]:u.globals.seriesRangeEnd[o][m]);var C="",x=function(M){return u.config.dataLabels.formatter(M,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(C=x(k=u.globals.seriesZ[o][m]),p=i.y[_],p=new hj(this.ctx).centerTextInBubble(p,o,m).y):k!==void 0&&(C=x(k));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:C,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 Ne(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 k={x:i,y:o,drawnextLabel:!0,textRects:null};m&&(k=this.dataLabelsCorrection(i,o,l,r,a,p,parseInt(h.style.fontSize,10))),n.globals.zoomed||(i=k.x,o=k.y),k.textRects&&(i<-20-k.textRects.width||i>n.globals.gridWidth+k.textRects.width+30)&&(l="");var C=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)&&(C=n.globals.dataLabels.style.colors[a]),typeof C=="function"&&(C=C({series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n})),f&&(C=f);var x=h.offsetX,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(x=0,S=0),n.globals.isSlopeChart&&(a!==0&&(x=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&(x=0)),k.drawnextLabel){if((_=s.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+x,y:o+S,foreColor:C,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 M=h.dropShadow;new ai(this.ctx).dropShadow(_,M)}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 Ne(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}(),pr=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return ct(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(he.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=he.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 Ne(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}(),WS=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new bs(this.ctx)}return ct(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),n=new pr(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 pr(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(he.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(he.parseNumber(e[n].data[r][4])):this.twoDSeries.push(he.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 ni(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(he.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(he.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=he.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 ni(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=Ns(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 he.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 w1(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 pr(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}(),n_=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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(/ /g," "))})})}},{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?` |
| 174 |
`:a,c=this.w;s||(s=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(S,M){return c.globals.collapsedSeriesIndices.indexOf(M)===-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():he.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,Ns(s.map(function(S){return S.data?S.data.length:0}))),_=new WS(this.ctx),k=new Wc(this.ctx),C=function(S){var M="";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 pr(n.ctx).getActiveConfigSeriesIndex();M=P(c.globals.labels[S],{seriesIndex:T,dataPointIndex:S,w:c})}else M=k.getLabel(c.globals.labels,c.globals.timescaleLabels,0,S).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?M=c.config.xaxis.categories[S]:c.config.labels.length&&(M=c.config.labels[S]))}else M=c.config.labels[S];return M===null?"nullvalue":(Array.isArray(M)&&(M=M.join(" ")),he.isNumber(M)?M:M.split(r).join(""))},x=function(S,M){if(u.length&&M===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Ns(Array(b)).map(function(){return""});for(var P=0;P<S.data.length;P++){u=[];var T=C(P);if(T!=="nullvalue"){if(T||(_.isFormatXY()?T=s[M].data[P].x:_.isFormat2DArray()&&(T=s[M].data[P]?s[M].data[P][0]:"")),M===0){u.push(p(T));for(var I=0;I<c.globals.series.length;I++){var L,V=_.isFormatXY()?(L=s[I].data[P])===null||L===void 0?void 0:L.y:f[I][P];u.push(m(V))}}(c.config.chart.type==="candlestick"||S.type&&S.type==="candlestick")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),(c.config.chart.type==="boxPlot"||S.type&&S.type==="boxPlot")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleM[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),c.config.chart.type==="rangeBar"&&(u.pop(),u.push(c.globals.seriesRangeStart[M][P]),u.push(c.globals.seriesRangeEnd[M][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,M){var P=(S.name?S.name:"series-".concat(M))+"";c.globals.axisCharts&&u.push(P.split(r).join("")?P.split(r).join(""):"series-".concat(M))}),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,M){c.globals.axisCharts?x(S,M):((u=[]).push(p(c.globals.labels[M])),u.push(m(f[M])),d.push(u.join(r)))}):function(){var S=new Set,M={};s.forEach(function(P,T){P==null||P.data.forEach(function(I){var L,V;if(_.isFormatXY())L=I.x,V=I.y;else{if(!_.isFormat2DArray())return;L=I[0],V=I[1]}M[L]||(M[L]=Array(s.length).fill("")),M[L][T]=m(V),S.add(L)})}),u.length&&d.push(u.join(r)),Array.from(S).sort().forEach(function(P){d.push([p(P),M[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}(),C1=function(){function t(e,n){lt(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var s=this.w;this.axesUtils=new Wc(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 ct(t,[{key:"drawXaxis",value:function(){var e=this.w,n=new Ne(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,k=h.globals.padHorizontal,C=i.length,x=h.config.xaxis.type==="category"?h.globals.dataPoints:C;if(x===0&&C>x&&(x=C),o){var S=Math.max(Number(h.config.xaxis.tickAmount)||1,x>1?x-1:x);a=h.globals.gridWidth/Math.min(S,C-1),k=k+r(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/x,k=k+r(0,a)+h.config.xaxis.labels.offsetX;for(var M=function(T){var I=k-r(T,a)/2+h.config.xaxis.labels.offsetX;T===0&&C===1&&a/2===k&&x===1&&(I=h.globals.gridWidth/2);var L=l.axesUtils.getLabel(i,h.globals.timescaleLabels,I,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)),L=h.config.xaxis.tickAmount!==void 0&&h.config.xaxis.tickAmount!=="dataPoints"&&h.config.xaxis.type!=="datetime"?l.axesUtils.checkLabelBasedOnTickamount(T,L,C):l.axesUtils.checkForOverflowingLabels(T,L,C,u,d),h.config.xaxis.labels.show){var R=n.drawText({x:L.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:L.text,textAnchor:"middle",fontWeight:L.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(L.text)?L.text.join(" "):L.text,R.node.appendChild(N),L.text!==""&&(u.push(L.text),d.push(L))}}T<C-1&&(k+=r(T+1,a))},P=0;P<=C-1;P++)M(P)}},{key:"drawXaxisInversed",value:function(e){var n,s,i=this,o=this.w,r=new Ne(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 M=u[S]===void 0?"":u[S];M=h(M,{seriesIndex:e,dataPointIndex:S,w:o});var P=i.axesUtils.getYAxisForeColor(f.style.colors,e),T=0;Array.isArray(M)&&(T=M.length/2*parseInt(f.style.fontSize,10));var I=f.offsetX-15,L="end";i.yaxis.opposite&&(L="start"),o.config.yaxis[0].labels.align==="left"?(I=f.offsetX,L="start"):o.config.yaxis[0].labels.align==="center"?(I=f.offsetX,L="middle"):o.config.yaxis[0].labels.align==="right"&&(L="end");var V=r.drawText({x:I,y:s+n+f.offsetY-T,text:M,textAnchor:L,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(M)?M.join(" "):M,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 k=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(k=o.globals.gridWidth);var C=o.config.xaxis.axisBorder;if(C.show){var x=r.drawLine(o.globals.padHorizontal+C.offsetX+k,1+C.offsetY,o.globals.padHorizontal+C.offsetX+k,o.globals.gridHeight+C.offsetY,C.color,0);this.elgrid&&this.elgrid.elGridBorders&&o.config.grid.show?this.elgrid.elGridBorders.add(x):l.add(x)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,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 Ne(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 Ne(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}(),fj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new Wc(e),this.isRangeBar=n.globals.seriesRange.length&&n.globals.isBarHorizontal,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return ct(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,s=new Ne(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 Ne(this.ctx),i=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Ns(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 C1(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 Ne(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 Ne(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,k=p.x2,C=p.y2,x=0;x<m;x++)b=n.xaxisLabels[x].position,k=n.xaxisLabels[x].position,n._drawGridLines({i:x,x1:b,y1:_,x2:k,y2:C,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,k=p.x2,C=p.y2,x=0;x<m+(o.globals.isXNumeric?0:1);x++)x===0&&m===1&&o.globals.dataPoints===1&&(k=b=o.globals.gridWidth/2),n._drawGridLines({i:x,x1:b,y1:_,x2:k,y2:C,xCount:s,parent:n.elgridLinesV}),k=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 C1(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 Ne(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,_,k,C){for(var x=0,S=0;x<m;x++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,x1:b,y1:_,x2:k,y2:C,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}(),pj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new bs(this.ctx)}return ct(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)),he.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||!he.isNumber(e)&&!he.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=he.isNumber(s.min)?s.min:0,n=he.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 k=(_=Math.abs(n-e))/b,C=k,x=Math.floor(Math.log10(C)),S=Math.pow(10,x),M=Math.ceil(C/S);if(k=C=(M=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][M])*S,u.isBarHorizontal&&s.stepSize&&s.type!=="datetime"?(k=s.stepSize,d=!0):d&&(k=s.stepSize),d&&s.forceNiceScale){var P=Math.floor(Math.log10(k));k*=Math.pow(10,x-P)}if(o&&r){var T=_/b;if(h)if(d)if(he.mod(_,k)!=0){var I=he.getGCD(k,T);k=T/I<10?I:T}else he.mod(k,T)==0?k=T:(T=k,h=!1);else k=T;else if(d)he.mod(_,k)==0?T=k:k=T;else if(he.mod(_,k)==0)T=k;else{T=_/(b=Math.ceil(_/k));var L=he.getGCD(_,k);_/L<i&&(T=L),k=T}b=Math.round(_/k)}else{if(o||r){if(r)if(h)e=n-k*b;else{var V=e;e=k*Math.floor(e/k),Math.abs(n-e)/he.getGCD(_,k)>i&&(e=n-k*f,e+=k*Math.floor((V-e)/k))}else if(o)if(h)n=e+k*b;else{var R=n;n=k*Math.ceil(n/k),Math.abs(n-e)/he.getGCD(_,k)>i&&(n=e+k*f,n+=k*Math.ceil((R-n)/k))}}else if(u.isMultipleYAxis&&h){var N=k*Math.floor(e/k),F=N+k*b;F<n&&(k*=2),F=n,n=(e=N)+k*b,_=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=k*b),n<0&&-n<Math.abs(N-e)&&(n=0,e=-k*b)}else e=k*Math.floor(e/k),n=k*Math.ceil(n/k);_=Math.abs(n-e),k=he.getGCD(_,k),b=Math.round(_/k)}if(h||o||r||(b=Math.ceil((_-l)/(k+l)))>16&&he.getPrimeFactors(b).length<2&&b++,!h&&s.forceNiceScale&&u.yValueDecimal===0&&b>_&&(b=_,k=Math.round(_/b)),b>i&&(!h&&!d||s.forceNiceScale)){var B=he.getPrimeFactors(b),z=B.length-1,G=b;e:for(var K=0;K<z;K++)for(var X=0;X<=z-K;X++){for(var H=Math.min(X+K,z),Q=G,ne=1,Z=X;Z<=H;Z++)ne*=B[Z];if((Q/=ne)<i){G=Q;break e}}k=G===b?_:_/G,b=Math.round(_/k)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=b);var ae=e-k,ge=k*l;do ae+=k,m.push(he.stripNumber(ae,7));while(n-ae>ge);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=he.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));he.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&&he.isNumber(s)&&n!==Number.MAX_VALUE&&he.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&&he.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 k=new Array(s.dataPoints).fill(0),C=[],x=[],S=[];c.forEach(function(){C.push(k.map(function(){return Number.MIN_VALUE})),x.push(k.map(function(){return Number.MIN_VALUE})),S.push(k.map(function(){return Number.MIN_VALUE}))});for(var M=function(T){!u&&n.series[a[T]].type&&(u=n.series[a[T]].type);var I=a[T];d=n.series[I].group?n.series[I].group:"axis-".concat(l),!(s.collapsedSeriesIndices.indexOf(I)<0&&s.ancillaryCollapsedSeriesIndices.indexOf(I)<0)||(s.allSeriesCollapsed=!1,c.forEach(function(L,V){if(n.series[I].group===L)for(var R=0;R<s.series[I].length;R++){var N=s.series[I][R];N>=0?x[V][R]+=N:S[V][R]+=N,C[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++)M(P);u||(u=n.chart.type),u==="bar"||u==="column"?c.forEach(function(T,I){h=Math.min(h,Math.min.apply(null,S[I])),f=Math.max(f,Math.max.apply(null,x[I]))}):(c.forEach(function(T,I){p=Math.min(p,Math.min.apply(null,C[I])),m=Math.max(m,Math.max.apply(null,C[I]))}),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(k,C,x){return x.indexOf(k)===C}),e.setYScaleForIndex(l,h,f),a.forEach(function(k){o[k]=s.yAxisScale[l].niceMin,r[k]=s.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),t}(),Kx=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.scales=new pj(e)}return ct(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,M){return S+M.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var _=0,k=c[m].length-1;if(h){if(o.xaxis.min)for(;_<k&&r.seriesX[m][_]<o.xaxis.min;_++);if(o.xaxis.max)for(;k>_&&r.seriesX[m][k]>o.xaxis.max;k--);}for(var C=_;C<=k&&C<r.series[m].length;C++){var x=c[m][C];if(x!==null&&he.isNumber(x)){switch(d[m][C]!==void 0&&(a=Math.max(a,d[m][C]),n=Math.min(n,d[m][C])),u[m][C]!==void 0&&(n=Math.min(n,u[m][C]),s=Math.max(s,u[m][C])),b){case"candlestick":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleH[m][C]),n=Math.min(n,r.seriesCandleL[m][C]));break;case"boxPlot":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleC[m][C]),n=Math.min(n,r.seriesCandleO[m][C]))}b&&b!=="candlestick"&&b!=="boxPlot"&&b!=="rangeArea"&&b!=="rangeBar"&&(a=Math.max(a,r.series[m][C]),n=Math.min(n,r.series[m][C])),r.seriesGoals[m]&&r.seriesGoals[m][C]&&Array.isArray(r.seriesGoals[m][C])&&r.seriesGoals[m][C].forEach(function(S){a=Math.max(a,S.value),n=Math.min(n,S.value)}),s=a,he.isFloat(x)&&(x=he.noExponents(x),r.yValueDecimal=Math.max(r.yValueDecimal,x.toString().split(".")[1].length)),l>u[m][C]&&u[m][C]<0&&(l=u[m][C])}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&&he.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&&he.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 ni(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&&he.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=DU(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}(),YS=function(){function t(e,n){lt(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 Wc(e)}return ct(t,[{key:"drawYaxis",value:function(e){var n=this.w,s=new Ne(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 k=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),C=this.axesUtils.getYAxisForeColor(i.colors,e),x=Array.isArray(C)?C[m]:C,S=he.listToArray(n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(P){return P.textContent}),M=s.drawText({x:_,y:p,text:S.includes(b)&&!n.config.yaxis[e].labels.showDuplicates?"":b,textAnchor:k,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});c.add(M),this.addTooltip(M,b),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(s,M,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 Ne(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 Ne(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 Ne(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 Ne(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;he.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=he.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}(),I_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.documentEvent=he.bind(this.documentEvent,this)}return ct(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}(),L_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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=he.extend(uj,s);this.w.globals.locale=i.options}}]),t}(),O_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawAxis",value:function(e,n){var s,i,o=this,r=this.w.globals,a=this.w.config,l=new C1(this.ctx,n),c=new YS(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}(),Zx=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,n=new Ne(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,k=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(k=n.drawGradient("vertical",a,l,c,u,null,d,null));var C=n.drawRect();e.config.xaxis.crosshairs.width===1&&(C=n.drawLine());var x=e.globals.gridHeight;(!he.isNumber(x)||x<0)&&(x=0);var S=e.config.xaxis.crosshairs.width;(!he.isNumber(S)||S<0)&&(S=0),C.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:S,height:x,fill:k,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&&(C=s.dropShadow(C,{left:f,top:p,blur:m,color:b,opacity:_})),e.globals.dom.elGraphical.add(C)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,n=new Ne(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}(),D_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 k1({}),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=he.clone(s.globals.initialConfig);h.series=he.clone(s.config.series);var f=bs.extendArrayProps(r,h,s);c=he.extend(f,c),c=he.extend(s.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=bs.extendArrayProps(r,o[p].options,s),c=he.extend(s.config,c),n.overrideResponsiveOptions(c))};if(e){var l=bs.extendArrayProps(r,e,s);l=he.extend(s.config,l),a(l=he.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new k1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),R_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return ct(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 he;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var s=Ns(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}(),V_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 Ne(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}(),F_t=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(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({},he.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=he.getLargestStringFromArr(s),o=new Ne(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,Ns(i));s=n[i.indexOf(o)]}return s}}]),t}(),N_t=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(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=he.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 Cv(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new ni(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new ni(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Ne(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=he.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Ne(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 Ne(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 Ne(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}(),B_t=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,n=this.w,s=[],i=10,o=new Wc(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(x,S){var M,P;return((M=String(d(x,l)))===null||M===void 0?void 0:M.length)>((P=String(d(S,l)))===null||P===void 0?void 0:P.length)?x: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=he.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var b=new Ne(e.dCtx.ctx),_="rotate(".concat(r.labels.rotate," 0 0)"),k=b.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,_,!1),C=k;f!==p&&(C=b.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,_,!1)),s.push({width:(u>C.width||u>k.width?u:C.width>k.width?C.width:k.width)+i,height:C.height>k.height?C.height:k.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 Ne(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 Wc(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}(),z_t=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(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 Wc(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}(),s_=function(){function t(e){lt(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 F_t(this),this.dimYAxis=new B_t(this),this.dimXAxis=new N_t(this),this.dimGrid=new z_t(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return ct(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,Ns(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=DU(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 YS(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}(),H_t=function(){function t(e){lt(this,t),this.w=e.w,this.lgCtx=e}return ct(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(` |
| 175 |
.apexcharts-flip-y { |
| 176 |
transform: scaleY(-1) translateY(-100%); |
| 177 |
transform-origin: top; |
| 178 |
transform-box: fill-box; |
| 179 |
} |
| 180 |
.apexcharts-flip-x { |
| 181 |
transform: scaleX(-1); |
| 182 |
transform-origin: center; |
| 183 |
transform-box: fill-box; |
| 184 |
} |
| 185 |
.apexcharts-legend { |
| 186 |
display: flex; |
| 187 |
overflow: auto; |
| 188 |
padding: 0 10px; |
| 189 |
} |
| 190 |
.apexcharts-legend.apexcharts-legend-group-horizontal { |
| 191 |
flex-direction: column; |
| 192 |
} |
| 193 |
.apexcharts-legend-group { |
| 194 |
display: flex; |
| 195 |
} |
| 196 |
.apexcharts-legend-group-vertical { |
| 197 |
flex-direction: column-reverse; |
| 198 |
} |
| 199 |
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { |
| 200 |
flex-wrap: wrap |
| 201 |
} |
| 202 |
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { |
| 203 |
flex-direction: column; |
| 204 |
bottom: 0; |
| 205 |
} |
| 206 |
.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 { |
| 207 |
justify-content: flex-start; |
| 208 |
align-items: flex-start; |
| 209 |
} |
| 210 |
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { |
| 211 |
justify-content: center; |
| 212 |
align-items: center; |
| 213 |
} |
| 214 |
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { |
| 215 |
justify-content: flex-end; |
| 216 |
align-items: flex-end; |
| 217 |
} |
| 218 |
.apexcharts-legend-series { |
| 219 |
cursor: pointer; |
| 220 |
line-height: normal; |
| 221 |
display: flex; |
| 222 |
align-items: center; |
| 223 |
} |
| 224 |
.apexcharts-legend-text { |
| 225 |
position: relative; |
| 226 |
font-size: 14px; |
| 227 |
} |
| 228 |
.apexcharts-legend-text *, .apexcharts-legend-marker * { |
| 229 |
pointer-events: none; |
| 230 |
} |
| 231 |
.apexcharts-legend-marker { |
| 232 |
position: relative; |
| 233 |
display: flex; |
| 234 |
align-items: center; |
| 235 |
justify-content: center; |
| 236 |
cursor: pointer; |
| 237 |
margin-right: 1px; |
| 238 |
} |
| 239 |
|
| 240 |
.apexcharts-legend-series.apexcharts-no-click { |
| 241 |
cursor: auto; |
| 242 |
} |
| 243 |
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { |
| 244 |
display: none !important; |
| 245 |
} |
| 246 |
.apexcharts-inactive-legend { |
| 247 |
opacity: 0.45; |
| 248 |
} |
| 249 |
|
| 250 |
`);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 Ne(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=he.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=he.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}(),mj=function(){function t(e){lt(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 H_t(this)}return ct(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 Vp(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 Ne(this.ctx).drawMarker(0,0,tt(tt({},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 k=0;k<s.globals.collapsedSeries.length;k++)s.globals.collapsedSeries[k].index===f&&(b=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(var C=0;C<s.globals.ancillaryCollapsedSeriesIndices.length;C++)s.globals.ancillaryCollapsedSeriesIndices[C]===f&&(_=!0);var x=e.createLegendMarker({i:f,fillcolor:r});Ne.setAttrs(x,{rel:f+1,"data:collapsed":b||_}),(b||_)&&x.classList.add("apexcharts-inactive-legend");var S=document.createElement("div"),M=document.createElement("span");M.classList.add("apexcharts-legend-text"),M.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),M.style.color=P,M.style.fontSize=parseFloat(s.config.legend.fontSize)+"px",M.style.fontWeight=s.config.legend.fontWeight,M.style.fontFamily=i||s.config.chart.fontFamily,Ne.setAttrs(M,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":b||_}),S.appendChild(x),S.appendChild(M);var T=new bs(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(I,L){var V;I.includes((V=s.config.series[f])===null||V===void 0?void 0:V.name)&&(s.globals.dom.elLegendWrap.appendChild(u[L]),u[L].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":"",Ne.setAttrs(S,{rel:f+1,seriesName:he.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 s_(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 s_(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 pr(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&s&&new pr(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}(),gj=function(){function t(e){lt(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 ct(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"> |
| 251 |
<path d="M0 0h24v24H0z" fill="none"/> |
| 252 |
<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"/> |
| 253 |
</svg> |
| 254 |
`),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 255 |
<path d="M0 0h24v24H0z" fill="none"/> |
| 256 |
<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"/> |
| 257 |
</svg> |
| 258 |
`);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"> |
| 259 |
<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"/> |
| 260 |
<path d="M0 0h24v24H0V0z" fill="none"/> |
| 261 |
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/> |
| 262 |
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> |
| 263 |
<path d="M0 0h24v24H0z" fill="none"/> |
| 264 |
<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"/> |
| 265 |
</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"> |
| 266 |
<defs> |
| 267 |
<path d="M0 0h24v24H0z" id="a"/> |
| 268 |
</defs> |
| 269 |
<clipPath id="b"> |
| 270 |
<use overflow="visible" xlink:href="#a"/> |
| 271 |
</clipPath> |
| 272 |
<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"/> |
| 273 |
</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"> |
| 274 |
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/> |
| 275 |
<path d="M0 0h24v24H0z" fill="none"/> |
| 276 |
</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&&he.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Ne.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),Ne.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,Ne.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=he.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 n_(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(he.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}(),U_t=function(t){bv(n,gj);var e=yv(n);function n(s){var i;return lt(this,n),(i=e.call(this,s)).ctx=s,i.w=s.w,i.dragged=!1,i.graphics=new Ne(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 ct(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 Ws(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(tt(tt({},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}),Ne.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}),Ne.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)),_=tt(tt({},_=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 _,k,C,x,S=o.gridRect.getBoundingClientRect(),M=f.node.getBoundingClientRect();r.globals.isRangeBar?(_=r.globals.yAxisScale[0].niceMin+(M.left-S.left)*h.invertedYRatio,k=r.globals.yAxisScale[0].niceMin+(M.right-S.left)*h.invertedYRatio,C=0,x=1):(_=r.globals.xAxisScale.niceMin+(M.left-S.left)*h.xRatio,k=r.globals.xAxisScale.niceMin+(M.right-S.left)*h.xRatio,C=r.globals.yAxisScale[0].niceMin+(S.bottom-M.bottom)*h.yRatio[0],x=r.globals.yAxisScale[0].niceMax-(M.top-S.top)*h.yRatio[0]);var P={xaxis:{min:_,max:k},yaxis:{min:C,max:x}};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(M,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=he.clone(r.globals.initialConfig.yaxis),_=he.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(M,P){b[P].min=m[P],b[P].max=p[P]}),c){var k=c.getBeforeZoomRange(_,b);k&&(_=k.xaxis?k.xaxis:_,b=k.yaxis?k.yaxis:b)}var C={xaxis:_};r.config.chart.group||(C.yaxis=b),a.ctx.updateHelpers._updateOptions(C,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(_,b)}else if(r.globals.selectionEnabled){var x,S=null;x={min:h,max:f},o!=="xy"&&o!=="y"||(S=he.clone(r.config.yaxis)).forEach(function(M,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:x,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=he.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}(),vj=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return ct(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,k=null,C=r.globals.seriesXvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})}),x=r.globals.seriesYvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})});if(r.globals.isXNumeric){var S=this.ttCtx.getElGrid().getBoundingClientRect(),M=f*(S.width/l),P=p*(S.height/c);_=(k=this.closestInMultiArray(M,P,C,x)).index,m=k.j,_!==null&&r.globals.hasNullValues&&(C=r.globals.seriesXvalues[_],m=(k=this.closestInArray(M,C)).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 Ns(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=Ns(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 Ne(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}(),j_t=function(){function t(e){lt(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new vj(e)}return ct(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 k=function(S,M){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?M:S;if(u.globals.axisCharts){var I=function(R){var N,F,B,z;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||(z=B[R])===null||z===void 0?void 0:z[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=I(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 L,V=c==null||(L=c.target)===null||L===void 0?void 0:L.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=I(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],tt(tt({},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:_})},C=0,x=u.globals.series.length-1;C<u.globals.series.length;C++,x--)k(C,x)}},{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 k=i[n].querySelector(".apexcharts-tooltip-text-y-value");k&&(k.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 C=i[n].querySelector(".apexcharts-tooltip-text-goals-label"),x=i[n].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&c.globals.seriesGoals[n]){var S=function(){var T="<div >",I="<div>";h.forEach(function(L,V){T+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(L.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(L.attrs.name,"</div>"),I+="<div>".concat(L.val,"</div>")}),C.innerHTML=T+"</div>",x.innerHTML=I+"</div>"};a?c.globals.seriesGoals[n][s]&&Array.isArray(c.globals.seriesGoals[n][s])?S():(C.innerHTML="",x.innerHTML=""):S()}else C.innerHTML="",x.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 M=i[n].querySelector(".apexcharts-tooltip-marker"),P=i[n].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(M.style.display="none",P.style.display="none"):(M.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 WS(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 Cv(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new ni(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}(),yj=function(){function t(e){lt(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return ct(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&&Ne.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Ne.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 Ne(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 Ne(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 pr(this.ctx),c=new Ne(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 k=c.getMarkerPath(o,p,b,u);d[h].setAttribute("d",k)}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 pr(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,`'], |
| 277 |
.apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'], |
| 278 |
.apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'], |
| 279 |
.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}(),W_t=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new yj(e)}return ct(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ne(this.ctx),s=new Vp(this.ctx),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");i=Ns(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(he.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}(),Y_t=function(){function t(e){lt(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 ct(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=he.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 k=m.width,C=parseInt(p.getAttribute("cx"),10),x=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 M=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(L){return o.globals.isXNumeric?C-k/2:n.isVerticalGroupedRangeBar?C+k/2:C-a.dataPointsDividedWidth+k/2},I=function(){return x-a.dataPointsDividedHeight+_/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:r,y1:M?parseInt(M,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=I()):(c=T(),u=s.clientY-b.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=C)<a.xyRatios.baseLineInvertedY&&(c=C-a.tooltipRect.ttWidth),u=I()):(c=T(),u=x)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),q_t=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e}return ct(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}(),UT=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new vj(this),this.tooltipLabels=new j_t(this),this.tooltipPosition=new yj(this),this.marker=new W_t(this),this.intersect=new Y_t(this),this.axesTooltip=new q_t(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 ct(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 C1(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 pr(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(k){return k===!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 Ne(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,_,k,C,x,S,M=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,P=this.w,T=n;e.type==="mouseup"&&this.markerClick(e,s,i),M===null&&(M=this.tConfig.shared);var I=this.tooltipUtil.hasMarkers(s),L=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],z=parseInt(B.getAttribute("i"),10),G=decodeURIComponent(B.getAttribute("data:default-text")),K=R(G,{seriesIndex:M?z:s,dataPointIndex:i,w:P});if(M)B.innerHTML=P.globals.collapsedSeriesIndices.indexOf(z)<0?K:G;else if(B.innerHTML=z===s?K:G,s===z)break}}var X=tt(tt({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:(k=P.globals.seriesRange)===null||k===void 0||(C=k[s])===null||C===void 0||(x=C[i])===null||x===void 0||(S=x.y[0])===null||S===void 0?void 0:S.y2});if(M){if(T.tooltipLabels.drawSeriesTexts(tt(tt({},X),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)V();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var H=new Ne(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 ne=0;ne<Q.length;ne++)H.pathMouseEnter(Q[ne])}}else T.tooltipLabels.drawSeriesTexts(tt({shared:!1},X)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(i,s),I&&T.tooltipPosition.moveMarkers(s,i)}}]),t}(),G_t=function(){function t(e){lt(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 ct(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,k=e.renderedPath,C=this.w,x=new Ne(this.barCtx.ctx),S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[u]:this.barCtx.strokeWidth;C.globals.isXNumeric&&!C.globals.isBarHorizontal?(n=i+parseFloat(p*(_+1)),s=o+parseFloat(f*(_+1))-S):(n=i+parseFloat(p*_),s=o+parseFloat(f*_));var M,P=null,T=i,I=o,L={},V=C.config.dataLabels,R=this.barCtx.barOptions.dataLabels,N=this.barCtx.barOptions.dataLabels.total;b!==void 0&&this.barCtx.isRangeBar&&(s=b,I=b),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,T=m);var F=V.offsetX,B=V.offsetY,z={width:0,height:0};if(C.config.dataLabels.enabled){var G=C.globals.series[l][c];z=x.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(G,tt(tt({},C),{},{seriesIndex:l,dataPointIndex:c,w:C})):C.globals.yLabelFormatters[0](G),parseFloat(V.style.fontSize))}var K={x:i,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:k,bcx:n,bcy:s,barHeight:f,barWidth:p,textRects:z,strokeWidth:S,dataLabelsX:T,dataLabelsY:I,dataLabelsConfig:V,barDataLabelsConfig:R,barTotalDataLabelsConfig:N,offX:F,offY:B};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(K):this.calculateColumnsDataLabelsPosition(K),k.attr({cy:L.bcy,cx:L.bcx,j:c,val:C.globals.series[l][c],barHeight:f,barWidth:p}),M=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:this.barCtx.isRangeBar?[r,a]:C.config.chart.stackType==="100%"?h[u][c]:C.globals.series[u][c],i:u,j:c,barWidth:p,barHeight:f,textRects:z,dataLabelsConfig:V}),C.config.chart.stacked&&N.enabled&&(P=this.drawTotalDataLabels({x:L.totalDataLabelsX,y:L.totalDataLabelsY,barWidth:p,barHeight:f,realIndex:u,textAnchor:L.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:u,j:c}),dataLabelsConfig:V,barTotalDataLabelsConfig:N})),{dataLabels:M,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,tt(tt({},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,k=e.strokeWidth,C=e.offX,x=e.offY,S=c;d=Math.abs(d);var M=n.config.plotOptions.bar.dataLabels.orientation==="vertical",P=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i}).zeroEncounters;c-=k/2;var T=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=u/2:(f=n.globals.isXNumeric?c-u/2+C:c-T+u/2+C,P>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=u*P)),M&&(f=f+h.height/2-k/2-2);var I=n.globals.series[s][i]<0,L=l;switch(this.barCtx.isReversed&&(L=l+(I?d:-d)),b.position){case"center":p=M?I?L-d/2+x:L+d/2-x:I?L-d/2+h.height/2+x:L+d/2+h.height/2-x;break;case"bottom":p=M?I?L-d+x:L+d-x:I?L-d+h.height+k+x:L+d-h.height/2+k-x;break;case"top":p=M?I?L+x:L-x:I?L-h.height/2-x:L+h.height+x}if(this.barCtx.lastActiveBarSerieIndex===o&&_.enabled){var V=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),m.fontSize);r=I?L-V.height/2-x-_.offsetY+18:L+V.height+x+_.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+k:p+h.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-k)),{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,k=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var C,x,S=a-(this.barCtx.isRangeBar?0:k)+l/2+u.height/2+_-3,M="start",P=n.globals.series[i][o]<0,T=s;switch(this.barCtx.isReversed&&(T=s+(P?-c:c),M=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 I=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),f.fontSize);P?(C=T-h-b-m.offsetX,M="end"):C=T+b+m.offsetX+(this.barCtx.isReversed?-(c+h):h),x=S-u.height/2+I.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:C,totalDataLabelsY:x,totalDataLabelsAnchor:M}}},{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 tp(this.barCtx.ctx),p=new Ne(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 k="";i!==void 0&&(k=m(i,tt(tt({},d),{},{seriesIndex:o,dataPointIndex:r,w:d}))),!i&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(k="");var C=d.globals.series[o][r]<0,x=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(x==="top"&&(u.textAnchor=C?"end":"start"),x==="center"&&(u.textAnchor="middle"),x==="bottom"&&(u.textAnchor=C?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<p.getTextRects(k,parseFloat(u.style.fontSize)).width&&(k=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(c)&&(k=""):a.height/1.6>Math.abs(l)&&(k=""));var S=tt({},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:k,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 Ne(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}(),X_t=function(){function t(e){lt(this,t),this.w=e.w,this.barCtx=e}return ct(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+he.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],_=Em(c);try{for(_.s();!(p=_.n()).done;){var k=p.value;a[k][l]=k===m?"bottom":k===b?"top":"none"}}catch(z){_.e(z)}finally{_.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var C,x=Math.max.apply(Math,u),S=Math.min.apply(Math,u),M=Em(u);try{for(M.s();!(C=M.n()).done;){var P=C.value;a[P][l]=P===x?"bottom":P===S?"top":"none"}}catch(z){M.e(z)}finally{M.f()}}else if(c.length>0&&u.length>0){var T,I=c[c.length-1],L=Em(c);try{for(L.s();!(T=L.n()).done;){var V=T.value;a[V][l]=V===I?"top":"none"}}catch(z){L.e(z)}finally{L.f()}var R,N=Math.max.apply(Math,u),F=Em(u);try{for(F.s();!(R=F.n()).done;){var B=R.value;a[B][l]=B===N?"bottom":"none"}}catch(z){F.e(z)}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 Ne(this.barCtx.ctx),d=new pr(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 Ne(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 k=a/2,C=_+k,x=_+b-k,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-k*S,r+=.001+k*S;var M=m.move(C,o),P=m.move(C,o),T=m.line(x,o);if(p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1)),M=M+m.line(C,r)+m.line(x,r)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(C,o)+T+T+T+T+T+m.line(C,o)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).yArrj.push(r-k*S),I.yArrjF.push(Math.abs(o-r+a*S)),I.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,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 Ne(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 k=a/2,C=b+k,x=b+_-k,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+k*S,r+=.001-k*S;var M=m.move(o,C),P=m.move(o,C);p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1));var T=m.line(o,x);if(M=M+m.line(r,C)+m.line(r,x)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(o,C)+T+T+T+T+T+m.line(o,C)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).xArrj.push(r+k*S),I.xArrjF.push(Math.abs(o-r-a*S)),I.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,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((Jb(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,s,r,!1)),Jb(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],tt(tt({},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 Ne(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 Ne(this.barCtx.ctx),p=new he,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,he.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}(),np=function(){function t(e,n){lt(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 pr(this.ctx);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=i.getBarSeriesIndices(),r=new bs(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 X_t(this)}return ct(t,[{key:"draw",value:function(e,n){var s=this.w,i=new Ne(this.ctx),o=new bs(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,k=this.barHelpers.getGroupIndex(_).columnGroupIndex,C=i.group({class:"apexcharts-series",rel:a+1,seriesName:he.escapeString(s.globals.seriesNames[_]),"data:realIndex":_});this.ctx.series.addCollapsedClassToSeries(C,_),e[a].length>0&&(this.visibleI=this.visibleI+1);var x=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[_],this.translationsIndex=_);var M=this.translationsIndex;this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;var P=this.barHelpers.initialPositions();p=P.y,x=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 I=i.group({class:"apexcharts-bar-goals-markers"}),L=i.group({class:"apexcharts-bar-shadows"});s.globals.delayedElements.push({el:L.node}),L.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:M,bc:l},x:f,y:p,strokeWidth:R,elSeries:C};this.isHorizontal?(N=this.drawBarPaths(tt(tt({},F),{},{barHeight:x,zeroW:h,yDivision:u})),S=this.series[a][V]/this.invertedYRatio):(N=this.drawColumnPaths(tt(tt({},F),{},{xDivision:c,barWidth:S,zeroH:d})),x=this.series[a][V]/this.yRatio[M]);var B=this.barHelpers.getPathFillColor(e,a,V,_);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&V>0){var z,G=this.barHelpers.drawBarShadow({color:typeof B.color=="string"&&((z=B.color)===null||z===void 0?void 0:z.indexOf("url"))===-1?B.color:he.hexToRgba(s.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:N});L.add(G),s.config.chart.dropShadow.enabled&&new ai(this.ctx).dropShadow(G,s.config.chart.dropShadow,_)}this.pathArr.push(N);var K=this.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:x,barWidth:S});K&&I.add(K),p=N.y,f=N.x,V>0&&b.push(f+S/2),m.push(p),this.renderSeries(tt(tt({realIndex:_,pathFill:B.color},B.useRangeColor?{lineFill:B.color}:{}),{},{j:V,i:a,columnGroupIndex:k,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:R,elSeries:C,x:f,y:p,series:e,barHeight:Math.abs(N.barHeight?N.barHeight:x),barWidth:Math.abs(N.barWidth?N.barWidth:S),elDataLabelsWrap:T,elGoalsMarkers:I,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"}))}s.globals.seriesXvalues[_]=b,s.globals.seriesYvalues[_]=m,r.add(C)}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,k=e.barWidth,C=e.barXPosition,x=e.barYPosition,S=e.elDataLabelsWrap,M=e.elGoalsMarkers,P=e.elBarShadows,T=e.visibleSeries,I=e.type,L=e.classes,V=this.w,R=new Ne(this.ctx);if(!i){var N=typeof V.globals.stroke.colors[n]=="function"?function(K){var X,H=V.config.stroke.colors;return Array.isArray(H)&&H.length>0&&((X=H[K])||(X=""),typeof X=="function")?X({value:V.globals.series[K][o],dataPointIndex:o,w:V}):X}(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(I,"-area ").concat(L),chartType:I});B.attr("clip-path","url(#gridRectBarMask".concat(V.globals.cuid,")"));var z=V.config.forecastDataPoints;z.count>0&&o>=V.globals.dataPoints-z.count&&(B.node.setAttribute("stroke-dasharray",z.dashArray),B.node.setAttribute("stroke-width",z.strokeWidth),B.node.setAttribute("fill-opacity",z.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 G=new G_t(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:b,realIndex:n,columnGroupIndex:a,barHeight:_,barWidth:k,barXPosition:C,barYPosition:x,renderedPath:B,visibleSeries:T});return G.dataLabels!==null&&S.add(G.dataLabels),G.totalDataLabels&&S.add(G.totalDataLabels),d.add(S),M&&d.add(M),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(_,k){_[f]&&p++,k<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 k=this.barHelpers.getZeroValueEncounters({i:p,j:m}),C=k.nonZeroColumns,x=k.zeroEncounters;C>0&&(a=this.seriesLen*a/C),n=i+a*this.visibleI,n-=a*x}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),he.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}(),jT=function(t){bv(n,np);var e=yv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(s,i){var o=this,r=this.w;this.graphics=new Ne(this.ctx),this.bar=new np(this.ctx,this.xyRatios);var a=new bs(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,k=void 0,C=void 0,x=r.globals.comboCharts?i[p]:p,S=o.barHelpers.getGroupIndex(x),M=S.groupIndex,P=S.columnGroupIndex;o.groupCtx=o[r.globals.seriesGroups[M]];var T=[],I=[],L=0;o.yRatio.length>1&&(o.yaxisIndex=r.globals.seriesYAxisReverseMap[x][0],L=x),o.isReversed=r.config.yaxis[o.yaxisIndex]&&r.config.yaxis[o.yaxisIndex].reversed;var V=o.graphics.group({class:"apexcharts-series",seriesName:he.escapeString(r.globals.seriesNames[x]),rel:p+1,"data:realIndex":x});o.ctx.series.addCollapsedClassToSeries(V,x);var R=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":x}),N=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,B=0,z=o.initialPositions(c,u,b,_,k,C,L);u=z.y,F=z.barHeight,_=z.yDivision,C=z.zeroW,c=z.x,B=z.barWidth,b=z.xDivision,k=z.zeroH,r.globals.barHeight=F,r.globals.barWidth=B,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(ge){return isNaN(ge)})&&(o.groupCtx.prevY[0]=o.groupCtx.prevY[0].map(function(){return k}),o.groupCtx.prevYF[0]=o.groupCtx.prevYF[0].map(function(){return 0}));for(var G=0;G<r.globals.dataPoints;G++){var K=o.barHelpers.getStrokeWidth(p,G,x),X={indexes:{i:p,j:G,realIndex:x,translationsIndex:L,bc:m},strokeWidth:K,x:c,y:u,elSeries:V,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[M]},H=null;o.isHorizontal?(H=o.drawStackedBarPaths(tt(tt({},X),{},{zeroW:C,barHeight:F,yDivision:_})),B=o.series[p][G]/o.invertedYRatio):(H=o.drawStackedColumnPaths(tt(tt({},X),{},{xDivision:b,barWidth:B,zeroH:k})),F=o.series[p][G]/o.yRatio[L]);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),I.push(u);var ne=o.barHelpers.getPathFillColor(s,p,G,x),Z="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[x][G]==="bottom"&&r.globals.series[x][G]>0||o.barHelpers.arrBorderRadius[x][G]==="top"&&r.globals.series[x][G]<0)&&(Z=ae),V=o.renderSeries(tt(tt({realIndex:x,pathFill:ne.color},ne.useRangeColor?{lineFill:ne.color}:{}),{},{j:G,i:p,columnGroupIndex:P,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:K,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[x]=T,r.globals.seriesYvalues[x]=I,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,k=o.j,C=o.realIndex,x=o.translationsIndex,S=0,M=0;M<this.groupCtx.prevXF.length;M++)S+=this.groupCtx.prevXF[M][k];var P;if((P=h.indexOf(m.config.series[C].name))>0){var T=l;this.groupCtx.prevXVal[P-1][k]<0?T=this.series[_][k]>=0?this.groupCtx.prevX[P-1][k]+S-2*(this.isReversed?S:0):this.groupCtx.prevX[P-1][k]:this.groupCtx.prevXVal[P-1][k]>=0&&(T=this.series[_][k]>=0?this.groupCtx.prevX[P-1][k]:this.groupCtx.prevX[P-1][k]-S+2*(this.isReversed?S:0)),i=T}else i=l;c=this.series[_][k]===null?i:i+this.series[_][k]/this.invertedYRatio-2*(this.isReversed?this.series[_][k]/this.invertedYRatio:0);var I=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:k,w:m});return this.barHelpers.barBackground({j:k,i:_,y1:b,y2:r,elSeries:p}),u+=f,{pathTo:I.pathTo,pathFrom:I.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,_,k,x),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,k=i.translationsIndex;if(f.globals.isXNumeric){var C=f.globals.seriesX[_][m];C||(C=0),o=(C-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var x,S=o+u*l,M=0,P=0;P<this.groupCtx.prevYF.length;P++)M+=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 I,L,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 z,G;if(((z=this.groupCtx.prevYVal[T-B])===null||z===void 0?void 0:z[m])<0){L=this.series[p][m]>=0?V-M+2*(this.isReversed?M:0):V;break}if(((G=this.groupCtx.prevYVal[T-B])===null||G===void 0?void 0:G[m])>=0){L=this.series[p][m]>=0?V:V+M-2*(this.isReversed?M:0);break}}L===void 0&&(L=f.globals.gridHeight),x=(I=this.groupCtx.prevYF[0])!==null&&I!==void 0&&I.every(function(X){return X===0})&&this.groupCtx.prevYF.slice(1,T).every(function(X){return X.every(function(H){return isNaN(H)})})?c:L}else x=c;r=this.series[p][m]?x-this.series[p][m]/this.yRatio[k]+2*(this.isReversed?this.series[p][m]/this.yRatio[k]:0):x;var K=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:l,y1:x,y2:r,yRatio:this.yRatio[k],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:K.pathTo,pathFrom:K.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),nk=function(t){bv(n,np);var e=yv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(s,i,o){var r=this,a=this.w,l=new Ne(this.ctx),c=a.globals.comboCharts?i:a.config.chart.type,u=new Ur(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 bs(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,_,k,C,x=void 0,S=void 0,M=[],P=[],T=a.globals.comboCharts?o[m]:m,I=r.barHelpers.getGroupIndex(T).columnGroupIndex,L=l.group({class:"apexcharts-series",seriesName:he.escapeString(a.globals.seriesNames[T]),rel:m+1,"data:realIndex":T});r.ctx.series.addCollapsedClassToSeries(L,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,C=F.zeroW,x=F.x,R=F.barWidth,b=F.xDivision,k=F.zeroH,P.push(x+R/2);for(var B=l.group({class:"apexcharts-datalabels","data:realIndex":T}),z=l.group({class:"apexcharts-bar-goals-markers"}),G=function(X){var H=r.barHelpers.getStrokeWidth(m,X,T),Q=null,ne={indexes:{i:m,j:X,realIndex:T,translationsIndex:N},x,y:S,strokeWidth:H,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(tt(tt({},ne),{},{yDivision:_,barHeight:V,zeroW:C})):r.drawVerticalBoxPaths(tt(tt({},ne),{},{xDivision:b,barWidth:R,zeroH:k})),S=Q.y,x=Q.x;var Z=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:V,barWidth:R});Z&&z.add(Z),X>0&&P.push(x+R/2),M.push(S),Q.pathTo.forEach(function(ae,ge){var Ce=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[ge]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:T,dataPointIndex:X,color:Q.color[ge],value:s[m][X]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:Ce,j:X,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:H,elSeries:L,x,y:S,series:s,columnGroupIndex:I,barHeight:V,barWidth:R,elDataLabelsWrap:B,elGoalsMarkers:z,visibleSeries:r.visibleI,type:a.config.chart.type})})},K=0;K<a.globals.dataPoints;K++)G(K);a.globals.seriesXvalues[T]=P,a.globals.seriesYvalues[T]=M,h.add(L)},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 Ne(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},k=_(p.upward),C=_(p.downward),x=this.yRatio[i.translationsIndex],S=this.getOHLCValue(b,f),M=l,P=l,T=S.o<S.c?[k]:[C];this.isBoxPlot&&(T=[_(m.lower),_(m.upper)]);var I=Math.min(S.o,S.c),L=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?(I=l,L=l):(I=l-I/x,L=l-L/x,M=l-S.h/x,P=l-S.l/x,V=l-S.m/x);var N=d.move(R,l),F=d.move(R+a/2,I);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(b,f,!0)),N=this.isBoxPlot?[d.move(R,I)+d.line(R+a/2,I)+d.line(R+a/2,M)+d.line(R+a/4,M)+d.line(R+a-a/4,M)+d.line(R+a/2,M)+d.line(R+a/2,I)+d.line(R+a,I)+d.line(R+a,V)+d.line(R,V)+d.line(R,I+c/2),d.move(R,V)+d.line(R+a,V)+d.line(R+a,L)+d.line(R+a/2,L)+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,L)+d.line(R,L)+d.line(R,V)+"z"]:[d.move(R,L)+d.line(R+a/2,L)+d.line(R+a/2,M)+d.line(R+a/2,L)+d.line(R+a,L)+d.line(R+a,I)+d.line(R+a/2,I)+d.line(R+a/2,P)+d.line(R+a/2,I)+d.line(R,I)+d.line(R,L-c/2)],F+=d.move(R,I),u.globals.isXNumeric||(o+=r),{pathTo:N,pathFrom:F,x:o,y:L,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 Ne(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),k=l,C=l,x=Math.min(_.o,_.c),S=Math.max(_.o,_.c),M=_.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?(x=l,S=l):(x=l+x/m,S=l+S/m,k=l+_.h/m,C=l+_.l/m,M=l+_.m/m);var T=d.move(l,P),I=d.move(x,P+a/2);return u.globals.previousPaths.length>0&&(I=this.getPreviousPath(b,f,!0)),T=[d.move(x,P)+d.line(x,P+a/2)+d.line(k,P+a/2)+d.line(k,P+a/2-a/4)+d.line(k,P+a/2+a/4)+d.line(k,P+a/2)+d.line(x,P+a/2)+d.line(x,P+a)+d.line(M,P+a)+d.line(M,P)+d.line(x+c/2,P),d.move(M,P)+d.line(M,P+a)+d.line(S,P+a)+d.line(S,P+a/2)+d.line(C,P+a/2)+d.line(C,P+a-a/4)+d.line(C,P+a/4)+d.line(C,P+a/2)+d.line(S,P+a/2)+d.line(S,P)+d.line(M,P)+"z"],I+=d.move(x,P),u.globals.isXNumeric||(o+=r),{pathTo:T,pathFrom:I,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 bs(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}(),bj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 he;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=he.hexToRgba(he.isColorHex(d)?d:he.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=he.hexToRgba(he.isColorHex(h)?h:he.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,Ns(i.globals.series[n])),d=Math.max.apply(Math,Ns(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 Ne(this.ctx),d=new tp(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 Ne(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}(),K_t=function(){function t(e,n){lt(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 bj(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return ct(t,[{key:"draw",value:function(e){var n=this.w,s=new Ne(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:he.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),k=_.color,C=_.colorProps;n.config.fill.type==="image"&&(k=new Ur(this.ctx).fillPath({seriesNumber:u,dataPointIndex:m,opacity:n.globals.hasNegs?C.percent<0?1-(1+C.percent/100):p+C.percent/100:C.percent/100,patternID:he.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 x=this.rectRadius,S=s.drawRect(f,a,o,r,x);if(S.attr({cx:f,cy:a}),S.node.classList.add("apexcharts-heatmap-rect"),d.add(S),S.attr({fill:k,i:u,index:u,j:m,val:e[u][m],"stroke-width":this.strokeWidth,stroke:n.config.plotOptions.heatmap.useFillColorAsStroke?k:n.globals.stroke.colors[0],color:k}),this.helpers.addListeners(S),n.config.chart.animations.enabled&&!n.globals.dataChanged){var M=1;n.globals.resized||(M=n.config.chart.animations.speed),this.animateHeatMap(S,f,a,o,r,M)}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,he.isColorHex(T)?T:he.rgb2hex(T),he.isColorHex(k)?k:he.rgb2hex(k),P)}}var I=(0,n.config.dataLabels.formatter)(n.globals.series[u][m],{value:n.globals.series[u][m],seriesIndex:u,dataPointIndex:m,w:n}),L=this.helpers.calculateDataLabels({text:I,x:f+o/2,y:a+r/2,i:u,j:m,colorProps:C,series:c});L!==null&&d.add(L),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 Lp(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}(),_j=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 Ne(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}(),wj=function(){function t(e){lt(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 Ne(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 ct(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ne(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+=he.negToZero(e[a]);var l=[],c=i.group();r===0&&(r=1e-5),e.forEach(function(C){n.maxY=Math.max(n.maxY,C)}),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*he.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+=he.negToZero(s.globals.previousPaths[p]);for(var m=0;m<s.globals.previousPaths.length;m++)h=this.fullAngle*he.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(C){_.add(C)}),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 k=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});o.add(k)}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 Ne(this.ctx),r=new Ur(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:he.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 k=s.config.chart.dropShadow;i.dropShadow(_,k,h)}this.addListeners(_,this.donutDataLabels),Ne.setAttrs(_.node,{"data:angle":p,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":n[h]});var C={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?C=he.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle):this.chartType==="donut"&&(C=he.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 x=0;if(!this.initialAnim||s.globals.resized||s.globals.dataChanged?this.animBeginArr.push(0):((x=p/this.fullAngle*s.config.chart.animations.speed)===0&&(x=1),this.animDur=x+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:x}),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=C.x,M=C.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 I=s.globals.dataLabels.style.colors[h],L=o.group({class:"apexcharts-datalabels"}),V=o.drawText({x:S,y:M,text:P,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:I});if(L.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(L)}}}return a}},{key:"addListeners",value:function(e,n){var s=new Ne(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 Lp(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 Ne(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=he.polarToCartesian(s.centerX,s.centerY,s.donutSize,u),_=he.polarToCartesian(s.centerX,s.centerY,s.donutSize,l),k=o>180?1:0,C=["M",h,f,"A",r,r,0,k,1,p,m];return n=s.chartType==="donut"?[].concat(C,["L",b.x,b.y,"A",s.donutSize,s.donutSize,0,k,0,_.x,_.y,"L",h,f,"z"]).join(" "):s.chartType==="pie"||s.chartType==="polarArea"?[].concat(C,["L",s.centerX,s.centerY,"L",h,f]).join(" "):[].concat(C).join(" "),a.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var n=this.w,s=new pj(this.ctx),i=new Ne(this.ctx),o=new _j(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 Ne(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 k=n.name.show?parseFloat(n.value.offsetY)+16:n.value.offsetY,C=o.drawText({x:c,y:u+k,text:m,textAnchor:"middle",foreColor:l,fontWeight:n.value.fontWeight,fontSize:n.value.fontSize,fontFamily:n.value.fontFamily});C.node.classList.add("apexcharts-datalabel-value"),e.add(C)}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 Ne(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(he.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}(),Z_t=function(){function t(e){lt(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 Ne(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 bs(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 ct(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ur(this.ctx),o=[],r=new tp(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 k=b.length===s.globals.dataPoints,C=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":k,seriesName:he.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 x=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},M=null;s.globals.previousPaths.length>0&&(M=n.getPreviousPath(_));for(var P=0;P<x.linePathsTo.length;P++){var T=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?x.linePathsFrom[P]:M,pathTo:x.linePathsTo[P],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[_]:n.strokeWidth,fill:"none",drawShadow:!1}));C.add(T);var I=i.fillPath({seriesNumber:_}),L=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?x.areaPathsFrom[P]:M,pathTo:x.areaPathsTo[P],strokeWidth:0,fill:I,drawShadow:!1}));if(s.config.chart.dropShadow.enabled){var V=new ai(n.ctx),R=s.config.chart.dropShadow;V.dropShadow(L,Object.assign({},R,{noUserSpaceOnUse:!0}),_)}C.add(L)}b.forEach(function(N,F){var B=new Vp(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:_,dataPointIndex:F}),z=n.graphics.drawMarker(h[F].x,h[F].y,B);z.attr("rel",F),z.attr("j",F),z.attr("index",_),z.node.setAttribute("default-marker-size",B.pSize);var G=n.graphics.group({class:"apexcharts-series-markers"});G&&G.add(z),f.add(G),C.add(f);var K=s.config.dataLabels;if(K.enabled){var X=K.formatter(s.globals.series[_][F],{seriesIndex:_,dataPointIndex:F,w:s});r.plotDataLabelsText({x:h[F].x,y:h[F].y,text:X,textAnchor:"middle",i:_,j:_,parent:p,offsetCorrection:!1,dataLabelsConfig:tt({},K)})}C.add(p)}),o.push(C)}),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 _j(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=he.getPolygonPos(f,n.dataPointsLen),b="";m.forEach(function(_,k){if(p===0){var C=n.graphics.drawLine(_.x,_.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[k]:n.polygons.connectorColors);h.push(C)}k===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=he.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new tp(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:tt({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}(),J_t=function(t){bv(n,wj);var e=yv(n);function n(s){var i;lt(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(LU(i)),i}return ct(n,[{key:"draw",value:function(s){var i=this.w,o=new Ne(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 Ne(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new ai(this.ctx),l=new Ur(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 Ne(this.ctx),r=new Ur(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 k=!1;i.config.plotOptions.radialBar.inverseOrder&&(k=!0);for(var C=k?s.series.length-1:0;k?C>=0:C<s.series.length;k?C--:C++){var x=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:he.escapeString(i.globals.seriesNames[C])});l.add(x),x.attr({rel:C+1,"data:realIndex":C}),this.ctx.series.addCollapsedClassToSeries(x,C),s.size=s.size-c-this.margin;var S=r.fillPath({seriesNumber:C,size:s.size,value:s.series[C]}),M=this.startAngle,P=void 0,T=he.negToZero(s.series[C]>100?100:s.series[C])/100,I=Math.round(this.totalAngle*T)+this.startAngle,L=void 0;i.globals.dataChanged&&(P=this.startAngle,L=Math.round(this.totalAngle*he.negToZero(i.globals.previousPaths[C])/100)+P),Math.abs(I)+Math.abs(M)>360&&(I-=.01),Math.abs(L)+Math.abs(P)>360&&(L-=.01);var V=I-M,R=Array.isArray(i.config.stroke.dashArray)?i.config.stroke.dashArray[C]: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-"+C,strokeDashArray:R});if(Ne.setAttrs(N.node,{"data:angle":V,"data:value":s.series[C]}),i.config.chart.dropShadow.enabled){var F=i.config.chart.dropShadow;a.dropShadow(N,F,C)}if(a.setSelectionFilter(N,0,C),this.addListeners(N,this.radialDataLabels),x.add(N),N.attr({index:0,j:C}),this.barLabels.enabled){var B=he.polarToCartesian(s.centerX,s.centerY,s.size,M),z=this.barLabels.formatter(i.globals.seriesNames[C],{seriesIndex:C,w:i}),G=["apexcharts-radialbar-label"];this.barLabels.onClick||G.push("apexcharts-no-click");var K=this.barLabels.useSeriesColors?i.globals.colors[C]:i.config.chart.foreColor;K||(K=i.config.chart.foreColor);var X=B.x+this.barLabels.offsetX,H=B.y+this.barLabels.offsetY,Q=o.drawText({x:X,y:H,text:z,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:G.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:C+1}),M!==0&&Q.attr({"transform-origin":"".concat(X," ").concat(H),transform:"rotate(".concat(M," 0 0)")}),x.add(Q)}var ne=0;!this.initialAnim||i.globals.resized||i.globals.dataChanged||(ne=i.config.chart.animations.speed),i.globals.dataChanged&&(ne=i.config.chart.animations.dynamicAnimation.speed),this.animDur=ne/(1.2*s.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(N,{centerX:s.centerX,centerY:s.centerY,endAngle:I,startAngle:M,prevEndAngle:L,prevStartAngle:P,size:s.size,i:C,totalItems:2,animBeginArr:this.animBeginArr,dur:ne,shouldSetPrevPaths:!0})}return{g:l,elHollow:f,dataLabels:b}}},{key:"drawHollow",value:function(s){var i=new Ne(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 Ur(this.ctx),c=he.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}(),Q_t=function(t){bv(n,np);var e=yv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(s,i){var o=this.w,r=new Ne(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:he.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 k=0,C=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],x=m);var S=this.barHelpers.initialPositions();p=S.y,h=S.zeroW,f=S.x,C=S.barWidth,k=S.barHeight,c=S.xDivision,u=S.yDivision,d=S.zeroH;for(var M=r.group({class:"apexcharts-datalabels","data:realIndex":m}),P=r.group({class:"apexcharts-rangebar-goals-markers"}),T=0;T<o.globals.dataPoints;T++){var I=this.barHelpers.getStrokeWidth(l,T,m),L=this.seriesRangeStart[l][T],V=this.seriesRangeEnd[l][T],R=null,N=null,F=null,B={x:f,y:p,strokeWidth:I,elSeries:_},z=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(z=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+k*this.visibleI;var G=(u-k*z)/2;if(o.config.series[l].data[T].x){var K=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:G,barHeight:k,yDivision:u,initPositions:S});k=K.barHeight,F=K.barYPosition}C=(R=this.drawRangeBarPaths(tt({indexes:{i:l,j:T,realIndex:m},barHeight:k,barYPosition:F,zeroW:h,yDivision:u,y1:L,y2:V},B))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][T]-o.globals.minX)/this.xRatio-C/2),N=f+C*this.visibleI;var X=(c-C*z)/2;if(o.config.series[l].data[T].x){var H=this.detectOverlappingBars({i:l,j:T,barXPosition:N,srtx:X,barWidth:C,xDivision:c,initPositions:S});C=H.barWidth,N=H.barXPosition}k=(R=this.drawRangeColumnPaths(tt({indexes:{i:l,j:T,realIndex:m,translationsIndex:x},barWidth:C,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:k,barWidth:C});Q&&P.add(Q),p=R.y,f=R.x;var ne=this.barHelpers.getPathFillColor(s,l,T,m);this.renderSeries({realIndex:m,pathFill:ne.color,lineFill:ne.useRangeColor?ne.color:o.globals.stroke.colors[m],j:T,i:l,x:f,y:p,y1:L,y2:V,pathFrom:R.pathFrom,pathTo:R.pathTo,strokeWidth:I,elSeries:_,series:s,barHeight:k,barWidth:C,barXPosition:N,barYPosition:F,columnGroupIndex:b,elDataLabelsWrap:M,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,k=m.config.series[i].data[o].x,C=Array.isArray(k)?k.join(" "):k,x=m.globals.labels.map(function(M){return Array.isArray(M)?M.join(" "):M}).indexOf(C),S=m.globals.seriesRange[i].findIndex(function(M){return M.x===C&&M.overlaps.length>0});return this.isHorizontal?(r=m.config.plotOptions.bar.rangeBarGroupRows?l+h*x:l+u*this.visibleI+h*x,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*x)):(x>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*x:c+d*this.visibleI+f*x),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*x)),{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),k=Math.max(b.start,b.end);this.series[d][h]===void 0||this.series[d][h]===null?_=c:(_=c-_/m,k=c-k/m);var C=Math.abs(k-_),x=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:_,y2:k,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:x.pathTo,pathFrom:x.pathFrom,barHeight:C,x:o,y:b.start<0&&b.end<0?_:k,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),k=Math.abs(b-m),C=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:C.pathTo,pathFrom:C.pathFrom,barWidth:k,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}(),e2t=function(){function t(e){lt(this,t),this.w=e.w,this.lineCtx=e}return ct(t,[{key:"sameValueSeriesFix",value:function(e,n){var s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[e]==="gradient")&&new bs(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(he.isNumber(n[r][0])?l+c.config.markers.offsetY:null),u.push(i+c.config.markers.offsetX),d.push(he.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null)}else u.push(i+c.config.markers.offsetX),d.push(he.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}(),t2t=function(t){for(var e,n,s,i,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=sk(h,f),m=1,b=u.length-1;m<b;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=sk(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)s=sk(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},n2t=function(t){var e=t2t(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},s2t=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 sk(t,e){return(e[1]-t[1])/(e[0]-t[0])}var ik=function(){function t(e,n,s){lt(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 hj(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new e2t(this),this.markers=new Vp(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return ct(t,[{key:"draw",value:function(e,n,s,i){var o,r=this.w,a=new Ne(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new bs(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=[],_=[],k=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(k=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),_.push(k);var C,x=k,S=void 0,M=x,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),C=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 I=this._calculatePathsFrom({type:l,series:e,i:h,realIndex:f,translationsIndex:p,prevX:M,prevY:P,prevY2:T}),L=[m[0]],V=[b[0]],R={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x:k,y:1,pX:x,pY:C,pathsFrom:I,linePaths:[],areaPaths:[],seriesIndex:s,lineYPosition:0,xArrj:_,yArrj:m,y2Arrj:b,seriesRangeEnd:i},N=this._iterateOverDataPoints(tt(tt({},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:M,prevY:T}),B=this._iterateOverDataPoints(tt(tt({},R),{},{series:i,xArrj:[k],yArrj:L,y2Arrj:V,pY:S,areaPaths:N.areaPaths,pathsFrom:F,iterations:i[h].length-1,isRangeStart:!1})),z=N.linePaths.length/2,G=0;G<z;G++)N.linePaths[G]=B.linePaths[G+z]+N.linePaths[G];N.linePaths.splice(z),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 K=d.length-1;K>=0;K--)c.add(d[K]);else for(var X=0;X<d.length;X++)c.add(d[X]);return c}},{key:"_initSerieVariables",value:function(e,n,s){var i=this.w,o=new Ne(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:he.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 Ne(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 Ne(this.ctx),l=new Ur(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(tt(tt({},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 k=r.config.fill;r.config.fill=r.config.stroke.fill,_=l.fillPath({seriesNumber:s,i}),r.config.fill=k}for(var C=0;C<o.linePaths.length;C++){var x=_;n==="rangeArea"&&(x=l.fillPath({seriesNumber:s}));var S=tt(tt({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[C],stroke:_,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?x:"none"}),M=a.renderPaths(S);if(this.elSeries.add(M),M.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,")")),M.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,k=e.seriesIndex,C=e.lineYPosition,x=e.xArrj,S=e.yArrj,M=e.y2Arrj,P=e.isRangeStart,T=e.seriesRangeEnd,I=this.w,L=new Ne(this.ctx),V=this.yRatio,R=m.prevY,N=m.linePath,F=m.areaPath,B=m.pathFromLine,z=m.pathFromArea,G=he.isNumber(I.globals.minYArr[l])?I.globals.minYArr[l]:I.globals.minY;a||(a=I.globals.dataPoints>1?I.globals.dataPoints-1:I.globals.dataPoints);var K=function(ie,re){return re-ie/V[c]+2*(i.isReversed?ie/V[c]:0)},X=h,H=I.config.chart.stacked&&!I.globals.comboCharts||I.config.chart.stacked&&I.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=I.config.stroke.curve;Array.isArray(Q)&&(Q=Array.isArray(k)?Q[k[u]]:Q[u]);for(var ne,Z=0,ae=0;ae<a&&r[u].length!==0;ae++){var ge=r[u][ae+1]===void 0||r[u][ae+1]===null;if(I.globals.isXNumeric){var Ce=I.globals.seriesX[l][ae+1];I.globals.seriesX[l][ae+1]===void 0&&(Ce=I.globals.seriesX[l][a-1]),d=(Ce-I.globals.minX)/this.xRatio}else d+=this.xDivision;H?u>0&&I.globals.collapsedSeries.length<I.config.series.length-1?C=this.prevSeriesY[function(ie){for(var re=ie;re>0;re--){if(!(I.globals.collapsedSeriesIndices.indexOf((k==null?void 0:k[re])||re)>-1))return re;re--}return 0}(u-1)][ae+1]:C=this.zeroY:C=this.zeroY,ge?h=K(G,C):(h=K(r[u][ae+1],C),o==="rangeArea"&&(X=K(T[u][ae+1],C))),x.push(r[u][ae+1]===null?null:d),!ge||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(S.push(h),M.push(X)):(S.push(null),M.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:ae,prevY:R}),pe=this._createPaths({type:o,series:r,i:u,realIndex:l,j:ae,x:d,y:h,y2:X,xArrj:x,yArrj:S,y2Arrj:M,pX:f,pY:p,pathState:Z,segmentStartX:ne,linePath:N,areaPath:F,linePaths:b,areaPaths:_,curve:Q,isRangeStart:P});_=pe.areaPaths,b=pe.linePaths,f=pe.pX,p=pe.pY,Z=pe.pathState,ne=pe.segmentStartX,F=pe.areaPath,N=pe.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(B+=L.line(d,this.areaBottomY),z+=L.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:x,pathFromArea:z,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 tp(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,k=e.areaPath,C=e.linePaths,x=e.areaPaths,S=e.curve,M=e.isRangeStart,P=new Ne(this.ctx),T=this.areaBottomY,I=n==="rangeArea",L=n==="rangeArea"&&M;switch(S){case"monotoneCubic":var V=M?u:h;switch(m){case 0:if(V[r+1]===null)break;m=1;case 1:if(!(I?c.length===s[i].length:r===s[i].length-2))break;case 2:var R=M?c:c.slice().reverse(),N=M?V:V.slice().reverse(),F=(o=N,R.map(function(Ce,oe){return[Ce,o[oe]]}).filter(function(Ce){return Ce[1]!==null})),B=F.length>1?n2t(F):F,z=[];I&&(L?x=F:z=x.reverse());var G=0,K=0;if(function(Ce,oe){for(var pe=function(Ue){var ee=[],se=0;return Ue.forEach(function(me){me!==null?se++:se>0&&(ee.push(se),se=0)}),se>0&&ee.push(se),ee}(Ce),ie=[],re=0,ke=0;re<pe.length;ke+=pe[re++])ie[re]=s2t(oe,ke,ke+pe[re]);return ie}(N,B).forEach(function(Ce){G++;var oe=function(re){for(var ke="",Ue=0;Ue<re.length;Ue++){var ee=re[Ue],se=ee.length;se>4?(ke+="C".concat(ee[0],", ").concat(ee[1]),ke+=", ".concat(ee[2],", ").concat(ee[3]),ke+=", ".concat(ee[4],", ").concat(ee[5])):se>2&&(ke+="S".concat(ee[0],", ").concat(ee[1]),ke+=", ".concat(ee[2],", ").concat(ee[3]))}return ke}(Ce),pe=K,ie=(K+=Ce.length)-1;L?_=P.move(F[pe][0],F[pe][1])+oe:I?_=P.move(z[pe][0],z[pe][1])+P.line(F[pe][0],F[pe][1])+oe+P.line(z[ie][0],z[ie][1]):(_=P.move(F[pe][0],F[pe][1])+oe,k=_+P.line(F[ie][0],T)+P.line(F[pe][0],T)+"z",x.push(k)),C.push(_)}),I&&G>1&&!L){var X=C.slice(G).reverse();C.splice(G),X.forEach(function(Ce){return C.push(Ce)})}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,_=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){C.push(_),x.push(k);break}if(m=1,r<s[i].length-2){var Q=P.curve(f+H,p,a-H,l,a,l);_+=Q,k+=Q;break}case 1:if(s[i][r+1]===null)_+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(b,T)+"z",C.push(_),x.push(k),m=-1;else{var ne=P.curve(f+H,p,a-H,l,a,l);_+=ne,k+=ne,r>=s[i].length-2&&(L&&(_+=P.curve(a,l,a,l,a,d)+P.move(a,d)),k+=P.curve(a,l,a,l,a,T)+P.line(b,T)+"z",C.push(_),x.push(k),m=-1)}}f=a,p=l;break;default:var Z=function(Ce,oe,pe){var ie=[];switch(Ce){case"stepline":ie=P.line(oe,null,"H")+P.line(null,pe,"V");break;case"linestep":ie=P.line(null,pe,"V")+P.line(oe,null,"H");break;case"straight":ie=P.line(oe,pe)}return ie};if(s[i][r]===null)m=0;else switch(m){case 0:if(b=f,_=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){C.push(_),x.push(k);break}if(m=1,r<s[i].length-2){var ae=Z(S,a,l);_+=ae,k+=ae;break}case 1:if(s[i][r+1]===null)_+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(b,T)+"z",C.push(_),x.push(k),m=-1;else{var ge=Z(S,a,l);_+=ge,k+=ge,r>=s[i].length-2&&(L&&(_+=P.line(a,d)),k+=P.line(a,T)+P.line(b,T)+"z",C.push(_),x.push(k),m=-1)}}f=a,p=l}return{linePaths:C,areaPaths:x,pX:f,pY:p,pathState:m,segmentStartX:b,linePath:_,areaPath:k}}},{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 k=s(p,b),C=s(_,b);return k>=C}(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 i2t=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new bj(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return ct(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ne(this.ctx),o=new Ur(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:he.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],k=f[3],C=i.drawRect(m,b,_-m,k-b,s.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,s.config.plotOptions.treemap.useFillColorAsStroke?S:s.globals.stroke.colors[c]);C.attr({cx:m,cy:b,index:c,i:c,j:p,width:_-m,height:k-b});var x=n.helpers.getShadeColor(s.config.chart.type,c,p,n.negRange),S=x.color,M=o.fillPath({color:S,seriesNumber:c,dataPointIndex:p});C.node.classList.add("apexcharts-treemap-rect"),C.attr({fill:M}),n.helpers.addListeners(C);var P={x:m+(_-m)/2,y:b+(k-b)/2,width:0,height:0},T={x:m,y:b,width:_-m,height:k-b};if(s.config.chart.animations.enabled&&!s.globals.dataChanged){var I=1;s.globals.resized||(I=s.config.chart.animations.speed),n.animateTreemap(C,P,T,I)}if(s.globals.dataChanged){var L=1;n.dynamicAnim.enabled&&s.globals.shouldAnimate&&(L=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(C,P,T,L))}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,_,k));var N=null;s.globals.series[c][p]&&(N=n.helpers.calculateDataLabels({text:R,x:(m+_)/2,y:(b+k)/2+n.strokeWidth/2+V/3,i:c,j:p,colorProps:x,fontSize:V,series:e})),s.config.dataLabels.enabled&&N&&n.rotateToFitLabel(N,V,R,m,b,_,k),u.add(C),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 Ne(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 Ne(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 Lp(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}(),kj=86400,o2t=10/kj,r2t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return ct(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 ni(this.ctx),r=(n-e)/864e5;this.determineInterval(r),i.globals.disableZoomIn=!1,i.globals.disableZoomOut=!1,r<o2t?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*kj),m=Math.floor(r),b=Math.floor(r/30),_=Math.floor(r/365),k={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},C={firstVal:k,currentMillisecond:k.minMillisecond,currentSecond:k.minSecond,currentMinute:k.minMinute,currentHour:k.minHour,currentMonthDate:k.minDate,currentDate:k.minDate,currentMonth:k.minMonth,currentYear:k.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(C);break;case"months":case"half_year":this.generateMonthScale(C);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(C);break;case"hours":this.generateHourScale(C);break;case"minutes_fives":case"minutes":this.generateMinuteScale(C);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(C)}var x=this.timeScaleArray.map(function(S){var M={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"?tt(tt({},M),{},{day:1,value:S.value+1}):S.unit==="day"||S.unit==="hour"?tt(tt({},M),{},{value:S.value}):S.unit==="minute"?tt(tt({},M),{},{value:S.value,minute:S.value}):S.unit==="second"?tt(tt({},M),{},{value:S.value,minute:S.minute,second:S.second}):S});return x.filter(function(S){var M=1,P=Math.ceil(i.globals.gridWidth/120),T=S.value;i.config.xaxis.tickAmount!==void 0&&(P=i.config.xaxis.tickAmount),x.length>P&&(M=Math.floor(x.length/P));var I=!1,L=!1;switch(s.tickInterval){case"years":S.unit==="year"&&(I=!0);break;case"half_year":M=7,S.unit==="year"&&(I=!0);break;case"months":M=1,S.unit==="year"&&(I=!0);break;case"months_fortnight":M=15,S.unit!=="year"&&S.unit!=="month"||(I=!0),T===30&&(L=!0);break;case"months_days":M=10,S.unit==="month"&&(I=!0),T===30&&(L=!0);break;case"week_days":M=8,S.unit==="month"&&(I=!0);break;case"days":M=1,S.unit==="month"&&(I=!0);break;case"hours":S.unit==="day"&&(I=!0);break;case"minutes_fives":case"seconds_fives":T%5!=0&&(L=!0);break;case"seconds_tens":T%10!=0&&(L=!0)}if(s.tickInterval==="hours"||s.tickInterval==="minutes_fives"||s.tickInterval==="seconds_tens"||s.tickInterval==="seconds_fives"){if(!L)return!0}else if((T%M==0||I)&&!L)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 s_(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 ni(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:he.monthMod(s+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:i,month:he.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 ni(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(i+1,n.minYear)-s+1)*r,l=he.monthMod(i+1);var f=o+h,p=he.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:he.monthMod(i)});for(var b=l+1,_=c,k=0,C=1;k<a;k++,C++){(b=he.monthMod(b))===0?(d="year",h+=1):d="month";var x=this._getYear(o,b,h);_=u.determineDaysOfMonths(b,x)*r+_;var S=b===0?x:b;this.timeScaleArray.push({position:_,value:S,unit:d,year:x,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 ni(this.ctx),l="day",c=n.minDate+1,u=c,d=function(C,x,S){return C>a.determineDaysOfMonths(x+1,S)&&(u=1,l="month",f=x+=1),x},h=(24-n.minHour)*o,f=c,p=d(u,s,i);n.minHour===0&&n.minDate===1?(h=0,f=he.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:he.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 k=u===1?he.monthMod(p):u;this.timeScaleArray.push({position:m,value:k,unit:l,year:_,month:he.monthMod(p),day:k})}}},{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 ni(this.ctx),c="hour",u=function(M,P){return M>l.determineDaysOfMonths(P+1,o)&&(b=1,P+=1),{month:P,date:b}},d=function(M,P){return M>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:he.monthMod(_)}),m++;for(var k=f,C=0;C<a;C++){c="hour",m>=24&&(m=0,c="day",_=u(b+=1,_).month,_=d(b,_));var x=this._getYear(o,_,0);k=60*r+k;var S=m===0?b:m;this.timeScaleArray.push({position:k,value:S,unit:c,hour:m,day:b,year:x,month:he.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,k=0;k<d;k++)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:he.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,k=0;k<u;k++)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:he.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 ni(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 Ne(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}(),a2t=function(){function t(e,n){lt(this,t),this.ctx=n,this.w=n.w,this.el=e}return ct(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"),Ne.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"),Ne.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(M,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(M),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(M),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 ik(i,n),h=new nk(i,n);i.pie=new wj(i);var f=new J_t(i);i.rangeBar=new Q_t(i,n);var p=new Z_t(i),m=[];if(r.comboCharts){var b,_,k=new bs(i);if(a.area.series.length>0&&(b=m).push.apply(b,Ns(k.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var C=new jT(i,n);m.push(C.draw(a.column.series,a.column.i))}else i.bar=new np(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(_,Ns(k.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 x=new ik(i,n,!0);m.push(x.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new ik(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 jT(i,n).draw(r.series):(i.bar=new np(i,n),m=i.bar.draw(r.series));break;case"candlestick":m=new nk(i,n).draw(r.series,"candlestick");break;case"boxPlot":m=new nk(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 K_t(i,n).draw(r.series);break;case"treemap":m=new i2t(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=he.getDimensions(this.el),o=s.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?he.isNumber(i[0])&&(i[0].width===0&&(i=he.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=he.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),Ne.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;Ne.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 mj(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=he.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"),Ne.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new Kx(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},s=new dj,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 Zx(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Zx(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new r2t(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 bs(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}(),l2t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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&&ep(e)==="object"&&(c.config=new k1(e),e=bs.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=he.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?he.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?he.clone(e.yaxis):[],d.globals.initialConfig=he.extend({},d.config),d.globals.initialSeries=he.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=he.clone(a.config.series),a.globals.initialSeries=he.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 tt(tt({},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 Ne(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 w1(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,_,k,C,x,S,M,P,T,I,L,V,R,N,F,B,z,G,K,X=Math.abs(l[1]),H=Math.abs(l[2]),Q=l[3]%360,ne=l[4],Z=l[5],ae=l[6],ge=l[7],Ce=new Dn(a),oe=new Dn(ae,ge),pe=[];if(X===0||H===0||Ce.x===oe.x&&Ce.y===oe.y)return[["C",Ce.x,Ce.y,oe.x,oe.y,oe.x,oe.y]];for(c=new Dn((Ce.x-oe.x)/2,(Ce.y-oe.y)/2).transform(new an().rotate(Q)),u=c.x*c.x/(X*X)+c.y*c.y/(H*H),u>1&&(X*=u=Math.sqrt(u),H*=u),d=new an().rotate(Q).scale(1/X,1/H).rotate(-Q),Ce=Ce.transform(d),oe=oe.transform(d),h=[oe.x-Ce.x,oe.y-Ce.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,ne===Z&&(m*=-1),b=new Dn((oe.x+Ce.x)/2+m*-h[1],(oe.y+Ce.y)/2+m*h[0]),_=new Dn(Ce.x-b.x,Ce.y-b.y),k=new Dn(oe.x-b.x,oe.y-b.y),C=Math.acos(_.x/Math.sqrt(_.x*_.x+_.y*_.y)),_.y<0&&(C*=-1),x=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&(x*=-1),Z&&C>x&&(x+=2*Math.PI),!Z&&C<x&&(x-=2*Math.PI),M=Math.ceil(2*Math.abs(C-x)/Math.PI),T=[],I=C,S=(x-C)/M,P=4*Math.tan(S/4)/3,N=0;N<=M;N++)V=Math.cos(I),L=Math.sin(I),R=new Dn(b.x+V,b.y+L),T[N]=[new Dn(R.x+P*L,R.y-P*V),R,new Dn(R.x-P*L,R.y+P*V)],I+=S;for(T[0][0]=T[0][1].clone(),T[T.length-1][2]=T[T.length-1][1].clone(),d=new an().rotate(Q).scale(X,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,z=R.y,G=(R=T[N][0]).x,K=R.y,ae=(R=T[N][1]).x,ge=R.y,pe.push(["C",B,z,G,K,ae,ge]);return pe}(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}At(Pr,{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 Pr(_.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 Pr(_.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 Pr,this.destination._array=d;var k=this.fromArray(u.map(function(C,x){var S=d[x].map(function(M,P){return P===0?M:l.step(C[P],d[x][P],a,c[x],c)});return S}));return k}})})();const WT=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class c2t{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(WT(e));const s=(n?"mouseup":"touchend")+".drag";al(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),al(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(WT(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 Ws(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"?Ic.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}),cr(window,"mousemove.drag"),cr(window,"touchmove.drag"),cr(window,"mouseup.drag"),cr(window,"touchend.drag"),this.init(!0)}}/*! |
| 280 |
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse |
| 281 |
* @version 4.0.1 |
| 282 |
* https://github.com/svgdotjs/svg.select.js |
| 283 |
* |
| 284 |
* @copyright Ulrich-Matthias Schäfer |
| 285 |
* @license MIT |
| 286 |
* |
| 287 |
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) |
| 288 |
*/function Jx(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 Qx([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]}At(di,{draggable(t=!0){return(this.remember("_draggable")||new c2t(this)).init(t),this}});let Cj=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new Ic,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=_v();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",Jx(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",Jx("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=>Qx(n,e)),this.rotationPoint=Qx(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 YT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof Cj?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};/*! |
| 289 |
* @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected |
| 290 |
* @version 2.0.4 |
| 291 |
* https://github.com/svgdotjs/svg.resize.js |
| 292 |
* |
| 293 |
* @copyright [object Object] |
| 294 |
* @license MIT |
| 295 |
* |
| 296 |
* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) |
| 297 |
*//*! |
| 298 |
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse |
| 299 |
* @version 4.0.1 |
| 300 |
* https://github.com/svgdotjs/svg.select.js |
| 301 |
* |
| 302 |
* @copyright Ulrich-Matthias Schäfer |
| 303 |
* @license MIT |
| 304 |
* |
| 305 |
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) |
| 306 |
*/function e6(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 t6([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]}At(di,{select:YT(Cj)}),At([Hu,Uu,zu],{pointSelect:YT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Ic,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=_v();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",Jx("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=>Qx(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class xj{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Ic,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const n=_v();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",e6(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",e6("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=>t6(s,n)),this.rotationPoint=t6(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 qT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof xj?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};At(di,{select:qT(xj)}),At([Hu,Uu,zu],{pointSelect:qT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Ic,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=_v();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",e6("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=>t6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const y0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),GT=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 Ws(e,n,s-e,i-n)};class XT{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(y0(n)),this.index=s,this.points=i.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?al(window,r,this.movePoint):e.type==="rot"?al(window,r,this.rotate):al(window,r,this.resize),al(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(y0(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 Ws(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,_,k){const C=[[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(([x,S])=>{const M=x-_[0],P=(S-_[1])*k;return[M*k+_[0],P+_[1]]});return GT(C)}(this.box,p,m)}this.el.dispatch("resize",{box:new Ws(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(y0(e))),i=this.el.array().slice();i[this.index]=[n,s],this.el.dispatch("resize",{box:GT(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(y0(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 an(this.el),{x:f,y:p}=new Dn(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="",cr(window,"mousemove.resize touchmove.resize"),cr(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}}At(di,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof XT?(n=new t(this),t=!0):n=new XT(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=x_t),window.Apex===void 0&&(window.Apex={});var KT=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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 Lp(this.ctx),this.ctx.axes=new O_t(this.ctx),this.ctx.core=new a2t(this.ctx.el,this.ctx),this.ctx.config=new k1({}),this.ctx.data=new WS(this.ctx),this.ctx.grid=new fj(this.ctx),this.ctx.graphics=new Ne(this.ctx),this.ctx.coreUtils=new bs(this.ctx),this.ctx.crosshairs=new Zx(this.ctx),this.ctx.events=new I_t(this.ctx),this.ctx.exports=new n_(this.ctx),this.ctx.fill=new Ur(this.ctx),this.ctx.localization=new L_t(this.ctx),this.ctx.options=new Iu,this.ctx.responsive=new D_t(this.ctx),this.ctx.series=new pr(this.ctx),this.ctx.theme=new R_t(this.ctx),this.ctx.formatters=new Cv(this.ctx),this.ctx.titleSubtitle=new V_t(this.ctx),this.ctx.legend=new mj(this.ctx),this.ctx.toolbar=new gj(this.ctx),this.ctx.tooltip=new UT(this.ctx),this.ctx.dimensions=new s_(this.ctx),this.ctx.updateHelpers=new l2t(this.ctx),this.ctx.zoomPanSelection=new U_t(this.ctx),this.ctx.w.globals.tooltip=new UT(this.ctx)}}]),t}(),ZT=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(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}(),ok=new WeakMap,u2t=function(){function t(e,n){lt(this,t),this.opts=n,this.ctx=this,this.w=new P_t(n).init(),this.el=e,this.w.globals.cuid=he.randomId(),this.w.globals.chartID=this.w.config.chart.id?he.escapeString(this.w.config.chart.id):this.w.globals.cuid,new KT(this).initModules(),this.create=he.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return ct(t,[{key:"render",value:function(){var e=this;return new Promise(function(n,s){if(he.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),ok.set(f,b)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=he.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 { |
| 307 |
0% { |
| 308 |
opacity: 0 |
| 309 |
} |
| 310 |
|
| 311 |
to { |
| 312 |
opacity: 1 |
| 313 |
} |
| 314 |
} |
| 315 |
|
| 316 |
@keyframes resizeanim { |
| 317 |
|
| 318 |
0%, |
| 319 |
to { |
| 320 |
opacity: 0 |
| 321 |
} |
| 322 |
} |
| 323 |
|
| 324 |
.apexcharts-canvas { |
| 325 |
position: relative; |
| 326 |
direction: ltr !important; |
| 327 |
user-select: none |
| 328 |
} |
| 329 |
|
| 330 |
.apexcharts-canvas ::-webkit-scrollbar { |
| 331 |
-webkit-appearance: none; |
| 332 |
width: 6px |
| 333 |
} |
| 334 |
|
| 335 |
.apexcharts-canvas ::-webkit-scrollbar-thumb { |
| 336 |
border-radius: 4px; |
| 337 |
background-color: rgba(0, 0, 0, .5); |
| 338 |
box-shadow: 0 0 1px rgba(255, 255, 255, .5); |
| 339 |
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5) |
| 340 |
} |
| 341 |
|
| 342 |
.apexcharts-inner { |
| 343 |
position: relative |
| 344 |
} |
| 345 |
|
| 346 |
.apexcharts-text tspan { |
| 347 |
font-family: inherit |
| 348 |
} |
| 349 |
|
| 350 |
rect.legend-mouseover-inactive, |
| 351 |
.legend-mouseover-inactive rect, |
| 352 |
.legend-mouseover-inactive path, |
| 353 |
.legend-mouseover-inactive circle, |
| 354 |
.legend-mouseover-inactive line, |
| 355 |
.legend-mouseover-inactive text.apexcharts-yaxis-title-text, |
| 356 |
.legend-mouseover-inactive text.apexcharts-yaxis-label { |
| 357 |
transition: .15s ease all; |
| 358 |
opacity: .2 |
| 359 |
} |
| 360 |
|
| 361 |
.apexcharts-legend-text { |
| 362 |
padding-left: 15px; |
| 363 |
margin-left: -15px; |
| 364 |
} |
| 365 |
|
| 366 |
.apexcharts-series-collapsed { |
| 367 |
opacity: 0 |
| 368 |
} |
| 369 |
|
| 370 |
.apexcharts-tooltip { |
| 371 |
border-radius: 5px; |
| 372 |
box-shadow: 2px 2px 6px -4px #999; |
| 373 |
cursor: default; |
| 374 |
font-size: 14px; |
| 375 |
left: 62px; |
| 376 |
opacity: 0; |
| 377 |
pointer-events: none; |
| 378 |
position: absolute; |
| 379 |
top: 20px; |
| 380 |
display: flex; |
| 381 |
flex-direction: column; |
| 382 |
overflow: hidden; |
| 383 |
white-space: nowrap; |
| 384 |
z-index: 12; |
| 385 |
transition: .15s ease all |
| 386 |
} |
| 387 |
|
| 388 |
.apexcharts-tooltip.apexcharts-active { |
| 389 |
opacity: 1; |
| 390 |
transition: .15s ease all |
| 391 |
} |
| 392 |
|
| 393 |
.apexcharts-tooltip.apexcharts-theme-light { |
| 394 |
border: 1px solid #e3e3e3; |
| 395 |
background: rgba(255, 255, 255, .96) |
| 396 |
} |
| 397 |
|
| 398 |
.apexcharts-tooltip.apexcharts-theme-dark { |
| 399 |
color: #fff; |
| 400 |
background: rgba(30, 30, 30, .8) |
| 401 |
} |
| 402 |
|
| 403 |
.apexcharts-tooltip * { |
| 404 |
font-family: inherit |
| 405 |
} |
| 406 |
|
| 407 |
.apexcharts-tooltip-title { |
| 408 |
padding: 6px; |
| 409 |
font-size: 15px; |
| 410 |
margin-bottom: 4px |
| 411 |
} |
| 412 |
|
| 413 |
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { |
| 414 |
background: #eceff1; |
| 415 |
border-bottom: 1px solid #ddd |
| 416 |
} |
| 417 |
|
| 418 |
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { |
| 419 |
background: rgba(0, 0, 0, .7); |
| 420 |
border-bottom: 1px solid #333 |
| 421 |
} |
| 422 |
|
| 423 |
.apexcharts-tooltip-text-goals-value, |
| 424 |
.apexcharts-tooltip-text-y-value, |
| 425 |
.apexcharts-tooltip-text-z-value { |
| 426 |
display: inline-block; |
| 427 |
margin-left: 5px; |
| 428 |
font-weight: 600 |
| 429 |
} |
| 430 |
|
| 431 |
.apexcharts-tooltip-text-goals-label:empty, |
| 432 |
.apexcharts-tooltip-text-goals-value:empty, |
| 433 |
.apexcharts-tooltip-text-y-label:empty, |
| 434 |
.apexcharts-tooltip-text-y-value:empty, |
| 435 |
.apexcharts-tooltip-text-z-value:empty, |
| 436 |
.apexcharts-tooltip-title:empty { |
| 437 |
display: none |
| 438 |
} |
| 439 |
|
| 440 |
.apexcharts-tooltip-text-goals-label, |
| 441 |
.apexcharts-tooltip-text-goals-value { |
| 442 |
padding: 6px 0 5px |
| 443 |
} |
| 444 |
|
| 445 |
.apexcharts-tooltip-goals-group, |
| 446 |
.apexcharts-tooltip-text-goals-label, |
| 447 |
.apexcharts-tooltip-text-goals-value { |
| 448 |
display: flex |
| 449 |
} |
| 450 |
|
| 451 |
.apexcharts-tooltip-text-goals-label:not(:empty), |
| 452 |
.apexcharts-tooltip-text-goals-value:not(:empty) { |
| 453 |
margin-top: -6px |
| 454 |
} |
| 455 |
|
| 456 |
.apexcharts-tooltip-marker { |
| 457 |
width: 12px; |
| 458 |
height: 12px; |
| 459 |
position: relative; |
| 460 |
top: 0; |
| 461 |
margin-right: 10px; |
| 462 |
border-radius: 50% |
| 463 |
} |
| 464 |
|
| 465 |
.apexcharts-tooltip-series-group { |
| 466 |
padding: 0 10px; |
| 467 |
display: none; |
| 468 |
text-align: left; |
| 469 |
justify-content: left; |
| 470 |
align-items: center |
| 471 |
} |
| 472 |
|
| 473 |
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { |
| 474 |
opacity: 1 |
| 475 |
} |
| 476 |
|
| 477 |
.apexcharts-tooltip-series-group.apexcharts-active, |
| 478 |
.apexcharts-tooltip-series-group:last-child { |
| 479 |
padding-bottom: 4px |
| 480 |
} |
| 481 |
|
| 482 |
.apexcharts-tooltip-y-group { |
| 483 |
padding: 6px 0 5px |
| 484 |
} |
| 485 |
|
| 486 |
.apexcharts-custom-tooltip, |
| 487 |
.apexcharts-tooltip-box { |
| 488 |
padding: 4px 8px |
| 489 |
} |
| 490 |
|
| 491 |
.apexcharts-tooltip-boxPlot { |
| 492 |
display: flex; |
| 493 |
flex-direction: column-reverse |
| 494 |
} |
| 495 |
|
| 496 |
.apexcharts-tooltip-box>div { |
| 497 |
margin: 4px 0 |
| 498 |
} |
| 499 |
|
| 500 |
.apexcharts-tooltip-box span.value { |
| 501 |
font-weight: 700 |
| 502 |
} |
| 503 |
|
| 504 |
.apexcharts-tooltip-rangebar { |
| 505 |
padding: 5px 8px |
| 506 |
} |
| 507 |
|
| 508 |
.apexcharts-tooltip-rangebar .category { |
| 509 |
font-weight: 600; |
| 510 |
color: #777 |
| 511 |
} |
| 512 |
|
| 513 |
.apexcharts-tooltip-rangebar .series-name { |
| 514 |
font-weight: 700; |
| 515 |
display: block; |
| 516 |
margin-bottom: 5px |
| 517 |
} |
| 518 |
|
| 519 |
.apexcharts-xaxistooltip, |
| 520 |
.apexcharts-yaxistooltip { |
| 521 |
opacity: 0; |
| 522 |
pointer-events: none; |
| 523 |
color: #373d3f; |
| 524 |
font-size: 13px; |
| 525 |
text-align: center; |
| 526 |
border-radius: 2px; |
| 527 |
position: absolute; |
| 528 |
z-index: 10; |
| 529 |
background: #eceff1; |
| 530 |
border: 1px solid #90a4ae |
| 531 |
} |
| 532 |
|
| 533 |
.apexcharts-xaxistooltip { |
| 534 |
padding: 9px 10px; |
| 535 |
transition: .15s ease all |
| 536 |
} |
| 537 |
|
| 538 |
.apexcharts-xaxistooltip.apexcharts-theme-dark { |
| 539 |
background: rgba(0, 0, 0, .7); |
| 540 |
border: 1px solid rgba(0, 0, 0, .5); |
| 541 |
color: #fff |
| 542 |
} |
| 543 |
|
| 544 |
.apexcharts-xaxistooltip:after, |
| 545 |
.apexcharts-xaxistooltip:before { |
| 546 |
left: 50%; |
| 547 |
border: solid transparent; |
| 548 |
content: " "; |
| 549 |
height: 0; |
| 550 |
width: 0; |
| 551 |
position: absolute; |
| 552 |
pointer-events: none |
| 553 |
} |
| 554 |
|
| 555 |
.apexcharts-xaxistooltip:after { |
| 556 |
border-color: transparent; |
| 557 |
border-width: 6px; |
| 558 |
margin-left: -6px |
| 559 |
} |
| 560 |
|
| 561 |
.apexcharts-xaxistooltip:before { |
| 562 |
border-color: transparent; |
| 563 |
border-width: 7px; |
| 564 |
margin-left: -7px |
| 565 |
} |
| 566 |
|
| 567 |
.apexcharts-xaxistooltip-bottom:after, |
| 568 |
.apexcharts-xaxistooltip-bottom:before { |
| 569 |
bottom: 100% |
| 570 |
} |
| 571 |
|
| 572 |
.apexcharts-xaxistooltip-top:after, |
| 573 |
.apexcharts-xaxistooltip-top:before { |
| 574 |
top: 100% |
| 575 |
} |
| 576 |
|
| 577 |
.apexcharts-xaxistooltip-bottom:after { |
| 578 |
border-bottom-color: #eceff1 |
| 579 |
} |
| 580 |
|
| 581 |
.apexcharts-xaxistooltip-bottom:before { |
| 582 |
border-bottom-color: #90a4ae |
| 583 |
} |
| 584 |
|
| 585 |
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after, |
| 586 |
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before { |
| 587 |
border-bottom-color: rgba(0, 0, 0, .5) |
| 588 |
} |
| 589 |
|
| 590 |
.apexcharts-xaxistooltip-top:after { |
| 591 |
border-top-color: #eceff1 |
| 592 |
} |
| 593 |
|
| 594 |
.apexcharts-xaxistooltip-top:before { |
| 595 |
border-top-color: #90a4ae |
| 596 |
} |
| 597 |
|
| 598 |
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after, |
| 599 |
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before { |
| 600 |
border-top-color: rgba(0, 0, 0, .5) |
| 601 |
} |
| 602 |
|
| 603 |
.apexcharts-xaxistooltip.apexcharts-active { |
| 604 |
opacity: 1; |
| 605 |
transition: .15s ease all |
| 606 |
} |
| 607 |
|
| 608 |
.apexcharts-yaxistooltip { |
| 609 |
padding: 4px 10px |
| 610 |
} |
| 611 |
|
| 612 |
.apexcharts-yaxistooltip.apexcharts-theme-dark { |
| 613 |
background: rgba(0, 0, 0, .7); |
| 614 |
border: 1px solid rgba(0, 0, 0, .5); |
| 615 |
color: #fff |
| 616 |
} |
| 617 |
|
| 618 |
.apexcharts-yaxistooltip:after, |
| 619 |
.apexcharts-yaxistooltip:before { |
| 620 |
top: 50%; |
| 621 |
border: solid transparent; |
| 622 |
content: " "; |
| 623 |
height: 0; |
| 624 |
width: 0; |
| 625 |
position: absolute; |
| 626 |
pointer-events: none |
| 627 |
} |
| 628 |
|
| 629 |
.apexcharts-yaxistooltip:after { |
| 630 |
border-color: transparent; |
| 631 |
border-width: 6px; |
| 632 |
margin-top: -6px |
| 633 |
} |
| 634 |
|
| 635 |
.apexcharts-yaxistooltip:before { |
| 636 |
border-color: transparent; |
| 637 |
border-width: 7px; |
| 638 |
margin-top: -7px |
| 639 |
} |
| 640 |
|
| 641 |
.apexcharts-yaxistooltip-left:after, |
| 642 |
.apexcharts-yaxistooltip-left:before { |
| 643 |
left: 100% |
| 644 |
} |
| 645 |
|
| 646 |
.apexcharts-yaxistooltip-right:after, |
| 647 |
.apexcharts-yaxistooltip-right:before { |
| 648 |
right: 100% |
| 649 |
} |
| 650 |
|
| 651 |
.apexcharts-yaxistooltip-left:after { |
| 652 |
border-left-color: #eceff1 |
| 653 |
} |
| 654 |
|
| 655 |
.apexcharts-yaxistooltip-left:before { |
| 656 |
border-left-color: #90a4ae |
| 657 |
} |
| 658 |
|
| 659 |
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after, |
| 660 |
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before { |
| 661 |
border-left-color: rgba(0, 0, 0, .5) |
| 662 |
} |
| 663 |
|
| 664 |
.apexcharts-yaxistooltip-right:after { |
| 665 |
border-right-color: #eceff1 |
| 666 |
} |
| 667 |
|
| 668 |
.apexcharts-yaxistooltip-right:before { |
| 669 |
border-right-color: #90a4ae |
| 670 |
} |
| 671 |
|
| 672 |
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after, |
| 673 |
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before { |
| 674 |
border-right-color: rgba(0, 0, 0, .5) |
| 675 |
} |
| 676 |
|
| 677 |
.apexcharts-yaxistooltip.apexcharts-active { |
| 678 |
opacity: 1 |
| 679 |
} |
| 680 |
|
| 681 |
.apexcharts-yaxistooltip-hidden { |
| 682 |
display: none |
| 683 |
} |
| 684 |
|
| 685 |
.apexcharts-xcrosshairs, |
| 686 |
.apexcharts-ycrosshairs { |
| 687 |
pointer-events: none; |
| 688 |
opacity: 0; |
| 689 |
transition: .15s ease all |
| 690 |
} |
| 691 |
|
| 692 |
.apexcharts-xcrosshairs.apexcharts-active, |
| 693 |
.apexcharts-ycrosshairs.apexcharts-active { |
| 694 |
opacity: 1; |
| 695 |
transition: .15s ease all |
| 696 |
} |
| 697 |
|
| 698 |
.apexcharts-ycrosshairs-hidden { |
| 699 |
opacity: 0 |
| 700 |
} |
| 701 |
|
| 702 |
.apexcharts-selection-rect { |
| 703 |
cursor: move |
| 704 |
} |
| 705 |
|
| 706 |
.svg_select_shape { |
| 707 |
stroke-width: 1; |
| 708 |
stroke-dasharray: 10 10; |
| 709 |
stroke: black; |
| 710 |
stroke-opacity: 0.1; |
| 711 |
pointer-events: none; |
| 712 |
fill: none; |
| 713 |
} |
| 714 |
|
| 715 |
.svg_select_handle { |
| 716 |
stroke-width: 3; |
| 717 |
stroke: black; |
| 718 |
fill: none; |
| 719 |
} |
| 720 |
|
| 721 |
.svg_select_handle_r { |
| 722 |
cursor: e-resize; |
| 723 |
} |
| 724 |
|
| 725 |
.svg_select_handle_l { |
| 726 |
cursor: w-resize; |
| 727 |
} |
| 728 |
|
| 729 |
.apexcharts-svg.apexcharts-zoomable.hovering-zoom { |
| 730 |
cursor: crosshair |
| 731 |
} |
| 732 |
|
| 733 |
.apexcharts-svg.apexcharts-zoomable.hovering-pan { |
| 734 |
cursor: move |
| 735 |
} |
| 736 |
|
| 737 |
.apexcharts-menu-icon, |
| 738 |
.apexcharts-pan-icon, |
| 739 |
.apexcharts-reset-icon, |
| 740 |
.apexcharts-selection-icon, |
| 741 |
.apexcharts-toolbar-custom-icon, |
| 742 |
.apexcharts-zoom-icon, |
| 743 |
.apexcharts-zoomin-icon, |
| 744 |
.apexcharts-zoomout-icon { |
| 745 |
cursor: pointer; |
| 746 |
width: 20px; |
| 747 |
height: 20px; |
| 748 |
line-height: 24px; |
| 749 |
color: #6e8192; |
| 750 |
text-align: center |
| 751 |
} |
| 752 |
|
| 753 |
.apexcharts-menu-icon svg, |
| 754 |
.apexcharts-reset-icon svg, |
| 755 |
.apexcharts-zoom-icon svg, |
| 756 |
.apexcharts-zoomin-icon svg, |
| 757 |
.apexcharts-zoomout-icon svg { |
| 758 |
fill: #6e8192 |
| 759 |
} |
| 760 |
|
| 761 |
.apexcharts-selection-icon svg { |
| 762 |
fill: #444; |
| 763 |
transform: scale(.76) |
| 764 |
} |
| 765 |
|
| 766 |
.apexcharts-theme-dark .apexcharts-menu-icon svg, |
| 767 |
.apexcharts-theme-dark .apexcharts-pan-icon svg, |
| 768 |
.apexcharts-theme-dark .apexcharts-reset-icon svg, |
| 769 |
.apexcharts-theme-dark .apexcharts-selection-icon svg, |
| 770 |
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg, |
| 771 |
.apexcharts-theme-dark .apexcharts-zoom-icon svg, |
| 772 |
.apexcharts-theme-dark .apexcharts-zoomin-icon svg, |
| 773 |
.apexcharts-theme-dark .apexcharts-zoomout-icon svg { |
| 774 |
fill: #f3f4f5 |
| 775 |
} |
| 776 |
|
| 777 |
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg, |
| 778 |
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg, |
| 779 |
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg { |
| 780 |
fill: #008ffb |
| 781 |
} |
| 782 |
|
| 783 |
.apexcharts-theme-light .apexcharts-menu-icon:hover svg, |
| 784 |
.apexcharts-theme-light .apexcharts-reset-icon:hover svg, |
| 785 |
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg, |
| 786 |
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg, |
| 787 |
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg, |
| 788 |
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg { |
| 789 |
fill: #333 |
| 790 |
} |
| 791 |
|
| 792 |
.apexcharts-menu-icon, |
| 793 |
.apexcharts-selection-icon { |
| 794 |
position: relative |
| 795 |
} |
| 796 |
|
| 797 |
.apexcharts-reset-icon { |
| 798 |
margin-left: 5px |
| 799 |
} |
| 800 |
|
| 801 |
.apexcharts-menu-icon, |
| 802 |
.apexcharts-reset-icon, |
| 803 |
.apexcharts-zoom-icon { |
| 804 |
transform: scale(.85) |
| 805 |
} |
| 806 |
|
| 807 |
.apexcharts-zoomin-icon, |
| 808 |
.apexcharts-zoomout-icon { |
| 809 |
transform: scale(.7) |
| 810 |
} |
| 811 |
|
| 812 |
.apexcharts-zoomout-icon { |
| 813 |
margin-right: 3px |
| 814 |
} |
| 815 |
|
| 816 |
.apexcharts-pan-icon { |
| 817 |
transform: scale(.62); |
| 818 |
position: relative; |
| 819 |
left: 1px; |
| 820 |
top: 0 |
| 821 |
} |
| 822 |
|
| 823 |
.apexcharts-pan-icon svg { |
| 824 |
fill: #fff; |
| 825 |
stroke: #6e8192; |
| 826 |
stroke-width: 2 |
| 827 |
} |
| 828 |
|
| 829 |
.apexcharts-pan-icon.apexcharts-selected svg { |
| 830 |
stroke: #008ffb |
| 831 |
} |
| 832 |
|
| 833 |
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg { |
| 834 |
stroke: #333 |
| 835 |
} |
| 836 |
|
| 837 |
.apexcharts-toolbar { |
| 838 |
position: absolute; |
| 839 |
z-index: 11; |
| 840 |
max-width: 176px; |
| 841 |
text-align: right; |
| 842 |
border-radius: 3px; |
| 843 |
padding: 0 6px 2px; |
| 844 |
display: flex; |
| 845 |
justify-content: space-between; |
| 846 |
align-items: center |
| 847 |
} |
| 848 |
|
| 849 |
.apexcharts-menu { |
| 850 |
background: #fff; |
| 851 |
position: absolute; |
| 852 |
top: 100%; |
| 853 |
border: 1px solid #ddd; |
| 854 |
border-radius: 3px; |
| 855 |
padding: 3px; |
| 856 |
right: 10px; |
| 857 |
opacity: 0; |
| 858 |
min-width: 110px; |
| 859 |
transition: .15s ease all; |
| 860 |
pointer-events: none |
| 861 |
} |
| 862 |
|
| 863 |
.apexcharts-menu.apexcharts-menu-open { |
| 864 |
opacity: 1; |
| 865 |
pointer-events: all; |
| 866 |
transition: .15s ease all |
| 867 |
} |
| 868 |
|
| 869 |
.apexcharts-menu-item { |
| 870 |
padding: 6px 7px; |
| 871 |
font-size: 12px; |
| 872 |
cursor: pointer |
| 873 |
} |
| 874 |
|
| 875 |
.apexcharts-theme-light .apexcharts-menu-item:hover { |
| 876 |
background: #eee |
| 877 |
} |
| 878 |
|
| 879 |
.apexcharts-theme-dark .apexcharts-menu { |
| 880 |
background: rgba(0, 0, 0, .7); |
| 881 |
color: #fff |
| 882 |
} |
| 883 |
|
| 884 |
@media screen and (min-width:768px) { |
| 885 |
.apexcharts-canvas:hover .apexcharts-toolbar { |
| 886 |
opacity: 1 |
| 887 |
} |
| 888 |
} |
| 889 |
|
| 890 |
.apexcharts-canvas .apexcharts-element-hidden, |
| 891 |
.apexcharts-datalabel.apexcharts-element-hidden, |
| 892 |
.apexcharts-hide .apexcharts-series-points { |
| 893 |
opacity: 0; |
| 894 |
} |
| 895 |
|
| 896 |
.apexcharts-hidden-element-shown { |
| 897 |
opacity: 1; |
| 898 |
transition: 0.25s ease all; |
| 899 |
} |
| 900 |
|
| 901 |
.apexcharts-datalabel, |
| 902 |
.apexcharts-datalabel-label, |
| 903 |
.apexcharts-datalabel-value, |
| 904 |
.apexcharts-datalabels, |
| 905 |
.apexcharts-pie-label { |
| 906 |
cursor: default; |
| 907 |
pointer-events: none |
| 908 |
} |
| 909 |
|
| 910 |
.apexcharts-pie-label-delay { |
| 911 |
opacity: 0; |
| 912 |
animation-name: opaque; |
| 913 |
animation-duration: .3s; |
| 914 |
animation-fill-mode: forwards; |
| 915 |
animation-timing-function: ease |
| 916 |
} |
| 917 |
|
| 918 |
.apexcharts-radialbar-label { |
| 919 |
cursor: pointer; |
| 920 |
} |
| 921 |
|
| 922 |
.apexcharts-annotation-rect, |
| 923 |
.apexcharts-area-series .apexcharts-area, |
| 924 |
.apexcharts-gridline, |
| 925 |
.apexcharts-line, |
| 926 |
.apexcharts-point-annotation-label, |
| 927 |
.apexcharts-radar-series path:not(.apexcharts-marker), |
| 928 |
.apexcharts-radar-series polygon, |
| 929 |
.apexcharts-toolbar svg, |
| 930 |
.apexcharts-tooltip .apexcharts-marker, |
| 931 |
.apexcharts-xaxis-annotation-label, |
| 932 |
.apexcharts-yaxis-annotation-label, |
| 933 |
.apexcharts-zoom-rect, |
| 934 |
.no-pointer-events { |
| 935 |
pointer-events: none |
| 936 |
} |
| 937 |
|
| 938 |
.apexcharts-tooltip-active .apexcharts-marker { |
| 939 |
transition: .15s ease all |
| 940 |
} |
| 941 |
|
| 942 |
.resize-triggers { |
| 943 |
animation: 1ms resizeanim; |
| 944 |
visibility: hidden; |
| 945 |
opacity: 0; |
| 946 |
height: 100%; |
| 947 |
width: 100%; |
| 948 |
overflow: hidden |
| 949 |
} |
| 950 |
|
| 951 |
.contract-trigger:before, |
| 952 |
.resize-triggers, |
| 953 |
.resize-triggers>div { |
| 954 |
content: " "; |
| 955 |
display: block; |
| 956 |
position: absolute; |
| 957 |
top: 0; |
| 958 |
left: 0 |
| 959 |
} |
| 960 |
|
| 961 |
.resize-triggers>div { |
| 962 |
height: 100%; |
| 963 |
width: 100%; |
| 964 |
background: #eee; |
| 965 |
overflow: auto |
| 966 |
} |
| 967 |
|
| 968 |
.contract-trigger:before { |
| 969 |
overflow: hidden; |
| 970 |
width: 200%; |
| 971 |
height: 200% |
| 972 |
} |
| 973 |
|
| 974 |
.apexcharts-bar-goals-markers { |
| 975 |
pointer-events: none |
| 976 |
} |
| 977 |
|
| 978 |
.apexcharts-bar-shadows { |
| 979 |
pointer-events: none |
| 980 |
} |
| 981 |
|
| 982 |
.apexcharts-rangebar-goals-markers { |
| 983 |
pointer-events: none |
| 984 |
}`;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 KT(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!he.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),i.config.xaxis.convertedCatToNumeric&&new w1(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=bs.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 Vp(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 bs(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new tp(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 fj(s);var a,l,c=s.grid.drawGrid();if(s.annotations=new T_t(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 C1(e.ctx,c),h=new YS(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=ok.get(s);i&&(i.disconnect(),ok.delete(s))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,s){n.id===he.escapeString(e)&&Apex._chartInstances.splice(s,1)}),new ZT(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=he.clone(s.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(s,i){new ZT(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 Kx(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Kx(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 n_(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new n_(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=he.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 he.extend(e,n)}}]),t}(),d2t=u2t;const JT=pi(d2t),QT=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],i_=fe({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:QT,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 z=1;z<arguments.length;z++){let G=arguments[z];if(G!=null)for(let K in G)G.hasOwnProperty(K)&&(B[K]=G[K])}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 ot(),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;QT.forEach(F=>{let B=(...z)=>e(F,...z);V.chart.events[F]=(...z)=>{B(...z),R&&R.hasOwnProperty(F)&&R[F](...z)}});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),k=(V,R)=>s.value.zoomX(V,R),C=V=>s.value.dataURI(V),x=V=>s.value.setLocale(V),S=(V,R)=>{s.value.addXaxisAnnotation(V,R)},M=(V,R)=>{s.value.addYaxisAnnotation(V,R)},P=(V,R)=>{s.value.addPointAnnotation(V,R)},T=(V,R)=>{s.value.removeAnnotation(V,R)},I=()=>{s.value.clearAnnotations()};Id(()=>{window.ApexCharts=JT}),Ft(()=>{n.value=ht().proxy.$el,r()}),wn(()=>{s.value&&l()});const L=go(t);return Me(L.options,()=>{!s.value&&t.options?r():s.value.updateOptions(t.options)}),Me(L.series,()=>{!s.value&&t.series?r():s.value.updateSeries(t.series)},{deep:!0}),Me(L.type,()=>{a()}),Me(L.width,()=>{a()}),Me(L.height,()=>{a()}),{chart:s,init:r,refresh:a,destroy:l,updateOptions:u,updateSeries:c,toggleSeries:d,showSeries:h,hideSeries:f,resetSeries:m,zoomX:k,toggleDataPointSelection:b,appendData:_,appendSeries:p,addXaxisAnnotation:S,addYaxisAnnotation:M,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:I,setLocale:x,dataURI:C}},render(){return bt("div",{class:"vue-apexcharts"})}}),h2t=t=>{t.component(i_.name,i_)};i_.install=h2t;const f2t={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()}},p2t={name:"ReportsChart",mixins:[f2t],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:i_},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()}},m2t={class:"reports-chart"};function g2t(t,e,n,s,i,o){const r=Y("VueApexCharts");return v(),E("div",m2t,[y(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const qS=de(p2t,[["render",g2t]]),v2t={name:"ActivitiesChart",components:{ReportsChart:qS,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()}},y2t={class:"fcom-report-chart",style:{"min-height":"400px"}},b2t={key:1},_2t={class:"fcom-report-chart-header"},w2t={class:"fcom-report-header-action"},k2t={key:0};function C2t(t,e,n,s,i,o){const r=Y("Loading"),a=nn,l=Zt,c=Y("ReportsChart");return v(),E("div",y2t,[i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",b2t,[g("div",_2t,[g("h4",null,$(t.$t("Activities")),1),g("div",w2t,[y(l,{modelValue:i.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>i.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),E(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(),E("div",k2t,[(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 x2t=de(v2t,[["render",C2t]]),S2t={name:"PopularDayTime",components:{Loading:Ba,InfoFilled:bl},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()}},$2t={class:"fcom-report-popular-time"},A2t={key:1},E2t={class:"fcom-report-chart-header"};function M2t(t,e,n,s,i,o){const r=Y("Loading"),a=Y("InfoFilled"),l=_e,c=Ls,u=ea,d=Qr;return v(),E("div",$2t,[i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",A2t,[g("div",E2t,[g("h4",null,[W($(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),E(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 T2t=de(S2t,[["render",M2t]]),P2t={name:"Overview",components:{CheckProStatus:IS,AnalyticsHeader:zbt,AnalyticsWidgets:Gbt,ActivitiesChart:x2t,PopularDayTime:T2t},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}}},I2t={key:0},L2t={key:1},O2t={class:"fcom-report-body"};function D2t(t,e,n,s,i,o){const r=Y("CheckProStatus"),a=Y("AnalyticsHeader"),l=Y("AnalyticsWidgets"),c=Y("ActivitiesChart"),u=Y("PopularDayTime");return o.isAnalyticsEnabled?(v(),E("div",L2t,[(v(),E("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",O2t,[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(),E("div",I2t,[y(r)]))}const R2t=de(P2t,[["render",D2t]]),V2t={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}}},F2t={class:"fcom-report-header"},N2t={class:"fcom-report-header-action"};function B2t(t,e,n,s,i,o){const r=nn,a=Zt,l=Ud;return v(),E("div",F2t,[g("h4",null,$(t.$t("Members")),1),g("div",N2t,[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),E(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:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const z2t=de(V2t,[["render",B2t]]),H2t={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)}}},U2t={key:1,class:"fcom-report-stat-widgets"},j2t={class:"stat-title"};function W2t(t,e,n,s,i,o){const r=Y("Loading");return i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",U2t,[(v(!0),E(te,null,we(i.widgets,(a,l)=>(v(),E("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",j2t,$(a.title),1),g("h3",null,[W($(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},$(a.comparison)+" % ",3)])]))),128))]))}const Y2t=de(H2t,[["render",W2t]]),q2t={name:"MembersActivitiesChart",components:{Loading:Ba,ReportsChart:qS},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))}}},G2t={class:"fcom-report-chart",style:{"min-height":"400px"}},X2t={key:1},K2t={class:"fcom-report-chart-header"},Z2t={key:0};function J2t(t,e,n,s,i,o){const r=Y("Loading"),a=Y("ReportsChart");return v(),E("div",G2t,[i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",X2t,[g("div",K2t,[g("h4",null,$(t.$t("Members Activities")),1)]),i.renderChart?(v(),E("div",Z2t,[(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 Q2t=de(q2t,[["render",J2t]]),ewt={name:"TopMembersSection",components:{Loading:Ba,InfoFilled:bl},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)}}},twt={class:"fcom-top-members-wrap"},nwt={key:1},swt={class:"fcom-report-chart-header"},iwt={class:"fcom-members-activity-lists"},owt={key:0},rwt={class:"image-box"},awt=["src"],lwt={class:"number"},cwt={class:"content-box"},uwt=["title"],dwt={class:"points"};function hwt(t,e,n,s,i,o){const r=Y("Loading"),a=Y("InfoFilled"),l=_e,c=Ls;return v(),E("div",twt,[i.loading?(v(),D(r,{key:0,section:1})):(v(),E("div",nwt,[g("div",swt,[g("h4",null,[W($(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",iwt,[i.members.length?(v(!0),E(te,{key:1},we(i.members,(u,d)=>(v(),E("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",rwt,[g("img",{src:u.avatar,alt:"Member"},null,8,awt),g("span",lwt,$(i.members.length-d),1)]),g("div",cwt,[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,uwt)]),g("div",dwt,$(u[n.pointLabel]),1)]))),128)):(v(),E("div",owt,$(t.$t("No Activity")),1))])]))])}const fwt=de(ewt,[["render",hwt]]),pwt={name:"MembersAnalytics",components:{CheckProStatus:IS,AnalyticsHeader:z2t,AnalyticsWidgets:Y2t,MembersActivitiesChart:Q2t,TopMembersSection:fwt},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}}},mwt={key:0},gwt={key:1},vwt={class:"fcom-report-body"},ywt={class:"fcom-members-activities-wrap"};function bwt(t,e,n,s,i,o){const r=Y("CheckProStatus"),a=Y("AnalyticsHeader"),l=Y("AnalyticsWidgets"),c=Y("MembersActivitiesChart"),u=Y("TopMembersSection");return o.isAnalyticsEnabled?(v(),E("div",gwt,[(v(),E("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",vwt,[y(l,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),y(c,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),g("div",ywt,[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(),E("div",mwt,[y(r)]))}const _wt=de(pwt,[["render",bwt]]),wwt={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}}},kwt={class:"fcom-report-header"},Cwt={class:"fcom-report-header-action"};function xwt(t,e,n,s,i,o){const r=nn,a=Zt,l=Ud;return v(),E("div",kwt,[g("h4",null,$(t.$t("Spaces")),1),g("div",Cwt,[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),E(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),E(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:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const Swt=de(wwt,[["render",xwt]]),$wt={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()}},Awt={class:"fcom-report-stat-widgets"},Ewt={class:"stat-title"};function Mwt(t,e,n,s,i,o){const r=Y("Loading");return v(),E("div",Awt,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(!0),E(te,{key:1},we(i.widgets,(a,l)=>(v(),E("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Ewt,$(a.title),1),g("h3",null,[W($(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},$(a.comparison)+" % ",3)])]))),128))])}const Twt=de($wt,[["render",Mwt]]),Pwt={name:"AnalyticsChart",components:{ReportsChart:qS,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()}},Iwt={class:"fcom-report-chart",style:{"min-height":"400px"}},Lwt={key:1},Owt={class:"fcom-report-chart-header"},Dwt={key:0};function Rwt(t,e,n,s,i,o){const r=Y("Loading"),a=Y("ReportsChart");return v(),E("div",Iwt,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),E("div",Lwt,[g("div",Owt,[g("h4",null,$(t.$t("Space Activities")),1)]),i.renderChart?(v(),E("div",Dwt,[(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 Vwt=de(Pwt,[["render",Rwt]]),Fwt={name:"PopularSpaces",components:{InfoFilled:bl,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()}},Nwt={class:"fcom-report-popular-time"},Bwt={key:1},zwt={class:"fcom-report-chart-header"};function Hwt(t,e,n,s,i,o){const r=Y("Loading"),a=Y("InfoFilled"),l=_e,c=Ls,u=ea,d=Qr;return v(),E("div",Nwt,[i.loading?(v(),D(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),E("div",Bwt,[g("div",zwt,[g("h4",null,[W($(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),E(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 Uwt=de(Fwt,[["render",Hwt]]),jwt={name:"SpaceAnalytics",components:{CheckProStatus:IS,Loading:Ba,AnalyticsHeader:Swt,AnalyticsWidgets:Twt,AnalyticsChart:Vwt,PopularSpaces:Uwt},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"))}},Wwt={key:0},Ywt={key:1},qwt={class:"fcom-report-body"};function Gwt(t,e,n,s,i,o){const r=Y("CheckProStatus"),a=Y("Loading"),l=Y("AnalyticsHeader"),c=Y("AnalyticsWidgets"),u=Y("AnalyticsChart"),d=Y("PopularSpaces");return o.isAnalyticsEnabled?(v(),E("div",Ywt,[i.pageLoaded?(v(),E("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",qwt,[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(),E("div",Wwt,[y(r)]))}const Xwt=de(jwt,[["render",Gwt]]),Kwt=[{path:"/settings",component:H0t,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:lat,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:cQe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:clt,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:FQe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Tot,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Aat,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:Xyt,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:rJe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:e0t,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:N0t,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:m0t,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:TZe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:Sbt,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:cKe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:WYe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:OXe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:PDe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:DRe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:_He,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:Tbt,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:R2t,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:_wt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:Xwt,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:YKe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],Zwt={name:"VerifiedSign"};function Jwt(t,e,n,s,i,o){const r=Ls;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 Qwt=de(Zwt,[["render",Jwt]]),e3t={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]}}},t3t=["src"],n3t={key:1,class:"fcom_emoji"},s3t={key:2,class:"fcom_shape"},i3t={key:1};function o3t(t,e,n,s,i,o){const r=_e,a=Ls;return o.renderingBadges?(v(!0),E(te,{key:0},we(o.renderingBadges,l=>(v(),E("div",{class:q([{user_icon_only:l.show_label!="yes"},"user_badge"])},[y(a,{content:l.title,placement:"top"},{default:w(()=>[g("div",{style:Xe({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),E(te,{key:0},[l.config.logo?(v(),E("img",{key:0,alt:"",src:l.config.logo},null,8,t3t)):l.config.emoji?(v(),E("span",n3t,$(l.config.emoji),1)):l.config.shape_svg?(v(),E("span",s3t,[y(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),E("span",i3t,$(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const r3t=de(e3t,[["render",o3t]]),a3t={name:"WelcomeBanner",components:{MediaPreview:Ap},props:{config:{type:Object,default:null},closeKey:{type:String,default:""},wrapperClass:{type:String,default:""},contentClass:{type:String,default:""}},data(){return{dismissed:!1}},computed:{effectiveConfig(){return this.config!==null?this.config:this.appVars.welcome_banner},showMedia(){return this.effectiveConfig&&this.effectiveConfig.mediaType=="video"&&this.effectiveConfig.bannerVideo},showCtaButtons(){var t;return this.effectiveConfig&&((t=this.effectiveConfig.ctaButtons)==null?void 0:t.length)&&this.effectiveConfig.ctaButtons.some(e=>e.link&&e.label)},isRemovable(){return this.effectiveConfig&&this.effectiveConfig.allowClose=="yes"},effectiveCloseKey(){return this.closeKey?this.closeKey:this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"},showBanner(){if(this.dismissed)return!1;if(!this.isRemovable)return!0;const t=this.Storage.get(this.effectiveCloseKey,!1);return t?new Date().getTime()>t:!0}},methods:{closeBanner(){const t=new Date().getTime()+6048e5;this.Storage.set(this.effectiveCloseKey,t),this.dismissed=!0}}},l3t={key:0,class:"fcom_welcome_title"},c3t=["innerHTML"],u3t={key:2,class:"fcom_welcome_cta_buttons"},d3t=["href","target"];function h3t(t,e,n,s,i,o){const r=Y("media-preview"),a=Cr,l=Y("MoreFilled"),c=_e,u=qe,d=Da,h=Ra,f=Oa;return o.effectiveConfig&&o.showBanner?(v(),E("div",{key:0,class:q(["fcom_welcome_box",n.wrapperClass])},[o.showMedia?(v(),D(r,{key:0,media_item:o.effectiveConfig.bannerVideo},null,8,["media_item"])):o.effectiveConfig.bannerImage?(v(),D(a,{key:1,class:"feed_media",alt:t.$t("Image Preview"),src:o.effectiveConfig.bannerImage},null,8,["alt","src"])):O("",!0),g("div",{class:q(n.contentClass)},[o.effectiveConfig.title?(v(),E("h2",l3t,$(o.effectiveConfig.title),1)):O("",!0),o.effectiveConfig.description_rendered?(v(),E("div",{key:1,class:"fcom_welcome_sub",innerHTML:o.effectiveConfig.description_rendered},null,8,c3t)):O("",!0),o.showCtaButtons?(v(),E("div",u3t,[(v(!0),E(te,null,we(o.effectiveConfig.ctaButtons,p=>(v(),E(te,null,[p.link&&p.label?(v(),E("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"",class:q({"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,d3t)):O("",!0)],64))),256))])):O("",!0)],2),o.isRemovable?(v(),D(f,{key:2,trigger:"click",class:"fcom_welcome_close"},{dropdown:w(()=>[y(h,null,{default:w(()=>[y(d,{onClick:o.closeBanner},{default:w(()=>[W($(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)],2)):O("",!0)}const f3t=de(a3t,[["render",h3t]]);Mu(()=>Promise.resolve().then(()=>dxt),void 0);Mu(()=>Promise.resolve().then(()=>fxt),void 0);const p3t=[gae,dR,Iae,aR,lR,wle,Dle,Jae,ile,ule,Nle,lae,hae,fR,uR,fle,sR,rle,Z_,cR,nle,K4,Fr,Vle,yd,Fd,yae,sC,Z4,zae,Xae,$le,sae,Bo,rR,vle,X4,jae,rae,Aae,mle,J_,hR,bl,Q_,Nae,Hle];function bg(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(bg(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(bg(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Rs=Ig(wOe),GS=Pbe();GS.use(Wbe);GS.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)}});Rs.use(GS);Rs.use(Xye);Rs.config.globalProperties.appVars=window.fluentComAdmin;Rs.config.globalProperties.auth=window.fluentComAdmin.auth;Rs.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let n6="40%",s6="60%",Sj="500px";window.innerWidth<600?(s6="95%",n6="90%",Sj="90%"):window.innerWidth<800&&(s6="80%",n6="80%");p3t.forEach(t=>{Rs.component(t.name,t)});Rs.component("VerifiedSign",Qwt);Rs.component("UserAvatar",j2);Rs.component("UserRouteLink",sa);Rs.component("WelcomeBanner",f3t);Rs.component("UserBadge",r3t);function eP(){Rs.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;Rs.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:n6,dialogWidth:s6,modalWidth:Sj,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},computed:{siteDateFormat(){return this.appVars.date_formatter||"MMM D, YYYY"},siteTimeFormat(){return this.appVars.time_formatter||"HH:mm"},siteDateTimeFormat(){return this.appVars.date_time_formatter||"MMM D, YYYY HH:mm"}},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=bg(i),o||(o="Something is wrong!"),typeof o!="string"&&(o=bg(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:bg,$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):""},convertTo24Hour(i){if(!i)return i;const o=i.match(/^(\d{1,2}):(\d{2})(?::\d{2})?\s*([AaPp][Mm])?$/);if(!o)return i;let r=parseInt(o[1],10);const a=o[2],l=o[3];if(l){const c=l.toUpperCase()==="PM";c&&r!==12&&(r+=12),!c&&r===12&&(r=0)}return String(r).padStart(2,"0")+":"+a},ucWords(i){return i?i.replace(/\b[a-z]/g,function(o){return o.toUpperCase()}):""},smartDate(i,o=!1,r=!1){if(!i)return"";const a=this.siteTimeFormat;let l="D MMM, YYYY";dayjs(i).isSame(new Date,"year")?(l="D MMM",o&&(Math.abs(dayjs(i).diff(new Date,"days"))<=5||r)&&(l="D MMM, "+a)):o&&r&&(l="D MMM, YYYY, "+a);const c=dayjs(i);return c.isValid()?c.format(l):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},$upgradeUrl(i,o){const r=this.appVars&&this.appVars.upgrade_url;if(!r)return r;try{const a=new URL(r);return i&&a.searchParams.set("utm_content",i),o&&a.searchParams.set("utm_campaign",o),a.toString()}catch{return r}},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(" ","",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:Ac,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 Ac(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(` |
| 985 |
`),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=>{if(window.__fcomNonceRenewInFlight)return;window.__fcomNonceRenewInFlight=!0;const o=()=>{window.__fcomSessionExpiredShown||(window.__fcomSessionExpiredShown=!0,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()}}))};this.$ajax("GET","fluent_community_renew_nonce",{ajax_nonce:window.fluentComAdmin.ajax_nonce}).then(r=>{r&&r.rest_nonce?(window.fluentComAdmin.rest.nonce=r.rest_nonce,window.fluentComAdmin.ajax_nonce=r.ajax_nonce,window.__fcomNonceRenewInFlight=!1):o()}).catch(()=>{o()})}))}}),Rs.config.globalProperties.$notify=wbe,Rs.config.globalProperties.$confirm=Ww.confirm,Rs.config.globalProperties.$promt=Ww.prompt,Rs.config.globalProperties.$messageBox=Ww,Rs.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",Kwt);let n=null;window.fluentComAdmin.routing_system=="hash"?n=L7({routes:e,history:$Z()}):n=L7({routes:e,history:_O(window.fluentComAdmin.portal_slug)});const s=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Rs);window.fluentFrameworkApp=s.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?eP():document.addEventListener("fluentCommunityUtilReady",function(){eP()});var ju,_f;class m3t{constructor(e){oa(this,ju,void 0);oa(this,_f,new Set);Qi(this,ju,e)}get current(){return jt(this,ju)}set current(e){jt(this,ju)!=e&&(Qi(this,ju,e),jt(this,_f).forEach(n=>n(e)))}on(e){return jt(this,_f).add(e),()=>jt(this,_f).delete(e)}}ju=new WeakMap,_f=new WeakMap;const $j=t=>new m3t(t),i6=Symbol.for("atomico.hooks");globalThis[i6]=globalThis[i6]||{};let sp=globalThis[i6];const g3t=Symbol.for("Atomico.suspense"),Aj=Symbol.for("Atomico.effect"),v3t=Symbol.for("Atomico.layoutEffect"),Ej=Symbol.for("Atomico.insertionEffect"),xv=(t,e,n)=>{const{i:s,hooks:i}=sp.c,o=i[s]=i[s]||{};return o.value=t(o.value),o.effect=e,o.tag=n,sp.c.i++,i[s].value},ld=t=>xv((e=$j(t))=>e),XS=()=>xv((t=$j(sp.c.host))=>t),Mj=()=>sp.c.update,y3t=(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=>{sp.c={host:e,hooks:s,update:t,i:0,id:n};let u;try{i=!1,u=c()}catch(d){if(d!==g3t)throw d;i=!0}finally{sp.c=null}return u},cleanEffects:c=>(r(Ej,c),()=>(r(v3t,c),()=>{r(Aj,c)})),isSuspense:o}},Sv=Symbol.for;function Tj(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 il=t=>typeof t=="function",_g=t=>typeof t=="object",{isArray:b3t}=Array,o6=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function Pj(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 Ij=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let Lj=class{constructor(e,n,s){this.message=n,this.target=e,this.value=s}};class _3t extends Lj{}class w3t extends Lj{}const o_="Custom",k3t=null,C3t={true:1,"":1,1:1};function x3t(t,e,n,s,i){const{type:o,reflect:r,event:a,value:l,attr:c=$3t(e)}=(n==null?void 0:n.name)!=o_&&_g(n)&&n!=k3t?n:{type:n},u=(o==null?void 0:o.name)===o_&&o.map,d=l!=null?o==Function||!il(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?M3t:T3t)(o,h);if(p&&m!=null)throw new _3t(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&&S3t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,A3t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(i[e]=d()),s[c]={prop:e,type:o}}const S3t=(t,{type:e,base:n=CustomEvent,...s})=>t.dispatchEvent(new n(e,s)),$3t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),A3t=(t,e,n,s)=>s==null||e==Boolean&&!s?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===o_&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(s):_g(s)?JSON.stringify(s):e==Boolean?"":s),E3t=(t,e)=>t==Boolean?!!C3t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==o_?e:new t(e),M3t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},T3t=(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 P3t=0;const I3t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+P3t++},eh=(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=y3t(()=>this.update(),this,I3t(this));let f,p=!0;const m=o6(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&&L3t(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]=E3t(p,h)}catch{throw new w3t(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)x3t(this.prototype,d,r[d],n,s);return Object.keys(n).concat(u)}}return l};function L3t(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const s=[];Pj(e,i=>{i&&(i instanceof Element?n.appendChild(i.cloneNode(!0)):s.push(i))}),s.length&&(n.adoptedStyleSheets=s)}}const Oj=t=>(e,n)=>{xv(([s,i]=[])=>((i||!i)&&(i&&Tj(i,n)?s=s||!0:(il(s)&&s(),s=null)),[s,n]),([s,i],o)=>o?(il(s)&&s(),[]):[s||e(),i],t)},Ed=Oj(Aj),O3t=Oj(Ej);class D3t 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 Tr=t=>{const e=Mj();return xv((n=new D3t(t,(s,i,o)=>{s=il(s)?s(i[0]):s,s!==i[0]&&(i[0]=s,o||e())}))=>n)},r_=(t,e)=>{const[n]=xv(([s,i,o=0]=[])=>((!i||i&&!Tj(i,e))&&(s=t()),[s,e,o]));return n},gh=(t,e)=>r_(()=>t,e),r6=Sv("atomico/options");globalThis[r6]=globalThis[r6]||{sheet:!!document.adoptedStyleSheets};const Dj=globalThis[r6];new Promise(t=>{Dj.ssr||(document.readyState==="loading"?Ij(document,"DOMContentLoaded",t):t())});const R3t={checked:1,value:1,selected:1},V3t={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},F3t={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Ey={},a6=[];class l6 extends Text{}const N3t=Sv("atomico/id"),wg=Sv("atomico/type"),rk=Sv("atomico/ref"),Rj=Sv("atomico/vnode"),B3t=()=>{};function z3t(t,e,n){return Fj(this,t,e,n)}const Vj=(t,e,...n)=>{const s=e||Ey;let{children:i}=s;if(i=i??(n.length?n:a6),t===B3t)return i;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(i!=a6?{children:i,...s}:s);const r=Dj.render||z3t;return{[wg]:Rj,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 Fj(t,e,n=N3t,s,i){let o;if(e&&e[n]&&e[n].vnode==t||t[wg]!=Rj)return e;(t||!e)&&(i=i||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[rk]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[rk]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(s=!0,e=t.type.cloneNode(!0),e[rk]=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]:Ey,{vnode:a=Ey,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=a6,props:h=Ey}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&j3t(e,h,t.props,u,i),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=U3t(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 H3t(t,e){const n=new l6(""),s=new l6("");let i;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(o6(o,!0)&&!o6(r,!0)){i=o;break}o=r}}return i?i.before(s):t.append(s),{markStart:n,markEnd:s}}function U3t(t,e,n,s,i,o){t=t==null?null:b3t(t)?t:[t];const r=e||H3t(n,i),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&Pj(t,f=>{if(typeof f=="object"&&!f[wg])return;const p=f[wg]&&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[wg])_=Fj(f,b,s,i,o);else{const k=f+"";!(_ instanceof Text)||_ instanceof l6?_=new Text(k):_.data!=k&&(_.data=k)}_!=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 j3t(t,e,n,s,i){for(const o in e)!(o in n)&&tP(t,o,e[o],null,i,s);for(const o in n)tP(t,o,e[o],n[o],i,s)}function tP(t,e,n,s,i,o){if(e=e=="class"&&!i?"className":e,n=n??null,s=s??null,e in t&&R3t[e]&&(n=t[e]),!(s===n||F3t[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(s);else if(e[0]=="o"&&e[1]=="n"&&(il(s)||il(n)))W3t(t,e.slice(2),s,o);else if(e=="ref")s&&(il(s)?s(t):s.current=t);else if(e=="style"){const{style:r}=t;n=n||"",s=s||"";const a=_g(n),l=_g(s);if(a)for(const c in n)if(l)!(c in s)&&nP(r,c,null);else break;if(l)for(const c in s){const u=s[c];a&&n[c]===u||nP(r,c,u)}else r.cssText=s}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!i&&!V3t[e]&&e in t||il(s)||il(n))?t[e]=s??"":s==null?t.removeAttribute(r):t.setAttribute(r,_g(s)?JSON.stringify(s):s)}}function W3t(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 nP(t,e,n){let s="setProperty";n==null&&(s="removeProperty",n=null),~e.indexOf("-")?t[s](e,n):t[e]=n}const Y3t=Vj("host",{style:"display: contents"}),q3t="value",G3t=(t,e)=>{const n=XS(),s=ld();O3t(()=>Ij(n.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&t===i.detail.id&&(i.stopPropagation(),i.detail.connect(s))}),[t]),s.current=e},X3t=t=>{const e=eh(({value:n})=>(G3t(e,n),Y3t),{props:{value:{type:Object,value:()=>t}}});return e[q3t]=t,e};X3t({dispatch(t,e){}});const K3t=0,vh=1,b0=2,_0=3,sP=4,Mm=5,c6=6,Nj=0,Z3t=2,Bj=3,zj=4,Hj=Mm,J3t=c6,Uj=(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===Bj?s[0]=a:r===zj?s[1]=Object.assign(s[1]||{},a):r===Hj?(s[1]=s[1]||{})[e[++o]]=a:r===J3t?s[1][e[++o]]+=a+"":r?(i=t.apply(a,Uj(t,a,n,["",null])),s.push(i),a[0]?e[0]|=2:(e[o-2]=Nj,e[o]=i)):s.push(a)}return s},Q3t=function(t){let e=vh,n="",s="",i=[0],o,r;const a=l=>{e===vh&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(Nj,l,n):e===_0&&(l||n)?(i.push(Bj,l,n),e=b0):e===b0&&n==="..."&&l?i.push(zj,l,0):e===b0&&n&&!l?i.push(Hj,0,!0,n):e>=Mm&&((n||!l&&e===Mm)&&(i.push(e,0,n,r),e=c6),l&&(i.push(e,l,0,r),e=c6)),n=""};for(let l=0;l<t.length;l++){l&&(e===vh&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===vh?o==="<"?(a(),i=[i],e=_0):n+=o:e===sP?n==="--"&&o===">"?(e=vh,n=""):n=o+n[0]:s?o===s?s="":n+=o:o==='"'||o==="'"?s=o:o===">"?(a(),e=vh):e&&(o==="="?(e=Mm,r=n,n=""):o==="/"&&(e<Mm||t[l][c+1]===">")?(a(),e===_0&&(i=i[0]),e=i,(i=i[0]).push(Z3t,0,e),e=K3t):o===" "||o===" "||o===` |
| 986 |
`||o==="\r"?(a(),e=b0):n+=o),e===_0&&n==="!--"&&(e=sP,i=i[0])}return a(),i},ekt=new Map;function It(t){let e=ekt;return e=Uj(Vj,e.get(t)||(e.set(t,e=Q3t(t)),e),arguments,[]),e.length>1?e:e[0]}var KS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yh=(t,e,n)=>(KS(t,e,"read from private field"),n?n.call(t):e.get(t)),bh=(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)},_h=(t,e,n,s)=>(KS(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),tkt=(t,e,n)=>(KS(t,e,"access private method"),n),My,Ty,Tm,Pm,Py,u6,jj;let ZS=class{constructor(e){bh(this,u6),bh(this,My,void 0),bh(this,Ty,void 0),bh(this,Tm,void 0),bh(this,Pm,void 0),bh(this,Py,void 0),_h(this,Tm,!1),this.onShow=()=>{},this.onHide=()=>{},_h(this,Py,(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(yh(this,Tm)||((i=n.dom.parentElement)==null||i.appendChild(this.element),_h(this,Tm,!0)),!(r||h)){if(!yh(this,Ty).call(this,n,s)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"top",middleware:[tC(),eC(yh(this,Pm))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{N2(yh(this,Py),yh(this,My))(n,s)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&nC(n,this.element,{placement:"top",middleware:[tC(),eC(yh(this,Pm))]}).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,_h(this,My,e.debounce??200),_h(this,Ty,e.shouldShow??tkt(this,u6,jj)),_h(this,Pm,e.offset),this.element.dataset.show="false"}};My=new WeakMap,Ty=new WeakMap,Tm=new WeakMap,Pm=new WeakMap,Py=new WeakMap,u6=new WeakSet,jj=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 Ot,a=this.element.contains(document.activeElement),l=!t.hasFocus()&&!a,c=!t.editable;return!(l||s||r||c)};function JS(t){const e=ms({},`${t}_TOOLTIP_SPEC`),n=Ps(i=>{const o=i.get(e.key);return new rs({key:new ps(`${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 Wj(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=Wj(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Js(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Wj(t))&&(s&&(s+=" "),s+=e);return s}var nkt=Object.defineProperty,iP=Object.getOwnPropertySymbols,skt=Object.prototype.hasOwnProperty,ikt=Object.prototype.propertyIsEnumerable,oP=(t,e,n)=>e in t?nkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,okt=(t,e)=>{for(var n in e||(e={}))skt.call(e,n)&&oP(t,n,e[n]);if(iP)for(var n of iP(e))ikt.call(e,n)&&oP(t,n,e[n]);return t};function th(t,e){return Object.assign(t,{meta:okt({package:"@milkdown/components"},e)}),t}var rkt=Object.defineProperty,rP=Object.getOwnPropertySymbols,akt=Object.prototype.hasOwnProperty,lkt=Object.prototype.propertyIsEnumerable,aP=(t,e,n)=>e in t?rkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QS=(t,e)=>{for(var n in e||(e={}))akt.call(e,n)&&aP(t,n,e[n]);if(rP)for(var n of rP(e))lkt.call(e,n)&&aP(t,n,e[n]);return t};const ckt={mode:"preview"},_l=ms(QS({},ckt),"linkTooltipStateCtx");th(_l,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const ukt={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},ip=ms(QS({},ukt),"linkTooltipAPICtx");th(_l,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const dkt={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>It`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},J2=ms(QS({},dkt),"linkTooltipConfigCtx");th(_l,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const $v=JS("LINK_PREVIEW");th($v[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});th($v[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const Q2=JS("LINK_EDIT");th(Q2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});th(Q2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function hkt(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 fkt(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===Hr.mark.type(t));if(!(!r||!$v.pluginKey()))return{show:!0,pos:i,node:o,mark:r}}function Yj(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 qj=({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 It` |
| 987 |
<host> |
| 988 |
<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})}}> |
| 989 |
<span class="link-icon"> |
| 990 |
${t==null?void 0:t.linkIcon()} |
| 991 |
</span> |
| 992 |
<a href=${e} target="_blank" class="link-display">${e}</a> |
| 993 |
<span class="button link-edit-button" onmousedown=${i}> |
| 994 |
${t==null?void 0:t.editButton()} |
| 995 |
</span> |
| 996 |
<span class="button link-remove-button" onmousedown=${o}> |
| 997 |
${t==null?void 0:t.removeButton()} |
| 998 |
</span> |
| 999 |
</div> |
| 1000 |
</host> |
| 1001 |
`};qj.props={config:Object,src:String,onEdit:Function,onRemove:Function};const Gj=eh(qj);var Xj=t=>{throw TypeError(t)},Kj=(t,e,n)=>e.has(t)||Xj("Cannot "+n),Wn=(t,e,n)=>(Kj(t,e,"read from private field"),n?n.call(t):e.get(t)),Hl=(t,e,n)=>e.has(t)?Xj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),w0=(t,e,n,s)=>(Kj(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),tc,$r,Im,Lm,Iy,Ly,Oy,Om;class pkt{constructor(e,n){this.ctx=e,Hl(this,tc,new Gj),Hl(this,$r),Hl(this,Im,this.ctx.use(_l.key)),Hl(this,Lm,!1),Hl(this,Iy,({mode:s})=>{s==="edit"&&Wn(this,Om).call(this)}),Hl(this,Ly,()=>{w0(this,Lm,!0)}),Hl(this,Oy,()=>{w0(this,Lm,!1)}),Hl(this,Om,()=>{Wn(this,$r).hide(),Wn(this,$r).element.removeEventListener("mouseenter",Wn(this,Ly)),Wn(this,$r).element.removeEventListener("mouseleave",Wn(this,Oy))}),this.show=(s,i,o,r)=>{Wn(this,tc).config=this.ctx.get(J2.key),Wn(this,tc).src=s.attrs.href,Wn(this,tc).onEdit=()=>{this.ctx.get(ip.key).editLink(s,i,o)},Wn(this,tc).onRemove=()=>{this.ctx.get(ip.key).removeLink(i,o),Wn(this,Om).call(this)},Wn(this,$r).show({getBoundingClientRect:()=>r}),Wn(this,$r).element.addEventListener("mouseenter",Wn(this,Ly)),Wn(this,$r).element.addEventListener("mouseleave",Wn(this,Oy))},this.hide=()=>{Wn(this,Lm)||Wn(this,Om).call(this)},this.update=()=>{},this.destroy=()=>{Wn(this,Im).off(Wn(this,Iy)),Wn(this,$r).destroy(),Wn(this,tc).remove()},w0(this,$r,new ZS({debounce:0,content:Wn(this,tc),shouldShow:()=>!1})),Wn(this,$r).update(n),w0(this,Im,e.use(_l.key)),Wn(this,Im).on(Wn(this,Iy))}}tc=new WeakMap;$r=new WeakMap;Im=new WeakMap;Lm=new WeakMap;Iy=new WeakMap;Ly=new WeakMap;Oy=new WeakMap;Om=new WeakMap;Yj("milkdown-link-preview",Gj);function mkt(t){let e;const s=N2((o,r)=>{if(!e||!o.hasFocus()||t.get(_l.key).mode==="edit")return;const l=fkt(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=hkt(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,C2(o,d,h));return}e.hide()},200),i=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set($v.key,{props:{handleDOMEvents:{mousemove:s,mouseleave:i}},view:o=>(e=new pkt(t,o),e)})}const Zj=({src:t,onConfirm:e,onCancel:n,config:s})=>{const i=ld(),[o,r]=Tr(t);Ed(()=>{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 It` |
| 1002 |
<host> |
| 1003 |
<div class="link-edit"> |
| 1004 |
<input |
| 1005 |
class="input-area" |
| 1006 |
placeholder=${s==null?void 0:s.inputPlaceholder} |
| 1007 |
ref=${i} |
| 1008 |
onkeydown=${l} |
| 1009 |
oninput=${c=>r(c.target.value)} |
| 1010 |
value=${o} |
| 1011 |
/> |
| 1012 |
<span class=${Js("button confirm",!o&&"hidden")} onclick=${a}> |
| 1013 |
${s==null?void 0:s.confirmButton()} |
| 1014 |
</span> |
| 1015 |
</div> |
| 1016 |
</host> |
| 1017 |
`};Zj.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const Jj=eh(Zj);var gkt=Object.defineProperty,vkt=Object.defineProperties,ykt=Object.getOwnPropertyDescriptors,lP=Object.getOwnPropertySymbols,bkt=Object.prototype.hasOwnProperty,_kt=Object.prototype.propertyIsEnumerable,Qj=t=>{throw TypeError(t)},cP=(t,e,n)=>e in t?gkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k0=(t,e)=>{for(var n in e||(e={}))bkt.call(e,n)&&cP(t,n,e[n]);if(lP)for(var n of lP(e))_kt.call(e,n)&&cP(t,n,e[n]);return t},uP=(t,e)=>vkt(t,ykt(e)),eW=(t,e,n)=>e.has(t)||Qj("Cannot "+n),cs=(t,e,n)=>(eW(t,e,"read from private field"),n?n.call(t):e.get(t)),wh=(t,e,n)=>e.has(t)?Qj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),C0=(t,e,n,s)=>(eW(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),ca,nc,sc,Eu,d6,Dy;const dP={from:-1,to:-1,mark:null};class wkt{constructor(e,n){this.ctx=e,wh(this,ca,new Jj),wh(this,nc),wh(this,sc,k0({},dP)),wh(this,Eu,()=>{cs(this,nc).hide(),this.ctx.update(_l.key,s=>uP(k0({},s),{mode:"preview"})),C0(this,sc,k0({},dP))}),wh(this,d6,s=>{const i=this.ctx.get(Vn),{from:o,to:r,mark:a}=cs(this,sc),l=Hr.type(this.ctx);if(a&&a.attrs.href===s){cs(this,Eu).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),cs(this,Eu).call(this)}),wh(this,Dy,(s,i,o)=>{const r=this.ctx.get(J2.key);cs(this,ca).config=r,cs(this,ca).src=s,this.ctx.update(_l.key,l=>uP(k0({},l),{mode:"edit"}));const a=this.ctx.get(Vn);a.dispatch(a.state.tr.setSelection(Ot.create(a.state.doc,i,o))),cs(this,nc).show({getBoundingClientRect:()=>C2(a,i,o)}),requestAnimationFrame(()=>{var l;(l=cs(this,ca).querySelector("input"))==null||l.focus()})}),this.update=s=>{const{state:i}=s,{selection:o}=i;if(!(o instanceof Ot))return;const{from:r,to:a}=o;r===cs(this,sc).from&&a===cs(this,sc).to||cs(this,Eu).call(this)},this.destroy=()=>{cs(this,nc).destroy(),cs(this,ca).remove()},this.addLink=(s,i)=>{C0(this,sc,{from:s,to:i,mark:null}),cs(this,Dy).call(this,"",s,i)},this.editLink=(s,i,o)=>{C0(this,sc,{from:i,to:o,mark:s}),cs(this,Dy).call(this,s.attrs.href,i,o)},this.removeLink=(s,i)=>{const o=this.ctx.get(Vn),r=o.state.tr;r.removeMark(s,i,Hr.type(this.ctx)),o.dispatch(r),cs(this,Eu).call(this)},C0(this,nc,new ZS({content:cs(this,ca),debounce:0,shouldShow:()=>!1})),cs(this,nc).onHide=()=>{cs(this,ca).update().catch(s=>{throw s}),n.dom.focus({preventScroll:!0})},cs(this,nc).update(n),cs(this,ca).onConfirm=cs(this,d6),cs(this,ca).onCancel=cs(this,Eu)}}ca=new WeakMap;nc=new WeakMap;sc=new WeakMap;Eu=new WeakMap;d6=new WeakMap;Dy=new WeakMap;var kkt=Object.defineProperty,Ckt=Object.defineProperties,xkt=Object.getOwnPropertyDescriptors,hP=Object.getOwnPropertySymbols,Skt=Object.prototype.hasOwnProperty,$kt=Object.prototype.propertyIsEnumerable,fP=(t,e,n)=>e in t?kkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Akt=(t,e)=>{for(var n in e||(e={}))Skt.call(e,n)&&fP(t,n,e[n]);if(hP)for(var n of hP(e))$kt.call(e,n)&&fP(t,n,e[n]);return t},Ekt=(t,e)=>Ckt(t,xkt(e));Yj("milkdown-link-edit",Jj);function Mkt(t){let e;t.update(ip.key,n=>Ekt(Akt({},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(Q2.key,{view:n=>(e=new wkt(t,n),e)})}function Tkt(t){mkt(t),Mkt(t)}const Pkt=[_l,ip,J2,$v,Q2].flat();It` |
| 1018 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1019 |
<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"/> |
| 1020 |
</svg> |
| 1021 |
`;It` |
| 1022 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1023 |
<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"/> |
| 1024 |
</svg> |
| 1025 |
`;It` |
| 1026 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1027 |
<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"/> |
| 1028 |
</svg> |
| 1029 |
`;const Ikt=It` |
| 1030 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1031 |
<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"/> |
| 1032 |
</svg> |
| 1033 |
`;It` |
| 1034 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1035 |
<g clip-path="url(#clip0_952_6527)"> |
| 1036 |
<circle cx="12" cy="12" r="3"/> |
| 1037 |
</g> |
| 1038 |
<defs> |
| 1039 |
<clipPath id="clip0_952_6527"> |
| 1040 |
<rect width="24" height="24"/> |
| 1041 |
</clipPath> |
| 1042 |
</defs> |
| 1043 |
</svg> |
| 1044 |
`;const Lkt=It` |
| 1045 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1046 |
<g clip-path="url(#clip0_977_8070)"> |
| 1047 |
<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"/> |
| 1048 |
</g> |
| 1049 |
<defs> |
| 1050 |
<clipPath id="clip0_977_8070"> |
| 1051 |
<rect width="24" height="24"/> |
| 1052 |
</clipPath> |
| 1053 |
</defs> |
| 1054 |
</svg> |
| 1055 |
`,Okt=It` |
| 1056 |
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"> |
| 1057 |
<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"/> |
| 1058 |
</svg> |
| 1059 |
`;It` |
| 1060 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1061 |
<g clip-path="url(#clip0_1803_1151)"> |
| 1062 |
<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"/> |
| 1063 |
</g> |
| 1064 |
<defs> |
| 1065 |
<clipPath id="clip0_1803_1151"> |
| 1066 |
<rect width="24" height="24"/> |
| 1067 |
</clipPath> |
| 1068 |
</defs> |
| 1069 |
</svg> |
| 1070 |
`;It` |
| 1071 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1072 |
<g clip-path="url(#clip0_1803_535)"> |
| 1073 |
<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"/> |
| 1074 |
</g> |
| 1075 |
<defs> |
| 1076 |
<clipPath id="clip0_1803_535"> |
| 1077 |
<rect width="24" height="24"/> |
| 1078 |
</clipPath> |
| 1079 |
</defs> |
| 1080 |
</svg> |
| 1081 |
`;It` |
| 1082 |
<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"> |
| 1083 |
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /> |
| 1084 |
</svg> |
| 1085 |
`;It` |
| 1086 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1087 |
<g clip-path="url(#clip0_1098_15553)"> |
| 1088 |
<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"/> |
| 1089 |
</g> |
| 1090 |
<defs> |
| 1091 |
<clipPath id="clip0_1098_15553"> |
| 1092 |
<rect width="24" height="24"/> |
| 1093 |
</clipPath> |
| 1094 |
</defs> |
| 1095 |
</svg> |
| 1096 |
`;const tW=It` |
| 1097 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1098 |
<g clip-path="url(#clip0_977_8081)"> |
| 1099 |
<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"/> |
| 1100 |
</g> |
| 1101 |
<defs> |
| 1102 |
<clipPath id="clip0_977_8081"> |
| 1103 |
<rect width="24" height="24"/> |
| 1104 |
</clipPath> |
| 1105 |
</defs> |
| 1106 |
</svg> |
| 1107 |
`,nW=It` |
| 1108 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 1109 |
<g clip-path="url(#clip0_1013_1606)"> |
| 1110 |
<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"/> |
| 1111 |
</g> |
| 1112 |
<defs> |
| 1113 |
<clipPath id="clip0_1013_1606"> |
| 1114 |
<rect width="24" height="24" /> |
| 1115 |
</clipPath> |
| 1116 |
</defs> |
| 1117 |
</svg> |
| 1118 |
`,Dkt=It` |
| 1119 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1120 |
<g clip-path="url(#clip0_977_7900)"> |
| 1121 |
<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"/> |
| 1122 |
</g> |
| 1123 |
<defs> |
| 1124 |
<clipPath id="clip0_977_7900"> |
| 1125 |
<rect width="24" height="24"/> |
| 1126 |
</clipPath> |
| 1127 |
</defs> |
| 1128 |
</svg> |
| 1129 |
`;It` |
| 1130 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> |
| 1131 |
<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"/> |
| 1132 |
</svg> |
| 1133 |
`;const Rkt=It` |
| 1134 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1135 |
<g clip-path="url(#clip0_1013_1585)"> |
| 1136 |
<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"/> |
| 1137 |
</g> |
| 1138 |
<defs> |
| 1139 |
<clipPath id="clip0_1013_1585"> |
| 1140 |
<rect width="24" height="24"/> |
| 1141 |
</clipPath> |
| 1142 |
</defs> |
| 1143 |
</svg> |
| 1144 |
`;It` |
| 1145 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1146 |
<g clip-path="url(#clip0_992_5553)"> |
| 1147 |
<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"/> |
| 1148 |
</g> |
| 1149 |
<defs> |
| 1150 |
<clipPath id="clip0_992_5553"> |
| 1151 |
<rect width="24" height="24"/> |
| 1152 |
</clipPath> |
| 1153 |
</defs> |
| 1154 |
</svg> |
| 1155 |
`;const Vkt=It` |
| 1156 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1157 |
<g clip-path="url(#clip0_992_5559)"> |
| 1158 |
<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"/> |
| 1159 |
</g> |
| 1160 |
<defs> |
| 1161 |
<clipPath id="clip0_992_5559"> |
| 1162 |
<rect width="24" height="24"/> |
| 1163 |
</clipPath> |
| 1164 |
</defs> |
| 1165 |
</svg> |
| 1166 |
`,Fkt=It` |
| 1167 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1168 |
<g clip-path="url(#clip0_992_5565)"> |
| 1169 |
<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"/> |
| 1170 |
</g> |
| 1171 |
<defs> |
| 1172 |
<clipPath id="clip0_992_5565"> |
| 1173 |
<rect width="24" height="24"/> |
| 1174 |
</clipPath> |
| 1175 |
</defs> |
| 1176 |
</svg> |
| 1177 |
`,Nkt=It` |
| 1178 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1179 |
<g clip-path="url(#clip0_977_7757)"> |
| 1180 |
<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"/> |
| 1181 |
</g> |
| 1182 |
<defs> |
| 1183 |
<clipPath id="clip0_977_7757"> |
| 1184 |
<rect width="24" height="24"/> |
| 1185 |
</clipPath> |
| 1186 |
</defs> |
| 1187 |
</svg> |
| 1188 |
`;It` |
| 1189 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1190 |
<g clip-path="url(#clip0_977_7760)"> |
| 1191 |
<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"/> |
| 1192 |
</g> |
| 1193 |
<defs> |
| 1194 |
<clipPath id="clip0_977_7760"> |
| 1195 |
<rect width="24" height="24"/> |
| 1196 |
</clipPath> |
| 1197 |
</defs> |
| 1198 |
</svg> |
| 1199 |
`;It` |
| 1200 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1201 |
<g clip-path="url(#clip0_977_7763)"> |
| 1202 |
<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"/> |
| 1203 |
</g> |
| 1204 |
<defs> |
| 1205 |
<clipPath id="clip0_977_7763"> |
| 1206 |
<rect width="24" height="24"/> |
| 1207 |
</clipPath> |
| 1208 |
</defs> |
| 1209 |
</svg> |
| 1210 |
`;const h6=It` |
| 1211 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1212 |
<g clip-path="url(#clip0_977_8075)"> |
| 1213 |
<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"/> |
| 1214 |
</g> |
| 1215 |
<defs> |
| 1216 |
<clipPath id="clip0_977_8075"> |
| 1217 |
<rect width="24" height="24"/> |
| 1218 |
</clipPath> |
| 1219 |
</defs> |
| 1220 |
</svg> |
| 1221 |
`,Bkt=It` |
| 1222 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1223 |
<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"/> |
| 1224 |
</svg> |
| 1225 |
`,sW=It` |
| 1226 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1227 |
<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"/> |
| 1228 |
</svg> |
| 1229 |
`;It` |
| 1230 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1231 |
<g clip-path="url(#clip0_971_7680)"> |
| 1232 |
<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" /> |
| 1233 |
</g> |
| 1234 |
<defs> |
| 1235 |
<clipPath id="clip0_971_7680"> |
| 1236 |
<rect width="24" height="24"/> |
| 1237 |
</clipPath> |
| 1238 |
</defs> |
| 1239 |
</svg> |
| 1240 |
`;const zkt=It` |
| 1241 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1242 |
<g clip-path="url(#clip0_977_8067)"> |
| 1243 |
<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"/> |
| 1244 |
</g> |
| 1245 |
<defs> |
| 1246 |
<clipPath id="clip0_977_8067"> |
| 1247 |
<rect width="24" height="24"/> |
| 1248 |
</clipPath> |
| 1249 |
</defs> |
| 1250 |
</svg> |
| 1251 |
`;It` |
| 1252 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1253 |
<g clip-path="url(#clip0_971_7676)"> |
| 1254 |
<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"/> |
| 1255 |
</g> |
| 1256 |
<defs> |
| 1257 |
<clipPath id="clip0_971_7676"> |
| 1258 |
<rect width="24" height="24"/> |
| 1259 |
</clipPath> |
| 1260 |
</defs> |
| 1261 |
</svg> |
| 1262 |
`;const Hkt=It` |
| 1263 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1264 |
<g clip-path="url(#clip0_977_7897)"> |
| 1265 |
<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"/> |
| 1266 |
</g> |
| 1267 |
<defs> |
| 1268 |
<clipPath id="clip0_977_7897"> |
| 1269 |
<rect width="24" height="24"/> |
| 1270 |
</clipPath> |
| 1271 |
</defs> |
| 1272 |
</svg> |
| 1273 |
`,Ukt=It` |
| 1274 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1275 |
<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"/> |
| 1276 |
</svg> |
| 1277 |
`;It` |
| 1278 |
<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"> |
| 1279 |
<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" /> |
| 1280 |
</svg> |
| 1281 |
`;const jkt=It` |
| 1282 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1283 |
<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"/> |
| 1284 |
</svg> |
| 1285 |
`;It` |
| 1286 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1287 |
<g clip-path="url(#clip0_977_8078)"> |
| 1288 |
<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"/> |
| 1289 |
</g> |
| 1290 |
<defs> |
| 1291 |
<clipPath id="clip0_977_8078"> |
| 1292 |
<rect width="24" height="24"/> |
| 1293 |
</clipPath> |
| 1294 |
</defs> |
| 1295 |
</svg> |
| 1296 |
`;const Wkt=It` |
| 1297 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1298 |
<g clip-path="url(#clip0_992_5547)"> |
| 1299 |
<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"/> |
| 1300 |
</g> |
| 1301 |
<defs> |
| 1302 |
<clipPath id="clip0_992_5547"> |
| 1303 |
<rect width="24" height="24"/> |
| 1304 |
</clipPath> |
| 1305 |
</defs> |
| 1306 |
</svg> |
| 1307 |
`;It` |
| 1308 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1309 |
<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"/> |
| 1310 |
</svg> |
| 1311 |
`;const Ykt=(t,e)=>{t.config(Tkt).config(n=>{n.update(J2.key,s=>({...s,linkIcon:(e==null?void 0:e.linkIcon)??(()=>sW),editButton:(e==null?void 0:e.editButton)??(()=>Rkt),removeButton:(e==null?void 0:e.removeButton)??(()=>Ukt),confirmButton:(e==null?void 0:e.confirmButton)??(()=>nW),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(Pkt)},qkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Ykt},Symbol.toStringTag,{value:"Module"}));var iW="Expected a function",pP=0/0,Gkt="[object Symbol]",Xkt=/^\s+|\s+$/g,Kkt=/^[-+]0x[0-9a-f]+$/i,Zkt=/^0b[01]+$/i,Jkt=/^0o[0-7]+$/i,Qkt=parseInt,eCt=typeof Cs=="object"&&Cs&&Cs.Object===Object&&Cs,tCt=typeof self=="object"&&self&&self.Object===Object&&self,nCt=eCt||tCt||Function("return this")(),sCt=Object.prototype,iCt=sCt.toString,oCt=Math.max,rCt=Math.min,ak=function(){return nCt.Date.now()};function aCt(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(iW);e=mP(e)||0,a_(n)&&(u=!!n.leading,d="maxWait"in n,o=d?oCt(mP(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=s,T=i;return s=i=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(_,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?rCt(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function _(){var M=ak();if(b(M))return k(M);a=setTimeout(_,m(M))}function k(M){return a=void 0,h&&s?f(M):(s=i=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:k(ak())}function S(){var M=ak(),P=b(M);if(s=arguments,i=this,l=M,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=C,S.flush=x,S}function lCt(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(iW);return a_(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),aCt(t,e,{leading:s,maxWait:e,trailing:i})}function a_(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function cCt(t){return!!t&&typeof t=="object"}function uCt(t){return typeof t=="symbol"||cCt(t)&&iCt.call(t)==Gkt}function mP(t){if(typeof t=="number")return t;if(uCt(t))return pP;if(a_(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=a_(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Xkt,"");var n=Zkt.test(t);return n||Jkt.test(t)?Qkt(t.slice(2),n?2:8):Kkt.test(t)?pP:+t}var dCt=lCt;const hCt=pi(dCt);var oW=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Cn=(t,e,n)=>(oW(t,e,"read from private field"),n?n.call(t):e.get(t)),bi=(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)},Yn=(t,e,n,s)=>(oW(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function ew(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const fCt=t=>!Q8(e=>e.type.name==="table")(t),Av=ms({filterNodes:fCt},"blockConfig");ew(Av,{displayName:"Ctx<blockConfig>"});function pCt(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 gP=null;function mCt(){return gP||(gP=document.implementation.createHTMLDocument("title"))}const gCt={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 vCt(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")||eu.fromSchema(t.state.schema),a=mCt(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=gCt[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,` |
| 1312 |
|
| 1313 |
`);return{dom:l,text:h}}const vP=d0.ie&&d0.ie_version<15||d0.ios&&d0.webkit_version<604,yP=20;var kg,Ry,zh,ua,Dm,da,f6,rW,Hh,Rm,Uh,jh,Vy,Vm,Fm,Nm,Fy,Wh;class yCt{constructor(){bi(this,f6),bi(this,Hh),bi(this,kg,void 0),bi(this,Ry,void 0),bi(this,zh,void 0),bi(this,ua,void 0),bi(this,Dm,void 0),bi(this,da,void 0),bi(this,Uh,void 0),bi(this,jh,void 0),bi(this,Vy,void 0),bi(this,Vm,void 0),bi(this,Fm,void 0),bi(this,Nm,void 0),bi(this,Fy,void 0),bi(this,Wh,void 0),Yn(this,Ry,()=>{if(!Cn(this,ua))return null;const e=Cn(this,ua),n=Cn(this,Hh,Rm);if(n&&Rt.isSelectable(e.node)){const s=Rt.create(n.state.doc,e.$pos.pos);return n.dispatch(n.state.tr.setSelection(s)),n.focus(),Yn(this,zh,s),s}return null}),Yn(this,zh,null),Yn(this,ua,null),Yn(this,Dm,void 0),Yn(this,da,!1),Yn(this,jh,()=>{var e;(e=Cn(this,Uh))==null||e.call(this,{type:"hide"}),Yn(this,ua,null)}),Yn(this,Vy,e=>{var n;Yn(this,ua,e),(n=Cn(this,Uh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Yn(this,kg,e),Yn(this,Uh,n)},this.addEvent=e=>{e.addEventListener("mousedown",Cn(this,Vm)),e.addEventListener("mouseup",Cn(this,Fm)),e.addEventListener("dragstart",Cn(this,Nm))},this.removeEvent=e=>{e.removeEventListener("mousedown",Cn(this,Vm)),e.removeEventListener("mouseup",Cn(this,Fm)),e.removeEventListener("dragstart",Cn(this,Nm))},this.unBind=()=>{Yn(this,Uh,void 0)},Yn(this,Vm,()=>{var e;Yn(this,Dm,(e=Cn(this,ua))==null?void 0:e.el.getBoundingClientRect()),Cn(this,Ry).call(this)}),Yn(this,Fm,()=>{if(!Cn(this,da)){requestAnimationFrame(()=>{var e;Cn(this,Dm)&&((e=Cn(this,Hh,Rm))==null||e.focus())});return}Yn(this,da,!1),Yn(this,zh,null)}),Yn(this,Nm,e=>{var n;Yn(this,da,!0);const s=Cn(this,Hh,Rm);if(!s)return;s.dom.dataset.dragging="true";const i=Cn(this,zh);if(e.dataTransfer&&i){const o=i.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=vCt(s,o);e.dataTransfer.clearData(),e.dataTransfer.setData(vP?"Text":"text/html",r.innerHTML),vP||e.dataTransfer.setData("text/plain",a);const l=(n=Cn(this,ua))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),s.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(Cn(this,jh).call(this),Yn(this,da,!1),e.dom.dataset.dragging="false",!1),Yn(this,Fy,hCt((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)){Cn(this,jh).call(this);return}const o=Cn(this,f6,rW);if(!o)return;const r=pCt(e,{x:i,y:n.clientY},o);if(!r){Cn(this,jh).call(this);return}Cn(this,Vy).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||Cn(this,Fy).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var s;if(Cn(this,da)){const i=(s=Cn(this,Hh,Rm))==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)<yP){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))<yP){const l=i.scrollTop+10;return i.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Yn(this,da,!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)&&(Yn(this,ua,null),Cn(this,Wh).call(this,e))},this.dropCallback=e=>(Cn(this,Wh).call(this,e),!1),this.dragendCallback=e=>{Cn(this,Wh).call(this,e)},Yn(this,Wh,e=>{Yn(this,da,!1),e.dom.dataset.dragging="false"})}}kg=new WeakMap,Ry=new WeakMap,zh=new WeakMap,ua=new WeakMap,Dm=new WeakMap,da=new WeakMap,f6=new WeakSet,rW=function(){var t;return(t=Cn(this,kg))==null?void 0:t.get(Av.key).filterNodes},Hh=new WeakSet,Rm=function(){var t;return(t=Cn(this,kg))==null?void 0:t.get(Vn)},Uh=new WeakMap,jh=new WeakMap,Vy=new WeakMap,Vm=new WeakMap,Fm=new WeakMap,Nm=new WeakMap,Fy=new WeakMap,Wh=new WeakMap;const aW=ms(new yCt,"blockService");ew(Av,{displayName:"Ctx<blockService>"});const e9=ms({},"blockSpec");ew(Av,{displayName:"Ctx<blockSpec>"});const t9=Ps(t=>{const e=new ps("MILKDOWN_BLOCK"),n=t.get(aW.key),s=t.get(e9.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)}}})});ew(t9,{displayName:"Prose<block>"});const n9=[e9,Av,aW,t9];n9.key=e9.key;n9.pluginKey=t9.key;var s9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},vc=(t,e,n)=>(s9(t,e,"read from private field"),n?n.call(t):e.get(t)),mu=(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)},gu=(t,e,n,s)=>(s9(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),bCt=(t,e,n)=>(s9(t,e,"access private method"),n);function _Ct(t){const e=ms({},`${t}_SLASH_SPEC`),n=Ps(i=>{const o=i.get(e.key);return new rs({key:new ps(`${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 Bm,Ny,Xh,By,zy,Hy,p6,lW;class wCt{constructor(e){mu(this,p6),mu(this,Bm,void 0),mu(this,Ny,void 0),mu(this,Xh,void 0),mu(this,By,void 0),mu(this,zy,void 0),mu(this,Hy,void 0),gu(this,Bm,!1),this.onShow=()=>{},this.onHide=()=>{},gu(this,Hy,(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(vc(this,Bm)||((i=n.dom.parentElement)==null||i.appendChild(this.element),gu(this,Bm,!0)),!(r||h)){if(!vc(this,By).call(this,n,s)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"bottom-start",middleware:[tC(),eC(vc(this,zy))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{N2(vc(this,Hy),vc(this,Ny))(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 Ot,l=this.element.contains(document.activeElement),c=!n.hasFocus()&&!l,u=!n.editable,d=!q5e(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,gu(this,Ny,e.debounce??200),gu(this,By,e.shouldShow??bCt(this,p6,lW)),gu(this,Xh,e.trigger??"/"),gu(this,zy,e.offset)}}Bm=new WeakMap,Ny=new WeakMap,Xh=new WeakMap,By=new WeakMap,zy=new WeakMap,Hy=new WeakMap,p6=new WeakSet,lW=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(vc(this,Xh))?vc(this,Xh).includes(n):vc(this,Xh)===n:!1};function cW(t){return t.$from.parent.type.name==="code_block"}function uW(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 dW(t,e){customElements.get(t)==null&&customElements.define(t,e)}var kCt=Object.defineProperty,bP=Object.getOwnPropertySymbols,CCt=Object.prototype.hasOwnProperty,xCt=Object.prototype.propertyIsEnumerable,_P=(t,e,n)=>e in t?kCt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SCt=(t,e)=>{for(var n in e||(e={}))CCt.call(e,n)&&_P(t,n,e[n]);if(bP)for(var n of bP(e))xCt.call(e,n)&&_P(t,n,e[n]);return t};function Ev(t,e){return Object.assign(t,{meta:SCt({package:"@milkdown/components"},e)}),t}var $Ct=Object.defineProperty,wP=Object.getOwnPropertySymbols,ACt=Object.prototype.hasOwnProperty,ECt=Object.prototype.propertyIsEnumerable,kP=(t,e,n)=>e in t?$Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MCt=(t,e)=>{for(var n in e||(e={}))ACt.call(e,n)&&kP(t,n,e[n]);if(wP)for(var n of wP(e))ECt.call(e,n)&&kP(t,n,e[n]);return t};const m6="image-block",tw=zs("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="${m6}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw ta(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",MCt({"data-type":m6},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()}}}));Ev(tw.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function TCt(t){return Yd(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 i9=qd("remark-image-block",()=>()=>TCt);Ev(i9.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});Ev(i9.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const PCt={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>It`Upload file`,confirmButton:()=>It`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},nw=ms(PCt,"imageBlockConfigCtx");Ev(nw,{displayName:"Config<image-block>",group:"ImageBlock"});function ICt(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 LCt({image:t,resizeHandle:e,ratio:n,setRatio:s,src:i}){const o=XS(),r=r_(()=>o.current.getRootNode(),[o]);Ed(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[i]),Ed(()=>{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,k=_<p?b:p*(b/_),C=(k*n).toFixed(2);l.dataset.origin=k.toFixed(2),l.dataset.height=C,l.style.height=`${C}px`};return l.addEventListener("load",h),a.addEventListener("pointerdown",d),()=>{l.removeEventListener("load",h),a.removeEventListener("pointerdown",d)}},[])}var OCt=(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 kh=0;const hW=({src:t="",caption:e="",ratio:n=1,selected:s=!1,readonly:i=!1,setAttr:o,config:r})=>{const a=ld(),l=ld(),c=ld(),[u,d]=Tr(e.length>0),[h,f]=Tr(t.length!==0),[p]=Tr(crypto.randomUUID()),[m,b]=Tr(!1),[_,k]=Tr(t);LCt({image:a,resizeHandle:l,ratio:n,setRatio:R=>o==null?void 0:o("ratio",R),src:t}),Ed(()=>{s||d(e.length>0)},[s]);const C=R=>{const F=R.target.value;kh&&window.clearTimeout(kh),kh=window.setTimeout(()=>{o==null||o("caption",F)},1e3)},x=R=>{const F=R.target.value;kh&&(window.clearTimeout(kh),kh=0),o==null||o("caption",F)},S=R=>{const F=R.target.value;f(F.length!==0),k(F)},M=R=>OCt(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:"")},I=R=>{R.key==="Enter"&&T()},L=R=>{R.preventDefault(),R.stopPropagation()},V=R=>{R.stopPropagation(),R.preventDefault()};return It`<host class=${Js(s&&"selected")}> |
| 1314 |
<div class=${Js("image-edit",t.length>0&&"hidden")}> |
| 1315 |
<div class="image-icon"> |
| 1316 |
${r==null?void 0:r.imageIcon()} |
| 1317 |
</div> |
| 1318 |
<div class=${Js("link-importer",m&&"focus")}> |
| 1319 |
<input |
| 1320 |
ref=${c} |
| 1321 |
draggable="true" |
| 1322 |
ondragstart=${L} |
| 1323 |
disabled=${i} |
| 1324 |
class="link-input-area" |
| 1325 |
value=${_} |
| 1326 |
oninput=${S} |
| 1327 |
onkeydown=${I} |
| 1328 |
onfocus=${()=>b(!0)} |
| 1329 |
onblur=${()=>b(!1)} |
| 1330 |
/> |
| 1331 |
<div class=${Js("placeholder",h&&"hidden")}> |
| 1332 |
<input disabled=${i} class="hidden" id=${p} type="file" accept="image/*" onchange=${M} /> |
| 1333 |
<label onpointerdown=${V} class="uploader" for=${p}> |
| 1334 |
${r==null?void 0:r.uploadButton()} |
| 1335 |
</label> |
| 1336 |
<span class="text" onclick=${()=>{var R;return(R=c.current)==null?void 0:R.focus()}}> |
| 1337 |
${r==null?void 0:r.uploadPlaceholderText} |
| 1338 |
</span> |
| 1339 |
</div> |
| 1340 |
</div> |
| 1341 |
<div |
| 1342 |
class=${Js("confirm",_.length===0&&"hidden")} |
| 1343 |
onclick=${()=>T()} |
| 1344 |
> |
| 1345 |
${r==null?void 0:r.confirmButton()} |
| 1346 |
</div> |
| 1347 |
</div> |
| 1348 |
<div class=${Js("image-wrapper",t.length===0&&"hidden")}> |
| 1349 |
<div class="operation"> |
| 1350 |
<div class="operation-item" onpointerdown=${P}>${r==null?void 0:r.captionIcon()}</div> |
| 1351 |
</div> |
| 1352 |
<img ref=${a} data-type=${m6} src=${t} alt=${e} ratio=${n} /> |
| 1353 |
<div ref=${l} class="image-resize-handle"></div> |
| 1354 |
</div> |
| 1355 |
<input |
| 1356 |
draggable="true" |
| 1357 |
ondragstart=${L} |
| 1358 |
class=${Js("caption-input",!u&&"hidden")} |
| 1359 |
placeholder=${r==null?void 0:r.captionPlaceholderText} |
| 1360 |
oninput=${C} |
| 1361 |
onblur=${x} |
| 1362 |
value=${e} |
| 1363 |
/> |
| 1364 |
</host>`};hW.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const DCt=eh(hW);ICt("milkdown-image-block",DCt);const fW=mz(tw.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-block"),o=t.get(nw.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()}}});Ev(fW,{displayName:"NodeView<image-block>",group:"ImageBlock"});const RCt=[i9,tw,fW,nw].flat();function o9(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 VCt(t,e,n=null){const{from:s,to:i}=t.selection;return t.setBlockType(s,i,e,n)}function FCt(t,e,n=null){const{$from:s,$to:i}=t.selection,o=s.blockRange(i),r=o&&X8(o,e,n);return r?t.wrap(o,r):null}function NCt(t,e,n=null){const s=e.createAndFill(n);return s?t.replaceSelectionWith(s):null}function x0(t,e=null){return(n,s)=>{if(s){const i=VCt(o9(n.tr),t,e);s(i.scrollIntoView())}return!0}}function lk(t,e=null){return(n,s)=>{const i=FCt(o9(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}function ck(t,e=null){return(n,s)=>{const i=NCt(o9(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}var yc,wf;class BCt{constructor(){oa(this,yc,void 0);oa(this,wf,void 0);Qi(this,yc,[]),this.clear=()=>(Qi(this,yc,[]),this),Qi(this,wf,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 jt(this,yc).push(i),jt(this,wf).call(this,i)},this.getGroup=e=>{const n=jt(this,yc).find(s=>s.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return jt(this,wf).call(this,n)},this.build=()=>jt(this,yc)}}yc=new WeakMap,wf=new WeakMap;function xo(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 zCt(t,e){var o,r,a,l,c,u,d,h,f,p,m;const n=new BCt;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??Wkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;x0(Il.type(b))(C,k)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??xo("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??Vkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;x0(wa.type(b),{level:2})(C,k)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??xo("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??Fkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;x0(wa.type(b),{level:3})(C,k)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??xo("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??Nkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;x0(wa.type(b),{level:4})(C,k)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??xo("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??Hkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;lk(yp.type(b))(C,k)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??xo("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??tW,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;ck(bp.type(b))(C,k)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??xo("Divider"),icon:((d=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:d.call(e))??Dkt,onRun:b=>{const _=b.get(Vn);ck(_p.type(b))(_.state,_.dispatch);const{state:k}=_,C=Ot.near(k.doc.resolve(k.selection.to));_.dispatch(k.tr.setSelection(C).scrollIntoView()),_.focus()}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??xo("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??xo("Bullet List"),icon:((h=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:h.call(e))??Lkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;lk(Kd.type(b))(C,k)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??xo("Ordered List"),icon:((f=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:f.call(e))??zkt,onRun:b=>{const _=b.get(Vn),{dispatch:k,state:C}=_;lk(Zd.type(b))(C,k)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??xo("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??xo("Image"),icon:((p=e==null?void 0:e.slashMenuImageIcon)==null?void 0:p.call(e))??h6,onRun:b=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const _=b.get(Vn),{dispatch:k,state:C}=_;ck(tw.type(b))(C,k)}}),(m=e==null?void 0:e.buildMenu)==null||m.call(e,n);let s=n.build();t&&(s=s.map(b=>{const _=b.items.filter(k=>k.label.toLowerCase().includes(t.toLowerCase()));return{...b,items:_}}).filter(b=>b.items.length>0));const i=s.flatMap(b=>b.items);return i.forEach((b,_)=>{Object.assign(b,{index:_})}),s.reduce((b,_)=>{const k=b+_.items.length;return Object.assign(_,{range:[b,k]}),k},0),{groups:s,size:i.length}}const pW=({show:t,hide:e,ctx:n,filter:s,config:i})=>{const{groups:o,size:r}=r_(()=>zCt(s,i),[s]),a=XS(),[l,c]=Tr(0),u=r_(()=>a.current.getRootNode(),[a]),d=ld({x:-999,y:-999}),h=gh(k=>{const C=d.current;if(!C)return;const{x,y:S}=k;C.x=x,C.y=S},[]);Ed(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=gh((k,C)=>{c(x=>{const S=typeof k=="function"?k(x):k;return C==null||C(S),S})},[]),p=gh(k=>{const C=a.current.querySelector(`[data-index="${k}"]`),x=a.current.querySelector(".menu-groups");!C||!x||(x.scrollTop=C.offsetTop-x.offsetTop)},[]),m=gh(k=>{const C=o.flatMap(x=>x.items).at(k);C&&n&&C.onRun(n),e==null||e()},[o]),b=gh(k=>{if(k.key==="Escape"){k.preventDefault(),e==null||e();return}if(k.key==="ArrowDown")return k.preventDefault(),f(C=>C<r-1?C+1:C,p);if(k.key==="ArrowUp")return k.preventDefault(),f(C=>C<=0?C:C-1,p);if(k.key==="ArrowLeft")return k.preventDefault(),f(C=>{const x=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!x)return C;const S=o[o.indexOf(x)-1];return S?S.range[1]-1:C},p);if(k.key==="ArrowRight")return k.preventDefault(),f(C=>{const x=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!x)return C;const S=o[o.indexOf(x)+1];return S?S.range[0]:C},p);k.key==="Enter"&&(k.preventDefault(),m(l))},[e,o,l]),_=gh(k=>C=>{const x=d.current;if(!x)return;const{x:S,y:M}=C;S===x.x&&M===x.y||f(k)},[]);return Ed(()=>(t?u.addEventListener("keydown",b,{capture:!0}):u.removeEventListener("keydown",b,{capture:!0}),()=>{u.removeEventListener("keydown",b,{capture:!0})}),[t,b]),It` |
| 1365 |
<host onmousedown=${k=>k.preventDefault()}> |
| 1366 |
<div class="menu-groups" onmousemove=${h}> |
| 1367 |
${o.map(k=>It` |
| 1368 |
<div key=${k.key} class="menu-group"> |
| 1369 |
<ul> |
| 1370 |
${k.items.map(C=>It`<li |
| 1371 |
key=${C.key} |
| 1372 |
data-index=${C.index} |
| 1373 |
class=${l===C.index?"hover":""} |
| 1374 |
onmouseenter=${_(C.index)} |
| 1375 |
onmousedown=${()=>{var x;(x=a.current.querySelector(`[data-index="${C.index}"]`))==null||x.classList.add("active")}} |
| 1376 |
onmouseup=${()=>{var x;(x=a.current.querySelector(`[data-index="${C.index}"]`))==null||x.classList.remove("active"),m(C.index)}} |
| 1377 |
> |
| 1378 |
${C.icon} |
| 1379 |
<span>${C.label}</span> |
| 1380 |
</li>`)} |
| 1381 |
</ul> |
| 1382 |
</div> |
| 1383 |
`)} |
| 1384 |
</div> |
| 1385 |
</host> |
| 1386 |
`};pW.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const mW=eh(pW),gW=_Ct("CREPE_MENU"),vW=ms({show:()=>{},hide:()=>{}},"menuAPICtx");dW("milkdown-slash-menu",mW);function HCt(t,e){t.set(gW.key,{view:n=>new UCt(t,n,e)})}var Ao,ga,bc;class UCt{constructor(e,n,s){oa(this,Ao,void 0);oa(this,ga,void 0);oa(this,bc,void 0);Qi(this,bc,null),this.update=o=>{jt(this,ga).update(o)},this.show=o=>{Qi(this,bc,o),jt(this,Ao).filter="",jt(this,ga).show()},this.hide=()=>{Qi(this,bc,null),jt(this,ga).hide()},this.destroy=()=>{jt(this,ga).destroy(),jt(this,Ao).remove()},Qi(this,Ao,new mW),jt(this,Ao).hide=this.hide,jt(this,Ao).ctx=e,jt(this,Ao).config=s;const i=this;Qi(this,ga,new wCt({content:jt(this,Ao),debounce:20,shouldShow(o){if(cW(o.state.selection)||uW(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=jt(i,bc);return jt(i,Ao).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()?(Qi(i,bc,null),!1):!0:!!r.startsWith("/")},offset:10})),jt(this,ga).onShow=()=>{jt(this,Ao).show=!0},jt(this,ga).onHide=()=>{jt(this,Ao).show=!1},this.update(n),e.set(vW.key,{show:o=>this.show(o),hide:()=>this.hide()})}}Ao=new WeakMap,ga=new WeakMap,bc=new WeakMap;const jCt=(t,e)=>{t.config(n=>HCt(n,e)).use(vW).use(n9).use(gW)},WCt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:jCt},Symbol.toStringTag,{value:"Module"}));function YCt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function qCt(t,e){const{selection:n}=t;if(!n.empty)return null;const s=n.$anchor,i=s.parent;if(i.content.size>0||Q8(a=>a.type.name==="table")(s))return null;const r=s.before();return Fs.node(r,r+i.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const l_=ms({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),yW=Ps(t=>new rs({key:new ps("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(l_.key);if(n.mode==="doc"&&!YCt(e.doc)||cW(e.selection)||uW(e.selection))return null;const s=n.text??"Please enter...",i=qCt(e,s);return i?Kn.create(e.doc,[i]):null}}})),GCt=(t,e)=>{t.config(n=>{e&&n.update(l_.key,s=>({...s,...e}))}).use(yW).use(l_)},XCt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:GCt,placeholderConfig:l_,placeholderPlugin:yW},Symbol.toStringTag,{value:"Module"})),bW=({ctx:t,hide:e,show:n,config:s})=>{var a,l,c,u,d;const i=Mj();Ed(()=>{i()},[n]);const o=h=>f=>{f.preventDefault(),t&&h(t),i()},r=h=>{if(!t)return!1;const f=t.get(Vn),{state:{doc:p,selection:m}}=f;return p.rangeHasMark(m.from,m.to,h)};return It`<host> |
| 1387 |
<button |
| 1388 |
class=${Js("toolbar-item",t&&r(vp.type(t))&&"active")} |
| 1389 |
onmousedown=${o(h=>{h.get(gn).call(I2.key)})} |
| 1390 |
> |
| 1391 |
${((a=s==null?void 0:s.boldIcon)==null?void 0:a.call(s))??Ikt} |
| 1392 |
</button> |
| 1393 |
<button |
| 1394 |
class=${Js("toolbar-item",t&&r(Gd.type(t))&&"active")} |
| 1395 |
onmousedown=${o(h=>{h.get(gn).call(P2.key)})} |
| 1396 |
> |
| 1397 |
${((l=s==null?void 0:s.italicIcon)==null?void 0:l.call(s))??Bkt} |
| 1398 |
</button> |
| 1399 |
<button |
| 1400 |
class=${Js("toolbar-item",t&&r(wp.type(t))&&"active")} |
| 1401 |
onmousedown=${o(h=>{h.get(gn).call(R2.key)})} |
| 1402 |
> |
| 1403 |
${((c=s==null?void 0:s.strikethroughIcon)==null?void 0:c.call(s))??jkt} |
| 1404 |
</button> |
| 1405 |
<div class="divider"></div> |
| 1406 |
<button |
| 1407 |
class=${Js("toolbar-item",t&&r(rl.type(t))&&"active")} |
| 1408 |
onmousedown=${o(h=>{h.get(gn).call(L2.key)})} |
| 1409 |
> |
| 1410 |
${((u=s==null?void 0:s.codeIcon)==null?void 0:u.call(s))??tW} |
| 1411 |
</button> |
| 1412 |
<button |
| 1413 |
class=${Js("toolbar-item",t&&r(Hr.type(t))&&"active")} |
| 1414 |
onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Hr.type(h))){h.get(ip.key).removeLink(p.from,p.to);return}h.get(ip.key).addLink(p.from,p.to),e==null||e()})} |
| 1415 |
> |
| 1416 |
${((d=s==null?void 0:s.linkIcon)==null?void 0:d.call(s))??sW} |
| 1417 |
</button> |
| 1418 |
</host>`};bW.props={ctx:Object,hide:Function,show:Boolean,config:Object};const _W=eh(bW),CP=JS("CREPE_TOOLBAR");var Ja,io;class KCt{constructor(e,n,s){oa(this,Ja,void 0);oa(this,io,void 0);this.update=(o,r)=>{jt(this,Ja).update(o,r)},this.destroy=()=>{jt(this,Ja).destroy(),jt(this,io).remove()},this.hide=()=>{jt(this,Ja).hide()};const i=new _W;Qi(this,io,i),jt(this,io).ctx=e,jt(this,io).hide=this.hide,jt(this,io).config=s,Qi(this,Ja,new ZS({content:jt(this,io),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 Ot,h=!(a instanceof Ot),f=o.dom.getRootNode().activeElement,p=i.contains(f),m=!o.hasFocus()&&!p,b=!o.editable;return!(m||h||l||d||b)}})),jt(this,Ja).onShow=()=>{jt(this,io).show=!0,setTimeout(()=>{let o=jt(this,io).style.left;o=parseInt(o),o<0?jt(this,io).style.left=0:o>350&&(jt(this,io).style.left="350px")},0)},jt(this,Ja).onHide=()=>{jt(this,io).show=!1},this.update(n)}}Ja=new WeakMap,io=new WeakMap;dW("milkdown-toolbar",_W);const ZCt=(t,e)=>{t.config(n=>{n.set(CP.key,{view:s=>new KCt(n,s,e)})}).use(CP)},JCt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:ZCt},Symbol.toStringTag,{value:"Module"}));var QCt=Object.defineProperty,xP=Object.getOwnPropertySymbols,ext=Object.prototype.hasOwnProperty,txt=Object.prototype.propertyIsEnumerable,SP=(t,e,n)=>e in t?QCt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nxt=(t,e)=>{for(var n in e||(e={}))ext.call(e,n)&&SP(t,n,e[n]);if(xP)for(var n of xP(e))txt.call(e,n)&&SP(t,n,e[n]);return t};function wW(t,e){return Object.assign(t,{meta:nxt({package:"@milkdown/components"},e)}),t}const sxt={imageIcon:()=>"🌌",uploadButton:()=>It`Upload`,confirmButton:()=>It`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},sw=ms(sxt,"inlineImageConfigCtx");wW(sw,{displayName:"Config<image-inline>",group:"ImageInline"});function ixt(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 oxt=(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 kW=({src:t="",selected:e=!1,alt:n,title:s,setAttr:i,config:o})=>{const r=ld(),[a]=Tr(crypto.randomUUID()),[l,c]=Tr(!1),[u,d]=Tr(t.length!==0),[h,f]=Tr(t),p=x=>{const M=x.target.value;d(M.length!==0),f(M)},m=x=>oxt(void 0,null,function*(){var S;const M=(S=x.target.files)==null?void 0:S[0];if(!M)return;const P=yield o==null?void 0:o.onUpload(M);P&&(i==null||i("src",P),d(!0))}),b=()=>{var x,S;i==null||i("src",(S=(x=r.current)==null?void 0:x.value)!=null?S:"")},_=x=>{x.key==="Enter"&&b()},k=x=>{x.preventDefault(),x.stopPropagation()},C=x=>{x.stopPropagation(),x.preventDefault()};return It`<host class=${Js(e&&"selected",!t&&"empty")}> |
| 1419 |
${t?It`<img class="image-inline" src=${t} alt=${n} title=${s} />`:It`<div class="empty-image-inline"> |
| 1420 |
<div class="image-icon"> |
| 1421 |
${o==null?void 0:o.imageIcon()} |
| 1422 |
</div> |
| 1423 |
<div class=${Js("link-importer",l&&"focus")}> |
| 1424 |
<input |
| 1425 |
draggable="true" |
| 1426 |
ref=${r} |
| 1427 |
ondragstart=${k} |
| 1428 |
class="link-input-area" |
| 1429 |
value=${h} |
| 1430 |
oninput=${p} |
| 1431 |
onkeydown=${_} |
| 1432 |
onfocus=${()=>c(!0)} |
| 1433 |
onblur=${()=>c(!1)} |
| 1434 |
/> |
| 1435 |
<div class=${Js("placeholder",u&&"hidden")}> |
| 1436 |
<input class="hidden" id=${a} type="file" accept="image/*" onchange=${m} /> |
| 1437 |
<label onpointerdown=${C} class="uploader" for=${a}> |
| 1438 |
${o==null?void 0:o.uploadButton()} |
| 1439 |
</label> |
| 1440 |
<span class="text" onclick=${()=>{var x;return(x=r.current)==null?void 0:x.focus()}}> |
| 1441 |
${o==null?void 0:o.uploadPlaceholderText} |
| 1442 |
</span> |
| 1443 |
</div> |
| 1444 |
</div> |
| 1445 |
<div |
| 1446 |
class=${Js("confirm",h.length===0&&"hidden")} |
| 1447 |
onclick=${()=>b()} |
| 1448 |
> |
| 1449 |
${o==null?void 0:o.confirmButton()} |
| 1450 |
</div> |
| 1451 |
</div>`} |
| 1452 |
</host>`};kW.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const rxt=eh(kW);ixt("milkdown-image-inline",rxt);const CW=mz(Xd.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-inline"),o=t.get(sw.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()}}});wW(CW,{displayName:"NodeView<image-inline>",group:"ImageInline"});const axt=[sw,CW],lxt=(t,e)=>{t.config(n=>{n.update(sw.key,s=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>h6),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>nW),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(nw.key,s=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>h6),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>Okt),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(RCt).use(axt)},cxt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:lxt},Symbol.toStringTag,{value:"Module"})),uxt=`.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%} |
| 1453 |
`,dxt=Object.freeze(Object.defineProperty({__proto__:null,default:uxt},Symbol.toStringTag,{value:"Module"})),hxt=`.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} |
| 1454 |
`,fxt=Object.freeze(Object.defineProperty({__proto__:null,default:hxt},Symbol.toStringTag,{value:"Module"}))});export default pxt(); |
| 1455 |
|