2022-01-05 20:52:55 +00:00
/ *
THIS IS A GENERATED / BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
* /
2022-08-23 16:25:36 +00:00
const requestAnimationFrame = ( cb ) => activeWindow . requestAnimationFrame ( cb ) ;
const cancelAnimationFrame = ( id ) => activeWindow . cancelAnimationFrame ( id ) ;
const setTimeout = ( ... args ) => activeWindow . setTimeout ( ... args ) ;
const clearTimeout = ( id ) => activeWindow . clearTimeout ( id ) ;
2022-01-05 20:52:55 +00:00
2023-06-29 22:00:30 +00:00
var JE = Object . create ; var ro = Object . defineProperty ; var GE = Object . getOwnPropertyDescriptor ; var QE = Object . getOwnPropertyNames ; var XE = Object . getPrototypeOf , ZE = Object . prototype . hasOwnProperty ; var Mf = e => ro ( e , "__esModule" , { value : ! 0 } ) ; var Cl = ( e , t ) => ( ) => ( e && ( t = e ( e = 0 ) ) , t ) ; var pt = ( e , t ) => ( ) => ( t || e ( ( t = { exports : { } } ) . exports , t ) , t . exports ) , qi = ( e , t ) => { Mf ( e ) ; for ( var r in t ) ro ( e , r , { get : t [ r ] , enumerable : ! 0 } ) } , ek = ( e , t , r ) => { if ( t && typeof t == "object" || typeof t == "function" ) for ( let n of QE ( t ) ) ! ZE . call ( e , n ) && n !== "default" && ro ( e , n , { get : ( ) => t [ n ] , enumerable : ! ( r = GE ( t , n ) ) || r . enumerable } ) ; return e } , me = e => ek ( Mf ( ro ( e != null ? JE ( XE ( e ) ) : { } , "default" , e && e . _ _esModule && "default" in e ? { get : ( ) => e . default , enumerable : ! 0 } : { value : e , enumerable : ! 0 } ) ) , e ) ; function Wn ( e , t ) { for ( var r in t ) e [ r ] = t [ r ] ; return e } function Nf ( e ) { var t = e . parentNode ; t && t . removeChild ( e ) } function h ( e , t , r ) { var n , i , a , o = { } ; for ( a in t ) a == "key" ? n = t [ a ] : a == "ref" ? i = t [ a ] : o [ a ] = t [ a ] ; if ( arguments . length > 2 && ( o . children = arguments . length > 3 ? Yi . call ( arguments , 2 ) : r ) , typeof e == "function" && e . defaultProps != null ) for ( a in e . defaultProps ) o [ a ] === void 0 && ( o [ a ] = e . defaultProps [ a ] ) ; return Gi ( e , o , n , i , null ) } function Gi ( e , t , r , n , i ) { var a = { type : e , props : t , key : r , ref : n , _ _k : null , _ _ : null , _ _b : 0 , _ _e : null , _ _d : void 0 , _ _c : null , _ _h : null , constructor : void 0 , _ _v : i ? ? ++ If } ; return i == null && fe . vnode != null && fe . vnode ( a ) , a } function ri ( ) { return { current : null } } function S ( e ) { return e . children } function ht ( e , t ) { this . props = e , this . context = t } function ii ( e , t ) { if ( t == null ) return e . _ _ ? ii ( e . _ _ , e . _ _ . _ _k . indexOf ( e ) + 1 ) : null ; for ( var r ; t < e . _ _k . length ; t ++ ) if ( ( r = e . _ _k [ t ] ) != null && r . _ _e != null ) return r . _ _e ; return typeof e . type == "function" ? ii ( e ) : null } function Of ( e ) { var t , r ; if ( ( e = e . _ _ ) != null && e . _ _c != null ) { for ( e . _ _e = e . _ _c . base = null , t = 0 ; t < e . _ _k . length ; t ++ ) if ( ( r = e . _ _k [ t ] ) != null && r . _ _e != null ) { e . _ _e = e . _ _c . base = r . _ _e ; break } return Of ( e ) } } function Tl ( e ) { ( ! e . _ _d && ( e . _ _d = ! 0 ) && Ji . push ( e ) && ! ao . _ _r ++ || Lf !== fe . debounceRendering ) && ( ( Lf = fe . debounceRendering ) || Af ) ( ao ) } function ao ( ) { for ( var e ; ao . _ _r = Ji . length ; ) e = Ji . sort ( function ( t , r ) { return t . _ _v . _ _b - r . _ _v . _ _b } ) , Ji = [ ] , e . some ( function ( t ) { var r , n , i , a , o , s ; t . _ _d && ( o = ( a = ( r = t ) . _ _v ) . _ _e , ( s = r . _ _P ) && ( n = [ ] , ( i = Wn ( { } , a ) ) . _ _v = a . _ _v + 1 , Dl ( s , a , i , r . _ _n , s . ownerSVGElement !== void 0 , a . _ _h != null ? [ o ] : null , n , o ? ? ii ( a ) , a . _ _h ) , Uf ( n , a ) , a . _ _e != o && Of ( a ) ) ) } ) } function Rf ( e , t , r , n , i , a , o , s , u , l ) { var c , d , f , p , g , y , b , x = n && n . _ _k || Ff , D = x . length ; for ( r . _ _k = [ ] , c = 0 ; c < t . length ; c ++ ) if ( ( p = r . _ _k [ c ] = ( p = t [ c ] ) == null || typeof p == "boolean" ? null : typeof p == "string" || typeof p == "number" || typeof p == "bigint" ? Gi ( null , p , null , null , p ) : Array . isArray ( p ) ? Gi ( S , { children : p } , null , null , null ) : p . _ _b > 0 ? Gi ( p . type , p . props , p . key , null , p . _ _v ) : p ) != null ) { if ( p . _ _ = r , p . _ _b = r . _ _b + 1 , ( f = x [ c ] ) === null || f && p . key == f . key && p . type === f . type ) x [ c ] = void 0 ; else for ( d = 0 ; d < D ; d ++ ) { if ( ( f = x [ d ] ) && p . key == f . key && p . type === f . type ) { x [ d ] = void 0 ; break } f = null } Dl ( e , p , f = f || io , i , a , o , s , u , l ) , g = p . _ _e , ( d = p . ref ) && f . ref != d && ( b || ( b = [ ] ) , f . ref && b . push ( f . ref , null , p ) , b . push ( d , p . _ _c || g , p ) ) , g != null ? ( y == null && ( y = g ) , typeof p . type == "function" && p . _ _k === f . _ _k ? p . _ _d = u = Hf ( p , u , e ) : u = Bf ( e , p , f , x , g , u ) , typeof r . type == "function" && ( r . _ _d = u ) ) : u && f . _ _e == u && u . parentNode != e && ( u = ii ( f ) ) } for ( r . _ _e = y , c = D ; c -- ; ) x [ c ] != null && ( typeof r . type == "function" && x [ c ] . _ _e != null && x [ c ] . _ _e == r . _ _d && ( r . _ _d = ii ( n , c + 1 ) ) , zf ( x [ c ] , x [ c ] ) ) ; if ( b ) for ( c = 0 ; c < b . length ; c ++ ) Wf ( b [ c ] , b [ ++ c ] , b [ ++ c ] ) } function Hf ( e , t , r ) { for ( var n , i = e . _ _k , a = 0 ; i && a < i . length ; a ++ ) ( n = i [ a ] ) && ( n . _ _ = e , t = typeof n . type == "function" ? Hf ( n , t , r ) : Bf ( r , n , n , i , n . _ _e , t ) ) ; return t } function wt ( e , t ) { return t = t || [ ] , e == null || typeof e == "boolean" || ( Array . isArray ( e ) ? e . some ( function ( r ) { wt ( r , t ) } ) : t . push ( e ) ) , t } function Bf ( e , t , r , n , i , a ) { var o , s , u ; if ( t . _ _d !== void 0 ) o = t . _ _d , t . _ _d = void 0 ; else if ( r == null || i != a || i . parentNode == null ) e : if ( a == null || a . parentNode !== e ) e . appendChild ( i ) , o = null ; else { for ( s = a , u = 0 ; ( s = s . nextSibling ) && u < n . length ; u += 2 ) if ( s == i ) break e ; e . insertBefore ( i , a ) , o = a } return o !== void 0 ? o : i . nextSibling } function rk ( e , t , r , n , i ) { var a ; for ( a in r ) a === "children" || a === "key" || a in t || oo ( e , a , null , r [ a ] , n ) ; for ( a in t ) i && typeof t [ a ] != "function" || a === "children" || a === "key" || a === "value" || a === "checked" || r [ a ] === t [ a ] || oo ( e , a , t [ a ] , r [ a ] , n ) } function Kf ( e , t , r ) { t [ 0 ] === "-" ? e . setProperty ( t , r ) : e [ t ] = r == null ? "" : ty
Search pattern : "`.concat(b,'" ' ) ) ; var D = this . _prepareSearchers ( b ) , C = D . tokenSearchers , L = D . fullSearcher , H = this . _search ( C , L ) , T = H . weights , K = H . results ; return this . _computeScore ( T , K ) , this . options . shouldSort && this . _sort ( K ) , x . limit && typeof x . limit == "number" && ( K = K . slice ( 0 , x . limit ) ) , this . _format ( K ) } } , { key : "_prepareSearchers" , value : function ( ) { var b = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : "" , x = [ ] ; if ( this . options . tokenize ) for ( var D = b . split ( this . options . tokenSeparator ) , C = 0 , L = D . length ; C < L ; C += 1 ) x . push ( new u ( D [ C ] , this . options ) ) ; return { tokenSearchers : x , fullSearcher : new u ( b , this . options ) } } } , { key : "_search" , value : function ( ) { var b = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : [ ] , x = arguments . length > 1 ? arguments [ 1 ] : void 0 , D = this . list , C = { } , L = [ ] ; if ( typeof D [ 0 ] == "string" ) { for ( var H = 0 , T = D . length ; H < T ; H += 1 ) this . _analyze ( { key : "" , value : D [ H ] , record : H , index : H } , { resultMap : C , results : L , tokenSearchers : b , fullSearcher : x } ) ; return { weights : null , results : L } } for ( var K = { } , z = 0 , V = D . length ; z < V ; z += 1 ) for ( var Z = D [ z ] , J = 0 , se = this . options . keys . length ; J < se ; J += 1 ) { var G = this . options . keys [ J ] ; if ( typeof G != "string" ) { if ( K [ G . name ] = { weight : 1 - G . weight || 1 } , G . weight <= 0 || G . weight > 1 ) throw new Error ( "Key weight has to be > 0 and <= 1" ) ; G = G . name } else K [ G ] = { weight : 1 } ; this . _analyze ( { key : G , value : this . options . getFn ( Z , G ) , record : Z , index : z } , { resultMap : C , results : L , tokenSearchers : b , fullSearcher : x } ) } return { weights : K , results : L } } } , { key : "_analyze" , value : function ( b , x ) { var D = b . key , C = b . arrayIndex , L = C === void 0 ? - 1 : C , H = b . value , T = b . record , K = b . index , z = x . tokenSearchers , V = z === void 0 ? [ ] : z , Z = x . fullSearcher , J = Z === void 0 ? [ ] : Z , se = x . resultMap , G = se === void 0 ? { } : se , Q = x . results , ie = Q === void 0 ? [ ] : Q ; if ( H != null ) { var he = ! 1 , pe = - 1 , ge = 0 ; if ( typeof H == "string" ) { this . _log ( `
Key : ` .concat(D===""?"-":D));var be=J.search(H);if(this._log('Full text: "'.concat(H,'", score: ').concat(be.score)),this.options.tokenize){for(var De=H.split(this.options.tokenSeparator),F=[],N=0;N<V.length;N+=1){var ut=V[N];this._log( `
Pattern : "`.concat(ut.pattern,'" '));for(var Ge=!1,W=0;W<De.length;W+=1){var j=De[W],q=ut.search(j),te={};q.isMatch?(te[j]=q.score,he=!0,Ge=!0,F.push(q.score)):(te[j]=1,this.options.matchAllTokens||F.push(1)),this._log(' Token : "'.concat(j,'" , score : ' ) . concat ( te [ j ] ) ) } Ge && ( ge += 1 ) } pe = F [ 0 ] ; for ( var we = F . length , xe = 1 ; xe < we ; xe += 1 ) pe += F [ xe ] ; pe /= we , this . _log ( "Token score average:" , pe ) } var Ve = be . score ; pe > - 1 && ( Ve = ( Ve + pe ) / 2 ) , this . _log ( "Score average:" , Ve ) ; var dt = ! this . options . tokenize || ! this . options . matchAllTokens || ge >= V . length ; if ( this . _log ( `
Check Matches : ` .concat(dt)),(he||be.isMatch)&&dt){var vt=G[K];vt?vt.output.push({key:D,arrayIndex:L,value:H,score:Ve,matchedIndices:be.matchedIndices}):(G[K]={item:T,output:[{key:D,arrayIndex:L,value:H,score:Ve,matchedIndices:be.matchedIndices}]},ie.push(G[K]))}}else if(c(H))for(var Ot=0,Kn=H.length;Ot<Kn;Ot+=1)this._analyze({key:D,arrayIndex:Ot,value:H[Ot],record:T,index:K},{resultMap:G,results:ie,tokenSearchers:V,fullSearcher:J})}}},{key:"_computeScore",value:function(b,x){this._log( `
2022-01-05 20:52:55 +00:00
Computing score :
2023-06-29 22:00:30 +00:00
` );for(var D=0,C=x.length;D<C;D+=1){for(var L=x[D].output,H=L.length,T=1,K=1,z=0;z<H;z+=1){var V=b?b[L[z].key].weight:1,Z=(V===1?L[z].score:L[z].score||.001)*V;V!==1?K=Math.min(K,Z):(L[z].nScore=Z,T*=Z)}x[D].score=K===1?T:K,this._log(x[D])}}},{key:"_sort",value:function(b){this._log( `
2022-01-05 20:52:55 +00:00
2023-06-29 22:00:30 +00:00
Sorting ... . ` ),b.sort(this.options.sortFn)}},{key:"_format",value:function(b){var x=[];if(this.options.verbose){var D=[];this._log( `
2022-01-05 20:52:55 +00:00
Output :
2023-06-29 22:00:30 +00:00
` ,JSON.stringify(b,function(Z,J){if(o(J)==="object"&&J!==null){if(D.indexOf(J)!==-1)return;D.push(J)}return J})),D=null}var C=[];this.options.includeMatches&&C.push(function(Z,J){var se=Z.output;J.matches=[];for(var G=0,Q=se.length;G<Q;G+=1){var ie=se[G];if(ie.matchedIndices.length!==0){var he={indices:ie.matchedIndices,value:ie.value};ie.key&&(he.key=ie.key),ie.hasOwnProperty("arrayIndex")&&ie.arrayIndex>-1&&(he.arrayIndex=ie.arrayIndex),J.matches.push(he)}}}),this.options.includeScore&&C.push(function(Z,J){J.score=Z.score});for(var L=0,H=b.length;L<H;L+=1){var T=b[L];if(this.options.id&&(T.item=this.options.getFn(T.item,this.options.id)[0]),C.length){for(var K={item:T.item},z=0,V=C.length;z<V;z+=1)C[z](T,K);x.push(K)}else x.push(T.item)}return x}},{key:"_log",value:function(){var b;this.options.verbose&&(b=console).log.apply(b,arguments)}}])&&s(p.prototype,g),y&&s(p,y),f}();n.exports=d},function(n,i,a){function o(d,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(y,b){var x=b.location,D=x===void 0?0:x,C=b.distance,L=C===void 0?100:C,H=b.threshold,T=H===void 0?.6:H,K=b.maxPatternLength,z=K===void 0?32:K,V=b.isCaseSensitive,Z=V!==void 0&&V,J=b.tokenSeparator,se=J===void 0?/ +/g:J,G=b.findAllMatches,Q=G!==void 0&&G,ie=b.minMatchCharLength,he=ie===void 0?1:ie;(function(pe,ge){if(!(pe instanceof ge))throw new TypeError("Cannot call a class as a function")})(this,d),this.options={location:D,distance:L,threshold:T,maxPatternLength:z,isCaseSensitive:Z,tokenSeparator:se,findAllMatches:Q,minMatchCharLength:he},this.pattern=this.options.isCaseSensitive?y:y.toLowerCase(),this.pattern.length<=z&&(this.patternAlphabet=l(this.pattern))}var f,p,g;return f=d,(p=[{key:"search",value:function(y){if(this.options.isCaseSensitive||(y=y.toLowerCase()),this.pattern===y)return{isMatch:!0,score:0,matchedIndices:[[0,y.length-1]]};var b=this.options,x=b.maxPatternLength,D=b.tokenSeparator;if(this.pattern.length>x)return s(y,this.pattern,D);var C=this.options,L=C.location,H=C.distance,T=C.threshold,K=C.findAllMatches,z=C.minMatchCharLength;return u(y,this.pattern,this.patternAlphabet,{location:L,distance:H,threshold:T,findAllMatches:K,minMatchCharLength:z})}}])&&o(f.prototype,p),g&&o(f,g),d}();n.exports=c},function(n,i){var a=/[ \- \[ \] \/ \{ \} \( \) \* \+ \? \. \\ \^ \$ \| ]/g;n.exports=function(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,l=new RegExp(s.replace(a," \\ $ &").replace(u,"|")),c=o.match(l),d=!!c,f=[];if(d)for(var p=0,g=c.length;p<g;p+=1){var y=c[p];f.push([o.indexOf(y),y.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:f}}},function(n,i,a){var o=a(5),s=a(6);n.exports=function(u,l,c,d){for(var f=d.location,p=f===void 0?0:f,g=d.distance,y=g===void 0?100:g,b=d.threshold,x=b===void 0?.6:b,D=d.findAllMatches,C=D!==void 0&&D,L=d.minMatchCharLength,H=L===void 0?1:L,T=p,K=u.length,z=x,V=u.indexOf(l,T),Z=l.length,J=[],se=0;se<K;se+=1)J[se]=0;if(V!==-1){var G=o(l,{errors:0,currentLocation:V,expectedLocation:T,distance:y});if(z=Math.min(G,z),(V=u.lastIndexOf(l,T+Z))!==-1){var Q=o(l,{errors:0,currentLocation:V,expectedLocation:T,distance:y});z=Math.min(Q,z)}}V=-1;for(var ie=[],he=1,pe=Z+K,ge=1<<Z-1,be=0;be<Z;be+=1){for(var De=0,F=pe;De<F;)o(l,{errors:be,currentLocation:T+F,expectedLocation:T,distance:y})<=z?De=F:pe=F,F=Math.floor((pe-De)/2+De);pe=F;var N=Math.max(1,T-F+1),ut=C?K:Math.min(T+F,K)+Z,Ge=Array(ut+2);Ge[ut+1]=(1<<be)-1;for(var W=ut;W>=N;W-=1){var j=W-1,q=c[u.charAt(j)];if(q&&(J[j]=1),Ge[W]=(Ge[W+1]<<1|1)&q,be!==0&&(Ge[W]|=(ie[W+1]|ie[W])<<1|1|ie[W+1]),Ge[W]&ge&&(he=o(l,{errors:be,currentLocation:j,expectedLocation:T,distance:y}))<=z){if(z=he,(V=j)<=T)break;N=Math.max(1,2*T-V)}}if(o(l,{errors:be+1,currentLocation:T,expectedLocation:T,distance:y})>z)break;ie=Ge}return{isMatch:V>=0,score:he===0?.001:he,matchedIndices:s(J,H)}}},function(n,i){n.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d=o.expectedLocation,f=d===void 0?0:d,
2022-01-05 20:52:55 +00:00
< span class = 'flatpickr-weekday' >
2022-08-23 16:25:36 +00:00
$ { M . join ( "</span><span class='flatpickr-weekday'>" ) }
2022-01-05 20:52:55 +00:00
< / s p a n >
2023-06-29 22:00:30 +00:00
` }function F(){n.calendarContainer.classList.add("hasWeeks");let _=je(r.document,"div","flatpickr-weekwrapper");_.appendChild(je(r.document,"span","flatpickr-weekday",n.l10n.weekAbbreviation));let M=je(r.document,"div","flatpickr-weeks");return _.appendChild(M),{weekWrapper:_,weekNumbers:M}}function N(_,M=!0){let $ =M?_:_-n.currentMonth; $ <0&&n._hidePrevMonthArrow===!0|| $ >0&&n._hideNextMonthArrow===!0||(n.currentMonth+= $ ,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Ue("onYearChange"),Q()),G(),Ue("onMonthChange"),Mt())}function ut(_=!0,M=!0){if(n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,M===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){let{hours: $ ,minutes:ee,seconds:le}=rs(n.config);g( $ ,ee,le)}n.redraw(),_&&Ue("onChange")}function Ge(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),Ue("onClose")}function W(){n.config!==void 0&&Ue("onDestroy");for(let _=n._handlers.length;_--;)n._handlers[_].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){let _=n.calendarContainer.parentNode;if(_.lastChild&&_.removeChild(_.lastChild),_.parentNode){for(;_.firstChild;)_.parentNode.insertBefore(_.firstChild,_);_.parentNode.removeChild(_)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(_=>{try{delete n[_]}catch(M){}})}function j(_){return n.calendarContainer.contains(_)}function q(_){if(n.isOpen&&!n.config.inline){let M=rn(_), $ =j(M),le=!(M===n.input||M===n.altInput||n.element.contains(M)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)))&&! $ &&!j(_.relatedTarget),re=!n.config.ignoredFocusElements.some(ve=>ve.contains(M));le&&re&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function te(_){if(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())return;let M=_, $ =n.currentYear!==M;n.currentYear=M||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)), $ &&(n.redraw(),Ue("onYearChange"),Q())}function we(_,M=!0){var re;let $ =n.parseDate(_,void 0,M);if(n.config.minDate&& $ &&nn( $ ,n.config.minDate,M!==void 0?M:!n.minDateHasTime)<0||n.config.maxDate&& $ &&nn( $ ,n.config.maxDate,M!==void 0?M:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if( $ ===void 0)return!1;let ee=!!n.config.enable,le=(re=n.config.enable)!=null?re:n.co
` );Lt(u,l)}}catch(s){console.error(s),t.setError(s)}}m();var dd=me(require("obsidian"));m();m();var gv={};m();var vv={};m();var yv={};m();var bv={"Open as kanban board":" \x D6ffne als Kanban-Board","Create new board":"Erstelle ein neues Board","Archive completed cards in active board":"Archiviere fertiggestellte Karten im aktiven Board","Error: current file is not a Kanban board":"Fehler: Momentan ge \x F6ffnete Datei ist kein Kanban-Board","Convert empty note to Kanban":"Konvertiere leere Notiz in ein Kanban-Board","Error: cannot create Kanban, the current note is not empty":"Fehler: Kanban konnte nicht erstellt werden, momentan ge \x F6ffnete Datei ist nicht leer","New kanban board":"Neues Kanban-Board","Untitled Kanban":"Unbenanntes Kanban","Toggle between Kanban and markdown mode":"Wechsle zwischen Kanban und Markdown Modus","Open as markdown":" \x D6ffne als Markdown","Open board settings":" \x D6ffne Board-Einstellungen","Archive completed cards":"Archiviere fertiggestellte Karten","Something went wrong":"Etwas ist schief gelaufen","You may wish to open as markdown and inspect or edit the file.":"Du kannst die Datei im Markdown Modus \x F6ffnen und \x FCberpr \x FCfen oder bearbeiten.","Are you sure you want to archive all completed cards on this board?":"Bist du dir sicher, dass du alle fertiggestellten Karten des Boards archivieren m \x F6chtest?",Complete:"Fertiggestellt",Archive:"Archiv","Invalid Kanban file: problems parsing frontmatter":"Fehlerhafte Kanban Datei: Probleme beim Parsen des Frontmatters","I don't know how to interpret this line:":"Ich wei \x DF nicht, wie ich diese Zeile interpretieren soll:",Untitled:"Unbenannt","Note: No template plugins are currently enabled.":"Beachte: Keine Template-Plugins sind derzeit aktiviert.",default:"Standard","Search...":"Suche...","These settings will take precedence over the default Kanban board settings.":"Diese Einstellung wird Vorrang vor der standard Kanban-Board Einstellung haben. ","Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.":"Stelle standard Kanban-Board Einstellungen ein. Einstellungen k \x F6nnen auf einer Board-f \x FCr-Board Basis \x FCberschrieben werden.","Note template":"Notiz Vorlage","This template will be used when creating new notes from Kanban cards.":"Diese Vorlage wird beim Erstellen neuer Notizen aus Kanban-Karten verwendet.","No template":"Keine Vorlage","Note folder":"Notiz Ordner","Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.":"Notizen, welche aus einer Kanban-Karte erstellt wurden, werden in diesem Ordner platziert. Falls leer, werden die Einstellungen des Vaults verwendet.","Default folder":"Standard Ordner","Lane width":"Schienen Breite","Enter a number to set the lane width in pixels.":"Gebe ein Zahl ein, um die Schienen Breite in Pixeln einzustellen.","Maximum number of archived cards":"Maximale Anzahl archivierter Karten.","Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.":"Archivierte Karten k \x F6nnen im Markdown-Modus betrachtet werden. Diese Einstellung wird alte Karten l \x F6schen, sobald das Limit erreicht wird. Eine Einstellung von -1 setzt das Archiv auf eine unendliche Gr \x F6 \x DFe.","Display card checkbox":"Zeige Karten Checkbox","When toggled, a checkbox will be displayed with each card":"Wenn aktiviert, wird eine Checkbox mit jeder Karte angezeigt.","Reset to default":"Zur \x FCcksetzen","Date & Time":"Datum & Uhrzeit","Date trigger":"Datums Ausl \x F6ser","When this is typed, it will trigger the date selector":"Wenn dies eingegeben wird, dann wird die Datumsauswahl angezeigt","Time trigger":"Uhrzeit Ausl \x F6ser","When this is typed, it will trigger the time selector":"Wenn dies eingegeben wird, dann wird die Uhrzeitsauswahl angezeigt","Date format":"Format des Datums","This format will be used when saving dates in markdown.":"Dieses Format wird verwendet, wenn ein Datum in
2022-01-05 20:52:55 +00:00
2023-06-29 22:00:30 +00:00
` :" ";t.app.vault.cachedRead(i.item.file).then(c=>{let d= ` $ { c . slice ( 0 , i . item . block . end ) } $ { l } ^ $ { u } $ { c . slice ( i . item . block . end ) } ` ;t.app.vault.modify(i.item.file,d)}).catch(c=>{t.setError(c),console.error(c)}),o+=u}a.push(t.app.fileManager.generateMarkdownLink(i.item.file,t.file.path,o,i.item.alias));let s=!!t.app.vault.getConfig("useMarkdownLinks");return r&&!s?a[a.length-1]=a[a.length-1].slice(0,-2):!r&&!s&&a.push("]] "),a.join("")}}}m();var c_=/ \B #([^ \s ]*)? $ /;function uy(e,t){return{id:"tag",match:c_,index:1,search:(r,n)=>{n(r?[{item: ` < em > # $ { r } < /em>`,refIndex:-1},...t.search(r,{limit:50})]:e.slice(0,50).map((i,a)=>({item:i,refIndex:a})))},template:r=>r.item,replace:r=>`${r.item.replace(/ < \ / ? em > /g,"")} `}}m();m();var fy=me(Ma());m();m();var f_=/ \ $ & /g,p_=/ \ $ ( \ d ) / g , ed = class { constructor ( t , r , n ) { this . data = t ; this . term = r ; this . strategy = n } getReplacementData ( t ) { let r = this . strategy . replace ( this . data ) ; if ( r == null ) return null ; let n = "" ; Array . isArray ( r ) && ( n = r [ 1 ] , r = r [ 0 ] ) ; let i = this . strategy . match ( t ) ; if ( i == null || i . index == null ) return null ; let a = r . replace ( f _ , i [ 0 ] ) . replace ( p _ , ( o , s ) => i [ parseInt ( s ) ] ) ; return { start : i . index , end : i . index + i [ 0 ] . length , beforeCursor : a , afterCursor : n } } replace ( t , r ) { let n = this . getReplacementData ( t ) ; if ( n !== null ) return r = n . afterCursor + r , [ [ t . slice ( 0 , n . start ) , n . beforeCursor , t . slice ( n . end ) ] . join ( "" ) , r ] } render ( ) { return this . strategy . renderTemplate ( this . data , this . term ) } getStrategyId ( ) { return this . strategy . getId ( ) } } ; var h _ = 1 , td = class { constructor ( t ) { this . props = t ; this . cache = { } } destroy ( ) { return this . cache = { } , this } replace ( t ) { return this . props . replace ( t ) } execute ( t , r ) { var a ; let n = this . matchWithContext ( t ) ; if ( ! n ) return ! 1 ; let i = n [ ( a = this . props . index ) != null ? a : h _ ] ; return this . search ( i , o => { r ( o . map ( s => new ed ( s , i , this ) ) ) } , n ) , ! 0 } renderTemplate ( t , r ) { if ( this . props . template ) return this . props . template ( t , r ) ; if ( typeof t == "string" ) return t ; throw new Error ( ` Unexpected render data type: ${ typeof t } . Please implement template parameter by yourself ` ) } getId ( ) { return this . props . id || null } match ( t ) { return typeof this . props . match == "function" ? this . props . match ( t ) : t . match ( this . props . match ) } search ( t , r , n ) { this . props . cache ? this . searchWithCach ( t , r , n ) : this . props . search ( t , r , n ) } matchWithContext ( t ) { let r = this . context ( t ) ; return r === ! 1 ? null : this . match ( r === ! 0 ? t : r ) } context ( t ) { return this . props . context ? this . props . context ( t ) : ! 0 } searchWithCach ( t , r , n ) { this . cache [ t ] != null ? r ( this . cache [ t ] ) : this . props . search ( t , i => { this . cache [ t ] = i , r ( i ) } , n ) } } ; var nd = class extends fy . EventEmitter { constructor ( t ) { super ( ) ; this . handleQueryResult = t => { this . emit ( "hit" , { searchResults : t } ) } ; this . strategies = t . map ( r => new td ( r ) ) } destroy ( ) { return this . strategies . forEach ( t => t . destroy ( ) ) , this } run ( t ) { for ( let r of this . strategies ) if ( r . execute ( t , this . handleQueryResult ) ) return ; this . handleQueryResult ( [ ] ) } } ; m ( ) ; var py = me ( Ma ( ) ) ; m ( ) ; var m _ = typeof window != "undefined" && ! ! window . CustomEvent , Vt = ( e , t , r ) => { if ( m _ ) return new CustomEvent ( t , r ) ; let n = e . createEvent ( "CustomEvent" ) ; return n . initCustomEvent ( t , ! 1 , ( r == null ? void 0 : r . cancelable ) || ! 1 , ( r == null ? void 0 : r . detail ) || void 0 ) , n } ; var g _ = 10 , v _ = "auto" , y _ = "dropdown-menu textcomplete-dropdown" , hy = "textcomplete-item" , b _ = ` ${ hy } active ` , Ia = class extends py . EventEmitter { constructor ( t , r ) { super ( ) ; this . el = t ; this . option = r ; this . shown = ! 1 ; this . items = [ ] ; this . activeIndex = null } static create ( t ) { let r = t . parent || window . document . body , i = r . doc . createElement ( "ul" ) ; return i . className = t . className || y _ , Object . assign ( i . style , { display : "none" , position : "absolute" , zIndex : "1000" } , t . style ) , r == null || r . appendChild ( i ) , new Ia ( i , t ) } render ( t , r ) { let n = Vt ( this . el . doc , "render" , { cancelable : ! 0 } ) ; return this . emit ( "render" , n ) , n . defaultPrevented ? this : ( this . clear ( ) , t . length === 0 ? this . hide ( ) : ( this . items = t . slice ( 0 , this . option . maxCount || g _ ) . map ( ( i , a ) => { var o ; return new my ( this , a , i , ( ( o = this . option ) == null ? void 0 : o . item ) || { } ) } ) , this . setStrategyId ( t [ 0 ] ) . renderEdge ( t , "header" ) . renderItems ( ) . renderEdge ( t , "footer" ) . show ( ) . setOffset ( r ) . activate ( 0 ) , this . emit ( "rendered" , Vt ( this . el . doc , "rendered" ) ) , this ) ) } destroy ( ) { var t ; return this . clear ( ) , ( t = this . el . parentNode ) == null || t . removeChild ( this . el ) , this } select ( t ) { let r = { searchResult : t . searchResult } , n = Vt ( this . e
2022-08-23 16:25:36 +00:00
` ).map(r=>r[0]===">"?r: ` > $ { r } ` ).join( `
2022-09-18 14:03:25 +00:00
` )}function P_(e){return e.split( `
2022-10-14 21:23:40 +00:00
` ).map(r=>r[0]!==">"?r:r.replace(/^>+ \s */,"")).join( `
2023-06-29 22:00:30 +00:00
` )}var Aa=/^(?: \s * \d +[.)] \s +.*?(?:[ \r \n ]| $ ))+ $ /,ad=/^(?: \s * \d +[.)] \s + \[ \s + \] \s +.*?(?:[ \r \n ]| $ ))+ $ /,od=/^(?: \s * \d +[.)] \s + \[ [^ \] \s ]+ \] \s +.*?(?:[ \r \n ]| $ ))+ $ /;function F_(e){return e.match(/^ \s */)[0].length}function N_(e){return parseInt(e.match(/^ \s *( \d +)/)[1],10)}function O_(e){let t=[0],r=0;return e.split( `
2022-10-14 21:23:40 +00:00
` ).map(n=>{let i=F_(n);if(i>r?t.push(0):i<r&&t.pop(),r=i,Aa.test(n)){let a=N_(n);return t[t.length-1]=a,n}return t[t.length-1]=t[t.length-1]+1,n.replace(/^( \s *)/, ` $1$ { t [ t . length - 1 ] } . ` )}).join( `
2022-09-18 14:03:25 +00:00
` )}function R_(e){return e.split( `
2022-10-14 21:23:40 +00:00
` ).map(t=>Aa.test(t)?t.replace(/^( \s *) \d +[.)] \s +/," $ 1"):t).join( `
2023-06-29 22:00:30 +00:00
` )}var La=/^(?: \s *[-*+] \s +.*?(?:[ \r \n ]| $ ))+ $ /,sd=/^(?: \s *[-*+] \s + \[ \s + \] \s +.*?(?:[ \r \n ]| $ ))+ $ /,ld=/^(?: \s *[-*+] \s + \[ [^ \] \s ]+ \] \s +.*?(?:[ \r \n ]| $ ))+ $ /;function Iy(e){return e.split( `
2022-10-14 21:23:40 +00:00
` ).map(r=>La.test(r)?r:r.replace(/^( \s *)/," $ 1- ")).join( `
` )}function H_(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>sd.test(t)||ld.test(t)?t:t.replace(/^( \s *[-*+] \s +)/," $ 1[ ] ")).join( `
2022-10-14 21:23:40 +00:00
` )}function B_(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>ad.test(t)||od.test(t)?t:t.replace(/^( \s * \d +[.)] \s +)/," $ 1[ ] ")).join( `
2022-10-14 21:23:40 +00:00
` )}function K_(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>sd.test(t)?t:t.replace(/^( \s *[-*+] \s +) \[ [^ \] ] \] /," $ 1[ ]")).join( `
2022-10-14 21:23:40 +00:00
` )}function $ _(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>ad.test(t)?t:t.replace(/^( \s * \d +[.)] \s +) \[ [^ \] ]{1} \] /," $ 1[ ]")).join( `
2022-10-14 21:23:40 +00:00
` )}function V_(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>ld.test(t)?t:t.replace(/^( \s *[-*+] \s +) \[ \s \] /," $ 1[x]")).join( `
2023-03-29 16:30:35 +00:00
` )}function U_(e){return e.split( `
2023-06-29 22:00:30 +00:00
` ).map(t=>od.test(t)?t:t.replace(/^( \s * \d +[.)] \s +) \[ \s \] /," $ 1[x]")).join( `
2022-10-14 21:23:40 +00:00
` )}function W_(e){return e.split( `
` ).map(r=>La.test(r)?r.replace(/^( \s *)[-+*] \s +/," $ 1"):r).join( `
2023-06-29 22:00:30 +00:00
` )}var Ay={"editor:toggle-bold":e=>{Ai(e,_y,C_,"**")},"editor:toggle-code":e=>{Ai(e,Ty,D_," ` ")}," editor : toggle - italics ":e=>{Ai(e,Cy,T_," * ")}," editor : toggle - highlight ":e=>{Ai(e,Dy,M_," == ")}," editor : toggle - strikethrough ":e=>{Ai(e,My,I_," ~ ~ ")}," editor : toggle - blockquote ":e=>{ys(e,A_,L_,P_)}," editor : toggle - bullet - list ":e=>{ys(e,La,Iy,W_)}," editor : toggle - numbered - list ":e=>{ys(e,Aa,O_,R_)}," editor : toggle - checklist - status ":e=>{let t=On(e),r=t.selection.end===t.selection.start,n=Ii({text:t.text,selection:t.selection}),i=Pt(e,n),a=i.selectedText,o=La.test(a),s=Aa.test(a);!o&&!s?a=Iy(a):o?sd.test(a)?a=V_(a):ld.test(a)?a=K_(a):a=H_(a):ad.test(a)?a=U_(a):od.test(a)?a=$_(a):a=B_(a);let u=Lt(e,a);if(r){let l=a.length-i.selectedText.length;Pt(e,{start:t.selection.start+l,end:t.selection.end+l})}else Pt(e,{start:i.selection.start,end:u.selection.end})}},cd={" ( ":e=>cn(e," ( "," ) ",!1)," [ ":e=>cn(e," [ "," ] ",!1,!0)," { ":e=>cn(e," { "," } ",!1)," '":e=>cn(e,"' "," '",!1),' "':e=>cn(e,'" ',' "',!1)},ud={" * ":e=>cn(e," * "," * ",!1),_:e=>cn(e," _ "," _ ",!1)," ` ":e=>cn(e," ` "," ` ",!1),"=":e=>cn(e,"=","=",!0),"~":e=>cn(e,"~","~",!0), $ :e=>cn(e," $ "," $ ",!0),"%":e=>cn(e,"%","%",!0)},z_={"(":")","[":"]","{":"}","'":"'",'"':'"',"*":"*",_:"_"," ` ":" ` ","=":"=","~":"~", $ :" $ ","%":"%"};function Ly(e,t){let r=On(e);if(r.selection.end!==r.selection.start||r.selection.end===r.text.length)return!1;let n=r.text[r.selection.end-1],i=r.text[r.selection.end];if(t[n]&&i===z_[n])return Pt(e,{start:r.selection.end,end:r.selection.end+1}),Lt(e,""),!0}function Py(e){return Ly(e,cd)}function Fy(e){return Ly(e,ud)}function j_(e,t,r){let n=t?" ":" ".repeat(r);return e.split( `
2022-08-23 16:25:36 +00:00
` ).map(i=>n+i).join( `
2022-10-14 21:23:40 +00:00
` )}function q_(e,t,r){let n=t?" \\ t":" ".repeat(r),i=new RegExp( ` ^ $ { n } ` );return e.split( `
2022-01-05 20:52:55 +00:00
` ).map(a=>i.test(a)?a.replace(i,""):a).join( `
2023-06-29 22:00:30 +00:00
` )}function Ny(e,t,r,n){let i=On(e);if(t){let l=Ii(i),c=Pt(e,l);if(Lt(e,q_(c.selectedText,r,n)),i.selection.start===i.selection.end){let d=r?1:n;Pt(e,{start:i.selection.start-d,end:i.selection.end-d})}return!0}let a=Ii(i),o=Pt(e,a),u=j_(o.selectedText,r,n).replace(/^( \s *)( \d +)([.)] \s )/,(l,c,d,f)=> ` $ { c } 1 $ { f } ` );return Lt(e,u),!0}function Oy(e){let t=On(e);if(t.selection.start!==t.selection.end)return!1;let r=Ii(t),n=e.value.slice(r.start,t.selection.end),i=e.value.slice(r.start,r.end);if(/^( \s *[-*+] \s +(?: \[ [^ \] ] \] \s *)?) $ /.test(i))return Pt(e,{start:r.start-1,end:r.end}),Lt(e, `
2022-10-14 21:23:40 +00:00
` ),!0;if(/^( \s * \d [.)] \s +(?: \[ [^ \] ] \] \s *)?) $ /.test(i))return Pt(e,{start:r.start-1,end:r.end}),Lt(e, `
2023-06-29 22:00:30 +00:00
` ),!0;if(La.test(n)){let a=n.match(/^( \s *[-*+] \s +(?: \[ [^ \] ] \] \s *)?)/)[1];return Ta(e, `
$ { a . replace ( /^(\s*[-*+]\s+)\[[^\]]\]/ , "$1[ ]" ) } ` ),!0}if(Aa.test(n)){let s=n.match(/^( \s * \d +[.)] \s +(?: \[ [^ \] ] \] \s *)?)/)[1].replace(/^( \s * \d +[.)] \s +) \[ [^ \] ] \] /," $ 1[ ]").replace(/^( \s *)( \d +)/,(u,l,c)=> ` $ { l } $ { parseInt ( c ) + 1 } ` );return Ta(e, `
$ { s } ` ),!0}return!1}function Zn(e,t){return dd.Platform.isMobile?e.key==="Enter"&&!0:t.getSetting("new-line-trigger")==="enter"?e.key==="Enter"&&!(e.shiftKey||e.metaKey||e.ctrlKey):e.key==="Enter"&&e.shiftKey}var xr=P.forwardRef(function({onEnter:t,onEscape:r,onSubmit:n,...i},a){let{view:o,stateManager:s}=P.useContext(We),u=app.vault.getConfig("autoPairMarkdown"),l=app.vault.getConfig("autoPairBrackets"),c=app.vault.getConfig("useTab"),d=app.vault.getConfig("tabSize"),f=!!app.vault.getConfig("useMarkdownLinks"),p=Sy({isInputVisible:!0,onEnter:t,onEscape:r,onKeyDown:g=>{if(g.key==="Backspace"){let y=Py(g.target);return y||Fy(g.target)}if(Zn(g,s)){let y=Oy(g.target);if(y)return g.preventDefault(),y}if(g.key==="Tab")return g.preventDefault(),Ny(g.target,g.shiftKey,c,d);if(u){let y=ud[g.key];if(y&&y(g.target))return g.preventDefault(),!0}if(l){if(f&&g.key==="[")return!1;let y=cd[g.key];if(y&&y(g.target))return g.preventDefault(),!0}return!1}});return P.useEffect(()=>{let g=y=>{let b=Ay[y];b&&b(p.ref.current)};return o.emitter.on("hotkey",g),()=>{o.emitter.off("hotkey",g)}},[o]),h(S,null,h("div",{"data-replicated-value":i.value,className:B("grow-wrap")},h("textarea",{"data-ignore-drag":!0,rows:1,className:B("item-input"),...i,...p,ref:g=>{p.ref.current=g,a&&typeof a=="function"?a(g):a&&(a.current=g)}})),dd.Platform.isMobile&&h("button",{onPointerDown:n,className:B("item-submit-button")},A("Submit")))});m();var hd=me(Ry());m();var Sr=me(require("obsidian"));var Y_=["bmp","png","jpg","jpeg","gif","svg"],J_=["mp3","wav","m4a","3gp","flac","ogg","oga"],G_=["mp4","webm","ogv"],Q_=/ \u 00A0/g,X_=/[!"# $ %&()*+,.:;<=>?@^ ` { | } ~ /[\]\\]/g ; function Hy ( e ) { return e . replace ( X _ , " " ) . replace ( /\s+/g , " " ) . trim ( ) } function zr ( e ) { let r = e . replace ( Q _ , " " ) . normalize ( "NFC" ) . split ( /\|(.*)/ ) , n = r [ 0 ] . split ( /#(.*)/ ) ; return { root : n [ 0 ] , subpath : n [ 1 ] ? "#" + n [ 1 ] : "" , alias : r [ 1 ] || "" } } function Z _ ( e , t ) { if ( ! e || ! t ) return null ; let r = t . split ( "#" ) . filter ( l => ! ! l ) ; if ( ! r || r . length === 0 ) return null ; if ( r . length === 1 ) { let l = r [ 0 ] ; if ( l . startsWith ( "^" ) ) { let c = l . slice ( 1 ) . toLowerCase ( ) , d = e . blocks ; if ( d && d [ c ] ) { let f = d [ c ] ; return { type : "block" , block : f , start : f . position . start . offset , end : f . position . end . offset , startLine : f . position . start . line , endLine : f . position . end . line } } else return null } } let n = e . headings ; if ( ! n || n . length === 0 ) return null ; let i = 0 , a = 0 , o = 0 , s = null , u = null ; for ( ; a < n . length ; a ++ ) { let l = n [ a ] ; if ( s && l . level <= o ) { u = l ; break } ! s && l . level > o && Hy ( l . heading ) . toLowerCase ( ) === Hy ( r [ i ] ) . toLowerCase ( ) && ( i ++ , o = l . level , i === r . length && ( s = l ) ) } return s ? { type : "heading" , current : s , next : u , start : s . position . start . offset , end : u ? u . position . start . offset : null , startLine : s . position . start . line , endLine : u ? u . position . end . line : null } : null } function eC ( e ) { e . querySelectorAll ( ".task-list-item-checkbox" ) . forEach ( ( r , n ) => { r . dataset . checkboxIndex = n . toString ( ) } ) } function tC ( e , t ) { e . querySelectorAll ( ".internal-link" ) . forEach ( n => { let i = zr ( n . getAttr ( "href" ) ) ; t . app . metadataCache . getFirstLinkpathDest ( i . root , t . file . path ) || n . addClass ( "is-unresolved" ) } ) } function nC ( e , t , r ) { e . empty ( ) , e . createEl ( "img" , { attr : { src : r . app . vault . getResourcePath ( t ) } } , n => { e . hasAttribute ( "width" ) && n . setAttribute ( "width" , e . getAttribute ( "width" ) ) , e . hasAttribute ( "height" ) && n . setAttribute ( "height" , e . getAttribute ( "height" ) ) , e . hasAttribute ( "alt" ) && n . setAttribute ( "alt" , e . getAttribute ( "alt" ) ) } ) , e . addClasses ( [ "image-embed" , "is-loaded" ] ) } function By ( e , t , r ) { e . empty ( ) , e . createEl ( "audio" , { attr : { controls : "" , src : r . app . vault . getResourcePath ( t ) } } ) , e . addClasses ( [ "media-embed" , "is-loaded" ] ) } function rC ( e , t , r ) { e . empty ( ) , e . createEl ( "video" , { attr : { controls : "" , src : r . app . vault . getResourcePath ( t ) } } , n => { let i = ( ) => { n . removeEventListener ( "loadedmetadata" , i ) , n . videoWidth === 0 && n . videoHeight === 0 && ( e . empty ( ) , By ( e , t , r ) ) } ; n . addEventListener ( "loadedmetadata" , i ) } ) , e . addClasses ( [ "media-embed" , "is-loaded" ] ) } async function Ky ( e , t , r ) { let n = r . app . metadataCache . getFileCache ( e ) ; if ( ! n ) return null ; let i = await r . app . vault . cachedRead ( e ) ; if ( ! t . subpath ) return { markdown : i , boundary : null } ; let a = Z _ ( n , t . subpath ) ; if ( a ) return { markdown : i . substring ( a . start , a . end === null ? void 0 : a . end ) , boundary : a } ; if ( t . subpath ) return { markdown : ` ${ A ( " Unable t
` )[0].trim(),p=f.replace(dC," $ 1").replace(fC," $ 1").replace(pC," $ 1").replace(uC," ").trim(),g=i.getSetting("new-note-folder"),y=i.getSetting("new-note-template"),b=g?i.app.vault.getAbstractFileByPath(g):i.app.fileManager.getNewFileParent(i.file.path),x=await i.app.fileManager.createNewMarkdownFile(b,p),D=i.app.workspace.splitActiveLeaf();await D.openFile(x),i.app.workspace.setActiveLeaf(D,!1,!0),await Ip(i,y);let C=t.data.titleRaw.replace(f,i.app.fileManager.generateMarkdownLink(x,i.file.path));i.updateItemContent(t,C).then(L=>{n.updateItem(r,L)}).catch(L=>{i.setError(L),console.error(L)})})}).addItem(d=>{d.setIcon("lucide-link").setTitle(A("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText( ` $ { this . app . fileManager . generateMarkdownLink ( i . file , "" , "#^" + t . data . blockId ) } ` );else{let f=Ae(6);navigator.clipboard.writeText( ` $ { this . app . fileManager . generateMarkdownLink ( i . file , "" , "#^" + f ) } ` ),i.updateItemContent(t, ` $ { t . data . titleRaw } ^ $ { f } ` ).then(p=>{n.updateItem(r,p)}).catch(p=>{i.setError(p),console.error(p)})}})}).addSeparator(),/ \n /.test(t.data.titleRaw)&&c.addItem(d=>{d.setIcon("lucide-wrap-text").setTitle(A("Split card")).onClick(async()=>{let f=t.data.titleRaw.split(/[ \r \n ]+/g).map(g=>g.trim()),p=await Promise.all(f.map(g=>i.getNewItem(g)));n.splitItem(r,p)})}),c.addItem(d=>{d.setIcon("lucide-copy").setTitle(A("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("lucide-list-start").setTitle(A("Insert card before")).onClick(async()=>n.insertItems(r,[await i.getNewItem("",!1,!0)]))}).addItem(d=>{d.setIcon("lucide-list-end").setTitle(A("Insert card after")).onClick(async()=>{let f=[...r];f[f.length-1]=f[f.length-1]+1,n.insertItems(f,[await i.getNewItem("",!1,!0)])})}).addItem(d=>{d.setIcon("lucide-arrow-up").setTitle(A("Move to top")).onClick(()=>n.moveItemToTop(r))}).addItem(d=>{d.setIcon("lucide-arrow-down").setTitle(A("Move to bottom")).onClick(()=>n.moveItemToBottom(r))}).addItem(d=>{d.setIcon("lucide-archive").setTitle(A("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("lucide-trash-2").setTitle(A("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("lucide-calendar-check").setTitle(u?A("Edit date"):A("Add date")).onClick(()=>{var f;os(a.view,i,s,ss({stateManager:i,boardModifiers:n,item:t,hasDate:u,path:r}),(f=t.data.metadata.date)==null?void 0:f.toDate())})}),u&&(c.addItem(d=>{d.setIcon("lucide-x").setTitle(A("Remove date")).onClick(()=>{let f=i.getSetting("link-date-to-daily-note"),p=i.getSetting("date-trigger"),g=f?"(?: \\ [[^ \\ ]]+ \\ ] \\ ([^ \\ )]+ \\ )| \\ [ \\ [[^ \\ ]]+ \\ ] \\ ])":"{[^}]+}",y=new RegExp( ` ( ^ | \ \ s ) $ { Ln ( p ) } $ { g } ` ),b=t.data.titleRaw.replace(y,"").trim();i.updateItemContent(t,b).then(x=>{n.updateItem(r,x)}).catch(x=>{i.setError(x),console.error(x)})})}),c.addItem(d=>{d.setIcon("lucide-clock").setTitle(l?A("Edit time"):A("Add time")).onClick(()=>{ls(a.view,i,s,cs({stateManager:i,boardModifiers:n,item:t,hasTime:l,path:r}),t.data.metadata.time)})}),l&&c.addItem(d=>{d.setIcon("lucide-x").setTitle(A("Remove time")).onClick(()=>{let f=i.getSetting("time-trigger"),p=new RegExp( ` ( ^ | \ \ s ) $ { Ln ( f ) } { ( [ ^ } ] + ) } ` ),g=t.data.titleRaw.replace(p,"").trim();i.updateItemContent(t,g).then(y=>{n.updateItem(r,y)}).catch(y=>{i.setError(y),console.error(y)})})})),c.showAtPosition(s)}},[e,t,r,n,i])}m();var Jy=P.memo(function({isEditing:t,setIsEditing:r,showMenu:n}){let i=P.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return h("div",{...i,className:B("item-postfix-button-wrapper")},t?h("a",{"data-ignore-drag":!0,onPointerDown:a=>{a.preventDefault()},onClick:()=>{r(!1)},className: ` $ { B ( "item-postfix-button" ) } is - enabled clickable - icon ` ,"aria-label":A("Cancel")},h(_t,{name:"lucide-x"})):h("a",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className: ` $ { B ( "item-postfix-button" ) } clickable - icon ` ,"aria-label":A("More options")},h(_t,{name:"lucide-more-vertical"})))});m();var Ms=me(require("obsidian"));function Gy({item:e,isSettingsVisible:t,searchQuery:r}){return t||!e.data.metadata.fileMetadata?null:h("div",{className:B("item-met
2022-08-23 16:25:36 +00:00
Available method signatures are :
animateScrollTo ( y : number , options )
animateScrollTo ( [ x : number | null , y : number | null ] , options )
2023-06-29 22:00:30 +00:00
animateScrollTo ( scrollToElement : Element , options ) ` ;r+=a.horizontalOffset,n+=a.verticalOffset;let d=c.getMaxHorizontalScroll(),f=c.getHorizontalScroll();r>d&&(r=d);let p=r-f,g=c.getMaxVerticalScroll(),y=c.getVerticalScroll();n>g&&(n=g);let b=n-y,x=Math.abs(Math.round(p/1e3*a.speed)),D=Math.abs(Math.round(b/1e3*a.speed)),C=x>D?x:D;return C<a.minDuration?C=a.minDuration:C>a.maxDuration&&(C=a.maxDuration),new Promise((L,H)=>{p===0&&b===0&&L(!0),er.remove(c.element,!0);let T,K=()=>{se(),cancelAnimationFrame(T),L(!1)};er.add(c.element,K);let z=ie=>ie.preventDefault(),V=a.cancelOnUserAction?K:z,Z=a.cancelOnUserAction?{passive:!0}:{passive:!1},J=["wheel","touchstart","keydown","mousedown"],se=()=>{J.forEach(ie=>{c.element.removeEventListener(ie,V,Z)})};J.forEach(ie=>{c.element.addEventListener(ie,V,Z)});let G=Date.now(),Q=()=>{var ie=Date.now()-G,he=ie/C;let pe=Math.round(f+p*a.easing(he)),ge=Math.round(y+b*a.easing(he));ie<C&&(pe!==r||ge!==n)?(c.scrollTo(pe,ge),T=requestAnimationFrame(Q)):(c.scrollTo(r,n),cancelAnimationFrame(T),se(),er.remove(c.element,!1),L(!0))};T=requestAnimationFrame(Q)})})}var As=yC;var Nb=me(Et());m();m();m();var bC="scroll-container",Ls=8,Ps=["top","right","bottom","left"],vd=class{constructor(t,r,n,i,a){this.scrollFrame=0;this.onScroll=()=>{this.activeScroll.size===0&&(this.scrollState=zl(this.scrollEl),this.handleEntityRegistration())};this.onDragEnd=()=>{this.activeScroll.clear()};this.handleBeginDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||(this.activeScroll.set(t,r),this.handleDragScroll())};this.handleUpdateDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||this.activeScroll.set(t,r)};this.handleEndDragScroll=({scrollEntitySide:t})=>{this.activeScroll.delete(t)};this.dndManager=t,this.instanceId=Ae(),this.scopeId=r,this.triggerTypes=n,this.scrollState=on,this.parent=i,this.activeScroll=new Map,this.pollForNodes(a)}pollForNodes(t){!t()||this.parent&&!this.parent.observerHandlers?this.dndManager.win.requestAnimationFrame(()=>this.pollForNodes(t)):this.initNodes(t())}initNodes(t){this.scrollEl=t,this.scrollEl.dataset.hitboxid=this.instanceId,this.scrollEl.dataset.scrollid=this.instanceId,this.top=this.createScrollEntity("top"),this.right=this.createScrollEntity("right"),this.bottom=this.createScrollEntity("bottom"),this.left=this.createScrollEntity("left"),this.bindScrollHandlers(),this.observerHandlers=new Map,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{var a;let i=(a=n.target.dataset)==null?void 0:a.hitboxid;if(i&&this.observerHandlers.has(i)){let o=this.observerHandlers.get(i);o&&o(n)}})},{root:t,threshold:.1}),this.scrollEl.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}),this.dndManager.emitter.on("scrollResize",this.onScroll),this.scrollEl.win.setTimeout(()=>{this.onScroll()}),this.dndManager.observeResize(this.scrollEl),this.parent?this.parent.registerObserverHandler(this.instanceId,this.scrollEl,r=>{r.isIntersecting?this.handleEntityRegistration():this.handleEntityUnregistration()}):this.handleEntityRegistration()}destroy(){var t;this.handleEntityUnregistration(),this.observer.disconnect(),this.unbindScrollHandlers(),this.scrollEl.removeEventListener("scroll",this.onScroll),this.dndManager.emitter.off("scrollResize",this.onScroll),(t=this.parent)==null||t.unregisterObserverHandler(this.instanceId,this.scrollEl),this.dndManager.unobserveResize(this.scrollEl)}handleEntityRegistration(){Ps.forEach(t=>{let r=Ze(this.scrollEl),n=this.getId(t),i=this.dndManager.scrollEntities.has(n),a=this.isDoneScrolling(t);!a&&!i?this.dndManager.registerScrollEntity(n,this[t],r):a&&i&&this.dndManager.unregisterScrollEntity(n,r)})}handleEntityUnregistration(){Ps.forEach(t=>{let r=Ze(this.scrollEl),n=this.getId(t);this.dndManager.unregisterScrollEntity(n,r)})}registerObserverHandler(t,r,n){this.observerHandlers.set(t,n),this.observer.observe(r)}unregisterObserverHandler(t,r){this.observerHandlers.delete(t),this.observer.unobserve(r)}bindScrollHandlers(){Ps.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.o
` ).trim()}function jr(e){e=Rs(e);let t=e.match(/^(.*?) \s * \( ( \d +) \) $ /);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}m();function Sb(e){return h("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},h("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}))}m();var xd=me(Et()),_b=me(require("obsidian"));var Cb={delete:{description:A("Are you sure you want to delete this list and all its cards?"),confirm:A("Yes, delete list")},archive:{description:A("Are you sure you want to archive this list and all its cards?"),confirm:A("Yes, archive list")},"archive-items":{description:A("Are you sure you want to archive all cards in this list?"),confirm:A("Yes, archive cards")}};function Tb({action:e,cancel:t,onAction:r,lane:n}){return P.useEffect(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:h("div",{className:B("action-confirm-wrapper")},h("div",{className:B("action-confirm-text")},Cb[e].description),h("div",null,h("button",{onClick:r,className:B("confirm-action-button")},Cb[e].confirm),h("button",{onClick:t,className:B("cancel-action-button")},"Cancel")))}function Db({setIsEditing:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=P.useContext(We),[a,o]=P.useState(null);return{settingsMenu:P.useMemo(()=>new _b.Menu().addItem(u=>{u.setIcon("lucide-edit-3").setTitle(A("Edit list")).onClick(()=>e(!0))}).addItem(u=>{u.setIcon("lucide-archive").setTitle(A("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(u=>{u.setIcon("lucide-move-vertical").setTitle(A("Sort by card text")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===Mn.TitleAsc;l.sort((d,f)=>c?f.data.titleSearch.localeCompare(d.data.titleSearch):d.data.titleSearch.localeCompare(f.data.titleSearch)),i.updateLane(t,(0,xd.default)(r,{children:{ $ set:l},data:{sorted:{ $ set:r.data.sorted===Mn.TitleAsc?Mn.TitleDsc:Mn.TitleAsc}}}))})}).addItem(u=>{u.setIcon("lucide-move-vertical").setTitle(A("Sort by date")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===Mn.DateAsc?-1:1;l.sort((d,f)=>{let p=d.data.metadata.time||d.data.metadata.date,g=f.data.metadata.time||f.data.metadata.date;return p&&!g?-1*c:g&&!p?1*c:!p&&!g?0:(p.isBefore(g)?-1:1)*c}),i.updateLane(t,(0,xd.default)(r,{children:{ $ set:l},data:{sorted:{ $ set:r.data.sorted===Mn.DateAsc?Mn.DateDsc:Mn.DateAsc}}}))})}).addSeparator().addItem(u=>{u.setIcon("corner-left-down").setTitle(A("Insert list before")).onClick(()=>i.insertLane(t,{...kr,id:Ae(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(u=>{u.setIcon("lucide-corner-right-down").setTitle(A("Insert list after")).onClick(()=>{let l=[...t];l[l.length-1]=l[l.length-1]+1,i.insertLane(l,{...kr,id:Ae(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(u=>{u.setIcon("lucide-archive").setTitle(A("Archive list")).onClick(()=>o("archive"))}).addItem(u=>{u.setIcon("lucide-trash-2").setTitle(A("Delete list")).onClick(()=>o("delete"))}),[n,o,t,r]),confirmAction:a,setConfirmAction:o}}m();var Mb=me(Et());function Ib({lane:e,lanePath:t}){let{boardModifiers:r}=P.useContext(We);return h("div",{className:B("lane-setting-wrapper")},h("div",{className:B("checkbox-wrapper")},h("div",{className:B("checkbox-label")},A("Mark cards in this list as complete")),h("div",{onClick:()=>r.updateLane(t,(0,Mb.default)(e,{data:{ $ toggle:["shouldMarkItemsComplete"]}})),className: ` checkbox - container $ { e . data . shouldMarkItemsComplete ? "is-enabled" : "" } ` })))}m();var Ab=me(require("obsidian"));function Lb({itemCount:e,maxItems:t,isEditing:r,setIsEditing:n,title:i,onChange:a}){let{stateManager:o}=P.useContext(We),s=P.useRef(),u=o.getSetting("hide-card-count"),l=p=>{Zn(p,o)||(p.preventDefault(),r&&n(!1))},c=()=>{r&&n(!1)},d=()=>{r&&n(!1)};P.useEffect(()=>{if(r&&s.current){let p=s.current;s.current.focus(),p.selectionStart=p.selectionEnd=p.value.length}},[r]);let f=[B("lane-title-count")];return t&&t<e&&f.push("wip-exceeded"),h(S,null,h("div",{className:B("lane-title")},r?h(
` );function jb(e){return["","","%% kanban:settings"," ` ` ` ",JSON.stringify(e)," ` ` ` ","%%"].join( `
` )}function qb(e,t,r){let n=e.innerText.trim();if((t==null?void 0:t.length)&&(n+=" "+t.join(" ")),r){let i=Object.keys(r).join(" "),a=Object.values(r).map(o=>Array.isArray(o.value)?o.value.join(" "):o.value.toString()).join(" ");n+=" "+i+" "+a}return n.toLocaleLowerCase()}function QC(e,t,r){var n,i,a;if(e.plugins.enabledPlugins.has("dataview")&&((a=(i=(n=e.plugins)==null?void 0:n.plugins)==null?void 0:i.dataview)==null?void 0:a.api))return e.plugins.plugins.dataview.api.page(t.path,r.path)}function Yb(e,t){if(!e)return null;if(e[t])return e[t];let r=t.split("."),n=e;for(let i of r)if(typeof n=="object"&&i in n)n=n[i];else{n=null;break}return n}function Dd(e,t){let r=e.getSetting("metadata-keys");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=QC(e.app,t,e.file);if(!n&&!i)return{};let a={},o={},s={},u=[],l=!1;return r.forEach(c=>{var p;if(s[c.metadataKey])return;if(s[c.metadataKey]=!0,c.metadataKey==="tags"){let g=(n==null?void 0:n.tags)||[];if(Array.isArray((p=n==null?void 0:n.frontmatter)==null?void 0:p.tags)&&(g=[].concat(g,n.frontmatter.tags.map(y=>({tag: ` # $ { y } ` })))),(g==null?void 0:g.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:g.map(y=>y.tag).filter(y=>o[y]?!1:(o[y]=!0,!0))},l=!0;return}let d=Yb(n==null?void 0:n.frontmatter,c.metadataKey),f=Yb(i,c.metadataKey);if(d)u.push(c.metadataKey),a[c.metadataKey]={...c,value:d},l=!0;else if(f){let g=i[c.metadataKey],y=Array.isArray(g)?g:g.values||g.val||g;if(y===g&&!Array.isArray(g)&&typeof y=="object")y={...g};else if(!Array.isArray(y)&&typeof y!="string"&&typeof y!="number")return;u.push(c.metadataKey),a[c.metadataKey]={...c,value:y},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function Jb(e,t){return!e&&t?!0:!["metadata-keys","date-trigger","time-trigger","link-date-to-daily-note","date-format","time-format","hide-date-in-title","hide-tags-in-title","hide-card-count","tag-colors","date-colors"].every(n=>e[n]===t[n])}m();function Gb({onNewLane:e,closeLaneForm:t}){let{boardModifiers:r,stateManager:n}=P.useContext(We),[i,a]=P.useState(!1),[o,s]=P.useState(""),u=P.useRef(),l=Fi(()=>{t()},{ignoreClass:B("ignore-click-outside")});P.useLayoutEffect(()=>{var d;(d=u.current)==null||d.focus()},[]);let c=()=>{r.addLane({...kr,id:Ae(),children:[],data:{...jr(o),shouldMarkItemsComplete:i}}),s(""),a(!1),e()};return h("div",{ref:l,className:B("lane-form-wrapper")},h("div",{className:B("lane-input-wrapper")},h(xr,{ref:u,className:B("lane-input"),onChange:d=>s(d.target.value),onEnter:d=>{Zn(d,n)||(d.preventDefault(),c())},onSubmit:()=>{c()},onEscape:t,value:o})),h("div",{className:B("checkbox-wrapper")},h("div",{className:B("checkbox-label")},A("Mark cards in this list as complete")),h("div",{onClick:()=>a(!i),className: ` checkbox - container $ { i ? "is-enabled" : "" } ` })),h("div",{className:B("lane-input-actions")},h("button",{className:B("lane-action-add"),onClick:c},A("Add list")),h("button",{className:B("lane-action-cancel"),onClick:t},A("Cancel"))))}var XC=[Je.Item,Je.Lane],ZC=[Je.Lane],Zb=({view:e,stateManager:t})=>{let r=t.useState(),n=Bb(),i=P.useRef(null),a=P.useRef(null),[o,s]=P.useState(""),[u,l]=P.useState(!1),[c,d]=P.useState(""),[f,p]=P.useState((r==null?void 0:r.children.length)===0),g=t.file.path,y=t.useSetting("max-archive-size"),b=t.useSetting("date-colors"),x=t.useSetting("tag-colors"),D=P.useCallback(()=>{(r==null?void 0:r.children.length)>0&&p(!1)},[r==null?void 0:r.children.length]);P.useEffect(()=>{(r==null?void 0:r.children.length)===0&&!t.hasError()&&p(!0)},[r==null?void 0:r.children.length,t]);let C=P.useCallback(()=>{var V;(V=i.current)==null||V.win.setTimeout(()=>{var J;let Z=(J=i.current)==null?void 0:J.getElementsByClassName(B("board"));(Z==null?void 0:Z.length)&&As([Z[0].scrollWidth,0],{elementToScroll:Z[0],speed:300,minDuration:150,easing:se=>se===1?1:1-Math.pow(2,-10*se)})})},[]);P.useEffect(()=>{let V=J=>{J==="editor:open-search"&&l(se=>!se)},Z=()=>{p(!0)};return e.emitter.on("hotkey",V),e.emitter.on("showLaneForm",Z),()=>{e.emitter.off("hotkey",V),e.emitter.off("showLaneForm",Z)}},[e]),P.useEffect(()=>{var
` )}var Wa=function(e){PT(t,e);function t(r,n,i,a,o){var s=this.constructor,u=e.call(this,Pw(r,{name:n,index:i,operation:a,tree:o}))||this;return u.name=n,u.index=i,u.operation=a,u.tree=o,Object.setPrototypeOf(u,s.prototype),u.message=Pw(r,{name:n,index:i,operation:a,tree:o}),u}return t}(Error);var ot=Wa,NT=Ft,Oi={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=rl(r,this.path);n&&(n=Ft(n));var i=Yr(r,{op:"remove",path:this.from}).removed;return Yr(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=rl(r,this.from);return Yr(r,{op:"add",path:this.path,value:Ft(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:za(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},OT={add:function(e,t,r){return tl(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return{newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:Oi.move,copy:Oi.copy,test:Oi.test,_get:Oi._get};function rl(e,t){if(t=="")return e;var r={op:"_get",path:t};return Yr(e,r),r.value}function Yr(e,t,r,n,i,a){if(r===void 0&&(r=!1),n===void 0&&(n=!0),i===void 0&&(i=!0),a===void 0&&(a=0),r&&(typeof r=="function"?r(t,0,e,t.path):al(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;if(t.op==="move"||t.op==="copy")return o.newDocument=rl(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=za(e,t.value),o.test===!1)throw new ot("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o.newDocument=e,o}else{if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(r)throw new ot("Operation ` op ` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return o}}else{n||(e=Ft(e));var s=t.path||"",u=s.split("/"),l=e,c=1,d=u.length,f=void 0,p=void 0,g=void 0;for(typeof r=="function"?g=r:g=al;;){if(p=u[c],p&&p.indexOf("~")!=-1&&(p=Ua(p)),i&&(p=="__proto__"||p=="prototype"&&c>0&&u[c-1]=="constructor"))throw new TypeError("JSON-Patch: modifying ` _ _proto _ _ ` or ` constructor / prototype ` prop is banned for security reasons, if this was on purpose, please set ` banPrototypeModifications ` flag false and pass it to this function. More info in fast-json-patch README");if(r&&f===void 0&&(l[p]===void 0?f=u.slice(0,c).join("/"):c==d-1&&(f=t.path),f!==void 0&&g(t,0,e,f)),c++,Array.isArray(l)){if(p==="-")p=l.length;else{if(r&&!tl(p))throw new ot("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);tl(p)&&(p=~~p)}if(c>=d){if(r&&t.op==="add"&&p>l.length)throw new ot("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var o=OT[t.op].call(t,l,p,e);if(o.test===!1)throw new ot("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(c>=d){var o=Oi[t.op].call(t,l,p,e);if(o.test===!1)throw new ot("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[p],r&&c<d&&(!l||typeof l!="object"))throw new ot("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function il(e,t,r,n,i){if(n===void 0&&(n=!0),i===void 0&&(i=!0),r&&!Array.isArray(t))throw new ot("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=Ft(e));for(var a=new Array(t.length),o=0,s=t.length;o<s;o++)a[o]=Yr(e,t[o],r,!0,i,o),e=a[o].newDocument;return a.newDocument=e,a}function RT(e,t,r){var n=Yr(e,t);if(n.test===!1)throw new ot("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function al(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new ot("Operation is n
` ,Nfr:" \u {1D511}",NoBreak:" \u 2060",NonBreakingSpace:" \x A0",Nopf:" \u 2115",Not:" \u 2AEC",NotCongruent:" \u 2262",NotCupCap:" \u 226D",NotDoubleVerticalBar:" \u 2226",NotElement:" \u 2209",NotEqual:" \u 2260",NotEqualTilde:" \u 2242 \u 0338",NotExists:" \u 2204",NotGreater:" \u 226F",NotGreaterEqual:" \u 2271",NotGreaterFullEqual:" \u 2267 \u 0338",NotGreaterGreater:" \u 226B \u 0338",NotGreaterLess:" \u 2279",NotGreaterSlantEqual:" \u 2A7E \u 0338",NotGreaterTilde:" \u 2275",NotHumpDownHump:" \u 224E \u 0338",NotHumpEqual:" \u 224F \u 0338",NotLeftTriangle:" \u 22EA",NotLeftTriangleBar:" \u 29CF \u 0338",NotLeftTriangleEqual:" \u 22EC",NotLess:" \u 226E",NotLessEqual:" \u 2270",NotLessGreater:" \u 2278",NotLessLess:" \u 226A \u 0338",NotLessSlantEqual:" \u 2A7D \u 0338",NotLessTilde:" \u 2274",NotNestedGreaterGreater:" \u 2AA2 \u 0338",NotNestedLessLess:" \u 2AA1 \u 0338",NotPrecedes:" \u 2280",NotPrecedesEqual:" \u 2AAF \u 0338",NotPrecedesSlantEqual:" \u 22E0",NotReverseElement:" \u 220C",NotRightTriangle:" \u 22EB",NotRightTriangleBar:" \u 29D0 \u 0338",NotRightTriangleEqual:" \u 22ED",NotSquareSubset:" \u 228F \u 0338",NotSquareSubsetEqual:" \u 22E2",NotSquareSuperset:" \u 2290 \u 0338",NotSquareSupersetEqual:" \u 22E3",NotSubset:" \u 2282 \u 20D2",NotSubsetEqual:" \u 2288",NotSucceeds:" \u 2281",NotSucceedsEqual:" \u 2AB0 \u 0338",NotSucceedsSlantEqual:" \u 22E1",NotSucceedsTilde:" \u 227F \u 0338",NotSuperset:" \u 2283 \u 20D2",NotSupersetEqual:" \u 2289",NotTilde:" \u 2241",NotTildeEqual:" \u 2244",NotTildeFullEqual:" \u 2247",NotTildeTilde:" \u 2249",NotVerticalBar:" \u 2224",Nscr:" \u {1D4A9}",Ntilde:" \x D1",Nu:" \u 039D",OElig:" \u 0152",Oacute:" \x D3",Ocirc:" \x D4",Ocy:" \u 041E",Odblac:" \u 0150",Ofr:" \u {1D512}",Ograve:" \x D2",Omacr:" \u 014C",Omega:" \u 03A9",Omicron:" \u 039F",Oopf:" \u {1D546}",OpenCurlyDoubleQuote:" \u 201C",OpenCurlyQuote:" \u 2018",Or:" \u 2A54",Oscr:" \u {1D4AA}",Oslash:" \x D8",Otilde:" \x D5",Otimes:" \u 2A37",Ouml:" \x D6",OverBar:" \u 203E",OverBrace:" \u 23DE",OverBracket:" \u 23B4",OverParenthesis:" \u 23DC",PartialD:" \u 2202",Pcy:" \u 041F",Pfr:" \u {1D513}",Phi:" \u 03A6",Pi:" \u 03A0",PlusMinus:" \x B1",Poincareplane:" \u 210C",Popf:" \u 2119",Pr:" \u 2ABB",Precedes:" \u 227A",PrecedesEqual:" \u 2AAF",PrecedesSlantEqual:" \u 227C",PrecedesTilde:" \u 227E",Prime:" \u 2033",Product:" \u 220F",Proportion:" \u 2237",Proportional:" \u 221D",Pscr:" \u {1D4AB}",Psi:" \u 03A8",QUOT:'"',Qfr:" \u {1D514}",Qopf:" \u 211A",Qscr:" \u {1D4AC}",RBarr:" \u 2910",REG:" \x AE",Racute:" \u 0154",Rang:" \u 27EB",Rarr:" \u 21A0",Rarrtl:" \u 2916",Rcaron:" \u 0158",Rcedil:" \u 0156",Rcy:" \u 0420",Re:" \u 211C",ReverseElement:" \u 220B",ReverseEquilibrium:" \u 21CB",ReverseUpEquilibrium:" \u 296F",Rfr:" \u 211C",Rho:" \u 03A1",RightAngleBracket:" \u 27E9",RightArrow:" \u 2192",RightArrowBar:" \u 21E5",RightArrowLeftArrow:" \u 21C4",RightCeiling:" \u 2309",RightDoubleBracket:" \u 27E7",RightDownTeeVector:" \u 295D",RightDownVector:" \u 21C2",RightDownVectorBar:" \u 2955",RightFloor:" \u 230B",RightTee:" \u 22A2",RightTeeArrow:" \u 21A6",RightTeeVector:" \u 295B",RightTriangle:" \u 22B3",RightTriangleBar:" \u 29D0",RightTriangleEqual:" \u 22B5",RightUpDownVector:" \u 294F",RightUpTeeVector:" \u 295C",RightUpVector:" \u 21BE",RightUpVectorBar:" \u 2954",RightVector:" \u 21C0",RightVectorBar:" \u 2953",Rightarrow:" \u 21D2",Ropf:" \u 211D",RoundImplies:" \u 2970",Rrightarrow:" \u 21DB",Rscr:" \u 211B",Rsh:" \u 21B1",RuleDelayed:" \u 29F4",SHCHcy:" \u 0429",SHcy:" \u 0428",SOFTcy:" \u 042C",Sacute:" \u 015A",Sc:" \u 2ABC",Scaron:" \u 0160",Scedil:" \u 015E",Scirc:" \u 015C",Scy:" \u 0421",Sfr:" \u {1D516}",ShortDownArrow:" \u 2193",ShortLeftArrow:" \u 2190",ShortRightArrow:" \u 2192",ShortUpArrow:" \u 2191",Sigma:" \u 03A3",SmallCircle:" \u 2218",Sopf:" \u {1D54A}",Sqrt:" \u 221A",Square:" \u 25A1",SquareIntersection:" \u 2293",SquareSubset:" \u 228F",SquareSubsetEqual:" \u 2291",SquareSuperset:" \u 2290",SquareSupersetEqual:" \u 2292",SquareUnion:" \u 2294",Sscr:" \u {1D4AE}",Star:" \u 22C6",Sub:" \u 22D0",Subset:" \u 22D0",SubsetEqual:" \u 2286",Succeeds:" \u 227B",SucceedsEqual:" \u 2AB0",SucceedsSlantEqual:" \u 227D",SucceedsTilde:" \u 227F",SuchThat:" \u 220B",Sum:" \u 2211",Sup:" \u 22D1",Superset:" \u 2283",SupersetEqual:" \u 2287",Supset:" \u 22D1",THORN:" \x DE",TRADE:" \u 2122",TSHcy:" \u 040B",TScy:" \u 0426",Tab:" ",Tau:" \u 03A4",Tcaron:" \u 0164",Tcedil:" \u 0162",Tcy:" \u 0422",Tfr:" \u {1D517}",T
2022-01-05 20:52:55 +00:00
` ;break}case-3:{o= ` \ r
2023-06-29 22:00:30 +00:00
` ;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}var gf={};qi(gf,{attentionMarkers:()=>h1,contentInitial:()=>l1,disable:()=>m1,document:()=>s1,flow:()=>u1,flowInitial:()=>c1,insideSpan:()=>p1,string:()=>d1,text:()=>f1});m();var s1={[42]:Ut,[43]:Ut,[45]:Ut,[48]:Ut,[49]:Ut,[50]:Ut,[51]:Ut,[52]:Ut,[53]:Ut,[54]:Ut,[55]:Ut,[56]:Ut,[57]:Ut,[62]:ll},l1={[91]:lf},c1={[-2]:Qa,[-1]:Qa,[32]:Qa},u1={[35]:uf,[42]:Qr,[45]:[gl,Qr],[60]:ff,[61]:gl,[95]:Qr,[96]:dl,[126]:dl},d1={[38]:ul,[92]:cl},f1={[-5]:Xa,[-4]:Xa,[-3]:Xa,[33]:hf,[38]:ul,[42]:Ga,[60]:[rf,pf],[91]:mf,[92]:[cf,cl],[93]:Gr,[95]:Ga,[96]:of},p1={null:[Ga,lE]},h1={null:[42,95]},m1={null:[]};function hE(e={}){let t=Gw([gf].concat(e.extensions||[])),r={defined:[],lazy:{},constructs:t,content:n(nE),document:n(rE),flow:n(sE),string:n(cE),text:n(uE)};return r;function n(i){return a;function a(o){return pE(r,i,o)}}}m();var mE=/[ \0 \t \n \r ]/g;function gE(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let u=[],l,c,d,f,p;for(a=t+a.toString(o),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(mE.lastIndex=d,l=mE.exec(a),f=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(f),!l){t=a.slice(d);break}if(p===10&&d===f&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),d<f&&(u.push(a.slice(d,f)),e+=f-d),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}m();function vE(e){for(;!fl(e););return e}m();function vl(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)==65535||(r&65535)==65534||r>1114111?" \u FFFD":String.fromCharCode(r)}m();var g1=/ \\ ([!-/:-@[- ` { - ~ ] ) | & ( # ( ? : \ d { 1 , 7 } | x [ \ da - f ] { 1 , 6 } ) | [ \ da - z ] { 1 , 31 } ) ; / g i ; f u n c t i o n y E ( e ) { r e t u r n e . r e p l a c e ( g 1 , v 1 ) } f u n c t i o n v 1 ( e , t , r ) { i f ( t ) r e t u r n t ; i f ( r . c h a r C o d e A t ( 0 ) = = = 3 5 ) { l e t i = r . c h a r C o d e A t ( 1 ) , a = i = = = 1 2 0 | | i = = = 8 8 ; r e t u r n v l ( r . s l i c e ( a ? 2 : 1 ) , a ? 1 6 : 1 0 ) } r e t u r n H i ( r ) | | e } m ( ) ; f u n c t i o n Z a ( e ) { r e t u r n ! e | | t y p e o f e ! = " o b j e c t " ? " " : " p o s i t i o n " i n e | | " t y p e " i n e ? b E ( e . p o s i t i o n ) : " s t a r t " i n e | | " e n d " i n e ? b E ( e ) : " l i n e " i n e | | " c o l u m n " i n e ? v f ( e ) : " " } f u n c t i o n v f ( e ) { r e t u r n w E ( e & & e . l i n e ) + " : " + w E ( e & & e . c o l u m n ) } f u n c t i o n b E ( e ) { r e t u r n v f ( e & & e . s t a r t ) + " - " + v f ( e & & e . e n d ) } f u n c t i o n w E ( e ) { r e t u r n e & & t y p e o f e = = " n u m b e r " ? e : 1 } v a r y f = { } . h a s O w n P r o p e r t y , y l = f u n c t i o n ( e , t , r ) { r e t u r n t y p e o f t ! = " s t r i n g " & & ( r = t , t = v o i d 0 ) , y 1 ( r ) ( v E ( h E ( r ) . d o c u m e n t ( ) . w r i t e ( g E ( ) ( e , t , ! 0 ) ) ) ) } ; f u n c t i o n y 1 ( e = { } ) { l e t t = E E ( { t r a n s f o r m s : [ ] , c a n C o n t a i n E o l s : [ " e m p h a s i s " , " f r a g m e n t " , " h e a d i n g " , " p a r a g r a p h " , " s t r o n g " ] , e n t e r : { a u t o l i n k : u ( Z r ) , a u t o l i n k P r o t o c o l : s e , a u t o l i n k E m a i l : s e , a t x H e a d i n g : u ( V n ) , b l o c k Q u o t e : u ( d t ) , c h a r a c t e r E s c a p e : s e , c h a r a c t e r R e f e r e n c e : s e , c o d e F e n c e d : u ( v t ) , c o d e F e n c e d F e n c e I n f o : l , c o d e F e n c e d F e n c e M e t a : l , c o d e I n d e n t e d : u ( v t , l ) , c o d e T e x t : u ( O t , l ) , c o d e T e x t D a t a : s e , d a t a : s e , c o d e F l o w V a l u e : s e , d e f i n i t i o n : u ( K n ) , d e f i n i t i o n D e s t i n a t i o n S t r i n g : l , d e f i n i t i o n L a b e l S t r i n g : l , d e f i n i t i o n T i t l e S t r i n g : l , e m p h a s i s : u ( $ n ) , h a r d B r e a k E s c a p e : u ( b n ) , h a r d B r e a k T r a i l i n g : u ( b n ) , h t m l F l o w : u ( w n , l ) , h t m l F l o w D a t a : s e , h t m l T e x t : u ( w n , l ) , h t m l T e x t D a t a : s e , i m a g e : u ( U n ) , l a b e l : l , l i n k : u ( Z r ) , l i s t I t e m : u ( t i ) , l i s t I t e m V a l u e : y , l i s t O r d e r e d : u ( e i , g ) , l i s t U n o r d e r e d : u ( e i ) , p a r a g r a p h : u ( r r ) , r e f e r e n c e : j , r e f e r e n c e S t r i n g : l , r e s o u r c e D e s t i n a t i o n S t r i n g : l , r e s o u r c e T i t l e S t r i n g : l , s e t e x t H e a d i n g : u ( V n ) , s t r o n g : u ( R t ) , t h e m a t i c B r e a k : u ( y t ) } , e x i t : { a t x H e a d i n g : d ( ) , a t x H e a d i n g S e q u e n c e : z , a u t o l i n k : d ( ) , a u t o l i n k E m a i l : V e , a u t o l i n k P r o t o c o l : x e , b l o c k Q u o t e : d ( ) , c h a r a c t e r E s c a p e V a l u e : G , c h a r a c t e r R e f e r e n c e M a r k e r H e x a d e c i m a l : t e , c h a r a c t e r R e f e r e n c e M a r k e r N u m e r i c : t e , c h a r a c t e r R e f e r e n c e V a l u e : w e , c o d e F e n c e d : d ( C ) , c o d e F e n c e d F e n c e : D , c o d e F e n c e d F e n c e I n f o : b , c o d e F e n c e d F e n c e M e t a : x , c o d e F l o w V a l u e : G , c o d e I n d e n t e d : d ( L ) , c o d e T e x t : d ( g e ) , c o d e T e x t D a t a : G , d a t a : G , d e f i n i t i o n : d ( ) , d e f i n i t i o n D e s t i n a t i o n S t r i n g : K , d e f i n i t i o n L a b e l S t r i n g : H , d e f i n i t i o n T i t l e S t r i n g : T , e m p h a s i s : d ( ) , h a r d B r e a k E s c a p e : d ( i e ) , h a r d B r e a k T r a i l i n g : d ( i e ) , h t m l F l o w : d ( h e ) , h t m l F l o w D a t a : G , h t m l T e x t : d ( p e ) , h t m l T e x t D a t a : G , i m a g e : d ( D e ) , l a b e l : N , l a b e l T e x t : F , l i n e E n d i n g : Q , l i n k : d ( b e ) , l i s t I t e m : d ( ) , l i s t O r d e r e d : d ( ) , l i s t U n o r d e
` )}function L1(e){if(e.length){let t=[zb,"", ` # # $ { A ( "Archive" ) } ` ,""];return e.forEach(r=>{t.push(zE(r))}),t.join( `
2022-10-14 21:23:40 +00:00
` )}return""}function jE(e){let t=e.children.reduce((n,i)=>n+A1(i),"");return["---","",(0, $ E.stringifyYaml)(e.data.frontmatter),"---","",""].join( `
2023-06-29 22:00:30 +00:00
` )+t+L1(e.data.archive)+jb(e.data.settings)}var _f=class{constructor(t){this.stateManager=t}newItem(t,r,n){return UE(this.stateManager,t,r,n)}updateItemContent(t,r){return Sf(this.stateManager,t,r)}boardToMd(t){return jE(t)}mdToBoard(t){let{ast:r,settings:n,frontmatter:i}=KE(this.stateManager,t),a=VE(this.stateManager,n,i,r,t);if(!this.stateManager.hasError()&&this.stateManager.state){let s=Yd(this.stateManager.state,a).filter(l=>["/id","/dom","/date","/time","/titleSearch","/file"].every(c=>!l.path.endsWith(c))),u=(0,qE.immutableJSONPatch)(this.stateManager.state,s);return Yw(this.stateManager,u,s)}return qw(this.stateManager,a)}reparseBoard(){return WE(this.stateManager,this.stateManager.state)}};var Cf=class{constructor(t,r,n,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.newBoardPromise=null;this.getSetting=(t,r)=>r&&r[t]!==void 0?r[t]:this.compiledSettings&&this.compiledSettings[t]!==void 0?this.compiledSettings[t]:this.getSettingRaw(t);this.getSettingRaw=(t,r)=>{var n,i;return r&&r[t]!==void 0?r[t]:((i=(n=this.state)==null?void 0:n.data)==null?void 0:i.settings)&&this.state.data.settings[t]!==void 0?this.state.data.settings[t]:this.getGlobalSetting(t)};this.getGlobalSetting=t=>{let r=this.getGlobalSettings();return r&&r[t]!==void 0?r[t]:null};this.app=t,this.file=r.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new _f(this),this.registerView(r,n,!0)}getAView(){return this.viewSet.values().next().value}hasError(){var t,r,n;return!!((n=(r=(t=this.state)==null?void 0:t.data)==null?void 0:r.errors)==null?void 0:n.length)}registerView(t,r,n){this.viewSet.has(t)||(this.viewSet.add(t),t.initHeaderButtons()),n&&(this.newBoardPromise!==null?this.newBoardPromise.then(()=>this.newBoard(r)):this.newBoardPromise=this.newBoard(r).then(()=>{this.newBoardPromise=null}).catch(i=>{console.error(i),this.setError(i)}))}unregisterView(t){this.viewSet.has(t)&&(this.viewSet.delete(t),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(t){try{await this.setState(await this.getParsedBoard(t),!1)}catch(r){this.setError(r)}}saveToDisk(){if(this.state.data.errors.length>0)return;let t=this.getAView();if(t){let r=this.parser.boardToMd(this.state);t.requestSaveToDisk(r),this.viewSet.forEach(n=>{n.data=r})}}softRefresh(){this.stateReceivers.forEach(t=>t({...this.state}))}async forceRefresh(){if(this.state)try{this.compileSettings(),this.state=await this.parser.reparseBoard(),this.stateReceivers.forEach(t=>t(this.state)),this.settingsNotifiers.forEach(t=>{t.forEach(r=>r())}),this.viewSet.forEach(t=>t.initHeaderButtons())}catch(t){console.error(t),this.setError(t)}}async setState(t,r=!0){var n;try{let i=(n=this.state)==null?void 0:n.data.settings,a=typeof t=="function"?await t(this.state):t,o=a==null?void 0:a.data.settings;i&&o&&Jb(i,o)?(this.state=(0,Ui.default)(this.state,{data:{settings:{ $ set:o}}}),this.compileSettings(),this.state=await this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>s.initHeaderButtons()),r&&this.saveToDisk(),this.stateReceivers.forEach(s=>s(this.state)),i!==o&&o&&this.settingsNotifiers.forEach((s,u)=>{(!i&&o||i[u]!==o[u])&&s.forEach(l=>l())})}catch(i){console.error(i),this.setError(i)}}useState(){let[t,r]=P.useState(this.state);return P.useEffect(()=>(this.stateReceivers.push(n=>{r(n)}),r(this.state),()=>{this.stateReceivers.remove(r)}),[]),t}useSetting(t){let[r,n]=P.useState(this.getSetting(t));return P.useEffect(()=>{let i=()=>{n(this.getSetting(t))};return this.settingsNotifiers.has(t)?this.settingsNotifiers.get(t).push(i):this.settingsNotifiers.set(t,[i]),()=>{this.settingsNotifiers.get(t).remove(i)}},[]),r}compileSettings(t){var s,u,l,c,d,f,p;let r=this.getGlobalSetting("metadata-keys")||[],n=this.getSettingRaw("metadata-keys",t)||[],i=this.getSettingRaw("date-format",t)||Nr(this.app),a=this.getSettingRaw("time-format",t)||ui(this.app),o=this.getSettingRaw("archive-d
2022-01-05 20:52:55 +00:00
/ * !
* Fuse . js v3 . 4.5 - Lightweight fuzzy - search ( http : //fusejs.io)
*
* Copyright ( c ) 2012 - 2017 Kirollos Risk ( http : //kiro.me)
* All Rights Reserved . Apache Software License 2.0
*
* http : //www.apache.org/licenses/LICENSE-2.0
* /
/ * !
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < feross @ feross . org > < http : //feross.org>
* @ license MIT
* /
/ * !
* https : //github.com/Starcounter-Jack/JSON-Patch
2022-08-23 16:25:36 +00:00
* ( c ) 2017 - 2021 Joachim Wester
2022-01-05 20:52:55 +00:00
* MIT license
* /
2022-08-23 16:25:36 +00:00
/ * !
* https : //github.com/Starcounter-Jack/JSON-Patch
* ( c ) 2017 - 2022 Joachim Wester
* MIT licensed
* /
2022-01-05 20:52:55 +00:00
/ * !
* is - plain - object < https : //github.com/jonschlinkert/is-plain-object>
*
* Copyright ( c ) 2014 - 2017 , Jon Schlinkert .
* Released under the MIT License .
* /
/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* mark . js v8 . 11.1
* https : //markjs.io/
* Copyright ( c ) 2014 – 2018 , Julian Kühnel
* Released under the MIT license https : //git.io/vwTVl
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /