${i.item.searchString}
${i.item.blockId}
`:i.item.searchString,search:(i,a,o)=>{e_(t.app,e,o[1],o[2],a)},replace:i=>{let a=[];n&&i.item.file.extension==="md"&&a.push("!");let o="#^";if(i.item.blockId)o+=i.item.blockId;else{let u=Re(),l=t_(i.item.block.type)?`
-`:" ";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("")}}}h();var s0=/\B#([^\s]*)?$/;function Fy(e,t){return{id:"tag",match:s0,index:1,search:(r,n)=>{n(r?[{item:`
#${r}`,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} `}}h();h();var Ny=ye(ma());h();h();var u0=/\$&/g,d0=/\$(\d)/g,Fu=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(u0,i[0]).replace(d0,(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 f0=1,Ou=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:f0];return this.search(i,o=>{r(o.map(s=>new Fu(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 Nu=class extends Ny.EventEmitter{constructor(t){super();this.handleQueryResult=t=>{this.emit("hit",{searchResults:t})};this.strategies=t.map(r=>new Ou(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([])}};h();var Ry=ye(ma());h();var p0=typeof window!="undefined"&&!!window.CustomEvent,Ht=(e,t,r)=>{if(p0)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 h0=10,m0="auto",g0="dropdown-menu textcomplete-dropdown",Hy="textcomplete-item",y0=`${Hy} active`,ga=class extends Ry.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||g0,Object.assign(i.style,{display:"none",position:"absolute",zIndex:"1000"},t.style),r==null||r.appendChild(i),new ga(i,t)}render(t,r){let n=Ht(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||h0).map((i,a)=>{var o;return new By(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",Ht(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=Ht(this.el.doc,"select",{cancelable:!0,detail:r});return this.emit("select",n),n.defaultPrevented?this:(this.hide(),this.emit("selected",Ht(this.el.doc,"selected",{detail:r})),this)}show(){if(!this.shown){let t=Ht(this.el.doc,"show",{cancelable:!0});if(this.emit("show",t),t.defaultPrevented)return this;this.el.style.display="block",this.shown=!0,this.emit("shown",Ht(this.el.doc,"shown"))}return this}hide(){if(this.shown){let t=Ht(this.el.doc,"hide",{cancelable:!0});if(this.emit("hide",t),t.defaultPrevented)return this;this.el.style.display="none",this.shown=!1,this.clear(),this.emit("hidden",Ht(this.el.doc,"hidden"))}return this}clear(){return this.items.forEach(t=>t.destroy()),this.items=[],this.el.innerHTML="",this.activeIndex=null,this}up(t){return this.shown?this.moveActiveItem("prev",t):this}down(t){return this.shown?this.moveActiveItem("next",t):this}moveActiveItem(t,r){if(this.activeIndex!=null){let n=t==="next"?this.getNextActiveIndex():this.getPrevActiveIndex();n!=null&&(this.activate(n),r.preventDefault())}return this}activate(t){return this.activeIndex!==t&&(this.activeIndex!=null&&this.items[this.activeIndex].deactivate(),this.activeIndex=t,this.items[t].activate()),this}isShown(){return this.shown}getActiveItem(){return this.activeIndex!=null?this.items[this.activeIndex]:null}setOffset(t){let n=this.el.doc.documentElement;if(n){let i=this.el.offsetWidth;if(t.left){let s=this.option.dynamicWidth?n.scrollWidth:n.clientWidth;t.left+i>s&&(t.left=s-i),this.el.style.left=`${t.left}px`}else t.right&&(t.right-i<0&&(t.right=0),this.el.style.right=`${t.right}px`);let a=!1,o=this.option.placement||m0;if(o==="auto"){let s=this.el.clientHeight;a=t.clientTop!=null&&t.clientTop+s>n.clientHeight}o==="top"||a?(this.el.style.bottom=`${n.clientHeight-t.top+t.lineHeight}px`,this.el.style.top="auto"):(this.el.style.top=`${t.top}px`,this.el.style.bottom="auto")}return this}getNextActiveIndex(){if(this.activeIndex==null)throw new Error;return this.activeIndex
o.data)):n||"",this.el.appendChild(a),this}},By=class{constructor(t,r,n,i){this.dropdown=t;this.index=r;this.searchResult=n;this.props=i;this.active=!1;this.onClick=t=>{t.preventDefault(),this.dropdown.select(this)};this.className=this.props.className||Hy,this.activeClassName=this.props.activeClassName||y0;let a=t.el.doc,o=a.createElement("li");o.className=this.active?this.activeClassName:this.className;let s=a.createElement("span");s.tabIndex=-1,s.innerHTML=this.searchResult.render(),o.appendChild(s),o.addEventListener("mousedown",this.onClick),o.addEventListener("touchstart",this.onClick),this.el=o}destroy(){var r;let t=this.el;return(r=t.parentNode)==null||r.removeChild(t),t.removeEventListener("mousedown",this.onClick,!1),t.removeEventListener("touchstart",this.onClick,!1),this}activate(){return this.active||(this.active=!0,this.el.className=this.activeClassName,this.dropdown.el.scrollTop=this.el.offsetTop),this}deactivate(){return this.active&&(this.active=!1,this.el.className=this.className),this}};h();var Ky=ye(ma());var Ru=class extends Ky.EventEmitter{destroy(){return this}applySearchResult(t){throw new Error("Not implemented.")}getCursorOffset(){throw new Error("Not implemented.")}getBeforeCursor(){throw new Error("Not implemented.")}emitMoveEvent(t){let r=Ht(activeDocument,"move",{cancelable:!0,detail:{code:t}});return this.emit("move",r),r}emitEnterEvent(){let t=Ht(activeDocument,"enter",{cancelable:!0});return this.emit("enter",t),t}emitChangeEvent(){let t=Ht(activeDocument,"change",{detail:{beforeCursor:this.getBeforeCursor()}});return this.emit("change",t),t}emitEscEvent(){let t=Ht(activeDocument,"esc",{cancelable:!0});return this.emit("esc",t),t}getCode(t){return t.keyCode===9||t.keyCode===13?"ENTER":t.keyCode===27?"ESC":t.keyCode===38?"UP":t.keyCode===40||t.keyCode===78&&t.ctrlKey?"DOWN":t.keyCode===80&&t.ctrlKey?"UP":"OTHER"}};h();var $y=ye(ma());var v0=["show","shown","render","rendered","selected","hidden","hide"],Hu=class extends $y.EventEmitter{constructor(t,r,n){super();this.editor=t;this.isQueryInFlight=!1;this.nextPendingQuery=null;this.handleHit=({searchResults:t})=>{t.length?this.dropdown.render(t,this.editor.getCursorOffset()):this.dropdown.hide(),this.isQueryInFlight=!1,this.nextPendingQuery!==null&&this.trigger(this.nextPendingQuery)};this.handleMove=t=>{t.detail.code==="UP"?this.dropdown.up(t):this.dropdown.down(t)};this.handleEnter=t=>{let r=this.dropdown.getActiveItem();r?(this.dropdown.select(r),t.preventDefault()):this.dropdown.hide()};this.handleEsc=t=>{this.dropdown.isShown()&&(this.dropdown.hide(),t.preventDefault())};this.handleChange=t=>{t.detail.beforeCursor!=null?this.trigger(t.detail.beforeCursor):this.dropdown.hide()};this.handleSelect=t=>{this.emit("select",t),t.defaultPrevented||this.editor.applySearchResult(t.detail.searchResult)};this.handleResize=()=>{this.dropdown.isShown()&&this.dropdown.setOffset(this.editor.getCursorOffset())};this.completer=new Nu(r),this.dropdown=ga.create((n==null?void 0:n.dropdown)||{}),this.startListening()}destroy(t=!0){return this.completer.destroy(),this.dropdown.destroy(),t&&this.editor.destroy(),this.stopListening(),this}isShown(){return this.dropdown.isShown()}hide(){return this.dropdown.hide(),this}trigger(t){return this.isQueryInFlight?this.nextPendingQuery=t:(this.isQueryInFlight=!0,this.nextPendingQuery=null,this.completer.run(t)),this}startListening(){var t;this.editor.on("move",this.handleMove).on("enter",this.handleEnter).on("esc",this.handleEsc).on("change",this.handleChange),this.dropdown.on("select",this.handleSelect);for(let r of v0)this.dropdown.on(r,n=>this.emit(r,n));this.completer.on("hit",this.handleHit),(t=Ze(this.dropdown.el))==null||t.addEventListener("resize",this.handleResize)}stopListening(){var t;(t=Ze(this.dropdown.el))==null||t.removeEventListener("resize",this.handleResize),this.completer.removeAllListeners(),this.dropdown.removeAllListeners(),this.editor.removeListener("move",this.handleMove).removeListener("enter",this.handleEnter).removeListener("esc",this.handleEsc).removeListener("change",this.handleChange)}};h();h();h();var b0=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];function Uy(e,t){let r=e.doc,n=e.win,i=r.createElement("div");i.id="input-textarea-caret-position-mirror-div",r.body.appendChild(i);let a=i.style,o=n.getComputedStyle(e);a.whiteSpace="pre-wrap",a.position="absolute",b0.forEach(l=>{a[l]=o[l]}),a.overflow="hidden",i.textContent=e.value.substring(0,t);let s=r.createElement("span");s.textContent=e.value.substring(t)||".",i.appendChild(s);let u={top:s.offsetTop+parseInt(o.borderTopWidth),left:s.offsetLeft+parseInt(o.borderLeftWidth),height:parseInt(o.lineHeight)};return r.body.removeChild(i),u}h();function Wy(e,t,r){let n=e.doc,i=e.value,a=t+(r||""),o=n.activeElement,s=0,u=0;for(;s=0&&a.length-u-1>=0&&i[i.length-u-1]===a[a.length-u-1];)u++;s=Math.min(s,Math.min(i.length,a.length)-u),e.setSelectionRange(s,i.length-u);let l=a.substring(s,a.length-u);if(e.focus(),!n.execCommand("insertText",!1,l)){e.value=a;let c=n.createEvent("Event");c.initEvent("input",!0,!0),e.dispatchEvent(c)}return e.setSelectionRange(t.length,t.length),o.focus(),e}h();h();var Vy=e=>{let t=e.getBoundingClientRect(),r=e.doc;if(r==null)throw new Error("Given element does not belong to document");let{defaultView:n,documentElement:i}=r;if(n==null)throw new Error("Given element does not belong to window");let a={top:t.top+n.pageYOffset,left:t.left+n.pageXOffset};return i&&(a.top-=i.clientTop,a.left-=i.clientLeft),a};h();var w0="0".charCodeAt(0),E0="9".charCodeAt(0),zy=e=>w0<=e&&e<=E0,jy=e=>{let t=getComputedStyle(e),r=t.lineHeight;if(zy(r.charCodeAt(0))){let n=parseFloat(r);return zy(r.charCodeAt(r.length-1))?n*parseFloat(t.fontSize):n}return x0(e.doc,e.nodeName,t)},x0=(e,t,r)=>{let n=e.body;if(!n)return 0;let i=e.createElement(t);i.innerHTML=" ",Object.assign(i.style,{fontSize:r.fontSize,fontFamily:r.fontFamily,padding:"0"}),n.appendChild(i),i.instanceOf(HTMLTextAreaElement)&&(i.rows=1);let a=i.offsetHeight;return n.removeChild(i),a};h();var os=class extends Ru{constructor(t){super();this.el=t;this.onInput=()=>{this.emitChangeEvent()};this.onKeydown=t=>{let r=this.getCode(t),n;r==="UP"||r==="DOWN"?n=this.emitMoveEvent(r):r==="ENTER"?n=this.emitEnterEvent():r==="ESC"&&(n=this.emitEscEvent()),n&&n.defaultPrevented&&t.preventDefault()};this.startListening()}destroy(){return super.destroy(),this.stopListening(),this}applySearchResult(t){let r=this.getBeforeCursor();if(r!=null){let n=t.replace(r,this.getAfterCursor());this.el.focus(),Array.isArray(n)&&(Wy(this.el,n[0],n[1]),this.el&&this.el.dispatchEvent(Ht(this.el.doc,"input")))}}getCursorOffset(){let t=Vy(this.el),r=this.getElScroll(),n=this.getCursorPosition(),i=jy(this.el),a=t.top-r.top+n.top+i,o=t.left-r.left+n.left,s=this.el.getBoundingClientRect().top,u=this.el.doc;if(this.el.dir!=="rtl")return{top:a,left:o,lineHeight:i,clientTop:s};{let l=u.documentElement?u.documentElement.clientWidth-o:0;return{top:a,right:l,lineHeight:i,clientTop:s}}}getBeforeCursor(){return this.el.selectionStart!==this.el.selectionEnd?null:this.el.value.slice(0,this.el.selectionEnd)}getAfterCursor(){return this.el.value.slice(this.el.selectionEnd)}getElScroll(){return{top:this.el.scrollTop,left:this.el.scrollLeft}}getCursorPosition(){return Uy(this.el,this.el.selectionEnd)}startListening(){this.el.addEventListener("input",this.onInput),this.el.addEventListener("keydown",this.onKeydown)}stopListening(){this.el.removeEventListener("input",this.onInput),this.el.removeEventListener("keydown",this.onKeydown)}};function k0({inputRef:e,isAutocompleteVisibleRef:t,obsidianContext:r,excludeDatePicker:n}){let{stateManager:i,filePath:a,view:o}=r,s=null,u=null,l=i.getSetting("date-trigger"),c=new RegExp(`(?:^|\\s)${Sn(l)}$`),d=Object.keys(i.app.metadataCache.getTags()).sort(),f=new dn(d),p=i.app.metadataCache.getLinkSuggestions().filter(H=>!!H.file),m=new dn(p,{keys:["file.basename","alias"]}),v=o.app.vault.getConfig("autoPairBrackets"),b=[Fy(d,f),Lu(a,i,v,!0),Lu(a,i,v,!1),Au(a,i,v,!0),Au(a,i,v,!1),Iu(o.getWindow(),p,m,a,i,v,!0),Iu(o.getWindow(),p,m,a,i,v,!1)];n||b.push(My(i));let k=new os(e.current),T=new Hu(k,b,{dropdown:{parent:Ja(e.current),maxCount:96,className:`${V("autocomplete")} ${V("ignore-click-outside")}`,rotate:!0,item:{className:`${V("autocomplete-item")} ${V("ignore-click-outside")}`,activeClassName:`${V("autocomplete-item-active")} ${V("ignore-click-outside")}`}}}),D=()=>{T.isShown()||(t.current=!1);let H=s.win;u.destroy(),s.remove(),H.setTimeout(()=>{s=null})};T.on("show",()=>{t.current=!0}),T.on("hidden",()=>{t.current=!1});let I;if(!n){I=C=>{if(T.isShown&&["#","^"].contains(C.key)){let U=T.dropdown.getActiveItem(),z=U==null?void 0:U.searchResult;if(z&&z.strategy.props.id.startsWith("link")){C.preventDefault(),k.applySearchResult(z),Tt(e.current,C.key==="^"?"#^":"#");return}}if(!s)return;if(C.key==="Enter"){C.preventDefault();let U=u.selectedDates;return U.length?is(U[0],e,i):is(new Date,e,i),D()}if(C.key==="Escape")return C.preventDefault(),D();let F=(0,qy.moment)(u.selectedDates[0]||new Date);if(C.key==="ArrowRight"){C.preventDefault(),F.weekday()===6?u.setDate(Ay(F).toDate(),!1):u.setDate(F.add(1,"day").toDate(),!1);return}if(C.key==="ArrowLeft"){C.preventDefault(),F.weekday()===0?u.setDate(Iy(F).toDate(),!1):u.setDate(F.subtract(1,"day").toDate(),!1);return}if(C.key==="ArrowUp"){C.preventDefault(),u.setDate(F.subtract(1,"week").toDate(),!1);return}if(C.key==="ArrowDown"){C.preventDefault(),u.setDate(F.add(1,"week").toDate(),!1);return}},e.current.addEventListener("keydown",I);let H=e.current.doc;k.on("change",C=>{let F=C.detail.beforeCursor;if(F&&c.test(F)){let U=k.getCursorOffset();s?(s.style.left=`${U.left||0}px`,s.style.top=`${U.top||0}px`,Mu(U,s)):s=H.body.createDiv({cls:`${V("date-picker")} ${V("ignore-click-outside")}`},z=>{z.style.left=`${U.left||0}px`,z.style.top=`${U.top||0}px`,Ty({div:z,inputRef:e,stateManager:i,cb:ee=>{u=ee,t.current=!0,Mu(U,s)}})})}else s&&D()})}return()=>{!n&&e.current&&e.current.removeEventListener("keydown",I),s&&D(),T.destroy(),k.destroy()}}function Yy({isInputVisible:e,onEnter:t,onEscape:r,onKeyDown:n,excludeDatePicker:i}){let a=R.useContext(We),o=R.useRef(!1),s=R.useRef(),{oncompositionstart:u,oncompositionend:l,getShouldIMEBlockAction:c}=eo();return R.useEffect(()=>{let d=s.current;if(e&&d)return d.focus(),d.selectionStart=d.selectionEnd=d.value.length,k0({inputRef:s,isAutocompleteVisibleRef:o,obsidianContext:a,excludeDatePicker:i})},[e]),{ref:s,oncompositionstart:u,oncompositionend:l,onKeyDownCapture:d=>{c()||o.current||n(d)||(d.key==="Enter"?t&&t(d):d.key==="Escape"&&r&&r(d))}}}h();var Jy=/^[*_]{2}(.+)[*_]{2}$/;function S0(e){return e.replace(Jy,"$1")}var Gy=/^[*_]{1}(.+)[*_]{1}$/;function _0(e){return e.replace(Gy,"$1")}var Qy=/^`{1}(.+)`{1}$/;function D0(e){return e.replace(Qy,"$1")}var Xy=/^={2}(.+)={2}$/;function C0(e){return e.replace(Xy,"$1")}var Zy=/^~{2}(.+)~{2}$/;function T0(e){return e.replace(Zy,"$1")}var M0=/^(?:>.+?(?:[\r\n]|$))+$/;function I0(e){return e.split(`
+`:" ";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("")}}}h();var n_=/\B#([^\s]*)?$/;function ay(e,t){return{id:"tag",match:n_,index:1,search:(r,n)=>{n(r?[{item:`#${r}`,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,"")} `}}h();h();var sy=ge(Ta());h();h();var a_=/\$&/g,o_=/\$(\d)/g,Ju=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(a_,i[0]).replace(o_,(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 s_=1,Gu=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:s_];return this.search(i,o=>{r(o.map(s=>new Ju(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 Qu=class extends sy.EventEmitter{constructor(t){super();this.handleQueryResult=t=>{this.emit("hit",{searchResults:t})};this.strategies=t.map(r=>new Gu(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([])}};h();var ly=ge(Ta());h();var l_=typeof window!="undefined"&&!!window.CustomEvent,Ut=(e,t,r)=>{if(l_)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 c_=10,u_="auto",d_="dropdown-menu textcomplete-dropdown",cy="textcomplete-item",f_=`${cy} active`,Da=class extends ly.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||d_,Object.assign(i.style,{display:"none",position:"absolute",zIndex:"1000"},t.style),r==null||r.appendChild(i),new Da(i,t)}render(t,r){let n=Ut(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||c_).map((i,a)=>{var o;return new uy(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",Ut(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=Ut(this.el.doc,"select",{cancelable:!0,detail:r});return this.emit("select",n),n.defaultPrevented?this:(this.hide(),this.emit("selected",Ut(this.el.doc,"selected",{detail:r})),this)}show(){if(!this.shown){let t=Ut(this.el.doc,"show",{cancelable:!0});if(this.emit("show",t),t.defaultPrevented)return this;this.el.style.display="block",this.shown=!0,this.emit("shown",Ut(this.el.doc,"shown"))}return this}hide(){if(this.shown){let t=Ut(this.el.doc,"hide",{cancelable:!0});if(this.emit("hide",t),t.defaultPrevented)return this;this.el.style.display="none",this.shown=!1,this.clear(),this.emit("hidden",Ut(this.el.doc,"hidden"))}return this}clear(){return this.items.forEach(t=>t.destroy()),this.items=[],this.el.innerHTML="",this.activeIndex=null,this}up(t){return this.shown?this.moveActiveItem("prev",t):this}down(t){return this.shown?this.moveActiveItem("next",t):this}moveActiveItem(t,r){if(this.activeIndex!=null){let n=t==="next"?this.getNextActiveIndex():this.getPrevActiveIndex();n!=null&&(this.activate(n),r.preventDefault())}return this}activate(t){return this.activeIndex!==t&&(this.activeIndex!=null&&this.items[this.activeIndex].deactivate(),this.activeIndex=t,this.items[t].activate()),this}isShown(){return this.shown}getActiveItem(){return this.activeIndex!=null?this.items[this.activeIndex]:null}setOffset(t){let n=this.el.doc.documentElement;if(n){let i=this.el.offsetWidth;if(t.left){let s=this.option.dynamicWidth?n.scrollWidth:n.clientWidth;t.left+i>s&&(t.left=s-i),this.el.style.left=`${t.left}px`}else t.right&&(t.right-i<0&&(t.right=0),this.el.style.right=`${t.right}px`);let a=!1,o=this.option.placement||u_;if(o==="auto"){let s=this.el.clientHeight;a=t.clientTop!=null&&t.clientTop+s>n.clientHeight}o==="top"||a?(this.el.style.bottom=`${n.clientHeight-t.top+t.lineHeight}px`,this.el.style.top="auto"):(this.el.style.top=`${t.top}px`,this.el.style.bottom="auto")}return this}getNextActiveIndex(){if(this.activeIndex==null)throw new Error;return this.activeIndexo.data)):n||"",this.el.appendChild(a),this}},uy=class{constructor(t,r,n,i){this.dropdown=t;this.index=r;this.searchResult=n;this.props=i;this.active=!1;this.onClick=t=>{t.preventDefault(),this.dropdown.select(this)};this.className=this.props.className||cy,this.activeClassName=this.props.activeClassName||f_;let a=t.el.doc,o=a.createElement("li");o.className=this.active?this.activeClassName:this.className;let s=a.createElement("span");s.tabIndex=-1,s.innerHTML=this.searchResult.render(),o.appendChild(s),o.addEventListener("mousedown",this.onClick),o.addEventListener("touchstart",this.onClick),this.el=o}destroy(){var r;let t=this.el;return(r=t.parentNode)==null||r.removeChild(t),t.removeEventListener("mousedown",this.onClick,!1),t.removeEventListener("touchstart",this.onClick,!1),this}activate(){return this.active||(this.active=!0,this.el.className=this.activeClassName,this.dropdown.el.scrollTop=this.el.offsetTop),this}deactivate(){return this.active&&(this.active=!1,this.el.className=this.className),this}};h();var dy=ge(Ta());var Xu=class extends dy.EventEmitter{destroy(){return this}applySearchResult(t){throw new Error("Not implemented.")}getCursorOffset(){throw new Error("Not implemented.")}getBeforeCursor(){throw new Error("Not implemented.")}emitMoveEvent(t){let r=Ut(activeDocument,"move",{cancelable:!0,detail:{code:t}});return this.emit("move",r),r}emitEnterEvent(){let t=Ut(activeDocument,"enter",{cancelable:!0});return this.emit("enter",t),t}emitChangeEvent(){let t=Ut(activeDocument,"change",{detail:{beforeCursor:this.getBeforeCursor()}});return this.emit("change",t),t}emitEscEvent(){let t=Ut(activeDocument,"esc",{cancelable:!0});return this.emit("esc",t),t}getCode(t){return t.keyCode===9||t.keyCode===13?"ENTER":t.keyCode===27?"ESC":t.keyCode===38?"UP":t.keyCode===40||t.keyCode===78&&t.ctrlKey?"DOWN":t.keyCode===80&&t.ctrlKey?"UP":"OTHER"}};h();var fy=ge(Ta());var p_=["show","shown","render","rendered","selected","hidden","hide"],Zu=class extends fy.EventEmitter{constructor(t,r,n){super();this.editor=t;this.isQueryInFlight=!1;this.nextPendingQuery=null;this.handleHit=({searchResults:t})=>{t.length?this.dropdown.render(t,this.editor.getCursorOffset()):this.dropdown.hide(),this.isQueryInFlight=!1,this.nextPendingQuery!==null&&this.trigger(this.nextPendingQuery)};this.handleMove=t=>{t.detail.code==="UP"?this.dropdown.up(t):this.dropdown.down(t)};this.handleEnter=t=>{let r=this.dropdown.getActiveItem();r?(this.dropdown.select(r),t.preventDefault()):this.dropdown.hide()};this.handleEsc=t=>{this.dropdown.isShown()&&(this.dropdown.hide(),t.preventDefault())};this.handleChange=t=>{t.detail.beforeCursor!=null?this.trigger(t.detail.beforeCursor):this.dropdown.hide()};this.handleSelect=t=>{this.emit("select",t),t.defaultPrevented||this.editor.applySearchResult(t.detail.searchResult)};this.handleResize=()=>{this.dropdown.isShown()&&this.dropdown.setOffset(this.editor.getCursorOffset())};this.completer=new Qu(r),this.dropdown=Da.create((n==null?void 0:n.dropdown)||{}),this.startListening()}destroy(t=!0){return this.completer.destroy(),this.dropdown.destroy(),t&&this.editor.destroy(),this.stopListening(),this}isShown(){return this.dropdown.isShown()}hide(){return this.dropdown.hide(),this}trigger(t){return this.isQueryInFlight?this.nextPendingQuery=t:(this.isQueryInFlight=!0,this.nextPendingQuery=null,this.completer.run(t)),this}startListening(){var t;this.editor.on("move",this.handleMove).on("enter",this.handleEnter).on("esc",this.handleEsc).on("change",this.handleChange),this.dropdown.on("select",this.handleSelect);for(let r of p_)this.dropdown.on(r,n=>this.emit(r,n));this.completer.on("hit",this.handleHit),(t=Ze(this.dropdown.el))==null||t.addEventListener("resize",this.handleResize)}stopListening(){var t;(t=Ze(this.dropdown.el))==null||t.removeEventListener("resize",this.handleResize),this.completer.removeAllListeners(),this.dropdown.removeAllListeners(),this.editor.removeListener("move",this.handleMove).removeListener("enter",this.handleEnter).removeListener("esc",this.handleEsc).removeListener("change",this.handleChange)}};h();h();h();h();var py=e=>{let t=e.getBoundingClientRect(),r=e.doc;if(r==null)throw new Error("Given element does not belong to document");let{defaultView:n,documentElement:i}=r;if(n==null)throw new Error("Given element does not belong to window");let a={top:t.top+n.pageYOffset,left:t.left+n.pageXOffset};return i&&(a.top-=i.clientTop,a.left-=i.clientLeft),a};h();var h_="0".charCodeAt(0),m_="9".charCodeAt(0),hy=e=>h_<=e&&e<=m_,my=e=>{let t=getComputedStyle(e),r=t.lineHeight;if(hy(r.charCodeAt(0))){let n=parseFloat(r);return hy(r.charCodeAt(r.length-1))?n*parseFloat(t.fontSize):n}return g_(e.doc,e.nodeName,t)},g_=(e,t,r)=>{let n=e.body;if(!n)return 0;let i=e.createElement(t);i.innerHTML=" ",Object.assign(i.style,{fontSize:r.fontSize,fontFamily:r.fontFamily,padding:"0"}),n.appendChild(i),i.instanceOf(HTMLTextAreaElement)&&(i.rows=1);let a=i.offsetHeight;return n.removeChild(i),a};h();h();function gy(e,t,r){let n=e.doc,i=e.value,a=t+(r||""),o=n.activeElement,s=0,u=0;for(;s=0&&a.length-u-1>=0&&i[i.length-u-1]===a[a.length-u-1];)u++;s=Math.min(s,Math.min(i.length,a.length)-u),e.setSelectionRange(s,i.length-u);let l=a.substring(s,a.length-u);if(e.focus(),!n.execCommand("insertText",!1,l)){e.value=a;let c=n.createEvent("Event");c.initEvent("input",!0,!0),e.dispatchEvent(c)}return e.setSelectionRange(t.length,t.length),o.focus(),e}h();var v_=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];function vy(e,t){let r=e.doc,n=e.win,i=r.createElement("div");i.id="input-textarea-caret-position-mirror-div",r.body.appendChild(i);let a=i.style,o=n.getComputedStyle(e);a.whiteSpace="pre-wrap",a.position="absolute",v_.forEach(l=>{a[l]=o[l]}),a.overflow="hidden",i.textContent=e.value.substring(0,t);let s=r.createElement("span");s.textContent=e.value.substring(t)||".",i.appendChild(s);let u={top:s.offsetTop+parseInt(o.borderTopWidth),left:s.offsetLeft+parseInt(o.borderLeftWidth),height:parseInt(o.lineHeight)};return r.body.removeChild(i),u}var xs=class extends Xu{constructor(t){super();this.el=t;this.onInput=()=>{this.emitChangeEvent()};this.onKeydown=t=>{let r=this.getCode(t),n;r==="UP"||r==="DOWN"?n=this.emitMoveEvent(r):r==="ENTER"?n=this.emitEnterEvent():r==="ESC"&&(n=this.emitEscEvent()),n&&n.defaultPrevented&&t.preventDefault()};this.startListening()}destroy(){return super.destroy(),this.stopListening(),this}applySearchResult(t){let r=this.getBeforeCursor();if(r!=null){let n=t.replace(r,this.getAfterCursor());this.el.focus(),Array.isArray(n)&&(gy(this.el,n[0],n[1]),this.el&&this.el.dispatchEvent(Ut(this.el.doc,"input")))}}getCursorOffset(){let t=py(this.el),r=this.getElScroll(),n=this.getCursorPosition(),i=my(this.el),a=t.top-r.top+n.top+i,o=t.left-r.left+n.left,s=this.el.getBoundingClientRect().top,u=this.el.doc;if(this.el.dir!=="rtl")return{top:a,left:o,lineHeight:i,clientTop:s};{let l=u.documentElement?u.documentElement.clientWidth-o:0;return{top:a,right:l,lineHeight:i,clientTop:s}}}getBeforeCursor(){return this.el.selectionStart!==this.el.selectionEnd?null:this.el.value.slice(0,this.el.selectionEnd)}getAfterCursor(){return this.el.value.slice(this.el.selectionEnd)}getElScroll(){return{top:this.el.scrollTop,left:this.el.scrollLeft}}getCursorPosition(){return vy(this.el,this.el.selectionEnd)}startListening(){this.el.addEventListener("input",this.onInput),this.el.addEventListener("keydown",this.onKeydown)}stopListening(){this.el.removeEventListener("input",this.onInput),this.el.removeEventListener("keydown",this.onKeydown)}};function y_({inputRef:e,isAutocompleteVisibleRef:t,obsidianContext:r,excludeDatePicker:n}){let{stateManager:i,filePath:a,view:o}=r,s=null,u=null,l=i.getSetting("date-trigger"),c=new RegExp(`(?:^|\\s)${Ln(l)}$`),d=Object.keys(i.app.metadataCache.getTags()).sort(),f=new mn(d),p=i.app.metadataCache.getLinkSuggestions().filter(N=>!!N.file),m=new mn(p,{keys:["file.basename","alias"]}),y=o.app.vault.getConfig("autoPairBrackets"),b=[ay(d,f),qu(a,i,y,!0),qu(a,i,y,!1),ju(a,i,y,!0),ju(a,i,y,!1),zu(o.getWindow(),p,m,a,i,y,!0),zu(o.getWindow(),p,m,a,i,y,!1)];n||b.push(ey(i));let x=new xs(e.current),D=new Zu(x,b,{dropdown:{parent:ai(e.current),maxCount:96,className:`${$("autocomplete")} ${$("ignore-click-outside")}`,rotate:!0,item:{className:`${$("autocomplete-item")} ${$("ignore-click-outside")}`,activeClassName:`${$("autocomplete-item-active")} ${$("ignore-click-outside")}`}}}),C=()=>{D.isShown()||(t.current=!1);let N=s.win;u.destroy(),s.remove(),N.setTimeout(()=>{s=null})};D.on("show",()=>{t.current=!0}),D.on("hidden",()=>{t.current=!1});let A;if(!n){A=T=>{if(D.isShown&&["#","^"].contains(T.key)){let W=D.dropdown.getActiveItem(),z=W==null?void 0:W.searchResult;if(z&&z.strategy.props.id.startsWith("link")){T.preventDefault(),x.applySearchResult(z),At(e.current,T.key==="^"?"#^":"#");return}}if(!s)return;if(T.key==="Enter"){T.preventDefault();let W=u.selectedDates;return W.length?ws(W[0],e,i):ws(new Date,e,i),C()}if(T.key==="Escape")return T.preventDefault(),C();let O=(0,yy.moment)(u.selectedDates[0]||new Date);if(T.key==="ArrowRight"){T.preventDefault(),O.weekday()===6?u.setDate(ny(O).toDate(),!1):u.setDate(O.add(1,"day").toDate(),!1);return}if(T.key==="ArrowLeft"){T.preventDefault(),O.weekday()===0?u.setDate(ty(O).toDate(),!1):u.setDate(O.subtract(1,"day").toDate(),!1);return}if(T.key==="ArrowUp"){T.preventDefault(),u.setDate(O.subtract(1,"week").toDate(),!1);return}if(T.key==="ArrowDown"){T.preventDefault(),u.setDate(O.add(1,"week").toDate(),!1);return}},e.current.addEventListener("keydown",A);let N=e.current.doc;x.on("change",T=>{let O=T.detail.beforeCursor;if(O&&c.test(O)){let W=x.getCursorOffset();s?(s.style.left=`${W.left||0}px`,s.style.top=`${W.top||0}px`,Vu(W,s)):s=N.body.createDiv({cls:`${$("date-picker")} ${$("ignore-click-outside")}`},z=>{z.style.left=`${W.left||0}px`,z.style.top=`${W.top||0}px`,Zv({div:z,inputRef:e,stateManager:i,cb:ee=>{u=ee,t.current=!0,Vu(W,s)}})})}else s&&C()})}return()=>{!n&&e.current&&e.current.removeEventListener("keydown",A),s&&C(),D.destroy(),x.destroy()}}function by({isInputVisible:e,onEnter:t,onEscape:r,onKeyDown:n,excludeDatePicker:i}){let a=F.useContext(Ve),o=F.useRef(!1),s=F.useRef(),{oncompositionstart:u,oncompositionend:l,getShouldIMEBlockAction:c}=go();return F.useEffect(()=>{let d=s.current;if(e&&d)return d.focus(),d.selectionStart=d.selectionEnd=d.value.length,y_({inputRef:s,isAutocompleteVisibleRef:o,obsidianContext:a,excludeDatePicker:i})},[e]),{ref:s,oncompositionstart:u,oncompositionend:l,onKeyDownCapture:d=>{c()||o.current||n(d)||(d.key==="Enter"?t&&t(d):d.key==="Escape"&&r&&r(d))}}}h();var wy=/^[*_]{2}(.+)[*_]{2}$/;function b_(e){return e.replace(wy,"$1")}var Ey=/^[*_]{1}(.+)[*_]{1}$/;function w_(e){return e.replace(Ey,"$1")}var xy=/^`{1}(.+)`{1}$/;function E_(e){return e.replace(xy,"$1")}var ky=/^={2}(.+)={2}$/;function x_(e){return e.replace(ky,"$1")}var Sy=/^~{2}(.+)~{2}$/;function k_(e){return e.replace(Sy,"$1")}var S_=/^(?:>.+?(?:[\r\n]|$))+$/;function __(e){return e.split(`
`).map(r=>r[0]===">"?r:`> ${r}`).join(`
-`)}function A0(e){return e.split(`
+`)}function C_(e){return e.split(`
`).map(r=>r[0]!==">"?r:r.replace(/^>+\s*/,"")).join(`
-`)}var ya=/^(?:\s*\d+[.)]\s+.*?(?:[\r\n]|$))+$/,Bu=/^(?:\s*\d+[.)]\s+\[\s+\]\s+.*?(?:[\r\n]|$))+$/,Ku=/^(?:\s*\d+[.)]\s+\[[^\]\s]+\]\s+.*?(?:[\r\n]|$))+$/;function L0(e){return e.match(/^\s*/)[0].length}function P0(e){return parseInt(e.match(/^\s*(\d+)/)[1],10)}function F0(e){let t=[0],r=0;return e.split(`
-`).map(n=>{let i=L0(n);if(i>r?t.push(0):iya.test(t)?t.replace(/^(\s*)\d+[.)]\s+/,"$1"):t).join(`
-`)}var va=/^(?:\s*[-*+]\s+.*?(?:[\r\n]|$))+$/,$u=/^(?:\s*[-*+]\s+\[\s+\]\s+.*?(?:[\r\n]|$))+$/,Uu=/^(?:\s*[-*+]\s+\[[^\]\s]+\]\s+.*?(?:[\r\n]|$))+$/;function ev(e){return e.split(`
-`).map(r=>va.test(r)?r:r.replace(/^(\s*)/,"$1- ")).join(`
-`)}function N0(e){return e.split(`
-`).map(t=>$u.test(t)||Uu.test(t)?t:t.replace(/^(\s*[-*+]\s+)/,"$1[ ] ")).join(`
-`)}function R0(e){return e.split(`
-`).map(t=>Bu.test(t)||Ku.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)/,"$1[ ] ")).join(`
-`)}function H0(e){return e.split(`
-`).map(t=>$u.test(t)?t:t.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")).join(`
-`)}function B0(e){return e.split(`
-`).map(t=>Bu.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)\[[^\]]{1}\]/,"$1[ ]")).join(`
-`)}function K0(e){return e.split(`
-`).map(t=>Uu.test(t)?t:t.replace(/^(\s*[-*+]\s+)\[\s\]/,"$1[x]")).join(`
-`)}function $0(e){return e.split(`
-`).map(t=>Ku.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)\[\s\]/,"$1[x]")).join(`
-`)}function U0(e){return e.split(`
-`).map(r=>va.test(r)?r.replace(/^(\s*)[-+*]\s+/,"$1"):r).join(`
-`)}var tv={"editor:toggle-bold":e=>{hi(e,Jy,S0,"**")},"editor:toggle-code":e=>{hi(e,Qy,D0,"`")},"editor:toggle-italics":e=>{hi(e,Gy,_0,"*")},"editor:toggle-highlight":e=>{hi(e,Xy,C0,"==")},"editor:toggle-strikethrough":e=>{hi(e,Zy,T0,"~~")},"editor:toggle-blockquote":e=>{Qo(e,M0,I0,A0)},"editor:toggle-bullet-list":e=>{Qo(e,va,ev,U0)},"editor:toggle-numbered-list":e=>{Qo(e,ya,F0,O0)},"editor:toggle-checklist-status":e=>{let t=Tn(e),r=t.selection.end===t.selection.start,n=pi({text:t.text,selection:t.selection}),i=Mt(e,n),a=i.selectedText,o=va.test(a),s=ya.test(a);!o&&!s?a=ev(a):o?$u.test(a)?a=K0(a):Uu.test(a)?a=H0(a):a=N0(a):Bu.test(a)?a=$0(a):Ku.test(a)?a=B0(a):a=R0(a);let u=Tt(e,a);if(r){let l=a.length-i.selectedText.length;Mt(e,{start:t.selection.start+l,end:t.selection.end+l})}else Mt(e,{start:i.selection.start,end:u.selection.end})}},Wu={"(":e=>an(e,"(",")",!1),"[":e=>an(e,"[","]",!1,!0),"{":e=>an(e,"{","}",!1),"'":e=>an(e,"'","'",!1),'"':e=>an(e,'"','"',!1)},Vu={"*":e=>an(e,"*","*",!1),_:e=>an(e,"_","_",!1),"`":e=>an(e,"`","`",!1),"=":e=>an(e,"=","=",!0),"~":e=>an(e,"~","~",!0),$:e=>an(e,"$","$",!0),"%":e=>an(e,"%","%",!0)},W0={"(":")","[":"]","{":"}","'":"'",'"':'"',"*":"*",_:"_","`":"`","=":"=","~":"~",$:"$","%":"%"};function nv(e,t){let r=Tn(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===W0[n])return Mt(e,{start:r.selection.end,end:r.selection.end+1}),Tt(e,""),!0}function rv(e){return nv(e,Wu)}function iv(e){return nv(e,Vu)}function V0(e,t,r){let n=t?" ":" ".repeat(r);return e.split(`
+`)}var Ma=/^(?:\s*\d+[.)]\s+.*?(?:[\r\n]|$))+$/,ed=/^(?:\s*\d+[.)]\s+\[\s+\]\s+.*?(?:[\r\n]|$))+$/,td=/^(?:\s*\d+[.)]\s+\[[^\]\s]+\]\s+.*?(?:[\r\n]|$))+$/;function T_(e){return e.match(/^\s*/)[0].length}function D_(e){return parseInt(e.match(/^\s*(\d+)/)[1],10)}function M_(e){let t=[0],r=0;return e.split(`
+`).map(n=>{let i=T_(n);if(i>r?t.push(0):iMa.test(t)?t.replace(/^(\s*)\d+[.)]\s+/,"$1"):t).join(`
+`)}var Ia=/^(?:\s*[-*+]\s+.*?(?:[\r\n]|$))+$/,nd=/^(?:\s*[-*+]\s+\[\s+\]\s+.*?(?:[\r\n]|$))+$/,rd=/^(?:\s*[-*+]\s+\[[^\]\s]+\]\s+.*?(?:[\r\n]|$))+$/;function _y(e){return e.split(`
+`).map(r=>Ia.test(r)?r:r.replace(/^(\s*)/,"$1- ")).join(`
+`)}function A_(e){return e.split(`
+`).map(t=>nd.test(t)||rd.test(t)?t:t.replace(/^(\s*[-*+]\s+)/,"$1[ ] ")).join(`
+`)}function L_(e){return e.split(`
+`).map(t=>ed.test(t)||td.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)/,"$1[ ] ")).join(`
+`)}function P_(e){return e.split(`
+`).map(t=>nd.test(t)?t:t.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")).join(`
+`)}function F_(e){return e.split(`
+`).map(t=>ed.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)\[[^\]]{1}\]/,"$1[ ]")).join(`
+`)}function N_(e){return e.split(`
+`).map(t=>rd.test(t)?t:t.replace(/^(\s*[-*+]\s+)\[\s\]/,"$1[x]")).join(`
+`)}function O_(e){return e.split(`
+`).map(t=>td.test(t)?t:t.replace(/^(\s*\d+[.)]\s+)\[\s\]/,"$1[x]")).join(`
+`)}function R_(e){return e.split(`
+`).map(r=>Ia.test(r)?r.replace(/^(\s*)[-+*]\s+/,"$1"):r).join(`
+`)}var Cy={"editor:toggle-bold":e=>{Mi(e,wy,b_,"**")},"editor:toggle-code":e=>{Mi(e,xy,E_,"`")},"editor:toggle-italics":e=>{Mi(e,Ey,w_,"*")},"editor:toggle-highlight":e=>{Mi(e,ky,x_,"==")},"editor:toggle-strikethrough":e=>{Mi(e,Sy,k_,"~~")},"editor:toggle-blockquote":e=>{ps(e,S_,__,C_)},"editor:toggle-bullet-list":e=>{ps(e,Ia,_y,R_)},"editor:toggle-numbered-list":e=>{ps(e,Ma,M_,I_)},"editor:toggle-checklist-status":e=>{let t=On(e),r=t.selection.end===t.selection.start,n=Di({text:t.text,selection:t.selection}),i=Lt(e,n),a=i.selectedText,o=Ia.test(a),s=Ma.test(a);!o&&!s?a=_y(a):o?nd.test(a)?a=N_(a):rd.test(a)?a=P_(a):a=A_(a):ed.test(a)?a=O_(a):td.test(a)?a=F_(a):a=L_(a);let u=At(e,a);if(r){let l=a.length-i.selectedText.length;Lt(e,{start:t.selection.start+l,end:t.selection.end+l})}else Lt(e,{start:i.selection.start,end:u.selection.end})}},id={"(":e=>cn(e,"(",")",!1),"[":e=>cn(e,"[","]",!1,!0),"{":e=>cn(e,"{","}",!1),"'":e=>cn(e,"'","'",!1),'"':e=>cn(e,'"','"',!1)},ad={"*":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)},H_={"(":")","[":"]","{":"}","'":"'",'"':'"',"*":"*",_:"_","`":"`","=":"=","~":"~",$:"$","%":"%"};function Ty(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===H_[n])return Lt(e,{start:r.selection.end,end:r.selection.end+1}),At(e,""),!0}function Dy(e){return Ty(e,id)}function My(e){return Ty(e,ad)}function B_(e,t,r){let n=t?" ":" ".repeat(r);return e.split(`
`).map(i=>n+i).join(`
-`)}function z0(e,t,r){let n=t?"\\t":" ".repeat(r),i=new RegExp(`^${n}`);return e.split(`
+`)}function K_(e,t,r){let n=t?"\\t":" ".repeat(r),i=new RegExp(`^${n}`);return e.split(`
`).map(a=>i.test(a)?a.replace(i,""):a).join(`
-`)}function av(e,t,r,n){let i=Tn(e);if(t){let l=pi(i),c=Mt(e,l);if(Tt(e,z0(c.selectedText,r,n)),i.selection.start===i.selection.end){let d=r?1:n;Mt(e,{start:i.selection.start-d,end:i.selection.end-d})}return!0}let a=pi(i),o=Mt(e,a),u=V0(o.selectedText,r,n).replace(/^(\s*)(\d+)([.)]\s)/,(l,c,d,f)=>`${c}1${f}`);return Tt(e,u),!0}function ov(e){let t=Tn(e);if(t.selection.start!==t.selection.end)return!1;let r=pi(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 Mt(e,{start:r.start-1,end:r.end}),Tt(e,`
-`),!0;if(/^(\s*\d[.)]\s+(?:\[[^\]]\]\s*)?)$/.test(i))return Mt(e,{start:r.start-1,end:r.end}),Tt(e,`
-`),!0;if(va.test(n)){let a=n.match(/^(\s*[-*+]\s+(?:\[[^\]]\]\s*)?)/)[1];return pa(e,`
-${a.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")}`),!0}if(ya.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 pa(e,`
-${s}`),!0}return!1}function Vn(e,t){return zu.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 cr=R.forwardRef(function({onEnter:t,onEscape:r,onSubmit:n,...i},a){let{view:o,stateManager:s}=R.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=Yy({isInputVisible:!0,onEnter:t,onEscape:r,onKeyDown:m=>{if(m.key==="Backspace"){let v=rv(m.target);return v||iv(m.target)}if(Vn(m,s)){let v=ov(m.target);if(v)return m.preventDefault(),v}if(m.key==="Tab")return m.preventDefault(),av(m.target,m.shiftKey,c,d);if(u){let v=Vu[m.key];if(v&&v(m.target))return m.preventDefault(),!0}if(l){if(f&&m.key==="[")return!1;let v=Wu[m.key];if(v&&v(m.target))return m.preventDefault(),!0}return!1}});return R.useEffect(()=>{let m=v=>{let b=tv[v];b&&b(p.ref.current)};return o.emitter.on("hotkey",m),()=>{o.emitter.off("hotkey",m)}},[o]),y(S,null,y("div",{"data-replicated-value":i.value,className:V("grow-wrap")},y("textarea",{"data-ignore-drag":!0,rows:1,className:V("item-input"),...i,...p,ref:m=>{p.ref.current=m,a&&typeof a=="function"?a(m):a&&(a.current=m)}})),zu.Platform.isMobile&&y("button",{onPointerDown:n,className:V("item-submit-button")},B("Submit")))});h();var Yu=ye(sv());h();var ur=ye(require("obsidian"));var j0=["bmp","png","jpg","jpeg","gif","svg"],q0=["mp3","wav","m4a","3gp","flac","ogg","oga"],Y0=["mp4","webm","ogv"],J0=/\u00A0/g,G0=/[!"#$%&()*+,.:;<=>?@^`{|}~/[\]\\]/g;function lv(e){return e.replace(G0," ").replace(/\s+/g," ").trim()}function Ir(e){let r=e.replace(J0," ").normalize("NFC").split(/\|(.*)/),n=r[0].split(/#(.*)/);return{root:n[0],subpath:n[1]?"#"+n[1]:"",alias:r[1]||""}}function Q0(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(;ao&&lv(l.heading).toLowerCase()===lv(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 X0(e){e.querySelectorAll(".task-list-item-checkbox").forEach((r,n)=>{r.dataset.checkboxIndex=n.toString()})}function Z0(e,t){e.querySelectorAll(".internal-link").forEach(n=>{let i=Ir(n.getAttr("href"));t.app.metadataCache.getFirstLinkpathDest(i.root,t.file.path)||n.addClass("is-unresolved")})}function e_(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 cv(e,t,r){e.empty(),e.createEl("audio",{attr:{controls:"",src:r.app.vault.getResourcePath(t)}}),e.addClasses(["media-embed","is-loaded"])}function t_(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(),cv(e,t,r))};n.addEventListener("loadedmetadata",i)}),e.addClasses(["media-embed","is-loaded"])}async function uv(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=Q0(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:`${B("Unable to find")} ${t.root}${t.subpath}`,boundary:null}}function dv(e,t,r,n){r.getWindow().setTimeout(async()=>{if(!r.plugin.windowRegistry.has(r.getWindow()))return;if(r.plugin.windowRegistry.get(r.getWindow()).viewMap.has(r.id)){let{markdown:a}=await uv(e,t,r);if(!a)return;a.startsWith(B("Unable to find"))?n>0&&dv(e,t,r,--n):r.plugin.stateManagers.forEach(o=>{o.onFileMetadataChange()})}},2e3)}async function n_(e,t,r,n,i){var u;let{markdown:a,boundary:o}=await uv(t,r,n);if(!a)return;e.empty();let s=e.createDiv();if(s.addClasses(["markdown-preview-view",V("markdown-preview-view")]),s.createDiv(V("embed-link-wrapper"),l=>{l.createEl("a",{href:e.getAttr("src")||t.basename,cls:`internal-link ${V("embed-link")}`},c=>{(0,ur.setIcon)(c,"link"),c.setAttr("aria-label",t.basename)})}),await ur.MarkdownRenderer.renderMarkdown(a,s.createDiv(),t.path,n),e.addClass("is-loaded"),a.startsWith(B("Unable to find"))&&r.subpath&&r.subpath!=="#")dv(t,r,n,4);else{let l=e.findAll(".task-list-item-checkbox");(l==null?void 0:l.length)&&((u=app.metadataCache.getFileCache(t).listItems)==null||u.filter(d=>o?d.position.start.line>=o.startLine&&d.position.end.line<=o.endLine:!0).forEach((d,f)=>{l[f]&&(l[f].dataset.oStart=d.position.start.offset.toString(),l[f].dataset.oEnd=d.position.end.offset.toString(),l[f].dataset.src=t.path)}))}i>0&&await fv(s,n,--i)}function r_(e,t){e.addClass("is-loaded"),e.empty(),e.createEl("a",{cls:"file-link",href:e.getAttribute("src"),text:t.name},r=>{r.setAttribute("aria-label",B("Open in default app")),r.createSpan({},n=>(0,ur.setIcon)(n,"open-elsewhere-glyph"))})}function fv(e,t,r){return Promise.all(e.findAll(".internal-embed").map(async n=>{let i=n.getAttribute("src"),a=Ir(i),o=typeof i=="string"&&t.app.metadataCache.getFirstLinkpathDest(a.root,t.file.path);if(o instanceof ur.TFile)return j0.contains(o.extension)?e_(n,o,t):q0.contains(o.extension)?cv(n,o,t):Y0.contains(o.extension)?t_(n,o,t):o.extension==="md"?await n_(n,o,a,t,r):r_(n,o)}))}async function ba(e,t){let r=e.getWindow().document.body.createDiv();r.detach();try{await ur.MarkdownRenderer.renderMarkdown(t,r,e.file.path,e),X0(r),Z0(r,e),await fv(r,e,5)}catch(n){console.error(n)}return r}function Ju(e,t){!t||!e||(e&&!e.firstChild?e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.replaceChild(t,e.firstChild))}var wa=R.memo(function({className:t,markdownString:r,searchQuery:n,...i}){let{stateManager:a}=R.useContext(We),o=R.useRef(),s=R.useRef(),u=R.useRef();return R.useEffect(()=>{ba(a.getAView(),r).then(l=>{s.current=l,u.current=new Yu.default(l),o.current&&Ju(o.current,l)}).catch(l=>{a.setError(l),console.error(l)})},[a,r]),R.useEffect(()=>{var l,c;(l=u.current)==null||l.unmark(),n&&n.trim()&&((c=u.current)==null||c.mark(n))},[n]),y("div",{ref:l=>{o.current=l,Ju(l,s.current)},className:pt(["markdown-preview-view",V("markdown-preview-view"),t]),...i})}),pv=R.memo(function({dom:t,className:r,searchQuery:n,...i}){let{stateManager:a}=R.useContext(We),o=R.useMemo(()=>t.cloneNode(!0),[t,a]),s=R.useMemo(()=>new Yu.default(o),[o]);return R.useEffect(()=>{s.unmark(),n&&n.trim()&&s.mark(n)},[s,n]),y("div",{ref:u=>{Ju(u,o)},className:pt(["markdown-preview-view",V("markdown-preview-view"),r]),...i})});h();var Ea=ye(require("obsidian"));function i_(e,t){if(t)return t.from((0,Ea.moment)());let r=(0,Ea.moment)().startOf("day");if(r.isSame(e,"day"))return B("today");let n=e.diff(r,"day");return n===-1?B("yesterday"):n===1?B("tomorrow"):e.from(r)}function hv({item:e,stateManager:t}){if(!t.useSetting("show-relative-date")||!e.data.metadata.date)return null;let n=i_(e.data.metadata.date,e.data.metadata.time);return y("span",{className:V("item-metadata-date-relative")},n)}function mv({item:e,stateManager:t,filePath:r,onEditDate:n,onEditTime:i}){let a=t.useSetting("hide-date-display"),o=t.useSetting("date-format"),s=t.useSetting("time-format"),u=t.useSetting("date-display-format"),l=t.useSetting("link-date-to-daily-note");if(a||!e.data.metadata.date)return null;let c=e.data.metadata.date.format(o);if(!c)return null;let d=!!e.data.metadata.time,f=e.data.metadata.date.format(u),p=d?e.data.metadata.time.format(s):null,m=c?(0,Ea.getLinkpath)(c):null,v=c?t.app.metadataCache.getFirstLinkpathDest(m,r):null,b=m&&l?y("a",{href:m,"data-href":m,className:`internal-link ${v?"":"is-unresolved"}`,target:"blank",rel:"noopener"},f):f,k={};return l||(k["aria-label"]=B("Change date"),k.onClick=n),y("span",{"aria-label":"hello",className:V("item-metadata-date-wrapper")},y("span",{...k,className:`${V("item-metadata-date")} ${l?"":"is-button"}`},b)," ",d&&y("span",{onClick:i,className:`${V("item-metadata-time")} is-button`,"aria-label":B("Change time")},p))}function a_(e){let{stateManager:t,boardModifiers:r}=R.useContext(We),n=Nn();return R.useMemo(()=>({onEditDate:o=>{var s;$o(o.view,t,{x:o.clientX,y:o.clientY},Uo({stateManager:t,boardModifiers:r,item:e,hasDate:!0,path:n}),(s=e.data.metadata.date)==null?void 0:s.toDate())},onEditTime:o=>{Wo(o.view,t,{x:o.clientX,y:o.clientY},Vo({stateManager:t,boardModifiers:r,item:e,hasTime:!0,path:n}),e.data.metadata.time)}}),[r,n,e,t])}function o_(e,t){let r=0;return e.replace(/^(\s*[-+*]\s+?\[)([^\]])(\]\s+)/gm,(n,i,a,o)=>{let s=n;return r===t&&(a===" "?s=`${i}x${o}`:s=`${i} ${o}`),r++,s})}async function s_(e){let t=app.vault.getAbstractFileByPath(e.dataset.src);if(!(t instanceof gv.TFile))return;let r=await app.vault.cachedRead(t),n=parseInt(e.dataset.oStart),i=parseInt(e.dataset.oEnd),o=r.substring(n,i).replace(/^(.+?)\[(.)\](.+)$/,(s,u,l,c)=>l!==" "?(e.parentElement.removeClass("is-checked"),e.parentElement.dataset.task="",`${u}[ ]${c}`):(e.parentElement.addClass("is-checked"),e.parentElement.dataset.task="x",`${u}[x]${c}`));await app.vault.modify(t,`${r.substring(0,n)}${o}${r.substring(i)}`)}var yv=R.memo(function({item:t,isEditing:r,setIsEditing:n,searchQuery:i}){var D;let[a,o]=R.useState(t.data.titleRaw),{stateManager:s,filePath:u,boardModifiers:l,view:c}=R.useContext(We),d=s.useSetting("hide-tags-display"),f=Nn(),{onEditDate:p,onEditTime:m}=a_(t);R.useEffect(()=>{r&&o(t.data.titleRaw)},[r]);let v=R.useCallback(I=>{if(!Vn(I,s))return I.preventDefault(),s.updateItemContent(t,a).then(H=>{l.updateItem(f,H)}).catch(H=>{s.setError(H),console.error(H)}),n(!1),!0},[s,a,t,f]),b=R.useCallback(()=>{s.updateItemContent(t,a).then(I=>{l.updateItem(f,I)}).catch(I=>{s.setError(I),console.error(I)}),n(!1)},[s,a,t,f]),k=R.useCallback(()=>(n(!1),o(t.data.titleRaw),!0),[t]),T=R.useCallback(I=>{let H=I.target;if(H.hasClass("task-list-item-checkbox")){if(H.dataset.src)return s_(H);let C=parseInt(H.dataset.checkboxIndex,10);s.updateItemContent(t,o_(t.data.titleRaw,C)).then(F=>{l.updateItem(f,F)}).catch(F=>{s.setError(F),console.error(F)})}},[f,l,s,t]);return r?y("div",{className:V("item-input-wrapper")},y(cr,{className:V("item-input"),onChange:I=>o(I.target.value),onEnter:v,onEscape:k,onSubmit:b,value:a,onPaste:I=>{Zo(I,s,c.getWindow())}})):y("div",{className:V("item-title")},y(pv,{className:V("item-markdown"),dom:t.data.dom,searchQuery:i,onPointerDown:T}),y("div",{className:V("item-metadata")},y(hv,{item:t,stateManager:s}),y(mv,{item:t,stateManager:s,filePath:u,onEditDate:p,onEditTime:m}),!d&&!!((D=t.data.metadata.tags)==null?void 0:D.length)&&y("div",{className:V("item-tags")},t.data.metadata.tags.map((I,H)=>y("a",{href:I,key:H,className:`tag ${V("item-tag")} ${I.toLocaleLowerCase().contains(i)?"is-search-match":""}`},y("span",null,I[0]),I.slice(1))))))});h();var ss=ye(require("obsidian"));var l_=/[\\/:"*?<>|]+/g,c_=/!?\[\[([^\]]*)\.[^\]]+\]\]/g,u_=/!?\[\[([^\]]*)\]\]/g,d_=/!?\[([^\]]*)\]\([^)]*\)/g;function vv({setIsEditing:e,item:t,path:r,boardModifiers:n,stateManager:i}){return R.useCallback((a,o)=>{if(o)app.workspace.onLinkContextMenu(a,(0,ss.getLinkpath)(o),i.file.path);else{let s={x:a.clientX,y:a.clientY},u=!!t.data.metadata.date,l=!!t.data.metadata.time,c=new ss.Menu().addItem(d=>{d.setIcon("pencil").setTitle(B("Edit card")).onClick(()=>e(!0))});c.addItem(d=>{d.setIcon("create-new").setTitle(B("New note from card")).onClick(async()=>{let f=t.data.title.split(`
-`)[0].trim(),p=f.replace(c_,"$1").replace(u_,"$1").replace(d_,"$1").replace(l_," ").trim(),m=i.getSetting("new-note-folder"),v=i.getSetting("new-note-template"),b=m?i.app.vault.getAbstractFileByPath(m):i.app.fileManager.getNewFileParent(i.file.path),k=await i.app.fileManager.createNewMarkdownFile(b,p),T=i.app.workspace.splitActiveLeaf();await T.openFile(k),i.app.workspace.setActiveLeaf(T,!1,!0),await ep(i,v);let D=t.data.titleRaw.replace(f,i.app.fileManager.generateMarkdownLink(k,i.file.path));i.updateItemContent(t,D).then(I=>{n.updateItem(r,I)}).catch(I=>{i.setError(I),console.error(I)})})}).addItem(d=>{d.setIcon("links-coming-in").setTitle(B("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+t.data.blockId)}`);else{let f=Ve(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("split").setTitle(B("Split card")).onClick(async()=>{let f=t.data.titleRaw.split(/[\r\n]+/g).map(m=>m.trim()),p=await Promise.all(f.map(m=>i.getNewItem(m)));n.splitItem(r,p)})}),c.addItem(d=>{d.setIcon("documents").setTitle(B("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("Insert card before")).onClick(async()=>n.insertItems(r,[await i.getNewItem("",!1,!0)]))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("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("sheets-in-box").setTitle(B("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("trash").setTitle(B("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("calendar-with-checkmark").setTitle(u?B("Edit date"):B("Add date")).onClick(()=>{var f;$o(a.view,i,s,Uo({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("cross").setTitle(B("Remove date")).onClick(()=>{let f=i.getSetting("link-date-to-daily-note"),p=i.getSetting("date-trigger"),m=f?"(?:\\[[^\\]]+\\]\\([^\\)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",v=new RegExp(`(^|\\s)${Sn(p)}${m}`),b=t.data.titleRaw.replace(v,"").trim();i.updateItemContent(t,b).then(k=>{n.updateItem(r,k)}).catch(k=>{i.setError(k),console.error(k)})})}),c.addItem(d=>{d.setIcon("clock").setTitle(l?B("Edit time"):B("Add time")).onClick(()=>{Wo(a.view,i,s,Vo({stateManager:i,boardModifiers:n,item:t,hasTime:l,path:r}),t.data.metadata.time)})}),l&&c.addItem(d=>{d.setIcon("cross").setTitle(B("Remove time")).onClick(()=>{let f=i.getSetting("time-trigger"),p=new RegExp(`(^|\\s)${Sn(f)}{([^}]+)}`),m=t.data.titleRaw.replace(p,"").trim();i.updateItemContent(t,m).then(v=>{n.updateItem(r,v)}).catch(v=>{i.setError(v),console.error(v)})})})),c.showAtPosition(s)}},[e,t,r,n,i])}h();var bv=R.memo(function({isEditing:t,setIsEditing:r,showMenu:n}){let i=R.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return y("div",{...i,className:V("item-postfix-button-wrapper")},t?y("button",{"data-ignore-drag":!0,onPointerDown:a=>{a.preventDefault()},onClick:()=>{r(!1)},className:`${V("item-postfix-button")} is-enabled`,"aria-label":B("Cancel")},y(Zt,{name:"cross"})):y("button",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className:V("item-postfix-button"),"aria-label":B("More options")},y(Zt,{name:"vertical-three-dots"})))});h();var ls=ye(require("obsidian"));function wv({item:e,isSettingsVisible:t,searchQuery:r}){return t||!e.data.metadata.fileMetadata?null:y("div",{className:V("item-metadata-wrapper")},y(p_,{metadata:e.data.metadata.fileMetadata,order:e.data.metadata.fileMetadataOrder,searchQuery:r}))}function Ev(e,t){if(e.ts){let r=t.getSetting("date-display-format");return(0,ls.moment)(e.ts).format(r)}return null}function xv(e,t){if(!e.path)return null;let r=app.vault.getAbstractFileByPath(e.path);if(r&&r instanceof ls.TFile){let n=app.fileManager.generateMarkdownLink(r,t.file.path,e.subpath,e.display);return`${e.embed?"!":""}${n}`}return`${e.embed?"!":""}[[${e.path}${e.display?`|${e.display}`:""}]]`}function f_({data:e,searchQuery:t}){let{view:r,stateManager:n}=R.useContext(We);if(Array.isArray(e.value))return y("span",{className:V("meta-value")},e.value.map((s,u,l)=>{let c=`${s}`,d=typeof s=="object"&&!Array.isArray(s)&&(Ev(s,n)||xv(s,r)),f=c.toLocaleLowerCase().contains(t);return y(S,null,d||e.containsMarkdown?y(wa,{className:"inline",markdownString:d||c,searchQuery:t}):f?y("span",{className:"is-search-match"},c):c,u{let a=t[i];return y("tr",{key:i,className:V("meta-row")},!a.shouldHideLabel&&y("td",{className:`${V("meta-key")} ${(a.label||i).toLocaleLowerCase().contains(n)?"is-search-match":""}`,"data-key":i},y("span",null,a.label||i)),y("td",{colSpan:a.shouldHideLabel?2:1,className:V("meta-value-wrapper"),"data-value":Array.isArray(a.value)?a.value.join(", "):`${a.value}`},i==="tags"?a.value.map((o,s)=>y("a",{href:o,key:s,className:`tag ${V("item-tag")} ${o.toLocaleLowerCase().contains(n)?"is-search-match":""}`},y("span",null,o[0]),o.slice(1))):y(f_,{data:a,searchQuery:n})))})))});var kv=R.memo(function({item:t,shouldMarkItemsComplete:r,isMatch:n,searchQuery:i}){let{stateManager:a,boardModifiers:o}=R.useContext(We),[s,u]=R.useState(!1),l=R.useContext(wt);R.useEffect(()=>{let v=()=>{s&&u(!1)};return l.dragManager.emitter.on("dragStart",v),()=>{l.dragManager.emitter.off("dragStart",v)}},[l,s]),R.useEffect(()=>{t.data.forceEditMode&&u(!0)},[t.data.forceEditMode]);let c=Nn(),d=vv({boardModifiers:o,item:t,setIsEditing:u,stateManager:a,path:c}),f=R.useCallback(v=>{if(v.target instanceof v.view.HTMLTextAreaElement)return;v.preventDefault(),v.stopPropagation();let b=v.target instanceof v.view.HTMLAnchorElement&&v.target.hasClass("internal-link")?v.target.dataset.href:void 0;d(v,b)},[d]),p=R.useCallback(()=>{u(!0)},[u]),m=R.useMemo(()=>s?{"data-ignore-drag":!0}:{},[s]);return y("div",{onContextMenu:f,onDblClick:p,className:V("item-content-wrapper"),...m},y("div",{className:V("item-title-wrapper"),...m},y(Ng,{boardModifiers:o,item:t,path:c,shouldMarkItemsComplete:r,stateManager:a}),y(yv,{isEditing:s,item:t,searchQuery:n?i:void 0,setIsEditing:u}),y(bv,{isEditing:s,setIsEditing:u,showMenu:d})),y(wv,{searchQuery:n?i:void 0,isSettingsVisible:s,item:t}))}),Gu=R.memo(function(t){let r=R.useRef(null),n=R.useRef(null),i=R.useContext(Qa),{itemIndex:a,...o}=t;fi(n,n);let s=i?o.item.data.titleSearch.contains(i):!1,u=Cg(o.item);return i&&(s?u.push("is-search-hit"):u.push("is-search-miss")),y("div",{ref:n,className:V("item-wrapper")},y("div",{ref:r,className:pt([V("item"),...u])},t.isStatic?y(kv,{...o,isMatch:s,searchQuery:i}):y(nr,{elementRef:r,measureRef:n,id:t.item.id,index:a,data:t.item},y(kv,{...o,isMatch:s,searchQuery:i}))))}),Sv=R.memo(function({isStatic:t,items:r,shouldMarkItemsComplete:n}){return y(S,null,r.map((i,a)=>y(Gu,{key:i.id,item:i,itemIndex:a,shouldMarkItemsComplete:n,isStatic:t})))});h();h();var h_=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})};function cs(e){let t=0,r=0,n=e;do t+=n.offsetTop||0,r+=n.offsetLeft||0,n=n.offsetParent;while(n);return{top:t,left:r}}var _v=class{constructor(t){this.element=t}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(t,r){return cs(t).left-cs(r).left}getVerticalElementScrollOffset(t,r){return cs(t).top-cs(r).top}scrollTo(t,r){this.element.scrollLeft=t,this.element.scrollTop=r}},Dv=class{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(t){return(window.scrollX||document.documentElement.scrollLeft)+t.getBoundingClientRect().left}getVerticalElementScrollOffset(t){return(window.scrollY||document.documentElement.scrollTop)+t.getBoundingClientRect().top}scrollTo(t,r){window.scrollTo(t,r)}},zn={elements:[],cancelMethods:[],add:(e,t)=>{zn.elements.push(e),zn.cancelMethods.push(t)},remove:(e,t)=>{let r=zn.elements.indexOf(e);r>-1&&(t&&zn.cancelMethods[r](),zn.elements.splice(r,1),zn.cancelMethods.splice(r,1))}},Cv=typeof window!="undefined",m_={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:Cv?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};function g_(e,t={}){return h_(this,void 0,void 0,function*(){if(Cv){if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill."}else return new Promise(I=>{I(!1)});let r,n,i,a=Object.assign(Object.assign({},m_),t),o=a.elementToScroll===window,s=!!a.elementToScroll.nodeName;if(!o&&!s)throw"Element to scroll needs to be either window or DOM element.";let u=o?document.documentElement:a.elementToScroll;getComputedStyle(u).getPropertyValue("scroll-behavior")==="smooth"&&console.warn(`${u.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);let c=o?new Dv:new _v(a.elementToScroll);if(e instanceof Element){if(i=e,s&&(!a.elementToScroll.contains(i)||a.elementToScroll.isSameNode(i)))throw"options.elementToScroll has to be a parent of scrollToElement";r=c.getHorizontalElementScrollOffset(i,a.elementToScroll),n=c.getVerticalElementScrollOffset(i,a.elementToScroll)}else if(typeof e=="number")r=c.getHorizontalScroll(),n=e;else if(Array.isArray(e)&&e.length===2)r=e[0]===null?c.getHorizontalScroll():e[0],n=e[1]===null?c.getVerticalScroll():e[1];else throw`Wrong function signature. Check documentation.
+`)}function Iy(e,t,r,n){let i=On(e);if(t){let l=Di(i),c=Lt(e,l);if(At(e,K_(c.selectedText,r,n)),i.selection.start===i.selection.end){let d=r?1:n;Lt(e,{start:i.selection.start-d,end:i.selection.end-d})}return!0}let a=Di(i),o=Lt(e,a),u=B_(o.selectedText,r,n).replace(/^(\s*)(\d+)([.)]\s)/,(l,c,d,f)=>`${c}1${f}`);return At(e,u),!0}function Ay(e){let t=On(e);if(t.selection.start!==t.selection.end)return!1;let r=Di(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 Lt(e,{start:r.start-1,end:r.end}),At(e,`
+`),!0;if(/^(\s*\d[.)]\s+(?:\[[^\]]\]\s*)?)$/.test(i))return Lt(e,{start:r.start-1,end:r.end}),At(e,`
+`),!0;if(Ia.test(n)){let a=n.match(/^(\s*[-*+]\s+(?:\[[^\]]\]\s*)?)/)[1];return _a(e,`
+${a.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")}`),!0}if(Ma.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 _a(e,`
+${s}`),!0}return!1}function Xn(e,t){return od.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 Er=F.forwardRef(function({onEnter:t,onEscape:r,onSubmit:n,...i},a){let{view:o,stateManager:s}=F.useContext(Ve),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=by({isInputVisible:!0,onEnter:t,onEscape:r,onKeyDown:m=>{if(m.key==="Backspace"){let y=Dy(m.target);return y||My(m.target)}if(Xn(m,s)){let y=Ay(m.target);if(y)return m.preventDefault(),y}if(m.key==="Tab")return m.preventDefault(),Iy(m.target,m.shiftKey,c,d);if(u){let y=ad[m.key];if(y&&y(m.target))return m.preventDefault(),!0}if(l){if(f&&m.key==="[")return!1;let y=id[m.key];if(y&&y(m.target))return m.preventDefault(),!0}return!1}});return F.useEffect(()=>{let m=y=>{let b=Cy[y];b&&b(p.ref.current)};return o.emitter.on("hotkey",m),()=>{o.emitter.off("hotkey",m)}},[o]),g(S,null,g("div",{"data-replicated-value":i.value,className:$("grow-wrap")},g("textarea",{"data-ignore-drag":!0,rows:1,className:$("item-input"),...i,...p,ref:m=>{p.ref.current=m,a&&typeof a=="function"?a(m):a&&(a.current=m)}})),od.Platform.isMobile&&g("button",{onPointerDown:n,className:$("item-submit-button")},B("Submit")))});h();var cd=ge(Ly());h();var xr=ge(require("obsidian"));var $_=["bmp","png","jpg","jpeg","gif","svg"],U_=["mp3","wav","m4a","3gp","flac","ogg","oga"],W_=["mp4","webm","ogv"],V_=/\u00A0/g,z_=/[!"#$%&()*+,.:;<=>?@^`{|}~/[\]\\]/g;function Py(e){return e.replace(z_," ").replace(/\s+/g," ").trim()}function Ur(e){let r=e.replace(V_," ").normalize("NFC").split(/\|(.*)/),n=r[0].split(/#(.*)/);return{root:n[0],subpath:n[1]?"#"+n[1]:"",alias:r[1]||""}}function j_(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(;ao&&Py(l.heading).toLowerCase()===Py(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 q_(e){e.querySelectorAll(".task-list-item-checkbox").forEach((r,n)=>{r.dataset.checkboxIndex=n.toString()})}function Y_(e,t){e.querySelectorAll(".internal-link").forEach(n=>{let i=Ur(n.getAttr("href"));t.app.metadataCache.getFirstLinkpathDest(i.root,t.file.path)||n.addClass("is-unresolved")})}function J_(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 Fy(e,t,r){e.empty(),e.createEl("audio",{attr:{controls:"",src:r.app.vault.getResourcePath(t)}}),e.addClasses(["media-embed","is-loaded"])}function G_(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(),Fy(e,t,r))};n.addEventListener("loadedmetadata",i)}),e.addClasses(["media-embed","is-loaded"])}async function Ny(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=j_(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:`${B("Unable to find")} ${t.root}${t.subpath}`,boundary:null}}function Oy(e,t,r,n){r.getWindow().setTimeout(async()=>{if(!r.plugin.windowRegistry.has(r.getWindow()))return;if(r.plugin.windowRegistry.get(r.getWindow()).viewMap.has(r.id)){let{markdown:a}=await Ny(e,t,r);if(!a)return;a.startsWith(B("Unable to find"))?n>0&&Oy(e,t,r,--n):r.plugin.stateManagers.forEach(o=>{o.onFileMetadataChange()})}},2e3)}async function Q_(e,t,r,n,i){var u;let{markdown:a,boundary:o}=await Ny(t,r,n);if(!a)return;e.empty();let s=e.createDiv();if(s.addClasses(["markdown-preview-view",$("markdown-preview-view")]),s.createDiv($("embed-link-wrapper"),l=>{l.createEl("a",{href:e.getAttr("src")||t.basename,cls:`internal-link ${$("embed-link")}`},c=>{(0,xr.setIcon)(c,"link"),c.setAttr("aria-label",t.basename)})}),await xr.MarkdownRenderer.renderMarkdown(a,s.createDiv(),t.path,n),e.addClass("is-loaded"),a.startsWith(B("Unable to find"))&&r.subpath&&r.subpath!=="#")Oy(t,r,n,4);else{let l=e.findAll(".task-list-item-checkbox");(l==null?void 0:l.length)&&((u=app.metadataCache.getFileCache(t).listItems)==null||u.filter(d=>o?d.position.start.line>=o.startLine&&d.position.end.line<=o.endLine:!0).forEach((d,f)=>{l[f]&&(l[f].dataset.oStart=d.position.start.offset.toString(),l[f].dataset.oEnd=d.position.end.offset.toString(),l[f].dataset.src=t.path)}))}i>0&&await Ry(s,n,--i)}function X_(e,t){e.addClass("is-loaded"),e.empty(),e.createEl("a",{cls:"file-link",href:e.getAttribute("src"),text:t.name},r=>{r.setAttribute("aria-label",B("Open in default app")),r.createSpan({},n=>(0,xr.setIcon)(n,"open-elsewhere-glyph"))})}function Ry(e,t,r){return Promise.all(e.findAll(".internal-embed").map(async n=>{let i=n.getAttribute("src"),a=Ur(i),o=typeof i=="string"&&t.app.metadataCache.getFirstLinkpathDest(a.root,t.file.path);if(o instanceof xr.TFile)return $_.contains(o.extension)?J_(n,o,t):U_.contains(o.extension)?Fy(n,o,t):W_.contains(o.extension)?G_(n,o,t):o.extension==="md"?await Q_(n,o,a,t,r):X_(n,o)}))}async function Aa(e,t){let r=e.getWindow().document.body.createDiv();r.detach();try{await xr.MarkdownRenderer.renderMarkdown(t,r,e.file.path,e),q_(r),Y_(r,e),await Ry(r,e,5)}catch(n){console.error(n)}return r}function ud(e,t){!t||!e||(e&&!e.firstChild?e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.replaceChild(t,e.firstChild))}var La=F.memo(function({className:t,markdownString:r,searchQuery:n,...i}){let{stateManager:a}=F.useContext(Ve),o=F.useRef(),s=F.useRef(),u=F.useRef();return F.useEffect(()=>{Aa(a.getAView(),r).then(l=>{s.current=l,u.current=new cd.default(l),o.current&&ud(o.current,l)}).catch(l=>{a.setError(l),console.error(l)})},[a,r]),F.useEffect(()=>{var l,c;(l=u.current)==null||l.unmark(),n&&n.trim()&&((c=u.current)==null||c.mark(n))},[n]),g("div",{ref:l=>{o.current=l,ud(l,s.current)},className:mt(["markdown-preview-view",$("markdown-preview-view"),t]),...i})}),Hy=F.memo(function({dom:t,className:r,searchQuery:n,...i}){let{stateManager:a}=F.useContext(Ve),o=F.useMemo(()=>t.cloneNode(!0),[t,a]),s=F.useMemo(()=>new cd.default(o),[o]);return F.useEffect(()=>{s.unmark(),n&&n.trim()&&s.mark(n)},[s,n]),g("div",{ref:u=>{ud(u,o)},className:mt(["markdown-preview-view",$("markdown-preview-view"),r]),...i})});h();var Pa=ge(require("obsidian"));function Z_(e,t){if(t)return t.from((0,Pa.moment)());let r=(0,Pa.moment)().startOf("day");if(r.isSame(e,"day"))return B("today");let n=e.diff(r,"day");return n===-1?B("yesterday"):n===1?B("tomorrow"):e.from(r)}function By({item:e,stateManager:t}){if(!t.useSetting("show-relative-date")||!e.data.metadata.date)return null;let n=Z_(e.data.metadata.date,e.data.metadata.time);return g("span",{className:$("item-metadata-date-relative")},n)}function Ky({item:e,stateManager:t,filePath:r,onEditDate:n,onEditTime:i}){let a=t.useSetting("hide-date-display"),o=t.useSetting("date-format"),s=t.useSetting("time-format"),u=t.useSetting("date-display-format"),l=t.useSetting("link-date-to-daily-note");if(a||!e.data.metadata.date)return null;let c=e.data.metadata.date.format(o);if(!c)return null;let d=!!e.data.metadata.time,f=e.data.metadata.date.format(u),p=d?e.data.metadata.time.format(s):null,m=c?(0,Pa.getLinkpath)(c):null,y=c?t.app.metadataCache.getFirstLinkpathDest(m,r):null,b=m&&l?g("a",{href:m,"data-href":m,className:`internal-link ${y?"":"is-unresolved"}`,target:"blank",rel:"noopener"},f):f,x={};return l||(x["aria-label"]=B("Change date"),x.onClick=n),g("span",{"aria-label":"hello",className:$("item-metadata-date-wrapper")},g("span",{...x,className:`${$("item-metadata-date")} ${l?"":"is-button"}`},b)," ",d&&g("span",{onClick:i,className:`${$("item-metadata-time")} is-button`,"aria-label":B("Change time")},p))}function eC(e){let{stateManager:t,boardModifiers:r}=F.useContext(Ve),n=Vn();return F.useMemo(()=>({onEditDate:o=>{var s;ns(o.view,t,{x:o.clientX,y:o.clientY},rs({stateManager:t,boardModifiers:r,item:e,hasDate:!0,path:n}),(s=e.data.metadata.date)==null?void 0:s.toDate())},onEditTime:o=>{is(o.view,t,{x:o.clientX,y:o.clientY},as({stateManager:t,boardModifiers:r,item:e,hasTime:!0,path:n}),e.data.metadata.time)}}),[r,n,e,t])}function tC(e){return(e.useSetting("tag-colors")||[]).reduce((r,n)=>(n.tagKey&&(r[n.tagKey]=n),r),{})}function nC(e,t){let r=0;return e.replace(/^(\s*[-+*]\s+?\[)([^\]])(\]\s+)/gm,(n,i,a,o)=>{let s=n;return r===t&&(a===" "?s=`${i}x${o}`:s=`${i} ${o}`),r++,s})}async function rC(e){let t=app.vault.getAbstractFileByPath(e.dataset.src);if(!(t instanceof $y.TFile))return;let r=await app.vault.cachedRead(t),n=parseInt(e.dataset.oStart),i=parseInt(e.dataset.oEnd),o=r.substring(n,i).replace(/^(.+?)\[(.)\](.+)$/,(s,u,l,c)=>l!==" "?(e.parentElement.removeClass("is-checked"),e.parentElement.dataset.task="",`${u}[ ]${c}`):(e.parentElement.addClass("is-checked"),e.parentElement.dataset.task="x",`${u}[x]${c}`));await app.vault.modify(t,`${r.substring(0,n)}${o}${r.substring(i)}`)}var Uy=F.memo(function({item:t,isEditing:r,setIsEditing:n,searchQuery:i}){var A;let[a,o]=F.useState(t.data.titleRaw),{stateManager:s,filePath:u,boardModifiers:l,view:c}=F.useContext(Ve),d=s.useSetting("hide-tags-display"),f=tC(s),p=Vn(),{onEditDate:m,onEditTime:y}=eC(t);F.useEffect(()=>{r&&o(t.data.titleRaw)},[r]);let b=F.useCallback(N=>{if(!Xn(N,s))return N.preventDefault(),s.updateItemContent(t,a).then(T=>{l.updateItem(p,T)}).catch(T=>{s.setError(T),console.error(T)}),n(!1),!0},[s,a,t,p]),x=F.useCallback(()=>{s.updateItemContent(t,a).then(N=>{l.updateItem(p,N)}).catch(N=>{s.setError(N),console.error(N)}),n(!1)},[s,a,t,p]),D=F.useCallback(()=>(n(!1),o(t.data.titleRaw),!0),[t]),C=F.useCallback(N=>{let T=N.target;if(T.hasClass("task-list-item-checkbox")){if(T.dataset.src)return rC(T);let O=parseInt(T.dataset.checkboxIndex,10);s.updateItemContent(t,nC(t.data.titleRaw,O)).then(W=>{l.updateItem(p,W)}).catch(W=>{s.setError(W),console.error(W)})}},[p,l,s,t]);return r?g("div",{className:$("item-input-wrapper")},g(Er,{className:$("item-input"),onChange:N=>o(N.target.value),onEnter:b,onEscape:D,onSubmit:x,value:a,onPaste:N=>{ms(N,s,c.getWindow())}})):g("div",{className:$("item-title")},g(Hy,{className:$("item-markdown"),dom:t.data.dom,searchQuery:i,onPointerDown:C}),g("div",{className:$("item-metadata")},g(By,{item:t,stateManager:s}),g(Ky,{item:t,stateManager:s,filePath:u,onEditDate:m,onEditTime:y}),!d&&!!((A=t.data.metadata.tags)==null?void 0:A.length)&&g("div",{className:$("item-tags")},t.data.metadata.tags.map((N,T)=>g("a",{href:N,key:T,className:`tag ${$("item-tag")} ${N.toLocaleLowerCase().contains(i)?"is-search-match":""}`,style:!!f[N]&&{"--tag-color":f[N].color,"--tag-background-color":f[N].backgroundColor}},g("span",null,N[0]),N.slice(1))))))});h();var ks=ge(require("obsidian"));var iC=/[\\/:"*?<>|]+/g,aC=/!?\[\[([^\]]*)\.[^\]]+\]\]/g,oC=/!?\[\[([^\]]*)\]\]/g,sC=/!?\[([^\]]*)\]\([^)]*\)/g;function Wy({setIsEditing:e,item:t,path:r,boardModifiers:n,stateManager:i}){return F.useCallback((a,o)=>{if(o)app.workspace.onLinkContextMenu(a,(0,ks.getLinkpath)(o),i.file.path);else{let s={x:a.clientX,y:a.clientY},u=!!t.data.metadata.date,l=!!t.data.metadata.time,c=new ks.Menu().addItem(d=>{d.setIcon("pencil").setTitle(B("Edit card")).onClick(()=>e(!0))});c.addItem(d=>{d.setIcon("create-new").setTitle(B("New note from card")).onClick(async()=>{let f=t.data.title.split(`
+`)[0].trim(),p=f.replace(aC,"$1").replace(oC,"$1").replace(sC,"$1").replace(iC," ").trim(),m=i.getSetting("new-note-folder"),y=i.getSetting("new-note-template"),b=m?i.app.vault.getAbstractFileByPath(m):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 _p(i,y);let C=t.data.titleRaw.replace(f,i.app.fileManager.generateMarkdownLink(x,i.file.path));i.updateItemContent(t,C).then(A=>{n.updateItem(r,A)}).catch(A=>{i.setError(A),console.error(A)})})}).addItem(d=>{d.setIcon("links-coming-in").setTitle(B("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+t.data.blockId)}`);else{let f=Re(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("split").setTitle(B("Split card")).onClick(async()=>{let f=t.data.titleRaw.split(/[\r\n]+/g).map(m=>m.trim()),p=await Promise.all(f.map(m=>i.getNewItem(m)));n.splitItem(r,p)})}),c.addItem(d=>{d.setIcon("documents").setTitle(B("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("Insert card before")).onClick(async()=>n.insertItems(r,[await i.getNewItem("",!1,!0)]))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("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("sheets-in-box").setTitle(B("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("trash").setTitle(B("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("calendar-with-checkmark").setTitle(u?B("Edit date"):B("Add date")).onClick(()=>{var f;ns(a.view,i,s,rs({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("cross").setTitle(B("Remove date")).onClick(()=>{let f=i.getSetting("link-date-to-daily-note"),p=i.getSetting("date-trigger"),m=f?"(?:\\[[^\\]]+\\]\\([^\\)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",y=new RegExp(`(^|\\s)${Ln(p)}${m}`),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("clock").setTitle(l?B("Edit time"):B("Add time")).onClick(()=>{is(a.view,i,s,as({stateManager:i,boardModifiers:n,item:t,hasTime:l,path:r}),t.data.metadata.time)})}),l&&c.addItem(d=>{d.setIcon("cross").setTitle(B("Remove time")).onClick(()=>{let f=i.getSetting("time-trigger"),p=new RegExp(`(^|\\s)${Ln(f)}{([^}]+)}`),m=t.data.titleRaw.replace(p,"").trim();i.updateItemContent(t,m).then(y=>{n.updateItem(r,y)}).catch(y=>{i.setError(y),console.error(y)})})})),c.showAtPosition(s)}},[e,t,r,n,i])}h();var Vy=F.memo(function({isEditing:t,setIsEditing:r,showMenu:n}){let i=F.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return g("div",{...i,className:$("item-postfix-button-wrapper")},t?g("button",{"data-ignore-drag":!0,onPointerDown:a=>{a.preventDefault()},onClick:()=>{r(!1)},className:`${$("item-postfix-button")} is-enabled`,"aria-label":B("Cancel")},g(Kt,{name:"cross"})):g("button",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className:$("item-postfix-button"),"aria-label":B("More options")},g(Kt,{name:"vertical-three-dots"})))});h();var Ss=ge(require("obsidian"));function zy({item:e,isSettingsVisible:t,searchQuery:r}){return t||!e.data.metadata.fileMetadata?null:g("div",{className:$("item-metadata-wrapper")},g(cC,{metadata:e.data.metadata.fileMetadata,order:e.data.metadata.fileMetadataOrder,searchQuery:r}))}function jy(e,t){if(e.ts){let r=t.getSetting("date-display-format");return(0,Ss.moment)(e.ts).format(r)}return null}function qy(e,t){if(!e.path)return null;let r=app.vault.getAbstractFileByPath(e.path);if(r&&r instanceof Ss.TFile){let n=app.fileManager.generateMarkdownLink(r,t.file.path,e.subpath,e.display);return`${e.embed?"!":""}${n}`}return`${e.embed?"!":""}[[${e.path}${e.display?`|${e.display}`:""}]]`}function lC({data:e,searchQuery:t}){let{view:r,stateManager:n}=F.useContext(Ve);if(Array.isArray(e.value))return g("span",{className:$("meta-value")},e.value.map((s,u,l)=>{let c=`${s}`,d=typeof s=="object"&&!Array.isArray(s)&&(jy(s,n)||qy(s,r)),f=c.toLocaleLowerCase().contains(t);return g(S,null,d||e.containsMarkdown?g(La,{className:"inline",markdownString:d||c,searchQuery:t}):f?g("span",{className:"is-search-match"},c):c,u{let a=t[i];return g("tr",{key:i,className:$("meta-row")},!a.shouldHideLabel&&g("td",{className:`${$("meta-key")} ${(a.label||i).toLocaleLowerCase().contains(n)?"is-search-match":""}`,"data-key":i},g("span",null,a.label||i)),g("td",{colSpan:a.shouldHideLabel?2:1,className:$("meta-value-wrapper"),"data-value":Array.isArray(a.value)?a.value.join(", "):`${a.value}`},i==="tags"?a.value.map((o,s)=>g("a",{href:o,key:s,className:`tag ${$("item-tag")} ${o.toLocaleLowerCase().contains(n)?"is-search-match":""}`},g("span",null,o[0]),o.slice(1))):g(lC,{data:a,searchQuery:n})))})))});var Yy=F.memo(function({item:t,shouldMarkItemsComplete:r,isMatch:n,searchQuery:i}){let{stateManager:a,boardModifiers:o}=F.useContext(Ve),[s,u]=F.useState(!1),l=F.useContext(kt);F.useEffect(()=>{let y=()=>{s&&u(!1)};return l.dragManager.emitter.on("dragStart",y),()=>{l.dragManager.emitter.off("dragStart",y)}},[l,s]),F.useEffect(()=>{t.data.forceEditMode&&u(!0)},[t.data.forceEditMode]);let c=Vn(),d=Wy({boardModifiers:o,item:t,setIsEditing:u,stateManager:a,path:c}),f=F.useCallback(y=>{if(y.target instanceof y.view.HTMLTextAreaElement)return;y.preventDefault(),y.stopPropagation();let b=y.target instanceof y.view.HTMLAnchorElement&&y.target.hasClass("internal-link")?y.target.dataset.href:void 0;d(y,b)},[d]),p=F.useCallback(()=>{u(!0)},[u]),m=F.useMemo(()=>s?{"data-ignore-drag":!0}:{},[s]);return g("div",{onContextMenu:f,onDblClick:p,className:$("item-content-wrapper"),...m},g("div",{className:$("item-title-wrapper"),...m},g(sv,{boardModifiers:o,item:t,path:c,shouldMarkItemsComplete:r,stateManager:a}),g(Uy,{isEditing:s,item:t,searchQuery:n?i:void 0,setIsEditing:u}),g(Vy,{isEditing:s,setIsEditing:u,showMenu:d})),g(zy,{searchQuery:n?i:void 0,isSettingsVisible:s,item:t}))}),dd=F.memo(function(t){let r=F.useRef(null),n=F.useRef(null),i=F.useContext(po),{itemIndex:a,...o}=t;Ti(n,n);let s=i?o.item.data.titleSearch.contains(i):!1,u=Xg(o.item);return i&&(s?u.push("is-search-hit"):u.push("is-search-miss")),g("div",{ref:n,className:$("item-wrapper")},g("div",{ref:r,className:mt([$("item"),...u])},t.isStatic?g(Yy,{...o,isMatch:s,searchQuery:i}):g(hr,{elementRef:r,measureRef:n,id:t.item.id,index:a,data:t.item},g(Yy,{...o,isMatch:s,searchQuery:i}))))}),Jy=F.memo(function({isStatic:t,items:r,shouldMarkItemsComplete:n}){return g(S,null,r.map((i,a)=>g(dd,{key:i.id,item:i,itemIndex:a,shouldMarkItemsComplete:n,isStatic:t})))});h();h();var uC=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})};function _s(e){let t=0,r=0,n=e;do t+=n.offsetTop||0,r+=n.offsetLeft||0,n=n.offsetParent;while(n);return{top:t,left:r}}var Gy=class{constructor(t){this.element=t}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(t,r){return _s(t).left-_s(r).left}getVerticalElementScrollOffset(t,r){return _s(t).top-_s(r).top}scrollTo(t,r){this.element.scrollLeft=t,this.element.scrollTop=r}},Qy=class{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(t){return(window.scrollX||document.documentElement.scrollLeft)+t.getBoundingClientRect().left}getVerticalElementScrollOffset(t){return(window.scrollY||document.documentElement.scrollTop)+t.getBoundingClientRect().top}scrollTo(t,r){window.scrollTo(t,r)}},Zn={elements:[],cancelMethods:[],add:(e,t)=>{Zn.elements.push(e),Zn.cancelMethods.push(t)},remove:(e,t)=>{let r=Zn.elements.indexOf(e);r>-1&&(t&&Zn.cancelMethods[r](),Zn.elements.splice(r,1),Zn.cancelMethods.splice(r,1))}},Xy=typeof window!="undefined",dC={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:Xy?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};function fC(e,t={}){return uC(this,void 0,void 0,function*(){if(Xy){if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill."}else return new Promise(A=>{A(!1)});let r,n,i,a=Object.assign(Object.assign({},dC),t),o=a.elementToScroll===window,s=!!a.elementToScroll.nodeName;if(!o&&!s)throw"Element to scroll needs to be either window or DOM element.";let u=o?document.documentElement:a.elementToScroll;getComputedStyle(u).getPropertyValue("scroll-behavior")==="smooth"&&console.warn(`${u.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);let c=o?new Qy:new Gy(a.elementToScroll);if(e instanceof Element){if(i=e,s&&(!a.elementToScroll.contains(i)||a.elementToScroll.isSameNode(i)))throw"options.elementToScroll has to be a parent of scrollToElement";r=c.getHorizontalElementScrollOffset(i,a.elementToScroll),n=c.getVerticalElementScrollOffset(i,a.elementToScroll)}else if(typeof e=="number")r=c.getHorizontalScroll(),n=e;else if(Array.isArray(e)&&e.length===2)r=e[0]===null?c.getHorizontalScroll():e[0],n=e[1]===null?c.getVerticalScroll():e[1];else throw`Wrong function signature. Check documentation.
Available method signatures are:
animateScrollTo(y:number, options)
animateScrollTo([x:number | null, y:number | null], options)
- 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,m=c.getMaxVerticalScroll(),v=c.getVerticalScroll();n>m&&(n=m);let b=n-v,k=Math.abs(Math.round(p/1e3*a.speed)),T=Math.abs(Math.round(b/1e3*a.speed)),D=k>T?k:T;return Da.maxDuration&&(D=a.maxDuration),new Promise((I,H)=>{p===0&&b===0&&I(!0),zn.remove(c.element,!0);let C,F=()=>{le(),cancelAnimationFrame(C),I(!1)};zn.add(c.element,F);let U=re=>re.preventDefault(),z=a.cancelOnUserAction?F:U,ee=a.cancelOnUserAction?{passive:!0}:{passive:!1},Z=["wheel","touchstart","keydown","mousedown"],le=()=>{Z.forEach(re=>{c.element.removeEventListener(re,z,ee)})};Z.forEach(re=>{c.element.addEventListener(re,z,ee)});let X=Date.now(),G=()=>{var re=Date.now()-X,pe=re/D;let he=Math.round(f+p*a.easing(pe)),ge=Math.round(v+b*a.easing(pe));re{this.activeScroll.size===0&&(this.scrollState=_l(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=Ve(),this.scopeId=r,this.triggerTypes=n,this.scrollState=tn,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(){fs.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(){fs.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(){fs.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.on("beginDragScroll",this.handleBeginDragScroll,r),this.dndManager.dragManager.emitter.on("updateDragScroll",this.handleUpdateDragScroll,r),this.dndManager.dragManager.emitter.on("endDragScroll",this.handleEndDragScroll,r),this.dndManager.dragManager.emitter.on("dragEnd",this.onDragEnd)})}unbindScrollHandlers(){fs.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.off("beginDragScroll",this.handleBeginDragScroll,r),this.dndManager.dragManager.emitter.off("updateDragScroll",this.handleUpdateDragScroll,r),this.dndManager.dragManager.emitter.off("endDragScroll",this.handleEndDragScroll,r),this.dndManager.dragManager.emitter.off("dragEnd",this.onDragEnd)})}isDoneScrolling(t){switch(t){case"top":return this.scrollState.y===0;case"right":return this.scrollState.x===this.scrollState.maxX;case"bottom":return this.scrollState.y===this.scrollState.maxY;case"left":return this.scrollState.x===0}}handleDragScroll(){this.activeScroll.size!==0&&this.scrollEl.win.requestAnimationFrame(()=>{let t={left:0,top:0};this.activeScroll.forEach((r,n)=>{if(this.isDoneScrolling(n))return this.activeScroll.delete(n);let i=["left","right"].includes(n)?"left":"top",a=["right","bottom"].includes(n);t[i]=a?Math.max(ds-ds*r/35,0):Math.min(-ds+ds*r/35,0)}),this.scrollEl.scrollBy(t),this.scrollState=_l(this.scrollEl),this.handleEntityRegistration(),this.handleDragScroll()})}getId(t){return`${this.instanceId}-${t}`}getPath(t){var r,n,i,a;switch(t){case"right":return[...((r=this.parent)==null?void 0:r.getPath())||[],1];case"bottom":return[...((n=this.parent)==null?void 0:n.getPath())||[],2];case"left":return[...((i=this.parent)==null?void 0:i.getPath())||[],3]}return[...((a=this.parent)==null?void 0:a.getPath())||[],0]}getScrollShift(){var r,n,i;let t=(r=this.parent)==null?void 0:r.getScrollShift();return{x:Qe((n=this.parent)==null?void 0:n.scrollState.x)+Qe(t==null?void 0:t.x),y:Qe((i=this.parent)==null?void 0:i.scrollState.y)+Qe(t==null?void 0:t.y)}}createScrollEntity(t){var n,i;let r=this;return{scopeId:this.scopeId,entityId:r.getId(t),initial:kl(this.scrollEl.getBoundingClientRect(),((n=this.parent)==null?void 0:n.scrollState)||tn,((i=this.parent)==null?void 0:i.getScrollShift())||_n,t),getParentScrollState(){var a;return((a=r.parent)==null?void 0:a.scrollState)||tn},getParentScrollShift(){var a;return((a=r.parent)==null?void 0:a.getScrollShift())||_n},recalcInitial(){var a,o;this.initial=kl(r.scrollEl.getBoundingClientRect(),((a=r.parent)==null?void 0:a.scrollState)||tn,((o=r.parent)==null?void 0:o.getScrollShift())||_n,t)},getHitbox(){return io(this.initial[0],this.initial[1],this.initial[2],this.initial[3],this.getParentScrollState(),this.getParentScrollShift())},getPath(){return r.getPath(t)},getData(){return{id:r.getId(t),type:y_,side:t,accepts:r.triggerTypes||[],scrollContainer:r.scrollEl,win:Ze(r.scrollEl)}}}}};function Tv({scrollRef:e,triggerTypes:t,children:r}){let n=R.useContext(wt),i=R.useContext(tr),a=R.useContext(qi),o=R.useRef(),s=R.useMemo(()=>{if(n){o.current&&o.current.destroy();let u=new Qu(n,i,t||[],a,()=>e.current);return o.current=u,u}return null},[n,i,e,t,a]);return R.useEffect(()=>()=>{var u;return(u=o.current)==null?void 0:u.destroy()},[]),s?y(qi.Provider,{value:s},r):null}h();function Mv({children:e}){let t=R.useMemo(()=>new ji,[]);return y(Yi.Provider,{value:t},e)}function Iv(e,t){let r=R.useContext(tr),n=R.useRef(null),i=R.useContext(Yi),a=o=>{n.current=o,n.current&&o.win.requestAnimationFrame(()=>{let s=i.getScrollState(e);s&&(s.x!==0||s.y!==0)&&(n.current.scrollLeft=s.x,n.current.scrollTop=s.y)})};return R.useEffect(()=>{let o=n.current;if(!o)return;let s=jo(o.win,u=>{let l=u.target;i.setScrollState(r,e,{x:l.scrollLeft,y:l.scrollTop})});return o.addEventListener("scroll",s),()=>{o.removeEventListener("scroll",s)}},[i,e,t]),{setRef:a,scrollRef:n}}function ps({className:e,children:t,triggerTypes:r,isStatic:n,id:i,index:a}){let{setRef:o,scrollRef:s}=Iv(i,a);return y("div",{ref:o,className:pt([e,V("scroll-container")])},n?t:y(Tv,{scrollRef:s,triggerTypes:r},t))}h();h();var Xu={width:0,height:0},v_=100,Zu=class{constructor(t,r,n){this.hitboxDimensions=Xu;this.handleDragStart=({dragEntity:t,dragEntityMargin:r,dragOriginHitbox:n})=>{let i=t==null?void 0:t.entityId,a=i?this.sortables.has(i):null;!t||!a||!n||(this.setSortState(!0),this.hitboxDimensions=Dl(n,r),this.activatePlaceholder(this.hitboxDimensions,rn.none),this.sortables.forEach(([o,s,u])=>{let l=Wi(t.getPath(),o.getPath()),c=o.entityId;if(l===en.Self)return this.hidden.add(c),this.hideDraggingEntity(u);l===en.After&&(this.shifted.has(c)||this.shifted.add(c),this.shiftEl(s,rn.none,this.hitboxDimensions))}))};this.dragEndTimeout=0;this.handleDragEnd=({primaryIntersection:t,dragPosition:r,dragOriginHitbox:n,dragEntity:i})=>{if(!this.isSorting||!r||!n||!i){if(!t&&i&&this.sortables.has(i.entityId))return this.resetSelf({maintainHidden:!1});if(t&&i){let s=(t==null?void 0:t.getHitbox())||n,u=ui({position:r,destination:{x:s[0],y:s[1]}});return this.dndManager.win.setTimeout(()=>{this.resetSelf({maintainHidden:!1})},u)}return this.resetSelf({maintainHidden:!0})}this.dndManager.win.clearTimeout(this.dragEnterTimeout),this.dndManager.win.clearTimeout(this.dragLeaveTimeout),this.dndManager.win.clearTimeout(this.dragEndTimeout);let a=(t==null?void 0:t.getHitbox())||n,o=i.scopeId==="htmldnd"?0:ui({position:r,destination:{x:a[0],y:a[1]}});this.dragEndTimeout=this.dndManager.win.setTimeout(()=>{let s=i.entityId.split(":::").pop(),u=t==null?void 0:t.entityId.split(":::").pop();t&&this.sortables.has(t.entityId)&&u!==s&&this.dndManager.onDrop(i,t),this.resetSelf({maintainHidden:!1,shiftTransition:rn.none,placeholderTransition:rn.none})},o),this.hitboxDimensions=Xu};this.dragEnterTimeout=0;this.handleDragEnter=({dragEntity:t,dragEntityMargin:r,dragOriginHitbox:n,primaryIntersection:i})=>{let a=i==null?void 0:i.entityId,o=a?this.sortables.has(a):null;if(!t||!i||!o||!n){!o&&this.isSorting&&this.resetSelf({maintainHidden:!0,maintainPlaceholder:!0});return}t.entityId!==i.entityId&&(this.dndManager.win.clearTimeout(this.dragLeaveTimeout),this.dndManager.win.clearTimeout(this.dragEnterTimeout),this.dragEnterTimeout=this.dndManager.win.setTimeout(()=>{this.setSortState(!0),this.hitboxDimensions=Dl(n,r),this.activatePlaceholder(this.hitboxDimensions,rn.placeholder),this.sortables.forEach(([s,u])=>{let l=Wi(i.getPath(),s.getPath()),c=s.entityId;!this.hidden.has(c)&&(l===en.Self||l===en.After)?this.shifted.has(c)||(this.shifted.add(c),this.shiftEl(u,rn.outOfTheWay,this.hitboxDimensions)):this.shifted.has(c)&&(this.shifted.delete(c),this.resetEl(u))})},10))};this.dragLeaveTimeout=0;this.handleDragLeave=()=>{!this.isSorting||(this.dndManager.win.clearTimeout(this.dragLeaveTimeout),this.dndManager.win.clearTimeout(this.dragEnterTimeout),this.dragLeaveTimeout=this.dndManager.win.setTimeout(()=>{this.resetSelf({maintainHidden:!0,maintainPlaceholder:!0})},v_),this.hitboxDimensions=Xu)};this.instanceId=Ve(),this.dndManager=t,this.sortables=new Map,this.shifted=new Set,this.hidden=new Set,this.isSorting=!1,this.axis=r,this.placeholder=null,this.sortListeners=n?[n]:[],t.dragManager.emitter.on("dragStart",this.handleDragStart),t.dragManager.emitter.on("dragEnd",this.handleDragEnd),t.dragManager.emitter.on("dragEnter",this.handleDragEnter),t.dragManager.emitter.on("dragLeave",this.handleDragLeave)}destroy(){this.dndManager.win.clearTimeout(this.dragLeaveTimeout),this.dndManager.win.clearTimeout(this.dragEndTimeout),this.dndManager.dragManager.emitter.off("dragStart",this.handleDragStart),this.dndManager.dragManager.emitter.off("dragEnd",this.handleDragEnd),this.dndManager.dragManager.emitter.off("dragEnter",this.handleDragEnter),this.dndManager.dragManager.emitter.off("dragLeave",this.handleDragLeave)}registerSortable(t,r,n,i){let a=r.getData().type==="placeholder";this.sortables.set(t,[r,n,i]),a?(this.placeholder=[r,n,i],i.dataset.axis=this.axis,En(i,"transition",rn.none)):En(n,"transition",rn.none)}unregisterSortable(t){this.sortables.delete(t)}resetSelf({maintainHidden:t,maintainPlaceholder:r,shiftTransition:n,placeholderTransition:i}){this.isSorting&&this.setSortState(!1),this.isPlaceholderActive&&!r&&this.deactivatePlaceholder(i),this.shifted.size>0&&(this.shifted.forEach(a=>{if(this.sortables.has(a)){let[,o]=this.sortables.get(a);this.resetEl(o,n)}}),this.shifted.clear()),!t&&this.hidden.size>0&&(this.hidden.forEach(a=>{if(this.sortables.has(a)){let[,,o]=this.sortables.get(a);this.resetEl(o,n)}}),this.hidden.clear())}activatePlaceholder(t,r){if(this.placeholder){let n=this.axis==="horizontal",[,,i]=this.placeholder;En(i,"transition",r),En(i,n?"width":"height",`${n?t.width:t.height}px`),this.isPlaceholderActive=!0}}deactivatePlaceholder(t=rn.placeholder){if(this.placeholder){let[,,r]=this.placeholder;En(r,"transition",t),qo(r,"width"),qo(r,"height"),this.isPlaceholderActive=!1}}hideDraggingEntity(t){En(t,"display","none")}shiftEl(t,r,n){let i=this.axis==="horizontal"?`translate3d(${n.width}px, 0, 0)`:`translate3d(0, ${n.height}px, 0)`;En(t,"transition",r),En(t,"transform",i)}resetEl(t,r=rn.outOfTheWay){En(t,"transition",r),En(t,"transform","translate3d(0, 0, 0)"),qo(t,"display")}addSortNotifier(t){this.sortListeners.push(t)}removeSortNotifier(t){this.sortListeners=this.sortListeners.filter(r=>r!==t)}setSortState(t){this.isSorting!==t&&(this.isSorting=t,this.sortListeners.forEach(r=>r(t)))}};function mi({axis:e,children:t,onSortChange:r}){let n=R.useContext(wt),i=R.useRef(),a=R.useMemo(()=>{if(n){i.current&&i.current.destroy();let o=new Zu(n,e,r);return i.current=o,o}return null},[n,e,r]);return R.useEffect(()=>()=>{var o;return(o=i.current)==null?void 0:o.destroy()},[]),a?y(to.Provider,{value:a},t):null}h();function gi({index:e,accepts:t,className:r,isStatic:n}){let i=R.useRef(null),a=R.useRef(null),o=R.useMemo(()=>({id:Ve(),type:"placeholder",accepts:t}),t);return y("div",{ref:a,className:pt([r,V("placeholder")])},y("div",{ref:i},!n&&y(nr,{elementRef:i,measureRef:a,id:o.id,index:e,data:o})))}h();h();h();vr();vr();function b_(e,t){for(var r in t)e[r]=t[r];return e}function Av(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Lv(e){this.props=e}(Lv.prototype=new vt).isPureReactComponent=!0,Lv.prototype.shouldComponentUpdate=function(e,t){return Av(this.props,e)||Av(this.state,t)};var Pv=fe.__b;fe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pv&&Pv(e)};var _R=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var w_=fe.__e;fe.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}w_(e,t,r,n)};var Fv=fe.unmount;function ed(){this.__u=0,this.t=null,this.__b=null}function Ov(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function hs(){this.u=null,this.o=null}fe.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Fv&&Fv(e)},(ed.prototype=new vt).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Ov(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__e){var l=n.state.__e;n.__v.__k[0]=function d(f,p,m){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(v){return d(v,p,m)}),f.__c&&f.__c.__P===p&&(f.__e&&m.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=m)),f}(l,l.__c.__P,l.__c.__O)}var c;for(n.setState({__e:n.__b=null});c=n.t.pop();)c.forceUpdate()}},u=t.__h===!0;n.__u++||u||n.setState({__e:n.__b=n.__v.__k[0]}),e.then(o,o)},ed.prototype.componentWillUnmount=function(){this.t=[]},ed.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function a(o,s,u){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(l){typeof l.__c=="function"&&l.__c()}),o.__c.__H=null),(o=b_({},o)).__c!=null&&(o.__c.__P===u&&(o.__c.__P=s),o.__c=null),o.__k=o.__k&&o.__k.map(function(l){return a(l,s,u)})),o}(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__e&&y(S,null,e.fallback);return i&&(i.__h=null),[y(S,null,t.__e?null:e.children),i]};var Nv=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]{r(!1)},{ignoreClass:V("ignore-click-outside")}),c=R.useCallback(()=>{a(""),r(!1)},[]),d=async m=>{try{e(await Promise.all(m.map(v=>o.getNewItem(v))))}catch(v){o.setError(v)}},f=m=>{if(!Vn(m,o)){m.preventDefault();let v=i.trim();v&&(d([v]),a(""))}},p=()=>{let m=i.trim();m&&(d([m]),a(""))};return t?y("div",{className:V("item-form"),ref:l},y("div",{className:V("item-input-wrapper")},y(cr,{ref:u,className:V("item-input"),placeholder:B("Card title..."),onEnter:f,onEscape:c,onSubmit:p,value:i,onChange:m=>{a(m.target.value)},onPaste:m=>{Zo(m,o,s.getWindow())}}))):n?null:y("div",{className:V("item-button-wrapper")},y("button",{className:V("new-item-button"),onClick:()=>r(!0),onDragOver:m=>{Xo(o,m.dataTransfer)&&r(!0)}},y("span",{className:V("item-button-plus")},"+")," ",B("Add a card")))}h();var eb=ye(_t());h();function Vv(e){return y("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},y("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}))}h();var nd=ye(_t()),zv=ye(require("obsidian"));var jv={delete:{description:B("Are you sure you want to delete this list and all its cards?"),confirm:B("Yes, delete list")},archive:{description:B("Are you sure you want to archive this list and all its cards?"),confirm:B("Yes, archive list")},"archive-items":{description:B("Are you sure you want to archive all cards in this list?"),confirm:B("Yes, archive cards")}};function qv({action:e,cancel:t,onAction:r,lane:n}){return R.useEffect(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:y("div",{className:V("action-confirm-wrapper")},y("div",{className:V("action-confirm-text")},jv[e].description),y("div",null,y("button",{onClick:r,className:V("confirm-action-button")},jv[e].confirm),y("button",{onClick:t,className:V("cancel-action-button")},"Cancel")))}function Yv({setIsEditing:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=R.useContext(We),[a,o]=R.useState(null);return{settingsMenu:R.useMemo(()=>new zv.Menu().addItem(u=>{u.setIcon("pencil").setTitle(B("Edit list")).onClick(()=>e(!0))}).addItem(u=>{u.setIcon("documents").setTitle(B("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(u=>{u.setIcon("up-and-down-arrows").setTitle(B("Sort by card text")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===xn.TitleAsc;l.sort((d,f)=>c?f.data.titleSearch.localeCompare(d.data.titleSearch):d.data.titleSearch.localeCompare(f.data.titleSearch)),i.updateLane(t,(0,nd.default)(r,{children:{$set:l},data:{sorted:{$set:r.data.sorted===xn.TitleAsc?xn.TitleDsc:xn.TitleAsc}}}))})}).addItem(u=>{u.setIcon("up-and-down-arrows").setTitle(B("Sort by date")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===xn.DateAsc?-1:1;l.sort((d,f)=>{let p=d.data.metadata.time||d.data.metadata.date,m=f.data.metadata.time||f.data.metadata.date;return p&&!m?-1*c:m&&!p?1*c:!p&&!m?0:(p.isBefore(m)?-1:1)*c}),i.updateLane(t,(0,nd.default)(r,{children:{$set:l},data:{sorted:{$set:r.data.sorted===xn.DateAsc?xn.DateDsc:xn.DateAsc}}}))})}).addSeparator().addItem(u=>{u.setIcon("plus-with-circle").setTitle(B("Insert list before")).onClick(()=>i.insertLane(t,{...lr,id:Ve(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(u=>{u.setIcon("plus-with-circle").setTitle(B("Insert list after")).onClick(()=>{let l=[...t];l[l.length-1]=l[l.length-1]+1,i.insertLane(l,{...lr,id:Ve(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(u=>{u.setIcon("sheets-in-box").setTitle(B("Archive list")).onClick(()=>o("archive"))}).addItem(u=>{u.setIcon("trash").setTitle(B("Delete list")).onClick(()=>o("delete"))}),[n,o,t,r]),confirmAction:a,setConfirmAction:o}}h();var Jv=ye(_t());function Gv({lane:e,lanePath:t}){let{boardModifiers:r}=R.useContext(We);return y("div",{className:V("lane-setting-wrapper")},y("div",{className:V("checkbox-wrapper")},y("div",{className:V("checkbox-label")},B("Mark cards in this list as complete")),y("div",{onClick:()=>r.updateLane(t,(0,Jv.default)(e,{data:{$toggle:["shouldMarkItemsComplete"]}})),className:`checkbox-container ${e.data.shouldMarkItemsComplete?"is-enabled":""}`})))}h();var Qv=ye(require("obsidian"));function Xv({itemCount:e,maxItems:t,isEditing:r,setIsEditing:n,title:i,onChange:a}){let{stateManager:o}=R.useContext(We),s=R.useRef(),u=o.getSetting("hide-card-count"),l=p=>{Vn(p,o)||(p.preventDefault(),r&&n(!1))},c=()=>{r&&n(!1)},d=()=>{r&&n(!1)};R.useEffect(()=>{if(r&&s.current){let p=s.current;s.current.focus(),p.selectionStart=p.selectionEnd=p.value.length}},[r]);let f=[V("lane-title-count")];return t&&t{p.preventDefault(),p.stopPropagation();let m=p.target instanceof p.view.HTMLAnchorElement&&p.target.hasClass("internal-link")?p.target.dataset.href:void 0;m&&o.app.workspace.onLinkContextMenu(p,(0,Qv.getLinkpath)(m),o.file.path)}},y(wa,{markdownString:i})))),!r&&!u&&y("div",{className:pt(f)},e,t>0&&y(S,null,y("span",{className:V("lane-title-count-separator")},"/"),y("span",{className:V("lane-title-count-limit")},t))))}h();function gs(e,t){let r=t.end-t.start;return e.slice(0,t.start)+"\0".repeat(r)+e.slice(t.end)}function Zv(e){return e.replace(/\s*\0+\s*/g," ").trim()}function xa(e){return e.trim().replace(/(\r\n|\n)/g,"
")}function ys(e){return e.replace(/
/g,`
-`).trim()}function Ar(e){e=ys(e);let t=e.match(/^(.*?)\s*\((\d+)\)$/);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}var tb=R.memo(function({lane:t,laneIndex:r,dragHandleRef:n,setIsItemInputVisible:i}){let{boardModifiers:a,stateManager:o}=R.useContext(We),[s,u]=R.useState(!1),l=Nn(r),{settingsMenu:c,confirmAction:d,setConfirmAction:f}=Yv({setIsEditing:u,path:l,lane:t});return R.useEffect(()=>{t.data.forceEditMode&&u(!0)},[t.data.forceEditMode]),y(S,null,y("div",{onDblClick:()=>u(!0),className:V("lane-header-wrapper")},y("div",{className:V("lane-grip"),ref:n},y(Vv,null)),y(Xv,{isEditing:s,setIsEditing:u,itemCount:t.children.length,maxItems:t.data.maxItems,title:t.data.title,onChange:p=>{let{title:m,maxItems:v}=Ar(p.target.value);a.updateLane(l,(0,eb.default)(t,{data:{title:{$set:m},maxItems:{$set:v}}}))}}),y("div",{className:V("lane-settings-button-wrapper")},s?y("button",{onClick:()=>{u(!1)},"aria-label":"Close",className:`${V("lane-settings-button")} is-enabled`},y(Zt,{name:"cross"})):y(S,null,i&&y("button",{"aria-label":B("Add a card"),className:V("lane-settings-button"),onClick:()=>{i(!0)},onDragOver:p=>{Xo(o,p.dataTransfer)&&i(!0)}},y(Zt,{name:"plus-with-circle"})),y("button",{"aria-label":B("More options"),className:V("lane-settings-button"),onClick:p=>{c.showAtPosition({x:p.clientX,y:p.clientY})}},y(Zt,{name:"vertical-three-dots"}))))),s&&y(Gv,{lane:t,lanePath:l}),d&&y(qv,{lane:t,action:d,onAction:()=>{switch(d){case"archive":a.archiveLane(l);break;case"archive-items":a.archiveLaneItems(l);break;case"delete":a.deleteEntity(l);break}f(null)},cancel:()=>f(null)}))});var rb=[Xe.Item],rd=R.memo(function({isStatic:t,lane:r,laneIndex:n}){let{stateManager:i,boardModifiers:a,view:o}=R.useContext(We),[s,u]=R.useState(!1),l=Nn(n),c=i.useSetting("lane-width"),d=i.useSetting("new-card-insertion-method"),f=!!r.data.shouldMarkItemsComplete,p=c?{width:`${c}px`}:void 0,m=R.useRef(null),v=R.useRef(null),b=R.useRef(null),[k,T]=R.useState(!1),D=d==="prepend-compact",I=D||d==="prepend";fi(v,b);let H=U=>{a[I?"prependItems":"appendItems"]([...l,r.children.length-1],U.map(z=>(0,nb.default)(z,{data:{isComplete:{$set:f}}}))),o.getWindow().setTimeout(()=>{var ee;let z=(ee=m.current)==null?void 0:ee.getElementsByClassName(V("lane-items"));z.length&&us([0,I?0:z[0].scrollHeight],{elementToScroll:z[0],speed:200,minDuration:150,easing:Z=>Z===1?1:1-Math.pow(2,-10*Z)})})},C=y(S,null,y(Sv,{items:r.children,isStatic:t,shouldMarkItemsComplete:f}),y(gi,{accepts:rb,index:r.children.length,isStatic:t})),F=y(ps,{id:r.id,index:n,className:pt([V("lane-items"),V("vertical")]),triggerTypes:rb,isStatic:t},t?C:y(mi,{onSortChange:T,axis:"vertical"},C));return y("div",{ref:v,className:pt([V("lane-wrapper"),{"is-sorting":k}]),style:p},y("div",{"data-count":r.children.length,ref:m,className:pt([V("lane"),{"will-prepend":I}])},y(tb,{dragHandleRef:b,laneIndex:n,lane:r,setIsItemInputVisible:D?u:void 0}),I&&y(td,{addItems:H,hideButton:D,isInputVisible:s,setIsInputVisible:u}),t?F:y(nr,{elementRef:m,measureRef:v,id:r.id,index:n,data:r},F),!I&&y(td,{addItems:H,isInputVisible:s,setIsInputVisible:u})))}),ib=R.memo(function({lanes:t}){return y(S,null,t.map((r,n)=>y(rd,{lane:r,laneIndex:n,key:r.id})))});h();h();var ab=ye(require("obsidian"));h();function vs(){return{events:{},emit(e,t,r){let n=`${String(e)}${r||""}`,i=this.events[e],a=this.events[n];if(!i&&!a){console.warn("Event emitted with no handler",e,r);return}r&&a&&a.forEach(o=>o(t)),i&&i.forEach(o=>o(t))},on(e,t,r){let n=`${String(e)}${r||""}`,i=this.events[n];return i||(this.events[n]=i=[]),i.push(t),()=>this.off(e,t,r)},off(e,t,r){let n=`${String(e)}${r||""}`,i=this.events[n];i&&(i.splice(i.indexOf(t)>>>0,1),i.length===0&&delete this.events[n])}}}var id=class{constructor(t,r){this.scrollResizeDebounce=0;this.handleResize=t=>{let r=!1;t.forEach(n=>{let i=Ze(n.target);this.win===i&&(r=!0,n.target.dataset.scrollid&&(this.win.clearTimeout(this.scrollResizeDebounce),this.scrollResizeDebounce=this.win.setTimeout(()=>{var a;((a=this.emitter.events.scrollResize)==null?void 0:a.length)&&this.emitter.emit("scrollResize",null)},50)))}),!!r&&(this.hitboxEntities.forEach(n=>{n.recalcInitial()}),this.scrollEntities.forEach(n=>{n.recalcInitial()}))};this.win=t,this.emitter=vs(),this.hitboxEntities=new Map,this.scrollEntities=new Map,this.onDrop=r,this.resizeObserver=new ResizeObserver((0,ab.debounce)(this.handleResize,100,!0)),this.dragManager=new hu(t,this.emitter,this.hitboxEntities,this.scrollEntities)}destroy(){this.resizeObserver.disconnect()}observeResize(t){this.resizeObserver.observe(t,{box:"border-box"})}unobserveResize(t){this.resizeObserver.unobserve(t)}registerHitboxEntity(t,r,n){n===this.win&&this.hitboxEntities.set(t,r)}registerScrollEntity(t,r,n){n===this.win&&this.scrollEntities.set(t,r)}unregisterHitboxEntity(t,r){r===this.win&&this.hitboxEntities.delete(t)}unregisterScrollEntity(t,r){r===this.win&&this.scrollEntities.delete(t)}};function bs({win:e,children:t,onDrop:r}){let n=R.useRef(r);n.current=r;let i=R.useMemo(()=>new id(e,(a,o)=>n.current(a,o)),[]);return R.useEffect(()=>()=>{i.destroy()},[i]),y(wt.Provider,{value:i},y(Mv,null,t))}h();function ad(e,t,r,n,i,a){let o=[r[0]-n[0],r[1]-n[1],r[2]+n[2],r[3]+n[3]];return{transform:a||`translate3d(${e.x-t.x+o[0]}px, ${e.y-t.y+o[1]}px, 0px)`,width:`${o[2]-o[0]}px`,height:`${o[3]-o[1]}px`,transition:i}}function ws({children:e}){let t=R.useContext(wt),[r,n]=R.useState(),[i,a]=R.useState();return R.useEffect(()=>{if(!t)return;let o=rp,s=({dragEntity:c,dragOrigin:d,dragPosition:f,dragEntityMargin:p})=>{!c||!f||!d||(o=c.getHitbox(),n(c),a(ad(f,d,o,p)))},u=({dragOrigin:c,dragPosition:d,dragEntityMargin:f})=>{!d||!c||a(ad(d,c,o,f))},l=({dragOrigin:c,primaryIntersection:d,dragPosition:f,dragEntityMargin:p})=>{if(d&&f&&c){let m=d.getHitbox(),v={x:m[0],y:m[1]},b=ui({position:f,destination:v}),k=rn.drop(b),T=Ag.drop(v);a(ad(f,c,o,p,k,T)),activeWindow.setTimeout(()=>{n(void 0),a(void 0)},b)}else n(void 0),a(void 0)};return t.dragManager.emitter.on("dragStart",s),t.dragManager.emitter.on("dragMove",u),t.dragManager.emitter.on("dragEnd",l),()=>{t.dragManager.emitter.off("dragStart",s),t.dragManager.emitter.off("dragMove",u),t.dragManager.emitter.off("dragEnd",l)}},[t]),!r||!i?null:R.createPortal(e(r,i),r.getData().win.document.body)}function ob(){let e=R.useContext(wt),[t,r]=R.useState(!1);return R.useEffect(()=>{let n=()=>{r(!0)},i=({primaryIntersection:a,dragPosition:o})=>{let s=(a==null?void 0:a.getHitbox())||[0,0],u={x:s[0],y:s[1]},l=ui({position:o||u,destination:u});activeWindow.setTimeout(()=>{r(!1)},l)};return e.dragManager.emitter.on("dragStart",n),e.dragManager.emitter.on("dragEnd",i),()=>{e.dragManager.emitter.off("dragStart",n),e.dragManager.emitter.off("dragEnd",i)}},[e]),t}h();var ka=ye(_t()),sb=ye(require("obsidian"));function Es(e){let t=r=>{let n=e.getSetting("prepend-archive-format"),i=e.getSetting("prepend-archive-separator"),a=[(0,sb.moment)().format(n)];i&&a.push(i),a.push(r.data.titleRaw);let o=a.join(" ");return e.updateItemContent(r,o)};return{appendItems:(r,n)=>{n.forEach(i=>e.app.workspace.trigger("kanban:card-added",e.file,i)),e.setState(i=>vl(i,r,n))},prependItems:(r,n)=>{n.forEach(i=>e.app.workspace.trigger("kanban:card-added",e.file,i)),e.setState(i=>Xf(i,r,n))},insertItems:(r,n)=>{n.forEach(i=>e.app.workspace.trigger("kanban:card-added",e.file,i)),e.setState(i=>er(i,r,n))},splitItem:(r,n)=>{n.forEach(i=>e.app.workspace.trigger("kanban:card-added",e.file,i)),e.setState(i=>er(wr(i,r),r,n))},addLane:r=>{e.app.workspace.trigger("kanban:lane-added",e.file,r),e.setState(n=>vl(n,[],[r]))},insertLane:(r,n)=>{e.app.workspace.trigger("kanban:lane-added",e.file,n),e.setState(i=>er(i,r,[n]))},updateLane:(r,n)=>{e.app.workspace.trigger("kanban:lane-updated",e.file,n),e.setState(i=>bl(i,r,{children:{[r[r.length-1]]:{$set:n}}}))},archiveLane:r=>{e.setState(async n=>{let i=ft(n,r),a=i.children;e.app.workspace.trigger("kanban:lane-archived",e.file,i);try{return(0,ka.default)(wr(n,r),{data:{archive:{$unshift:e.getSetting("prepend-archive-date")?await Promise.all(a.map(t)):a}}})}catch(o){return e.setError(o),n}})},archiveLaneItems:r=>{e.setState(async n=>{let a=ft(n,r).children;e.app.workspace.trigger("kanban:lane-cards-archived",e.file,a);try{return(0,ka.default)(Xa(n,r,{children:{$set:[]}}),{data:{archive:{$unshift:e.getSetting("prepend-archive-date")?await Promise.all(a.map(t)):a}}})}catch(o){return e.setError(o),n}})},deleteEntity:r=>{e.setState(n=>{let i=ft(n,r);return e.app.workspace.trigger(`kanban:${i.type}-deleted`,e.file,i),wr(n,r)})},updateItem:(r,n)=>{e.setState(i=>{let a=ft(i,r);return e.app.workspace.trigger("kanban:card-updated",e.file,a,n),bl(i,r,{children:{[r[r.length-1]]:{$set:n}}})})},archiveItem:r=>{e.setState(async n=>{let i=ft(n,r);e.app.workspace.trigger("kanban:card-archived",e.file,r,i);try{return(0,ka.default)(wr(n,r),{data:{archive:{$push:[e.getSetting("prepend-archive-date")?await t(i):i]}}})}catch(a){return e.setError(a),n}})},duplicateEntity:r=>{e.setState(n=>{let i=ft(n,r);e.app.workspace.trigger(`kanban:${i.type}-duplicated`,e.file,r,i);let a=(0,ka.default)(i,{id:{$set:Ve()}});return er(n,r,[a])})}}}function cb(e,t){return y(F_,{win:e,plugin:t})}var P_=R.memo(function({view:t}){return R.createPortal(t.getPortal(),t.contentEl)});function F_({win:e,plugin:t}){let r=t.useViewState(e),n=r.map(a=>y(P_,{key:a.id,view:a})),i=R.useCallback((a,o)=>{if(!a||!o)return;if(a.scopeId==="htmldnd"){let v=a.getData(),b=t.getStateManagerFromViewID(v.viewId,v.win),k=o.getPath(),T=ft(b.state,k.slice(0,-1));(I=>Promise.all(I.map(H=>b.getNewItem(H))))(v.content).then(I=>{let H=I.map(C=>{var F;return(0,lb.default)(C,{data:{isComplete:{$set:!!((F=T==null?void 0:T.data)==null?void 0:F.shouldMarkItemsComplete)}}})});return b.setState(C=>er(C,k,H))}).catch(I=>{b.setError(I),console.error(I)});return}let s=a.getPath(),u=o.getPath(),[,l]=a.scopeId.split(":::"),[,c]=o.scopeId.split(":::"),d=a.getData(),f=o.getData();if(l===c){let v=t.getStateManagerFromViewID(a.scopeId,d.win);return t.app.workspace.trigger("kanban:card-moved",v.file,s,u,d),v.setState(b=>{var H;let k=!1,T=Qf(b,s,u,C=>C.type===Xe.Item?(k=!0,El(b,s,b,u,C)):C);if(!k)return T;let D=u.slice(0,-1),I=ft(b,D);return((H=I==null?void 0:I.data)==null?void 0:H.sorted)!==void 0?Xa(T,D,{data:{$unset:["sorted"]}}):T})}let p=t.getStateManagerFromViewID(a.scopeId,d.win),m=t.getStateManagerFromViewID(o.scopeId,f.win);p.setState(v=>{let b=ft(v,s);return m.setState(k=>{let T=b.type===Xe.Item?El(v,s,k,u,b):b;return er(k,u,[T])}),wr(v,s)})},[r]);if(n.length)return y(bs,{win:e,onDrop:i},n,y(ws,null,(a,o)=>{let[s,u]=R.useMemo(()=>{if(a.scopeId==="htmldnd")return[null,null];let l=a.getData(),c=t.getKanbanView(a.scopeId,l.win),d=t.stateManagers.get(c.file),f=ft(d.state,a.getPath()),p=Es(d),m=c.file.path;return[f,{view:c,stateManager:d,boardModifiers:p,filePath:m}]},[a]);return(s==null?void 0:s.type)===Xe.Lane?y(We.Provider,{value:u},y("div",{className:V("drag-container"),style:o},y(rd,{lane:s,laneIndex:0,isStatic:!0}))):(s==null?void 0:s.type)===Xe.Item?y(We.Provider,{value:u},y("div",{className:V("drag-container"),style:o},y(Gu,{item:s,itemIndex:0,isStatic:!0}))):y("div",null)}))}h();var fd=ye(_t()),Ib=ye(require("obsidian"));h();var vb=ye(_t()),bb=ye(require("obsidian")),ks=ye(Ql());h();function xs({id:e,children:t}){let r=R.useContext(Yi),n=R.useMemo(()=>e||Ve(),[e]);return R.useEffect(()=>()=>{r.unmountScope(e)},[e]),y(tr.Provider,{value:n},t)}h();var fn="kanban-plugin",ub;(function(t){t[t.List=0]="List"})(ub||(ub={}));var db=`**${B("Complete")}**`,fb="***",od=["---","",`${fn}: basic`,"","---","",""].join(`
-`);function pb(e){return["","","%% kanban:settings","```",JSON.stringify(e),"```","%%"].join(`
-`)}function hb(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 O_(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 mb(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 sd(e,t){let r=e.getSetting("metadata-keys");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=O_(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 m=(n==null?void 0:n.tags)||[];if(Array.isArray((p=n==null?void 0:n.frontmatter)==null?void 0:p.tags)&&(m=[].concat(m,n.frontmatter.tags.map(v=>({tag:`#${v}`})))),(m==null?void 0:m.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:m.map(v=>v.tag).filter(v=>o[v]?!1:(o[v]=!0,!0))},l=!0;return}let d=mb(n==null?void 0:n.frontmatter,c.metadataKey),f=mb(i,c.metadataKey);if(d)u.push(c.metadataKey),a[c.metadataKey]={...c,value:d},l=!0;else if(f){let m=i[c.metadataKey],v=m.values||m.val||m;if(v===m&&typeof v=="object")v={...m};else if(!Array.isArray(v)&&typeof v!="string"&&typeof v!="number")return;u.push(c.metadataKey),a[c.metadataKey]={...c,value:v},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function gb(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"].every(n=>e[n]===t[n])}h();function yb({onNewLane:e,closeLaneForm:t}){let{boardModifiers:r,stateManager:n}=R.useContext(We),[i,a]=R.useState(!1),[o,s]=R.useState(""),u=R.useRef(),l=ms(()=>{t()},{ignoreClass:V("ignore-click-outside")});R.useLayoutEffect(()=>{var d;(d=u.current)==null||d.focus()},[]);let c=()=>{r.addLane({...lr,id:Ve(),children:[],data:{...Ar(o),shouldMarkItemsComplete:i}}),s(""),a(!1),e()};return y("div",{ref:l,className:V("lane-form-wrapper")},y("div",{className:V("lane-input-wrapper")},y(cr,{ref:u,className:V("lane-input"),onChange:d=>s(d.target.value),onEnter:d=>{Vn(d,n)||(d.preventDefault(),c())},onSubmit:()=>{c()},onEscape:t,value:o})),y("div",{className:V("checkbox-wrapper")},y("div",{className:V("checkbox-label")},B("Mark cards in this list as complete")),y("div",{onClick:()=>a(!i),className:`checkbox-container ${i?"is-enabled":""}`})),y("div",{className:V("lane-input-actions")},y("button",{className:V("lane-action-add"),onClick:c},B("Add list")),y("button",{className:V("lane-action-cancel"),onClick:t},B("Cancel"))))}var N_=[Xe.Item,Xe.Lane],R_=[Xe.Lane],wb=({view:e,stateManager:t})=>{let r=t.useState(),n=ob(),i=R.useRef(null),a=R.useRef(null),[o,s]=R.useState(""),[u,l]=R.useState(!1),[c,d]=R.useState(""),[f,p]=R.useState((r==null?void 0:r.children.length)===0),m=t.file.path,v=t.useSetting("max-archive-size"),b=R.useCallback(()=>{(r==null?void 0:r.children.length)>0&&p(!1)},[r==null?void 0:r.children.length]);R.useEffect(()=>{(r==null?void 0:r.children.length)===0&&!t.hasError()&&p(!0)},[r==null?void 0:r.children.length,t]);let k=R.useCallback(()=>{var F;(F=i.current)==null||F.win.setTimeout(()=>{var z;let U=(z=i.current)==null?void 0:z.getElementsByClassName(V("board"));(U==null?void 0:U.length)&&us([U[0].scrollWidth,0],{elementToScroll:U[0],speed:300,minDuration:150,easing:ee=>ee===1?1:1-Math.pow(2,-10*ee)})})},[]);R.useEffect(()=>{let F=z=>{z==="editor:open-search"&&l(ee=>!ee)},U=()=>{p(!0)};return e.emitter.on("hotkey",F),e.emitter.on("showLaneForm",U),()=>{e.emitter.off("hotkey",F),e.emitter.off("showLaneForm",U)}},[e]),R.useEffect(()=>{var F;u&&((F=a.current)==null||F.focus())},[u]),R.useEffect(()=>{let F=e.getWindow(),U=o.trim(),z;return U?z=F.setTimeout(()=>{d(U)},250):d(""),()=>{F.clearTimeout(z)}},[o,e]),R.useEffect(()=>{v===void 0||v===-1||typeof v=="number"&&(r==null?void 0:r.data.archive.length)>v&&t.setState(F=>(0,vb.default)(F,{data:{archive:{$set:F.data.archive.slice(v*-1)}}}))},[r==null?void 0:r.data.archive.length,v]);let T=R.useMemo(()=>Es(t),[t]),D=R.useCallback(F=>{let U=F.target;U.tagName==="A"&&U.hasClass("internal-link")&&e.app.workspace.trigger("hover-link",{event:F,source:fn,hoverParent:e,targetEl:U,linktext:U.getAttr("href"),sourcePath:e.file.path})},[e]),I=R.useCallback(async F=>{if(F.type==="auxclick"||F.button===2)return;let U=F.target,z=U.tagName==="A"?U:U.closest("a");if(!!z){if(z.hasClass("file-link")){F.preventDefault();let ee=z.getAttribute("href"),Z=Ir(ee),le=typeof ee=="string"&&e.app.metadataCache.getFirstLinkpathDest(Z.root,e.file.path);if(!le)return;t.app.openWithDefaultApp(le.path);return}if(z.hasClass("internal-link")){F.preventDefault();let ee=z.getAttr("href"),Z=F.button===1||F.ctrlKey||F.metaKey;if(z.hasClass("is-unresolved")&&(0,ks.appHasDailyNotesPluginLoaded)()){let X=t.getSetting("date-format"),G=(0,bb.moment)(ee,X,!0);if(G.isValid()){try{let re=await(0,ks.createDailyNote)(G);await(Z?app.workspace.getLeaf(!0):app.workspace.getLeaf(!1)).openFile(re,{active:!0})}catch(re){console.error(re),t.setError(re)}return}}t.app.workspace.openLinkText(ee,m,Z);return}if(z.hasClass("tag")){F.preventDefault(),t.app.internalPlugins.getPluginById("global-search").instance.openGlobalSearch(`tag:${z.getAttr("href")}`);return}z.hasClass("external-link")&&(F.preventDefault(),window.open(z.getAttr("href"),"_blank"))}},[t,m]),H=R.useMemo(()=>({view:e,stateManager:t,boardModifiers:T,filePath:m}),[e,t,T,m]),C=Pg(t);return r==null?y("div",{className:V("loading")},y("div",{className:"sk-pulse"})):r.data.errors.length>0?y("div",null,y("div",null,"Error:"),r.data.errors.map((F,U)=>y("div",{key:U},y("div",null,F.description),y("pre",null,F.stack)))):y(xs,{id:e.id},y(We.Provider,{value:H},y(Qa.Provider,{value:c?c.toLocaleLowerCase():null},y("div",{ref:i,className:pt([wl,{"something-is-dragging":n}]),onMouseOver:D,onPointerDown:I,onClick:I,onAuxClick:I,...C},(f||r.children.length===0)&&y(yb,{onNewLane:k,closeLaneForm:b}),u&&y("div",{className:V("search-wrapper")},y("input",{ref:a,value:o,onChange:F=>{s(F.target.value)},onKeyDown:F=>{F.key==="Escape"&&(s(""),d(""),F.target.blur(),l(!1))},type:"text",className:V("filter-input"),placeholder:B("Search...")}),y("button",{className:V("search-cancel-button"),onClick:()=>{s(""),d(""),l(!1)},"aria-label":B("Cancel")},y(Zt,{name:"cross"}))),y(ps,{id:e.id,className:pt([V("board"),V("horizontal"),{"is-adding-lane":f}]),triggerTypes:N_},y("div",null,y(mi,{axis:"horizontal"},y(ib,{lanes:r.children}),y(gi,{className:V("lane-placeholder"),accepts:R_,index:r.children.length}))))))))};h();var Cb=ye(_t()),Ke=ye(require("obsidian"));h();var Lr=ye(_t());function Eb({isStatic:e,itemIndex:t,item:r,toggleShouldHideLabel:n,toggleContainsMarkdown:i,deleteKey:a,updateKey:o,updateLabel:s}){let u=R.useRef(null),l=R.useRef(null),c=R.useRef(null);fi(l,c);let d=y("div",{className:V("setting-controls-wrapper")},y("div",{className:V("setting-input-wrapper")},y("div",null,y("div",{className:V("setting-item-label")},B("Metadata key")),y("input",{type:"text",value:r.data.metadataKey,onChange:f=>o(f.target.value)})),y("div",null,y("div",{className:V("setting-item-label")},B("Display label")),y("input",{type:"text",value:r.data.label,onChange:f=>s(f.target.value)}))),y("div",{className:V("setting-toggle-wrapper")},y("div",null,y("div",{className:`checkbox-container ${r.data.shouldHideLabel?"is-enabled":""}`,onClick:n,"aria-label":B("Hide label")}),y("div",{className:V("setting-item-label")},B("Hide label"))),y("div",null,y("div",{className:`checkbox-container ${r.data.containsMarkdown?"is-enabled":""}`,onClick:i,"aria-label":B("Field contains markdown")}),y("div",{className:V("setting-item-label")},B("Field contains markdown")))));return y("div",{ref:l,className:V("setting-item-wrapper")},y("div",{ref:u,className:V("setting-item")},e?d:y(nr,{elementRef:u,measureRef:l,id:r.id,index:t,data:r},d),y("div",{className:V("setting-button-wrapper")},y("div",{onClick:a,"aria-label":B("Delete")},y(Zt,{name:"cross"})),y("div",{className:"mobile-option-setting-drag-icon","aria-label":B("Drag to rearrange"),ref:c},y(Zt,{name:"three-horizontal-bars"})))))}function H_({onChange:e,inputValue:t,keys:r,setKeys:n}){let i=a=>{e(a),n(a)};return{updateKey:a=>o=>{i((0,Lr.default)(r,{[a]:{data:{metadataKey:{$set:o}}}}))},updateLabel:a=>o=>{i((0,Lr.default)(r,{[a]:{data:{label:{$set:o}}}}))},toggleShouldHideLabel:a=>()=>{i((0,Lr.default)(r,{[a]:{data:{$toggle:["shouldHideLabel"]}}}))},toggleContainsMarkdown:a=>()=>{i((0,Lr.default)(r,{[a]:{data:{$toggle:["containsMarkdown"]}}}))},deleteKey:a=>()=>{i((0,Lr.default)(r,{$splice:[[a,1]]}))},newKey:()=>{i((0,Lr.default)(r,{$push:[{...Go,id:Ve(),data:{metadataKey:t,label:"",shouldHideLabel:!1,containsMarkdown:!1}}]}))},moveKey:(a,o)=>{let s=a.getPath(),u=o.getPath(),l=s[s.length-1],c=u[u.length-1];if(l===c)return;let d=r.slice(),[f]=d.splice(l,1);d.splice(c,0,f),i(d)}}}var B_=[Xe.MetadataSetting];function K_({keys:e,portalContainer:t}){return R.createPortal(y(ws,null,(r,n)=>{let a=r.getPath()[0],o=e[a];return y("div",{className:V("drag-container"),style:n},y(Eb,{item:o,itemIndex:a,updateKey:jr,updateLabel:jr,toggleShouldHideLabel:jr,toggleContainsMarkdown:jr,deleteKey:jr,isStatic:!0}))}),t)}function $_({scrollEl:e}){let t=R.useContext(wt);return R.useEffect(()=>{let r=0,n=()=>{e.win.clearTimeout(r),r=e.win.setTimeout(()=>{t.hitboxEntities.forEach(i=>{i.recalcInitial()})},100)};return e.addEventListener("scroll",n,{passive:!0,capture:!1}),()=>{e.removeEventListener("scroll",n)}},[e,t]),null}function U_(e){let[t,r]=R.useState(e.dataKeys),[n,i]=R.useState(""),{getShouldIMEBlockAction:a,...o}=eo(),s=Ze(e.scrollEl),{updateKey:u,updateLabel:l,toggleShouldHideLabel:c,toggleContainsMarkdown:d,deleteKey:f,newKey:p,moveKey:m}=H_({onChange:e.onChange,inputValue:n,keys:t,setKeys:r,win:s});return y(S,null,y(bs,{win:s,onDrop:m},y($_,{scrollEl:e.scrollEl}),y(xs,null,y(mi,{axis:"vertical"},t.map((v,b)=>y(Eb,{key:v.id,item:v,itemIndex:b,updateKey:u(b),updateLabel:l(b),toggleShouldHideLabel:c(b),toggleContainsMarkdown:d(b),deleteKey:f(b)})),y(gi,{accepts:B_,index:t.length}))),y(K_,{keys:t,portalContainer:e.portalContainer})),y("div",{className:V("setting-key-input-wrapper")},y("input",{placeholder:B("Metadata key"),type:"text",value:n,onChange:v=>i(v.target.value),onKeyDown:v=>{if(!a()){if(v.key==="Enter"){p(),i("");let b=v.target;b.win.setTimeout(()=>{b.scrollIntoView()});return}v.key==="Escape"&&(i(""),v.target.blur())}},...o}),y("button",{onClick:v=>{p(),i("");let b=v.target;b.win.setTimeout(()=>{b.scrollIntoView()})}},B("Add key"))))}function xb(e,t,r,n){R.render(y(U_,{dataKeys:r,scrollEl:t,onChange:n,portalContainer:Ja(e)}),e)}function kb(e){R.unmountComponentAtNode(e)}h();var _b=ye(Sb()),_s=ye(_t()),dr=ye(require("obsidian"));var Ds="@",Cs="@@";function W_(e){let t=[];return dr.Vault.recurseChildren(e.vault.getRoot(),r=>{r instanceof dr.TFolder&&t.push({value:r.path,label:r.path,selected:!1,disabled:!1})}),t}function V_(e,t){let r=[],n=t?e.vault.getAbstractFileByPath(t):null;return(!n||!(n instanceof dr.TFolder))&&(n=e.vault.getRoot()),dr.Vault.recurseChildren(n,i=>{i instanceof dr.TFile&&r.push({value:i.path,label:i.basename,selected:!1,disabled:!1})}),r}function Db(e){let{templateFolder:t,templatesEnabled:r,templaterPlugin:n}=xl(e),i=V_(e,t),a=W_(e),o="";return!r&&!n&&(o=B("Note: No template plugins are currently enabled.")),{templateFiles:i,vaultFolders:a,templateWarning:o}}function cd({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);if(c){let p=e.findIndex(v=>v.value===c),m=e[p];u=(0,_s.default)(u,{$splice:[[p,1]],$unshift:[(0,_s.default)(m,{placeholder:{$set:!0},value:{$set:""},label:{$apply:v=>`${v} (${B("default")})`}})]})}else u=(0,_s.default)(u,{$unshift:[{placeholder:!0,value:"",label:i,selected:!1,disabled:!1}]});let d=new _b.default(s,{placeholder:!0,position:"bottom",searchPlaceholderValue:B("Search..."),searchEnabled:u.length>10,choices:u}).setChoiceByValue("");l&&typeof l=="string"&&d.setChoiceByValue(l);let f=p=>{let m=p.detail.value;m?a.applySettingsUpdate({[t]:{$set:m}}):a.applySettingsUpdate({$unset:[t]})};s.addEventListener("change",f),a.cleanupFns.push(()=>{d.destroy(),s.removeEventListener("change",f)})}),r&&o.descEl.createDiv({},u=>{u.createEl("strong",{text:r})})})}}var Tb=/^\d+(?:\.\d+)?$/,Mb={[fn]:!0,"date-display-format":!0,"date-format":!0,"date-picker-week-start":!0,"date-time-display-format":!0,"date-trigger":!0,"hide-card-count":!0,"hide-date-display":!0,"hide-date-in-title":!0,"hide-tags-display":!0,"hide-tags-in-title":!0,"lane-width":!0,"link-date-to-daily-note":!0,"max-archive-size":!0,"metadata-keys":!0,"new-card-insertion-method":!0,"new-line-trigger":!0,"new-note-folder":!0,"new-note-template":!0,"prepend-archive-date":!0,"prepend-archive-format":!0,"prepend-archive-separator":!0,"show-checkboxes":!0,"show-relative-date":!0,"time-format":!0,"time-trigger":!0,"show-add-list":!0,"show-archive-all":!0,"show-view-as-markdown":!0,"show-board-settings":!0,"show-search":!0},ud=class{constructor(t,r,n){this.cleanupFns=[];this.applyDebounceTimer=0;this.app=t.app,this.plugin=t,this.config=r,this.settings=n}applySettingsUpdate(t){this.win.clearTimeout(this.applyDebounceTimer),this.applyDebounceTimer=this.win.setTimeout(()=>{this.settings=(0,Cb.default)(this.settings,t),this.config.onSettingsChange(this.settings)},200)}getSetting(t,r){return r?[this.settings[t],this.plugin.settings[t]]:[this.settings[t],null]}constructUI(t,r,n){this.win=t.win;let{templateFiles:i,vaultFolders:a,templateWarning:o}=Db(this.app);t.createEl("h3",{text:r}),n?t.createEl("p",{text:B("These settings will take precedence over the default Kanban board settings.")}):t.createEl("p",{text:B("Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.")}),new Ke.Setting(t).setName(B("New line trigger")).setDesc(B("Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.")).addDropdown(s=>{s.addOption("shift-enter",B("Shift + Enter")),s.addOption("enter",B("Enter"));let[u,l]=this.getSetting("new-line-trigger",n);s.setValue(u||l||"shift-enter"),s.onChange(c=>{this.applySettingsUpdate({"new-line-trigger":{$set:c}})})}),new Ke.Setting(t).setName(B("Prepend / append new cards")).setDesc(B("This setting controls whether new cards are added to the beginning or end of the list.")).addDropdown(s=>{s.addOption("prepend",B("Prepend")),s.addOption("prepend-compact",B("Prepend (compact)")),s.addOption("append",B("Append"));let[u,l]=this.getSetting("new-card-insertion-method",n);s.setValue(u||l||"append"),s.onChange(c=>{this.applySettingsUpdate({"new-card-insertion-method":{$set:c}})})}),new Ke.Setting(t).setName(B("Note template")).setDesc(B("This template will be used when creating new notes from Kanban cards.")).then(cd({choices:i,key:"new-note-template",warningText:o,local:n,placeHolderStr:B("No template"),manager:this})),new Ke.Setting(t).setName(B("Note folder")).setDesc(B("Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.")).then(cd({choices:a,key:"new-note-folder",local:n,placeHolderStr:B("Default folder"),manager:this})),new Ke.Setting(t).setName(B("Hide card counts in list titles")).setDesc(B("When toggled, card counts are hidden from the list title")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("hide-card-count",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"hide-card-count":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("hide-card-count",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["hide-card-count"]})})})}),new Ke.Setting(t).setName(B("List width")).setDesc(B("Enter a number to set the list width in pixels.")).addText(s=>{let[u,l]=this.getSetting("lane-width",n);s.inputEl.setAttr("type","number"),s.inputEl.placeholder=`${l||"272"} (default)`,s.inputEl.value=u?u.toString():"",s.onChange(c=>{if(c&&Tb.test(c)){s.inputEl.removeClass("error"),this.applySettingsUpdate({"lane-width":{$set:parseInt(c)}});return}c&&s.inputEl.addClass("error"),this.applySettingsUpdate({$unset:["lane-width"]})})}),new Ke.Setting(t).setName(B("Maximum number of archived cards")).setDesc(B("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.")).addText(s=>{let[u,l]=this.getSetting("max-archive-size",n);s.inputEl.setAttr("type","number"),s.inputEl.placeholder=`${l||"-1"} (default)`,s.inputEl.value=u?u.toString():"",s.onChange(c=>{if(c&&Tb.test(c)){s.inputEl.removeClass("error"),this.applySettingsUpdate({"max-archive-size":{$set:parseInt(c)}});return}c&&s.inputEl.addClass("error"),this.applySettingsUpdate({$unset:["max-archive-size"]})})}),new Ke.Setting(t).setName(B("Display card checkbox")).setDesc(B("When toggled, a checkbox will be displayed with each card")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-checkboxes",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"show-checkboxes":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-checkboxes",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-checkboxes"]})})})}),new Ke.Setting(t).setName(B("Hide tags in card titles")).setDesc(B("When toggled, tags will be hidden card titles. This will prevent tags from being included in the title when creating new notes.")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("hide-tags-in-title",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"hide-tags-in-title":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("hide-tags-in-title",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["hide-tags-in-title"]})})})}),new Ke.Setting(t).setName(B("Hide card display tags")).setDesc(B("When toggled, tags will not be displayed below the card title.")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("hide-tags-display",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"hide-tags-display":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("hide-tags-display",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["hide-tags-display"]})})})}),t.createEl("h4",{text:B("Board Header Buttons")}),new Ke.Setting(t).setName(B("Add a list")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-add-list",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(f=>{this.applySettingsUpdate({"show-add-list":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-add-list",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-add-list"]})})})}),new Ke.Setting(t).setName(B("Archive completed cards")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-archive-all",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(f=>{this.applySettingsUpdate({"show-archive-all":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-archive-all",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-archive-all"]})})})}),new Ke.Setting(t).setName(B("Open as markdown")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-view-as-markdown",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(f=>{this.applySettingsUpdate({"show-view-as-markdown":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-view-as-markdown",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-view-as-markdown"]})})})}),new Ke.Setting(t).setName(B("Open board settings")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-board-settings",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(f=>{this.applySettingsUpdate({"show-board-settings":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-board-settings",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-board-settings"]})})})}),new Ke.Setting(t).setName(B("Search...")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-search",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(f=>{this.applySettingsUpdate({"show-search":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-search",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-search"]})})})}),t.createEl("h4",{text:B("Date & Time")}),new Ke.Setting(t).setName(B("Date trigger")).setDesc(B("When this is typed, it will trigger the date selector")).addText(s=>{let[u,l]=this.getSetting("date-trigger",n);(u||l)&&s.setValue(u||l),s.setPlaceholder(l||Ds),s.onChange(c=>{c?this.applySettingsUpdate({"date-trigger":{$set:c}}):this.applySettingsUpdate({$unset:["date-trigger"]})})}),new Ke.Setting(t).setName(B("Time trigger")).setDesc(B("When this is typed, it will trigger the time selector")).addText(s=>{let[u,l]=this.getSetting("time-trigger",n);(u||l)&&s.setValue(u||l),s.setPlaceholder(l||Cs),s.onChange(c=>{c?this.applySettingsUpdate({"time-trigger":{$set:c}}):this.applySettingsUpdate({$unset:["time-trigger"]})})}),new Ke.Setting(t).setName(B("Date format")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(f=>{f.appendText(B("This format will be used when saving dates in markdown.")),f.createEl("br"),f.appendText(B("For more syntax, refer to")+" "),f.createEl("a",{text:B("format reference"),href:"https://momentjs.com/docs/#/displaying/format/"},p=>{p.setAttr("target","_blank")}),f.createEl("br"),f.appendText(B("Your current syntax looks like this")+": "),u.setSampleEl(f.createEl("b",{cls:"u-pop"})),f.createEl("br")}));let[l,c]=this.getSetting("date-format",n),d=qr(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(f=>{f?this.applySettingsUpdate({"date-format":{$set:f}}):this.applySettingsUpdate({$unset:["date-format"]})})})}),new Ke.Setting(t).setName(B("Time format")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(f=>{f.appendText(B("For more syntax, refer to")+" "),f.createEl("a",{text:B("format reference"),href:"https://momentjs.com/docs/#/displaying/format/"},p=>{p.setAttr("target","_blank")}),f.createEl("br"),f.appendText(B("Your current syntax looks like this")+": "),u.setSampleEl(f.createEl("b",{cls:"u-pop"})),f.createEl("br")}));let[l,c]=this.getSetting("time-format",n),d=zi(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(f=>{f?this.applySettingsUpdate({"time-format":{$set:f}}):this.applySettingsUpdate({$unset:["time-format"]})})})}),new Ke.Setting(t).setName(B("Date display format")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(f=>{f.appendText(B("This format will be used when displaying dates in Kanban cards.")),f.createEl("br"),f.appendText(B("For more syntax, refer to")+" "),f.createEl("a",{text:B("format reference"),href:"https://momentjs.com/docs/#/displaying/format/"},p=>{p.setAttr("target","_blank")}),f.createEl("br"),f.appendText(B("Your current syntax looks like this")+": "),u.setSampleEl(f.createEl("b",{cls:"u-pop"})),f.createEl("br")}));let[l,c]=this.getSetting("date-display-format",n),d=qr(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(f=>{f?this.applySettingsUpdate({"date-display-format":{$set:f}}):this.applySettingsUpdate({$unset:["date-display-format"]})})})}),new Ke.Setting(t).setName(B("Show relative date")).setDesc(B("When toggled, cards will display the distance between today and the card's date. eg. 'In 3 days', 'A month ago'")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("show-relative-date",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"show-relative-date":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("show-relative-date",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["show-relative-date"]})})})}),new Ke.Setting(t).setName(B("Hide card display dates")).setDesc(B("When toggled, formatted dates will not be displayed on the card. Relative dates will still be displayed if they are enabled.")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("hide-date-display",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"hide-date-display":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("hide-date-display",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["hide-date-display"]})})})}),new Ke.Setting(t).setName(B("Hide dates in card titles")).setDesc(B("When toggled, dates will be hidden card titles. This will prevent dates from being included in the title when creating new notes.")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("hide-date-in-title",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"hide-date-in-title":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("hide-date-in-title",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["hide-date-in-title"]})})})}),new Ke.Setting(t).setName(B("Link dates to daily notes")).setDesc(B("When toggled, dates will link to daily notes. Eg. [[2021-04-26]]")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("link-date-to-daily-note",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"link-date-to-daily-note":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("link-date-to-daily-note",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["link-date-to-daily-note"]})})})}),new Ke.Setting(t).setName(B("Add date and time to archived cards")).setDesc(B("When toggled, the current date and time will be added to the beginning of a card when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting("prepend-archive-date",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(f=>{this.applySettingsUpdate({"prepend-archive-date":{$set:f}})})}).addExtraButton(l=>{l.setIcon("reset").setTooltip(B("Reset to default")).onClick(()=>{let[,c]=this.getSetting("prepend-archive-date",n);u.setValue(!!c),this.applySettingsUpdate({$unset:["prepend-archive-date"]})})})}),new Ke.Setting(t).setName(B("Archive date/time separator")).setDesc(B("This will be used to separate the archived date/time from the title")).addText(s=>{let[u,l]=this.getSetting("prepend-archive-separator",n);s.inputEl.placeholder=l?`${l} (default)`:"",s.inputEl.value=u||"",s.onChange(c=>{if(c){this.applySettingsUpdate({"prepend-archive-separator":{$set:c}});return}this.applySettingsUpdate({$unset:["prepend-archive-separator"]})})}),new Ke.Setting(t).setName(B("Archive date/time format")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(T=>{T.appendText(B("For more syntax, refer to")+" "),T.createEl("a",{text:B("format reference"),href:"https://momentjs.com/docs/#/displaying/format/"},D=>{D.setAttr("target","_blank")}),T.createEl("br"),T.appendText(B("Your current syntax looks like this")+": "),u.setSampleEl(T.createEl("b",{cls:"u-pop"})),T.createEl("br")}));let[l,c]=this.getSetting("prepend-archive-format",n),[d,f]=this.getSetting("date-format",n),p=d||f||qr(this.app),[m,v]=this.getSetting("time-format",n),b=m||v||zi(this.app),k=`${p} ${b}`;u.setPlaceholder(k),u.setDefaultFormat(k),(l||c)&&u.setValue(l||c),u.onChange(T=>{T?this.applySettingsUpdate({"prepend-archive-format":{$set:T}}):this.applySettingsUpdate({$unset:["prepend-archive-format"]})})})}),new Ke.Setting(t).setName(B("Calendar: first day of week")).setDesc(B("Override which day is used as the start of the week")).addDropdown(s=>{s.addOption("",B("default")),s.addOption("0",B("Sunday")),s.addOption("1",B("Monday")),s.addOption("2",B("Tuesday")),s.addOption("3",B("Wednesday")),s.addOption("4",B("Thursday")),s.addOption("5",B("Friday")),s.addOption("6",B("Saturday"));let[u,l]=this.getSetting("date-picker-week-start",n);s.setValue((u==null?void 0:u.toString())||(l==null?void 0:l.toString())||""),s.onChange(c=>{c?this.applySettingsUpdate({"date-picker-week-start":{$set:Number(c)}}):this.applySettingsUpdate({$unset:["date-picker-week-start"]})})}),t.createEl("br"),t.createEl("h4",{text:B("Linked Page Metadata")}),t.createEl("p",{cls:V("metadata-setting-desc"),text:B("Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.")}),new Ke.Setting(t).then(s=>{s.settingEl.addClass(V("draggable-setting-container"));let[u]=this.getSetting("metadata-keys",n),l=(u||[]).map(c=>({...Go,id:Ve(),data:c,win:Ze(t)}));xb(s.settingEl,t,l,c=>this.applySettingsUpdate({"metadata-keys":{$set:c.map(d=>d.data)}})),this.cleanupFns.push(()=>{s.settingEl&&kb(s.settingEl)})})}cleanUp(){this.win=null,this.cleanupFns.forEach(t=>t()),this.cleanupFns=[]}},Ts=class extends Ke.Modal{constructor(t,r,n){super(t.app);this.view=t,this.settingsManager=new ud(t.plugin,r,n)}onOpen(){let{contentEl:t,modalEl:r}=this;r.addClass(V("board-settings-modal")),this.settingsManager.constructUI(t,this.view.file.basename,!0)}onClose(){let{contentEl:t}=this;this.settingsManager.cleanUp(),t.empty()}},dd=class extends Ke.PluginSettingTab{constructor(t,r){super(t.app,t);this.plugin=t,this.settingsManager=new ud(t,r,t.settings)}display(){let{containerEl:t}=this;t.empty(),t.addClass(V("board-settings-modal")),this.settingsManager.constructUI(t,B("Kanban Plugin"),!1)}};var pn="kanban",Sa="blocks",jn=class extends Ib.TextFileView{constructor(t,r){super(t);this.actionButtons={};this.plugin=r,this.emitter=vs(),this.emitter.on("hotkey",n=>{switch(n){case"daily-notes:goto-prev":{fm(this.app,this.file);break}case"daily-notes:goto-next":{dm(this.app,this.file);break}}}),this.register(this.containerEl.onWindowMigrated(()=>{this.plugin.removeView(this),this.plugin.addView(this,this.data,this.isPrimary)}))}get isPrimary(){var t;return((t=this.plugin.getStateManager(this.file))==null?void 0:t.getAView())===this}get id(){var t;return`${this.leaf.id}:::${(t=this.file)==null?void 0:t.path}`}get isShiftPressed(){return this.plugin.isShiftPressed}setBoard(t,r=!0){this.plugin.stateManagers.get(this.file).setState(t,r)}getBoard(){return this.plugin.stateManagers.get(this.file).state}getViewType(){return pn}getIcon(){return Sa}getDisplayText(){var t;return((t=this.file)==null?void 0:t.basename)||"Kanban"}getWindow(){return Ze(this.containerEl)}async onLoadFile(t){try{return await super.onLoadFile(t)}catch(r){throw this.plugin.stateManagers.get(this.file).setError(r),r}}destroy(){this.plugin.removeView(this),Object.values(this.actionButtons).forEach(t=>t.remove()),this.actionButtons={}}async onClose(){this.destroy()}async onUnloadFile(t){return this.destroy(),await super.onUnloadFile(t)}handleRename(t,r){this.file.path===t&&this.plugin.handleViewFileRename(this,r)}requestSaveToDisk(t){this.data!==t&&this.isPrimary?(this.data=t,this.requestSave()):this.data=t}getViewData(){return this.data}setViewData(t,r){if(!pm(t)){this.plugin.kanbanFileModes[this.leaf.id||this.file.path]="markdown",this.plugin.removeView(this),this.plugin.setMarkdownView(this.leaf,!1);return}this.plugin.addView(this,t,!r&&this.isPrimary)}getPortal(){let t=this.plugin.stateManagers.get(this.file);return y(wb,{stateManager:t,view:this})}onPaneMenu(t,r,n=!0){if(r!=="more-options"){super.onPaneMenu(t,r);return}t.addItem(i=>{i.setTitle(B("Open as markdown")).setIcon("document").setSection("pane").onClick(()=>{this.plugin.kanbanFileModes[this.leaf.id||this.file.path]="markdown",this.plugin.setMarkdownView(this.leaf)})}).addItem(i=>{i.setTitle(B("Open board settings")).setIcon("gear").setSection("pane").onClick(()=>{let a=this.plugin.stateManagers.get(this.file),o=a.state;new Ts(this,{onSettingsChange:s=>{let u=(0,fd.default)(o,{data:{settings:{$set:s}}});a.setState(u)}},o.data.settings).open()})}).addItem(i=>{i.setTitle(B("Archive completed cards")).setIcon("sheets-in-box").setSection("pane").onClick(()=>{this.plugin.stateManagers.get(this.file).archiveCompletedCards()})}),n&&super.onPaneMenu(t,r)}initHeaderButtons(){let t=this.plugin.getStateManager(this.file);if(!!t)if(t.getSetting("show-board-settings")&&!this.actionButtons["show-board-settings"]?this.actionButtons["show-board-settings"]=this.addAction("gear",B("Open board settings"),()=>{let r=this.plugin.stateManagers.get(this.file),n=r.state;new Ts(this,{onSettingsChange:i=>{let a=(0,fd.default)(n,{data:{settings:{$set:i}}});r.setState(a)}},n.data.settings).open()}):!t.getSetting("show-board-settings")&&this.actionButtons["show-board-settings"]&&(this.actionButtons["show-board-settings"].remove(),delete this.actionButtons["show-board-settings"]),t.getSetting("show-search")&&!this.actionButtons["show-search"]?this.actionButtons["show-search"]=this.addAction("search",B("Search..."),()=>{this.emitter.emit("hotkey","editor:open-search")}):!t.getSetting("show-search")&&this.actionButtons["show-search"]&&(this.actionButtons["show-search"].remove(),delete this.actionButtons["show-search"]),t.getSetting("show-view-as-markdown")&&!this.actionButtons["show-view-as-markdown"]?this.actionButtons["show-view-as-markdown"]=this.addAction("document",B("Open as markdown"),()=>{this.plugin.kanbanFileModes[this.leaf.id||this.file.path]="markdown",this.plugin.setMarkdownView(this.leaf)}):!t.getSetting("show-view-as-markdown")&&this.actionButtons["show-view-as-markdown"]&&(this.actionButtons["show-view-as-markdown"].remove(),delete this.actionButtons["show-view-as-markdown"]),t.getSetting("show-archive-all")&&!this.actionButtons["show-archive-all"]?this.actionButtons["show-archive-all"]=this.addAction("sheets-in-box",B("Archive completed cards"),()=>{this.plugin.stateManagers.get(this.file).archiveCompletedCards()}):!t.getSetting("show-archive-all")&&this.actionButtons["show-archive-all"]&&(this.actionButtons["show-archive-all"].remove(),delete this.actionButtons["show-archive-all"]),t.getSetting("show-add-list")&&!this.actionButtons["show-add-list"]){let r=this.addAction("plus-with-circle",B("Add a list"),()=>{this.emitter.emit("showLaneForm",void 0)});r.addClass(V("ignore-click-outside")),this.actionButtons["show-add-list"]=r}else!t.getSetting("show-add-list")&&this.actionButtons["show-add-list"]&&(this.actionButtons["show-add-list"].remove(),delete this.actionButtons["show-add-list"])}clear(){}};h();var Si=ye(_t()),jw=ye(require("obsidian"));h();h();var pd={};Ti(pd,{JsonPatchError:()=>it,_areEquals:()=>Ca,applyOperation:()=>Pr,applyPatch:()=>Fs,applyReducer:()=>J_,deepClone:()=>q_,getValueByPointer:()=>Ps,validate:()=>Lb,validator:()=>Os});h();h();var z_=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j_=Object.prototype.hasOwnProperty;function Ms(e,t){return j_.call(e,t)}function Is(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&n<=57){t++;continue}return!1}return!0}function In(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function _a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ls(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t0&&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&&m(t,0,e,f)),c++,Array.isArray(l)){if(p==="-")p=l.length;else{if(r&&!As(p))throw new it("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);As(p)&&(p=~~p)}if(c>=d){if(r&&t.op==="add"&&p>l.length)throw new it("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=Y_[t.op].call(t,l,p,e);if(o.test===!1)throw new it("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(c>=d){var o=yi[t.op].call(t,l,p,e);if(o.test===!1)throw new it("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[p],r&&c0)throw new it('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new it("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new it("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Ls(e.value))throw new it("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var i=e.path.split("/").length,a=n.split("/").length;if(i!==a+1&&i!==a)throw new it("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new it("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var o={op:"_get",path:e.from,value:void 0},s=Lb([o],r);if(s&&s.name==="OPERATION_PATH_UNRESOLVABLE")throw new it("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new it("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function Lb(e,t,r){try{if(!Array.isArray(e))throw new it("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Fs(It(t),It(e),r||!0);else{r=r||Os;for(var n=0;nyd,generate:()=>md,observe:()=>nD,unobserve:()=>tD});h();var hd=new WeakMap,G_=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),Q_=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function X_(e){return hd.get(e)}function Z_(e,t){return e.observers.get(t)}function eD(e,t){e.observers.delete(t.callback)}function tD(e,t){t.unobserve()}function nD(e,t){var r=[],n,i=X_(e);if(!i)i=new G_(e),hd.set(e,i);else{var a=Z_(i,t);n=a&&a.observer}if(n)return n;if(n={},i.value=It(e),t){n.callback=t,n.next=null;var o=function(){md(n)},s=function(){clearTimeout(n.next),n.next=setTimeout(o)};typeof window!="undefined"&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s))}return n.patches=r,n.object=e,n.unobserve=function(){md(n),clearTimeout(n.next),eD(i,n),typeof window!="undefined"&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s))},i.observers.set(t,new Q_(t,n)),n}function md(e,t){t===void 0&&(t=!1);var r=hd.get(e.object);gd(r.value,e.object,e.patches,"",t),e.patches.length&&Fs(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function gd(e,t,r,n,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=Is(t),o=Is(e),s=!1,u=!1,l=o.length-1;l>=0;l--){var c=o[l],d=e[c];if(Ms(t,c)&&!(t[c]===void 0&&d!==void 0&&Array.isArray(t)===!1)){var f=t[c];typeof d=="object"&&d!=null&&typeof f=="object"&&f!=null&&Array.isArray(d)===Array.isArray(f)?gd(d,f,r,n+"/"+In(c),i):d!==f&&(s=!0,i&&r.push({op:"test",path:n+"/"+In(c),value:It(d)}),r.push({op:"replace",path:n+"/"+In(c),value:It(f)}))}else Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:n+"/"+In(c),value:It(d)}),r.push({op:"remove",path:n+"/"+In(c)}),u=!0):(i&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),s=!0)}if(!(!u&&a.length==o.length))for(var l=0;l":""))+")"})),f;function f(){let p=[],m,v,b;if((!t||i(s,u,l[l.length-1]||null))&&(p=sD(r(s,l)),p[0]===wd))return p;if(s.children&&p[0]!==Bb)for(v=(n?s.children.length:-1)+a,b=l.concat(s);v>-1&&v!0){for(let i=t+1,a=e.length;i{try{await Vb(e,r),await Promise.all(r.children.map(n=>Ma(e,n)))}catch(n){throw e.setError(n),n}}))}catch(r){throw e.setError(r),r}return t}function lD(e){return(e.op==="add"||e.op==="replace")&&["/title","/titleRaw","/dateStr","/timeStr",/\d$/,/\/fileAccessor\/.+$/].some(t=>typeof t=="string"?e.path.endsWith(t):t.test(e.path))}async function jb(e,t,r){let n={},i=r.reduce((a,o)=>{if(!lD(o))return a;let s=o.path.split("/").reduce((l,c)=>(/\d+/.test(c)&&l.push(Number(c)),l),[]),u=s.join(",");return n[u]||(n[u]=!0,a.push(s)),a},[]);try{await Promise.all(i.map(a=>{let o=ft(t,a);if(o.type===Xe.Lane)return Vb(e,o);if(o.type===Xe.Item)return Ma(e,o)}))}catch(a){throw e.setError(a),a}return t}h();h();h();h();h();h();function At(e,t,r,n){let i=e.length,a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),[].splice.apply(e,o);else for(r&&[].splice.apply(e,[t,r]);a0?(At(e,e.length,0,t),e):t}var qb={}.hasOwnProperty;function Yb(e){let t={},r=-1;for(;++ro))return;let F=t.events.length,U=F,z,ee;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(z){ee=t.events[U][1].end;break}z=!0}for(k(n),C=F;CD;){let H=r[I];t.containerState=H[1],H[0].exit.call(t,e)}r.length=D}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pD(e,t,r){return Se(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}h();h();h();h();function _d(e){if(e===null||Ge(e)||Xb(e))return 1;if(Zb(e))return 2}h();function vi(e,t,r){let n=[],i=-1;for(;++i1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d=Object.assign({},e[n][1].end),f=Object.assign({},e[r][1].start);rw(d,-u),rw(f,u),o={type:u>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Vt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Vt(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Vt(l,vi(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Vt(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=Vt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,At(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
-`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var xD={}.hasOwnProperty;function bi(e){return xD.call(Cd,e)?Cd[e]:!1}var Ks={name:"characterReference",tokenize:kD};function kD(e,t,r){let n=this,i=0,a,o;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=zt,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Gb,c):(e.enter("characterReferenceValue"),a=7,o=Ia,c(d))}function c(d){let f;return d===59&&i?(f=e.exit("characterReferenceValue"),o===zt&&!bi(n.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)):o(d)&&i++=4?o(l):r(l)}function o(l){return l===null?u(l):ce(l)?e.attempt(_D,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||ce(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function CD(e,t,r){let n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):ce(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Se(e,a,"linePrefix",4+1)(o)}function a(o){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):ce(o)?i(o):r(o)}}h();var Td={name:"codeText",tokenize:ID,resolve:TD,previous:MD};function TD(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n