From f808ba58f933bf1a86277cb7e37617e29fe5152f Mon Sep 17 00:00:00 2001
From: Orion Kindel "+v+`
+`;var V=this.options.langPrefix+this.options.escape(x,!0);return`
+`+Z+`
+
+`},k.prototype.blockquote=function(v){return`'+Z+`
+
+`+v+`
+`},k.prototype.html=function(v){return v},k.prototype.heading=function(v,x,R){var E=this.options.headerPrefix+R.toLowerCase().replace(/[^\w]+/g,"-");return"
+`:`
+`},k.prototype.list=function(v,x){var R=x?"ol":"ul";return`
+<`+R+`>
+`+v+""+R+`>
+`},k.prototype.listitem=function(v){return"
+
+`+v+`
+
+`+x+`
+
+`},k.prototype.tablerow=function(v){return`
+`+v+`
+`},k.prototype.tablecell=function(v,x){var R=x.header?"th":"td",E=x.align?"<"+R+' style="text-align:'+x.align+'">':"<"+R+">";return E+v+""+R+`>
+`},k.prototype.strong=function(v){return""+v+""},k.prototype.em=function(v){return""+v+""},k.prototype.codespan=function(v){return""+v+"
"},k.prototype.br=function(){return this.options.xhtml?"
":"
"},k.prototype.del=function(v){return""+v+""},k.prototype.link=function(v,x,R){if(this.options.sanitize){var E=void 0;try{E=decodeURIComponent(this.options.unescape(v)).replace(/[^\w:]/g,"").toLowerCase()}catch(Z){return R}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return R}var O='"+R+"",O},k.prototype.image=function(v,x,R){var E='":">",E},k.prototype.text=function(v){return v},k}();var Lt=function(){function k(v,x,R,E){if(R===void 0&&(R=Ut.options),this.staticThis=v,this.links=x,this.options=R,this.renderer=E||this.options.renderer||new ot(this.options),!this.links)throw new Error("InlineLexer requires 'links' parameter.");this.setRules()}return k.output=function(v,x,R){var E=new this(this,x,R);return E.output(v)},k.getRulesBase=function(){if(this.rulesBase)return this.rulesBase;var v={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/};return v.link=new t(v.link).setGroup("inside",v._inside).setGroup("href",v._href).getRegexp(),v.reflink=new t(v.reflink).setGroup("inside",v._inside).getRegexp(),this.rulesBase=v},k.getRulesPedantic=function(){return this.rulesPedantic?this.rulesPedantic:this.rulesPedantic=Object.assign(Object.assign({},this.getRulesBase()),{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/})},k.getRulesGfm=function(){if(this.rulesGfm)return this.rulesGfm;var v=this.getRulesBase(),x=new t(v.escape).setGroup("])","~|])").getRegexp(),R=new t(v.text).setGroup("]|","~]|").setGroup("|","|https?://|").getRegexp();return this.rulesGfm=Object.assign(Object.assign({},v),{escape:x,url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:R})},k.getRulesBreaks=function(){if(this.rulesBreaks)return this.rulesBreaks;var v=this.getRulesGfm(),x=this.getRulesGfm();return this.rulesBreaks=Object.assign(Object.assign({},x),{br:new t(v.br).setGroup("{2,}","*").getRegexp(),text:new t(x.text).setGroup("{2,}","*").getRegexp()})},k.prototype.setRules=function(){this.options.gfm?this.options.breaks?this.rules=this.staticThis.getRulesBreaks():this.rules=this.staticThis.getRulesGfm():this.options.pedantic?this.rules=this.staticThis.getRulesPedantic():this.rules=this.staticThis.getRulesBase(),this.hasRulesGfm=this.rules.url!==void 0},k.prototype.output=function(v){v=v;for(var x,R="";v;){if(x=this.rules.escape.exec(v)){v=v.substring(x[0].length),R+=x[1];continue}if(x=this.rules.autolink.exec(v)){var E=void 0,O=void 0;v=v.substring(x[0].length),x[2]==="@"?(E=this.options.escape(x[1].charAt(6)===":"?this.mangle(x[1].substring(7)):this.mangle(x[1])),O=this.mangle("mailto:")+E):(E=this.options.escape(x[1]),O=E),R+=this.renderer.link(O,null,E);continue}if(!this.inLink&&this.hasRulesGfm&&(x=this.rules.url.exec(v))){var E=void 0,O=void 0;v=v.substring(x[0].length),E=this.options.escape(x[1]),O=E,R+=this.renderer.link(O,null,E);continue}if(x=this.rules.tag.exec(v)){!this.inLink&&/^/i.test(x[0])&&(this.inLink=!1),v=v.substring(x[0].length),R+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(x[0]):this.options.escape(x[0]):x[0];continue}if(x=this.rules.link.exec(v)){v=v.substring(x[0].length),this.inLink=!0,R+=this.outputLink(x,{href:x[2],title:x[3]}),this.inLink=!1;continue}if((x=this.rules.reflink.exec(v))||(x=this.rules.nolink.exec(v))){v=v.substring(x[0].length);var Z=(x[2]||x[1]).replace(/\s+/g," "),V=this.links[Z.toLowerCase()];if(!V||!V.href){R+=x[0].charAt(0),v=x[0].substring(1)+v;continue}this.inLink=!0,R+=this.outputLink(x,V),this.inLink=!1;continue}if(x=this.rules.strong.exec(v)){v=v.substring(x[0].length),R+=this.renderer.strong(this.output(x[2]||x[1]));continue}if(x=this.rules.em.exec(v)){v=v.substring(x[0].length),R+=this.renderer.em(this.output(x[2]||x[1]));continue}if(x=this.rules.code.exec(v)){v=v.substring(x[0].length),R+=this.renderer.codespan(this.options.escape(x[2].trim(),!0));continue}if(x=this.rules.br.exec(v)){v=v.substring(x[0].length),R+=this.renderer.br();continue}if(this.hasRulesGfm&&(x=this.rules.del.exec(v))){v=v.substring(x[0].length),R+=this.renderer.del(this.output(x[1]));continue}if(x=this.rules.text.exec(v)){v=v.substring(x[0].length),R+=this.renderer.text(this.options.escape(this.smartypants(x[0])));continue}if(v)throw new Error("Infinite loop on byte: "+v.charCodeAt(0))}return R},k.prototype.outputLink=function(v,x){var R=this.options.escape(x.href),E=x.title?this.options.escape(x.title):null;return v[0].charAt(0)!=="!"?this.renderer.link(R,E,this.output(v[1])):this.renderer.image(R,E,this.options.escape(v[1]))},k.prototype.smartypants=function(v){return this.options.smartypants?v.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026"):v},k.prototype.mangle=function(v){if(!this.options.mangle)return v;for(var x="",R=v.length,E=0;E
"+this.options.escape(v.message+"",!0)+"";throw v},k}();Ut.options=new c,Ut.simpleRenderers=[];var Qt=function(){function k(v,x){this.staticThis=v,this.links={},this.tokens=[],this.options=x||Ut.options,this.setRules()}return k.lex=function(v,x,R,E){var O=new this(this,x);return O.getTokens(v,R,E)},k.getRulesBase=function(){if(this.rulesBase)return this.rulesBase;var v={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};v.item=new t(v.item,"gm").setGroup(/bull/g,v.bullet).getRegexp(),v.list=new t(v.list).setGroup(/bull/g,v.bullet).setGroup("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))").setGroup("def","\\n+(?="+v.def.source+")").getRegexp();var x="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";return v.html=new t(v.html).setGroup("comment",//).setGroup("closed",/<(tag)[\s\S]+?<\/\1>/).setGroup("closing",/
0&&n.stroke()}}function Un(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x l(s,F,M)&&a(s,F)!==0,I=()=>a(r,M)===0||l(r,F,M),$=()=>y||D(),N=()=>!y||I();for(let G=h,U=h;G<=f;++G)C=t[G%o],!C.skip&&(M=c(C[i]),M!==F&&(y=l(M,s,r),S===null&&$()&&(S=a(M,s)===0?G:U),S!==null&&N()&&(m.push(Ch({start:S,end:G,loop:g,count:o,style:p})),S=null),U=G,F=M));return S!==null&&m.push(Ch({start:S,end:f,loop:g,count:o,style:p})),m}function Pr(n,t){let e=[],i=n.segments;for(let s=0;s Y Axis Set Data Fields (Comma seperated) Line of Best Fit Create a line of best fit Best Fit Line ID The line ID used to create the line of best fit Line of Best Fit Title The title for the line of best fit Choose a Chart Type Smoothness Changes the smoothness of the Chart Width Changes the horizontal width Fill Fill the underside of the Chart Distinct Colors Use distinct Colors for each Label Start at Zero Don't cut the graph at the bottom X Axis Set Labels (Comma seperated) >>1;ic(dt,C);for(var x=0,y=0;y j&&(p=j),gT.call(this,f,p,w,S,F))}function gT(f,p,w,S,F){var j=My(f,p,w,S,F),se=kr(j.year,0,j.dayOfYear);return this.year(se.getUTCFullYear()),this.month(se.getUTCMonth()),this.date(se.getUTCDate()),this}N("Q",0,"Qo","quarter"),Rt("quarter","Q"),Bt("quarter",7),ae("Q",_n),We("Q",function(f,p){p[or]=(Z(f)-1)*3});function yT(f){return f==null?Math.ceil((this.month()+1)/3):this.month((f-1)*3+this.month()%3)}N("D",["DD",2],"Do","date"),Rt("date","D"),Bt("date",9),ae("D",L),ae("DD",L,Ht),ae("Do",function(f,p){return f?p._dayOfMonthOrdinalParse||p._ordinalParse:p._dayOfMonthOrdinalParseLenient}),We(["D","DD"],sr),We("Do",function(f,p){p[sr]=Z(f.match(L)[0])});var Qy=me("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),Rt("dayOfYear","DDD"),Bt("dayOfYear",4),ae("DDD",ue),ae("DDDD",ar),We(["DDD","DDDD"],function(f,p,w){w._dayOfYear=Z(f)});function vT(f){var p=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return f==null?p:this.add(f-p,"d")}N("m",["mm",2],0,"minute"),Rt("minute","m"),Bt("minute",14),ae("m",L),ae("mm",L,Ht),We(["m","mm"],Bn);var wT=me("Minutes",!1);N("s",["ss",2],0,"second"),Rt("second","s"),Bt("second",15),ae("s",L),ae("ss",L,Ht),We(["s","ss"],Er);var bT=me("Seconds",!1);N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return this.millisecond()*10}),N(0,["SSSSS",5],0,function(){return this.millisecond()*100}),N(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),N(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),N(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),N(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Rt("millisecond","ms"),Bt("millisecond",16),ae("S",ue,_n),ae("SS",ue,Ht),ae("SSS",ue,ar);var ra,Xy;for(ra="SSSS";ra.length<=9;ra+="S")ae(ra,ge);function DT(f,p){p[Gr]=Z(("0."+f)*1e3)}for(ra="S";ra.length<=9;ra+="S")We(ra,DT);Xy=me("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");function ST(){return this._isUTC?"UTC":""}function ET(){return this._isUTC?"Coordinated Universal Time":""}var we=O.prototype;we.add=pM,we.calendar=SM,we.clone=EM,we.diff=FM,we.endOf=VM,we.format=LM,we.from=PM,we.fromNow=NM,we.to=RM,we.toNow=HM,we.get=Dt,we.invalidAt=GM,we.isAfter=kM,we.isBefore=xM,we.isBetween=CM,we.isSame=_M,we.isSameOrAfter=MM,we.isSameOrBefore=TM,we.isValid=jM,we.lang=Ky,we.locale=zy,we.localeData=jy,we.max=j1,we.min=K1,we.parsingFlags=qM,we.set=Cn,we.startOf=BM,we.subtract=gM,we.toArray=YM,we.toObject=zM,we.toDate=WM,we.toISOString=AM,we.inspect=OM,typeof Symbol!="undefined"&&Symbol.for!=null&&(we[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),we.toJSON=KM,we.toString=IM,we.unix=UM,we.valueOf=$M,we.creationData=JM,we.eraName=eT,we.eraNarrow=tT,we.eraAbbr=nT,we.eraYear=rT,we.year=On,we.isLeapYear=Vn,we.weekYear=cT,we.isoWeekYear=dT,we.quarter=we.quarters=yT,we.month=ot,we.daysInMonth=qe,we.week=we.weeks=Z_,we.isoWeek=we.isoWeeks=Q_,we.weeksInYear=mT,we.weeksInWeekYear=pT,we.isoWeeksInYear=fT,we.isoWeeksInISOWeekYear=hT,we.date=Qy,we.day=we.days=d1,we.weekday=f1,we.isoWeekday=h1,we.dayOfYear=vT,we.hour=we.hours=b1,we.minute=we.minutes=wT,we.second=we.seconds=bT,we.millisecond=we.milliseconds=Xy,we.utcOffset=nM,we.utc=iM,we.local=aM,we.parseZone=oM,we.hasAlignedHourOffset=sM,we.isDST=lM,we.isLocal=cM,we.isUtcOffset=dM,we.isUtc=Vy,we.isUTC=Vy,we.zoneAbbr=ST,we.zoneName=ET,we.dates=B("dates accessor is deprecated. Use date instead.",Qy),we.months=B("months accessor is deprecated. Use month instead",ot),we.years=B("years accessor is deprecated. Use year instead",On),we.zone=B("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rM),we.isDSTShifted=B("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",uM);function kT(f){return Zt(f*1e3)}function xT(){return Zt.apply(null,arguments).parseZone()}function ev(f){return f}var Lt=re.prototype;Lt.calendar=pe,Lt.longDateFormat=Wt,Lt.invalidDate=Jt,Lt.ordinal=yn,Lt.preparse=ev,Lt.postformat=ev,Lt.relativeTime=xn,Lt.pastFuture=jn,Lt.set=oe,Lt.eras=ZM,Lt.erasParse=QM,Lt.erasConvertYear=XM,Lt.erasAbbrRegex=aT,Lt.erasNameRegex=iT,Lt.erasNarrowRegex=oT,Lt.months=he,Lt.monthsShort=Me,Lt.monthsParse=Le,Lt.monthsRegex=st,Lt.monthsShortRegex=yt,Lt.week=j_,Lt.firstDayOfYear=J_,Lt.firstDayOfWeek=G_,Lt.weekdays=o1,Lt.weekdaysMin=l1,Lt.weekdaysShort=s1,Lt.weekdaysParse=c1,Lt.weekdaysRegex=m1,Lt.weekdaysShortRegex=p1,Lt.weekdaysMinRegex=g1,Lt.isPM=v1,Lt.meridiem=D1;function cu(f,p,w,S){var F=Ci(),j=m().set(S,p);return F[w](j,f)}function tv(f,p,w){if(u(f)&&(p=f,f=void 0),f=f||"",p!=null)return cu(f,p,w,"month");var S,F=[];for(S=0;S<12;S++)F[S]=cu(f,S,w,"month");return F}function Lf(f,p,w,S){typeof f=="boolean"?(u(p)&&(w=p,p=void 0),p=p||""):(p=f,w=p,f=!1,u(p)&&(w=p,p=void 0),p=p||"");var F=Ci(),j=f?F._week.dow:0,se,Pe=[];if(w!=null)return cu(p,(w+j)%7,S,"day");for(se=0;se<7;se++)Pe[se]=cu(p,(se+j)%7,S,"day");return Pe}function CT(f,p){return tv(f,p,"months")}function _T(f,p){return tv(f,p,"monthsShort")}function MT(f,p,w){return Lf(f,p,w,"weekdays")}function TT(f,p,w){return Lf(f,p,w,"weekdaysShort")}function FT(f,p,w){return Lf(f,p,w,"weekdaysMin")}na("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(f){var p=f%10,w=Z(f%100/10)===1?"th":p===1?"st":p===2?"nd":p===3?"rd":"th";return f+w}}),t.lang=B("moment.lang is deprecated. Use moment.locale instead.",na),t.langData=B("moment.langData is deprecated. Use moment.localeData instead.",Ci);var _i=Math.abs;function IT(){var f=this._data;return this._milliseconds=_i(this._milliseconds),this._days=_i(this._days),this._months=_i(this._months),f.milliseconds=_i(f.milliseconds),f.seconds=_i(f.seconds),f.minutes=_i(f.minutes),f.hours=_i(f.hours),f.months=_i(f.months),f.years=_i(f.years),this}function nv(f,p,w,S){var F=Zr(p,w);return f._milliseconds+=S*F._milliseconds,f._days+=S*F._days,f._months+=S*F._months,f._bubble()}function AT(f,p){return nv(this,f,p,1)}function OT(f,p){return nv(this,f,p,-1)}function rv(f){return f<0?Math.floor(f):Math.ceil(f)}function LT(){var f=this._milliseconds,p=this._days,w=this._months,S=this._data,F,j,se,Pe,ut;return f>=0&&p>=0&&w>=0||f<=0&&p<=0&&w<=0||(f+=rv(Pf(w)+p)*864e5,p=0,w=0),S.milliseconds=f%1e3,F=At(f/1e3),S.seconds=F%60,j=At(F/60),S.minutes=j%60,se=At(j/60),S.hours=se%24,p+=At(se/24),ut=At(iv(p)),w+=ut,p-=rv(Pf(ut)),Pe=At(w/12),w%=12,S.days=p,S.months=w,S.years=Pe,this}function iv(f){return f*4800/146097}function Pf(f){return f*146097/4800}function PT(f){if(!this.isValid())return NaN;var p,w,S=this._milliseconds;if(f=Vt(f),f==="month"||f==="quarter"||f==="year")switch(p=this._days+S/864e5,w=this._months+iv(p),f){case"month":return w;case"quarter":return w/3;case"year":return w/12}else switch(p=this._days+Math.round(Pf(this._months)),f){case"week":return p/7+S/6048e5;case"day":return p+S/864e5;case"hour":return p*24+S/36e5;case"minute":return p*1440+S/6e4;case"second":return p*86400+S/1e3;case"millisecond":return Math.floor(p*864e5)+S;default:throw new Error("Unknown unit "+f)}}function NT(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Z(this._months/12)*31536e6:NaN}function Mi(f){return function(){return this.as(f)}}var RT=Mi("ms"),HT=Mi("s"),BT=Mi("m"),VT=Mi("h"),$T=Mi("d"),UT=Mi("w"),WT=Mi("M"),YT=Mi("Q"),zT=Mi("y");function KT(){return Zr(this)}function jT(f){return f=Vt(f),this.isValid()?this[f+"s"]():NaN}function Ba(f){return function(){return this.isValid()?this._data[f]:NaN}}var qT=Ba("milliseconds"),GT=Ba("seconds"),JT=Ba("minutes"),ZT=Ba("hours"),QT=Ba("days"),XT=Ba("months"),eF=Ba("years");function tF(){return At(this.days()/7)}var Ti=Math.round,Eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nF(f,p,w,S,F){return F.relativeTime(p||1,!!w,f,S)}function rF(f,p,w,S){var F=Zr(f).abs(),j=Ti(F.as("s")),se=Ti(F.as("m")),Pe=Ti(F.as("h")),ut=Ti(F.as("d")),$t=Ti(F.as("M")),lr=Ti(F.as("w")),Fi=Ti(F.as("y")),ia=j<=w.ss&&["s",j]||j{for(c.length+=e,a=c.length-1;a>=o;a--)c[a]=c[a-e]};for(l(r),a=t;ao+a)))return l}function G0(n,t){Ct(n,e=>{let i=e.gc,s=i.length/2,r;if(s>t){for(r=0;ri?i:e,i=s&&e>i?e:i,{min:me(e,me(i,e)),max:me(i,me(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){wt(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=pa(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c270||e<90)&&(n-=t),n}function oy(n,t){let{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){let r=i.setContext(n.getPointLabelContext(s)),o=Ft(r.font),{x:a,y:l,textAlign:c,left:h,top:f,right:g,bottom:p}=n._pointLabelItems[s],{backdropColor:m}=r;if(!ut(m)){let y=Le(r.borderRadius),S=Vt(r.backdropPadding);e.fillStyle=m;let M=h-S.left,C=f-S.top,F=g-h+S.width,D=p-f+S.height;Object.values(y).some(I=>I!==0)?(e.beginPath(),en(e,{x:M,y:C,w:F,h:D,radius:y}),e.fill()):e.fillRect(M,C,F,D)}tn(e,n._pointLabels[s],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}function Nu(n,t,e,i){let{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,kt);else{let r=n.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let o=1;o{let s=wt(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?ty(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=kt/(this._pointLabels.length||1),i=this.options.startAngle||0;return fe(t*e+Wt(i))}getDistanceFromCenterForValue(t){if(ut(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(ut(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&to)return!1;let{cp1:c,cp2:h}=Uu(s,r,o,a),f=(t-s)/(o-s),g={x:s,y:r},p={x:o,y:a},m=Di(g,c,f),y=Di(c,h,f),S=Di(h,p,f),M=Di(m,y,f),C=Di(y,S,f),F=Di(M,C,f).y;return e>=F&&e<=F+l}inXRange(t,e){let{x:i,x2:s}=this.getProps(["x","x2"],e);return t>=i&&t<=s}inYRange(t,e){let{y:i,y2:s,height:r}=this.getProps(["y","y2","height"],e),o=Math.min(i,s),a=Math.max(i,s)+r;return t>=o&&t<=a}getCenterPoint(t){let{x:e,y:i,x2:s,y2:r,height:o}=this.getProps(["x","y","x2","y2","height"],t);return{x:(e+s)/2,y:(i+r+o)/2}}tooltipPosition(t){return this.getCenterPoint(t)}getRange(t){return t==="x"?this.width/2:this.height/2}};Cs.id="flow";Cs.defaults={colorFrom:"red",colorTo:"green",colorMode:"gradient",hoverColorFrom:(n,t)=>Gn(t.colorFrom),hoverColorTo:(n,t)=>Gn(t.colorTo)};var Fe=ze(require("obsidian"));var Py={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Pa._date.override(typeof Fe.moment=="function"?{_id:"moment",formats:function(){return Py},parse:function(n,t){return typeof n=="string"&&typeof t=="string"?n=(0,Fe.moment)(n,t):n instanceof Fe.moment||(n=(0,Fe.moment)(n)),n.isValid()?n.valueOf():null},format:function(n,t){return(0,Fe.moment)(n).format(t)},add:function(n,t,e){return(0,Fe.moment)(n).add(t,e).valueOf()},diff:function(n,t,e){return(0,Fe.moment)(n).diff((0,Fe.moment)(t),e)},startOf:function(n,t,e){return n=(0,Fe.moment)(n),t==="isoWeek"?(e=Math.trunc(Math.min(Math.max(0,e),6)),n.isoWeekday(e).startOf("day").valueOf()):n.startOf(t).valueOf()},endOf:function(n,t){return(0,Fe.moment)(n).endOf(t).valueOf()}}:{});var Qr=ze(require("obsidian"));var Zu=ze(Ku());function ln(n,t=.25){if(typeof t!="number")throw"Provided alpha value is not a number";return n.map(e=>(0,Zu.default)(e.trim()).alpha(t).hex())}function cn(n,t){var i,s;let e=t.createDiv({cls:"chart-error"});e.createEl("b",{text:"Couldn't render Chart:"}),e.createEl("pre").createEl("code",{text:(s=(i=n.toString)==null?void 0:i.call(n))!=null?s:n}),e.createEl("hr"),e.createEl("span").innerHTML="You might also want to look for further Errors in the Console: Press CTRL + SHIFT + I to open it."}function Ty(n){for(var t=window.atob(n),e=t.length,i=new Uint8Array(e),s=0;so.axis&&o.axis===s);return r.length?r[0].id:s}function gf(n,t){if(n){let e=n.options.reverse,i=Ri(n,t.min,e?t.end:t.start),s=Ri(n,t.max,e?t.start:t.end);return{start:i,end:s}}}function mf(n,t){let{chartArea:e,scales:i}=n,s=i[ii(i,t,"xScaleID")],r=i[ii(i,t,"yScaleID")],o=e.width/2,a=e.height/2;return s&&(o=Ri(s,t.xValue,s.left+s.width/2)),r&&(a=Ri(r,t.yValue,r.top+r.height/2)),{x:o,y:a}}function sl(n,t){let e=n.scales,i=e[ii(e,t,"xScaleID")],s=e[ii(e,t,"yScaleID")];if(!i&&!s)return{};let{left:r,right:o}=i||n.chartArea,{top:a,bottom:l}=s||n.chartArea,c=_f(i,{min:t.xMin,max:t.xMax,start:r,end:o});r=c.start,o=c.end;let h=_f(s,{min:t.yMin,max:t.yMax,start:l,end:a});return a=h.start,l=h.end,{x:r,y:a,x2:o,y2:l,width:o-r,height:l-a,centerX:r+(o-r)/2,centerY:a+(l-a)/2}}function bf(n,t){if(!hf(t)){let e=sl(n,t),i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);let s=i*2,r=e.centerX+t.xAdjust,o=e.centerY+t.yAdjust;return{x:r-i,y:o-i,x2:r+i,y2:o+i,centerX:r,centerY:o,width:s,height:s,radius:i}}return Zy(n,t)}function Ky(n,t){let{scales:e,chartArea:i}=n,s=e[t.scaleID],r={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return s?Jy(s,r,t):Qy(e,r,t),r}function vf(n,t,e){let i=sl(n,t);return i.initProperties=Ps(n,i,t,e),i.elements=[{type:"label",optionScope:"label",properties:nx(n,i,t),initProperties:i.initProperties}],i}function Zy(n,t){let e=mf(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function _f(n,t){let e=gf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Jy(n,t,e){let i=Ri(n,e.value,NaN),s=Ri(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=s):(t.y=i,t.y2=s)}function Qy(n,t,e){for(let i of Object.keys(pf)){let s=n[ii(n,e,i)];if(s){let{min:r,max:o,start:a,end:l,startProp:c,endProp:h}=pf[i],f=gf(s,{min:e[r],max:e[o],start:s[a],end:s[l]});t[c]=f.start,t[h]=f.end}}}function tx({properties:n,options:t},e,i,s){let{x:r,x2:o,width:a}=n;return yf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.x,padding:{start:s.left,end:s.right},adjust:t.label.xAdjust,size:e.width})}function ex({properties:n,options:t},e,i,s){let{y:r,y2:o,height:a}=n;return yf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.y,padding:{start:s.top,end:s.bottom},adjust:t.label.yAdjust,size:e.height})}function yf(n,t){let{start:e,end:i,borderWidth:s}=n,{position:r,padding:{start:o,end:a},adjust:l}=t,c=i-s-e-o-a-t.size;return e+s/2+l+Qa(c,r)}function nx(n,t,e){let i=e.label;i.backgroundColor="transparent",i.callout.display=!1;let s=tl(i.position),r=Vt(i.padding),o=il(n.ctx,i),a=tx({properties:t,options:e},o,s,r),l=ex({properties:t,options:e},o,s,r),c=o.width+r.width,h=o.height+r.height;return{x:a,y:l,x2:a+c,y2:l+h,width:c,height:h,centerX:a+c/2,centerY:l+h/2,rotation:i.rotation}}function si(n,t,e){let i=Math.cos(e),s=Math.sin(e),r=t.x,o=t.y;return{x:r+i*(n.x-r)-s*(n.y-o),y:o+s*(n.x-r)+i*(n.y-o)}}var rl=["enter","leave"],ol=rl.concat("click");function ix(n,t,e){t.listened=uf(e,ol,t.listeners),t.moveListened=!1,t._getElements=Ja,rl.forEach(i=>{le(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&le(i.click)&&(t.listened=!0),t.moveListened||rl.forEach(s=>{le(i[s])&&(t.listened=!0,t.moveListened=!0)})})}function sx(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return rx(n,t,e);case"click":return ox(n,t,e)}}function rx(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Ja(n,t,e.interaction):i=[];let s=n.hovered;n.hovered=i;let r={state:n,event:t},o=xf(r,"leave",s,i);return xf(r,"enter",i,s)||o}function xf({state:n,event:t},e,i,s){let r;for(let o of i)s.indexOf(o)<0&&(r=wf(o.options[e]||n.listeners[e],o,t)||r);return r}function ox(n,t,e){let i=n.listeners,s=Ja(n,t,e.interaction),r;for(let o of s)r=wf(o.options.click||i.click,o,t)||r;return r}function wf(n,t,e){return wt(n,[t.$context,e])===!0}var Zr=["afterDraw","beforeDraw"];function ax(n,t,e){let i=t.visibleElements;t.hooked=uf(e,Zr,t.hooks),t.hooked||i.forEach(s=>{t.hooked||Zr.forEach(r=>{le(s.options[r])&&(t.hooked=!0)})})}function kf(n,t,e){if(n.hooked){let i=t.options[e]||n.hooks[e];return wt(i,[t.$context])}}function lx(n,t,e){let i=dx(n.scales,t,e),s=Sf(t,i,"min","suggestedMin");s=Sf(t,i,"max","suggestedMax")||s,s&&le(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function cx(n,t){for(let e of n)ux(e,t)}function Sf(n,t,e,i){if(jt(t[e])&&!hx(n.options,e,i)){let s=n[e]!==t[e];return n[e]=t[e],s}}function hx(n,t,e){return Nt(n[t])||Nt(n[e])}function ux(n,t){for(let e of["scaleID","xScaleID","yScaleID"]){let i=ii(t,n,e);i&&!t[i]&&fx(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function fx(n,t){if(t==="scaleID")return!0;let e=t.charAt(0);for(let i of["Min","Max","Value"])if(Nt(n[e+i]))return!0;return!1}function dx(n,t,e){let i=t.axis,s=t.id,r=i+"ScaleID",o={min:nt(t.min,Number.NEGATIVE_INFINITY),max:nt(t.max,Number.POSITIVE_INFINITY)};for(let a of e)a.scaleID===s?Mf(a,t,["value","endValue"],o):ii(n,a,r)===s&&Mf(a,t,[i+"Min",i+"Max",i+"Value"],o);return o}function Mf(n,t,e,i){for(let s of e){let r=n[s];if(Nt(r)){let o=t.parse(r);i.min=Math.min(i.min,o),i.max=Math.max(i.max,o)}}}var ri=class extends qt{inRange(t,e,i,s){let{x:r,y:o}=si({x:t,y:e},this.getCenterPoint(s),Wt(-this.options.rotation));return of({x:r,y:o},this.getProps(["x","y","x2","y2"],s),i,this.options.borderWidth)}getCenterPoint(t){return Oi(this,t)}draw(t){t.save(),nl(t,this.getCenterPoint(),this.options.rotation),df(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return vf(t,e)}};ri.id="boxAnnotation";ri.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};ri.defaultRoutes={borderColor:"color",backgroundColor:"color"};ri.descriptors={label:{_fallback:!0}};var Cf=["left","bottom","top","right"],Li=class extends qt{inRange(t,e,i,s){let{x:r,y:o}=si({x:t,y:e},this.getCenterPoint(s),Wt(-this.rotation));return of({x:r,y:o},this.getProps(["x","y","x2","y2"],s),i,this.options.borderWidth)}getCenterPoint(t){return Oi(this,t)}draw(t){let e=this.options,i=!Nt(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),nl(t,this.getCenterPoint(),this.rotation),gx(t,this),df(t,this,e),Hy(t,wx(this),e),t.restore())}resolveElementProperties(t,e){let i;if(hf(e))i=mf(t,e);else{let{centerX:a,centerY:l}=sl(t,e);i={x:a,y:l}}let s=Vt(e.padding),r=il(t.ctx,e),o=px(i,r,e,s);return{initProperties:Ps(t,o,e),pointX:i.x,pointY:i.y,...o,rotation:e.rotation}}};Li.id="labelAnnotation";Li.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Li.defaultRoutes={borderColor:"color"};function px(n,t,e,i){let s=t.width+i.width+e.borderWidth,r=t.height+i.height+e.borderWidth,o=tl(e.position,"center"),a=Pf(n.x,s,e.xAdjust,o.x),l=Pf(n.y,r,e.yAdjust,o.y);return{x:a,y:l,x2:a+s,y2:l+r,width:s,height:r,centerX:a+s/2,centerY:l+r/2}}function Pf(n,t,e=0,i){return n-Qa(t,i)+e}function gx(n,t){let{pointX:e,pointY:i,options:s}=t,r=s.callout,o=r&&r.display&&yx(t,r);if(!o||kx(t,r,o))return;if(n.save(),n.beginPath(),!En(n,r))return n.restore();let{separatorStart:l,separatorEnd:c}=mx(t,o),{sideStart:h,sideEnd:f}=vx(t,o,l);(r.margin>0||s.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(h.x,h.y),n.lineTo(f.x,f.y);let g=si({x:e,y:i},t.getCenterPoint(),Wt(-t.rotation));n.lineTo(g.x,g.y),n.stroke(),n.restore()}function mx(n,t){let{x:e,y:i,x2:s,y2:r}=n,o=bx(n,t),a,l;return t==="left"||t==="right"?(a={x:e+o,y:i},l={x:a.x,y:r}):(a={x:e,y:i+o},l={x:s,y:a.y}),{separatorStart:a,separatorEnd:l}}function bx(n,t){let{width:e,height:i,options:s}=n,r=s.callout.margin+s.borderWidth/2;return t==="right"?e+r:t==="bottom"?i+r:-r}function vx(n,t,e){let{y:i,width:s,height:r,options:o}=n,a=o.callout.start,l=_x(t,o.callout),c,h;return t==="left"||t==="right"?(c={x:e.x,y:i+Dn(r,a)},h={x:c.x+l,y:c.y}):(c={x:e.x+Dn(s,a),y:e.y},h={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:h}}function _x(n,t){let e=t.side;return n==="left"||n==="top"?-e:e}function yx(n,t){let e=t.position;return Cf.includes(e)?e:xx(n,t)}function xx(n,t){let{x:e,y:i,x2:s,y2:r,width:o,height:a,pointX:l,pointY:c,centerX:h,centerY:f,rotation:g}=n,p={x:h,y:f},m=t.start,y=Dn(o,m),S=Dn(a,m),M=[e,e+y,e+y,s],C=[i+S,r,i,r],F=[];for(let D=0;D<4;D++){let I=si({x:M[D],y:C[D]},p,Wt(g));F.push({position:Cf[D],distance:Ke(I,{x:l,y:c})})}return F.sort((D,I)=>D.distance-I.distance)[0].position}function wx({x:n,y:t,width:e,height:i,options:s}){let r=s.borderWidth/2,o=Vt(s.padding);return{x:n+o.left+r,y:t+o.top+r,width:e-o.left-o.right-s.borderWidth,height:i-o.top-o.bottom-s.borderWidth}}function kx(n,t,e){let{pointX:i,pointY:s}=n,r=t.margin,o=i,a=s;return e==="left"?o+=r:e==="right"?o-=r:e==="top"?a+=r:e==="bottom"&&(a-=r),n.inRange(o,a)}var al=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),ll=(n,t,e)=>al(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,Tf=(n,t,e)=>al(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,Ts=n=>n*n,Sx=(n,t,{x:e,y:i,x2:s,y2:r},o)=>o==="y"?{start:Math.min(i,r),end:Math.max(i,r),value:t}:{start:Math.min(e,s),end:Math.max(e,s),value:n},Df=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,cl=(n,t,e,i)=>({x:Df(n.x,t.x,e.x,i),y:Df(n.y,t.y,e.y,i)}),Ef=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Of=(n,t,e,i)=>-Math.atan2(Ef(n.x,t.x,e.x,i),Ef(n.y,t.y,e.y,i))+.5*gt,Fi=class extends qt{inRange(t,e,i,s){let r=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){let o={mouseX:t,mouseY:e},{path:a,ctx:l}=this;if(a){En(l,this.options);let{chart:h}=this.$context,f=t*h.currentDevicePixelRatio,g=e*h.currentDevicePixelRatio,p=l.isPointInStroke(a,f,g)||hl(this,o,s);return l.restore(),p}let c=Ts(r);return Tx(this,o,c,s)||hl(this,o,s)}return Mx(this,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:s})}getCenterPoint(t){return Oi(this,t)}draw(t){let{x:e,y:i,x2:s,y2:r,cp:o,options:a}=this;if(t.save(),!En(t,a))return t.restore();Ai(t,a);let l=Math.sqrt(Math.pow(s-e,2)+Math.pow(r-i,2));if(a.curve&&o)return Ix(t,this,o,l),t.restore();let{startOpts:c,endOpts:h,startAdjust:f,endAdjust:g}=If(this),p=Math.atan2(r-i,s-e);t.translate(e,i),t.rotate(p),t.beginPath(),t.moveTo(0+f,0),t.lineTo(l-g,0),t.shadowColor=a.borderShadowColor,t.stroke(),ul(t,0,f,c),ul(t,l,-g,h),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){let i=Ky(t,e),{x:s,y:r,x2:o,y2:a}=i,l=Cx(i,t.chartArea),c=l?Px({x:s,y:r},{x:o,y:a},t.chartArea):{x:s,y:r,x2:o,y2:a,width:Math.abs(o-s),height:Math.abs(a-r)};if(c.centerX=(o+s)/2,c.centerY=(a+r)/2,c.initProperties=Ps(t,c,e),e.curve){let f={x:c.x,y:c.y},g={x:c.x2,y:c.y2};c.cp=Fx(c,e,Ke(f,g))}let h=Dx(t,c,e.label);return h._visible=l,c.elements=[{type:"label",optionScope:"label",properties:h,initProperties:c.initProperties}],c}};Fi.id="lineAnnotation";var Af={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};Fi.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Af),fill:!1,length:12,start:Object.assign({},Af),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Li.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Fi.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}};Fi.defaultRoutes={borderColor:"color"};function Mx(n,{mouseX:t,mouseY:e},i,{hBorderWidth:s,useFinalPosition:r}){let o=Sx(t,e,n.getProps(["x","y","x2","y2"],r),i);return o.value>=o.start-s&&o.value<=o.end+s||hl(n,{mouseX:t,mouseY:e},r,i)}function Cx({x:n,y:t,x2:e,y2:i},{top:s,right:r,bottom:o,left:a}){return!(nr&&e>r||to&&i>o)}function Rf({x:n,y:t},e,{top:i,right:s,bottom:r,left:o}){return ne!=r.bY>e&&t<(r.bX-a.bX)*(e-a.bY)/(r.bY-a.bY)+a.bX&&(s=!s),r=a}return s}var On={box:ri,ellipse:Ii,label:Li,line:Fi,point:Ds,polygon:Es};Object.keys(On).forEach(n=>{ft.describe(`elements.${On[n].id}`,{_fallback:"plugins.annotation.common"})});var Bx={update:Object.assign},Nx=ol.concat(Zr),zf=(n,t)=>at(t)?pl(n,t):n,fl=n=>n==="color"||n==="font";function dl(n="line"){return On[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function Hx(n,t,e,i){let s=Vx(n,e.animations,i),r=t.annotations,o=qx(t.elements,r);for(let a=0;a>1,c=-7,d=r?i-1:0,m=r?-1:1,h=e[t+d];for(d+=m,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=a*256+e[t+d],d+=m,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+d],d+=m,c-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(h?-1:1)*o*Math.pow(2,a-n)}function Bb(e,t,r,n,i,a){var o,s,u,l=a*8-i-1,c=(1<i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o=v?(c=y,d=v):g>=I?(c=h,d=g):(c=D,d=I):v>=I?(c=y,d=v):I>=g?(c=h,d=g):(c=D,d=I);for(var O=l*(s-1),A=l*c,C=0;C=0&&U.test(f);)f=f.replace(U,S),U.lastIndex=0,w-=1;return f}var vt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Wt(f){var p=this._longDateFormat[f],w=this._longDateFormat[f.toUpperCase()];return p||!w?p:(this._longDateFormat[f]=w.match(Ce).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[f])}var Tt="Invalid date";function Jt(){return this._invalidDate}var en="%d",gn=/\d{1,2}/;function yn(f){return this._ordinal.replace("%d",f)}var vn={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function xn(f,p,w,S){var F=this._relativeTime[w];return Q(F)?F(f,p,w,S):F.replace(/%d/i,f)}function jn(f,p){var w=this._relativeTime[f>0?"future":"past"];return Q(w)?w(p):w.replace(/%s/i,p)}var sn={};function Rt(f,p){var w=f.toLowerCase();sn[w]=sn[w+"s"]=sn[p]=f}function Vt(f){return typeof f=="string"?sn[f]||sn[f.toLowerCase()]:void 0}function Sr(f){var p={},w,S;for(S in f)a(f,S)&&(w=Vt(S),w&&(p[w]=f[S]));return p}var Rr={};function Bt(f,p){Rr[f]=p}function Hr(f){var p=[],w;for(w in f)a(f,w)&&p.push({unit:w,priority:Rr[w]});return p.sort(function(S,F){return S.priority-F.priority}),p}function rn(f){return f%4===0&&f%100!==0||f%400===0}function At(f){return f<0?Math.ceil(f)||0:Math.floor(f)}function Z(f){var p=+f,w=0;return p!==0&&isFinite(p)&&(w=At(p)),w}function me(f,p){return function(w){return w!=null?(at(this,f,w),t.updateOffset(this,p),this):Ie(this,f)}}function Ie(f,p){return f.isValid()?f._d["get"+(f._isUTC?"UTC":"")+p]():NaN}function at(f,p,w){f.isValid()&&!isNaN(w)&&(p==="FullYear"&&rn(f.year())&&f.month()===1&&f.date()===29?(w=Z(w),f._d["set"+(f._isUTC?"UTC":"")+p](w,f.month(),b(w,f.month()))):f._d["set"+(f._isUTC?"UTC":"")+p](w))}function Dt(f){return f=Vt(f),Q(this[f])?this[f]():this}function Cn(f,p){if(typeof f=="object"){f=Sr(f);var w=Hr(f),S,F=w.length;for(S=0;S0;){if(F=nu(j.slice(0,w).join("-")),F)return F;if(S&&S.length>=w&&S1(j,S)>=w-1)break;w--}p++}return Hs}function k1(f){return f.match("^[^/\\\\]*$")!=null}function nu(f){var p=null,w;if(tn[f]===void 0&&typeof ls!="undefined"&&ls&&ls.exports&&k1(f))try{p=Hs._abbr,w=require,w("./locale/"+f),na(p)}catch(S){tn[f]=null}return tn[f]}function na(f,p){var w;return f&&(s(p)?w=Ci(f):w=Ef(f,p),w?Hs=w:typeof console!="undefined"&&console.warn&&console.warn("Locale "+f+" not found. Did you forget to load it?")),Hs._abbr}function Ef(f,p){if(p!==null){var w,S=Ay;if(p.abbr=f,tn[f]!=null)J("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),S=tn[f]._config;else if(p.parentLocale!=null)if(tn[p.parentLocale]!=null)S=tn[p.parentLocale]._config;else if(w=nu(p.parentLocale),w!=null)S=w._config;else return Rs[p.parentLocale]||(Rs[p.parentLocale]=[]),Rs[p.parentLocale].push({name:f,config:p}),null;return tn[f]=new re(te(S,p)),Rs[f]&&Rs[f].forEach(function(F){Ef(F.name,F.config)}),na(f),tn[f]}else return delete tn[f],null}function x1(f,p){if(p!=null){var w,S,F=Ay;tn[f]!=null&&tn[f].parentLocale!=null?tn[f].set(te(tn[f]._config,p)):(S=nu(f),S!=null&&(F=S._config),p=te(F,p),S==null&&(p.abbr=f),w=new re(p),w.parentLocale=tn[f],tn[f]=w),na(f)}else tn[f]!=null&&(tn[f].parentLocale!=null?(tn[f]=tn[f].parentLocale,f===na()&&na(f)):tn[f]!=null&&delete tn[f]);return tn[f]}function Ci(f){var p;if(f&&f._locale&&f._locale._abbr&&(f=f._locale._abbr),!f)return Hs;if(!n(f)){if(p=nu(f),p)return p;f=[f]}return E1(f)}function C1(){return ne(tn)}function kf(f){var p,w=f._a;return w&&g(f).overflow===-2&&(p=w[or]<0||w[or]>11?or:w[sr]<1||w[sr]>b(w[Ot],w[or])?sr:w[Yt]<0||w[Yt]>24||w[Yt]===24&&(w[Bn]!==0||w[Er]!==0||w[Gr]!==0)?Yt:w[Bn]<0||w[Bn]>59?Bn:w[Er]<0||w[Er]>59?Er:w[Gr]<0||w[Gr]>999?Gr:-1,g(f)._overflowDayOfYear&&(p=0)return j[S]}function XM(f,p){var w=f.since<=f.until?1:-1;return p===void 0?t(f.since).year():t(f.since).year()+(p-f.offset)*w}function eT(){var f,p,w,S=this.localeData().eras();for(f=0,p=S.length;f0)return"Unexpected "+(Y.length>1?"keys":"key")+" "+('"'+Y.join('", "')+'" found in '+V+". ")+"Expected to find one of the known reducer keys instead: "+('"'+T.join('", "')+'". Unexpected keys will be ignored.')}function y(z){Object.keys(z).forEach(function(k){var _=z[k],b=_(void 0,{type:l.INIT});if(typeof b=="undefined")throw new Error('Reducer "'+k+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof _(void 0,{type:l.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error('Reducer "'+k+'" returned undefined when probed with a random type. '+("Don't try to handle "+l.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function v(z){for(var k=Object.keys(z),_={},b=0;bq&&Ft===ie&&Ue.classList.add("endRange"),Ft>=Se&&(nt===0||Ft<=nt)&&rk(Ft,ie,q)&&Ue.classList.add("inRange"))})}function yn(){n.isOpen&&!n.config.static&&!n.config.inline&&Vt()}function vn(M,H=n._positionElement){if(n.isMobile===!0){if(M){M.preventDefault();let ie=Dr(M);ie&&ie.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ht("onOpen");return}else if(n._input.disabled||n.config.inline)return;let q=n.isOpen;n.isOpen=!0,q||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ht("onOpen"),Vt(H)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(M===void 0||!n.timeContainer.contains(M.relatedTarget))&&r.setTimeout(()=>n.hourElement.select(),50)}function xn(M){return H=>{let q=n.config[`_${M}Date`]=n.parseDate(H,n.config.dateFormat),ie=n.config[`_${M==="min"?"max":"min"}Date`];q!==void 0&&(n[M==="min"?"minDateHasTime":"maxDateHasTime"]=q.getHours()>0||q.getMinutes()>0||q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(ye=>Wt(ye)),!n.selectedDates.length&&M==="min"&&h(q),de()),n.daysContainer&&(Bt(),q!==void 0?n.currentYearElement[M]=q.getFullYear().toString():n.currentYearElement.removeAttribute(M),n.currentYearElement.disabled=!!ie&&q!==void 0&&ie.getFullYear()===q.getFullYear())}}function jn(){let M=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],H={...JSON.parse(JSON.stringify(e.dataset||{})),...t},q={};n.config.parseDate=H.parseDate,n.config.formatDate=H.formatDate,Object.defineProperty(n.config,"enable",{get:()=>n.config._enable,set:ce=>{n.config._enable=at(ce)}}),Object.defineProperty(n.config,"disable",{get:()=>n.config._disable,set:ce=>{n.config._disable=at(ce)}});let ie=H.mode==="time";if(!H.dateFormat&&(H.enableTime||ie)){let ce=Fn.defaultConfig.dateFormat||ka.dateFormat;q.dateFormat=H.noCalendar||ie?"H:i"+(H.enableSeconds?":S":""):ce+" H:i"+(H.enableSeconds?":S":"")}if(H.altInput&&(H.enableTime||ie)&&!H.altFormat){let ce=Fn.defaultConfig.altFormat||ka.altFormat;q.altFormat=H.noCalendar||ie?"h:i"+(H.enableSeconds?":S K":" K"):ce+` h:i${H.enableSeconds?":S":""} K`}Object.defineProperty(n.config,"minDate",{get:()=>n.config._minDate,set:xn("min")}),Object.defineProperty(n.config,"maxDate",{get:()=>n.config._maxDate,set:xn("max")});let ye=ce=>ae=>{n.config[ce==="min"?"_minTime":"_maxTime"]=n.parseDate(ae,"H:i:S")};Object.defineProperty(n.config,"minTime",{get:()=>n.config._minTime,set:ye("min")}),Object.defineProperty(n.config,"maxTime",{get:()=>n.config._maxTime,set:ye("max")}),H.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,q,H);for(let ce=0;ce
q,Ue=r.pageYOffset+Se.top+(Te?-q-2:H.offsetHeight+2);if(tr(n.calendarContainer,"arrowTop",!Te),tr(n.calendarContainer,"arrowBottom",Te),n.config.inline)return;let We=r.pageXOffset+Se.left,Ft=!1,Hn=!1;ae==="center"?(We-=(ie-Se.width)/2,Ft=!0):ae==="right"&&(We-=ie-Se.width,Hn=!0),tr(n.calendarContainer,"arrowLeft",!Ft&&!Hn),tr(n.calendarContainer,"arrowCenter",Ft),tr(n.calendarContainer,"arrowRight",Hn);let Ot=r.document.body.offsetWidth-(r.pageXOffset+Se.right),or=We+ie>r.document.body.offsetWidth,sr=Ot+ie>r.document.body.offsetWidth;if(tr(n.calendarContainer,"rightMost",or),!n.config.static)if(n.calendarContainer.style.top=`${Ue}px`,!or)n.calendarContainer.style.left=`${We}px`,n.calendarContainer.style.right="auto";else if(!sr)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=`${Ot}px`;else{let Yt=Sr();if(Yt===void 0)return;let Bn=r.document.body.offsetWidth,Er=Math.max(0,Bn/2-ie/2),Gr=".flatpickr-calendar.centerMost:before",tu=".flatpickr-calendar.centerMost:after",z=Yt.cssRules.length,k=`{left:${Se.left}px;right:auto;}`;tr(n.calendarContainer,"rightMost",!1),tr(n.calendarContainer,"centerMost",!0),Yt.insertRule(`${Gr},${tu}${k}`,z),n.calendarContainer.style.left=`${Er}px`,n.calendarContainer.style.right="auto"}}function Sr(){let M=null;for(let H=0;H
/g,`
+`).trim()}function Cd(e){let t=app.vault.getConfig("useTab");return e.trim().replace(/(?:\r\n|\n)/g,t?`
+ `:`
+ `)}function Sg(e,t){if(!t.data.blockId)return e;let r=e.split(/(?:\r\n|\n)/g);return r[0]+=" ^"+t.data.blockId,r.join(`
+`)}function qk(e){let t=e.split(/(?:\r\n|\n)/g);return t[0]=t[0].replace(/\s+\^([a-zA-Z0-9-]+)$/,""),t.join(`
+`)}function Eg(e){return e.trim().replace(/(?:\r\n|\n)(?: {4}|\t)/g,`
+`)}function co(e){e=Dg(e);let t=e.match(/^(.*?)\s*\((\d+)\)$/);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}function Gk(e){return E("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:E("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"})})}var $l=Ct(ln()),_d=require("obsidian");var Jk={delete:{description:R("Are you sure you want to delete this list and all its cards?"),confirm:R("Yes, delete list")},archive:{description:R("Are you sure you want to archive this list and all its cards?"),confirm:R("Yes, archive list")},"archive-items":{description:R("Are you sure you want to archive all cards in this list?"),confirm:R("Yes, archive cards")}};function Zk({action:e,cancel:t,onAction:r,lane:n}){return Ae(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:E("div",{className:$("action-confirm-wrapper"),children:[E("div",{className:$("action-confirm-text"),children:Jk[e].description}),E("div",{children:[E("button",{onClick:r,className:$("confirm-action-button"),children:Jk[e].confirm}),E("button",{onClick:t,className:$("cancel-action-button"),children:"Cancel"})]})]})}function Qk({setEditState:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=Ee(tt),[a,o]=Ne(null);return{settingsMenu:Re(()=>{let u=new Set,l=!1,c=!1;r.children.forEach(h=>{var y;let g=h.data.metadata.inlineMetadata;g&&g.forEach(v=>{v.key!=="repeat"&&(u.has(v.key)||u.add(v.key))}),!l&&h.data.metadata.date&&(l=!0),!c&&((y=h.data.metadata.tags)!=null&&y.length)&&(c=!0)});let d=new _d.Menu().addItem(h=>{h.setIcon("lucide-edit-3").setTitle(R("Edit list")).onClick(()=>e({x:0,y:0}))}).addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(h=>{h.setIcon("arrow-left-to-line").setTitle(R("Insert list before")).onClick(()=>i.insertLane(t,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(h=>{h.setIcon("arrow-right-to-line").setTitle(R("Insert list after")).onClick(()=>{let g=[...t];g[g.length-1]=g[g.length-1]+1,i.insertLane(g,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive list")).onClick(()=>o("archive"))}).addItem(h=>{h.setIcon("lucide-trash-2").setTitle(R("Delete list")).onClick(()=>o("delete"))}).addSeparator(),m=h=>{h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by card text")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===0;y.sort((D,I)=>v?I.data.title.localeCompare(D.data.title):D.data.title.localeCompare(I.data.title)),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===0?1:0}}}))})}),l&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by date")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===2?-1:1;y.sort((D,I)=>{let C=D.data.metadata.time||D.data.metadata.date,x=I.data.metadata.time||I.data.metadata.date;return C&&!x?-1*v:x&&!C?1*v:!C&&!x?0:(C.isBefore(x)?-1:1)*v}),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===2?3:2}}}))})}),c&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by tags")).onClick(()=>{let y=n.getSetting("tag-sort"),v=r.children.slice(),D=r.data.sorted===4;v.sort((I,C)=>{var B,G;let x=I.data.metadata.tags,O=C.data.metadata.tags;if(!(x!=null&&x.length)&&!(O!=null&&O.length))return 0;if(!(x!=null&&x.length))return 1;if(!(O!=null&&O.length))return-1;let A=(B=y==null?void 0:y.findIndex(J=>x.includes(J.tag)))!=null?B:-1,P=(G=y==null?void 0:y.findIndex(J=>O.includes(J.tag)))!=null?G:-1;return A>-1&&P<0?D?1:-1:P>-1&&A<0?D?-1:1:A>-1&&P>-1?D?P-A:A-P:D?fr(O.join(""),x.join("")):fr(x.join(""),O.join(""))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===4?5:4}}}))})}),u.size&&u.forEach(g=>{h.addItem(y=>{y.setIcon("arrow-down-up").setTitle(R("Sort by")+" "+No(g).toLocaleLowerCase()).onClick(()=>{let v=r.children.slice(),D=r.data.sorted===g+"-asc";v.sort((I,C)=>{var A,P;let x=(A=I.data.metadata.inlineMetadata)==null?void 0:A.find(B=>B.key===g),O=(P=C.data.metadata.inlineMetadata)==null?void 0:P.find(B=>B.key===g);return x===void 0&&O===void 0?0:x===void 0?1:O===void 0?-1:D?fr(In(O.value,n),In(x.value,n)):fr(In(x.value,n),In(O.value,n))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===g+"-asc"?g+"-desc":g+"-asc"}}}))})})})};return _d.Platform.isPhone?m(d):d.addItem(h=>{let g=h.setTitle(R("Sort by")).setIcon("arrow-down-up").setSubmenu();m(g)}),d},[n,o,t,r]),confirmAction:a,setConfirmAction:o}}var Xk=Ct(ln());function ex({lane:e,lanePath:t,editState:r}){let{boardModifiers:n}=Ee(tt);return kn(r)?E("div",{className:$("lane-setting-wrapper"),children:E("div",{className:$("checkbox-wrapper"),children:[E("div",{className:$("checkbox-label"),children:R("Mark cards in this list as complete")}),E("div",{onClick:()=>n.updateLane(t,(0,Xk.default)(e,{data:{$toggle:["shouldMarkItemsComplete"]}})),className:`checkbox-container ${e.data.shouldMarkItemsComplete?"is-enabled":""}`})]})}):null}function tx({maxItems:e,itemCount:t,editState:r}){let{stateManager:n}=Ee(tt);return n.getSetting("hide-card-count")||kn(r)?null:E("div",{className:Ge([$("lane-title-count"),{"wip-exceeded":e&&e{let ne=[...re];return ne.splice(Q,0,ne.splice(J,1)[0]),ne};return I.setViewState("list-collapse",void 0,te),(0,Ss.default)(A,{data:{settings:{"list-collapse":{$set:te(oe)}}}})}let P=u.slice(0,-1),B=un(x,P);return((G=B==null?void 0:B.data)==null?void 0:G.sorted)!==void 0?Du(A,P,{data:{$unset:["sorted"]}}):A})}let g=t.getKanbanView(a.scopeId,l.win),y=t.stateManagers.get(g.file),v=t.getKanbanView(o.scopeId,c.win),D=t.stateManagers.get(v.file);y.setState(I=>{let C=un(I,s),x;if(D.setState(O=>{if(h){let P=un(D.state,u);(D.getSetting("new-card-insertion-method")||"append")==="append"?u.push(P.children.length):u.push(0)}let A=[];if(C.type===ft.Item){let{next:P,replacement:B}=Au(y,I,s,D,O,u,C);x=B,A.push(P)}else A.push(C);if(C.type===ft.Lane){let P=v.getViewState("list-collapse"),B=g.getViewState("list-collapse")[s.last()],G=J=>{let Q=[...J];return Q.splice(u.last(),0,B),Q};return v.setViewState("list-collapse",void 0,G),(0,Ss.default)(Xr(O,u,A),{data:{settings:{"list-collapse":{$set:G(P)}}}})}else return Xr(O,u,A)}),C.type===ft.Lane){let O=g.getViewState("list-collapse"),A=P=>{let B=[...P];return B.splice(s.last(),1),B};return g.setViewState("list-collapse",void 0,A),(0,Ss.default)(mi(I,s),{data:{settings:{"list-collapse":{$set:A(O)}}}})}else return mi(I,s,x)})},[r]);if(n.length)return E(bs,{win:e,onDrop:i,children:[...n,E(Ds,{children:(a,o)=>{let[s,u]=Re(()=>{if(a.scopeId==="htmldnd")return[null,null];let l=a.getData(),c=t.getKanbanView(a.scopeId,l.win),d=t.stateManagers.get(c.file),m=un(d.state,a.getPath()),h=Td(c,d),g=c.file.path;return[m,{view:c,stateManager:d,boardModifiers:h,filePath:g}]},[a]);if((s==null?void 0:s.type)===ft.Lane){let l=(u==null?void 0:u.view.viewSettings[_t])||(u==null?void 0:u.stateManager.getSetting(_t)),c=(u==null?void 0:u.view.viewSettings["list-collapse"])||(u==null?void 0:u.stateManager.getSetting("list-collapse")),d=a.getPath().last();return E(tt.Provider,{value:u,children:E("div",{className:Ge([$("drag-container"),{[$("horizontal")]:l!=="list",[$("vertical")]:l==="list"}]),style:o,children:E(xg,{lane:s,laneIndex:d,isStatic:!0,isCollapsed:!!c[d],collapseDir:l==="list"?"vertical":"horizontal"})})})}return(s==null?void 0:s.type)===ft.Item?E(tt.Provider,{value:u,children:E("div",{className:$("drag-container"),style:o,children:E(gg,{item:s,itemIndex:0,isStatic:!0})})}):E("div",{})}})]})}var _C=Ct(ln()),ea=require("obsidian");var Wx=Ct(ln()),rt=require("obsidian");var fx=Ct(dx()),Id=Ct(ln()),Aa=require("obsidian");var Ad="@",Od="@@",Ul="body";function JN(e){let t=[];return Aa.Vault.recurseChildren(e.vault.getRoot(),r=>{r instanceof Aa.TFolder&&t.push({value:r.path,label:r.path,selected:!1,disabled:!1})}),t}function ZN(e,t){let r=[],n=t?e.vault.getAbstractFileByPath(t):null;return(!n||!(n instanceof Aa.TFolder))&&(n=e.vault.getRoot()),Aa.Vault.recurseChildren(n,i=>{i instanceof Aa.TFile&&r.push({value:i.path,label:i.basename,selected:!1,disabled:!1})}),r}function hx(e){let{templateFolder:t,templatesEnabled:r,templaterPlugin:n}=kh(e),i=ZN(e,t),a=JN(e),o="";return!r&&!n&&(o=R("Note: No template plugins are currently enabled.")),{templateFiles:i,vaultFolders:a,templateWarning:o}}function Mg({choices:e,key:t,warningText:r,local:n,placeHolderStr:i,manager:a}){return o=>{o.controlEl.createEl("select",{},s=>{s.win.setTimeout(()=>{let u=e,[l,c]=a.getSetting(t,n),d=!1;if(c){let g=u.findIndex(y=>y.value===c);if(g>-1){d=!0;let y=e[g];u=(0,Id.default)(u,{$splice:[[g,1]],$unshift:[(0,Id.default)(y,{placeholder:{$set:!0},value:{$set:""},label:{$apply:v=>`${v} (${R("default")})`}})]})}}d||(u=(0,Id.default)(u,{$unshift:[{placeholder:!0,value:"",label:i,selected:!1,disabled:!1}]}));let m=new fx.default(s,{placeholder:!0,position:"bottom",searchPlaceholderValue:R("Search..."),searchEnabled:u.length>10,choices:u}).setChoiceByValue("");l&&typeof l=="string"&&u.findIndex(g=>g.value===l)>-1&&m.setChoiceByValue(l);let h=g=>{let y=g.detail.value;y?a.applySettingsUpdate({[t]:{$set:y}}):a.applySettingsUpdate({$unset:[t]})};s.addEventListener("change",h),a.cleanupFns.push(()=>{m.destroy(),s.removeEventListener("change",h)})}),r&&o.descEl.createDiv({},u=>{u.createEl("strong",{text:r})})})}}var Hd=Ct(ln()),Hg=require("obsidian");var QN={grad:.9,turn:360,rad:360/(2*Math.PI)},Qi=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Nn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},jr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Sx=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mx=function(e){return{r:jr(e.r,0,255),g:jr(e.g,0,255),b:jr(e.b,0,255),a:jr(e.a)}},Tg=function(e){return{r:Nn(e.r),g:Nn(e.g),b:Nn(e.b),a:Nn(e.a,3)}},XN=/^#([0-9a-f]{3,8})$/i,Ld=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ex=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=Math.max(t,r,n),o=a-Math.min(t,r,n),s=o?a===t?(r-n)/o:a===r?2+(n-t)/o:4+(t-r)/o:0;return{h:60*(s<0?s+6:s),s:a?o/a*100:0,v:a/255*100,a:i}},kx=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),o=n*(1-r),s=n*(1-(t-a)*r),u=n*(1-(1-t+a)*r),l=a%6;return{r:255*[n,s,o,o,u,n][l],g:255*[u,n,n,s,o,o][l],b:255*[o,o,u,n,n,s][l],a:i}},px=function(e){return{h:Sx(e.h),s:jr(e.s,0,100),l:jr(e.l,0,100),a:jr(e.a)}},gx=function(e){return{h:Nn(e.h),s:Nn(e.s),l:Nn(e.l),a:Nn(e.a,3)}},yx=function(e){return kx((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},Wl=function(e){return{h:(t=Ex(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},eR=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tR=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nR=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rR=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vx={string:[[function(e){var t=XN.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Nn(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Nn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=nR.exec(e)||rR.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mx({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=eR.exec(e)||tR.exec(e);if(!t)return null;var r,n,i=px({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(QN[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return yx(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=i===void 0?1:i;return Qi(t)&&Qi(r)&&Qi(n)?mx({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,a=i===void 0?1:i;if(!Qi(t)||!Qi(r)||!Qi(n))return null;var o=px({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return yx(o)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,a=i===void 0?1:i;if(!Qi(t)||!Qi(r)||!Qi(n))return null;var o=function(s){return{h:Sx(s.h),s:jr(s.s,0,100),v:jr(s.v,0,100),a:jr(s.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return kx(o)},"hsv"]]},wx=function(e,t){for(var r=0;r