You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

508 lines
567 KiB

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var ag=Object.create;var kr=Object.defineProperty;var rg=Object.getOwnPropertyDescriptor;var ig=Object.getOwnPropertyNames;var og=Object.getPrototypeOf,sg=Object.prototype.hasOwnProperty;var nl=t=>kr(t,"__esModule",{value:!0});var Qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lg=(t,e)=>{nl(t);for(var n in e)kr(t,n,{get:e[n],enumerable:!0})},ug=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ig(e))!sg.call(t,a)&&a!=="default"&&kr(t,a,{get:()=>e[a],enumerable:!(n=rg(e,a))||n.enumerable});return t},xe=t=>ug(nl(kr(t!=null?ag(og(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Vn=Qe((so,lo)=>{(function(t,e){typeof so=="object"&&typeof lo!="undefined"?lo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t["fast-copy"]=e())})(so,function(){"use strict";var t=Function.prototype.toString,e=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getPrototypeOf,l=Object.prototype,s=l.hasOwnProperty,d=l.propertyIsEnumerable,u={SYMBOL_PROPERTIES:typeof i=="function",WEAKMAP:typeof WeakMap=="function"},c=function(){if(u.WEAKMAP)return new WeakMap;var A=e({has:function(S){return!!~A._keys.indexOf(S)},set:function(S,_){A._keys.push(S),A._values.push(_)},get:function(S){return A._values[A._keys.indexOf(S)]}});return A._keys=[],A._values=[],A},h=function(A,S){if(!A.constructor)return e(null);var _=A.constructor,F=A.__proto__||o(A);if(_===S.Object)return F===S.Object.prototype?{}:e(F);if(~t.call(_).indexOf("[native code]"))try{return new _}catch{}return e(F)},y=function(A,S,_,F){var w=h(A,S);F.set(A,w);for(var M in A)s.call(A,M)&&(w[M]=_(A[M],F));if(u.SYMBOL_PROPERTIES){var x=i(A),V=x.length;if(V)for(var B=0,H=void 0;B<V;B++)H=x[B],d.call(A,H)&&(w[H]=_(A[H],F))}return w},m=function(A,S,_,F){var w=h(A,S);F.set(A,w);var M=u.SYMBOL_PROPERTIES?r(A).concat(i(A)):r(A),x=M.length;if(x){for(var V=0,B=void 0,H=void 0;V<x;V++)if(B=M[V],B!=="callee"&&B!=="caller")if(H=a(A,B),H){!H.get&&!H.set&&(H.value=_(A[B],F));try{n(w,B,H)}catch{w[B]=H.value}}else w[B]=_(A[B],F)}return w},v=function(A){var S="";return A.global&&(S+="g"),A.ignoreCase&&(S+="i"),A.multiline&&(S+="m"),A.unicode&&(S+="u"),A.sticky&&(S+="y"),S},p=Array.isArray,k=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;console&&console.error&&console.error('Unable to locate global object, returning "this".')}();function C(A,S){var _=!!(S&&S.isStrict),F=S&&S.realm||k,w=_?m:y,M=function(x,V){if(!x||typeof x!="object")return x;if(V.has(x))return V.get(x);var B=x.constructor;if(B===F.Object)return w(x,F,M,V);var H;if(p(x)){if(_)return m(x,F,M,V);var Y=x.length;H=new B,V.set(x,H);for(var he=0;he<Y;he++)H[he]=M(x[he],V);return H}if(x instanceof F.Date)return new B(x.getTime());if(x instanceof F.RegExp)return H=new B(x.source,x.flags||v(x)),H.lastIndex=x.lastIndex,H;if(F.Map&&x instanceof F.Map)return H=new B,V.set(x,H),x.forEach(function(oe,ce){H.set(ce,M(oe,V))}),H;if(F.Set&&x instanceof F.Set)return H=new B,V.set(x,H),x.forEach(function(oe){H.add(M(oe,V))}),H;if(F.Blob&&x instanceof F.Blob)return x.slice(0,x.size,x.type);if(F.Buffer&&F.Buffer.isBuffer(x))return H=F.Buffer.allocUnsafe?F.Buffer.allocUnsafe(x.length):new B(x.length),V.set(x,H),x.copy(H),H;if(F.ArrayBuffer){if(F.ArrayBuffer.isView(x))return H=new B(x.buffer.slice(0)),V.set(x,H),H;if(x instanceof F.ArrayBuffer)return H=x.slice(0),V.set(x,H),H}return typeof x.then=="function"||x instanceof Error||F.WeakMap&&x instanceof F.WeakMap||F.WeakSet&&x instanceof F.WeakSet?x:w(x,F,M,V)};return M(A,c())}return C.default=C,C.strict=function(S,_){return C(S,{isStrict:!0,realm:_?_.realm:void 0})},C})});var al=Qe(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.default=void 0;var cg={sum:function(e){return e.reduce(function(n,a){return n+a})}},dg=cg;xr.default=dg});var Fr=Qe((Eb,rl)=>{function fg(t){return Object.prototype.toString.call(t).slice(8,-1)}rl.exports=fg});var uo=Qe((Cb,il)=>{function hg(t){return!!t&&typeof t=="object"&&t.constructor===Object}il.exports=hg});var Tr=Qe((Ab,ol)=>{function mg(t,e){return Object.prototype.hasOwnProperty.call(t,e)}ol.exports=mg});var cl=Qe((kb,ul)=>{var pg=Tr(),Sr,sl;function gg(){sl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Sr=!0;for(var t in{toString:null})Sr=!1}function yg(t,e,n){var a,r=0;Sr==null&&gg();for(a in t)if(ll(e,t,a,n)===!1)break;if(Sr)for(var i=t.constructor,o=!!i&&t===i.prototype;(a=sl[r++])&&!((a!=="constructor"||!o&&pg(t,a))&&t[a]!==Object.prototype[a]&&ll(e,t,a,n)===!1););}function ll(t,e,n,a){return t.call(a,e[n],n,e)}ul.exports=yg});var Ga=Qe((xb,dl)=>{var vg=Tr(),bg=cl();function wg(t,e,n){bg(t,function(a,r){if(vg(t,r))return e.call(n,t[r],r,t)})}dl.exports=wg});var hl=Qe((Fb,fl)=>{var Dg=Ga();function _g(t,e){for(var n=0,a=arguments.length,r;++n<a;)r=arguments[n],r!=null&&Dg(r,Eg,t);return t}function Eg(t,e){this[e]=t}fl.exports=_g});var pl=Qe((Tb,ml)=>{var Cg=Fr(),Ag=uo(),kg=hl();function xg(t){switch(Cg(t)){case"Object":return Fg(t);case"Array":return Bg(t);case"RegExp":return Tg(t);case"Date":return Sg(t);default:return t}}function Fg(t){return Ag(t)?kg({},t):t}function Tg(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e)}function Sg(t){return new Date(+t)}function Bg(t){return t.slice()}ml.exports=xg});var yl=Qe((Sb,gl)=>{var Mg=pl(),Ng=Ga(),Ig=Fr(),Og=uo();function co(t,e){switch(Ig(t)){case"Object":return qg(t,e);case"Array":return Rg(t,e);default:return Mg(t)}}function qg(t,e){if(Og(t)){var n={};return Ng(t,function(a,r){this[r]=co(a,e)},n),n}else return e?e(t):t}function Rg(t,e){for(var n=[],a=-1,r=t.length,i;++a<r;)n[a]=co(t[a],e);return n}gl.exports=co});var Br=Qe((Bb,vl)=>{function Lg(t,e){return t===e?t!==0||1/t==1/e:t!==t&&e!==e}vl.exports=Lg});var fo=Qe((Mb,bl)=>{var Pg=Fr();function jg(t,e){return Pg(t)===e}bl.exports=jg});var ho=Qe((Nb,wl)=>{var Vg=fo();function Hg(t){return Vg(t,"Object")}wl.exports=Hg});var Mr=Qe((Ib,Dl)=>{var Wg=fo(),Gg=Array.isArray||function(t){return Wg(t,"Array")};Dl.exports=Gg});var El=Qe((Ob,_l)=>{function Ug(t){return t}_l.exports=Ug});var Al=Qe((qb,Cl)=>{function zg(t){return function(e){return e[t]}}Cl.exports=zg});var Fl=Qe((Rb,xl)=>{var Yg=Ga(),kl=Mr();function Zg(t,e){for(var n=-1,a=t.length;++n<a;)if(mo(t[n],e))return!0;return!1}function Kg(t,e){for(var n=-1,a=e.length;++n<a;)if(!Zg(t,e[n]))return!1;return!0}function Qg(t,e){var n=!0;return Yg(e,function(a,r){if(!mo(t[r],a))return n=!1}),n}function mo(t,e){return t&&typeof t=="object"&&e&&typeof e=="object"?kl(t)&&kl(e)?Kg(t,e):Qg(t,e):t===e}xl.exports=mo});var po=Qe((Lb,Tl)=>{var Xg=El(),Jg=Al(),$g=Fl();function e2(t,e){if(t==null)return Xg;switch(typeof t){case"function":return typeof e!="undefined"?function(n,a,r){return t.call(e,n,a,r)}:t;case"object":return function(n){return $g(n,t)};case"string":case"number":return Jg(t)}}Tl.exports=e2});var Bl=Qe((Pb,Sl)=>{var t2=Ga(),n2=po();function a2(t,e,n){e=n2(e,n);var a=!0;return t2(t,function(r,i){if(!e(r,i,t))return a=!1,!1}),a}Sl.exports=a2});var ql=Qe((jb,Ol)=>{var Ml=Tr(),Nl=Bl(),Il=ho(),r2=Br();function i2(t){return function(e,n){return Ml(this,n)&&t(e,this[n])}}function o2(t,e){return Ml(this,e)}function s2(t,e,n){return n=n||r2,!Il(t)||!Il(e)?n(t,e):Nl(t,i2(n),e)&&Nl(e,o2,t)}Ol.exports=s2});var Ll=Qe((Vb,Rl)=>{var l2=po();function u2(t,e,n){e=l2(e,n);var a=!0;if(t==null)return a;for(var r=-1,i=t.length;++r<i;)if(!e(t[r],r,t)){a=!1;break}return a}Rl.exports=u2});var Vl=Qe((Hb,jl)=>{var c2=Br(),Pl=Mr(),d2=Ll();function f2(t,e,n){return n=n||c2,!Pl(t)||!Pl(e)?n(t,e):t.length!==e.length?!1:d2(t,h2(n),e)}function h2(t){return function(e,n){return n in this&&t(e,this[n])}}jl.exports=f2});var zl=Qe((Wb,Ul)=>{var m2=Br(),Hl=ho(),Wl=Mr(),p2=ql(),g2=Vl();function Gl(t,e,n){n=n||m2;var a=Hl(t)&&Hl(e),r=!a&&Wl(t)&&Wl(e);if(!a&&!r)return n(t,e);function i(l,s){return Gl(l,s,n)}var o=a?p2:g2;return o(t,e,i)}Ul.exports=Gl});var Yl=Qe((go,yo)=>{(function(t,e){typeof go=="object"&&typeof yo!="undefined"?yo.exports=e():typeof define=="function"&&define.amd?define(e):t.chroma=e()})(go,function(){"use strict";for(var t=function(f,g,b){return g===void 0&&(g=0),b===void 0&&(b=1),f<g?g:f>b?b:f},e=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var g=0;g<=3;g++)g<3?((f[g]<0||f[g]>255)&&(f._clipped=!0),f[g]=t(f[g],0,255)):g===3&&(f[g]=t(f[g],0,1));return f},n={},a=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<r.length;a+=1){var i=r[a];n["[object "+i+"]"]=i.toLowerCase()}var o=function(f){return n[Object.prototype.toString.call(f)]||"object"},l=function(f,g){return g===void 0&&(g=null),f.length>=3?Array.prototype.slice.call(f):o(f[0])=="object"&&g?g.split("").filter(function(b){return f[0][b]!==void 0}).map(function(b){return f[0][b]}):f[0]},s=function(f){if(f.length<2)return null;var g=f.length-1;return o(f[g])=="string"?f[g].toLowerCase():null},d=Math.PI,u={clip_rgb:e,limit:t,type:o,unpack:l,last:s,PI:d,TWOPI:d*2,PITHIRD:d/3,DEG2RAD:d/180,RAD2DEG:180/d},c={format:{},autodetect:[]},h=u.last,y=u.clip_rgb,m=u.type,v=function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];var N=this;if(m(g[0])==="object"&&g[0].constructor&&g[0].constructor===this.constructor)return g[0];var L=h(g),P=!1;if(!L){P=!0,c.sorted||(c.autodetect=c.autodetect.sort(function(ae,$){return $.p-ae.p}),c.sorted=!0);for(var I=0,G=c.autodetect;I<G.length;I+=1){var U=G[I];if(L=U.test.apply(U,g),L)break}}if(c.format[L]){var K=c.format[L].apply(null,P?g:g.slice(0,-1));N._rgb=y(K)}else throw new Error("unknown format: "+g);N._rgb.length===3&&N._rgb.push(1)};v.prototype.toString=function(){return m(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var p=v,k=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(k.Color,[null].concat(f)))};k.Color=p,k.version="2.1.2";var C=k,A=u.unpack,S=Math.max,_=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=A(f,"rgb"),N=b[0],L=b[1],P=b[2];N=N/255,L=L/255,P=P/255;var I=1-S(N,S(L,P)),G=I<1?1/(1-I):0,U=(1-N-I)*G,K=(1-L-I)*G,ae=(1-P-I)*G;return[U,K,ae,I]},F=_,w=u.unpack,M=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=w(f,"cmyk");var b=f[0],N=f[1],L=f[2],P=f[3],I=f.length>4?f[4]:1;return P===1?[0,0,0,I]:[b>=1?0:255*(1-b)*(1-P),N>=1?0:255*(1-N)*(1-P),L>=1?0:255*(1-L)*(1-P),I]},x=M,V=u.unpack,B=u.type;p.prototype.cmyk=function(){return F(this._rgb)},C.cmyk=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["cmyk"])))},c.format.cmyk=x,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=V(f,"cmyk"),B(f)==="array"&&f.length===4)return"cmyk"}});var H=u.unpack,Y=u.last,he=function(f){return Math.round(f*100)/100},oe=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=H(f,"hsla"),N=Y(f)||"lsa";return b[0]=he(b[0]||0),b[1]=he(b[1]*100)+"%",b[2]=he(b[2]*100)+"%",N==="hsla"||b.length>3&&b[3]<1?(b[3]=b.length>3?b[3]:1,N="hsla"):b.length=3,N+"("+b.join(",")+")"},ce=oe,Z=u.unpack,z=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Z(f,"rgba");var b=f[0],N=f[1],L=f[2];b/=255,N/=255,L/=255;var P=Math.min(b,N,L),I=Math.max(b,N,L),G=(I+P)/2,U,K;return I===P?(U=0,K=Number.NaN):U=G<.5?(I-P)/(I+P):(I-P)/(2-I-P),b==I?K=(N-L)/(I-P):N==I?K=2+(L-b)/(I-P):L==I&&(K=4+(b-N)/(I-P)),K*=60,K<0&&(K+=360),f.length>3&&f[3]!==void 0?[K,U,G,f[3]]:[K,U,G]},Q=z,De=u.unpack,ve=u.last,Ne=Math.round,je=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=De(f,"rgba"),N=ve(f)||"rgb";return N.substr(0,3)=="hsl"?ce(Q(b),N):(b[0]=Ne(b[0]),b[1]=Ne(b[1]),b[2]=Ne(b[2]),(N==="rgba"||b.length>3&&b[3]<1)&&(b[3]=b.length>3?b[3]:1,N="rgba"),N+"("+b.slice(0,N==="rgb"?3:4).join(",")+")")},at=je,Pe=u.unpack,gt=Math.round,xt=function(){for(var f,g=[],b=arguments.length;b--;)g[b]=arguments[b];g=Pe(g,"hsl");var N=g[0],L=g[1],P=g[2],I,G,U;if(L===0)I=G=U=P*255;else{var K=[0,0,0],ae=[0,0,0],$=P<.5?P*(1+L):P+L-P*L,ye=2*P-$,ge=N/360;K[0]=ge+1/3,K[1]=ge,K[2]=ge-1/3;for(var ke=0;ke<3;ke++)K[ke]<0&&(K[ke]+=1),K[ke]>1&&(K[ke]-=1),6*K[ke]<1?ae[ke]=ye+($-ye)*6*K[ke]:2*K[ke]<1?ae[ke]=$:3*K[ke]<2?ae[ke]=ye+($-ye)*(2/3-K[ke])*6:ae[ke]=ye;f=[gt(ae[0]*255),gt(ae[1]*255),gt(ae[2]*255)],I=f[0],G=f[1],U=f[2]}return g.length>3?[I,G,U,g[3]]:[I,G,U,1]},Je=xt,Fe=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ve=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Rt=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Gt=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ft=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Mt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,gn=Math.round,Ut=function(f){f=f.toLowerCase().trim();var g;if(c.format.named)try{return c.format.named(f)}catch{}if(g=f.match(Fe)){for(var b=g.slice(1,4),N=0;N<3;N++)b[N]=+b[N];return b[3]=1,b}if(g=f.match(Ve)){for(var L=g.slice(1,5),P=0;P<4;P++)L[P]=+L[P];return L}if(g=f.match(Rt)){for(var I=g.slice(1,4),G=0;G<3;G++)I[G]=gn(I[G]*2.55);return I[3]=1,I}if(g=f.match(Gt)){for(var U=g.slice(1,5),K=0;K<3;K++)U[K]=gn(U[K]*2.55);return U[3]=+U[3],U}if(g=f.match(Ft)){var ae=g.slice(1,4);ae[1]*=.01,ae[2]*=.01;var $=Je(ae);return $[3]=1,$}if(g=f.match(Mt)){var ye=g.slice(1,4);ye[1]*=.01,ye[2]*=.01;var ge=Je(ye);return ge[3]=+g[4],ge}};Ut.test=function(f){return Fe.test(f)||Ve.test(f)||Rt.test(f)||Gt.test(f)||Ft.test(f)||Mt.test(f)};var tn=Ut,sa=u.type;p.prototype.css=function(f){return at(this._rgb,f)},C.css=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["css"])))},c.format.css=tn,c.autodetect.push({p:5,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&sa(f)==="string"&&tn.test(f))return"css"}});var la=u.unpack;c.format.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=la(f,"rgba");return b[0]*=255,b[1]*=255,b[2]*=255,b},C.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["gl"])))},p.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var Si=u.unpack,Bi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Si(f,"rgb"),N=b[0],L=b[1],P=b[2],I=Math.min(N,L,P),G=Math.max(N,L,P),U=G-I,K=U*100/255,ae=I/(255-U)*100,$;return U===0?$=Number.NaN:(N===G&&($=(L-P)/U),L===G&&($=2+(P-N)/U),P===G&&($=4+(N-L)/U),$*=60,$<0&&($+=360)),[$,K,ae]},Mi=Bi,Ni=u.unpack,Ii=Math.floor,Oi=function(){for(var f,g,b,N,L,P,I=[],G=arguments.length;G--;)I[G]=arguments[G];I=Ni(I,"hcg");var U=I[0],K=I[1],ae=I[2],$,ye,ge;ae=ae*255;var ke=K*255;if(K===0)$=ye=ge=ae;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var qe=Ii(U),Te=U-qe,He=ae*(1-K),Ze=He+ke*(1-Te),_t=He+ke*Te,Et=He+ke;switch(qe){case 0:f=[Et,_t,He],$=f[0],ye=f[1],ge=f[2];break;case 1:g=[Ze,Et,He],$=g[0],ye=g[1],ge=g[2];break;case 2:b=[He,Et,_t],$=b[0],ye=b[1],ge=b[2];break;case 3:N=[He,Ze,Et],$=N[0],ye=N[1],ge=N[2];break;case 4:L=[_t,He,Et],$=L[0],ye=L[1],ge=L[2];break;case 5:P=[Et,He,Ze],$=P[0],ye=P[1],ge=P[2];break}}return[$,ye,ge,I.length>3?I[3]:1]},qi=Oi,Ri=u.unpack,Li=u.type;p.prototype.hcg=function(){return Mi(this._rgb)},C.hcg=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcg"])))},c.format.hcg=qi,c.autodetect.push({p:1,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ri(f,"hcg"),Li(f)==="array"&&f.length===3)return"hcg"}});var Pi=u.unpack,ji=u.last,ne=Math.round,Vh=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Pi(f,"rgba"),N=b[0],L=b[1],P=b[2],I=b[3],G=ji(f)||"auto";I===void 0&&(I=1),G==="auto"&&(G=I<1?"rgba":"rgb"),N=ne(N),L=ne(L),P=ne(P);var U=N<<16|L<<8|P,K="000000"+U.toString(16);K=K.substr(K.length-6);var ae="0"+ne(I*255).toString(16);switch(ae=ae.substr(ae.length-2),G.toLowerCase()){case"rgba":return"#"+K+ae;case"argb":return"#"+ae+K;default:return"#"+K}},Ss=Vh,Hh=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Wh=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Gh=function(f){if(f.match(Hh)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var g=parseInt(f,16),b=g>>16,N=g>>8&255,L=g&255;return[b,N,L,1]}if(f.match(Wh)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var P=parseInt(f,16),I=P>>24&255,G=P>>16&255,U=P>>8&255,K=Math.round((P&255)/255*100)/100;return[I,G,U,K]}throw new Error("unknown hex color: "+f)},Bs=Gh,Uh=u.type;p.prototype.hex=function(f){return Ss(this._rgb,f)},C.hex=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hex"])))},c.format.hex=Bs,c.autodetect.push({p:4,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&Uh(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var zh=u.unpack,Ms=u.TWOPI,Yh=Math.min,Zh=Math.sqrt,Kh=Math.acos,Qh=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=zh(f,"rgb"),N=b[0],L=b[1],P=b[2];N/=255,L/=255,P/=255;var I,G=Yh(N,L,P),U=(N+L+P)/3,K=U>0?1-G/U:0;return K===0?I=NaN:(I=(N-L+(N-P))/2,I/=Zh((N-L)*(N-L)+(N-P)*(L-P)),I=Kh(I),P>L&&(I=Ms-I),I/=Ms),[I*360,K,U]},Xh=Qh,Jh=u.unpack,Vi=u.limit,ua=u.TWOPI,Hi=u.PITHIRD,ca=Math.cos,$h=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Jh(f,"hsi");var b=f[0],N=f[1],L=f[2],P,I,G;return isNaN(b)&&(b=0),isNaN(N)&&(N=0),b>360&&(b-=360),b<0&&(b+=360),b/=360,b<1/3?(G=(1-N)/3,P=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,I=1-(G+P)):b<2/3?(b-=1/3,P=(1-N)/3,I=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,G=1-(P+I)):(b-=2/3,I=(1-N)/3,G=(1+N*ca(ua*b)/ca(Hi-ua*b))/3,P=1-(I+G)),P=Vi(L*P*3),I=Vi(L*I*3),G=Vi(L*G*3),[P*255,I*255,G*255,f.length>3?f[3]:1]},em=$h,tm=u.unpack,nm=u.type;p.prototype.hsi=function(){return Xh(this._rgb)},C.hsi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsi"])))},c.format.hsi=em,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=tm(f,"hsi"),nm(f)==="array"&&f.length===3)return"hsi"}});var am=u.unpack,rm=u.type;p.prototype.hsl=function(){return Q(this._rgb)},C.hsl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsl"])))},c.format.hsl=Je,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=am(f,"hsl"),rm(f)==="array"&&f.length===3)return"hsl"}});var im=u.unpack,om=Math.min,sm=Math.max,lm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=im(f,"rgb");var b=f[0],N=f[1],L=f[2],P=om(b,N,L),I=sm(b,N,L),G=I-P,U,K,ae;return ae=I/255,I===0?(U=Number.NaN,K=0):(K=G/I,b===I&&(U=(N-L)/G),N===I&&(U=2+(L-b)/G),L===I&&(U=4+(b-N)/G),U*=60,U<0&&(U+=360)),[U,K,ae]},um=lm,cm=u.unpack,dm=Math.floor,fm=function(){for(var f,g,b,N,L,P,I=[],G=arguments.length;G--;)I[G]=arguments[G];I=cm(I,"hsv");var U=I[0],K=I[1],ae=I[2],$,ye,ge;if(ae*=255,K===0)$=ye=ge=ae;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var ke=dm(U),qe=U-ke,Te=ae*(1-K),He=ae*(1-K*qe),Ze=ae*(1-K*(1-qe));switch(ke){case 0:f=[ae,Ze,Te],$=f[0],ye=f[1],ge=f[2];break;case 1:g=[He,ae,Te],$=g[0],ye=g[1],ge=g[2];break;case 2:b=[Te,ae,Ze],$=b[0],ye=b[1],ge=b[2];break;case 3:N=[Te,He,ae],$=N[0],ye=N[1],ge=N[2];break;case 4:L=[Ze,Te,ae],$=L[0],ye=L[1],ge=L[2];break;case 5:P=[ae,Te,He],$=P[0],ye=P[1],ge=P[2];break}}return[$,ye,ge,I.length>3?I[3]:1]},hm=fm,mm=u.unpack,pm=u.type;p.prototype.hsv=function(){return um(this._rgb)},C.hsv=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsv"])))},c.format.hsv=hm,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=mm(f,"hsv"),pm(f)==="array"&&f.length===3)return"hsv"}});var Lt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},gm=u.unpack,Ns=Math.pow,ym=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=gm(f,"rgb"),N=b[0],L=b[1],P=b[2],I=vm(N,L,P),G=I[0],U=I[1],K=I[2],ae=116*U-16;return[ae<0?0:ae,500*(G-U),200*(U-K)]},Wi=function(f){return(f/=255)<=.04045?f/12.92:Ns((f+.055)/1.055,2.4)},Gi=function(f){return f>Lt.t3?Ns(f,1/3):f/Lt.t2+Lt.t0},vm=function(f,g,b){f=Wi(f),g=Wi(g),b=Wi(b);var N=Gi((.4124564*f+.3575761*g+.1804375*b)/Lt.Xn),L=Gi((.2126729*f+.7151522*g+.072175*b)/Lt.Yn),P=Gi((.0193339*f+.119192*g+.9503041*b)/Lt.Zn);return[N,L,P]},Is=ym,bm=u.unpack,wm=Math.pow,Dm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=bm(f,"lab");var b=f[0],N=f[1],L=f[2],P,I,G,U,K,ae;return I=(b+16)/116,P=isNaN(N)?I:I+N/500,G=isNaN(L)?I:I-L/200,I=Lt.Yn*zi(I),P=Lt.Xn*zi(P),G=Lt.Zn*zi(G),U=Ui(3.2404542*P-1.5371385*I-.4985314*G),K=Ui(-.969266*P+1.8760108*I+.041556*G),ae=Ui(.0556434*P-.2040259*I+1.0572252*G),[U,K,ae,f.length>3?f[3]:1]},Ui=function(f){return 255*(f<=.00304?12.92*f:1.055*wm(f,1/2.4)-.055)},zi=function(f){return f>Lt.t1?f*f*f:Lt.t2*(f-Lt.t0)},Os=Dm,_m=u.unpack,Em=u.type;p.prototype.lab=function(){return Is(this._rgb)},C.lab=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lab"])))},c.format.lab=Os,c.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=_m(f,"lab"),Em(f)==="array"&&f.length===3)return"lab"}});var Cm=u.unpack,Am=u.RAD2DEG,km=Math.sqrt,xm=Math.atan2,Fm=Math.round,Tm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Cm(f,"lab"),N=b[0],L=b[1],P=b[2],I=km(L*L+P*P),G=(xm(P,L)*Am+360)%360;return Fm(I*1e4)===0&&(G=Number.NaN),[N,I,G]},Sm=Tm,Bm=u.unpack,Mm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Bm(f,"rgb"),N=b[0],L=b[1],P=b[2],I=Is(N,L,P),G=I[0],U=I[1],K=I[2];return Sm(G,U,K)},qs=Mm,Nm=u.unpack,Im=u.DEG2RAD,Om=Math.sin,qm=Math.cos,Rm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Nm(f,"lch"),N=b[0],L=b[1],P=b[2];return isNaN(P)&&(P=0),P=P*Im,[N,qm(P)*L,Om(P)*L]},Lm=Rm,Pm=u.unpack,jm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Pm(f,"lch");var b=f[0],N=f[1],L=f[2],P=Lm(b,N,L),I=P[0],G=P[1],U=P[2],K=Os(I,G,U),ae=K[0],$=K[1],ye=K[2];return[ae,$,ye,f.length>3?f[3]:1]},Rs=jm,Vm=u.unpack,Hm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Vm(f,"hcl").reverse();return Rs.apply(void 0,b)},Wm=Hm,Gm=u.unpack,Um=u.type;p.prototype.lch=function(){return qs(this._rgb)},p.prototype.hcl=function(){return qs(this._rgb).reverse()},C.lch=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lch"])))},C.hcl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcl"])))},c.format.lch=Rs,c.format.hcl=Wm,["lch","hcl"].forEach(function(f){return c.autodetect.push({p:2,test:function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];if(g=Gm(g,f),Um(g)==="array"&&g.length===3)return f}})});var zm={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",cornflower:"#6495ed",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",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",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",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",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"},da=zm,Ym=u.type;p.prototype.name=function(){for(var f=Ss(this._rgb,"rgb"),g=0,b=Object.keys(da);g<b.length;g+=1){var N=b[g];if(da[N]===f)return N.toLowerCase()}return f},c.format.named=function(f){if(f=f.toLowerCase(),da[f])return Bs(da[f]);throw new Error("unknown color name: "+f)},c.autodetect.push({p:5,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&Ym(f)==="string"&&da[f.toLowerCase()])return"named"}});var Zm=u.unpack,Km=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Zm(f,"rgb"),N=b[0],L=b[1],P=b[2];return(N<<16)+(L<<8)+P},Qm=Km,Xm=u.type,Jm=function(f){if(Xm(f)=="number"&&f>=0&&f<=16777215){var g=f>>16,b=f>>8&255,N=f&255;return[g,b,N,1]}throw new Error("unknown num color: "+f)},$m=Jm,ep=u.type;p.prototype.num=function(){return Qm(this._rgb)},C.num=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["num"])))},c.format.num=$m,c.autodetect.push({p:5,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f.length===1&&ep(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var Ls=u.unpack,Ps=u.type,js=Math.round;p.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(js)},p.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(g,b){return b<3?f===!1?g:js(g):g})},C.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["rgb"])))},c.format.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Ls(f,"rgba");return b[3]===void 0&&(b[3]=1),b},c.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Ls(f,"rgba"),Ps(f)==="array"&&(f.length===3||f.length===4&&Ps(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var Dr=Math.log,tp=function(f){var g=f/100,b,N,L;return g<66?(b=255,N=-155.25485562709179-.44596950469579133*(N=g-2)+104.49216199393888*Dr(N),L=g<20?0:-254.76935184120902+.8274096064007395*(L=g-10)+115.67994401066147*Dr(L)):(b=351.97690566805693+.114206453784165*(b=g-55)-40.25366309332127*Dr(b),N=325.4494125711974+.07943456536662342*(N=g-50)-28.0852963507957*Dr(N),L=255),[b,N,L,1]},Vs=tp,np=u.unpack,ap=Math.round,rp=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];for(var b=np(f,"rgb"),N=b[0],L=b[2],P=1e3,I=4e4,G=.4,U;I-P>G;){U=(I+P)*.5;var K=Vs(U);K[2]/K[0]>=L/N?I=U:P=U}return ap(U)},ip=rp;p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return ip(this._rgb)},C.temp=C.kelvin=C.temperature=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=Vs;var op=u.type;p.prototype.alpha=function(f,g){return g===void 0&&(g=!1),f!==void 0&&op(f)==="number"?g?(this._rgb[3]=f,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(f){f===void 0&&(f=1);var g=this,b=g.lab();return b[0]-=Lt.Kn*f,new p(b,"lab").alpha(g.alpha(),!0)},p.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(f){var g=f.split("."),b=g[0],N=g[1],L=this[b]();if(N){var P=b.indexOf(N);if(P>-1)return L[P];throw new Error("unknown channel "+N+" in mode "+b)}else return L};var sp=u.type,lp=Math.pow,up=1e-7,cp=20;p.prototype.luminance=function(f){if(f!==void 0&&sp(f)==="number"){if(f===0)return new p([0,0,0,this._rgb[3]],"rgb");if(f===1)return new p([255,255,255,this._rgb[3]],"rgb");var g=this.luminance(),b="rgb",N=cp,L=function(I,G){var U=I.interpolate(G,.5,b),K=U.luminance();return Math.abs(f-K)<up||!N--?U:K>f?L(I,U):L(U,G)},P=(g>f?L(new p([0,0,0]),this):L(this,new p([255,255,255]))).rgb();return new p(P.concat([this._rgb[3]]))}return dp.apply(void 0,this._rgb.slice(0,3))};var dp=function(f,g,b){return f=Yi(f),g=Yi(g),b=Yi(b),.2126*f+.7152*g+.0722*b},Yi=function(f){return f/=255,f<=.03928?f/12.92:lp((f+.055)/1.055,2.4)},Pt={},Hs=u.type,Ws=function(f,g,b){b===void 0&&(b=.5);for(var N=[],L=arguments.length-3;L-- >0;)N[L]=arguments[L+3];var P=N[0]||"lrgb";if(!Pt[P]&&!N.length&&(P=Object.keys(Pt)[0]),!Pt[P])throw new Error("interpolation mode "+P+" is not defined");return Hs(f)!=="object"&&(f=new p(f)),Hs(g)!=="object"&&(g=new p(g)),Pt[P](f,g,b).alpha(f.alpha()+b*(g.alpha()-f.alpha()))};p.prototype.mix=p.prototype.interpolate=function(f,g){g===void 0&&(g=.5);for(var b=[],N=arguments.length-2;N-- >0;)b[N]=arguments[N+2];return Ws.apply(void 0,[this,f,g].concat(b))},p.prototype.premultiply=function(f){f===void 0&&(f=!1);var g=this._rgb,b=g[3];return f?(this._rgb=[g[0]*b,g[1]*b,g[2]*b,b],this):new p([g[0]*b,g[1]*b,g[2]*b,b],"rgb")},p.prototype.saturate=function(f){f===void 0&&(f=1);var g=this,b=g.lch();return b[1]+=Lt.Kn*f,b[1]<0&&(b[1]=0),new p(b,"lch").alpha(g.alpha(),!0)},p.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Gs=u.type;p.prototype.set=function(f,g,b){b===void 0&&(b=!1);var N=f.split("."),L=N[0],P=N[1],I=this[L]();if(P){var G=L.indexOf(P);if(G>-1){if(Gs(g)=="string")switch(g.charAt(0)){case"+":I[G]+=+g;break;case"-":I[G]+=+g;break;case"*":I[G]*=+g.substr(1);break;case"/":I[G]/=+g.substr(1);break;default:I[G]=+g}else if(Gs(g)==="number")I[G]=g;else throw new Error("unsupported value for Color.set");var U=new p(I,L);return b?(this._rgb=U._rgb,this):U}throw new Error("unknown channel "+P+" in mode "+L)}else return I};var fp=function(f,g,b){var N=f._rgb,L=g._rgb;return new p(N[0]+b*(L[0]-N[0]),N[1]+b*(L[1]-N[1]),N[2]+b*(L[2]-N[2]),"rgb")};Pt.rgb=fp;var Zi=Math.sqrt,fa=Math.pow,hp=function(f,g,b){var N=f._rgb,L=N[0],P=N[1],I=N[2],G=g._rgb,U=G[0],K=G[1],ae=G[2];return new p(Zi(fa(L,2)*(1-b)+fa(U,2)*b),Zi(fa(P,2)*(1-b)+fa(K,2)*b),Zi(fa(I,2)*(1-b)+fa(ae,2)*b),"rgb")};Pt.lrgb=hp;var mp=function(f,g,b){var N=f.lab(),L=g.lab();return new p(N[0]+b*(L[0]-N[0]),N[1]+b*(L[1]-N[1]),N[2]+b*(L[2]-N[2]),"lab")};Pt.lab=mp;var Va=function(f,g,b,N){var L,P,I,G;N==="hsl"?(I=f.hsl(),G=g.hsl()):N==="hsv"?(I=f.hsv(),G=g.hsv()):N==="hcg"?(I=f.hcg(),G=g.hcg()):N==="hsi"?(I=f.hsi(),G=g.hsi()):(N==="lch"||N==="hcl")&&(N="hcl",I=f.hcl(),G=g.hcl());var U,K,ae,$,ye,ge;N.substr(0,1)==="h"&&(L=I,U=L[0],ae=L[1],ye=L[2],P=G,K=P[0],$=P[1],ge=P[2]);var ke,qe,Te,He;return!isNaN(U)&&!isNaN(K)?(K>U&&K-U>180?He=K-(U+360):K<U&&U-K>180?He=K+360-U:He=K-U,qe=U+b*He):isNaN(U)?isNaN(K)?qe=Number.NaN:(qe=K,(ye==1||ye==0)&&N!="hsv"&&(ke=$)):(qe=U,(ge==1||ge==0)&&N!="hsv"&&(ke=ae)),ke===void 0&&(ke=ae+b*($-ae)),Te=ye+b*(ge-ye),new p([qe,ke,Te],N)},Us=function(f,g,b){return Va(f,g,b,"lch")};Pt.lch=Us,Pt.hcl=Us;var pp=function(f,g,b){var N=f.num(),L=g.num();return new p(N+b*(L-N),"num")};Pt.num=pp;var gp=function(f,g,b){return Va(f,g,b,"hcg")};Pt.hcg=gp;var yp=function(f,g,b){return Va(f,g,b,"hsi")};Pt.hsi=yp;var vp=function(f,g,b){return Va(f,g,b,"hsl")};Pt.hsl=vp;var bp=function(f,g,b){return Va(f,g,b,"hsv")};Pt.hsv=bp;var wp=u.clip_rgb,Ki=Math.pow,Qi=Math.sqrt,Xi=Math.PI,zs=Math.cos,Ys=Math.sin,Dp=Math.atan2,_p=function(f,g,b){g===void 0&&(g="lrgb"),b===void 0&&(b=null);var N=f.length;b||(b=Array.from(new Array(N)).map(function(){return 1}));var L=N/b.reduce(function(qe,Te){return qe+Te});if(b.forEach(function(qe,Te){b[Te]*=L}),f=f.map(function(qe){return new p(qe)}),g==="lrgb")return Ep(f,b);for(var P=f.shift(),I=P.get(g),G=[],U=0,K=0,ae=0;ae<I.length;ae++)if(I[ae]=(I[ae]||0)*b[0],G.push(isNaN(I[ae])?0:b[0]),g.charAt(ae)==="h"&&!isNaN(I[ae])){var $=I[ae]/180*Xi;U+=zs($)*b[0],K+=Ys($)*b[0]}var ye=P.alpha()*b[0];f.forEach(function(qe,Te){var He=qe.get(g);ye+=qe.alpha()*b[Te+1];for(var Ze=0;Ze<I.length;Ze++)if(!isNaN(He[Ze]))if(G[Ze]+=b[Te+1],g.charAt(Ze)==="h"){var _t=He[Ze]/180*Xi;U+=zs(_t)*b[Te+1],K+=Ys(_t)*b[Te+1]}else I[Ze]+=He[Ze]*b[Te+1]});for(var ge=0;ge<I.length;ge++)if(g.charAt(ge)==="h"){for(var ke=Dp(K/G[ge],U/G[ge])/Xi*180;ke<0;)ke+=360;for(;ke>=360;)ke-=360;I[ge]=ke}else I[ge]=I[ge]/G[ge];return ye/=N,new p(I,g).alpha(ye>.99999?1:ye,!0)},Ep=function(f,g){for(var b=f.length,N=[0,0,0,0],L=0;L<f.length;L++){var P=f[L],I=g[L]/b,G=P._rgb;N[0]+=Ki(G[0],2)*I,N[1]+=Ki(G[1],2)*I,N[2]+=Ki(G[2],2)*I,N[3]+=G[3]*I}return N[0]=Qi(N[0]),N[1]=Qi(N[1]),N[2]=Qi(N[2]),N[3]>.9999999&&(N[3]=1),new p(wp(N))},ha=u.type,Cp=Math.pow,_r=function(f){var g="rgb",b=C("#ccc"),N=0,L=[0,1],P=[],I=[0,0],G=!1,U=[],K=!1,ae=0,$=1,ye=!1,ge={},ke=!0,qe=1,Te=function(re){if(re=re||["#fff","#000"],re&&ha(re)==="string"&&C.brewer&&C.brewer[re.toLowerCase()]&&(re=C.brewer[re.toLowerCase()]),ha(re)==="array"){re.length===1&&(re=[re[0],re[0]]),re=re.slice(0);for(var Ae=0;Ae<re.length;Ae++)re[Ae]=C(re[Ae]);P.length=0;for(var Re=0;Re<re.length;Re++)P.push(Re/(re.length-1))}return zt(),U=re},He=function(re){if(G!=null){for(var Ae=G.length-1,Re=0;Re<Ae&&re>=G[Re];)Re++;return Re-1}return 0},Ze=function(re){return re},_t=function(re){return re},Et=function(re,Ae){var Re,Oe;if(Ae==null&&(Ae=!1),isNaN(re)||re===null)return b;if(Ae)Oe=re;else if(G&&G.length>2){var jt=He(re);Oe=jt/(G.length-2)}else $!==ae?Oe=(re-ae)/($-ae):Oe=1;Oe=_t(Oe),Ae||(Oe=Ze(Oe)),qe!==1&&(Oe=Cp(Oe,qe)),Oe=I[0]+Oe*(1-I[0]-I[1]),Oe=Math.min(1,Math.max(0,Oe));var tt=Math.floor(Oe*1e4);if(ke&&ge[tt])Re=ge[tt];else{if(ha(U)==="array")for(var ze=0;ze<P.length;ze++){var Ye=P[ze];if(Oe<=Ye){Re=U[ze];break}if(Oe>=Ye&&ze===P.length-1){Re=U[ze];break}if(Oe>Ye&&Oe<P[ze+1]){Oe=(Oe-Ye)/(P[ze+1]-Ye),Re=C.interpolate(U[ze],U[ze+1],Oe,g);break}}else ha(U)==="function"&&(Re=U(Oe));ke&&(ge[tt]=Re)}return Re},zt=function(){return ge={}};Te(f);var Le=function(re){var Ae=C(Et(re));return K&&Ae[K]?Ae[K]():Ae};return Le.classes=function(re){if(re!=null){if(ha(re)==="array")G=re,L=[re[0],re[re.length-1]];else{var Ae=C.analyze(L);re===0?G=[Ae.min,Ae.max]:G=C.limits(Ae,"e",re)}return Le}return G},Le.domain=function(re){if(!arguments.length)return L;ae=re[0],$=re[re.length-1],P=[];var Ae=U.length;if(re.length===Ae&&ae!==$)for(var Re=0,Oe=Array.from(re);Re<Oe.length;Re+=1){var jt=Oe[Re];P.push((jt-ae)/($-ae))}else{for(var tt=0;tt<Ae;tt++)P.push(tt/(Ae-1));if(re.length>2){var ze=re.map(function(ut,Ke){return Ke/(re.length-1)}),Ye=re.map(function(ut){return(ut-ae)/($-ae)});Ye.every(function(ut,Ke){return ze[Ke]===ut})||(_t=function(ut){if(ut<=0||ut>=1)return ut;for(var Ke=0;ut>=Ye[Ke+1];)Ke++;var Tn=(ut-Ye[Ke])/(Ye[Ke+1]-Ye[Ke]),ma=ze[Ke]+Tn*(ze[Ke+1]-ze[Ke]);return ma})}}return L=[ae,$],Le},Le.mode=function(re){return arguments.length?(g=re,zt(),Le):g},Le.range=function(re,Ae){return Te(re,Ae),Le},Le.out=function(re){return K=re,Le},Le.spread=function(re){return arguments.length?(N=re,Le):N},Le.correctLightness=function(re){return re==null&&(re=!0),ye=re,zt(),ye?Ze=function(Ae){for(var Re=Et(0,!0).lab()[0],Oe=Et(1,!0).lab()[0],jt=Re>Oe,tt=Et(Ae,!0).lab()[0],ze=Re+(Oe-Re)*Ae,Ye=tt-ze,ut=0,Ke=1,Tn=20;Math.abs(Ye)>.01&&Tn-- >0;)(function(){return jt&&(Ye*=-1),Ye<0?(ut=Ae,Ae+=(Ke-Ae)*.5):(Ke=Ae,Ae+=(ut-Ae)*.5),tt=Et(Ae,!0).lab()[0],Ye=tt-ze})();return Ae}:Ze=function(Ae){return Ae},Le},Le.padding=function(re){return re!=null?(ha(re)==="number"&&(re=[re,re]),I=re,Le):I},Le.colors=function(re,Ae){arguments.length<2&&(Ae="hex");var Re=[];if(arguments.length===0)Re=U.slice(0);else if(re===1)Re=[Le(.5)];else if(re>1){var Oe=L[0],jt=L[1]-Oe;Re=Ap(0,re,!1).map(function(Ke){return Le(Oe+Ke/(re-1)*jt)})}else{f=[];var tt=[];if(G&&G.length>2)for(var ze=1,Ye=G.length,ut=1<=Ye;ut?ze<Ye:ze>Ye;ut?ze++:ze--)tt.push((G[ze-1]+G[ze])*.5);else tt=L;Re=tt.map(function(Ke){return Le(Ke)})}return C[Ae]&&(Re=Re.map(function(Ke){return Ke[Ae]()})),Re},Le.cache=function(re){return re!=null?(ke=re,Le):ke},Le.gamma=function(re){return re!=null?(qe=re,Le):qe},Le.nodata=function(re){return re!=null?(b=C(re),Le):b},Le};function Ap(f,g,b){for(var N=[],L=f<g,P=b?L?g+1:g-1:g,I=f;L?I<P:I>P;L?I++:I--)N.push(I);return N}var Ji=function(f){var g,b,N,L,P,I,G;if(f=f.map(function($){return new p($)}),f.length===2)g=f.map(function($){return $.lab()}),P=g[0],I=g[1],L=function($){var ye=[0,1,2].map(function(ge){return P[ge]+$*(I[ge]-P[ge])});return new p(ye,"lab")};else if(f.length===3)b=f.map(function($){return $.lab()}),P=b[0],I=b[1],G=b[2],L=function($){var ye=[0,1,2].map(function(ge){return(1-$)*(1-$)*P[ge]+2*(1-$)*$*I[ge]+$*$*G[ge]});return new p(ye,"lab")};else if(f.length===4){var U;N=f.map(function($){return $.lab()}),P=N[0],I=N[1],G=N[2],U=N[3],L=function($){var ye=[0,1,2].map(function(ge){return(1-$)*(1-$)*(1-$)*P[ge]+3*(1-$)*(1-$)*$*I[ge]+3*(1-$)*$*$*G[ge]+$*$*$*U[ge]});return new p(ye,"lab")}}else if(f.length===5){var K=Ji(f.slice(0,3)),ae=Ji(f.slice(2,5));L=function($){return $<.5?K($*2):ae(($-.5)*2)}}return L},kp=function(f){var g=Ji(f);return g.scale=function(){return _r(g)},g},nn=function(f,g,b){if(!nn[b])throw new Error("unknown blend mode "+b);return nn[b](f,g)},xn=function(f){return function(g,b){var N=C(b).rgb(),L=C(g).rgb();return C.rgb(f(N,L))}},Fn=function(f){return function(g,b){var N=[];return N[0]=f(g[0],b[0]),N[1]=f(g[1],b[1]),N[2]=f(g[2],b[2]),N}},xp=function(f){return f},Fp=function(f,g){return f*g/255},Tp=function(f,g){return f>g?g:f},Sp=function(f,g){return f>g?f:g},Bp=function(f,g){return 255*(1-(1-f/255)*(1-g/255))},Mp=function(f,g){return g<128?2*f*g/255:255*(1-2*(1-f/255)*(1-g/255))},Np=function(f,g){return 255*(1-(1-g/255)/(f/255))},Ip=function(f,g){return f===255?255:(f=255*(g/255)/(1-f/255),f>255?255:f)};nn.normal=xn(Fn(xp)),nn.multiply=xn(Fn(Fp)),nn.screen=xn(Fn(Bp)),nn.overlay=xn(Fn(Mp)),nn.darken=xn(Fn(Tp)),nn.lighten=xn(Fn(Sp)),nn.dodge=xn(Fn(Ip)),nn.burn=xn(Fn(Np));for(var Op=nn,$i=u.type,qp=u.clip_rgb,Rp=u.TWOPI,Lp=Math.pow,Pp=Math.sin,jp=Math.cos,Vp=function(f,g,b,N,L){f===void 0&&(f=300),g===void 0&&(g=-1.5),b===void 0&&(b=1),N===void 0&&(N=1),L===void 0&&(L=[0,1]);var P=0,I;$i(L)==="array"?I=L[1]-L[0]:(I=0,L=[L,L]);var G=function(U){var K=Rp*((f+120)/360+g*U),ae=Lp(L[0]+I*U,N),$=P!==0?b[0]+U*P:b,ye=$*ae*(1-ae)/2,ge=jp(K),ke=Pp(K),qe=ae+ye*(-.14861*ge+1.78277*ke),Te=ae+ye*(-.29227*ge-.90649*ke),He=ae+ye*(1.97294*ge);return C(qp([qe*255,Te*255,He*255,1]))};return G.start=function(U){return U==null?f:(f=U,G)},G.rotations=function(U){return U==null?g:(g=U,G)},G.gamma=function(U){return U==null?N:(N=U,G)},G.hue=function(U){return U==null?b:(b=U,$i(b)==="array"?(P=b[1]-b[0],P===0&&(b=b[1])):P=0,G)},G.lightness=function(U){return U==null?L:($i(U)==="array"?(L=U,I=U[1]-U[0]):(L=[U,U],I=0),G)},G.scale=function(){return C.scale(G)},G.hue(b),G},Hp="0123456789abcdef",Wp=Math.floor,Gp=Math.random,Up=function(){for(var f="#",g=0;g<6;g++)f+=Hp.charAt(Wp(Gp()*16));return new p(f,"hex")},Zs=Math.log,zp=Math.pow,Yp=Math.floor,Zp=Math.abs,Ks=function(f,g){g===void 0&&(g=null);var b={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return o(f)==="object"&&(f=Object.values(f)),f.forEach(function(N){g&&o(N)==="object"&&(N=N[g]),N!=null&&!isNaN(N)&&(b.values.push(N),b.sum+=N,N<b.min&&(b.min=N),N>b.max&&(b.max=N),b.count+=1)}),b.domain=[b.min,b.max],b.limits=function(N,L){return Qs(b,N,L)},b},Qs=function(f,g,b){g===void 0&&(g="equal"),b===void 0&&(b=7),o(f)=="array"&&(f=Ks(f));var N=f.min,L=f.max,P=f.values.sort(function(io,oo){return io-oo});if(b===1)return[N,L];var I=[];if(g.substr(0,1)==="c"&&(I.push(N),I.push(L)),g.substr(0,1)==="e"){I.push(N);for(var G=1;G<b;G++)I.push(N+G/b*(L-N));I.push(L)}else if(g.substr(0,1)==="l"){if(N<=0)throw new Error("Logarithmic scales are only possible for values > 0");var U=Math.LOG10E*Zs(N),K=Math.LOG10E*Zs(L);I.push(N);for(var ae=1;ae<b;ae++)I.push(zp(10,U+ae/b*(K-U)));I.push(L)}else if(g.substr(0,1)==="q"){I.push(N);for(var $=1;$<b;$++){var ye=(P.length-1)*$/b,ge=Yp(ye);if(ge===ye)I.push(P[ge]);else{var ke=ye-ge;I.push(P[ge]*(1-ke)+P[ge+1]*ke)}}I.push(L)}else if(g.substr(0,1)==="k"){var qe,Te=P.length,He=new Array(Te),Ze=new Array(b),_t=!0,Et=0,zt=null;zt=[],zt.push(N);for(var Le=1;Le<b;Le++)zt.push(N+Le/b*(L-N));for(zt.push(L);_t;){for(var re=0;re<b;re++)Ze[re]=0;for(var Ae=0;Ae<Te;Ae++)for(var Re=P[Ae],Oe=Number.MAX_VALUE,jt=void 0,tt=0;tt<b;tt++){var ze=Zp(zt[tt]-Re);ze<Oe&&(Oe=ze,jt=tt),Ze[jt]++,He[Ae]=jt}for(var Ye=new Array(b),ut=0;ut<b;ut++)Ye[ut]=null;for(var Ke=0;Ke<Te;Ke++)qe=He[Ke],Ye[qe]===null?Ye[qe]=P[Ke]:Ye[qe]+=P[Ke];for(var Tn=0;Tn<b;Tn++)Ye[Tn]*=1/Ze[Tn];_t=!1;for(var ma=0;ma<b;ma++)if(Ye[ma]!==zt[ma]){_t=!0;break}zt=Ye,Et++,Et>200&&(_t=!1)}for(var Ha={},no=0;no<b;no++)Ha[no]=[];for(var Ar=0;Ar<Te;Ar++)qe=He[Ar],Ha[qe].push(P[Ar]);for(var jn=[],Wa=0;Wa<b;Wa++)jn.push(Ha[Wa][0]),jn.push(Ha[Wa][Ha[Wa].length-1]);jn=jn.sort(function(io,oo){return io-oo}),I.push(jn[0]);for(var ao=1;ao<jn.length;ao+=2){var ro=jn[ao];!isNaN(ro)&&I.indexOf(ro)===-1&&I.push(ro)}}return I},Xs={analyze:Ks,limits:Qs},Kp=function(f,g){f=new p(f),g=new p(g);var b=f.luminance(),N=g.luminance();return b>N?(b+.05)/(N+.05):(N+.05)/(b+.05)},Er=Math.sqrt,Qp=Math.atan2,Js=Math.abs,$s=Math.cos,eo=Math.PI,Xp=function(f,g,b,N){b===void 0&&(b=1),N===void 0&&(N=1),f=new p(f),g=new p(g);for(var L=Array.from(f.lab()),P=L[0],I=L[1],G=L[2],U=Array.from(g.lab()),K=U[0],ae=U[1],$=U[2],ye=Er(I*I+G*G),ge=Er(ae*ae+$*$),ke=P<16?.511:.040975*P/(1+.01765*P),qe=.0638*ye/(1+.0131*ye)+.638,Te=ye<1e-6?0:Qp(G,I)*180/eo;Te<0;)Te+=360;for(;Te>=360;)Te-=360;var He=Te>=164&&Te<=345?.56+Js(.2*$s(eo*(Te+168)/180)):.36+Js(.4*$s(eo*(Te+35)/180)),Ze=ye*ye*ye*ye,_t=Er(Ze/(Ze+1900)),Et=qe*(_t*He+1-_t),zt=P-K,Le=ye-ge,re=I-ae,Ae=G-$,Re=re*re+Ae*Ae-Le*Le,Oe=zt/(b*ke),jt=Le/(N*qe),tt=Et;return Er(Oe*Oe+jt*jt+Re/(tt*tt))},Jp=function(f,g,b){b===void 0&&(b="lab"),f=new p(f),g=new p(g);var N=f.get(b),L=g.get(b),P=0;for(var I in N){var G=(N[I]||0)-(L[I]||0);P+=G*G}return Math.sqrt(P)},$p=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];try{return new(Function.prototype.bind.apply(p,[null].concat(f))),!0}catch{return!1}},eg={cool:function(){return _r([C.hsl(180,1,.9),C.hsl(250,.7,.4)])},hot:function(){return _r(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},Cr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},to=0,el=Object.keys(Cr);to<el.length;to+=1){var tl=el[to];Cr[tl.toLowerCase()]=Cr[tl]}var tg=Cr;C.average=_p,C.bezier=kp,C.blend=Op,C.cubehelix=Vp,C.mix=C.interpolate=Ws,C.random=Up,C.scale=_r,C.analyze=Xs.analyze,C.contrast=Kp,C.deltaE=Xp,C.distance=Jp,C.limits=Xs.limits,C.valid=$p,C.scales=eg,C.colors=da,C.brewer=tg;var ng=C;return ng})});var Xl=Qe(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.default=void 0;var vo=Ir(al()),bo=Ir(yl()),y2=Ir(zl()),Nr=Ir(Yl());function Ir(t){return t&&t.__esModule?t:{default:t}}function v2(t){if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(t=b2(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(s){throw s},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,r=!0,i=!1,o;return{s:function(){a=t[Symbol.iterator]()},n:function(){var s=a.next();return r=s.done,s},e:function(s){i=!0,o=s},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}}}function b2(t,e){if(!!t){if(typeof t=="string")return Zl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zl(t,e)}}function Zl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function Kl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function w2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kl(Object(n),!0).forEach(function(a){D2(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kl(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function D2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _2={count:5,hueMin:0,hueMax:360,chromaMin:0,chromaMax:100,lightMin:0,lightMax:100,quality:50,samples:800},Ql=function(e,n){for(var a=Number.MAX_SAFE_INTEGER,r=0,i=0;i<e.length;i+=1){var o=e[i],l=Math.sqrt(Math.pow(Math.abs(o[0]-n[0]),2)+Math.pow(Math.abs(o[1]-n[1]),2)+Math.pow(Math.abs(o[2]-n[2]),2));l<a&&(a=l,r=i)}return r},E2=function(e,n){var a=Nr.default.lab(e),r=a.hcl(),i=a.rgb(),o=Nr.default.rgb(i).lab(),l=2;return r[0]>=n.hueMin&&r[0]<=n.hueMax&&r[1]>=n.chromaMin&&r[1]<=n.chromaMax&&r[2]>=n.lightMin&&r[2]<=n.lightMax&&o[0]>=e[0]-l&&o[0]<=e[0]+l&&o[1]>=e[1]-l&&o[1]<=e[1]+l&&o[2]>=e[2]-l&&o[2]<=e[2]+l},C2=function(e){for(var n=e.slice(0),a=[n.shift()];n.length>0;){for(var r=a[a.length-1],i=0,o=Number.MIN_SAFE_INTEGER,l=0;l<n.length;l+=1){var s=Math.sqrt(Math.pow(Math.abs(r[0]-n[l][0]),2)+Math.pow(Math.abs(r[1]-n[l][1]),2)+Math.pow(Math.abs(r[2]-n[l][2]),2));s>o&&(o=s,i=l)}a.push(n.splice(i,1)[0])}return a},A2=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=w2({},_2,{},e);if(n.count<=0)return[];n.samples<n.count*3&&(n.samples=Math.ceil(n.count*3));var a=[],r=[],i=new Set,o=Math.ceil(Math.cbrt(n.samples)),l=(n.hueMax-n.hueMin)/o,s=(n.chromaMax-n.chromaMin)/o,d=(n.lightMax-n.lightMin)/o;if(l<=0)throw new Error("hueMax must be greater than hueMin!");if(s<=0)throw new Error("chromaMax must be greater than chromaMin!");if(d<=0)throw new Error("lightMax must be greater than lightMin!");for(var u=n.hueMin+l/2;u<=n.hueMax;u+=l)for(var c=n.chromaMin+s/2;c<=n.chromaMax;c+=s)for(var h=n.lightMin+d/2;h<=n.lightMax;h+=d){var y=Nr.default.hcl(u,c,h).lab();E2(y,n)&&i.add(y.toString())}if(i=Array.from(i),i=i.map(function(ve){return ve.split(",").map(function(Ne){return parseFloat(Ne)})}),i.length<n.count)throw new Error("Not enough samples to generate palette, increase sample count.");for(var m=Math.floor(i.length/n.count),v=0;v<i.length&&(a.push(i[v]),r.push([]),!(a.length>=n.count));v+=m);for(var p=1;p<=n.quality;p+=1){for(var k=(0,bo.default)(r),C=(0,bo.default)(i),A=0;A<a.length;A+=1){var S=Ql(C,a[A]);k[A].push(C[S]),C.splice(S,1)}for(var _=0;_<C.length;_+=1){var F=i[_],w=Ql(a,F);k[w].push(i[_])}for(var M=(0,bo.default)(a),x=0;x<k.length;x+=1){var V=k[x],B=V.length,H=[],Y=[],he=[],oe=v2(V),ce;try{for(oe.s();!(ce=oe.n()).done;){var Z=ce.value;H.push(Z[0]),Y.push(Z[1]),he.push(Z[2])}}catch(ve){oe.e(ve)}finally{oe.f()}var z=vo.default.sum(H)/B,Q=vo.default.sum(Y)/B,De=vo.default.sum(he)/B;a[x]=[z,Q,De]}if((0,y2.default)(M,a))break}return a=C2(a),a.map(function(ve){return Nr.default.lab(ve)})},k2=A2;Or.default=k2});var Jl=Qe((qr,za)=>{(function(t){var e=typeof qr=="object"&&qr,n=typeof za=="object"&&za&&za.exports==e&&za,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(t=a);var r=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i=/[\x01-\x7F]/g,o=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,s={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},d=/["&'<>`]/g,u={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},c=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,m={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},v={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},p={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},k=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],C=String.fromCharCode,A={},S=A.hasOwnProperty,_=function(Z,z){return S.call(Z,z)},F=function(Z,z){for(var Q=-1,De=Z.length;++Q<De;)if(Z[Q]==z)return!0;return!1},w=function(Z,z){if(!Z)return z;var Q={},De;for(De in z)Q[De]=_(Z,De)?Z[De]:z[De];return Q},M=function(Z,z){var Q="";return Z>=55296&&Z<=57343||Z>1114111?(z&&B("character reference outside the permissible Unicode range"),"\uFFFD"):_(p,Z)?(z&&B("disallowed character reference"),p[Z]):(z&&F(k,Z)&&B("disallowed character reference"),Z>65535&&(Z-=65536,Q+=C(Z>>>10&1023|55296),Z=56320|Z&1023),Q+=C(Z),Q)},x=function(Z){return"&#x"+Z.toString(16).toUpperCase()+";"},V=function(Z){return"&#"+Z+";"},B=function(Z){throw Error("Parse error: "+Z)},H=function(Z,z){z=w(z,H.options);var Q=z.strict;Q&&h.test(Z)&&B("forbidden code point");var De=z.encodeEverything,ve=z.useNamedReferences,Ne=z.allowUnsafeSymbols,je=z.decimal?V:x,at=function(Pe){return je(Pe.charCodeAt(0))};return De?(Z=Z.replace(i,function(Pe){return ve&&_(s,Pe)?"&"+s[Pe]+";":at(Pe)}),ve&&(Z=Z.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),ve&&(Z=Z.replace(l,function(Pe){return"&"+s[Pe]+";"}))):ve?(Ne||(Z=Z.replace(d,function(Pe){return"&"+s[Pe]+";"})),Z=Z.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;"),Z=Z.replace(l,function(Pe){return"&"+s[Pe]+";"})):Ne||(Z=Z.replace(d,at)),Z.replace(r,function(Pe){var gt=Pe.charCodeAt(0),xt=Pe.charCodeAt(1),Je=(gt-55296)*1024+xt-56320+65536;return je(Je)}).replace(o,at)};H.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var Y=function(Z,z){z=w(z,Y.options);var Q=z.strict;return Q&&c.test(Z)&&B("malformed character reference"),Z.replace(y,function(De,ve,Ne,je,at,Pe,gt,xt,Je){var Fe,Ve,Rt,Gt,Ft,Mt;return ve?(Ft=ve,m[Ft]):Ne?(Ft=Ne,Mt=je,Mt&&z.isAttributeValue?(Q&&Mt=="="&&B("`&` did not start a character reference"),De):(Q&&B("named character reference was not terminated by a semicolon"),v[Ft]+(Mt||""))):at?(Rt=at,Ve=Pe,Q&&!Ve&&B("character reference was not terminated by a semicolon"),Fe=parseInt(Rt,10),M(Fe,Q)):gt?(Gt=gt,Ve=xt,Q&&!Ve&&B("character reference was not terminated by a semicolon"),Fe=parseInt(Gt,16),M(Fe,Q)):(Q&&B("named character reference was not terminated by a semicolon"),De)})};Y.options={isAttributeValue:!1,strict:!1};var he=function(Z){return Z.replace(d,function(z){return u[z]})},oe={version:"1.2.0",encode:H,decode:Y,escape:he,unescape:Y};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return oe});else if(e&&!e.nodeType)if(n)n.exports=oe;else for(var ce in oe)_(oe,ce)&&(e[ce]=oe[ce]);else t.he=oe})(qr)});var Wd=Qe((gr,yr)=>{(function(t,e){if(typeof gr=="object"){var n=e();typeof yr=="object"&&yr&&yr.exports&&(gr=yr.exports=n),gr.randomColor=n}else typeof define=="function"&&define.amd?define([],e):t.randomColor=e()})(gr,function(){var t=null,e={};v();var n=[],a=function(_){if(_=_||{},_.seed!==void 0&&_.seed!==null&&_.seed===parseInt(_.seed,10))t=_.seed;else if(typeof _.seed=="string")t=A(_.seed);else{if(_.seed!==void 0&&_.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var F,w,M;if(_.count!==null&&_.count!==void 0){for(var x=_.count,V=[],B=0;B<_.count;B++)n.push(!1);for(_.count=null;x>V.length;){var H=a(_);t!==null&&(_.seed=t),V.push(H)}return _.count=x,V}return F=r(_),w=i(F,_),M=o(F,w,_),l([F,w,M],_)};function r(_){if(n.length>0){var F=S(_.hue),w=h(F),M=(F[1]-F[0])/n.length,x=parseInt((w-F[0])/M);n[x]===!0?x=(x+2)%n.length:n[x]=!0;var V=(F[0]+x*M)%359,B=(F[0]+(x+1)*M)%359;return F=[V,B],w=h(F),w<0&&(w=360+w),w}else{var F=d(_.hue);return w=h(F),w<0&&(w=360+w),w}}function i(_,F){if(F.hue==="monochrome")return 0;if(F.luminosity==="random")return h([0,100]);var w=u(_),M=w[0],x=w[1];switch(F.luminosity){case"bright":M=55;break;case"dark":M=x-10;break;case"light":x=55;break}return h([M,x])}function o(_,F,w){var M=s(_,F),x=100;switch(w.luminosity){case"dark":x=M+20;break;case"light":M=(x+M)/2;break;case"random":M=0,x=100;break}return h([M,x])}function l(_,F){switch(F.format){case"hsvArray":return _;case"hslArray":return C(_);case"hsl":var w=C(_);return"hsl("+w[0]+", "+w[1]+"%, "+w[2]+"%)";case"hsla":var M=C(_),x=F.alpha||Math.random();return"hsla("+M[0]+", "+M[1]+"%, "+M[2]+"%, "+x+")";case"rgbArray":return p(_);case"rgb":var V=p(_);return"rgb("+V.join(", ")+")";case"rgba":var B=p(_),x=F.alpha||Math.random();return"rgba("+B.join(", ")+", "+x+")";default:return y(_)}}function s(_,F){for(var w=c(_).lowerBounds,M=0;M<w.length-1;M++){var x=w[M][0],V=w[M][1],B=w[M+1][0],H=w[M+1][1];if(F>=x&&F<=B){var Y=(H-V)/(B-x),he=V-Y*x;return Y*F+he}}return 0}function d(_){if(typeof parseInt(_)=="number"){var F=parseInt(_);if(F<360&&F>0)return[F,F]}if(typeof _=="string"){if(e[_]){var w=e[_];if(w.hueRange)return w.hueRange}else if(_.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var M=k(_)[0];return[M,M]}}return[0,360]}function u(_){return c(_).saturationRange}function c(_){_>=334&&_<=360&&(_-=360);for(var F in e){var w=e[F];if(w.hueRange&&_>=w.hueRange[0]&&_<=w.hueRange[1])return e[F]}return"Color not found"}function h(_){if(t===null){var F=.618033988749895,w=Math.random();return w+=F,w%=1,Math.floor(_[0]+w*(_[1]+1-_[0]))}else{var M=_[1]||1,x=_[0]||0;t=(t*9301+49297)%233280;var V=t/233280;return Math.floor(x+V*(M-x))}}function y(_){var F=p(_);function w(x){var V=x.toString(16);return V.length==1?"0"+V:V}var M="#"+w(F[0])+w(F[1])+w(F[2]);return M}function m(_,F,w){var M=w[0][0],x=w[w.length-1][0],V=w[w.length-1][1],B=w[0][1];e[_]={hueRange:F,lowerBounds:w,saturationRange:[M,x],brightnessRange:[V,B]}}function v(){m("monochrome",null,[[0,0],[100,0]]),m("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),m("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),m("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),m("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),m("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),m("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),m("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function p(_){var F=_[0];F===0&&(F=1),F===360&&(F=359),F=F/360;var w=_[1]/100,M=_[2]/100,x=Math.floor(F*6),V=F*6-x,B=M*(1-w),H=M*(1-V*w),Y=M*(1-(1-V)*w),he=256,oe=256,ce=256;switch(x){case 0:he=M,oe=Y,ce=B;break;case 1:he=H,oe=M,ce=B;break;case 2:he=B,oe=M,ce=Y;break;case 3:he=B,oe=H,ce=M;break;case 4:he=Y,oe=B,ce=M;break;case 5:he=M,oe=B,ce=H;break}var Z=[Math.floor(he*255),Math.floor(oe*255),Math.floor(ce*255)];return Z}function k(_){_=_.replace(/^#/,""),_=_.length===3?_.replace(/(.)/g,"$1$1"):_;var F=parseInt(_.substr(0,2),16)/255,w=parseInt(_.substr(2,2),16)/255,M=parseInt(_.substr(4,2),16)/255,x=Math.max(F,w,M),V=x-Math.min(F,w,M),B=x?V/x:0;switch(x){case F:return[60*((w-M)/V%6)||0,B,x];case w:return[60*((M-F)/V+2)||0,B,x];case M:return[60*((F-w)/V+4)||0,B,x]}}function C(_){var F=_[0],w=_[1]/100,M=_[2]/100,x=(2-w)*M;return[F,Math.round(w*M/(x<1?x:2-x)*1e4)/100,x/2*100]}function A(_){for(var F=0,w=0;w!==_.length&&!(F>=Number.MAX_SAFE_INTEGER);w++)F+=_.charCodeAt(w);return F}function S(_){if(isNaN(_)){if(typeof _=="string"){if(e[_]){var w=e[_];if(w.hueRange)return w.hueRange}else if(_.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var M=k(_)[0];return c(M).hueRange}}}else{var F=parseInt(_);if(F<360&&F>0)return c(_).hueRange}return[0,360]}return a})});lg(exports,{DEFAULT_CALENDAR:()=>or,DEFAULT_DATA:()=>jh,MODIFIER_KEY:()=>Ph,default:()=>Ts});var ja=xe(require("obsidian"));var Ge=xe(require("obsidian")),Ra=xe(Vn());var $l=xe(Xl());function wo(t,e){let n=window.moment(t),a=window.moment(e),r=a.diff(n,"days");return(n.year()<a.year()||n.dayOfYear()<a.dayOfYear())&&(n.hour()>a.hour()||n.minute()>a.minute()||n.second()>a.second()||n.millisecond()>a.millisecond())&&(r+=1),r}function Sn(t,e){return(t%e+e)%e}function et(t){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(e){var n=Math.random()*16|0,a=e=="x"?n:n&3|8;return a.toString(16)})}function Ua(t){if(!t.interval?.length)return"";let e=t.interval.sort((r,i)=>r.interval-i.interval),n=[];for(let r of e){let i=r.interval,o=t.offset&&!r.ignore?` (offset by ${t.offset})`:"";if(r.exclusive)i==1?n.push(`not every year${o}`):n.push(`not every ${Nt(i)} year${o}`);else{let l=e.indexOf(r),s=l>0&&e[l-1].exclusive;i==1?n.push(`${s?"also ":""}every year${o}`):n.push(`${s?"also ":""}every ${Nt(i)} year${o}`)}}let a=n.join(", but ");return a[0].toUpperCase()+a.slice(1).toLowerCase()}function Nt(t){let e=t%10,n=t%100;return e==1&&n!=11?t+"st":e==2&&n!=12?t+"nd":e==3&&n!=13?t+"rd":t+"th"}function yn(t,e,n){if(!t||t.day==null)return"";let{day:a,month:r,year:i}=t;if(r!=null&&!e[r])return"Invalid Date";if(n&&n.day){let o=n.day,l=n.month,s=n.year;if(l!=null&&s!=null&&r!=null&&i!=null)return i!=s?`${e[r].name} ${Nt(a)}, ${i} - ${e[l].name} ${Nt(o)}, ${s}`:l==r?`${e[r].name} ${Nt(a)}-${Nt(o)}, ${i}`:r!=null&&i!=null?`${e[r].name} ${Nt(a)}-${e[l].name} ${Nt(o)}, ${i}`:r!=null?`${e[r].name} ${Nt(a)}-${e[l].name} ${Nt(o)} of every year`:`${Nt(a)}-${Nt(o)} of every month`}return r!=null&&i!=null?`${e[r].name} ${Nt(a)}, ${i}`:r!=null?`${e[r].name} ${Nt(a)} of every year`:`${Nt(a)} of every month`}function Hn(t,e){return!(t==null||e?.current?.month==null||t<1||t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)}function Wn(t,e){return!(t==null||!e?.static?.months?.length||t<0||t>=e?.static?.months?.length)}function Gn(t,e){return!(t==null||t<1&&!e.static?.useCustomYears||e?.static?.useCustomYears&&(!e?.static?.years?.length||t<0||t>=e?.static?.years?.length))}var eu=xe(Jl()),Rr=class{static import(e){let n=[];for(let a of e){let r=a.name??"Imported Calendar",i=a.static_data;if(!i)continue;let o=i.year_data;if(!o)continue;let l=o.first_day-1,s=o.overflow??!0,d=o.global_week;if(!d)continue;let u=d.map(w=>({type:"day",name:w,id:et(6)})),c=o.timespans;if(!c)continue;let h=c.map(w=>({name:(0,eu.decode)(w.name),type:w.type,length:w.length,id:et(6)})),y=h.reduce((w,M)=>M.type=="month"?w+M.length:w,0),m=[];if("leap_days"in o)for(let w of o.leap_days){let x=(w.interval.split(",")??["1"]).map(V=>{let B=/\+/.test(V),H=/\!/.test(V),Y=V.match(/(\d+)/).first();return{ignore:B,exclusive:H,interval:Number(Y)}});m.push({name:w.name??`Leap Day ${m.length+1}`,type:"leapday",interval:x,timespan:w.timespan??0,intercalary:w.intercalary??!1,numbered:!w.not_numbered,after:w.day,offset:w.offset??0,id:et(6)})}let v=[];if("moons"in i)for(let w of i.moons)v.push({name:w.name??`Moon ${v.length+1}`,cycle:Number(w.cycle)??y,offset:w.shift??0,faceColor:w.color??"#ffffff",shadowColor:w.shadow_color??"#000000",id:et(6)});let p=[];if("eras"in i)for(let w of i.eras)p.push({name:w.name??`Era ${p.length+1}`,description:w.description,format:w.formatting??"Year {{year}} - {{era_name}}",start:{year:w.date?.year??1,month:w.date?.timespan??0,day:w.date?.day??0}});let k={firstWeekDay:l,overflow:s,weekdays:u,months:h,moons:v,leapDays:m,eras:p,displayMoons:!0,incrementDay:!1,displayDayNumber:!1},C={year:1,day:1,month:0};a.dynamic_data&&(C.year=Math.max(1,a.dynamic_data.year??C.year),C.day=a.dynamic_data.day??C.day,C.month=a.dynamic_data.timespan??C.month);let A=[],S=new Map;if("categories"in a)for(let w of a.categories){let M=w.name,x=M?.split(" ").join("-").toLowerCase()??et(6),V=w.event_settings.color;if(V in tu)V=tu[V];else{V=V.split("-").join("");let B=createEl("canvas"),H=B.getContext("2d");H.fillStyle=V,V=H.fillStyle,B.detach()}S.set(x,{name:M,id:x,color:V})}if(a.events&&Array.isArray(a.events)&&a.events.length)for(let w of a.events){let M={day:null,year:null,month:null};if(w.data&&w.data.date&&Array.isArray(w.data?.date)&&w.data.date.length)M.day=w.data.date[2],M.month=w.data.date[1],M.year=w.data.date[0];else if(w.data&&w.data.conditions&&Array.isArray(w.data.conditions)){let V=w.data.conditions;try{let B=V.find(he=>he[0]==="Year"),H=V.find(he=>he[0]==="Month"),Y=V.find(he=>he[0]==="Day");B&&(M.year=Number(B[2][0])),H&&(M.month=Number(H[2][0])),Y&&(M.day=Number(Y[2][0]))}catch{}}let x;if(w.description){let V=createDiv();V.innerHTML=w.description,x=V.textContent}A.push({name:w.name,description:x,id:`${w.id}`,note:null,date:M,category:S.get(w.event_category_id)?.id??null})}let _=(0,$l.default)({count:S.size});for(let w of S.keys()){let M=S.get(w);M.color||(M.color=_.shift().hex(),S.set(w,M))}let F={name:r,description:null,static:k,current:C,events:A,id:et(6),categories:Array.from(S.values())};n.push(F)}return n}},tu={"Dark-Solid":"#000000",Red:"#9b2c2c",Pink:"#880E4F",Purple:"#4A148C","Deep-Purple":"#311B92",Blue:"#0D47A1","Light-Blue":"#0288D1",Cyan:"#006064",Teal:"#004D40",Green:"#2E7D32","Light-Green":"#7CB342",Lime:"#9e9d24",Yellow:"#FFEB3B",Orange:"#FF9100","Blue-Grey":"#455A64"};function X(){}var Lr=t=>t;function nu(t,e){for(let n in e)t[n]=e[n];return t}function Do(t){return t()}function au(){return Object.create(null)}function _e(t){t.forEach(Do)}function rt(t){return typeof t=="function"}function se(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ru(t){return Object.keys(t).length===0}function Pr(t,e,n,a){if(t){let r=iu(t,e,n,a);return t[0](r)}}function iu(t,e,n,a){return t[1]&&a?nu(n.ctx.slice(),t[1](a(e))):n.ctx}function jr(t,e,n,a){if(t[2]&&a){let r=t[2](a(n));if(e.dirty===void 0)return r;if(typeof r=="object"){let i=[],o=Math.max(e.dirty.length,r.length);for(let l=0;l<o;l+=1)i[l]=e.dirty[l]|r[l];return i}return e.dirty|r}return e.dirty}function Vr(t,e,n,a,r,i){if(r){let o=iu(e,n,a,i);t.p(o,r)}}function Hr(t){if(t.ctx.length>32){let e=[],n=t.ctx.length/32;for(let a=0;a<n;a++)e[a]=-1;return e}return-1}function _o(t){return t??""}function le(t){return t&&rt(t.destroy)?t.destroy:X}var ou=typeof window!="undefined",su=ou?()=>window.performance.now():()=>Date.now(),Eo=ou?t=>requestAnimationFrame(t):X;var pa=new Set;function lu(t){pa.forEach(e=>{e.c(t)||(pa.delete(e),e.f())}),pa.size!==0&&Eo(lu)}function uu(t){let e;return pa.size===0&&Eo(lu),{promise:new Promise(n=>{pa.add(e={c:t,f:n})}),abort(){pa.delete(e)}}}var cu=!1;function x2(){cu=!0}function F2(){cu=!1}function E(t,e){t.appendChild(e)}function be(t,e,n){let a=Co(t);if(!a.getElementById(e)){let r=T("style");r.id=e,r.textContent=n,du(a,r)}}function Co(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function T2(t){let e=T("style");return du(Co(t),e),e.sheet}function du(t,e){E(t.head||t,e)}function q(t,e,n){t.insertBefore(e,n||null)}function O(t){t.parentNode.removeChild(t)}function We(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function T(t){return document.createElement(t)}function an(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function me(t){return document.createTextNode(t)}function j(){return me(" ")}function Ue(){return me("")}function ie(t,e,n,a){return t.addEventListener(e,n,a),()=>t.removeEventListener(e,n,a)}function D(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function rn(t){return t===""?null:+t}function S2(t){return Array.from(t.childNodes)}function we(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function yt(t,e){t.value=e??""}function $e(t,e,n,a){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,a?"important":"")}function Vt(t,e){for(let n=0;n<t.options.length;n+=1){let a=t.options[n];if(a.__value===e){a.selected=!0;return}}t.selectedIndex=-1}function vn(t){let e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function pe(t,e,n){t.classList[n?"add":"remove"](e)}function fu(t,e,n=!1){let a=document.createEvent("CustomEvent");return a.initCustomEvent(t,n,!1,e),a}var Wr=new Map,Gr=0;function B2(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function M2(t,e){let n={stylesheet:T2(e),rules:{}};return Wr.set(t,n),n}function Ao(t,e,n,a,r,i,o,l=0){let s=16.666/a,d=`{
`;for(let p=0;p<=1;p+=s){let k=e+(n-e)*i(p);d+=p*100+`%{${o(k,1-k)}}
`}let u=d+`100% {${o(n,1-n)}}
}`,c=`__svelte_${B2(u)}_${l}`,h=Co(t),{stylesheet:y,rules:m}=Wr.get(h)||M2(h,t);m[c]||(m[c]=!0,y.insertRule(`@keyframes ${c} ${u}`,y.cssRules.length));let v=t.style.animation||"";return t.style.animation=`${v?`${v}, `:""}${c} ${a}ms linear ${r}ms 1 both`,Gr+=1,c}function hu(t,e){let n=(t.style.animation||"").split(", "),a=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),r=n.length-a.length;r&&(t.style.animation=a.join(", "),Gr-=r,Gr||N2())}function N2(){Eo(()=>{Gr||(Wr.forEach(t=>{let{stylesheet:e}=t,n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}}),Wr.clear())})}function ga(t,e,n,a){if(!e)return X;let r=t.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return X;let{delay:i=0,duration:o=300,easing:l=Lr,start:s=su()+i,end:d=s+o,tick:u=X,css:c}=n(t,{from:e,to:r},a),h=!0,y=!1,m;function v(){c&&(m=Ao(t,0,1,o,i,l,c)),i||(y=!0)}function p(){c&&hu(t,m),h=!1}return uu(k=>{if(!y&&k>=s&&(y=!0),y&&k>=d&&(u(1,0),p()),!h)return!1;if(y){let C=k-s,A=0+1*l(C/o);u(A,1-A)}return!0}),v(),u(0,1),p}function ya(t){let e=getComputedStyle(t);if(e.position!=="absolute"&&e.position!=="fixed"){let{width:n,height:a}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=a,I2(t,r)}}function I2(t,e){let n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){let a=getComputedStyle(t),r=a.transform==="none"?"":a.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}var Ya;function Za(t){Ya=t}function Ka(){if(!Ya)throw new Error("Function called outside component initialization");return Ya}function Un(t){Ka().$$.on_mount.push(t)}function ko(t){Ka().$$.on_destroy.push(t)}function Se(){let t=Ka();return(e,n)=>{let a=t.$$.callbacks[e];if(a){let r=fu(e,n);a.slice().forEach(i=>{i.call(t,r)})}}}function zn(t,e){Ka().$$.context.set(t,e)}function Xe(t){return Ka().$$.context.get(t)}function ue(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(a=>a.call(this,e))}var Qa=[];var va=[],Ur=[],mu=[],pu=Promise.resolve(),xo=!1;function gu(){xo||(xo=!0,pu.then(yu))}function Yn(){return gu(),pu}function It(t){Ur.push(t)}var Fo=new Set,zr=0;function yu(){let t=Ya;do{for(;zr<Qa.length;){let e=Qa[zr];zr++,Za(e),O2(e.$$)}for(Za(null),Qa.length=0,zr=0;va.length;)va.pop()();for(let e=0;e<Ur.length;e+=1){let n=Ur[e];Fo.has(n)||(Fo.add(n),n())}Ur.length=0}while(Qa.length);for(;mu.length;)mu.pop()();xo=!1,Fo.clear(),Za(t)}function O2(t){if(t.fragment!==null){t.update(),_e(t.before_update);let e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(It)}}var Xa;function q2(){return Xa||(Xa=Promise.resolve(),Xa.then(()=>{Xa=null})),Xa}function To(t,e,n){t.dispatchEvent(fu(`${e?"intro":"outro"}${n}`))}var Yr=new Set,bn;function Ee(){bn={r:0,c:[],p:bn}}function Ce(){bn.r||_e(bn.c),bn=bn.p}function R(t,e){t&&t.i&&(Yr.delete(t),t.i(e))}function W(t,e,n,a){if(t&&t.o){if(Yr.has(t))return;Yr.add(t),bn.c.push(()=>{Yr.delete(t),a&&(n&&t.d(1),a())}),t.o(e)}}var R2={duration:0};function So(t,e,n,a){let r=e(t,n),i=a?0:1,o=null,l=null,s=null;function d(){s&&hu(t,s)}function u(h,y){let m=h.b-i;return y*=Math.abs(m),{a:i,b:h.b,d:m,duration:y,start:h.start,end:h.start+y,group:h.group}}function c(h){let{delay:y=0,duration:m=300,easing:v=Lr,tick:p=X,css:k}=r||R2,C={start:su()+y,b:h};h||(C.group=bn,bn.r+=1),o||l?l=C:(k&&(d(),s=Ao(t,i,h,m,y,v,k)),h&&p(0,1),o=u(C,m),It(()=>To(t,h,"start")),uu(A=>{if(l&&A>l.start&&(o=u(l,m),l=null,To(t,o.b,"start"),k&&(d(),s=Ao(t,i,o.b,o.duration,0,v,r.css))),o){if(A>=o.end)p(i=o.b,1-i),To(t,o.b,"end"),l||(o.b?d():--o.group.r||_e(o.group.c)),o=null;else if(A>=o.start){let S=A-o.start;i=o.a+o.d*v(S/o.duration),p(i,1-i)}}return!!(o||l)}))}return{run(h){rt(r)?q2().then(()=>{r=r(),c(h)}):c(h)},end(){d(),o=l=null}}}var Zb=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function L2(t,e){t.d(1),e.delete(t.key)}function P2(t,e){W(t,1,1,()=>{e.delete(t.key)})}function Zr(t,e){t.f(),L2(t,e)}function vu(t,e){t.f(),P2(t,e)}function ba(t,e,n,a,r,i,o,l,s,d,u,c){let h=t.length,y=i.length,m=h,v={};for(;m--;)v[t[m].key]=m;let p=[],k=new Map,C=new Map;for(m=y;m--;){let F=c(r,i,m),w=n(F),M=o.get(w);M?a&&M.p(F,e):(M=d(w,F),M.c()),k.set(w,p[m]=M),w in v&&C.set(w,Math.abs(m-v[w]))}let A=new Set,S=new Set;function _(F){R(F,1),F.m(l,u),o.set(F.key,F),u=F.first,y--}for(;h&&y;){let F=p[y-1],w=t[h-1],M=F.key,x=w.key;F===w?(u=F.first,h--,y--):k.has(x)?!o.has(M)||A.has(M)?_(F):S.has(x)?h--:C.get(M)>C.get(x)?(S.add(M),_(F)):(A.add(x),h--):(s(w,o),h--)}for(;h--;){let F=t[h];k.has(F.key)||s(F,o)}for(;y;)_(p[y-1]);return p}var Kb=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function te(t){t&&t.c()}function ee(t,e,n,a){let{fragment:r,on_mount:i,on_destroy:o,after_update:l}=t.$$;r&&r.m(e,n),a||It(()=>{let s=i.map(Do).filter(rt);o?o.push(...s):_e(s),t.$$.on_mount=[]}),l.forEach(It)}function J(t,e){let n=t.$$;n.fragment!==null&&(_e(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function j2(t,e){t.$$.dirty[0]===-1&&(Qa.push(t),gu(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function fe(t,e,n,a,r,i,o,l=[-1]){let s=Ya;Za(t);let d=t.$$={fragment:null,ctx:null,props:i,update:X,not_equal:r,bound:au(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:au(),dirty:l,skip_bound:!1,root:e.target||s.$$.root};o&&o(d.root);let u=!1;if(d.ctx=n?n(t,e.props||{},(c,h,...y)=>{let m=y.length?y[0]:h;return d.ctx&&r(d.ctx[c],d.ctx[c]=m)&&(!d.skip_bound&&d.bound[c]&&d.bound[c](m),u&&j2(t,c)),h}):[],d.update(),u=!0,_e(d.before_update),d.fragment=a?a(d.ctx):!1,e.target){if(e.hydrate){x2();let c=S2(e.target);d.fragment&&d.fragment.l(c),c.forEach(O)}else d.fragment&&d.fragment.c();e.intro&&R(t.$$.fragment),ee(t,e.target,e.anchor,e.customElement),F2(),yu()}Za(s)}var V2;typeof HTMLElement=="function"&&(V2=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(Do).filter(rt);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){_e(this.$$.on_disconnect)}$destroy(){J(this,1),this.$destroy=X}$on(t,e){let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let a=n.indexOf(e);a!==-1&&n.splice(a,1)}}$set(t){this.$$set&&!ru(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var de=class{$destroy(){J(this,1),this.$destroy=X}$on(e,n){let a=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return a.push(n),()=>{let r=a.indexOf(n);r!==-1&&a.splice(r,1)}}$set(e){this.$$set&&!ru(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Df=xe(Vn()),kn=xe(require("obsidian"));var wu=xe(Vn()),Zn=xe(require("obsidian"));var bu=[{name:"Gregorian Calendar",description:"A calendar for the real world.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!0,displayMoons:!0,firstWeekDay:1,overflow:!0,weekdays:[{type:"day",name:"Sunday",id:"ID_19ea684b4a08"},{type:"day",name:"Monday",id:"ID_2928b90ab949"},{type:"day",name:"Tuesday",id:"ID_0ad9a8f9e95b"},{type:"day",name:"Wednesday",id:"ID_195a4b290bc9"},{type:"day",name:"Thursday",id:"ID_abe8c89b0999"},{type:"day",name:"Friday",id:"ID_2b5b8a79fa4a"},{type:"day",name:"Saturday",id:"ID_1a78cb79c8cb"}],months:[{name:"January",type:"month",length:31,id:"ID_e9997a780b3a"},{name:"February",type:"month",length:28,id:"ID_b8c9ebeb0b89"},{name:"March",type:"month",length:31,id:"ID_b83bda2b9be8"},{name:"April",type:"month",length:30,id:"ID_29baea7b28ab"},{name:"May",type:"month",length:31,id:"ID_6a3899fad909"},{name:"June",type:"month",length:30,id:"ID_384aeb1afa8a"},{name:"July",type:"month",length:31,id:"ID_48b8cba87b8a"},{name:"August",type:"month",length:31,id:"ID_fa0b1a6bab8a"},{name:"September",type:"month",length:30,id:"ID_da880b8af849"},{name:"October",type:"month",length:31,id:"ID_babba8186968"},{name:"November",type:"month",length:30,id:"ID_da582bfaf9b9"},{name:"December",type:"month",length:31,id:"ID_ba1bab4a3a28"}],moons:[{name:"Moon",cycle:29.530588853,offset:9.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a9ab186b1819"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_b91ad86a887a"}],eras:[{name:"Before Christ",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-1,month:0,day:31}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}}],offset:0},current:{year:null,day:null,month:null},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824599",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824600",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824601",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824602",note:null,date:{day:null,year:null,month:null},category:null},{name:"Christmas",description:"Christmas is a Christian holiday celebrating the birth of Christ. Due to a combination of marketability and long lasting traditions it is popular even among many non-Christians, especially in countries that have a strong Christian tradition.",id:"824603",note:null,date:{day:25,year:null,month:11},category:"christian-holidays"},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824604",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter",description:"Easter is considered the most important feast for Christians, celebrating the resurrection of Christ. It is classed as a moveable feast occurring on the first full moon after the spring equinox, which is considered to be fixed at March 21st for the sake of computing the date.",id:"824605",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter Monday",description:"The Monday following the Easter Sunday is often considered part of the Easter Celebration and is a day off in many countries with a strong Christian tradition.",id:"824606",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Good Friday",description:"Good Friday is the Friday preceding Easter. It comemmorates the crucifixion of Christ according to the Bible.",id:"824607",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Pentecost",description:"Celebrated exactly 50 days after Easter, Pentecost is the celebration of the Holy Spirit appearing before the Apostles as described in the Bible.",id:"824608",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"New Year's Day",description:"New Year's Day marks the start of a new year on the Gregorian Calendar. It starts when the clock strikes midnight and is often celebrated with fireworks, champagne and kissing.",id:"824609",note:null,date:{day:1,year:null,month:0},category:"secular-holidays"},{name:"Valentine's Day",description:"Valentine's day is a celebration of love and romance that is popular across the world. Many more cynically minded people mostly consider it an attempt to monetize the expectation of romantic gestures on the holiday through gift cards, flowers, chocolate and dates.",id:"824610",note:null,date:{day:14,year:null,month:1},category:"secular-holidays"},{name:"Halloween",description:'Halloween is holiday popular in the US, Canada and Ireland that has gradually been adopted by more and more countries. It is often celebrated by people dressing up, usually as something scary. Children will often go from door to door shouting "trick or treat" in the hopes of receiving candy, while adults tend to go to parties.',id:"824611",note:null,date:{day:31,year:null,month:9},category:"secular-holidays"},{name:"Work on the first version of this calendar started.",description:"Aecius started work on the first version Gregorian Calendar for Fantasy Calendar on this day.",id:"824612",note:null,date:{day:23,year:2019,month:5},category:"miscellaneous-events"},{name:"Work on this version of the Gregorian Calendar started.",description:"On this day, Aecius started to rework the Gregorian Calendar from scratch to make it work with the updates Wasp and Alex implemented since the summer of 2019.",id:"824613",note:null,date:{day:21,year:2020,month:0},category:"miscellaneous-events"},{name:"Introduction of the Gregorian Calendar",description:"On this day in 1582 the Gregorian calendar was officially introduced, following Thursday October 4th on the Julian Calendar",id:"824614",note:null,date:{day:15,year:1582,month:9},category:"historical-events"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Christian Holidays",id:"christian-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Greyhawk",description:"Calendar of the world of Greyhawk.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!1,displayMoons:!0,firstWeekDay:0,overflow:!1,weekdays:[{type:"day",name:"Starday",id:"ID_a8e979984938"},{type:"day",name:"Sunday",id:"ID_1b68bb78ca1b"},{type:"day",name:"Moonday",id:"ID_c8b86aea0998"},{type:"day",name:"Godsday",id:"ID_b8097a18e95b"},{type:"day",name:"Waterday",id:"ID_1918c99949ca"},{type:"day",name:"Earthday",id:"ID_fa295a1bab89"},{type:"day",name:"Freeday",id:"ID_6a485ada3ae8"}],months:[{name:"Needfest",type:"month",length:7,id:"ID_b8a9e9da8a48"},{name:"Fireseek",type:"month",length:28,id:"ID_39b90bd8189a"},{name:"Readying",type:"month",length:28,id:"ID_48a9081ad839"},{name:"Coldeven",type:"month",length:28,id:"ID_5a7b6beadb68"},{name:"Growfest",type:"month",length:7,id:"ID_48c8d82b1908"},{name:"Planting",type:"month",length:28,id:"ID_081a793a49da"},{name:"Flocktime",type:"month",length:28,id:"ID_eb68a89a0a2a"},{name:"Wealsun",type:"month",length:28,id:"ID_9b3a098ae908"},{name:"Richfest",type:"month",length:7,id:"ID_f99b4b3a08b8"},{name:"Reaping",type:"month",length:28,id:"ID_ebe9eb68ea39"},{name:"Goodmonth",type:"month",length:28,id:"ID_fb3b6af9895b"},{name:"Harvester",type:"month",length:28,id:"ID_395bcb399b8a"},{name:"Brewfest",type:"month",length:7,id:"ID_e8b908181afa"},{name:"Patchwall",type:"month",length:28,id:"ID_cbda3b399969"},{name:"Ready'reat",type:"month",length:28,id:"ID_592a2a690bf8"},{name:"Sunsebb",type:"month",length:28,id:"ID_39e8faf8e9b8"}],moons:[{name:"Luna",cycle:28,offset:3,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_f8997b39b8b8"},{name:"Celene",cycle:91,offset:46,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_7afbb9b88be8"}],leapDays:[],eras:[{name:"Common Year",description:"",format:"Year {{year}} CY",start:{year:1,month:0,day:1}}]},current:{year:591,day:1,month:0},events:[{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824573",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:`The 4th of Growfest is the first day of Low Summer in Oerth's Calendar. This is the point where the sun crosses Oerth's equator. Holidays celebrated on this date include Saint Cuthbert's Day, the Feast of Edoira, the Spring Feast, and Raxivort's Orgy. This is also the day on which the priests of Tlaloc ritually sacrifice and eat the flesh of human children or babies in their patron's honor. Worshippers of Rillifane Rallathil celebrate the Budding on this day, a joyful celebration of new life celebrated through dance and song in oak groves in the heart of the forest. A ritual hunt of a noble heart is held on this day, after which the venison is eaten in celebration of Rillifane's bounty.
Also celebrated on this date is the Sanctification of Renewal, a sacred holiday to the followers of Garyx.`,id:"824574",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824575",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The 4th of Brewfest is the Autumnal Equinox, when the sun crosses the equator from north to south. This date is the official end of high summer and the beginning of autumn on the Greyhawk Calendar. This date is holy to Wenta and is sometimes regarded as an unofficial holy day of Velnius. Among the xvarts, it also marks the celebration of Raxivort's Orgy. The worshippers of Rillifane Rallathil celebrate the Transformation on this day, a time of dancing and spiritual rebirth marking the beginning of autumn and the promise that spring will come again.",id:"824576",note:null,date:{day:null,year:null,month:null},category:null},{name:"Great Moons Glory",description:"The night of Great Moon's Glory on Readying 11th, when Luna is full but Celene is new. It is holy to Celestian, and a time when offerings are left to Atroa to beg her to come early and to Telchur to request that he peacefully leave. Druids of the Old Faith are known to also hold this night as auspicious, but few outside their circles know the details.",id:"824577",note:null,date:{day:null,year:null,month:null},category:null},{name:"Dark Night",description:`Dark Night, also called Black Night, Star Night, and the Night of Hopeful Dawn, is observed on Goodmonth 11. It is a holy night for the church of Celestian because the stars are so easy to observe without the light of one of the moons getting in the way.
It is also a holy night for the church of Rao, who refer to it as the Night of Hopeful Judgment. They believe that Rao chooses this time to separate the sinful from the righteous in the afterworld. There is also a prophecy in the Raoan holy text, the Book of Incarum, that claims that Rao will cleanse the world of evil on this night, sometime in the future.
The priesthood of Kurell consider it holy, too, calling it Kurell's Night, requiring the faithful to undertake special missions on this night to prove their cleverness and skill. Kurell smiles particularly on acts of theft or vengeance performed on his holy night, blessing those who do so successfully. Donations to Kurell's church are encouraged afterwards, for Kurell may take vengeance against those who do not properly thank him for his aid.
Most other people regard Dark Night as a time of ill omen, fearing it as much as the night of the Blood Moon Festival. Bonfires are burned from dusk till dawn, particularly in small villages and in Elmshire and Narwell. Orc and goblin religions view it as an excellent night for raiding settlements. Certain evil cults perform kidnappings, murders, and vile rites during this period. On the other hand, lycanthropic activity is at its lowest.
Iggwilv and Tuerny attempted to summon a demonic army to Luna on this night in 585 CY.`,id:"824578",note:null,date:{day:null,year:null,month:null},category:null},{name:"Agelong",description:`Agelong, observed on the 4th of Richfest (the Summer Solstice), is the celebration of the legendary creation of the elves. According to myth, after Corellon Larethian spilled his blood during the battle with Gruumsh, the rest of the Seldarine gathered this sacred blood and mingled it with the tears shed during the same battle by Sehanine Moonbow. The Seldarine then infused these divine fluids into vessels they had created to be the bodies of the elven race.
This day is, among the elves, mostly an excuse to go orc-hunting. Elven warriors cut themselves with daggers carved from volcanic glass to remind themselves of Corellon's own wound from Gruumsh's spear, then strive to slaughter as many orcs as possible during the night.`,id:"824579",note:null,date:{day:4,year:null,month:8},category:null},{name:"Blood Moon Festival",description:`The Blood Moon Festival is celebrated on Coldeven 11, the night when Luna is full just before the Spring Equinox. On this night, curses are said to be twice as powerful and the forces of evil are at their strongest. Fiends roam the lands, and human sacrifice is common. This night is held especially sacred by cultists of Nerull, but worshipers of Kurell also mark this night as especially auspicious for acts of vengeance. Goodly folk superstitiously guard their homes with horseshoes, holy water, bottles of milk, and iron filings.
Demonic forces sent by Iuz destroyed the leadership of the Horned Society during the Blood Moon Festival of 583 CY.
It's possible that this is also the night the elves celebrate as Faerieluck.`,id:"824580",note:null,date:{day:11,year:null,month:3},category:null},{name:"Breadgiving Day",description:`Celebrated on on the Winter Solstice (Needfest 4), Breadgiving Day, is a day of charity observed in the Free City of Greyhawk by the faiths of Pelor, Rao, and Saint Cuthbert.
This was not originally a religious holiday as such. It is a new practice that began after the Greyhawk Wars to feed the refugees that flooded the city during that time. Since of Old City who line up by the hundreds along the Processional from the Black Gate. The booths are worked by low-ranking priests from all three religions, with armed priests of St. Cuthbert providing security. A smaller event is held simultaneously below Wharfgate in Greyhawk City's Shacktown.
The clergies of Heironeous, Pholtus, and Trithereon do not participate, but they compete with one another to perform good deeds the whole week of Needfest. The rivalries between Trithereon and Pholtus, Trithereon and Heironeous, and Pholtus and St. Cuthbert are such that the faiths sometimes fall into arguments and even blows if their "good deeds" conflict with each other. Greyhawk's rowdy citizens often cheer and place bets on the outcomes of these quarrels.
The priests of Pelor hold a morning ceremony on this day with a sermon, singing, and music.`,id:"824581",note:null,date:{day:4,year:null,month:0},category:null},{name:"Brewfest",description:`Also called Drunken Days or the Feast of Brewers, Brewfest, the fourth festival week of Oerth's calendar, is a rowdy period unsurprisingly claimed as a holy time by the churches of Olidammara and Wenta. The Free City of Greyhawk does not celebrate the entire week, but Brewfest 1 and Brewfest 7 are both set aside as public holidays. In Elmshire, the week is spent in restful, carefree music, drinking, and dancing. In Hardby it is spent with fistfights, riots, and ensuing hangovers. In Narwell it is celebrated with ale-brewing contests, horse races, beatings, and robbery. In Safeton it is celebrated with nervous violence and nightly orc hunts. The week is also sacred to the Old Faith.
The elves call this week Fallrite, and use it to contemplate the spirits of their ancestors, the passage to the afterworld, and the fragility of life. They believe other races make merry during Brewfest because they are "hiding" to avoid facing death's reality. In contrast, the olvenfolk strive to fulfill the most important of their duties and reach the most crucial of their decisions during this time of year. The elven kings and queens traditionally judge capital cases during Fallrite.`,id:"824582",note:null,date:{day:4,year:null,month:12},category:null},{name:"Faerieluck",description:"Faerieluck is a holiday celebrated by the elves in early spring, when the power of Faerie runs high and they celebrate with their fey cousins: the sprites, buckawns, pixies, nymphs and so forth. The point of the festival is to remind the elves of their ancient kinship with these creatures. The day is spent playing practical jokes, engaging in battles of wit, and general merriment.",id:"824583",note:null,date:{day:11,year:null,month:2},category:null},{name:"Feast of Edoira",description:`The Feast of Edoira is a holiday celebrated in the Domain of Greyhawk on Growfest 4, during the Spring Equinox. It is named after Edoira, a priest of Rao who centuries ago established the Edoiran Compact, a pact by which many of the lawful good-aligned faiths and people of the Domain could agree to cooperate. The Compact was later extended to non-lawful good and neutral faiths.
Edoira was never deified but was revered by many good faiths in the Domain. The holiday was marked by religious services on Godsday of Growfest led by the clerics of the good faiths who partook of the Compact, and secular festivals by the ordinary citizenry. Observance of the holiday has declined over the years, though the clergies of Rao and Pelor still hold their traditional interfaith services, with occasional participation by the priesthoods of Heironeous and Mayaheine. Since the end of the Greyhawk Wars most of the Domain's outlying communities no longer observe the holiday. Only one church in Safeton still does so.`,id:"824584",note:null,date:{day:4,year:null,month:4},category:null},{name:"Desportium of Magic",description:`The highlight of Growfest is the Desportium of Magic. During this day torchlight only, no magic illumination is supposed to be used. Wizards and Sorcerers then perform feats of illusion and magic trying to outdo one another with their displays. Usually there is a panel of judges to decide, in the larger cities there is usually a limit of 5-person teams competing. Each performance during the Desportium of Magic uses a long established theme, that of an attack on the town by various monsters and Dark Elves, repelled by brave warriors and spellcasters. The displays, made up of any number of spells cast without the use of magic devices, cannot actually cause any harm to property or people, but must be as wonderful, striking, detailed, and lifelike as possible.
This motif is based on actual attacks through the years from the Uttermost War to the most recent Great Slave Raids. The idea is to make the attackers as dreadful as possible and the defenders as heroic as possible, secondary is to make sure that people will always remember the terror of the Uttermost War. In large cities like the CSIO and CSWE and Tarantis, these performances last all night and are amazing to watch. In smaller villages without spellcasters, puppet plays are often done in its stead.`,id:"824585",note:null,date:{day:7,year:null,month:4},category:null},{name:"Holy Day of Pelor",description:`The Holy Day of Pelor, also known as Giving Day and Midsummer's Day, is celebrated on the Summer Solstice.
Because Pelor is widely loved by the commoners, this day is set aside as a day of rest in the Free City of Greyhawk. Only essential work is done on this day. Many merchants close their shops on Giving Day as well out of respect for the Sun Father and his teachings. Gambling houses are closed, but not hostelries, for Giving Day is a day of feasting and goodwill, a time for enjoying the fruits of the Oerth.
Public services are held from dawn until noon by Pelor's priests, outdoors if the weather permits (which if almost always does, as the clerics use weather-controlling magic for maximum sunlight). Even Greyhawk City's large temple of Pelor is not big enough to hold the throngs who come to celebrate on this day, so throngs of the faithful fill the temple grounds in the Garden Quarter, spilling out from the Millstream to the Nobles' Wall, and to the road leading toward Greyhawk's Grand Theater. Many come, of course, for the free meal the priests provide after the service. The Pelorian priests are well aware of this, but believe that for the needy, a full stomach must come before wisdom and learning. Members of Greyhawk's Guild of Thieves and Beggar's Union, many of whom remember Midsummer's Day fondly from their orphaned childhoods, both protect priests of Pelor on this day, and woe onto those who attempt to test them on this matter.
Priests of Pelor, bedecked in yellow and gold, parade about the streets, demanding donations for their charitable works, freely using guilt to squeeze more from stingy purses. Free healings are given out, particularly to children. Most Greyhawkers wear at least one item of yellow cloth on this day out of respect.
Some crusading Pelorians crusade against evil lycanthropes on this night, since both Celene and Luna are full.`,id:"824586",note:null,date:{day:4,year:null,month:8},category:null},{name:"Holy Day of Serenity",description:"The Holy Day of Serenity, on Reaping 10, is celebrated in Veluna as a holy day of Rao, though it's actually the anniversary of Veluna's secession from Furyondy in 476 CY. It is celebrated with religious singing and worship.",id:"824587",note:null,date:{day:10,year:null,month:9},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#FFEB3B"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Magical Events",id:"magical-events",color:"#311B92"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Golarion",description:"Calendar for the world of Pathfinder.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Moonday",id:"ID_db8af8f85b8a"},{type:"day",name:"Toilday",id:"ID_f87a094b2849"},{type:"day",name:"Wealday",id:"ID_2a5bb88b3ae8"},{type:"day",name:"Oathday",id:"ID_c93a0be8981b"},{type:"day",name:"Fireday",id:"ID_2b7b59794a0b"},{type:"day",name:"Starday",id:"ID_baaa6a89ca1b"},{type:"day",name:"Sunday",id:"ID_f9baca088b28"}],months:[{name:"Abadius",type:"month",length:31,id:"ID_dad9da89f818"},{name:"Calistril",type:"month",length:28,id:"ID_980a88cb9b68"},{name:"Pharast",type:"month",length:31,id:"ID_a9c96ac80908"},{name:"Gozran",type:"month",length:30,id:"ID_a99a697b9abb"},{name:"Desnus",type:"month",length:31,id:"ID_8bcad9a8f84a"},{name:"Sarenith",type:"month",length:30,id:"ID_484a49a998db"},{name:"Erastus",type:"month",length:31,id:"ID_9a48e9b96938"},{name:"Arodus",type:"month",length:31,id:"ID_bbe99b2afaea"},{name:"Rova",type:"month",length:30,id:"ID_ba39fbe8c8b8"},{name:"Lamashan",type:"month",length:31,id:"ID_69d93ba9dba8"},{name:"Neth",type:"month",length:30,id:"ID_4ad8fb79eb6a"},{name:"Kuthona",type:"month",length:31,id:"ID_9a3a8b388939"}],moons:[{name:"Somal",cycle:29.5,offset:9.5,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_b87ab959cac9"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:8}],offset:0,timespan:1,intercalary:!1,id:"ID_88c8da3b8b2b"}],eras:[{name:"Age of Serpents",description:"",format:"Year {{year}} - {{era_name}}",start:{year:4720,month:8,day:15}},{name:"Age of Darkness",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-5300,month:0,day:1}},{name:"Age of Anguish",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-4500,month:8,day:1}},{name:"Age of Destiny",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-3500,month:8,day:1}},{name:"Age of Enthronement",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:1,month:8,day:1}},{name:"Age of Lost Omens",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:4606,month:8,day:1}}]},current:{year:4720,day:15,month:0},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824492",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824493",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824494",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824495",note:null,date:{day:null,year:null,month:null},category:null},{name:"Eternal Kiss",description:`Zon-Kuthon
Culminating on the first new moon of the new year, the Eternal Kiss is an 11 day ceremony honoring Zon-Kuthon. On the final day, a living sacrifice is made to the Dark Prince, after the victim is pampered and pleasured for the ten days prior. The sacrifice can either be an enemy or a great devotee of the church, and is kept alive for as long as possible during the torture using magic. This holiday often involves fortune-telling as a part of the torture, using the victim's entrails or their cries of pain to determine the Midnight Lord's will. Occasionally it is believed that the sacrifice will prophesy with the voice of Zon-Kuthon himself.`,id:"824496",note:null,date:{day:null,year:null,month:null},category:null},{name:"Longnight",description:"Longnight is a holiday celebrated on the full moon in the winter month of Abadius. During the festival, revelers stay up all night to greet the dawn to defy the long winter months. It is even celebrated in Irrisen, where there are no natural seasons.",id:"824497",note:null,date:{day:null,year:null,month:0},category:null},{name:"Foundation Day",description:`Absalom, Milani
Foundation Day is a civil holiday celebrated on the New Year (1 Abadius) in Absalom to commemorate the city's founding by the god Aroden in 1 AR.`,id:"824498",note:null,date:{day:1,year:null,month:0},category:null},{name:"Pjallarane Day",description:`Irrisen
Pjallarane Day is an ancient holiday in Irrisen celebrated on 1 Abadius (New Year's Day). Every 100 years, Baba Yaga returns to Golarion to remove her daughter from the throne of Irrisen, and put another daughter on the throne instead. In 3713 AR the third Queen of Irrisen, Pjallarane, and her children chose to resist. Baba Yaga ruthlessly crushed the rebellion in a single day, which is now celebrated as a holiday. The festival includes feasting and the burning of effigies of tar and straw. This is a reminder of the fate of Pjallarane's followers, who were burned alive as a warning to all those who would oppose Baba Yaga.`,id:"824499",note:null,date:{day:1,year:null,month:0},category:null},{name:"Vault Day",description:`Abadar
Vault Day is a holiday held on 6 Abadius in honor of Abadar, Master of the First Vault.`,id:"824500",note:null,date:{day:6,year:null,month:0},category:null},{name:"Ruby Prince's Birthday",description:`Osirion
The Ruby Prince's Birthday is a national holiday in Osirion in honor of the birthday of Khemet III, the Ruby Prince. It is celebrated annually on the 20 Abadius.`,id:"824501",note:null,date:{day:20,year:null,month:0},category:null},{name:"Merrymead",description:`Druma, Cayden Cailean
A holiday occurring on 2 Calistril, Merrymead was started in Druma and is supposed to be a time to share of the last of the previous year's mead with the rest of the community.
In current times, most people just use it as an excuse to drink excessively. The poor travel from bar to bar drinking whatever alcohol they can afford, while the wealthy will set aside specific vintages for this day. A known consequence of this day are 'mead riots' that happen when there are more celebrants than there is alcohol to serve them. This leads to a violent, destructive group of people in a crowded bar. If this is a common occurrence for particular cities, they may reinforce their guard force for the inevitably eventful night.`,id:"824502",note:null,date:{day:2,year:null,month:1},category:null},{name:"King Eodred II's Birthday",description:`Korvosa
King Eodred II's Birthday was a local holiday in the Varisian city-state of Korvosa and was celebrated on 16 Calistril. It commemorated the birthday of its former ruler, King Eodred Arabasti II, who decreed that on the day, scantily clad women would dance and serve free wine to celebrants.`,id:"824503",note:null,date:{day:16,year:null,month:1},category:null},{name:"Loyalty Day",description:`Cheliax, Asmodeus
Loyalty Day is a holiday in the nation of Cheliax commemorating the date on Calistril 19, 4640 AR when House Thrune signed the Treaty of Egorian, declaring it the victor in the Chelish Civil War and ruler of the empire. Because of House Thrune's well-known ties to the infernal, this holiday is also observed by the Church of Asmodeus who consider it a feast day. The church along with local governments provide a free meal to all citizens to remind them of the benefits House Thrune provides them with.`,id:"824504",note:null,date:{day:19,year:null,month:1},category:null},{name:"Fateless Day",description:`Mahathallah
Followers of Mahathallah mark each leap day as Fateless Day, when the River of Souls temporarily stops and souls can escape Pharasma's judgment. They perform many sacrificial and suicidal rituals on Fateless Day.`,id:"824505",note:null,date:{day:29,year:null,month:1},category:null},{name:"Golemwalk Parade",description:`Magnimar, Varisia
The Golemwalk Parade is a parade of golems created by amateurs hoping to win a monetary grant, or even a job, from the Golemworks in Magnimar. At the end of the parade along the Avenue of Honors, the constructs are judged.`,id:"824506",note:null,date:{day:null,year:null,month:2},category:null},{name:"Day of Bones",description:`Pharasma
Priests and worshipers of the Lady of Graves parade the bodies of the recently dead on this holiday, holding free burials afterwards.`,id:"824507",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sable Company Founding Day",description:`Korvosa
Sable Company Founding Day is a holiday marking the founding of the Sable Company of the Varisian city-state of Korvosa. Celebrated on 6 Pharast, the day is marked by somber military parades that generally preclude the consumption of alcohol, a staple on most other holidays.`,id:"824508",note:null,date:{day:6,year:null,month:2},category:null},{name:"Night of Tears",description:`Solku
The Night of Tears held annually on 7 Pharast in the Katapeshi town of Solku. It is a solemn vigil commemorating those lost in the Battle of Red Hail in 4701 AR.`,id:"824509",note:null,date:{day:7,year:null,month:2},category:null},{name:"Kaliashahrim",description:`Qadira
Kaliashahrim is a national holiday celebrated on Pharast 13 in Qadira that celebrates the Padishah Emperor of distant Katheer, and Qadira's loyalty to him.`,id:"824510",note:null,date:{day:13,year:null,month:2},category:null},{name:"Conquest Day",description:`Nex
Every year, on the 26th of Pharast, Elder Architect Oblosk \u2014 oldest member of Nex's Council of Three and Nine \u2014 ascends to the highest balconies of the Bandeshar in Quantium. In a voice made thunderous by the platform's magic, the wizened pech councilman spends the hours from dusk to just past noon enumerating the atrocities committed by the necromancers of Geb upon the people of Nex, culminating with the disappearance of the archwizard Nex himself. At the conclusion of this record of national wounds, the country's eleven other council members join Oblosk in renewing their yearly vow to neither forget nor forgive the Gebbites' atrocities and to again swear in their lost ruler's name to endlessly wage war against their ancient enemies.
On this day, known as Conquest Day, all the people of Nex are expected to share in their leaders' oaths, to celebrate the shared patriotism of their wondrous nation, and to remember the sacrifices of heroes past. This also makes it a day for many Nexian wizards to reveal deadly new spells, gigantic constructs, and audacious arcane masterworks\u2014which many creators promise to be the doom of their foes. Even throughout the rest of the Inner Sea region, many crusaders, rebels, and zealots observe Conquest Day as a day to renew blood oaths, launch long-planned battles, and finally take revenge. It is a day for words of honor, a day for battle cries, and a day where glory most favors the bold.`,id:"824511",note:null,date:{day:26,year:null,month:2},category:null},{name:"Days of Wrath",description:`Asmodeus, Cheliax
The Days of Wrath, or Dies Irae, are a holiday celebrated on both solstices and equinoxes in the nation of Cheliax and wherever Asmodeus is worshiped. They are primarily a national holiday and not truly a religious one, but the two are often confused due to Cheliax's current political climate. Various contests and blood sports are held on these days, promoting those elites who can clearly demonstrate their superiority over others. Some believe that these competitions are watched and judged by devils themselves. In the parts of the world where the Prince of Darkness is not openly venerated, these holidays take on a different tone: they are used to settle old grievances and also to end contracts.
In these days, bloodsports are organized into cities' stadiums. Slaves and servants of any master may choose to enter the arena for one-on-one bloody battles to the death. Free men and women of all classes are free to enter the arena as well. The entrants fight in rounds until at last one stands alone. The winner is granted freedom from slavery or servitude, erasure of all debts, and a purse of gold.
The winter solstice sees the culmination of the Dies Irae, with all the winners of the three previous bouts summoned to Egorian to fight to the death for the amusement of the nobles. The winner is given a title of baronet and a plot of land.`,id:"824512",note:null,date:{day:null,year:null,month:null},category:null},{name:"Firstbloom",description:`Gozreh
Firstbloom is a holiday celebrating the first planting of the agricultural season, and generally associated with the weather god Gozreh. It falls on the vernal equinox. Many farming communities see it as the beginning of the year, even though conventional calendars begin two months earlier. Despite weariness after a full day planting, many farming communities hold celebrations come the night: feasting, dancing and courtship feature showing the cycle of nature.`,id:"824513",note:null,date:{day:null,year:null,month:null},category:null},{name:"First Cut",description:`Falcon's Hollow
The First Cut celebration in Falcon's Hollow used to mark the start of the work in the woods each spring. Now, however, it is a meaningless ramshackle ceremony as Thuldrin Kreed forces the lumber crews to work through even during the coldest months in the winter. Still, First Cut brings people out to celebrate the start of the spring.`,id:"824514",note:null,date:{day:null,year:null,month:null},category:null},{name:"Currentseve",description:`Gozreh
On this religious holiday, all who travel on the water make offerings to Gozreh in the hopes of safe passage for the coming year.`,id:"824515",note:null,date:{day:7,year:null,month:3},category:null},{name:"Taxfest",description:`Abadar
No one enjoys paying taxes but the collection of fair taxes is considered an integral part of the maintenance of society, and is therefore holy to the god Abadar. Every year on the 15th of Gozran, priests of the church of Abadar spend the day walking city streets, doing what they can to make the bitter pill of annual taxes a bit easier to swallow.
The Business of the Day
From dawn to dusk, clerics of Abadar attend the tax collectors of sizeable communities as the tax wagons roll from door to door. The church officials monitor these activities to make sure that the process is conducted respectfully and justly, and that citizens know that the process is monitored. More than just aiding in the yearly errand, the faithful personally thank every citizen for contributing to the improvement of their city, extol the public works funded by their contributions, and foretell the grandeur of civic projects to come. The disenfranchised and destitute they attempt to comfort as best they can, quoting from their god's dogma on work and worthiness, but this is not a day for discounts or deferrals. The citizens are able to voice their concerns and ideas as to where the monies levied should best be applied. Citizens are free to speak their mind on any issue here without fear of repercussion.
The Celebrations of the Day
At dusk, the Abadarans host several celebrations in parks, plazas, and other communal areas about the city, organizing donations and contributions from local vendors to feed and entertain all-comers. Having already preached to most of the city over the course of the day, the clerics perform only a brief opening ceremony, dedicating the feast to Abadar, the city, and its great people. These celebrations are often quite distinct from neighbourhood to neighbourhood and are almost always divided along economic boundaries.
The festivities involving the wealthiest citizens usually happen on the steps of city hall or other grand civic buildings and feature the best music and food, but often little more than polite card and guessing games. These galas usually wrap up by midnight.
For the common folk, the parks and marketplaces take on a carnival atmosphere, with simple but good food, local ales, performances by talented citizens, and games of chance going on well into the night. A prevailing superstition through these festivals is that, during the celebration, it is lucky to kiss\u2014or in some regions, pinch\u2014a cleric of Abadar, leading to many a rosy-cheeked cleric.
Even the city's poor are given reason to celebrate, as the local temple of Abadar hosts a cheery but unabashedly religious gathering on its steps, feeding all comers, doling out a hearty ration of wine, singing hymns of the faith, and providing tokens for a second wine ration for any who return to attend a service within the month.
For a holiday that revolves around paying taxes, this Abadaran festival is not as reviled as one might expect.`,id:"824516",note:null,date:{day:15,year:null,month:3},category:null},{name:"Wrights of Augustana",description:`Andoran, Brigh
This local festival in the Andoran port city of Augustana is held to honor and celebrate the local shipbuilding industry as well as the navy. The mathematics and engineering required for the building of the ships is praised by Brigh's faithful.`,id:"824517",note:null,date:{day:16,year:null,month:3},category:null},{name:"Gala of Sails",description:`Absalom
One of two local festivals where kite-battlers compete.`,id:"824518",note:null,date:{day:27,year:null,month:3},category:null},{name:"Remembrance Moon",description:`Iomedae, Lastwall, Ustalav
A national holiday to commemorate those who died in the Shining Crusade against the Whispering Tyrant. Although not strictly a religious holiday, Iomedae's name is heavily invoked, due to her many military accomplishments during the war.`,id:"824519",note:null,date:{day:null,year:null,month:4},category:null},{name:"Angel Day",description:`Magnimar, Varisia
Angel Day is a local Magnimarian holiday celebrated on 31 Desnus. The annual celebration marks the founding of the city, and its founders' flight from Korvosa. It also honors the presence and popular worship of the empyreal lords, which predates the city by centuries. During the festival, nearly all local businesses shut their doors and the citizens take part in countless feasts, masquerade balls dressed as angels, and the burning of devil effigies meant to symbolize infernally-influenced Korvosa.`,id:"824520",note:null,date:{day:31,year:null,month:4},category:null},{name:"Old-Mage Day",description:"Holiday celebrating Old-Mage Jatembe, the father of Garundi magic.",id:"824521",note:null,date:{day:13,year:null,month:4},category:null},{name:"Multiple Events",description:`Festival of the Ruling Sun
Shizuru
Celebrates the longest day.
Founder's FollyUlar Kel
Adventurers and children follow a hallucinatory red stripe along zigzagging paths, amusing residents.
Harvest Bounty Festival
Segada
Marking the beginning of the harvest season, this festival involves sporting tournaments, dancing, storytelling, and feasts. Celebrants give thanks and eliminate grudges.
Longwalk
Grandmother Spider, Nurvatchta; southern hemisphere winter solstice
Celebrates the escape of Nurvatchta's anadi people from bondage, in part thanks to Grandmother Spider lengthening their cover of darkness in their escape.
Ritual of Stardust
Desna
Festival held in the evening and through the night, where Desna's faithful sing songs and throw sand and powdered gems into bonfires.
Runefeast
Magrim
Day marking the day dwarves learnt the first runes and the proper way to pray.
Sunwrought FestivalSarenrae, Brigh
Day commemorating the defeat of Rovagug by Sarenrae, celebrated with the flying of kites, fireworks, and gift giving.`,id:"824522",note:null,date:{day:null,year:null,month:null},category:null},{name:"Burning Blades",description:`Sarenrae
The holy, month-long festival ends on this day, featuring dances with flaming blades.`,id:"824523",note:null,date:{day:10,year:null,month:5},category:null},{name:"Liberty Day",description:`Andoran, Milani
Holiday celebrating Andoran's independence. Milanites celebrate that very little violence occurred.`,id:"824524",note:null,date:{day:3,year:null,month:5},category:null},{name:"Talon Tag",description:`Andoran
The Eagle Knights perform aerial displays in Almas on this day.`,id:"824525",note:null,date:{day:21,year:null,month:5},category:null},{name:"Riverwind Festival",description:`Korvosa
An early summer holiday that honors a cooling shift in the winds, celebrated with much drinking.`,id:"824526",note:null,date:{day:22,year:null,month:5},category:null},{name:"Inheritor's Ascendance ",description:`Iomedae
Inheritor's Ascendance, originally called 'Herald's Day', honours the day that Iomedae was chosen by the god Aroden to become his herald (thus replacing Arazni), thus boosting her power beyond that of a fledgling goddess. This holiday was renamed after the demise of Aroden.`,id:"824527",note:null,date:{day:1,year:null,month:7},category:null},{name:"First Crusader Day",description:`Mendev
Holiday in celebration of the continuing crusade against the demons of the Worldwound.`,id:"824528",note:null,date:{day:6,year:null,month:7},category:null},{name:"Day of Silenced Whispers",description:`Ustalav
The Day of Silenced Whispers is an Ustalavic holiday celebrated every 9 Arodus marking the defeat of the Whispering Tyrant in 3827 AR by the coalition forces of the Shining Crusade and the liberation of the country after centuries of undead domination.`,id:"824529",note:null,date:{day:9,year:null,month:7},category:null},{name:"Founding Day",description:`Ilsurian, Varisia
Festival celebrating the founding by Ilsur of the town of Ilsurian in 4631 AR.`,id:"824530",note:null,date:{day:10,year:null,month:7},category:null},{name:"Armasse",description:`Aroden, Iomedae, Milani
The raucous, week-long festival known as Armasse is held each year beginning on 16 Arodus. The celebration \u2014 once dedicated to the god Aroden \u2014 is still important to the faithful of Iomedae, who use it to train commoners in combat, ordain apprentice clergy, pick squires for knights, and teach military history, hoping to prevent the mistakes of the past from being repeated. Among those not dedicated to the Inheritor the holiday has lost most of its religious significance since Aroden's death, tending now only toward wild partying, a fact that has precluded the diabolist authorities of Cheliax from prohibiting Armasse outright. Nevertheless, in places where the church of Asmodeus is openly allowed, it hosts special activities for its parishioners during the same week in an effort to counter the influence of the holiday. The city of Corentyn is especially known for its extravagant Armasse festivities.`,id:"824531",note:null,date:{day:16,year:null,month:7},category:null},{name:"Saint Alika's Birthday",description:`Korvosa
Quiet holiday honoring the birth of Saint Alika the Martyr.`,id:"824532",note:null,date:{day:31,year:null,month:7},category:null},{name:"Archerfeast",description:`Erastil
Archer's Day or Archerfeast is a holiday of the god Erastil held annually on the 3rd of Erastus. Despite the holiday's origins in the worship of Erastil, common country folk from the Lands of the Linnorm Kings to Taldor celebrate the height of summer with a day set aside for establishing new relationships, enjoying current camaraderie, and celebrating the gifts of the gods. Archery competitions are held frequently in which the men test their skill with the bow through progressively harder trials. The exact form of competition is different from place to place, and the winner is awarded a rack of elk horns and a quiver of blessed arrows. He is also given the title of "Protector", which he holds until the next year.
While the festival's traditions emphasize contests of marksmanship, most have expanded to exhibit talents of all types, from baking and storytelling to racing and mock combat. Aside from encouraging a fair-like atmosphere, many of the displays and competitions serve one of two secondary purposes: either as a way for merchants to show off their superior livestock and wares, or (more popularly) as a way for eligible men and women to show off to each other.
While the day's events at most Archerfeast fairs are filled with games, food, and crafts, the night brings dancing, drinking, pranks, and the crowning of the princes and princesses of spring and summer for the two single youths and two single adults who fared best in the day's events. The festivities continue late into the evening, but end promptly at midnight, so that in true Erastilian fashion the next day's responsibilities are not overly impeded. For those not of Erastil's flock, however, private parties, drinking, and trysting carry on long into the next morning.`,id:"824533",note:null,date:{day:3,year:null,month:6},category:null},{name:"Founding Festival",description:`Korvosa
Founding Festival is a local Korvosan celebration marking the establishment of the city in 4407 AR. Held annually on 14 Erastus, the festival is a chance for the citizens to let off some steam, drink copiously, and watch magical light shows late into the night.`,id:"824534",note:null,date:{day:14,year:null,month:6},category:null},{name:"Burning Night",description:`Razmiran
Items or people who have transgressed against the god-king of Razmiran are burned on this day.`,id:"824535",note:null,date:{day:17,year:null,month:6},category:null},{name:"Kianidi Festival",description:`Garundi
The Kianidi Festival is a week long event held annually between 15 and 21 Erastus by Garundi people everywhere. The Garundi have a powerful belief in belonging to a specific location in this world, with clans or tribes sometimes traveling for years in search of their true home. In these travels each individual will collect small mementos of the places she or he has visited in order to remember them and maintain a spiritual connection. During the Kianidi, a tribe will gather and display these mementos to the group. The best ones are chosen and made part of the clan or tribal history, something which Garundi feel is a great honor.`,id:"824536",note:null,date:{day:15,year:null,month:6},category:null},{name:"Harvest Moon",description:null,id:"824537",note:null,date:{day:null,year:null,month:8},category:null},{name:"Multiple Events",description:`Festival of Night's Return
Nidal
Celebrated throughout Nidal, this holiday involves the burning of effigies and self-flagellation.
Swallowtail Festival
Desna
Holiday celebrated with storytelling, feasting, and the release of butterflies.
Waning Light Festival
Segada
Also called Blessing of the Sun and Night of Spirits, participants bid farewell to the long days of sunshine with feasting, dancing, and music.`,id:"824538",note:null,date:{day:null,year:null,month:null},category:null},{name:"Signing Day",description:`Andoran, Cheliax, Galt, Isger
Signing Day is a Chelish holiday, dating back to the height of the empire. Observed on the second Oathday of Rova, this is the day on which new laws in the empire took effect. The significance of this day expanded over many years until imperial marriages, significant business arrangements and oaths of fealty were all conducted on this day.
Originally, the holiday began as a celebration of the mutual-defense pact between Cheliax, Isger, Galt and Andoran when the united nations threw off the shackles of Taldor, declaring themselves independent from the empire. Observances of the holiday vary, but often include firework displays, feats of strength, and public debates to showcase speaking and rhetorical skills.
As Cheliax degenerated to civil war and diabolism after 4606 AR, blood pacts and infernal contracts also began to be signed on this day. As a result of Cheliax's new affiliation, Andoran and Galt began to distance themselves from Cheliax and the original interpretation of the holiday. In Andoran it continues to be the day that most national laws take effect as well as being a traditional day of marriage, and the date on which new Steel Falcons are inducted.`,id:"824539",note:null,date:{day:null,year:null,month:8},category:null},{name:"Crabfest",description:`Korvosa
Crabfest is a Korvosan holiday held on the first Wealday of Rova. It celebrates the return of the crabs from the cooler waters of the Jeggare River to their winter habitat in Conqueror's Bay, and is marked by crab boil feasts held throughout the city and its surrounding communities.`,id:"824540",note:null,date:{day:null,year:null,month:8},category:null},{name:"Feast of Szurpade",description:`Irrisen
This "celebration of plenty" festival mocks the traditional harvest festivals celebrated in the region before Baba Yaga and her eternal winter descended upon the land.`,id:"824541",note:null,date:{day:26,year:null,month:8},category:null},{name:"Day of Sundering",description:`Ydersius
Once many holidays were celebrated by the faith of Ydersius, but today only this date has much significance.`,id:"824542",note:null,date:{day:29,year:null,month:8},category:null},{name:"Admani Upastuti",description:`Jalmeri
Admani Upastuti is a Jalmeri holiday celebrated on the first full moon of Lamashan that marks the founding of Jalmeray as a Vudran colony.`,id:"824543",note:null,date:{day:null,year:null,month:9},category:null},{name:"Ascendance Day",description:`Iomedae
Ascendance Day is an Iomedaean holiday, held on the 6th of Lamashan. The day marks the anniversary of the day Iomedae took the Test of the Starstone in the autumn of 3832 AR and ascended to godhood.
Celebration
The day is a joyous celebration for the faithful, with singing, pledging of friendships, and forgiving of old grudges.
To many, the Test of the Starstone represents the greatest of all challenges, yet for Iomedae it was one of three storied promotions in her rise from Aroden's herald to a goddess in her own right. On the 6th of Lamashan, the Inheritor's faithful observe the heroism of Iomedae's life before her moment of ascension and celebrate the anniversary of the apotheosis itself.
The celebration takes place in several stages. Early in the day, troupes of performers\u2014as often passionate amateurs as professionals\u2014stage morality plays featuring the Eleven Acts of Iomedae, the heroic near-miracles and sacrifices she made leading up to her trials in the Starstone Cathedral. Scripts vary by region, city, and even neighborhood, but despite differences in setting, performance medium, and word choice, the themes and morals are all the same.
As the day continues, the priests organize jousts and mock battles, allowing anyone to participate so long as she can demonstrate enough skill to not be a risk to herself or others. The winners of these contests then face tests of mental acuity such as solving riddles, deciphering philosophical quandaries, and answering questions of honor and justice. Those who prove themselves in both contests are awarded a white cloak\u2014representing the Inheritor at peace\u2014styled after Iomedae's own red garment to wear for the rest of the celebration. Feasting and singing follow the competitions, mirroring the jubilation that followed Iomedae's ascension. This is occasion for making pledges of friendship and forgiving enemies, and priests circulate about the crowd offering the Inheritor's blessing to those who do and providing a moment's counsel or mediation for those who need an extra nudge.
The celebration typically ends before midnight, and the following day the priests and previous day's champions gather up the blunted swords from the mock battles, sharpen them, and distribute them among the church's armory and those of like-minded organizations so that all may remain vigilant against evil and prepared to strike it down.`,id:"824544",note:null,date:{day:6,year:null,month:9},category:null},{name:"Bastion Day",description:`Solku
Bastion Day is a two-day festival held annually on 19 and 20 Lamashan in the Katapeshi town of Solku honoring the founding of the town, when it is traditional to host a stranger from one noon until the next.`,id:"824545",note:null,date:{day:19,year:4712,month:9},category:null},{name:"Jestercap",description:`Andoran, Druma, Taldor
Jestercap occurs at the end of the month of Lamashan, traditionally on the 27th (although a few regions have taken to moving the exact day around slightly so it always falls on the last Starday of the month, allowing people who wish to celebrate in excess to have the following day of rest to recover).
History
While Jestercap has been embraced with excited open arms by the gnome communities of the Inner Sea region, its original genesis is said to have been in one of Taldor's coastal cities not long after King Aspex the Even-Tongued broke from the nation, significantly weakening Taldor's power and beginning that nation's long decline. The holiday was originally intended to distract the distraught Taldan populace with a night of revelry and comedic entertainment, but the antics of jesters were simply not enough.
Over the course of the first few years, Jestercap evolved from a holiday of observation to a holiday of participation. Today, the holiday is a time where anyone can pull pranks or jokes or japes on companions, on neighbors, and (most typically) on rivals, with the understanding that provided no lasting harm is done, any humiliations inflicted before midnight are to be taken in stride. Of course, come morning the day after, there are inevitably jokes that went too far, and grudges and feuds borne from Jestercap antics have a way of lingering for months to follow.
In Religion
Followers of Chaldira Zuzaristan, a halfling deity of mischief, treat Jestercap as a holy day and their pranks \u2014 often elaborate and extravagant in nature and plotted for months in advance \u2014 as displays of their faith.`,id:"824546",note:null,date:{day:27,year:null,month:9},category:null},{name:"Feast of the Survivors",description:`Zon-Kuthon, Nidal
A harvest festival signifying the centuries of Nidalese ancestors protected by Zon-Kuthon. The ceremonial tables are made of human bones of community members from past generations.`,id:"824547",note:null,date:{day:null,year:null,month:9},category:null},{name:"Kraken Carnival",description:`Absalom
The second of two local festivals where kite-battlers compete.`,id:"824548",note:null,date:{day:15,year:null,month:9},category:null},{name:"Independence Day",description:`Galt
Marks the beginning of the Red Revolution.`,id:"824549",note:null,date:{day:5,year:null,month:10},category:null},{name:"Seven Veils",description:`Sivanah
The holiday known as Seven Veils, which takes place on the 23rd of Neth in most realms of the Inner Sea region, is a celebration of the region's diversity \u2014 a time when social boundaries break down even further in a day-long event filled with dancing, feasting, and courting. The evening traditionally closes out with the Seven Veil masquerade, a ball wherein the participants wear disguises that hide their race or gender (often using minor magical trinkets and spells) or disguise these features as entirely new characteristics. At the end of the ball, the participants remove their disguises to their partners, often with unpredictable and sometimes delightfully awkward results. Traditionalists and conservative minds often find the Seven Veils masquerades to be scandalous or off-putting, yet they remain particularly popular in most of the larger cities of the land.
Historians note that the original "Dance of the Seven Veils" has a much different genesis than one promoting diversity \u2014 the mysterious cult of Sivanah, goddess of illusions, mystery, and reflections, is generally cited as the source of this festival, and indeed, worshippers of the goddess (herself known as the Seventh Veil) count the 23rd of Neth as one of their most sacred of days. What rituals the church of Sivanah performs on this date, however, are unknown to outsiders, for the cult enjoys its secrets. This secrecy has, unsurprisingly, given rise to all manner of sinister rumour, yet when Seven Veils rolls around each year, its eager participants are quick to set aside rumour in preference for the night's fun and games.`,id:"824550",note:null,date:{day:23,year:null,month:10},category:null},{name:"Abjurant Day",description:`Nethys
Abjurant Day occurs on 8 Neth and is known as a day of cooperation between neighbors to shore up mutual defenses and train allies in magic. Potential apprentices are often tested on the day.`,id:"824551",note:null,date:{day:8,year:null,month:10},category:null},{name:"Great Fire Remembrance",description:`Korvosa
Great Fire Remembrance is a holiday celebrated on each 13 Neth in the Varisian city of Korvosa. It commemorates the Great Fire of 4429 AR, which devastated the then still fledgling Chelish colony of Fort Korvosa. On this somber day, most of the city shuts down and people generally remain at home. It has become tradition not to light any fires (not even cooking fires) on Great Fire Remembrance.`,id:"824552",note:null,date:{day:13,year:null,month:10},category:null},{name:"Even-Tongued Day",description:`Cheliax, Asmodeus, Milani
Observed on 14 of Neth, Even-Tongued Day was once a day of joy and celebration in Cheliax, but has become instead one of mourning.
Originally, the date marked the conquest of Aspex the Even-Tongued, who brought the nations of Galt, Andoran and Isger under Chelish control. Since the death of Aroden and the loss of these nations, the holiday instead marks the loss of territory and glory once held by Cheliax. Oaths are sometimes made, typically to Asmodeus, and rarely of a pleasant nature (such as the reclaiming of the lost empire and vengeance against treacherous former allies).
Citizens wear black on this day, public speaking is forbidden, and old feuds and vendettas are rekindled.`,id:"824553",note:null,date:{day:14,year:null,month:10},category:null},{name:"Evoking Day",description:`Nethys
A holy day to followers of Nethys, Evoking Day is full of vibrant explosions, skillful wielding of spells, and much dancing. Evoking Day is observed on the 18th of Neth, and while this holiday is mostly celebrated in Garund, temples dedicated to Nethys host celebrations throughout the Inner Sea region. Traditional celebrations of Evoking Day have changed over the thousands of years since its first incarnation, but to this day every occurrence of Evoking Day still features a grand meal shared by celebrants during the afternoon and a wondrous exhibition of brilliant and explosive magic once the sun sets. These days, such colorful magical displays are augmented with fireworks of a dozen different colors and patterns.
In temples of Nethys dedicated to revering evocation magic, priests and prominent arcanists participate in spell duels where each contestant stands on a raised platform and takes turns trying to incapacitate her opponent. The magic wielded in theses duels favors the flashy over the dangerous, but clerics of Nethys are on hand to treat any injuries. These duels gather large crowds eager to lend their applause to their favorite contestant.
It is also during this festival when wizards who worship Nethys open their spellbooks to others who share their craft. Wizards normally guard their spellbooks with their lives and covet the eldritch information therein, but on Evoking Day these wizards meet with one another prior to the afternoon feast to share their spells just as they prepare to share a grand meal.
Though Evoking Day is primarily a day of grand magic, those with no spellcasting talent still flock to local temples of Nethys to partake in the shared feast and flashy evening displays of magic and fireworks. Between the meal and into the night, celebrants wear black-and-white robes and perform joyous dances meant to give thanks to the wonders Nethys brought to humankind. These dances are grand affairs involving dozens of dancers all spinning and clapping to the accompanying music as their black-and-white robes fan out around them with each spin. As night descends and the fireworks and magical displays begin, the dancing rises to a climax erupting in shouts and calls to Nethys with each thunderous boom.`,id:"824554",note:null,date:{day:18,year:null,month:10},category:null},{name:"Baptism of Ice",description:`Irrisen
In the Irriseni Baptism of Ice, an annual fertility festival held from the 24th to the 30th of Neth, locals parade all children born during the year through the town in fine clothes. In most towns, the festival ends with a symbolic sacrifice of a child to the cold. However, in Whitethrone and Irrisen's provincial capitals, a peasant child is killed through exposure.`,id:"824555",note:null,date:{day:24,year:null,month:10},category:null},{name:"Transmutatum",description:`Nethys
Transmutatum is one of the three major holidays of the church of Nethys, on 28th of Neth. It is a day of reflection and self-improvement. Many followers of Nethys begin research and crafting projects on this day.`,id:"824556",note:null,date:{day:28,year:null,month:10},category:null},{name:"Winter Week",description:"Traditional feast; time for courting and spending time with friends.",id:"824557",note:null,date:{day:null,year:null,month:11},category:null},{name:"The Shadowchaining",description:`Zon-Kuthon, Nidal
Commemorating the Midnight Lord's gift of shadow animals.`,id:"824558",note:null,date:{day:1,year:null,month:11},category:null},{name:"Pseudodragon Festival",description:`Korvosa
Korvosa's Pseudodragon Festival, a holiday celebrated annually on 7 Kuthona, marks the winter migration of wild pseudodragons from the Mindspin Mountains to Conqueror's Bay, which inspires the creatures already in the city\u2014even those domesticated\u2014to play with their wild kin in the skies over the city. Locals mark the day with a joyous inebriation.`,id:"824559",note:null,date:{day:7,year:null,month:11},category:null},{name:"Ascension Day",description:`Cayden Cailean
Much like the god to whom it is dedicated, the Caydenite holiday of Ascension Day is generally celebrated in a very informal style. Occurring annually on 11 Kuthona, it commemorates the day Cayden Cailean passed the Test of the Starstone and ascended to godhood in 2765 AR. In all likelihood, the 11th of Kuthona is not the exact date on which it actually happened, but since the god was dead drunk when it happened, it will probably be never known.`,id:"824560",note:null,date:{day:11,year:null,month:11},category:null},{name:"Winterbloom",description:`Naderi
Holiday celebrating Naderi's ascension. Celebrations are typically understated but include readings of The Lay of Arden and Lysena.`,id:"824561",note:null,date:{day:15,year:null,month:11},category:null},{name:"Final Day",description:`Groetus
Cultists of Groetus perform an hour's silence at dusk on the last day of the year and seek guidance from their god about the End Time.`,id:"824562",note:null,date:{day:31,year:null,month:11},category:null},{name:"Night of the Pale",description:`Not all of Golarion's holidays and festivals are times of rejoicing and delight. Holidays worshiped by dark and sinister cults and religions tend to be hidden affairs, their rituals and ceremonies involving cruelties and vile practices that send shivers of fear through gentler society. Scholars suspect that the Night of the Pale\u2014a holiday that traditionally takes place on the last day of the year, the 31st of Kuthona\u2014has links to several sinister religions, but today no one church has specific association with the event. Nonetheless, the Night of the Pale is an event that many look forward to all year, whether in fear or excitement.
On the Night of the Pale, it is said that the ghosts of those who died during the previous year manifest upon the world and come to visit the homes they lived in during life. Although some might think that the chance of seeing even the shade of a dearly departed one might be a blessing, the Night of the Pale is not a time for tearful reunions, for these ghosts, tradition says, do not return out of love for those they left behind but out of darker compulsions. Lingering jealousy, unfinished arguments, or the simmering need for revenge are said to be what compels the dead to return to torment the living on the Night of the Pale.
The evening of this night in many communities is celebrated by a morbid feast, the food prepared with themes revolving around graveyards, the dead, and other spooky traditions. This feast, on one level, helps the celebrants to make light of their fears while sharing good company with similarly nervous neighbors, but at another level is believed to placate vengeful spirits as toasts are raised to the memories of the recently departed. These feasts include retellings of favorite memories of the departed, in hopes of reminding the approaching ghosts of brighter and kinder memories than those that compel them to return. The feast always ends at least an hour before midnight in order to give participants time to return home, decorate doors and windows with salt and other trinkets taken from the feasting table (salted bread baked into crook-like shapes are a favorite, as these can be hung from doorknobs and eaves) to ward off evil spirits, and hide in their bedrooms until dawn. Brave youths and adventurers often deliberately stay out after midnight, either to dare the ghosts to challenge them or simply for the thrill of bucking tradition. Every Night of the Pale, it seems, there are disappearances among those who stay out after midnight, although whether these vanishings are the result of dissatisfied locals taking the opportunity to run away from home, murderers or wild animals or other mundane dangers, or the vengeful spirits carrying off their victims depends upon the circumstances.
The morning after a Night of the Pale is also the first day of the new year\u2014a time that many celebrate more as a relief for surviving the night before than in anticipation of what the new year might bring, although regional preferences for how this day is celebrated vary enough that no single tradition holds over the other. Save, of course, the lingering fears of what dread spirits might come knocking upon warded doors one year away...`,id:"824563",note:null,date:{day:31,year:null,month:11},category:null},{name:"Turning Day",description:`Alseta
The changing of the year is celebrated with the forgiveness of old debts and grudges, and embracing new opportunities.`,id:"824564",note:null,date:{day:31,year:null,month:11},category:null},{name:"Ritual of Stardust",description:`Desna
The Ritual of Stardust is one of the few formal religious holidays in honor of the goddess Desna. It is held on both the summer and winter solstices.
Followers of the Song of Spheres gather at dusk and light enormous bonfires and hold feasts, watching the sparks and embers float out into the darkening sky. After it is fully dark, the celebrants chant and sing songs as they watch the fires burn low. When only embers remain, sand mixed with ground star gems (either star rubies, star sapphires, or rose quartz) is thrown on them or into the air downwind. At this point it is common to make proclamations of love and friendship and of promised journeys to come. The twinkling of the sand is thought to mirror the night sky and demonstrate Desna's witnessing of these pronouncements.`,id:"824565",note:null,date:{day:null,year:null,month:null},category:null},{name:"Planting Week",description:`Erastil
This holy week to the god Erastil is a time of heavy work in the fields for farmers.`,id:"824566",note:null,date:{day:null,year:null,month:null},category:null},{name:"Ascendance Night",description:`Norgorber
Day marking the apotheosis of the Reaper of Reputation.`,id:"824567",note:null,date:{day:2,year:null,month:4},category:null},{name:"Azvadeva Dejal",description:`Gruhastha
Celebration of the revelation of the Azvadeva Pujila, with gifts of books, celebrations of knowledge, blessing of animals, and a vegetarian feast.`,id:"824568",note:null,date:{day:3,year:null,month:4},category:null},{name:"Goblin Flea Market",description:`Andoran
A market day that focuses on unusual crafts and offers games to children who dress up for the occasion.`,id:"824569",note:null,date:{day:null,year:null,month:null},category:null},{name:"Breaching Festival",description:`Korvosa
Yearly festival in which contestants try to break through the magical wards protecting the Academae.`,id:"824570",note:null,date:{day:null,year:null,month:4},category:null},{name:"Silverglazer Sunday",description:`Andoran
Silverglazer Sunday is a two-part Andoren national festival that is held on the last Sunday of Arodus and the first Sunday of Rova every year. Celebrants spend the two Sundays fishing, holding swimming competitions, and making enormous puppets.`,id:"824571",note:null,date:{day:null,year:null,month:null},category:null},{name:"Batul al-Alim",description:`Qadira
Batul al-Alim is a holiday celebrated on the last Oathday of Calistril in Qadira. It commemorates the birthday of the popular romantic poet of the same name.`,id:"824572",note:null,date:{day:null,year:null,month:1},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Galifar",description:"Calendar of the world of Eberron.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"Sul",id:"ID_598a7bd9b8b9"},{type:"day",name:"Mol",id:"ID_69088ac8f818"},{type:"day",name:"Zol",id:"ID_a8c85a98f8fa"},{type:"day",name:"Wir",id:"ID_fa4b687aaba9"},{type:"day",name:"Zor",id:"ID_58e9a82a6bc8"},{type:"day",name:"Far",id:"ID_9a18cb889ada"},{type:"day",name:"Sar",id:"ID_3b9bfa38c979"}],months:[{name:"Zarantyr",type:"month",length:28,id:"ID_7a8afb09aa6a"},{name:"Olarune",type:"month",length:28,id:"ID_386b188b2a89"},{name:"Therendor",type:"month",length:28,id:"ID_599a0ad859c8"},{name:"Eyre",type:"month",length:28,id:"ID_98a95869e90b"},{name:"Dravago",type:"month",length:28,id:"ID_eb5a194bcbf8"},{name:"Nymm",type:"month",length:28,id:"ID_bb596aa9ca5b"},{name:"Lharvion",type:"month",length:28,id:"ID_fb1bb9dabb88"},{name:"Barrakas",type:"month",length:28,id:"ID_8bcb19c8f90a"},{name:"Rhaan",type:"month",length:28,id:"ID_0a09eb5b7b9b"},{name:"Sypheros",type:"month",length:28,id:"ID_3b98ab1a29e8"},{name:"Aryth",type:"month",length:28,id:"ID_899b59faaba9"},{name:"Vult",type:"month",length:28,id:"ID_8a286b78aac9"}],moons:[{name:"Nymm",cycle:28,offset:-14,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a8b88988a94a"},{name:"Sypheros",cycle:35,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_5ba80b4b096a"},{name:"Therendor",cycle:42,offset:21,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_c999085a499b"},{name:"Rhaan",cycle:49,offset:9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_39f91ab8a85a"},{name:"Olarune",cycle:56,offset:27,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_2ada8b99788b"},{name:"Eyre",cycle:63,offset:10,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_49285b79d988"},{name:"Vult",cycle:70,offset:6,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_eaebb94a9acb"},{name:"Zarantyr",cycle:77,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_98d86aabcbb9"},{name:"Aryth",cycle:84,offset:41,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_d989b809d97b"},{name:"Dravago",cycle:91,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_1a293959eaab"},{name:"Lharvion",cycle:98,offset:34,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_cbf919491a5b"},{name:"Barrakas",cycle:105,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_4a1a2a6b589b"}],leapDays:[],eras:[]},current:{year:998,day:1,month:0},events:[{name:"The Tain Gala - Sharn",description:"The Tain Gala is a notable event held on the first Far of each month in Sharn.",id:"824461",note:null,date:{day:null,year:null,month:null},category:null},{name:"Revelation Day - Blood of Vol",description:"Meditation ceremony for Seekers (also called Ascension Day).",id:"824462",note:null,date:{day:13,year:null,month:0},category:null},{name:"Winter Solstice",description:"The longest night of the year.",id:"824463",note:null,date:{day:14,year:null,month:0},category:null},{name:"Rebirth Eve - The Silver Flame",description:"The Purified new year; a night for spiritual vigil and guarding against evil. ",id:"824464",note:null,date:{day:14,year:null,month:0},category:null},{name:"Crystalfall - Sharn",description:"A day of remembrance; Ice sculptures are created (and destroyed) to commemorate the destruction of the Glass Tower on 9 Olarune in 918 by abjurers. ",id:"824465",note:null,date:{day:9,year:998,month:1},category:null},{name:"Bright Souls' Day - The Silver Flame",description:"On this day each year, the Purified celebrate the lives and sacrifice of all followers of the Flame who died while fighting evil and protecting the faithful. ",id:"824466",note:null,date:{day:18,year:null,month:1},category:null},{name:"The Day of Mourning - Sharn",description:"In commemoration of the destruction of the nation of Cyre, those who survived gather to remember the loss of their kingdom on this date in the year 994. ",id:"824467",note:null,date:{day:20,year:995,month:1},category:null},{name:"Tirasday - The Silver Flame",description:"On this day, the Silver Flame work, give gifts, and partake in joyous celebration out of thankfulness for the new planting season and the birth of Tira Miron - the Voice of the Silver Flame.",id:"824468",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sun's Blessing - The Sovereign Host",description:"The Sovereign Host enjoys this festival of peace, and of setting aside differences, in the name of Dol Arrah.",id:"824469",note:null,date:{day:15,year:null,month:2},category:null},{name:"Initiation Day - The Silver Flame",description:"Seminary graduations and breaking grounds for new churches are common on this day as the Silver Flame recalls their declarations of independent faith and the construction of their first cathedral on this special day each year. ",id:"824470",note:null,date:{day:11,year:null,month:3},category:null},{name:"Baker's Night - The Silver Flame",description:"An old and misunderstood, yet immensely popular, holiday wherein followers of the Silver Flame gather to share pastries and treats created by bakers within their fold. ",id:"824471",note:null,date:{day:6,year:null,month:4},category:null},{name:"Aureon's Crown - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate knowledge on this day with lectures and sermons.Secular institutions hold graduation and commencement ceremonies on this date, as do the monastic schools of the Silver Flame.In Sharn this has become a common secular holiday, wherein even non-devout members of the Five Nations attend lectures and sermons held by the priests of Aureon on philosophical, historical, and a range of other topics - including discussions on the nature of the gods.
`,id:"824472",note:null,date:{day:26,year:null,month:4},category:null},{name:"Promisetide - The Silver Flame",description:"A controversial holiday outside of the Silver Flame faith, on this day the Purified honor the Silver Flame for the promise of paradise. They also honor (without worship) the Sovereign Host for having created the world, before stepping aside to allow the Flame its rightful place as the last god of Eberron.\xA0 ",id:"824473",note:null,date:{day:28,year:null,month:4},category:null},{name:"Brightblade - Sharn and The Sovereign Host",description:`This Sovereign Host festival, dedicated to Dol Dorn, is marked by gladiatorial and athletic contests.
In Sharn, festival celebrations occur throughout the temple districts with events culminating in a combined contest of champions at the Cornerstone Arena. `,id:"824474",note:null,date:{day:12,year:null,month:5},category:null},{name:"First Dawn - The Silver Flame",description:"On this day in 914, the Church of the Silver Flame officially assumed control of the government of Thrane. On each anniversary, the Purified give thanks for their just rule, while also honoring the memory of King Thalin, whose death paved the way for their governance.",id:"824475",note:null,date:{day:21,year:915,month:5},category:null},{name:"Silvertide - The Silver Flame",description:"Commemoration of both the couatl sacrifice and the entry, thousands of years ago, of the Silver Flame into Eberron mark this highest of holy days. The vast majority of Purified spend this day in prayer and observance.\xA0 ",id:"824476",note:null,date:{day:14,year:null,month:6},category:null},{name:"The Race of Eight Winds - Sharn",description:`Legend tells of King Galifar II's fascination with aerial scouts and cavalry. The evolution of this annual contest took centuries, but has given Sharn an exotic and well anticipated event involving beasts and their riders in a symbiotic quest for glory* over a course that finds them weaving through the spires of the city.
*the winner also receives 500gp and a land grant located elsewhere in Breland.`,id:"824477",note:null,date:{day:21,year:201,month:6},category:null},{name:"The Hunt - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate Balinor with communal hunts of dangerous creatures.
In Sharn, a dangerous beast*, whose transport to the city was arranged by the priests of Balinor, is released into the Depths of the Lower-City. Open to any who would participate (and pay an entry fee in the form of a 5gp donation), the victor must return with the beast's head to receive a 500gp purse, local fame, and the blessing of Balinor.
*often a singular beast, it can be several - which then requires the victor to return with the most skins. `,id:"824478",note:null,date:{day:4,year:null,month:7},category:null},{name:"Victory Day - The Silver Flame",description:"Commemorating the conclusion of the lycanthropic purge (832 YK - 880 YK), on Victory Day the adult faithful of the Silver Flame attend sermons on triumph, defeat, and the somewhat questionable methods utilized by the templars during the purge - while the children of the faithful act out great battles with toy swords. ",id:"824479",note:null,date:{day:9,year:881,month:7},category:null},{name:"Fathen's Fall - Sharn",description:"Honoring the memory of Fathen, a great hero of the Silver Crusade (832 YK - 880 YK), who, in the last days of the purge, was torn apart by wererats on the streets of North Market. Faithful gather on this day at the Shrine of Fathen the Martyr to listen to a sermon from the priest of High Hope. This holiday is often uncomfortable and tense for shifter communities in Sharn. ",id:"824480",note:null,date:{day:25,year:881,month:7},category:null},{name:"Boldrei's Feast - Sharn and The Sovereign Host",description:`A feast of community in the name of Boldrei, extravagant parties are often held on this holiday and it has also become the traditional day for elections.
In Sharn, a great feast is held at the Pavilion of the Host with goods and services donated\xA0 from local merchants, as well as House Ghallanda. Many grand parties, some quite astonishing in their opulence, are hosted by the wealthiest members of varying districts - often in competition with one another for social standing. `,id:"824481",note:null,date:{day:9,year:null,month:8},category:null},{name:"The Ascension - Sharn",description:"Each year on The Ascension, followers reaffirm their faith and give thanks as well as attend blessing ceremonies at temples throughout the city - the grandest of which occurs at the Cathedral of the Cleansing Flame. All of this is to honor the sacrifice of Tira Miron, the Voice of the Flame, without which there would be no Church of the Silver Flame. Contributions to their community on this day are a high priority for the faithful.",id:"824482",note:null,date:{day:1,year:null,month:9},category:null},{name:"Wildnight - Sharn",description:"With the The Fury (the Sovereign of Passion and Madness) reaching the height of her power on this night, people find it difficult to control or restrain their impulses - once the sun sets, public revelry in the streets climbs to joyous or, all too often, dangerous levels, calming only as the sun rises on the following morning. ",id:"824483",note:null,date:{day:18,year:null,month:9},category:null},{name:"Saint Voltros's Day - The Silver Flame",description:"Though one of the least high holy days, it is marked by brief prayers and church services in the honor of the birth of Saint Voltros - the first paladin called to only serve the Silver Flame.",id:"824484",note:null,date:{day:25,year:null,month:9},category:null},{name:"Thronehold - Sharn",description:"On this day in 996, the Treaty of Thronehold was signed, formally ending the Last War. Annual celebratory feasts are held throughout the Five Nations to mark this auspicious and long-awaited event. ",id:"824485",note:null,date:{day:11,year:997,month:10},category:null},{name:"Rampartide - The Silver Flame",description:"In accordance with scripture, on this day the Purified steel themselves against wickedness, both without and within, through repentance and fasting. Children, elderly, and the sick are required only to give up their favorite foods for the day. ",id:"824486",note:null,date:{day:24,year:null,month:10},category:null},{name:"Long Shadows - Sharn",description:"As dark magic dominates over these three days of the Long Shadows, the myth of Sovereign Lord Aureon's stolen shadow is forefront in the minds of the people. Most will spend these days indoors huddled around the warmth of a fire, but those few who worship the dark deity use this time to prey upon the weak and the foolish. ",id:"824487",note:null,date:{day:26,year:null,month:11},category:null},{name:"Khybersef - The Silver Flame",description:`Originally called Khyber's Eve, the Purified spend the night in intense prayer and spiritual vigilance against the, according to scripture, "thinning of the bonds that hold the demon lords in Khyber" between now (the beginning of winter) and the solstice. Quests and crusades often begin on Khybersef. `,id:"824488",note:null,date:{day:27,year:null,month:11},category:null},{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824489",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824490",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824491",note:null,date:{day:null,year:null,month:null},category:null}],id:null,categories:[]},{name:"Barovian Calendar",description:"Calendar of the realm of Barovia, home of Strahd.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Monday",id:"ID_6a183b08c8eb"},{type:"day",name:"Tuesday",id:"ID_892b7b7a5ae9"},{type:"day",name:"Wednesday",id:"ID_6bb98899ba68"},{type:"day",name:"Thursday",id:"ID_4a7b683aea19"},{type:"day",name:"Friday",id:"ID_78690a099b89"},{type:"day",name:"Saturday",id:"ID_ba5b09ba5a89"},{type:"day",name:"Sunday",id:"ID_29b90acaead9"}],months:[{name:"1st Moon",type:"month",length:31,id:"ID_7b4978ab581a"},{name:"2nd Moon",type:"month",length:28,id:"ID_cb99fbb9395b"},{name:"3rd Moon",type:"month",length:31,id:"ID_79881a89cb18"},{name:"4th Moon",type:"month",length:30,id:"ID_5b9a8a397908"},{name:"5th Moon",type:"month",length:31,id:"ID_f8399ab80818"},{name:"6th Moon",type:"month",length:30,id:"ID_3ac84a7bc869"},{name:"7th Moon",type:"month",length:31,id:"ID_e98bc86bc809"},{name:"8th Moon",type:"month",length:31,id:"ID_89ea78ca5988"},{name:"9th Moon",type:"month",length:30,id:"ID_798a3b990a4b"},{name:"10th Moon",type:"month",length:31,id:"ID_3a9999e8eb59"},{name:"11th Moon",type:"month",length:30,id:"ID_db39383b990a"},{name:"12th Moon",type:"month",length:31,id:"ID_1bfa3b180a48"}],moons:[{name:"Moon",cycle:29.530588853,offset:10.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_e98b3a8ab8da"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_6a28dbb81a48"}],eras:[{name:"Before Christ",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-9e3,month:0,day:0}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}}]},current:{year:735,day:1,month:0},events:[{name:"Winter Solstice",description:"The Winter Solstice is the day of the year with the least time between sunrise and sunset. Many western cultures consider it the official start of winter.",id:"824455",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Summer Solstice",description:`The Summer Solstice is the day of the year with the most time between
sunrise and sunset. Many western cultures consider it the official start
of summer.`,id:"824456",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Spring Equinox",description:`The Spring Equinox,
also called the Vernal Equinox, is the day between the winter and
summer solstices where the day is the exact same length as the night.
Many western cultures consider it the official start of Spring.
`,id:"824457",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Autumnal Equinox",description:`The Autumnal Equinox,
also called the Fall Equinox, is the midpoint between the summer and
winter solstices, where the day is the exact same length as the night.
Many western cultures consider it the official start of Autumn.
`,id:"824458",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Year's Day",description:"New Year's day marks the start of a new year.",id:"824459",note:null,date:{day:1,year:null,month:null},category:null},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824460",note:null,date:{day:null,year:null,month:null},category:"natural-event"}],id:null,categories:[{name:"Natural Event",id:"natural-event",color:"#9e9d24"}]},{name:"Exandrian Calendar",description:"Calendar of the world of Wildemount.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:2,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Miresen",id:"ID_3b38aaa81bca"},{type:"day",name:"Grissen",id:"ID_da6b19882baa"},{type:"day",name:"Whelsen",id:"ID_a9cae8f88b98"},{type:"day",name:"Conthsen",id:"ID_e87859eb5aaa"},{type:"day",name:"Folsen",id:"ID_59180abbea8a"},{type:"day",name:"Yulisen",id:"ID_98082bd8d8ca"},{type:"day",name:"Da'leysen",id:"ID_da4ba92b299a"}],months:[{name:"Horisal",type:"month",length:29,id:"ID_e89a4ab9995b"},{name:"Misuthar",type:"month",length:30,id:"ID_18b8894bab7b"},{name:"Dualahei",type:"month",length:30,id:"ID_0a9b29f8f8db"},{name:"Thunsheer",type:"month",length:31,id:"ID_6a8a8a5bea5b"},{name:"Unndilar",type:"month",length:28,id:"ID_b8295bdbcafa"},{name:"Brussendar",type:"month",length:31,id:"ID_c92a489bb909"},{name:"Sydenstar",type:"month",length:32,id:"ID_7b48bb1b0a4a"},{name:"Fessuran",type:"month",length:29,id:"ID_289858c97849"},{name:"Quen'pillar",type:"month",length:27,id:"ID_f8abd9a86aa9"},{name:"Cuersaar",type:"month",length:29,id:"ID_7aba59fa2b69"},{name:"Duscar",type:"month",length:32,id:"ID_5819f86b99cb"}],moons:[{name:"Catha",cycle:33,offset:7,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_0ab929092b5b"},{name:"Ruidus",cycle:328,offset:80,faceColor:"#ff6161",shadowColor:"#1f1f1f",id:"ID_b9783ac818e9"}],leapDays:[],eras:[{name:"The Founding",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}},{name:"Age of Arcanum",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-1500,month:0,day:1}},{name:"The Calamity",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-665,month:0,day:1}},{name:"Post-Divergence",description:"",format:"Year {{year}} P.D.",start:{year:1,month:0,day:1}}]},current:{day:1,month:0,year:836},events:[{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824430",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824431",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824432",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824433",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Dawn",description:`The first day of the new year is also the holy day of the Changebringer, as the old year gives way to a new path.
In Tal'Dorei, Emon celebrates New Dawn with a grand midnight feast, which commonly features a short play celebrating the changes witnessed in the past year.
On the Menagerie Coast, people celebrate by having a feast on the shore at dusk to watch the sunset. They feast and discuss their hopes for the new year until the sun rises.`,id:"824434",note:null,date:{day:1,year:null,month:0},category:"religious-holidays"},{name:"Hillsgold",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824435",note:null,date:{day:27,year:null,month:0},category:"secular-holidays"},{name:"Day of Challenging",description:`The holy day of the Stormlord is one of the most raucous holidays in Emon. Thousands of spectators attend the annual Godsbrawl, which is held in the fighting ring within the Temple of the Stormlord. The people root for their deity's favored champion, and there is a fierce (yet friendly) rivalry between the Champion of the Stormlord and the Champion of the Platinum Dragon. The winner earns the title of "Supreme Champion" for an entire year.
The Day of Challenging is one of the most raucous holidays in Port Damali, and thousands of spectators attend the annual Godsbrawl held in the Temple of\xA0Kord to root for their favored deity's champion, particularly the chosen champions of the Storm Lord and the\xA0All-Hammer.\xA0`,id:"824436",note:null,date:{day:7,year:null,month:1},category:"religious-holidays"},{name:"Renewal Festival",description:"Spring begins early in the month of Dualahei, officially starting on the 13th with the Renewal Festival.",id:"824437",note:null,date:{day:13,year:null,month:2},category:"secular-holidays"},{name:"Wild's Grandeur",description:`Though the Archeart is the god of spring, the peak of the spring season is the holy day of the Wildmother.
The people in the southern wilds of Tal'Dorei celebrate the Wildmother's strength by journeying to a place of great natural beauty. This could be the top of a mountainous waterfall, the center of a desert, or even an old and peaceful city park (such as Azalea Street Park in Emon). Though Emon rarely celebrates Wild's Grandeur, the few who do will plant trees in observance of the holiday.
The people of the Menagerie Coast set aside this day to sail for no reason other than the pleasure of observing the natural beauty of their surroundings. Those who still partake in elements of Ki'Nau culture take this day to appreciate the fruits and foods granted by the sea, leaving offerings of delicacies and small handmade crafts at temporary altars of twisted roots and grasses.`,id:"824438",note:null,date:{day:20,year:null,month:2},category:"religious-holidays"},{name:"Harvest's Rise",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824439",note:null,date:{day:11,year:null,month:3},category:"secular-holidays"},{name:"Merryfrond's Day",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824440",note:null,date:{day:31,year:null,month:3},category:"secular-holidays"},{name:"Deep Solace",description:`Moradin's holy day is Deep Solace, which is celebrated on the eighteenth day of the fifth month. Especially devout followers of the All-Hammer spend the day in isolation, meditating on the meaning of family and how they may be better mothers, fathers, siblings, and children.
The dwarven communities across Exandria, such as the ones in Grimgolir and Kraghammer, celebrate with a full day of feasting and drinking.\xA0`,id:"824441",note:null,date:{day:18,year:null,month:4},category:"religious-holidays"},{name:"Zenith",description:"Summer begins in the middle of Unndilar, officially starting at noon on the 26th day known as the Zenith.",id:"824442",note:null,date:{day:26,year:null,month:4},category:"secular-holidays"},{name:"Artisan's Faire",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824443",note:null,date:{day:15,year:null,month:5},category:"secular-holidays"},{name:"Elvendawn",description:`Corellon's holy day is called Elvendawn,
or Midsummer. It is celebrated on the twentieth day
of the sixth month, and commemorates the elves' first
emergence from the Feywild.
In Syngorn, the Elves open small doorways into the Feywild and celebrate alongside the wild fey with uncharacteristic vigor.
Though the Dwendalian
Empire doesn't promote the worship of the Arch Heart,
the elves of Bysaes Tyl quietly celebrate in private by
opening small doors to the Feywild and having a little
more wine than usual.\xA0`,id:"824444",note:null,date:{day:20,year:null,month:5},category:"religious-holidays"},{name:"Highsummer",description:`The holy day of the Dawnfather is the peak of the summer season.
Emon celebrates with an entire week of gift-giving and feasting, ending at midnight on the 21st of Sydenstar (the anniversary of the Battle of the Umbra Hills, where Zan Tal'Dorei dethroned Trist Drassig).
Whitestone (where the Dawnfather is the city's patron god) celebrates with gift-giving and a festival of lights around the Sun Tree. Due to the Briarwood occupation, money is thin, so most Whitestone folk choose to recount the small things they are thankful for, rather than buy gifts.
While other parts of Exandria feast, the Dwendalian
Empire uses this day as an opportunity to enlist more
soldiers in its army. The military holds great feasts and
hands out toy soldiers and other propaganda, encouraging people to enlist and help fight against the evil that
threatens the king.\xA0`,id:"824445",note:null,date:{day:7,year:null,month:6},category:"religious-holidays"},{name:"Morn of Largesse",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824446",note:null,date:{day:14,year:null,month:6},category:"secular-holidays"},{name:"Harvest's Close",description:"Autumn begins on the 3rd of Fessuran\xA0and is typically celebrated with feasting in rural regions and with carnivals in the cities.\xA0",id:"824447",note:null,date:{day:3,year:null,month:7},category:"secular-holidays"},{name:"The Hazel Festival",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824448",note:null,date:{day:12,year:null,month:8},category:"secular-holidays"},{name:"Civilization's Dawn",description:`The Law Bearer's holy day is Civilization's
Dawn, which is celebrated on the autumnal equinox,
usually the twenty-second day of the ninth month.
Emon celebrates with a great bonfire in the square of each neighborhood, around which each community dances and gives gifts.
In the
Dwendalian Empire, people celebrate by having feasts
in honor of the laws of the Dwendal bloodline. One seat
at every table is left open for the king, who eats in spirit
with the people he rules.\xA0`,id:"824449",note:null,date:{day:22,year:null,month:8},category:"religious-holidays"},{name:"Night of Ascension",description:`The Raven Queen's holy day is called the Night of Ascension, celebrating her apotheosis. The actual date of the her rise to divinity is unclear, but the Night of Ascension is celebrated on the thirteenth day of the tenth month.
Though most in Emon see this celebration of the dead as unnerving and macabre, the followers of the Matron of Ravens believe that the honored dead would prefer to be venerated with cheer, not misery.
What was once a night of cheery celebration of the dead in the Dwendalian Empire has recently become an occasion to burn effigies and decry the Kryn Dynasty for their unnatural relationship with death.`,id:"824450",note:null,date:{day:13,year:null,month:9},category:"religious-holidays"},{name:"Zan's Cup",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824451",note:null,date:{day:21,year:null,month:9},category:"secular-holidays"},{name:"Barren Eve",description:"Winter begins on the 2nd day of Duscar, the Barren Eve, which is a nighttime celebration and remembrance of those who fell in battle.",id:"824452",note:null,date:{day:2,year:null,month:10},category:"secular-holidays"},{name:"Embertide",description:"Bahamut's holy day is called Embertide,\xA0and is celebrated on the fifth day of Duscar. This is a day\xA0of remembrance, solemnity, and respect for those who\xA0have fallen in the defense of others.",id:"824453",note:null,date:{day:5,year:null,month:10},category:"religious-holidays"},{name:"Winter's Crest",description:`This day celebrates the freedom of Tal'Dorei from Errevon the Rimelord. It is the peak of the winter season, so devout followers of the Matron of Ravens (as the goddess of winter) consider it to be one of her holy days.
However, in most of the land, people see Winter's Crest as a secular holiday, often celebrated with omnipresent music in public areas, lavish gift-giving to relatives and loved ones, and the cutting and decorating of trees placed indoors. The Sun Tree in Whitestone is often decorated with lights and other baubles for Winter's Crest.`,id:"824454",note:null,date:{day:20,year:null,month:10},category:"secular-holidays"}],id:null,categories:[{name:"Religious Holidays",id:"religious-holidays",color:"#0D47A1"},{name:"Secular Holidays",id:"secular-holidays",color:"#4A148C"}]},{name:"Calendar of Harptos",description:"Calendar of Faer\xFBn of the Forgotten Realms.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"I",id:"ID_9999882bb94a"},{type:"day",name:"II",id:"ID_8a0b4b79d888"},{type:"day",name:"III",id:"ID_da483aca8bf9"},{type:"day",name:"IV",id:"ID_a8fbea39cac8"},{type:"day",name:"V",id:"ID_9b19d9787b0b"},{type:"day",name:"VI",id:"ID_382a590a8a28"},{type:"day",name:"VII",id:"ID_fbca0ab80afb"},{type:"day",name:"VIII",id:"ID_ca093bca5ad9"},{type:"day",name:"IX",id:"ID_d95b39098bf8"},{type:"day",name:"X",id:"ID_389bfb5858db"}],months:[{name:"Hammer (Deepwinter)",type:"month",length:30,id:"ID_cbeb4b190b6a"},{name:"Midwinter",type:"intercalary",length:1,id:"ID_89bad9089b7b"},{name:"Alturiak (The Claw of Winter)",type:"month",length:30,id:"ID_6a08a8aacb7b"},{name:"Ches (The Claw of the Sunsets)",type:"month",length:30,id:"ID_db2a7bf97afa"},{name:"Tarsakh (The Claw of Storms)",type:"month",length:30,id:"ID_6b48982b0bda"},{name:"Greengrass",type:"intercalary",length:1,id:"ID_08790af92809"},{name:"Mirtul (The Melting)",type:"month",length:30,id:"ID_b91b39f95a28"},{name:"Kythorn (The Time of Flowers)",type:"month",length:30,id:"ID_f8e9585a2bf8"},{name:"Flamerule (Summertide)",type:"month",length:30,id:"ID_fa895bdb38e9"},{name:"Midsummer",type:"intercalary",length:1,id:"ID_a9181b5a683a"},{name:"Eleasis (Highsun)",type:"month",length:30,id:"ID_1b1b1b287b0a"},{name:"Eleint (The Fading)",type:"month",length:30,id:"ID_1aca5918993a"},{name:"Highharvestide",type:"intercalary",length:1,id:"ID_a94a183b4b88"},{name:"Marpenoth (Leaffall)",type:"month",length:30,id:"ID_58d97969eb79"},{name:"Uktar (The Rotting)",type:"month",length:30,id:"ID_4b090b787b18"},{name:"The Feast of the Moon",type:"intercalary",length:1,id:"ID_1b0ae8dbdb4a"},{name:"Nightal (The Drawing Down)",type:"month",length:30,id:"ID_abb82afab80a"}],moons:[{name:"Sel\xFAne",cycle:30.4375,offset:13.9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_48ea2a69a888"}],leapDays:[{name:"Shieldsmeet",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:9,intercalary:!1,id:"ID_5b08faa88ada"}],eras:[]},current:{year:1491,day:1,month:0},events:[{name:"Winter Solstice",description:null,id:"824588",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Vernal Equinox",description:null,id:"824589",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Summer Solstice",description:null,id:"824590",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Autumnal Equinox",description:null,id:"824591",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Shieldmeet",description:`Shieldmeet was the equivalent of a leap year day in the Calendar of Harptos, occurring once every four years, adding a day after the festival of Midsummer and before Eleasis 1. Traditionally the day was used for fairs, bazaars, musical and theatrical performances, and tournaments of skill and magical ability. Nobles usually held court to hear the petitions of their people and to make or renew trade pacts, alliances, and agreements. Shieldmeet was known as Cinnaelos'Cor (also seen as Cinnaeloscor), "the Day of Corellon's Peace" in elvish and marked the end of an aeloulaev and the beginning of a new one in the elven Aryselmalyn calendar.`,id:"824592",note:null,date:{day:2,year:null,month:9},category:"festivals"},{name:"Feast of the Moon",description:`The Feast of the Moon, or Moonfest, was an annual festival in the Calendar of Harptos, occurring between the final night of Uktar and the first day of Nightal. It was the last great festival of the calendar year.
The day traditionally marked the onset of winter. It was also a time to celebrate and honor the ancestors and the respected dead. On this day, folk blessed their ancestors' graves and performed the Ritual of Remembrance. People also gathered to tell stories of the deeds of their ancestors and of the gods until deep into the night, until they merged and became legend. This was a time to hear of past heroes, great treasures, and lost cities.
In Faer\xC3\u0192\xC2\xBBn, battles were typically fought between harvest-time and the coming of winter. This meant that most of the fighting usually occurred in the month of Uktar. The timing of the Feast of the Moon\xC3\xA2\xE2\u201A\xAC\xE2\u20ACafter recently slain soldiers had joined the ranks of the dead\xC3\xA2\xE2\u201A\xAC\xE2\u20ACwas thus practical, if sadly ironic.
The Heralds of Faer\xC3\u0192\xC2\xBBn had a number of special duties on the Feast of the Moon. Prime among these was to perform the Bloodsong ceremony, at which a Herald publicly recited the genealogies of each noble family in the area. In this way, the Heralds reaffirmed a noble family's traditional authority and status, as well as the respect accorded to them.
Priests of a number of deities of various pantheons held rites, ceremonies, and festivals on the Feast of the Moon. Many, though not all, focused on remembering the dead in one way or another.`,id:"824593",note:null,date:{day:1,year:null,month:15},category:"festivals"},{name:"Highharvesttide",description:`Highharvestide was an annual festival in the Calendar of Harptos, taking place between 30 Eleint and 1 Marpenoth. It was traditionally a feast to celebrate the harvest and the abundance of food, but also the time when those wishing to travel left on their journeys before winter set in.
Preparations for the feast started as early as a tenday before, while preparing, cooking, and preserving the harvest for the cold winter months. Traditions varied from community to community, but examples of festive activity included food-related contests; races and challenges of skill and strength; receiving homemade sweets from the local clergy; and priests blessing larders, wine cellars, grain bins, and food preserves.
This day was often an important anniversary to various governments. Often, taxes and tithes came due, rulers held "open courts" to hear the concerns of their citizens, oaths were publicly renewed, troops received marching orders to new duty stations, and guilds met to confer on prices and rate changes for goods and services.
According to tradition, dwarves only drank water and elves drank only dew on this day. However, these traditions began to fade in the 14th and 15th century DR.
It was said that children born on this day were favored by Tymora to have lifelong good luck but be smitten with wanderlust. Another legend was that human females born on this day had control over their reproductive system (i.e., got pregnant only when they wanted to) by force of will alone, and that they could instantly sense when they had been poisoned, either by ingestion or being bitten by a venomous creature for example.`,id:"824594",note:null,date:{day:1,year:null,month:12},category:"festivals"},{name:"Greengrass",description:"Greengrass was a festival to welcome in the first day of spring in the Calendar of Harptos. It occured annually on a special day between Tarsakh 30 and Mirtul 1. Traditionally, the wealthier people brought out flowers to give to the less wealthy, who either wore them or spread them on the ground to encourage the deities to usher in the summer.",id:"824595",note:null,date:{day:1,year:null,month:5},category:"festivals"},{name:"Midwinter",description:`Midwinter (also known as Deadwinter Day) was a festival to mark the midpoint of winter in the Calendar of Harptos. It occured on a special day between Hammer 30 and Alturiak 1. Amongst nobles and monarchs it was known as Midwinter and was traditionally used to make or renew alliances, although the common people called it Deadwinter Day, a reference to the cold and hard times that remained before the spring.
On Midwinter Day the Red Fellowship of the Deity known as the Red Knight observes the Retreat. This solemn ceremony consists of an assembly wherein the clergy discuss the previous year's campaigns. Strategies are discussed, battles analyzed, and the accumulated lore integrated into the church's teachings.
The holiest day of the year for the Church of Shevarash is Midwinter Night, during which the Dark Court Slaughter is remembered. Inductions into the ranks of the clergy occur at this time. Each new cleric screams vows of vengeance into the night air and swears neither to laugh nor smile until the Spider Queen and her followers are no more.`,id:"824596",note:null,date:{day:1,year:null,month:1},category:"festivals"},{name:"Midsummer",description:"Midsummer was a festival that celebrated love and music through feast. It occurred between Flamerule 30 and Eleasis 1 on the Calendar of Harptos. It was a time when love advanced, and it was said the deities themselves took a hand to ensure good weather. If bad weather was experienced on this night it was considered an extremely bad omen. Shieldmeet occurred the day after Midsummer on leap years.",id:"824597",note:null,date:{day:1,year:null,month:9},category:"festivals"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Festivals",id:"festivals",color:"#9b2c2c"}]}];var Bo=class extends Zn.Modal{async onOpen(){await this.display()}async display(){this.containerEl.addClass("fantasy-calendar-choose-preset"),this.contentEl.empty(),this.contentEl.createEl("h3",{text:"Choose a Preset Calendar"});let e=this.contentEl.createDiv("fantasy-calendar-preset-container");for(let a of bu){let r=new Zn.ButtonComponent(e).onClick(()=>{this.preset=a,this.display()});this.preset==a&&r.setCta(),r.buttonEl.createDiv({cls:"setting-item-name",text:a.name}),r.buttonEl.createDiv({cls:"setting-item-description",text:a.description})}let n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Zn.ButtonComponent(n).setButtonText("Apply").onClick(()=>{this.saved=!0,this.preset=(0,wu.default)(this.preset),this.preset.id=et(6),this.close()}).setCta(),new Zn.ExtraButtonComponent(n).setIcon("cross").onClick(()=>{this.close()})}};function Kr(t){let e=t-1;return e*e*e+1}function Du(t,{delay:e=0,duration:n=400,easing:a=Kr,x:r=0,y:i=0,opacity:o=0}={}){let l=getComputedStyle(t),s=+l.opacity,d=l.transform==="none"?"":l.transform,u=s*(1-o);return{delay:e,duration:n,easing:a,css:(c,h)=>`
transform: ${d} translate(${(1-c)*r}px, ${(1-c)*i}px);
opacity: ${s-u*h}`}}var wa=[];function Da(t,e=X){let n,a=new Set;function r(l){if(se(t,l)&&(t=l,n)){let s=!wa.length;for(let d of a)d[1](),wa.push(d,t);if(s){for(let d=0;d<wa.length;d+=2)wa[d][0](wa[d+1]);wa.length=0}}}function i(l){r(l(t))}function o(l,s=X){let d=[l,s];return a.add(d),a.size===1&&(n=e(r)||X),l(t),()=>{a.delete(d),a.size===0&&(n(),n=null)}}return{set:r,update:i,subscribe:o}}var Qr=xe(require("obsidian"));var _u=xe(require("obsidian"));function hn(t){(0,_u.setIcon)(t,"fantasy-calendar-warning")}function Eu(t){let e=[];if(t.name?.length||e.push("A calendar must have a name."),(!Hn(t.current.day,t)||!Wn(t.current.month,t)||!Gn(t.current.year,t))&&e.push("Specified current date is not valid."),!t.static.weekdays?.length)e.push("A calendar must have at least 1 weekday.");else{if(!t.static.weekdays?.every(n=>n.name?.length)){let n=t.static.weekdays?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} weekday does not have a name.`):e.push(`${n} weekdays do not have names.`)}t.static.firstWeekDay>=(t.static.weekdays?.length??1/0)&&e.push(`Invalid first weekday selection: ${t.static.weekdays[t.static.firstWeekDay]}`)}if(!t.static.months?.length)e.push("A calendar must have at least 1 month.");else{if(!t.static.months?.every(n=>n.name?.length)){let n=t.static.months?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} month does not have a name.`):e.push(`${n} months do not have names.`)}if(!t.static.months?.every(n=>n.length>0)){let n=t.static.months?.filter(a=>!(a.length>0)).length;n==1?e.push(`${n} month does not have a length.`):e.push(`${n} months do not have lengths.`)}}if(t.static.useCustomYears){if(!t.static.years?.length)e.push("Use Custom Years is on but no years have been created.");else if(!t.static.years.every(n=>n.name?.length)){let n=t.static.years.filter(a=>!a.name?.length).length;n==1?e.push(`${n} year does not have a name.`):e.push(`${n} years do not have names.`)}}return e.join(`
`)}function Cu(t){return!!(Hn(t.current.day,t)&&Wn(t.current.month,t)&&Gn(t.current.year,t)&&t.static.months?.length&&t.static.months?.every(e=>e.name?.length)&&t.static.months?.every(e=>e.length>0)&&t.static.weekdays?.length&&t.static.weekdays?.every(e=>e.name?.length)&&t.name?.length&&t.static.firstWeekDay<(t.static.weekdays?.length??1/0)&&(!t.static.useCustomYears||t.static.useCustomYears&&t.static.years?.length&&t.static.years.every(e=>e.name?.length)))}function Mo(t,e){if(t==null)return"No day specified";if(e?.current?.month==null)return"No month selected";if(t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)return"Day does not exist in selected month"}function No(t,e){if(t==null)return"No month specified";if(!e?.static?.months?.length)return"No months exist";if(t<0||t>=e?.static?.months?.length)return"Selected month does not exist"}function Io(t,e){if(t==null)return"No year specified";if(t<1&&!e.static?.useCustomYears)return"Years start at 1";if(e?.static?.useCustomYears){if(!e?.static?.years?.length)return"No custom years exist";if(t<0||t>=e?.static?.years?.length)return"Year does not exist in custom years"}}function H2(t){be(t,"svelte-13g7dwb",'.fantasy-calendar-nested-settings.svelte-13g7dwb.svelte-13g7dwb{position:relative}.warning-label-container.svelte-13g7dwb.svelte-13g7dwb{display:flex;justify-content:flex-end;position:absolute;right:0}.warning-label.svelte-13g7dwb.svelte-13g7dwb{color:var(--text-error)}.fantasy-calendar-nested-summary.svelte-13g7dwb.svelte-13g7dwb{outline:none;display:block !important;list-style:none !important;list-style-type:none !important;min-height:1rem;border-top-left-radius:0.1rem;border-top-right-radius:0.1rem;cursor:pointer;position:sticky;top:0;z-index:2;background-color:var(--creator-background-color)}summary.svelte-13g7dwb.svelte-13g7dwb::-webkit-details-marker,summary.svelte-13g7dwb.svelte-13g7dwb::marker{display:none !important}.collapser.svelte-13g7dwb.svelte-13g7dwb{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.handle.svelte-13g7dwb.svelte-13g7dwb{transform:rotate(0deg);transition:transform 0.25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}details[open].svelte-13g7dwb .handle.svelte-13g7dwb{transform:rotate(90deg)}')}function Au(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function ku(t){let e,n,a;return{c(){e=T("div"),n=T("div"),a=me(t[3]),D(n,"class","setting-item-description warning-label svelte-13g7dwb"),D(e,"class","warning-label-container svelte-13g7dwb")},m(r,i){q(r,e,i),E(e,n),E(n,a)},p(r,i){i&8&&we(a,r[3])},d(r){r&&O(e)}}}function W2(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_=t[2]&&Au(t),F=t[2]&&t[3]&&ku(t),w=t[7].default,M=Pr(w,t,t[6],null);return{c(){e=T("details"),n=T("summary"),a=T("div"),r=T("div"),i=T("div"),o=me(t[0]),l=j(),s=T("div"),d=me(t[1]),u=j(),c=T("div"),h=T("div"),_&&_.c(),y=j(),m=T("div"),v=j(),F&&F.c(),p=j(),M&&M.c(),D(i,"class","setting-item-name"),D(s,"class","setting-item-description"),D(r,"class","setting-item-info"),D(a,"class","setting-item setting-item-heading"),D(m,"class","handle svelte-13g7dwb"),D(h,"class","warning-container"),D(c,"class","collapser svelte-13g7dwb"),D(n,"class","fantasy-calendar-nested-summary svelte-13g7dwb"),D(e,"class","fantasy-calendar-nested-settings svelte-13g7dwb")},m(x,V){q(x,e,V),E(e,n),E(n,a),E(a,r),E(r,i),E(i,o),E(r,l),E(r,s),E(s,d),E(n,u),E(n,c),E(c,h),_&&_.m(h,null),E(h,y),E(h,m),E(e,v),F&&F.m(e,null),E(e,p),M&&M.m(e,null),C=!0,A||(S=le(k=t[4].call(null,e)),A=!0)},p(x,[V]){(!C||V&1)&&we(o,x[0]),(!C||V&2)&&we(d,x[1]),x[2]?_||(_=Au(x),_.c(),_.m(h,y)):_&&(_.d(1),_=null),x[2]&&x[3]?F?F.p(x,V):(F=ku(x),F.c(),F.m(e,p)):F&&(F.d(1),F=null),M&&M.p&&(!C||V&64)&&Vr(M,w,x,x[6],C?jr(w,x[6],V,null):Hr(x[6]),null)},i(x){C||(R(M,x),C=!0)},o(x){W(M,x),C=!1},d(x){x&&O(e),_&&_.d(),F&&F.d(),M&&M.d(x),A=!1,S()}}}function G2(t,e,n){let{$$slots:a={},$$scope:r}=e,{open:i=!Qr.Platform.isMobile}=e,{name:o}=e,{desc:l=""}=e,{warn:s=!1}=e,{label:d=null}=e,u=h=>{i&&h.setAttr("open","open")},c=h=>{new Qr.Setting(h).setHeading().setName(o)};return t.$$set=h=>{"open"in h&&n(5,i=h.open),"name"in h&&n(0,o=h.name),"desc"in h&&n(1,l=h.desc),"warn"in h&&n(2,s=h.warn),"label"in h&&n(3,d=h.label),"$$scope"in h&&n(6,r=h.$$scope)},[o,l,s,d,u,i,r,a]}var xu=class extends de{constructor(e){super();fe(this,e,G2,W2,se,{open:5,name:0,desc:1,warn:2,label:3},H2)}},ct=xu;function U2(t){be(t,"svelte-uulo5f",".fantasy-calendar-date-field-container.fantasy-calendar-date-field-container.svelte-uulo5f.svelte-uulo5f{display:flex;flex-direction:row;gap:1rem;border:0}.fantasy-calendar-date-field.svelte-uulo5f.svelte-uulo5f{display:grid;grid-auto-rows:1fr;flex:1 1 0;gap:0.5rem}.fantasy-calendar-date-field.svelte-uulo5f .setting-item-description.svelte-uulo5f{padding-top:0}.fantasy-calendar-date-field.svelte-uulo5f .invalid.svelte-uulo5f{border:1px solid var(--text-error)}")}function Fu(t,e,n){let a=t.slice();return a[11]=e[n],a[13]=n,a}function Tu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Su(t){let e,n=!t[3]&&Bu(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[3]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Bu(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Bu(t){let e=Mo(t[4].day,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=Mo(a[4].day,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function Mu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Nu(t){let e,n=t[11].name+"",a,r;return{c(){e=T("option"),a=me(n),e.__value=r=t[13],e.value=e.__value},m(i,o){q(i,e,o),E(e,a)},p(i,o){o&64&&n!==(n=i[11].name+"")&&we(a,n)},d(i){i&&O(e)}}}function Iu(t){let e,n=!t[2]&&Ou(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[2]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Ou(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Ou(t){let e=No(t[4].month,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=No(a[4].month,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function qu(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Ru(t){let e,n=!t[1]&&Lu(t);return{c(){e=T("div"),n&&n.c(),D(e,"class","setting-item-description svelte-uulo5f")},m(a,r){q(a,e,r),n&&n.m(e,null)},p(a,r){a[1]?n&&(n.d(1),n=null):n?n.p(a,r):(n=Lu(a),n.c(),n.m(e,null))},d(a){a&&O(e),n&&n.d()}}}function Lu(t){let e=Io(t[4].year,t[0])+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r&17&&e!==(e=Io(a[4].year,a[0])+"")&&we(n,e)},d(a){a&&O(n)}}}function z2(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B=!t[3]&&Tu(t),H=t[5]&&Su(t),Y=!t[2]&&Mu(t),he=t[6].filter(Pu),oe=[];for(let Q=0;Q<he.length;Q+=1)oe[Q]=Nu(Fu(t,he,Q));let ce=t[5]&&Iu(t),Z=!t[1]&&qu(t),z=t[5]&&Ru(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=T("label"),r.textContent="Day",i=j(),B&&B.c(),o=j(),l=T("input"),s=j(),H&&H.c(),d=j(),u=T("div"),c=T("div"),h=T("label"),h.textContent="Month",y=j(),Y&&Y.c(),m=j(),v=T("select");for(let Q=0;Q<oe.length;Q+=1)oe[Q].c();p=j(),ce&&ce.c(),k=j(),C=T("div"),A=T("div"),S=T("label"),S.textContent="Year",_=j(),Z&&Z.c(),F=j(),w=T("input"),M=j(),z&&z.c(),D(r,"for",""),D(a,"class","warning-container"),D(l,"type","number"),D(l,"spellcheck","false"),D(l,"placeholder","Day"),D(l,"class","svelte-uulo5f"),pe(l,"invalid",!t[3]),D(n,"class","fantasy-calendar-date-field svelte-uulo5f"),D(h,"for",""),D(c,"class","warning-container"),D(v,"class","dropdown svelte-uulo5f"),t[4].month===void 0&&It(()=>t[8].call(v)),pe(v,"invalid",!t[2]),D(u,"class","fantasy-calendar-date-field svelte-uulo5f"),D(S,"for",""),D(A,"class","warning-container"),D(w,"type","number"),D(w,"spellcheck","false"),D(w,"placeholder","Year"),D(w,"class","svelte-uulo5f"),pe(w,"invalid",!t[1]),D(C,"class","fantasy-calendar-date-field svelte-uulo5f"),D(e,"class","fantasy-calendar-date-field-container setting-item svelte-uulo5f")},m(Q,De){q(Q,e,De),E(e,n),E(n,a),E(a,r),E(a,i),B&&B.m(a,null),E(n,o),E(n,l),yt(l,t[4].day),E(n,s),H&&H.m(n,null),E(e,d),E(e,u),E(u,c),E(c,h),E(c,y),Y&&Y.m(c,null),E(u,m),E(u,v);for(let ve=0;ve<oe.length;ve+=1)oe[ve].m(v,null);Vt(v,t[4].month),E(u,p),ce&&ce.m(u,null),E(e,k),E(e,C),E(C,A),E(A,S),E(A,_),Z&&Z.m(A,null),E(C,F),E(C,w),yt(w,t[4].year),E(C,M),z&&z.m(C,null),x||(V=[ie(l,"input",t[7]),ie(v,"change",t[8]),ie(w,"input",t[9])],x=!0)},p(Q,De){if(Q[3]?B&&(B.d(1),B=null):B||(B=Tu(Q),B.c(),B.m(a,null)),De&16&&rn(l.value)!==Q[4].day&&yt(l,Q[4].day),De&8&&pe(l,"invalid",!Q[3]),Q[5]?H?H.p(Q,De):(H=Su(Q),H.c(),H.m(n,null)):H&&(H.d(1),H=null),Q[2]?Y&&(Y.d(1),Y=null):Y||(Y=Mu(Q),Y.c(),Y.m(c,null)),De&64){he=Q[6].filter(Pu);let ve;for(ve=0;ve<he.length;ve+=1){let Ne=Fu(Q,he,ve);oe[ve]?oe[ve].p(Ne,De):(oe[ve]=Nu(Ne),oe[ve].c(),oe[ve].m(v,null))}for(;ve<oe.length;ve+=1)oe[ve].d(1);oe.length=he.length}De&16&&Vt(v,Q[4].month),De&4&&pe(v,"invalid",!Q[2]),Q[5]?ce?ce.p(Q,De):(ce=Iu(Q),ce.c(),ce.m(u,null)):ce&&(ce.d(1),ce=null),Q[1]?Z&&(Z.d(1),Z=null):Z||(Z=qu(Q),Z.c(),Z.m(A,null)),De&16&&rn(w.value)!==Q[4].year&&yt(w,Q[4].year),De&2&&pe(w,"invalid",!Q[1]),Q[5]?z?z.p(Q,De):(z=Ru(Q),z.c(),z.m(C,null)):z&&(z.d(1),z=null)},d(Q){Q&&O(e),B&&B.d(),H&&H.d(),Y&&Y.d(),We(oe,Q),ce&&ce.d(),Z&&Z.d(),z&&z.d(),x=!1,_e(V)}}}function Y2(t){let e,n;return e=new ct({props:{name:"Current Date",warn:t[5],label:"Invalid current date specified",$$slots:{default:[z2]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&32&&(i.warn=a[5]),r&16511&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var Pu=t=>t.name;function Z2(t,e,n){let a,r,i,o,l,s,d;Xe("store").subscribe(m=>n(0,d=m));function c(){a.day=rn(this.value),n(4,a),n(0,d)}function h(){a.month=vn(this),n(4,a),n(0,d)}function y(){a.year=rn(this.value),n(4,a),n(0,d)}return t.$$.update=()=>{if(t.$$.dirty&1){e:n(4,a=d.current)}if(t.$$.dirty&1){e:n(6,r=d.static.months)}if(t.$$.dirty&17){e:n(3,i=Hn(a.day,d))}if(t.$$.dirty&17){e:n(2,o=Wn(a.month,d))}if(t.$$.dirty&17){e:n(1,l=Gn(a.year,d))}if(t.$$.dirty&14){e:n(5,s=!i||!o||!l)}},[d,l,o,i,a,s,r,c,h,y]}var ju=class extends de{constructor(e){super();fe(this,e,Z2,Y2,se,{},U2)}},Vu=ju;var mn=xe(require("obsidian"));var uc=xe(require("obsidian"));var ri=xe(require("obsidian"));var it="top",mt="bottom",dt="right",ft="left",Xr="auto",Bn=[it,mt,dt,ft],wn="start",Kn="end",Hu="clippingParents",Jr="viewport",_a="popper",Wu="reference",Oo=Bn.reduce(function(t,e){return t.concat([e+"-"+wn,e+"-"+Kn])},[]),$r=[].concat(Bn,[Xr]).reduce(function(t,e){return t.concat([e,e+"-"+wn,e+"-"+Kn])},[]),K2="beforeRead",Q2="read",X2="afterRead",J2="beforeMain",$2="main",ey="afterMain",ty="beforeWrite",ny="write",ay="afterWrite",Gu=[K2,Q2,X2,J2,$2,ey,ty,ny,ay];function vt(t){return t?(t.nodeName||"").toLowerCase():null}function ot(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Dn(t){var e=ot(t).Element;return t instanceof e||t instanceof Element}function bt(t){var e=ot(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ei(t){if(typeof ShadowRoot=="undefined")return!1;var e=ot(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function ry(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var a=e.styles[n]||{},r=e.attributes[n]||{},i=e.elements[n];!bt(i)||!vt(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var l=r[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function iy(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(a){var r=e.elements[a],i=e.attributes[a]||{},o=Object.keys(e.styles.hasOwnProperty(a)?e.styles[a]:n[a]),l=o.reduce(function(s,d){return s[d]="",s},{});!bt(r)||!vt(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}var Uu={name:"applyStyles",enabled:!0,phase:"write",fn:ry,effect:iy,requires:["computeStyles"]};function wt(t){return t.split("-")[0]}function Kt(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),a=1,r=1;return{width:n.width/a,height:n.height/r,top:n.top/r,right:n.right/a,bottom:n.bottom/r,left:n.left/a,x:n.left/a,y:n.top/r}}function Qn(t){var e=Kt(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-a)<=1&&(a=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function Ja(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&ei(n)){var a=e;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Ot(t){return ot(t).getComputedStyle(t)}function qo(t){return["table","td","th"].indexOf(vt(t))>=0}function Ct(t){return((Dn(t)?t.ownerDocument:t.document)||window.document).documentElement}function _n(t){return vt(t)==="html"?t:t.assignedSlot||t.parentNode||(ei(t)?t.host:null)||Ct(t)}function zu(t){return!bt(t)||Ot(t).position==="fixed"?null:t.offsetParent}function oy(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&bt(t)){var a=Ot(t);if(a.position==="fixed")return null}for(var r=_n(t);bt(r)&&["html","body"].indexOf(vt(r))<0;){var i=Ot(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function on(t){for(var e=ot(t),n=zu(t);n&&qo(n)&&Ot(n).position==="static";)n=zu(n);return n&&(vt(n)==="html"||vt(n)==="body"&&Ot(n).position==="static")?e:n||oy(t)||e}function Xn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Qt=Math.max,Mn=Math.min,$a=Math.round;function Jn(t,e,n){return Qt(t,Mn(e,n))}function er(){return{top:0,right:0,bottom:0,left:0}}function tr(t){return Object.assign({},er(),t)}function nr(t,e){return e.reduce(function(n,a){return n[a]=t,n},{})}var sy=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,tr(typeof e!="number"?e:nr(e,Bn))};function ly(t){var e,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,l=wt(n.placement),s=Xn(l),d=[ft,dt].indexOf(l)>=0,u=d?"height":"width";if(!(!i||!o)){var c=sy(r.padding,n),h=Qn(i),y=s==="y"?it:ft,m=s==="y"?mt:dt,v=n.rects.reference[u]+n.rects.reference[s]-o[s]-n.rects.popper[u],p=o[s]-n.rects.reference[s],k=on(i),C=k?s==="y"?k.clientHeight||0:k.clientWidth||0:0,A=v/2-p/2,S=c[y],_=C-h[u]-c[m],F=C/2-h[u]/2+A,w=Jn(S,F,_),M=s;n.modifiersData[a]=(e={},e[M]=w,e.centerOffset=w-F,e)}}function uy(t){var e=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||!Ja(e.elements.popper,r)||(e.elements.arrow=r))}var Yu={name:"arrow",enabled:!0,phase:"main",fn:ly,effect:uy,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xt(t){return t.split("-")[1]}var cy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dy(t){var e=t.x,n=t.y,a=window,r=a.devicePixelRatio||1;return{x:$a($a(e*r)/r)||0,y:$a($a(n*r)/r)||0}}function Zu(t){var e,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,o=t.offsets,l=t.position,s=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,c=u===!0?dy(o):typeof u=="function"?u(o):o,h=c.x,y=h===void 0?0:h,m=c.y,v=m===void 0?0:m,p=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),C=ft,A=it,S=window;if(d){var _=on(n),F="clientHeight",w="clientWidth";_===ot(n)&&(_=Ct(n),Ot(_).position!=="static"&&l==="absolute"&&(F="scrollHeight",w="scrollWidth")),_=_,(r===it||(r===ft||r===dt)&&i===Kn)&&(A=mt,v-=_[F]-a.height,v*=s?1:-1),(r===ft||(r===it||r===mt)&&i===Kn)&&(C=dt,y-=_[w]-a.width,y*=s?1:-1)}var M=Object.assign({position:l},d&&cy);if(s){var x;return Object.assign({},M,(x={},x[A]=k?"0":"",x[C]=p?"0":"",x.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+v+"px)":"translate3d("+y+"px, "+v+"px, 0)",x))}return Object.assign({},M,(e={},e[A]=k?v+"px":"",e[C]=p?y+"px":"",e.transform="",e))}function fy(t){var e=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l;if(!1)var d;var u={placement:wt(e.placement),variation:Xt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Zu(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:s})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Zu(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Ku={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:fy,data:{}};var ti={passive:!0};function hy(t){var e=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,l=o===void 0?!0:o,s=ot(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&d.forEach(function(u){u.addEventListener("scroll",n.update,ti)}),l&&s.addEventListener("resize",n.update,ti),function(){i&&d.forEach(function(u){u.removeEventListener("scroll",n.update,ti)}),l&&s.removeEventListener("resize",n.update,ti)}}var Qu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:hy,data:{}};var my={left:"right",right:"left",bottom:"top",top:"bottom"};function Ea(t){return t.replace(/left|right|bottom|top/g,function(e){return my[e]})}var py={start:"end",end:"start"};function ni(t){return t.replace(/start|end/g,function(e){return py[e]})}function $n(t){var e=ot(t),n=e.pageXOffset,a=e.pageYOffset;return{scrollLeft:n,scrollTop:a}}function ea(t){return Kt(Ct(t)).left+$n(t).scrollLeft}function Ro(t){var e=ot(t),n=Ct(t),a=e.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,l=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,l=a.offsetTop)),{width:r,height:i,x:o+ea(t),y:l}}function Lo(t){var e,n=Ct(t),a=$n(t),r=(e=t.ownerDocument)==null?void 0:e.body,i=Qt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Qt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-a.scrollLeft+ea(t),s=-a.scrollTop;return Ot(r||n).direction==="rtl"&&(l+=Qt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:l,y:s}}function ta(t){var e=Ot(t),n=e.overflow,a=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ai(t){return["html","body","#document"].indexOf(vt(t))>=0?t.ownerDocument.body:bt(t)&&ta(t)?t:ai(_n(t))}function Nn(t,e){var n;e===void 0&&(e=[]);var a=ai(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=ot(a),o=r?[i].concat(i.visualViewport||[],ta(a)?a:[]):a,l=e.concat(o);return r?l:l.concat(Nn(_n(o)))}function Ca(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gy(t){var e=Kt(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 Xu(t,e){return e===Jr?Ca(Ro(t)):bt(e)?gy(e):Ca(Lo(Ct(t)))}function yy(t){var e=Nn(_n(t)),n=["absolute","fixed"].indexOf(Ot(t).position)>=0,a=n&&bt(t)?on(t):t;return Dn(a)?e.filter(function(r){return Dn(r)&&Ja(r,a)&&vt(r)!=="body"}):[]}function Po(t,e,n){var a=e==="clippingParents"?yy(t):[].concat(e),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(l,s){var d=Xu(t,s);return l.top=Qt(d.top,l.top),l.right=Mn(d.right,l.right),l.bottom=Mn(d.bottom,l.bottom),l.left=Qt(d.left,l.left),l},Xu(t,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ar(t){var e=t.reference,n=t.element,a=t.placement,r=a?wt(a):null,i=a?Xt(a):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,s;switch(r){case it:s={x:o,y:e.y-n.height};break;case mt:s={x:o,y:e.y+e.height};break;case dt:s={x:e.x+e.width,y:l};break;case ft:s={x:e.x-n.width,y:l};break;default:s={x:e.x,y:e.y}}var d=r?Xn(r):null;if(d!=null){var u=d==="y"?"height":"width";switch(i){case wn:s[d]=s[d]-(e[u]/2-n[u]/2);break;case Kn:s[d]=s[d]+(e[u]/2-n[u]/2);break;default:}}return s}function sn(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=a===void 0?t.placement:a,i=n.boundary,o=i===void 0?Hu:i,l=n.rootBoundary,s=l===void 0?Jr:l,d=n.elementContext,u=d===void 0?_a:d,c=n.altBoundary,h=c===void 0?!1:c,y=n.padding,m=y===void 0?0:y,v=tr(typeof m!="number"?m:nr(m,Bn)),p=u===_a?Wu:_a,k=t.rects.popper,C=t.elements[h?p:u],A=Po(Dn(C)?C:C.contextElement||Ct(t.elements.popper),o,s),S=Kt(t.elements.reference),_=ar({reference:S,element:k,strategy:"absolute",placement:r}),F=Ca(Object.assign({},k,_)),w=u===_a?F:S,M={top:A.top-w.top+v.top,bottom:w.bottom-A.bottom+v.bottom,left:A.left-w.left+v.left,right:w.right-A.right+v.right},x=t.modifiersData.offset;if(u===_a&&x){var V=x[r];Object.keys(M).forEach(function(B){var H=[dt,mt].indexOf(B)>=0?1:-1,Y=[it,mt].indexOf(B)>=0?"y":"x";M[B]+=V[Y]*H})}return M}function jo(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,d=s===void 0?$r:s,u=Xt(a),c=u?l?Oo:Oo.filter(function(m){return Xt(m)===u}):Bn,h=c.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=c);var y=h.reduce(function(m,v){return m[v]=sn(t,{placement:v,boundary:r,rootBoundary:i,padding:o})[wt(v)],m},{});return Object.keys(y).sort(function(m,v){return y[m]-y[v]})}function vy(t){if(wt(t)===Xr)return[];var e=Ea(t);return[ni(t),e,ni(e)]}function by(t){var e=t.state,n=t.options,a=t.name;if(!e.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!0:o,s=n.fallbackPlacements,d=n.padding,u=n.boundary,c=n.rootBoundary,h=n.altBoundary,y=n.flipVariations,m=y===void 0?!0:y,v=n.allowedAutoPlacements,p=e.options.placement,k=wt(p),C=k===p,A=s||(C||!m?[Ea(p)]:vy(p)),S=[p].concat(A).reduce(function(at,Pe){return at.concat(wt(Pe)===Xr?jo(e,{placement:Pe,boundary:u,rootBoundary:c,padding:d,flipVariations:m,allowedAutoPlacements:v}):Pe)},[]),_=e.rects.reference,F=e.rects.popper,w=new Map,M=!0,x=S[0],V=0;V<S.length;V++){var B=S[V],H=wt(B),Y=Xt(B)===wn,he=[it,mt].indexOf(H)>=0,oe=he?"width":"height",ce=sn(e,{placement:B,boundary:u,rootBoundary:c,altBoundary:h,padding:d}),Z=he?Y?dt:ft:Y?mt:it;_[oe]>F[oe]&&(Z=Ea(Z));var z=Ea(Z),Q=[];if(i&&Q.push(ce[H]<=0),l&&Q.push(ce[Z]<=0,ce[z]<=0),Q.every(function(at){return at})){x=B,M=!1;break}w.set(B,Q)}if(M)for(var De=m?3:1,ve=function(Pe){var gt=S.find(function(xt){var Je=w.get(xt);if(Je)return Je.slice(0,Pe).every(function(Fe){return Fe})});if(gt)return x=gt,"break"},Ne=De;Ne>0;Ne--){var je=ve(Ne);if(je==="break")break}e.placement!==x&&(e.modifiersData[a]._skip=!0,e.placement=x,e.reset=!0)}}var Ju={name:"flip",enabled:!0,phase:"main",fn:by,requiresIfExists:["offset"],data:{_skip:!1}};function $u(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 ec(t){return[it,dt,mt,ft].some(function(e){return t[e]>=0})}function wy(t){var e=t.state,n=t.name,a=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,o=sn(e,{elementContext:"reference"}),l=sn(e,{altBoundary:!0}),s=$u(o,a),d=$u(l,r,i),u=ec(s),c=ec(d);e.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:c},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":c})}var tc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:wy};function Dy(t,e,n){var a=wt(t),r=[ft,it].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],l=i[1];return o=o||0,l=(l||0)*r,[ft,dt].indexOf(a)>=0?{x:l,y:o}:{x:o,y:l}}function _y(t){var e=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,o=$r.reduce(function(u,c){return u[c]=Dy(c,e.rects,i),u},{}),l=o[e.placement],s=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=d),e.modifiersData[a]=o}var nc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_y};function Ey(t){var e=t.state,n=t.name;e.modifiersData[n]=ar({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var ac={name:"popperOffsets",enabled:!0,phase:"read",fn:Ey,data:{}};function Vo(t){return t==="x"?"y":"x"}function Cy(t){var e=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!1:o,s=n.boundary,d=n.rootBoundary,u=n.altBoundary,c=n.padding,h=n.tether,y=h===void 0?!0:h,m=n.tetherOffset,v=m===void 0?0:m,p=sn(e,{boundary:s,rootBoundary:d,padding:c,altBoundary:u}),k=wt(e.placement),C=Xt(e.placement),A=!C,S=Xn(k),_=Vo(S),F=e.modifiersData.popperOffsets,w=e.rects.reference,M=e.rects.popper,x=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,V={x:0,y:0};if(!!F){if(i||l){var B=S==="y"?it:ft,H=S==="y"?mt:dt,Y=S==="y"?"height":"width",he=F[S],oe=F[S]+p[B],ce=F[S]-p[H],Z=y?-M[Y]/2:0,z=C===wn?w[Y]:M[Y],Q=C===wn?-M[Y]:-w[Y],De=e.elements.arrow,ve=y&&De?Qn(De):{width:0,height:0},Ne=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:er(),je=Ne[B],at=Ne[H],Pe=Jn(0,w[Y],ve[Y]),gt=A?w[Y]/2-Z-Pe-je-x:z-Pe-je-x,xt=A?-w[Y]/2+Z+Pe+at+x:Q+Pe+at+x,Je=e.elements.arrow&&on(e.elements.arrow),Fe=Je?S==="y"?Je.clientTop||0:Je.clientLeft||0:0,Ve=e.modifiersData.offset?e.modifiersData.offset[e.placement][S]:0,Rt=F[S]+gt-Ve-Fe,Gt=F[S]+xt-Ve;if(i){var Ft=Jn(y?Mn(oe,Rt):oe,he,y?Qt(ce,Gt):ce);F[S]=Ft,V[S]=Ft-he}if(l){var Mt=S==="x"?it:ft,gn=S==="x"?mt:dt,Ut=F[_],tn=Ut+p[Mt],sa=Ut-p[gn],la=Jn(y?Mn(tn,Rt):tn,Ut,y?Qt(sa,Gt):sa);F[_]=la,V[_]=la-Ut}}e.modifiersData[a]=V}}var rc={name:"preventOverflow",enabled:!0,phase:"main",fn:Cy,requiresIfExists:["offset"]};function Ho(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Wo(t){return t===ot(t)||!bt(t)?$n(t):Ho(t)}function Ay(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,a=e.height/t.offsetHeight||1;return n!==1||a!==1}function Go(t,e,n){n===void 0&&(n=!1);var a=bt(e),r=bt(e)&&Ay(e),i=Ct(e),o=Kt(t,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((vt(e)!=="body"||ta(i))&&(l=Wo(e)),bt(e)?(s=Kt(e,!0),s.x+=e.clientLeft,s.y+=e.clientTop):i&&(s.x=ea(i))),{x:o.left+l.scrollLeft-s.x,y:o.top+l.scrollTop-s.y,width:o.width,height:o.height}}function ky(t){var e=new Map,n=new Set,a=[];t.forEach(function(i){e.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var s=e.get(l);s&&r(s)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function Uo(t){var e=ky(t);return Gu.reduce(function(n,a){return n.concat(e.filter(function(r){return r.phase===a}))},[])}function zo(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Yo(t){var e=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(e).map(function(n){return e[n]})}var ic={placement:"bottom",modifiers:[],strategy:"absolute"};function oc(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function sc(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,a=n===void 0?[]:n,r=e.defaultOptions,i=r===void 0?ic:r;return function(l,s,d){d===void 0&&(d=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ic,i),modifiersData:{},elements:{reference:l,popper:s},attributes:{},styles:{}},c=[],h=!1,y={state:u,setOptions:function(k){var C=typeof k=="function"?k(u.options):k;v(),u.options=Object.assign({},i,u.options,C),u.scrollParents={reference:Dn(l)?Nn(l):l.contextElement?Nn(l.contextElement):[],popper:Nn(s)};var A=Uo(Yo([].concat(a,u.options.modifiers)));if(u.orderedModifiers=A.filter(function(B){return B.enabled}),!1){var S;if(getBasePlacement(u.options.placement)===auto)var _;var F,w,M,x,V}return m(),y.update()},forceUpdate:function(){if(!h){var k=u.elements,C=k.reference,A=k.popper;if(!!oc(C,A)){u.rects={reference:Go(C,on(A),u.options.strategy==="fixed"),popper:Qn(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(B){return u.modifiersData[B.name]=Object.assign({},B.data)});for(var S=0,_=0;_<u.orderedModifiers.length;_++){if(u.reset===!0){u.reset=!1,_=-1;continue}var F=u.orderedModifiers[_],w=F.fn,M=F.options,x=M===void 0?{}:M,V=F.name;typeof w=="function"&&(u=w({state:u,options:x,name:V,instance:y})||u)}}}},update:zo(function(){return new Promise(function(p){y.forceUpdate(),p(u)})}),destroy:function(){v(),h=!0}};if(!oc(l,s))return y;y.setOptions(d).then(function(p){!h&&d.onFirstUpdate&&d.onFirstUpdate(p)});function m(){u.orderedModifiers.forEach(function(p){var k=p.name,C=p.options,A=C===void 0?{}:C,S=p.effect;if(typeof S=="function"){var _=S({state:u,name:k,instance:y,options:A}),F=function(){};c.push(_||F)}})}function v(){c.forEach(function(p){return p()}),c=[]}return y}}var xy=[Qu,ac,Ku,Uu,nc,Ju,rc,Yu,tc],Zo=sc({defaultModifiers:xy});var lc=class{constructor(e,n,a){this.containerEl=n,this.owner=e,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),a.register([],"ArrowUp",()=>(this.setSelectedItem(this.selectedItem-1,!0),!1)),a.register([],"ArrowDown",()=>(this.setSelectedItem(this.selectedItem+1,!0),!1)),a.register([],"Enter",r=>(this.useSelectedItem(r),!1)),a.register([],"Tab",r=>(this.chooseSuggestion(r),!1))}chooseSuggestion(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.onChooseSuggestion(n,e)}onSuggestionClick(e,n){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,n){if(!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();let n=[];e.forEach(a=>{let r=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(a,r),n.push(r)}),this.items=e,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.selectSuggestion(n,e)}wrap(e,n){return(e%n+n)%n}setSelectedItem(e,n){let a=this.wrap(e,this.suggestions.length),r=this.suggestions[this.selectedItem],i=this.suggestions[a];r&&r.removeClass("is-selected"),i&&i.addClass("is-selected"),this.selectedItem=a,n&&i.scrollIntoView(!1)}},rr=class extends ri.FuzzySuggestModal{constructor(e,n,a){super(e);this.items=[];this.scope=new ri.Scope;this.emptyStateText="No match found";this.limit=100;this.inputEl=n,this.items=a,this.suggestEl=createDiv("suggestion-container"),this.contentEl=this.suggestEl.createDiv("suggestion"),this.suggester=new lc(this,this.contentEl,this.scope),this.scope.register([],"Escape",this.onEscape.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onFocus.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",r=>{r.preventDefault()})}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;let e=this.modifyInput(this.inputEl.value),n=this.getSuggestions(e);n.length>0?this.suggester.setSuggestions(n.slice(0,this.limit)):this.onNoSuggestion(),this.open()}onFocus(){this.shouldNotOpen=!1,this.onInputChanged()}modifyInput(e){return e}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv("suggestion-item"))}open(){this.app.keymap.pushScope(this.scope),document.body.appendChild(this.suggestEl),this.popper=Zo(this.inputEl,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"flip",options:{fallbackPlacements:["top"]}}]})}onEscape(){this.close(),this.shouldNotOpen=!0}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}createPrompt(e){this.promptEl||(this.promptEl=this.suggestEl.createDiv("prompt-instructions"));let n=this.promptEl.createDiv("prompt-instruction");for(let a of e)n.appendChild(a)}};var ir=class extends rr{constructor(e,n,a){super(e,n.inputEl,a);this.folders=[...a],this.text=n,this.inputEl.addEventListener("input",()=>this.getFolder())}getFolder(){let e=this.inputEl.value,n=this.app.vault.getAbstractFileByPath(e);n!=this.folder&&n instanceof uc.TFolder&&(this.folder=n,this.onInputChanged())}getItemText(e){return e.path}onChooseItem(e){this.text.setValue(e.path),this.folder=e}selectSuggestion({item:e}){let n=e.path;this.text.setValue(n),this.onClose(),this.close()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;s<a.path.length;s++){let d=r.matches.find(u=>u[0]===s);if(d){let u=l[r.matches.indexOf(d)];i.appendChild(u),u.appendText(a.path.substring(d[0],d[1])),s+=d[1]-d[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}getItems(){return this.folders}};function Fy(t){be(t,"svelte-1ezzfh1",".text-area-component.svelte-1ezzfh1{display:flex;flex-flow:column nowrap;align-items:flex-start;width:100%}textarea.svelte-1ezzfh1{width:100%}")}function Ty(t){let e,n,a,r,i,o,l;return{c(){e=T("div"),n=T("label"),a=me(t[1]),r=j(),i=T("textarea"),D(i,"spellcheck","false"),D(i,"placeholder",t[2]),D(i,"class","svelte-1ezzfh1"),D(e,"class","text-area-component setting-item svelte-1ezzfh1"),pe(e,"cls",t[3])},m(s,d){q(s,e,d),E(e,n),E(n,a),E(e,r),E(e,i),yt(i,t[0]),o||(l=[ie(i,"input",t[5]),ie(i,"blur",t[6])],o=!0)},p(s,[d]){d&2&&we(a,s[1]),d&4&&D(i,"placeholder",s[2]),d&1&&yt(i,s[0]),d&8&&pe(e,"cls",s[3])},i:X,o:X,d(s){s&&O(e),o=!1,_e(l)}}}function Sy(t,e,n){let a=Se(),{value:r}=e,{name:i}=e,{placeholder:o=i}=e,{cls:l=""}=e;function s(){r=this.value,n(0,r)}let d=()=>a("blur",r);return t.$$set=u=>{"value"in u&&n(0,r=u.value),"name"in u&&n(1,i=u.name),"placeholder"in u&&n(2,o=u.placeholder),"cls"in u&&n(3,l=u.cls)},[r,i,o,l,a,s,d]}var cc=class extends de{constructor(e){super();fe(this,e,Sy,Ty,se,{value:0,name:1,placeholder:2,cls:3},Fy)}},dc=cc;function By(t){be(t,"svelte-9iftg2","input.warn.svelte-9iftg2{border-color:var(--text-error)}")}function fc(t){let e;function n(i,o){return typeof i[4]=="string"?Ny:My}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),q(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&O(e)}}}function My(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-description")},m(i,o){q(i,e,o),a||(r=le(n=t[7].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function Ny(t){let e,n;return{c(){e=T("div"),n=me(t[4]),D(e,"class","setting-item-description")},m(a,r){q(a,e,r),E(e,n)},p(a,r){r&16&&we(n,a[4])},d(a){a&&O(e)}}}function hc(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=hn.call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Iy(t){let e,n,a;return{c(){e=T("input"),D(e,"type","number"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),pe(e,"warn",t[2])},m(r,i){q(r,e,i),yt(e,t[0]),n||(a=[ie(e,"input",t[12]),ie(e,"blur",t[13])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&rn(e.value)!==r[0]&&yt(e,r[0]),i&4&&pe(e,"warn",r[2])},d(r){r&&O(e),n=!1,_e(a)}}}function Oy(t){let e,n,a;return{c(){e=T("input"),D(e,"type","text"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),pe(e,"warn",t[2])},m(r,i){q(r,e,i),yt(e,t[0]),n||(a=[ie(e,"input",t[10]),ie(e,"blur",t[11])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&e.value!==r[0]&&yt(e,r[0]),i&4&&pe(e,"warn",r[2])},d(r){r&&O(e),n=!1,_e(a)}}}function qy(t){let e,n,a=t[2]&&hc(t);function r(l,s){if(l[3]=="text")return Oy;if(l[3]=="number")return Iy}let i=r(t,-1),o=i&&i(t);return{c(){a&&a.c(),e=j(),o&&o.c(),n=Ue()},m(l,s){a&&a.m(l,s),q(l,e,s),o&&o.m(l,s),q(l,n,s)},p(l,s){l[2]?a||(a=hc(l),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),i===(i=r(l,s))&&o?o.p(l,s):(o&&o.d(1),o=i&&i(l),o&&(o.c(),o.m(n.parentNode,n)))},d(l){a&&a.d(l),l&&O(e),o&&o.d(l),l&&O(n)}}}function Ry(t){let e,n,a,r,i,o,l,s,d,u=t[4]&&fc(t),c=t[9].default,h=Pr(c,t,t[8],null),y=h||qy(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[1]),i=j(),u&&u.c(),o=j(),l=T("div"),s=T("div"),y&&y.c(),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","warning-container"),D(l,"class","setting-item-control"),D(e,"class","setting-item")},m(m,v){q(m,e,v),E(e,n),E(n,a),E(a,r),E(n,i),u&&u.m(n,null),E(e,o),E(e,l),E(l,s),y&&y.m(s,null),d=!0},p(m,[v]){(!d||v&2)&&we(r,m[1]),m[4]?u?u.p(m,v):(u=fc(m),u.c(),u.m(n,null)):u&&(u.d(1),u=null),h?h.p&&(!d||v&256)&&Vr(h,c,m,m[8],d?jr(c,m[8],v,null):Hr(m[8]),null):y&&y.p&&(!d||v&45)&&y.p(m,d?v:-1)},i(m){d||(R(y,m),d=!0)},o(m){W(y,m),d=!1},d(m){m&&O(e),u&&u.d(),y&&y.d(m)}}}function Ly(t,e,n){let{$$slots:a={},$$scope:r}=e,i=Se(),{value:o}=e,{name:l}=e,{warn:s=!1}=e,{type:d="text"}=e,{desc:u}=e,{placeholder:c=l}=e,h=k=>{k.append(u.cloneNode(!0))};function y(){o=this.value,n(0,o)}let m=()=>{i("blur",o)};function v(){o=rn(this.value),n(0,o)}let p=()=>{i("blur",o)};return t.$$set=k=>{"value"in k&&n(0,o=k.value),"name"in k&&n(1,l=k.name),"warn"in k&&n(2,s=k.warn),"type"in k&&n(3,d=k.type),"desc"in k&&n(4,u=k.desc),"placeholder"in k&&n(5,c=k.placeholder),"$$scope"in k&&n(8,r=k.$$scope)},[o,l,s,d,u,c,i,h,r,a,y,m,v,p]}var mc=class extends de{constructor(e){super();fe(this,e,Ly,Ry,se,{value:0,name:1,warn:2,type:3,desc:4,placeholder:5},By)}},En=mc;function pc(t){let e;function n(i,o){return typeof i[1]=="string"?jy:Py}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),q(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&O(e)}}}function Py(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-description")},m(i,o){q(i,e,o),a||(r=le(n=t[4].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function jy(t){let e,n;return{c(){e=T("div"),n=me(t[1]),D(e,"class","setting-item-description")},m(a,r){q(a,e,r),E(e,n)},p(a,r){r&2&&we(n,a[1])},d(a){a&&O(e)}}}function Vy(t){let e,n,a,r,i,o,l,s,d,u,c=t[1]&&pc(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[0]),i=j(),c&&c.c(),o=j(),l=T("div"),s=T("div"),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","checkbox-container"),pe(s,"is-disabled",t[3]),pe(s,"is-enabled",t[2]),D(l,"class","setting-item-control"),D(e,"class","setting-item mod-toggle")},m(h,y){q(h,e,y),E(e,n),E(n,a),E(a,r),E(n,i),c&&c.m(n,null),E(e,o),E(e,l),E(l,s),d||(u=ie(s,"click",t[5]),d=!0)},p(h,[y]){y&1&&we(r,h[0]),h[1]?c?c.p(h,y):(c=pc(h),c.c(),c.m(n,null)):c&&(c.d(1),c=null),y&8&&pe(s,"is-disabled",h[3]),y&4&&pe(s,"is-enabled",h[2])},i:X,o:X,d(h){h&&O(e),c&&c.d(),d=!1,u()}}}function Hy(t,e,n){let{name:a}=e,{desc:r}=e,{value:i}=e,{disabled:o=!1}=e,l=d=>{d.append(r)};function s(d){ue.call(this,t,d)}return t.$$set=d=>{"name"in d&&n(0,a=d.name),"desc"in d&&n(1,r=d.desc),"value"in d&&n(2,i=d.value),"disabled"in d&&n(3,o=d.disabled)},[a,r,i,o,l,s]}var gc=class extends de{constructor(e){super();fe(this,e,Hy,Vy,se,{name:0,desc:1,value:2,disabled:3})}},Tt=gc;function Wy(t){be(t,"svelte-1uda69j",".fantasy-calendar-info.svelte-1uda69j .setting-item{padding-top:18px}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description{display:flex;flex-flow:column;align-items:flex-start}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description textarea{width:100%}")}function yc(t){let e,n,a,r,i,o;e=new En({props:{name:"Events Folder",desc:"The plugin will only parse files in this folder for events.",value:t[0].path,$$slots:{default:[Gy]},$$scope:{ctx:t}}}),a=new Tt({props:{name:"Support Timelines Events",desc:t[2],value:t[3]}}),a.$on("click",t[17]);let l=t[3]&&vc(t);return{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),l&&l.c(),i=Ue()},m(s,d){ee(e,s,d),q(s,n,d),ee(a,s,d),q(s,r,d),l&&l.m(s,d),q(s,i,d),o=!0},p(s,d){let u={};d&1&&(u.value=s[0].path),d&262144&&(u.$$scope={dirty:d,ctx:s}),e.$set(u);let c={};d&4&&(c.desc=s[2]),d&8&&(c.value=s[3]),a.$set(c),s[3]?l?(l.p(s,d),d&8&&R(l,1)):(l=vc(s),l.c(),R(l,1),l.m(i.parentNode,i)):l&&(Ee(),W(l,1,1,()=>{l=null}),Ce())},i(s){o||(R(e.$$.fragment,s),R(a.$$.fragment,s),R(l),o=!0)},o(s){W(e.$$.fragment,s),W(a.$$.fragment,s),W(l),o=!1},d(s){J(e,s),s&&O(n),J(a,s),s&&O(r),l&&l.d(s),s&&O(i)}}}function Gy(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=t[9].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function vc(t){let e=t[0].syncTimelines,n,a,r=bc(t);return{c(){r.c(),n=Ue()},m(i,o){r.m(i,o),q(i,n,o),a=!0},p(i,o){o&1&&se(e,e=i[0].syncTimelines)?(Ee(),W(r,1,1,X),Ce(),r=bc(i),r.c(),R(r),r.m(n.parentNode,n)):r.p(i,o)},i(i){a||(R(r),a=!0)},o(i){W(r),a=!1},d(i){i&&O(n),r.d(i)}}}function Uy(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","setting-item-control")},m(i,o){q(i,e,o),a||(r=le(n=t[10].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function bc(t){let e,n;return e=new En({props:{name:"Default Timelines Tag",desc:t[1],value:"",$$slots:{default:[Uy]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.desc=a[1]),r&262144&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function zy(t){let e,n,a,r,i,o,l,s,d,u,c,h;n=new En({props:{name:"Calendar Name",warn:!t[5],desc:t[5]?"":"The calendar must have a name",value:t[0].name}}),n.$on("blur",t[12]),r=new dc({props:{name:"Calendar Description",value:t[0].description}}),r.$on("blur",t[13]),o=new Tt({props:{name:"Display Day Number",desc:"Display day of year in Day View",value:t[7]}}),o.$on("click",t[14]),s=new Tt({props:{name:"Auto Increment Day",desc:"Automatically increment the current day every real-world day.",value:t[6]}}),s.$on("click",t[15]),u=new Tt({props:{name:"Parse Files for Events",desc:"The plugin will automatically parse files in the vault for events.",value:t[4]}}),u.$on("click",t[16]);let y=t[4]&&yc(t);return{c(){e=T("div"),te(n.$$.fragment),a=j(),te(r.$$.fragment),i=j(),te(o.$$.fragment),l=j(),te(s.$$.fragment),d=j(),te(u.$$.fragment),c=j(),y&&y.c(),D(e,"class","fantasy-calendar-info svelte-1uda69j")},m(m,v){q(m,e,v),ee(n,e,null),E(e,a),ee(r,e,null),E(e,i),ee(o,e,null),E(e,l),ee(s,e,null),E(e,d),ee(u,e,null),E(e,c),y&&y.m(e,null),h=!0},p(m,v){let p={};v&32&&(p.warn=!m[5]),v&32&&(p.desc=m[5]?"":"The calendar must have a name"),v&1&&(p.value=m[0].name),n.$set(p);let k={};v&1&&(k.value=m[0].description),r.$set(k);let C={};v&128&&(C.value=m[7]),o.$set(C);let A={};v&64&&(A.value=m[6]),s.$set(A);let S={};v&16&&(S.value=m[4]),u.$set(S),m[4]?y?(y.p(m,v),v&16&&R(y,1)):(y=yc(m),y.c(),R(y,1),y.m(e,null)):y&&(Ee(),W(y,1,1,()=>{y=null}),Ce())},i(m){h||(R(n.$$.fragment,m),R(r.$$.fragment,m),R(o.$$.fragment,m),R(s.$$.fragment,m),R(u.$$.fragment,m),R(y),h=!0)},o(m){W(n.$$.fragment,m),W(r.$$.fragment,m),W(o.$$.fragment,m),W(s.$$.fragment,m),W(u.$$.fragment,m),W(y),h=!1},d(m){m&&O(e),J(n),J(r),J(o),J(s),J(u),y&&y.d()}}}function Yy(t){let e,n;return e=new ct({props:{name:"Basic Info",warn:!t[5],label:"The calendar must have a name",$$slots:{default:[zy]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&32&&(i.warn=!a[5]),r&262399&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Zy(t,e,n){let a,r,i,o,l,s,d,{plugin:u}=e,{calendar:c}=e,h=Xe("store");h.subscribe(_=>n(0,c=_)),c.timelineTag||(c.timelineTag=or.timelineTag);let y=_=>{let F=u.app.vault.getAllLoadedFiles().filter(x=>x instanceof mn.TFolder),w=new mn.TextComponent(_);c.path||n(0,c.path="/",c),w.setPlaceholder(c.path??"/");let M=new ir(u.app,w,[...F]);M.onClose=async()=>{let x=w.inputEl.value?.trim()?w.inputEl.value.trim():"/";n(0,c.path=(0,mn.normalizePath)(x),c)},w.inputEl.onblur=async()=>{let x=w.inputEl.value?.trim()?w.inputEl.value.trim():"/";n(0,c.path=(0,mn.normalizePath)(x),c)}},m=_=>{new mn.TextComponent(_).setValue(`${c.timelineTag??""}`.replace("#","")).setDisabled(c.syncTimelines).onChange(M=>{n(0,c.timelineTag=M.startsWith("#")?M:`#${M}`,c),u.saveSettings()});let w=new mn.ExtraButtonComponent(_);if(!u.canUseTimelines){n(0,c.syncTimelines=!1,c),w.extraSettingsEl.detach();return}c.syncTimelines?w.setIcon("checkmark").setTooltip("Unsync from Timelines Plugin").onClick(async()=>{n(0,c.syncTimelines=!1,c),await u.saveSettings()}):w.setIcon("sync").setTooltip("Sync with Timelines Plugin").onClick(async()=>{n(0,c.syncTimelines=!0,c),n(0,c.timelineTag=u.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag,c),await u.saveSettings()})},v=_=>{n(0,c.name=_.detail,c),h.set(c)},p=_=>n(0,c.description=_.detail,c),k=()=>{n(0,c.static.displayDayNumber=!c.static.displayDayNumber,c)},C=()=>{n(0,c.static.incrementDay=!c.static.incrementDay,c)},A=()=>{n(0,c.autoParse=!c.autoParse,c)},S=()=>{n(0,c.supportTimelines=!c.supportTimelines,c)};t.$$set=_=>{"plugin"in _&&n(11,u=_.plugin),"calendar"in _&&n(0,c=_.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(7,a=c.static.displayDayNumber)}if(t.$$.dirty&1){e:n(6,r=c.static.incrementDay)}if(t.$$.dirty&1){e:n(5,i=c.name!=null&&c.name.length)}if(t.$$.dirty&1){e:n(4,o=c.autoParse)}if(t.$$.dirty&1){e:n(3,l=c.supportTimelines)}};e:n(2,s=createFragment(_=>{_.createSpan({text:"Support "}),_.createEl("code",{text:"<span>"}),_.createSpan({text:" elements used by the "}),_.createEl("a",{text:"Obsidian Timelines",href:"obsidian://show-plugin?id=obsidian-timelines"}),_.createSpan({text:" plugin (by Darakah)."})}));e:n(1,d=createFragment(_=>{_.createSpan({text:"Tag to specify which notes to include in created timelines, e.g. "}),_.createEl("code",{text:"timeline"}),_.createSpan({text:" to use the "}),_.createEl("code",{text:"#timeline"}),_.createSpan({text:" tag."})}));return[c,d,s,l,o,i,r,a,h,y,m,u,v,p,k,C,A,S]}var wc=class extends de{constructor(e){super();fe(this,e,Zy,Yy,se,{plugin:11,calendar:0},Wy)}},Dc=wc;function Aa(t,{from:e,to:n},a={}){let r=getComputedStyle(t),i=r.transform==="none"?"":r.transform,[o,l]=r.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*o/n.width-(n.left+o),d=e.top+e.height*l/n.height-(n.top+l),{delay:u=0,duration:c=y=>Math.sqrt(y)*120,easing:h=Kr}=a;return{delay:u,duration:rt(c)?c(Math.sqrt(s*s+d*d)):c,easing:h,css:(y,m)=>{let v=m*s,p=m*d,k=y+m*e.width/n.width,C=y+m*e.height/n.height;return`transform: ${i} translate(${v}px, ${p}px) scale(${k}, ${C});`}}}function sr(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sr=function(e){return typeof e}:sr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(t)}function lr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function na(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_c(Object(n),!0).forEach(function(a){lr(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_c(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Ky(t,e){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Qy(t,e){if(t==null)return{};var n=Ky(t,e),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(e.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(n[a]=t[a]))}return n}function Xy(t,e){return $y(t)||tv(t,e)||Ko(t,e)||av()}function ii(t){return Jy(t)||ev(t)||Ko(t)||nv()}function Jy(t){if(Array.isArray(t))return Qo(t)}function $y(t){if(Array.isArray(t))return t}function ev(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function tv(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var n=[],a=!0,r=!1,i=void 0;try{for(var o=t[Symbol.iterator](),l;!(a=(l=o.next()).done)&&(n.push(l.value),!(e&&n.length===e));a=!0);}catch(s){r=!0,i=s}finally{try{!a&&o.return!=null&&o.return()}finally{if(r)throw i}}return n}}function Ko(t,e){if(!!t){if(typeof t=="string")return Qo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qo(t,e)}}function Qo(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function nv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function av(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xo(t,e){var n;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=Ko(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var a=0,r=function(){};return{s:r,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,l;return{s:function(){n=t[Symbol.iterator]()},n:function(){var s=n.next();return i=s.done,s},e:function(s){o=!0,l=s},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}}}var rv="finalize",iv="consider";function ka(t,e,n){t.dispatchEvent(new CustomEvent(rv,{detail:{items:e,info:n}}))}function In(t,e,n){t.dispatchEvent(new CustomEvent(iv,{detail:{items:e,info:n}}))}var oi="draggedEntered",ur="draggedLeft",si="draggedOverIndex",Jo="draggedLeftDocument",li={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function ov(t,e,n){t.dispatchEvent(new CustomEvent(oi,{detail:{indexObj:e,draggedEl:n}}))}function sv(t,e,n){t.dispatchEvent(new CustomEvent(ur,{detail:{draggedEl:e,type:li.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function lv(t,e){t.dispatchEvent(new CustomEvent(ur,{detail:{draggedEl:e,type:li.OUTSIDE_OF_ANY}}))}function uv(t,e,n){t.dispatchEvent(new CustomEvent(si,{detail:{indexObj:e,draggedEl:n}}))}function cv(t){window.dispatchEvent(new CustomEvent(Jo,{detail:{draggedEl:t}}))}var st={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:oi,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:si,DRAGGED_LEFT:ur,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},nt={POINTER:"pointer",KEYBOARD:"keyboard"},ui="isDndShadowItem",$o="data-is-dnd-shadow-item",es="id:dnd-shadow-placeholder-0000",dv="dnd-action-dragged-el",Dt="id",ts=0;function Ec(){ts++}function Cc(){if(ts===0)throw new Error("Bug! trying to decrement when there are no dropzones");ts--}var fv=typeof window=="undefined",Be=function(){};function Ac(t){var e,n=t.getBoundingClientRect(),a=getComputedStyle(t),r=a.transform;if(r){var i,o,l,s;if(r.startsWith("matrix3d("))e=r.slice(9,-1).split(/, /),i=+e[0],o=+e[5],l=+e[12],s=+e[13];else if(r.startsWith("matrix("))e=r.slice(7,-1).split(/, /),i=+e[0],o=+e[3],l=+e[4],s=+e[5];else return n;var d=a.transformOrigin,u=n.x-l-(1-i)*parseFloat(d),c=n.y-s-(1-o)*parseFloat(d.slice(d.indexOf(" ")+1)),h=i?n.width/i:t.offsetWidth,y=o?n.height/o:t.offsetHeight;return{x:u,y:c,width:h,height:y,top:c,right:u+h,bottom:c+y,left:u}}else return n}function kc(t){var e=Ac(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function ns(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function xc(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function hv(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function as(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function cr(t){return xc(ns(t))}function Fc(t,e){var n=cr(t),a=kc(e);return as(n,a)}function mv(t,e){var n=cr(t),a=cr(e);return hv(n,a)}function pv(t){var e=ns(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function gv(t,e){var n=ns(e);return as(t,n)?{top:t.y-n.top,bottom:n.bottom-t.y,left:t.x-n.left,right:Math.min(n.right,document.documentElement.clientWidth)-t.x}:null}var xa;function Tc(){Be(function(){return"resetting indexes cache"}),xa=new Map}Tc();function yv(t){var e=Array.from(t.children).findIndex(function(n){return n.getAttribute($o)});if(e>=0)return xa.has(t)||xa.set(t,new Map),xa.get(t).set(e,kc(t.children[e])),e}function vv(t,e){if(!Fc(t,e))return null;var n=e.children;if(n.length===0)return{index:0,isProximityBased:!0};for(var a=yv(e),r=0;r<n.length;r++)if(Fc(t,n[r])){var i=xa.has(e)&&xa.get(e).get(r);return i&&!as(cr(t),i)?{index:a,isProximityBased:!1}:{index:r,isProximityBased:!1}}for(var o=Number.MAX_VALUE,l=void 0,s=0;s<n.length;s++){var d=mv(t,n[s]);d<o&&(o=d,l=s)}return{index:l,isProximityBased:!0}}var dr=25;function Sc(){var t;function e(){t={directionObj:void 0,stepPx:0}}e();function n(i){var o=t,l=o.directionObj,s=o.stepPx;l&&(i.scrollBy(l.x*s,l.y*s),window.requestAnimationFrame(function(){return n(i)}))}function a(i){return dr-i}function r(i,o){if(!o)return!1;var l=gv(i,o);if(l===null)return e(),!1;var s=!!t.directionObj,d=!1,u=!1;return o.scrollHeight>o.clientHeight&&(l.bottom<dr?(d=!0,t.directionObj={x:0,y:1},t.stepPx=a(l.bottom)):l.top<dr&&(d=!0,t.directionObj={x:0,y:-1},t.stepPx=a(l.top)),!s&&d)||o.scrollWidth>o.clientWidth&&(l.right<dr?(u=!0,t.directionObj={x:1,y:0},t.stepPx=a(l.right)):l.left<dr&&(u=!0,t.directionObj={x:-1,y:0},t.stepPx=a(l.left)),!s&&u)?(n(o),!0):(e(),!1)}return{scrollIfNeeded:r,resetScrolling:e}}function Cn(t){return JSON.stringify(t,null,2)}function Bc(t){if(!t)throw new Error("cannot get depth of a falsy node");return Mc(t,0)}function Mc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.parentElement?Mc(t.parentElement,e+1):e-1}function bv(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!{}.hasOwnProperty.call(e,n)||e[n]!==t[n])return!1;return!0}function wv(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Dv=200,Nc=10,Ic=Sc(),_v=Ic.scrollIfNeeded,Ev=Ic.resetScrolling,rs;function Cv(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dv,a,r,i=!1,o,l=Array.from(e).sort(function(d,u){return Bc(u)-Bc(d)});function s(){var d=cr(t),u=_v(d,a);if(!u&&o&&Math.abs(o.x-d.x)<Nc&&Math.abs(o.y-d.y)<Nc){rs=window.setTimeout(s,n);return}if(pv(t)){Be(function(){return"off document"}),cv(t);return}o=d;var c=!1,h=Xo(l),y;try{for(h.s();!(y=h.n()).done;){var m=y.value,v=vv(t,m);if(v!==null){var p=v.index;c=!0,m!==a?(a&&sv(a,t,m),ov(m,v,t),a=m):p!==r&&(uv(m,v,t),r=p);break}}}catch(k){h.e(k)}finally{h.f()}!c&&i&&a?(lv(a,t),a=void 0,r=void 0,i=!1):i=!0,rs=window.setTimeout(s,n)}s()}function Av(){Be(function(){return"unobserving"}),clearTimeout(rs),Ev(),Tc()}var kv=300,ci;function di(t){var e=t.touches?t.touches[0]:t;ci={x:e.clientX,y:e.clientY}}var Oc=Sc(),xv=Oc.scrollIfNeeded,Fv=Oc.resetScrolling,qc;function Rc(){ci&&xv(ci,document.documentElement),qc=window.setTimeout(Rc,kv)}function Tv(){Be(function(){return"arming window scroller"}),window.addEventListener("mousemove",di),window.addEventListener("touchmove",di),Rc()}function Sv(){Be(function(){return"disarming window scroller"}),window.removeEventListener("mousemove",di),window.removeEventListener("touchmove",di),ci=void 0,window.clearTimeout(qc),Fv()}var Bv=.2;function aa(t){return"".concat(t," ").concat(Bv,"s ease")}function Mv(t,e){var n=t.getBoundingClientRect(),a=t.cloneNode(!0);Lc(t,a),a.id=dv,a.style.position="fixed";var r=n.top,i=n.left;if(a.style.top="".concat(r,"px"),a.style.left="".concat(i,"px"),e){var o=xc(n);r-=o.y-e.y,i-=o.x-e.x,window.setTimeout(function(){a.style.top="".concat(r,"px"),a.style.left="".concat(i,"px")},0)}return a.style.margin="0",a.style.boxSizing="border-box",a.style.height="".concat(n.height,"px"),a.style.width="".concat(n.width,"px"),a.style.transition="".concat(aa("top"),", ").concat(aa("left"),", ").concat(aa("background-color"),", ").concat(aa("opacity"),", ").concat(aa("color")," "),window.setTimeout(function(){return a.style.transition+=", ".concat(aa("width"),", ").concat(aa("height"))},0),a.style.zIndex="9999",a.style.cursor="grabbing",a}function Nv(t){t.style.cursor="grab"}function Iv(t,e,n,a,r){var i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),l=i.width-o.width,s=i.height-o.height;if(l||s){var d={left:(n-o.left)/o.width,top:(a-o.top)/o.height};t.style.height="".concat(i.height,"px"),t.style.width="".concat(i.width,"px"),t.style.left="".concat(parseFloat(t.style.left)-d.left*l,"px"),t.style.top="".concat(parseFloat(t.style.top)-d.top*s,"px")}Lc(e,t),r()}function Lc(t,e){var n=window.getComputedStyle(t);Array.from(n).filter(function(a){return a.startsWith("background")||a.startsWith("padding")||a.startsWith("font")||a.startsWith("text")||a.startsWith("align")||a.startsWith("justify")||a.startsWith("display")||a.startsWith("flex")||a.startsWith("border")||a==="opacity"||a==="color"||a==="list-style-type"}).forEach(function(a){return e.style.setProperty(a,n.getPropertyValue(a),n.getPropertyPriority(a))})}function Ov(t,e){t.draggable=!1,t.ondragstart=function(){return!1},e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function qv(t){t.style.display="none",t.style.position="fixed",t.style.zIndex="-5"}function Rv(t){t.style.visibility="hidden",t.setAttribute($o,"true")}function Lv(t){t.style.visibility="",t.removeAttribute($o)}function fi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=r[i]}),n(a).forEach(function(i){return a.classList.add(i)})})}function hi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=""}),n(a).forEach(function(i){return a.classList.contains(i)&&a.classList.remove(i)})})}function Pv(t){var e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");var n=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=n}}var jv="--any--",Vv=100,Pc=3,jc={outline:"rgba(255, 255, 102, 0.7) solid 2px"},pn,At,Yt,mi,ht,pi,Fa,Ht,On,Jt,Ta=!1,is=!1,os,fr=!1,ln=new Map,pt=new Map,ss=new WeakMap;function Hv(t,e){Be(function(){return"registering drop-zone if absent"}),ln.has(e)||ln.set(e,new Set),ln.get(e).has(t)||(ln.get(e).add(t),Ec())}function Vc(t,e){ln.get(e).delete(t),Cc(),ln.get(e).size===0&&ln.delete(e)}function Wv(){Be(function(){return"watching dragged element"}),Tv();var t=ln.get(mi),e=Xo(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.addEventListener(oi,Hc),a.addEventListener(ur,Wc),a.addEventListener(si,Gc)}}catch(i){e.e(i)}finally{e.f()}window.addEventListener(Jo,Sa);var r=Math.max.apply(Math,[Vv].concat(ii(Array.from(t.keys()).map(function(i){return pt.get(i).dropAnimationDurationMs}))));Cv(At,t,r*1.07)}function Gv(){Be(function(){return"unwatching dragged element"}),Sv();var t=ln.get(mi),e=Xo(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.removeEventListener(oi,Hc),a.removeEventListener(ur,Wc),a.removeEventListener(si,Gc)}}catch(r){e.e(r)}finally{e.f()}window.removeEventListener(Jo,Sa),Av()}function Uv(t){return t.findIndex(function(e){return e[Dt]===es})}function gi(t){return t.findIndex(function(e){return!!e[ui]&&e[Dt]!==es})}function Hc(t){Be(function(){return["dragged entered",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht){Be(function(){return"ignoring dragged entered because drop is currently disabled"});return}if(fr=!1,n=n.filter(function(c){return c[Dt]!==Fa[Dt]}),Be(function(){return"dragged entered items ".concat(Cn(n))}),ht!==t.currentTarget){var r=pt.get(ht).items,i=r.filter(function(c){return!c[ui]});In(ht,i,{trigger:st.DRAGGED_ENTERED_ANOTHER,id:Yt[Dt],source:nt.POINTER})}else{var o=Uv(n);o!==-1&&(Be(function(){return"removing placeholder item from origin dz"}),n.splice(o,1))}var l=t.detail.indexObj,s=l.index,d=l.isProximityBased,u=d&&s===t.currentTarget.children.length-1?s+1:s;Ht=t.currentTarget,n.splice(u,0,Fa),In(t.currentTarget,n,{trigger:st.DRAGGED_ENTERED,id:Yt[Dt],source:nt.POINTER})}function Wc(t){if(!!Ta){Be(function(){return["dragged left",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht&&t.currentTarget!==Ht){Be(function(){return"drop is currently disabled"});return}var r=gi(n),i=n.splice(r,1)[0];Ht=void 0;var o=t.detail,l=o.type,s=o.theOtherDz;if(l===li.OUTSIDE_OF_ANY||l===li.LEFT_FOR_ANOTHER&&s!==ht&&pt.get(s).dropFromOthersDisabled){Be(function(){return"dragged left all, putting shadow element back in the origin dz"}),fr=!0,Ht=ht;var d=pt.get(ht).items;d.splice(pi,0,i),In(ht,d,{trigger:st.DRAGGED_LEFT_ALL,id:Yt[Dt],source:nt.POINTER})}In(t.currentTarget,n,{trigger:st.DRAGGED_LEFT,id:Yt[Dt],source:nt.POINTER})}}function Gc(t){Be(function(){return["dragged is over index",t.currentTarget,t.detail]});var e=pt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==ht){Be(function(){return"drop is currently disabled"});return}fr=!1;var r=t.detail.indexObj.index,i=gi(n);n.splice(i,1),n.splice(r,0,Fa),In(t.currentTarget,n,{trigger:st.DRAGGED_OVER_INDEX,id:Yt[Dt],source:nt.POINTER})}function yi(t){t.preventDefault();var e=t.touches?t.touches[0]:t;Jt={x:e.clientX,y:e.clientY},At.style.transform="translate3d(".concat(Jt.x-On.x,"px, ").concat(Jt.y-On.y,"px, 0)")}function Sa(){Be(function(){return"dropped"}),is=!0,window.removeEventListener("mousemove",yi),window.removeEventListener("touchmove",yi),window.removeEventListener("mouseup",Sa),window.removeEventListener("touchend",Sa),Gv(),Nv(At),Ht||(Be(function(){return"element was dropped right after it left origin but before entering somewhere else"}),Ht=ht),Be(function(){return["dropped in dz",Ht]});var t=pt.get(Ht),e=t.items,n=t.type;hi(ln.get(n),function(i){return pt.get(i).dropTargetStyle},function(i){return pt.get(i).dropTargetClasses});var a=gi(e);a===-1&&(a=pi),e=e.map(function(i){return i[ui]?Yt:i});function r(){os(),ka(Ht,e,{trigger:fr?st.DROPPED_OUTSIDE_OF_ANY:st.DROPPED_INTO_ZONE,id:Yt[Dt],source:nt.POINTER}),Ht!==ht&&ka(ht,pt.get(ht).items,{trigger:st.DROPPED_INTO_ANOTHER,id:Yt[Dt],source:nt.POINTER}),Lv(Ht.children[a]),Yv()}zv(a,r)}function zv(t,e){var n=Ac(Ht.children[t]),a={x:n.left-parseFloat(At.style.left),y:n.top-parseFloat(At.style.top)},r=pt.get(Ht),i=r.dropAnimationDurationMs,o="transform ".concat(i,"ms ease");At.style.transition=At.style.transition?At.style.transition+","+o:o,At.style.transform="translate3d(".concat(a.x,"px, ").concat(a.y,"px, 0)"),window.setTimeout(e,i)}function Yv(){At.remove(),pn.remove(),At=void 0,pn=void 0,Yt=void 0,mi=void 0,ht=void 0,pi=void 0,Fa=void 0,Ht=void 0,On=void 0,Jt=void 0,Ta=!1,is=!1,os=void 0,fr=!1}function Zv(t,e){var n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:jc,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1};Be(function(){return["dndzone good to go options: ".concat(Cn(e),", config: ").concat(Cn(n)),{node:t}]});var a=new Map;function r(){window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function i(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){i(),pn=void 0,On=void 0,Jt=void 0}function l(c){c.preventDefault();var h=c.touches?c.touches[0]:c;Jt={x:h.clientX,y:h.clientY},(Math.abs(Jt.x-On.x)>=Pc||Math.abs(Jt.y-On.y)>=Pc)&&(i(),d())}function s(c){if(c.target!==c.currentTarget&&(c.target.value!==void 0||c.target.isContentEditable)){Be(function(){return"won't initiate drag on a nested input element"});return}if(c.button){Be(function(){return"ignoring none left click button: ".concat(c.button)});return}if(Ta){Be(function(){return"cannot start a new drag before finalizing previous one"});return}c.stopPropagation();var h=c.touches?c.touches[0]:c;On={x:h.clientX,y:h.clientY},Jt=na({},On),pn=c.currentTarget,r()}function d(){Be(function(){return["drag start config: ".concat(Cn(n)),pn]}),Ta=!0;var c=a.get(pn);pi=c,ht=pn.parentElement;var h=ht.getRootNode(),y=h.body||h,m=n.items,v=n.type,p=n.centreDraggedOnCursor;Yt=na({},m[c]),mi=v,Fa=na(na({},Yt),{},lr({},ui,!0));var k=na(na({},Fa),{},lr({},Dt,es));At=Mv(pn,p&&Jt);function C(){At.parentElement?window.requestAnimationFrame(C):(y.appendChild(At),At.focus(),Wv(),qv(pn),y.appendChild(pn))}window.requestAnimationFrame(C),fi(Array.from(ln.get(n.type)).filter(function(A){return A===ht||!pt.get(A).dropFromOthersDisabled}),function(A){return pt.get(A).dropTargetStyle},function(A){return pt.get(A).dropTargetClasses}),m.splice(c,1,k),os=Pv(ht),In(ht,m,{trigger:st.DRAG_STARTED,id:Yt[Dt],source:nt.POINTER}),window.addEventListener("mousemove",yi,{passive:!1}),window.addEventListener("touchmove",yi,{passive:!1,capture:!1}),window.addEventListener("mouseup",Sa,{passive:!1}),window.addEventListener("touchend",Sa,{passive:!1})}function u(c){var h=c.items,y=h===void 0?void 0:h,m=c.flipDurationMs,v=m===void 0?0:m,p=c.type,k=p===void 0?jv:p,C=c.dragDisabled,A=C===void 0?!1:C,S=c.morphDisabled,_=S===void 0?!1:S,F=c.dropFromOthersDisabled,w=F===void 0?!1:F,M=c.dropTargetStyle,x=M===void 0?jc:M,V=c.dropTargetClasses,B=V===void 0?[]:V,H=c.transformDraggedElement,Y=H===void 0?function(){}:H,he=c.centreDraggedOnCursor,oe=he===void 0?!1:he;n.dropAnimationDurationMs=v,n.type&&k!==n.type&&Vc(t,n.type),n.type=k,Hv(t,k),n.items=ii(y),n.dragDisabled=A,n.morphDisabled=_,n.transformDraggedElement=Y,n.centreDraggedOnCursor=oe,Ta&&!is&&(!bv(x,n.dropTargetStyle)||!wv(B,n.dropTargetClasses))&&(hi([t],function(){return n.dropTargetStyle},function(){return B}),fi([t],function(){return x},function(){return B})),n.dropTargetStyle=x,n.dropTargetClasses=ii(B);function ce(ve,Ne){return pt.get(ve)?pt.get(ve)[Ne]:n[Ne]}Ta&&n.dropFromOthersDisabled!==w&&(w?hi([t],function(ve){return ce(ve,"dropTargetStyle")},function(ve){return ce(ve,"dropTargetClasses")}):fi([t],function(ve){return ce(ve,"dropTargetStyle")},function(ve){return ce(ve,"dropTargetClasses")})),n.dropFromOthersDisabled=w,pt.set(t,n);for(var Z=gi(n.items),z=function(Ne){var je=t.children[Ne];if(Ov(je,A),Ne===Z)return _||Iv(At,je,Jt.x,Jt.y,function(){return n.transformDraggedElement(At,Yt,Ne)}),Rv(je),"continue";je.removeEventListener("mousedown",ss.get(je)),je.removeEventListener("touchstart",ss.get(je)),A||(je.addEventListener("mousedown",s),je.addEventListener("touchstart",s),ss.set(je,s)),a.set(je,Ne)},Q=0;Q<t.children.length;Q++)var De=z(Q)}return u(e),{update:function(h){Be(function(){return"pointer dndzone will update newOptions: ".concat(Cn(h))}),u(h)},destroy:function(){Be(function(){return"pointer dndzone will destroy"}),Vc(t,n.type),pt.delete(t)}}}var vi,ls={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},Kv=(vi={},lr(vi,ls.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),lr(vi,ls.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),vi),Qv="dnd-action-aria-alert",qt;function Uc(){qt=document.createElement("div"),function(){qt.id=Qv,qt.style.position="fixed",qt.style.bottom="0",qt.style.left="0",qt.style.zIndex="-5",qt.style.opacity="0",qt.style.height="0",qt.style.width="0",qt.setAttribute("role","alert")}(),document.body.prepend(qt),Object.entries(Kv).forEach(function(t){var e=Xy(t,2),n=e[0],a=e[1];return document.body.prepend(Jv(n,a))})}function Xv(){return fv?null:(document.readyState==="complete"?Uc():window.addEventListener("DOMContentLoaded",Uc),na({},ls))}function Jv(t,e){var n=document.createElement("div");return n.id=t,n.innerHTML="<p>".concat(e,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Ba(t){qt.innerHTML="";var e=document.createTextNode(t);qt.appendChild(e),qt.style.display="none",qt.style.display="inline"}var $v="--any--",zc={outline:"rgba(255, 255, 102, 0.7) solid 2px"},$t=!1,us,St,ra="",ia,un,qn="",bi=new WeakSet,Yc=new WeakMap,Zc=new WeakMap,cs=new Map,kt=new Map,cn=new Map,Kc=Xv();function e0(t,e){Be(function(){return"registering drop-zone if absent"}),cn.size===0&&(Be(function(){return"adding global keydown and click handlers"}),window.addEventListener("keydown",Xc),window.addEventListener("click",Jc)),cn.has(e)||cn.set(e,new Set),cn.get(e).has(t)||(cn.get(e).add(t),Ec())}function Qc(t,e){Be(function(){return"unregistering drop-zone"}),St===t&&hr(),cn.get(e).delete(t),Cc(),cn.get(e).size===0&&cn.delete(e),cn.size===0&&(Be(function(){return"removing global keydown and click handlers"}),window.removeEventListener("keydown",Xc),window.removeEventListener("click",Jc))}function Xc(t){if(!!$t)switch(t.key){case"Escape":{hr();break}}}function Jc(){!$t||bi.has(document.activeElement)||(Be(function(){return"clicked outside of any draggable"}),hr())}function t0(t){if(Be(function(){return"zone focus"}),!!$t){var e=t.currentTarget;if(e!==St){ra=e.getAttribute("aria-label")||"";var n=kt.get(St),a=n.items,r=a.find(function(c){return c[Dt]===un}),i=a.indexOf(r),o=a.splice(i,1)[0],l=kt.get(e),s=l.items,d=l.autoAriaDisabled;e.getBoundingClientRect().top<St.getBoundingClientRect().top||e.getBoundingClientRect().left<St.getBoundingClientRect().left?(s.push(o),d||Ba("Moved item ".concat(qn," to the end of the list ").concat(ra))):(s.unshift(o),d||Ba("Moved item ".concat(qn," to the beginning of the list ").concat(ra)));var u=St;ka(u,a,{trigger:st.DROPPED_INTO_ANOTHER,id:un,source:nt.KEYBOARD}),ka(e,s,{trigger:st.DROPPED_INTO_ZONE,id:un,source:nt.KEYBOARD}),St=e}}}function $c(){cs.forEach(function(t,e){var n=t.update;return n(kt.get(e))})}function hr(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;Be(function(){return"drop"}),kt.get(St).autoAriaDisabled||Ba("Stopped dragging item ".concat(qn)),bi.has(document.activeElement)&&document.activeElement.blur(),t&&In(St,kt.get(St).items,{trigger:st.DRAG_STOPPED,id:un,source:nt.KEYBOARD}),hi(cn.get(us),function(e){return kt.get(e).dropTargetStyle},function(e){return kt.get(e).dropTargetClasses}),ia=null,un=null,qn="",us=null,St=null,ra="",$t=!1,$c()}function n0(t,e){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:zc,dropTargetClasses:[],autoAriaDisabled:!1};function a(u,c,h){u.length<=1||u.splice(h,1,u.splice(c,1,u[h])[0])}function r(u){switch(Be(function(){return["handling key down",u.key]}),u.key){case"Enter":case" ":{if((u.target.disabled!==void 0||u.target.href||u.target.isContentEditable)&&!bi.has(u.target))return;u.preventDefault(),u.stopPropagation(),$t?hr():i(u);break}case"ArrowDown":case"ArrowRight":{if(!$t)return;u.preventDefault(),u.stopPropagation();var c=kt.get(t),h=c.items,y=Array.from(t.children),m=y.indexOf(u.currentTarget);Be(function(){return["arrow down",m]}),m<y.length-1&&(n.autoAriaDisabled||Ba("Moved item ".concat(qn," to position ").concat(m+2," in the list ").concat(ra)),a(h,m,m+1),ka(t,h,{trigger:st.DROPPED_INTO_ZONE,id:un,source:nt.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!$t)return;u.preventDefault(),u.stopPropagation();var v=kt.get(t),p=v.items,k=Array.from(t.children),C=k.indexOf(u.currentTarget);Be(function(){return["arrow up",C]}),C>0&&(n.autoAriaDisabled||Ba("Moved item ".concat(qn," to position ").concat(C," in the list ").concat(ra)),a(p,C,C-1),ka(t,p,{trigger:st.DROPPED_INTO_ZONE,id:un,source:nt.KEYBOARD}));break}}}function i(u){Be(function(){return"drag start"}),l(u.currentTarget),St=t,us=n.type,$t=!0;var c=Array.from(cn.get(n.type)).filter(function(y){return y===St||!kt.get(y).dropFromOthersDisabled});if(fi(c,function(y){return kt.get(y).dropTargetStyle},function(y){return kt.get(y).dropTargetClasses}),!n.autoAriaDisabled){var h="Started dragging item ".concat(qn,". Use the arrow keys to move it within its list ").concat(ra);c.length>1&&(h+=", or tab to another list in order to move the item into it"),Ba(h)}In(t,kt.get(t).items,{trigger:st.DRAG_STARTED,id:un,source:nt.KEYBOARD}),$c()}function o(u){!$t||u.currentTarget!==ia&&(u.stopPropagation(),hr(!1),i(u))}function l(u){var c=kt.get(t),h=c.items,y=Array.from(t.children),m=y.indexOf(u);ia=u,ia.tabIndex=0,un=h[m][Dt],qn=y[m].getAttribute("aria-label")||""}function s(u){var c=u.items,h=c===void 0?[]:c,y=u.type,m=y===void 0?$v:y,v=u.dragDisabled,p=v===void 0?!1:v,k=u.zoneTabIndex,C=k===void 0?0:k,A=u.dropFromOthersDisabled,S=A===void 0?!1:A,_=u.dropTargetStyle,F=_===void 0?zc:_,w=u.dropTargetClasses,M=w===void 0?[]:w,x=u.autoAriaDisabled,V=x===void 0?!1:x;n.items=ii(h),n.dragDisabled=p,n.dropFromOthersDisabled=S,n.zoneTabIndex=C,n.dropTargetStyle=F,n.dropTargetClasses=M,n.autoAriaDisabled=V,V||(t.setAttribute("aria-disabled",p),t.setAttribute("role","list"),t.setAttribute("aria-describedby",p?Kc.DND_ZONE_DRAG_DISABLED:Kc.DND_ZONE_ACTIVE)),n.type&&m!==n.type&&Qc(t,n.type),n.type=m,e0(t,m),kt.set(t,n),$t?t.tabIndex=t===St||ia.contains(t)||n.dropFromOthersDisabled||St&&n.type!==kt.get(St).type?-1:0:t.tabIndex=n.zoneTabIndex,t.addEventListener("focus",t0);for(var B=function(he){var oe=t.children[he];bi.add(oe),oe.tabIndex=$t?-1:0,V||oe.setAttribute("role","listitem"),oe.removeEventListener("keydown",Yc.get(oe)),oe.removeEventListener("click",Zc.get(oe)),p||(oe.addEventListener("keydown",r),Yc.set(oe,r),oe.addEventListener("click",o),Zc.set(oe,o)),$t&&n.items[he][Dt]===un&&(Be(function(){return["focusing on",{i:he,focusedItemId:un}]}),ia=oe,ia.tabIndex=0,oe.focus())},H=0;H<t.children.length;H++)B(H)}s(e);var d={update:function(c){Be(function(){return"keyboard dndzone will update newOptions: ".concat(Cn(c))}),s(c)},destroy:function(){Be(function(){return"keyboard dndzone will destroy"}),Qc(t,n.type),kt.delete(t),cs.delete(t)}};return cs.set(t,d),d}function Ma(t,e){ed(e);var n=Zv(t,e),a=n0(t,e);return{update:function(i){ed(i),n.update(i),a.update(i)},destroy:function(){n.destroy(),a.destroy()}}}function ed(t){var e=t.items,n=t.flipDurationMs,a=t.type,r=t.dragDisabled,i=t.morphDisabled,o=t.dropFromOthersDisabled,l=t.zoneTabIndex,s=t.dropTargetStyle,d=t.dropTargetClasses,u=t.transformDraggedElement,c=t.autoAriaDisabled,h=t.centreDraggedOnCursor,y=Qy(t,["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor"]);if(Object.keys(y).length>0&&console.warn("dndzone will ignore unknown options",y),!e)throw new Error("no 'items' key provided to dndzone");var m=e.find(function(v){return!{}.hasOwnProperty.call(v,Dt)});if(m)throw new Error("missing '".concat(Dt,"' property for item ").concat(Cn(m)));if(d&&!Array.isArray(d))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(sr(d),", ").concat(Cn(d)));if(l&&!a0(l))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(sr(l),", ").concat(Cn(l)))}function a0(t){return!isNaN(t)&&function(e){return(e|0)===e}(parseFloat(t))}var Na=xe(require("obsidian"));var td=xe(require("obsidian"));function r0(t){be(t,"svelte-l6axd",".add-new.svelte-l6axd,.add-new.svelte-l6axd button{width:100%}.disabled.svelte-l6axd button{cursor:not-allowed}")}function i0(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","add-new setting-item svelte-l6axd"),D(e,"aria-label",t[1]),pe(e,"disabled",t[0])},m(i,o){q(i,e,o),a||(r=[le(n=t[2].call(null,e)),ie(e,"click",t[4])],a=!0)},p(i,[o]){o&2&&D(e,"aria-label",i[1]),o&1&&pe(e,"disabled",i[0])},i:X,o:X,d(i){i&&O(e),a=!1,_e(r)}}}function o0(t,e,n){let{disabled:a=!1}=e,{label:r="Add New"}=e,i,o=s=>{n(3,i=new td.ButtonComponent(s).setButtonText("+").setDisabled(a))};function l(s){ue.call(this,t,s)}return t.$$set=s=>{"disabled"in s&&n(0,a=s.disabled),"label"in s&&n(1,r=s.label)},t.$$.update=()=>{if(t.$$.dirty&9){e:i&&i.setDisabled(a)}},[a,r,o,i,l]}var nd=class extends de{constructor(e){super();fe(this,e,o0,i0,se,{disabled:0,label:1},r0)}},Bt=nd;function s0(t){be(t,"svelte-1o5puim",".no-existing-items.svelte-1o5puim.svelte-1o5puim{width:100%}.no-existing-items.svelte-1o5puim span.svelte-1o5puim{width:100%;text-align:center;color:var(--text-faint)}")}function l0(t){let e,n,a;return{c(){e=T("div"),n=T("span"),a=me(t[0]),D(n,"class","svelte-1o5puim"),D(e,"class","no-existing-items setting-item svelte-1o5puim")},m(r,i){q(r,e,i),E(e,n),E(n,a)},p(r,[i]){i&1&&we(a,r[0])},i:X,o:X,d(r){r&&O(e)}}}function u0(t,e,n){let{message:a}=e;return t.$$set=r=>{"message"in r&&n(0,a=r.message)},[a]}var ad=class extends de{constructor(e){super();fe(this,e,u0,l0,se,{message:0},s0)}},Wt=ad;function c0(t){be(t,"svelte-1ddbnom",".existing-items.svelte-1ddbnom.svelte-1ddbnom{width:100%}.weekday.svelte-1ddbnom.svelte-1ddbnom{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.weekday.svelte-1ddbnom .icon.svelte-1ddbnom{align-items:center}.weekday.svelte-1ddbnom.svelte-1ddbnom{margin-top:0.5rem}")}function rd(t,e,n){let a=t.slice();return a[15]=e[n],a[17]=n,a}function id(t,e,n){let a=t.slice();return a[18]=e[n],a}function d0(t){let e,n=[],a=new Map,r,i,o,l=t[1],s=d=>d[18].id;for(let d=0;d<l.length;d+=1){let u=id(t,l,d),c=s(u);a.set(c,n[d]=od(c,u))}return{c(){e=T("div");for(let d=0;d<n.length;d+=1)n[d].c();D(e,"class","existing-items svelte-1ddbnom")},m(d,u){q(d,e,u);for(let c=0;c<n.length;c+=1)n[c].m(e,null);i||(o=[le(r=Ma.call(null,e,{items:t[1],flipDurationMs:ds,dragDisabled:t[3]})),ie(e,"consider",t[7]),ie(e,"finalize",t[8])],i=!0)},p(d,u){if(u&66){l=d[1];for(let c=0;c<n.length;c+=1)n[c].r();n=ba(n,u,s,1,d,l,a,e,Zr,od,null,id);for(let c=0;c<n.length;c+=1)n[c].a()}r&&rt(r.update)&&u&10&&r.update.call(null,{items:d[1],flipDurationMs:ds,dragDisabled:d[3]})},i:X,o:X,d(d){d&&O(e);for(let u=0;u<n.length;u+=1)n[u].d();i=!1,_e(o)}}}function f0(t){let e,n;return e=new Wt({props:{message:"Create a new weekday to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function od(t,e){let n,a,r,i,o,l,s,d,u,c,h,y=X,m,v;return{key:t,first:null,c(){n=T("div"),a=T("div"),i=j(),o=T("div"),s=j(),d=T("div"),c=j(),D(a,"class","icon svelte-1ddbnom"),D(d,"class","icon svelte-1ddbnom"),D(n,"class","weekday svelte-1ddbnom"),this.first=n},m(p,k){q(p,n,k),E(n,a),E(n,i),E(n,o),E(n,s),E(n,d),E(n,c),m||(v=[le(r=e[4].call(null,a)),ie(a,"mousedown",e[6]),ie(a,"touchstart",e[6]),le(l=e[9].call(null,o,e[18])),le(u=e[5].call(null,d,e[18]))],m=!0)},p(p,k){e=p,l&&rt(l.update)&&k&2&&l.update.call(null,e[18]),u&&rt(u.update)&&k&2&&u.update.call(null,e[18])},r(){h=n.getBoundingClientRect()},f(){ya(n),y()},a(){y(),y=ga(n,h,Aa,{duration:ds})},d(p){p&&O(n),m=!1,_e(v)}}}function sd(t){let e,n=(t[15].name??"")+"",a,r,i,o;return{c(){e=T("option"),a=me(n),r=j(),e.disabled=i=!t[2],e.__value=o=t[17],e.value=e.__value},m(l,s){q(l,e,s),E(e,a),E(e,r)},p(l,s){s&2&&n!==(n=(l[15].name??"")+"")&&we(a,n),s&4&&i!==(i=!l[2])&&(e.disabled=i)},d(l){l&&O(e)}}}function h0(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k;e=new Tt({props:{name:"Overflow Weeks",desc:"Turn this off to make each month start on the first of the week.",value:t[0].static.overflow}}),e.$on("click",t[11]),a=new Bt({}),a.$on("click",t[12]);let C=[f0,d0],A=[];function S(w,M){return w[1].length?1:0}i=S(t,-1),o=A[i]=C[i](t);let _=t[1].filter(ld),F=[];for(let w=0;w<_.length;w+=1)F[w]=sd(rd(t,_,w));return{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),o.c(),l=j(),s=T("div"),d=T("div"),d.innerHTML=`<div class="setting-item-name">First Day</div>
<div class="setting-item-description">The day of the week the first year starts on.</div>`,u=j(),c=T("div"),h=T("select"),y=T("option"),y.textContent="Select a Weekday";for(let w=0;w<F.length;w+=1)F[w].c();D(d,"class","setting-item-info"),y.selected=!0,y.hidden=!0,y.disabled=!0,y.__value="Select a Weekday",y.value=y.__value,D(h,"class","dropdown"),D(h,"aria-label",m=t[1].filter(ud).length?null:"Named Weekday Required"),t[0].static.firstWeekDay===void 0&&It(()=>t[13].call(h)),D(c,"class","setting-item-control"),D(s,"class","setting-item")},m(w,M){ee(e,w,M),q(w,n,M),ee(a,w,M),q(w,r,M),A[i].m(w,M),q(w,l,M),q(w,s,M),E(s,d),E(s,u),E(s,c),E(c,h),E(h,y);for(let x=0;x<F.length;x+=1)F[x].m(h,null);Vt(h,t[0].static.firstWeekDay),v=!0,p||(k=ie(h,"change",t[13]),p=!0)},p(w,M){let x={};M&1&&(x.value=w[0].static.overflow),e.$set(x);let V=i;if(i=S(w,M),i===V?A[i].p(w,M):(Ee(),W(A[V],1,1,()=>{A[V]=null}),Ce(),o=A[i],o?o.p(w,M):(o=A[i]=C[i](w),o.c()),R(o,1),o.m(l.parentNode,l)),M&6){_=w[1].filter(ld);let B;for(B=0;B<_.length;B+=1){let H=rd(w,_,B);F[B]?F[B].p(H,M):(F[B]=sd(H),F[B].c(),F[B].m(h,null))}for(;B<F.length;B+=1)F[B].d(1);F.length=_.length}(!v||M&2&&m!==(m=w[1].filter(ud).length?null:"Named Weekday Required"))&&D(h,"aria-label",m),M&1&&Vt(h,w[0].static.firstWeekDay)},i(w){v||(R(e.$$.fragment,w),R(a.$$.fragment,w),R(o),v=!0)},o(w){W(e.$$.fragment,w),W(a.$$.fragment,w),W(o),v=!1},d(w){J(e,w),w&&O(n),J(a,w),w&&O(r),A[i].d(w),w&&O(l),w&&O(s),We(F,w),p=!1,k()}}}function m0(t){let e,n;return e=new ct({props:{name:"Weekdays",warn:!t[1]?.length,label:"At least one weekday is required",$$slots:{default:[h0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&2&&(i.warn=!a[1]?.length),r&2097167&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var ds=300,ld=t=>t.name?.length,ud=t=>t.name?.length;function p0(t,e,n){let a,r,i=Se(),{calendar:o}=e,l=o.static.firstWeekDay,s=C=>{(0,Na.setIcon)(C,"fantasy-calendar-grip")},d=(C,A)=>{new Na.ExtraButtonComponent(C).setIcon("trash").onClick(()=>n(1,a=a.filter(S=>S.id!==A.id)))};function u(C){C.preventDefault(),n(3,c=!1)}let c=!1;function h(C){let{items:A,info:{source:S,trigger:_}}=C.detail;n(1,a=A),S===nt.KEYBOARD&&_===st.DRAG_STOPPED&&n(3,c=!0)}function y(C){let{items:A,info:{source:S}}=C.detail;n(1,a=A),S===nt.POINTER&&n(3,c=!0)}let m=(C,A)=>{new Na.TextComponent(C).setValue(A.name).setPlaceholder("Name").onChange(S=>{A.name=S,i("weekday-update",a),n(1,a),n(0,o)}).inputEl.setAttr("style","width: 100%;")},v=()=>n(0,o.static.overflow=!o.static.overflow,o),p=()=>n(0,o.static.weekdays=[...a,{type:"day",name:null,id:et(6)}],o);function k(){o.static.firstWeekDay=vn(this),n(0,o)}return t.$$set=C=>{"calendar"in C&&n(0,o=C.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=o.static.weekdays)}if(t.$$.dirty&1){e:n(10,l=o.static.firstWeekDay)}if(t.$$.dirty&1){e:n(2,r=o.static.overflow)}if(t.$$.dirty&2){e:i("weekday-update",a)}if(t.$$.dirty&1024){e:i("first-weekday-update",l)}if(t.$$.dirty&4){e:i("overflow-update",r)}},[o,a,r,c,s,d,u,h,y,m,l,v,p,k]}var cd=class extends de{constructor(e){super();fe(this,e,p0,m0,se,{calendar:0},c0)}},dd=cd;var md=xe(require("obsidian"));var wi=xe(require("obsidian"));function g0(t){be(t,"svelte-1e37bk8",".month.svelte-1e37bk8.svelte-1e37bk8{display:grid;grid-template-columns:1fr 1fr auto auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.month.svelte-1e37bk8 .icon.svelte-1e37bk8{align-items:center}")}function y0(t){let e,n,a,r,i,o,l,s,d,u,c,h,y;return{c(){e=T("div"),n=T("input"),a=j(),r=T("input"),i=j(),o=T("select"),l=T("option"),l.textContent="Month",s=T("option"),s.textContent="Intercalary",d=j(),u=T("div"),D(n,"type","text"),D(n,"spellcheck","false"),D(n,"placeholder","Name"),$e(n,"width","100%"),D(r,"type","number"),D(r,"spellcheck","false"),D(r,"placeholder","Length"),$e(r,"width","100%"),D(r,"min","0"),l.__value="month",l.value=l.__value,s.__value="intercalary",s.value=s.__value,D(o,"class","dropdown"),t[0]===void 0&&It(()=>t[8].call(o)),D(u,"class","icon svelte-1e37bk8"),D(e,"class","month svelte-1e37bk8")},m(m,v){q(m,e,v),E(e,n),yt(n,t[1]),E(e,a),E(e,r),yt(r,t[2]),E(e,i),E(e,o),E(o,l),E(o,s),Vt(o,t[0]),E(e,d),E(e,u),h||(y=[ie(n,"input",t[6]),ie(n,"input",t[4]),ie(r,"input",t[7]),ie(r,"input",t[4]),ie(o,"change",t[8]),ie(o,"input",t[4]),le(c=t[3].call(null,u))],h=!0)},p(m,[v]){v&2&&n.value!==m[1]&&yt(n,m[1]),v&4&&rn(r.value)!==m[2]&&yt(r,m[2]),v&1&&Vt(o,m[0])},i:X,o:X,d(m){m&&O(e),h=!1,_e(y)}}}function v0(t,e,n){let a=Se(),{month:r}=e,i=r.name,o=r.type,l=r.length,s=y=>{new wi.ExtraButtonComponent(y).setIcon("trash").onClick(()=>{a("month-delete")})},d=(0,wi.debounce)(()=>{n(5,r.name=i,r),n(5,r.type=o,r),n(5,r.length=l,r),a("month-update",r)},300,!0);function u(){i=this.value,n(1,i)}function c(){l=rn(this.value),n(2,l)}function h(){o=vn(this),n(0,o)}return t.$$set=y=>{"month"in y&&n(5,r=y.month)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(5,r.type=o,r)}},[o,i,l,s,d,r,u,c,h]}var fd=class extends de{constructor(e){super();fe(this,e,v0,y0,se,{month:5},g0)}},hd=fd;function b0(t){be(t,"svelte-xv4vbj",".month.svelte-xv4vbj{display:flex;align-items:center;margin-top:0.5rem;gap:1rem}")}function pd(t,e,n){let a=t.slice();return a[14]=e[n],a}function w0(t){let e,n=[],a=new Map,r,i,o,l,s=t[2],d=u=>u[14].id;for(let u=0;u<s.length;u+=1){let c=pd(t,s,u),h=d(c);a.set(h,n[u]=gd(h,c))}return{c(){e=T("div");for(let u=0;u<n.length;u+=1)n[u].c();D(e,"class","existing-items")},m(u,c){q(u,e,c);for(let h=0;h<n.length;h+=1)n[h].m(e,null);i=!0,o||(l=[le(r=Ma.call(null,e,{items:t[2],flipDurationMs:fs,dragDisabled:t[1]})),ie(e,"consider",t[7]),ie(e,"finalize",t[8])],o=!0)},p(u,c){if(c&93){s=u[2],Ee();for(let h=0;h<n.length;h+=1)n[h].r();n=ba(n,c,d,1,u,s,a,e,vu,gd,null,pd);for(let h=0;h<n.length;h+=1)n[h].a();Ce()}r&&rt(r.update)&&c&6&&r.update.call(null,{items:u[2],flipDurationMs:fs,dragDisabled:u[1]})},i(u){if(!i){for(let c=0;c<s.length;c+=1)R(n[c]);i=!0}},o(u){for(let c=0;c<n.length;c+=1)W(n[c]);i=!1},d(u){u&&O(e);for(let c=0;c<n.length;c+=1)n[c].d();o=!1,_e(l)}}}function D0(t){let e,n;return e=new Wt({props:{message:"Create a new month to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function gd(t,e){let n,a,r,i,o,l,s,d=X,u,c,h;function y(){return e[11](e[14])}return o=new hd({props:{month:e[14]}}),o.$on("mousedown",e[6]),o.$on("month-delete",y),o.$on("month-update",e[12]),{key:t,first:null,c(){n=T("div"),a=T("div"),i=j(),te(o.$$.fragment),l=j(),D(a,"class","icon"),D(n,"class","month svelte-xv4vbj"),this.first=n},m(m,v){q(m,n,v),E(n,a),E(n,i),ee(o,n,null),E(n,l),u=!0,c||(h=[le(r=e[5].call(null,a)),ie(a,"mousedown",e[6]),ie(a,"touchstart",e[6])],c=!0)},p(m,v){e=m;let p={};v&4&&(p.month=e[14]),o.$set(p)},r(){s=n.getBoundingClientRect()},f(){ya(n),d()},a(){d(),d=ga(n,s,Aa,{duration:fs})},i(m){u||(R(o.$$.fragment,m),u=!0)},o(m){W(o.$$.fragment,m),u=!1},d(m){m&&O(n),J(o),c=!1,_e(h)}}}function _0(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[10]);let l=[D0,w0],s=[];function d(u,c){return u[2].length?1:0}return a=d(t,-1),r=s[a]=l[a](t),{c(){te(e.$$.fragment),n=j(),r.c(),i=Ue()},m(u,c){ee(e,u,c),q(u,n,c),s[a].m(u,c),q(u,i,c),o=!0},p(u,c){let h=a;a=d(u,c),a===h?s[a].p(u,c):(Ee(),W(s[h],1,1,()=>{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function E0(t){let e,n;return e=new ct({props:{name:"Months",warn:!t[2]?.length,label:"At least one month is required",$$slots:{default:[_0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&4&&(i.warn=!a[2]?.length),r&131079&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var fs=300;function C0(t,e,n){let a,r,i=Xe("store");i.subscribe(k=>n(0,r=k));let o=k=>{n(2,a=a.filter(C=>C.id!=k.id)),i.set(r)},l=k=>{(0,md.setIcon)(k,"fantasy-calendar-grip")};function s(k){k.preventDefault(),n(1,d=!1)}let d=!1;function u(k){let{items:C,info:{source:A,trigger:S}}=k.detail;n(2,a=C),A===nt.KEYBOARD&&S===st.DRAG_STOPPED&&n(1,d=!0)}function c(k){let{items:C,info:{source:A}}=k.detail;n(2,a=C),h("month-update",a),A===nt.POINTER&&n(1,d=!0)}let h=Se(),y=()=>{n(0,r.static.months=[...a,{type:"month",name:null,length:null,id:et(6)}],r),i.set(r)},m=()=>y(),v=k=>o(k),p=()=>{i.set(r)};return t.$$.update=()=>{if(t.$$.dirty&1){e:n(2,a=r.static.months)}},[r,d,a,i,o,l,s,u,c,y,m,v,p]}var yd=class extends de{constructor(e){super();fe(this,e,C0,E0,se,{},b0)}},vd=yd;var Ia=xe(require("obsidian"));var dn=xe(require("obsidian"));async function mr(t,e,n={cta:"Yes",secondary:"No"}){return new Promise((a,r)=>{try{let i=new bd(t,e,n);i.onClose=()=>{a(i.confirmed)},i.open()}catch{r()}})}var bd=class extends dn.Modal{constructor(e,n,a){super(e);this.text=n;this.buttons=a;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:this.text});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(e).setButtonText(this.buttons.cta).setCta().onClick(()=>{this.confirmed=!0,this.close()}),new dn.ButtonComponent(e).setButtonText(this.buttons.secondary).onClick(()=>{this.close()})}onOpen(){this.display()}};async function wd(t){return new Promise((e,n)=>{try{let a=new Dd(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Dd=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you want to delete this calendar?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.calendar=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}},hs=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Additional information is required to save this calendar. Any changes you may have made will be discarded if you exit now."});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Exit and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.saving=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Exit").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Keep editing"}).onclick=()=>{this.close()}}onOpen(){this.display()}};async function _d(t){return new Promise((e,n)=>{try{let a=new Ed(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Ed=class extends dn.Modal{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you wish to delete this event?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=()=>{this.confirmed=!0,this.plugin.data.exit.event=!0,this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new dn.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}};function A0(t){be(t,"svelte-1c4m78g",".weekday.svelte-1c4m78g.svelte-1c4m78g{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem}.weekday.svelte-1c4m78g .icon.svelte-1c4m78g{align-items:center}.weekday.svelte-1c4m78g.svelte-1c4m78g{margin-top:0.5rem}")}function Cd(t,e,n){let a=t.slice();return a[17]=e[n],a}function Ad(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[15]);let l=[x0,k0],s=[];function d(u,c){return!u[2]||!u[2].length?0:1}return a=d(t,-1),r=s[a]=l[a](t),{c(){te(e.$$.fragment),n=j(),r.c(),i=Ue()},m(u,c){ee(e,u,c),q(u,n,c),s[a].m(u,c),q(u,i,c),o=!0},p(u,c){let h=a;a=d(u,c),a===h?s[a].p(u,c):(Ee(),W(s[h],1,1,()=>{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function k0(t){let e,n=[],a=new Map,r,i,o,l=t[2],s=d=>d[17].id;for(let d=0;d<l.length;d+=1){let u=Cd(t,l,d),c=s(u);a.set(c,n[d]=kd(c,u))}return{c(){e=T("div");for(let d=0;d<n.length;d+=1)n[d].c();D(e,"class","existing-items")},m(d,u){q(d,e,u);for(let c=0;c<n.length;c+=1)n[c].m(e,null);i||(o=[le(r=Ma.call(null,e,{items:t[2],flipDurationMs:ms,dragDisabled:t[3]})),ie(e,"consider",t[11]),ie(e,"finalize",t[12])],i=!0)},p(d,u){if(u&1028){l=d[2];for(let c=0;c<n.length;c+=1)n[c].r();n=ba(n,u,s,1,d,l,a,e,Zr,kd,null,Cd);for(let c=0;c<n.length;c+=1)n[c].a()}r&&rt(r.update)&&u&12&&r.update.call(null,{items:d[2],flipDurationMs:ms,dragDisabled:d[3]})},i:X,o:X,d(d){d&&O(e);for(let u=0;u<n.length;u+=1)n[u].d();i=!1,_e(o)}}}function x0(t){let e,n;return e=new Wt({props:{message:"Create a new year to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function kd(t,e){let n,a,r,i,o,l,s,d,u,c,h,y=X,m,v;return{key:t,first:null,c(){n=T("div"),a=T("div"),i=j(),o=T("div"),s=j(),d=T("div"),c=j(),D(a,"class","icon svelte-1c4m78g"),D(d,"class","icon svelte-1c4m78g"),D(n,"class","weekday svelte-1c4m78g"),this.first=n},m(p,k){q(p,n,k),E(n,a),E(n,i),E(n,o),E(n,s),E(n,d),E(n,c),m||(v=[le(r=e[5].call(null,a)),ie(a,"mousedown",e[10]),ie(a,"touchstart",e[10]),le(l=e[7].call(null,o,e[17])),le(u=e[6].call(null,d,e[17]))],m=!0)},p(p,k){e=p,l&&rt(l.update)&&k&4&&l.update.call(null,e[17]),u&&rt(u.update)&&k&4&&u.update.call(null,e[17])},r(){h=n.getBoundingClientRect()},f(){ya(n),y()},a(){y(),y=ga(n,h,Aa,{duration:ms})},d(p){p&&O(n),m=!1,_e(v)}}}function F0(t){let e,n,a,r;e=new Tt({props:{name:"Use Custom Years",desc:t[8],value:t[1]}}),e.$on("click",t[14]);let i=t[1]&&Ad(t);return{c(){te(e.$$.fragment),n=j(),i&&i.c(),a=Ue()},m(o,l){ee(e,o,l),q(o,n,l),i&&i.m(o,l),q(o,a,l),r=!0},p(o,l){let s={};l&2&&(s.value=o[1]),e.$set(s),o[1]?i?(i.p(o,l),l&2&&R(i,1)):(i=Ad(o),i.c(),R(i,1),i.m(a.parentNode,a)):i&&(Ee(),W(i,1,1,()=>{i=null}),Ce())},i(o){r||(R(e.$$.fragment,o),R(i),r=!0)},o(o){W(e.$$.fragment,o),W(i),r=!1},d(o){J(e,o),o&&O(n),i&&i.d(o),o&&O(a)}}}function T0(t){let e,n;return e=new ct({props:{name:"Years",warn:t[1]&&!t[2]?.length,label:"At least one year is required when using custom years",$$slots:{default:[F0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&6&&(i.warn=a[1]&&!a[2]?.length),r&1048591&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var ms=300;function S0(t,e,n){let a,r,{calendar:i}=e,o=Xe("store");o.subscribe(S=>n(0,i=S));let l=S=>{(0,Ia.setIcon)(S,"fantasy-calendar-grip")},s=(S,_)=>{new Ia.ExtraButtonComponent(S).setIcon("trash").onClick(()=>n(2,a=a.filter(F=>F.id!==_.id)))},d=(S,_)=>{new Ia.TextComponent(S).setValue(_.name).setPlaceholder("Name").onChange(w=>{_.name=w,k("years-update",a),n(2,a),n(0,i)}).inputEl.setAttr("style","width: 100%;")},{app:u}=e,c=createFragment(S=>(S.createSpan({text:"Create custom years to display instead of incrementing from 1."}),S.createEl("br"),S.createSpan({text:"If on, "}),S.createEl("strong",{text:"only the years added below will be displayed."}),S)),h=async()=>{i.static.useCustomYears&&a?.length&&await mr(u,"The custom years you have created will be removed. Proceed?")&&n(0,i.static.years=[],i),n(0,i.static.useCustomYears=!i.static.useCustomYears,i),o.set(i)};function y(S){S.preventDefault(),n(3,m=!1)}let m=!1;function v(S){let{items:_,info:{source:F,trigger:w}}=S.detail;n(2,a=_),F===nt.KEYBOARD&&w===st.DRAG_STOPPED&&n(3,m=!0)}function p(S){let{items:_,info:{source:F}}=S.detail;n(2,a=_),F===nt.POINTER&&n(3,m=!0)}let k=Se(),C=()=>h(),A=()=>{n(0,i.static.years=[...a??[],{name:null,id:et(6),type:"year"}],i),o.set(i)};return t.$$set=S=>{"calendar"in S&&n(0,i=S.calendar),"app"in S&&n(13,u=S.app)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(2,a=i.static.years)}if(t.$$.dirty&1){e:n(1,r=i.static.useCustomYears)}if(t.$$.dirty&4){e:k("years-update",a)}if(t.$$.dirty&2){e:k("use-custom-update",r)}},[i,r,a,m,o,l,s,d,c,h,y,v,p,u,C,A]}var xd=class extends de{constructor(e){super();fe(this,e,S0,T0,se,{calendar:0,app:13},A0)}},Fd=xd;var ps=xe(require("obsidian"));function B0(t){be(t,"svelte-1ldxqlp",".dot.svelte-1ldxqlp{display:inline-block;height:0.875em;width:0.875em;margin:0 1px}")}function M0(t){let e,n;return{c(){e=an("svg"),n=an("circle"),D(n,"stroke",t[0]),D(n,"fill",t[0]),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1ldxqlp"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"aria-label",t[1])},m(a,r){q(a,e,r),E(e,n)},p(a,[r]){r&1&&D(n,"stroke",a[0]),r&1&&D(n,"fill",a[0]),r&2&&D(e,"aria-label",a[1])},i:X,o:X,d(a){a&&O(e)}}}function N0(t,e,n){let{color:a}=e,{label:r}=e;return t.$$set=i=>{"color"in i&&n(0,a=i.color),"label"in i&&n(1,r=i.label)},[a,r]}var Td=class extends de{constructor(e){super();fe(this,e,N0,M0,se,{color:0,label:1},B0)}},Sd=Td;function I0(t){be(t,"svelte-3snb0d",".event.svelte-3snb0d.svelte-3snb0d{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.event-info.svelte-3snb0d.svelte-3snb0d{width:100%}.icons.svelte-3snb0d.svelte-3snb0d{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.event.svelte-3snb0d .icon.svelte-3snb0d{align-items:center}.date.svelte-3snb0d.svelte-3snb0d{display:flex;justify-content:flex-start;gap:0.25rem}.clamp.svelte-3snb0d.svelte-3snb0d{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;width:calc(var(--event-max-width) * 0.75)}")}function Bd(t){let e,n;return e=new Sd({props:{color:t[1].color,label:t[1].name}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.color=a[1].color),r&2&&(i.label=a[1].name),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function O0(t){let e,n,a,r,i=t[0].name+"",o,l,s,d,u,c,h,y=(t[0].description??"")+"",m,v,p,k,C,A,S,_,F,w,M,x=t[1]!=null&&Bd(t);return{c(){e=T("div"),n=T("div"),a=T("span"),x&&x.c(),r=j(),o=me(i),l=j(),s=T("div"),d=T("div"),u=me(t[2]),c=j(),h=T("span"),m=me(y),v=j(),p=T("div"),k=T("div"),A=j(),S=T("div"),D(a,"class","setting-item-name"),D(d,"class","date svelte-3snb0d"),D(h,"class","clamp svelte-3snb0d"),D(s,"class","setting-item-description"),D(n,"class","event-info svelte-3snb0d"),D(k,"class","icon svelte-3snb0d"),D(S,"class","icon svelte-3snb0d"),D(p,"class","icons svelte-3snb0d"),D(e,"class","event svelte-3snb0d")},m(V,B){q(V,e,B),E(e,n),E(n,a),x&&x.m(a,null),E(a,r),E(a,o),E(n,l),E(n,s),E(s,d),E(d,u),E(s,c),E(s,h),E(h,m),E(e,v),E(e,p),E(p,k),E(p,A),E(p,S),F=!0,w||(M=[le(C=t[5].call(null,k)),ie(k,"click",t[6]),le(_=t[4].call(null,S)),ie(S,"click",t[7])],w=!0)},p(V,[B]){V[1]!=null?x?(x.p(V,B),B&2&&R(x,1)):(x=Bd(V),x.c(),R(x,1),x.m(a,r)):x&&(Ee(),W(x,1,1,()=>{x=null}),Ce()),(!F||B&1)&&i!==(i=V[0].name+"")&&we(o,i),(!F||B&4)&&we(u,V[2]),(!F||B&1)&&y!==(y=(V[0].description??"")+"")&&we(m,y)},i(V){F||(R(x),F=!0)},o(V){W(x),F=!1},d(V){V&&O(e),x&&x.d(),w=!1,_e(M)}}}function q0(t,e,n){let a=Se(),r=c=>{new ps.ExtraButtonComponent(c).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},i=c=>{new ps.ExtraButtonComponent(c).setIcon("pencil").setTooltip("Edit")},{event:o}=e,{category:l}=e,{date:s}=e,d=()=>a("edit"),u=()=>a("delete");return t.$$set=c=>{"event"in c&&n(0,o=c.event),"category"in c&&n(1,l=c.category),"date"in c&&n(2,s=c.date)},[o,l,s,a,r,i,d,u]}var Md=class extends de{constructor(e){super();fe(this,e,q0,O0,se,{event:0,category:1,date:2},I0)}},Nd=Md;var lt=xe(require("obsidian"));var pr=xe(require("obsidian")),Di=class extends rr{constructor(e,n,a){super(e,n.inputEl,a);this.files=[...a],this.text=n,this.createPrompts(),this.inputEl.addEventListener("input",this.getFile.bind(this))}createPrompts(){this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type #"}),createSpan({text:"to link heading"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type ^"}),createSpan({text:"to link blocks"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Note: "}),createSpan({text:"Blocks must have been created already"})])}getFile(){let e=this.inputEl.value,n=this.app.metadataCache.getFirstLinkpathDest(e.split(/[\^#]/).shift()||"","");n!=this.file&&(this.file=n,this.file&&(this.cache=this.app.metadataCache.getFileCache(this.file)),this.onInputChanged())}getItemText(e){if(e instanceof pr.TFile)return e.path;if(Object.prototype.hasOwnProperty.call(e,"heading"))return e.heading;if(Object.prototype.hasOwnProperty.call(e,"id"))return e.id}onChooseItem(e){e instanceof pr.TFile?(this.text.setValue(e.basename),this.file=e,this.cache=this.app.metadataCache.getFileCache(this.file)):Object.prototype.hasOwnProperty.call(e,"heading")?this.text.setValue(this.file.basename+"#"+e.heading):Object.prototype.hasOwnProperty.call(e,"id")&&this.text.setValue(this.file.basename+"^"+e.id)}selectSuggestion({item:e}){let n;e instanceof pr.TFile?(this.file=e,n=e.basename):Object.prototype.hasOwnProperty.call(e,"heading")?n=this.file.basename+"#"+e.heading:Object.prototype.hasOwnProperty.call(e,"id")&&(n=this.file.basename+"^"+e.id);let a=this.file.path.split("/").slice(0,-1);a.length?this.link=a.join("/")+"/"+n:this.link=n,this.text.setValue(n),this.close(),this.onClose()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}if(a instanceof pr.TFile){let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;s<a.path.length-a.extension.length-1;s++){let d=r.matches.find(u=>u[0]===s);if(d){let u=l[r.matches.indexOf(d)];i.appendChild(u),u.appendText(a.path.substring(d[0],d[1])),s+=d[1]-d[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}else Object.prototype.hasOwnProperty.call(a,"heading")?(i.setText(a.heading),i.prepend(createSpan({cls:"suggestion-flair",text:`H${a.level}`}))):Object.prototype.hasOwnProperty.call(a,"id")&&i.setText(a.id)}get headings(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),this.cache.headings||[]):[]}get blocks(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),Object.values(this.cache.blocks||{})||[]):[]}getItems(){let e=this.inputEl.value;return/#/.test(e)?(this.modifyInput=n=>n.split(/#/).pop(),this.headings):/\^/.test(e)?(this.modifyInput=n=>n.split(/\^/).pop(),this.blocks):this.files}};var gs=xe(Vn());var Oa=class extends lt.Modal{constructor(e,n,a,r){super(e.app);this.plugin=e;this.calendar=n;this.saved=!1;this.event={name:null,description:null,date:{month:null,day:null,year:null},id:et(6),note:null,category:null};a&&(this.event=(0,gs.default)(a),this.editing=!0),r&&(this.event.date=(0,gs.default)(r)),this.containerEl.addClass("fantasy-calendar-create-event")}async display(){this.contentEl.empty(),this.titleEl.setText(this.editing?"Edit Event":"New Event"),this.infoEl=this.contentEl.createDiv("event-info"),this.buildInfo(),this.dateEl=this.contentEl.createDiv("event-date"),this.buildDate(),new lt.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(async()=>{if(!this.event.name?.length){new lt.Notice("The event must have a name.");return}if(this.event.end){this.event.end={year:this.event.end.year??this.event.date.year,month:this.event.end.month??this.event.date.month,day:this.event.end.day??this.event.date.day};let n=this.event.date,a=this.event.end,r=Math.max(...this.calendar.static.months.map(s=>s.length)),i=r*this.calendar.static.months.length,o=(n.year-1)*i+(n.month??-1)*r+n.day,l=(a.year-1)*i+(a.month??-1)*r+a.day;if(o>l){let s={...this.event.end};this.event.end={...this.event.date},this.event.date={...s}}}if(this.saved=!0,this.plugin.data.eventFrontmatter&&this.event.note){let[n,a]=this.event.note.split(/[#^]/),r=this.app.metadataCache.getFirstLinkpathDest(n,""),i=this.plugin.format.replace(/[Yy]+/g,`${this.event.date.year}`).replace(/[Mm]+/g,`${this.event.date.month}`).replace(/[Dd]+/g,`${this.event.date.day}`),o=[`fc-calendar: ${this.calendar.name}`,`fc-date: ${i}`];if(this.event.end){let l=this.plugin.format.replace(/[Yy]+/g,`${this.event.end.year}`).replace(/[Mm]+/g,`${this.event.end.month}`).replace(/[Dd]+/g,`${this.event.end.day}`);o.push(`fc-end: ${l}`)}if(this.event.category){let l=this.calendar.categories.find(s=>s.id==this.event.category)?.name;o.push(`fc-category: ${l}`)}if(r){let l=await this.app.vault.read(r);if(/^\-\-\-$\n[\s\S]*?^\-\-\-$/m.test(l)){let[,s]=l.match(/^\-\-\-$\n([\s\S]*?)^\-\-\-$/m),d=s.split(`
`).filter(u=>!/^fc-calendar/.test(u)&&!/^fc-date/.test(u)&&!/^fc-end/.test(u)&&!/^fc-category/.test(u));d.unshift(...o),l=l.replace(/^\-\-\-$\n[\s\S]*?^\-\-\-$/m,`---
${d.join(`
`)}---`)}else l=`---
${o.join(`
`)}
---
${l}`;await this.app.vault.modify(r,l)}else await this.app.vault.create(this.event.note,`---${o.join(`
`)}---`)}this.event.name||(this.event.name="Event"),this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildDate(){this.dateEl.empty(),this.buildStartDate(),this.endEl=this.dateEl.createDiv(),this.event.end?this.buildEndDate():new lt.Setting(this.endEl).setName("Add End Date").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEndDate())});let e=this.dateEl.createDiv("fantasy-calendar-event-formula");this.event.formulas?.length?this.buildEventFormulas(e):new lt.Setting(e).setName("Add Interval").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEventFormulas(e))}),this.stringEl=this.dateEl.createDiv("event-date-string setting-item-description"),this.buildDateString()}buildEventFormulas(e){e.empty(),this.event.formulas=this.event.formulas??[{type:"interval",number:1,timespan:"days"}],new lt.Setting(e).setName("Event Interval").addText(n=>{n.setValue(`${this.event.formulas[0].number}`).onChange(a=>{this.event.formulas[0].number=Number(a)}).inputEl.setAttr("type","number")}).addDropdown(n=>{n.addOption("days","days")})}buildStartDate(){this.startEl=this.dateEl.createDiv("fantasy-calendar-event-date"),this.startEl.createSpan({text:"Start:"}),this.startDateEl=this.startEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.startDateEl,this.event.date)}buildEndDate(){this.event.end=this.event.end??{...this.event.date},this.endEl.empty(),this.endEl.addClass("fantasy-calendar-event-date"),this.endEl.createSpan({text:"End:"}),this.endDateEl=this.endEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.endDateEl,this.event.end)}buildDateString(){this.stringEl.empty(),this.stringEl.createSpan({text:yn(this.event.date,this.calendar.static.months,this.event.end)})}buildDateFields(e,n=this.event.date){e.empty();let a=e.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Day"}),new lt.TextComponent(a).setPlaceholder("Day").setValue(`${n.day}`).onChange(s=>{n.day=Number(s),this.buildDateString()}).inputEl.setAttr("type","number");let i=e.createDiv("fantasy-calendar-date-field");i.createEl("label",{text:"Month"}),new lt.DropdownComponent(i).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(s=>[s.name,s.name])])).setValue(n.month!=null?this.calendar.static.months[n.month].name:"select").onChange(s=>{s==="select"&&(n.month=null);let d=this.calendar.static.months.find(u=>u.name==s);n.month=this.calendar.static.months.indexOf(d),this.buildDateString()});let o=e.createDiv("fantasy-calendar-date-field");o.createEl("label",{text:"Year"}),new lt.TextComponent(o).setPlaceholder("Year").setValue(`${n.year}`).onChange(s=>{!s||s==null?n.year=void 0:n.year=Number(s),this.buildDateString()}).inputEl.setAttr("type","number")}buildInfo(){this.infoEl.empty(),new lt.Setting(this.infoEl).setName("Note").setDesc("Link the event to a note.").addText(n=>{let a=this.app.vault.getFiles();if(n.setPlaceholder("Path"),this.event.note){let[i,o]=this.event.note.split(/[#^]/),l=this.app.metadataCache.getFirstLinkpathDest(i,"");l&&l instanceof lt.TFile&&n.setValue(`${l.basename}${o?"#":""}${o||""}`)}let r=new Di(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.blur(),this.event.note=r.link,this.tryParse(r.file)}}),new lt.Setting(this.infoEl).setName("Event Name").addText(n=>n.setPlaceholder("Event Name").setValue(this.event.name).onChange(a=>{this.event.name=a}));let e=this.infoEl.createDiv("event-description");e.createEl("label",{text:"Event Description"}),new lt.TextAreaComponent(e).setPlaceholder("Event Description").setValue(this.event.description).onChange(n=>{this.event.description=n}),new lt.Setting(this.infoEl).setName("Event Category").addDropdown(n=>{let a=Object.fromEntries(this.calendar.categories.map(r=>[r.id,r.name]));n.addOptions(a).setValue(this.event.category).onChange(r=>this.event.category=r)})}async tryParse(e){this.event.name=e.basename;let n=this.app.metadataCache.getFileCache(e),{frontmatter:a}=n;if(a){if("fc-date"in a){let{day:r,month:i,year:o}=a["fc-date"];if(r&&(this.event.date.day=r),i){if(typeof i=="string"){let l=this.calendar.static.months?.find(s=>s.name==i)??this.calendar.static.months?.[0];this.event.date.month=this.calendar.static.months?.indexOf(l)}typeof i=="number"&&(this.event.date.month=i-1)}o&&(this.event.date.year=o)}"fc-category"in a&&(this.calendar.categories.find(r=>r.name===a["fc-category"])||this.calendar.categories.push({name:a["fantasy-category"],color:"#808080",id:et(6)}),this.event.category=this.calendar.categories.find(r=>r.name===a["fc-category"])?.id)}await this.display()}async onOpen(){await this.display()}};var Id=xe(require("obsidian"));function R0(t){let e;return{c(){e=me(t[4])},m(n,a){q(n,e,a)},p(n,a){a&16&&we(e,n[4])},d(n){n&&O(e)}}}function L0(t){let e,n,a,r;return{c(){e=T("div")},m(i,o){q(i,e,o),a||(r=le(n=t[5].call(null,e)),a=!0)},p:X,d(i){i&&O(e),a=!1,r()}}}function P0(t){let e,n,a,r,i,o,l,s,d,u,c,h;function y(p,k){if(p[3])return L0;if(p[4])return R0}let m=y(t,-1),v=m&&m(t);return{c(){e=T("div"),n=T("div"),a=T("div"),r=me(t[0]),i=j(),o=T("div"),l=me(t[1]),s=j(),d=T("div"),u=T("button"),v&&v.c(),D(a,"class","setting-item-name"),D(o,"class","setting-item-description"),D(n,"class","setting-item-info"),D(u,"aria-label",t[2]),D(d,"class","setting-item-control"),D(e,"class","setting-item")},m(p,k){q(p,e,k),E(e,n),E(n,a),E(a,r),E(n,i),E(n,o),E(o,l),E(e,s),E(e,d),E(d,u),v&&v.m(u,null),c||(h=ie(u,"click",t[6]),c=!0)},p(p,[k]){k&1&&we(r,p[0]),k&2&&we(l,p[1]),m===(m=y(p,k))&&v?v.p(p,k):(v&&v.d(1),v=m&&m(p),v&&(v.c(),v.m(u,null))),k&4&&D(u,"aria-label",p[2])},i:X,o:X,d(p){p&&O(e),v&&v.d(),c=!1,h()}}}function j0(t,e,n){let{name:a}=e,{desc:r=""}=e,{label:i=null}=e,{icon:o=null}=e,{text:l=null}=e,s=u=>{(0,Id.setIcon)(u,o)};function d(u){ue.call(this,t,u)}return t.$$set=u=>{"name"in u&&n(0,a=u.name),"desc"in u&&n(1,r=u.desc),"label"in u&&n(2,i=u.label),"icon"in u&&n(3,o=u.icon),"text"in u&&n(4,l=u.text)},[a,r,i,o,l,s,d]}var Od=class extends de{constructor(e){super();fe(this,e,j0,P0,se,{name:0,desc:1,label:2,icon:3,text:4})}},qd=Od;var qa=xe(require("obsidian"));function V0(t){be(t,"svelte-1cuaalj",".more.svelte-1cuaalj{text-align:center;padding-top:10px;text-decoration:underline;font-style:italic;cursor:pointer}")}function Rd(t,e,n){let a=t.slice();return a[17]=e[n],a}function Ld(t){let e,n,a,r,i,o;return r=new Wt({props:{message:"Create a new event to see it here."}}),{c(){e=T("div"),n=j(),a=T("div"),te(r.$$.fragment),i=j(),D(a,"class","setting-item")},m(l,s){q(l,e,s),q(l,n,s),q(l,a,s),ee(r,a,null),E(a,i),o=!0},p:X,i(l){o||(R(r.$$.fragment,l),o=!0)},o(l){W(r.$$.fragment,l),o=!1},d(l){l&&O(e),l&&O(n),l&&O(a),J(r)}}}function Pd(t){let e,n;function a(){return t[14](t[17])}function r(){return t[15](t[17])}return e=new Nd({props:{event:t[17],category:t[6](t[17].category),date:yn(t[17].date,t[4],t[17].end)}}),e.$on("edit",a),e.$on("delete",r),{c(){te(e.$$.fragment)},m(i,o){ee(e,i,o),n=!0},p(i,o){t=i;let l={};o&8&&(l.event=t[17]),o&8&&(l.category=t[6](t[17].category)),o&24&&(l.date=yn(t[17].date,t[4],t[17].end)),e.$set(l)},i(i){n||(R(e.$$.fragment,i),n=!0)},o(i){W(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function jd(t){let e,n,a;return{c(){e=T("div"),e.innerHTML="<small>Load More Events...</small>",D(e,"class","more svelte-1cuaalj")},m(r,i){q(r,e,i),n||(a=ie(e,"click",t[16]),n=!0)},p:X,d(r){r&&O(e),n=!1,a()}}}function H0(t){let e,n,a,r,i,o,l,s,d,u,c,h,y;e=new qd({props:{name:"Delete All Events",icon:"trash"}}),e.$on("click",t[12]),o=new Bt({}),o.$on("click",t[13]);let m=t[3],v=[];for(let A=0;A<m.length;A+=1)v[A]=Pd(Rd(t,m,A));let p=A=>W(v[A],1,1,()=>{v[A]=null}),k=null;m.length||(k=Ld(t));let C=!t[2]&&t[3].length<t[0].events.length&&jd(t);return{c(){te(e.$$.fragment),n=j(),a=T("div"),i=j(),te(o.$$.fragment),l=j(),s=T("div");for(let A=0;A<v.length;A+=1)v[A].c();k&&k.c(),d=j(),C&&C.c(),u=Ue(),D(a,"class","filter"),D(s,"class","existing-items")},m(A,S){ee(e,A,S),q(A,n,S),q(A,a,S),q(A,i,S),ee(o,A,S),q(A,l,S),q(A,s,S);for(let _=0;_<v.length;_+=1)v[_].m(s,null);k&&k.m(s,null),q(A,d,S),C&&C.m(A,S),q(A,u,S),c=!0,h||(y=le(r=t[9].call(null,a)),h=!0)},p(A,S){if(S&248){m=A[3];let _;for(_=0;_<m.length;_+=1){let F=Rd(A,m,_);v[_]?(v[_].p(F,S),R(v[_],1)):(v[_]=Pd(F),v[_].c(),R(v[_],1),v[_].m(s,null))}for(Ee(),_=m.length;_<v.length;_+=1)p(_);Ce(),!m.length&&k?k.p(A,S):m.length?k&&(Ee(),W(k,1,1,()=>{k=null}),Ce()):(k=Ld(A),k.c(),R(k,1),k.m(s,null))}!A[2]&&A[3].length<A[0].events.length?C?C.p(A,S):(C=jd(A),C.c(),C.m(u.parentNode,u)):C&&(C.d(1),C=null)},i(A){if(!c){R(e.$$.fragment,A),R(o.$$.fragment,A);for(let S=0;S<m.length;S+=1)R(v[S]);c=!0}},o(A){W(e.$$.fragment,A),W(o.$$.fragment,A),v=v.filter(Boolean);for(let S=0;S<v.length;S+=1)W(v[S]);c=!1},d(A){J(e,A),A&&O(n),A&&O(a),A&&O(i),J(o,A),A&&O(l),A&&O(s),We(v,A),k&&k.d(),A&&O(d),C&&C.d(A),A&&O(u),h=!1,y()}}}function W0(t){let e,n;return e=new ct({props:{name:"Events",desc:`Displaying ${t[3].length}/${t[0].events.length} events.`,$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&9&&(i.desc=`Displaying ${a[3].length}/${a[0].events.length} events.`),r&1048607&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function G0(t,e,n){let a,r,i,{calendar:o}=e,{plugin:l}=e,s=1,d=!1,u=S=>{n(3,r=r.filter(_=>_.id!==S.id))},c=S=>o.categories.find(({id:_})=>_==S),h=S=>{let _=new Oa(l,o,S);_.onClose=()=>{if(!!_.saved){if(_.editing){let F=o.events.findIndex(w=>w.id===_.event.id);o.events.splice(F,1,{..._.event})}else o.events.push({..._.event});n(3,r=o.events)}},_.open()},y=async()=>{await mr(l.app,"Are you sure you want to delete all events from this calendar?")&&n(0,o.events=[],o)},m=S=>{S.createDiv();let _;new qa.Setting(S).setName("Filter events").addSearch(F=>{_=F,F.onChange((0,qa.debounce)(w=>{if(!w){n(11,a=o.events.sort((x,V)=>x.date.year!=V.date.year?x.date.year-V.date.year:x.date.month!=V.date.month?x.date.month-V.date.month:x.date.day-V.date.day)),n(2,d=!1);return}let M=[];for(let x of a)(0,qa.prepareFuzzySearch)(w)(x.name)&&M.push(x);n(11,a=M),n(2,d=!0)},250))}).addExtraButton(F=>{F.setIcon("trash").setTooltip("Delete Filtered Events").onClick(async()=>{await mr(l.app,"Are you sure you want to delete the filtered events from this calendar?")&&(n(0,o.events=o.events.filter(w=>!a.includes(w)),o),_.setValue(""))})})},v=()=>y(),p=()=>h(),k=S=>h(S),C=S=>u(S),A=()=>n(1,s++,s);return t.$$set=S=>{"calendar"in S&&n(0,o=S.calendar),"plugin"in S&&n(10,l=S.plugin)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(11,a=o.events.sort((S,_)=>S.date.year!=_.date.year?S.date.year-_.date.year:S.date.month!=_.date.month?S.date.month-_.date.month:S.date.day-_.date.day))}if(t.$$.dirty&2050){e:n(3,r=a.slice(0,100*s))}if(t.$$.dirty&1){e:n(4,i=o.static.months)}},[o,s,d,r,i,u,c,h,y,m,l,a,v,p,k,C,A]}var Vd=class extends de{constructor(e){super();fe(this,e,G0,W0,se,{calendar:0,plugin:10},V0)}},Hd=Vd;var _i=xe(require("obsidian"));var Gd=xe(Wd());function U0(t){be(t,"svelte-1ok7o99",".category.svelte-1ok7o99{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:0.5rem;padding-top:0.75rem}")}function Ud(t,e,n){let a=t.slice();return a[8]=e[n],a}function z0(t){let e,n=t[1],a=[];for(let r=0;r<n.length;r+=1)a[r]=zd(Ud(t,n,r));return{c(){e=T("div");for(let r=0;r<a.length;r+=1)a[r].c();D(e,"class","existing-items")},m(r,i){q(r,e,i);for(let o=0;o<a.length;o+=1)a[o].m(e,null)},p(r,i){if(i&18){n=r[1];let o;for(o=0;o<n.length;o+=1){let l=Ud(r,n,o);a[o]?a[o].p(l,i):(a[o]=zd(l),a[o].c(),a[o].m(e,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},i:X,o:X,d(r){r&&O(e),We(a,r)}}}function Y0(t){let e,n;return e=new Wt({props:{message:"Create a new event category to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function zd(t){let e,n,a,r,i,o,l,s,d,u,c,h,y;function m(...v){return t[6](t[8],...v)}return{c(){e=T("div"),n=T("div"),r=j(),i=T("div"),o=T("input"),s=j(),d=T("div"),c=j(),D(o,"type","color"),o.value=l=t[8].color,D(i,"class","color"),D(e,"class","category svelte-1ok7o99")},m(v,p){q(v,e,p),E(e,n),E(e,r),E(e,i),E(i,o),E(e,s),E(e,d),E(e,c),h||(y=[le(a=t[2].call(null,n,t[8])),ie(o,"change",m),le(u=t[3].call(null,d,t[8]))],h=!0)},p(v,p){t=v,a&&rt(a.update)&&p&2&&a.update.call(null,t[8]),p&2&&l!==(l=t[8].color)&&(o.value=l),u&&rt(u.update)&&p&2&&u.update.call(null,t[8])},d(v){v&&O(e),h=!1,_e(y)}}}function Z0(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[5]);let l=[Y0,z0],s=[];function d(u,c){return u[1].length?1:0}return a=d(t,-1),r=s[a]=l[a](t),{c(){te(e.$$.fragment),n=j(),r.c(),i=Ue()},m(u,c){ee(e,u,c),q(u,n,c),s[a].m(u,c),q(u,i,c),o=!0},p(u,c){let h=a;a=d(u,c),a===h?s[a].p(u,c):(Ee(),W(s[h],1,1,()=>{s[h]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function K0(t){let e,n;return e=new ct({props:{name:"Categories",$$slots:{default:[Z0]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&2051&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Q0(t,e,n){let a,r=Se(),{calendar:i}=e,o=(c,h)=>{new _i.TextComponent(c).setValue(h.name).setPlaceholder("Name").onChange(m=>{h.name=m,r("update",h)}).inputEl.setAttr("style","width: 100%;")},l=(c,h)=>{new _i.ExtraButtonComponent(c).setIcon("trash").onClick(()=>{n(1,a=a.filter(y=>y.id!==h.id)),r("delete",h)})},s=(c,h)=>{let{target:y}=c;y instanceof HTMLInputElement&&(h.color=y.value,r("update",h))},d=()=>n(0,i.categories=[...a,{id:et(6),color:(0,Gd.default)(),name:"Category"}],i),u=(c,h)=>s(h,c);return t.$$set=c=>{"calendar"in c&&n(0,i=c.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=i.categories)}},[i,a,o,l,s,d,u]}var Yd=class extends de{constructor(e){super();fe(this,e,Q0,K0,se,{calendar:0},U0)}},Zd=Yd;var bs=xe(require("obsidian"));var ys="#808080",Ie=["M6.5,16a9.5,9.5 0 1,0 19,0a9.5,9.5 0 1,0 -19,0","M19.79,6C22.25,7.2,25,9.92,25,16s-2.75,8.8-5.21,10a10.59,10.59,0,0,1-3.79.71A10.72,10.72,0,0,1,16,5.28,10.59,10.59,0,0,1,19.79,6Z","M19.43,5.86C21.79,7,24.5,9.7,24.5,16s-2.71,9-5.07,10.14a10.55,10.55,0,0,1-3.43.58A10.72,10.72,0,0,1,16,5.28,10.55,10.55,0,0,1,19.43,5.86Z","M17.87,5.46C20.23,6.34,24,8.88,24,16.17c0,6.85-3.33,9.36-5.69,10.29a11,11,0,0,1-2.31.26A10.72,10.72,0,0,1,16,5.28,10.49,10.49,0,0,1,17.87,5.46Z","M17.79,5.45C20,6.3,23.5,8.77,23.5,15.88c0,7.37-3.75,9.87-5.95,10.71a9.92,9.92,0,0,1-1.55.13A10.72,10.72,0,0,1,16,5.28,10.54,10.54,0,0,1,17.79,5.45Z","M17.35,5.38c1.9.79,5.15,3.25,5.15,10.72,0,7.25-3.06,9.68-5,10.5a10.87,10.87,0,0,1-1.52.12A10.72,10.72,0,0,1,16,5.28,10.1,10.1,0,0,1,17.35,5.38Z","M17.05,5.34c1.6.75,4.45,3.17,4.45,10.79,0,7.39-2.68,9.76-4.3,10.52a11.9,11.9,0,0,1-1.2.07A10.72,10.72,0,0,1,16,5.28,9,9,0,0,1,17.05,5.34Z","M16.85,5.33c1.3.74,3.65,3.12,3.65,10.67s-2.35,9.93-3.65,10.67c-.28,0-.56,0-.85,0A10.72,10.72,0,0,1,16,5.28,7.92,7.92,0,0,1,16.85,5.33Z","M16.46,5.31c.95.78,3,3.34,3,10.69s-2.09,9.91-3,10.69l-.46,0A10.72,10.72,0,0,1,16,5.28Z","M16.29,5.3c.65.8,2.21,3.48,2.21,10.78S17,25.91,16.3,26.7l-.3,0A10.72,10.72,0,0,1,16,5.28Z","M16.13,5.29c.37.89,1.37,3.92,1.37,10.79s-1,9.76-1.36,10.63H16A10.72,10.72,0,0,1,16,5.28Z","M16,5.29A85.5,85.5,0,0,1,16.5,16,85.5,85.5,0,0,1,16,26.71h0A10.72,10.72,0,0,1,16,5.28Z","M16,26.72A10.72,10.72,0,0,1,16,5.28Z","M15.5,16A85.59,85.59,0,0,0,16,26.72,10.72,10.72,0,0,1,16,5.28,85.59,85.59,0,0,0,15.5,16Z","M14.5,16.08c0,6.84,1,9.77,1.36,10.63a10.71,10.71,0,0,1,0-21.42C15.5,6.17,14.5,9.2,14.5,16.08Z","M15.7,26.7a10.7,10.7,0,0,1,0-21.4c-.65.8-2.21,3.47-2.21,10.78S15,25.92,15.7,26.7Z","M15.55,26.7a10.71,10.71,0,0,1,0-21.4c-1,.78-3.05,3.34-3.05,10.7S14.6,25.92,15.55,26.7Z","M15.16,26.68a10.71,10.71,0,0,1,0-21.36C13.85,6.06,11.5,8.43,11.5,16S13.85,25.94,15.16,26.68Z","M14.81,26.65A10.72,10.72,0,0,1,15,5.33c-1.59.76-4.45,3.17-4.45,10.8C10.5,23.53,13.19,25.9,14.81,26.65Z","M14.49,26.6a10.71,10.71,0,0,1,.17-21.23c-1.9.8-5.16,3.24-5.16,10.73C9.5,23.37,12.57,25.79,14.49,26.6Z","M14.46,26.6a10.71,10.71,0,0,1-.24-21.16C12,6.29,8.5,8.76,8.5,15.88,8.5,23.26,12.27,25.76,14.46,26.6Z","M13.72,26.47a10.71,10.71,0,0,1,.43-21C11.78,6.33,8,8.87,8,16.17,8,23,11.35,25.55,13.72,26.47Z","M12.6,26.19a10.73,10.73,0,0,1,0-20.35C10.23,7,7.5,9.67,7.5,16s2.73,9,5.1,10.16Z","M12.23,26a10.7,10.7,0,0,1,0-20C9.77,7.19,7,9.9,7,16S9.77,24.81,12.23,26Z",null,"M19.77,26C22.23,24.81,25,22.1,25,16S22.23,7.19,19.77,6a10.7,10.7,0,0,1,0,20Z","M19.4,26.16C21.77,25,24.5,22.33,24.5,16S21.77,7,19.4,5.84a10.71,10.71,0,0,1,0,20.32Z","M18.28,26.47C20.65,25.55,24,23,24,16.17c0-7.3-3.78-9.84-6.15-10.72a10.71,10.71,0,0,1,.43,21Z","M17.54,26.6c2.19-.84,6-3.34,6-10.72,0-7.12-3.5-9.59-5.72-10.44a10.71,10.71,0,0,1-.24,21.16Z","M17.51,26.6c1.92-.81,5-3.23,5-10.5,0-7.49-3.26-9.93-5.16-10.73a10.71,10.71,0,0,1,.17,21.23Z","M17.19,26.65c1.62-.75,4.31-3.12,4.31-10.52,0-7.63-2.86-10-4.45-10.8a10.72,10.72,0,0,1,.14,21.32Z","M16.84,26.68c1.31-.74,3.66-3.11,3.66-10.68S18.15,6.06,16.84,5.32a10.71,10.71,0,0,1,0,21.36Z","M16.45,26.7c.95-.78,3.05-3.34,3.05-10.7S17.4,6.08,16.45,5.3a10.71,10.71,0,0,1,0,21.4Z","M16.3,26.7c.67-.78,2.2-3.37,2.2-10.62S16.94,6.1,16.29,5.3a10.7,10.7,0,0,1,0,21.4Z","M16.14,26.71c.37-.86,1.36-3.79,1.36-10.63s-1-9.91-1.37-10.79a10.71,10.71,0,0,1,0,21.42Z","M16,26.72A85.59,85.59,0,0,0,16.5,16,85.59,85.59,0,0,0,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72V5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h0A85.59,85.59,0,0,1,15.5,16,85.59,85.59,0,0,1,16,5.28h0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h-.14c-.37-.86-1.36-3.79-1.36-10.63s1-9.91,1.37-10.79H16a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.3,0c-.67-.78-2.2-3.37-2.2-10.62s1.56-10,2.21-10.78l.29,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.45,0c-1-.78-3.05-3.34-3.05-10.7s2.1-9.92,3.05-10.7l.45,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72c-.28,0-.56,0-.84,0C13.85,25.94,11.5,23.57,11.5,16s2.35-9.94,3.66-10.68c.28,0,.56,0,.84,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.7,11.7,0,0,1-1.19-.07c-1.62-.75-4.31-3.12-4.31-10.52,0-7.63,2.86-10,4.45-10.8.35,0,.7,0,1.05,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.85,10.85,0,0,1-1.51-.12c-1.92-.81-5-3.23-5-10.5,0-7.49,3.26-9.93,5.16-10.73A11.9,11.9,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.16,11.16,0,0,1-1.54-.12c-2.19-.84-6-3.34-6-10.72,0-7.12,3.5-9.59,5.72-10.44A10.43,10.43,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.69,10.69,0,0,1-2.28-.25C11.35,25.55,8,23,8,16.17c0-7.3,3.78-9.84,6.15-10.72A11.26,11.26,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.63,10.63,0,0,1-3.4-.56C10.23,25,7.5,22.33,7.5,16s2.73-9,5.1-10.16A10.72,10.72,0,1,1,16,26.72Z","M16,26.72a10.52,10.52,0,0,1-3.77-.7C9.77,24.81,7,22.1,7,16S9.77,7.19,12.23,6A10.52,10.52,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z"],Kd={"New Moon":Ie[0],"New Moon Fading":Ie[1],"New Moon Faded":Ie[2],"Waxing Crescent Rising":Ie[3],"Waxing Crescent Risen":Ie[4],"Waxing Crescent":Ie[6],"Waxing Crescent Fading":Ie[7],"Waxing Crescent Faded":Ie[8],"First Quarter Rising":Ie[9],"First Quarter Risen":Ie[10],"First Quarter":Ie[12],"First Quarter Fading":Ie[13],"First Quarter Faded":Ie[14],"Waxing Gibbous Rising":Ie[15],"Waxing Gibbous Risen":Ie[16],"Waxing Gibbous":Ie[18],"Waxing Gibbous Fading":Ie[19],"Waxing Gibbous Faded":Ie[20],"Full Moon Rising":Ie[21],"Full Moon Risen":Ie[22],"Full Moon":Ie[24],"Full Moon Fading":Ie[25],"Full Moon Faded":Ie[26],"Waning Gibbous Rising":Ie[27],"Waning Gibbous Risen":Ie[28],"Waning Gibbous":Ie[30],"Waning Gibbous Fading":Ie[31],"Waning Gibbous Faded":Ie[32],"Last Quarter Rising":Ie[33],"Last Quarter Risen":Ie[34],"Last Quarter":Ie[36],"Last Quarter Fading":Ie[37],"Last Quarter Faded":Ie[38],"Waning Crescent Rising":Ie[39],"Waning Crescent Risen":Ie[40],"Waning Crescent":Ie[42],"Waning Crescent Fading":Ie[43],"Waning Crescent Faded":Ie[44],"New Moon Rising":Ie[45],"New Moon Risen":Ie[46]},Qd={4:["New Moon","First Quarter","Full Moon","Last Quarter"],8:["New Moon","Waxing Crescent","First Quarter","Waxing Gibbous","Full Moon","Waning Gibbous","Last Quarter","Waning Crescent"],16:["New Moon","New Moon Fading","Waxing Crescent","Waxing Crescent Fading","First Quarter","First Quarter Fading","Waxing Gibbous","Waxing Gibbous Fading","Full Moon","Full Moon Fading","Waning Gibbous","Waning Gibbous Fading","Last Quarter","Last Quarter Fading","Waning Crescent","Waning Crescent Fading"],24:["New Moon","New Moon Fading","Waxing Crescent Rising","Waxing Crescent","Waxing Crescent Fading","First Quarter Rising","First Quarter","First Quarter Fading","Waxing Gibbous Rising","Waxing Gibbous","Waxing Gibbous Fading","Full Moon Rising","Full Moon","Full Moon Fading","Waning Gibbous Rising","Waning Gibbous","Waning Gibbous Fading","Last Quarter Rising","Last Quarter","Last Quarter Fading","Waning Crescent Rising","Waning Crescent","Waning Crescent Fading","New Moon Rising"],40:["New Moon","New Moon Fading","New Moon Faded","Waxing Crescent Rising","Waxing Crescent Risen","Waxing Crescent","Waxing Crescent Fading","Waxing Crescent Faded","First Quarter Rising","First Quarter Risen","First Quarter","First Quarter Fading","First Quarter Faded","Waxing Gibbous Rising","Waxing Gibbous Risen","Waxing Gibbous","Waxing Gibbous Fading","Waxing Gibbous Faded","Full Moon Rising","Full Moon Risen","Full Moon","Full Moon Fading","Full Moon Faded","Waning Gibbous Rising","Waning Gibbous Risen","Waning Gibbous","Waning Gibbous Fading","Waning Gibbous Faded","Last Quarter Rising","Last Quarter Risen","Last Quarter","Last Quarter Fading","Last Quarter Faded","Waning Crescent Rising","Waning Crescent Risen","Waning Crescent","Waning Crescent Fading","Waning Crescent Faded","New Moon Rising","New Moon Risen"]};function X0(t){let e,n,a,r,i,o,l,s;return{c(){e=an("svg"),n=an("circle"),r=an("path"),o=an("circle"),D(n,"cx","16"),D(n,"cy","16"),D(n,"r","10"),D(n,"fill",a=t[0].faceColor),D(r,"class","shadow"),D(r,"fill",i=t[0].shadowColor),D(r,"d",t[4]),D(o,"cx","16"),D(o,"cy","16"),D(o,"r","10"),D(o,"fill","none"),D(o,"stroke","#000"),D(o,"stroke-width","2px"),D(e,"class","moon"),D(e,"id",l=t[0].id),D(e,"preserveAspectRatio","xMidYMid"),D(e,"aria-label",s=t[1]?`${t[0].name}
${t[3]}`:null),D(e,"width",t[2]),D(e,"height",t[2]),D(e,"viewBox","0 0 32 32")},m(d,u){q(d,e,u),E(e,n),E(e,r),E(e,o)},p(d,[u]){u&1&&a!==(a=d[0].faceColor)&&D(n,"fill",a),u&1&&i!==(i=d[0].shadowColor)&&D(r,"fill",i),u&16&&D(r,"d",d[4]),u&1&&l!==(l=d[0].id)&&D(e,"id",l),u&11&&s!==(s=d[1]?`${d[0].name}
${d[3]}`:null)&&D(e,"aria-label",s),u&4&&D(e,"width",d[2]),u&4&&D(e,"height",d[2])},i:X,o:X,d(d){d&&O(e)}}}function J0(t,e,n){let a,{moon:r}=e,{label:i=!0}=e,{size:o=28}=e,{phase:l}=e;return t.$$set=s=>{"moon"in s&&n(0,r=s.moon),"label"in s&&n(1,i=s.label),"size"in s&&n(2,o=s.size),"phase"in s&&n(3,l=s.phase)},t.$$.update=()=>{if(t.$$.dirty&8){e:n(4,a=Kd[l])}},[r,i,o,l,a]}var Xd=class extends de{constructor(e){super();fe(this,e,J0,X0,se,{moon:0,label:1,size:2,phase:3})}},Rn=Xd;var en=xe(require("obsidian"));var vs=class extends en.Modal{constructor(e,n,a){super(e);this.calendar=n;this.saved=!1;this.moon={name:null,cycle:null,offset:null,faceColor:"#fff",shadowColor:"#000",id:et(6)};a&&(this.moon={...a},this.editing=!0),this.containerEl.addClass("fantasy-calendar-create-moon")}async display(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Moon":"New Moon"}),this.infoEl=this.contentEl.createDiv("moon-info"),this.buildInfo(),new en.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(()=>{if(!this.moon.name?.length){new en.Notice("The moon must have a name.");return}if(!this.moon.cycle){new en.Notice("The moon must have a positive cycle.");return}this.saved=!0,this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildInfo(){this.infoEl.empty(),new en.Setting(this.infoEl).setName("Name").addText(e=>{e.setValue(this.moon.name).onChange(n=>{this.moon.name=n})}),new en.Setting(this.infoEl).setName("Cycle").setDesc("How many days it takes for the moon to complete a full cycle.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.cycle}`).onChange(n=>{isNaN(Number(n))||(this.moon.cycle=Number(n))})}),new en.Setting(this.infoEl).setName("Offset").setDesc("Shift the starting moon phase by a number of days.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.offset}`).onChange(n=>{isNaN(Number(n))||(this.moon.offset=Number(n))})}),new en.Setting(this.infoEl).setName("Face Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.faceColor).onChange(n=>{this.moon.faceColor=n})}),new en.Setting(this.infoEl).setName("Shadow Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.shadowColor).onChange(n=>{this.moon.shadowColor=n})})}async onOpen(){await this.display()}};function $0(t){be(t,"svelte-v24qmo",".moon.svelte-v24qmo{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.setting-item-name.svelte-v24qmo{display:flex;align-items:center}.icons.svelte-v24qmo{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.icon.svelte-v24qmo{align-items:center}")}function Jd(t,e,n){let a=t.slice();return a[13]=e[n],a}function e1(t){let e,n,a=t[1],r=[];for(let o=0;o<a.length;o+=1)r[o]=$d(Jd(t,a,o));let i=o=>W(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","existing-items")},m(o,l){q(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&98){a=o[1];let s;for(s=0;s<a.length;s+=1){let d=Jd(o,a,s);r[s]?(r[s].p(d,l),R(r[s],1)):(r[s]=$d(d),r[s].c(),R(r[s],1),r[s].m(e,null))}for(Ee(),s=a.length;s<r.length;s+=1)i(s);Ce()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)R(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)W(r[l]);n=!1},d(o){o&&O(e),We(r,o)}}}function t1(t){let e,n;return e=new Wt({props:{message:"Create a new moon to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function $d(t){let e,n,a,r,i,o=t[13].name+"",l,s,d,u,c,h=t[13].cycle+"",y,m,v,p,k,C,A,S,_,F,w,M,x;r=new Rn({props:{moon:t[13],phase:"First Quarter",label:!1,size:20}});function V(){return t[10](t[13])}function B(){return t[11](t[13])}return{c(){e=T("div"),n=T("div"),a=T("span"),te(r.$$.fragment),i=j(),l=me(o),s=j(),d=T("div"),u=T("div"),c=me("Cycle: "),y=me(h),m=me(" days"),v=j(),p=T("div"),k=T("div"),A=j(),S=T("div"),F=j(),D(a,"class","setting-item-name svelte-v24qmo"),D(u,"class","date"),D(d,"class","setting-item-description"),D(n,"class","moon-info"),D(k,"class","icon svelte-v24qmo"),D(S,"class","icon svelte-v24qmo"),D(p,"class","icons svelte-v24qmo"),D(e,"class","moon svelte-v24qmo")},m(H,Y){q(H,e,Y),E(e,n),E(n,a),ee(r,a,null),E(a,i),E(a,l),E(n,s),E(n,d),E(d,u),E(u,c),E(u,y),E(u,m),E(e,v),E(e,p),E(p,k),E(p,A),E(p,S),E(e,F),w=!0,M||(x=[le(C=t[4].call(null,k)),ie(k,"click",V),le(_=t[3].call(null,S)),ie(S,"click",B)],M=!0)},p(H,Y){t=H;let he={};Y&2&&(he.moon=t[13]),r.$set(he),(!w||Y&2)&&o!==(o=t[13].name+"")&&we(l,o),(!w||Y&2)&&h!==(h=t[13].cycle+"")&&we(y,h)},i(H){w||(R(r.$$.fragment,H),w=!0)},o(H){W(r.$$.fragment,H),w=!1},d(H){H&&O(e),J(r),M=!1,_e(x)}}}function n1(t){let e,n,a,r,i,o,l,s;e=new Tt({props:{name:"Display Moons",desc:"Display moons by default when viewing this calendar.",value:t[2]}}),e.$on("click",t[8]),a=new Bt({}),a.$on("click",t[9]);let d=[t1,e1],u=[];function c(h,y){return h[1].length?1:0}return i=c(t,-1),o=u[i]=d[i](t),{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),o.c(),l=Ue()},m(h,y){ee(e,h,y),q(h,n,y),ee(a,h,y),q(h,r,y),u[i].m(h,y),q(h,l,y),s=!0},p(h,y){let m={};y&4&&(m.value=h[2]),e.$set(m);let v=i;i=c(h,y),i===v?u[i].p(h,y):(Ee(),W(u[v],1,1,()=>{u[v]=null}),Ce(),o=u[i],o?o.p(h,y):(o=u[i]=d[i](h),o.c()),R(o,1),o.m(l.parentNode,l))},i(h){s||(R(e.$$.fragment,h),R(a.$$.fragment,h),R(o),s=!0)},o(h){W(e.$$.fragment,h),W(a.$$.fragment,h),W(o),s=!1},d(h){J(e,h),h&&O(n),J(a,h),h&&O(r),u[i].d(h),h&&O(l)}}}function a1(t){let e,n;return e=new ct({props:{name:"Moons",$$slots:{default:[n1]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&65543&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function r1(t,e,n){let a,r,{calendar:i}=e,{plugin:o}=e,l=Se(),s=p=>{let k=new bs.ExtraButtonComponent(p).setIcon("trash").setTooltip("Delete")},d=p=>{new bs.ExtraButtonComponent(p).setIcon("pencil").setTooltip("Edit")},u=p=>{n(0,i.static.moons=i.static.moons.filter(k=>k.id!==p.id),i)},c=p=>{let k=new vs(o.app,i,p);k.onClose=()=>{if(!!k.saved){if(k.editing){let C=i.static.moons.findIndex(A=>A.id===k.moon.id);i.static.moons.splice(C,1,{...k.moon})}else i.static.moons.push({...k.moon});n(1,a=i.static.moons)}},k.open()},h=()=>n(0,i.static.displayMoons=!i.static.displayMoons,i),y=()=>c(),m=p=>c(p),v=p=>u(p);return t.$$set=p=>{"calendar"in p&&n(0,i=p.calendar),"plugin"in p&&n(7,o=p.plugin)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=i.static.moons)}if(t.$$.dirty&1){e:n(2,r=i.static.displayMoons)}},[i,a,r,s,d,u,c,o,h,y,m,v]}var ef=class extends de{constructor(e){super();fe(this,e,r1,a1,se,{calendar:0,plugin:7},$0)}},tf=ef;var ws=xe(require("obsidian"));function i1(t){be(t,"svelte-1rh93fc",".leapday.svelte-1rh93fc.svelte-1rh93fc{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.leapday-info.svelte-1rh93fc.svelte-1rh93fc{width:100%}.icons.svelte-1rh93fc.svelte-1rh93fc{display:flex;align-self:center;justify-self:flex-end;align-items:center}.leapday.svelte-1rh93fc .icon.svelte-1rh93fc{align-items:center}")}function o1(t){let e,n,a,r=t[0].name+"",i,o,l,s,d,u,c,h,y,m,v,p,k;return{c(){e=T("div"),n=T("div"),a=T("span"),i=me(r),o=j(),l=T("div"),s=me(t[1]),d=j(),u=T("div"),c=T("div"),y=j(),m=T("div"),D(a,"class","setting-item-name"),D(l,"class","setting-item-description"),D(n,"class","leapday-info svelte-1rh93fc"),D(c,"class","icon svelte-1rh93fc"),D(m,"class","icon svelte-1rh93fc"),D(u,"class","icons svelte-1rh93fc"),D(e,"class","leapday svelte-1rh93fc")},m(C,A){q(C,e,A),E(e,n),E(n,a),E(a,i),E(n,o),E(n,l),E(l,s),E(e,d),E(e,u),E(u,c),E(u,y),E(u,m),p||(k=[le(h=t[4].call(null,c)),ie(c,"click",t[5]),le(v=t[3].call(null,m)),ie(m,"click",t[6])],p=!0)},p(C,[A]){A&1&&r!==(r=C[0].name+"")&&we(i,r),A&2&&we(s,C[1])},i:X,o:X,d(C){C&&O(e),p=!1,_e(k)}}}function s1(t,e,n){let a,r=Se(),i=u=>{new ws.ExtraButtonComponent(u).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},o=u=>{new ws.ExtraButtonComponent(u).setIcon("pencil").setTooltip("Edit")},{leapday:l}=e,s=()=>r("edit"),d=()=>r("delete");return t.$$set=u=>{"leapday"in u&&n(0,l=u.leapday)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=Ua(l))}},[l,a,r,i,o,s,d]}var nf=class extends de{constructor(e){super();fe(this,e,s1,o1,se,{leapday:0},i1)}},af=nf;var gf=xe(Vn()),An=xe(require("obsidian"));var vr=xe(require("obsidian"));function l1(t){be(t,"svelte-n1tx0h",".intercalary-settings.svelte-n1tx0h{display:flex;justify-content:space-around}.buttons.svelte-n1tx0h{display:flex;justify-content:flex-end}")}function rf(t,e,n){let a=t.slice();return a[24]=e[n],a}function of(t,e,n){let a=t.slice();return a[27]=e[n],a}function sf(t,e,n){let a=t.slice();return a[30]=e[n],a[32]=n,a}function lf(t){let e,n=(t[30].name??"")+"",a,r,i,o;return{c(){e=T("option"),a=me(n),r=j(),e.__value=i=t[32],e.value=e.__value,e.selected=o=t[32]==t[0].timespan},m(l,s){q(l,e,s),E(e,a),E(e,r)},p(l,s){s[0]&2&&n!==(n=(l[30].name??"")+"")&&we(a,n),s[0]&1&&o!==(o=l[32]==l[0].timespan)&&(e.selected=o)},d(l){l&&O(e)}}}function uf(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k=t[3],C=[];for(let A=0;A<k.length;A+=1)C[A]=cf(of(t,k,A));return{c(){e=T("div"),n=T("div"),a=T("input"),i=j(),o=T("label"),o.textContent="Numbered",l=j(),s=T("div"),d=T("label"),d.textContent="After",u=j(),c=T("select"),h=T("option"),y=me("Before 1");for(let A=0;A<C.length;A+=1)C[A].c();D(a,"id","numbered"),D(a,"type","checkbox"),a.checked=r=t[0].numbered,D(o,"for","numbered"),D(n,"class","numbered intercalary-field"),D(d,"for","after"),h.selected=m=t[0].after==0,h.__value="0",h.value=h.__value,D(c,"class","dropdown"),t[0].after===void 0&&It(()=>t[18].call(c)),D(s,"class","after intercalary-field"),D(e,"class","setting-item intercalary-settings svelte-n1tx0h")},m(A,S){q(A,e,S),E(e,n),E(n,a),E(n,i),E(n,o),E(e,l),E(e,s),E(s,d),E(s,u),E(s,c),E(c,h),E(h,y);for(let _=0;_<C.length;_+=1)C[_].m(c,null);Vt(c,t[0].after),v||(p=[ie(a,"change",t[17]),ie(c,"change",t[18])],v=!0)},p(A,S){if(S[0]&1&&r!==(r=A[0].numbered)&&(a.checked=r),S[0]&1&&m!==(m=A[0].after==0)&&(h.selected=m),S[0]&9){k=A[3];let _;for(_=0;_<k.length;_+=1){let F=of(A,k,_);C[_]?C[_].p(F,S):(C[_]=cf(F),C[_].c(),C[_].m(c,null))}for(;_<C.length;_+=1)C[_].d(1);C.length=k.length}S[0]&1&&Vt(c,A[0].after)},d(A){A&&O(e),We(C,A),v=!1,_e(p)}}}function cf(t){let e,n=t[27]+"",a,r,i;return{c(){e=T("option"),a=me(n),e.selected=r=t[0].after==t[27],e.__value=i=t[27],e.value=e.__value},m(o,l){q(o,e,l),E(e,a)},p(o,l){l[0]&8&&n!==(n=o[27]+"")&&we(a,n),l[0]&9&&r!==(r=o[0].after==o[27])&&(e.selected=r),l[0]&8&&i!==(i=o[27])&&(e.__value=i,e.value=e.__value)},d(o){o&&O(e)}}}function df(t){let e,n,a,r=t[7](t[24])+"",i,o,l,s,d,u,c,h,y,m,v;function p(){return t[21](t[24])}function k(){return t[22](t[24])}return{c(){e=T("div"),n=T("div"),a=T("div"),i=me(r),o=j(),l=T("div"),s=T("div"),u=j(),c=T("div"),y=j(),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(l,"class","setting-item-control"),D(e,"class","setting-item")},m(C,A){q(C,e,A),E(e,n),E(n,a),E(a,i),E(e,o),E(e,l),E(l,s),E(l,u),E(l,c),E(e,y),m||(v=[le(d=t[8].call(null,s)),ie(s,"click",p),le(h=t[9].call(null,c)),ie(c,"click",k)],m=!0)},p(C,A){t=C,A[0]&4&&r!==(r=t[7](t[24])+"")&&we(i,r)},d(C){C&&O(e),m=!1,_e(v)}}}function u1(t){let e,n,a,r,i,o,l=Ua(t[0])+"",s,d,u,c;e=new En({props:{type:"number",name:"Offset",desc:"Offset the year the leap day is applied to.",value:`${t[0].offset}`}}),e.$on("blur",t[19]),a=new Bt({}),a.$on("click",t[20]);let h=t[2],y=[];for(let m=0;m<h.length;m+=1)y[m]=df(rf(t,h,m));return{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),i=T("div"),o=T("div"),s=me(l),d=j();for(let m=0;m<y.length;m+=1)y[m].c();u=Ue(),D(o,"class","setting-item-description"),D(i,"class","setting-item")},m(m,v){ee(e,m,v),q(m,n,v),ee(a,m,v),q(m,r,v),q(m,i,v),E(i,o),E(o,s),q(m,d,v);for(let p=0;p<y.length;p+=1)y[p].m(m,v);q(m,u,v),c=!0},p(m,v){let p={};if(v[0]&1&&(p.value=`${m[0].offset}`),e.$set(p),(!c||v[0]&1)&&l!==(l=Ua(m[0])+"")&&we(s,l),v[0]&197){h=m[2];let k;for(k=0;k<h.length;k+=1){let C=rf(m,h,k);y[k]?y[k].p(C,v):(y[k]=df(C),y[k].c(),y[k].m(u.parentNode,u))}for(;k<y.length;k+=1)y[k].d(1);y.length=h.length}},i(m){c||(R(e.$$.fragment,m),R(a.$$.fragment,m),c=!0)},o(m){W(e.$$.fragment,m),W(a.$$.fragment,m),c=!1},d(m){J(e,m),m&&O(n),J(a,m),m&&O(r),m&&O(i),m&&O(d),We(y,m),m&&O(u)}}}function c1(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S;n=new En({props:{name:"Name",value:t[0].name,warn:!t[0].name}}),n.$on("blur",t[14]);let _=t[1],F=[];for(let M=0;M<_.length;M+=1)F[M]=lf(sf(t,_,M));u=new Tt({props:{name:"Intercalary",value:t[0].intercalary,desc:"Intercalary days interrupt the normal flow of the month."}}),u.$on("click",t[16]);let w=t[4]&&uf(t);return y=new ct({props:{name:"Conditions",open:!0,warn:!t[0].interval.length,label:"At least one condition is required",$$slots:{default:[u1]},$$scope:{ctx:t}}}),{c(){e=T("div"),te(n.$$.fragment),a=j(),r=T("div"),i=T("div"),i.innerHTML=`<div class="setting-item-name">Month</div>
<div class="setting-item-description">The leap day will be added to this month.</div>`,o=j(),l=T("div"),s=T("select");for(let M=0;M<F.length;M+=1)F[M].c();d=j(),te(u.$$.fragment),c=j(),w&&w.c(),h=j(),te(y.$$.fragment),m=j(),v=T("div"),p=T("div"),D(i,"class","setting-item-info"),D(s,"class","dropdown"),t[0].timespan===void 0&&It(()=>t[15].call(s)),D(l,"class","setting-item-control"),D(r,"class","setting-item"),D(e,"class","fantasy-calendar-nested-settings"),D(v,"class","buttons svelte-n1tx0h")},m(M,x){q(M,e,x),ee(n,e,null),E(e,a),E(e,r),E(r,i),E(r,o),E(r,l),E(l,s);for(let V=0;V<F.length;V+=1)F[V].m(s,null);Vt(s,t[0].timespan),E(e,d),ee(u,e,null),E(e,c),w&&w.m(e,null),q(M,h,x),ee(y,M,x),q(M,m,x),q(M,v,x),E(v,p),C=!0,A||(S=[ie(s,"change",t[15]),le(k=t[10].call(null,p)),ie(p,"click",t[23])],A=!0)},p(M,x){let V={};if(x[0]&1&&(V.value=M[0].name),x[0]&1&&(V.warn=!M[0].name),n.$set(V),x[0]&3){_=M[1];let Y;for(Y=0;Y<_.length;Y+=1){let he=sf(M,_,Y);F[Y]?F[Y].p(he,x):(F[Y]=lf(he),F[Y].c(),F[Y].m(s,null))}for(;Y<F.length;Y+=1)F[Y].d(1);F.length=_.length}x[0]&1&&Vt(s,M[0].timespan);let B={};x[0]&1&&(B.value=M[0].intercalary),u.$set(B),M[4]?w?w.p(M,x):(w=uf(M),w.c(),w.m(e,null)):w&&(w.d(1),w=null);let H={};x[0]&1&&(H.warn=!M[0].interval.length),x[0]&5|x[1]&4&&(H.$$scope={dirty:x,ctx:M}),y.$set(H)},i(M){C||(R(n.$$.fragment,M),R(u.$$.fragment,M),R(y.$$.fragment,M),C=!0)},o(M){W(n.$$.fragment,M),W(u.$$.fragment,M),W(y.$$.fragment,M),C=!1},d(M){M&&O(e),J(n),We(F,M),J(u),w&&w.d(),M&&O(h),J(y,M),M&&O(m),M&&O(v),A=!1,_e(S)}}}function d1(t,e,n){let a,r,i,o,l,s=Se(),{app:d}=e,{leapDay:u}=e,{calendar:c}=e,h=B=>{let H=new Ds(d,u.interval.length>0,B);H.onClose=()=>{!H.saved||!H.condition.interval||(B?u.interval.splice(u.interval.indexOf(B),1,H.condition):u.interval.push(H.condition),n(0,u))},H.open()},y=B=>{let H=[`${B.interval}`];return B.exclusive&&H.push("(Exclusive)"),B.ignore&&H.push(" - Ignoring Offset"),H.join(" ")},m=B=>{new vr.ExtraButtonComponent(B).setIcon("pencil")},v=B=>{new vr.ExtraButtonComponent(B).setIcon("trash")},p=B=>{new vr.ButtonComponent(B).setButtonText("Cancel").setCta()},k=B=>n(0,u.name=B.detail,u);function C(){u.timespan=vn(this),n(0,u)}let A=B=>n(0,u.intercalary=!u.intercalary,u),S=()=>n(0,u.numbered=!u.numbered,u);function _(){u.after=vn(this),n(0,u)}let F=B=>n(0,u.offset=B.detail,u),w=()=>h(),M=B=>h(B),x=B=>n(0,u.interval=u.interval.filter(H=>H!=B),u),V=()=>s("cancel");return t.$$set=B=>{"app"in B&&n(11,d=B.app),"leapDay"in B&&n(0,u=B.leapDay),"calendar"in B&&n(12,c=B.calendar)},t.$$.update=()=>{if(t.$$.dirty[0]&1){e:n(4,a=u.intercalary)}if(t.$$.dirty[0]&4096){e:n(1,r=c.static.months)}if(t.$$.dirty[0]&3){e:n(13,i=r[u.timespan])}if(t.$$.dirty[0]&8192){e:n(3,o=i.length?[...Array(i.length).keys()].map(B=>B+1):[])}if(t.$$.dirty[0]&1){e:n(2,l=u.interval.sort((B,H)=>B.interval-H.interval))}},[u,r,l,o,a,s,h,y,m,v,p,d,c,i,k,C,A,S,_,F,w,M,x,V]}var ff=class extends de{constructor(e){super();fe(this,e,d1,c1,se,{app:11,leapDay:0,calendar:12},l1,[-1,-1])}},hf=ff;function f1(t){let e,n,a,r,i,o;return e=new En({props:{type:"number",name:"Interval",desc:"How often the condition applies.",value:t[0].interval,warn:!t[0].interval}}),e.$on("blur",t[2]),a=new Tt({props:{disabled:!t[1],name:"Exclusive",desc:"If true, the leap day will not apply when the year meets the condition.\\n\\nRequires the leap day to have at least one non-exclusive condition.",value:t[0].exclusive}}),a.$on("click",t[3]),i=new Tt({props:{name:"Ignore Offset",desc:"The condition will ignore the leap day's offset when checking to apply.",value:t[0].ignore}}),i.$on("click",t[4]),{c(){te(e.$$.fragment),n=j(),te(a.$$.fragment),r=j(),te(i.$$.fragment)},m(l,s){ee(e,l,s),q(l,n,s),ee(a,l,s),q(l,r,s),ee(i,l,s),o=!0},p(l,[s]){let d={};s&1&&(d.value=l[0].interval),s&1&&(d.warn=!l[0].interval),e.$set(d);let u={};s&2&&(u.disabled=!l[1]),s&1&&(u.value=l[0].exclusive),a.$set(u);let c={};s&1&&(c.value=l[0].ignore),i.$set(c)},i(l){o||(R(e.$$.fragment,l),R(a.$$.fragment,l),R(i.$$.fragment,l),o=!0)},o(l){W(e.$$.fragment,l),W(a.$$.fragment,l),W(i.$$.fragment,l),o=!1},d(l){J(e,l),l&&O(n),J(a,l),l&&O(r),J(i,l)}}}function h1(t,e,n){let{canBeExclusive:a}=e,{condition:r}=e,i=s=>n(0,r.interval=s.detail,r),o=()=>a?n(0,r.exclusive=!r.exclusive,r):null,l=()=>n(0,r.ignore=!r.ignore,r);return t.$$set=s=>{"canBeExclusive"in s&&n(1,a=s.canBeExclusive),"condition"in s&&n(0,r=s.condition)},[r,a,i,o,l]}var mf=class extends de{constructor(e){super();fe(this,e,h1,f1,se,{canBeExclusive:1,condition:0})}},pf=mf;var _s=class extends An.Modal{constructor(e,n,a){super(e);this.calendar=n;this.saved=!0;this.leapday={id:et(6),name:"Leap Day",interval:[],intercalary:!1,timespan:0,offset:0,type:"leapday"};a&&(this.leapday=(0,gf.default)(a),this.editing=!0),this.containerEl.addClasses(["fantasy-calendar-create-leapday","fantasy-calendar-settings"])}async display(){this.titleEl.setText(this.editing?"Edit Leap Day":"New Leap Day"),new hf({target:this.contentEl,props:{leapDay:this.leapday,calendar:this.calendar,app:this.app}}).$on("cancel",()=>{this.saved=!1,this.close()})}async onOpen(){await this.display()}},Ds=class extends An.Modal{constructor(e,n,a){super(e);this.app=e;this.canBeExclusive=n;this.saved=!0;this.editing=!1;this.condition={interval:null,exclusive:!1,ignore:!1};a&&(this.condition={...a},this.editing=!0)}onOpen(){this.containerEl.addClasses(["fantasy-calendar-settings","fantasy-calendar-nested-settings"]),this.contentEl.empty(),this.titleEl.setText("Leap Day Condition"),new pf({target:this.contentEl,props:{canBeExclusive:this.canBeExclusive,condition:this.condition}}),this.buttonsEl=this.contentEl.createDiv("fantasy-context-buttons setting-item"),new An.ButtonComponent(this.buttonsEl).setCta().setButtonText("Cancel").onClick(()=>{this.saved=!1,this.close()})}old(){new An.Setting(this.contentEl).setName("Interval").setDesc("How often the condition applies.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.condition.interval}`).onChange(n=>{isNaN(Number(n))||(this.condition.interval=Number(n))})}),new An.Setting(this.contentEl).setName("Exclusive").setDesc(`If true, the leap day will not apply when the year meets the condition.
Requires the leap day to have at least one non-exclusive condition.`).addToggle(e=>e.setDisabled(!this.canBeExclusive).setValue(this.condition.exclusive).onChange(n=>this.condition.exclusive=n)),new An.Setting(this.contentEl).setName("Ignore Offset").setDesc("The condition will ignore the leap day's offset when checking to apply.").addToggle(e=>e.setValue(this.condition.ignore).onChange(n=>this.condition.ignore=n))}};function yf(t,e,n){let a=t.slice();return a[10]=e[n],a}function m1(t){let e,n,a=t[1],r=[];for(let o=0;o<a.length;o+=1)r[o]=vf(yf(t,a,o));let i=o=>W(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","existing-items")},m(o,l){q(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&14){a=o[1];let s;for(s=0;s<a.length;s+=1){let d=yf(o,a,s);r[s]?(r[s].p(d,l),R(r[s],1)):(r[s]=vf(d),r[s].c(),R(r[s],1),r[s].m(e,null))}for(Ee(),s=a.length;s<r.length;s+=1)i(s);Ce()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)R(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)W(r[l]);n=!1},d(o){o&&O(e),We(r,o)}}}function p1(t){let e,n;return e=new Wt({props:{message:"Create a new leap day to see it here."}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p:X,i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function vf(t){let e,n;function a(){return t[7](t[10])}function r(){return t[8](t[10])}return e=new af({props:{leapday:t[10]}}),e.$on("edit",a),e.$on("delete",r),{c(){te(e.$$.fragment)},m(i,o){ee(e,i,o),n=!0},p(i,o){t=i;let l={};o&2&&(l.leapday=t[10]),e.$set(l)},i(i){n||(R(e.$$.fragment,i),n=!0)},o(i){W(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function g1(t){let e,n,a,r,i,o;e=new Bt({props:{disabled:t[0],label:t[0]?"At least one named month is required":null}}),e.$on("click",t[6]);let l=[p1,m1],s=[];function d(u,c){return u[1].length?1:0}return a=d(t,-1),r=s[a]=l[a](t),{c(){te(e.$$.fragment),n=j(),r.c(),i=Ue()},m(u,c){ee(e,u,c),q(u,n,c),s[a].m(u,c),q(u,i,c),o=!0},p(u,c){let h={};c&1&&(h.disabled=u[0]),c&1&&(h.label=u[0]?"At least one named month is required":null),e.$set(h);let y=a;a=d(u,c),a===y?s[a].p(u,c):(Ee(),W(s[y],1,1,()=>{s[y]=null}),Ce(),r=s[a],r?r.p(u,c):(r=s[a]=l[a](u),r.c()),R(r,1),r.m(i.parentNode,i))},i(u){o||(R(e.$$.fragment,u),R(r),o=!0)},o(u){W(e.$$.fragment,u),W(r),o=!1},d(u){J(e,u),u&&O(n),s[a].d(u),u&&O(i)}}}function y1(t){let e,n;return e=new ct({props:{name:"Leap Days",$$slots:{default:[g1]},$$scope:{ctx:t}}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,[r]){let i={};r&8195&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function v1(t,e,n){let a,{calendar:r}=e,{plugin:i}=e;Xe("store").subscribe(y=>n(4,r=y));let l=r.static.months?.filter(y=>y.name?.length).length==0,s=y=>{n(1,a=a.filter(m=>m.id!==y.id))},d=y=>{let m=new _s(i.app,r,y);m.onClose=()=>{if(!!m.saved&&!!m.leapday.interval.length&&!!m.leapday.name){if(m.editing){let v=r.static.leapDays.findIndex(p=>p.id===m.leapday.id);r.static.leapDays.splice(v,1,{...m.leapday})}else r.static.leapDays.push({...m.leapday});n(1,a=r.static.leapDays)}},m.open()},u=()=>d(),c=y=>d(y),h=y=>s(y);return t.$$set=y=>{"calendar"in y&&n(4,r=y.calendar),"plugin"in y&&n(5,i=y.plugin)},t.$$.update=()=>{if(t.$$.dirty&16){e:n(1,a=r.static.leapDays)}if(t.$$.dirty&16){e:n(0,l=r.static.months?.filter(y=>y.name?.length).length==0)}},[l,a,s,d,r,i,u,c,h]}var bf=class extends de{constructor(e){super();fe(this,e,v1,y1,se,{calendar:4,plugin:5})}},wf=bf;function b1(t){be(t,"svelte-v5i9t2","body:not(.is-mobile) .fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2{position:absolute;top:var(--top, 0);height:100%}body:not(.is-mobile) .fantasy-calendar-creator-inner.svelte-v5i9t2.svelte-v5i9t2{position:absolute;top:0;left:-2px;bottom:0;overflow:auto;display:grid;grid-template-rows:auto 1fr}.fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2,.fantasy-calendar-creator.svelte-v5i9t2 .fantasy-calendar-creator-inner.svelte-v5i9t2,.fantasy-calendar-creator.svelte-v5i9t2 .fantasy-creator-app.svelte-v5i9t2{background-color:var(--creator-background-color)}body.is-mobile .fantasy-calendar-creator.svelte-v5i9t2.svelte-v5i9t2,body.is-mobile .fantasy-calendar-creator.svelte-v5i9t2 .fantasy-creator-app.svelte-v5i9t2{padding:0px 10px;width:100%}.fantasy-creator-app.svelte-v5i9t2.svelte-v5i9t2{overflow:auto;height:100%}.fantasy-calendar-creator-header.svelte-v5i9t2.svelte-v5i9t2{margin:0}.top-nav.svelte-v5i9t2.svelte-v5i9t2{position:sticky;top:0;padding:10px 0px;background-color:inherit;z-index:3}.icons.svelte-v5i9t2.svelte-v5i9t2{display:flex;justify-content:space-between}.icons.svelte-v5i9t2 .left.svelte-v5i9t2{display:flex;align-items:center}.check.svelte-v5i9t2.svelte-v5i9t2{display:flex;gap:0.25rem;align-items:center}.additional.svelte-v5i9t2.svelte-v5i9t2{color:var(--text-faint)}.save.svelte-v5i9t2.svelte-v5i9t2{color:var(--text-error)}.save.can-save.svelte-v5i9t2.svelte-v5i9t2{color:var(--interactive-success)}.back.svelte-v5i9t2.svelte-v5i9t2{width:min-content}.back.svelte-v5i9t2 .clickable-icon{margin-left:0}")}function _f(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B,H,Y,he,oe,ce,Z,z,Q,De,ve,Ne,je,at,Pe;function gt(Fe,Ve){return Fe[7]?D1:w1}let xt=gt(t,-1),Je=xt(t);return S=new Dc({props:{calendar:t[0],plugin:t[2]}}),F=new dd({props:{calendar:t[0]}}),M=new vd({}),V=new Fd({props:{calendar:t[0],app:t[2].app}}),H=new Vu({}),he=new Hd({props:{plugin:t[2],calendar:t[0]}}),ce=new Zd({props:{calendar:t[0]}}),z=new tf({props:{plugin:t[2],calendar:t[0]}}),De=new wf({props:{calendar:t[0],plugin:t[2]}}),{c(){e=T("div"),n=T("div"),a=T("div"),r=T("div"),i=T("div"),s=j(),d=T("div"),Je.c(),u=j(),c=T("div"),y=j(),m=T("h3"),m.textContent="Calendar Creator",v=j(),p=T("div"),k=T("div"),A=j(),te(S.$$.fragment),_=j(),te(F.$$.fragment),w=j(),te(M.$$.fragment),x=j(),te(V.$$.fragment),B=j(),te(H.$$.fragment),Y=j(),te(he.$$.fragment),oe=j(),te(ce.$$.fragment),Z=j(),te(z.$$.fragment),Q=j(),te(De.$$.fragment),D(i,"class","back svelte-v5i9t2"),D(i,"aria-label",o=t[7]?"Save and exit":"Exit without saving"),D(d,"class","check svelte-v5i9t2"),D(r,"class","left svelte-v5i9t2"),D(c,"class","cancel"),D(a,"class","icons svelte-v5i9t2"),D(m,"class","fantasy-calendar-creator-header svelte-v5i9t2"),D(n,"class","top-nav svelte-v5i9t2"),D(p,"class","fantasy-creator-app svelte-v5i9t2"),D(e,"class","inherit fantasy-calendar-creator-inner svelte-v5i9t2"),D(e,"style",ve=t[9]?"":`width: ${t[1]+4}px;`)},m(Fe,Ve){q(Fe,e,Ve),E(e,n),E(n,a),E(a,r),E(r,i),E(r,s),E(r,d),Je.m(d,null),E(a,u),E(a,c),E(n,y),E(n,m),E(e,v),E(e,p),E(p,k),E(p,A),ee(S,p,null),E(p,_),ee(F,p,null),E(p,w),ee(M,p,null),E(p,x),ee(V,p,null),E(p,B),ee(H,p,null),E(p,Y),ee(he,p,null),E(p,oe),ee(ce,p,null),E(p,Z),ee(z,p,null),E(p,Q),ee(De,p,null),je=!0,at||(Pe=[le(l=t[11].call(null,i)),ie(i,"click",t[17]),le(h=t[12].call(null,c)),ie(c,"click",t[18]),le(C=t[13].call(null,k)),ie(e,"introend",t[19]),ie(e,"outroend",t[20])],at=!0)},p(Fe,Ve){t=Fe,(!je||Ve&128&&o!==(o=t[7]?"Save and exit":"Exit without saving"))&&D(i,"aria-label",o),xt===(xt=gt(t,Ve))&&Je?Je.p(t,Ve):(Je.d(1),Je=xt(t),Je&&(Je.c(),Je.m(d,null)));let Rt={};Ve&1&&(Rt.calendar=t[0]),Ve&4&&(Rt.plugin=t[2]),S.$set(Rt);let Gt={};Ve&1&&(Gt.calendar=t[0]),F.$set(Gt);let Ft={};Ve&1&&(Ft.calendar=t[0]),Ve&4&&(Ft.app=t[2].app),V.$set(Ft);let Mt={};Ve&4&&(Mt.plugin=t[2]),Ve&1&&(Mt.calendar=t[0]),he.$set(Mt);let gn={};Ve&1&&(gn.calendar=t[0]),ce.$set(gn);let Ut={};Ve&4&&(Ut.plugin=t[2]),Ve&1&&(Ut.calendar=t[0]),z.$set(Ut);let tn={};Ve&1&&(tn.calendar=t[0]),Ve&4&&(tn.plugin=t[2]),De.$set(tn),(!je||Ve&2&&ve!==(ve=t[9]?"":`width: ${t[1]+4}px;`))&&D(e,"style",ve)},i(Fe){je||(R(S.$$.fragment,Fe),R(F.$$.fragment,Fe),R(M.$$.fragment,Fe),R(V.$$.fragment,Fe),R(H.$$.fragment,Fe),R(he.$$.fragment,Fe),R(ce.$$.fragment,Fe),R(z.$$.fragment,Fe),R(De.$$.fragment,Fe),It(()=>{Ne||(Ne=So(e,t[16],{x:t[1]*1.5,opacity:1},!0)),Ne.run(1)}),je=!0)},o(Fe){W(S.$$.fragment,Fe),W(F.$$.fragment,Fe),W(M.$$.fragment,Fe),W(V.$$.fragment,Fe),W(H.$$.fragment,Fe),W(he.$$.fragment,Fe),W(ce.$$.fragment,Fe),W(z.$$.fragment,Fe),W(De.$$.fragment,Fe),Ne||(Ne=So(e,t[16],{x:t[1]*1.5,opacity:1},!1)),Ne.run(0),je=!1},d(Fe){Fe&&O(e),Je.d(),J(S),J(F),J(M),J(V),J(H),J(he),J(ce),J(z),J(De),Fe&&Ne&&Ne.end(),at=!1,_e(Pe)}}}function w1(t){let e,n,a,r,i,o;return{c(){e=T("div"),a=j(),r=T("span"),r.textContent=`Additional information is required before
saving`,D(e,"class","save svelte-v5i9t2"),D(e,"aria-label",t[8]),D(r,"class","additional svelte-v5i9t2")},m(l,s){q(l,e,s),q(l,a,s),q(l,r,s),i||(o=le(n=t[15].call(null,e)),i=!0)},p(l,s){s&256&&D(e,"aria-label",l[8])},d(l){l&&O(e),l&&O(a),l&&O(r),i=!1,o()}}}function D1(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","save can-save svelte-v5i9t2"),D(e,"aria-label",t[8])},m(i,o){q(i,e,o),a||(r=le(n=t[15].call(null,e)),a=!0)},p(i,o){o&256&&D(e,"aria-label",i[8])},d(i){i&&O(e),a=!1,r()}}}function _1(t){let e,n,a=t[5]&&_f(t);return{c(){e=T("div"),a&&a.c(),D(e,"class","fantasy-calendar-creator svelte-v5i9t2"),$e(e,"--creator-background-color",t[3]),$e(e,"--top",t[4]+"px")},m(r,i){q(r,e,i),a&&a.m(e,null),n=!0},p(r,[i]){r[5]?a?(a.p(r,i),i&32&&R(a,1)):(a=_f(r),a.c(),R(a,1),a.m(e,null)):a&&(Ee(),W(a,1,1,()=>{a=null}),Ce()),(!n||i&8)&&$e(e,"--creator-background-color",r[3]),(!n||i&16)&&$e(e,"--top",r[4]+"px")},i(r){n||(R(a),n=!0)},o(r){W(a),n=!1},d(r){r&&O(e),a&&a.d()}}}function E1(t,e,n){let a,r,i=kn.Platform.isMobile,o=i;Un(()=>{n(5,o=!0)});let l=Se(),{width:s}=e,{calendar:d}=e,{plugin:u}=e,{color:c=null}=e,{top:h}=e,y=Da(d);y.subscribe(x=>{n(0,d=x)}),zn("store",y);let m=x=>{new kn.ExtraButtonComponent(x).setIcon("left-arrow-with-tail")},v=x=>{new kn.ExtraButtonComponent(x).setIcon("cross").setTooltip("Exit without saving")},p=x=>{let V=x.createDiv("fantasy-calendar-apply-preset");new kn.Setting(V).setName("Apply Preset").setDesc("Apply a common fantasy calendar as a preset.").addButton(B=>{B.setCta().setButtonText("Choose Preset").onClick(()=>{let H=new Bo(u.app);H.onClose=()=>{if(!!H.saved){if(n(0,d=(0,Df.default)(H.preset)),d?.name=="Gregorian Calendar"){let Y=new Date;n(0,d.current={year:Y.getFullYear(),month:Y.getMonth(),day:Y.getDate()},d)}y.set(d)}},H.open()})})},k=!1,C=()=>{if(!r&&!u.data.exit.saving){let x=new hs(u);x.onClose=()=>{x.confirmed&&n(5,o=!1),i&&l("exit",{saved:k,calendar:d})},x.open()}else n(6,k=!0),n(5,o=!1)},A=x=>{r?(0,kn.setIcon)(x,"checkmark"):hn(x)},S=(x,V)=>i?null:Du(x,V),_=()=>{C()},F=()=>n(5,o=!1),w=()=>l("flown"),M=()=>l("exit",{saved:k,calendar:d});return t.$$set=x=>{"width"in x&&n(1,s=x.width),"calendar"in x&&n(0,d=x.calendar),"plugin"in x&&n(2,u=x.plugin),"color"in x&&n(3,c=x.color),"top"in x&&n(4,h=x.top)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(8,a=Eu(d))}if(t.$$.dirty&1){e:n(7,r=Cu(d))}},[d,s,u,c,h,o,k,r,a,i,l,m,v,p,C,A,S,_,F,w,M]}var Ef=class extends de{constructor(e){super();fe(this,e,E1,_1,se,{width:1,calendar:0,plugin:2,color:3,top:4},b1)}},Es=Ef;var Cf;(function(a){a.none="None",a.monthly="Monthly",a.yearly="Yearly"})(Cf||(Cf={}));(0,Ge.addIcon)("fantasy-calendar-grip",'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="grip-lines" class="svg-inline--fa fa-grip-lines fa-w-16" role="img" viewBox="0 0 512 512"><path fill="currentColor" d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>');(0,Ge.addIcon)("fantasy-calendar-warning",'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="exclamation-triangle" class="svg-inline--fa fa-exclamation-triangle fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>');var Ei=class extends Ge.PluginSettingTab{constructor(e){super(e.app,e);this.plugin=e}get data(){return this.plugin.data}async display(){this.containerEl.empty(),this.containerEl.createEl("h2",{text:"Fantasy Calendars"}),this.containerEl.addClass("fantasy-calendar-settings"),this.contentEl=this.containerEl.createDiv("fantasy-calendar-settings-content"),this.buildInfo(this.contentEl.createDiv("fantasy-calendar-nested-settings")),this.calendarsEl=this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.calendars?{open:"open"}:{}}}),this.buildCalendars(),this.buildEvents(this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.events?{open:"open"}:{}}}))}buildInfo(e){e.empty(),new Ge.Setting(e).setName(`Reset "Don't Ask Again" Prompts`).setDesc(`All confirmations set to "Don't Ask Again" will be reset.`).addButton(n=>{n.setIcon("reset").onClick(()=>{this.plugin.data.exit={saving:!1,event:!1,calendar:!1},this.plugin.saveSettings()})}),new Ge.Setting(e).setName(createFragment(n=>{let a=n.createSpan("fantasy-calendar-warning");(0,Ge.setIcon)(a.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning"),a.createSpan({text:"Default Config Directory"})})).setDesc(createFragment(n=>{n.createSpan({text:"Please back up your data before changing this setting. Hidden directories must be manually entered."}),n.createEl("br"),n.createSpan({text:"Current directory: "});let a=this.data.configDirectory??this.app.vault.configDir;n.createEl("code",{text:a})})).addText(async n=>{let a=this.app.vault.getAllLoadedFiles().filter(i=>i instanceof Ge.TFolder);n.setPlaceholder(this.data.configDirectory??this.app.vault.configDir);let r=new ir(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.value?await this.app.vault.adapter.exists(n.inputEl.value)||(this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings()):this.data.configDirectory=null},n.inputEl.onblur=async()=>{if(!n.inputEl.value)return;let i=await this.app.vault.adapter.exists(n.inputEl.value);this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings(),this.display()}}).addExtraButton(n=>{n.setTooltip("Reset to Default").setIcon("reset").onClick(async()=>{this.data.configDirectory=null,await this.plugin.saveSettings(),this.display()})})}buildCalendars(){this.calendarsEl.empty(),this.calendarsEl.ontoggle=()=>{this.data.settingsToggleState.calendars=this.calendarsEl.open};let e=this.calendarsEl.createEl("summary");new Ge.Setting(e).setHeading().setName("Calendar Management"),e.createDiv("collapser").createDiv("handle"),new Ge.Setting(this.calendarsEl).setName("Show Intercalary Months Separately").setDesc("Intercalary months will appear a distinct months in the calendar.").addToggle(n=>{n.setValue(this.data.showIntercalary).onChange(a=>{this.data.showIntercalary=a,this.plugin.saveCalendar()})}),new Ge.Setting(this.calendarsEl).setName("Default Calendar").setDesc("Views will open to this calendar by default.").addDropdown(n=>{n.addOption("none","None");for(let a of this.data.calendars)n.addOption(a.id,a.name);n.setValue(this.plugin.data.defaultCalendar),n.onChange(async a=>{if(a==="none"){this.plugin.data.defaultCalendar=null,this.plugin.saveSettings();return}this.plugin.data.defaultCalendar=a,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(this.calendarsEl).setName("Import Calendar").setDesc(createFragment(n=>{n.createSpan({text:"Import calendar from "}),n.createEl("a",{href:"https://app.fantasy-calendar.com",text:"Fantasy Calendar",cls:"external-link"})})).addButton(n=>{let a=createEl("input",{attr:{type:"file",name:"merge",accept:".json",multiple:!0,style:"display: none;"}});a.onchange=async()=>{let{files:r}=a;if(!!r.length){try{let i=[];for(let l of Array.from(r))i.push(JSON.parse(await l.text()));let o=Rr.import(i);for(let l of o)await this.plugin.addNewCalendar(l);this.display()}catch(i){new Ge.Notice(`There was an error while importing the calendar${r.length==1?"":"s"}.`),console.error(i)}a.value=null}},n.setButtonText("Choose Files"),n.buttonEl.addClass("calendar-file-upload"),n.buttonEl.appendChild(a),n.onClick(()=>a.click())}),new Ge.Setting(this.calendarsEl).setName("Create New Calendar").addButton(n=>n.setTooltip("Launch Calendar Creator").setIcon("plus-with-circle").onClick(async()=>{let a=await this.launchCalendarCreator();a&&(await this.plugin.addNewCalendar(a),this.display())})),this.existingEl=this.calendarsEl.createDiv("existing-calendars"),this.showCalendars()}showCalendars(){if(this.existingEl.empty(),!this.data.calendars.length){this.existingEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}for(let e of this.data.calendars)new Ge.Setting(this.existingEl).setName(e.name).setDesc(e.description??"").addExtraButton(n=>{n.setIcon("pencil").onClick(async()=>{let a=await this.launchCalendarCreator(e);a&&(this.plugin.addNewCalendar(a,e),await this.plugin.saveCalendar(),this.display())})}).addExtraButton(n=>{n.setIcon("trash").onClick(async()=>{!this.plugin.data.exit.calendar&&!await wd(this.plugin)||(this.plugin.data.calendars=this.plugin.data.calendars.filter(a=>a.id!=e.id),e.id==this.data.defaultCalendar&&(this.plugin.data.defaultCalendar=this.plugin.data.calendars[0]?.id,this.plugin.watcher.start()),await this.plugin.saveCalendar(),this.display())})})}buildEvents(e){e.empty(),e.ontoggle=()=>{this.data.settingsToggleState.events=e.open};let n=e.createEl("summary");new Ge.Setting(n).setHeading().setName("Events"),n.createDiv("collapser").createDiv("handle"),new Ge.Setting(e).setName("Add Events to Default Calendar").setDesc(createFragment(a=>{a.createSpan({text:"Add events found in notes to the default calendar if the "}),a.createEl("code",{text:"fc-calendar"}),a.createSpan({text:" frontmatter tag is not present."})})).addToggle(a=>{a.setValue(this.data.addToDefaultIfMissing).onChange(async r=>{this.data.addToDefaultIfMissing=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(e).setName("Display Event Previews").setDesc("Use the core Note Preview plugin to display event notes when hovered.").addToggle(a=>{a.setValue(this.data.eventPreview).onChange(r=>{this.data.eventPreview=r,this.plugin.saveSettings()})}),new Ge.Setting(e).setName("Write Event Data to Frontmatter").setDesc("Events linked to notes will write their data to the note frontmatter.").addToggle(a=>{a.setValue(this.data.eventFrontmatter).onChange(r=>{this.data.eventFrontmatter=r,this.plugin.saveSettings()})}),new Ge.Setting(e).setName("Parse Note Titles for Event Dates").setDesc("The plugin will parse note titles for event dates.").addToggle(a=>{a.setValue(this.data.parseDates).onChange(async r=>{this.data.parseDates=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new Ge.Setting(e).setName("Date Format").setClass(this.data.dailyNotes?"daily-notes":"no-daily-notes").setDesc(createFragment(a=>{if(a.createSpan({text:"Event dates will be parsed using this format."}),a.createSpan({text:"Only the "}),a.createEl("code",{text:"Y"}),a.createSpan({text:", "}),a.createEl("code",{text:"M"}),a.createSpan({text:", and "}),a.createEl("code",{text:"D"}),a.createEl("a",{text:"tokens",href:"https://momentjs.com/docs/#/displaying/format/",cls:"external-link"}),a.createSpan({text:" are supported."}),["Y","M","D"].some(r=>!this.data.dateFormat.includes(r))){a.createEl("br");let r=a.createSpan({cls:"fantasy-calendar-warning date-format"});(0,Ge.setIcon)(r.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning");let i=["Y","M","D"].filter(o=>!this.data.dateFormat.includes(o));r.createSpan({text:` Date format is missing: ${i.join(", ").replace(/, ([^,]*)$/," and $1")}`})}})).addText(a=>{a.setDisabled(this.data.dailyNotes).setValue(this.plugin.format).onChange(r=>{this.data.dateFormat=r,this.plugin.saveSettings()}),a.inputEl.onblur=()=>this.buildEvents(e)}).addExtraButton(a=>{if(!this.plugin.canUseDailyNotes){a.extraSettingsEl.detach();return}this.data.dailyNotes?a.setIcon("checkmark").setTooltip("Unlink from Daily Notes").onClick(()=>{this.data.dailyNotes=!1,this.buildEvents(e)}):a.setIcon("sync").setTooltip("Link with Daily Notes").onClick(()=>{this.data.dailyNotes=!0,this.buildEvents(e)})})}launchCalendarCreator(e=or){let n=(0,Ra.default)(e);if(Ge.Platform.isMobile){let a=new Af(this.plugin,n);return new Promise((r,i)=>{try{a.onClose=()=>{a.saved&&(e=(0,Ra.default)(a.calendar),r(e)),r()},a.open()}catch{i()}})}else return this.containerEl.addClass("fantasy-calendar-creator-open"),new Promise(a=>{let r=getComputedStyle(this.containerEl.closest(".modal")).backgroundColor,i=new Es({target:this.containerEl,props:{calendar:n,plugin:this.plugin,width:this.contentEl.clientWidth,color:r,top:this.containerEl.scrollTop}}),o=new ResizeObserver(()=>{i.$set({width:this.contentEl.clientWidth})});o.observe(this.contentEl),i.$on("exit",l=>{this.containerEl.removeClass("fantasy-calendar-creator-open"),i.$destroy(),l.detail.saved&&(e=(0,Ra.default)(l.detail.calendar),o.disconnect(),a(e)),a()})})}},Af=class extends Ge.Modal{constructor(e,n){super(e.app);this.plugin=e;this.saved=!1;this.calendar=(0,Ra.default)(n)}onOpen(){this.contentEl.setAttr("style","background-color: inherit; padding-top: 0px;");let e=new Es({target:this.contentEl,props:{calendar:this.calendar,plugin:this.plugin,width:this.contentEl.clientWidth,top:0}});e.$on("exit",n=>{n.detail.saved&&(this.calendar=(0,Ra.default)(n.detail.calendar),this.saved=!0),this.close(),e.$destroy()})}};var Me=xe(require("obsidian"));var br=xe(require("obsidian"));var kf=class{constructor(e,n,a){this.month=e;this.number=n;this.leapday=a;this.shouldUpdate=!1}get calendar(){return this.month.calendar}get date(){return{day:this.number,month:this.month.number,year:this.year}}get events(){return(!this._events||!this._events.length||this.shouldUpdate)&&(this._events=this.month.getEventsOnDay(this.date)),this._events}get longDate(){return{day:this.number,month:this.month.name,year:this.year}}get daysBefore(){return this.month.daysBefore+this.number-1-this.month.leapDays.filter(e=>e.numbered&&e.after<this.number-1).length}get year(){return this.month.year}get weekday(){let e=this.calendar.firstDayOfYear(this.year);return Sn(this.daysBefore%this.calendar.weekdays.length+e,this.calendar.weekdays.length)}get isCurrentDay(){return this.number==this.calendar.current.day&&this.month.number==this.calendar.current.month&&this.month.year==this.calendar.current.year}get isDisplaying(){return this.number==this.calendar.viewing.day&&this.month.year==this.calendar.viewing.year&&this.month.number==this.calendar.viewing.month}get moons(){return(!this._moons||!this._moons.length)&&(this._moons=this.month.getMoonsForDay(this.date)),this._moons}},Ci=class{constructor(e,n,a,r){this.data=e;this.number=n;this.year=a;this.calendar=r;this.days=[];this.leapDays=[];this.shouldUpdate=!1;this.shouldUpdateMoons=!1;this.leapDays=this.calendar.leapDaysForMonth(this.number,a),this.daysBefore=this.calendar.daysBeforeMonth(this.number,this.year),this.days=[...new Array(e.length+this.leapDays.filter(i=>!i.intercalary||i.intercalary&&i.numbered).length).keys()].map(i=>new kf(this,i+1,this.leapDays.find(o=>o.after==i)))}get id(){return this.data.id}get index(){return this.calendar.data.months.indexOf(this.data)}get name(){return this.data.name}get length(){return this.days.length}get firstWeekday(){return this.calendar.data.overflow?this.days[0].weekday:0}get lastWeekday(){return this.days[this.days.length-1].weekday}get type(){return this.data.type}getEventsOnDay(e){return(!this.events||!this.events.length||this.shouldUpdate)&&(this.days.forEach(n=>n.shouldUpdate=!0),this.events=this.calendar.getEventsForMonth(this),this.shouldUpdate=!1),this.events.filter(n=>{if((!n.date.year||n.date.year==e.year)&&(!n.date.month||n.date.month==e.month)&&n.date.day==e.day)return!0;if(!n.end&&!n.formulas?.length)return!1;let a={...n.date},r={...n.end??{}};a.year||(a.year=r.year=this.year),a.month||(a.month=r.month=this.number);let i=Number(this.calendar.hash(e));if(Number(this.calendar.hash(a))<=i&&i<=Number(this.calendar.hash(r)??1/0))if(n.formulas?.length){let o=this.calendar.totalDaysBeforeYear(a.year)+this.calendar.daysBeforeMonth(a.month,a.year,!0)+a.day;return(this.calendar.totalDaysBeforeYear(e.year)+this.calendar.daysBeforeMonth(e.month,e.year,!0)+e.day-o)%n.formulas[0].number==0}else return!0;return!1})}getMoonsForDay(e){return(!this.moons||!this.moons.length||this.shouldUpdateMoons)&&(this.moons=this.calendar.getMoonsForMonth(this)),this.moons[e.day-1]}},La=class extends br.Events{constructor(e,n){super();this.calendar=e;this.plugin=n;this._cache=new Map;this.displayed={year:null,month:null,day:null};this.viewing={year:null,month:null,day:null};this.displayed={...this.current},this.update(this.calendar),this.plugin.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-event-update",a=>{if(!a.has(this.calendar.id))return;let r=a.get(this.calendar.id);for(let i of r)!this._cache.has(i)||this.refreshYear(i)}))}addEvent(e){let n=e.date.year,a=e.date.month;this.refreshMonth(a,n)}refreshMonth(e,n){!this._cache.has(n)||!this._cache.get(n).months.has(e)||(this._cache.get(n).shouldUpdate=!0,this._cache.get(n).months.forEach(a=>a.shouldUpdate=!0),(n==this.displayed.year&&e==this.displayed.month||n==this.viewing.year&&e==this.viewing.month)&&this.trigger("month-update"))}refreshYear(e){!this._cache.has(e)||(this._cache.get(e).shouldUpdate=!0,this._cache.get(e).months.forEach(n=>n.shouldUpdate=!0),(e==this.displayed.year||e==this.viewing.year)&&this.trigger("month-update"))}getDayForDate(e){return this.getMonth(e.month,e.year).days[e.day-1]}getEventsForMonth(e){let{year:n,number:a}=e;if(this._cache.has(n)||this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map}),this._cache.get(n).shouldUpdate){let i=this.calendar.events.filter(o=>{let l={...o.date},s={...o.end};return l.year==n||l.year==null?!0:l.year>n||!s&&!o.formulas?.length&&l.year<n?!1:!!(l.year<=n&&(s?.year>=n||o.formulas?.length))});this._cache.set(n,{months:this._cache.get(n).months,events:i,shouldUpdate:!1})}return this._cache.get(n).events.filter(i=>{let o={...i.date},l={...i.end};return o.month==null||(o.year==n||o.year==null)&&o.month==a?!0:o.year>n||o.year==n&&o.month>a||!l&&!i.formulas?.length&&(o.month!=a||o.year<n)?!1:(o.year==null&&(l.year=o.year=n),!!((o.year<=n||o.month<=a)&&(i.formulas?.length||l.year>=n&&l.month>=a)))})}getNameForYear(e){if(!this.data.useCustomYears)return`${e}`;if(this.data.useCustomYears&&e-1>=0&&e<=this.data.years?.length)return this.data.years[e-1].name}get displayWeeks(){return this.calendar.displayWeeks}getMonthsForYear(e){return this._cache.has(e)||this._cache.set(e,{events:[],shouldUpdate:!0,months:new Map(this.data.months.map((n,a)=>[a,new Ci(n,a,e,this)]))}),this._cache.get(e).months.size!=this.data.months.length&&this._cache.set(e,{...this._cache.get(e),months:new Map(this.data.months.map((n,a)=>[a,new Ci(n,a,e,this)]))}),Array.from(this._cache.get(e).months.values())}hash(e){if(e.year==null||e.month==null||e.day==null)return null;let n=`${this.data.months.length}`.length,a=`${e.month}`.padStart(n,"0"),r=`${this.maxDays}`.length,i=`${e.day}`.padStart(r,"0");return`${e.year}${a}${i}`}update(e){this.calendar=e??this.calendar,this.maxDays=Math.max(...this.data.months.map(n=>n.length)),this.standardMonths=this.data.months.filter(n=>n.type!="intercalary"),this.calendar?.current||(this.calendar.current={day:null,month:null,year:null}),Gn(this.calendar?.current.year,this.calendar)||(this.calendar.current.year=1),Wn(this.calendar?.current.month,this.calendar)||(this.calendar.current.month=0),Hn(this.calendar?.current.day,this.calendar)||(this.calendar.current.day=1),this.trigger("month-update"),this.trigger("day-update")}get categories(){return this.calendar.categories}get data(){return this.calendar.static}get current(){return this.calendar.current}get leapdays(){return this.data.leapDays??[]}get currentDate(){return yn(this.current,this.data.months)}get displayedDate(){return yn(this.displayed,this.data.months)}get viewedDate(){return yn(this.viewing,this.data.months)}reset(){this.displayed={...this.current},this.viewing={...this.current},this.trigger("month-update"),this.trigger("day-update")}setCurrentMonth(e){this.displayed.month=e,this.trigger("month-update")}goToNextDay(){let e=this.getDayForDate(this.viewing);this.viewing.day+=1,this.viewing.day>e.month.days.length&&(this.goToNext(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=1),this.trigger("day-update")}goToNextCurrentDay(){this.current.day+=1;let e=this.getMonth(this.current.month,this.current.year);this.current.day>=e.days.length&&(this.current.day=1,this.current.month+=1,this.current.month>=this.data.months.length&&(this.current.month=0,this.current.year+=1)),this.trigger("day-update")}get nextMonthIndex(){return Sn(this.displayed.month+1,this.data.months.length)}get nextMonth(){return this.getMonth(this.displayed.month+1,this.displayed.year)}canGoToNextYear(e=this.displayed.year){return!this.data.useCustomYears||e<this.data.years.length}getNextMonth(){return this.plugin.data.showIntercalary?this.getMonth(this.displayed.month+1,this.displayed.year):this.getDirectionalStandardMonthHelper(1)}getNextMonthIndex(){let e=this.getNextMonth();return this.data.months.indexOf(e.data)}getPreviousMonth(){return this.plugin.data.showIntercalary?this.getMonth(this.displayed.month-1,this.displayed.year):this.getDirectionalStandardMonthHelper(-1)}getPreviousMonthIndex(){let e=this.getPreviousMonth();return this.data.months.indexOf(e.data)}getDirectionalStandardMonthHelper(e,n=this.displayed.year){let a=this.getDirectionalStandardMonth(e);return this.getMonth(a,n)}getDirectionalStandardMonth(e){let n=this.data.months[this.displayed.month],a=this.standardMonths.indexOf(n),r=Sn(a+e,this.standardMonths.length);return this.data.months.indexOf(this.standardMonths[r])}goToNext(){let e=this.getNextMonthIndex();if(e<this.displayed.month){if(!this.canGoToNextYear()){new br.Notice("This is the last year. Additional years can be created in settings.");return}this.goToNextYear()}this.setCurrentMonth(e)}goToNextYear(){this.displayed.year+=1,this.trigger("year-update")}get prevMonthIndex(){return Sn(this.displayed.month-1,this.data.months.length)}get previousMonth(){return this.getMonth(this.displayed.month-1,this.displayed.year)}goToPrevious(){let e=this.getPreviousMonthIndex();if(e>this.displayed.month){if(this.displayed.year==1){new br.Notice("This is the earliest year.");return}this.goToPreviousYear()}this.setCurrentMonth(e)}goToPreviousDay(){this.viewing.day-=1,this.viewing.day<1&&(this.goToPrevious(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=this.currentMonth.days.length),this.trigger("day-update")}goToPreviousYear(){this.displayed.year-=1,this.trigger("year-update")}get weekdays(){return this.data.weekdays}get currentMonth(){return this.getMonth(this.displayed.month,this.displayed.year)}testLeapDay(e,n){return e.interval.sort((a,r)=>a.interval-r.interval).some(({interval:a,exclusive:r},i,o)=>{if(r&&i==0)return(n-e.offset)%a!=0;if(!r)return o[i+1]&&o[i+1].exclusive?(n-e.offset)%a==0&&(n-e.offset)%o[i+1].interval!=0:(n-e.offset)%a==0})}leapDaysForYear(e){return this.leapdays.filter(n=>this.testLeapDay(n,e))}leapDaysForMonth(e,n=this.displayed.year){return this.leapdays.filter(a=>a.timespan!=e?!1:this.testLeapDay(a,n))}getMonth(e,n,a=0){let r=this.data.months,i=Sn(e,r.length);if(e<0&&(n-=1),n==0)return null;if(e>=r.length&&(n+=1),this._cache.has(n)){if(this._cache.get(n).months.has(i))return this._cache.get(n).months.get(i)}else this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map});if(r[i].type=="intercalary"&&a!=0)return this.getMonth(e+a,n,a);let o=new Ci(r[i],i,n,this);return this._cache.get(n).months.set(i,o),this._cache.set(n,this._cache.get(n)),o}getPaddedDaysForMonth(e){let n=e.days,a=[],r=this.getMonth(e.index-1,this.displayed.year,-1);e.firstWeekday>0&&e.type=="month"&&(a=r!=null?r.days.slice(-e.firstWeekday):Array(e.firstWeekday).fill(null));let i=[],o=this.getMonth(e.index+1,this.displayed.year,1);return e.lastWeekday<this.weekdays.length-1&&e.type=="month"&&(i=o.days.slice(0,this.weekdays.length-e.lastWeekday-1)),{previous:a,current:n,next:i}}get weeksPerCurrentMonth(){return Math.ceil(this.getMonth(this.displayed.month,this.displayed.year).length/this.data.weekdays.length)}weeksOfMonth(e){return Math.ceil((e.length+e.firstWeekday)/this.data.weekdays.length)}weekNumbersOfMonth(e){let n=e.daysBefore+this.firstDayOfYear(e.year);return Math.floor(n/this.data.weekdays.length)}get daysPerYear(){return this.data.months.filter(e=>e.type==="month").reduce((e,n)=>e+n.length,0)}daysBeforeMonth(e,n,a=!1){return!e||e==0?0:this.data.months.slice(0,e).filter(r=>a?!0:r.type=="month").map((r,i)=>{let o=this.leapDaysForMonth(i,n);return r.length+o.filter(l=>!l.intercalary).length}).reduce((r,i)=>r+i,0)}dayNumberForDate(e){return this.daysBeforeMonth(e.month,e.year,!0)+e.day}get firstWeekday(){return this.data.firstWeekDay}get leapDaysBefore(){return this.displayed.year==1?0:this.leapDaysBeforeYear(this.displayed.year-1)}leapDaysBeforeYear(e){if(e==1)return 0;let n=e-1,a=0;for(let{interval:r,offset:i}of this.leapdays.filter(o=>!o.intercalary)){let o=0;for(let l=0;l<r.length;l++){let s=r[l],d=r.slice(l+1).filter(c=>!c.exclusive).map(c=>Math.floor((n+(c.ignore?0:i))/c.interval)).reduce((c,h)=>c+h,0),u=Math.floor((n+(s.ignore?0:i))/s.interval);s.exclusive?(o-=u,o+=d):(o+=u,o-=d)}a+=o}return a}get totalDaysBefore(){return this.totalDaysBeforeYear(this.displayed.year)}totalDaysBeforeYear(e,n=!1){return e<1?0:Math.abs(e-1)*this.data.months.filter(a=>n||a.type=="month").reduce((a,r)=>a+r.length,0)+this.leapDaysBeforeYear(e)}firstDayOfYear(e=this.displayed.year){return this.data.overflow?e==1?this.firstWeekday:Sn(this.totalDaysBeforeYear(e)%this.data.weekdays.length+this.firstWeekday+(this.data.offset??0),this.data.weekdays.length):0}get moons(){return this.data.moons}getMoonsForMonth(e){let n=[];for(let a of e.days){let r=this.totalDaysBeforeYear(e.year,!0)+this.daysBeforeMonth(e.number,e.year,!0)+a.number-1,i=[];for(let o of this.moons){let{offset:l,cycle:s}=o,d=24,u=(r-l)/s,h=(u-Math.floor(u))*d%d,y=Qd[d];i.push([o,y[Sn(Math.round(h),y.length)]])}n.push(i)}return n}};var Pa=xe(require("obsidian"));var Ai=xe(require("obsidian"));function C1(t){be(t,"svelte-1e1nyi2",".flag.svelte-1e1nyi2.svelte-1e1nyi2{cursor:pointer;position:relative;padding-left:0.125rem;text-align:left;width:100%;background-color:var(--hex-alpha);border-left:2px solid var(--color)}.flag-content.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;gap:0.25rem;align-items:flex-start;justify-content:space-between}.day-view.svelte-1e1nyi2 .flag-content.svelte-1e1nyi2{justify-content:space-between}.clamp.svelte-1e1nyi2.svelte-1e1nyi2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;text-overflow:ellipsis}.note.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;align-self:center}.multi.svelte-1e1nyi2.svelte-1e1nyi2{flex-shrink:0;overflow:visible;width:unset}.multi.svelte-1e1nyi2 .clamp.svelte-1e1nyi2{-webkit-line-clamp:1;overflow:visible}.multi.start.svelte-1e1nyi2.svelte-1e1nyi2{margin-left:0}.multi.end.svelte-1e1nyi2.svelte-1e1nyi2{margin-right:0}.multi.first.svelte-1e1nyi2.svelte-1e1nyi2{overflow:visible;white-space:nowrap}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.first){color:transparent;overflow:hidden}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.start){border:0;margin-left:-6px}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.end){margin-right:-6px}.start.svelte-1e1nyi2>.flag-content.svelte-1e1nyi2{justify-content:flex-start;gap:1em}")}function xf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","note svelte-1e1nyi2")},m(i,o){q(i,e,o),a||(r=le(n=t[9].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function A1(t){let e,n,a,r=t[0].name+"",i,o,l,s,d,u=t[0].note&&xf(t);return{c(){e=T("div"),n=T("div"),a=T("span"),i=me(r),o=j(),u&&u.c(),D(a,"class","svelte-1e1nyi2"),pe(a,"clamp",!t[1]),pe(a,"day-view",t[1]),D(n,"class","flag-content svelte-1e1nyi2"),D(e,"class","flag svelte-1e1nyi2"),D(e,"aria-label",l=t[1]?null:t[0].name),$e(e,"--hex-alpha",t[6]+"40"),$e(e,"--color",t[6]),pe(e,"multi",t[4]),pe(e,"start",t[2]),pe(e,"end",t[3]),pe(e,"first",t[5]),pe(e,"day-view",t[1])},m(c,h){q(c,e,h),E(e,n),E(n,a),E(a,i),E(n,o),u&&u.m(n,null),s||(d=[ie(e,"click",t[12]),ie(e,"mouseover",t[13]),ie(e,"focus",k1),ie(e,"contextmenu",t[14])],s=!0)},p(c,[h]){h&1&&r!==(r=c[0].name+"")&&we(i,r),h&2&&pe(a,"clamp",!c[1]),h&2&&pe(a,"day-view",c[1]),c[0].note?u||(u=xf(c),u.c(),u.m(n,null)):u&&(u.d(1),u=null),h&3&&l!==(l=c[1]?null:c[0].name)&&D(e,"aria-label",l),h&64&&$e(e,"--hex-alpha",c[6]+"40"),h&64&&$e(e,"--color",c[6]),h&16&&pe(e,"multi",c[4]),h&4&&pe(e,"start",c[2]),h&8&&pe(e,"end",c[3]),h&32&&pe(e,"first",c[5]),h&2&&pe(e,"day-view",c[1])},i:X,o:X,d(c){c&&O(e),u&&u.d(),s=!1,_e(d)}}}var k1=()=>{};function x1(t,e,n){let a=Se(),{event:r}=e,{date:i}=e,{dayView:o=!1}=e,l=!1,s=!1,d=!1,u=!1,{categories:c}=e,h=c.find(C=>C.id==r.category)?.color??ys,y=Ai.Platform.isMacOS?"Meta":"Control",m=C=>{(0,Ai.setIcon)(C,"note-glyph")},v=C=>{C.stopPropagation(),a("event-click",{event:r,modifier:C.getModifierState(y)})},p=C=>a("event-mouseover",{target:C.target,event:r}),k=C=>{C.stopPropagation(),a("event-context",{evt:C,event:r})};return t.$$set=C=>{"event"in C&&n(0,r=C.event),"date"in C&&n(10,i=C.date),"dayView"in C&&n(1,o=C.dayView),"categories"in C&&n(11,c=C.categories)},t.$$.update=()=>{if(t.$$.dirty&1039){e:r.end!=null&&!o&&(n(4,l=!0),n(2,s=i.day===r.date.day&&(r.date.month==null||i.month==r.date.month)&&(r.date.year==null||i.year===r.date.year)),n(5,u=s||i.day==1),n(3,d=i.day===r.end.day&&(r.end.month==null||i.month==r.end.month)&&(r.end.year==null||i.year===r.end.year)),s&&d&&(n(4,l=!1),n(2,s=!1),n(3,d=!1)))}if(t.$$.dirty&2049){e:n(6,h=c.find(C=>C.id==r.category)?.color??ys)}},[r,o,s,d,l,u,h,a,y,m,i,c,v,p,k]}var Ff=class extends de{constructor(e){super();fe(this,e,x1,A1,se,{event:0,date:10,dayView:1,categories:11},C1)}},Tf=Ff;function F1(t){be(t,"svelte-qnut28",".flags-container.svelte-qnut28{height:100%}.flag-container.svelte-qnut28{display:flex;flex-flow:column nowrap;gap:0.25rem}.overflow.svelte-qnut28{color:var(--text-muted);display:flex;justify-content:flex-end;width:100%}")}function Sf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","flag-container svelte-qnut28")},m(i,o){q(i,e,o),a||(r=le(n=t[2].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Bf(t){let e,n,a;return{c(){e=T("span"),n=me("+"),a=me(t[1])},m(r,i){q(r,e,i),E(e,n),E(e,a)},p(r,i){i&2&&we(a,r[1])},d(r){r&&O(e)}}}function T1(t){let e,n=t[0],a,r,i=Sf(t),o=t[1]>0&&Bf(t);return{c(){e=T("div"),i.c(),a=j(),r=T("div"),o&&o.c(),D(r,"class","overflow svelte-qnut28"),D(e,"class","flags-container svelte-qnut28")},m(l,s){q(l,e,s),i.m(e,null),E(e,a),E(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&se(n,n=l[0])&&(i.d(1),i=Sf(l),i.c(),i.m(e,a)),l[1]>0?o?o.p(l,s):(o=Bf(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:X,o:X,d(l){l&&O(e),i.d(l),o&&o.d()}}}function S1(t,e,n){let{events:a=[]}=e,{categories:r}=e,{dayView:i=!1}=e,{date:o}=e,{calendar:l}=e,s=0,d=Se(),u,c=0,h=y=>{if(a.length){let m=y?.parentElement?.getBoundingClientRect()?.height;if(!i&&(m==null||Math.floor(m)==Math.floor(c)))return;c=m,u=y,y.empty(),n(1,s=0);let v=m;for(let p of a){let k=new Tf({target:y,props:{event:p,categories:r,dayView:i,date:o}});if(k.$on("event-click",C=>d("event-click",C.detail)),k.$on("event-mouseover",C=>d("event-mouseover",C.detail)),k.$on("event-context",C=>d("event-context",C.detail)),!i){if(v=m-y.getBoundingClientRect().height,v<0){y.lastElementChild.detach(),n(1,s=a.length-a.indexOf(p));break}else if(v==0){n(1,s=a.length-a.indexOf(p)-1);break}}}}};return l.on("view-resized",()=>{i||h(u)}),t.$$set=y=>{"events"in y&&n(0,a=y.events),"categories"in y&&n(3,r=y.categories),"dayView"in y&&n(4,i=y.dayView),"date"in y&&n(5,o=y.date),"calendar"in y&&n(6,l=y.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(0,a=[...a])}},[a,s,h,r,i,o,l]}var Mf=class extends de{constructor(e){super();fe(this,e,S1,T1,se,{events:0,categories:3,dayView:4,date:5,calendar:6},F1)}},ki=Mf;function B1(t){be(t,"svelte-1uhffao",".day-view.svelte-1uhffao{padding:5px 15px;display:flex;flex-flow:column nowrap;gap:0.5rem}.nav.svelte-1uhffao,.date.svelte-1uhffao{display:flex;justify-content:space-between;align-items:center}.left-nav.svelte-1uhffao{display:flex}.left-nav.svelte-1uhffao .clickable-icon{margin-right:0}.calendar-clickable.svelte-1uhffao{align-items:center;cursor:pointer;display:flex;justify-content:center}h3.svelte-1uhffao{margin:0}.day-view.svelte-1uhffao .flag-container > .flag{padding-left:0.5rem}.title-container.svelte-1uhffao{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.day-number.svelte-1uhffao{font-size:small}")}function Nf(t,e,n){let a=t.slice();return a[24]=e[n][0],a[25]=e[n][1],a}function If(t){let e,n,a,r;return{c(){e=T("div"),n=T("em"),a=me("Day "),r=me(t[8]),D(e,"class","day-number svelte-1uhffao")},m(i,o){q(i,e,o),E(e,n),E(n,a),E(n,r)},p(i,o){o&256&&we(r,i[8])},d(i){i&&O(e)}}}function Of(t){let e,n,a=t[5],r=[];for(let o=0;o<a.length;o+=1)r[o]=qf(Nf(t,a,o));let i=o=>W(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","moon-container")},m(o,l){q(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&32){a=o[5];let s;for(s=0;s<a.length;s+=1){let d=Nf(o,a,s);r[s]?(r[s].p(d,l),R(r[s],1)):(r[s]=qf(d),r[s].c(),R(r[s],1),r[s].m(e,null))}for(Ee(),s=a.length;s<r.length;s+=1)i(s);Ce()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)R(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)W(r[l]);n=!1},d(o){o&&O(e),We(r,o)}}}function qf(t){let e,n;return e=new Rn({props:{moon:t[24],phase:t[25]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&32&&(i.moon=a[24]),r&32&&(i.phase=a[25]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function M1(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B,H,Y,he,oe=t[0]&&If(t),ce=t[4]&&t[5]&&t[5].length&&Of(t);return B=new ki({props:{events:t[3].events,categories:t[7],date:t[2],dayView:!0,calendar:t[1]}}),B.$on("event-click",t[19]),B.$on("event-mouseover",t[20]),B.$on("event-context",t[21]),{c(){e=T("div"),n=T("div"),a=T("div"),r=T("div"),o=j(),l=T("div"),d=j(),u=T("div"),h=j(),y=T("div"),m=T("div"),p=j(),k=T("div"),C=T("h3"),A=T("span"),S=me(t[6]),_=j(),oe&&oe.c(),F=j(),w=T("div"),x=j(),ce&&ce.c(),V=j(),te(B.$$.fragment),D(a,"class","left-nav svelte-1uhffao"),D(n,"class","nav svelte-1uhffao"),D(m,"class","arrow calendar-clickable svelte-1uhffao"),D(m,"aria-label","Previous"),D(A,"class","current"),D(C,"class","fantasy-title title svelte-1uhffao"),D(k,"class","title-container svelte-1uhffao"),D(w,"class","arrow right calendar-clickable svelte-1uhffao"),D(w,"aria-label","Next"),D(y,"class","date svelte-1uhffao"),D(e,"class","day-view svelte-1uhffao")},m(Z,z){q(Z,e,z),E(e,n),E(n,a),E(a,r),E(a,o),E(a,l),E(n,d),E(n,u),E(e,h),E(e,y),E(y,m),E(y,p),E(y,k),E(k,C),E(C,A),E(A,S),E(k,_),oe&&oe.m(k,null),E(y,F),E(y,w),E(e,x),ce&&ce.m(e,null),E(e,V),ee(B,e,null),H=!0,Y||(he=[le(i=t[11].call(null,r)),ie(r,"click",t[15]),le(s=t[12].call(null,l)),le(c=t[10].call(null,u)),ie(u,"click",t[16]),le(v=t[13].call(null,m)),ie(m,"click",t[17]),le(M=t[14].call(null,w)),ie(w,"click",t[18])],Y=!0)},p(Z,[z]){(!H||z&64)&&we(S,Z[6]),Z[0]?oe?oe.p(Z,z):(oe=If(Z),oe.c(),oe.m(k,null)):oe&&(oe.d(1),oe=null),Z[4]&&Z[5]&&Z[5].length?ce?(ce.p(Z,z),z&48&&R(ce,1)):(ce=Of(Z),ce.c(),R(ce,1),ce.m(e,V)):ce&&(Ee(),W(ce,1,1,()=>{ce=null}),Ce());let Q={};z&8&&(Q.events=Z[3].events),z&128&&(Q.categories=Z[7]),z&4&&(Q.date=Z[2]),z&2&&(Q.calendar=Z[1]),B.$set(Q)},i(Z){H||(R(ce),R(B.$$.fragment,Z),H=!0)},o(Z){W(ce),W(B.$$.fragment,Z),H=!1},d(Z){Z&&O(e),oe&&oe.d(),ce&&ce.d(),J(B),Y=!1,_e(he)}}}function N1(t,e,n){let a,r,i,o,l,s,{displayDayNumber:d}=e,u=Xe("calendar"),c;u.subscribe(B=>{n(1,c=B)});let h;Xe("displayMoons").subscribe(B=>n(4,h=B)),c.on("day-update",()=>{n(2,r=c.viewing),n(6,a=c.viewedDate),n(3,i=c.getDayForDate(r)),n(5,l=i.moons)});let m=Se(),v=B=>{new Pa.ExtraButtonComponent(B).setIcon("cross").setTooltip("Close")},p=B=>{new Pa.ExtraButtonComponent(B).setIcon("fantasy-calendar-reveal").setTooltip("Show on Calendar").onClick(()=>{n(1,c.displayed.year=c.viewing.year,c),c.setCurrentMonth(c.viewing.month)})},k=B=>{new Pa.ExtraButtonComponent(B).setIcon("plus-with-circle").setTooltip("New Event").onClick(()=>m("event",r))},C=B=>{new Pa.ExtraButtonComponent(B).setIcon("left-arrow")},A=B=>{new Pa.ExtraButtonComponent(B).setIcon("right-arrow")},S=()=>m("reveal"),_=()=>m("close"),F=()=>c.goToPreviousDay(),w=()=>c.goToNextDay();function M(B){ue.call(this,t,B)}function x(B){ue.call(this,t,B)}function V(B){ue.call(this,t,B)}return t.$$set=B=>{"displayDayNumber"in B&&n(0,d=B.displayDayNumber)},t.$$.update=()=>{if(t.$$.dirty&2){e:n(6,a=c.viewedDate)}if(t.$$.dirty&2){e:n(2,r=c.viewing)}if(t.$$.dirty&6){e:n(3,i=c.getDayForDate(r))}if(t.$$.dirty&6){e:n(8,o=c.dayNumberForDate(r))}if(t.$$.dirty&8){e:n(5,l=i.moons)}if(t.$$.dirty&2){e:n(7,s=c.categories)}},[d,c,r,i,h,l,a,s,o,m,v,p,k,C,A,S,_,F,w,M,x,V]}var Rf=class extends de{constructor(e){super();fe(this,e,N1,M1,se,{displayDayNumber:0},B1)}},Lf=Rf;function I1(t){be(t,"svelte-1gou5hh",".dot.svelte-1gou5hh{display:inline-block;min-height:6px;min-width:6px;height:6px;width:6px;margin:0 2px}.active.svelte-1gou5hh{color:var(--text-on-accent)}")}function O1(t){let e,n,a,r;return{c(){e=an("svg"),n=an("circle"),D(n,"stroke",a=t[2]??"currentColor"),D(n,"fill",r=t[2]??"currentColor"),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1gou5hh"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),pe(e,"filled",t[0]),pe(e,"active",t[1])},m(i,o){q(i,e,o),E(e,n)},p(i,[o]){o&4&&a!==(a=i[2]??"currentColor")&&D(n,"stroke",a),o&4&&r!==(r=i[2]??"currentColor")&&D(n,"fill",r),o&1&&pe(e,"filled",i[0]),o&2&&pe(e,"active",i[1])},i:X,o:X,d(i){i&&O(e)}}}function q1(t,e,n){let{isFilled:a=!0}=e,{isActive:r=!1}=e,{color:i}=e;return t.$$set=o=>{"isFilled"in o&&n(0,a=o.isFilled),"isActive"in o&&n(1,r=o.isActive),"color"in o&&n(2,i=o.color)},[a,r,i]}var Pf=class extends de{constructor(e){super();fe(this,e,q1,O1,se,{isFilled:0,isActive:1,color:2},I1)}},jf=Pf;function R1(t){be(t,"svelte-1w3ytba",".dots-container.svelte-1w3ytba{width:100%}.dot-container.svelte-1w3ytba{display:flex;flex-flow:row nowrap;width:fit-content;margin:auto;line-height:6px;min-height:6px}.centered.svelte-1w3ytba{justify-content:center;align-items:center}.overflow.svelte-1w3ytba{color:var(--text-muted);font-size:xx-small;display:flex;justify-content:flex-end;width:100%;line-height:1.25}")}function Vf(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","dot-container centered svelte-1w3ytba")},m(i,o){q(i,e,o),a||(r=le(n=t[2].call(null,e)),a=!0)},d(i){i&&O(e),a=!1,r()}}}function Hf(t){let e,n,a;return{c(){e=T("span"),n=me("+"),a=me(t[1])},m(r,i){q(r,e,i),E(e,n),E(e,a)},p(r,i){i&2&&we(a,r[1])},d(r){r&&O(e)}}}function L1(t){let e,n=t[0],a,r,i=Vf(t),o=t[1]>0&&Hf(t);return{c(){e=T("div"),i.c(),a=j(),r=T("div"),o&&o.c(),D(r,"class","overflow svelte-1w3ytba"),D(e,"class","dots-container svelte-1w3ytba")},m(l,s){q(l,e,s),i.m(e,null),E(e,a),E(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&se(n,n=l[0])&&(i.d(1),i=Vf(l),i.c(),i.m(e,a)),l[1]>0?o?o.p(l,s):(o=Hf(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:X,o:X,d(l){l&&O(e),i.d(l),o&&o.d()}}}function P1(t,e,n){let{events:a=[]}=e,{categories:r}=e,{calendar:i}=e,o=0,l,s=0,d=c=>{if(l=c,a.length){let h=c.parentElement?.getBoundingClientRect()?.width;if(!h||Math.floor(h)==Math.floor(s))return;s=h;let y=h;c.empty(),n(1,o=0);for(let m of a)if(new jf({target:c,props:{color:u(m)}}),y=h-c.getBoundingClientRect().width,y<0){c.lastElementChild.detach(),n(1,o=a.length-a.indexOf(m));break}else if(y==0){n(1,o=a.length-a.indexOf(m)-1);break}}};i.on("view-resized",()=>{!l||d(l)});let u=c=>r.find(h=>h.id==c.category)?.color;return t.$$set=c=>{"events"in c&&n(0,a=c.events),"categories"in c&&n(3,r=c.categories),"calendar"in c&&n(4,i=c.calendar)},[a,o,d,r,i]}var Wf=class extends de{constructor(e){super();fe(this,e,P1,L1,se,{events:0,categories:3,calendar:4},R1)}},Gf=Wf;function j1(t){be(t,"svelte-3pptg2",".day.svelte-3pptg2{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible;display:flex;flex-flow:column nowrap}.active.svelte-3pptg2{background-color:var(--background-secondary)}.viewing.svelte-3pptg2{border:2px solid var(--background-modifier-border)}.adjacent-month.svelte-3pptg2{opacity:0.25}")}function Uf(t,e,n){let a=t.slice();return a[20]=e[n][0],a[21]=e[n][1],a}function V1(t){let e,n;return e=new Gf({props:{events:t[4],categories:t[9],calendar:t[0].calendar}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&16&&(i.events=a[4]),r&512&&(i.categories=a[9]),r&1&&(i.calendar=a[0].calendar),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function H1(t){let e,n,a,r=t[5]&&t[10]&&t[10].length&&zf(t);return n=new ki({props:{events:t[4],categories:t[9],date:t[8],calendar:t[0].calendar}}),n.$on("event-click",t[12]),n.$on("event-mouseover",t[13]),n.$on("event-context",t[14]),{c(){r&&r.c(),e=j(),te(n.$$.fragment)},m(i,o){r&&r.m(i,o),q(i,e,o),ee(n,i,o),a=!0},p(i,o){i[5]&&i[10]&&i[10].length?r?(r.p(i,o),o&1056&&R(r,1)):(r=zf(i),r.c(),R(r,1),r.m(e.parentNode,e)):r&&(Ee(),W(r,1,1,()=>{r=null}),Ce());let l={};o&16&&(l.events=i[4]),o&512&&(l.categories=i[9]),o&256&&(l.date=i[8]),o&1&&(l.calendar=i[0].calendar),n.$set(l)},i(i){a||(R(r),R(n.$$.fragment,i),a=!0)},o(i){W(r),W(n.$$.fragment,i),a=!1},d(i){r&&r.d(i),i&&O(e),J(n,i)}}}function zf(t){let e,n,a=t[10],r=[];for(let o=0;o<a.length;o+=1)r[o]=Yf(Uf(t,a,o));let i=o=>W(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","moon-container")},m(o,l){q(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&1024){a=o[10];let s;for(s=0;s<a.length;s+=1){let d=Uf(o,a,s);r[s]?(r[s].p(d,l),R(r[s],1)):(r[s]=Yf(d),r[s].c(),R(r[s],1),r[s].m(e,null))}for(Ee(),s=a.length;s<r.length;s+=1)i(s);Ce()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)R(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)W(r[l]);n=!1},d(o){o&&O(e),We(r,o)}}}function Yf(t){let e,n;return e=new Rn({props:{moon:t[20],phase:t[21]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&1024&&(i.moon=a[20]),r&1024&&(i.phase=a[21]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function W1(t){let e,n,a=t[0].number+"",r,i,o,l,s,d,u,c,h,y=[H1,V1],m=[];function v(p,k){return p[2]?0:1}return o=v(t,-1),l=m[o]=y[o](t),{c(){e=T("div"),n=T("span"),r=me(a),i=j(),l.c(),D(e,"class",s=""+(_o(t[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2")),D(e,"aria-label",d=!t[2]&&t[4].length?`${t[4].length} event${t[4].length==1?"":"s"}`:void 0),pe(e,"day",!0),pe(e,"fantasy-day",!0),pe(e,"active",t[7]&&!t[1]),pe(e,"viewing",t[3]&&t[6]&&!t[1])},m(p,k){q(p,e,k),E(e,n),E(n,r),E(e,i),m[o].m(e,null),u=!0,c||(h=[ie(e,"click",t[15]),ie(e,"dblclick",t[16]),ie(e,"contextmenu",t[17])],c=!0)},p(p,[k]){(!u||k&1)&&a!==(a=p[0].number+"")&&we(r,a);let C=o;o=v(p,k),o===C?m[o].p(p,k):(Ee(),W(m[C],1,1,()=>{m[C]=null}),Ce(),l=m[o],l?l.p(p,k):(l=m[o]=y[o](p),l.c()),R(l,1),l.m(e,null)),(!u||k&2&&s!==(s=""+(_o(p[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2")))&&D(e,"class",s),(!u||k&20&&d!==(d=!p[2]&&p[4].length?`${p[4].length} event${p[4].length==1?"":"s"}`:void 0))&&D(e,"aria-label",d),k&2&&pe(e,"day",!0),k&2&&pe(e,"fantasy-day",!0),k&130&&pe(e,"active",p[7]&&!p[1]),k&74&&pe(e,"viewing",p[3]&&p[6]&&!p[1])},i(p){u||(R(l),u=!0)},o(p){W(l),u=!1},d(p){p&&O(e),m[o].d(),c=!1,_e(h)}}}function G1(t,e,n){let a,r,i,o,l,s=Se(),{day:d}=e,{adjacent:u}=e,{fullView:c}=e,h=[],y;Xe("dayView").subscribe(w=>n(3,y=w));let v;Xe("displayMoons").subscribe(w=>n(5,v=w)),d.calendar.on("month-update",()=>{n(7,o=d.isCurrentDay),n(6,l=d.isDisplaying),n(4,h=d.events)}),d.calendar.on("day-update",()=>{n(7,o=d.isCurrentDay),n(6,l=d.isDisplaying)});function k(w){ue.call(this,t,w)}function C(w){ue.call(this,t,w)}function A(w){ue.call(this,t,w)}let S=()=>s("day-click",d),_=()=>s("day-doubleclick",d),F=w=>s("day-context-menu",{day:d,evt:w});return t.$$set=w=>{"day"in w&&n(0,d=w.day),"adjacent"in w&&n(1,u=w.adjacent),"fullView"in w&&n(2,c=w.fullView)},t.$$.update=()=>{if(t.$$.dirty&3){e:u||n(4,h=d.events)}if(t.$$.dirty&1){e:n(10,a=d.moons)}if(t.$$.dirty&1){e:n(9,r=d.calendar.categories)}if(t.$$.dirty&1){e:n(8,i=d.date)}if(t.$$.dirty&1){e:n(7,o=d.isCurrentDay)}if(t.$$.dirty&1){e:n(6,l=d.isDisplaying)}if(t.$$.dirty&8){e:n(3,y)}},[d,u,c,y,h,v,l,o,i,r,a,s,k,C,A,S,_,F]}var Zf=class extends de{constructor(e){super();fe(this,e,G1,W1,se,{day:0,adjacent:1,fullView:2},j1)}},wr=Zf;function U1(t){be(t,"svelte-1cfzxxk",`.fantasy-month.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:repeat(
var(--calendar-columns),
var(--column-widths)
);grid-auto-rows:var(--calendar-rows)}.intercalary.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);border-radius:0;align-items:center}.intercalary.svelte-1cfzxxk span.month.svelte-1cfzxxk{text-align:center}.intercalary.svelte-1cfzxxk .fantasy-month.svelte-1cfzxxk{grid-template-columns:unset;grid-auto-columns:var(--column-widths);align-items:center;justify-content:center}.leapday-container.svelte-1cfzxxk.svelte-1cfzxxk{grid-column:span var(--calendar-columns);display:flex;justify-content:center;align-items:center;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);color:var(--text-accent)}.full-view.svelte-1cfzxxk.svelte-1cfzxxk{height:100%;margin-bottom:0.5rem}.month.svelte-1cfzxxk.svelte-1cfzxxk{padding:0.25rem}.month-name.svelte-1cfzxxk.svelte-1cfzxxk{margin:0}.month.svelte-1cfzxxk .fantasy-day.day{padding:0px}`)}function Kf(t,e,n){let a=t.slice();return a[24]=e[n],a}function Qf(t,e,n){let a=t.slice();return a[24]=e[n],a}function Xf(t,e,n){let a=t.slice();return a[29]=e[n],a}function Jf(t,e,n){let a=t.slice();return a[29]=e[n],a}function $f(t,e,n){let a=t.slice();return a[24]=e[n],a}function eh(t){let e,n=t[1].name+"",a;return{c(){e=T("h3"),a=me(n),D(e,"class","month-name svelte-1cfzxxk")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&we(a,n)},d(r){r&&O(e)}}}function th(t){let e,n=t[1].name+"",a;return{c(){e=T("span"),a=me(n),D(e,"class","month svelte-1cfzxxk")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&we(a,n)},d(r){r&&O(e)}}}function z1(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},p:X,i:X,o:X,d(n){n&&O(e)}}}function Y1(t){let e,n;return e=new wr({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&512&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function nh(t){let e,n,a,r,i=[Y1,z1],o=[];function l(s,d){return s[6]&&s[24]!=null?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,d){o[e].m(s,d),q(s,a,d),r=!0},p(s,d){let u=e;e=l(s,d),e===u?o[e].p(s,d):(Ee(),W(o[u],1,1,()=>{o[u]=null}),Ce(),n=o[e],n?n.p(s,d):(n=o[e]=i[e](s),n.c()),R(n,1),n.m(a.parentNode,a))},i(s){r||(R(n),r=!0)},o(s){W(n),r=!1},d(s){o[e].d(s),s&&O(a)}}}function ah(t){let e,n,a,r,i,o,l,s=t[10](t[24]).next,d=[];for(let v=0;v<s.length;v+=1)d[v]=rh(Jf(t,s,v));let u=[K1,Z1],c=[];function h(v,p){return v[24].leapday.numbered?0:1}a=h(t,[-1,-1]),r=c[a]=u[a](t);let y=t[10](t[24]).prev,m=[];for(let v=0;v<y.length;v+=1)m[v]=ih(Xf(t,y,v));return{c(){for(let v=0;v<d.length;v+=1)d[v].c();e=j(),n=T("div"),r.c(),i=j();for(let v=0;v<m.length;v+=1)m[v].c();o=Ue(),D(n,"class","leapday-container svelte-1cfzxxk")},m(v,p){for(let k=0;k<d.length;k+=1)d[k].m(v,p);q(v,e,p),q(v,n,p),c[a].m(n,null),q(v,i,p);for(let k=0;k<m.length;k+=1)m[k].m(v,p);q(v,o,p),l=!0},p(v,p){if(p[0]&256){let C=s.length;s=v[10](v[24]).next;let A;for(A=C;A<s.length;A+=1){let S=Jf(v,s,A);d[A]||(d[A]=rh(S),d[A].c(),d[A].m(e.parentNode,e))}for(A=s.length;A<C;A+=1)d[A].d(1);d.length=s.length}let k=a;if(a=h(v,p),a===k?c[a].p(v,p):(Ee(),W(c[k],1,1,()=>{c[k]=null}),Ce(),r=c[a],r?r.p(v,p):(r=c[a]=u[a](v),r.c()),R(r,1),r.m(n,null)),p[0]&256){let C=y.length;y=v[10](v[24]).prev;let A;for(A=C;A<y.length;A+=1){let S=Xf(v,y,A);m[A]||(m[A]=ih(S),m[A].c(),m[A].m(o.parentNode,o))}for(A=y.length;A<C;A+=1)m[A].d(1);m.length=y.length}},i(v){l||(R(r),l=!0)},o(v){W(r),l=!1},d(v){We(d,v),v&&O(e),v&&O(n),c[a].d(),v&&O(i),We(m,v),v&&O(o)}}}function rh(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},d(n){n&&O(e)}}}function Z1(t){let e=t[24].leapday.name+"",n;return{c(){n=me(e)},m(a,r){q(a,n,r)},p(a,r){r[0]&256&&e!==(e=a[24].leapday.name+"")&&we(n,e)},i:X,o:X,d(a){a&&O(n)}}}function K1(t){let e=t[24].leapday.name+"",n,a,r,i;return r=new wr({props:{day:t[24],adjacent:!1,fullView:t[3]}}),r.$on("day-click",t[12]),r.$on("day-doubleclick",t[13]),r.$on("day-context-menu",t[14]),r.$on("event-click",t[15]),r.$on("event-mouseover",t[16]),r.$on("event-context",t[17]),{c(){n=me(e),a=j(),te(r.$$.fragment)},m(o,l){q(o,n,l),q(o,a,l),ee(r,o,l),i=!0},p(o,l){(!i||l[0]&256)&&e!==(e=o[24].leapday.name+"")&&we(n,e);let s={};l[0]&256&&(s.day=o[24]),l[0]&8&&(s.fullView=o[3]),r.$set(s)},i(o){i||(R(r.$$.fragment,o),i=!0)},o(o){W(r.$$.fragment,o),i=!1},d(o){o&&O(n),o&&O(a),J(r,o)}}}function ih(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},d(n){n&&O(e)}}}function oh(t){let e,n;return e=new wr({props:{day:t[24],adjacent:!1,fullView:t[3]}}),e.$on("day-click",t[18]),e.$on("day-doubleclick",t[19]),e.$on("day-context-menu",t[20]),e.$on("event-click",t[21]),e.$on("event-mouseover",t[22]),e.$on("event-context",t[23]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&256&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function sh(t){let e,n,a,r=t[24].leapday&&ah(t),i=!t[24].leapday?.numbered&&oh(t);return{c(){r&&r.c(),e=j(),i&&i.c(),n=Ue()},m(o,l){r&&r.m(o,l),q(o,e,l),i&&i.m(o,l),q(o,n,l),a=!0},p(o,l){o[24].leapday?r?(r.p(o,l),l[0]&256&&R(r,1)):(r=ah(o),r.c(),R(r,1),r.m(e.parentNode,e)):r&&(Ee(),W(r,1,1,()=>{r=null}),Ce()),o[24].leapday?.numbered?i&&(Ee(),W(i,1,1,()=>{i=null}),Ce()):i?(i.p(o,l),l[0]&256&&R(i,1)):(i=oh(o),i.c(),R(i,1),i.m(n.parentNode,n))},i(o){a||(R(r),R(i),a=!0)},o(o){W(r),W(i),a=!1},d(o){r&&r.d(o),o&&O(e),i&&i.d(o),o&&O(n)}}}function Q1(t){let e;return{c(){e=T("div")},m(n,a){q(n,e,a)},p:X,i:X,o:X,d(n){n&&O(e)}}}function X1(t){let e,n;return e=new wr({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&128&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function lh(t){let e,n,a,r,i=[X1,Q1],o=[];function l(s,d){return s[6]?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,d){o[e].m(s,d),q(s,a,d),r=!0},p(s,d){let u=e;e=l(s,d),e===u?o[e].p(s,d):(Ee(),W(o[u],1,1,()=>{o[u]=null}),Ce(),n=o[e],n?n.p(s,d):(n=o[e]=i[e](s),n.c()),R(n,1),n.m(a.parentNode,a))},i(s){r||(R(n),r=!0)},o(s){W(n),r=!1},d(s){o[e].d(s),s&&O(a)}}}function uh(t){let e,n,a,r,i=t[9],o=[];for(let m=0;m<i.length;m+=1)o[m]=nh($f(t,i,m));let l=m=>W(o[m],1,1,()=>{o[m]=null}),s=t[8],d=[];for(let m=0;m<s.length;m+=1)d[m]=sh(Qf(t,s,m));let u=m=>W(d[m],1,1,()=>{d[m]=null}),c=t[7],h=[];for(let m=0;m<c.length;m+=1)h[m]=lh(Kf(t,c,m));let y=m=>W(h[m],1,1,()=>{h[m]=null});return{c(){e=T("div");for(let m=0;m<o.length;m+=1)o[m].c();n=j();for(let m=0;m<d.length;m+=1)d[m].c();a=j();for(let m=0;m<h.length;m+=1)h[m].c();D(e,"class","fantasy-month svelte-1cfzxxk"),$e(e,"--calendar-columns",t[2]),$e(e,"--calendar-rows",t[3]?`${1/t[4]*100}%`:"1fr"),pe(e,"full-view",t[3]),pe(e,"year-view",t[0])},m(m,v){q(m,e,v);for(let p=0;p<o.length;p+=1)o[p].m(e,null);E(e,n);for(let p=0;p<d.length;p+=1)d[p].m(e,null);E(e,a);for(let p=0;p<h.length;p+=1)h[p].m(e,null);r=!0},p(m,v){if(v[0]&584){i=m[9];let p;for(p=0;p<i.length;p+=1){let k=$f(m,i,p);o[p]?(o[p].p(k,v),R(o[p],1)):(o[p]=nh(k),o[p].c(),R(o[p],1),o[p].m(e,n))}for(Ee(),p=i.length;p<o.length;p+=1)l(p);Ce()}if(v[0]&1288){s=m[8];let p;for(p=0;p<s.length;p+=1){let k=Qf(m,s,p);d[p]?(d[p].p(k,v),R(d[p],1)):(d[p]=sh(k),d[p].c(),R(d[p],1),d[p].m(e,a))}for(Ee(),p=s.length;p<d.length;p+=1)u(p);Ce()}if(v[0]&200){c=m[7];let p;for(p=0;p<c.length;p+=1){let k=Kf(m,c,p);h[p]?(h[p].p(k,v),R(h[p],1)):(h[p]=lh(k),h[p].c(),R(h[p],1),h[p].m(e,null))}for(Ee(),p=c.length;p<h.length;p+=1)y(p);Ce()}(!r||v[0]&4)&&$e(e,"--calendar-columns",m[2]),(!r||v[0]&24)&&$e(e,"--calendar-rows",m[3]?`${1/m[4]*100}%`:"1fr"),v[0]&8&&pe(e,"full-view",m[3]),v[0]&1&&pe(e,"year-view",m[0])},i(m){if(!r){for(let v=0;v<i.length;v+=1)R(o[v]);for(let v=0;v<s.length;v+=1)R(d[v]);for(let v=0;v<c.length;v+=1)R(h[v]);r=!0}},o(m){o=o.filter(Boolean);for(let v=0;v<o.length;v+=1)W(o[v]);d=d.filter(Boolean);for(let v=0;v<d.length;v+=1)W(d[v]);h=h.filter(Boolean);for(let v=0;v<h.length;v+=1)W(h[v]);r=!1},d(m){m&&O(e),We(o,m),We(d,m),We(h,m)}}}function J1(t){let e,n,a,r=t[8],i,o,l,s=t[0]&&eh(t),d=t[5]&&th(t),u=uh(t);return{c(){e=T("div"),s&&s.c(),n=j(),d&&d.c(),a=j(),u.c(),D(e,"class","month svelte-1cfzxxk"),D(e,"data-id",i=t[1].id),D(e,"id",o=`MONTH-${t[1].id}-${t[1].year}`),pe(e,"intercalary",t[5]),pe(e,"full-view",t[3])},m(c,h){q(c,e,h),s&&s.m(e,null),E(e,n),d&&d.m(e,null),E(e,a),u.m(e,null),l=!0},p(c,h){c[0]?s?s.p(c,h):(s=eh(c),s.c(),s.m(e,n)):s&&(s.d(1),s=null),c[5]?d?d.p(c,h):(d=th(c),d.c(),d.m(e,a)):d&&(d.d(1),d=null),h[0]&256&&se(r,r=c[8])?(Ee(),W(u,1,1,X),Ce(),u=uh(c),u.c(),R(u),u.m(e,null)):u.p(c,h),(!l||h[0]&2&&i!==(i=c[1].id))&&D(e,"data-id",i),(!l||h[0]&2&&o!==(o=`MONTH-${c[1].id}-${c[1].year}`))&&D(e,"id",o),h[0]&32&&pe(e,"intercalary",c[5]),h[0]&8&&pe(e,"full-view",c[3])},i(c){l||(R(u),l=!0)},o(c){W(u),l=!1},d(c){c&&O(e),s&&s.d(),d&&d.d(),u.d(c)}}}function $1(t,e,n){let a,r,i,o,{yearView:l=!1}=e,{month:s}=e,{columns:d}=e,{fullView:u=!1}=e,{weeks:c}=e,{intercalary:h=!1}=e,{showPad:y=!0}=e,m=B=>{let H=B.weekday,Y=B.calendar.weekdays.length-H,he=[];Y!=0&&(he=[...Array(Y).keys()]);let oe=[];return H!=0&&(oe=[...Array(H).keys()]),{next:he,prev:oe}};function v(B){ue.call(this,t,B)}function p(B){ue.call(this,t,B)}function k(B){ue.call(this,t,B)}function C(B){ue.call(this,t,B)}function A(B){ue.call(this,t,B)}function S(B){ue.call(this,t,B)}function _(B){ue.call(this,t,B)}function F(B){ue.call(this,t,B)}function w(B){ue.call(this,t,B)}function M(B){ue.call(this,t,B)}function x(B){ue.call(this,t,B)}function V(B){ue.call(this,t,B)}return t.$$set=B=>{"yearView"in B&&n(0,l=B.yearView),"month"in B&&n(1,s=B.month),"columns"in B&&n(2,d=B.columns),"fullView"in B&&n(3,u=B.fullView),"weeks"in B&&n(4,c=B.weeks),"intercalary"in B&&n(5,h=B.intercalary),"showPad"in B&&n(6,y=B.showPad)},t.$$.update=()=>{if(t.$$.dirty[0]&2){e:n(11,a=s.calendar.getPaddedDaysForMonth(s))}if(t.$$.dirty[0]&2048){e:n(9,r=a.previous)}if(t.$$.dirty[0]&2){e:n(8,i=s.days)}if(t.$$.dirty[0]&2048){e:n(7,o=a.next)}},[l,s,d,u,c,h,y,o,i,r,m,a,v,p,k,C,A,S,_,F,w,M,x,V]}var ch=class extends de{constructor(e){super();fe(this,e,$1,J1,se,{yearView:0,month:1,columns:2,fullView:3,weeks:4,intercalary:5,showPad:6},U1,[-1,-1])}},Ln=ch;var xi=xe(require("obsidian"));function eb(t){be(t,"svelte-131055d",".fantasy-nav.nav.nav.svelte-131055d{padding:10px 0px;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:stretch}.container.svelte-131055d{display:flex;align-items:center}.fantasy-title.svelte-131055d{margin:0;line-height:1.25}.fantasy-right-nav.svelte-131055d{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-131055d{align-items:center;cursor:pointer;display:flex;justify-content:center}.title-container.svelte-131055d{display:flex;flex-flow:column nowrap;align-items:flex-start}")}function tb(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A,S,_,F,w,M,x,V,B;return{c(){e=T("div"),n=T("div"),a=T("h3"),r=T("span"),i=me(t[0]),o=j(),l=T("span"),s=me(t[1]),d=j(),u=T("div"),c=T("div"),h=T("div"),v=j(),p=T("div"),k=T("span"),k.textContent="Today",A=j(),S=T("div"),w=j(),M=T("div"),D(r,"class","fantasy-month month"),D(l,"class","fantasy-year year"),D(a,"class","fantasy-title title svelte-131055d"),D(n,"class","title-container svelte-131055d"),D(h,"class","arrow calendar-clickable svelte-131055d"),D(h,"aria-label",y=t[3].name),D(p,"class","reset-button calendar-clickable svelte-131055d"),D(p,"aria-label",C="Today is "+t[2]),D(S,"class","arrow right calendar-clickable svelte-131055d"),D(S,"aria-label",_=t[4].name),D(M,"class","calendar-clickable svelte-131055d"),D(M,"aria-label","Calendar Settings"),D(c,"class","container svelte-131055d"),D(u,"class","right-nav fantasy-right-nav svelte-131055d"),D(e,"class","fantasy-nav nav svelte-131055d")},m(H,Y){q(H,e,Y),E(e,n),E(n,a),E(a,r),E(r,i),E(a,o),E(a,l),E(l,s),E(e,d),E(e,u),E(u,c),E(c,h),E(c,v),E(c,p),E(p,k),E(c,A),E(c,S),E(c,w),E(c,M),V||(B=[le(m=t[6].call(null,h)),ie(h,"click",t[9]),ie(p,"click",t[10]),le(F=t[7].call(null,S)),ie(S,"click",t[11]),le(x=t[8].call(null,M)),ie(M,"click",t[12])],V=!0)},p(H,[Y]){Y&1&&we(i,H[0]),Y&2&&we(s,H[1]),Y&8&&y!==(y=H[3].name)&&D(h,"aria-label",y),Y&4&&C!==(C="Today is "+H[2])&&D(p,"aria-label",C),Y&16&&_!==(_=H[4].name)&&D(S,"aria-label",_)},i:X,o:X,d(H){H&&O(e),V=!1,_e(B)}}}function nb(t,e,n){let a=Se(),{month:r}=e,{year:i}=e,{current:o}=e,l=Xe("calendar"),s;l.subscribe(C=>{s=C});let d=s.getPreviousMonth(),u=s.getNextMonth();s.on("month-update",()=>{n(3,d=s.getPreviousMonth()),n(4,u=s.getNextMonth())});let c=C=>{new xi.ExtraButtonComponent(C).setIcon("left-arrow")},h=C=>{new xi.ExtraButtonComponent(C).setIcon("right-arrow")},y=C=>{new xi.ExtraButtonComponent(C).setIcon("gear")},m=()=>a("previous"),v=()=>a("reset"),p=C=>a("next"),k=C=>a("settings",C);return t.$$set=C=>{"month"in C&&n(0,r=C.month),"year"in C&&n(1,i=C.year),"current"in C&&n(2,o=C.current)},[r,i,o,d,u,a,c,h,y,m,v,p,k]}var dh=class extends de{constructor(e){super();fe(this,e,nb,tb,se,{month:0,year:1,current:2},eb)}},fh=dh;var Fi=xe(require("obsidian"));function ab(t){be(t,"svelte-i3pajt","#calendar-container .fantasy-nav.nav.nav.svelte-i3pajt{padding:0;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2}.fantasy-year-nav.svelte-i3pajt{display:flex;align-items:center;margin-right:auto}.container.svelte-i3pajt{display:flex;align-items:center}.fantasy-title.svelte-i3pajt{margin:0}.fantasy-right-nav.svelte-i3pajt{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-i3pajt{align-items:center;cursor:pointer;display:flex;justify-content:center}")}function hh(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","arrow calendar-clickable svelte-i3pajt"),D(e,"aria-label","Previous Year")},m(i,o){q(i,e,o),a||(r=[le(n=t[4].call(null,e)),ie(e,"click",t[7])],a=!0)},p:X,d(i){i&&O(e),a=!1,_e(r)}}}function mh(t){let e,n,a,r;return{c(){e=T("div"),D(e,"class","arrow right calendar-clickable svelte-i3pajt"),D(e,"aria-label","Next Year")},m(i,o){q(i,e,o),a||(r=[le(n=t[5].call(null,e)),ie(e,"click",t[9])],a=!0)},p:X,d(i){i&&O(e),a=!1,_e(r)}}}function rb(t){let e,n,a,r,i,o,l,s,d,u,c,h,y,m,v,p,k,C,A=t[1]&&hh(t),S=t[1]&&mh(t);return{c(){e=T("div"),n=T("div"),a=T("h2"),r=T("span"),i=me(t[0]),o=j(),l=T("div"),s=T("div"),A&&A.c(),d=j(),u=T("div"),c=T("span"),c.textContent="Today",y=j(),S&&S.c(),m=j(),v=T("div"),D(r,"class","fantasy-year"),D(a,"class","fantasy-title svelte-i3pajt"),D(n,"class","fantasy-year-nav svelte-i3pajt"),D(u,"class","reset-button calendar-clickable svelte-i3pajt"),D(u,"aria-label",h="Today is "+t[2]),D(v,"class","calendar-clickable svelte-i3pajt"),D(v,"aria-label","Calendar Settings"),D(s,"class","container svelte-i3pajt"),D(l,"class","right-nav fantasy-right-nav svelte-i3pajt"),D(e,"class","fantasy-nav nav svelte-i3pajt")},m(_,F){q(_,e,F),E(e,n),E(n,a),E(a,r),E(r,i),E(e,o),E(e,l),E(l,s),A&&A.m(s,null),E(s,d),E(s,u),E(u,c),E(s,y),S&&S.m(s,null),E(s,m),E(s,v),k||(C=[ie(u,"click",t[8]),le(p=t[6].call(null,v)),ie(v,"click",t[10])],k=!0)},p(_,[F]){F&1&&we(i,_[0]),_[1]?A?A.p(_,F):(A=hh(_),A.c(),A.m(s,d)):A&&(A.d(1),A=null),F&4&&h!==(h="Today is "+_[2])&&D(u,"aria-label",h),_[1]?S?S.p(_,F):(S=mh(_),S.c(),S.m(s,m)):S&&(S.d(1),S=null)},i:X,o:X,d(_){_&&O(e),A&&A.d(),S&&S.d(),k=!1,_e(C)}}}function ib(t,e,n){let a=Se(),{year:r}=e,{arrows:i=!1}=e,{current:o}=e,l=m=>{new Fi.ExtraButtonComponent(m).setIcon("left-arrow")},s=m=>{new Fi.ExtraButtonComponent(m).setIcon("right-arrow")},d=m=>{new Fi.ExtraButtonComponent(m).setIcon("gear")},u=()=>a("previous"),c=()=>a("reset"),h=m=>a("next"),y=m=>a("settings",m);return t.$$set=m=>{"year"in m&&n(0,r=m.year),"arrows"in m&&n(1,i=m.arrows),"current"in m&&n(2,o=m.current)},[r,i,o,a,l,s,d,u,c,h,y]}var ph=class extends de{constructor(e){super();fe(this,e,ib,rb,se,{year:0,arrows:1,current:2},ab)}},Ti=ph;function ob(t){be(t,"svelte-15hvixf",".year-view.svelte-15hvixf{height:100%;position:relative;display:flex;flex-direction:column}.year.svelte-15hvixf{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-15hvixf:not(.full-view){grid-template-columns:1fr}")}function sb(t){let e,n,a,r,i,o,l;return n=new Ti({props:{year:t[3],current:t[0]}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=T("div"),te(n.$$.fragment),a=j(),r=T("div"),D(r,"class","year svelte-15hvixf"),pe(r,"full-view",t[1]),D(e,"class","year-view svelte-15hvixf")},m(s,d){q(s,e,d),ee(n,e,null),E(e,a),E(e,r),t[13](r),i=!0,o||(l=ie(r,"scroll",t[5],{once:!0}),o=!0)},p(s,[d]){let u={};d&8&&(u.year=s[3]),d&1&&(u.current=s[0]),n.$set(u),d&2&&pe(r,"full-view",s[1])},i(s){i||(R(n.$$.fragment,s),i=!0)},o(s){W(n.$$.fragment,s),i=!1},d(s){s&&O(e),J(n),t[13](null),o=!1,l()}}}function lb(t,e,n){let a,r=Se(),{current:i}=e,{year:o}=e,{columns:l}=e,{fullView:s}=e,d,u,c,h=Xe("calendar"),y;h.subscribe(z=>{n(8,y=z)});let m=[],v=Xe("dayView"),p=Xe("displayMoons"),k=new IntersectionObserver((z,Q)=>{Q===k&&(!z.length||!z[0].isIntersecting||(k.disconnect(),!(!y.canGoToNextYear(c.year)&&c.number===y.data.months.length-1)&&(S(),V(m.shift()),C())))},{root:d,rootMargin:"0px",threshold:.25}),C=()=>{let z=d.children[d.children.length-2];!z||k.observe(z)},A=new IntersectionObserver((z,Q)=>{if(Q!==A||!z&&!z.length||z[0].isIntersecting)return;let De=d.getBoundingClientRect();z[0].boundingClientRect.top<De.top&&(n(6,o+=1),w.observe(z[0].target),A.disconnect())},{root:d,rootMargin:"0px",threshold:0}),S=(z=!0)=>{if(!(!y.canGoToNextYear(c.year)&&c.number===y.data.months.length-1)){if(c=y.getMonth(c.number+1,c.year),c.number===0&&!(d.lastElementChild instanceof HTMLHeadingElement)){let Q=d.createEl("h2",{text:y.getNameForYear(c.year),cls:"fantasy-title"});m.push(Q),A.disconnect(),A.observe(Q)}m.push(x(c,!1)),z&&(u=y.getMonth((u?.number??0)+1,u?.year??1)),F()}},_=new IntersectionObserver((z,Q)=>{Q===_&&(!z.length||!z[0].isIntersecting||(_.disconnect(),!!u&&(M(),V(m.pop()),F())))},{root:d,rootMargin:"0px",threshold:.25}),F=()=>{let z=d.children[1];!z||_.observe(z)},w=new IntersectionObserver((z,Q)=>{Q===w&&(!z&&!z.length||z[0].isIntersecting&&(n(6,o-=1),A.observe(z[0].target),w.disconnect()))},{root:d,rootMargin:"0px",threshold:0}),M=(z=!0)=>{if(u=y.getMonth(u.number-1,u.year),!!u){if(m.unshift(x(u,!0)),u.number===0&&!(d.firstElementChild instanceof HTMLHeadingElement)){let Q=createEl("h2",{text:y.getNameForYear(u.year),cls:"fantasy-title"});d.prepend(Q),m.unshift(Q),w.disconnect(),w.observe(Q)}z&&(c=y.getMonth(c.number-1,c.year)),C()}},x=(z,Q)=>{let De=new Ln({target:d,anchor:Q?d.children[0]:null,props:{month:z,fullView:!1,yearView:!0,columns:l,weeks:y.weekdays.length,showPad:!1},context:new Map([["dayView",v],["displayMoons",p]])});return De.$on("day-click",ve=>r("day-click",ve.detail)),De.$on("day-doubleclick",ve=>r("day-doubleclick",ve.detail)),De.$on("day-context-menu",ve=>r("day-context-menu",ve.detail)),De.$on("event-mouseover",ve=>r("event-mouseover",ve.detail)),De.$on("event-mouseover",ve=>r("event-mouseover",ve.detail)),De},V=z=>{z instanceof HTMLHeadingElement?z.detach():z.$destroy()},B=async(z=!1)=>{for(let De of m)V(De);m.splice(0,m.length),d.empty(),await Yn(),n(6,o=y.current.year),u=y.getMonth(y.displayed.month-1,y.displayed.year),c=u;for(let De=0;De<y.data.months.length;De++)S(!1);M(!1),await Yn(),d.querySelector(`#MONTH-${y.currentMonth.id}-${o}`).scrollIntoView(!0),z&&H()};ko(()=>{_.disconnect(),k.disconnect(),w.disconnect(),A.disconnect()}),Un(B);let H=async()=>{await Yn(),_.observe(d.children[1]),k.observe(d.children[d.children.length-2])};function Y(z){ue.call(this,t,z)}function he(z){ue.call(this,t,z)}let oe=()=>B(!0);function ce(z){ue.call(this,t,z)}function Z(z){va[z?"unshift":"push"](()=>{d=z,n(2,d)})}return t.$$set=z=>{"current"in z&&n(0,i=z.current),"year"in z&&n(6,o=z.year),"columns"in z&&n(7,l=z.columns),"fullView"in z&&n(1,s=z.fullView)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(3,a=y.getNameForYear(o))}},[i,s,d,a,B,H,o,l,y,Y,he,oe,ce,Z]}var gh=class extends de{constructor(e){super();fe(this,e,lb,sb,se,{current:0,year:6,columns:7,fullView:1},ob)}},yh=gh;var Cs=xe(require("obsidian"));function ub(t){be(t,"svelte-ztrrn8",".year.svelte-ztrrn8{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-ztrrn8:not(.full-view){grid-template-columns:1fr}")}function vh(t,e,n){let a=t.slice();return a[8]=e[n],a}function bh(t){let e,n;return e=new Ln({props:{month:t[8],fullView:!1,yearView:!0,columns:t[2],weeks:t[8].calendar.weekdays.length,showPad:!1}}),e.$on("day-click",t[3]),e.$on("day-doubleclick",t[4]),e.$on("day-context-menu",t[5]),e.$on("event-click",t[6]),e.$on("event-mouseover",t[7]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.month=a[8]),r&4&&(i.columns=a[2]),r&2&&(i.weeks=a[8].calendar.weekdays.length),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function cb(t){let e,n,a=t[1],r=[];for(let o=0;o<a.length;o+=1)r[o]=bh(vh(t,a,o));let i=o=>W(r[o],1,1,()=>{r[o]=null});return{c(){e=T("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","year svelte-ztrrn8"),pe(e,"full-view",t[0])},m(o,l){q(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,[l]){if(l&6){a=o[1];let s;for(s=0;s<a.length;s+=1){let d=vh(o,a,s);r[s]?(r[s].p(d,l),R(r[s],1)):(r[s]=bh(d),r[s].c(),R(r[s],1),r[s].m(e,null))}for(Ee(),s=a.length;s<r.length;s+=1)i(s);Ce()}l&1&&pe(e,"full-view",o[0])},i(o){if(!n){for(let l=0;l<a.length;l+=1)R(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)W(r[l]);n=!1},d(o){o&&O(e),We(r,o)}}}function db(t,e,n){let{fullView:a}=e,{months:r}=e,{columns:i}=e;function o(c){ue.call(this,t,c)}function l(c){ue.call(this,t,c)}function s(c){ue.call(this,t,c)}function d(c){ue.call(this,t,c)}function u(c){ue.call(this,t,c)}return t.$$set=c=>{"fullView"in c&&n(0,a=c.fullView),"months"in c&&n(1,r=c.months),"columns"in c&&n(2,i=c.columns)},[a,r,i,o,l,s,d,u]}var wh=class extends de{constructor(e){super();fe(this,e,db,cb,se,{fullView:0,months:1,columns:2},ub)}},Dh=wh;function fb(t){be(t,"svelte-1xpvbi",".year-view.svelte-1xpvbi{height:100%;position:relative;display:flex;flex-direction:column}.year-container.svelte-1xpvbi{flex:1;overflow:auto}")}function hb(t){let e,n,a,r,i;return n=new Ti({props:{year:t[2],current:t[0],arrows:!0}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=T("div"),te(n.$$.fragment),a=j(),r=T("div"),D(r,"class","year-container svelte-1xpvbi"),D(e,"class","year-view svelte-1xpvbi")},m(o,l){q(o,e,l),ee(n,e,null),E(e,a),E(e,r),t[13](r),i=!0},p(o,[l]){let s={};l&4&&(s.year=o[2]),l&1&&(s.current=o[0]),n.$set(s)},i(o){i||(R(n.$$.fragment,o),i=!0)},o(o){W(n.$$.fragment,o),i=!1},d(o){o&&O(e),J(n),t[13](null)}}}function mb(t,e,n){let a,r=Se(),i=Xe("calendar"),o=Xe("dayView"),l=Xe("displayMoons"),s;i.subscribe(x=>{n(8,s=x)});let{year:d}=e,{current:u}=e,{columns:c}=e,h,y=(x,V=!1)=>{let B=s.getMonthsForYear(x),H=new Dh({target:h,anchor:V?h.children[0]:null,props:{months:B,fullView:!0,columns:c},context:new Map([["dayView",o],["displayMoons",l]])});return H.$on("day-click",Y=>r("day-click",Y.detail)),H.$on("day-doubleclick",Y=>r("day-doubleclick",Y.detail)),H.$on("day-context-menu",Y=>r("day-context-menu",Y.detail)),H.$on("event-mouseover",Y=>r("event-mouseover",Y.detail)),H.$on("event-mouseover",Y=>r("event-mouseover",Y.detail)),H},m=x=>{x instanceof HTMLHeadingElement?x.detach():x.$destroy()},v=[],p=()=>{if(!s.canGoToNextYear(d)){new Cs.Notice("This is the last year. Additional years can be created in settings.");return}n(6,d=d+1),A(d)},k=()=>{if(d===1){new Cs.Notice("This is the earliest year.");return}n(6,d=d-1),A(d)},C=()=>{n(6,d=s.current.year),A(d)},A=async x=>{v.forEach(V=>m(V)),h.empty(),await Yn(),x=x,v.push(y(x))};Un(()=>v.push(y(d)));let S=()=>p(),_=()=>k(),F=()=>C();function w(x){ue.call(this,t,x)}function M(x){va[x?"unshift":"push"](()=>{h=x,n(1,h)})}return t.$$set=x=>{"year"in x&&n(6,d=x.year),"current"in x&&n(0,u=x.current),"columns"in x&&n(7,c=x.columns)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(2,a=s.getNameForYear(d))}},[u,h,a,p,k,C,d,c,s,S,_,F,w,M]}var _h=class extends de{constructor(e){super();fe(this,e,mb,hb,se,{year:6,current:0,columns:7},fb)}},Eh=_h;function pb(t){be(t,"svelte-li8ss6","#calendar-container.year-view.svelte-li8ss6.svelte-li8ss6{height:100%}#calendar-container.fantasy-calendar.full-view.svelte-li8ss6.svelte-li8ss6{width:100%;padding:0 0.5rem 0.5rem;height:100%;display:flex;flex-flow:column}.fantasy-calendar.full-view.svelte-li8ss6 .month-container.svelte-li8ss6{height:100%}.month-container.svelte-li8ss6.svelte-li8ss6{display:flex}.month-view.svelte-li8ss6.svelte-li8ss6{flex-grow:2}.weeks.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:auto 1fr}.week-num-container.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:repeat(var(--calendar-rows), auto);padding:0.25rem 0}.week-num.svelte-li8ss6.svelte-li8ss6{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible}.weekdays.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-columns:repeat(var(--calendar-columns), 1fr);grid-template-rows:auto;padding:0 0.25rem;gap:2px}.weekday.svelte-li8ss6.svelte-li8ss6{background-color:var(--color-background-heading);color:var(--color-text-heading);font-size:0.6em;letter-spacing:1px;padding:4px;text-transform:uppercase;text-align:center;border:2px solid transparent}hr.svelte-li8ss6.svelte-li8ss6{margin:1rem 0}.moon-container{display:flex;flex-flow:row wrap;align-items:center;justify-content:center}")}function Ch(t,e,n){let a=t.slice();return a[64]=e[n],a}function Ah(t,e,n){let a=t.slice();return a[67]=e[n],a}function gb(t){let e,n,a,r,i,o,l,s,d,u,c;e=new fh({props:{month:t[6].name,year:t[11],current:t[3].currentDate}}),e.$on("next",t[34]),e.$on("previous",t[35]),e.$on("reset",t[36]),e.$on("settings",t[37]);let h=t[5]&&kh(t),y=t[9]&&t[9].type=="intercalary"&&!t[14]&&Fh(t),m=t[6].type=="month"&&Th(t);d=new Ln({props:{columns:t[13].length,weeks:t[7],month:t[6],fullView:t[1]}}),d.$on("day-click",t[44]),d.$on("day-doubleclick",t[45]),d.$on("day-context-menu",t[46]),d.$on("event-click",t[47]),d.$on("event-mouseover",t[48]),d.$on("event-context",t[49]);let v=t[10]&&t[10].type=="intercalary"&&!t[14]&&Bh(t);return{c(){te(e.$$.fragment),n=j(),a=T("div"),r=T("div"),h&&h.c(),i=j(),o=T("div"),y&&y.c(),l=j(),m&&m.c(),s=j(),te(d.$$.fragment),u=j(),v&&v.c(),D(r,"class","weeks svelte-li8ss6"),D(o,"class","month-view svelte-li8ss6"),D(a,"class","month-container svelte-li8ss6")},m(p,k){ee(e,p,k),q(p,n,k),q(p,a,k),E(a,r),h&&h.m(r,null),E(a,i),E(a,o),y&&y.m(o,null),E(o,l),m&&m.m(o,null),E(o,s),ee(d,o,null),E(o,u),v&&v.m(o,null),c=!0},p(p,k){let C={};k[0]&64&&(C.month=p[6].name),k[0]&2048&&(C.year=p[11]),k[0]&8&&(C.current=p[3].currentDate),e.$set(C),p[5]?h?h.p(p,k):(h=kh(p),h.c(),h.m(r,null)):h&&(h.d(1),h=null),p[9]&&p[9].type=="intercalary"&&!p[14]?y?(y.p(p,k),k[0]&16896&&R(y,1)):(y=Fh(p),y.c(),R(y,1),y.m(o,l)):y&&(Ee(),W(y,1,1,()=>{y=null}),Ce()),p[6].type=="month"?m?m.p(p,k):(m=Th(p),m.c(),m.m(o,s)):m&&(m.d(1),m=null);let A={};k[0]&8192&&(A.columns=p[13].length),k[0]&128&&(A.weeks=p[7]),k[0]&64&&(A.month=p[6]),k[0]&2&&(A.fullView=p[1]),d.$set(A),p[10]&&p[10].type=="intercalary"&&!p[14]?v?(v.p(p,k),k[0]&17408&&R(v,1)):(v=Bh(p),v.c(),R(v,1),v.m(o,null)):v&&(Ee(),W(v,1,1,()=>{v=null}),Ce())},i(p){c||(R(e.$$.fragment,p),R(y),R(d.$$.fragment,p),R(v),c=!0)},o(p){W(e.$$.fragment,p),W(y),W(d.$$.fragment,p),W(v),c=!1},d(p){J(e,p),p&&O(n),p&&O(a),h&&h.d(),y&&y.d(),m&&m.d(),J(d),v&&v.d()}}}function yb(t){let e,n;return e=new Eh({props:{year:t[12],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[25]),e.$on("previous",t[26]),e.$on("reset",t[27]),e.$on("settings",t[28]),e.$on("day-click",t[29]),e.$on("day-doubleclick",t[30]),e.$on("day-context-menu",t[31]),e.$on("event-click",t[32]),e.$on("event-mouseover",t[33]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function vb(t){let e,n;return e=new yh({props:{year:t[12],fullView:t[1],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[16]),e.$on("previous",t[17]),e.$on("reset",t[18]),e.$on("settings",t[19]),e.$on("day-click",t[20]),e.$on("day-doubleclick",t[21]),e.$on("day-context-menu",t[22]),e.$on("event-click",t[23]),e.$on("event-mouseover",t[24]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&2&&(i.fullView=a[1]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function kh(t){let e,n,a,r=[...Array(t[7]).keys()],i=[];for(let o=0;o<r.length;o+=1)i[o]=xh(Ah(t,r,o));return{c(){e=T("span"),e.textContent="W",n=j(),a=T("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","week-num weekday fantasy-weekday svelte-li8ss6"),D(a,"class","week-num-container svelte-li8ss6")},m(o,l){q(o,e,l),q(o,n,l),q(o,a,l);for(let s=0;s<i.length;s+=1)i[s].m(a,null)},p(o,l){if(l[0]&384){r=[...Array(o[7]).keys()];let s;for(s=0;s<r.length;s+=1){let d=Ah(o,r,s);i[s]?i[s].p(d,l):(i[s]=xh(d),i[s].c(),i[s].m(a,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&O(e),o&&O(n),o&&O(a),We(i,o)}}}function xh(t){let e,n=t[8]+1+t[67]+"",a;return{c(){e=T("span"),a=me(n),D(e,"class","week-num svelte-li8ss6")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&384&&n!==(n=r[8]+1+r[67]+"")&&we(a,n)},d(r){r&&O(e)}}}function Fh(t){let e,n;return e=new Ln({props:{intercalary:!0,columns:t[13].length,weeks:t[7],month:t[9],fullView:t[1]}}),e.$on("day-click",t[38]),e.$on("day-doubleclick",t[39]),e.$on("day-context-menu",t[40]),e.$on("event-click",t[41]),e.$on("event-mouseover",t[42]),e.$on("event-context",t[43]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&8192&&(i.columns=a[13].length),r[0]&128&&(i.weeks=a[7]),r[0]&512&&(i.month=a[9]),r[0]&2&&(i.fullView=a[1]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Th(t){let e,n=t[13],a=[];for(let r=0;r<n.length;r+=1)a[r]=Sh(Ch(t,n,r));return{c(){e=T("div");for(let r=0;r<a.length;r+=1)a[r].c();D(e,"class","weekdays svelte-li8ss6")},m(r,i){q(r,e,i);for(let o=0;o<a.length;o+=1)a[o].m(e,null)},p(r,i){if(i[0]&8192){n=r[13];let o;for(o=0;o<n.length;o+=1){let l=Ch(r,n,o);a[o]?a[o].p(l,i):(a[o]=Sh(l),a[o].c(),a[o].m(e,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},d(r){r&&O(e),We(a,r)}}}function Sh(t){let e,n=t[64].name.slice(0,3)+"",a;return{c(){e=T("span"),a=me(n),D(e,"class","weekday fantasy-weekday svelte-li8ss6")},m(r,i){q(r,e,i),E(e,a)},p(r,i){i[0]&8192&&n!==(n=r[64].name.slice(0,3)+"")&&we(a,n)},d(r){r&&O(e)}}}function Bh(t){let e,n;return e=new Ln({props:{intercalary:!0,columns:t[13].length,weeks:t[7],month:t[10],fullView:t[1]}}),e.$on("day-click",t[50]),e.$on("day-doubleclick",t[51]),e.$on("day-context-menu",t[52]),e.$on("event-click",t[53]),e.$on("event-mouseover",t[54]),e.$on("event-context",t[55]),{c(){te(e.$$.fragment)},m(a,r){ee(e,a,r),n=!0},p(a,r){let i={};r[0]&8192&&(i.columns=a[13].length),r[0]&128&&(i.weeks=a[7]),r[0]&1024&&(i.month=a[10]),r[0]&2&&(i.fullView=a[1]),e.$set(i)},i(a){n||(R(e.$$.fragment,a),n=!0)},o(a){W(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Mh(t){let e,n,a,r;return a=new Lf({props:{displayDayNumber:t[4]}}),a.$on("close",t[56]),a.$on("event-click",t[57]),a.$on("event-mouseover",t[58]),a.$on("event-context",t[59]),a.$on("event",t[60]),{c(){e=T("hr"),n=j(),te(a.$$.fragment),D(e,"class","svelte-li8ss6")},m(i,o){q(i,e,o),q(i,n,o),ee(a,i,o),r=!0},p(i,o){let l={};o[0]&16&&(l.displayDayNumber=i[4]),a.$set(l)},i(i){r||(R(a.$$.fragment,i),r=!0)},o(i){W(a.$$.fragment,i),r=!1},d(i){i&&O(e),i&&O(n),J(a,i)}}}function bb(t){let e,n,a,r,i,o,l=[vb,yb,gb],s=[];function d(c,h){return c[2]&&!c[1]?0:c[2]?1:2}n=d(t,[-1,-1,-1]),a=s[n]=l[n](t);let u=t[0]&&!t[1]&&Mh(t);return{c(){e=T("div"),a.c(),r=j(),u&&u.c(),i=Ue(),D(e,"id","calendar-container"),D(e,"class","fantasy-calendar svelte-li8ss6"),$e(e,"--calendar-columns",t[3].weekdays.length),$e(e,"--column-widths",1/t[3].weekdays.length*100+"%"),$e(e,"--calendar-rows",t[3].weeksPerCurrentMonth),pe(e,"full-view",t[1]),pe(e,"year-view",t[2])},m(c,h){q(c,e,h),s[n].m(e,null),q(c,r,h),u&&u.m(c,h),q(c,i,h),o=!0},p(c,h){let y=n;n=d(c,h),n===y?s[n].p(c,h):(Ee(),W(s[y],1,1,()=>{s[y]=null}),Ce(),a=s[n],a?a.p(c,h):(a=s[n]=l[n](c),a.c()),R(a,1),a.m(e,null)),(!o||h[0]&8)&&$e(e,"--calendar-columns",c[3].weekdays.length),(!o||h[0]&8)&&$e(e,"--column-widths",1/c[3].weekdays.length*100+"%"),(!o||h[0]&8)&&$e(e,"--calendar-rows",c[3].weeksPerCurrentMonth),h[0]&2&&pe(e,"full-view",c[1]),h[0]&4&&pe(e,"year-view",c[2]),c[0]&&!c[1]?u?(u.p(c,h),h[0]&3&&R(u,1)):(u=Mh(c),u.c(),R(u,1),u.m(i.parentNode,i)):u&&(Ee(),W(u,1,1,()=>{u=null}),Ce())},i(c){o||(R(a),R(u),o=!0)},o(c){W(a),W(u),o=!1},d(c){c&&O(e),s[n].d(),c&&O(r),u&&u.d(c),c&&O(i)}}}function wb(t,e,n){let a,r,i,o,l,s,d,u,c,{fullView:h=!1}=e,{dayView:y=!1}=e,{yearView:m=!1}=e,{calendar:v}=e,{moons:p}=e,{displayDayNumber:k}=e,{displayWeeks:C}=e,A=Da(y),S=Da(p),_=Da(v);zn("dayView",A),zn("displayMoons",S),zn("calendar",_),v.on("month-update",()=>{n(12,i=v.displayed.year),n(11,o=v.getNameForYear(v.displayed.year)),n(6,l=v.currentMonth),n(10,s=v.nextMonth),n(9,d=v.previousMonth),n(7,c=v.weeksOfMonth(l)),n(8,u=v.weekNumbersOfMonth(l))});let F=()=>v.goToNextYear(),w=()=>v.goToPreviousYear();function M(ne){ue.call(this,t,ne)}function x(ne){ue.call(this,t,ne)}function V(ne){ue.call(this,t,ne)}function B(ne){ue.call(this,t,ne)}function H(ne){ue.call(this,t,ne)}function Y(ne){ue.call(this,t,ne)}function he(ne){ue.call(this,t,ne)}let oe=()=>v.goToNextYear(),ce=()=>v.goToPreviousYear();function Z(ne){ue.call(this,t,ne)}function z(ne){ue.call(this,t,ne)}function Q(ne){ue.call(this,t,ne)}function De(ne){ue.call(this,t,ne)}function ve(ne){ue.call(this,t,ne)}function Ne(ne){ue.call(this,t,ne)}function je(ne){ue.call(this,t,ne)}let at=()=>v.goToNext(),Pe=()=>v.goToPrevious();function gt(ne){ue.call(this,t,ne)}function xt(ne){ue.call(this,t,ne)}function Je(ne){ue.call(this,t,ne)}function Fe(ne){ue.call(this,t,ne)}function Ve(ne){ue.call(this,t,ne)}function Rt(ne){ue.call(this,t,ne)}function Gt(ne){ue.call(this,t,ne)}function Ft(ne){ue.call(this,t,ne)}function Mt(ne){ue.call(this,t,ne)}function gn(ne){ue.call(this,t,ne)}function Ut(ne){ue.call(this,t,ne)}function tn(ne){ue.call(this,t,ne)}function sa(ne){ue.call(this,t,ne)}function la(ne){ue.call(this,t,ne)}function Si(ne){ue.call(this,t,ne)}function Bi(ne){ue.call(this,t,ne)}function Mi(ne){ue.call(this,t,ne)}function Ni(ne){ue.call(this,t,ne)}function Ii(ne){ue.call(this,t,ne)}function Oi(ne){ue.call(this,t,ne)}let qi=()=>n(0,y=!1);function Ri(ne){ue.call(this,t,ne)}function Li(ne){ue.call(this,t,ne)}function Pi(ne){ue.call(this,t,ne)}function ji(ne){ue.call(this,t,ne)}return t.$$set=ne=>{"fullView"in ne&&n(1,h=ne.fullView),"dayView"in ne&&n(0,y=ne.dayView),"yearView"in ne&&n(2,m=ne.yearView),"calendar"in ne&&n(3,v=ne.calendar),"moons"in ne&&n(15,p=ne.moons),"displayDayNumber"in ne&&n(4,k=ne.displayDayNumber),"displayWeeks"in ne&&n(5,C=ne.displayWeeks)},t.$$.update=()=>{if(t.$$.dirty[0]&4){e:m&&n(0,y=!1)}if(t.$$.dirty[0]&1){e:A.set(y)}if(t.$$.dirty[0]&32768){e:S.set(p)}if(t.$$.dirty[0]&8){e:_.set(v)}if(t.$$.dirty[0]&8){e:n(14,a=v.plugin.data.showIntercalary)}if(t.$$.dirty[0]&8){e:n(13,r=v.weekdays)}if(t.$$.dirty[0]&8){e:n(12,i=v.displayed.year)}if(t.$$.dirty[0]&8){e:n(11,o=v.getNameForYear(v.displayed.year))}if(t.$$.dirty[0]&8){e:n(6,l=v.currentMonth)}if(t.$$.dirty[0]&8){e:n(10,s=v.nextMonth)}if(t.$$.dirty[0]&8){e:n(9,d=v.previousMonth)}if(t.$$.dirty[0]&72){e:n(8,u=v.weekNumbersOfMonth(l))}if(t.$$.dirty[0]&72){e:n(7,c=v.weeksOfMonth(l))}},[y,h,m,v,k,C,l,c,u,d,s,o,i,r,a,p,F,w,M,x,V,B,H,Y,he,oe,ce,Z,z,Q,De,ve,Ne,je,at,Pe,gt,xt,Je,Fe,Ve,Rt,Gt,Ft,Mt,gn,Ut,tn,sa,la,Si,Bi,Mi,Ni,Ii,Oi,qi,Ri,Li,Pi,ji]}var Nh=class extends de{constructor(e){super();fe(this,e,wb,bb,se,{fullView:1,dayView:0,yearView:2,calendar:3,moons:15,displayDayNumber:4,displayWeeks:5},pb,[-1,-1,-1])}},Ih=Nh;var Zt="FANTASY_CALENDAR",oa="FANTASY_CALENDAR_FULL_VIEW";(0,Me.addIcon)(Zt,'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="far" data-icon="calendar" class="svg-inline--fa fa-calendar fa-w-14" role="img" viewBox="0 0 448 512"><path xmlns="http://www.w3.org/2000/svg" fill="currentColor" d="M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z"/><path fill="currentColor" d="M18.32 255.78L192 223.96l-91.28 68.69c-10.08 10.08-2.94 27.31 11.31 27.31h222.7c-9.44-26.4-14.73-54.47-14.73-83.38v-42.27l-119.73-87.6c-23.82-15.88-55.29-14.01-77.06 4.59L5.81 227.64c-12.38 10.33-3.45 30.42 12.51 28.14zm556.87 34.1l-100.66-50.31A47.992 47.992 0 0 1 448 196.65v-36.69h64l28.09 22.63c6 6 14.14 9.37 22.63 9.37h30.97a32 32 0 0 0 28.62-17.69l14.31-28.62a32.005 32.005 0 0 0-3.02-33.51l-74.53-99.38C553.02 4.7 543.54 0 533.47 0H296.02c-7.13 0-10.7 8.57-5.66 13.61L352 63.96 292.42 88.8c-5.9 2.95-5.9 11.36 0 14.31L352 127.96v108.62c0 72.08 36.03 139.39 96 179.38-195.59 6.81-344.56 41.01-434.1 60.91C5.78 478.67 0 485.88 0 494.2 0 504 7.95 512 17.76 512h499.08c63.29.01 119.61-47.56 122.99-110.76 2.52-47.28-22.73-90.4-64.64-111.36zM489.18 66.25l45.65 11.41c-2.75 10.91-12.47 18.89-24.13 18.26-12.96-.71-25.85-12.53-21.52-29.67z" style="&#10; transform: scale(0.4125) translate(50%, 95%);&#10;"/></svg>');(0,Me.addIcon)("fantasy-calendar-reveal",'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="calendar-day" class="svg-inline--fa fa-calendar-day fa-w-14" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm64-192c0-8.8 7.2-16 16-16h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-96zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"/></svg>');var Pn=class extends Me.ItemView{constructor(e,n,a={}){super(n);this.plugin=e;this.leaf=n;this.options=a;this.updateMe=!0;this.yearView=!1;this.moons=!0;this.containerEl.addClass("fantasy-calendar-view"),this.contentEl.addClass("fantasy-calendar-view-content"),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.plugin.onSettingsLoad(()=>this.updateCalendars())})),this.registerEvent(this.plugin.app.workspace.on("layout-change",()=>{!this._app||this._app.$set({fullView:this.full,...this.full?{dayView:!1}:{}})}))}get root(){return this.leaf.getRoot()}get full(){return!("collapse"in this.root)}updateCalendars(){if(!this.updateMe){this.updateMe=!0;return}if(!this.plugin.data.calendars.length){this._app?.$destroy(),this.contentEl.empty(),this.noCalendarEl=this.contentEl.createDiv("fantasy-no-calendar"),this.noCalendarEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}let e=this.plugin.data.calendars.find(n=>n.id==this.calendar?.id)??this.plugin.defaultCalendar??this.plugin.data.calendars[0];this.helper&&this.helper.calendar.id==e.id?this.update(e):this.setCurrentCalendar(e)}update(e){this.calendar=e,this.helper.update(this.calendar),this.registerCalendarInterval(),this._app?this._app.$set({calendar:this.helper}):this.build()}registerCalendarInterval(){if(this.interval&&(clearInterval(this.interval),this.interval=null),this.calendar.static.incrementDay){let e=new Date;this.calendar.date||(this.calendar.date=e.valueOf());let n=wo(new Date(this.calendar.date),e);if(n>=1){for(let a=0;a<n;a++)this.helper.goToNextCurrentDay();this.calendar.date=e.valueOf(),this.saveCalendars()}this.interval=window.setInterval(()=>{wo(new Date,e)>=1&&(this.helper.goToNextCurrentDay(),this.helper.current,e=new Date,this.calendar.date=e.valueOf(),this.saveCalendars())},60*1e3),this.registerInterval(this.interval)}}saveCalendars(){this.updateMe=!1,this.plugin.saveCalendar()}setCurrentCalendar(e){this.noCalendarEl?.detach(),this.calendar=e,this.moons=this.calendar.static.displayMoons,this.dayNumber=this.calendar.static.displayDayNumber,this.helper=new La(this.calendar,this.plugin),this.registerCalendarInterval(),this.build()}createEventForDay(e){let n=new Oa(this.plugin,this.calendar,null,e);n.onClose=()=>{!n.saved||(this.calendar.events.push(n.event),this.helper.addEvent(n.event),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update"))},n.open()}async onOpen(){this.plugin.onSettingsLoad(()=>this.updateCalendars())}build(){this.contentEl.empty(),this._app=new Ih({target:this.contentEl,props:{calendar:this.helper,fullView:this.full,yearView:this.yearView,moons:this.moons,displayWeeks:this.helper.displayWeeks,displayDayNumber:this.dayNumber}}),this._app.$on("day-click",e=>{let n=e.detail;n.events.length||this.createEventForDay(n.date)}),this._app.$on("day-doubleclick",e=>{let n=e.detail;!n.events.length||(this.helper.viewing.day=n.number,this.helper.viewing.month=n.month.number,this.helper.viewing.year=n.month.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1))}),this._app.$on("day-context-menu",e=>{let{day:n,evt:a}=e.detail,r=new Me.Menu(this.app);r.setNoIcon(),this.full||r.addItem(i=>{i.setTitle("Open Day").onClick(()=>{this.openDay({day:n.number,month:this.helper.displayed.month,year:this.helper.displayed.year})})}),r.addItem(i=>{i.setTitle("Set as Today").onClick(()=>{this.calendar.current=n.date,this.helper.current.day=n.number,this.triggerHelperEvent("day-update"),this.saveCalendars()})}),r.addItem(i=>i.setTitle("New Event").onClick(()=>{this.createEventForDay(n.date)})),r.showAtMouseEvent(a)}),this._app.$on("settings",e=>{let n=e.detail,a=new Me.Menu(this.app);a.setNoIcon(),a.addItem(r=>{r.setTitle(`${this.calendar.displayWeeks?"Hide":"Show"} Weeks`).onClick(()=>{this.calendar.displayWeeks=!this.calendar.displayWeeks,this.helper.update(this.calendar),this._app.$set({displayWeeks:this.calendar.displayWeeks}),this.saveCalendars()})}),a.addItem(r=>{r.setTitle(`Open ${this.yearView?"Month":"Year"}`).onClick(()=>{this.yearView=!this.yearView,this._app.$set({yearView:this.yearView})})}),a.addItem(r=>{r.setTitle(this.moons?"Hide Moons":"Display Moons").onClick(()=>{this.toggleMoons()})}),a.addItem(r=>{r.setTitle(this.dayNumber?"Hide Day Number":"Display Day Number").onClick(()=>{this.dayNumber=!this.dayNumber,this.calendar.static.displayDayNumber=this.dayNumber,this._app.$set({displayDayNumber:this.dayNumber}),this.saveCalendars()})}),a.addItem(r=>{r.setTitle("View Day"),r.onClick(()=>{this.openDate()})}),a.addItem(r=>{r.setTitle("Switch Calendars"),r.setDisabled(this.plugin.data.calendars.length<=1),r.onClick(()=>{let i=new Oh(this.plugin,this.calendar);i.onClose=()=>{!i.confirmed||this.setCurrentCalendar(i.calendar)},i.open()})}),a.showAtMouseEvent(n)}),this._app.$on("event-click",e=>{let{event:n,modifier:a}=e.detail;if(n.note){let r=[];this.app.workspace.iterateAllLeaves(i=>{i.view instanceof Me.MarkdownView&&i.view.file.basename===n.note&&r.push(i)}),r.length?this.app.workspace.setActiveLeaf(r[0]):this.app.workspace.openLinkText(n.note,"",this.full||a)}else new Rh(n,this.plugin).open()}),this._app.$on("event-mouseover",e=>{if(!this.plugin.data.eventPreview)return;let{target:n,event:a}=e.detail;a.note&&this.app.workspace.trigger("link-hover",this,n,a.note,"")}),this._app.$on("event-context",e=>{let{evt:n,event:a}=e.detail,r=new Me.Menu(this.app);r.setNoIcon(),a.note||r.addItem(i=>{i.setTitle("Create Note").onClick(async()=>{let o=this.app.workspace.getActiveFile()?.path,l=o?this.app.fileManager.getNewFileParent(o)?.parent??"/":"/",s=`${a.date.year}-${a.date.month+1}-${a.date.day}`,d;a.end&&(d=`${a.end.year}-${a.end.month+1}-${a.end.day}`);let u={"fc-calendar":this.calendar.name,"fc-date":s,...a.end?{"fc-end":d}:{},...a.category?{"fc-category":this.calendar.categories.find(h=>h.id==a.category)?.name}:{}};a.note=(0,Me.normalizePath)(`${l}/${a.name}.md`);let c=this.app.vault.getAbstractFileByPath(a.note);if(c||(c=await this.app.vault.create(a.note,`---
${(0,Me.stringifyYaml)(u)}
---`)),this.saveCalendars(),c instanceof Me.TFile){let y=this.app.workspace.getLeavesOfType("markdown").find(m=>{m.view instanceof Me.FileView&&m.view.file.path==a.note});y?this.app.workspace.setActiveLeaf(y):await this.app.workspace.getUnpinnedLeaf().openFile(c,{active:!0})}})}),r.addItem(i=>{i.setTitle("Edit Event").onClick(()=>{let o=new Oa(this.plugin,this.calendar,a);o.onClose=()=>{if(!o.saved)return;let l=this.calendar.events.find(s=>s.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(l),1,o.event),this.helper.refreshMonth(o.event.date.month,o.event.date.year),(o.event.date.month!=l.date.month||o.event.date.year!=l.date.year)&&this.helper.refreshMonth(l.date.month,l.date.year),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")},o.open()})}),r.addItem(i=>{i.setTitle("Delete Event").onClick(async()=>{if(!this.plugin.data.exit.event&&!await _d(this.plugin))return;let o=this.calendar.events.find(l=>l.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(o),1),this.helper.refreshMonth(o.date.month,o.date.year),this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")})}),r.showAtMouseEvent(n)}),this._app.$on("event",e=>{let n=e.detail;this.createEventForDay(n)}),this._app.$on("reset",()=>{this.helper.reset(),this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)})}openDay(e){this.helper.viewing.day=e.day,this.helper.viewing.month=e.month,this.helper.viewing.year=e.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)}openDate(){if(!this.helper||!this.calendar)return;let e=new qh(this.plugin,this.calendar);e.onClose=()=>{!e.confirmed||(e.setCurrent?(this.calendar.current={...e.date},this.setCurrentCalendar(this.calendar)):(this.helper.displayed={...e.date},this.helper.update(),this._app.$set({calendar:this.helper})),this.saveCalendars())},e.open()}toggleMoons(){this.moons=!this.moons,this._app.$set({moons:this.moons})}async onClose(){}onResize(){this.triggerHelperEvent("view-resized",!1)}getViewType(){return Zt}getDisplayText(){return"Fantasy Calendar"}getIcon(){return Zt}triggerHelperEvent(e,n=!0){!this.helper||(this.helper.trigger(e),n&&(this.updateMe=!1,this.plugin.app.workspace.trigger("fantasy-calendars-updated")))}async onunload(){}},Oh=class extends Me.Modal{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"Switch Calendars"});let e=this.contentEl.createDiv("fantasy-calendar-dropdown");e.createEl("label",{text:"Choose a Calendar"}),new Me.DropdownComponent(e).onChange(r=>{this.calendar=this.plugin.data.calendars.find(i=>i.id==r)}).addOptions(Object.fromEntries(this.plugin.data.calendars.map(r=>[r.id,r.name]))).setValue(this.calendar?this.calendar.id:null);let a=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Me.ButtonComponent(a).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.close()}),new Me.ButtonComponent(a).setButtonText("Cancel").onClick(()=>{this.close()})}onOpen(){this.display()}},qh=class extends Me.Modal{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1;this.setCurrent=!1;this.date={...this.calendar.current},this.tempCurrentDays=this.date.day}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"View Day"}),this.dateFieldEl=this.contentEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(),new Me.Setting(this.contentEl).setName("Set as Current Date").setDesc("Also set this date to today's date.").addToggle(n=>n.setValue(this.setCurrent).onChange(a=>{this.setCurrent=a}));let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Me.ButtonComponent(e).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.date.day=this.tempCurrentDays,this.close()}),new Me.ButtonComponent(e).setButtonText("Cancel").onClick(()=>{this.close()})}buildDateFields(){this.dateFieldEl.empty(),this.tempCurrentDays!=null&&this.date.month!=null&&this.tempCurrentDays>this.calendar.static.months[this.date.month]?.length&&(this.tempCurrentDays=this.calendar.static.months[this.date.month]?.length);let e=this.dateFieldEl.createDiv("fantasy-calendar-date-field");e.createEl("label",{text:"Day"}),new Me.TextComponent(e).setPlaceholder("Day").setValue(`${this.tempCurrentDays}`).setDisabled(this.date.month==null).onChange(i=>{if(Number(i)<1||Number(i)>this.calendar.static.months[this.date.month]?.length){new Me.Notice(`The current day must be between 1 and ${this.calendar.static.months[this.date.month].length}`),this.tempCurrentDays=this.date.day,this.buildDateFields();return}this.tempCurrentDays=Number(i)}).inputEl.setAttr("type","number");let a=this.dateFieldEl.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Month"}),new Me.DropdownComponent(a).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(i=>[i.name,i.name])])).setValue(this.date.month!=null?this.calendar.static.months[this.date.month].name:"select").onChange(i=>{i==="select"&&(this.date.month=null);let o=this.calendar.static.months.find(l=>l.name==i);this.date.month=this.calendar.static.months.indexOf(o),this.buildDateFields()});let r=this.dateFieldEl.createDiv("fantasy-calendar-date-field");if(r.createEl("label",{text:"Year"}),this.calendar.static.useCustomYears){let i=new Me.DropdownComponent(r);(this.calendar.static.years??[]).forEach(o=>{i.addOption(o.id,o.name)}),this.date.year>this.calendar.static.years?.length&&(this.date.year=this.calendar.static.years?this.calendar.static.years.length:null),i.setValue(this.calendar.static.years?.[this.date.year-1]?.id).onChange(o=>{this.date.year=this.calendar.static.years.findIndex(l=>l.id==o)+1})}else new Me.TextComponent(r).setPlaceholder("Year").setValue(`${this.date.year}`).onChange(o=>{this.date.year=Number(o)}).inputEl.setAttr("type","number")}onOpen(){this.display()}},Rh=class extends Me.Modal{constructor(e,n){super(n.app);this.event=e;this.plugin=n;this.containerEl.addClass("fantasy-calendar-view-event")}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:this.event.name}),await Me.MarkdownRenderer.renderMarkdown(this.event.description,this.contentEl,this.event.note,null)}async onOpen(){await this.display()}};var h4=xe(require("fs")),fn=xe(require("obsidian"));function As(t){let e=new Blob([t],{type:"text/javascript"}),n=URL.createObjectURL(e),a=new Worker(n);return URL.revokeObjectURL(n),a}function ks(){return As(`var ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Re=ee(Ae=>{Ae.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\\xC0",Aacute:"\\xC1",Acirc:"\\xC2",Atilde:"\\xC3",Auml:"\\xC4",Aring:"\\xC5",AElig:"\\xC6",Ccedil:"\\xC7",Egrave:"\\xC8",Eacute:"\\xC9",Ecirc:"\\xCA",Euml:"\\xCB",Igrave:"\\xCC",Iacute:"\\xCD",Icirc:"\\xCE",Iuml:"\\xCF",ETH:"\\xD0",Ntilde:"\\xD1",Ograve:"\\xD2",Oacute:"\\xD3",Ocirc:"\\xD4",Otilde:"\\xD5",Ouml:"\\xD6",Oslash:"\\xD8",Ugrave:"\\xD9",Uacute:"\\xDA",Ucirc:"\\xDB",Uuml:"\\xDC",Yacute:"\\xDD",THORN:"\\xDE",szlig:"\\xDF",agrave:"\\xE0",aacute:"\\xE1",acirc:"\\xE2",atilde:"\\xE3",auml:"\\xE4",aring:"\\xE5",aelig:"\\xE6",ccedil:"\\xE7",egrave:"\\xE8",eacute:"\\xE9",ecirc:"\\xEA",euml:"\\xEB",igrave:"\\xEC",iacute:"\\xED",icirc:"\\xEE",iuml:"\\xEF",eth:"\\xF0",ntilde:"\\xF1",ograve:"\\xF2",oacute:"\\xF3",ocirc:"\\xF4",otilde:"\\xF5",ouml:"\\xF6",oslash:"\\xF8",ugrave:"\\xF9",uacute:"\\xFA",ucirc:"\\xFB",uuml:"\\xFC",yacute:"\\xFD",thorn:"\\xFE",yuml:"\\xFF",nbsp:"\\xA0",iexcl:"\\xA1",cent:"\\xA2",pound:"\\xA3",curren:"\\xA4",yen:"\\xA5",brvbar:"\\xA6",sect:"\\xA7",uml:"\\xA8",copy:"\\xA9",ordf:"\\xAA",laquo:"\\xAB",not:"\\xAC",shy:"\\xAD\\xAD",reg:"\\xAE",macr:"\\xAF",deg:"\\xB0",plusmn:"\\xB1",sup2:"\\xB2",sup3:"\\xB3",acute:"\\xB4",micro:"\\xB5",para:"\\xB6",middot:"\\xB7",cedil:"\\xB8",sup1:"\\xB9",ordm:"\\xBA",raquo:"\\xBB",frac14:"\\xBC",frac12:"\\xBD",frac34:"\\xBE",iquest:"\\xBF",times:"\\xD7",divide:"\\xF7",forall:"\\u2200",part:"\\u2202",exist:"\\u2203",empty:"\\u2205",nabla:"\\u2207",isin:"\\u2208",notin:"\\u2209",ni:"\\u220B",prod:"\\u220F",sum:"\\u2211",minus:"\\u2212",lowast:"\\u2217",radic:"\\u221A",prop:"\\u221D",infin:"\\u221E",ang:"\\u2220",and:"\\u2227",or:"\\u2228",cap:"\\u2229",cup:"\\u222A",int:"\\u222B",there4:"\\u2234",sim:"\\u223C",cong:"\\u2245",asymp:"\\u2248",ne:"\\u2260",equiv:"\\u2261",le:"\\u2264",ge:"\\u2265",sub:"\\u2282",sup:"\\u2283",nsub:"\\u2284",sube:"\\u2286",supe:"\\u2287",oplus:"\\u2295",otimes:"\\u2297",perp:"\\u22A5",sdot:"\\u22C5",Alpha:"\\u0391",Beta:"\\u0392",Gamma:"\\u0393",Delta:"\\u0394",Epsilon:"\\u0395",Zeta:"\\u0396",Eta:"\\u0397",Theta:"\\u0398",Iota:"\\u0399",Kappa:"\\u039A",Lambda:"\\u039B",Mu:"\\u039C",Nu:"\\u039D",Xi:"\\u039E",Omicron:"\\u039F",Pi:"\\u03A0",Rho:"\\u03A1",Sigma:"\\u03A3",Tau:"\\u03A4",Upsilon:"\\u03A5",Phi:"\\u03A6",Chi:"\\u03A7",Psi:"\\u03A8",Omega:"\\u03A9",alpha:"\\u03B1",beta:"\\u03B2",gamma:"\\u03B3",delta:"\\u03B4",epsilon:"\\u03B5",zeta:"\\u03B6",eta:"\\u03B7",theta:"\\u03B8",iota:"\\u03B9",kappa:"\\u03BA",lambda:"\\u03BB",mu:"\\u03BC",nu:"\\u03BD",xi:"\\u03BE",omicron:"\\u03BF",pi:"\\u03C0",rho:"\\u03C1",sigmaf:"\\u03C2",sigma:"\\u03C3",tau:"\\u03C4",upsilon:"\\u03C5",phi:"\\u03C6",chi:"\\u03C7",psi:"\\u03C8",omega:"\\u03C9",thetasym:"\\u03D1",upsih:"\\u03D2",piv:"\\u03D6",OElig:"\\u0152",oelig:"\\u0153",Scaron:"\\u0160",scaron:"\\u0161",Yuml:"\\u0178",fnof:"\\u0192",circ:"\\u02C6",tilde:"\\u02DC",ensp:"\\u2002",emsp:"\\u2003",thinsp:"\\u2009",zwnj:"\\u200C",zwj:"\\u200D",lrm:"\\u200E",rlm:"\\u200F",ndash:"\\u2013",mdash:"\\u2014",lsquo:"\\u2018",rsquo:"\\u2019",sbquo:"\\u201A",ldquo:"\\u201C",rdquo:"\\u201D",bdquo:"\\u201E",dagger:"\\u2020",Dagger:"\\u2021",bull:"\\u2022",hellip:"\\u2026",permil:"\\u2030",prime:"\\u2032",Prime:"\\u2033",lsaquo:"\\u2039",rsaquo:"\\u203A",oline:"\\u203E",euro:"\\u20AC",trade:"\\u2122",larr:"\\u2190",uarr:"\\u2191",rarr:"\\u2192",darr:"\\u2193",harr:"\\u2194",crarr:"\\u21B5",lceil:"\\u2308",rceil:"\\u2309",lfloor:"\\u230A",rfloor:"\\u230B",loz:"\\u25CA",spades:"\\u2660",clubs:"\\u2663",hearts:"\\u2665",diams:"\\u2666"}});var Pe=ee(pe=>{var fe=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,Oe=new RegExp("[\\\\-\\\\.0-9"+fe.source.slice(1,-1)+"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]"),Se=new RegExp("^"+fe.source+Oe.source+"*(?::"+fe.source+Oe.source+"*)?$"),z=0,S=1,F=2,j=3,U=4,L=5,G=6,te=7;function P(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,P)}P.prototype=new Error;P.prototype.name=P.name;function Me(){}Me.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),Ue(t,t={}),vt(e,t,n,r,this.errorHandler),r.endDocument()}};function vt(e,t,n,r,i){function a(v){if(v>65535){v-=65536;var C=55296+(v>>10),dt=56320+(v&1023);return String.fromCharCode(C,dt)}else return String.fromCharCode(v)}function s(v){var C=v.slice(1,-1);return C in n?n[C]:C.charAt(0)==="#"?a(parseInt(C.substr(1).replace("x","0x"))):(i.error("entity not found:"+v),v)}function c(v){if(v>m){var C=e.substring(m,v).replace(/&#?\\w+;/g,s);p&&l(m),r.characters(C,0,v-m),m=v}}function l(v,C){for(;v>=u&&(C=h.exec(e));)o=C.index,u=o+C[0].length,p.lineNumber++;p.columnNumber=v-o+1}for(var o=0,u=0,h=/.*(?:\\r\\n?|\\n)|.*$/g,p=r.locator,d=[{currentNSMap:t}],T={},m=0;;){try{var f=e.indexOf("<",m);if(f<0){if(!e.substr(m).match(/^\\s*$/)){var I=r.doc,be=I.createTextNode(e.substr(m));I.appendChild(be),r.currentElement=be}return}switch(f>m&&c(f),e.charAt(f+1)){case"/":var y=e.indexOf(">",f+3),_=e.substring(f+2,y),R=d.pop();y<0?(_=e.substring(f+2).replace(/[\\s<].*/,""),i.error("end tag name: "+_+" is not complete:"+R.tagName),y=f+1+_.length):_.match(/\\s</)&&(_=_.replace(/[\\s<].*/,""),i.error("end tag name: "+_+" maybe not complete"),y=f+1+_.length);var _e=R.localNSMap,Ce=R.tagName==_,pt=Ce||R.tagName&&R.tagName.toLowerCase()==_.toLowerCase();if(pt){if(r.endElement(R.uri,R.localName,_),_e)for(var mt in _e)r.endPrefixMapping(mt);Ce||i.fatalError("end tag name: "+_+" is not match the current start tagName:"+R.tagName)}else d.push(R);y++;break;case"?":p&&l(f),y=Dt(e,f,r);break;case"!":p&&l(f),y=yt(e,f,r,i);break;default:p&&l(f);var b=new Le,oe=d[d.length-1].currentNSMap,y=gt(e,f,b,oe,s,i),xe=b.length;if(!b.closed&&Nt(e,y,b.tagName,T)&&(b.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),p&&xe){for(var ht=$e(p,{}),ue=0;ue<xe;ue++){var Ie=b[ue];l(Ie.offset),Ie.locator=$e(p,{})}r.locator=ht,Fe(b,r,oe)&&d.push(b),r.locator=p}else Fe(b,r,oe)&&d.push(b);b.uri==="http://www.w3.org/1999/xhtml"&&!b.closed?y=Et(e,y,b.tagName,s,r):y++}}catch(v){if(v instanceof P)throw v;i.error("element parse error: "+v),y=-1}y>m?m=y:c(Math.max(f,m)+1)}}function $e(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function gt(e,t,n,r,i,a){function s(d,T,m){d in n.attributeNames&&a.fatalError("Attribute "+d+" redefined"),n.addValue(d,T,m)}for(var c,l,o=++t,u=z;;){var h=e.charAt(o);switch(h){case"=":if(u===S)c=e.slice(t,o),u=j;else if(u===F)u=j;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(u===j||u===S)if(u===S&&(a.warning('attribute value must after "="'),c=e.slice(t,o)),t=o+1,o=e.indexOf(h,t),o>0)l=e.slice(t,o).replace(/&#?\\w+;/g,i),s(c,l,t-1),u=L;else throw new Error("attribute value no end '"+h+"' match");else if(u==U)l=e.slice(t,o).replace(/&#?\\w+;/g,i),s(c,l,t),a.warning('attribute "'+c+'" missed start quot('+h+")!!"),t=o+1,u=L;else throw new Error('attribute value must after "="');break;case"/":switch(u){case z:n.setTagName(e.slice(t,o));case L:case G:case te:u=te,n.closed=!0;case U:case S:case F:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),u==z&&n.setTagName(e.slice(t,o)),o;case">":switch(u){case z:n.setTagName(e.slice(t,o));case L:case G:case te:break;case U:case S:l=e.slice(t,o),l.slice(-1)==="/"&&(n.closed=!0,l=l.slice(0,-1));case F:u===F&&(l=c),u==U?(a.warning('attribute "'+l+'" missed quot(")!'),s(c,l.replace(/&#?\\w+;/g,i),t)):((r[""]!=="http://www.w3.org/1999/xhtml"||!l.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),s(l,l,t));break;case j:throw new Error("attribute value missed!!")}return o;case"\\x80":h=" ";default:if(h<=" ")switch(u){case z:n.setTagName(e.slice(t,o)),u=G;break;case S:c=e.slice(t,o),u=F;break;case U:var l=e.slice(t,o).replace(/&#?\\w+;/g,i);a.warning('attribute "'+l+'" missed quot(")!!'),s(c,l,t);case L:u=G;break}else switch(u){case F:var p=n.tagName;(r[""]!=="http://www.w3.org/1999/xhtml"||!c.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=o,u=S;break;case L:a.warning('attribute space is required"'+c+'"!!');case G:u=S,t=o;break;case j:u=U,t=o;break;case te:throw new Error("elements closed character '/' and '>' must be connected to")}}o++}}function Fe(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var s=e[a],c=s.qName,l=s.value,p=c.indexOf(":");if(p>0)var o=s.prefix=c.slice(0,p),u=c.slice(p+1),h=o==="xmlns"&&u;else u=c,o=null,h=c==="xmlns"&&"";s.localName=u,h!==!1&&(i==null&&(i={},Ue(n,n={})),n[h]=i[h]=l,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,l))}for(var a=e.length;a--;){s=e[a];var o=s.prefix;o&&(o==="xml"&&(s.uri="http://www.w3.org/XML/1998/namespace"),o!=="xmlns"&&(s.uri=n[o||""]))}var p=r.indexOf(":");p>0?(o=e.prefix=r.slice(0,p),u=e.localName=r.slice(p+1)):(o=null,u=e.localName=r);var d=e.uri=n[o||""];if(t.startElement(d,u,r,e),e.closed){if(t.endElement(d,u,r),i)for(o in i)t.endPrefixMapping(o)}else return e.currentNSMap=n,e.localNSMap=i,!0}function Et(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),a):(s=s.replace(/&#?\\w+;/g,r),i.characters(s,0,s.length),a)}return t+1}function Nt(e,t,n,r){var i=r[n];return i==null&&(i=e.lastIndexOf("</"+n+">"),i<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function Ue(e,t){for(var n in e)t[n]=e[n]}function yt(e,t,n,r){var i=e.charAt(t+2);switch(i){case"-":if(e.charAt(t+3)==="-"){var a=e.indexOf("-->",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var s=wt(e,t),c=s.length;if(c>1&&/!doctype/i.test(s[0][0])){var l=s[1][0],o=!1,u=!1;c>3&&(/^public$/i.test(s[2][0])?(o=s[3][0],u=c>4&&s[4][0]):/^system$/i.test(s[2][0])&&(u=s[3][0]));var h=s[c-1];return n.startDTD(l,o,u),n.endDTD(),h.index+h[0].length}}return-1}function Dt(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);if(i){var a=i[0].length;return n.processingInstruction(i[1],i[2]),r+2}else return-1}return-1}function Le(){this.attributeNames={}}Le.prototype={setTagName:function(e){if(!Se.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!Se.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function wt(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}pe.XMLReader=Me;pe.ParseError=P});var we=ee(K=>{function Q(e,t){for(var n in e)t[n]=e[n]}function D(e,t){var n=e.prototype;if(!(n instanceof t)){let i=function(){};var r=i;i.prototype=t.prototype,i=new i,Q(n,i),e.prototype=n=i}n.constructor!=e&&(typeof e!="function"&&console.error("unknow Class:"+e),n.constructor=e)}var Tt="http://www.w3.org/1999/xhtml",w={},x=w.ELEMENT_NODE=1,k=w.ATTRIBUTE_NODE=2,ne=w.TEXT_NODE=3,ke=w.CDATA_SECTION_NODE=4,Ve=w.ENTITY_REFERENCE_NODE=5,bt=w.ENTITY_NODE=6,qe=w.PROCESSING_INSTRUCTION_NODE=7,Ye=w.COMMENT_NODE=8,Xe=w.DOCUMENT_NODE=9,ze=w.DOCUMENT_TYPE_NODE=10,O=w.DOCUMENT_FRAGMENT_NODE=11,_t=w.NOTATION_NODE=12,E={},g={},qt=E.INDEX_SIZE_ERR=(g[1]="Index size error",1),Yt=E.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),Ct=E.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3),Xt=E.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),zt=E.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),jt=E.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),Gt=E.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),xt=E.NOT_FOUND_ERR=(g[8]="Not found",8),Qt=E.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),je=E.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10),Wt=E.INVALID_STATE_ERR=(g[11]="Invalid state",11),Bt=E.SYNTAX_ERR=(g[12]="Syntax error",12),Zt=E.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),Kt=E.NAMESPACE_ERR=(g[14]="Invalid namespace",14),Jt=E.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function $(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,g[e]),this.message=g[e],Error.captureStackTrace&&Error.captureStackTrace(this,$);return n.code=e,t&&(this.message=this.message+": "+t),n}$.prototype=Error.prototype;Q(E,$);function M(){}M.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)Y(this[r],n,e,t);return n.join("")}};function V(e,t){this._node=e,this._refresh=t,me(this)}function me(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);st(e,"length",n.length),Q(n,e),e._inc=t}}V.prototype.item=function(e){return me(this),this[e]};D(V,M);function re(){}function Ge(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function Qe(e,t,n,r){if(r?t[Ge(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&Ke(i,e,r),It(i,e,n))}}function We(e,t,n){var r=Ge(t,n);if(r>=0){for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(Ke(a,e,n),n.ownerElement=null)}}else throw $(xt,new Error(e.tagName+"@"+n))}re.prototype={length:0,item:M.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new $(je);var n=this.getNamedItem(e.nodeName);return Qe(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t=e.ownerElement,n;if(t&&t!=this._ownerElement)throw new $(je);return n=this.getNamedItemNS(e.namespaceURI,e.localName),Qe(this._ownerElement,this,e,n),n},removeNamedItem:function(e){var t=this.getNamedItem(e);return We(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return We(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}};function Be(e){if(this._features={},e)for(var t in e)this._features=e[t]}Be.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!!(n&&(!t||t in n))},createDocument:function(e,t,n){var r=new B;if(r.implementation=this,r.childNodes=new M,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new Ee;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}};function N(){}N.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return He(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Je(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return De(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==ne&&e.nodeType==ne?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(n[r]==e)return r}t=t.nodeType==k?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==k?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null}};function Ze(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}Q(w,N);Q(w,N.prototype);function W(e,t){if(t(e))return!0;if(e=e.firstChild)do if(W(e,t))return!0;while(e=e.nextSibling)}function B(){}function It(e,t,n){e&&e._inc++;var r=n.namespaceURI;r=="http://www.w3.org/2000/xmlns/"&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function Ke(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&delete t._nsMap[n.prefix?n.localName:""]}function he(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function Je(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,he(e.ownerDocument,e),t}function He(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===O){var i=t.firstChild;if(i==null)return t;var a=t.lastChild}else i=a=t;var s=n?n.previousSibling:e.lastChild;i.previousSibling=s,a.nextSibling=n,s?s.nextSibling=i:e.firstChild=i,n==null?e.lastChild=a:n.previousSibling=a;do i.parentNode=e;while(i!==a&&(i=i.nextSibling));return he(e.ownerDocument||e,e),t.nodeType==O&&(t.firstChild=t.lastChild=null),t}function At(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,he(e.ownerDocument,e,t),t}B.prototype={nodeName:"#document",nodeType:Xe,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==O){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return this.documentElement==null&&e.nodeType==x&&(this.documentElement=e),He(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Je(this,e)},importNode:function(e,t){return at(this,e,t)},getElementById:function(e){var t=null;return W(this.documentElement,function(n){if(n.nodeType==x&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\\\s)"+e+"(\\\\s|$)");return new V(this,function(n){var r=[];return W(n.documentElement,function(i){i!==n&&i.nodeType==x&&t.test(i.getAttribute("class"))&&r.push(i)}),r})},createElement:function(e){var t=new q;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new M;var n=t.attributes=new re;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new ae;return e.ownerDocument=this,e.childNodes=new M,e},createTextNode:function(e){var t=new de;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ve;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ge;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ye;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new ie;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Ne;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new q,r=t.split(":"),i=n.attributes=new re;return n.childNodes=new M,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new ie,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}};D(B,N);function q(){this._nsMap={}}q.prototype={nodeType:x,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===O?this.insertBefore(e,null):At(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new V(this,function(t){var n=[];return W(t,function(r){r!==t&&r.nodeType==x&&(e==="*"||r.tagName==e)&&n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new V(this,function(n){var r=[];return W(n,function(i){i!==n&&i.nodeType===x&&(e==="*"||i.namespaceURI===e)&&(t==="*"||i.localName==t)&&r.push(i)}),r})}};B.prototype.getElementsByTagName=q.prototype.getElementsByTagName;B.prototype.getElementsByTagNameNS=q.prototype.getElementsByTagNameNS;D(q,N);function ie(){}ie.prototype.nodeType=k;D(ie,N);function Z(){}Z.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(g[Ct])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}};D(Z,N);function de(){}de.prototype={nodeName:"#text",nodeType:ne,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};D(de,Z);function ve(){}ve.prototype={nodeName:"#comment",nodeType:Ye};D(ve,Z);function ge(){}ge.prototype={nodeName:"#cdata-section",nodeType:ke};D(ge,Z);function Ee(){}Ee.prototype.nodeType=ze;D(Ee,N);function et(){}et.prototype.nodeType=_t;D(et,N);function tt(){}tt.prototype.nodeType=bt;D(tt,N);function Ne(){}Ne.prototype.nodeType=Ve;D(Ne,N);function ae(){}ae.prototype.nodeName="#document-fragment";ae.prototype.nodeType=O;D(ae,N);function ye(){}ye.prototype.nodeType=qe;D(ye,N);function nt(){}nt.prototype.serializeToString=function(e,t,n){return rt.call(e,t,n)};N.prototype.toString=rt;function rt(e,t){var n=[],r=this.nodeType==9&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&i==null){var i=r.lookupPrefix(a);if(i==null)var s=[{namespace:a,prefix:null}]}return Y(this,n,e,t,s),n.join("")}function it(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i||r==="xml"&&i==="http://www.w3.org/XML/1998/namespace"||i=="http://www.w3.org/2000/xmlns/")return!1;for(var a=n.length;a--;){var s=n[a];if(s.prefix==r)return s.namespace!=i}return!0}function Y(e,t,n,r,i){if(r)if(e=r(e),e){if(typeof e=="string"){t.push(e);return}}else return;switch(e.nodeType){case x:i||(i=[]);var a=i.length,s=e.attributes,c=s.length,l=e.firstChild,o=e.tagName;n=Tt===e.namespaceURI||n,t.push("<",o);for(var u=0;u<c;u++){var h=s.item(u);h.prefix=="xmlns"?i.push({prefix:h.localName,namespace:h.value}):h.nodeName=="xmlns"&&i.push({prefix:"",namespace:h.value})}for(var u=0;u<c;u++){var h=s.item(u);if(it(h,n,i)){var p=h.prefix||"",d=h.namespaceURI,T=p?" xmlns:"+p:" xmlns";t.push(T,'="',d,'"'),i.push({prefix:p,namespace:d})}Y(h,t,n,r,i)}if(it(e,n,i)){var p=e.prefix||"",d=e.namespaceURI;if(d){var T=p?" xmlns:"+p:" xmlns";t.push(T,'="',d,'"'),i.push({prefix:p,namespace:d})}}if(l||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(t.push(">"),n&&/^script$/i.test(o))for(;l;)l.data?t.push(l.data):Y(l,t,n,r,i),l=l.nextSibling;else for(;l;)Y(l,t,n,r,i),l=l.nextSibling;t.push("</",o,">")}else t.push("/>");return;case Xe:case O:for(var l=e.firstChild;l;)Y(l,t,n,r,i),l=l.nextSibling;return;case k:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Ze),'"');case ne:return t.push(e.data.replace(/[<&]/g,Ze).replace(/]]>/g,"]]&gt;"));case ke:return t.push("<![CDATA[",e.data,"]]>");case Ye:return t.push("<!--",e.data,"-->");case ze:var m=e.publicId,f=e.systemId;if(t.push("<!DOCTYPE ",e.name),m)t.push(" PUBLIC ",m),f&&f!="."&&t.push(" ",f),t.push(">");else if(f&&f!=".")t.push(" SYSTEM ",f,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case qe:return t.push("<?",e.target," ",e.data,"?>");case Ve:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function at(e,t,n){var r;switch(t.nodeType){case x:r=t.cloneNode(!1),r.ownerDocument=e;case O:break;case k:n=!0;break}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(at(e,i,n)),i=i.nextSibling;return r}function De(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];typeof a!="object"&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new M),r.ownerDocument=e,r.nodeType){case x:var s=t.attributes,c=r.attributes=new re,l=s.length;c._ownerElement=r;for(var o=0;o<l;o++)r.setAttributeNode(De(e,s.item(o),!0));break;case k:n=!0}if(n)for(var u=t.firstChild;u;)r.appendChild(De(e,u,n)),u=u.nextSibling;return r}function st(e,t,n){e[t]=n}try{if(Object.defineProperty){let e=function(t){switch(t.nodeType){case x:case O:var n=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}};Ht=e,Object.defineProperty(V.prototype,"length",{get:function(){return me(this),this.$$length}}),Object.defineProperty(N.prototype,"textContent",{get:function(){return e(this)},set:function(t){switch(this.nodeType){case x:case O:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),st=function(t,n,r){t["$$"+n]=r}}}catch(e){}var Ht;K.Node=N;K.DOMException=$;K.DOMImplementation=Be;K.XMLSerializer=nt});var ct=ee(H=>{function ot(e){this.options=e||{locator:{}}}ot.prototype.parseFromString=function(e,t){var n=this.options,r=new St,i=n.domBuilder||new J,a=n.errorHandler,s=n.locator,c=n.xmlns||{},l=/\\/x?html?$/.test(t),o=l?Ot.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&i.setDocumentLocator(s),r.errorHandler=Rt(a,i,s),r.domBuilder=n.domBuilder||i,l&&(c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e&&typeof e=="string"?r.parse(e,c,o):r.errorHandler.error("invalid doc source"),i.doc};function Rt(e,t,n){if(!e){if(t instanceof J)return t;e=t}var r={},i=e instanceof Function;n=n||{};function a(s){var c=e[s];!c&&i&&(c=e.length==2?function(l){e(s,l)}:e),r[s]=c&&function(l){c("[xmldom "+s+"] "+l+Te(n))}||function(){}}return a("warning"),a("error"),a("fatalError"),r}function J(){this.cdata=!1}function X(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}J.prototype={startDocument:function(){this.doc=new $t().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;se(this,a),this.currentElement=a,this.locator&&X(this.locator,a);for(var c=0;c<s;c++){var e=r.getURI(c),l=r.getValue(c),n=r.getQName(c),o=i.createAttributeNS(e,n);this.locator&&X(r.getLocator(c),o),o.value=o.nodeValue=l,a.setAttributeNode(o)}},endElement:function(e,t,n){var r=this.currentElement,i=r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&X(this.locator,n),se(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=ut.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&X(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=ut.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&X(this.locator,r),se(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&X(this.locator,i),se(this,i)}},warning:function(e){console.warn("[xmldom warning] "+e,Te(this.locator))},error:function(e){console.error("[xmldom error] "+e,Te(this.locator))},fatalError:function(e){throw new Mt(e,this.locator)}};function Te(e){if(e)return\`
@\`+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function ut(e,t,n){return typeof e=="string"?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(e){J.prototype[e]=function(){return null}});function se(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}var Ot=Re(),lt=Pe(),St=lt.XMLReader,Mt=lt.ParseError,$t=H.DOMImplementation=we().DOMImplementation;H.XMLSerializer=we().XMLSerializer;H.DOMParser=ot;H.__DOMHandler=J});function le(e,t){return(e%t+t)%t}function ce(e){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t=="x"?n:n&3|8;return r.toString(16)})}var{DOMParser:Ft}=ct(),Ut=/(<(span|div).*?<\\/(span|div)>)/g,A=self,ft=class{constructor(){this.queue=[];this.parsing=!1;this.parseTitle=!1;A.addEventListener("message",t=>{if(t.data.type=="options"){let{defaultCalendar:n,addToDefaultIfMissing:r,format:i,parseTitle:a}=t.data;this.addToDefaultIfMissing=r,this.defaultCalendar=n,this.format=i,this.parseTitle=a}}),A.addEventListener("message",t=>{if(t.data.type=="calendars"){let{calendars:n}=t.data;this.calendars=[...n]}}),A.addEventListener("message",t=>{t.data.type=="queue"&&this.add(...t.data.paths)})}add(...t){this.queue.push(...t),this.parsing||this.parse()}async parse(){for(this.parsing=!0;this.queue.length;){let t=this.queue.shift();await this.getFileData(t)}this.parsing=!1,A.postMessage({type:"save"})}async getFileData(t){let n=this;return new Promise(r=>{function i(a){if(a.data.type=="queue"){A.removeEventListener("message",i),r();return}if(a.data.type!="file"||a.data.path!=t)return;A.removeEventListener("message",i);let{data:s,cache:c,allTags:l,file:o}=a.data;n.parseFileForEvents(s,c,l,o),r()}setTimeout(()=>r,500),A.addEventListener("message",i),A.postMessage({path:t,type:"get"})})}getDataFromFrontmatter(t){let n,r;return t&&"fc-ignore"in t?{}:(t&&(n=t==null?void 0:t["fc-calendar"],r=t==null?void 0:t["fc-category"]),this.addToDefaultIfMissing&&(!n||!n.length)&&(n=this.defaultCalendar),n=n==null?void 0:n.toLowerCase(),{calendar:this.calendars.find(a=>n==a.name.toLowerCase()),fcCategory:r})}removeEventsFromFile(t){for(let n of this.calendars)for(let r=0;r<n.events.length;r++){let i=n.events[r];!i||!i.note||i.note!=t||A.postMessage({event:i,id:n.id,index:r,type:"delete"})}}parseFileForEvents(t,n,r,i){var o,u,h,p,d,T;let a=[],{frontmatter:s}=n!=null?n:{},{calendar:c,fcCategory:l}=this.getDataFromFrontmatter(s);if(!c){this.removeEventsFromFile(i.path);return}c.supportTimelines&&r&&r.includes(c.timelineTag)&&a.push(...this.parseTimelineEvents(c,t,i,l)),a.push(...this.parseFrontmatterEvents(c,l,s,i));for(let m of a){let f=c.events.find(I=>I.note==i.path&&(!m.timestamp||I.timestamp==m.timestamp));(f==null?void 0:f.date.day)==m.date.day&&(f==null?void 0:f.date.month)==m.date.month&&(f==null?void 0:f.date.year)==m.date.year&&((o=f==null?void 0:f.end)==null?void 0:o.day)==((u=m.end)==null?void 0:u.day)&&((h=f==null?void 0:f.end)==null?void 0:h.month)==((p=m.end)==null?void 0:p.month)&&((d=f==null?void 0:f.end)==null?void 0:d.year)==((T=m.end)==null?void 0:T.year)&&(f==null?void 0:f.category)==m.category&&(!m.timestamp&&!(f==null?void 0:f.timestamp)||(f==null?void 0:f.timestamp)==m.timestamp)||A.postMessage({type:"update",id:c.id,index:f?c.events.findIndex(I=>I.id==(f==null?void 0:f.id)):-1,event:m,original:f})}}parseFrontmatterEvents(t,n,r,i){let{date:a,end:s}=this.getDates(r,this.parseTitle?i.basename:"");if(!a)return this.removeEventsFromFile(i.path),[];if((a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="string"){let o=t.static.months.find(u=>u.name==a.month);o?a.month=t.static.months.indexOf(o):a.month=null}else(a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="number"&&(a.month=le(a.month-1,t.static.months.length));if((s==null?void 0:s.month)&&typeof(s==null?void 0:s.month)=="string"){let o=t.static.months.find(u=>u.name==s.month);o?s.month=t.static.months.indexOf(o):s.month=null}else(s==null?void 0:s.month)&&typeof(s==null?void 0:s.month)=="number"&&(s.month=le(s.month-1,t.static.months.length));let c=Number(\`\${a.year}\${a.month}\${a.day}00\`),l=t.categories.find(o=>(o==null?void 0:o.name)==n);return[{id:ce(6),name:i.basename,note:i.path,date:a,end:s,category:l==null?void 0:l.id,description:"",auto:!0}]}parseTimelineEvents(t,n,r,i){var c;let a=[],s=new Ft;for(let l of n.matchAll(Ut)){let o=s.parseFromString(l[0],"text/html"),u={class:o.documentElement.getAttribute("class"),dataset:{date:o.documentElement.getAttribute("data-date"),title:o.documentElement.getAttribute("data-title"),class:o.documentElement.getAttribute("data-class"),end:o.documentElement.getAttribute("data-end")},content:o.documentElement.textContent};if(u.class!=="ob-timelines"||!u.dataset.date)continue;let h=Number(u.dataset.date[0]=="-"?+u.dataset.date.substring(1,u.dataset.date.length).split("-").join("")*-1:+u.dataset.date.split("-").join("")),p=u.dataset.date.split(/(?<!^)-/),d={year:parseInt(p[0]),month:parseInt(p[1]),day:parseInt(p[2])},T;u.dataset.end&&(p=u.dataset.end.split(/(?<!^)-/),T={year:parseInt(p[0]),month:parseInt(p[1]),day:parseInt(p[2])});let m=t.categories.find(f=>(f==null?void 0:f.name)==i);a.push({id:ce(6),name:(c=u.dataset.title)!=null?c:r.basename,note:r.path,date:d,end:T,timestamp:h,category:m==null?void 0:m.id,description:u.content,auto:!0})}return a}parseDate(t){var n;if(typeof t=="string"){if(!/\\d+[./-]\\d+[./-]\\d+/.test(t))return;try{let[r]=(n=t.match(/\\d+[./-]\\d+[./-]\\d+/))!=null?n:[];if(!r)return;let i=r.split(/[.\\-\\/]/).map(s=>Number(s)),a=[...new Set(this.format.replace(/[^\\w]/g,"").toUpperCase().split(""))];return{year:i[a.indexOf("Y")],month:i[a.indexOf("M")],day:i[a.indexOf("D")]}}catch(r){return}}else return t}getDates(t={},n){let r="fc-date"in t?"fc-date":"fc-start",i;t&&r in t&&(i=t[r]),i||(i=n);let a=this.parseDate(i),s="fc-end"in t?t["fc-end"]:null,c=this.parseDate(s);return{date:a,end:c}}};new ft;
`)}var xs=class extends fn.Component{constructor(e){super();this.plugin=e;this.parsing=new Set;this.tree=new Map;this.worker=new ks}get calendars(){return this.plugin.data.calendars}get metadataCache(){return this.plugin.app.metadataCache}get vault(){return this.plugin.app.vault}onload(){this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.worker.postMessage({type:"calendars",calendars:this.calendars})})),this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendar-settings-change",()=>{this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name})})),this.registerEvent(this.metadataCache.on("changed",e=>{this.startParsing([e.path])})),this.registerEvent(this.vault.on("rename",async(e,n)=>{if(!!this.calendars.length&&e instanceof fn.TFile){for(let a of this.calendars)a.events=a.events.filter(r=>r.note!=n);this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.startParsing([e.path])}})),this.registerEvent(this.vault.on("delete",e=>{if(!(e instanceof fn.TFile))return;let n=Date.now();for(let a of this.calendars){let r=a.events.filter(i=>i.note===e.path);a.events=a.events.filter(i=>i.note!=e.path);for(let i of r)this.addToTree(a,i)}this.plugin.saveCalendar(),this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map})),this.worker.addEventListener("message",async e=>{if(e.data.type=="get"){let{path:n}=e.data,a=this.plugin.app.vault.getAbstractFileByPath(n);if(a instanceof fn.TFile){let r=this.metadataCache.getFileCache(a),i=(0,fn.getAllTags)(r),o=await this.vault.cachedRead(a);this.worker.postMessage({type:"file",path:n,cache:r,file:{path:a.path,basename:a.basename},allTags:i,data:o})}else if(a instanceof fn.TFolder){let r=a.children.map(i=>i.path);this.startParsing(r)}}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="update"){let{id:n,index:a,event:r,original:i}=e.data,o=this.calendars.find(l=>l.id==n);if(!o)return;a==-1?o.events.push(r):o.events.splice(a,a>=0?1:0,r),this.addToTree(o,r),i&&this.addToTree(o,i)}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="delete"){let{id:n,index:a,event:r}=e.data;if(!r)return;let i=this.calendars.find(o=>o.id==n);if(!i)return;i.events=i.events.filter(o=>o.id!=r.id),this.addToTree(i,r)}}),this.worker.addEventListener("message",async e=>{e.data.type=="save"&&(this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map,await this.plugin.saveCalendar())}),this.start()}start(e){let n=e?[e]:this.calendars;if(!n.length)return;let a=new Set;for(let r of n){if(!r||!r.autoParse)continue;let i=this.vault.getAbstractFileByPath(r.path);if(!(!i||!(i instanceof fn.TFolder)))for(let o of i.children)a.add(o.path)}!a.size||this.startParsing([...a])}addToTree(e,n){this.tree.has(e.id)||this.tree.set(e.id,new Set);let a=this.tree.get(e.id);if(!a.has(n.date.year)&&(a.add(n.date.year),n.end&&n.end.year!=n.date.year))for(let r=n.date.year+1;r<=n.end.year;r++)a.add(n.date.year)}startParsing(e){this.worker.postMessage({type:"queue",paths:e})}onunload(){this.worker.terminate(),this.worker=null}};var Fs=class{constructor(e){this.plugin=e}getMoons(e,n){let a=n?this.plugin.data.calendars.find(({name:s})=>s==n):this.plugin.defaultCalendar??this.plugin.defaultCalendar,r=this._getHelper(a),i=e||r.current,o=r.getDayForDate(i),l=[];for(let[s,d]of o.moons){let u=createSpan();new Rn({target:u,props:{moon:s,phase:d}}),l.push({icon:u,moon:s,phase:d})}return l}_getHelper(e=this.plugin.defaultCalendar){return new La(e,this.plugin)}};var Lh=xe(Vn()),Ph=ja.Platform.isMacOS?"Meta":"Control",or={name:null,description:null,id:null,static:{incrementDay:!1,firstWeekDay:null,overflow:!0,weekdays:[],months:[],moons:[],displayMoons:!0,displayDayNumber:!1,leapDays:[],eras:[]},current:{year:null,month:null,day:null},events:[],categories:[],autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!0,timelineTag:"#timeline"},jh={addToDefaultIfMissing:!0,calendars:[],configDirectory:null,currentCalendar:null,dailyNotes:!1,dateFormat:"YYYY-MM-DD",defaultCalendar:null,eventPreview:!1,exit:{saving:!1,event:!1,calendar:!1},eventFrontmatter:!1,parseDates:!1,settingsToggleState:{calendars:!1,events:!1},showIntercalary:!1,version:{major:null,minor:null,patch:null}},Ts=class extends ja.Plugin{constructor(){super(...arguments);this.api=new Fs(this);this.watcher=new xs(this)}async addNewCalendar(e,n){let a=!n||e.name!=n?.name||e.autoParse&&!n?.autoParse||e.path!=n?.path;n==null?this.data.calendars.push(e):this.data.calendars.splice(this.data.calendars.indexOf(n),1,e),this.data.defaultCalendar||(this.data.defaultCalendar=e.id),a&&this.watcher.start(e),await this.saveCalendar()}get currentCalendar(){return this.data.calendars.find(e=>e.id==this.data.currentCalendar)}get canUseDailyNotes(){return this.dailyNotes._loaded}get dailyNotes(){return this.app.internalPlugins.getPluginById("daily-notes")}get canUseTimelines(){return this.app.plugins.getPlugin("obsidian-timelines")!=null}syncTimelines(e){return e.syncTimelines&&this.canUseTimelines}timelineTag(e){return this.syncTimelines?this.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag:e.timelineTag}get format(){return(this.data.dailyNotes&&this.canUseDailyNotes?this.dailyNotes.instance.options.format:this.data.dateFormat)??"YYYY-MM-DD"}get defaultCalendar(){return this.data.calendars.find(e=>e.id==this.data.defaultCalendar)??this.data.calendars[0]}get view(){let e=this.app.workspace.getLeavesOfType(Zt),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Pn)return n.view}get full(){let e=this.app.workspace.getLeavesOfType(oa),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Pn)return n.view}async onload(){console.log("Loading Fantasy Calendars v"+this.manifest.version),this.registerView(Zt,e=>new Pn(this,e)),this.registerView(oa,e=>new Pn(this,e,{full:!0})),this.app.workspace.onLayoutReady(async()=>{await this.loadSettings(),this.watcher.load(),this.addCommands(),this.addSettingTab(new Ei(this)),this.addCalendarView(!0)}),this.addRibbonIcon(Zt,"Open Large Fantasy Calendar",e=>{this.app.workspace.getLeaf(e.getModifierState(Ph)).setViewState({type:oa})})}async onunload(){console.log("Unloading Fantasy Calendars v"+this.manifest.version),this.app.workspace.getLeavesOfType(Zt).forEach(e=>e.detach()),this.app.workspace.getLeavesOfType(oa).forEach(e=>e.detach()),this.watcher.unload()}addCommands(){this.addCommand({id:"open-fantasy-calendar",name:"Open Fantasy Calendar",callback:()=>{this.addCalendarView()}}),this.addCommand({id:"open-big-fantasy-calendar",name:"Open Large Fantasy Calendar",callback:()=>{this.addFullCalendarView()}}),this.addCommand({id:"toggle-moons",name:"Toggle Moons",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length)return e||n[0].view.toggleMoons(),!0}}),this.addCommand({id:"view-date",name:"View Date",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length)return e||n[0].view.openDate(),!0}}),this.addCommand({id:"view-date",name:"View Note Event",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Zt);if(n&&n.length&&n[0].view instanceof Pn){let a=this.app.workspace.getActiveFile();if(a){let r=n[0].view.calendar.events.find(i=>i.note==a.path);if(r)return e||n[0].view.openDay(r.date),!0}}}})}async addCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(Zt)?.length||(await this.app.workspace.getRightLeaf(!1).setViewState({type:Zt}),this.view&&this.app.workspace.revealLeaf(this.view.leaf))}async addFullCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(oa)?.length||(this.app.workspace.getLeaf(!1).setViewState({type:oa}),this.full&&this.app.workspace.revealLeaf(this.full.leaf))}async loadSettings(){if(this.data={...(0,Lh.default)(jh),...await this.loadData()},this.configDirectory&&await this.app.vault.adapter.exists(this.configFilePath)&&(this.data=Object.assign({},this.data,JSON.parse(await this.app.vault.adapter.read(this.configFilePath)))),!this.data.defaultCalendar&&this.data.calendars.length&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.calendars.length&&!this.data.calendars.find(e=>e.id==this.data.defaultCalendar)&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.autoParse&&this.data.calendars.length){for(let e of this.data.calendars)e.autoParse=this.data.autoParse,e.path=this.data.path;delete this.data.autoParse,delete this.data.path}this.settingsLoaded=!0,this.app.workspace.trigger("fantasy-calendars-settings-loaded")}onSettingsLoad(e){this.settingsLoaded?e():this.app.workspace.on("fantasy-calendars-settings-loaded",()=>e())}async saveCalendar(){await this.saveSettings(),this.app.workspace.trigger("fantasy-calendars-updated")}get configDirectory(){if(!(!this.data||!this.data.configDirectory))return`${this.data.configDirectory}/plugins/fantasy-calendar`}get configFilePath(){if(!!this.data.configDirectory)return`${this.configDirectory}/data.json`}async saveSettings(){await this.saveData(this.data),this.app.workspace.trigger("fantasy-calendar-settings-change")}async saveData(e){if(this.configDirectory)try{await this.app.vault.adapter.exists(this.configDirectory)||await this.app.vault.adapter.mkdir(this.configDirectory),await this.app.vault.adapter.write(this.configFilePath,JSON.stringify(e))}catch(n){console.error(n),new ja.Notice("There was an error saving into the configured directory.")}await super.saveData(e)}};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
/**
* chroma.js - JavaScript library for color conversions
*
* Copyright (c) 2011-2019, Gregor Aisch
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name Gregor Aisch may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* -------------------------------------------------------
*
* chroma.js includes colors from colorbrewer2.org, which are released under
* the following license:
*
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
* and The Pennsylvania State University.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*
* ------------------------------------------------------
*
* Named colors are taken from X11 Color Names.
* http://www.w3.org/TR/css3-color/#svg-color
*
* @preserve
*/